app-service.js 3.5 MB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697306983069930700307013070230703307043070530706307073070830709307103071130712307133071430715307163071730718307193072030721307223072330724307253072630727307283072930730307313073230733307343073530736307373073830739307403074130742307433074430745307463074730748307493075030751307523075330754307553075630757307583075930760307613076230763307643076530766307673076830769307703077130772307733077430775307763077730778307793078030781307823078330784307853078630787307883078930790307913079230793307943079530796307973079830799308003080130802308033080430805308063080730808308093081030811308123081330814308153081630817308183081930820308213082230823308243082530826308273082830829308303083130832308333083430835308363083730838308393084030841308423084330844308453084630847308483084930850308513085230853308543085530856308573085830859308603086130862308633086430865308663086730868308693087030871308723087330874308753087630877308783087930880308813088230883308843088530886308873088830889308903089130892308933089430895308963089730898308993090030901309023090330904309053090630907309083090930910309113091230913309143091530916309173091830919309203092130922309233092430925309263092730928309293093030931309323093330934309353093630937309383093930940309413094230943309443094530946309473094830949309503095130952309533095430955309563095730958309593096030961309623096330964309653096630967309683096930970309713097230973309743097530976309773097830979309803098130982309833098430985309863098730988309893099030991309923099330994309953099630997309983099931000310013100231003310043100531006310073100831009310103101131012310133101431015310163101731018310193102031021310223102331024310253102631027310283102931030310313103231033310343103531036310373103831039310403104131042310433104431045310463104731048310493105031051310523105331054310553105631057310583105931060310613106231063310643106531066310673106831069310703107131072310733107431075310763107731078310793108031081310823108331084310853108631087310883108931090310913109231093310943109531096310973109831099311003110131102311033110431105311063110731108311093111031111311123111331114311153111631117311183111931120311213112231123311243112531126311273112831129311303113131132311333113431135311363113731138311393114031141311423114331144311453114631147311483114931150311513115231153311543115531156311573115831159311603116131162311633116431165311663116731168311693117031171311723117331174311753117631177311783117931180311813118231183311843118531186311873118831189311903119131192311933119431195311963119731198311993120031201312023120331204312053120631207312083120931210312113121231213312143121531216312173121831219312203122131222312233122431225312263122731228312293123031231312323123331234312353123631237312383123931240312413124231243312443124531246312473124831249312503125131252312533125431255312563125731258312593126031261312623126331264312653126631267312683126931270312713127231273312743127531276312773127831279312803128131282312833128431285312863128731288312893129031291312923129331294312953129631297312983129931300313013130231303313043130531306313073130831309313103131131312313133131431315313163131731318313193132031321313223132331324313253132631327313283132931330313313133231333313343133531336313373133831339313403134131342313433134431345313463134731348313493135031351313523135331354313553135631357313583135931360313613136231363313643136531366313673136831369313703137131372313733137431375313763137731378313793138031381313823138331384313853138631387313883138931390313913139231393313943139531396313973139831399314003140131402314033140431405314063140731408314093141031411314123141331414314153141631417314183141931420314213142231423314243142531426314273142831429314303143131432314333143431435314363143731438314393144031441314423144331444314453144631447314483144931450314513145231453314543145531456314573145831459314603146131462314633146431465314663146731468314693147031471314723147331474314753147631477314783147931480314813148231483314843148531486314873148831489314903149131492314933149431495314963149731498314993150031501315023150331504315053150631507315083150931510315113151231513315143151531516315173151831519315203152131522315233152431525315263152731528315293153031531315323153331534315353153631537315383153931540315413154231543315443154531546315473154831549315503155131552315533155431555315563155731558315593156031561315623156331564315653156631567315683156931570315713157231573315743157531576315773157831579315803158131582315833158431585315863158731588315893159031591315923159331594315953159631597315983159931600316013160231603316043160531606316073160831609316103161131612316133161431615316163161731618316193162031621316223162331624316253162631627316283162931630316313163231633316343163531636316373163831639316403164131642316433164431645316463164731648316493165031651316523165331654316553165631657316583165931660316613166231663316643166531666316673166831669316703167131672316733167431675316763167731678316793168031681316823168331684316853168631687316883168931690316913169231693316943169531696316973169831699317003170131702317033170431705317063170731708317093171031711317123171331714317153171631717317183171931720317213172231723317243172531726317273172831729317303173131732317333173431735317363173731738317393174031741317423174331744317453174631747317483174931750317513175231753317543175531756317573175831759317603176131762317633176431765317663176731768317693177031771317723177331774317753177631777317783177931780317813178231783317843178531786317873178831789317903179131792317933179431795317963179731798317993180031801318023180331804318053180631807318083180931810318113181231813318143181531816318173181831819318203182131822318233182431825318263182731828318293183031831318323183331834318353183631837318383183931840318413184231843318443184531846318473184831849318503185131852318533185431855318563185731858318593186031861318623186331864318653186631867318683186931870318713187231873318743187531876318773187831879318803188131882318833188431885318863188731888318893189031891318923189331894318953189631897318983189931900319013190231903319043190531906319073190831909319103191131912319133191431915319163191731918319193192031921319223192331924319253192631927319283192931930319313193231933319343193531936319373193831939319403194131942319433194431945319463194731948319493195031951319523195331954319553195631957319583195931960319613196231963319643196531966319673196831969319703197131972319733197431975319763197731978319793198031981319823198331984319853198631987319883198931990319913199231993319943199531996319973199831999320003200132002320033200432005320063200732008320093201032011320123201332014320153201632017320183201932020320213202232023320243202532026320273202832029320303203132032320333203432035320363203732038320393204032041320423204332044320453204632047320483204932050320513205232053320543205532056320573205832059320603206132062320633206432065320663206732068320693207032071320723207332074320753207632077320783207932080320813208232083320843208532086320873208832089320903209132092320933209432095320963209732098320993210032101321023210332104321053210632107321083210932110321113211232113321143211532116321173211832119321203212132122321233212432125321263212732128321293213032131321323213332134321353213632137321383213932140321413214232143321443214532146321473214832149321503215132152321533215432155321563215732158321593216032161321623216332164321653216632167321683216932170321713217232173321743217532176321773217832179321803218132182321833218432185321863218732188321893219032191321923219332194321953219632197321983219932200322013220232203322043220532206322073220832209322103221132212322133221432215322163221732218322193222032221322223222332224322253222632227322283222932230322313223232233322343223532236322373223832239322403224132242322433224432245322463224732248322493225032251322523225332254322553225632257322583225932260322613226232263322643226532266322673226832269322703227132272322733227432275322763227732278322793228032281322823228332284322853228632287322883228932290322913229232293322943229532296322973229832299323003230132302323033230432305323063230732308323093231032311323123231332314323153231632317323183231932320323213232232323323243232532326323273232832329323303233132332323333233432335323363233732338323393234032341323423234332344323453234632347323483234932350323513235232353323543235532356323573235832359323603236132362323633236432365323663236732368323693237032371323723237332374323753237632377323783237932380323813238232383323843238532386323873238832389323903239132392323933239432395323963239732398323993240032401324023240332404324053240632407324083240932410324113241232413324143241532416324173241832419324203242132422324233242432425324263242732428324293243032431324323243332434324353243632437324383243932440324413244232443324443244532446324473244832449324503245132452324533245432455324563245732458324593246032461324623246332464324653246632467324683246932470324713247232473324743247532476324773247832479324803248132482324833248432485324863248732488324893249032491324923249332494324953249632497324983249932500325013250232503325043250532506325073250832509325103251132512325133251432515325163251732518325193252032521325223252332524325253252632527325283252932530325313253232533325343253532536325373253832539325403254132542325433254432545325463254732548325493255032551325523255332554325553255632557325583255932560325613256232563325643256532566325673256832569325703257132572325733257432575325763257732578325793258032581325823258332584325853258632587325883258932590325913259232593325943259532596325973259832599326003260132602326033260432605326063260732608326093261032611326123261332614326153261632617326183261932620326213262232623326243262532626326273262832629326303263132632326333263432635326363263732638326393264032641326423264332644326453264632647326483264932650326513265232653326543265532656326573265832659326603266132662326633266432665326663266732668326693267032671326723267332674326753267632677326783267932680326813268232683326843268532686326873268832689326903269132692326933269432695326963269732698326993270032701327023270332704327053270632707327083270932710327113271232713327143271532716327173271832719327203272132722327233272432725327263272732728327293273032731327323273332734327353273632737327383273932740327413274232743327443274532746327473274832749327503275132752327533275432755327563275732758327593276032761327623276332764327653276632767327683276932770327713277232773327743277532776327773277832779327803278132782327833278432785327863278732788327893279032791327923279332794327953279632797327983279932800328013280232803328043280532806328073280832809328103281132812328133281432815328163281732818328193282032821328223282332824328253282632827328283282932830328313283232833328343283532836328373283832839328403284132842328433284432845328463284732848328493285032851328523285332854328553285632857328583285932860328613286232863328643286532866328673286832869328703287132872328733287432875328763287732878328793288032881328823288332884328853288632887328883288932890328913289232893328943289532896328973289832899329003290132902329033290432905329063290732908329093291032911329123291332914329153291632917329183291932920329213292232923329243292532926329273292832929329303293132932329333293432935329363293732938329393294032941329423294332944329453294632947329483294932950329513295232953329543295532956329573295832959329603296132962329633296432965329663296732968329693297032971329723297332974329753297632977329783297932980329813298232983329843298532986329873298832989329903299132992329933299432995329963299732998329993300033001330023300333004330053300633007330083300933010330113301233013330143301533016330173301833019330203302133022330233302433025330263302733028330293303033031330323303333034330353303633037330383303933040330413304233043330443304533046330473304833049330503305133052330533305433055330563305733058330593306033061330623306333064330653306633067330683306933070330713307233073330743307533076330773307833079330803308133082330833308433085330863308733088330893309033091330923309333094330953309633097330983309933100331013310233103331043310533106331073310833109331103311133112331133311433115331163311733118331193312033121331223312333124331253312633127331283312933130331313313233133331343313533136331373313833139331403314133142331433314433145331463314733148331493315033151331523315333154331553315633157331583315933160331613316233163331643316533166331673316833169331703317133172331733317433175331763317733178331793318033181331823318333184331853318633187331883318933190331913319233193331943319533196331973319833199332003320133202332033320433205332063320733208332093321033211332123321333214332153321633217332183321933220332213322233223332243322533226332273322833229332303323133232332333323433235332363323733238332393324033241332423324333244332453324633247332483324933250332513325233253332543325533256332573325833259332603326133262332633326433265332663326733268332693327033271332723327333274332753327633277332783327933280332813328233283332843328533286332873328833289332903329133292332933329433295332963329733298332993330033301333023330333304333053330633307333083330933310333113331233313333143331533316333173331833319333203332133322333233332433325333263332733328333293333033331333323333333334333353333633337333383333933340333413334233343333443334533346333473334833349333503335133352333533335433355333563335733358333593336033361333623336333364333653336633367333683336933370333713337233373333743337533376333773337833379333803338133382333833338433385333863338733388333893339033391333923339333394333953339633397333983339933400334013340233403334043340533406334073340833409334103341133412334133341433415334163341733418334193342033421334223342333424334253342633427334283342933430334313343233433334343343533436334373343833439334403344133442334433344433445334463344733448334493345033451334523345333454334553345633457334583345933460334613346233463334643346533466334673346833469334703347133472334733347433475334763347733478334793348033481334823348333484334853348633487334883348933490334913349233493334943349533496334973349833499335003350133502335033350433505335063350733508335093351033511335123351333514335153351633517335183351933520335213352233523335243352533526335273352833529335303353133532335333353433535335363353733538335393354033541335423354333544335453354633547335483354933550335513355233553335543355533556335573355833559335603356133562335633356433565335663356733568335693357033571335723357333574335753357633577335783357933580335813358233583335843358533586335873358833589335903359133592335933359433595335963359733598335993360033601336023360333604336053360633607336083360933610336113361233613336143361533616336173361833619336203362133622336233362433625336263362733628336293363033631336323363333634336353363633637336383363933640336413364233643336443364533646336473364833649336503365133652336533365433655336563365733658336593366033661336623366333664336653366633667336683366933670336713367233673336743367533676336773367833679336803368133682336833368433685336863368733688336893369033691336923369333694336953369633697336983369933700337013370233703337043370533706337073370833709337103371133712337133371433715337163371733718337193372033721337223372333724337253372633727337283372933730337313373233733337343373533736337373373833739337403374133742337433374433745337463374733748337493375033751337523375333754337553375633757337583375933760337613376233763337643376533766337673376833769337703377133772337733377433775337763377733778337793378033781337823378333784337853378633787337883378933790337913379233793337943379533796337973379833799338003380133802338033380433805338063380733808338093381033811338123381333814338153381633817338183381933820338213382233823338243382533826338273382833829338303383133832338333383433835338363383733838338393384033841338423384333844338453384633847338483384933850338513385233853338543385533856338573385833859338603386133862338633386433865338663386733868338693387033871338723387333874338753387633877338783387933880338813388233883338843388533886338873388833889338903389133892338933389433895338963389733898338993390033901339023390333904339053390633907339083390933910339113391233913339143391533916339173391833919339203392133922339233392433925339263392733928339293393033931339323393333934339353393633937339383393933940339413394233943339443394533946339473394833949339503395133952339533395433955339563395733958339593396033961339623396333964339653396633967339683396933970339713397233973339743397533976339773397833979339803398133982339833398433985339863398733988339893399033991339923399333994339953399633997339983399934000340013400234003340043400534006340073400834009340103401134012340133401434015340163401734018340193402034021340223402334024340253402634027340283402934030340313403234033340343403534036340373403834039340403404134042340433404434045340463404734048340493405034051340523405334054340553405634057340583405934060340613406234063340643406534066340673406834069340703407134072340733407434075340763407734078340793408034081340823408334084340853408634087340883408934090340913409234093340943409534096340973409834099341003410134102341033410434105341063410734108341093411034111341123411334114341153411634117341183411934120341213412234123341243412534126341273412834129341303413134132341333413434135341363413734138341393414034141341423414334144341453414634147341483414934150341513415234153341543415534156341573415834159341603416134162341633416434165341663416734168341693417034171341723417334174341753417634177341783417934180341813418234183341843418534186341873418834189341903419134192341933419434195341963419734198341993420034201342023420334204342053420634207342083420934210342113421234213342143421534216342173421834219342203422134222342233422434225342263422734228342293423034231342323423334234342353423634237342383423934240342413424234243342443424534246342473424834249342503425134252342533425434255342563425734258342593426034261342623426334264342653426634267342683426934270342713427234273342743427534276342773427834279342803428134282342833428434285342863428734288342893429034291342923429334294342953429634297342983429934300343013430234303343043430534306343073430834309343103431134312343133431434315343163431734318343193432034321343223432334324343253432634327343283432934330343313433234333343343433534336343373433834339343403434134342343433434434345343463434734348343493435034351343523435334354343553435634357343583435934360343613436234363343643436534366343673436834369343703437134372343733437434375343763437734378343793438034381343823438334384343853438634387343883438934390343913439234393343943439534396343973439834399344003440134402344033440434405344063440734408344093441034411344123441334414344153441634417344183441934420344213442234423344243442534426344273442834429344303443134432344333443434435344363443734438344393444034441344423444334444344453444634447344483444934450344513445234453344543445534456344573445834459344603446134462344633446434465344663446734468344693447034471344723447334474344753447634477344783447934480344813448234483344843448534486344873448834489344903449134492344933449434495344963449734498344993450034501345023450334504345053450634507345083450934510345113451234513345143451534516345173451834519345203452134522345233452434525345263452734528345293453034531345323453334534345353453634537345383453934540345413454234543345443454534546345473454834549345503455134552345533455434555345563455734558345593456034561345623456334564345653456634567345683456934570345713457234573345743457534576345773457834579345803458134582345833458434585345863458734588345893459034591345923459334594345953459634597345983459934600346013460234603346043460534606346073460834609346103461134612346133461434615346163461734618346193462034621346223462334624346253462634627346283462934630346313463234633346343463534636346373463834639346403464134642346433464434645346463464734648346493465034651346523465334654346553465634657346583465934660346613466234663346643466534666346673466834669346703467134672346733467434675346763467734678346793468034681346823468334684346853468634687346883468934690346913469234693346943469534696346973469834699347003470134702347033470434705347063470734708347093471034711347123471334714347153471634717347183471934720347213472234723347243472534726347273472834729347303473134732347333473434735347363473734738347393474034741347423474334744347453474634747347483474934750347513475234753347543475534756347573475834759347603476134762347633476434765347663476734768347693477034771347723477334774347753477634777347783477934780347813478234783347843478534786347873478834789347903479134792347933479434795347963479734798347993480034801348023480334804348053480634807348083480934810348113481234813348143481534816348173481834819348203482134822348233482434825348263482734828348293483034831348323483334834348353483634837348383483934840348413484234843348443484534846348473484834849348503485134852348533485434855348563485734858348593486034861348623486334864348653486634867348683486934870348713487234873348743487534876348773487834879348803488134882348833488434885348863488734888348893489034891348923489334894348953489634897348983489934900349013490234903349043490534906349073490834909349103491134912349133491434915349163491734918349193492034921349223492334924349253492634927349283492934930349313493234933349343493534936349373493834939349403494134942349433494434945349463494734948349493495034951349523495334954349553495634957349583495934960349613496234963349643496534966349673496834969349703497134972349733497434975349763497734978349793498034981349823498334984349853498634987349883498934990349913499234993349943499534996349973499834999350003500135002350033500435005350063500735008350093501035011350123501335014350153501635017350183501935020350213502235023350243502535026350273502835029350303503135032350333503435035350363503735038350393504035041350423504335044350453504635047350483504935050350513505235053350543505535056350573505835059350603506135062350633506435065350663506735068350693507035071350723507335074350753507635077350783507935080350813508235083350843508535086350873508835089350903509135092350933509435095350963509735098350993510035101351023510335104351053510635107351083510935110351113511235113351143511535116351173511835119351203512135122351233512435125351263512735128351293513035131351323513335134351353513635137351383513935140351413514235143351443514535146351473514835149351503515135152351533515435155351563515735158351593516035161351623516335164351653516635167351683516935170351713517235173351743517535176351773517835179351803518135182351833518435185351863518735188351893519035191351923519335194351953519635197351983519935200352013520235203352043520535206352073520835209352103521135212352133521435215352163521735218352193522035221352223522335224352253522635227352283522935230352313523235233352343523535236352373523835239352403524135242352433524435245352463524735248352493525035251352523525335254352553525635257352583525935260352613526235263352643526535266352673526835269352703527135272352733527435275352763527735278352793528035281352823528335284352853528635287352883528935290352913529235293352943529535296352973529835299353003530135302353033530435305353063530735308353093531035311353123531335314353153531635317353183531935320353213532235323353243532535326353273532835329353303533135332353333533435335353363533735338353393534035341353423534335344353453534635347353483534935350353513535235353353543535535356353573535835359353603536135362353633536435365353663536735368353693537035371353723537335374353753537635377353783537935380353813538235383353843538535386353873538835389353903539135392353933539435395353963539735398353993540035401354023540335404354053540635407354083540935410354113541235413354143541535416354173541835419354203542135422354233542435425354263542735428354293543035431354323543335434354353543635437354383543935440354413544235443354443544535446354473544835449354503545135452354533545435455354563545735458354593546035461354623546335464354653546635467354683546935470354713547235473354743547535476354773547835479354803548135482354833548435485354863548735488354893549035491354923549335494354953549635497354983549935500355013550235503355043550535506355073550835509355103551135512355133551435515355163551735518355193552035521355223552335524355253552635527355283552935530355313553235533355343553535536355373553835539355403554135542355433554435545355463554735548355493555035551355523555335554355553555635557355583555935560355613556235563355643556535566355673556835569355703557135572355733557435575355763557735578355793558035581355823558335584355853558635587355883558935590355913559235593355943559535596355973559835599356003560135602356033560435605356063560735608356093561035611356123561335614356153561635617356183561935620356213562235623356243562535626356273562835629356303563135632356333563435635356363563735638356393564035641356423564335644356453564635647356483564935650356513565235653356543565535656356573565835659356603566135662356633566435665356663566735668356693567035671356723567335674356753567635677356783567935680356813568235683356843568535686356873568835689356903569135692356933569435695356963569735698356993570035701357023570335704357053570635707357083570935710357113571235713357143571535716357173571835719357203572135722357233572435725357263572735728357293573035731357323573335734357353573635737357383573935740357413574235743357443574535746357473574835749357503575135752357533575435755357563575735758357593576035761357623576335764357653576635767357683576935770357713577235773357743577535776357773577835779357803578135782357833578435785357863578735788357893579035791357923579335794357953579635797357983579935800358013580235803358043580535806358073580835809358103581135812358133581435815358163581735818358193582035821358223582335824358253582635827358283582935830358313583235833358343583535836358373583835839358403584135842358433584435845358463584735848358493585035851358523585335854358553585635857358583585935860358613586235863358643586535866358673586835869358703587135872358733587435875358763587735878358793588035881358823588335884358853588635887358883588935890358913589235893358943589535896358973589835899359003590135902359033590435905359063590735908359093591035911359123591335914359153591635917359183591935920359213592235923359243592535926359273592835929359303593135932359333593435935359363593735938359393594035941359423594335944359453594635947359483594935950359513595235953359543595535956359573595835959359603596135962359633596435965359663596735968359693597035971359723597335974359753597635977359783597935980359813598235983359843598535986359873598835989359903599135992359933599435995359963599735998359993600036001360023600336004360053600636007360083600936010360113601236013360143601536016360173601836019360203602136022360233602436025360263602736028360293603036031360323603336034360353603636037360383603936040360413604236043360443604536046360473604836049360503605136052360533605436055360563605736058360593606036061360623606336064360653606636067360683606936070360713607236073360743607536076360773607836079360803608136082360833608436085360863608736088360893609036091360923609336094360953609636097360983609936100361013610236103361043610536106361073610836109361103611136112361133611436115361163611736118361193612036121361223612336124361253612636127361283612936130361313613236133361343613536136361373613836139361403614136142361433614436145361463614736148361493615036151361523615336154361553615636157361583615936160361613616236163361643616536166361673616836169361703617136172361733617436175361763617736178361793618036181361823618336184361853618636187361883618936190361913619236193361943619536196361973619836199362003620136202362033620436205362063620736208362093621036211362123621336214362153621636217362183621936220362213622236223362243622536226362273622836229362303623136232362333623436235362363623736238362393624036241362423624336244362453624636247362483624936250362513625236253362543625536256362573625836259362603626136262362633626436265362663626736268362693627036271362723627336274362753627636277362783627936280362813628236283362843628536286362873628836289362903629136292362933629436295362963629736298362993630036301363023630336304363053630636307363083630936310363113631236313363143631536316363173631836319363203632136322363233632436325363263632736328363293633036331363323633336334363353633636337363383633936340363413634236343363443634536346363473634836349363503635136352363533635436355363563635736358363593636036361363623636336364363653636636367363683636936370363713637236373363743637536376363773637836379363803638136382363833638436385363863638736388363893639036391363923639336394363953639636397363983639936400364013640236403364043640536406364073640836409364103641136412364133641436415364163641736418364193642036421364223642336424364253642636427364283642936430364313643236433364343643536436364373643836439364403644136442364433644436445364463644736448364493645036451364523645336454364553645636457364583645936460364613646236463364643646536466364673646836469364703647136472364733647436475364763647736478364793648036481364823648336484364853648636487364883648936490364913649236493364943649536496364973649836499365003650136502365033650436505365063650736508365093651036511365123651336514365153651636517365183651936520365213652236523365243652536526365273652836529365303653136532365333653436535365363653736538365393654036541365423654336544365453654636547365483654936550365513655236553365543655536556365573655836559365603656136562365633656436565365663656736568365693657036571365723657336574365753657636577365783657936580365813658236583365843658536586365873658836589365903659136592365933659436595365963659736598365993660036601366023660336604366053660636607366083660936610366113661236613366143661536616366173661836619366203662136622366233662436625366263662736628366293663036631366323663336634366353663636637366383663936640366413664236643366443664536646366473664836649366503665136652366533665436655366563665736658366593666036661366623666336664366653666636667366683666936670366713667236673366743667536676366773667836679366803668136682366833668436685366863668736688366893669036691366923669336694366953669636697366983669936700367013670236703367043670536706367073670836709367103671136712367133671436715367163671736718367193672036721367223672336724367253672636727367283672936730367313673236733367343673536736367373673836739367403674136742367433674436745367463674736748367493675036751367523675336754367553675636757367583675936760367613676236763367643676536766367673676836769367703677136772367733677436775367763677736778367793678036781367823678336784367853678636787367883678936790367913679236793367943679536796367973679836799368003680136802368033680436805368063680736808368093681036811368123681336814368153681636817368183681936820368213682236823368243682536826368273682836829368303683136832368333683436835368363683736838368393684036841368423684336844368453684636847368483684936850368513685236853368543685536856368573685836859368603686136862368633686436865368663686736868368693687036871368723687336874368753687636877368783687936880368813688236883368843688536886368873688836889368903689136892368933689436895368963689736898368993690036901369023690336904369053690636907369083690936910369113691236913369143691536916369173691836919369203692136922369233692436925369263692736928369293693036931369323693336934369353693636937369383693936940369413694236943369443694536946369473694836949369503695136952369533695436955369563695736958369593696036961369623696336964369653696636967369683696936970369713697236973369743697536976369773697836979369803698136982369833698436985369863698736988369893699036991369923699336994369953699636997369983699937000370013700237003370043700537006370073700837009370103701137012370133701437015370163701737018370193702037021370223702337024370253702637027370283702937030370313703237033370343703537036370373703837039370403704137042370433704437045370463704737048370493705037051370523705337054370553705637057370583705937060370613706237063370643706537066370673706837069370703707137072370733707437075370763707737078370793708037081370823708337084370853708637087370883708937090370913709237093370943709537096370973709837099371003710137102371033710437105371063710737108371093711037111371123711337114371153711637117371183711937120371213712237123371243712537126371273712837129371303713137132371333713437135371363713737138371393714037141371423714337144371453714637147371483714937150371513715237153371543715537156371573715837159371603716137162371633716437165371663716737168371693717037171371723717337174371753717637177371783717937180371813718237183371843718537186371873718837189371903719137192371933719437195371963719737198371993720037201372023720337204372053720637207372083720937210372113721237213372143721537216372173721837219372203722137222372233722437225372263722737228372293723037231372323723337234372353723637237372383723937240372413724237243372443724537246372473724837249372503725137252372533725437255372563725737258372593726037261372623726337264372653726637267372683726937270372713727237273372743727537276372773727837279372803728137282372833728437285372863728737288372893729037291372923729337294372953729637297372983729937300373013730237303373043730537306373073730837309373103731137312373133731437315373163731737318373193732037321373223732337324373253732637327373283732937330373313733237333373343733537336373373733837339373403734137342373433734437345373463734737348373493735037351373523735337354373553735637357373583735937360373613736237363373643736537366373673736837369373703737137372373733737437375373763737737378373793738037381373823738337384373853738637387373883738937390373913739237393373943739537396373973739837399374003740137402374033740437405374063740737408374093741037411374123741337414374153741637417374183741937420374213742237423374243742537426374273742837429374303743137432374333743437435374363743737438374393744037441374423744337444374453744637447374483744937450374513745237453374543745537456374573745837459374603746137462374633746437465374663746737468374693747037471374723747337474374753747637477374783747937480374813748237483374843748537486374873748837489374903749137492374933749437495374963749737498374993750037501375023750337504375053750637507375083750937510375113751237513375143751537516375173751837519375203752137522375233752437525375263752737528375293753037531375323753337534375353753637537375383753937540375413754237543375443754537546375473754837549375503755137552375533755437555375563755737558375593756037561375623756337564375653756637567375683756937570375713757237573375743757537576375773757837579375803758137582375833758437585375863758737588375893759037591375923759337594375953759637597375983759937600376013760237603376043760537606376073760837609376103761137612376133761437615376163761737618376193762037621376223762337624376253762637627376283762937630376313763237633376343763537636376373763837639376403764137642376433764437645376463764737648376493765037651376523765337654376553765637657376583765937660376613766237663376643766537666376673766837669376703767137672376733767437675376763767737678376793768037681376823768337684376853768637687376883768937690376913769237693376943769537696376973769837699377003770137702377033770437705377063770737708377093771037711377123771337714377153771637717377183771937720377213772237723377243772537726377273772837729377303773137732377333773437735377363773737738377393774037741377423774337744377453774637747377483774937750377513775237753377543775537756377573775837759377603776137762377633776437765377663776737768377693777037771377723777337774377753777637777377783777937780377813778237783377843778537786377873778837789377903779137792377933779437795377963779737798377993780037801378023780337804378053780637807378083780937810378113781237813378143781537816378173781837819378203782137822378233782437825378263782737828378293783037831378323783337834378353783637837378383783937840378413784237843378443784537846378473784837849378503785137852378533785437855378563785737858378593786037861378623786337864378653786637867378683786937870378713787237873378743787537876378773787837879378803788137882378833788437885378863788737888378893789037891378923789337894378953789637897378983789937900379013790237903379043790537906379073790837909379103791137912379133791437915379163791737918379193792037921379223792337924379253792637927379283792937930379313793237933379343793537936379373793837939379403794137942379433794437945379463794737948379493795037951379523795337954379553795637957379583795937960379613796237963379643796537966379673796837969379703797137972379733797437975379763797737978379793798037981379823798337984379853798637987379883798937990379913799237993379943799537996379973799837999380003800138002380033800438005380063800738008380093801038011380123801338014380153801638017380183801938020380213802238023380243802538026380273802838029380303803138032380333803438035380363803738038380393804038041380423804338044380453804638047380483804938050380513805238053380543805538056380573805838059380603806138062380633806438065380663806738068380693807038071380723807338074380753807638077380783807938080380813808238083380843808538086380873808838089380903809138092380933809438095380963809738098380993810038101381023810338104381053810638107381083810938110381113811238113381143811538116381173811838119381203812138122381233812438125381263812738128381293813038131381323813338134381353813638137381383813938140381413814238143381443814538146381473814838149381503815138152381533815438155381563815738158381593816038161381623816338164381653816638167381683816938170381713817238173381743817538176381773817838179381803818138182381833818438185381863818738188381893819038191381923819338194381953819638197381983819938200382013820238203382043820538206382073820838209382103821138212382133821438215382163821738218382193822038221382223822338224382253822638227382283822938230382313823238233382343823538236382373823838239382403824138242382433824438245382463824738248382493825038251382523825338254382553825638257382583825938260382613826238263382643826538266382673826838269382703827138272382733827438275382763827738278382793828038281382823828338284382853828638287382883828938290382913829238293382943829538296382973829838299383003830138302383033830438305383063830738308383093831038311383123831338314383153831638317383183831938320383213832238323383243832538326383273832838329383303833138332383333833438335383363833738338383393834038341383423834338344383453834638347383483834938350383513835238353383543835538356383573835838359383603836138362383633836438365383663836738368383693837038371383723837338374383753837638377383783837938380383813838238383383843838538386383873838838389383903839138392383933839438395383963839738398383993840038401384023840338404384053840638407384083840938410384113841238413384143841538416384173841838419384203842138422384233842438425384263842738428384293843038431384323843338434384353843638437384383843938440384413844238443384443844538446384473844838449384503845138452384533845438455384563845738458384593846038461384623846338464384653846638467384683846938470384713847238473384743847538476384773847838479384803848138482384833848438485384863848738488384893849038491384923849338494384953849638497384983849938500385013850238503385043850538506385073850838509385103851138512385133851438515385163851738518385193852038521385223852338524385253852638527385283852938530385313853238533385343853538536385373853838539385403854138542385433854438545385463854738548385493855038551385523855338554385553855638557385583855938560385613856238563385643856538566385673856838569385703857138572385733857438575385763857738578385793858038581385823858338584385853858638587385883858938590385913859238593385943859538596385973859838599386003860138602386033860438605386063860738608386093861038611386123861338614386153861638617386183861938620386213862238623386243862538626386273862838629386303863138632386333863438635386363863738638386393864038641386423864338644386453864638647386483864938650386513865238653386543865538656386573865838659386603866138662386633866438665386663866738668386693867038671386723867338674386753867638677386783867938680386813868238683386843868538686386873868838689386903869138692386933869438695386963869738698386993870038701387023870338704387053870638707387083870938710387113871238713387143871538716387173871838719387203872138722387233872438725387263872738728387293873038731387323873338734387353873638737387383873938740387413874238743387443874538746387473874838749387503875138752387533875438755387563875738758387593876038761387623876338764387653876638767387683876938770387713877238773387743877538776387773877838779387803878138782387833878438785387863878738788387893879038791387923879338794387953879638797387983879938800388013880238803388043880538806388073880838809388103881138812388133881438815388163881738818388193882038821388223882338824388253882638827388283882938830388313883238833388343883538836388373883838839388403884138842388433884438845388463884738848388493885038851388523885338854388553885638857388583885938860388613886238863388643886538866388673886838869388703887138872388733887438875388763887738878388793888038881388823888338884388853888638887388883888938890388913889238893388943889538896388973889838899389003890138902389033890438905389063890738908389093891038911389123891338914389153891638917389183891938920389213892238923389243892538926389273892838929389303893138932389333893438935389363893738938389393894038941389423894338944389453894638947389483894938950389513895238953389543895538956389573895838959389603896138962389633896438965389663896738968389693897038971389723897338974389753897638977389783897938980389813898238983389843898538986389873898838989389903899138992389933899438995389963899738998389993900039001390023900339004390053900639007390083900939010390113901239013390143901539016390173901839019390203902139022390233902439025390263902739028390293903039031390323903339034390353903639037390383903939040390413904239043390443904539046390473904839049390503905139052390533905439055390563905739058390593906039061390623906339064390653906639067390683906939070390713907239073390743907539076390773907839079390803908139082390833908439085390863908739088390893909039091390923909339094390953909639097390983909939100391013910239103391043910539106391073910839109391103911139112391133911439115391163911739118391193912039121391223912339124391253912639127391283912939130391313913239133391343913539136391373913839139391403914139142391433914439145391463914739148391493915039151391523915339154391553915639157391583915939160391613916239163391643916539166391673916839169391703917139172391733917439175391763917739178391793918039181391823918339184391853918639187391883918939190391913919239193391943919539196391973919839199392003920139202392033920439205392063920739208392093921039211392123921339214392153921639217392183921939220392213922239223392243922539226392273922839229392303923139232392333923439235392363923739238392393924039241392423924339244392453924639247392483924939250392513925239253392543925539256392573925839259392603926139262392633926439265392663926739268392693927039271392723927339274392753927639277392783927939280392813928239283392843928539286392873928839289392903929139292392933929439295392963929739298392993930039301393023930339304393053930639307393083930939310393113931239313393143931539316393173931839319393203932139322393233932439325393263932739328393293933039331393323933339334393353933639337393383933939340393413934239343393443934539346393473934839349393503935139352393533935439355393563935739358393593936039361393623936339364393653936639367393683936939370393713937239373393743937539376393773937839379393803938139382393833938439385393863938739388393893939039391393923939339394393953939639397393983939939400394013940239403394043940539406394073940839409394103941139412394133941439415394163941739418394193942039421394223942339424394253942639427394283942939430394313943239433394343943539436394373943839439394403944139442394433944439445394463944739448394493945039451394523945339454394553945639457394583945939460394613946239463394643946539466394673946839469394703947139472394733947439475394763947739478394793948039481394823948339484394853948639487394883948939490394913949239493394943949539496394973949839499395003950139502395033950439505395063950739508395093951039511395123951339514395153951639517395183951939520395213952239523395243952539526395273952839529395303953139532395333953439535395363953739538395393954039541395423954339544395453954639547395483954939550395513955239553395543955539556395573955839559395603956139562395633956439565395663956739568395693957039571395723957339574395753957639577395783957939580395813958239583395843958539586395873958839589395903959139592395933959439595395963959739598395993960039601396023960339604396053960639607396083960939610396113961239613396143961539616396173961839619396203962139622396233962439625396263962739628396293963039631396323963339634396353963639637396383963939640396413964239643396443964539646396473964839649396503965139652396533965439655396563965739658396593966039661396623966339664396653966639667396683966939670396713967239673396743967539676396773967839679396803968139682396833968439685396863968739688396893969039691396923969339694396953969639697396983969939700397013970239703397043970539706397073970839709397103971139712397133971439715397163971739718397193972039721397223972339724397253972639727397283972939730397313973239733397343973539736397373973839739397403974139742397433974439745397463974739748397493975039751397523975339754397553975639757397583975939760397613976239763397643976539766397673976839769397703977139772397733977439775397763977739778397793978039781397823978339784397853978639787397883978939790397913979239793397943979539796397973979839799398003980139802398033980439805398063980739808398093981039811398123981339814398153981639817398183981939820398213982239823398243982539826398273982839829398303983139832398333983439835398363983739838398393984039841398423984339844398453984639847398483984939850398513985239853398543985539856398573985839859398603986139862398633986439865398663986739868398693987039871398723987339874398753987639877398783987939880398813988239883398843988539886398873988839889398903989139892398933989439895398963989739898398993990039901399023990339904399053990639907399083990939910399113991239913399143991539916399173991839919399203992139922399233992439925399263992739928399293993039931399323993339934399353993639937399383993939940399413994239943399443994539946399473994839949399503995139952399533995439955399563995739958399593996039961399623996339964399653996639967399683996939970399713997239973399743997539976399773997839979399803998139982399833998439985399863998739988399893999039991399923999339994399953999639997399983999940000400014000240003400044000540006400074000840009400104001140012400134001440015400164001740018400194002040021400224002340024400254002640027400284002940030400314003240033400344003540036400374003840039400404004140042400434004440045400464004740048400494005040051400524005340054400554005640057400584005940060400614006240063400644006540066400674006840069400704007140072400734007440075400764007740078400794008040081400824008340084400854008640087400884008940090400914009240093400944009540096400974009840099401004010140102401034010440105401064010740108401094011040111401124011340114401154011640117401184011940120401214012240123401244012540126401274012840129401304013140132401334013440135401364013740138401394014040141401424014340144401454014640147401484014940150401514015240153401544015540156401574015840159401604016140162401634016440165401664016740168401694017040171401724017340174401754017640177401784017940180401814018240183401844018540186401874018840189401904019140192401934019440195401964019740198401994020040201402024020340204402054020640207402084020940210402114021240213402144021540216402174021840219402204022140222402234022440225402264022740228402294023040231402324023340234402354023640237402384023940240402414024240243402444024540246402474024840249402504025140252402534025440255402564025740258402594026040261402624026340264402654026640267402684026940270402714027240273402744027540276402774027840279402804028140282402834028440285402864028740288402894029040291402924029340294402954029640297402984029940300403014030240303403044030540306403074030840309403104031140312403134031440315403164031740318403194032040321403224032340324403254032640327403284032940330403314033240333403344033540336403374033840339403404034140342403434034440345403464034740348403494035040351403524035340354403554035640357403584035940360403614036240363403644036540366403674036840369403704037140372403734037440375403764037740378403794038040381403824038340384403854038640387403884038940390403914039240393403944039540396403974039840399404004040140402404034040440405404064040740408404094041040411404124041340414404154041640417404184041940420404214042240423404244042540426404274042840429404304043140432404334043440435404364043740438404394044040441404424044340444404454044640447404484044940450404514045240453404544045540456404574045840459404604046140462404634046440465404664046740468404694047040471404724047340474404754047640477404784047940480404814048240483404844048540486404874048840489404904049140492404934049440495404964049740498404994050040501405024050340504405054050640507405084050940510405114051240513405144051540516405174051840519405204052140522405234052440525405264052740528405294053040531405324053340534405354053640537405384053940540405414054240543405444054540546405474054840549405504055140552405534055440555405564055740558405594056040561405624056340564405654056640567405684056940570405714057240573405744057540576405774057840579405804058140582405834058440585405864058740588405894059040591405924059340594405954059640597405984059940600406014060240603406044060540606406074060840609406104061140612406134061440615406164061740618406194062040621406224062340624406254062640627406284062940630406314063240633406344063540636406374063840639406404064140642406434064440645406464064740648406494065040651406524065340654406554065640657406584065940660406614066240663406644066540666406674066840669406704067140672406734067440675406764067740678406794068040681406824068340684406854068640687406884068940690406914069240693406944069540696406974069840699407004070140702407034070440705407064070740708407094071040711407124071340714407154071640717407184071940720407214072240723407244072540726407274072840729407304073140732407334073440735407364073740738407394074040741407424074340744407454074640747407484074940750407514075240753407544075540756407574075840759407604076140762407634076440765407664076740768407694077040771407724077340774407754077640777407784077940780407814078240783407844078540786407874078840789407904079140792407934079440795407964079740798407994080040801408024080340804408054080640807408084080940810408114081240813408144081540816408174081840819408204082140822408234082440825408264082740828408294083040831408324083340834408354083640837408384083940840408414084240843408444084540846408474084840849408504085140852408534085440855408564085740858408594086040861408624086340864408654086640867408684086940870408714087240873408744087540876408774087840879408804088140882408834088440885408864088740888408894089040891408924089340894408954089640897408984089940900409014090240903409044090540906409074090840909409104091140912409134091440915409164091740918409194092040921409224092340924409254092640927409284092940930409314093240933409344093540936409374093840939409404094140942409434094440945409464094740948409494095040951409524095340954409554095640957409584095940960409614096240963409644096540966409674096840969409704097140972409734097440975409764097740978409794098040981409824098340984409854098640987409884098940990409914099240993409944099540996409974099840999410004100141002410034100441005410064100741008410094101041011410124101341014410154101641017410184101941020410214102241023410244102541026410274102841029410304103141032410334103441035410364103741038410394104041041410424104341044410454104641047410484104941050410514105241053410544105541056410574105841059410604106141062410634106441065410664106741068410694107041071410724107341074410754107641077410784107941080410814108241083410844108541086410874108841089410904109141092410934109441095410964109741098410994110041101411024110341104411054110641107411084110941110411114111241113411144111541116411174111841119411204112141122411234112441125411264112741128411294113041131411324113341134411354113641137411384113941140411414114241143411444114541146411474114841149411504115141152411534115441155411564115741158411594116041161411624116341164411654116641167411684116941170411714117241173411744117541176411774117841179411804118141182411834118441185411864118741188411894119041191411924119341194411954119641197411984119941200412014120241203412044120541206412074120841209412104121141212412134121441215412164121741218412194122041221412224122341224412254122641227412284122941230412314123241233412344123541236412374123841239412404124141242412434124441245412464124741248412494125041251412524125341254412554125641257412584125941260412614126241263412644126541266412674126841269412704127141272412734127441275412764127741278412794128041281412824128341284412854128641287412884128941290412914129241293412944129541296412974129841299413004130141302413034130441305413064130741308413094131041311413124131341314413154131641317413184131941320413214132241323413244132541326413274132841329413304133141332413334133441335413364133741338413394134041341413424134341344413454134641347413484134941350413514135241353413544135541356413574135841359413604136141362413634136441365413664136741368413694137041371413724137341374413754137641377413784137941380413814138241383413844138541386413874138841389413904139141392413934139441395413964139741398413994140041401414024140341404414054140641407414084140941410414114141241413414144141541416414174141841419414204142141422414234142441425414264142741428414294143041431414324143341434414354143641437414384143941440414414144241443414444144541446414474144841449414504145141452414534145441455414564145741458414594146041461414624146341464414654146641467414684146941470414714147241473414744147541476414774147841479414804148141482414834148441485414864148741488414894149041491414924149341494414954149641497414984149941500415014150241503415044150541506415074150841509415104151141512415134151441515415164151741518415194152041521415224152341524415254152641527415284152941530415314153241533415344153541536415374153841539415404154141542415434154441545415464154741548415494155041551415524155341554415554155641557415584155941560415614156241563415644156541566415674156841569415704157141572415734157441575415764157741578415794158041581415824158341584415854158641587415884158941590415914159241593415944159541596415974159841599416004160141602416034160441605416064160741608416094161041611416124161341614416154161641617416184161941620416214162241623416244162541626416274162841629416304163141632416334163441635416364163741638416394164041641416424164341644416454164641647416484164941650416514165241653416544165541656416574165841659416604166141662416634166441665416664166741668416694167041671416724167341674416754167641677416784167941680416814168241683416844168541686416874168841689416904169141692416934169441695416964169741698416994170041701417024170341704417054170641707417084170941710417114171241713417144171541716417174171841719417204172141722417234172441725417264172741728417294173041731417324173341734417354173641737417384173941740417414174241743417444174541746417474174841749417504175141752417534175441755417564175741758417594176041761417624176341764417654176641767417684176941770417714177241773417744177541776417774177841779417804178141782417834178441785417864178741788417894179041791417924179341794417954179641797417984179941800418014180241803418044180541806418074180841809418104181141812418134181441815418164181741818418194182041821418224182341824418254182641827418284182941830418314183241833418344183541836418374183841839418404184141842418434184441845418464184741848418494185041851418524185341854418554185641857418584185941860418614186241863418644186541866418674186841869418704187141872418734187441875418764187741878418794188041881418824188341884418854188641887418884188941890418914189241893418944189541896418974189841899419004190141902419034190441905419064190741908419094191041911419124191341914419154191641917419184191941920419214192241923419244192541926419274192841929419304193141932419334193441935419364193741938419394194041941419424194341944419454194641947419484194941950419514195241953419544195541956419574195841959419604196141962419634196441965419664196741968419694197041971419724197341974419754197641977419784197941980419814198241983419844198541986419874198841989419904199141992419934199441995419964199741998419994200042001420024200342004420054200642007420084200942010420114201242013420144201542016420174201842019420204202142022420234202442025420264202742028420294203042031420324203342034420354203642037420384203942040420414204242043420444204542046420474204842049420504205142052420534205442055420564205742058420594206042061420624206342064420654206642067420684206942070420714207242073420744207542076420774207842079420804208142082420834208442085420864208742088420894209042091420924209342094420954209642097420984209942100421014210242103421044210542106421074210842109421104211142112421134211442115421164211742118421194212042121421224212342124421254212642127421284212942130421314213242133421344213542136421374213842139421404214142142421434214442145421464214742148421494215042151421524215342154421554215642157421584215942160421614216242163421644216542166421674216842169421704217142172421734217442175421764217742178421794218042181421824218342184421854218642187421884218942190421914219242193421944219542196421974219842199422004220142202422034220442205422064220742208422094221042211422124221342214422154221642217422184221942220422214222242223422244222542226422274222842229422304223142232422334223442235422364223742238422394224042241422424224342244422454224642247422484224942250422514225242253422544225542256422574225842259422604226142262422634226442265422664226742268422694227042271422724227342274422754227642277422784227942280422814228242283422844228542286422874228842289422904229142292422934229442295422964229742298422994230042301423024230342304423054230642307423084230942310423114231242313423144231542316423174231842319423204232142322423234232442325423264232742328423294233042331423324233342334423354233642337423384233942340423414234242343423444234542346423474234842349423504235142352423534235442355423564235742358423594236042361423624236342364423654236642367423684236942370423714237242373423744237542376423774237842379423804238142382423834238442385423864238742388423894239042391423924239342394423954239642397423984239942400424014240242403424044240542406424074240842409424104241142412424134241442415424164241742418424194242042421424224242342424424254242642427424284242942430424314243242433424344243542436424374243842439424404244142442424434244442445424464244742448424494245042451424524245342454424554245642457424584245942460424614246242463424644246542466424674246842469424704247142472424734247442475424764247742478424794248042481424824248342484424854248642487424884248942490424914249242493424944249542496424974249842499425004250142502425034250442505425064250742508425094251042511425124251342514425154251642517425184251942520425214252242523425244252542526425274252842529425304253142532425334253442535425364253742538425394254042541425424254342544425454254642547425484254942550425514255242553425544255542556425574255842559425604256142562425634256442565425664256742568425694257042571425724257342574425754257642577425784257942580425814258242583425844258542586425874258842589425904259142592425934259442595425964259742598425994260042601426024260342604426054260642607426084260942610426114261242613426144261542616426174261842619426204262142622426234262442625426264262742628426294263042631426324263342634426354263642637426384263942640426414264242643426444264542646426474264842649426504265142652426534265442655426564265742658426594266042661426624266342664426654266642667426684266942670426714267242673426744267542676426774267842679426804268142682426834268442685426864268742688426894269042691426924269342694426954269642697426984269942700427014270242703427044270542706427074270842709427104271142712427134271442715427164271742718427194272042721427224272342724427254272642727427284272942730427314273242733427344273542736427374273842739427404274142742427434274442745427464274742748427494275042751427524275342754427554275642757427584275942760427614276242763427644276542766427674276842769427704277142772427734277442775427764277742778427794278042781427824278342784427854278642787427884278942790427914279242793427944279542796427974279842799428004280142802428034280442805428064280742808428094281042811428124281342814428154281642817428184281942820428214282242823428244282542826428274282842829428304283142832428334283442835428364283742838428394284042841428424284342844428454284642847428484284942850428514285242853428544285542856428574285842859428604286142862428634286442865428664286742868428694287042871428724287342874428754287642877428784287942880428814288242883428844288542886428874288842889428904289142892428934289442895428964289742898428994290042901429024290342904429054290642907429084290942910429114291242913429144291542916429174291842919429204292142922429234292442925429264292742928429294293042931429324293342934429354293642937429384293942940429414294242943429444294542946429474294842949429504295142952429534295442955429564295742958429594296042961429624296342964429654296642967429684296942970429714297242973429744297542976429774297842979429804298142982429834298442985429864298742988429894299042991429924299342994429954299642997429984299943000430014300243003430044300543006430074300843009430104301143012430134301443015430164301743018430194302043021430224302343024430254302643027430284302943030430314303243033430344303543036430374303843039430404304143042430434304443045430464304743048430494305043051430524305343054430554305643057430584305943060430614306243063430644306543066430674306843069430704307143072430734307443075430764307743078430794308043081430824308343084430854308643087430884308943090430914309243093430944309543096430974309843099431004310143102431034310443105431064310743108431094311043111431124311343114431154311643117431184311943120431214312243123431244312543126431274312843129431304313143132431334313443135431364313743138431394314043141431424314343144431454314643147431484314943150431514315243153431544315543156431574315843159431604316143162431634316443165431664316743168431694317043171431724317343174431754317643177431784317943180431814318243183431844318543186431874318843189431904319143192431934319443195431964319743198431994320043201432024320343204432054320643207432084320943210432114321243213432144321543216432174321843219432204322143222432234322443225432264322743228432294323043231432324323343234432354323643237432384323943240432414324243243432444324543246432474324843249432504325143252432534325443255432564325743258432594326043261432624326343264432654326643267432684326943270432714327243273432744327543276432774327843279432804328143282432834328443285432864328743288432894329043291432924329343294432954329643297432984329943300433014330243303433044330543306433074330843309433104331143312433134331443315433164331743318433194332043321433224332343324433254332643327433284332943330433314333243333433344333543336433374333843339433404334143342433434334443345433464334743348433494335043351433524335343354433554335643357433584335943360433614336243363433644336543366433674336843369433704337143372433734337443375433764337743378433794338043381433824338343384433854338643387433884338943390433914339243393433944339543396433974339843399434004340143402434034340443405434064340743408434094341043411434124341343414434154341643417434184341943420434214342243423434244342543426434274342843429434304343143432434334343443435434364343743438434394344043441434424344343444434454344643447434484344943450434514345243453434544345543456434574345843459434604346143462434634346443465434664346743468434694347043471434724347343474434754347643477434784347943480434814348243483434844348543486434874348843489434904349143492434934349443495434964349743498434994350043501435024350343504435054350643507435084350943510435114351243513435144351543516435174351843519435204352143522435234352443525435264352743528435294353043531435324353343534435354353643537435384353943540435414354243543435444354543546435474354843549435504355143552435534355443555435564355743558435594356043561435624356343564435654356643567435684356943570435714357243573435744357543576435774357843579435804358143582435834358443585435864358743588435894359043591435924359343594435954359643597435984359943600436014360243603436044360543606436074360843609436104361143612436134361443615436164361743618436194362043621436224362343624436254362643627436284362943630436314363243633436344363543636436374363843639436404364143642436434364443645436464364743648436494365043651436524365343654436554365643657436584365943660436614366243663436644366543666436674366843669436704367143672436734367443675436764367743678436794368043681436824368343684436854368643687436884368943690436914369243693436944369543696436974369843699437004370143702437034370443705437064370743708437094371043711437124371343714437154371643717437184371943720437214372243723437244372543726437274372843729437304373143732437334373443735437364373743738437394374043741437424374343744437454374643747437484374943750437514375243753437544375543756437574375843759437604376143762437634376443765437664376743768437694377043771437724377343774437754377643777437784377943780437814378243783437844378543786437874378843789437904379143792437934379443795437964379743798437994380043801438024380343804438054380643807438084380943810438114381243813438144381543816438174381843819438204382143822438234382443825438264382743828438294383043831438324383343834438354383643837438384383943840438414384243843438444384543846438474384843849438504385143852438534385443855438564385743858438594386043861438624386343864438654386643867438684386943870438714387243873438744387543876438774387843879438804388143882438834388443885438864388743888438894389043891438924389343894438954389643897438984389943900439014390243903439044390543906439074390843909439104391143912439134391443915439164391743918439194392043921439224392343924439254392643927439284392943930439314393243933439344393543936439374393843939439404394143942439434394443945439464394743948439494395043951439524395343954439554395643957439584395943960439614396243963439644396543966439674396843969439704397143972439734397443975439764397743978439794398043981439824398343984439854398643987439884398943990439914399243993439944399543996439974399843999440004400144002440034400444005440064400744008440094401044011440124401344014440154401644017440184401944020440214402244023440244402544026440274402844029440304403144032440334403444035440364403744038440394404044041440424404344044440454404644047440484404944050440514405244053440544405544056440574405844059440604406144062440634406444065440664406744068440694407044071440724407344074440754407644077440784407944080440814408244083440844408544086440874408844089440904409144092440934409444095440964409744098440994410044101441024410344104441054410644107441084410944110441114411244113441144411544116441174411844119441204412144122441234412444125441264412744128441294413044131441324413344134441354413644137441384413944140441414414244143441444414544146441474414844149441504415144152441534415444155441564415744158441594416044161441624416344164441654416644167441684416944170441714417244173441744417544176441774417844179441804418144182441834418444185441864418744188441894419044191441924419344194441954419644197441984419944200442014420244203442044420544206442074420844209442104421144212442134421444215442164421744218442194422044221442224422344224442254422644227442284422944230442314423244233442344423544236442374423844239442404424144242442434424444245442464424744248442494425044251442524425344254442554425644257442584425944260442614426244263442644426544266442674426844269442704427144272442734427444275442764427744278442794428044281442824428344284442854428644287442884428944290442914429244293442944429544296442974429844299443004430144302443034430444305443064430744308443094431044311443124431344314443154431644317443184431944320443214432244323443244432544326443274432844329443304433144332443334433444335443364433744338443394434044341443424434344344443454434644347443484434944350443514435244353443544435544356443574435844359443604436144362443634436444365443664436744368443694437044371443724437344374443754437644377443784437944380443814438244383443844438544386443874438844389443904439144392443934439444395443964439744398443994440044401444024440344404444054440644407444084440944410444114441244413444144441544416444174441844419444204442144422444234442444425444264442744428444294443044431444324443344434444354443644437444384443944440444414444244443444444444544446444474444844449444504445144452444534445444455444564445744458444594446044461444624446344464444654446644467444684446944470444714447244473444744447544476444774447844479444804448144482444834448444485444864448744488444894449044491444924449344494444954449644497444984449944500445014450244503445044450544506445074450844509445104451144512445134451444515445164451744518445194452044521445224452344524445254452644527445284452944530445314453244533445344453544536445374453844539445404454144542445434454444545445464454744548445494455044551445524455344554445554455644557445584455944560445614456244563445644456544566445674456844569445704457144572445734457444575445764457744578445794458044581445824458344584445854458644587445884458944590445914459244593445944459544596445974459844599446004460144602446034460444605446064460744608446094461044611446124461344614446154461644617446184461944620446214462244623446244462544626446274462844629446304463144632446334463444635446364463744638446394464044641446424464344644446454464644647446484464944650446514465244653446544465544656446574465844659446604466144662446634466444665446664466744668446694467044671446724467344674446754467644677446784467944680446814468244683446844468544686446874468844689446904469144692446934469444695446964469744698446994470044701447024470344704447054470644707447084470944710447114471244713447144471544716447174471844719447204472144722447234472444725447264472744728447294473044731447324473344734447354473644737447384473944740447414474244743447444474544746447474474844749447504475144752447534475444755447564475744758447594476044761447624476344764447654476644767447684476944770447714477244773447744477544776447774477844779447804478144782447834478444785447864478744788447894479044791447924479344794447954479644797447984479944800448014480244803448044480544806448074480844809448104481144812448134481444815448164481744818448194482044821448224482344824448254482644827448284482944830448314483244833448344483544836448374483844839448404484144842448434484444845448464484744848448494485044851448524485344854448554485644857448584485944860448614486244863448644486544866448674486844869448704487144872448734487444875448764487744878448794488044881448824488344884448854488644887448884488944890448914489244893448944489544896448974489844899449004490144902449034490444905449064490744908449094491044911449124491344914449154491644917449184491944920449214492244923449244492544926449274492844929449304493144932449334493444935449364493744938449394494044941449424494344944449454494644947449484494944950449514495244953449544495544956449574495844959449604496144962449634496444965449664496744968449694497044971449724497344974449754497644977449784497944980449814498244983449844498544986449874498844989449904499144992449934499444995449964499744998449994500045001450024500345004450054500645007450084500945010450114501245013450144501545016450174501845019450204502145022450234502445025450264502745028450294503045031450324503345034450354503645037450384503945040450414504245043450444504545046450474504845049450504505145052450534505445055450564505745058450594506045061450624506345064450654506645067450684506945070450714507245073450744507545076450774507845079450804508145082450834508445085450864508745088450894509045091450924509345094450954509645097450984509945100451014510245103451044510545106451074510845109451104511145112451134511445115451164511745118451194512045121451224512345124451254512645127451284512945130451314513245133451344513545136451374513845139451404514145142451434514445145451464514745148451494515045151451524515345154451554515645157451584515945160451614516245163451644516545166451674516845169451704517145172451734517445175451764517745178451794518045181451824518345184451854518645187451884518945190451914519245193451944519545196451974519845199452004520145202452034520445205452064520745208452094521045211452124521345214452154521645217452184521945220452214522245223452244522545226452274522845229452304523145232452334523445235452364523745238452394524045241452424524345244452454524645247452484524945250452514525245253452544525545256452574525845259452604526145262452634526445265452664526745268452694527045271452724527345274452754527645277452784527945280452814528245283452844528545286452874528845289452904529145292452934529445295452964529745298452994530045301453024530345304453054530645307453084530945310453114531245313453144531545316453174531845319453204532145322453234532445325453264532745328453294533045331453324533345334453354533645337453384533945340453414534245343453444534545346453474534845349453504535145352453534535445355453564535745358453594536045361453624536345364453654536645367453684536945370453714537245373453744537545376453774537845379453804538145382453834538445385453864538745388453894539045391453924539345394453954539645397453984539945400454014540245403454044540545406454074540845409454104541145412454134541445415454164541745418454194542045421454224542345424454254542645427454284542945430454314543245433454344543545436454374543845439454404544145442454434544445445454464544745448454494545045451454524545345454454554545645457454584545945460454614546245463454644546545466454674546845469454704547145472454734547445475454764547745478454794548045481454824548345484454854548645487454884548945490454914549245493454944549545496454974549845499455004550145502455034550445505455064550745508455094551045511455124551345514455154551645517455184551945520455214552245523455244552545526455274552845529455304553145532455334553445535455364553745538455394554045541455424554345544455454554645547455484554945550455514555245553455544555545556455574555845559455604556145562455634556445565455664556745568455694557045571455724557345574455754557645577455784557945580455814558245583455844558545586455874558845589455904559145592455934559445595455964559745598455994560045601456024560345604456054560645607456084560945610456114561245613456144561545616456174561845619456204562145622456234562445625456264562745628456294563045631456324563345634456354563645637456384563945640456414564245643456444564545646456474564845649456504565145652456534565445655456564565745658456594566045661456624566345664456654566645667456684566945670456714567245673456744567545676456774567845679456804568145682456834568445685456864568745688456894569045691456924569345694456954569645697456984569945700457014570245703457044570545706457074570845709457104571145712457134571445715457164571745718457194572045721457224572345724457254572645727457284572945730457314573245733457344573545736457374573845739457404574145742457434574445745457464574745748457494575045751457524575345754457554575645757457584575945760457614576245763457644576545766457674576845769457704577145772457734577445775457764577745778457794578045781457824578345784457854578645787457884578945790457914579245793457944579545796457974579845799458004580145802458034580445805458064580745808458094581045811458124581345814458154581645817458184581945820458214582245823458244582545826458274582845829458304583145832458334583445835458364583745838458394584045841458424584345844458454584645847458484584945850458514585245853458544585545856458574585845859458604586145862458634586445865458664586745868458694587045871458724587345874458754587645877458784587945880458814588245883458844588545886458874588845889458904589145892458934589445895458964589745898458994590045901459024590345904459054590645907459084590945910459114591245913459144591545916459174591845919459204592145922459234592445925459264592745928459294593045931459324593345934459354593645937459384593945940459414594245943459444594545946459474594845949459504595145952459534595445955459564595745958459594596045961459624596345964459654596645967459684596945970459714597245973459744597545976459774597845979459804598145982459834598445985459864598745988459894599045991459924599345994459954599645997459984599946000460014600246003460044600546006460074600846009460104601146012460134601446015460164601746018460194602046021460224602346024460254602646027460284602946030460314603246033460344603546036460374603846039460404604146042460434604446045460464604746048460494605046051460524605346054460554605646057460584605946060460614606246063460644606546066460674606846069460704607146072460734607446075460764607746078460794608046081460824608346084460854608646087460884608946090460914609246093460944609546096460974609846099461004610146102461034610446105461064610746108461094611046111461124611346114461154611646117461184611946120461214612246123461244612546126461274612846129461304613146132461334613446135461364613746138461394614046141461424614346144461454614646147461484614946150461514615246153461544615546156461574615846159461604616146162461634616446165461664616746168461694617046171461724617346174461754617646177461784617946180461814618246183461844618546186461874618846189461904619146192461934619446195461964619746198461994620046201462024620346204462054620646207462084620946210462114621246213462144621546216462174621846219462204622146222462234622446225462264622746228462294623046231462324623346234462354623646237462384623946240462414624246243462444624546246462474624846249462504625146252462534625446255462564625746258462594626046261462624626346264462654626646267462684626946270462714627246273462744627546276462774627846279462804628146282462834628446285462864628746288462894629046291462924629346294462954629646297462984629946300463014630246303463044630546306463074630846309463104631146312463134631446315463164631746318463194632046321463224632346324463254632646327463284632946330463314633246333463344633546336463374633846339463404634146342463434634446345463464634746348463494635046351463524635346354463554635646357463584635946360463614636246363463644636546366463674636846369463704637146372463734637446375463764637746378463794638046381463824638346384463854638646387463884638946390463914639246393463944639546396463974639846399464004640146402464034640446405464064640746408464094641046411464124641346414464154641646417464184641946420464214642246423464244642546426464274642846429464304643146432464334643446435464364643746438464394644046441464424644346444464454644646447464484644946450464514645246453464544645546456464574645846459464604646146462464634646446465464664646746468464694647046471464724647346474464754647646477464784647946480464814648246483464844648546486464874648846489464904649146492464934649446495464964649746498464994650046501465024650346504465054650646507465084650946510465114651246513465144651546516465174651846519465204652146522465234652446525465264652746528465294653046531465324653346534465354653646537465384653946540465414654246543465444654546546465474654846549465504655146552465534655446555465564655746558465594656046561465624656346564465654656646567465684656946570465714657246573465744657546576465774657846579465804658146582465834658446585465864658746588465894659046591465924659346594465954659646597465984659946600466014660246603466044660546606466074660846609466104661146612466134661446615466164661746618466194662046621466224662346624466254662646627466284662946630466314663246633466344663546636466374663846639466404664146642466434664446645466464664746648466494665046651466524665346654466554665646657466584665946660466614666246663466644666546666466674666846669466704667146672466734667446675466764667746678466794668046681466824668346684466854668646687466884668946690466914669246693466944669546696466974669846699467004670146702467034670446705467064670746708467094671046711467124671346714467154671646717467184671946720467214672246723467244672546726467274672846729467304673146732467334673446735467364673746738467394674046741467424674346744467454674646747467484674946750467514675246753467544675546756467574675846759467604676146762467634676446765467664676746768467694677046771467724677346774467754677646777467784677946780467814678246783467844678546786467874678846789467904679146792467934679446795467964679746798467994680046801468024680346804468054680646807468084680946810468114681246813468144681546816468174681846819468204682146822468234682446825468264682746828468294683046831468324683346834468354683646837468384683946840468414684246843468444684546846468474684846849468504685146852468534685446855468564685746858468594686046861468624686346864468654686646867468684686946870468714687246873468744687546876468774687846879468804688146882468834688446885468864688746888468894689046891468924689346894468954689646897468984689946900469014690246903469044690546906469074690846909469104691146912469134691446915469164691746918469194692046921469224692346924469254692646927469284692946930469314693246933469344693546936469374693846939469404694146942469434694446945469464694746948469494695046951469524695346954469554695646957469584695946960469614696246963469644696546966469674696846969469704697146972469734697446975469764697746978469794698046981469824698346984469854698646987469884698946990469914699246993469944699546996469974699846999470004700147002470034700447005470064700747008470094701047011470124701347014470154701647017470184701947020470214702247023470244702547026470274702847029470304703147032470334703447035470364703747038470394704047041470424704347044470454704647047470484704947050470514705247053470544705547056470574705847059470604706147062470634706447065470664706747068470694707047071470724707347074470754707647077470784707947080470814708247083470844708547086470874708847089470904709147092470934709447095470964709747098470994710047101471024710347104471054710647107471084710947110471114711247113471144711547116471174711847119471204712147122471234712447125471264712747128471294713047131471324713347134471354713647137471384713947140471414714247143471444714547146471474714847149471504715147152471534715447155471564715747158471594716047161471624716347164471654716647167471684716947170471714717247173471744717547176471774717847179471804718147182471834718447185471864718747188471894719047191471924719347194471954719647197471984719947200472014720247203472044720547206472074720847209472104721147212472134721447215472164721747218472194722047221472224722347224472254722647227472284722947230472314723247233472344723547236472374723847239472404724147242472434724447245472464724747248472494725047251472524725347254472554725647257472584725947260472614726247263472644726547266472674726847269472704727147272472734727447275472764727747278472794728047281472824728347284472854728647287472884728947290472914729247293472944729547296472974729847299473004730147302473034730447305473064730747308473094731047311473124731347314473154731647317473184731947320473214732247323473244732547326473274732847329473304733147332473334733447335473364733747338473394734047341473424734347344473454734647347473484734947350473514735247353473544735547356473574735847359473604736147362473634736447365473664736747368473694737047371473724737347374473754737647377473784737947380473814738247383473844738547386473874738847389473904739147392473934739447395473964739747398473994740047401474024740347404474054740647407474084740947410474114741247413474144741547416474174741847419474204742147422474234742447425474264742747428474294743047431474324743347434474354743647437474384743947440474414744247443474444744547446474474744847449474504745147452474534745447455474564745747458474594746047461474624746347464474654746647467474684746947470474714747247473474744747547476474774747847479474804748147482474834748447485474864748747488474894749047491474924749347494474954749647497474984749947500475014750247503475044750547506475074750847509475104751147512475134751447515475164751747518475194752047521475224752347524475254752647527475284752947530475314753247533475344753547536475374753847539475404754147542475434754447545475464754747548475494755047551475524755347554475554755647557475584755947560475614756247563475644756547566475674756847569475704757147572475734757447575475764757747578475794758047581475824758347584475854758647587475884758947590475914759247593475944759547596475974759847599476004760147602476034760447605476064760747608476094761047611476124761347614476154761647617476184761947620476214762247623476244762547626476274762847629476304763147632476334763447635476364763747638476394764047641476424764347644476454764647647476484764947650476514765247653476544765547656476574765847659476604766147662476634766447665476664766747668476694767047671476724767347674476754767647677476784767947680476814768247683476844768547686476874768847689476904769147692476934769447695476964769747698476994770047701477024770347704477054770647707477084770947710477114771247713477144771547716477174771847719477204772147722477234772447725477264772747728477294773047731477324773347734477354773647737477384773947740477414774247743477444774547746477474774847749477504775147752477534775447755477564775747758477594776047761477624776347764477654776647767477684776947770477714777247773477744777547776477774777847779477804778147782477834778447785477864778747788477894779047791477924779347794477954779647797477984779947800478014780247803478044780547806478074780847809478104781147812478134781447815478164781747818478194782047821478224782347824478254782647827478284782947830478314783247833478344783547836478374783847839478404784147842478434784447845478464784747848478494785047851478524785347854478554785647857478584785947860478614786247863478644786547866478674786847869478704787147872478734787447875478764787747878478794788047881478824788347884478854788647887478884788947890478914789247893478944789547896478974789847899479004790147902479034790447905479064790747908479094791047911479124791347914479154791647917479184791947920479214792247923479244792547926479274792847929479304793147932479334793447935479364793747938479394794047941479424794347944479454794647947479484794947950479514795247953479544795547956479574795847959479604796147962479634796447965479664796747968479694797047971479724797347974479754797647977479784797947980479814798247983479844798547986479874798847989479904799147992479934799447995479964799747998479994800048001480024800348004480054800648007480084800948010480114801248013480144801548016480174801848019480204802148022480234802448025480264802748028480294803048031480324803348034480354803648037480384803948040480414804248043480444804548046480474804848049480504805148052480534805448055480564805748058480594806048061480624806348064480654806648067480684806948070480714807248073480744807548076480774807848079480804808148082480834808448085480864808748088480894809048091480924809348094480954809648097480984809948100481014810248103481044810548106481074810848109481104811148112481134811448115481164811748118481194812048121481224812348124481254812648127481284812948130481314813248133481344813548136481374813848139481404814148142481434814448145481464814748148481494815048151481524815348154481554815648157481584815948160481614816248163481644816548166481674816848169481704817148172481734817448175481764817748178481794818048181481824818348184481854818648187481884818948190481914819248193481944819548196481974819848199482004820148202482034820448205482064820748208482094821048211482124821348214482154821648217482184821948220482214822248223482244822548226482274822848229482304823148232482334823448235482364823748238482394824048241482424824348244482454824648247482484824948250482514825248253482544825548256482574825848259482604826148262482634826448265482664826748268482694827048271482724827348274482754827648277482784827948280482814828248283482844828548286482874828848289482904829148292482934829448295482964829748298482994830048301483024830348304483054830648307483084830948310483114831248313483144831548316483174831848319483204832148322483234832448325483264832748328483294833048331483324833348334483354833648337483384833948340483414834248343483444834548346483474834848349483504835148352483534835448355483564835748358483594836048361483624836348364483654836648367483684836948370483714837248373483744837548376483774837848379483804838148382483834838448385483864838748388483894839048391483924839348394483954839648397483984839948400484014840248403484044840548406484074840848409484104841148412484134841448415484164841748418484194842048421484224842348424484254842648427484284842948430484314843248433484344843548436484374843848439484404844148442484434844448445484464844748448484494845048451484524845348454484554845648457484584845948460484614846248463484644846548466484674846848469484704847148472484734847448475484764847748478484794848048481484824848348484484854848648487484884848948490484914849248493484944849548496484974849848499485004850148502485034850448505485064850748508485094851048511485124851348514485154851648517485184851948520485214852248523485244852548526485274852848529485304853148532485334853448535485364853748538485394854048541485424854348544485454854648547485484854948550485514855248553485544855548556485574855848559485604856148562485634856448565485664856748568485694857048571485724857348574485754857648577485784857948580485814858248583485844858548586485874858848589485904859148592485934859448595485964859748598485994860048601486024860348604486054860648607486084860948610486114861248613486144861548616486174861848619486204862148622486234862448625486264862748628486294863048631486324863348634486354863648637486384863948640486414864248643486444864548646486474864848649486504865148652486534865448655486564865748658486594866048661486624866348664486654866648667486684866948670486714867248673486744867548676486774867848679486804868148682486834868448685486864868748688486894869048691486924869348694486954869648697486984869948700487014870248703487044870548706487074870848709487104871148712487134871448715487164871748718487194872048721487224872348724487254872648727487284872948730487314873248733487344873548736487374873848739487404874148742487434874448745487464874748748487494875048751487524875348754487554875648757487584875948760487614876248763487644876548766487674876848769487704877148772487734877448775487764877748778487794878048781487824878348784487854878648787487884878948790487914879248793487944879548796487974879848799488004880148802488034880448805488064880748808488094881048811488124881348814488154881648817488184881948820488214882248823488244882548826488274882848829488304883148832488334883448835488364883748838488394884048841488424884348844488454884648847488484884948850488514885248853488544885548856488574885848859488604886148862488634886448865488664886748868488694887048871488724887348874488754887648877488784887948880488814888248883488844888548886488874888848889488904889148892488934889448895488964889748898488994890048901489024890348904489054890648907489084890948910489114891248913489144891548916489174891848919489204892148922489234892448925489264892748928489294893048931489324893348934489354893648937489384893948940489414894248943489444894548946489474894848949489504895148952489534895448955489564895748958489594896048961489624896348964489654896648967489684896948970489714897248973489744897548976489774897848979489804898148982489834898448985489864898748988489894899048991489924899348994489954899648997489984899949000490014900249003490044900549006490074900849009490104901149012490134901449015490164901749018490194902049021490224902349024490254902649027490284902949030490314903249033490344903549036490374903849039490404904149042490434904449045490464904749048490494905049051490524905349054490554905649057490584905949060490614906249063490644906549066490674906849069490704907149072490734907449075490764907749078490794908049081490824908349084490854908649087490884908949090490914909249093490944909549096490974909849099491004910149102491034910449105491064910749108491094911049111491124911349114491154911649117491184911949120491214912249123491244912549126491274912849129491304913149132491334913449135491364913749138491394914049141491424914349144491454914649147491484914949150491514915249153491544915549156491574915849159491604916149162491634916449165491664916749168491694917049171491724917349174491754917649177491784917949180491814918249183491844918549186491874918849189491904919149192491934919449195491964919749198491994920049201492024920349204492054920649207492084920949210492114921249213492144921549216492174921849219492204922149222492234922449225492264922749228492294923049231492324923349234492354923649237492384923949240492414924249243492444924549246492474924849249492504925149252492534925449255492564925749258492594926049261492624926349264492654926649267492684926949270492714927249273492744927549276492774927849279492804928149282492834928449285492864928749288492894929049291492924929349294492954929649297492984929949300493014930249303493044930549306493074930849309493104931149312493134931449315493164931749318493194932049321493224932349324493254932649327493284932949330493314933249333493344933549336493374933849339493404934149342493434934449345493464934749348493494935049351493524935349354493554935649357493584935949360493614936249363493644936549366493674936849369493704937149372493734937449375493764937749378493794938049381493824938349384493854938649387493884938949390493914939249393493944939549396493974939849399494004940149402494034940449405494064940749408494094941049411494124941349414494154941649417494184941949420494214942249423494244942549426494274942849429494304943149432494334943449435494364943749438494394944049441494424944349444494454944649447494484944949450494514945249453494544945549456494574945849459494604946149462494634946449465494664946749468494694947049471494724947349474494754947649477494784947949480494814948249483494844948549486494874948849489494904949149492494934949449495494964949749498494994950049501495024950349504495054950649507495084950949510495114951249513495144951549516495174951849519495204952149522495234952449525495264952749528495294953049531495324953349534495354953649537495384953949540495414954249543495444954549546495474954849549495504955149552495534955449555495564955749558495594956049561495624956349564495654956649567495684956949570495714957249573495744957549576495774957849579495804958149582495834958449585495864958749588495894959049591495924959349594495954959649597495984959949600496014960249603496044960549606496074960849609496104961149612496134961449615496164961749618496194962049621496224962349624496254962649627496284962949630496314963249633496344963549636496374963849639496404964149642496434964449645496464964749648496494965049651496524965349654496554965649657496584965949660496614966249663496644966549666496674966849669496704967149672496734967449675496764967749678496794968049681496824968349684496854968649687496884968949690496914969249693496944969549696496974969849699497004970149702497034970449705497064970749708497094971049711497124971349714497154971649717497184971949720497214972249723497244972549726497274972849729497304973149732497334973449735497364973749738497394974049741497424974349744497454974649747497484974949750497514975249753497544975549756497574975849759497604976149762497634976449765497664976749768497694977049771497724977349774497754977649777497784977949780497814978249783497844978549786497874978849789497904979149792497934979449795497964979749798497994980049801498024980349804498054980649807498084980949810498114981249813498144981549816498174981849819498204982149822498234982449825498264982749828498294983049831498324983349834498354983649837498384983949840498414984249843498444984549846498474984849849498504985149852498534985449855498564985749858498594986049861498624986349864498654986649867498684986949870498714987249873498744987549876498774987849879498804988149882498834988449885498864988749888498894989049891498924989349894498954989649897498984989949900499014990249903499044990549906499074990849909499104991149912499134991449915499164991749918499194992049921499224992349924499254992649927499284992949930499314993249933499344993549936499374993849939499404994149942499434994449945499464994749948499494995049951499524995349954499554995649957499584995949960499614996249963499644996549966499674996849969499704997149972499734997449975499764997749978499794998049981499824998349984499854998649987499884998949990499914999249993499944999549996499974999849999500005000150002500035000450005500065000750008500095001050011500125001350014500155001650017500185001950020500215002250023500245002550026500275002850029500305003150032500335003450035500365003750038500395004050041500425004350044500455004650047500485004950050500515005250053500545005550056500575005850059500605006150062500635006450065500665006750068500695007050071500725007350074500755007650077500785007950080500815008250083500845008550086500875008850089500905009150092500935009450095500965009750098500995010050101501025010350104501055010650107501085010950110501115011250113501145011550116501175011850119501205012150122501235012450125501265012750128501295013050131501325013350134501355013650137501385013950140501415014250143501445014550146501475014850149501505015150152501535015450155501565015750158501595016050161501625016350164501655016650167501685016950170501715017250173501745017550176501775017850179501805018150182501835018450185501865018750188501895019050191501925019350194501955019650197501985019950200502015020250203502045020550206502075020850209502105021150212502135021450215502165021750218502195022050221502225022350224502255022650227502285022950230502315023250233502345023550236502375023850239502405024150242502435024450245502465024750248502495025050251502525025350254502555025650257502585025950260502615026250263502645026550266502675026850269502705027150272502735027450275502765027750278502795028050281502825028350284502855028650287502885028950290502915029250293502945029550296502975029850299503005030150302503035030450305503065030750308503095031050311503125031350314503155031650317503185031950320503215032250323503245032550326503275032850329503305033150332503335033450335503365033750338503395034050341503425034350344503455034650347503485034950350503515035250353503545035550356503575035850359503605036150362503635036450365503665036750368503695037050371503725037350374503755037650377503785037950380503815038250383503845038550386503875038850389503905039150392503935039450395503965039750398503995040050401504025040350404504055040650407504085040950410504115041250413504145041550416504175041850419504205042150422504235042450425504265042750428504295043050431504325043350434504355043650437504385043950440504415044250443504445044550446504475044850449504505045150452504535045450455504565045750458504595046050461504625046350464504655046650467504685046950470504715047250473504745047550476504775047850479504805048150482504835048450485504865048750488504895049050491504925049350494504955049650497504985049950500505015050250503505045050550506505075050850509505105051150512505135051450515505165051750518505195052050521505225052350524505255052650527505285052950530505315053250533505345053550536505375053850539505405054150542505435054450545505465054750548505495055050551505525055350554505555055650557505585055950560505615056250563505645056550566505675056850569505705057150572505735057450575505765057750578505795058050581505825058350584505855058650587505885058950590505915059250593505945059550596505975059850599506005060150602506035060450605506065060750608506095061050611506125061350614506155061650617506185061950620506215062250623506245062550626506275062850629506305063150632506335063450635506365063750638506395064050641506425064350644506455064650647506485064950650506515065250653506545065550656506575065850659506605066150662506635066450665506665066750668506695067050671506725067350674506755067650677506785067950680506815068250683506845068550686506875068850689506905069150692506935069450695506965069750698506995070050701507025070350704507055070650707507085070950710507115071250713507145071550716507175071850719507205072150722507235072450725507265072750728507295073050731507325073350734507355073650737507385073950740507415074250743507445074550746507475074850749507505075150752507535075450755507565075750758507595076050761507625076350764507655076650767507685076950770507715077250773507745077550776507775077850779507805078150782507835078450785507865078750788507895079050791507925079350794507955079650797507985079950800508015080250803508045080550806508075080850809508105081150812508135081450815508165081750818508195082050821508225082350824508255082650827508285082950830508315083250833508345083550836508375083850839508405084150842508435084450845508465084750848508495085050851508525085350854508555085650857508585085950860508615086250863508645086550866508675086850869508705087150872508735087450875508765087750878508795088050881508825088350884508855088650887508885088950890508915089250893508945089550896508975089850899509005090150902509035090450905509065090750908509095091050911509125091350914509155091650917509185091950920509215092250923509245092550926509275092850929509305093150932509335093450935509365093750938509395094050941509425094350944509455094650947509485094950950509515095250953509545095550956509575095850959509605096150962509635096450965509665096750968509695097050971509725097350974509755097650977509785097950980509815098250983509845098550986509875098850989509905099150992509935099450995509965099750998509995100051001510025100351004510055100651007510085100951010510115101251013510145101551016510175101851019510205102151022510235102451025510265102751028510295103051031510325103351034510355103651037510385103951040510415104251043510445104551046510475104851049510505105151052510535105451055510565105751058510595106051061510625106351064510655106651067510685106951070510715107251073510745107551076510775107851079510805108151082510835108451085510865108751088510895109051091510925109351094510955109651097510985109951100511015110251103511045110551106511075110851109511105111151112511135111451115511165111751118511195112051121511225112351124511255112651127511285112951130511315113251133511345113551136511375113851139511405114151142511435114451145511465114751148511495115051151511525115351154511555115651157511585115951160511615116251163511645116551166511675116851169511705117151172511735117451175511765117751178511795118051181511825118351184511855118651187511885118951190511915119251193511945119551196511975119851199512005120151202512035120451205512065120751208512095121051211512125121351214512155121651217512185121951220512215122251223512245122551226512275122851229512305123151232512335123451235512365123751238512395124051241512425124351244512455124651247512485124951250512515125251253512545125551256512575125851259512605126151262512635126451265512665126751268512695127051271512725127351274512755127651277512785127951280512815128251283512845128551286512875128851289512905129151292512935129451295512965129751298512995130051301513025130351304513055130651307513085130951310513115131251313513145131551316513175131851319513205132151322513235132451325513265132751328513295133051331513325133351334513355133651337513385133951340513415134251343513445134551346513475134851349513505135151352513535135451355513565135751358513595136051361513625136351364513655136651367513685136951370513715137251373513745137551376513775137851379513805138151382513835138451385513865138751388513895139051391513925139351394513955139651397513985139951400514015140251403514045140551406514075140851409514105141151412514135141451415514165141751418514195142051421514225142351424514255142651427514285142951430514315143251433514345143551436514375143851439514405144151442514435144451445514465144751448514495145051451514525145351454514555145651457514585145951460514615146251463514645146551466514675146851469514705147151472514735147451475514765147751478514795148051481514825148351484514855148651487514885148951490514915149251493514945149551496514975149851499515005150151502515035150451505515065150751508515095151051511515125151351514515155151651517515185151951520515215152251523515245152551526515275152851529515305153151532515335153451535515365153751538515395154051541515425154351544515455154651547515485154951550515515155251553515545155551556515575155851559515605156151562515635156451565515665156751568515695157051571515725157351574515755157651577515785157951580515815158251583515845158551586515875158851589515905159151592515935159451595515965159751598515995160051601516025160351604516055160651607516085160951610516115161251613516145161551616516175161851619516205162151622516235162451625516265162751628516295163051631516325163351634516355163651637516385163951640516415164251643516445164551646516475164851649516505165151652516535165451655516565165751658516595166051661516625166351664516655166651667516685166951670516715167251673516745167551676516775167851679516805168151682516835168451685516865168751688516895169051691516925169351694516955169651697516985169951700517015170251703517045170551706517075170851709517105171151712517135171451715517165171751718517195172051721517225172351724517255172651727517285172951730517315173251733517345173551736517375173851739517405174151742517435174451745517465174751748517495175051751517525175351754517555175651757517585175951760517615176251763517645176551766517675176851769517705177151772517735177451775517765177751778517795178051781517825178351784517855178651787517885178951790517915179251793517945179551796517975179851799518005180151802518035180451805518065180751808518095181051811518125181351814518155181651817518185181951820518215182251823518245182551826518275182851829518305183151832518335183451835518365183751838518395184051841518425184351844518455184651847518485184951850518515185251853518545185551856518575185851859518605186151862518635186451865518665186751868518695187051871518725187351874518755187651877518785187951880518815188251883518845188551886518875188851889518905189151892518935189451895518965189751898518995190051901519025190351904519055190651907519085190951910519115191251913519145191551916519175191851919519205192151922519235192451925519265192751928519295193051931519325193351934519355193651937519385193951940519415194251943519445194551946519475194851949519505195151952519535195451955519565195751958519595196051961519625196351964519655196651967519685196951970519715197251973519745197551976519775197851979519805198151982519835198451985519865198751988519895199051991519925199351994519955199651997519985199952000520015200252003520045200552006520075200852009520105201152012520135201452015520165201752018520195202052021520225202352024520255202652027520285202952030520315203252033520345203552036520375203852039520405204152042520435204452045520465204752048520495205052051520525205352054520555205652057520585205952060520615206252063520645206552066520675206852069520705207152072520735207452075520765207752078520795208052081520825208352084520855208652087520885208952090520915209252093520945209552096520975209852099521005210152102521035210452105521065210752108521095211052111521125211352114521155211652117521185211952120521215212252123521245212552126521275212852129521305213152132521335213452135521365213752138521395214052141521425214352144521455214652147521485214952150521515215252153521545215552156521575215852159521605216152162521635216452165521665216752168521695217052171521725217352174521755217652177521785217952180521815218252183521845218552186521875218852189521905219152192521935219452195521965219752198521995220052201522025220352204522055220652207522085220952210522115221252213522145221552216522175221852219522205222152222522235222452225522265222752228522295223052231522325223352234522355223652237522385223952240522415224252243522445224552246522475224852249522505225152252522535225452255522565225752258522595226052261522625226352264522655226652267522685226952270522715227252273522745227552276522775227852279522805228152282522835228452285522865228752288522895229052291522925229352294522955229652297522985229952300523015230252303523045230552306523075230852309523105231152312523135231452315523165231752318523195232052321523225232352324523255232652327523285232952330523315233252333523345233552336523375233852339523405234152342523435234452345523465234752348523495235052351523525235352354523555235652357523585235952360523615236252363523645236552366523675236852369523705237152372523735237452375523765237752378523795238052381523825238352384523855238652387523885238952390523915239252393523945239552396523975239852399524005240152402524035240452405524065240752408524095241052411524125241352414524155241652417524185241952420524215242252423524245242552426524275242852429524305243152432524335243452435524365243752438524395244052441524425244352444524455244652447524485244952450524515245252453524545245552456524575245852459524605246152462524635246452465524665246752468524695247052471524725247352474524755247652477524785247952480524815248252483524845248552486524875248852489524905249152492524935249452495524965249752498524995250052501525025250352504525055250652507525085250952510525115251252513525145251552516525175251852519525205252152522525235252452525525265252752528525295253052531525325253352534525355253652537525385253952540525415254252543525445254552546525475254852549525505255152552525535255452555525565255752558525595256052561525625256352564525655256652567525685256952570525715257252573525745257552576525775257852579525805258152582525835258452585525865258752588525895259052591525925259352594525955259652597525985259952600526015260252603526045260552606526075260852609526105261152612526135261452615526165261752618526195262052621526225262352624526255262652627526285262952630526315263252633526345263552636526375263852639526405264152642526435264452645526465264752648526495265052651526525265352654526555265652657526585265952660526615266252663526645266552666526675266852669526705267152672526735267452675526765267752678526795268052681526825268352684526855268652687526885268952690526915269252693526945269552696526975269852699527005270152702527035270452705527065270752708527095271052711527125271352714527155271652717527185271952720527215272252723527245272552726527275272852729527305273152732527335273452735527365273752738527395274052741527425274352744527455274652747527485274952750527515275252753527545275552756527575275852759527605276152762527635276452765527665276752768527695277052771527725277352774527755277652777527785277952780527815278252783527845278552786527875278852789527905279152792527935279452795527965279752798527995280052801528025280352804528055280652807528085280952810528115281252813528145281552816528175281852819528205282152822528235282452825528265282752828528295283052831528325283352834528355283652837528385283952840528415284252843528445284552846528475284852849528505285152852528535285452855528565285752858528595286052861528625286352864528655286652867528685286952870528715287252873528745287552876528775287852879528805288152882528835288452885528865288752888528895289052891528925289352894528955289652897528985289952900529015290252903529045290552906529075290852909529105291152912529135291452915529165291752918529195292052921529225292352924529255292652927529285292952930529315293252933529345293552936529375293852939529405294152942529435294452945529465294752948529495295052951529525295352954529555295652957529585295952960529615296252963529645296552966529675296852969529705297152972529735297452975529765297752978529795298052981529825298352984529855298652987529885298952990529915299252993529945299552996529975299852999530005300153002530035300453005530065300753008530095301053011530125301353014530155301653017530185301953020530215302253023530245302553026530275302853029530305303153032530335303453035530365303753038530395304053041530425304353044530455304653047530485304953050530515305253053530545305553056530575305853059530605306153062530635306453065530665306753068530695307053071530725307353074530755307653077530785307953080530815308253083530845308553086530875308853089530905309153092530935309453095530965309753098530995310053101531025310353104531055310653107531085310953110531115311253113531145311553116531175311853119531205312153122531235312453125531265312753128531295313053131531325313353134531355313653137531385313953140531415314253143531445314553146531475314853149531505315153152531535315453155531565315753158531595316053161531625316353164531655316653167531685316953170531715317253173531745317553176531775317853179531805318153182531835318453185531865318753188531895319053191531925319353194531955319653197531985319953200532015320253203532045320553206532075320853209532105321153212532135321453215532165321753218532195322053221532225322353224532255322653227532285322953230532315323253233532345323553236532375323853239532405324153242532435324453245532465324753248532495325053251532525325353254532555325653257532585325953260532615326253263532645326553266532675326853269532705327153272532735327453275532765327753278532795328053281532825328353284532855328653287532885328953290532915329253293532945329553296532975329853299533005330153302533035330453305533065330753308533095331053311533125331353314533155331653317533185331953320533215332253323533245332553326533275332853329533305333153332533335333453335533365333753338533395334053341533425334353344533455334653347533485334953350533515335253353533545335553356533575335853359533605336153362533635336453365533665336753368533695337053371533725337353374533755337653377533785337953380533815338253383533845338553386533875338853389533905339153392533935339453395533965339753398533995340053401534025340353404534055340653407534085340953410534115341253413534145341553416534175341853419534205342153422534235342453425534265342753428534295343053431534325343353434534355343653437534385343953440534415344253443534445344553446534475344853449534505345153452534535345453455534565345753458534595346053461534625346353464534655346653467534685346953470534715347253473534745347553476534775347853479534805348153482534835348453485534865348753488534895349053491534925349353494534955349653497534985349953500535015350253503535045350553506535075350853509535105351153512535135351453515535165351753518535195352053521535225352353524535255352653527535285352953530535315353253533535345353553536535375353853539535405354153542535435354453545535465354753548535495355053551535525355353554535555355653557535585355953560535615356253563535645356553566535675356853569535705357153572535735357453575535765357753578535795358053581535825358353584535855358653587535885358953590535915359253593535945359553596535975359853599536005360153602536035360453605536065360753608536095361053611536125361353614536155361653617536185361953620536215362253623536245362553626536275362853629536305363153632536335363453635536365363753638536395364053641536425364353644536455364653647536485364953650536515365253653536545365553656536575365853659536605366153662536635366453665536665366753668536695367053671536725367353674536755367653677536785367953680536815368253683536845368553686536875368853689536905369153692536935369453695536965369753698536995370053701537025370353704537055370653707537085370953710537115371253713537145371553716537175371853719537205372153722537235372453725537265372753728537295373053731537325373353734537355373653737537385373953740537415374253743537445374553746537475374853749537505375153752537535375453755537565375753758537595376053761537625376353764537655376653767537685376953770537715377253773537745377553776537775377853779537805378153782537835378453785537865378753788537895379053791537925379353794537955379653797537985379953800538015380253803538045380553806538075380853809538105381153812538135381453815538165381753818538195382053821538225382353824538255382653827538285382953830538315383253833538345383553836538375383853839538405384153842538435384453845538465384753848538495385053851538525385353854538555385653857538585385953860538615386253863538645386553866538675386853869538705387153872538735387453875538765387753878538795388053881538825388353884538855388653887538885388953890538915389253893538945389553896538975389853899539005390153902539035390453905539065390753908539095391053911539125391353914539155391653917539185391953920539215392253923539245392553926539275392853929539305393153932539335393453935539365393753938539395394053941539425394353944539455394653947539485394953950539515395253953539545395553956539575395853959539605396153962539635396453965539665396753968539695397053971539725397353974539755397653977539785397953980539815398253983539845398553986539875398853989539905399153992539935399453995539965399753998539995400054001540025400354004540055400654007540085400954010540115401254013540145401554016540175401854019540205402154022540235402454025540265402754028540295403054031540325403354034540355403654037540385403954040540415404254043540445404554046540475404854049540505405154052540535405454055540565405754058540595406054061540625406354064540655406654067540685406954070540715407254073540745407554076540775407854079540805408154082540835408454085540865408754088540895409054091540925409354094540955409654097540985409954100541015410254103541045410554106541075410854109541105411154112541135411454115541165411754118541195412054121541225412354124541255412654127541285412954130541315413254133541345413554136541375413854139541405414154142541435414454145541465414754148541495415054151541525415354154541555415654157541585415954160541615416254163541645416554166541675416854169541705417154172541735417454175541765417754178541795418054181541825418354184541855418654187541885418954190541915419254193541945419554196541975419854199542005420154202542035420454205542065420754208542095421054211542125421354214542155421654217542185421954220542215422254223542245422554226542275422854229542305423154232542335423454235542365423754238542395424054241542425424354244542455424654247542485424954250542515425254253542545425554256542575425854259542605426154262542635426454265542665426754268542695427054271542725427354274542755427654277542785427954280542815428254283542845428554286542875428854289542905429154292542935429454295542965429754298542995430054301543025430354304543055430654307543085430954310543115431254313543145431554316543175431854319543205432154322543235432454325543265432754328543295433054331543325433354334543355433654337543385433954340543415434254343543445434554346543475434854349543505435154352543535435454355543565435754358543595436054361543625436354364543655436654367543685436954370543715437254373543745437554376543775437854379543805438154382543835438454385543865438754388543895439054391543925439354394543955439654397543985439954400544015440254403544045440554406544075440854409544105441154412544135441454415544165441754418544195442054421544225442354424544255442654427544285442954430544315443254433544345443554436544375443854439544405444154442544435444454445544465444754448544495445054451544525445354454544555445654457544585445954460544615446254463544645446554466544675446854469544705447154472544735447454475544765447754478544795448054481544825448354484544855448654487544885448954490544915449254493544945449554496544975449854499545005450154502545035450454505545065450754508545095451054511545125451354514545155451654517545185451954520545215452254523545245452554526545275452854529545305453154532545335453454535545365453754538545395454054541545425454354544545455454654547545485454954550545515455254553545545455554556545575455854559545605456154562545635456454565545665456754568545695457054571545725457354574545755457654577545785457954580545815458254583545845458554586545875458854589545905459154592545935459454595545965459754598545995460054601546025460354604546055460654607546085460954610546115461254613546145461554616546175461854619546205462154622546235462454625546265462754628546295463054631546325463354634546355463654637546385463954640546415464254643546445464554646546475464854649546505465154652546535465454655546565465754658546595466054661546625466354664546655466654667546685466954670546715467254673546745467554676546775467854679546805468154682546835468454685546865468754688546895469054691546925469354694546955469654697546985469954700547015470254703547045470554706547075470854709547105471154712547135471454715547165471754718547195472054721547225472354724547255472654727547285472954730547315473254733547345473554736547375473854739547405474154742547435474454745547465474754748547495475054751547525475354754547555475654757547585475954760547615476254763547645476554766547675476854769547705477154772547735477454775547765477754778547795478054781547825478354784547855478654787547885478954790547915479254793547945479554796547975479854799548005480154802548035480454805548065480754808548095481054811548125481354814548155481654817548185481954820548215482254823548245482554826548275482854829548305483154832548335483454835548365483754838548395484054841548425484354844548455484654847548485484954850548515485254853548545485554856548575485854859548605486154862548635486454865548665486754868548695487054871548725487354874548755487654877548785487954880548815488254883548845488554886548875488854889548905489154892548935489454895548965489754898548995490054901549025490354904549055490654907549085490954910549115491254913549145491554916549175491854919549205492154922549235492454925549265492754928549295493054931549325493354934549355493654937549385493954940549415494254943549445494554946549475494854949549505495154952549535495454955549565495754958549595496054961549625496354964549655496654967549685496954970549715497254973549745497554976549775497854979549805498154982549835498454985549865498754988549895499054991549925499354994549955499654997549985499955000550015500255003550045500555006550075500855009550105501155012550135501455015550165501755018550195502055021550225502355024550255502655027550285502955030550315503255033550345503555036550375503855039550405504155042550435504455045550465504755048550495505055051550525505355054550555505655057550585505955060550615506255063550645506555066550675506855069550705507155072550735507455075550765507755078550795508055081550825508355084550855508655087550885508955090550915509255093550945509555096550975509855099551005510155102551035510455105551065510755108551095511055111551125511355114551155511655117551185511955120551215512255123551245512555126551275512855129551305513155132551335513455135551365513755138551395514055141551425514355144551455514655147551485514955150551515515255153551545515555156551575515855159551605516155162551635516455165551665516755168551695517055171551725517355174551755517655177551785517955180551815518255183551845518555186551875518855189551905519155192551935519455195551965519755198551995520055201552025520355204552055520655207552085520955210552115521255213552145521555216552175521855219552205522155222552235522455225552265522755228552295523055231552325523355234552355523655237552385523955240552415524255243552445524555246552475524855249552505525155252552535525455255552565525755258552595526055261552625526355264552655526655267552685526955270552715527255273552745527555276552775527855279552805528155282552835528455285552865528755288552895529055291552925529355294552955529655297552985529955300553015530255303553045530555306553075530855309553105531155312553135531455315553165531755318553195532055321553225532355324553255532655327553285532955330553315533255333553345533555336553375533855339553405534155342553435534455345553465534755348553495535055351553525535355354553555535655357553585535955360553615536255363553645536555366553675536855369553705537155372553735537455375553765537755378553795538055381553825538355384553855538655387553885538955390553915539255393553945539555396553975539855399554005540155402554035540455405554065540755408554095541055411554125541355414554155541655417554185541955420554215542255423554245542555426554275542855429554305543155432554335543455435554365543755438554395544055441554425544355444554455544655447554485544955450554515545255453554545545555456554575545855459554605546155462554635546455465554665546755468554695547055471554725547355474554755547655477554785547955480554815548255483554845548555486554875548855489554905549155492554935549455495554965549755498554995550055501555025550355504555055550655507555085550955510555115551255513555145551555516555175551855519555205552155522555235552455525555265552755528555295553055531555325553355534555355553655537555385553955540555415554255543555445554555546555475554855549555505555155552555535555455555555565555755558555595556055561555625556355564555655556655567555685556955570555715557255573555745557555576555775557855579555805558155582555835558455585555865558755588555895559055591555925559355594555955559655597555985559955600556015560255603556045560555606556075560855609556105561155612556135561455615556165561755618556195562055621556225562355624556255562655627556285562955630556315563255633556345563555636556375563855639556405564155642556435564455645556465564755648556495565055651556525565355654556555565655657556585565955660556615566255663556645566555666556675566855669556705567155672556735567455675556765567755678556795568055681556825568355684556855568655687556885568955690556915569255693556945569555696556975569855699557005570155702557035570455705557065570755708557095571055711557125571355714557155571655717557185571955720557215572255723557245572555726557275572855729557305573155732557335573455735557365573755738557395574055741557425574355744557455574655747557485574955750557515575255753557545575555756557575575855759557605576155762557635576455765557665576755768557695577055771557725577355774557755577655777557785577955780557815578255783557845578555786557875578855789557905579155792557935579455795557965579755798557995580055801558025580355804558055580655807558085580955810558115581255813558145581555816558175581855819558205582155822558235582455825558265582755828558295583055831558325583355834558355583655837558385583955840558415584255843558445584555846558475584855849558505585155852558535585455855558565585755858558595586055861558625586355864558655586655867558685586955870558715587255873558745587555876558775587855879558805588155882558835588455885558865588755888558895589055891558925589355894558955589655897558985589955900559015590255903559045590555906559075590855909559105591155912559135591455915559165591755918559195592055921559225592355924559255592655927559285592955930559315593255933559345593555936559375593855939559405594155942559435594455945559465594755948559495595055951559525595355954559555595655957559585595955960559615596255963559645596555966559675596855969559705597155972559735597455975559765597755978559795598055981559825598355984559855598655987559885598955990559915599255993559945599555996559975599855999560005600156002560035600456005560065600756008560095601056011560125601356014560155601656017560185601956020560215602256023560245602556026560275602856029560305603156032560335603456035560365603756038560395604056041560425604356044560455604656047560485604956050560515605256053560545605556056560575605856059560605606156062560635606456065560665606756068560695607056071560725607356074560755607656077560785607956080560815608256083560845608556086560875608856089560905609156092560935609456095560965609756098560995610056101561025610356104561055610656107561085610956110561115611256113561145611556116561175611856119561205612156122561235612456125561265612756128561295613056131561325613356134561355613656137561385613956140561415614256143561445614556146561475614856149561505615156152561535615456155561565615756158561595616056161561625616356164561655616656167561685616956170561715617256173561745617556176561775617856179561805618156182561835618456185561865618756188561895619056191561925619356194561955619656197561985619956200562015620256203562045620556206562075620856209562105621156212562135621456215562165621756218562195622056221562225622356224562255622656227562285622956230562315623256233562345623556236562375623856239562405624156242562435624456245562465624756248562495625056251562525625356254562555625656257562585625956260562615626256263562645626556266562675626856269562705627156272562735627456275562765627756278562795628056281562825628356284562855628656287562885628956290562915629256293562945629556296562975629856299563005630156302563035630456305563065630756308563095631056311563125631356314563155631656317563185631956320563215632256323563245632556326563275632856329563305633156332563335633456335563365633756338563395634056341563425634356344563455634656347563485634956350563515635256353563545635556356563575635856359563605636156362563635636456365563665636756368563695637056371563725637356374563755637656377563785637956380563815638256383563845638556386563875638856389563905639156392563935639456395563965639756398563995640056401564025640356404564055640656407564085640956410564115641256413564145641556416564175641856419564205642156422564235642456425564265642756428564295643056431564325643356434564355643656437564385643956440564415644256443564445644556446564475644856449564505645156452564535645456455564565645756458564595646056461564625646356464564655646656467564685646956470564715647256473564745647556476564775647856479564805648156482564835648456485564865648756488564895649056491564925649356494564955649656497564985649956500565015650256503565045650556506565075650856509565105651156512565135651456515565165651756518565195652056521565225652356524565255652656527565285652956530565315653256533565345653556536565375653856539565405654156542565435654456545565465654756548565495655056551565525655356554565555655656557565585655956560565615656256563565645656556566565675656856569565705657156572565735657456575565765657756578565795658056581565825658356584565855658656587565885658956590565915659256593565945659556596565975659856599566005660156602566035660456605566065660756608566095661056611566125661356614566155661656617566185661956620566215662256623566245662556626566275662856629566305663156632566335663456635566365663756638566395664056641566425664356644566455664656647566485664956650566515665256653566545665556656566575665856659566605666156662566635666456665566665666756668566695667056671566725667356674566755667656677566785667956680566815668256683566845668556686566875668856689566905669156692566935669456695566965669756698566995670056701567025670356704567055670656707567085670956710567115671256713567145671556716567175671856719567205672156722567235672456725567265672756728567295673056731567325673356734567355673656737567385673956740567415674256743567445674556746567475674856749567505675156752567535675456755567565675756758567595676056761567625676356764567655676656767567685676956770567715677256773567745677556776567775677856779567805678156782567835678456785567865678756788567895679056791567925679356794567955679656797567985679956800568015680256803568045680556806568075680856809568105681156812568135681456815568165681756818568195682056821568225682356824568255682656827568285682956830568315683256833568345683556836568375683856839568405684156842568435684456845568465684756848568495685056851568525685356854568555685656857568585685956860568615686256863568645686556866568675686856869568705687156872568735687456875568765687756878568795688056881568825688356884568855688656887568885688956890568915689256893568945689556896568975689856899569005690156902569035690456905569065690756908569095691056911569125691356914569155691656917569185691956920569215692256923569245692556926569275692856929569305693156932569335693456935569365693756938569395694056941569425694356944569455694656947569485694956950569515695256953569545695556956569575695856959569605696156962569635696456965569665696756968569695697056971569725697356974569755697656977569785697956980569815698256983569845698556986569875698856989569905699156992569935699456995569965699756998569995700057001570025700357004570055700657007570085700957010570115701257013570145701557016570175701857019570205702157022570235702457025570265702757028570295703057031570325703357034570355703657037570385703957040570415704257043570445704557046570475704857049570505705157052570535705457055570565705757058570595706057061570625706357064570655706657067570685706957070570715707257073570745707557076570775707857079570805708157082570835708457085570865708757088570895709057091570925709357094570955709657097570985709957100571015710257103571045710557106571075710857109571105711157112571135711457115571165711757118571195712057121571225712357124571255712657127571285712957130571315713257133571345713557136571375713857139571405714157142571435714457145571465714757148571495715057151571525715357154571555715657157571585715957160571615716257163571645716557166571675716857169571705717157172571735717457175571765717757178571795718057181571825718357184571855718657187571885718957190571915719257193571945719557196571975719857199572005720157202572035720457205572065720757208572095721057211572125721357214572155721657217572185721957220572215722257223572245722557226572275722857229572305723157232572335723457235572365723757238572395724057241572425724357244572455724657247572485724957250572515725257253572545725557256572575725857259572605726157262572635726457265572665726757268572695727057271572725727357274572755727657277572785727957280572815728257283572845728557286572875728857289572905729157292572935729457295572965729757298572995730057301573025730357304573055730657307573085730957310573115731257313573145731557316573175731857319573205732157322573235732457325573265732757328573295733057331573325733357334573355733657337573385733957340573415734257343573445734557346573475734857349573505735157352573535735457355573565735757358573595736057361573625736357364573655736657367573685736957370573715737257373573745737557376573775737857379573805738157382573835738457385573865738757388573895739057391573925739357394573955739657397573985739957400574015740257403574045740557406574075740857409574105741157412574135741457415574165741757418574195742057421574225742357424574255742657427574285742957430574315743257433574345743557436574375743857439574405744157442574435744457445574465744757448574495745057451574525745357454574555745657457574585745957460574615746257463574645746557466574675746857469574705747157472574735747457475574765747757478574795748057481574825748357484574855748657487574885748957490574915749257493574945749557496574975749857499575005750157502575035750457505575065750757508575095751057511575125751357514575155751657517575185751957520575215752257523575245752557526575275752857529575305753157532575335753457535575365753757538575395754057541575425754357544575455754657547575485754957550575515755257553575545755557556575575755857559575605756157562575635756457565575665756757568575695757057571575725757357574575755757657577575785757957580575815758257583575845758557586575875758857589575905759157592575935759457595575965759757598575995760057601576025760357604576055760657607576085760957610576115761257613576145761557616576175761857619576205762157622576235762457625576265762757628576295763057631576325763357634576355763657637576385763957640576415764257643576445764557646576475764857649576505765157652576535765457655576565765757658576595766057661576625766357664576655766657667576685766957670576715767257673576745767557676576775767857679576805768157682576835768457685576865768757688576895769057691576925769357694576955769657697576985769957700577015770257703577045770557706577075770857709577105771157712577135771457715577165771757718577195772057721577225772357724577255772657727577285772957730577315773257733577345773557736577375773857739577405774157742577435774457745577465774757748577495775057751577525775357754577555775657757577585775957760577615776257763577645776557766577675776857769577705777157772577735777457775577765777757778577795778057781577825778357784577855778657787577885778957790577915779257793577945779557796577975779857799578005780157802578035780457805578065780757808578095781057811578125781357814578155781657817578185781957820578215782257823578245782557826578275782857829578305783157832578335783457835578365783757838578395784057841578425784357844578455784657847578485784957850578515785257853578545785557856578575785857859578605786157862578635786457865578665786757868578695787057871578725787357874578755787657877578785787957880578815788257883578845788557886578875788857889578905789157892578935789457895578965789757898578995790057901579025790357904579055790657907579085790957910579115791257913579145791557916579175791857919579205792157922579235792457925579265792757928579295793057931579325793357934579355793657937579385793957940579415794257943579445794557946579475794857949579505795157952579535795457955579565795757958579595796057961579625796357964579655796657967579685796957970579715797257973579745797557976579775797857979579805798157982579835798457985579865798757988579895799057991579925799357994579955799657997579985799958000580015800258003580045800558006580075800858009580105801158012580135801458015580165801758018580195802058021580225802358024580255802658027580285802958030580315803258033580345803558036580375803858039580405804158042580435804458045580465804758048580495805058051580525805358054580555805658057580585805958060580615806258063580645806558066580675806858069580705807158072580735807458075580765807758078580795808058081580825808358084580855808658087580885808958090580915809258093580945809558096580975809858099581005810158102581035810458105581065810758108581095811058111581125811358114581155811658117581185811958120581215812258123581245812558126581275812858129581305813158132581335813458135581365813758138581395814058141581425814358144581455814658147581485814958150581515815258153581545815558156581575815858159581605816158162581635816458165581665816758168581695817058171581725817358174581755817658177581785817958180581815818258183581845818558186581875818858189581905819158192581935819458195581965819758198581995820058201582025820358204582055820658207582085820958210582115821258213582145821558216582175821858219582205822158222582235822458225582265822758228582295823058231582325823358234582355823658237582385823958240582415824258243582445824558246582475824858249582505825158252582535825458255582565825758258582595826058261582625826358264582655826658267582685826958270582715827258273582745827558276582775827858279582805828158282582835828458285582865828758288582895829058291582925829358294582955829658297582985829958300583015830258303583045830558306583075830858309583105831158312583135831458315583165831758318583195832058321583225832358324583255832658327583285832958330583315833258333583345833558336583375833858339583405834158342583435834458345583465834758348583495835058351583525835358354583555835658357583585835958360583615836258363583645836558366583675836858369583705837158372583735837458375583765837758378583795838058381583825838358384583855838658387583885838958390583915839258393583945839558396583975839858399584005840158402584035840458405584065840758408584095841058411584125841358414584155841658417584185841958420584215842258423584245842558426584275842858429584305843158432584335843458435584365843758438584395844058441584425844358444584455844658447584485844958450584515845258453584545845558456584575845858459584605846158462584635846458465584665846758468584695847058471584725847358474584755847658477584785847958480584815848258483584845848558486584875848858489584905849158492584935849458495584965849758498584995850058501585025850358504585055850658507585085850958510585115851258513585145851558516585175851858519585205852158522585235852458525585265852758528585295853058531585325853358534585355853658537585385853958540585415854258543585445854558546585475854858549585505855158552585535855458555585565855758558585595856058561585625856358564585655856658567585685856958570585715857258573585745857558576585775857858579585805858158582585835858458585585865858758588585895859058591585925859358594585955859658597585985859958600586015860258603586045860558606586075860858609586105861158612586135861458615586165861758618586195862058621586225862358624586255862658627586285862958630586315863258633586345863558636586375863858639586405864158642586435864458645586465864758648586495865058651586525865358654586555865658657586585865958660586615866258663586645866558666586675866858669586705867158672586735867458675586765867758678586795868058681586825868358684586855868658687586885868958690586915869258693586945869558696586975869858699587005870158702587035870458705587065870758708587095871058711587125871358714587155871658717587185871958720587215872258723587245872558726587275872858729587305873158732587335873458735587365873758738587395874058741587425874358744587455874658747587485874958750587515875258753587545875558756587575875858759587605876158762587635876458765587665876758768587695877058771587725877358774587755877658777587785877958780587815878258783587845878558786587875878858789587905879158792587935879458795587965879758798587995880058801588025880358804588055880658807588085880958810588115881258813588145881558816588175881858819588205882158822588235882458825588265882758828588295883058831588325883358834588355883658837588385883958840588415884258843588445884558846588475884858849588505885158852588535885458855588565885758858588595886058861588625886358864588655886658867588685886958870588715887258873588745887558876588775887858879588805888158882588835888458885588865888758888588895889058891588925889358894588955889658897588985889958900589015890258903589045890558906589075890858909589105891158912589135891458915589165891758918589195892058921589225892358924589255892658927589285892958930589315893258933589345893558936589375893858939589405894158942589435894458945589465894758948589495895058951589525895358954589555895658957589585895958960589615896258963589645896558966589675896858969589705897158972589735897458975589765897758978589795898058981589825898358984589855898658987589885898958990589915899258993589945899558996589975899858999590005900159002590035900459005590065900759008590095901059011590125901359014590155901659017590185901959020590215902259023590245902559026590275902859029590305903159032590335903459035590365903759038590395904059041590425904359044590455904659047590485904959050590515905259053590545905559056590575905859059590605906159062590635906459065590665906759068590695907059071590725907359074590755907659077590785907959080590815908259083590845908559086590875908859089590905909159092590935909459095590965909759098590995910059101591025910359104591055910659107591085910959110591115911259113591145911559116591175911859119591205912159122591235912459125591265912759128591295913059131591325913359134591355913659137591385913959140591415914259143591445914559146591475914859149591505915159152591535915459155591565915759158591595916059161591625916359164591655916659167591685916959170591715917259173591745917559176591775917859179591805918159182591835918459185591865918759188591895919059191591925919359194591955919659197591985919959200592015920259203592045920559206592075920859209592105921159212592135921459215592165921759218592195922059221592225922359224592255922659227592285922959230592315923259233592345923559236592375923859239592405924159242592435924459245592465924759248592495925059251592525925359254592555925659257592585925959260592615926259263592645926559266592675926859269592705927159272592735927459275592765927759278592795928059281592825928359284592855928659287592885928959290592915929259293592945929559296592975929859299593005930159302593035930459305593065930759308593095931059311593125931359314593155931659317593185931959320593215932259323593245932559326593275932859329593305933159332593335933459335593365933759338593395934059341593425934359344593455934659347593485934959350593515935259353593545935559356593575935859359593605936159362593635936459365593665936759368593695937059371593725937359374593755937659377593785937959380593815938259383593845938559386593875938859389593905939159392593935939459395593965939759398593995940059401594025940359404594055940659407594085940959410594115941259413594145941559416594175941859419594205942159422594235942459425594265942759428594295943059431594325943359434594355943659437594385943959440594415944259443594445944559446594475944859449594505945159452594535945459455594565945759458594595946059461594625946359464594655946659467594685946959470594715947259473594745947559476594775947859479594805948159482594835948459485594865948759488594895949059491594925949359494594955949659497594985949959500595015950259503595045950559506595075950859509595105951159512595135951459515595165951759518595195952059521595225952359524595255952659527595285952959530595315953259533595345953559536595375953859539595405954159542595435954459545595465954759548595495955059551595525955359554595555955659557595585955959560595615956259563595645956559566595675956859569595705957159572595735957459575595765957759578595795958059581595825958359584595855958659587595885958959590595915959259593595945959559596595975959859599596005960159602596035960459605596065960759608596095961059611596125961359614596155961659617596185961959620596215962259623596245962559626596275962859629596305963159632596335963459635596365963759638596395964059641596425964359644596455964659647596485964959650596515965259653596545965559656596575965859659596605966159662596635966459665596665966759668596695967059671596725967359674596755967659677596785967959680596815968259683596845968559686596875968859689596905969159692596935969459695596965969759698596995970059701597025970359704597055970659707597085970959710597115971259713597145971559716597175971859719597205972159722597235972459725597265972759728597295973059731597325973359734597355973659737597385973959740597415974259743597445974559746597475974859749597505975159752597535975459755597565975759758597595976059761597625976359764597655976659767597685976959770597715977259773597745977559776597775977859779597805978159782597835978459785597865978759788597895979059791597925979359794597955979659797597985979959800598015980259803598045980559806598075980859809598105981159812598135981459815598165981759818598195982059821598225982359824598255982659827598285982959830598315983259833598345983559836598375983859839598405984159842598435984459845598465984759848598495985059851598525985359854598555985659857598585985959860598615986259863598645986559866598675986859869598705987159872598735987459875598765987759878598795988059881598825988359884598855988659887598885988959890598915989259893598945989559896598975989859899599005990159902599035990459905599065990759908599095991059911599125991359914599155991659917599185991959920599215992259923599245992559926599275992859929599305993159932599335993459935599365993759938599395994059941599425994359944599455994659947599485994959950599515995259953599545995559956599575995859959599605996159962599635996459965599665996759968599695997059971599725997359974599755997659977599785997959980599815998259983599845998559986599875998859989599905999159992599935999459995599965999759998599996000060001600026000360004600056000660007600086000960010600116001260013600146001560016600176001860019600206002160022600236002460025600266002760028600296003060031600326003360034600356003660037600386003960040600416004260043600446004560046600476004860049600506005160052600536005460055600566005760058600596006060061600626006360064600656006660067600686006960070600716007260073600746007560076600776007860079600806008160082600836008460085600866008760088600896009060091600926009360094600956009660097600986009960100601016010260103601046010560106601076010860109601106011160112601136011460115601166011760118601196012060121601226012360124601256012660127601286012960130601316013260133601346013560136601376013860139601406014160142601436014460145601466014760148601496015060151601526015360154601556015660157601586015960160601616016260163601646016560166601676016860169601706017160172601736017460175601766017760178601796018060181601826018360184601856018660187601886018960190601916019260193601946019560196601976019860199602006020160202602036020460205602066020760208602096021060211602126021360214602156021660217602186021960220602216022260223602246022560226602276022860229602306023160232602336023460235602366023760238602396024060241602426024360244602456024660247602486024960250602516025260253602546025560256602576025860259602606026160262602636026460265602666026760268602696027060271602726027360274602756027660277602786027960280602816028260283602846028560286602876028860289602906029160292602936029460295602966029760298602996030060301603026030360304603056030660307603086030960310603116031260313603146031560316603176031860319603206032160322603236032460325603266032760328603296033060331603326033360334603356033660337603386033960340603416034260343603446034560346603476034860349603506035160352603536035460355603566035760358603596036060361603626036360364603656036660367603686036960370603716037260373603746037560376603776037860379603806038160382603836038460385603866038760388603896039060391603926039360394603956039660397603986039960400604016040260403604046040560406604076040860409604106041160412604136041460415604166041760418604196042060421604226042360424604256042660427604286042960430604316043260433604346043560436604376043860439604406044160442604436044460445604466044760448604496045060451604526045360454604556045660457604586045960460604616046260463604646046560466604676046860469604706047160472604736047460475604766047760478604796048060481604826048360484604856048660487604886048960490604916049260493604946049560496604976049860499605006050160502605036050460505605066050760508605096051060511605126051360514605156051660517605186051960520605216052260523605246052560526605276052860529605306053160532605336053460535605366053760538605396054060541605426054360544605456054660547605486054960550605516055260553605546055560556605576055860559605606056160562605636056460565605666056760568605696057060571605726057360574605756057660577605786057960580605816058260583605846058560586605876058860589605906059160592605936059460595605966059760598605996060060601606026060360604606056060660607606086060960610606116061260613606146061560616606176061860619606206062160622606236062460625606266062760628606296063060631606326063360634606356063660637606386063960640606416064260643606446064560646606476064860649606506065160652606536065460655606566065760658606596066060661606626066360664606656066660667606686066960670606716067260673606746067560676606776067860679606806068160682606836068460685606866068760688606896069060691606926069360694606956069660697606986069960700607016070260703607046070560706607076070860709607106071160712607136071460715607166071760718607196072060721607226072360724607256072660727607286072960730607316073260733607346073560736607376073860739607406074160742607436074460745607466074760748607496075060751607526075360754607556075660757607586075960760607616076260763607646076560766607676076860769607706077160772607736077460775607766077760778607796078060781607826078360784607856078660787607886078960790607916079260793607946079560796607976079860799608006080160802608036080460805608066080760808608096081060811608126081360814608156081660817608186081960820608216082260823608246082560826608276082860829608306083160832608336083460835608366083760838608396084060841608426084360844608456084660847608486084960850608516085260853608546085560856608576085860859608606086160862608636086460865608666086760868608696087060871608726087360874608756087660877608786087960880608816088260883608846088560886608876088860889608906089160892608936089460895608966089760898608996090060901609026090360904609056090660907609086090960910609116091260913609146091560916609176091860919609206092160922609236092460925609266092760928609296093060931609326093360934609356093660937609386093960940609416094260943609446094560946609476094860949609506095160952609536095460955609566095760958609596096060961609626096360964609656096660967609686096960970609716097260973609746097560976609776097860979609806098160982609836098460985609866098760988609896099060991609926099360994609956099660997609986099961000610016100261003610046100561006610076100861009610106101161012610136101461015610166101761018610196102061021610226102361024610256102661027610286102961030610316103261033610346103561036610376103861039610406104161042610436104461045610466104761048610496105061051610526105361054610556105661057610586105961060610616106261063610646106561066610676106861069610706107161072610736107461075610766107761078610796108061081610826108361084610856108661087610886108961090610916109261093610946109561096610976109861099611006110161102611036110461105611066110761108611096111061111611126111361114611156111661117611186111961120611216112261123611246112561126611276112861129611306113161132611336113461135611366113761138611396114061141611426114361144611456114661147611486114961150611516115261153611546115561156611576115861159611606116161162611636116461165611666116761168611696117061171611726117361174611756117661177611786117961180611816118261183611846118561186611876118861189611906119161192611936119461195611966119761198611996120061201612026120361204612056120661207612086120961210612116121261213612146121561216612176121861219612206122161222612236122461225612266122761228612296123061231612326123361234612356123661237612386123961240612416124261243612446124561246612476124861249612506125161252612536125461255612566125761258612596126061261612626126361264612656126661267612686126961270612716127261273612746127561276612776127861279612806128161282612836128461285612866128761288612896129061291612926129361294612956129661297612986129961300613016130261303613046130561306613076130861309613106131161312613136131461315613166131761318613196132061321613226132361324613256132661327613286132961330613316133261333613346133561336613376133861339613406134161342613436134461345613466134761348613496135061351613526135361354613556135661357613586135961360613616136261363613646136561366613676136861369613706137161372613736137461375613766137761378613796138061381613826138361384613856138661387613886138961390613916139261393613946139561396613976139861399614006140161402614036140461405614066140761408614096141061411614126141361414614156141661417614186141961420614216142261423614246142561426614276142861429614306143161432614336143461435614366143761438614396144061441614426144361444614456144661447614486144961450614516145261453614546145561456614576145861459614606146161462614636146461465614666146761468614696147061471614726147361474614756147661477614786147961480614816148261483614846148561486614876148861489614906149161492614936149461495614966149761498614996150061501615026150361504615056150661507615086150961510615116151261513615146151561516615176151861519615206152161522615236152461525615266152761528615296153061531615326153361534615356153661537615386153961540615416154261543615446154561546615476154861549615506155161552615536155461555615566155761558615596156061561615626156361564615656156661567615686156961570615716157261573615746157561576615776157861579615806158161582615836158461585615866158761588615896159061591615926159361594615956159661597615986159961600616016160261603616046160561606616076160861609616106161161612616136161461615616166161761618616196162061621616226162361624616256162661627616286162961630616316163261633616346163561636616376163861639616406164161642616436164461645616466164761648616496165061651616526165361654616556165661657616586165961660616616166261663616646166561666616676166861669616706167161672616736167461675616766167761678616796168061681616826168361684616856168661687616886168961690616916169261693616946169561696616976169861699617006170161702617036170461705617066170761708617096171061711617126171361714617156171661717617186171961720617216172261723617246172561726617276172861729617306173161732617336173461735617366173761738617396174061741617426174361744617456174661747617486174961750617516175261753617546175561756617576175861759617606176161762617636176461765617666176761768617696177061771617726177361774617756177661777617786177961780617816178261783617846178561786617876178861789617906179161792617936179461795617966179761798617996180061801618026180361804618056180661807618086180961810618116181261813618146181561816618176181861819618206182161822618236182461825618266182761828618296183061831618326183361834618356183661837618386183961840618416184261843618446184561846618476184861849618506185161852618536185461855618566185761858618596186061861618626186361864618656186661867618686186961870618716187261873618746187561876618776187861879618806188161882618836188461885618866188761888618896189061891618926189361894618956189661897618986189961900619016190261903619046190561906619076190861909619106191161912619136191461915619166191761918619196192061921619226192361924619256192661927619286192961930619316193261933619346193561936619376193861939619406194161942619436194461945619466194761948619496195061951619526195361954619556195661957619586195961960619616196261963619646196561966619676196861969619706197161972619736197461975619766197761978619796198061981619826198361984619856198661987619886198961990619916199261993619946199561996619976199861999620006200162002620036200462005620066200762008620096201062011620126201362014620156201662017620186201962020620216202262023620246202562026620276202862029620306203162032620336203462035620366203762038620396204062041620426204362044620456204662047620486204962050620516205262053620546205562056620576205862059620606206162062620636206462065620666206762068620696207062071620726207362074620756207662077620786207962080620816208262083620846208562086620876208862089620906209162092620936209462095620966209762098620996210062101621026210362104621056210662107621086210962110621116211262113621146211562116621176211862119621206212162122621236212462125621266212762128621296213062131621326213362134621356213662137621386213962140621416214262143621446214562146621476214862149621506215162152621536215462155621566215762158621596216062161621626216362164621656216662167621686216962170621716217262173621746217562176621776217862179621806218162182621836218462185621866218762188621896219062191621926219362194621956219662197621986219962200622016220262203622046220562206622076220862209622106221162212622136221462215622166221762218622196222062221622226222362224622256222662227622286222962230622316223262233622346223562236622376223862239622406224162242622436224462245622466224762248622496225062251622526225362254622556225662257622586225962260622616226262263622646226562266622676226862269622706227162272622736227462275622766227762278622796228062281622826228362284622856228662287622886228962290622916229262293622946229562296622976229862299623006230162302623036230462305623066230762308623096231062311623126231362314623156231662317623186231962320623216232262323623246232562326623276232862329623306233162332623336233462335623366233762338623396234062341623426234362344623456234662347623486234962350623516235262353623546235562356623576235862359623606236162362623636236462365623666236762368623696237062371623726237362374623756237662377623786237962380623816238262383623846238562386623876238862389623906239162392623936239462395623966239762398623996240062401624026240362404624056240662407624086240962410624116241262413624146241562416624176241862419624206242162422624236242462425624266242762428624296243062431624326243362434624356243662437624386243962440624416244262443624446244562446624476244862449624506245162452624536245462455624566245762458624596246062461624626246362464624656246662467624686246962470624716247262473624746247562476624776247862479624806248162482624836248462485624866248762488624896249062491624926249362494624956249662497624986249962500625016250262503625046250562506625076250862509625106251162512625136251462515625166251762518625196252062521625226252362524625256252662527625286252962530625316253262533625346253562536625376253862539625406254162542625436254462545625466254762548625496255062551625526255362554625556255662557625586255962560625616256262563625646256562566625676256862569625706257162572625736257462575625766257762578625796258062581625826258362584625856258662587625886258962590625916259262593625946259562596625976259862599626006260162602626036260462605626066260762608626096261062611626126261362614626156261662617626186261962620626216262262623626246262562626626276262862629626306263162632626336263462635626366263762638626396264062641626426264362644626456264662647626486264962650626516265262653626546265562656626576265862659626606266162662626636266462665626666266762668626696267062671626726267362674626756267662677626786267962680626816268262683626846268562686626876268862689626906269162692626936269462695626966269762698626996270062701627026270362704627056270662707627086270962710627116271262713627146271562716627176271862719627206272162722627236272462725627266272762728627296273062731627326273362734627356273662737627386273962740627416274262743627446274562746627476274862749627506275162752627536275462755627566275762758627596276062761627626276362764627656276662767627686276962770627716277262773627746277562776627776277862779627806278162782627836278462785627866278762788627896279062791627926279362794627956279662797627986279962800628016280262803628046280562806628076280862809628106281162812628136281462815628166281762818628196282062821628226282362824628256282662827628286282962830628316283262833628346283562836628376283862839628406284162842628436284462845628466284762848628496285062851628526285362854628556285662857628586285962860628616286262863628646286562866628676286862869628706287162872628736287462875628766287762878628796288062881628826288362884628856288662887628886288962890628916289262893628946289562896628976289862899629006290162902629036290462905629066290762908629096291062911629126291362914629156291662917629186291962920629216292262923629246292562926629276292862929629306293162932629336293462935629366293762938629396294062941629426294362944629456294662947629486294962950629516295262953629546295562956629576295862959629606296162962629636296462965629666296762968629696297062971629726297362974629756297662977629786297962980629816298262983629846298562986629876298862989629906299162992629936299462995629966299762998629996300063001630026300363004630056300663007630086300963010630116301263013630146301563016630176301863019630206302163022630236302463025630266302763028630296303063031630326303363034630356303663037630386303963040630416304263043630446304563046630476304863049630506305163052630536305463055630566305763058630596306063061630626306363064630656306663067630686306963070630716307263073630746307563076630776307863079630806308163082630836308463085630866308763088630896309063091630926309363094630956309663097630986309963100631016310263103631046310563106631076310863109631106311163112631136311463115631166311763118631196312063121631226312363124631256312663127631286312963130631316313263133631346313563136631376313863139631406314163142631436314463145631466314763148631496315063151631526315363154631556315663157631586315963160631616316263163631646316563166631676316863169631706317163172631736317463175631766317763178631796318063181631826318363184631856318663187631886318963190631916319263193631946319563196631976319863199632006320163202632036320463205632066320763208632096321063211632126321363214632156321663217632186321963220632216322263223632246322563226632276322863229632306323163232632336323463235632366323763238632396324063241632426324363244632456324663247632486324963250632516325263253632546325563256632576325863259632606326163262632636326463265632666326763268632696327063271632726327363274632756327663277632786327963280632816328263283632846328563286632876328863289632906329163292632936329463295632966329763298632996330063301633026330363304633056330663307633086330963310633116331263313633146331563316633176331863319633206332163322633236332463325633266332763328633296333063331633326333363334633356333663337633386333963340633416334263343633446334563346633476334863349633506335163352633536335463355633566335763358633596336063361633626336363364633656336663367633686336963370633716337263373633746337563376633776337863379633806338163382633836338463385633866338763388633896339063391633926339363394633956339663397633986339963400634016340263403634046340563406634076340863409634106341163412634136341463415634166341763418634196342063421634226342363424634256342663427634286342963430634316343263433634346343563436634376343863439634406344163442634436344463445634466344763448634496345063451634526345363454634556345663457634586345963460634616346263463634646346563466634676346863469634706347163472634736347463475634766347763478634796348063481634826348363484634856348663487634886348963490634916349263493634946349563496634976349863499635006350163502635036350463505635066350763508635096351063511635126351363514635156351663517635186351963520635216352263523635246352563526635276352863529635306353163532635336353463535635366353763538635396354063541635426354363544635456354663547635486354963550635516355263553635546355563556635576355863559635606356163562635636356463565635666356763568635696357063571635726357363574635756357663577635786357963580635816358263583635846358563586635876358863589635906359163592635936359463595635966359763598635996360063601636026360363604636056360663607636086360963610636116361263613636146361563616636176361863619636206362163622636236362463625636266362763628636296363063631636326363363634636356363663637636386363963640636416364263643636446364563646636476364863649636506365163652636536365463655636566365763658636596366063661636626366363664636656366663667636686366963670636716367263673636746367563676636776367863679636806368163682636836368463685636866368763688636896369063691636926369363694636956369663697636986369963700637016370263703637046370563706637076370863709637106371163712637136371463715637166371763718637196372063721637226372363724637256372663727637286372963730637316373263733637346373563736637376373863739637406374163742637436374463745637466374763748637496375063751637526375363754637556375663757637586375963760637616376263763637646376563766637676376863769637706377163772637736377463775637766377763778637796378063781637826378363784637856378663787637886378963790637916379263793637946379563796637976379863799638006380163802638036380463805638066380763808638096381063811638126381363814638156381663817638186381963820638216382263823638246382563826638276382863829638306383163832638336383463835638366383763838638396384063841638426384363844638456384663847638486384963850638516385263853638546385563856638576385863859638606386163862638636386463865638666386763868638696387063871638726387363874638756387663877638786387963880638816388263883638846388563886638876388863889638906389163892638936389463895638966389763898638996390063901639026390363904639056390663907639086390963910639116391263913639146391563916639176391863919639206392163922639236392463925639266392763928639296393063931639326393363934639356393663937639386393963940639416394263943639446394563946639476394863949639506395163952639536395463955639566395763958639596396063961639626396363964639656396663967639686396963970639716397263973639746397563976639776397863979639806398163982639836398463985639866398763988639896399063991639926399363994639956399663997639986399964000640016400264003640046400564006640076400864009640106401164012640136401464015640166401764018640196402064021640226402364024640256402664027640286402964030640316403264033640346403564036640376403864039640406404164042640436404464045640466404764048640496405064051640526405364054640556405664057640586405964060640616406264063640646406564066640676406864069640706407164072640736407464075640766407764078640796408064081640826408364084640856408664087640886408964090640916409264093640946409564096640976409864099641006410164102641036410464105641066410764108641096411064111641126411364114641156411664117641186411964120641216412264123641246412564126641276412864129641306413164132641336413464135641366413764138641396414064141641426414364144641456414664147641486414964150641516415264153641546415564156641576415864159641606416164162641636416464165641666416764168641696417064171641726417364174641756417664177641786417964180641816418264183641846418564186641876418864189641906419164192641936419464195641966419764198641996420064201642026420364204642056420664207642086420964210642116421264213642146421564216642176421864219642206422164222642236422464225642266422764228642296423064231642326423364234642356423664237642386423964240642416424264243642446424564246642476424864249642506425164252642536425464255642566425764258642596426064261642626426364264642656426664267642686426964270642716427264273642746427564276642776427864279642806428164282642836428464285642866428764288642896429064291642926429364294642956429664297642986429964300643016430264303643046430564306643076430864309643106431164312643136431464315643166431764318643196432064321643226432364324643256432664327643286432964330643316433264333643346433564336643376433864339643406434164342643436434464345643466434764348643496435064351643526435364354643556435664357643586435964360643616436264363643646436564366643676436864369643706437164372643736437464375643766437764378643796438064381643826438364384643856438664387643886438964390643916439264393643946439564396643976439864399644006440164402644036440464405644066440764408644096441064411644126441364414644156441664417644186441964420644216442264423644246442564426644276442864429644306443164432644336443464435644366443764438644396444064441644426444364444644456444664447644486444964450644516445264453644546445564456644576445864459644606446164462644636446464465644666446764468644696447064471644726447364474644756447664477644786447964480644816448264483644846448564486644876448864489644906449164492644936449464495644966449764498644996450064501645026450364504645056450664507645086450964510645116451264513645146451564516645176451864519645206452164522645236452464525645266452764528645296453064531645326453364534645356453664537645386453964540645416454264543645446454564546645476454864549645506455164552645536455464555645566455764558645596456064561645626456364564645656456664567645686456964570645716457264573645746457564576645776457864579645806458164582645836458464585645866458764588645896459064591645926459364594645956459664597645986459964600646016460264603646046460564606646076460864609646106461164612646136461464615646166461764618646196462064621646226462364624646256462664627646286462964630646316463264633646346463564636646376463864639646406464164642646436464464645646466464764648646496465064651646526465364654646556465664657646586465964660646616466264663646646466564666646676466864669646706467164672646736467464675646766467764678646796468064681646826468364684646856468664687646886468964690646916469264693646946469564696646976469864699647006470164702647036470464705647066470764708647096471064711647126471364714647156471664717647186471964720647216472264723647246472564726647276472864729647306473164732647336473464735647366473764738647396474064741647426474364744647456474664747647486474964750647516475264753647546475564756647576475864759647606476164762647636476464765647666476764768647696477064771647726477364774647756477664777647786477964780647816478264783647846478564786647876478864789647906479164792647936479464795647966479764798647996480064801648026480364804648056480664807648086480964810648116481264813648146481564816648176481864819648206482164822648236482464825648266482764828648296483064831648326483364834648356483664837648386483964840648416484264843648446484564846648476484864849648506485164852648536485464855648566485764858648596486064861648626486364864648656486664867648686486964870648716487264873648746487564876648776487864879648806488164882648836488464885648866488764888648896489064891648926489364894648956489664897648986489964900649016490264903649046490564906649076490864909649106491164912649136491464915649166491764918649196492064921649226492364924649256492664927649286492964930649316493264933649346493564936649376493864939649406494164942649436494464945649466494764948649496495064951649526495364954649556495664957649586495964960649616496264963649646496564966649676496864969649706497164972649736497464975649766497764978649796498064981649826498364984649856498664987649886498964990649916499264993649946499564996649976499864999650006500165002650036500465005650066500765008650096501065011650126501365014650156501665017650186501965020650216502265023650246502565026650276502865029650306503165032650336503465035650366503765038650396504065041650426504365044650456504665047650486504965050650516505265053650546505565056650576505865059650606506165062650636506465065650666506765068650696507065071650726507365074650756507665077650786507965080650816508265083650846508565086650876508865089650906509165092650936509465095650966509765098650996510065101651026510365104651056510665107651086510965110651116511265113651146511565116651176511865119651206512165122651236512465125651266512765128651296513065131651326513365134651356513665137651386513965140651416514265143651446514565146651476514865149651506515165152651536515465155651566515765158651596516065161651626516365164651656516665167651686516965170651716517265173651746517565176651776517865179651806518165182651836518465185651866518765188651896519065191651926519365194651956519665197651986519965200652016520265203652046520565206652076520865209652106521165212652136521465215652166521765218652196522065221652226522365224652256522665227652286522965230652316523265233652346523565236652376523865239652406524165242652436524465245652466524765248652496525065251652526525365254652556525665257652586525965260652616526265263652646526565266652676526865269652706527165272652736527465275652766527765278652796528065281652826528365284652856528665287652886528965290652916529265293652946529565296652976529865299653006530165302653036530465305653066530765308653096531065311653126531365314653156531665317653186531965320653216532265323653246532565326653276532865329653306533165332653336533465335653366533765338653396534065341653426534365344653456534665347653486534965350653516535265353653546535565356653576535865359653606536165362653636536465365653666536765368653696537065371653726537365374653756537665377653786537965380653816538265383653846538565386653876538865389653906539165392653936539465395653966539765398653996540065401654026540365404654056540665407654086540965410654116541265413654146541565416654176541865419654206542165422654236542465425654266542765428654296543065431654326543365434654356543665437654386543965440654416544265443654446544565446654476544865449654506545165452654536545465455654566545765458654596546065461654626546365464654656546665467654686546965470654716547265473654746547565476654776547865479654806548165482654836548465485654866548765488654896549065491654926549365494654956549665497654986549965500655016550265503655046550565506655076550865509655106551165512655136551465515655166551765518655196552065521655226552365524655256552665527655286552965530655316553265533655346553565536655376553865539655406554165542655436554465545655466554765548655496555065551655526555365554655556555665557655586555965560655616556265563655646556565566655676556865569655706557165572655736557465575655766557765578655796558065581655826558365584655856558665587655886558965590655916559265593655946559565596655976559865599656006560165602656036560465605656066560765608656096561065611656126561365614656156561665617656186561965620656216562265623656246562565626656276562865629656306563165632656336563465635656366563765638656396564065641656426564365644656456564665647656486564965650656516565265653656546565565656656576565865659656606566165662656636566465665656666566765668656696567065671656726567365674656756567665677656786567965680656816568265683656846568565686656876568865689656906569165692656936569465695656966569765698656996570065701657026570365704657056570665707657086570965710657116571265713657146571565716657176571865719657206572165722657236572465725657266572765728657296573065731657326573365734657356573665737657386573965740657416574265743657446574565746657476574865749657506575165752657536575465755657566575765758657596576065761657626576365764657656576665767657686576965770657716577265773657746577565776657776577865779657806578165782657836578465785657866578765788657896579065791657926579365794657956579665797657986579965800658016580265803658046580565806658076580865809658106581165812658136581465815658166581765818658196582065821658226582365824658256582665827658286582965830658316583265833658346583565836658376583865839658406584165842658436584465845658466584765848658496585065851658526585365854658556585665857658586585965860658616586265863658646586565866658676586865869658706587165872658736587465875658766587765878658796588065881658826588365884658856588665887658886588965890658916589265893658946589565896658976589865899659006590165902659036590465905659066590765908659096591065911659126591365914659156591665917659186591965920659216592265923659246592565926659276592865929659306593165932659336593465935659366593765938659396594065941659426594365944659456594665947659486594965950659516595265953659546595565956659576595865959659606596165962659636596465965659666596765968659696597065971659726597365974659756597665977659786597965980659816598265983659846598565986659876598865989659906599165992659936599465995659966599765998659996600066001660026600366004660056600666007660086600966010660116601266013660146601566016660176601866019660206602166022660236602466025660266602766028660296603066031660326603366034660356603666037660386603966040660416604266043660446604566046660476604866049660506605166052660536605466055660566605766058660596606066061660626606366064660656606666067660686606966070660716607266073660746607566076660776607866079660806608166082660836608466085660866608766088660896609066091660926609366094660956609666097660986609966100661016610266103661046610566106661076610866109661106611166112661136611466115661166611766118661196612066121661226612366124661256612666127661286612966130661316613266133661346613566136661376613866139661406614166142661436614466145661466614766148661496615066151661526615366154661556615666157661586615966160661616616266163661646616566166661676616866169661706617166172661736617466175661766617766178661796618066181661826618366184661856618666187661886618966190661916619266193661946619566196661976619866199662006620166202662036620466205662066620766208662096621066211662126621366214662156621666217662186621966220662216622266223662246622566226662276622866229662306623166232662336623466235662366623766238662396624066241662426624366244662456624666247662486624966250662516625266253662546625566256662576625866259662606626166262662636626466265662666626766268662696627066271662726627366274662756627666277662786627966280662816628266283662846628566286662876628866289662906629166292662936629466295662966629766298662996630066301663026630366304663056630666307663086630966310663116631266313663146631566316663176631866319663206632166322663236632466325663266632766328663296633066331663326633366334663356633666337663386633966340663416634266343663446634566346663476634866349663506635166352663536635466355663566635766358663596636066361663626636366364663656636666367663686636966370663716637266373663746637566376663776637866379663806638166382663836638466385663866638766388663896639066391663926639366394663956639666397663986639966400664016640266403664046640566406664076640866409664106641166412664136641466415664166641766418664196642066421664226642366424664256642666427664286642966430664316643266433664346643566436664376643866439664406644166442664436644466445664466644766448664496645066451664526645366454664556645666457664586645966460664616646266463664646646566466664676646866469664706647166472664736647466475664766647766478664796648066481664826648366484664856648666487664886648966490664916649266493664946649566496664976649866499665006650166502665036650466505665066650766508665096651066511665126651366514665156651666517665186651966520665216652266523665246652566526665276652866529665306653166532665336653466535665366653766538665396654066541665426654366544665456654666547665486654966550665516655266553665546655566556665576655866559665606656166562665636656466565665666656766568665696657066571665726657366574665756657666577665786657966580665816658266583665846658566586665876658866589665906659166592665936659466595665966659766598665996660066601666026660366604666056660666607666086660966610666116661266613666146661566616666176661866619666206662166622666236662466625666266662766628666296663066631666326663366634666356663666637666386663966640666416664266643666446664566646666476664866649666506665166652666536665466655666566665766658666596666066661666626666366664666656666666667666686666966670666716667266673666746667566676666776667866679666806668166682666836668466685666866668766688666896669066691666926669366694666956669666697666986669966700667016670266703667046670566706667076670866709667106671166712667136671466715667166671766718667196672066721667226672366724667256672666727667286672966730667316673266733667346673566736667376673866739667406674166742667436674466745667466674766748667496675066751667526675366754667556675666757667586675966760667616676266763667646676566766667676676866769667706677166772667736677466775667766677766778667796678066781667826678366784667856678666787667886678966790667916679266793667946679566796667976679866799668006680166802668036680466805668066680766808668096681066811668126681366814668156681666817668186681966820668216682266823668246682566826668276682866829668306683166832668336683466835668366683766838668396684066841668426684366844668456684666847668486684966850668516685266853668546685566856668576685866859668606686166862668636686466865668666686766868668696687066871668726687366874668756687666877668786687966880668816688266883668846688566886668876688866889668906689166892668936689466895668966689766898668996690066901669026690366904669056690666907669086690966910669116691266913669146691566916669176691866919669206692166922669236692466925669266692766928669296693066931669326693366934669356693666937669386693966940669416694266943669446694566946669476694866949669506695166952669536695466955669566695766958669596696066961669626696366964669656696666967669686696966970669716697266973669746697566976669776697866979669806698166982669836698466985669866698766988669896699066991669926699366994669956699666997669986699967000670016700267003670046700567006670076700867009670106701167012670136701467015670166701767018670196702067021670226702367024670256702667027670286702967030670316703267033670346703567036670376703867039670406704167042670436704467045670466704767048670496705067051670526705367054670556705667057670586705967060670616706267063670646706567066670676706867069670706707167072670736707467075670766707767078670796708067081670826708367084670856708667087670886708967090670916709267093670946709567096670976709867099671006710167102671036710467105671066710767108671096711067111671126711367114671156711667117671186711967120671216712267123671246712567126671276712867129671306713167132671336713467135671366713767138671396714067141671426714367144671456714667147671486714967150671516715267153671546715567156671576715867159671606716167162671636716467165671666716767168671696717067171671726717367174671756717667177671786717967180671816718267183671846718567186671876718867189671906719167192671936719467195671966719767198671996720067201672026720367204672056720667207672086720967210672116721267213672146721567216672176721867219672206722167222672236722467225672266722767228672296723067231672326723367234672356723667237672386723967240672416724267243672446724567246672476724867249672506725167252672536725467255672566725767258672596726067261672626726367264672656726667267672686726967270672716727267273672746727567276672776727867279672806728167282672836728467285672866728767288672896729067291672926729367294672956729667297672986729967300673016730267303673046730567306673076730867309673106731167312673136731467315673166731767318673196732067321673226732367324673256732667327673286732967330673316733267333673346733567336673376733867339673406734167342673436734467345673466734767348673496735067351673526735367354673556735667357673586735967360673616736267363673646736567366673676736867369673706737167372673736737467375673766737767378673796738067381673826738367384673856738667387673886738967390673916739267393673946739567396673976739867399674006740167402674036740467405674066740767408674096741067411674126741367414674156741667417674186741967420674216742267423674246742567426674276742867429674306743167432674336743467435674366743767438674396744067441674426744367444674456744667447674486744967450674516745267453674546745567456674576745867459674606746167462674636746467465674666746767468674696747067471674726747367474674756747667477674786747967480674816748267483674846748567486674876748867489674906749167492674936749467495674966749767498674996750067501675026750367504675056750667507675086750967510675116751267513675146751567516675176751867519675206752167522675236752467525675266752767528675296753067531675326753367534675356753667537675386753967540675416754267543675446754567546675476754867549675506755167552675536755467555675566755767558675596756067561675626756367564675656756667567675686756967570675716757267573675746757567576675776757867579675806758167582675836758467585675866758767588675896759067591675926759367594675956759667597675986759967600676016760267603676046760567606676076760867609676106761167612676136761467615676166761767618676196762067621676226762367624676256762667627676286762967630676316763267633676346763567636676376763867639676406764167642676436764467645676466764767648676496765067651676526765367654676556765667657676586765967660676616766267663676646766567666676676766867669676706767167672676736767467675676766767767678676796768067681676826768367684676856768667687676886768967690676916769267693676946769567696676976769867699677006770167702677036770467705677066770767708677096771067711677126771367714677156771667717677186771967720677216772267723677246772567726677276772867729677306773167732677336773467735677366773767738677396774067741677426774367744677456774667747677486774967750677516775267753677546775567756677576775867759677606776167762677636776467765677666776767768677696777067771677726777367774677756777667777677786777967780677816778267783677846778567786677876778867789677906779167792677936779467795677966779767798677996780067801678026780367804678056780667807678086780967810678116781267813678146781567816678176781867819678206782167822678236782467825678266782767828678296783067831678326783367834678356783667837678386783967840678416784267843678446784567846678476784867849678506785167852678536785467855678566785767858678596786067861678626786367864678656786667867678686786967870678716787267873678746787567876678776787867879678806788167882678836788467885678866788767888678896789067891678926789367894678956789667897678986789967900679016790267903679046790567906679076790867909679106791167912679136791467915679166791767918679196792067921679226792367924679256792667927679286792967930679316793267933679346793567936679376793867939679406794167942679436794467945679466794767948679496795067951679526795367954679556795667957679586795967960679616796267963679646796567966679676796867969679706797167972679736797467975679766797767978679796798067981679826798367984679856798667987679886798967990679916799267993679946799567996679976799867999680006800168002680036800468005680066800768008680096801068011680126801368014680156801668017680186801968020680216802268023680246802568026680276802868029680306803168032680336803468035680366803768038680396804068041680426804368044680456804668047680486804968050680516805268053680546805568056680576805868059680606806168062680636806468065680666806768068680696807068071680726807368074680756807668077680786807968080680816808268083680846808568086680876808868089680906809168092680936809468095680966809768098680996810068101681026810368104681056810668107681086810968110681116811268113681146811568116681176811868119681206812168122681236812468125681266812768128681296813068131681326813368134681356813668137681386813968140681416814268143681446814568146681476814868149681506815168152681536815468155681566815768158681596816068161681626816368164681656816668167681686816968170681716817268173681746817568176681776817868179681806818168182681836818468185681866818768188681896819068191681926819368194681956819668197681986819968200682016820268203682046820568206682076820868209682106821168212682136821468215682166821768218682196822068221682226822368224682256822668227682286822968230682316823268233682346823568236682376823868239682406824168242682436824468245682466824768248682496825068251682526825368254682556825668257682586825968260682616826268263682646826568266682676826868269682706827168272682736827468275682766827768278682796828068281682826828368284682856828668287682886828968290682916829268293682946829568296682976829868299683006830168302683036830468305683066830768308683096831068311683126831368314683156831668317683186831968320683216832268323683246832568326683276832868329683306833168332683336833468335683366833768338683396834068341683426834368344683456834668347683486834968350683516835268353683546835568356683576835868359683606836168362683636836468365683666836768368683696837068371683726837368374683756837668377683786837968380683816838268383683846838568386683876838868389683906839168392683936839468395683966839768398683996840068401684026840368404684056840668407684086840968410684116841268413684146841568416684176841868419684206842168422684236842468425684266842768428684296843068431684326843368434684356843668437684386843968440684416844268443684446844568446684476844868449684506845168452684536845468455684566845768458684596846068461684626846368464684656846668467684686846968470684716847268473684746847568476684776847868479684806848168482684836848468485684866848768488684896849068491684926849368494684956849668497684986849968500685016850268503685046850568506685076850868509685106851168512685136851468515685166851768518685196852068521685226852368524685256852668527685286852968530685316853268533685346853568536685376853868539685406854168542685436854468545685466854768548685496855068551685526855368554685556855668557685586855968560685616856268563685646856568566685676856868569685706857168572685736857468575685766857768578685796858068581685826858368584685856858668587685886858968590685916859268593685946859568596685976859868599686006860168602686036860468605686066860768608686096861068611686126861368614686156861668617686186861968620686216862268623686246862568626686276862868629686306863168632686336863468635686366863768638686396864068641686426864368644686456864668647686486864968650686516865268653686546865568656686576865868659686606866168662686636866468665686666866768668686696867068671686726867368674686756867668677686786867968680686816868268683686846868568686686876868868689686906869168692686936869468695686966869768698686996870068701687026870368704687056870668707687086870968710687116871268713687146871568716687176871868719687206872168722687236872468725687266872768728687296873068731687326873368734687356873668737687386873968740687416874268743687446874568746687476874868749687506875168752687536875468755687566875768758687596876068761687626876368764687656876668767687686876968770687716877268773687746877568776687776877868779687806878168782687836878468785687866878768788687896879068791687926879368794687956879668797687986879968800688016880268803688046880568806688076880868809688106881168812688136881468815688166881768818688196882068821688226882368824688256882668827688286882968830688316883268833688346883568836688376883868839688406884168842688436884468845688466884768848688496885068851688526885368854688556885668857688586885968860688616886268863688646886568866688676886868869688706887168872688736887468875688766887768878688796888068881688826888368884688856888668887688886888968890688916889268893688946889568896688976889868899689006890168902689036890468905689066890768908689096891068911689126891368914689156891668917689186891968920689216892268923689246892568926689276892868929689306893168932689336893468935689366893768938689396894068941689426894368944689456894668947689486894968950689516895268953689546895568956689576895868959689606896168962689636896468965689666896768968689696897068971689726897368974689756897668977689786897968980689816898268983689846898568986689876898868989689906899168992689936899468995689966899768998689996900069001690026900369004690056900669007690086900969010690116901269013690146901569016690176901869019690206902169022690236902469025690266902769028690296903069031690326903369034690356903669037690386903969040690416904269043690446904569046690476904869049690506905169052690536905469055690566905769058690596906069061690626906369064690656906669067690686906969070690716907269073690746907569076690776907869079690806908169082690836908469085690866908769088690896909069091690926909369094690956909669097690986909969100691016910269103691046910569106691076910869109691106911169112691136911469115691166911769118691196912069121691226912369124691256912669127691286912969130691316913269133691346913569136691376913869139691406914169142691436914469145691466914769148691496915069151691526915369154691556915669157691586915969160691616916269163691646916569166691676916869169691706917169172691736917469175691766917769178691796918069181691826918369184691856918669187691886918969190691916919269193691946919569196691976919869199692006920169202692036920469205692066920769208692096921069211692126921369214692156921669217692186921969220692216922269223692246922569226692276922869229692306923169232692336923469235692366923769238692396924069241692426924369244692456924669247692486924969250692516925269253692546925569256692576925869259692606926169262692636926469265692666926769268692696927069271692726927369274692756927669277692786927969280692816928269283692846928569286692876928869289692906929169292692936929469295692966929769298692996930069301693026930369304693056930669307693086930969310693116931269313693146931569316693176931869319693206932169322693236932469325693266932769328693296933069331693326933369334693356933669337693386933969340693416934269343693446934569346693476934869349693506935169352693536935469355693566935769358693596936069361693626936369364693656936669367693686936969370693716937269373693746937569376693776937869379693806938169382693836938469385693866938769388693896939069391693926939369394693956939669397693986939969400694016940269403694046940569406694076940869409694106941169412694136941469415694166941769418694196942069421694226942369424694256942669427694286942969430694316943269433694346943569436694376943869439694406944169442694436944469445694466944769448694496945069451694526945369454694556945669457694586945969460694616946269463694646946569466694676946869469694706947169472694736947469475694766947769478694796948069481694826948369484694856948669487694886948969490694916949269493694946949569496694976949869499695006950169502695036950469505695066950769508695096951069511695126951369514695156951669517695186951969520695216952269523695246952569526695276952869529695306953169532695336953469535695366953769538695396954069541695426954369544695456954669547695486954969550695516955269553695546955569556695576955869559695606956169562695636956469565695666956769568695696957069571695726957369574695756957669577695786957969580695816958269583695846958569586695876958869589695906959169592695936959469595695966959769598695996960069601696026960369604696056960669607696086960969610696116961269613696146961569616696176961869619696206962169622696236962469625696266962769628696296963069631696326963369634696356963669637696386963969640696416964269643696446964569646696476964869649696506965169652696536965469655696566965769658696596966069661696626966369664696656966669667696686966969670696716967269673696746967569676696776967869679696806968169682696836968469685696866968769688696896969069691696926969369694696956969669697696986969969700697016970269703697046970569706697076970869709697106971169712697136971469715697166971769718697196972069721697226972369724697256972669727697286972969730697316973269733697346973569736697376973869739697406974169742697436974469745697466974769748697496975069751697526975369754697556975669757697586975969760697616976269763697646976569766697676976869769697706977169772697736977469775697766977769778697796978069781697826978369784697856978669787697886978969790697916979269793697946979569796697976979869799698006980169802698036980469805698066980769808698096981069811698126981369814698156981669817698186981969820698216982269823698246982569826698276982869829698306983169832698336983469835698366983769838698396984069841698426984369844698456984669847698486984969850698516985269853698546985569856698576985869859698606986169862698636986469865698666986769868698696987069871698726987369874698756987669877698786987969880698816988269883698846988569886698876988869889698906989169892698936989469895698966989769898698996990069901699026990369904699056990669907699086990969910699116991269913699146991569916699176991869919699206992169922699236992469925699266992769928699296993069931699326993369934699356993669937699386993969940699416994269943699446994569946699476994869949699506995169952699536995469955699566995769958699596996069961699626996369964699656996669967699686996969970699716997269973699746997569976699776997869979699806998169982699836998469985699866998769988699896999069991699926999369994699956999669997699986999970000700017000270003700047000570006700077000870009700107001170012700137001470015700167001770018700197002070021700227002370024700257002670027700287002970030700317003270033700347003570036700377003870039700407004170042700437004470045700467004770048700497005070051700527005370054700557005670057700587005970060700617006270063700647006570066700677006870069700707007170072700737007470075700767007770078700797008070081700827008370084700857008670087700887008970090700917009270093700947009570096700977009870099701007010170102701037010470105701067010770108701097011070111701127011370114701157011670117701187011970120701217012270123701247012570126701277012870129701307013170132701337013470135701367013770138701397014070141701427014370144701457014670147701487014970150701517015270153701547015570156701577015870159701607016170162701637016470165701667016770168701697017070171701727017370174701757017670177701787017970180701817018270183701847018570186701877018870189701907019170192701937019470195701967019770198701997020070201702027020370204702057020670207702087020970210702117021270213702147021570216702177021870219702207022170222702237022470225702267022770228702297023070231702327023370234702357023670237702387023970240702417024270243702447024570246702477024870249702507025170252702537025470255702567025770258702597026070261702627026370264702657026670267702687026970270702717027270273702747027570276702777027870279702807028170282702837028470285702867028770288702897029070291702927029370294702957029670297702987029970300703017030270303703047030570306703077030870309703107031170312703137031470315703167031770318703197032070321703227032370324703257032670327703287032970330703317033270333703347033570336703377033870339703407034170342703437034470345703467034770348703497035070351703527035370354703557035670357703587035970360703617036270363703647036570366703677036870369703707037170372703737037470375703767037770378703797038070381703827038370384703857038670387703887038970390703917039270393703947039570396703977039870399704007040170402704037040470405704067040770408704097041070411704127041370414704157041670417704187041970420704217042270423704247042570426704277042870429704307043170432704337043470435704367043770438704397044070441704427044370444704457044670447704487044970450704517045270453704547045570456704577045870459704607046170462704637046470465704667046770468704697047070471704727047370474704757047670477704787047970480704817048270483704847048570486704877048870489704907049170492704937049470495704967049770498704997050070501705027050370504705057050670507705087050970510705117051270513705147051570516705177051870519705207052170522705237052470525705267052770528705297053070531705327053370534705357053670537705387053970540705417054270543705447054570546705477054870549705507055170552705537055470555705567055770558705597056070561705627056370564705657056670567705687056970570705717057270573705747057570576705777057870579705807058170582705837058470585705867058770588705897059070591705927059370594705957059670597705987059970600706017060270603706047060570606706077060870609706107061170612706137061470615706167061770618706197062070621706227062370624706257062670627706287062970630706317063270633706347063570636706377063870639706407064170642706437064470645706467064770648706497065070651706527065370654706557065670657706587065970660706617066270663706647066570666706677066870669706707067170672706737067470675706767067770678706797068070681706827068370684706857068670687706887068970690706917069270693706947069570696706977069870699707007070170702707037070470705707067070770708707097071070711707127071370714707157071670717707187071970720707217072270723707247072570726707277072870729707307073170732707337073470735707367073770738707397074070741707427074370744707457074670747707487074970750707517075270753707547075570756707577075870759707607076170762707637076470765707667076770768707697077070771707727077370774707757077670777707787077970780707817078270783707847078570786707877078870789707907079170792707937079470795707967079770798707997080070801708027080370804708057080670807708087080970810708117081270813708147081570816708177081870819708207082170822708237082470825708267082770828708297083070831708327083370834708357083670837708387083970840708417084270843708447084570846708477084870849708507085170852708537085470855708567085770858708597086070861708627086370864708657086670867708687086970870708717087270873708747087570876708777087870879708807088170882708837088470885708867088770888708897089070891708927089370894708957089670897708987089970900709017090270903709047090570906709077090870909709107091170912709137091470915709167091770918709197092070921709227092370924709257092670927709287092970930709317093270933709347093570936709377093870939709407094170942709437094470945709467094770948709497095070951709527095370954709557095670957709587095970960709617096270963709647096570966709677096870969709707097170972709737097470975709767097770978709797098070981709827098370984709857098670987709887098970990709917099270993709947099570996709977099870999710007100171002710037100471005710067100771008710097101071011710127101371014710157101671017710187101971020710217102271023710247102571026710277102871029710307103171032710337103471035710367103771038710397104071041710427104371044710457104671047710487104971050710517105271053710547105571056710577105871059710607106171062710637106471065710667106771068710697107071071710727107371074710757107671077710787107971080710817108271083710847108571086710877108871089710907109171092710937109471095710967109771098710997110071101711027110371104711057110671107711087110971110711117111271113711147111571116711177111871119711207112171122711237112471125711267112771128711297113071131711327113371134711357113671137711387113971140711417114271143711447114571146711477114871149711507115171152711537115471155711567115771158711597116071161711627116371164711657116671167711687116971170711717117271173711747117571176711777117871179711807118171182711837118471185711867118771188711897119071191711927119371194711957119671197711987119971200712017120271203712047120571206712077120871209712107121171212712137121471215712167121771218712197122071221712227122371224712257122671227712287122971230712317123271233712347123571236712377123871239712407124171242712437124471245712467124771248712497125071251712527125371254712557125671257712587125971260712617126271263712647126571266712677126871269712707127171272712737127471275712767127771278712797128071281712827128371284712857128671287712887128971290712917129271293712947129571296712977129871299713007130171302713037130471305713067130771308713097131071311713127131371314713157131671317713187131971320713217132271323713247132571326713277132871329713307133171332713337133471335713367133771338713397134071341713427134371344713457134671347713487134971350713517135271353713547135571356713577135871359713607136171362713637136471365713667136771368713697137071371713727137371374713757137671377713787137971380713817138271383713847138571386713877138871389713907139171392713937139471395713967139771398713997140071401714027140371404714057140671407714087140971410714117141271413714147141571416714177141871419714207142171422714237142471425714267142771428714297143071431714327143371434714357143671437714387143971440714417144271443714447144571446714477144871449714507145171452714537145471455714567145771458714597146071461714627146371464714657146671467714687146971470714717147271473714747147571476714777147871479714807148171482714837148471485714867148771488714897149071491714927149371494714957149671497714987149971500715017150271503715047150571506715077150871509715107151171512715137151471515715167151771518715197152071521715227152371524715257152671527715287152971530715317153271533715347153571536715377153871539715407154171542715437154471545715467154771548715497155071551715527155371554715557155671557715587155971560715617156271563715647156571566715677156871569715707157171572715737157471575715767157771578715797158071581715827158371584715857158671587715887158971590715917159271593715947159571596715977159871599716007160171602716037160471605716067160771608716097161071611716127161371614716157161671617716187161971620716217162271623716247162571626716277162871629716307163171632716337163471635716367163771638716397164071641716427164371644716457164671647716487164971650716517165271653716547165571656716577165871659716607166171662716637166471665716667166771668716697167071671716727167371674716757167671677716787167971680716817168271683716847168571686716877168871689716907169171692716937169471695716967169771698716997170071701717027170371704717057170671707717087170971710717117171271713717147171571716717177171871719717207172171722717237172471725717267172771728717297173071731717327173371734717357173671737717387173971740717417174271743717447174571746717477174871749717507175171752717537175471755717567175771758717597176071761717627176371764717657176671767717687176971770717717177271773717747177571776717777177871779717807178171782717837178471785717867178771788717897179071791717927179371794717957179671797717987179971800718017180271803718047180571806718077180871809718107181171812718137181471815718167181771818718197182071821718227182371824718257182671827718287182971830718317183271833718347183571836718377183871839718407184171842718437184471845718467184771848718497185071851718527185371854718557185671857718587185971860718617186271863718647186571866718677186871869718707187171872718737187471875718767187771878718797188071881718827188371884718857188671887718887188971890718917189271893718947189571896718977189871899719007190171902719037190471905719067190771908719097191071911719127191371914719157191671917719187191971920719217192271923719247192571926719277192871929719307193171932719337193471935719367193771938719397194071941719427194371944719457194671947719487194971950719517195271953719547195571956719577195871959719607196171962719637196471965719667196771968719697197071971719727197371974719757197671977719787197971980719817198271983719847198571986719877198871989719907199171992719937199471995719967199771998719997200072001720027200372004720057200672007720087200972010720117201272013720147201572016720177201872019720207202172022720237202472025720267202772028720297203072031720327203372034720357203672037720387203972040720417204272043720447204572046720477204872049720507205172052720537205472055720567205772058720597206072061720627206372064720657206672067720687206972070720717207272073720747207572076720777207872079720807208172082720837208472085720867208772088720897209072091720927209372094720957209672097720987209972100721017210272103721047210572106721077210872109721107211172112721137211472115721167211772118721197212072121721227212372124721257212672127721287212972130721317213272133721347213572136721377213872139721407214172142721437214472145721467214772148721497215072151721527215372154721557215672157721587215972160721617216272163721647216572166721677216872169721707217172172721737217472175721767217772178721797218072181721827218372184721857218672187721887218972190721917219272193721947219572196721977219872199722007220172202722037220472205722067220772208722097221072211722127221372214722157221672217722187221972220722217222272223722247222572226722277222872229722307223172232722337223472235722367223772238722397224072241722427224372244722457224672247722487224972250722517225272253722547225572256722577225872259722607226172262722637226472265722667226772268722697227072271722727227372274722757227672277722787227972280722817228272283722847228572286722877228872289722907229172292722937229472295722967229772298722997230072301723027230372304723057230672307723087230972310723117231272313723147231572316723177231872319723207232172322723237232472325723267232772328723297233072331723327233372334723357233672337723387233972340723417234272343723447234572346723477234872349723507235172352723537235472355723567235772358723597236072361723627236372364723657236672367723687236972370723717237272373723747237572376723777237872379723807238172382723837238472385723867238772388723897239072391723927239372394723957239672397723987239972400724017240272403724047240572406724077240872409724107241172412724137241472415724167241772418724197242072421724227242372424724257242672427724287242972430724317243272433724347243572436724377243872439724407244172442724437244472445724467244772448724497245072451724527245372454724557245672457724587245972460724617246272463724647246572466724677246872469724707247172472724737247472475724767247772478724797248072481724827248372484724857248672487724887248972490724917249272493724947249572496724977249872499725007250172502725037250472505725067250772508725097251072511725127251372514725157251672517725187251972520725217252272523725247252572526725277252872529725307253172532725337253472535725367253772538725397254072541725427254372544725457254672547725487254972550725517255272553725547255572556725577255872559725607256172562725637256472565725667256772568725697257072571725727257372574725757257672577725787257972580725817258272583725847258572586725877258872589725907259172592725937259472595725967259772598725997260072601726027260372604726057260672607726087260972610726117261272613726147261572616726177261872619726207262172622726237262472625726267262772628726297263072631726327263372634726357263672637726387263972640726417264272643726447264572646726477264872649726507265172652726537265472655726567265772658726597266072661726627266372664726657266672667726687266972670726717267272673726747267572676726777267872679726807268172682726837268472685726867268772688726897269072691726927269372694726957269672697726987269972700727017270272703727047270572706727077270872709727107271172712727137271472715727167271772718727197272072721727227272372724727257272672727727287272972730727317273272733727347273572736727377273872739727407274172742727437274472745727467274772748727497275072751727527275372754727557275672757727587275972760727617276272763727647276572766727677276872769727707277172772727737277472775727767277772778727797278072781727827278372784727857278672787727887278972790727917279272793727947279572796727977279872799728007280172802728037280472805728067280772808728097281072811728127281372814728157281672817728187281972820728217282272823728247282572826728277282872829728307283172832728337283472835728367283772838728397284072841728427284372844728457284672847728487284972850728517285272853728547285572856728577285872859728607286172862728637286472865728667286772868728697287072871728727287372874728757287672877728787287972880728817288272883728847288572886728877288872889728907289172892728937289472895728967289772898728997290072901729027290372904729057290672907729087290972910729117291272913729147291572916729177291872919729207292172922729237292472925729267292772928729297293072931729327293372934729357293672937729387293972940729417294272943729447294572946729477294872949729507295172952729537295472955729567295772958729597296072961729627296372964729657296672967729687296972970729717297272973729747297572976729777297872979729807298172982729837298472985729867298772988729897299072991729927299372994729957299672997729987299973000730017300273003730047300573006730077300873009730107301173012730137301473015730167301773018730197302073021730227302373024730257302673027730287302973030730317303273033730347303573036730377303873039730407304173042730437304473045730467304773048730497305073051730527305373054730557305673057730587305973060730617306273063730647306573066730677306873069730707307173072730737307473075730767307773078730797308073081730827308373084730857308673087730887308973090730917309273093730947309573096730977309873099731007310173102731037310473105731067310773108731097311073111731127311373114731157311673117731187311973120731217312273123731247312573126731277312873129731307313173132731337313473135731367313773138731397314073141731427314373144731457314673147731487314973150731517315273153731547315573156731577315873159731607316173162731637316473165731667316773168731697317073171731727317373174731757317673177731787317973180731817318273183731847318573186731877318873189731907319173192731937319473195731967319773198731997320073201732027320373204732057320673207732087320973210732117321273213732147321573216732177321873219732207322173222732237322473225732267322773228732297323073231732327323373234732357323673237732387323973240732417324273243732447324573246732477324873249732507325173252732537325473255732567325773258732597326073261732627326373264732657326673267732687326973270732717327273273732747327573276732777327873279732807328173282732837328473285732867328773288732897329073291732927329373294732957329673297732987329973300733017330273303733047330573306733077330873309733107331173312733137331473315733167331773318733197332073321733227332373324733257332673327733287332973330733317333273333733347333573336733377333873339733407334173342733437334473345733467334773348733497335073351733527335373354733557335673357733587335973360733617336273363733647336573366733677336873369733707337173372733737337473375733767337773378733797338073381733827338373384733857338673387733887338973390733917339273393733947339573396733977339873399734007340173402734037340473405734067340773408734097341073411734127341373414734157341673417734187341973420734217342273423734247342573426734277342873429734307343173432734337343473435734367343773438734397344073441734427344373444734457344673447734487344973450734517345273453734547345573456734577345873459734607346173462734637346473465734667346773468734697347073471734727347373474734757347673477734787347973480734817348273483734847348573486734877348873489734907349173492734937349473495734967349773498734997350073501735027350373504735057350673507735087350973510735117351273513735147351573516735177351873519735207352173522735237352473525735267352773528735297353073531735327353373534735357353673537735387353973540735417354273543735447354573546735477354873549735507355173552735537355473555735567355773558735597356073561735627356373564735657356673567735687356973570735717357273573735747357573576735777357873579735807358173582735837358473585735867358773588735897359073591735927359373594735957359673597735987359973600736017360273603736047360573606736077360873609736107361173612736137361473615736167361773618736197362073621736227362373624736257362673627736287362973630736317363273633736347363573636736377363873639736407364173642736437364473645736467364773648736497365073651736527365373654736557365673657736587365973660736617366273663736647366573666736677366873669736707367173672736737367473675736767367773678736797368073681736827368373684736857368673687736887368973690736917369273693736947369573696736977369873699737007370173702737037370473705737067370773708737097371073711737127371373714737157371673717737187371973720737217372273723737247372573726737277372873729737307373173732737337373473735737367373773738737397374073741737427374373744737457374673747737487374973750737517375273753737547375573756737577375873759737607376173762737637376473765737667376773768737697377073771737727377373774737757377673777737787377973780737817378273783737847378573786737877378873789737907379173792737937379473795737967379773798737997380073801738027380373804738057380673807738087380973810738117381273813738147381573816738177381873819738207382173822738237382473825738267382773828738297383073831738327383373834738357383673837738387383973840738417384273843738447384573846738477384873849738507385173852738537385473855738567385773858738597386073861738627386373864738657386673867738687386973870738717387273873738747387573876738777387873879738807388173882738837388473885738867388773888738897389073891738927389373894738957389673897738987389973900739017390273903739047390573906739077390873909739107391173912739137391473915739167391773918739197392073921739227392373924739257392673927739287392973930739317393273933739347393573936739377393873939739407394173942739437394473945739467394773948739497395073951739527395373954739557395673957739587395973960739617396273963739647396573966739677396873969739707397173972739737397473975739767397773978739797398073981739827398373984739857398673987739887398973990739917399273993739947399573996739977399873999740007400174002740037400474005740067400774008740097401074011740127401374014740157401674017740187401974020740217402274023740247402574026740277402874029740307403174032740337403474035740367403774038740397404074041740427404374044740457404674047740487404974050740517405274053740547405574056740577405874059740607406174062740637406474065740667406774068740697407074071740727407374074740757407674077740787407974080740817408274083740847408574086740877408874089740907409174092740937409474095740967409774098740997410074101741027410374104741057410674107741087410974110741117411274113741147411574116741177411874119741207412174122741237412474125741267412774128741297413074131741327413374134741357413674137741387413974140741417414274143741447414574146741477414874149741507415174152741537415474155741567415774158741597416074161741627416374164741657416674167741687416974170741717417274173741747417574176741777417874179741807418174182741837418474185741867418774188741897419074191741927419374194741957419674197741987419974200742017420274203742047420574206742077420874209742107421174212742137421474215742167421774218742197422074221742227422374224742257422674227742287422974230742317423274233742347423574236742377423874239742407424174242742437424474245742467424774248742497425074251742527425374254742557425674257742587425974260742617426274263742647426574266742677426874269742707427174272742737427474275742767427774278742797428074281742827428374284742857428674287742887428974290742917429274293742947429574296742977429874299743007430174302743037430474305743067430774308743097431074311743127431374314743157431674317743187431974320743217432274323743247432574326743277432874329743307433174332743337433474335743367433774338743397434074341743427434374344743457434674347743487434974350743517435274353743547435574356743577435874359743607436174362743637436474365743667436774368743697437074371743727437374374743757437674377743787437974380743817438274383743847438574386743877438874389743907439174392743937439474395743967439774398743997440074401744027440374404744057440674407744087440974410744117441274413744147441574416744177441874419744207442174422744237442474425744267442774428744297443074431744327443374434744357443674437744387443974440744417444274443744447444574446744477444874449744507445174452744537445474455744567445774458744597446074461744627446374464744657446674467744687446974470744717447274473744747447574476744777447874479744807448174482744837448474485744867448774488744897449074491744927449374494744957449674497744987449974500745017450274503745047450574506745077450874509745107451174512745137451474515745167451774518745197452074521745227452374524745257452674527745287452974530745317453274533745347453574536745377453874539745407454174542745437454474545745467454774548745497455074551745527455374554745557455674557745587455974560745617456274563745647456574566745677456874569745707457174572745737457474575745767457774578745797458074581745827458374584745857458674587745887458974590745917459274593745947459574596745977459874599746007460174602746037460474605746067460774608746097461074611746127461374614746157461674617746187461974620746217462274623746247462574626746277462874629746307463174632746337463474635746367463774638746397464074641746427464374644746457464674647746487464974650746517465274653746547465574656746577465874659746607466174662746637466474665746667466774668746697467074671746727467374674746757467674677746787467974680746817468274683746847468574686746877468874689746907469174692746937469474695746967469774698746997470074701747027470374704747057470674707747087470974710747117471274713747147471574716747177471874719747207472174722747237472474725747267472774728747297473074731747327473374734747357473674737747387473974740747417474274743747447474574746747477474874749747507475174752747537475474755747567475774758747597476074761747627476374764747657476674767747687476974770747717477274773747747477574776747777477874779747807478174782747837478474785747867478774788747897479074791747927479374794747957479674797747987479974800748017480274803748047480574806748077480874809748107481174812748137481474815748167481774818748197482074821748227482374824748257482674827748287482974830748317483274833748347483574836748377483874839748407484174842748437484474845748467484774848748497485074851748527485374854748557485674857748587485974860748617486274863748647486574866748677486874869748707487174872748737487474875748767487774878748797488074881748827488374884748857488674887748887488974890748917489274893748947489574896748977489874899749007490174902749037490474905749067490774908749097491074911749127491374914749157491674917749187491974920749217492274923749247492574926749277492874929749307493174932749337493474935749367493774938749397494074941749427494374944749457494674947749487494974950749517495274953749547495574956749577495874959749607496174962749637496474965749667496774968749697497074971749727497374974749757497674977749787497974980749817498274983749847498574986749877498874989749907499174992749937499474995749967499774998749997500075001750027500375004750057500675007750087500975010750117501275013750147501575016750177501875019750207502175022750237502475025750267502775028750297503075031750327503375034750357503675037750387503975040750417504275043750447504575046750477504875049750507505175052750537505475055750567505775058750597506075061750627506375064750657506675067750687506975070750717507275073750747507575076750777507875079750807508175082750837508475085750867508775088750897509075091750927509375094750957509675097750987509975100751017510275103751047510575106751077510875109751107511175112751137511475115751167511775118751197512075121751227512375124751257512675127751287512975130751317513275133751347513575136751377513875139751407514175142751437514475145751467514775148751497515075151751527515375154751557515675157751587515975160751617516275163751647516575166751677516875169751707517175172751737517475175751767517775178751797518075181751827518375184751857518675187751887518975190751917519275193751947519575196751977519875199752007520175202752037520475205752067520775208752097521075211752127521375214752157521675217752187521975220752217522275223752247522575226752277522875229752307523175232752337523475235752367523775238752397524075241752427524375244752457524675247752487524975250752517525275253752547525575256752577525875259752607526175262752637526475265752667526775268752697527075271752727527375274752757527675277752787527975280752817528275283752847528575286752877528875289752907529175292752937529475295752967529775298752997530075301753027530375304753057530675307753087530975310753117531275313753147531575316753177531875319753207532175322753237532475325753267532775328753297533075331753327533375334753357533675337753387533975340753417534275343753447534575346753477534875349753507535175352753537535475355753567535775358753597536075361753627536375364753657536675367753687536975370753717537275373753747537575376753777537875379753807538175382753837538475385753867538775388753897539075391753927539375394753957539675397753987539975400754017540275403754047540575406754077540875409754107541175412754137541475415754167541775418754197542075421754227542375424754257542675427754287542975430754317543275433754347543575436754377543875439754407544175442754437544475445754467544775448754497545075451754527545375454754557545675457754587545975460754617546275463754647546575466754677546875469754707547175472754737547475475754767547775478754797548075481754827548375484754857548675487754887548975490754917549275493754947549575496754977549875499755007550175502755037550475505755067550775508755097551075511755127551375514755157551675517755187551975520755217552275523755247552575526755277552875529755307553175532755337553475535755367553775538755397554075541755427554375544755457554675547755487554975550755517555275553755547555575556755577555875559755607556175562755637556475565755667556775568755697557075571755727557375574755757557675577755787557975580755817558275583755847558575586755877558875589755907559175592755937559475595755967559775598755997560075601756027560375604756057560675607756087560975610756117561275613756147561575616756177561875619756207562175622756237562475625756267562775628756297563075631756327563375634756357563675637756387563975640756417564275643756447564575646756477564875649756507565175652756537565475655756567565775658756597566075661756627566375664756657566675667756687566975670756717567275673756747567575676756777567875679756807568175682756837568475685756867568775688756897569075691756927569375694756957569675697756987569975700757017570275703757047570575706757077570875709757107571175712757137571475715757167571775718757197572075721757227572375724757257572675727757287572975730757317573275733757347573575736757377573875739757407574175742757437574475745757467574775748757497575075751757527575375754757557575675757757587575975760757617576275763757647576575766757677576875769757707577175772757737577475775757767577775778757797578075781757827578375784757857578675787757887578975790757917579275793757947579575796757977579875799758007580175802758037580475805758067580775808758097581075811758127581375814758157581675817758187581975820758217582275823758247582575826758277582875829758307583175832758337583475835758367583775838758397584075841758427584375844758457584675847758487584975850758517585275853758547585575856758577585875859758607586175862758637586475865758667586775868758697587075871758727587375874758757587675877758787587975880758817588275883758847588575886758877588875889758907589175892758937589475895758967589775898758997590075901759027590375904759057590675907759087590975910759117591275913759147591575916759177591875919759207592175922759237592475925759267592775928759297593075931759327593375934759357593675937759387593975940759417594275943759447594575946759477594875949759507595175952759537595475955759567595775958759597596075961759627596375964759657596675967759687596975970759717597275973759747597575976759777597875979759807598175982759837598475985759867598775988759897599075991759927599375994759957599675997759987599976000760017600276003760047600576006760077600876009760107601176012760137601476015760167601776018760197602076021760227602376024760257602676027760287602976030760317603276033760347603576036760377603876039760407604176042760437604476045760467604776048760497605076051760527605376054760557605676057760587605976060760617606276063760647606576066760677606876069760707607176072760737607476075760767607776078760797608076081760827608376084760857608676087760887608976090760917609276093760947609576096760977609876099761007610176102761037610476105761067610776108761097611076111761127611376114761157611676117761187611976120761217612276123761247612576126761277612876129761307613176132761337613476135761367613776138761397614076141761427614376144761457614676147761487614976150761517615276153761547615576156761577615876159761607616176162761637616476165761667616776168761697617076171761727617376174761757617676177761787617976180761817618276183761847618576186761877618876189761907619176192761937619476195761967619776198761997620076201762027620376204762057620676207762087620976210762117621276213762147621576216762177621876219762207622176222762237622476225762267622776228762297623076231762327623376234762357623676237762387623976240762417624276243762447624576246762477624876249762507625176252762537625476255762567625776258762597626076261762627626376264762657626676267762687626976270762717627276273762747627576276762777627876279762807628176282762837628476285762867628776288762897629076291762927629376294762957629676297762987629976300763017630276303763047630576306763077630876309763107631176312763137631476315763167631776318763197632076321763227632376324763257632676327763287632976330763317633276333763347633576336763377633876339763407634176342763437634476345763467634776348763497635076351763527635376354763557635676357763587635976360763617636276363763647636576366763677636876369763707637176372763737637476375763767637776378763797638076381763827638376384763857638676387763887638976390763917639276393763947639576396763977639876399764007640176402764037640476405764067640776408764097641076411764127641376414764157641676417764187641976420764217642276423764247642576426764277642876429764307643176432764337643476435764367643776438764397644076441764427644376444764457644676447764487644976450764517645276453764547645576456764577645876459764607646176462764637646476465764667646776468764697647076471764727647376474764757647676477764787647976480764817648276483764847648576486764877648876489764907649176492764937649476495764967649776498764997650076501765027650376504765057650676507765087650976510765117651276513765147651576516765177651876519765207652176522765237652476525765267652776528765297653076531765327653376534765357653676537765387653976540765417654276543765447654576546765477654876549765507655176552765537655476555765567655776558765597656076561765627656376564765657656676567765687656976570765717657276573765747657576576765777657876579765807658176582765837658476585765867658776588765897659076591765927659376594765957659676597765987659976600766017660276603766047660576606766077660876609766107661176612766137661476615766167661776618766197662076621766227662376624766257662676627766287662976630766317663276633766347663576636766377663876639766407664176642766437664476645766467664776648766497665076651766527665376654766557665676657766587665976660766617666276663766647666576666766677666876669766707667176672766737667476675766767667776678766797668076681766827668376684766857668676687766887668976690766917669276693766947669576696766977669876699767007670176702767037670476705767067670776708767097671076711767127671376714767157671676717767187671976720767217672276723767247672576726767277672876729767307673176732767337673476735767367673776738767397674076741767427674376744767457674676747767487674976750767517675276753767547675576756767577675876759767607676176762767637676476765767667676776768767697677076771767727677376774767757677676777767787677976780767817678276783767847678576786767877678876789767907679176792767937679476795767967679776798767997680076801768027680376804768057680676807768087680976810768117681276813768147681576816768177681876819768207682176822768237682476825768267682776828768297683076831768327683376834768357683676837768387683976840768417684276843768447684576846768477684876849768507685176852768537685476855768567685776858768597686076861768627686376864768657686676867768687686976870768717687276873768747687576876768777687876879768807688176882768837688476885768867688776888768897689076891768927689376894768957689676897768987689976900769017690276903769047690576906769077690876909769107691176912769137691476915769167691776918769197692076921769227692376924769257692676927769287692976930769317693276933769347693576936769377693876939769407694176942769437694476945769467694776948769497695076951769527695376954769557695676957769587695976960769617696276963769647696576966769677696876969769707697176972769737697476975769767697776978769797698076981769827698376984769857698676987769887698976990769917699276993769947699576996769977699876999770007700177002770037700477005770067700777008770097701077011770127701377014770157701677017770187701977020770217702277023770247702577026770277702877029770307703177032770337703477035770367703777038770397704077041770427704377044770457704677047770487704977050770517705277053770547705577056770577705877059770607706177062770637706477065770667706777068770697707077071770727707377074770757707677077770787707977080770817708277083770847708577086770877708877089770907709177092770937709477095770967709777098770997710077101771027710377104771057710677107771087710977110771117711277113771147711577116771177711877119771207712177122771237712477125771267712777128771297713077131771327713377134771357713677137771387713977140771417714277143771447714577146771477714877149771507715177152771537715477155771567715777158771597716077161771627716377164771657716677167771687716977170771717717277173771747717577176771777717877179771807718177182771837718477185771867718777188771897719077191771927719377194771957719677197771987719977200772017720277203772047720577206772077720877209772107721177212772137721477215772167721777218772197722077221772227722377224772257722677227772287722977230772317723277233772347723577236772377723877239772407724177242772437724477245772467724777248772497725077251772527725377254772557725677257772587725977260772617726277263772647726577266772677726877269772707727177272772737727477275772767727777278772797728077281772827728377284772857728677287772887728977290772917729277293772947729577296772977729877299773007730177302773037730477305773067730777308773097731077311773127731377314773157731677317773187731977320773217732277323773247732577326773277732877329773307733177332773337733477335773367733777338773397734077341773427734377344773457734677347773487734977350773517735277353773547735577356773577735877359773607736177362773637736477365773667736777368773697737077371773727737377374773757737677377773787737977380773817738277383773847738577386773877738877389773907739177392773937739477395773967739777398773997740077401774027740377404774057740677407774087740977410774117741277413774147741577416774177741877419774207742177422774237742477425774267742777428774297743077431774327743377434774357743677437774387743977440774417744277443774447744577446774477744877449774507745177452774537745477455774567745777458774597746077461774627746377464774657746677467774687746977470774717747277473774747747577476774777747877479774807748177482774837748477485774867748777488774897749077491774927749377494774957749677497774987749977500775017750277503775047750577506775077750877509775107751177512775137751477515775167751777518775197752077521775227752377524775257752677527775287752977530775317753277533775347753577536775377753877539775407754177542775437754477545775467754777548775497755077551775527755377554775557755677557775587755977560775617756277563775647756577566775677756877569775707757177572775737757477575775767757777578775797758077581775827758377584775857758677587775887758977590775917759277593775947759577596775977759877599776007760177602776037760477605776067760777608776097761077611776127761377614776157761677617776187761977620776217762277623776247762577626776277762877629776307763177632776337763477635776367763777638776397764077641776427764377644776457764677647776487764977650776517765277653776547765577656776577765877659776607766177662776637766477665776667766777668776697767077671776727767377674776757767677677776787767977680776817768277683776847768577686776877768877689776907769177692776937769477695776967769777698776997770077701777027770377704777057770677707777087770977710777117771277713777147771577716777177771877719777207772177722777237772477725777267772777728777297773077731777327773377734777357773677737777387773977740777417774277743777447774577746777477774877749777507775177752777537775477755777567775777758777597776077761777627776377764777657776677767777687776977770777717777277773777747777577776777777777877779777807778177782777837778477785777867778777788777897779077791777927779377794777957779677797777987779977800778017780277803778047780577806778077780877809778107781177812778137781477815778167781777818778197782077821778227782377824778257782677827778287782977830778317783277833778347783577836778377783877839778407784177842778437784477845778467784777848778497785077851778527785377854778557785677857778587785977860778617786277863778647786577866778677786877869778707787177872778737787477875778767787777878778797788077881778827788377884778857788677887778887788977890778917789277893778947789577896778977789877899779007790177902779037790477905779067790777908779097791077911779127791377914779157791677917779187791977920779217792277923779247792577926779277792877929779307793177932779337793477935779367793777938779397794077941779427794377944779457794677947779487794977950779517795277953779547795577956779577795877959779607796177962779637796477965779667796777968779697797077971779727797377974779757797677977779787797977980779817798277983779847798577986779877798877989779907799177992779937799477995779967799777998779997800078001780027800378004780057800678007780087800978010780117801278013780147801578016780177801878019780207802178022780237802478025780267802778028780297803078031780327803378034780357803678037780387803978040780417804278043780447804578046780477804878049780507805178052780537805478055780567805778058780597806078061780627806378064780657806678067780687806978070780717807278073780747807578076780777807878079780807808178082780837808478085780867808778088780897809078091780927809378094780957809678097780987809978100781017810278103781047810578106781077810878109781107811178112781137811478115781167811778118781197812078121781227812378124781257812678127781287812978130781317813278133781347813578136781377813878139781407814178142781437814478145781467814778148781497815078151781527815378154781557815678157781587815978160781617816278163781647816578166781677816878169781707817178172781737817478175781767817778178781797818078181781827818378184781857818678187781887818978190781917819278193781947819578196781977819878199782007820178202782037820478205782067820778208782097821078211782127821378214782157821678217782187821978220782217822278223782247822578226782277822878229782307823178232782337823478235782367823778238782397824078241782427824378244782457824678247782487824978250782517825278253782547825578256782577825878259782607826178262782637826478265782667826778268782697827078271782727827378274782757827678277782787827978280782817828278283782847828578286782877828878289782907829178292782937829478295782967829778298782997830078301783027830378304783057830678307783087830978310783117831278313783147831578316783177831878319783207832178322783237832478325783267832778328783297833078331783327833378334783357833678337783387833978340783417834278343783447834578346783477834878349783507835178352783537835478355783567835778358783597836078361783627836378364783657836678367783687836978370783717837278373783747837578376783777837878379783807838178382783837838478385783867838778388783897839078391783927839378394783957839678397783987839978400784017840278403784047840578406784077840878409784107841178412784137841478415784167841778418784197842078421784227842378424784257842678427784287842978430784317843278433784347843578436784377843878439784407844178442784437844478445784467844778448784497845078451784527845378454784557845678457784587845978460784617846278463784647846578466784677846878469784707847178472784737847478475784767847778478784797848078481784827848378484784857848678487784887848978490784917849278493784947849578496784977849878499785007850178502785037850478505785067850778508785097851078511785127851378514785157851678517785187851978520785217852278523785247852578526785277852878529785307853178532785337853478535785367853778538785397854078541785427854378544785457854678547785487854978550785517855278553785547855578556785577855878559785607856178562785637856478565785667856778568785697857078571785727857378574785757857678577785787857978580785817858278583785847858578586785877858878589785907859178592785937859478595785967859778598785997860078601786027860378604786057860678607786087860978610786117861278613786147861578616786177861878619786207862178622786237862478625786267862778628786297863078631786327863378634786357863678637786387863978640786417864278643786447864578646786477864878649786507865178652786537865478655786567865778658786597866078661786627866378664786657866678667786687866978670786717867278673786747867578676786777867878679786807868178682786837868478685786867868778688786897869078691786927869378694786957869678697786987869978700787017870278703787047870578706787077870878709787107871178712787137871478715787167871778718787197872078721787227872378724787257872678727787287872978730787317873278733787347873578736787377873878739787407874178742787437874478745787467874778748787497875078751787527875378754787557875678757787587875978760787617876278763787647876578766787677876878769787707877178772787737877478775787767877778778787797878078781787827878378784787857878678787787887878978790787917879278793787947879578796787977879878799788007880178802788037880478805788067880778808788097881078811788127881378814788157881678817788187881978820788217882278823788247882578826788277882878829788307883178832788337883478835788367883778838788397884078841788427884378844788457884678847788487884978850788517885278853788547885578856788577885878859788607886178862788637886478865788667886778868788697887078871788727887378874788757887678877788787887978880788817888278883788847888578886788877888878889788907889178892788937889478895788967889778898788997890078901789027890378904789057890678907789087890978910789117891278913789147891578916789177891878919789207892178922789237892478925789267892778928789297893078931789327893378934789357893678937789387893978940789417894278943789447894578946789477894878949789507895178952789537895478955789567895778958789597896078961789627896378964789657896678967789687896978970789717897278973789747897578976789777897878979789807898178982789837898478985789867898778988789897899078991789927899378994789957899678997789987899979000790017900279003790047900579006790077900879009790107901179012790137901479015790167901779018790197902079021790227902379024790257902679027790287902979030790317903279033790347903579036790377903879039790407904179042790437904479045790467904779048790497905079051790527905379054790557905679057790587905979060790617906279063790647906579066790677906879069790707907179072790737907479075790767907779078790797908079081790827908379084790857908679087790887908979090790917909279093790947909579096790977909879099791007910179102791037910479105791067910779108791097911079111791127911379114791157911679117791187911979120791217912279123791247912579126791277912879129791307913179132791337913479135791367913779138791397914079141791427914379144791457914679147791487914979150791517915279153791547915579156791577915879159791607916179162791637916479165791667916779168791697917079171791727917379174791757917679177791787917979180791817918279183791847918579186791877918879189791907919179192791937919479195791967919779198791997920079201792027920379204792057920679207792087920979210792117921279213792147921579216792177921879219792207922179222792237922479225792267922779228792297923079231792327923379234792357923679237792387923979240792417924279243792447924579246792477924879249792507925179252792537925479255792567925779258792597926079261792627926379264792657926679267792687926979270792717927279273792747927579276792777927879279792807928179282792837928479285792867928779288792897929079291792927929379294792957929679297792987929979300793017930279303793047930579306793077930879309793107931179312793137931479315793167931779318793197932079321793227932379324793257932679327793287932979330793317933279333793347933579336793377933879339793407934179342793437934479345793467934779348793497935079351793527935379354793557935679357793587935979360793617936279363793647936579366793677936879369793707937179372793737937479375793767937779378793797938079381793827938379384793857938679387793887938979390793917939279393793947939579396793977939879399794007940179402794037940479405794067940779408794097941079411794127941379414794157941679417794187941979420794217942279423794247942579426794277942879429794307943179432794337943479435794367943779438794397944079441794427944379444794457944679447794487944979450794517945279453794547945579456794577945879459794607946179462794637946479465794667946779468794697947079471794727947379474794757947679477794787947979480794817948279483794847948579486794877948879489794907949179492794937949479495794967949779498794997950079501795027950379504795057950679507795087950979510795117951279513795147951579516795177951879519795207952179522795237952479525795267952779528795297953079531795327953379534795357953679537795387953979540795417954279543795447954579546795477954879549795507955179552795537955479555795567955779558795597956079561795627956379564795657956679567795687956979570795717957279573795747957579576795777957879579795807958179582795837958479585795867958779588795897959079591795927959379594795957959679597795987959979600796017960279603796047960579606796077960879609796107961179612796137961479615796167961779618796197962079621796227962379624796257962679627796287962979630796317963279633796347963579636796377963879639796407964179642796437964479645796467964779648796497965079651796527965379654796557965679657796587965979660796617966279663796647966579666796677966879669796707967179672796737967479675796767967779678796797968079681796827968379684796857968679687796887968979690796917969279693796947969579696796977969879699797007970179702797037970479705797067970779708797097971079711797127971379714797157971679717797187971979720797217972279723797247972579726797277972879729797307973179732797337973479735797367973779738797397974079741797427974379744797457974679747797487974979750797517975279753797547975579756797577975879759797607976179762797637976479765797667976779768797697977079771797727977379774797757977679777797787977979780797817978279783797847978579786797877978879789797907979179792797937979479795797967979779798797997980079801798027980379804798057980679807798087980979810798117981279813798147981579816798177981879819798207982179822798237982479825798267982779828798297983079831798327983379834798357983679837798387983979840798417984279843798447984579846798477984879849798507985179852798537985479855798567985779858798597986079861798627986379864798657986679867798687986979870798717987279873798747987579876798777987879879798807988179882798837988479885798867988779888798897989079891798927989379894798957989679897798987989979900799017990279903799047990579906799077990879909799107991179912799137991479915799167991779918799197992079921799227992379924799257992679927799287992979930799317993279933799347993579936799377993879939799407994179942799437994479945799467994779948799497995079951799527995379954799557995679957799587995979960799617996279963799647996579966799677996879969799707997179972799737997479975799767997779978799797998079981799827998379984799857998679987799887998979990799917999279993799947999579996799977999879999800008000180002800038000480005800068000780008800098001080011800128001380014800158001680017800188001980020800218002280023800248002580026800278002880029800308003180032800338003480035800368003780038800398004080041800428004380044800458004680047800488004980050800518005280053800548005580056800578005880059800608006180062800638006480065800668006780068800698007080071800728007380074800758007680077800788007980080800818008280083800848008580086800878008880089800908009180092800938009480095800968009780098800998010080101801028010380104801058010680107801088010980110801118011280113801148011580116801178011880119801208012180122801238012480125801268012780128801298013080131801328013380134801358013680137801388013980140801418014280143801448014580146801478014880149801508015180152801538015480155801568015780158801598016080161801628016380164801658016680167801688016980170801718017280173801748017580176801778017880179801808018180182801838018480185801868018780188801898019080191801928019380194801958019680197801988019980200802018020280203802048020580206802078020880209802108021180212802138021480215802168021780218802198022080221802228022380224802258022680227802288022980230802318023280233802348023580236802378023880239802408024180242802438024480245802468024780248802498025080251802528025380254802558025680257802588025980260802618026280263802648026580266802678026880269802708027180272802738027480275802768027780278802798028080281802828028380284802858028680287802888028980290802918029280293802948029580296802978029880299803008030180302803038030480305803068030780308803098031080311803128031380314803158031680317803188031980320803218032280323803248032580326803278032880329803308033180332803338033480335803368033780338803398034080341803428034380344803458034680347803488034980350803518035280353803548035580356803578035880359803608036180362803638036480365803668036780368803698037080371803728037380374803758037680377803788037980380803818038280383803848038580386803878038880389803908039180392803938039480395803968039780398803998040080401804028040380404804058040680407804088040980410804118041280413804148041580416804178041880419804208042180422804238042480425804268042780428804298043080431804328043380434804358043680437804388043980440804418044280443804448044580446804478044880449804508045180452804538045480455804568045780458804598046080461804628046380464804658046680467804688046980470804718047280473804748047580476804778047880479804808048180482804838048480485804868048780488804898049080491804928049380494804958049680497804988049980500805018050280503805048050580506805078050880509805108051180512805138051480515805168051780518805198052080521805228052380524805258052680527805288052980530805318053280533805348053580536805378053880539805408054180542805438054480545805468054780548805498055080551805528055380554805558055680557805588055980560805618056280563805648056580566805678056880569805708057180572805738057480575805768057780578805798058080581805828058380584805858058680587805888058980590805918059280593805948059580596805978059880599806008060180602806038060480605806068060780608806098061080611806128061380614806158061680617806188061980620806218062280623806248062580626806278062880629806308063180632806338063480635806368063780638806398064080641806428064380644806458064680647806488064980650806518065280653806548065580656806578065880659806608066180662806638066480665806668066780668806698067080671806728067380674806758067680677806788067980680806818068280683806848068580686806878068880689806908069180692806938069480695806968069780698806998070080701807028070380704807058070680707807088070980710807118071280713807148071580716807178071880719807208072180722807238072480725807268072780728807298073080731807328073380734807358073680737807388073980740807418074280743807448074580746807478074880749807508075180752807538075480755807568075780758807598076080761807628076380764807658076680767807688076980770807718077280773807748077580776807778077880779807808078180782807838078480785807868078780788807898079080791807928079380794807958079680797807988079980800808018080280803808048080580806808078080880809808108081180812808138081480815808168081780818808198082080821808228082380824808258082680827808288082980830808318083280833808348083580836808378083880839808408084180842808438084480845808468084780848808498085080851808528085380854808558085680857808588085980860808618086280863808648086580866808678086880869808708087180872808738087480875808768087780878808798088080881808828088380884808858088680887808888088980890808918089280893808948089580896808978089880899809008090180902809038090480905809068090780908809098091080911809128091380914809158091680917809188091980920809218092280923809248092580926809278092880929809308093180932809338093480935809368093780938809398094080941809428094380944809458094680947809488094980950809518095280953809548095580956809578095880959809608096180962809638096480965809668096780968809698097080971809728097380974809758097680977809788097980980809818098280983809848098580986809878098880989809908099180992809938099480995809968099780998809998100081001810028100381004810058100681007810088100981010810118101281013810148101581016810178101881019810208102181022810238102481025810268102781028810298103081031810328103381034810358103681037810388103981040810418104281043810448104581046810478104881049810508105181052810538105481055810568105781058810598106081061810628106381064810658106681067810688106981070810718107281073810748107581076810778107881079810808108181082810838108481085810868108781088810898109081091810928109381094810958109681097810988109981100811018110281103811048110581106811078110881109811108111181112811138111481115811168111781118811198112081121811228112381124811258112681127811288112981130811318113281133811348113581136811378113881139811408114181142811438114481145811468114781148811498115081151811528115381154811558115681157811588115981160811618116281163811648116581166811678116881169811708117181172811738117481175811768117781178811798118081181811828118381184811858118681187811888118981190811918119281193811948119581196811978119881199812008120181202812038120481205812068120781208812098121081211812128121381214812158121681217812188121981220812218122281223812248122581226812278122881229812308123181232812338123481235812368123781238812398124081241812428124381244812458124681247812488124981250812518125281253812548125581256812578125881259812608126181262812638126481265812668126781268812698127081271812728127381274812758127681277812788127981280812818128281283812848128581286812878128881289812908129181292812938129481295812968129781298812998130081301813028130381304813058130681307813088130981310813118131281313813148131581316813178131881319813208132181322813238132481325813268132781328813298133081331813328133381334813358133681337813388133981340813418134281343813448134581346813478134881349813508135181352813538135481355813568135781358813598136081361813628136381364813658136681367813688136981370813718137281373813748137581376813778137881379813808138181382813838138481385813868138781388813898139081391813928139381394813958139681397813988139981400814018140281403814048140581406814078140881409814108141181412814138141481415814168141781418814198142081421814228142381424814258142681427814288142981430814318143281433814348143581436814378143881439814408144181442814438144481445814468144781448814498145081451814528145381454814558145681457814588145981460814618146281463814648146581466814678146881469814708147181472814738147481475814768147781478814798148081481814828148381484814858148681487814888148981490814918149281493814948149581496814978149881499815008150181502815038150481505815068150781508815098151081511815128151381514815158151681517815188151981520815218152281523815248152581526815278152881529815308153181532815338153481535815368153781538815398154081541815428154381544815458154681547815488154981550815518155281553815548155581556815578155881559815608156181562815638156481565815668156781568815698157081571815728157381574815758157681577815788157981580815818158281583815848158581586815878158881589815908159181592815938159481595815968159781598815998160081601816028160381604816058160681607816088160981610816118161281613816148161581616816178161881619816208162181622816238162481625816268162781628816298163081631816328163381634816358163681637816388163981640816418164281643816448164581646816478164881649816508165181652816538165481655816568165781658816598166081661816628166381664816658166681667816688166981670816718167281673816748167581676816778167881679816808168181682816838168481685816868168781688816898169081691816928169381694816958169681697816988169981700817018170281703817048170581706817078170881709817108171181712817138171481715817168171781718817198172081721817228172381724817258172681727817288172981730817318173281733817348173581736817378173881739817408174181742817438174481745817468174781748817498175081751817528175381754817558175681757817588175981760817618176281763817648176581766817678176881769817708177181772817738177481775817768177781778817798178081781817828178381784817858178681787817888178981790817918179281793817948179581796817978179881799818008180181802818038180481805818068180781808818098181081811818128181381814818158181681817818188181981820818218182281823818248182581826818278182881829818308183181832818338183481835818368183781838818398184081841818428184381844818458184681847818488184981850818518185281853818548185581856818578185881859818608186181862818638186481865818668186781868818698187081871818728187381874818758187681877818788187981880818818188281883818848188581886818878188881889818908189181892818938189481895818968189781898818998190081901819028190381904819058190681907819088190981910819118191281913819148191581916819178191881919819208192181922819238192481925819268192781928819298193081931819328193381934819358193681937819388193981940819418194281943819448194581946819478194881949819508195181952819538195481955819568195781958819598196081961819628196381964819658196681967819688196981970819718197281973819748197581976819778197881979819808198181982819838198481985819868198781988819898199081991819928199381994819958199681997819988199982000820018200282003820048200582006820078200882009820108201182012820138201482015820168201782018820198202082021820228202382024820258202682027820288202982030820318203282033820348203582036820378203882039820408204182042820438204482045820468204782048820498205082051820528205382054820558205682057820588205982060820618206282063820648206582066820678206882069820708207182072820738207482075820768207782078820798208082081820828208382084820858208682087820888208982090820918209282093820948209582096820978209882099821008210182102821038210482105821068210782108821098211082111821128211382114821158211682117821188211982120821218212282123821248212582126821278212882129821308213182132821338213482135821368213782138821398214082141821428214382144821458214682147821488214982150821518215282153821548215582156821578215882159821608216182162821638216482165821668216782168821698217082171821728217382174821758217682177821788217982180821818218282183821848218582186821878218882189821908219182192821938219482195821968219782198821998220082201822028220382204822058220682207822088220982210822118221282213822148221582216822178221882219822208222182222822238222482225822268222782228822298223082231822328223382234822358223682237822388223982240822418224282243822448224582246822478224882249822508225182252822538225482255822568225782258822598226082261822628226382264822658226682267822688226982270822718227282273822748227582276822778227882279822808228182282822838228482285822868228782288822898229082291822928229382294822958229682297822988229982300823018230282303823048230582306823078230882309823108231182312823138231482315823168231782318823198232082321823228232382324823258232682327823288232982330823318233282333823348233582336823378233882339823408234182342823438234482345823468234782348823498235082351823528235382354823558235682357823588235982360823618236282363823648236582366823678236882369823708237182372823738237482375823768237782378823798238082381823828238382384823858238682387823888238982390823918239282393823948239582396823978239882399824008240182402824038240482405824068240782408824098241082411824128241382414824158241682417824188241982420824218242282423824248242582426824278242882429824308243182432824338243482435824368243782438824398244082441824428244382444824458244682447824488244982450824518245282453824548245582456824578245882459824608246182462824638246482465824668246782468824698247082471824728247382474824758247682477824788247982480824818248282483824848248582486824878248882489824908249182492824938249482495824968249782498824998250082501825028250382504825058250682507825088250982510825118251282513825148251582516825178251882519825208252182522825238252482525825268252782528825298253082531825328253382534825358253682537825388253982540825418254282543825448254582546825478254882549825508255182552825538255482555825568255782558825598256082561825628256382564825658256682567825688256982570825718257282573825748257582576825778257882579825808258182582825838258482585825868258782588825898259082591825928259382594825958259682597825988259982600826018260282603826048260582606826078260882609826108261182612826138261482615826168261782618826198262082621826228262382624826258262682627826288262982630826318263282633826348263582636826378263882639826408264182642826438264482645826468264782648826498265082651826528265382654826558265682657826588265982660826618266282663826648266582666826678266882669826708267182672826738267482675826768267782678826798268082681826828268382684826858268682687826888268982690826918269282693826948269582696826978269882699827008270182702827038270482705827068270782708827098271082711827128271382714827158271682717827188271982720827218272282723827248272582726827278272882729827308273182732827338273482735827368273782738827398274082741827428274382744827458274682747827488274982750827518275282753827548275582756827578275882759827608276182762827638276482765827668276782768827698277082771827728277382774827758277682777827788277982780827818278282783827848278582786827878278882789827908279182792827938279482795827968279782798827998280082801828028280382804828058280682807828088280982810828118281282813828148281582816828178281882819828208282182822828238282482825828268282782828828298283082831828328283382834828358283682837828388283982840828418284282843828448284582846828478284882849828508285182852828538285482855828568285782858828598286082861828628286382864828658286682867828688286982870828718287282873828748287582876828778287882879828808288182882828838288482885828868288782888828898289082891828928289382894828958289682897828988289982900829018290282903829048290582906829078290882909829108291182912829138291482915829168291782918829198292082921829228292382924829258292682927829288292982930829318293282933829348293582936829378293882939829408294182942829438294482945829468294782948829498295082951829528295382954829558295682957829588295982960829618296282963829648296582966829678296882969829708297182972829738297482975829768297782978829798298082981829828298382984829858298682987829888298982990829918299282993829948299582996829978299882999830008300183002830038300483005830068300783008830098301083011830128301383014830158301683017830188301983020830218302283023830248302583026830278302883029830308303183032830338303483035830368303783038830398304083041830428304383044830458304683047830488304983050830518305283053830548305583056830578305883059830608306183062830638306483065830668306783068830698307083071830728307383074830758307683077830788307983080830818308283083830848308583086830878308883089830908309183092830938309483095830968309783098830998310083101831028310383104831058310683107831088310983110831118311283113831148311583116831178311883119831208312183122831238312483125831268312783128831298313083131831328313383134831358313683137831388313983140831418314283143831448314583146831478314883149831508315183152831538315483155831568315783158831598316083161831628316383164831658316683167831688316983170831718317283173831748317583176831778317883179831808318183182831838318483185831868318783188831898319083191831928319383194831958319683197831988319983200832018320283203832048320583206832078320883209832108321183212832138321483215832168321783218832198322083221832228322383224832258322683227832288322983230832318323283233832348323583236832378323883239832408324183242832438324483245832468324783248832498325083251832528325383254832558325683257832588325983260832618326283263832648326583266832678326883269832708327183272832738327483275832768327783278832798328083281832828328383284832858328683287832888328983290832918329283293832948329583296832978329883299833008330183302833038330483305833068330783308833098331083311833128331383314833158331683317833188331983320833218332283323833248332583326833278332883329833308333183332833338333483335833368333783338833398334083341833428334383344833458334683347833488334983350833518335283353833548335583356833578335883359833608336183362833638336483365833668336783368833698337083371833728337383374833758337683377833788337983380833818338283383833848338583386833878338883389833908339183392833938339483395833968339783398833998340083401834028340383404834058340683407834088340983410834118341283413834148341583416834178341883419834208342183422834238342483425834268342783428834298343083431834328343383434834358343683437834388343983440834418344283443834448344583446834478344883449834508345183452834538345483455834568345783458834598346083461834628346383464834658346683467834688346983470834718347283473834748347583476834778347883479834808348183482834838348483485834868348783488834898349083491834928349383494834958349683497834988349983500835018350283503835048350583506835078350883509835108351183512835138351483515835168351783518835198352083521835228352383524835258352683527835288352983530835318353283533835348353583536835378353883539835408354183542835438354483545835468354783548835498355083551835528355383554835558355683557835588355983560835618356283563835648356583566835678356883569835708357183572835738357483575835768357783578835798358083581835828358383584835858358683587835888358983590835918359283593835948359583596835978359883599836008360183602836038360483605836068360783608836098361083611836128361383614836158361683617836188361983620836218362283623836248362583626836278362883629836308363183632836338363483635836368363783638836398364083641836428364383644836458364683647836488364983650836518365283653836548365583656836578365883659836608366183662836638366483665836668366783668836698367083671836728367383674836758367683677836788367983680836818368283683836848368583686836878368883689836908369183692836938369483695836968369783698836998370083701837028370383704837058370683707837088370983710837118371283713837148371583716837178371883719837208372183722837238372483725837268372783728837298373083731837328373383734837358373683737837388373983740837418374283743837448374583746837478374883749837508375183752837538375483755837568375783758837598376083761837628376383764837658376683767837688376983770837718377283773837748377583776837778377883779837808378183782837838378483785837868378783788837898379083791837928379383794837958379683797837988379983800838018380283803838048380583806838078380883809838108381183812838138381483815838168381783818838198382083821838228382383824838258382683827838288382983830838318383283833838348383583836838378383883839838408384183842838438384483845838468384783848838498385083851838528385383854838558385683857838588385983860838618386283863838648386583866838678386883869838708387183872838738387483875838768387783878838798388083881838828388383884838858388683887838888388983890838918389283893838948389583896838978389883899839008390183902839038390483905839068390783908839098391083911839128391383914839158391683917839188391983920839218392283923839248392583926839278392883929839308393183932839338393483935839368393783938839398394083941839428394383944839458394683947839488394983950839518395283953839548395583956839578395883959839608396183962839638396483965839668396783968839698397083971839728397383974839758397683977839788397983980839818398283983839848398583986839878398883989839908399183992839938399483995839968399783998839998400084001840028400384004840058400684007840088400984010840118401284013840148401584016840178401884019840208402184022840238402484025840268402784028840298403084031840328403384034840358403684037840388403984040840418404284043840448404584046840478404884049840508405184052840538405484055840568405784058840598406084061840628406384064840658406684067840688406984070840718407284073840748407584076840778407884079840808408184082840838408484085840868408784088840898409084091840928409384094840958409684097840988409984100841018410284103841048410584106841078410884109841108411184112841138411484115841168411784118841198412084121841228412384124841258412684127841288412984130841318413284133841348413584136841378413884139841408414184142841438414484145841468414784148841498415084151841528415384154841558415684157841588415984160841618416284163841648416584166841678416884169841708417184172841738417484175841768417784178841798418084181841828418384184841858418684187841888418984190841918419284193841948419584196841978419884199842008420184202842038420484205842068420784208842098421084211842128421384214842158421684217842188421984220842218422284223842248422584226842278422884229842308423184232842338423484235842368423784238842398424084241842428424384244842458424684247842488424984250842518425284253842548425584256842578425884259842608426184262842638426484265842668426784268842698427084271842728427384274842758427684277842788427984280842818428284283842848428584286842878428884289842908429184292842938429484295842968429784298842998430084301843028430384304843058430684307843088430984310843118431284313843148431584316843178431884319843208432184322843238432484325843268432784328843298433084331843328433384334843358433684337843388433984340843418434284343843448434584346843478434884349843508435184352843538435484355843568435784358843598436084361843628436384364843658436684367843688436984370843718437284373843748437584376843778437884379843808438184382843838438484385843868438784388843898439084391843928439384394843958439684397843988439984400844018440284403844048440584406844078440884409844108441184412844138441484415844168441784418844198442084421844228442384424844258442684427844288442984430844318443284433844348443584436844378443884439844408444184442844438444484445844468444784448844498445084451844528445384454844558445684457844588445984460844618446284463844648446584466844678446884469844708447184472844738447484475844768447784478844798448084481844828448384484844858448684487844888448984490844918449284493844948449584496844978449884499845008450184502845038450484505845068450784508845098451084511845128451384514845158451684517845188451984520845218452284523845248452584526845278452884529845308453184532845338453484535845368453784538845398454084541845428454384544845458454684547845488454984550845518455284553845548455584556845578455884559845608456184562845638456484565845668456784568845698457084571845728457384574845758457684577845788457984580845818458284583845848458584586845878458884589845908459184592845938459484595845968459784598845998460084601846028460384604846058460684607846088460984610846118461284613846148461584616846178461884619846208462184622846238462484625846268462784628846298463084631846328463384634846358463684637846388463984640846418464284643846448464584646846478464884649846508465184652846538465484655846568465784658846598466084661846628466384664846658466684667846688466984670846718467284673846748467584676846778467884679846808468184682846838468484685846868468784688846898469084691846928469384694846958469684697846988469984700847018470284703847048470584706847078470884709847108471184712847138471484715847168471784718847198472084721847228472384724847258472684727847288472984730847318473284733847348473584736847378473884739847408474184742847438474484745847468474784748847498475084751847528475384754847558475684757847588475984760847618476284763847648476584766847678476884769847708477184772847738477484775847768477784778847798478084781847828478384784847858478684787847888478984790847918479284793847948479584796847978479884799848008480184802848038480484805848068480784808848098481084811848128481384814848158481684817848188481984820848218482284823848248482584826848278482884829848308483184832848338483484835848368483784838848398484084841848428484384844848458484684847848488484984850848518485284853848548485584856848578485884859848608486184862848638486484865848668486784868848698487084871848728487384874848758487684877848788487984880848818488284883848848488584886848878488884889848908489184892848938489484895848968489784898848998490084901849028490384904849058490684907849088490984910849118491284913849148491584916849178491884919849208492184922849238492484925849268492784928849298493084931849328493384934849358493684937849388493984940849418494284943849448494584946849478494884949849508495184952849538495484955849568495784958849598496084961849628496384964849658496684967849688496984970849718497284973849748497584976849778497884979849808498184982849838498484985849868498784988849898499084991849928499384994849958499684997849988499985000850018500285003850048500585006850078500885009850108501185012850138501485015850168501785018850198502085021850228502385024850258502685027850288502985030850318503285033850348503585036850378503885039850408504185042850438504485045850468504785048850498505085051850528505385054850558505685057850588505985060850618506285063850648506585066850678506885069850708507185072850738507485075850768507785078850798508085081850828508385084850858508685087850888508985090850918509285093850948509585096850978509885099851008510185102851038510485105851068510785108851098511085111851128511385114851158511685117851188511985120851218512285123851248512585126851278512885129851308513185132851338513485135851368513785138851398514085141851428514385144851458514685147851488514985150851518515285153851548515585156851578515885159851608516185162851638516485165851668516785168851698517085171851728517385174851758517685177851788517985180851818518285183851848518585186851878518885189851908519185192851938519485195851968519785198851998520085201852028520385204852058520685207852088520985210852118521285213852148521585216852178521885219852208522185222852238522485225852268522785228852298523085231852328523385234852358523685237852388523985240852418524285243852448524585246852478524885249852508525185252852538525485255852568525785258852598526085261852628526385264852658526685267852688526985270852718527285273852748527585276852778527885279852808528185282852838528485285852868528785288852898529085291852928529385294852958529685297852988529985300853018530285303853048530585306853078530885309853108531185312853138531485315853168531785318853198532085321853228532385324853258532685327853288532985330853318533285333853348533585336853378533885339853408534185342853438534485345853468534785348853498535085351853528535385354853558535685357853588535985360853618536285363853648536585366853678536885369853708537185372853738537485375853768537785378853798538085381853828538385384853858538685387853888538985390853918539285393853948539585396853978539885399854008540185402854038540485405854068540785408854098541085411854128541385414854158541685417854188541985420854218542285423854248542585426854278542885429854308543185432854338543485435854368543785438854398544085441854428544385444854458544685447854488544985450854518545285453854548545585456854578545885459854608546185462854638546485465854668546785468854698547085471854728547385474854758547685477854788547985480854818548285483854848548585486854878548885489854908549185492854938549485495854968549785498854998550085501855028550385504855058550685507855088550985510855118551285513855148551585516855178551885519855208552185522855238552485525855268552785528855298553085531855328553385534855358553685537855388553985540855418554285543855448554585546855478554885549855508555185552855538555485555855568555785558855598556085561855628556385564855658556685567855688556985570855718557285573855748557585576855778557885579855808558185582855838558485585855868558785588855898559085591855928559385594855958559685597855988559985600856018560285603856048560585606856078560885609856108561185612856138561485615856168561785618856198562085621856228562385624856258562685627856288562985630856318563285633856348563585636856378563885639856408564185642856438564485645856468564785648856498565085651856528565385654856558565685657856588565985660856618566285663856648566585666856678566885669856708567185672856738567485675856768567785678856798568085681856828568385684856858568685687856888568985690856918569285693856948569585696856978569885699857008570185702857038570485705857068570785708857098571085711857128571385714857158571685717857188571985720857218572285723857248572585726857278572885729857308573185732857338573485735857368573785738857398574085741857428574385744857458574685747857488574985750857518575285753857548575585756857578575885759857608576185762857638576485765857668576785768857698577085771857728577385774857758577685777857788577985780857818578285783857848578585786857878578885789857908579185792857938579485795857968579785798857998580085801858028580385804858058580685807858088580985810858118581285813858148581585816858178581885819858208582185822858238582485825858268582785828858298583085831858328583385834858358583685837858388583985840858418584285843858448584585846858478584885849858508585185852858538585485855858568585785858858598586085861858628586385864858658586685867858688586985870858718587285873858748587585876858778587885879858808588185882858838588485885858868588785888858898589085891858928589385894858958589685897858988589985900859018590285903859048590585906859078590885909859108591185912859138591485915859168591785918859198592085921859228592385924859258592685927859288592985930859318593285933859348593585936859378593885939859408594185942859438594485945859468594785948859498595085951859528595385954859558595685957859588595985960859618596285963859648596585966859678596885969859708597185972859738597485975859768597785978859798598085981859828598385984859858598685987859888598985990859918599285993859948599585996859978599885999860008600186002860038600486005860068600786008860098601086011860128601386014860158601686017860188601986020860218602286023860248602586026860278602886029860308603186032860338603486035860368603786038860398604086041860428604386044860458604686047860488604986050860518605286053860548605586056860578605886059860608606186062860638606486065860668606786068860698607086071860728607386074860758607686077860788607986080860818608286083860848608586086860878608886089860908609186092860938609486095860968609786098860998610086101861028610386104861058610686107861088610986110861118611286113861148611586116861178611886119861208612186122861238612486125861268612786128861298613086131861328613386134861358613686137861388613986140861418614286143861448614586146861478614886149861508615186152861538615486155861568615786158861598616086161861628616386164861658616686167861688616986170861718617286173861748617586176861778617886179861808618186182861838618486185861868618786188861898619086191861928619386194861958619686197861988619986200862018620286203862048620586206862078620886209862108621186212862138621486215862168621786218862198622086221862228622386224862258622686227862288622986230862318623286233862348623586236862378623886239862408624186242862438624486245862468624786248862498625086251862528625386254862558625686257862588625986260862618626286263862648626586266862678626886269862708627186272862738627486275862768627786278862798628086281862828628386284862858628686287862888628986290862918629286293862948629586296862978629886299863008630186302863038630486305863068630786308863098631086311863128631386314863158631686317863188631986320863218632286323863248632586326863278632886329863308633186332863338633486335863368633786338863398634086341863428634386344863458634686347863488634986350863518635286353863548635586356863578635886359863608636186362863638636486365863668636786368863698637086371863728637386374863758637686377863788637986380863818638286383863848638586386863878638886389863908639186392863938639486395863968639786398863998640086401864028640386404864058640686407864088640986410864118641286413864148641586416864178641886419864208642186422864238642486425864268642786428864298643086431864328643386434864358643686437864388643986440864418644286443864448644586446864478644886449864508645186452864538645486455864568645786458864598646086461864628646386464864658646686467864688646986470864718647286473864748647586476864778647886479864808648186482864838648486485864868648786488864898649086491864928649386494864958649686497864988649986500865018650286503865048650586506865078650886509865108651186512865138651486515865168651786518865198652086521865228652386524865258652686527865288652986530865318653286533865348653586536865378653886539865408654186542865438654486545865468654786548865498655086551865528655386554865558655686557865588655986560865618656286563865648656586566865678656886569865708657186572865738657486575865768657786578865798658086581865828658386584865858658686587865888658986590865918659286593865948659586596865978659886599866008660186602866038660486605866068660786608866098661086611866128661386614866158661686617866188661986620866218662286623866248662586626866278662886629866308663186632866338663486635866368663786638866398664086641866428664386644866458664686647866488664986650866518665286653866548665586656866578665886659866608666186662866638666486665866668666786668866698667086671866728667386674866758667686677866788667986680866818668286683866848668586686866878668886689866908669186692866938669486695866968669786698866998670086701867028670386704867058670686707867088670986710867118671286713867148671586716867178671886719867208672186722867238672486725867268672786728867298673086731867328673386734867358673686737867388673986740867418674286743867448674586746867478674886749867508675186752867538675486755867568675786758867598676086761867628676386764867658676686767867688676986770867718677286773867748677586776867778677886779867808678186782867838678486785867868678786788867898679086791867928679386794867958679686797867988679986800868018680286803868048680586806868078680886809868108681186812868138681486815868168681786818868198682086821868228682386824868258682686827868288682986830868318683286833868348683586836868378683886839868408684186842868438684486845868468684786848868498685086851868528685386854868558685686857868588685986860868618686286863868648686586866868678686886869868708687186872868738687486875868768687786878868798688086881868828688386884868858688686887868888688986890868918689286893868948689586896868978689886899869008690186902869038690486905869068690786908869098691086911869128691386914869158691686917869188691986920869218692286923869248692586926869278692886929869308693186932869338693486935869368693786938869398694086941869428694386944869458694686947869488694986950869518695286953869548695586956869578695886959869608696186962869638696486965869668696786968869698697086971869728697386974869758697686977869788697986980869818698286983869848698586986869878698886989869908699186992869938699486995869968699786998869998700087001870028700387004870058700687007870088700987010870118701287013870148701587016870178701887019870208702187022870238702487025870268702787028870298703087031870328703387034870358703687037870388703987040870418704287043870448704587046870478704887049870508705187052870538705487055870568705787058870598706087061870628706387064870658706687067870688706987070870718707287073870748707587076870778707887079870808708187082870838708487085870868708787088870898709087091870928709387094870958709687097870988709987100871018710287103871048710587106871078710887109871108711187112871138711487115871168711787118871198712087121871228712387124871258712687127871288712987130871318713287133871348713587136871378713887139871408714187142871438714487145871468714787148871498715087151871528715387154871558715687157871588715987160871618716287163871648716587166871678716887169871708717187172871738717487175871768717787178871798718087181871828718387184871858718687187871888718987190871918719287193871948719587196871978719887199872008720187202872038720487205872068720787208872098721087211872128721387214872158721687217872188721987220872218722287223872248722587226872278722887229872308723187232872338723487235872368723787238872398724087241872428724387244872458724687247872488724987250872518725287253872548725587256872578725887259872608726187262872638726487265872668726787268872698727087271872728727387274872758727687277872788727987280872818728287283872848728587286872878728887289872908729187292872938729487295872968729787298872998730087301873028730387304873058730687307873088730987310873118731287313873148731587316873178731887319873208732187322873238732487325873268732787328873298733087331873328733387334873358733687337873388733987340873418734287343873448734587346873478734887349873508735187352873538735487355873568735787358873598736087361873628736387364873658736687367873688736987370873718737287373873748737587376873778737887379873808738187382873838738487385873868738787388873898739087391873928739387394873958739687397873988739987400874018740287403874048740587406874078740887409874108741187412874138741487415874168741787418874198742087421874228742387424874258742687427874288742987430874318743287433874348743587436874378743887439874408744187442874438744487445874468744787448874498745087451874528745387454874558745687457874588745987460874618746287463874648746587466874678746887469874708747187472874738747487475874768747787478874798748087481874828748387484874858748687487874888748987490874918749287493874948749587496874978749887499875008750187502875038750487505875068750787508875098751087511875128751387514875158751687517875188751987520875218752287523875248752587526875278752887529875308753187532875338753487535875368753787538875398754087541875428754387544875458754687547875488754987550875518755287553875548755587556875578755887559875608756187562875638756487565875668756787568875698757087571875728757387574875758757687577875788757987580875818758287583875848758587586875878758887589875908759187592875938759487595875968759787598875998760087601876028760387604876058760687607876088760987610876118761287613876148761587616876178761887619876208762187622876238762487625876268762787628876298763087631876328763387634876358763687637876388763987640876418764287643876448764587646876478764887649876508765187652876538765487655876568765787658876598766087661876628766387664876658766687667876688766987670876718767287673876748767587676876778767887679876808768187682876838768487685876868768787688876898769087691876928769387694876958769687697876988769987700877018770287703877048770587706877078770887709877108771187712877138771487715877168771787718877198772087721877228772387724877258772687727877288772987730877318773287733877348773587736877378773887739877408774187742877438774487745877468774787748877498775087751877528775387754877558775687757877588775987760877618776287763877648776587766877678776887769877708777187772877738777487775877768777787778877798778087781877828778387784877858778687787877888778987790877918779287793877948779587796877978779887799878008780187802878038780487805878068780787808878098781087811878128781387814878158781687817878188781987820878218782287823878248782587826878278782887829878308783187832878338783487835878368783787838878398784087841878428784387844878458784687847878488784987850878518785287853878548785587856878578785887859878608786187862878638786487865878668786787868878698787087871878728787387874878758787687877878788787987880878818788287883878848788587886878878788887889878908789187892878938789487895878968789787898878998790087901879028790387904879058790687907879088790987910879118791287913879148791587916879178791887919879208792187922879238792487925879268792787928879298793087931879328793387934879358793687937879388793987940879418794287943879448794587946879478794887949879508795187952879538795487955879568795787958879598796087961879628796387964879658796687967879688796987970879718797287973879748797587976879778797887979879808798187982879838798487985879868798787988879898799087991879928799387994879958799687997879988799988000880018800288003880048800588006880078800888009880108801188012880138801488015880168801788018880198802088021880228802388024880258802688027880288802988030880318803288033880348803588036880378803888039880408804188042880438804488045880468804788048880498805088051880528805388054880558805688057880588805988060880618806288063880648806588066880678806888069880708807188072880738807488075880768807788078880798808088081880828808388084880858808688087880888808988090880918809288093880948809588096880978809888099881008810188102881038810488105881068810788108881098811088111881128811388114881158811688117881188811988120881218812288123881248812588126881278812888129881308813188132881338813488135881368813788138881398814088141881428814388144881458814688147881488814988150881518815288153881548815588156881578815888159881608816188162881638816488165881668816788168881698817088171881728817388174881758817688177881788817988180881818818288183881848818588186881878818888189881908819188192881938819488195881968819788198881998820088201882028820388204882058820688207882088820988210882118821288213882148821588216882178821888219882208822188222882238822488225882268822788228882298823088231882328823388234882358823688237882388823988240882418824288243882448824588246882478824888249882508825188252882538825488255882568825788258882598826088261882628826388264882658826688267882688826988270882718827288273882748827588276882778827888279882808828188282882838828488285882868828788288882898829088291882928829388294882958829688297882988829988300883018830288303883048830588306883078830888309883108831188312883138831488315883168831788318883198832088321883228832388324883258832688327883288832988330883318833288333883348833588336883378833888339883408834188342883438834488345883468834788348883498835088351883528835388354883558835688357883588835988360883618836288363883648836588366883678836888369883708837188372883738837488375883768837788378883798838088381883828838388384883858838688387883888838988390883918839288393883948839588396883978839888399884008840188402884038840488405884068840788408884098841088411884128841388414884158841688417884188841988420884218842288423884248842588426884278842888429884308843188432884338843488435884368843788438884398844088441884428844388444884458844688447884488844988450884518845288453884548845588456884578845888459884608846188462884638846488465884668846788468884698847088471884728847388474884758847688477884788847988480884818848288483884848848588486884878848888489884908849188492884938849488495884968849788498884998850088501885028850388504885058850688507885088850988510885118851288513885148851588516885178851888519885208852188522885238852488525885268852788528885298853088531885328853388534885358853688537885388853988540885418854288543885448854588546885478854888549885508855188552885538855488555885568855788558885598856088561885628856388564885658856688567885688856988570885718857288573885748857588576885778857888579885808858188582885838858488585885868858788588885898859088591885928859388594885958859688597885988859988600886018860288603886048860588606886078860888609886108861188612886138861488615886168861788618886198862088621886228862388624886258862688627886288862988630886318863288633886348863588636886378863888639886408864188642886438864488645886468864788648886498865088651886528865388654886558865688657886588865988660886618866288663886648866588666886678866888669886708867188672886738867488675886768867788678886798868088681886828868388684886858868688687886888868988690886918869288693886948869588696886978869888699887008870188702887038870488705887068870788708887098871088711887128871388714887158871688717887188871988720887218872288723887248872588726887278872888729887308873188732887338873488735887368873788738887398874088741887428874388744887458874688747887488874988750887518875288753887548875588756887578875888759887608876188762887638876488765887668876788768887698877088771887728877388774887758877688777887788877988780887818878288783887848878588786887878878888789887908879188792887938879488795887968879788798887998880088801888028880388804888058880688807888088880988810888118881288813888148881588816888178881888819888208882188822888238882488825888268882788828888298883088831888328883388834888358883688837888388883988840888418884288843888448884588846888478884888849888508885188852888538885488855888568885788858888598886088861888628886388864888658886688867888688886988870888718887288873888748887588876888778887888879888808888188882888838888488885888868888788888888898889088891888928889388894888958889688897888988889988900889018890288903889048890588906889078890888909889108891188912889138891488915889168891788918889198892088921889228892388924889258892688927889288892988930889318893288933889348893588936889378893888939889408894188942889438894488945889468894788948889498895088951889528895388954889558895688957889588895988960889618896288963889648896588966889678896888969889708897188972889738897488975889768897788978889798898088981889828898388984889858898688987889888898988990889918899288993889948899588996889978899888999890008900189002890038900489005890068900789008890098901089011890128901389014890158901689017890188901989020890218902289023890248902589026890278902889029890308903189032890338903489035890368903789038890398904089041890428904389044890458904689047890488904989050890518905289053890548905589056890578905889059890608906189062890638906489065890668906789068890698907089071890728907389074890758907689077890788907989080890818908289083890848908589086890878908889089890908909189092890938909489095890968909789098890998910089101891028910389104891058910689107891088910989110891118911289113891148911589116891178911889119891208912189122891238912489125891268912789128891298913089131891328913389134891358913689137891388913989140891418914289143891448914589146891478914889149891508915189152891538915489155891568915789158891598916089161891628916389164891658916689167891688916989170891718917289173891748917589176891778917889179891808918189182891838918489185891868918789188891898919089191891928919389194891958919689197891988919989200892018920289203892048920589206892078920889209892108921189212892138921489215892168921789218892198922089221892228922389224892258922689227892288922989230892318923289233892348923589236892378923889239892408924189242892438924489245892468924789248892498925089251892528925389254892558925689257892588925989260892618926289263892648926589266892678926889269892708927189272892738927489275892768927789278892798928089281892828928389284892858928689287892888928989290892918929289293892948929589296892978929889299893008930189302893038930489305893068930789308893098931089311893128931389314893158931689317893188931989320893218932289323893248932589326893278932889329893308933189332893338933489335893368933789338893398934089341893428934389344893458934689347893488934989350893518935289353893548935589356893578935889359893608936189362893638936489365893668936789368893698937089371893728937389374893758937689377893788937989380893818938289383893848938589386893878938889389893908939189392893938939489395893968939789398893998940089401894028940389404894058940689407894088940989410894118941289413894148941589416894178941889419894208942189422894238942489425894268942789428894298943089431894328943389434894358943689437894388943989440894418944289443894448944589446894478944889449894508945189452894538945489455894568945789458894598946089461894628946389464894658946689467894688946989470894718947289473894748947589476894778947889479894808948189482894838948489485894868948789488894898949089491894928949389494894958949689497894988949989500895018950289503895048950589506895078950889509895108951189512895138951489515895168951789518895198952089521895228952389524895258952689527895288952989530895318953289533895348953589536895378953889539895408954189542895438954489545895468954789548895498955089551895528955389554895558955689557895588955989560895618956289563895648956589566895678956889569895708957189572895738957489575895768957789578895798958089581895828958389584895858958689587895888958989590895918959289593895948959589596895978959889599896008960189602896038960489605896068960789608896098961089611896128961389614896158961689617896188961989620896218962289623896248962589626896278962889629896308963189632896338963489635896368963789638896398964089641896428964389644896458964689647896488964989650896518965289653896548965589656896578965889659896608966189662896638966489665896668966789668896698967089671896728967389674896758967689677896788967989680896818968289683896848968589686896878968889689896908969189692896938969489695896968969789698896998970089701897028970389704897058970689707897088970989710897118971289713897148971589716897178971889719897208972189722897238972489725897268972789728897298973089731897328973389734897358973689737897388973989740897418974289743897448974589746897478974889749897508975189752897538975489755897568975789758897598976089761897628976389764897658976689767897688976989770897718977289773897748977589776897778977889779897808978189782897838978489785897868978789788897898979089791897928979389794897958979689797897988979989800898018980289803898048980589806898078980889809898108981189812898138981489815898168981789818898198982089821898228982389824898258982689827898288982989830898318983289833898348983589836898378983889839898408984189842898438984489845898468984789848898498985089851898528985389854898558985689857898588985989860898618986289863898648986589866898678986889869898708987189872898738987489875898768987789878898798988089881898828988389884898858988689887898888988989890898918989289893898948989589896898978989889899899008990189902899038990489905899068990789908899098991089911899128991389914899158991689917899188991989920899218992289923899248992589926899278992889929899308993189932899338993489935899368993789938899398994089941899428994389944899458994689947899488994989950899518995289953899548995589956899578995889959899608996189962899638996489965899668996789968899698997089971899728997389974899758997689977899788997989980899818998289983899848998589986899878998889989899908999189992899938999489995899968999789998899999000090001900029000390004900059000690007900089000990010900119001290013900149001590016900179001890019900209002190022900239002490025900269002790028900299003090031900329003390034900359003690037900389003990040900419004290043900449004590046900479004890049900509005190052900539005490055900569005790058900599006090061900629006390064900659006690067900689006990070900719007290073900749007590076900779007890079900809008190082900839008490085900869008790088900899009090091900929009390094900959009690097900989009990100901019010290103901049010590106901079010890109901109011190112901139011490115901169011790118901199012090121901229012390124901259012690127901289012990130901319013290133901349013590136901379013890139901409014190142901439014490145901469014790148901499015090151901529015390154901559015690157901589015990160901619016290163901649016590166901679016890169901709017190172901739017490175901769017790178901799018090181901829018390184901859018690187901889018990190901919019290193901949019590196901979019890199902009020190202902039020490205902069020790208902099021090211902129021390214902159021690217902189021990220902219022290223902249022590226902279022890229902309023190232902339023490235902369023790238902399024090241902429024390244902459024690247902489024990250902519025290253902549025590256902579025890259902609026190262902639026490265902669026790268902699027090271902729027390274902759027690277902789027990280902819028290283902849028590286902879028890289902909029190292902939029490295902969029790298902999030090301903029030390304903059030690307903089030990310903119031290313903149031590316903179031890319903209032190322903239032490325903269032790328903299033090331903329033390334903359033690337903389033990340903419034290343903449034590346903479034890349903509035190352903539035490355903569035790358903599036090361903629036390364903659036690367903689036990370903719037290373903749037590376903779037890379903809038190382903839038490385903869038790388903899039090391903929039390394903959039690397903989039990400904019040290403904049040590406904079040890409904109041190412904139041490415904169041790418904199042090421904229042390424904259042690427904289042990430904319043290433904349043590436904379043890439904409044190442904439044490445904469044790448904499045090451904529045390454904559045690457904589045990460904619046290463904649046590466904679046890469904709047190472904739047490475904769047790478904799048090481904829048390484904859048690487904889048990490904919049290493904949049590496904979049890499905009050190502905039050490505905069050790508905099051090511905129051390514905159051690517905189051990520905219052290523905249052590526905279052890529905309053190532905339053490535905369053790538905399054090541905429054390544905459054690547905489054990550905519055290553905549055590556905579055890559905609056190562905639056490565905669056790568905699057090571905729057390574905759057690577905789057990580905819058290583905849058590586905879058890589905909059190592905939059490595905969059790598905999060090601906029060390604906059060690607906089060990610906119061290613906149061590616906179061890619906209062190622906239062490625906269062790628906299063090631906329063390634906359063690637906389063990640906419064290643906449064590646906479064890649906509065190652906539065490655906569065790658906599066090661906629066390664906659066690667906689066990670906719067290673906749067590676906779067890679906809068190682906839068490685906869068790688906899069090691906929069390694906959069690697906989069990700907019070290703907049070590706907079070890709907109071190712907139071490715907169071790718907199072090721907229072390724907259072690727907289072990730907319073290733907349073590736907379073890739907409074190742907439074490745907469074790748907499075090751907529075390754907559075690757907589075990760907619076290763907649076590766907679076890769907709077190772907739077490775907769077790778907799078090781907829078390784907859078690787907889078990790907919079290793907949079590796907979079890799908009080190802908039080490805908069080790808908099081090811908129081390814908159081690817908189081990820908219082290823908249082590826908279082890829908309083190832908339083490835908369083790838908399084090841908429084390844908459084690847908489084990850908519085290853908549085590856908579085890859908609086190862908639086490865908669086790868908699087090871908729087390874908759087690877908789087990880908819088290883908849088590886908879088890889908909089190892908939089490895908969089790898908999090090901909029090390904909059090690907
  1. var __accessCheck = (obj, member, msg) => {
  2. if (!member.has(obj))
  3. throw TypeError("Cannot " + msg);
  4. };
  5. var __privateGet = (obj, member, getter) => {
  6. __accessCheck(obj, member, "read from private field");
  7. return getter ? getter.call(obj) : member.get(obj);
  8. };
  9. var __privateAdd = (obj, member, value) => {
  10. if (member.has(obj))
  11. throw TypeError("Cannot add the same private member more than once");
  12. member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
  13. };
  14. var __privateSet = (obj, member, value, setter) => {
  15. __accessCheck(obj, member, "write to private field");
  16. setter ? setter.call(obj, value) : member.set(obj, value);
  17. return value;
  18. };
  19. if (typeof Promise !== "undefined" && !Promise.prototype.finally) {
  20. Promise.prototype.finally = function(callback) {
  21. const promise = this.constructor;
  22. return this.then(
  23. (value) => promise.resolve(callback()).then(() => value),
  24. (reason) => promise.resolve(callback()).then(() => {
  25. throw reason;
  26. })
  27. );
  28. };
  29. }
  30. ;
  31. if (typeof uni !== "undefined" && uni && uni.requireGlobal) {
  32. const global2 = uni.requireGlobal();
  33. ArrayBuffer = global2.ArrayBuffer;
  34. Int8Array = global2.Int8Array;
  35. Uint8Array = global2.Uint8Array;
  36. Uint8ClampedArray = global2.Uint8ClampedArray;
  37. Int16Array = global2.Int16Array;
  38. Uint16Array = global2.Uint16Array;
  39. Int32Array = global2.Int32Array;
  40. Uint32Array = global2.Uint32Array;
  41. Float32Array = global2.Float32Array;
  42. Float64Array = global2.Float64Array;
  43. BigInt64Array = global2.BigInt64Array;
  44. BigUint64Array = global2.BigUint64Array;
  45. }
  46. ;
  47. if (uni.restoreGlobal) {
  48. uni.restoreGlobal(Vue, weex, plus, setTimeout, clearTimeout, setInterval, clearInterval);
  49. }
  50. (function(vue) {
  51. "use strict";
  52. const ON_SHOW = "onShow";
  53. const ON_HIDE = "onHide";
  54. const ON_LAUNCH = "onLaunch";
  55. const ON_ERROR = "onError";
  56. const ON_LOAD = "onLoad";
  57. const ON_READY = "onReady";
  58. const ON_BACK_PRESS = "onBackPress";
  59. const ON_PAGE_SCROLL = "onPageScroll";
  60. const ON_REACH_BOTTOM = "onReachBottom";
  61. const ON_PULL_DOWN_REFRESH = "onPullDownRefresh";
  62. function formatAppLog(type, filename, ...args) {
  63. if (uni.__log__) {
  64. uni.__log__(type, filename, ...args);
  65. } else {
  66. console[type].apply(console, [...args, filename]);
  67. }
  68. }
  69. function resolveEasycom(component, easycom2) {
  70. return typeof component === "string" ? easycom2 : component;
  71. }
  72. const createHook = (lifecycle) => (hook, target = vue.getCurrentInstance()) => {
  73. !vue.isInSSRComponentSetup && vue.injectHook(lifecycle, hook, target);
  74. };
  75. const onShow = /* @__PURE__ */ createHook(ON_SHOW);
  76. const onHide = /* @__PURE__ */ createHook(ON_HIDE);
  77. const onLaunch = /* @__PURE__ */ createHook(ON_LAUNCH);
  78. const onError = /* @__PURE__ */ createHook(ON_ERROR);
  79. const onLoad = /* @__PURE__ */ createHook(ON_LOAD);
  80. const onReady = /* @__PURE__ */ createHook(ON_READY);
  81. const onBackPress = /* @__PURE__ */ createHook(ON_BACK_PRESS);
  82. const onPageScroll = /* @__PURE__ */ createHook(ON_PAGE_SCROLL);
  83. const onReachBottom = /* @__PURE__ */ createHook(ON_REACH_BOTTOM);
  84. const onPullDownRefresh = /* @__PURE__ */ createHook(ON_PULL_DOWN_REFRESH);
  85. var toString$1 = Object.prototype.toString;
  86. function isArray$3(val) {
  87. return toString$1.call(val) === "[object Array]";
  88. }
  89. function isObject$6(val) {
  90. return val !== null && typeof val === "object";
  91. }
  92. function isDate$2(val) {
  93. return toString$1.call(val) === "[object Date]";
  94. }
  95. function isURLSearchParams$1(val) {
  96. return typeof URLSearchParams !== "undefined" && val instanceof URLSearchParams;
  97. }
  98. function forEach$1(obj, fn) {
  99. if (obj === null || typeof obj === "undefined") {
  100. return;
  101. }
  102. if (typeof obj !== "object") {
  103. obj = [obj];
  104. }
  105. if (isArray$3(obj)) {
  106. for (var i2 = 0, l2 = obj.length; i2 < l2; i2++) {
  107. fn.call(null, obj[i2], i2, obj);
  108. }
  109. } else {
  110. for (var key in obj) {
  111. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  112. fn.call(null, obj[key], key, obj);
  113. }
  114. }
  115. }
  116. }
  117. function isPlainObject$3(obj) {
  118. return Object.prototype.toString.call(obj) === "[object Object]";
  119. }
  120. function deepMerge$1() {
  121. let result2 = {};
  122. function assignValue(val, key) {
  123. if (typeof result2[key] === "object" && typeof val === "object") {
  124. result2[key] = deepMerge$1(result2[key], val);
  125. } else if (typeof val === "object") {
  126. result2[key] = deepMerge$1({}, val);
  127. } else {
  128. result2[key] = val;
  129. }
  130. }
  131. for (let i2 = 0, l2 = arguments.length; i2 < l2; i2++) {
  132. forEach$1(arguments[i2], assignValue);
  133. }
  134. return result2;
  135. }
  136. function isUndefined$1(val) {
  137. return typeof val === "undefined";
  138. }
  139. function encode$2(val) {
  140. return encodeURIComponent(val).replace(/%40/gi, "@").replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
  141. }
  142. function buildURL$1(url2, params, paramsSerializer) {
  143. if (!params) {
  144. return url2;
  145. }
  146. var serializedParams;
  147. if (paramsSerializer) {
  148. serializedParams = paramsSerializer(params);
  149. } else if (isURLSearchParams$1(params)) {
  150. serializedParams = params.toString();
  151. } else {
  152. var parts = [];
  153. forEach$1(params, function serialize(val, key) {
  154. if (val === null || typeof val === "undefined") {
  155. return;
  156. }
  157. if (isArray$3(val)) {
  158. key = key + "[]";
  159. } else {
  160. val = [val];
  161. }
  162. forEach$1(val, function parseValue2(v2) {
  163. if (isDate$2(v2)) {
  164. v2 = v2.toISOString();
  165. } else if (isObject$6(v2)) {
  166. v2 = JSON.stringify(v2);
  167. }
  168. parts.push(encode$2(key) + "=" + encode$2(v2));
  169. });
  170. });
  171. serializedParams = parts.join("&");
  172. }
  173. if (serializedParams) {
  174. var hashmarkIndex = url2.indexOf("#");
  175. if (hashmarkIndex !== -1) {
  176. url2 = url2.slice(0, hashmarkIndex);
  177. }
  178. url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams;
  179. }
  180. return url2;
  181. }
  182. function isAbsoluteURL$1(url2) {
  183. return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
  184. }
  185. function combineURLs$1(baseURL, relativeURL) {
  186. return relativeURL ? baseURL.replace(/\/+$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
  187. }
  188. function buildFullPath$1(baseURL, requestedURL) {
  189. if (baseURL && !isAbsoluteURL$1(requestedURL)) {
  190. return combineURLs$1(baseURL, requestedURL);
  191. }
  192. return requestedURL;
  193. }
  194. function settle$1(resolve, reject, response) {
  195. const validateStatus = response.config.validateStatus;
  196. const status = response.statusCode;
  197. if (status && (!validateStatus || validateStatus(status))) {
  198. resolve(response);
  199. } else {
  200. reject(response);
  201. }
  202. }
  203. const mergeKeys$1 = (keys, config2) => {
  204. let config3 = {};
  205. keys.forEach((prop) => {
  206. if (!isUndefined$1(config2[prop])) {
  207. config3[prop] = config2[prop];
  208. }
  209. });
  210. return config3;
  211. };
  212. const adapter = (config2) => {
  213. return new Promise((resolve, reject) => {
  214. let fullPath = buildURL$1(buildFullPath$1(config2.baseURL, config2.url), config2.params, config2.paramsSerializer);
  215. const _config = {
  216. url: fullPath,
  217. header: config2.header,
  218. complete: (response) => {
  219. config2.fullPath = fullPath;
  220. response.config = config2;
  221. response.rawData = response.data;
  222. try {
  223. let jsonParseHandle = false;
  224. const forcedJSONParsingType = typeof config2.forcedJSONParsing;
  225. if (forcedJSONParsingType === "boolean") {
  226. jsonParseHandle = config2.forcedJSONParsing;
  227. } else if (forcedJSONParsingType === "object") {
  228. const includesMethod = config2.forcedJSONParsing.include || [];
  229. jsonParseHandle = includesMethod.includes(config2.method);
  230. }
  231. if (jsonParseHandle && typeof response.data === "string") {
  232. response.data = JSON.parse(response.data);
  233. }
  234. } catch (e2) {
  235. }
  236. settle$1(resolve, reject, response);
  237. }
  238. };
  239. let requestTask;
  240. if (config2.method === "UPLOAD") {
  241. delete _config.header["content-type"];
  242. delete _config.header["Content-Type"];
  243. let otherConfig = {
  244. filePath: config2.filePath,
  245. name: config2.name
  246. };
  247. const optionalKeys = [
  248. "files",
  249. "timeout",
  250. "formData"
  251. ];
  252. requestTask = uni.uploadFile({ ..._config, ...otherConfig, ...mergeKeys$1(optionalKeys, config2) });
  253. } else if (config2.method === "DOWNLOAD") {
  254. const optionalKeys = [
  255. "timeout"
  256. ];
  257. requestTask = uni.downloadFile({ ..._config, ...mergeKeys$1(optionalKeys, config2) });
  258. } else {
  259. const optionalKeys = [
  260. "data",
  261. "method",
  262. "timeout",
  263. "dataType",
  264. "responseType",
  265. "sslVerify",
  266. "firstIpv4"
  267. ];
  268. requestTask = uni.request({ ..._config, ...mergeKeys$1(optionalKeys, config2) });
  269. }
  270. if (config2.getTask) {
  271. config2.getTask(requestTask, config2);
  272. }
  273. });
  274. };
  275. const dispatchRequest$1 = (config2) => {
  276. return adapter(config2);
  277. };
  278. function InterceptorManager$1() {
  279. this.handlers = [];
  280. }
  281. InterceptorManager$1.prototype.use = function use(fulfilled, rejected) {
  282. this.handlers.push({
  283. fulfilled,
  284. rejected
  285. });
  286. return this.handlers.length - 1;
  287. };
  288. InterceptorManager$1.prototype.eject = function eject(id) {
  289. if (this.handlers[id]) {
  290. this.handlers[id] = null;
  291. }
  292. };
  293. InterceptorManager$1.prototype.forEach = function forEach2(fn) {
  294. this.handlers.forEach((h2) => {
  295. if (h2 !== null) {
  296. fn(h2);
  297. }
  298. });
  299. };
  300. const mergeKeys = (keys, globalsConfig, config2) => {
  301. let config3 = {};
  302. keys.forEach((prop) => {
  303. if (!isUndefined$1(config2[prop])) {
  304. config3[prop] = config2[prop];
  305. } else if (!isUndefined$1(globalsConfig[prop])) {
  306. config3[prop] = globalsConfig[prop];
  307. }
  308. });
  309. return config3;
  310. };
  311. const mergeConfig$1 = (globalsConfig, config2 = {}) => {
  312. const method = config2.method || globalsConfig.method || "GET";
  313. let config3 = {
  314. baseURL: config2.baseURL || globalsConfig.baseURL || "",
  315. method,
  316. url: config2.url || "",
  317. params: config2.params || {},
  318. custom: { ...globalsConfig.custom || {}, ...config2.custom || {} },
  319. header: deepMerge$1(globalsConfig.header || {}, config2.header || {})
  320. };
  321. const defaultToConfig2Keys = ["getTask", "validateStatus", "paramsSerializer", "forcedJSONParsing"];
  322. config3 = { ...config3, ...mergeKeys(defaultToConfig2Keys, globalsConfig, config2) };
  323. if (method === "DOWNLOAD") {
  324. const downloadKeys = [
  325. "timeout"
  326. ];
  327. config3 = { ...config3, ...mergeKeys(downloadKeys, globalsConfig, config2) };
  328. } else if (method === "UPLOAD") {
  329. delete config3.header["content-type"];
  330. delete config3.header["Content-Type"];
  331. const uploadKeys = [
  332. "files",
  333. "filePath",
  334. "name",
  335. "timeout",
  336. "formData"
  337. ];
  338. uploadKeys.forEach((prop) => {
  339. if (!isUndefined$1(config2[prop])) {
  340. config3[prop] = config2[prop];
  341. }
  342. });
  343. if (isUndefined$1(config3.timeout) && !isUndefined$1(globalsConfig.timeout)) {
  344. config3["timeout"] = globalsConfig["timeout"];
  345. }
  346. } else {
  347. const defaultsKeys = [
  348. "data",
  349. "timeout",
  350. "dataType",
  351. "responseType",
  352. "sslVerify",
  353. "firstIpv4"
  354. ];
  355. config3 = { ...config3, ...mergeKeys(defaultsKeys, globalsConfig, config2) };
  356. }
  357. return config3;
  358. };
  359. const defaults$2 = {
  360. baseURL: "",
  361. header: {},
  362. method: "GET",
  363. dataType: "json",
  364. paramsSerializer: null,
  365. responseType: "text",
  366. custom: {},
  367. timeout: 6e4,
  368. sslVerify: true,
  369. firstIpv4: false,
  370. validateStatus: function validateStatus(status) {
  371. return status >= 200 && status < 300;
  372. },
  373. // 是否尝试将响应数据json化
  374. forcedJSONParsing: true
  375. };
  376. var clone = function() {
  377. function _instanceof(obj, type) {
  378. return type != null && obj instanceof type;
  379. }
  380. var nativeMap;
  381. try {
  382. nativeMap = Map;
  383. } catch (_2) {
  384. nativeMap = function() {
  385. };
  386. }
  387. var nativeSet;
  388. try {
  389. nativeSet = Set;
  390. } catch (_2) {
  391. nativeSet = function() {
  392. };
  393. }
  394. var nativePromise;
  395. try {
  396. nativePromise = Promise;
  397. } catch (_2) {
  398. nativePromise = function() {
  399. };
  400. }
  401. function clone2(parent2, circular, depth, prototype2, includeNonEnumerable) {
  402. if (typeof circular === "object") {
  403. depth = circular.depth;
  404. prototype2 = circular.prototype;
  405. includeNonEnumerable = circular.includeNonEnumerable;
  406. circular = circular.circular;
  407. }
  408. var allParents = [];
  409. var allChildren = [];
  410. var useBuffer = typeof Buffer != "undefined";
  411. if (typeof circular == "undefined")
  412. circular = true;
  413. if (typeof depth == "undefined")
  414. depth = Infinity;
  415. function _clone(parent3, depth2) {
  416. if (parent3 === null)
  417. return null;
  418. if (depth2 === 0)
  419. return parent3;
  420. var child;
  421. var proto;
  422. if (typeof parent3 != "object") {
  423. return parent3;
  424. }
  425. if (_instanceof(parent3, nativeMap)) {
  426. child = new nativeMap();
  427. } else if (_instanceof(parent3, nativeSet)) {
  428. child = new nativeSet();
  429. } else if (_instanceof(parent3, nativePromise)) {
  430. child = new nativePromise(function(resolve, reject) {
  431. parent3.then(function(value) {
  432. resolve(_clone(value, depth2 - 1));
  433. }, function(err) {
  434. reject(_clone(err, depth2 - 1));
  435. });
  436. });
  437. } else if (clone2.__isArray(parent3)) {
  438. child = [];
  439. } else if (clone2.__isRegExp(parent3)) {
  440. child = new RegExp(parent3.source, __getRegExpFlags(parent3));
  441. if (parent3.lastIndex)
  442. child.lastIndex = parent3.lastIndex;
  443. } else if (clone2.__isDate(parent3)) {
  444. child = new Date(parent3.getTime());
  445. } else if (useBuffer && Buffer.isBuffer(parent3)) {
  446. if (Buffer.from) {
  447. child = Buffer.from(parent3);
  448. } else {
  449. child = new Buffer(parent3.length);
  450. parent3.copy(child);
  451. }
  452. return child;
  453. } else if (_instanceof(parent3, Error)) {
  454. child = Object.create(parent3);
  455. } else {
  456. if (typeof prototype2 == "undefined") {
  457. proto = Object.getPrototypeOf(parent3);
  458. child = Object.create(proto);
  459. } else {
  460. child = Object.create(prototype2);
  461. proto = prototype2;
  462. }
  463. }
  464. if (circular) {
  465. var index2 = allParents.indexOf(parent3);
  466. if (index2 != -1) {
  467. return allChildren[index2];
  468. }
  469. allParents.push(parent3);
  470. allChildren.push(child);
  471. }
  472. if (_instanceof(parent3, nativeMap)) {
  473. parent3.forEach(function(value, key) {
  474. var keyChild = _clone(key, depth2 - 1);
  475. var valueChild = _clone(value, depth2 - 1);
  476. child.set(keyChild, valueChild);
  477. });
  478. }
  479. if (_instanceof(parent3, nativeSet)) {
  480. parent3.forEach(function(value) {
  481. var entryChild = _clone(value, depth2 - 1);
  482. child.add(entryChild);
  483. });
  484. }
  485. for (var i2 in parent3) {
  486. var attrs = Object.getOwnPropertyDescriptor(parent3, i2);
  487. if (attrs) {
  488. child[i2] = _clone(parent3[i2], depth2 - 1);
  489. }
  490. try {
  491. var objProperty = Object.getOwnPropertyDescriptor(parent3, i2);
  492. if (objProperty.set === "undefined") {
  493. continue;
  494. }
  495. child[i2] = _clone(parent3[i2], depth2 - 1);
  496. } catch (e2) {
  497. if (e2 instanceof TypeError) {
  498. continue;
  499. } else if (e2 instanceof ReferenceError) {
  500. continue;
  501. }
  502. }
  503. }
  504. if (Object.getOwnPropertySymbols) {
  505. var symbols = Object.getOwnPropertySymbols(parent3);
  506. for (var i2 = 0; i2 < symbols.length; i2++) {
  507. var symbol = symbols[i2];
  508. var descriptor = Object.getOwnPropertyDescriptor(parent3, symbol);
  509. if (descriptor && !descriptor.enumerable && !includeNonEnumerable) {
  510. continue;
  511. }
  512. child[symbol] = _clone(parent3[symbol], depth2 - 1);
  513. Object.defineProperty(child, symbol, descriptor);
  514. }
  515. }
  516. if (includeNonEnumerable) {
  517. var allPropertyNames = Object.getOwnPropertyNames(parent3);
  518. for (var i2 = 0; i2 < allPropertyNames.length; i2++) {
  519. var propertyName = allPropertyNames[i2];
  520. var descriptor = Object.getOwnPropertyDescriptor(parent3, propertyName);
  521. if (descriptor && descriptor.enumerable) {
  522. continue;
  523. }
  524. child[propertyName] = _clone(parent3[propertyName], depth2 - 1);
  525. Object.defineProperty(child, propertyName, descriptor);
  526. }
  527. }
  528. return child;
  529. }
  530. return _clone(parent2, depth);
  531. }
  532. clone2.clonePrototype = function clonePrototype(parent2) {
  533. if (parent2 === null)
  534. return null;
  535. var c2 = function() {
  536. };
  537. c2.prototype = parent2;
  538. return new c2();
  539. };
  540. function __objToStr(o2) {
  541. return Object.prototype.toString.call(o2);
  542. }
  543. clone2.__objToStr = __objToStr;
  544. function __isDate(o2) {
  545. return typeof o2 === "object" && __objToStr(o2) === "[object Date]";
  546. }
  547. clone2.__isDate = __isDate;
  548. function __isArray(o2) {
  549. return typeof o2 === "object" && __objToStr(o2) === "[object Array]";
  550. }
  551. clone2.__isArray = __isArray;
  552. function __isRegExp(o2) {
  553. return typeof o2 === "object" && __objToStr(o2) === "[object RegExp]";
  554. }
  555. clone2.__isRegExp = __isRegExp;
  556. function __getRegExpFlags(re2) {
  557. var flags = "";
  558. if (re2.global)
  559. flags += "g";
  560. if (re2.ignoreCase)
  561. flags += "i";
  562. if (re2.multiline)
  563. flags += "m";
  564. return flags;
  565. }
  566. clone2.__getRegExpFlags = __getRegExpFlags;
  567. return clone2;
  568. }();
  569. let Request$1 = class Request {
  570. /**
  571. * @param {Object} arg - 全局配置
  572. * @param {String} arg.baseURL - 全局根路径
  573. * @param {Object} arg.header - 全局header
  574. * @param {String} arg.method = [GET|POST|PUT|DELETE|CONNECT|HEAD|OPTIONS|TRACE] - 全局默认请求方式
  575. * @param {String} arg.dataType = [json] - 全局默认的dataType
  576. * @param {String} arg.responseType = [text|arraybuffer] - 全局默认的responseType。支付宝小程序不支持
  577. * @param {Object} arg.custom - 全局默认的自定义参数
  578. * @param {Number} arg.timeout - 全局默认的超时时间,单位 ms。默认60000。H5(HBuilderX 2.9.9+)、APP(HBuilderX 2.9.9+)、微信小程序(2.10.0)、支付宝小程序
  579. * @param {Boolean} arg.sslVerify - 全局默认的是否验证 ssl 证书。默认true.仅App安卓端支持(HBuilderX 2.3.3+)
  580. * @param {Boolean} arg.withCredentials - 全局默认的跨域请求时是否携带凭证(cookies)。默认false。仅H5支持(HBuilderX 2.6.15+)
  581. * @param {Boolean} arg.firstIpv4 - 全DNS解析时优先使用ipv4。默认false。仅 App-Android 支持 (HBuilderX 2.8.0+)
  582. * @param {Function(statusCode):Boolean} arg.validateStatus - 全局默认的自定义验证器。默认statusCode >= 200 && statusCode < 300
  583. */
  584. constructor(arg = {}) {
  585. if (!isPlainObject$3(arg)) {
  586. arg = {};
  587. formatAppLog("warn", "at node_modules/luch-request/src/lib/core/Request.js:37", "设置全局参数必须接收一个Object");
  588. }
  589. this.config = clone({ ...defaults$2, ...arg });
  590. this.interceptors = {
  591. request: new InterceptorManager$1(),
  592. response: new InterceptorManager$1()
  593. };
  594. }
  595. /**
  596. * @Function
  597. * @param {Request~setConfigCallback} f - 设置全局默认配置
  598. */
  599. setConfig(f2) {
  600. this.config = f2(this.config);
  601. }
  602. middleware(config2) {
  603. config2 = mergeConfig$1(this.config, config2);
  604. let chain = [dispatchRequest$1, void 0];
  605. let promise = Promise.resolve(config2);
  606. this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
  607. chain.unshift(interceptor.fulfilled, interceptor.rejected);
  608. });
  609. this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
  610. chain.push(interceptor.fulfilled, interceptor.rejected);
  611. });
  612. while (chain.length) {
  613. promise = promise.then(chain.shift(), chain.shift());
  614. }
  615. return promise;
  616. }
  617. /**
  618. * @Function
  619. * @param {Object} config - 请求配置项
  620. * @prop {String} options.url - 请求路径
  621. * @prop {Object} options.data - 请求参数
  622. * @prop {Object} [options.responseType = config.responseType] [text|arraybuffer] - 响应的数据类型
  623. * @prop {Object} [options.dataType = config.dataType] - 如果设为 json,会尝试对返回的数据做一次 JSON.parse
  624. * @prop {Object} [options.header = config.header] - 请求header
  625. * @prop {Object} [options.method = config.method] - 请求方法
  626. * @returns {Promise<unknown>}
  627. */
  628. request(config2 = {}) {
  629. return this.middleware(config2);
  630. }
  631. get(url2, options2 = {}) {
  632. return this.middleware({
  633. url: url2,
  634. method: "GET",
  635. ...options2
  636. });
  637. }
  638. post(url2, data, options2 = {}) {
  639. return this.middleware({
  640. url: url2,
  641. data,
  642. method: "POST",
  643. ...options2
  644. });
  645. }
  646. put(url2, data, options2 = {}) {
  647. return this.middleware({
  648. url: url2,
  649. data,
  650. method: "PUT",
  651. ...options2
  652. });
  653. }
  654. delete(url2, data, options2 = {}) {
  655. return this.middleware({
  656. url: url2,
  657. data,
  658. method: "DELETE",
  659. ...options2
  660. });
  661. }
  662. options(url2, data, options2 = {}) {
  663. return this.middleware({
  664. url: url2,
  665. data,
  666. method: "OPTIONS",
  667. ...options2
  668. });
  669. }
  670. upload(url2, config2 = {}) {
  671. config2.url = url2;
  672. config2.method = "UPLOAD";
  673. return this.middleware(config2);
  674. }
  675. download(url2, config2 = {}) {
  676. config2.url = url2;
  677. config2.method = "DOWNLOAD";
  678. return this.middleware(config2);
  679. }
  680. get version() {
  681. return "3.1.0";
  682. }
  683. };
  684. let baseUrl;
  685. {
  686. baseUrl = "https://zxgz.newfeifan.cn";
  687. }
  688. const apiPath = "/app-api";
  689. const staticUrl = "http://localhost";
  690. const DiyApi = {
  691. getUsedDiyTemplate: () => {
  692. return request$1({
  693. url: "/promotion/diy-template/used",
  694. method: "GET",
  695. custom: {
  696. showError: false,
  697. showLoading: false
  698. }
  699. });
  700. },
  701. getDiyTemplate: (id) => {
  702. return request$1({
  703. url: "/promotion/diy-template/get",
  704. method: "GET",
  705. params: {
  706. id
  707. },
  708. custom: {
  709. showError: false,
  710. showLoading: false
  711. }
  712. });
  713. },
  714. getDiyPage: (id) => {
  715. return request$1({
  716. url: "/promotion/diy-page/get",
  717. method: "GET",
  718. params: {
  719. id
  720. }
  721. });
  722. }
  723. };
  724. const __vite_glob_0_29 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  725. __proto__: null,
  726. default: DiyApi
  727. }, Symbol.toStringTag, { value: "Module" }));
  728. var isVue2 = false;
  729. function set(target, key, val) {
  730. if (Array.isArray(target)) {
  731. target.length = Math.max(target.length, key);
  732. target.splice(key, 1, val);
  733. return val;
  734. }
  735. target[key] = val;
  736. return val;
  737. }
  738. function del(target, key) {
  739. if (Array.isArray(target)) {
  740. target.splice(key, 1);
  741. return;
  742. }
  743. delete target[key];
  744. }
  745. function getDevtoolsGlobalHook$1() {
  746. return getTarget$1().__VUE_DEVTOOLS_GLOBAL_HOOK__;
  747. }
  748. function getTarget$1() {
  749. return typeof navigator !== "undefined" && typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {};
  750. }
  751. const isProxyAvailable$1 = typeof Proxy === "function";
  752. const HOOK_SETUP$1 = "devtools-plugin:setup";
  753. const HOOK_PLUGIN_SETTINGS_SET$1 = "plugin:settings:set";
  754. let supported;
  755. let perf;
  756. function isPerformanceSupported() {
  757. var _a2;
  758. if (supported !== void 0) {
  759. return supported;
  760. }
  761. if (typeof window !== "undefined" && window.performance) {
  762. supported = true;
  763. perf = window.performance;
  764. } else if (typeof global !== "undefined" && ((_a2 = global.perf_hooks) === null || _a2 === void 0 ? void 0 : _a2.performance)) {
  765. supported = true;
  766. perf = global.perf_hooks.performance;
  767. } else {
  768. supported = false;
  769. }
  770. return supported;
  771. }
  772. function now() {
  773. return isPerformanceSupported() ? perf.now() : Date.now();
  774. }
  775. let ApiProxy$1 = class ApiProxy {
  776. constructor(plugin, hook) {
  777. this.target = null;
  778. this.targetQueue = [];
  779. this.onQueue = [];
  780. this.plugin = plugin;
  781. this.hook = hook;
  782. const defaultSettings = {};
  783. if (plugin.settings) {
  784. for (const id in plugin.settings) {
  785. const item = plugin.settings[id];
  786. defaultSettings[id] = item.defaultValue;
  787. }
  788. }
  789. const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`;
  790. let currentSettings = Object.assign({}, defaultSettings);
  791. try {
  792. const raw = localStorage.getItem(localSettingsSaveId);
  793. const data = JSON.parse(raw);
  794. Object.assign(currentSettings, data);
  795. } catch (e2) {
  796. }
  797. this.fallbacks = {
  798. getSettings() {
  799. return currentSettings;
  800. },
  801. setSettings(value) {
  802. try {
  803. localStorage.setItem(localSettingsSaveId, JSON.stringify(value));
  804. } catch (e2) {
  805. }
  806. currentSettings = value;
  807. },
  808. now() {
  809. return now();
  810. }
  811. };
  812. if (hook) {
  813. hook.on(HOOK_PLUGIN_SETTINGS_SET$1, (pluginId, value) => {
  814. if (pluginId === this.plugin.id) {
  815. this.fallbacks.setSettings(value);
  816. }
  817. });
  818. }
  819. this.proxiedOn = new Proxy({}, {
  820. get: (_target, prop) => {
  821. if (this.target) {
  822. return this.target.on[prop];
  823. } else {
  824. return (...args) => {
  825. this.onQueue.push({
  826. method: prop,
  827. args
  828. });
  829. };
  830. }
  831. }
  832. });
  833. this.proxiedTarget = new Proxy({}, {
  834. get: (_target, prop) => {
  835. if (this.target) {
  836. return this.target[prop];
  837. } else if (prop === "on") {
  838. return this.proxiedOn;
  839. } else if (Object.keys(this.fallbacks).includes(prop)) {
  840. return (...args) => {
  841. this.targetQueue.push({
  842. method: prop,
  843. args,
  844. resolve: () => {
  845. }
  846. });
  847. return this.fallbacks[prop](...args);
  848. };
  849. } else {
  850. return (...args) => {
  851. return new Promise((resolve) => {
  852. this.targetQueue.push({
  853. method: prop,
  854. args,
  855. resolve
  856. });
  857. });
  858. };
  859. }
  860. }
  861. });
  862. }
  863. async setRealTarget(target) {
  864. this.target = target;
  865. for (const item of this.onQueue) {
  866. this.target.on[item.method](...item.args);
  867. }
  868. for (const item of this.targetQueue) {
  869. item.resolve(await this.target[item.method](...item.args));
  870. }
  871. }
  872. };
  873. function setupDevtoolsPlugin$1(pluginDescriptor, setupFn) {
  874. const descriptor = pluginDescriptor;
  875. const target = getTarget$1();
  876. const hook = getDevtoolsGlobalHook$1();
  877. const enableProxy = isProxyAvailable$1 && descriptor.enableEarlyProxy;
  878. if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) {
  879. hook.emit(HOOK_SETUP$1, pluginDescriptor, setupFn);
  880. } else {
  881. const proxy = enableProxy ? new ApiProxy$1(descriptor, hook) : null;
  882. const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];
  883. list.push({
  884. pluginDescriptor: descriptor,
  885. setupFn,
  886. proxy
  887. });
  888. if (proxy)
  889. setupFn(proxy.proxiedTarget);
  890. }
  891. }
  892. /*!
  893. * pinia v2.1.7
  894. * (c) 2023 Eduardo San Martin Morote
  895. * @license MIT
  896. */
  897. let activePinia;
  898. const setActivePinia = (pinia) => activePinia = pinia;
  899. const piniaSymbol = Symbol("pinia");
  900. function isPlainObject$2(o2) {
  901. return o2 && typeof o2 === "object" && Object.prototype.toString.call(o2) === "[object Object]" && typeof o2.toJSON !== "function";
  902. }
  903. var MutationType;
  904. (function(MutationType2) {
  905. MutationType2["direct"] = "direct";
  906. MutationType2["patchObject"] = "patch object";
  907. MutationType2["patchFunction"] = "patch function";
  908. })(MutationType || (MutationType = {}));
  909. const IS_CLIENT = typeof window !== "undefined";
  910. const USE_DEVTOOLS = IS_CLIENT;
  911. const _global$1 = /* @__PURE__ */ (() => typeof window === "object" && window.window === window ? window : typeof self === "object" && self.self === self ? self : typeof global === "object" && global.global === global ? global : typeof globalThis === "object" ? globalThis : { HTMLElement: null })();
  912. function bom(blob, { autoBom = false } = {}) {
  913. if (autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) {
  914. return new Blob([String.fromCharCode(65279), blob], { type: blob.type });
  915. }
  916. return blob;
  917. }
  918. function download(url2, name2, opts) {
  919. const xhr = new XMLHttpRequest();
  920. xhr.open("GET", url2);
  921. xhr.responseType = "blob";
  922. xhr.onload = function() {
  923. saveAs(xhr.response, name2, opts);
  924. };
  925. xhr.onerror = function() {
  926. console.error("could not download file");
  927. };
  928. xhr.send();
  929. }
  930. function corsEnabled(url2) {
  931. const xhr = new XMLHttpRequest();
  932. xhr.open("HEAD", url2, false);
  933. try {
  934. xhr.send();
  935. } catch (e2) {
  936. }
  937. return xhr.status >= 200 && xhr.status <= 299;
  938. }
  939. function click(node2) {
  940. try {
  941. node2.dispatchEvent(new MouseEvent("click"));
  942. } catch (e2) {
  943. const evt = document.createEvent("MouseEvents");
  944. evt.initMouseEvent("click", true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null);
  945. node2.dispatchEvent(evt);
  946. }
  947. }
  948. const _navigator$1 = typeof navigator === "object" ? navigator : { userAgent: "" };
  949. const isMacOSWebView = /* @__PURE__ */ (() => /Macintosh/.test(_navigator$1.userAgent) && /AppleWebKit/.test(_navigator$1.userAgent) && !/Safari/.test(_navigator$1.userAgent))();
  950. const saveAs = !IS_CLIENT ? () => {
  951. } : (
  952. // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program
  953. typeof HTMLAnchorElement !== "undefined" && "download" in HTMLAnchorElement.prototype && !isMacOSWebView ? downloadSaveAs : (
  954. // Use msSaveOrOpenBlob as a second approach
  955. "msSaveOrOpenBlob" in _navigator$1 ? msSaveAs : (
  956. // Fallback to using FileReader and a popup
  957. fileSaverSaveAs
  958. )
  959. )
  960. );
  961. function downloadSaveAs(blob, name2 = "download", opts) {
  962. const a2 = document.createElement("a");
  963. a2.download = name2;
  964. a2.rel = "noopener";
  965. if (typeof blob === "string") {
  966. a2.href = blob;
  967. if (a2.origin !== location.origin) {
  968. if (corsEnabled(a2.href)) {
  969. download(blob, name2, opts);
  970. } else {
  971. a2.target = "_blank";
  972. click(a2);
  973. }
  974. } else {
  975. click(a2);
  976. }
  977. } else {
  978. a2.href = URL.createObjectURL(blob);
  979. setTimeout(function() {
  980. URL.revokeObjectURL(a2.href);
  981. }, 4e4);
  982. setTimeout(function() {
  983. click(a2);
  984. }, 0);
  985. }
  986. }
  987. function msSaveAs(blob, name2 = "download", opts) {
  988. if (typeof blob === "string") {
  989. if (corsEnabled(blob)) {
  990. download(blob, name2, opts);
  991. } else {
  992. const a2 = document.createElement("a");
  993. a2.href = blob;
  994. a2.target = "_blank";
  995. setTimeout(function() {
  996. click(a2);
  997. });
  998. }
  999. } else {
  1000. navigator.msSaveOrOpenBlob(bom(blob, opts), name2);
  1001. }
  1002. }
  1003. function fileSaverSaveAs(blob, name2, opts, popup) {
  1004. popup = popup || open("", "_blank");
  1005. if (popup) {
  1006. popup.document.title = popup.document.body.innerText = "downloading...";
  1007. }
  1008. if (typeof blob === "string")
  1009. return download(blob, name2, opts);
  1010. const force = blob.type === "application/octet-stream";
  1011. const isSafari = /constructor/i.test(String(_global$1.HTMLElement)) || "safari" in _global$1;
  1012. const isChromeIOS = /CriOS\/[\d]+/.test(navigator.userAgent);
  1013. if ((isChromeIOS || force && isSafari || isMacOSWebView) && typeof FileReader !== "undefined") {
  1014. const reader = new FileReader();
  1015. reader.onloadend = function() {
  1016. let url2 = reader.result;
  1017. if (typeof url2 !== "string") {
  1018. popup = null;
  1019. throw new Error("Wrong reader.result type");
  1020. }
  1021. url2 = isChromeIOS ? url2 : url2.replace(/^data:[^;]*;/, "data:attachment/file;");
  1022. if (popup) {
  1023. popup.location.href = url2;
  1024. } else {
  1025. location.assign(url2);
  1026. }
  1027. popup = null;
  1028. };
  1029. reader.readAsDataURL(blob);
  1030. } else {
  1031. const url2 = URL.createObjectURL(blob);
  1032. if (popup)
  1033. popup.location.assign(url2);
  1034. else
  1035. location.href = url2;
  1036. popup = null;
  1037. setTimeout(function() {
  1038. URL.revokeObjectURL(url2);
  1039. }, 4e4);
  1040. }
  1041. }
  1042. function toastMessage(message, type) {
  1043. const piniaMessage = "🍍 " + message;
  1044. if (typeof __VUE_DEVTOOLS_TOAST__ === "function") {
  1045. __VUE_DEVTOOLS_TOAST__(piniaMessage, type);
  1046. } else if (type === "error") {
  1047. console.error(piniaMessage);
  1048. } else if (type === "warn") {
  1049. console.warn(piniaMessage);
  1050. } else {
  1051. console.log(piniaMessage);
  1052. }
  1053. }
  1054. function isPinia(o2) {
  1055. return "_a" in o2 && "install" in o2;
  1056. }
  1057. function checkClipboardAccess() {
  1058. if (!("clipboard" in navigator)) {
  1059. toastMessage(`Your browser doesn't support the Clipboard API`, "error");
  1060. return true;
  1061. }
  1062. }
  1063. function checkNotFocusedError(error2) {
  1064. if (error2 instanceof Error && error2.message.toLowerCase().includes("document is not focused")) {
  1065. toastMessage('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn");
  1066. return true;
  1067. }
  1068. return false;
  1069. }
  1070. async function actionGlobalCopyState(pinia) {
  1071. if (checkClipboardAccess())
  1072. return;
  1073. try {
  1074. await navigator.clipboard.writeText(JSON.stringify(pinia.state.value));
  1075. toastMessage("Global state copied to clipboard.");
  1076. } catch (error2) {
  1077. if (checkNotFocusedError(error2))
  1078. return;
  1079. toastMessage(`Failed to serialize the state. Check the console for more details.`, "error");
  1080. console.error(error2);
  1081. }
  1082. }
  1083. async function actionGlobalPasteState(pinia) {
  1084. if (checkClipboardAccess())
  1085. return;
  1086. try {
  1087. loadStoresState(pinia, JSON.parse(await navigator.clipboard.readText()));
  1088. toastMessage("Global state pasted from clipboard.");
  1089. } catch (error2) {
  1090. if (checkNotFocusedError(error2))
  1091. return;
  1092. toastMessage(`Failed to deserialize the state from clipboard. Check the console for more details.`, "error");
  1093. console.error(error2);
  1094. }
  1095. }
  1096. async function actionGlobalSaveState(pinia) {
  1097. try {
  1098. saveAs(new Blob([JSON.stringify(pinia.state.value)], {
  1099. type: "text/plain;charset=utf-8"
  1100. }), "pinia-state.json");
  1101. } catch (error2) {
  1102. toastMessage(`Failed to export the state as JSON. Check the console for more details.`, "error");
  1103. console.error(error2);
  1104. }
  1105. }
  1106. let fileInput;
  1107. function getFileOpener() {
  1108. if (!fileInput) {
  1109. fileInput = document.createElement("input");
  1110. fileInput.type = "file";
  1111. fileInput.accept = ".json";
  1112. }
  1113. function openFile() {
  1114. return new Promise((resolve, reject) => {
  1115. fileInput.onchange = async () => {
  1116. const files2 = fileInput.files;
  1117. if (!files2)
  1118. return resolve(null);
  1119. const file = files2.item(0);
  1120. if (!file)
  1121. return resolve(null);
  1122. return resolve({ text: await file.text(), file });
  1123. };
  1124. fileInput.oncancel = () => resolve(null);
  1125. fileInput.onerror = reject;
  1126. fileInput.click();
  1127. });
  1128. }
  1129. return openFile;
  1130. }
  1131. async function actionGlobalOpenStateFile(pinia) {
  1132. try {
  1133. const open2 = getFileOpener();
  1134. const result2 = await open2();
  1135. if (!result2)
  1136. return;
  1137. const { text, file } = result2;
  1138. loadStoresState(pinia, JSON.parse(text));
  1139. toastMessage(`Global state imported from "${file.name}".`);
  1140. } catch (error2) {
  1141. toastMessage(`Failed to import the state from JSON. Check the console for more details.`, "error");
  1142. console.error(error2);
  1143. }
  1144. }
  1145. function loadStoresState(pinia, state) {
  1146. for (const key in state) {
  1147. const storeState = pinia.state.value[key];
  1148. if (storeState) {
  1149. Object.assign(storeState, state[key]);
  1150. } else {
  1151. pinia.state.value[key] = state[key];
  1152. }
  1153. }
  1154. }
  1155. function formatDisplay(display) {
  1156. return {
  1157. _custom: {
  1158. display
  1159. }
  1160. };
  1161. }
  1162. const PINIA_ROOT_LABEL = "🍍 Pinia (root)";
  1163. const PINIA_ROOT_ID = "_root";
  1164. function formatStoreForInspectorTree(store) {
  1165. return isPinia(store) ? {
  1166. id: PINIA_ROOT_ID,
  1167. label: PINIA_ROOT_LABEL
  1168. } : {
  1169. id: store.$id,
  1170. label: store.$id
  1171. };
  1172. }
  1173. function formatStoreForInspectorState(store) {
  1174. if (isPinia(store)) {
  1175. const storeNames = Array.from(store._s.keys());
  1176. const storeMap = store._s;
  1177. const state2 = {
  1178. state: storeNames.map((storeId) => ({
  1179. editable: true,
  1180. key: storeId,
  1181. value: store.state.value[storeId]
  1182. })),
  1183. getters: storeNames.filter((id) => storeMap.get(id)._getters).map((id) => {
  1184. const store2 = storeMap.get(id);
  1185. return {
  1186. editable: false,
  1187. key: id,
  1188. value: store2._getters.reduce((getters, key) => {
  1189. getters[key] = store2[key];
  1190. return getters;
  1191. }, {})
  1192. };
  1193. })
  1194. };
  1195. return state2;
  1196. }
  1197. const state = {
  1198. state: Object.keys(store.$state).map((key) => ({
  1199. editable: true,
  1200. key,
  1201. value: store.$state[key]
  1202. }))
  1203. };
  1204. if (store._getters && store._getters.length) {
  1205. state.getters = store._getters.map((getterName) => ({
  1206. editable: false,
  1207. key: getterName,
  1208. value: store[getterName]
  1209. }));
  1210. }
  1211. if (store._customProperties.size) {
  1212. state.customProperties = Array.from(store._customProperties).map((key) => ({
  1213. editable: true,
  1214. key,
  1215. value: store[key]
  1216. }));
  1217. }
  1218. return state;
  1219. }
  1220. function formatEventData(events) {
  1221. if (!events)
  1222. return {};
  1223. if (Array.isArray(events)) {
  1224. return events.reduce((data, event) => {
  1225. data.keys.push(event.key);
  1226. data.operations.push(event.type);
  1227. data.oldValue[event.key] = event.oldValue;
  1228. data.newValue[event.key] = event.newValue;
  1229. return data;
  1230. }, {
  1231. oldValue: {},
  1232. keys: [],
  1233. operations: [],
  1234. newValue: {}
  1235. });
  1236. } else {
  1237. return {
  1238. operation: formatDisplay(events.type),
  1239. key: formatDisplay(events.key),
  1240. oldValue: events.oldValue,
  1241. newValue: events.newValue
  1242. };
  1243. }
  1244. }
  1245. function formatMutationType(type) {
  1246. switch (type) {
  1247. case MutationType.direct:
  1248. return "mutation";
  1249. case MutationType.patchFunction:
  1250. return "$patch";
  1251. case MutationType.patchObject:
  1252. return "$patch";
  1253. default:
  1254. return "unknown";
  1255. }
  1256. }
  1257. let isTimelineActive = true;
  1258. const componentStateTypes = [];
  1259. const MUTATIONS_LAYER_ID = "pinia:mutations";
  1260. const INSPECTOR_ID = "pinia";
  1261. const { assign: assign$1 } = Object;
  1262. const getStoreType = (id) => "🍍 " + id;
  1263. function registerPiniaDevtools(app2, pinia) {
  1264. setupDevtoolsPlugin$1({
  1265. id: "dev.esm.pinia",
  1266. label: "Pinia 🍍",
  1267. logo: "https://pinia.vuejs.org/logo.svg",
  1268. packageName: "pinia",
  1269. homepage: "https://pinia.vuejs.org",
  1270. componentStateTypes,
  1271. app: app2
  1272. }, (api2) => {
  1273. if (typeof api2.now !== "function") {
  1274. toastMessage("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.");
  1275. }
  1276. api2.addTimelineLayer({
  1277. id: MUTATIONS_LAYER_ID,
  1278. label: `Pinia 🍍`,
  1279. color: 15064968
  1280. });
  1281. api2.addInspector({
  1282. id: INSPECTOR_ID,
  1283. label: "Pinia 🍍",
  1284. icon: "storage",
  1285. treeFilterPlaceholder: "Search stores",
  1286. actions: [
  1287. {
  1288. icon: "content_copy",
  1289. action: () => {
  1290. actionGlobalCopyState(pinia);
  1291. },
  1292. tooltip: "Serialize and copy the state"
  1293. },
  1294. {
  1295. icon: "content_paste",
  1296. action: async () => {
  1297. await actionGlobalPasteState(pinia);
  1298. api2.sendInspectorTree(INSPECTOR_ID);
  1299. api2.sendInspectorState(INSPECTOR_ID);
  1300. },
  1301. tooltip: "Replace the state with the content of your clipboard"
  1302. },
  1303. {
  1304. icon: "save",
  1305. action: () => {
  1306. actionGlobalSaveState(pinia);
  1307. },
  1308. tooltip: "Save the state as a JSON file"
  1309. },
  1310. {
  1311. icon: "folder_open",
  1312. action: async () => {
  1313. await actionGlobalOpenStateFile(pinia);
  1314. api2.sendInspectorTree(INSPECTOR_ID);
  1315. api2.sendInspectorState(INSPECTOR_ID);
  1316. },
  1317. tooltip: "Import the state from a JSON file"
  1318. }
  1319. ],
  1320. nodeActions: [
  1321. {
  1322. icon: "restore",
  1323. tooltip: 'Reset the state (with "$reset")',
  1324. action: (nodeId) => {
  1325. const store = pinia._s.get(nodeId);
  1326. if (!store) {
  1327. toastMessage(`Cannot reset "${nodeId}" store because it wasn't found.`, "warn");
  1328. } else if (typeof store.$reset !== "function") {
  1329. toastMessage(`Cannot reset "${nodeId}" store because it doesn't have a "$reset" method implemented.`, "warn");
  1330. } else {
  1331. store.$reset();
  1332. toastMessage(`Store "${nodeId}" reset.`);
  1333. }
  1334. }
  1335. }
  1336. ]
  1337. });
  1338. api2.on.inspectComponent((payload, ctx) => {
  1339. const proxy = payload.componentInstance && payload.componentInstance.proxy;
  1340. if (proxy && proxy._pStores) {
  1341. const piniaStores = payload.componentInstance.proxy._pStores;
  1342. Object.values(piniaStores).forEach((store) => {
  1343. payload.instanceData.state.push({
  1344. type: getStoreType(store.$id),
  1345. key: "state",
  1346. editable: true,
  1347. value: store._isOptionsAPI ? {
  1348. _custom: {
  1349. value: vue.toRaw(store.$state),
  1350. actions: [
  1351. {
  1352. icon: "restore",
  1353. tooltip: "Reset the state of this store",
  1354. action: () => store.$reset()
  1355. }
  1356. ]
  1357. }
  1358. } : (
  1359. // NOTE: workaround to unwrap transferred refs
  1360. Object.keys(store.$state).reduce((state, key) => {
  1361. state[key] = store.$state[key];
  1362. return state;
  1363. }, {})
  1364. )
  1365. });
  1366. if (store._getters && store._getters.length) {
  1367. payload.instanceData.state.push({
  1368. type: getStoreType(store.$id),
  1369. key: "getters",
  1370. editable: false,
  1371. value: store._getters.reduce((getters, key) => {
  1372. try {
  1373. getters[key] = store[key];
  1374. } catch (error2) {
  1375. getters[key] = error2;
  1376. }
  1377. return getters;
  1378. }, {})
  1379. });
  1380. }
  1381. });
  1382. }
  1383. });
  1384. api2.on.getInspectorTree((payload) => {
  1385. if (payload.app === app2 && payload.inspectorId === INSPECTOR_ID) {
  1386. let stores = [pinia];
  1387. stores = stores.concat(Array.from(pinia._s.values()));
  1388. payload.rootNodes = (payload.filter ? stores.filter((store) => "$id" in store ? store.$id.toLowerCase().includes(payload.filter.toLowerCase()) : PINIA_ROOT_LABEL.toLowerCase().includes(payload.filter.toLowerCase())) : stores).map(formatStoreForInspectorTree);
  1389. }
  1390. });
  1391. api2.on.getInspectorState((payload) => {
  1392. if (payload.app === app2 && payload.inspectorId === INSPECTOR_ID) {
  1393. const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia : pinia._s.get(payload.nodeId);
  1394. if (!inspectedStore) {
  1395. return;
  1396. }
  1397. if (inspectedStore) {
  1398. payload.state = formatStoreForInspectorState(inspectedStore);
  1399. }
  1400. }
  1401. });
  1402. api2.on.editInspectorState((payload, ctx) => {
  1403. if (payload.app === app2 && payload.inspectorId === INSPECTOR_ID) {
  1404. const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia : pinia._s.get(payload.nodeId);
  1405. if (!inspectedStore) {
  1406. return toastMessage(`store "${payload.nodeId}" not found`, "error");
  1407. }
  1408. const { path } = payload;
  1409. if (!isPinia(inspectedStore)) {
  1410. if (path.length !== 1 || !inspectedStore._customProperties.has(path[0]) || path[0] in inspectedStore.$state) {
  1411. path.unshift("$state");
  1412. }
  1413. } else {
  1414. path.unshift("state");
  1415. }
  1416. isTimelineActive = false;
  1417. payload.set(inspectedStore, path, payload.state.value);
  1418. isTimelineActive = true;
  1419. }
  1420. });
  1421. api2.on.editComponentState((payload) => {
  1422. if (payload.type.startsWith("🍍")) {
  1423. const storeId = payload.type.replace(/^🍍\s*/, "");
  1424. const store = pinia._s.get(storeId);
  1425. if (!store) {
  1426. return toastMessage(`store "${storeId}" not found`, "error");
  1427. }
  1428. const { path } = payload;
  1429. if (path[0] !== "state") {
  1430. return toastMessage(`Invalid path for store "${storeId}":
  1431. ${path}
  1432. Only state can be modified.`);
  1433. }
  1434. path[0] = "$state";
  1435. isTimelineActive = false;
  1436. payload.set(store, path, payload.state.value);
  1437. isTimelineActive = true;
  1438. }
  1439. });
  1440. });
  1441. }
  1442. function addStoreToDevtools(app2, store) {
  1443. if (!componentStateTypes.includes(getStoreType(store.$id))) {
  1444. componentStateTypes.push(getStoreType(store.$id));
  1445. }
  1446. setupDevtoolsPlugin$1({
  1447. id: "dev.esm.pinia",
  1448. label: "Pinia 🍍",
  1449. logo: "https://pinia.vuejs.org/logo.svg",
  1450. packageName: "pinia",
  1451. homepage: "https://pinia.vuejs.org",
  1452. componentStateTypes,
  1453. app: app2,
  1454. settings: {
  1455. logStoreChanges: {
  1456. label: "Notify about new/deleted stores",
  1457. type: "boolean",
  1458. defaultValue: true
  1459. }
  1460. // useEmojis: {
  1461. // label: 'Use emojis in messages ⚡️',
  1462. // type: 'boolean',
  1463. // defaultValue: true,
  1464. // },
  1465. }
  1466. }, (api2) => {
  1467. const now2 = typeof api2.now === "function" ? api2.now.bind(api2) : Date.now;
  1468. store.$onAction(({ after, onError: onError2, name: name2, args }) => {
  1469. const groupId = runningActionId++;
  1470. api2.addTimelineEvent({
  1471. layerId: MUTATIONS_LAYER_ID,
  1472. event: {
  1473. time: now2(),
  1474. title: "🛫 " + name2,
  1475. subtitle: "start",
  1476. data: {
  1477. store: formatDisplay(store.$id),
  1478. action: formatDisplay(name2),
  1479. args
  1480. },
  1481. groupId
  1482. }
  1483. });
  1484. after((result2) => {
  1485. activeAction = void 0;
  1486. api2.addTimelineEvent({
  1487. layerId: MUTATIONS_LAYER_ID,
  1488. event: {
  1489. time: now2(),
  1490. title: "🛬 " + name2,
  1491. subtitle: "end",
  1492. data: {
  1493. store: formatDisplay(store.$id),
  1494. action: formatDisplay(name2),
  1495. args,
  1496. result: result2
  1497. },
  1498. groupId
  1499. }
  1500. });
  1501. });
  1502. onError2((error2) => {
  1503. activeAction = void 0;
  1504. api2.addTimelineEvent({
  1505. layerId: MUTATIONS_LAYER_ID,
  1506. event: {
  1507. time: now2(),
  1508. logType: "error",
  1509. title: "💥 " + name2,
  1510. subtitle: "end",
  1511. data: {
  1512. store: formatDisplay(store.$id),
  1513. action: formatDisplay(name2),
  1514. args,
  1515. error: error2
  1516. },
  1517. groupId
  1518. }
  1519. });
  1520. });
  1521. }, true);
  1522. store._customProperties.forEach((name2) => {
  1523. vue.watch(() => vue.unref(store[name2]), (newValue, oldValue) => {
  1524. api2.notifyComponentUpdate();
  1525. api2.sendInspectorState(INSPECTOR_ID);
  1526. if (isTimelineActive) {
  1527. api2.addTimelineEvent({
  1528. layerId: MUTATIONS_LAYER_ID,
  1529. event: {
  1530. time: now2(),
  1531. title: "Change",
  1532. subtitle: name2,
  1533. data: {
  1534. newValue,
  1535. oldValue
  1536. },
  1537. groupId: activeAction
  1538. }
  1539. });
  1540. }
  1541. }, { deep: true });
  1542. });
  1543. store.$subscribe(({ events, type }, state) => {
  1544. api2.notifyComponentUpdate();
  1545. api2.sendInspectorState(INSPECTOR_ID);
  1546. if (!isTimelineActive)
  1547. return;
  1548. const eventData = {
  1549. time: now2(),
  1550. title: formatMutationType(type),
  1551. data: assign$1({ store: formatDisplay(store.$id) }, formatEventData(events)),
  1552. groupId: activeAction
  1553. };
  1554. if (type === MutationType.patchFunction) {
  1555. eventData.subtitle = "⤵️";
  1556. } else if (type === MutationType.patchObject) {
  1557. eventData.subtitle = "🧩";
  1558. } else if (events && !Array.isArray(events)) {
  1559. eventData.subtitle = events.type;
  1560. }
  1561. if (events) {
  1562. eventData.data["rawEvent(s)"] = {
  1563. _custom: {
  1564. display: "DebuggerEvent",
  1565. type: "object",
  1566. tooltip: "raw DebuggerEvent[]",
  1567. value: events
  1568. }
  1569. };
  1570. }
  1571. api2.addTimelineEvent({
  1572. layerId: MUTATIONS_LAYER_ID,
  1573. event: eventData
  1574. });
  1575. }, { detached: true, flush: "sync" });
  1576. const hotUpdate = store._hotUpdate;
  1577. store._hotUpdate = vue.markRaw((newStore) => {
  1578. hotUpdate(newStore);
  1579. api2.addTimelineEvent({
  1580. layerId: MUTATIONS_LAYER_ID,
  1581. event: {
  1582. time: now2(),
  1583. title: "🔥 " + store.$id,
  1584. subtitle: "HMR update",
  1585. data: {
  1586. store: formatDisplay(store.$id),
  1587. info: formatDisplay(`HMR update`)
  1588. }
  1589. }
  1590. });
  1591. api2.notifyComponentUpdate();
  1592. api2.sendInspectorTree(INSPECTOR_ID);
  1593. api2.sendInspectorState(INSPECTOR_ID);
  1594. });
  1595. const { $dispose } = store;
  1596. store.$dispose = () => {
  1597. $dispose();
  1598. api2.notifyComponentUpdate();
  1599. api2.sendInspectorTree(INSPECTOR_ID);
  1600. api2.sendInspectorState(INSPECTOR_ID);
  1601. api2.getSettings().logStoreChanges && toastMessage(`Disposed "${store.$id}" store 🗑`);
  1602. };
  1603. api2.notifyComponentUpdate();
  1604. api2.sendInspectorTree(INSPECTOR_ID);
  1605. api2.sendInspectorState(INSPECTOR_ID);
  1606. api2.getSettings().logStoreChanges && toastMessage(`"${store.$id}" store installed 🆕`);
  1607. });
  1608. }
  1609. let runningActionId = 0;
  1610. let activeAction;
  1611. function patchActionForGrouping(store, actionNames, wrapWithProxy) {
  1612. const actions = actionNames.reduce((storeActions, actionName) => {
  1613. storeActions[actionName] = vue.toRaw(store)[actionName];
  1614. return storeActions;
  1615. }, {});
  1616. for (const actionName in actions) {
  1617. store[actionName] = function() {
  1618. const _actionId = runningActionId;
  1619. const trackedStore = wrapWithProxy ? new Proxy(store, {
  1620. get(...args) {
  1621. activeAction = _actionId;
  1622. return Reflect.get(...args);
  1623. },
  1624. set(...args) {
  1625. activeAction = _actionId;
  1626. return Reflect.set(...args);
  1627. }
  1628. }) : store;
  1629. activeAction = _actionId;
  1630. const retValue = actions[actionName].apply(trackedStore, arguments);
  1631. activeAction = void 0;
  1632. return retValue;
  1633. };
  1634. }
  1635. }
  1636. function devtoolsPlugin({ app: app2, store, options: options2 }) {
  1637. if (store.$id.startsWith("__hot:")) {
  1638. return;
  1639. }
  1640. store._isOptionsAPI = !!options2.state;
  1641. patchActionForGrouping(store, Object.keys(options2.actions), store._isOptionsAPI);
  1642. const originalHotUpdate = store._hotUpdate;
  1643. vue.toRaw(store)._hotUpdate = function(newStore) {
  1644. originalHotUpdate.apply(this, arguments);
  1645. patchActionForGrouping(store, Object.keys(newStore._hmrPayload.actions), !!store._isOptionsAPI);
  1646. };
  1647. addStoreToDevtools(
  1648. app2,
  1649. // FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
  1650. store
  1651. );
  1652. }
  1653. function createPinia() {
  1654. const scope = vue.effectScope(true);
  1655. const state = scope.run(() => vue.ref({}));
  1656. let _p = [];
  1657. let toBeInstalled = [];
  1658. const pinia = vue.markRaw({
  1659. install(app2) {
  1660. setActivePinia(pinia);
  1661. {
  1662. pinia._a = app2;
  1663. app2.provide(piniaSymbol, pinia);
  1664. app2.config.globalProperties.$pinia = pinia;
  1665. if (USE_DEVTOOLS) {
  1666. registerPiniaDevtools(app2, pinia);
  1667. }
  1668. toBeInstalled.forEach((plugin) => _p.push(plugin));
  1669. toBeInstalled = [];
  1670. }
  1671. },
  1672. use(plugin) {
  1673. if (!this._a && !isVue2) {
  1674. toBeInstalled.push(plugin);
  1675. } else {
  1676. _p.push(plugin);
  1677. }
  1678. return this;
  1679. },
  1680. _p,
  1681. // it's actually undefined here
  1682. // @ts-expect-error
  1683. _a: null,
  1684. _e: scope,
  1685. _s: /* @__PURE__ */ new Map(),
  1686. state
  1687. });
  1688. if (USE_DEVTOOLS && typeof Proxy !== "undefined") {
  1689. pinia.use(devtoolsPlugin);
  1690. }
  1691. return pinia;
  1692. }
  1693. function patchObject(newState, oldState) {
  1694. for (const key in oldState) {
  1695. const subPatch = oldState[key];
  1696. if (!(key in newState)) {
  1697. continue;
  1698. }
  1699. const targetValue = newState[key];
  1700. if (isPlainObject$2(targetValue) && isPlainObject$2(subPatch) && !vue.isRef(subPatch) && !vue.isReactive(subPatch)) {
  1701. newState[key] = patchObject(targetValue, subPatch);
  1702. } else {
  1703. {
  1704. newState[key] = subPatch;
  1705. }
  1706. }
  1707. }
  1708. return newState;
  1709. }
  1710. const noop$1 = () => {
  1711. };
  1712. function addSubscription(subscriptions, callback, detached, onCleanup = noop$1) {
  1713. subscriptions.push(callback);
  1714. const removeSubscription = () => {
  1715. const idx = subscriptions.indexOf(callback);
  1716. if (idx > -1) {
  1717. subscriptions.splice(idx, 1);
  1718. onCleanup();
  1719. }
  1720. };
  1721. if (!detached && vue.getCurrentScope()) {
  1722. vue.onScopeDispose(removeSubscription);
  1723. }
  1724. return removeSubscription;
  1725. }
  1726. function triggerSubscriptions(subscriptions, ...args) {
  1727. subscriptions.slice().forEach((callback) => {
  1728. callback(...args);
  1729. });
  1730. }
  1731. const fallbackRunWithContext = (fn) => fn();
  1732. function mergeReactiveObjects(target, patchToApply) {
  1733. if (target instanceof Map && patchToApply instanceof Map) {
  1734. patchToApply.forEach((value, key) => target.set(key, value));
  1735. }
  1736. if (target instanceof Set && patchToApply instanceof Set) {
  1737. patchToApply.forEach(target.add, target);
  1738. }
  1739. for (const key in patchToApply) {
  1740. if (!patchToApply.hasOwnProperty(key))
  1741. continue;
  1742. const subPatch = patchToApply[key];
  1743. const targetValue = target[key];
  1744. if (isPlainObject$2(targetValue) && isPlainObject$2(subPatch) && target.hasOwnProperty(key) && !vue.isRef(subPatch) && !vue.isReactive(subPatch)) {
  1745. target[key] = mergeReactiveObjects(targetValue, subPatch);
  1746. } else {
  1747. target[key] = subPatch;
  1748. }
  1749. }
  1750. return target;
  1751. }
  1752. const skipHydrateSymbol = Symbol("pinia:skipHydration");
  1753. function shouldHydrate(obj) {
  1754. return !isPlainObject$2(obj) || !obj.hasOwnProperty(skipHydrateSymbol);
  1755. }
  1756. const { assign: assign$2 } = Object;
  1757. function isComputed(o2) {
  1758. return !!(vue.isRef(o2) && o2.effect);
  1759. }
  1760. function createOptionsStore(id, options2, pinia, hot) {
  1761. const { state, actions, getters } = options2;
  1762. const initialState = pinia.state.value[id];
  1763. let store;
  1764. function setup() {
  1765. if (!initialState && !hot) {
  1766. {
  1767. pinia.state.value[id] = state ? state() : {};
  1768. }
  1769. }
  1770. const localState = hot ? (
  1771. // use ref() to unwrap refs inside state TODO: check if this is still necessary
  1772. vue.toRefs(vue.ref(state ? state() : {}).value)
  1773. ) : vue.toRefs(pinia.state.value[id]);
  1774. return assign$2(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name2) => {
  1775. if (name2 in localState) {
  1776. console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${name2}" in store "${id}".`);
  1777. }
  1778. computedGetters[name2] = vue.markRaw(vue.computed(() => {
  1779. setActivePinia(pinia);
  1780. const store2 = pinia._s.get(id);
  1781. return getters[name2].call(store2, store2);
  1782. }));
  1783. return computedGetters;
  1784. }, {}));
  1785. }
  1786. store = createSetupStore(id, setup, options2, pinia, hot, true);
  1787. return store;
  1788. }
  1789. function createSetupStore($id, setup, options2 = {}, pinia, hot, isOptionsStore) {
  1790. let scope;
  1791. const optionsForPlugin = assign$2({ actions: {} }, options2);
  1792. if (!pinia._e.active) {
  1793. throw new Error("Pinia destroyed");
  1794. }
  1795. const $subscribeOptions = {
  1796. deep: true
  1797. // flush: 'post',
  1798. };
  1799. {
  1800. $subscribeOptions.onTrigger = (event) => {
  1801. if (isListening) {
  1802. debuggerEvents = event;
  1803. } else if (isListening == false && !store._hotUpdating) {
  1804. if (Array.isArray(debuggerEvents)) {
  1805. debuggerEvents.push(event);
  1806. } else {
  1807. console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug.");
  1808. }
  1809. }
  1810. };
  1811. }
  1812. let isListening;
  1813. let isSyncListening;
  1814. let subscriptions = [];
  1815. let actionSubscriptions = [];
  1816. let debuggerEvents;
  1817. const initialState = pinia.state.value[$id];
  1818. if (!isOptionsStore && !initialState && !hot) {
  1819. {
  1820. pinia.state.value[$id] = {};
  1821. }
  1822. }
  1823. const hotState = vue.ref({});
  1824. let activeListener;
  1825. function $patch(partialStateOrMutator) {
  1826. let subscriptionMutation;
  1827. isListening = isSyncListening = false;
  1828. {
  1829. debuggerEvents = [];
  1830. }
  1831. if (typeof partialStateOrMutator === "function") {
  1832. partialStateOrMutator(pinia.state.value[$id]);
  1833. subscriptionMutation = {
  1834. type: MutationType.patchFunction,
  1835. storeId: $id,
  1836. events: debuggerEvents
  1837. };
  1838. } else {
  1839. mergeReactiveObjects(pinia.state.value[$id], partialStateOrMutator);
  1840. subscriptionMutation = {
  1841. type: MutationType.patchObject,
  1842. payload: partialStateOrMutator,
  1843. storeId: $id,
  1844. events: debuggerEvents
  1845. };
  1846. }
  1847. const myListenerId = activeListener = Symbol();
  1848. vue.nextTick().then(() => {
  1849. if (activeListener === myListenerId) {
  1850. isListening = true;
  1851. }
  1852. });
  1853. isSyncListening = true;
  1854. triggerSubscriptions(subscriptions, subscriptionMutation, pinia.state.value[$id]);
  1855. }
  1856. const $reset = isOptionsStore ? function $reset2() {
  1857. const { state } = options2;
  1858. const newState = state ? state() : {};
  1859. this.$patch(($state) => {
  1860. assign$2($state, newState);
  1861. });
  1862. } : (
  1863. /* istanbul ignore next */
  1864. () => {
  1865. throw new Error(`🍍: Store "${$id}" is built using the setup syntax and does not implement $reset().`);
  1866. }
  1867. );
  1868. function $dispose() {
  1869. scope.stop();
  1870. subscriptions = [];
  1871. actionSubscriptions = [];
  1872. pinia._s.delete($id);
  1873. }
  1874. function wrapAction(name2, action) {
  1875. return function() {
  1876. setActivePinia(pinia);
  1877. const args = Array.from(arguments);
  1878. const afterCallbackList = [];
  1879. const onErrorCallbackList = [];
  1880. function after(callback) {
  1881. afterCallbackList.push(callback);
  1882. }
  1883. function onError2(callback) {
  1884. onErrorCallbackList.push(callback);
  1885. }
  1886. triggerSubscriptions(actionSubscriptions, {
  1887. args,
  1888. name: name2,
  1889. store,
  1890. after,
  1891. onError: onError2
  1892. });
  1893. let ret;
  1894. try {
  1895. ret = action.apply(this && this.$id === $id ? this : store, args);
  1896. } catch (error2) {
  1897. triggerSubscriptions(onErrorCallbackList, error2);
  1898. throw error2;
  1899. }
  1900. if (ret instanceof Promise) {
  1901. return ret.then((value) => {
  1902. triggerSubscriptions(afterCallbackList, value);
  1903. return value;
  1904. }).catch((error2) => {
  1905. triggerSubscriptions(onErrorCallbackList, error2);
  1906. return Promise.reject(error2);
  1907. });
  1908. }
  1909. triggerSubscriptions(afterCallbackList, ret);
  1910. return ret;
  1911. };
  1912. }
  1913. const _hmrPayload = /* @__PURE__ */ vue.markRaw({
  1914. actions: {},
  1915. getters: {},
  1916. state: [],
  1917. hotState
  1918. });
  1919. const partialStore = {
  1920. _p: pinia,
  1921. // _s: scope,
  1922. $id,
  1923. $onAction: addSubscription.bind(null, actionSubscriptions),
  1924. $patch,
  1925. $reset,
  1926. $subscribe(callback, options22 = {}) {
  1927. const removeSubscription = addSubscription(subscriptions, callback, options22.detached, () => stopWatcher());
  1928. const stopWatcher = scope.run(() => vue.watch(() => pinia.state.value[$id], (state) => {
  1929. if (options22.flush === "sync" ? isSyncListening : isListening) {
  1930. callback({
  1931. storeId: $id,
  1932. type: MutationType.direct,
  1933. events: debuggerEvents
  1934. }, state);
  1935. }
  1936. }, assign$2({}, $subscribeOptions, options22)));
  1937. return removeSubscription;
  1938. },
  1939. $dispose
  1940. };
  1941. const store = vue.reactive(assign$2(
  1942. {
  1943. _hmrPayload,
  1944. _customProperties: vue.markRaw(/* @__PURE__ */ new Set())
  1945. // devtools custom properties
  1946. },
  1947. partialStore
  1948. // must be added later
  1949. // setupStore
  1950. ));
  1951. pinia._s.set($id, store);
  1952. const runWithContext = pinia._a && pinia._a.runWithContext || fallbackRunWithContext;
  1953. const setupStore = runWithContext(() => pinia._e.run(() => (scope = vue.effectScope()).run(setup)));
  1954. for (const key in setupStore) {
  1955. const prop = setupStore[key];
  1956. if (vue.isRef(prop) && !isComputed(prop) || vue.isReactive(prop)) {
  1957. if (hot) {
  1958. set(hotState.value, key, vue.toRef(setupStore, key));
  1959. } else if (!isOptionsStore) {
  1960. if (initialState && shouldHydrate(prop)) {
  1961. if (vue.isRef(prop)) {
  1962. prop.value = initialState[key];
  1963. } else {
  1964. mergeReactiveObjects(prop, initialState[key]);
  1965. }
  1966. }
  1967. {
  1968. pinia.state.value[$id][key] = prop;
  1969. }
  1970. }
  1971. {
  1972. _hmrPayload.state.push(key);
  1973. }
  1974. } else if (typeof prop === "function") {
  1975. const actionValue = hot ? prop : wrapAction(key, prop);
  1976. {
  1977. setupStore[key] = actionValue;
  1978. }
  1979. {
  1980. _hmrPayload.actions[key] = prop;
  1981. }
  1982. optionsForPlugin.actions[key] = prop;
  1983. } else {
  1984. if (isComputed(prop)) {
  1985. _hmrPayload.getters[key] = isOptionsStore ? (
  1986. // @ts-expect-error
  1987. options2.getters[key]
  1988. ) : prop;
  1989. if (IS_CLIENT) {
  1990. const getters = setupStore._getters || // @ts-expect-error: same
  1991. (setupStore._getters = vue.markRaw([]));
  1992. getters.push(key);
  1993. }
  1994. }
  1995. }
  1996. }
  1997. {
  1998. assign$2(store, setupStore);
  1999. assign$2(vue.toRaw(store), setupStore);
  2000. }
  2001. Object.defineProperty(store, "$state", {
  2002. get: () => hot ? hotState.value : pinia.state.value[$id],
  2003. set: (state) => {
  2004. if (hot) {
  2005. throw new Error("cannot set hotState");
  2006. }
  2007. $patch(($state) => {
  2008. assign$2($state, state);
  2009. });
  2010. }
  2011. });
  2012. {
  2013. store._hotUpdate = vue.markRaw((newStore) => {
  2014. store._hotUpdating = true;
  2015. newStore._hmrPayload.state.forEach((stateKey) => {
  2016. if (stateKey in store.$state) {
  2017. const newStateTarget = newStore.$state[stateKey];
  2018. const oldStateSource = store.$state[stateKey];
  2019. if (typeof newStateTarget === "object" && isPlainObject$2(newStateTarget) && isPlainObject$2(oldStateSource)) {
  2020. patchObject(newStateTarget, oldStateSource);
  2021. } else {
  2022. newStore.$state[stateKey] = oldStateSource;
  2023. }
  2024. }
  2025. set(store, stateKey, vue.toRef(newStore.$state, stateKey));
  2026. });
  2027. Object.keys(store.$state).forEach((stateKey) => {
  2028. if (!(stateKey in newStore.$state)) {
  2029. del(store, stateKey);
  2030. }
  2031. });
  2032. isListening = false;
  2033. isSyncListening = false;
  2034. pinia.state.value[$id] = vue.toRef(newStore._hmrPayload, "hotState");
  2035. isSyncListening = true;
  2036. vue.nextTick().then(() => {
  2037. isListening = true;
  2038. });
  2039. for (const actionName in newStore._hmrPayload.actions) {
  2040. const action = newStore[actionName];
  2041. set(store, actionName, wrapAction(actionName, action));
  2042. }
  2043. for (const getterName in newStore._hmrPayload.getters) {
  2044. const getter = newStore._hmrPayload.getters[getterName];
  2045. const getterValue = isOptionsStore ? (
  2046. // special handling of options api
  2047. vue.computed(() => {
  2048. setActivePinia(pinia);
  2049. return getter.call(store, store);
  2050. })
  2051. ) : getter;
  2052. set(store, getterName, getterValue);
  2053. }
  2054. Object.keys(store._hmrPayload.getters).forEach((key) => {
  2055. if (!(key in newStore._hmrPayload.getters)) {
  2056. del(store, key);
  2057. }
  2058. });
  2059. Object.keys(store._hmrPayload.actions).forEach((key) => {
  2060. if (!(key in newStore._hmrPayload.actions)) {
  2061. del(store, key);
  2062. }
  2063. });
  2064. store._hmrPayload = newStore._hmrPayload;
  2065. store._getters = newStore._getters;
  2066. store._hotUpdating = false;
  2067. });
  2068. }
  2069. if (USE_DEVTOOLS) {
  2070. const nonEnumerable = {
  2071. writable: true,
  2072. configurable: true,
  2073. // avoid warning on devtools trying to display this property
  2074. enumerable: false
  2075. };
  2076. ["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((p2) => {
  2077. Object.defineProperty(store, p2, assign$2({ value: store[p2] }, nonEnumerable));
  2078. });
  2079. }
  2080. pinia._p.forEach((extender) => {
  2081. if (USE_DEVTOOLS) {
  2082. const extensions = scope.run(() => extender({
  2083. store,
  2084. app: pinia._a,
  2085. pinia,
  2086. options: optionsForPlugin
  2087. }));
  2088. Object.keys(extensions || {}).forEach((key) => store._customProperties.add(key));
  2089. assign$2(store, extensions);
  2090. } else {
  2091. assign$2(store, scope.run(() => extender({
  2092. store,
  2093. app: pinia._a,
  2094. pinia,
  2095. options: optionsForPlugin
  2096. })));
  2097. }
  2098. });
  2099. if (store.$state && typeof store.$state === "object" && typeof store.$state.constructor === "function" && !store.$state.constructor.toString().includes("[native code]")) {
  2100. console.warn(`[🍍]: The "state" must be a plain object. It cannot be
  2101. state: () => new MyClass()
  2102. Found in store "${store.$id}".`);
  2103. }
  2104. if (initialState && isOptionsStore && options2.hydrate) {
  2105. options2.hydrate(store.$state, initialState);
  2106. }
  2107. isListening = true;
  2108. isSyncListening = true;
  2109. return store;
  2110. }
  2111. function defineStore(idOrOptions, setup, setupOptions) {
  2112. let id;
  2113. let options2;
  2114. const isSetupStore = typeof setup === "function";
  2115. if (typeof idOrOptions === "string") {
  2116. id = idOrOptions;
  2117. options2 = isSetupStore ? setupOptions : setup;
  2118. } else {
  2119. options2 = idOrOptions;
  2120. id = idOrOptions.id;
  2121. if (typeof id !== "string") {
  2122. throw new Error(`[🍍]: "defineStore()" must be passed a store id as its first argument.`);
  2123. }
  2124. }
  2125. function useStore(pinia, hot) {
  2126. const hasContext = vue.hasInjectionContext();
  2127. pinia = // in test mode, ignore the argument provided as we can always retrieve a
  2128. // pinia instance with getActivePinia()
  2129. pinia || (hasContext ? vue.inject(piniaSymbol, null) : null);
  2130. if (pinia)
  2131. setActivePinia(pinia);
  2132. if (!activePinia) {
  2133. throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
  2134. See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
  2135. This will fail in production.`);
  2136. }
  2137. pinia = activePinia;
  2138. if (!pinia._s.has(id)) {
  2139. if (isSetupStore) {
  2140. createSetupStore(id, setup, options2, pinia);
  2141. } else {
  2142. createOptionsStore(id, options2, pinia);
  2143. }
  2144. {
  2145. useStore._pinia = pinia;
  2146. }
  2147. }
  2148. const store = pinia._s.get(id);
  2149. if (hot) {
  2150. const hotId = "__hot:" + id;
  2151. const newStore = isSetupStore ? createSetupStore(hotId, setup, options2, pinia, true) : createOptionsStore(hotId, assign$2({}, options2), pinia, true);
  2152. hot._hotUpdate(newStore);
  2153. delete pinia.state.value[hotId];
  2154. pinia._s.delete(hotId);
  2155. }
  2156. if (IS_CLIENT) {
  2157. const currentInstance = vue.getCurrentInstance();
  2158. if (currentInstance && currentInstance.proxy && // avoid adding stores that are just built for hot module replacement
  2159. !hot) {
  2160. const vm = currentInstance.proxy;
  2161. const cache2 = "_pStores" in vm ? vm._pStores : vm._pStores = {};
  2162. cache2[id] = store;
  2163. }
  2164. }
  2165. return store;
  2166. }
  2167. useStore.$id = id;
  2168. return useStore;
  2169. }
  2170. var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
  2171. function getDefaultExportFromCjs(x) {
  2172. return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
  2173. }
  2174. var lodash = { exports: {} };
  2175. /**
  2176. * @license
  2177. * Lodash <https://lodash.com/>
  2178. * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
  2179. * Released under MIT license <https://lodash.com/license>
  2180. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  2181. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  2182. */
  2183. lodash.exports;
  2184. (function(module, exports) {
  2185. (function() {
  2186. var undefined$1;
  2187. var VERSION2 = "4.17.21";
  2188. var LARGE_ARRAY_SIZE = 200;
  2189. var CORE_ERROR_TEXT = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", FUNC_ERROR_TEXT = "Expected a function", INVALID_TEMPL_VAR_ERROR_TEXT = "Invalid `variable` option passed into `_.template`";
  2190. var HASH_UNDEFINED = "__lodash_hash_undefined__";
  2191. var MAX_MEMOIZE_SIZE = 500;
  2192. var PLACEHOLDER = "__lodash_placeholder__";
  2193. var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4;
  2194. var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2;
  2195. var WRAP_BIND_FLAG = 1, WRAP_BIND_KEY_FLAG = 2, WRAP_CURRY_BOUND_FLAG = 4, WRAP_CURRY_FLAG = 8, WRAP_CURRY_RIGHT_FLAG = 16, WRAP_PARTIAL_FLAG = 32, WRAP_PARTIAL_RIGHT_FLAG = 64, WRAP_ARY_FLAG = 128, WRAP_REARG_FLAG = 256, WRAP_FLIP_FLAG = 512;
  2196. var DEFAULT_TRUNC_LENGTH = 30, DEFAULT_TRUNC_OMISSION = "...";
  2197. var HOT_COUNT = 800, HOT_SPAN = 16;
  2198. var LAZY_FILTER_FLAG = 1, LAZY_MAP_FLAG = 2, LAZY_WHILE_FLAG = 3;
  2199. var INFINITY = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER = 17976931348623157e292, NAN = 0 / 0;
  2200. var MAX_ARRAY_LENGTH = 4294967295, MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
  2201. var wrapFlags = [
  2202. ["ary", WRAP_ARY_FLAG],
  2203. ["bind", WRAP_BIND_FLAG],
  2204. ["bindKey", WRAP_BIND_KEY_FLAG],
  2205. ["curry", WRAP_CURRY_FLAG],
  2206. ["curryRight", WRAP_CURRY_RIGHT_FLAG],
  2207. ["flip", WRAP_FLIP_FLAG],
  2208. ["partial", WRAP_PARTIAL_FLAG],
  2209. ["partialRight", WRAP_PARTIAL_RIGHT_FLAG],
  2210. ["rearg", WRAP_REARG_FLAG]
  2211. ];
  2212. var argsTag = "[object Arguments]", arrayTag = "[object Array]", asyncTag = "[object AsyncFunction]", boolTag = "[object Boolean]", dateTag = "[object Date]", domExcTag = "[object DOMException]", errorTag = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag = "[object Map]", numberTag = "[object Number]", nullTag = "[object Null]", objectTag = "[object Object]", promiseTag = "[object Promise]", proxyTag = "[object Proxy]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]", undefinedTag = "[object Undefined]", weakMapTag = "[object WeakMap]", weakSetTag = "[object WeakSet]";
  2213. var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
  2214. var reEmptyStringLeading = /\b__p \+= '';/g, reEmptyStringMiddle = /\b(__p \+=) '' \+/g, reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
  2215. var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, reUnescapedHtml = /[&<>"']/g, reHasEscapedHtml = RegExp(reEscapedHtml.source), reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
  2216. var reEscape = /<%-([\s\S]+?)%>/g, reEvaluate = /<%([\s\S]+?)%>/g, reInterpolate = /<%=([\s\S]+?)%>/g;
  2217. var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
  2218. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, reHasRegExpChar = RegExp(reRegExpChar.source);
  2219. var reTrimStart = /^\s+/;
  2220. var reWhitespace = /\s/;
  2221. var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, reSplitDetails = /,? & /;
  2222. var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
  2223. var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/;
  2224. var reEscapeChar = /\\(\\)?/g;
  2225. var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
  2226. var reFlags = /\w*$/;
  2227. var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
  2228. var reIsBinary = /^0b[01]+$/i;
  2229. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  2230. var reIsOctal = /^0o[0-7]+$/i;
  2231. var reIsUint = /^(?:0|[1-9]\d*)$/;
  2232. var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
  2233. var reNoMatch = /($^)/;
  2234. var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
  2235. var rsAstralRange = "\\ud800-\\udfff", rsComboMarksRange = "\\u0300-\\u036f", reComboHalfMarksRange = "\\ufe20-\\ufe2f", rsComboSymbolsRange = "\\u20d0-\\u20ff", rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, rsDingbatRange = "\\u2700-\\u27bf", rsLowerRange = "a-z\\xdf-\\xf6\\xf8-\\xff", rsMathOpRange = "\\xac\\xb1\\xd7\\xf7", rsNonCharRange = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", rsPunctuationRange = "\\u2000-\\u206f", rsSpaceRange = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", rsUpperRange = "A-Z\\xc0-\\xd6\\xd8-\\xde", rsVarRange = "\\ufe0e\\ufe0f", rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
  2236. var rsApos = "['’]", rsAstral = "[" + rsAstralRange + "]", rsBreak = "[" + rsBreakRange + "]", rsCombo = "[" + rsComboRange + "]", rsDigits = "\\d+", rsDingbat = "[" + rsDingbatRange + "]", rsLower = "[" + rsLowerRange + "]", rsMisc = "[^" + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + "]", rsFitz = "\\ud83c[\\udffb-\\udfff]", rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")", rsNonAstral = "[^" + rsAstralRange + "]", rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}", rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]", rsUpper = "[" + rsUpperRange + "]", rsZWJ = "\\u200d";
  2237. var rsMiscLower = "(?:" + rsLower + "|" + rsMisc + ")", rsMiscUpper = "(?:" + rsUpper + "|" + rsMisc + ")", rsOptContrLower = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?", rsOptContrUpper = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?", reOptMod = rsModifier + "?", rsOptVar = "[" + rsVarRange + "]?", rsOptJoin = "(?:" + rsZWJ + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*", rsOrdLower = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", rsOrdUpper = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", rsSeq = rsOptVar + reOptMod + rsOptJoin, rsEmoji = "(?:" + [rsDingbat, rsRegional, rsSurrPair].join("|") + ")" + rsSeq, rsSymbol = "(?:" + [rsNonAstral + rsCombo + "?", rsCombo, rsRegional, rsSurrPair, rsAstral].join("|") + ")";
  2238. var reApos = RegExp(rsApos, "g");
  2239. var reComboMark = RegExp(rsCombo, "g");
  2240. var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g");
  2241. var reUnicodeWord = RegExp([
  2242. rsUpper + "?" + rsLower + "+" + rsOptContrLower + "(?=" + [rsBreak, rsUpper, "$"].join("|") + ")",
  2243. rsMiscUpper + "+" + rsOptContrUpper + "(?=" + [rsBreak, rsUpper + rsMiscLower, "$"].join("|") + ")",
  2244. rsUpper + "?" + rsMiscLower + "+" + rsOptContrLower,
  2245. rsUpper + "+" + rsOptContrUpper,
  2246. rsOrdUpper,
  2247. rsOrdLower,
  2248. rsDigits,
  2249. rsEmoji
  2250. ].join("|"), "g");
  2251. var reHasUnicode = RegExp("[" + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + "]");
  2252. var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
  2253. var contextProps = [
  2254. "Array",
  2255. "Buffer",
  2256. "DataView",
  2257. "Date",
  2258. "Error",
  2259. "Float32Array",
  2260. "Float64Array",
  2261. "Function",
  2262. "Int8Array",
  2263. "Int16Array",
  2264. "Int32Array",
  2265. "Map",
  2266. "Math",
  2267. "Object",
  2268. "Promise",
  2269. "RegExp",
  2270. "Set",
  2271. "String",
  2272. "Symbol",
  2273. "TypeError",
  2274. "Uint8Array",
  2275. "Uint8ClampedArray",
  2276. "Uint16Array",
  2277. "Uint32Array",
  2278. "WeakMap",
  2279. "_",
  2280. "clearTimeout",
  2281. "isFinite",
  2282. "parseInt",
  2283. "setTimeout"
  2284. ];
  2285. var templateCounter = -1;
  2286. var typedArrayTags = {};
  2287. typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
  2288. typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
  2289. var cloneableTags = {};
  2290. cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
  2291. cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
  2292. var deburredLetters = {
  2293. // Latin-1 Supplement block.
  2294. "À": "A",
  2295. "Á": "A",
  2296. "Â": "A",
  2297. "Ã": "A",
  2298. "Ä": "A",
  2299. "Å": "A",
  2300. "à": "a",
  2301. "á": "a",
  2302. "â": "a",
  2303. "ã": "a",
  2304. "ä": "a",
  2305. "å": "a",
  2306. "Ç": "C",
  2307. "ç": "c",
  2308. "Ð": "D",
  2309. "ð": "d",
  2310. "È": "E",
  2311. "É": "E",
  2312. "Ê": "E",
  2313. "Ë": "E",
  2314. "è": "e",
  2315. "é": "e",
  2316. "ê": "e",
  2317. "ë": "e",
  2318. "Ì": "I",
  2319. "Í": "I",
  2320. "Î": "I",
  2321. "Ï": "I",
  2322. "ì": "i",
  2323. "í": "i",
  2324. "î": "i",
  2325. "ï": "i",
  2326. "Ñ": "N",
  2327. "ñ": "n",
  2328. "Ò": "O",
  2329. "Ó": "O",
  2330. "Ô": "O",
  2331. "Õ": "O",
  2332. "Ö": "O",
  2333. "Ø": "O",
  2334. "ò": "o",
  2335. "ó": "o",
  2336. "ô": "o",
  2337. "õ": "o",
  2338. "ö": "o",
  2339. "ø": "o",
  2340. "Ù": "U",
  2341. "Ú": "U",
  2342. "Û": "U",
  2343. "Ü": "U",
  2344. "ù": "u",
  2345. "ú": "u",
  2346. "û": "u",
  2347. "ü": "u",
  2348. "Ý": "Y",
  2349. "ý": "y",
  2350. "ÿ": "y",
  2351. "Æ": "Ae",
  2352. "æ": "ae",
  2353. "Þ": "Th",
  2354. "þ": "th",
  2355. "ß": "ss",
  2356. // Latin Extended-A block.
  2357. "Ā": "A",
  2358. "Ă": "A",
  2359. "Ą": "A",
  2360. "ā": "a",
  2361. "ă": "a",
  2362. "ą": "a",
  2363. "Ć": "C",
  2364. "Ĉ": "C",
  2365. "Ċ": "C",
  2366. "Č": "C",
  2367. "ć": "c",
  2368. "ĉ": "c",
  2369. "ċ": "c",
  2370. "č": "c",
  2371. "Ď": "D",
  2372. "Đ": "D",
  2373. "ď": "d",
  2374. "đ": "d",
  2375. "Ē": "E",
  2376. "Ĕ": "E",
  2377. "Ė": "E",
  2378. "Ę": "E",
  2379. "Ě": "E",
  2380. "ē": "e",
  2381. "ĕ": "e",
  2382. "ė": "e",
  2383. "ę": "e",
  2384. "ě": "e",
  2385. "Ĝ": "G",
  2386. "Ğ": "G",
  2387. "Ġ": "G",
  2388. "Ģ": "G",
  2389. "ĝ": "g",
  2390. "ğ": "g",
  2391. "ġ": "g",
  2392. "ģ": "g",
  2393. "Ĥ": "H",
  2394. "Ħ": "H",
  2395. "ĥ": "h",
  2396. "ħ": "h",
  2397. "Ĩ": "I",
  2398. "Ī": "I",
  2399. "Ĭ": "I",
  2400. "Į": "I",
  2401. "İ": "I",
  2402. "ĩ": "i",
  2403. "ī": "i",
  2404. "ĭ": "i",
  2405. "į": "i",
  2406. "ı": "i",
  2407. "Ĵ": "J",
  2408. "ĵ": "j",
  2409. "Ķ": "K",
  2410. "ķ": "k",
  2411. "ĸ": "k",
  2412. "Ĺ": "L",
  2413. "Ļ": "L",
  2414. "Ľ": "L",
  2415. "Ŀ": "L",
  2416. "Ł": "L",
  2417. "ĺ": "l",
  2418. "ļ": "l",
  2419. "ľ": "l",
  2420. "ŀ": "l",
  2421. "ł": "l",
  2422. "Ń": "N",
  2423. "Ņ": "N",
  2424. "Ň": "N",
  2425. "Ŋ": "N",
  2426. "ń": "n",
  2427. "ņ": "n",
  2428. "ň": "n",
  2429. "ŋ": "n",
  2430. "Ō": "O",
  2431. "Ŏ": "O",
  2432. "Ő": "O",
  2433. "ō": "o",
  2434. "ŏ": "o",
  2435. "ő": "o",
  2436. "Ŕ": "R",
  2437. "Ŗ": "R",
  2438. "Ř": "R",
  2439. "ŕ": "r",
  2440. "ŗ": "r",
  2441. "ř": "r",
  2442. "Ś": "S",
  2443. "Ŝ": "S",
  2444. "Ş": "S",
  2445. "Š": "S",
  2446. "ś": "s",
  2447. "ŝ": "s",
  2448. "ş": "s",
  2449. "š": "s",
  2450. "Ţ": "T",
  2451. "Ť": "T",
  2452. "Ŧ": "T",
  2453. "ţ": "t",
  2454. "ť": "t",
  2455. "ŧ": "t",
  2456. "Ũ": "U",
  2457. "Ū": "U",
  2458. "Ŭ": "U",
  2459. "Ů": "U",
  2460. "Ű": "U",
  2461. "Ų": "U",
  2462. "ũ": "u",
  2463. "ū": "u",
  2464. "ŭ": "u",
  2465. "ů": "u",
  2466. "ű": "u",
  2467. "ų": "u",
  2468. "Ŵ": "W",
  2469. "ŵ": "w",
  2470. "Ŷ": "Y",
  2471. "ŷ": "y",
  2472. "Ÿ": "Y",
  2473. "Ź": "Z",
  2474. "Ż": "Z",
  2475. "Ž": "Z",
  2476. "ź": "z",
  2477. "ż": "z",
  2478. "ž": "z",
  2479. "IJ": "IJ",
  2480. "ij": "ij",
  2481. "Œ": "Oe",
  2482. "œ": "oe",
  2483. "ʼn": "'n",
  2484. "ſ": "s"
  2485. };
  2486. var htmlEscapes = {
  2487. "&": "&amp;",
  2488. "<": "&lt;",
  2489. ">": "&gt;",
  2490. '"': "&quot;",
  2491. "'": "&#39;"
  2492. };
  2493. var htmlUnescapes = {
  2494. "&amp;": "&",
  2495. "&lt;": "<",
  2496. "&gt;": ">",
  2497. "&quot;": '"',
  2498. "&#39;": "'"
  2499. };
  2500. var stringEscapes = {
  2501. "\\": "\\",
  2502. "'": "'",
  2503. "\n": "n",
  2504. "\r": "r",
  2505. "\u2028": "u2028",
  2506. "\u2029": "u2029"
  2507. };
  2508. var freeParseFloat = parseFloat, freeParseInt = parseInt;
  2509. var freeGlobal = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
  2510. var freeSelf = typeof self == "object" && self && self.Object === Object && self;
  2511. var root = freeGlobal || freeSelf || Function("return this")();
  2512. var freeExports = exports && !exports.nodeType && exports;
  2513. var freeModule = freeExports && true && module && !module.nodeType && module;
  2514. var moduleExports = freeModule && freeModule.exports === freeExports;
  2515. var freeProcess = moduleExports && freeGlobal.process;
  2516. var nodeUtil = function() {
  2517. try {
  2518. var types2 = freeModule && freeModule.require && freeModule.require("util").types;
  2519. if (types2) {
  2520. return types2;
  2521. }
  2522. return freeProcess && freeProcess.binding && freeProcess.binding("util");
  2523. } catch (e2) {
  2524. }
  2525. }();
  2526. var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, nodeIsDate = nodeUtil && nodeUtil.isDate, nodeIsMap = nodeUtil && nodeUtil.isMap, nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, nodeIsSet = nodeUtil && nodeUtil.isSet, nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
  2527. function apply2(func, thisArg, args) {
  2528. switch (args.length) {
  2529. case 0:
  2530. return func.call(thisArg);
  2531. case 1:
  2532. return func.call(thisArg, args[0]);
  2533. case 2:
  2534. return func.call(thisArg, args[0], args[1]);
  2535. case 3:
  2536. return func.call(thisArg, args[0], args[1], args[2]);
  2537. }
  2538. return func.apply(thisArg, args);
  2539. }
  2540. function arrayAggregator(array2, setter, iteratee, accumulator) {
  2541. var index2 = -1, length = array2 == null ? 0 : array2.length;
  2542. while (++index2 < length) {
  2543. var value = array2[index2];
  2544. setter(accumulator, value, iteratee(value), array2);
  2545. }
  2546. return accumulator;
  2547. }
  2548. function arrayEach(array2, iteratee) {
  2549. var index2 = -1, length = array2 == null ? 0 : array2.length;
  2550. while (++index2 < length) {
  2551. if (iteratee(array2[index2], index2, array2) === false) {
  2552. break;
  2553. }
  2554. }
  2555. return array2;
  2556. }
  2557. function arrayEachRight(array2, iteratee) {
  2558. var length = array2 == null ? 0 : array2.length;
  2559. while (length--) {
  2560. if (iteratee(array2[length], length, array2) === false) {
  2561. break;
  2562. }
  2563. }
  2564. return array2;
  2565. }
  2566. function arrayEvery(array2, predicate) {
  2567. var index2 = -1, length = array2 == null ? 0 : array2.length;
  2568. while (++index2 < length) {
  2569. if (!predicate(array2[index2], index2, array2)) {
  2570. return false;
  2571. }
  2572. }
  2573. return true;
  2574. }
  2575. function arrayFilter(array2, predicate) {
  2576. var index2 = -1, length = array2 == null ? 0 : array2.length, resIndex = 0, result2 = [];
  2577. while (++index2 < length) {
  2578. var value = array2[index2];
  2579. if (predicate(value, index2, array2)) {
  2580. result2[resIndex++] = value;
  2581. }
  2582. }
  2583. return result2;
  2584. }
  2585. function arrayIncludes(array2, value) {
  2586. var length = array2 == null ? 0 : array2.length;
  2587. return !!length && baseIndexOf(array2, value, 0) > -1;
  2588. }
  2589. function arrayIncludesWith(array2, value, comparator) {
  2590. var index2 = -1, length = array2 == null ? 0 : array2.length;
  2591. while (++index2 < length) {
  2592. if (comparator(value, array2[index2])) {
  2593. return true;
  2594. }
  2595. }
  2596. return false;
  2597. }
  2598. function arrayMap(array2, iteratee) {
  2599. var index2 = -1, length = array2 == null ? 0 : array2.length, result2 = Array(length);
  2600. while (++index2 < length) {
  2601. result2[index2] = iteratee(array2[index2], index2, array2);
  2602. }
  2603. return result2;
  2604. }
  2605. function arrayPush(array2, values) {
  2606. var index2 = -1, length = values.length, offset = array2.length;
  2607. while (++index2 < length) {
  2608. array2[offset + index2] = values[index2];
  2609. }
  2610. return array2;
  2611. }
  2612. function arrayReduce(array2, iteratee, accumulator, initAccum) {
  2613. var index2 = -1, length = array2 == null ? 0 : array2.length;
  2614. if (initAccum && length) {
  2615. accumulator = array2[++index2];
  2616. }
  2617. while (++index2 < length) {
  2618. accumulator = iteratee(accumulator, array2[index2], index2, array2);
  2619. }
  2620. return accumulator;
  2621. }
  2622. function arrayReduceRight(array2, iteratee, accumulator, initAccum) {
  2623. var length = array2 == null ? 0 : array2.length;
  2624. if (initAccum && length) {
  2625. accumulator = array2[--length];
  2626. }
  2627. while (length--) {
  2628. accumulator = iteratee(accumulator, array2[length], length, array2);
  2629. }
  2630. return accumulator;
  2631. }
  2632. function arraySome(array2, predicate) {
  2633. var index2 = -1, length = array2 == null ? 0 : array2.length;
  2634. while (++index2 < length) {
  2635. if (predicate(array2[index2], index2, array2)) {
  2636. return true;
  2637. }
  2638. }
  2639. return false;
  2640. }
  2641. var asciiSize = baseProperty("length");
  2642. function asciiToArray(string) {
  2643. return string.split("");
  2644. }
  2645. function asciiWords(string) {
  2646. return string.match(reAsciiWord) || [];
  2647. }
  2648. function baseFindKey(collection, predicate, eachFunc) {
  2649. var result2;
  2650. eachFunc(collection, function(value, key, collection2) {
  2651. if (predicate(value, key, collection2)) {
  2652. result2 = key;
  2653. return false;
  2654. }
  2655. });
  2656. return result2;
  2657. }
  2658. function baseFindIndex(array2, predicate, fromIndex, fromRight) {
  2659. var length = array2.length, index2 = fromIndex + (fromRight ? 1 : -1);
  2660. while (fromRight ? index2-- : ++index2 < length) {
  2661. if (predicate(array2[index2], index2, array2)) {
  2662. return index2;
  2663. }
  2664. }
  2665. return -1;
  2666. }
  2667. function baseIndexOf(array2, value, fromIndex) {
  2668. return value === value ? strictIndexOf(array2, value, fromIndex) : baseFindIndex(array2, baseIsNaN, fromIndex);
  2669. }
  2670. function baseIndexOfWith(array2, value, fromIndex, comparator) {
  2671. var index2 = fromIndex - 1, length = array2.length;
  2672. while (++index2 < length) {
  2673. if (comparator(array2[index2], value)) {
  2674. return index2;
  2675. }
  2676. }
  2677. return -1;
  2678. }
  2679. function baseIsNaN(value) {
  2680. return value !== value;
  2681. }
  2682. function baseMean(array2, iteratee) {
  2683. var length = array2 == null ? 0 : array2.length;
  2684. return length ? baseSum(array2, iteratee) / length : NAN;
  2685. }
  2686. function baseProperty(key) {
  2687. return function(object2) {
  2688. return object2 == null ? undefined$1 : object2[key];
  2689. };
  2690. }
  2691. function basePropertyOf(object2) {
  2692. return function(key) {
  2693. return object2 == null ? undefined$1 : object2[key];
  2694. };
  2695. }
  2696. function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
  2697. eachFunc(collection, function(value, index2, collection2) {
  2698. accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value, index2, collection2);
  2699. });
  2700. return accumulator;
  2701. }
  2702. function baseSortBy(array2, comparer) {
  2703. var length = array2.length;
  2704. array2.sort(comparer);
  2705. while (length--) {
  2706. array2[length] = array2[length].value;
  2707. }
  2708. return array2;
  2709. }
  2710. function baseSum(array2, iteratee) {
  2711. var result2, index2 = -1, length = array2.length;
  2712. while (++index2 < length) {
  2713. var current = iteratee(array2[index2]);
  2714. if (current !== undefined$1) {
  2715. result2 = result2 === undefined$1 ? current : result2 + current;
  2716. }
  2717. }
  2718. return result2;
  2719. }
  2720. function baseTimes(n2, iteratee) {
  2721. var index2 = -1, result2 = Array(n2);
  2722. while (++index2 < n2) {
  2723. result2[index2] = iteratee(index2);
  2724. }
  2725. return result2;
  2726. }
  2727. function baseToPairs(object2, props) {
  2728. return arrayMap(props, function(key) {
  2729. return [key, object2[key]];
  2730. });
  2731. }
  2732. function baseTrim(string) {
  2733. return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
  2734. }
  2735. function baseUnary(func) {
  2736. return function(value) {
  2737. return func(value);
  2738. };
  2739. }
  2740. function baseValues(object2, props) {
  2741. return arrayMap(props, function(key) {
  2742. return object2[key];
  2743. });
  2744. }
  2745. function cacheHas(cache2, key) {
  2746. return cache2.has(key);
  2747. }
  2748. function charsStartIndex(strSymbols, chrSymbols) {
  2749. var index2 = -1, length = strSymbols.length;
  2750. while (++index2 < length && baseIndexOf(chrSymbols, strSymbols[index2], 0) > -1) {
  2751. }
  2752. return index2;
  2753. }
  2754. function charsEndIndex(strSymbols, chrSymbols) {
  2755. var index2 = strSymbols.length;
  2756. while (index2-- && baseIndexOf(chrSymbols, strSymbols[index2], 0) > -1) {
  2757. }
  2758. return index2;
  2759. }
  2760. function countHolders(array2, placeholder) {
  2761. var length = array2.length, result2 = 0;
  2762. while (length--) {
  2763. if (array2[length] === placeholder) {
  2764. ++result2;
  2765. }
  2766. }
  2767. return result2;
  2768. }
  2769. var deburrLetter = basePropertyOf(deburredLetters);
  2770. var escapeHtmlChar = basePropertyOf(htmlEscapes);
  2771. function escapeStringChar(chr) {
  2772. return "\\" + stringEscapes[chr];
  2773. }
  2774. function getValue(object2, key) {
  2775. return object2 == null ? undefined$1 : object2[key];
  2776. }
  2777. function hasUnicode(string) {
  2778. return reHasUnicode.test(string);
  2779. }
  2780. function hasUnicodeWord(string) {
  2781. return reHasUnicodeWord.test(string);
  2782. }
  2783. function iteratorToArray(iterator) {
  2784. var data, result2 = [];
  2785. while (!(data = iterator.next()).done) {
  2786. result2.push(data.value);
  2787. }
  2788. return result2;
  2789. }
  2790. function mapToArray(map) {
  2791. var index2 = -1, result2 = Array(map.size);
  2792. map.forEach(function(value, key) {
  2793. result2[++index2] = [key, value];
  2794. });
  2795. return result2;
  2796. }
  2797. function overArg(func, transform) {
  2798. return function(arg) {
  2799. return func(transform(arg));
  2800. };
  2801. }
  2802. function replaceHolders(array2, placeholder) {
  2803. var index2 = -1, length = array2.length, resIndex = 0, result2 = [];
  2804. while (++index2 < length) {
  2805. var value = array2[index2];
  2806. if (value === placeholder || value === PLACEHOLDER) {
  2807. array2[index2] = PLACEHOLDER;
  2808. result2[resIndex++] = index2;
  2809. }
  2810. }
  2811. return result2;
  2812. }
  2813. function setToArray(set2) {
  2814. var index2 = -1, result2 = Array(set2.size);
  2815. set2.forEach(function(value) {
  2816. result2[++index2] = value;
  2817. });
  2818. return result2;
  2819. }
  2820. function setToPairs(set2) {
  2821. var index2 = -1, result2 = Array(set2.size);
  2822. set2.forEach(function(value) {
  2823. result2[++index2] = [value, value];
  2824. });
  2825. return result2;
  2826. }
  2827. function strictIndexOf(array2, value, fromIndex) {
  2828. var index2 = fromIndex - 1, length = array2.length;
  2829. while (++index2 < length) {
  2830. if (array2[index2] === value) {
  2831. return index2;
  2832. }
  2833. }
  2834. return -1;
  2835. }
  2836. function strictLastIndexOf(array2, value, fromIndex) {
  2837. var index2 = fromIndex + 1;
  2838. while (index2--) {
  2839. if (array2[index2] === value) {
  2840. return index2;
  2841. }
  2842. }
  2843. return index2;
  2844. }
  2845. function stringSize(string) {
  2846. return hasUnicode(string) ? unicodeSize(string) : asciiSize(string);
  2847. }
  2848. function stringToArray(string) {
  2849. return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string);
  2850. }
  2851. function trimmedEndIndex(string) {
  2852. var index2 = string.length;
  2853. while (index2-- && reWhitespace.test(string.charAt(index2))) {
  2854. }
  2855. return index2;
  2856. }
  2857. var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
  2858. function unicodeSize(string) {
  2859. var result2 = reUnicode.lastIndex = 0;
  2860. while (reUnicode.test(string)) {
  2861. ++result2;
  2862. }
  2863. return result2;
  2864. }
  2865. function unicodeToArray(string) {
  2866. return string.match(reUnicode) || [];
  2867. }
  2868. function unicodeWords(string) {
  2869. return string.match(reUnicodeWord) || [];
  2870. }
  2871. var runInContext = function runInContext2(context) {
  2872. context = context == null ? root : _2.defaults(root.Object(), context, _2.pick(root, contextProps));
  2873. var Array2 = context.Array, Date2 = context.Date, Error2 = context.Error, Function2 = context.Function, Math2 = context.Math, Object2 = context.Object, RegExp2 = context.RegExp, String2 = context.String, TypeError2 = context.TypeError;
  2874. var arrayProto = Array2.prototype, funcProto = Function2.prototype, objectProto = Object2.prototype;
  2875. var coreJsData = context["__core-js_shared__"];
  2876. var funcToString = funcProto.toString;
  2877. var hasOwnProperty2 = objectProto.hasOwnProperty;
  2878. var idCounter = 0;
  2879. var maskSrcKey = function() {
  2880. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
  2881. return uid ? "Symbol(src)_1." + uid : "";
  2882. }();
  2883. var nativeObjectToString = objectProto.toString;
  2884. var objectCtorString = funcToString.call(Object2);
  2885. var oldDash = root._;
  2886. var reIsNative = RegExp2(
  2887. "^" + funcToString.call(hasOwnProperty2).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
  2888. );
  2889. var Buffer2 = moduleExports ? context.Buffer : undefined$1, Symbol2 = context.Symbol, Uint8Array2 = context.Uint8Array, allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : undefined$1, getPrototype = overArg(Object2.getPrototypeOf, Object2), objectCreate = Object2.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice, spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : undefined$1, symIterator = Symbol2 ? Symbol2.iterator : undefined$1, symToStringTag = Symbol2 ? Symbol2.toStringTag : undefined$1;
  2890. var defineProperty = function() {
  2891. try {
  2892. var func = getNative(Object2, "defineProperty");
  2893. func({}, "", {});
  2894. return func;
  2895. } catch (e2) {
  2896. }
  2897. }();
  2898. var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date2 && Date2.now !== root.Date.now && Date2.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
  2899. var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : undefined$1, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object2.keys, Object2), nativeMax = Math2.max, nativeMin = Math2.min, nativeNow = Date2.now, nativeParseInt = context.parseInt, nativeRandom = Math2.random, nativeReverse = arrayProto.reverse;
  2900. var DataView = getNative(context, "DataView"), Map2 = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set2 = getNative(context, "Set"), WeakMap2 = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create");
  2901. var metaMap = WeakMap2 && new WeakMap2();
  2902. var realNames = {};
  2903. var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set2), weakMapCtorString = toSource(WeakMap2);
  2904. var symbolProto = Symbol2 ? Symbol2.prototype : undefined$1, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined$1, symbolToString = symbolProto ? symbolProto.toString : undefined$1;
  2905. function lodash2(value) {
  2906. if (isObjectLike(value) && !isArray2(value) && !(value instanceof LazyWrapper)) {
  2907. if (value instanceof LodashWrapper) {
  2908. return value;
  2909. }
  2910. if (hasOwnProperty2.call(value, "__wrapped__")) {
  2911. return wrapperClone(value);
  2912. }
  2913. }
  2914. return new LodashWrapper(value);
  2915. }
  2916. var baseCreate = /* @__PURE__ */ function() {
  2917. function object2() {
  2918. }
  2919. return function(proto) {
  2920. if (!isObject2(proto)) {
  2921. return {};
  2922. }
  2923. if (objectCreate) {
  2924. return objectCreate(proto);
  2925. }
  2926. object2.prototype = proto;
  2927. var result3 = new object2();
  2928. object2.prototype = undefined$1;
  2929. return result3;
  2930. };
  2931. }();
  2932. function baseLodash() {
  2933. }
  2934. function LodashWrapper(value, chainAll) {
  2935. this.__wrapped__ = value;
  2936. this.__actions__ = [];
  2937. this.__chain__ = !!chainAll;
  2938. this.__index__ = 0;
  2939. this.__values__ = undefined$1;
  2940. }
  2941. lodash2.templateSettings = {
  2942. /**
  2943. * Used to detect `data` property values to be HTML-escaped.
  2944. *
  2945. * @memberOf _.templateSettings
  2946. * @type {RegExp}
  2947. */
  2948. "escape": reEscape,
  2949. /**
  2950. * Used to detect code to be evaluated.
  2951. *
  2952. * @memberOf _.templateSettings
  2953. * @type {RegExp}
  2954. */
  2955. "evaluate": reEvaluate,
  2956. /**
  2957. * Used to detect `data` property values to inject.
  2958. *
  2959. * @memberOf _.templateSettings
  2960. * @type {RegExp}
  2961. */
  2962. "interpolate": reInterpolate,
  2963. /**
  2964. * Used to reference the data object in the template text.
  2965. *
  2966. * @memberOf _.templateSettings
  2967. * @type {string}
  2968. */
  2969. "variable": "",
  2970. /**
  2971. * Used to import variables into the compiled template.
  2972. *
  2973. * @memberOf _.templateSettings
  2974. * @type {Object}
  2975. */
  2976. "imports": {
  2977. /**
  2978. * A reference to the `lodash` function.
  2979. *
  2980. * @memberOf _.templateSettings.imports
  2981. * @type {Function}
  2982. */
  2983. "_": lodash2
  2984. }
  2985. };
  2986. lodash2.prototype = baseLodash.prototype;
  2987. lodash2.prototype.constructor = lodash2;
  2988. LodashWrapper.prototype = baseCreate(baseLodash.prototype);
  2989. LodashWrapper.prototype.constructor = LodashWrapper;
  2990. function LazyWrapper(value) {
  2991. this.__wrapped__ = value;
  2992. this.__actions__ = [];
  2993. this.__dir__ = 1;
  2994. this.__filtered__ = false;
  2995. this.__iteratees__ = [];
  2996. this.__takeCount__ = MAX_ARRAY_LENGTH;
  2997. this.__views__ = [];
  2998. }
  2999. function lazyClone() {
  3000. var result3 = new LazyWrapper(this.__wrapped__);
  3001. result3.__actions__ = copyArray(this.__actions__);
  3002. result3.__dir__ = this.__dir__;
  3003. result3.__filtered__ = this.__filtered__;
  3004. result3.__iteratees__ = copyArray(this.__iteratees__);
  3005. result3.__takeCount__ = this.__takeCount__;
  3006. result3.__views__ = copyArray(this.__views__);
  3007. return result3;
  3008. }
  3009. function lazyReverse() {
  3010. if (this.__filtered__) {
  3011. var result3 = new LazyWrapper(this);
  3012. result3.__dir__ = -1;
  3013. result3.__filtered__ = true;
  3014. } else {
  3015. result3 = this.clone();
  3016. result3.__dir__ *= -1;
  3017. }
  3018. return result3;
  3019. }
  3020. function lazyValue() {
  3021. var array2 = this.__wrapped__.value(), dir = this.__dir__, isArr = isArray2(array2), isRight = dir < 0, arrLength = isArr ? array2.length : 0, view = getView(0, arrLength, this.__views__), start = view.start, end = view.end, length = end - start, index2 = isRight ? end : start - 1, iteratees = this.__iteratees__, iterLength = iteratees.length, resIndex = 0, takeCount = nativeMin(length, this.__takeCount__);
  3022. if (!isArr || !isRight && arrLength == length && takeCount == length) {
  3023. return baseWrapperValue(array2, this.__actions__);
  3024. }
  3025. var result3 = [];
  3026. outer:
  3027. while (length-- && resIndex < takeCount) {
  3028. index2 += dir;
  3029. var iterIndex = -1, value = array2[index2];
  3030. while (++iterIndex < iterLength) {
  3031. var data = iteratees[iterIndex], iteratee2 = data.iteratee, type = data.type, computed = iteratee2(value);
  3032. if (type == LAZY_MAP_FLAG) {
  3033. value = computed;
  3034. } else if (!computed) {
  3035. if (type == LAZY_FILTER_FLAG) {
  3036. continue outer;
  3037. } else {
  3038. break outer;
  3039. }
  3040. }
  3041. }
  3042. result3[resIndex++] = value;
  3043. }
  3044. return result3;
  3045. }
  3046. LazyWrapper.prototype = baseCreate(baseLodash.prototype);
  3047. LazyWrapper.prototype.constructor = LazyWrapper;
  3048. function Hash(entries) {
  3049. var index2 = -1, length = entries == null ? 0 : entries.length;
  3050. this.clear();
  3051. while (++index2 < length) {
  3052. var entry = entries[index2];
  3053. this.set(entry[0], entry[1]);
  3054. }
  3055. }
  3056. function hashClear() {
  3057. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  3058. this.size = 0;
  3059. }
  3060. function hashDelete(key) {
  3061. var result3 = this.has(key) && delete this.__data__[key];
  3062. this.size -= result3 ? 1 : 0;
  3063. return result3;
  3064. }
  3065. function hashGet(key) {
  3066. var data = this.__data__;
  3067. if (nativeCreate) {
  3068. var result3 = data[key];
  3069. return result3 === HASH_UNDEFINED ? undefined$1 : result3;
  3070. }
  3071. return hasOwnProperty2.call(data, key) ? data[key] : undefined$1;
  3072. }
  3073. function hashHas(key) {
  3074. var data = this.__data__;
  3075. return nativeCreate ? data[key] !== undefined$1 : hasOwnProperty2.call(data, key);
  3076. }
  3077. function hashSet(key, value) {
  3078. var data = this.__data__;
  3079. this.size += this.has(key) ? 0 : 1;
  3080. data[key] = nativeCreate && value === undefined$1 ? HASH_UNDEFINED : value;
  3081. return this;
  3082. }
  3083. Hash.prototype.clear = hashClear;
  3084. Hash.prototype["delete"] = hashDelete;
  3085. Hash.prototype.get = hashGet;
  3086. Hash.prototype.has = hashHas;
  3087. Hash.prototype.set = hashSet;
  3088. function ListCache(entries) {
  3089. var index2 = -1, length = entries == null ? 0 : entries.length;
  3090. this.clear();
  3091. while (++index2 < length) {
  3092. var entry = entries[index2];
  3093. this.set(entry[0], entry[1]);
  3094. }
  3095. }
  3096. function listCacheClear() {
  3097. this.__data__ = [];
  3098. this.size = 0;
  3099. }
  3100. function listCacheDelete(key) {
  3101. var data = this.__data__, index2 = assocIndexOf(data, key);
  3102. if (index2 < 0) {
  3103. return false;
  3104. }
  3105. var lastIndex = data.length - 1;
  3106. if (index2 == lastIndex) {
  3107. data.pop();
  3108. } else {
  3109. splice.call(data, index2, 1);
  3110. }
  3111. --this.size;
  3112. return true;
  3113. }
  3114. function listCacheGet(key) {
  3115. var data = this.__data__, index2 = assocIndexOf(data, key);
  3116. return index2 < 0 ? undefined$1 : data[index2][1];
  3117. }
  3118. function listCacheHas(key) {
  3119. return assocIndexOf(this.__data__, key) > -1;
  3120. }
  3121. function listCacheSet(key, value) {
  3122. var data = this.__data__, index2 = assocIndexOf(data, key);
  3123. if (index2 < 0) {
  3124. ++this.size;
  3125. data.push([key, value]);
  3126. } else {
  3127. data[index2][1] = value;
  3128. }
  3129. return this;
  3130. }
  3131. ListCache.prototype.clear = listCacheClear;
  3132. ListCache.prototype["delete"] = listCacheDelete;
  3133. ListCache.prototype.get = listCacheGet;
  3134. ListCache.prototype.has = listCacheHas;
  3135. ListCache.prototype.set = listCacheSet;
  3136. function MapCache(entries) {
  3137. var index2 = -1, length = entries == null ? 0 : entries.length;
  3138. this.clear();
  3139. while (++index2 < length) {
  3140. var entry = entries[index2];
  3141. this.set(entry[0], entry[1]);
  3142. }
  3143. }
  3144. function mapCacheClear() {
  3145. this.size = 0;
  3146. this.__data__ = {
  3147. "hash": new Hash(),
  3148. "map": new (Map2 || ListCache)(),
  3149. "string": new Hash()
  3150. };
  3151. }
  3152. function mapCacheDelete(key) {
  3153. var result3 = getMapData(this, key)["delete"](key);
  3154. this.size -= result3 ? 1 : 0;
  3155. return result3;
  3156. }
  3157. function mapCacheGet(key) {
  3158. return getMapData(this, key).get(key);
  3159. }
  3160. function mapCacheHas(key) {
  3161. return getMapData(this, key).has(key);
  3162. }
  3163. function mapCacheSet(key, value) {
  3164. var data = getMapData(this, key), size2 = data.size;
  3165. data.set(key, value);
  3166. this.size += data.size == size2 ? 0 : 1;
  3167. return this;
  3168. }
  3169. MapCache.prototype.clear = mapCacheClear;
  3170. MapCache.prototype["delete"] = mapCacheDelete;
  3171. MapCache.prototype.get = mapCacheGet;
  3172. MapCache.prototype.has = mapCacheHas;
  3173. MapCache.prototype.set = mapCacheSet;
  3174. function SetCache(values2) {
  3175. var index2 = -1, length = values2 == null ? 0 : values2.length;
  3176. this.__data__ = new MapCache();
  3177. while (++index2 < length) {
  3178. this.add(values2[index2]);
  3179. }
  3180. }
  3181. function setCacheAdd(value) {
  3182. this.__data__.set(value, HASH_UNDEFINED);
  3183. return this;
  3184. }
  3185. function setCacheHas(value) {
  3186. return this.__data__.has(value);
  3187. }
  3188. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
  3189. SetCache.prototype.has = setCacheHas;
  3190. function Stack(entries) {
  3191. var data = this.__data__ = new ListCache(entries);
  3192. this.size = data.size;
  3193. }
  3194. function stackClear() {
  3195. this.__data__ = new ListCache();
  3196. this.size = 0;
  3197. }
  3198. function stackDelete(key) {
  3199. var data = this.__data__, result3 = data["delete"](key);
  3200. this.size = data.size;
  3201. return result3;
  3202. }
  3203. function stackGet(key) {
  3204. return this.__data__.get(key);
  3205. }
  3206. function stackHas(key) {
  3207. return this.__data__.has(key);
  3208. }
  3209. function stackSet(key, value) {
  3210. var data = this.__data__;
  3211. if (data instanceof ListCache) {
  3212. var pairs = data.__data__;
  3213. if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
  3214. pairs.push([key, value]);
  3215. this.size = ++data.size;
  3216. return this;
  3217. }
  3218. data = this.__data__ = new MapCache(pairs);
  3219. }
  3220. data.set(key, value);
  3221. this.size = data.size;
  3222. return this;
  3223. }
  3224. Stack.prototype.clear = stackClear;
  3225. Stack.prototype["delete"] = stackDelete;
  3226. Stack.prototype.get = stackGet;
  3227. Stack.prototype.has = stackHas;
  3228. Stack.prototype.set = stackSet;
  3229. function arrayLikeKeys(value, inherited) {
  3230. var isArr = isArray2(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer2(value), isType = !isArr && !isArg && !isBuff && isTypedArray2(value), skipIndexes = isArr || isArg || isBuff || isType, result3 = skipIndexes ? baseTimes(value.length, String2) : [], length = result3.length;
  3231. for (var key in value) {
  3232. if ((inherited || hasOwnProperty2.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
  3233. (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
  3234. isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
  3235. isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
  3236. isIndex(key, length)))) {
  3237. result3.push(key);
  3238. }
  3239. }
  3240. return result3;
  3241. }
  3242. function arraySample(array2) {
  3243. var length = array2.length;
  3244. return length ? array2[baseRandom(0, length - 1)] : undefined$1;
  3245. }
  3246. function arraySampleSize(array2, n2) {
  3247. return shuffleSelf(copyArray(array2), baseClamp(n2, 0, array2.length));
  3248. }
  3249. function arrayShuffle(array2) {
  3250. return shuffleSelf(copyArray(array2));
  3251. }
  3252. function assignMergeValue(object2, key, value) {
  3253. if (value !== undefined$1 && !eq(object2[key], value) || value === undefined$1 && !(key in object2)) {
  3254. baseAssignValue(object2, key, value);
  3255. }
  3256. }
  3257. function assignValue(object2, key, value) {
  3258. var objValue = object2[key];
  3259. if (!(hasOwnProperty2.call(object2, key) && eq(objValue, value)) || value === undefined$1 && !(key in object2)) {
  3260. baseAssignValue(object2, key, value);
  3261. }
  3262. }
  3263. function assocIndexOf(array2, key) {
  3264. var length = array2.length;
  3265. while (length--) {
  3266. if (eq(array2[length][0], key)) {
  3267. return length;
  3268. }
  3269. }
  3270. return -1;
  3271. }
  3272. function baseAggregator(collection, setter, iteratee2, accumulator) {
  3273. baseEach(collection, function(value, key, collection2) {
  3274. setter(accumulator, value, iteratee2(value), collection2);
  3275. });
  3276. return accumulator;
  3277. }
  3278. function baseAssign(object2, source) {
  3279. return object2 && copyObject(source, keys(source), object2);
  3280. }
  3281. function baseAssignIn(object2, source) {
  3282. return object2 && copyObject(source, keysIn(source), object2);
  3283. }
  3284. function baseAssignValue(object2, key, value) {
  3285. if (key == "__proto__" && defineProperty) {
  3286. defineProperty(object2, key, {
  3287. "configurable": true,
  3288. "enumerable": true,
  3289. "value": value,
  3290. "writable": true
  3291. });
  3292. } else {
  3293. object2[key] = value;
  3294. }
  3295. }
  3296. function baseAt(object2, paths) {
  3297. var index2 = -1, length = paths.length, result3 = Array2(length), skip = object2 == null;
  3298. while (++index2 < length) {
  3299. result3[index2] = skip ? undefined$1 : get(object2, paths[index2]);
  3300. }
  3301. return result3;
  3302. }
  3303. function baseClamp(number2, lower, upper) {
  3304. if (number2 === number2) {
  3305. if (upper !== undefined$1) {
  3306. number2 = number2 <= upper ? number2 : upper;
  3307. }
  3308. if (lower !== undefined$1) {
  3309. number2 = number2 >= lower ? number2 : lower;
  3310. }
  3311. }
  3312. return number2;
  3313. }
  3314. function baseClone(value, bitmask, customizer, key, object2, stack) {
  3315. var result3, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG;
  3316. if (customizer) {
  3317. result3 = object2 ? customizer(value, key, object2, stack) : customizer(value);
  3318. }
  3319. if (result3 !== undefined$1) {
  3320. return result3;
  3321. }
  3322. if (!isObject2(value)) {
  3323. return value;
  3324. }
  3325. var isArr = isArray2(value);
  3326. if (isArr) {
  3327. result3 = initCloneArray(value);
  3328. if (!isDeep) {
  3329. return copyArray(value, result3);
  3330. }
  3331. } else {
  3332. var tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
  3333. if (isBuffer2(value)) {
  3334. return cloneBuffer(value, isDeep);
  3335. }
  3336. if (tag == objectTag || tag == argsTag || isFunc && !object2) {
  3337. result3 = isFlat || isFunc ? {} : initCloneObject(value);
  3338. if (!isDeep) {
  3339. return isFlat ? copySymbolsIn(value, baseAssignIn(result3, value)) : copySymbols(value, baseAssign(result3, value));
  3340. }
  3341. } else {
  3342. if (!cloneableTags[tag]) {
  3343. return object2 ? value : {};
  3344. }
  3345. result3 = initCloneByTag(value, tag, isDeep);
  3346. }
  3347. }
  3348. stack || (stack = new Stack());
  3349. var stacked = stack.get(value);
  3350. if (stacked) {
  3351. return stacked;
  3352. }
  3353. stack.set(value, result3);
  3354. if (isSet(value)) {
  3355. value.forEach(function(subValue) {
  3356. result3.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
  3357. });
  3358. } else if (isMap(value)) {
  3359. value.forEach(function(subValue, key2) {
  3360. result3.set(key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
  3361. });
  3362. }
  3363. var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys;
  3364. var props = isArr ? undefined$1 : keysFunc(value);
  3365. arrayEach(props || value, function(subValue, key2) {
  3366. if (props) {
  3367. key2 = subValue;
  3368. subValue = value[key2];
  3369. }
  3370. assignValue(result3, key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
  3371. });
  3372. return result3;
  3373. }
  3374. function baseConforms(source) {
  3375. var props = keys(source);
  3376. return function(object2) {
  3377. return baseConformsTo(object2, source, props);
  3378. };
  3379. }
  3380. function baseConformsTo(object2, source, props) {
  3381. var length = props.length;
  3382. if (object2 == null) {
  3383. return !length;
  3384. }
  3385. object2 = Object2(object2);
  3386. while (length--) {
  3387. var key = props[length], predicate = source[key], value = object2[key];
  3388. if (value === undefined$1 && !(key in object2) || !predicate(value)) {
  3389. return false;
  3390. }
  3391. }
  3392. return true;
  3393. }
  3394. function baseDelay(func, wait, args) {
  3395. if (typeof func != "function") {
  3396. throw new TypeError2(FUNC_ERROR_TEXT);
  3397. }
  3398. return setTimeout2(function() {
  3399. func.apply(undefined$1, args);
  3400. }, wait);
  3401. }
  3402. function baseDifference(array2, values2, iteratee2, comparator) {
  3403. var index2 = -1, includes2 = arrayIncludes, isCommon = true, length = array2.length, result3 = [], valuesLength = values2.length;
  3404. if (!length) {
  3405. return result3;
  3406. }
  3407. if (iteratee2) {
  3408. values2 = arrayMap(values2, baseUnary(iteratee2));
  3409. }
  3410. if (comparator) {
  3411. includes2 = arrayIncludesWith;
  3412. isCommon = false;
  3413. } else if (values2.length >= LARGE_ARRAY_SIZE) {
  3414. includes2 = cacheHas;
  3415. isCommon = false;
  3416. values2 = new SetCache(values2);
  3417. }
  3418. outer:
  3419. while (++index2 < length) {
  3420. var value = array2[index2], computed = iteratee2 == null ? value : iteratee2(value);
  3421. value = comparator || value !== 0 ? value : 0;
  3422. if (isCommon && computed === computed) {
  3423. var valuesIndex = valuesLength;
  3424. while (valuesIndex--) {
  3425. if (values2[valuesIndex] === computed) {
  3426. continue outer;
  3427. }
  3428. }
  3429. result3.push(value);
  3430. } else if (!includes2(values2, computed, comparator)) {
  3431. result3.push(value);
  3432. }
  3433. }
  3434. return result3;
  3435. }
  3436. var baseEach = createBaseEach(baseForOwn);
  3437. var baseEachRight = createBaseEach(baseForOwnRight, true);
  3438. function baseEvery(collection, predicate) {
  3439. var result3 = true;
  3440. baseEach(collection, function(value, index2, collection2) {
  3441. result3 = !!predicate(value, index2, collection2);
  3442. return result3;
  3443. });
  3444. return result3;
  3445. }
  3446. function baseExtremum(array2, iteratee2, comparator) {
  3447. var index2 = -1, length = array2.length;
  3448. while (++index2 < length) {
  3449. var value = array2[index2], current = iteratee2(value);
  3450. if (current != null && (computed === undefined$1 ? current === current && !isSymbol(current) : comparator(current, computed))) {
  3451. var computed = current, result3 = value;
  3452. }
  3453. }
  3454. return result3;
  3455. }
  3456. function baseFill(array2, value, start, end) {
  3457. var length = array2.length;
  3458. start = toInteger(start);
  3459. if (start < 0) {
  3460. start = -start > length ? 0 : length + start;
  3461. }
  3462. end = end === undefined$1 || end > length ? length : toInteger(end);
  3463. if (end < 0) {
  3464. end += length;
  3465. }
  3466. end = start > end ? 0 : toLength(end);
  3467. while (start < end) {
  3468. array2[start++] = value;
  3469. }
  3470. return array2;
  3471. }
  3472. function baseFilter(collection, predicate) {
  3473. var result3 = [];
  3474. baseEach(collection, function(value, index2, collection2) {
  3475. if (predicate(value, index2, collection2)) {
  3476. result3.push(value);
  3477. }
  3478. });
  3479. return result3;
  3480. }
  3481. function baseFlatten(array2, depth, predicate, isStrict, result3) {
  3482. var index2 = -1, length = array2.length;
  3483. predicate || (predicate = isFlattenable);
  3484. result3 || (result3 = []);
  3485. while (++index2 < length) {
  3486. var value = array2[index2];
  3487. if (depth > 0 && predicate(value)) {
  3488. if (depth > 1) {
  3489. baseFlatten(value, depth - 1, predicate, isStrict, result3);
  3490. } else {
  3491. arrayPush(result3, value);
  3492. }
  3493. } else if (!isStrict) {
  3494. result3[result3.length] = value;
  3495. }
  3496. }
  3497. return result3;
  3498. }
  3499. var baseFor = createBaseFor();
  3500. var baseForRight = createBaseFor(true);
  3501. function baseForOwn(object2, iteratee2) {
  3502. return object2 && baseFor(object2, iteratee2, keys);
  3503. }
  3504. function baseForOwnRight(object2, iteratee2) {
  3505. return object2 && baseForRight(object2, iteratee2, keys);
  3506. }
  3507. function baseFunctions(object2, props) {
  3508. return arrayFilter(props, function(key) {
  3509. return isFunction2(object2[key]);
  3510. });
  3511. }
  3512. function baseGet(object2, path) {
  3513. path = castPath(path, object2);
  3514. var index2 = 0, length = path.length;
  3515. while (object2 != null && index2 < length) {
  3516. object2 = object2[toKey(path[index2++])];
  3517. }
  3518. return index2 && index2 == length ? object2 : undefined$1;
  3519. }
  3520. function baseGetAllKeys(object2, keysFunc, symbolsFunc) {
  3521. var result3 = keysFunc(object2);
  3522. return isArray2(object2) ? result3 : arrayPush(result3, symbolsFunc(object2));
  3523. }
  3524. function baseGetTag(value) {
  3525. if (value == null) {
  3526. return value === undefined$1 ? undefinedTag : nullTag;
  3527. }
  3528. return symToStringTag && symToStringTag in Object2(value) ? getRawTag(value) : objectToString2(value);
  3529. }
  3530. function baseGt(value, other) {
  3531. return value > other;
  3532. }
  3533. function baseHas(object2, key) {
  3534. return object2 != null && hasOwnProperty2.call(object2, key);
  3535. }
  3536. function baseHasIn(object2, key) {
  3537. return object2 != null && key in Object2(object2);
  3538. }
  3539. function baseInRange(number2, start, end) {
  3540. return number2 >= nativeMin(start, end) && number2 < nativeMax(start, end);
  3541. }
  3542. function baseIntersection(arrays, iteratee2, comparator) {
  3543. var includes2 = comparator ? arrayIncludesWith : arrayIncludes, length = arrays[0].length, othLength = arrays.length, othIndex = othLength, caches = Array2(othLength), maxLength = Infinity, result3 = [];
  3544. while (othIndex--) {
  3545. var array2 = arrays[othIndex];
  3546. if (othIndex && iteratee2) {
  3547. array2 = arrayMap(array2, baseUnary(iteratee2));
  3548. }
  3549. maxLength = nativeMin(array2.length, maxLength);
  3550. caches[othIndex] = !comparator && (iteratee2 || length >= 120 && array2.length >= 120) ? new SetCache(othIndex && array2) : undefined$1;
  3551. }
  3552. array2 = arrays[0];
  3553. var index2 = -1, seen = caches[0];
  3554. outer:
  3555. while (++index2 < length && result3.length < maxLength) {
  3556. var value = array2[index2], computed = iteratee2 ? iteratee2(value) : value;
  3557. value = comparator || value !== 0 ? value : 0;
  3558. if (!(seen ? cacheHas(seen, computed) : includes2(result3, computed, comparator))) {
  3559. othIndex = othLength;
  3560. while (--othIndex) {
  3561. var cache2 = caches[othIndex];
  3562. if (!(cache2 ? cacheHas(cache2, computed) : includes2(arrays[othIndex], computed, comparator))) {
  3563. continue outer;
  3564. }
  3565. }
  3566. if (seen) {
  3567. seen.push(computed);
  3568. }
  3569. result3.push(value);
  3570. }
  3571. }
  3572. return result3;
  3573. }
  3574. function baseInverter(object2, setter, iteratee2, accumulator) {
  3575. baseForOwn(object2, function(value, key, object3) {
  3576. setter(accumulator, iteratee2(value), key, object3);
  3577. });
  3578. return accumulator;
  3579. }
  3580. function baseInvoke(object2, path, args) {
  3581. path = castPath(path, object2);
  3582. object2 = parent2(object2, path);
  3583. var func = object2 == null ? object2 : object2[toKey(last(path))];
  3584. return func == null ? undefined$1 : apply2(func, object2, args);
  3585. }
  3586. function baseIsArguments(value) {
  3587. return isObjectLike(value) && baseGetTag(value) == argsTag;
  3588. }
  3589. function baseIsArrayBuffer(value) {
  3590. return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
  3591. }
  3592. function baseIsDate(value) {
  3593. return isObjectLike(value) && baseGetTag(value) == dateTag;
  3594. }
  3595. function baseIsEqual(value, other, bitmask, customizer, stack) {
  3596. if (value === other) {
  3597. return true;
  3598. }
  3599. if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
  3600. return value !== value && other !== other;
  3601. }
  3602. return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
  3603. }
  3604. function baseIsEqualDeep(object2, other, bitmask, customizer, equalFunc, stack) {
  3605. var objIsArr = isArray2(object2), othIsArr = isArray2(other), objTag = objIsArr ? arrayTag : getTag(object2), othTag = othIsArr ? arrayTag : getTag(other);
  3606. objTag = objTag == argsTag ? objectTag : objTag;
  3607. othTag = othTag == argsTag ? objectTag : othTag;
  3608. var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
  3609. if (isSameTag && isBuffer2(object2)) {
  3610. if (!isBuffer2(other)) {
  3611. return false;
  3612. }
  3613. objIsArr = true;
  3614. objIsObj = false;
  3615. }
  3616. if (isSameTag && !objIsObj) {
  3617. stack || (stack = new Stack());
  3618. return objIsArr || isTypedArray2(object2) ? equalArrays(object2, other, bitmask, customizer, equalFunc, stack) : equalByTag(object2, other, objTag, bitmask, customizer, equalFunc, stack);
  3619. }
  3620. if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
  3621. var objIsWrapped = objIsObj && hasOwnProperty2.call(object2, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty2.call(other, "__wrapped__");
  3622. if (objIsWrapped || othIsWrapped) {
  3623. var objUnwrapped = objIsWrapped ? object2.value() : object2, othUnwrapped = othIsWrapped ? other.value() : other;
  3624. stack || (stack = new Stack());
  3625. return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
  3626. }
  3627. }
  3628. if (!isSameTag) {
  3629. return false;
  3630. }
  3631. stack || (stack = new Stack());
  3632. return equalObjects(object2, other, bitmask, customizer, equalFunc, stack);
  3633. }
  3634. function baseIsMap(value) {
  3635. return isObjectLike(value) && getTag(value) == mapTag;
  3636. }
  3637. function baseIsMatch(object2, source, matchData, customizer) {
  3638. var index2 = matchData.length, length = index2, noCustomizer = !customizer;
  3639. if (object2 == null) {
  3640. return !length;
  3641. }
  3642. object2 = Object2(object2);
  3643. while (index2--) {
  3644. var data = matchData[index2];
  3645. if (noCustomizer && data[2] ? data[1] !== object2[data[0]] : !(data[0] in object2)) {
  3646. return false;
  3647. }
  3648. }
  3649. while (++index2 < length) {
  3650. data = matchData[index2];
  3651. var key = data[0], objValue = object2[key], srcValue = data[1];
  3652. if (noCustomizer && data[2]) {
  3653. if (objValue === undefined$1 && !(key in object2)) {
  3654. return false;
  3655. }
  3656. } else {
  3657. var stack = new Stack();
  3658. if (customizer) {
  3659. var result3 = customizer(objValue, srcValue, key, object2, source, stack);
  3660. }
  3661. if (!(result3 === undefined$1 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result3)) {
  3662. return false;
  3663. }
  3664. }
  3665. }
  3666. return true;
  3667. }
  3668. function baseIsNative(value) {
  3669. if (!isObject2(value) || isMasked(value)) {
  3670. return false;
  3671. }
  3672. var pattern2 = isFunction2(value) ? reIsNative : reIsHostCtor;
  3673. return pattern2.test(toSource(value));
  3674. }
  3675. function baseIsRegExp(value) {
  3676. return isObjectLike(value) && baseGetTag(value) == regexpTag;
  3677. }
  3678. function baseIsSet(value) {
  3679. return isObjectLike(value) && getTag(value) == setTag;
  3680. }
  3681. function baseIsTypedArray(value) {
  3682. return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
  3683. }
  3684. function baseIteratee(value) {
  3685. if (typeof value == "function") {
  3686. return value;
  3687. }
  3688. if (value == null) {
  3689. return identity;
  3690. }
  3691. if (typeof value == "object") {
  3692. return isArray2(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
  3693. }
  3694. return property(value);
  3695. }
  3696. function baseKeys(object2) {
  3697. if (!isPrototype(object2)) {
  3698. return nativeKeys(object2);
  3699. }
  3700. var result3 = [];
  3701. for (var key in Object2(object2)) {
  3702. if (hasOwnProperty2.call(object2, key) && key != "constructor") {
  3703. result3.push(key);
  3704. }
  3705. }
  3706. return result3;
  3707. }
  3708. function baseKeysIn(object2) {
  3709. if (!isObject2(object2)) {
  3710. return nativeKeysIn(object2);
  3711. }
  3712. var isProto = isPrototype(object2), result3 = [];
  3713. for (var key in object2) {
  3714. if (!(key == "constructor" && (isProto || !hasOwnProperty2.call(object2, key)))) {
  3715. result3.push(key);
  3716. }
  3717. }
  3718. return result3;
  3719. }
  3720. function baseLt(value, other) {
  3721. return value < other;
  3722. }
  3723. function baseMap(collection, iteratee2) {
  3724. var index2 = -1, result3 = isArrayLike(collection) ? Array2(collection.length) : [];
  3725. baseEach(collection, function(value, key, collection2) {
  3726. result3[++index2] = iteratee2(value, key, collection2);
  3727. });
  3728. return result3;
  3729. }
  3730. function baseMatches(source) {
  3731. var matchData = getMatchData(source);
  3732. if (matchData.length == 1 && matchData[0][2]) {
  3733. return matchesStrictComparable(matchData[0][0], matchData[0][1]);
  3734. }
  3735. return function(object2) {
  3736. return object2 === source || baseIsMatch(object2, source, matchData);
  3737. };
  3738. }
  3739. function baseMatchesProperty(path, srcValue) {
  3740. if (isKey(path) && isStrictComparable(srcValue)) {
  3741. return matchesStrictComparable(toKey(path), srcValue);
  3742. }
  3743. return function(object2) {
  3744. var objValue = get(object2, path);
  3745. return objValue === undefined$1 && objValue === srcValue ? hasIn(object2, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
  3746. };
  3747. }
  3748. function baseMerge(object2, source, srcIndex, customizer, stack) {
  3749. if (object2 === source) {
  3750. return;
  3751. }
  3752. baseFor(source, function(srcValue, key) {
  3753. stack || (stack = new Stack());
  3754. if (isObject2(srcValue)) {
  3755. baseMergeDeep(object2, source, key, srcIndex, baseMerge, customizer, stack);
  3756. } else {
  3757. var newValue = customizer ? customizer(safeGet(object2, key), srcValue, key + "", object2, source, stack) : undefined$1;
  3758. if (newValue === undefined$1) {
  3759. newValue = srcValue;
  3760. }
  3761. assignMergeValue(object2, key, newValue);
  3762. }
  3763. }, keysIn);
  3764. }
  3765. function baseMergeDeep(object2, source, key, srcIndex, mergeFunc, customizer, stack) {
  3766. var objValue = safeGet(object2, key), srcValue = safeGet(source, key), stacked = stack.get(srcValue);
  3767. if (stacked) {
  3768. assignMergeValue(object2, key, stacked);
  3769. return;
  3770. }
  3771. var newValue = customizer ? customizer(objValue, srcValue, key + "", object2, source, stack) : undefined$1;
  3772. var isCommon = newValue === undefined$1;
  3773. if (isCommon) {
  3774. var isArr = isArray2(srcValue), isBuff = !isArr && isBuffer2(srcValue), isTyped = !isArr && !isBuff && isTypedArray2(srcValue);
  3775. newValue = srcValue;
  3776. if (isArr || isBuff || isTyped) {
  3777. if (isArray2(objValue)) {
  3778. newValue = objValue;
  3779. } else if (isArrayLikeObject(objValue)) {
  3780. newValue = copyArray(objValue);
  3781. } else if (isBuff) {
  3782. isCommon = false;
  3783. newValue = cloneBuffer(srcValue, true);
  3784. } else if (isTyped) {
  3785. isCommon = false;
  3786. newValue = cloneTypedArray(srcValue, true);
  3787. } else {
  3788. newValue = [];
  3789. }
  3790. } else if (isPlainObject2(srcValue) || isArguments(srcValue)) {
  3791. newValue = objValue;
  3792. if (isArguments(objValue)) {
  3793. newValue = toPlainObject(objValue);
  3794. } else if (!isObject2(objValue) || isFunction2(objValue)) {
  3795. newValue = initCloneObject(srcValue);
  3796. }
  3797. } else {
  3798. isCommon = false;
  3799. }
  3800. }
  3801. if (isCommon) {
  3802. stack.set(srcValue, newValue);
  3803. mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
  3804. stack["delete"](srcValue);
  3805. }
  3806. assignMergeValue(object2, key, newValue);
  3807. }
  3808. function baseNth(array2, n2) {
  3809. var length = array2.length;
  3810. if (!length) {
  3811. return;
  3812. }
  3813. n2 += n2 < 0 ? length : 0;
  3814. return isIndex(n2, length) ? array2[n2] : undefined$1;
  3815. }
  3816. function baseOrderBy(collection, iteratees, orders) {
  3817. if (iteratees.length) {
  3818. iteratees = arrayMap(iteratees, function(iteratee2) {
  3819. if (isArray2(iteratee2)) {
  3820. return function(value) {
  3821. return baseGet(value, iteratee2.length === 1 ? iteratee2[0] : iteratee2);
  3822. };
  3823. }
  3824. return iteratee2;
  3825. });
  3826. } else {
  3827. iteratees = [identity];
  3828. }
  3829. var index2 = -1;
  3830. iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
  3831. var result3 = baseMap(collection, function(value, key, collection2) {
  3832. var criteria = arrayMap(iteratees, function(iteratee2) {
  3833. return iteratee2(value);
  3834. });
  3835. return { "criteria": criteria, "index": ++index2, "value": value };
  3836. });
  3837. return baseSortBy(result3, function(object2, other) {
  3838. return compareMultiple(object2, other, orders);
  3839. });
  3840. }
  3841. function basePick(object2, paths) {
  3842. return basePickBy(object2, paths, function(value, path) {
  3843. return hasIn(object2, path);
  3844. });
  3845. }
  3846. function basePickBy(object2, paths, predicate) {
  3847. var index2 = -1, length = paths.length, result3 = {};
  3848. while (++index2 < length) {
  3849. var path = paths[index2], value = baseGet(object2, path);
  3850. if (predicate(value, path)) {
  3851. baseSet(result3, castPath(path, object2), value);
  3852. }
  3853. }
  3854. return result3;
  3855. }
  3856. function basePropertyDeep(path) {
  3857. return function(object2) {
  3858. return baseGet(object2, path);
  3859. };
  3860. }
  3861. function basePullAll(array2, values2, iteratee2, comparator) {
  3862. var indexOf2 = comparator ? baseIndexOfWith : baseIndexOf, index2 = -1, length = values2.length, seen = array2;
  3863. if (array2 === values2) {
  3864. values2 = copyArray(values2);
  3865. }
  3866. if (iteratee2) {
  3867. seen = arrayMap(array2, baseUnary(iteratee2));
  3868. }
  3869. while (++index2 < length) {
  3870. var fromIndex = 0, value = values2[index2], computed = iteratee2 ? iteratee2(value) : value;
  3871. while ((fromIndex = indexOf2(seen, computed, fromIndex, comparator)) > -1) {
  3872. if (seen !== array2) {
  3873. splice.call(seen, fromIndex, 1);
  3874. }
  3875. splice.call(array2, fromIndex, 1);
  3876. }
  3877. }
  3878. return array2;
  3879. }
  3880. function basePullAt(array2, indexes) {
  3881. var length = array2 ? indexes.length : 0, lastIndex = length - 1;
  3882. while (length--) {
  3883. var index2 = indexes[length];
  3884. if (length == lastIndex || index2 !== previous) {
  3885. var previous = index2;
  3886. if (isIndex(index2)) {
  3887. splice.call(array2, index2, 1);
  3888. } else {
  3889. baseUnset(array2, index2);
  3890. }
  3891. }
  3892. }
  3893. return array2;
  3894. }
  3895. function baseRandom(lower, upper) {
  3896. return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
  3897. }
  3898. function baseRange(start, end, step, fromRight) {
  3899. var index2 = -1, length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), result3 = Array2(length);
  3900. while (length--) {
  3901. result3[fromRight ? length : ++index2] = start;
  3902. start += step;
  3903. }
  3904. return result3;
  3905. }
  3906. function baseRepeat(string, n2) {
  3907. var result3 = "";
  3908. if (!string || n2 < 1 || n2 > MAX_SAFE_INTEGER) {
  3909. return result3;
  3910. }
  3911. do {
  3912. if (n2 % 2) {
  3913. result3 += string;
  3914. }
  3915. n2 = nativeFloor(n2 / 2);
  3916. if (n2) {
  3917. string += string;
  3918. }
  3919. } while (n2);
  3920. return result3;
  3921. }
  3922. function baseRest(func, start) {
  3923. return setToString(overRest(func, start, identity), func + "");
  3924. }
  3925. function baseSample(collection) {
  3926. return arraySample(values(collection));
  3927. }
  3928. function baseSampleSize(collection, n2) {
  3929. var array2 = values(collection);
  3930. return shuffleSelf(array2, baseClamp(n2, 0, array2.length));
  3931. }
  3932. function baseSet(object2, path, value, customizer) {
  3933. if (!isObject2(object2)) {
  3934. return object2;
  3935. }
  3936. path = castPath(path, object2);
  3937. var index2 = -1, length = path.length, lastIndex = length - 1, nested = object2;
  3938. while (nested != null && ++index2 < length) {
  3939. var key = toKey(path[index2]), newValue = value;
  3940. if (key === "__proto__" || key === "constructor" || key === "prototype") {
  3941. return object2;
  3942. }
  3943. if (index2 != lastIndex) {
  3944. var objValue = nested[key];
  3945. newValue = customizer ? customizer(objValue, key, nested) : undefined$1;
  3946. if (newValue === undefined$1) {
  3947. newValue = isObject2(objValue) ? objValue : isIndex(path[index2 + 1]) ? [] : {};
  3948. }
  3949. }
  3950. assignValue(nested, key, newValue);
  3951. nested = nested[key];
  3952. }
  3953. return object2;
  3954. }
  3955. var baseSetData = !metaMap ? identity : function(func, data) {
  3956. metaMap.set(func, data);
  3957. return func;
  3958. };
  3959. var baseSetToString = !defineProperty ? identity : function(func, string) {
  3960. return defineProperty(func, "toString", {
  3961. "configurable": true,
  3962. "enumerable": false,
  3963. "value": constant(string),
  3964. "writable": true
  3965. });
  3966. };
  3967. function baseShuffle(collection) {
  3968. return shuffleSelf(values(collection));
  3969. }
  3970. function baseSlice(array2, start, end) {
  3971. var index2 = -1, length = array2.length;
  3972. if (start < 0) {
  3973. start = -start > length ? 0 : length + start;
  3974. }
  3975. end = end > length ? length : end;
  3976. if (end < 0) {
  3977. end += length;
  3978. }
  3979. length = start > end ? 0 : end - start >>> 0;
  3980. start >>>= 0;
  3981. var result3 = Array2(length);
  3982. while (++index2 < length) {
  3983. result3[index2] = array2[index2 + start];
  3984. }
  3985. return result3;
  3986. }
  3987. function baseSome(collection, predicate) {
  3988. var result3;
  3989. baseEach(collection, function(value, index2, collection2) {
  3990. result3 = predicate(value, index2, collection2);
  3991. return !result3;
  3992. });
  3993. return !!result3;
  3994. }
  3995. function baseSortedIndex(array2, value, retHighest) {
  3996. var low = 0, high = array2 == null ? low : array2.length;
  3997. if (typeof value == "number" && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
  3998. while (low < high) {
  3999. var mid = low + high >>> 1, computed = array2[mid];
  4000. if (computed !== null && !isSymbol(computed) && (retHighest ? computed <= value : computed < value)) {
  4001. low = mid + 1;
  4002. } else {
  4003. high = mid;
  4004. }
  4005. }
  4006. return high;
  4007. }
  4008. return baseSortedIndexBy(array2, value, identity, retHighest);
  4009. }
  4010. function baseSortedIndexBy(array2, value, iteratee2, retHighest) {
  4011. var low = 0, high = array2 == null ? 0 : array2.length;
  4012. if (high === 0) {
  4013. return 0;
  4014. }
  4015. value = iteratee2(value);
  4016. var valIsNaN = value !== value, valIsNull = value === null, valIsSymbol = isSymbol(value), valIsUndefined = value === undefined$1;
  4017. while (low < high) {
  4018. var mid = nativeFloor((low + high) / 2), computed = iteratee2(array2[mid]), othIsDefined = computed !== undefined$1, othIsNull = computed === null, othIsReflexive = computed === computed, othIsSymbol = isSymbol(computed);
  4019. if (valIsNaN) {
  4020. var setLow = retHighest || othIsReflexive;
  4021. } else if (valIsUndefined) {
  4022. setLow = othIsReflexive && (retHighest || othIsDefined);
  4023. } else if (valIsNull) {
  4024. setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
  4025. } else if (valIsSymbol) {
  4026. setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
  4027. } else if (othIsNull || othIsSymbol) {
  4028. setLow = false;
  4029. } else {
  4030. setLow = retHighest ? computed <= value : computed < value;
  4031. }
  4032. if (setLow) {
  4033. low = mid + 1;
  4034. } else {
  4035. high = mid;
  4036. }
  4037. }
  4038. return nativeMin(high, MAX_ARRAY_INDEX);
  4039. }
  4040. function baseSortedUniq(array2, iteratee2) {
  4041. var index2 = -1, length = array2.length, resIndex = 0, result3 = [];
  4042. while (++index2 < length) {
  4043. var value = array2[index2], computed = iteratee2 ? iteratee2(value) : value;
  4044. if (!index2 || !eq(computed, seen)) {
  4045. var seen = computed;
  4046. result3[resIndex++] = value === 0 ? 0 : value;
  4047. }
  4048. }
  4049. return result3;
  4050. }
  4051. function baseToNumber(value) {
  4052. if (typeof value == "number") {
  4053. return value;
  4054. }
  4055. if (isSymbol(value)) {
  4056. return NAN;
  4057. }
  4058. return +value;
  4059. }
  4060. function baseToString(value) {
  4061. if (typeof value == "string") {
  4062. return value;
  4063. }
  4064. if (isArray2(value)) {
  4065. return arrayMap(value, baseToString) + "";
  4066. }
  4067. if (isSymbol(value)) {
  4068. return symbolToString ? symbolToString.call(value) : "";
  4069. }
  4070. var result3 = value + "";
  4071. return result3 == "0" && 1 / value == -INFINITY ? "-0" : result3;
  4072. }
  4073. function baseUniq(array2, iteratee2, comparator) {
  4074. var index2 = -1, includes2 = arrayIncludes, length = array2.length, isCommon = true, result3 = [], seen = result3;
  4075. if (comparator) {
  4076. isCommon = false;
  4077. includes2 = arrayIncludesWith;
  4078. } else if (length >= LARGE_ARRAY_SIZE) {
  4079. var set3 = iteratee2 ? null : createSet(array2);
  4080. if (set3) {
  4081. return setToArray(set3);
  4082. }
  4083. isCommon = false;
  4084. includes2 = cacheHas;
  4085. seen = new SetCache();
  4086. } else {
  4087. seen = iteratee2 ? [] : result3;
  4088. }
  4089. outer:
  4090. while (++index2 < length) {
  4091. var value = array2[index2], computed = iteratee2 ? iteratee2(value) : value;
  4092. value = comparator || value !== 0 ? value : 0;
  4093. if (isCommon && computed === computed) {
  4094. var seenIndex = seen.length;
  4095. while (seenIndex--) {
  4096. if (seen[seenIndex] === computed) {
  4097. continue outer;
  4098. }
  4099. }
  4100. if (iteratee2) {
  4101. seen.push(computed);
  4102. }
  4103. result3.push(value);
  4104. } else if (!includes2(seen, computed, comparator)) {
  4105. if (seen !== result3) {
  4106. seen.push(computed);
  4107. }
  4108. result3.push(value);
  4109. }
  4110. }
  4111. return result3;
  4112. }
  4113. function baseUnset(object2, path) {
  4114. path = castPath(path, object2);
  4115. object2 = parent2(object2, path);
  4116. return object2 == null || delete object2[toKey(last(path))];
  4117. }
  4118. function baseUpdate(object2, path, updater, customizer) {
  4119. return baseSet(object2, path, updater(baseGet(object2, path)), customizer);
  4120. }
  4121. function baseWhile(array2, predicate, isDrop, fromRight) {
  4122. var length = array2.length, index2 = fromRight ? length : -1;
  4123. while ((fromRight ? index2-- : ++index2 < length) && predicate(array2[index2], index2, array2)) {
  4124. }
  4125. return isDrop ? baseSlice(array2, fromRight ? 0 : index2, fromRight ? index2 + 1 : length) : baseSlice(array2, fromRight ? index2 + 1 : 0, fromRight ? length : index2);
  4126. }
  4127. function baseWrapperValue(value, actions) {
  4128. var result3 = value;
  4129. if (result3 instanceof LazyWrapper) {
  4130. result3 = result3.value();
  4131. }
  4132. return arrayReduce(actions, function(result4, action) {
  4133. return action.func.apply(action.thisArg, arrayPush([result4], action.args));
  4134. }, result3);
  4135. }
  4136. function baseXor(arrays, iteratee2, comparator) {
  4137. var length = arrays.length;
  4138. if (length < 2) {
  4139. return length ? baseUniq(arrays[0]) : [];
  4140. }
  4141. var index2 = -1, result3 = Array2(length);
  4142. while (++index2 < length) {
  4143. var array2 = arrays[index2], othIndex = -1;
  4144. while (++othIndex < length) {
  4145. if (othIndex != index2) {
  4146. result3[index2] = baseDifference(result3[index2] || array2, arrays[othIndex], iteratee2, comparator);
  4147. }
  4148. }
  4149. }
  4150. return baseUniq(baseFlatten(result3, 1), iteratee2, comparator);
  4151. }
  4152. function baseZipObject(props, values2, assignFunc) {
  4153. var index2 = -1, length = props.length, valsLength = values2.length, result3 = {};
  4154. while (++index2 < length) {
  4155. var value = index2 < valsLength ? values2[index2] : undefined$1;
  4156. assignFunc(result3, props[index2], value);
  4157. }
  4158. return result3;
  4159. }
  4160. function castArrayLikeObject(value) {
  4161. return isArrayLikeObject(value) ? value : [];
  4162. }
  4163. function castFunction(value) {
  4164. return typeof value == "function" ? value : identity;
  4165. }
  4166. function castPath(value, object2) {
  4167. if (isArray2(value)) {
  4168. return value;
  4169. }
  4170. return isKey(value, object2) ? [value] : stringToPath(toString2(value));
  4171. }
  4172. var castRest = baseRest;
  4173. function castSlice(array2, start, end) {
  4174. var length = array2.length;
  4175. end = end === undefined$1 ? length : end;
  4176. return !start && end >= length ? array2 : baseSlice(array2, start, end);
  4177. }
  4178. var clearTimeout2 = ctxClearTimeout || function(id) {
  4179. return root.clearTimeout(id);
  4180. };
  4181. function cloneBuffer(buffer, isDeep) {
  4182. if (isDeep) {
  4183. return buffer.slice();
  4184. }
  4185. var length = buffer.length, result3 = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
  4186. buffer.copy(result3);
  4187. return result3;
  4188. }
  4189. function cloneArrayBuffer(arrayBuffer) {
  4190. var result3 = new arrayBuffer.constructor(arrayBuffer.byteLength);
  4191. new Uint8Array2(result3).set(new Uint8Array2(arrayBuffer));
  4192. return result3;
  4193. }
  4194. function cloneDataView(dataView, isDeep) {
  4195. var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
  4196. return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
  4197. }
  4198. function cloneRegExp(regexp) {
  4199. var result3 = new regexp.constructor(regexp.source, reFlags.exec(regexp));
  4200. result3.lastIndex = regexp.lastIndex;
  4201. return result3;
  4202. }
  4203. function cloneSymbol(symbol) {
  4204. return symbolValueOf ? Object2(symbolValueOf.call(symbol)) : {};
  4205. }
  4206. function cloneTypedArray(typedArray, isDeep) {
  4207. var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
  4208. return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
  4209. }
  4210. function compareAscending(value, other) {
  4211. if (value !== other) {
  4212. var valIsDefined = value !== undefined$1, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol = isSymbol(value);
  4213. var othIsDefined = other !== undefined$1, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol = isSymbol(other);
  4214. if (!othIsNull && !othIsSymbol && !valIsSymbol && value > other || valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol || valIsNull && othIsDefined && othIsReflexive || !valIsDefined && othIsReflexive || !valIsReflexive) {
  4215. return 1;
  4216. }
  4217. if (!valIsNull && !valIsSymbol && !othIsSymbol && value < other || othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol || othIsNull && valIsDefined && valIsReflexive || !othIsDefined && valIsReflexive || !othIsReflexive) {
  4218. return -1;
  4219. }
  4220. }
  4221. return 0;
  4222. }
  4223. function compareMultiple(object2, other, orders) {
  4224. var index2 = -1, objCriteria = object2.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length;
  4225. while (++index2 < length) {
  4226. var result3 = compareAscending(objCriteria[index2], othCriteria[index2]);
  4227. if (result3) {
  4228. if (index2 >= ordersLength) {
  4229. return result3;
  4230. }
  4231. var order2 = orders[index2];
  4232. return result3 * (order2 == "desc" ? -1 : 1);
  4233. }
  4234. }
  4235. return object2.index - other.index;
  4236. }
  4237. function composeArgs(args, partials, holders, isCurried) {
  4238. var argsIndex = -1, argsLength = args.length, holdersLength = holders.length, leftIndex = -1, leftLength = partials.length, rangeLength2 = nativeMax(argsLength - holdersLength, 0), result3 = Array2(leftLength + rangeLength2), isUncurried = !isCurried;
  4239. while (++leftIndex < leftLength) {
  4240. result3[leftIndex] = partials[leftIndex];
  4241. }
  4242. while (++argsIndex < holdersLength) {
  4243. if (isUncurried || argsIndex < argsLength) {
  4244. result3[holders[argsIndex]] = args[argsIndex];
  4245. }
  4246. }
  4247. while (rangeLength2--) {
  4248. result3[leftIndex++] = args[argsIndex++];
  4249. }
  4250. return result3;
  4251. }
  4252. function composeArgsRight(args, partials, holders, isCurried) {
  4253. var argsIndex = -1, argsLength = args.length, holdersIndex = -1, holdersLength = holders.length, rightIndex = -1, rightLength = partials.length, rangeLength2 = nativeMax(argsLength - holdersLength, 0), result3 = Array2(rangeLength2 + rightLength), isUncurried = !isCurried;
  4254. while (++argsIndex < rangeLength2) {
  4255. result3[argsIndex] = args[argsIndex];
  4256. }
  4257. var offset = argsIndex;
  4258. while (++rightIndex < rightLength) {
  4259. result3[offset + rightIndex] = partials[rightIndex];
  4260. }
  4261. while (++holdersIndex < holdersLength) {
  4262. if (isUncurried || argsIndex < argsLength) {
  4263. result3[offset + holders[holdersIndex]] = args[argsIndex++];
  4264. }
  4265. }
  4266. return result3;
  4267. }
  4268. function copyArray(source, array2) {
  4269. var index2 = -1, length = source.length;
  4270. array2 || (array2 = Array2(length));
  4271. while (++index2 < length) {
  4272. array2[index2] = source[index2];
  4273. }
  4274. return array2;
  4275. }
  4276. function copyObject(source, props, object2, customizer) {
  4277. var isNew = !object2;
  4278. object2 || (object2 = {});
  4279. var index2 = -1, length = props.length;
  4280. while (++index2 < length) {
  4281. var key = props[index2];
  4282. var newValue = customizer ? customizer(object2[key], source[key], key, object2, source) : undefined$1;
  4283. if (newValue === undefined$1) {
  4284. newValue = source[key];
  4285. }
  4286. if (isNew) {
  4287. baseAssignValue(object2, key, newValue);
  4288. } else {
  4289. assignValue(object2, key, newValue);
  4290. }
  4291. }
  4292. return object2;
  4293. }
  4294. function copySymbols(source, object2) {
  4295. return copyObject(source, getSymbols(source), object2);
  4296. }
  4297. function copySymbolsIn(source, object2) {
  4298. return copyObject(source, getSymbolsIn(source), object2);
  4299. }
  4300. function createAggregator(setter, initializer) {
  4301. return function(collection, iteratee2) {
  4302. var func = isArray2(collection) ? arrayAggregator : baseAggregator, accumulator = initializer ? initializer() : {};
  4303. return func(collection, setter, getIteratee(iteratee2, 2), accumulator);
  4304. };
  4305. }
  4306. function createAssigner(assigner) {
  4307. return baseRest(function(object2, sources) {
  4308. var index2 = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined$1, guard = length > 2 ? sources[2] : undefined$1;
  4309. customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : undefined$1;
  4310. if (guard && isIterateeCall(sources[0], sources[1], guard)) {
  4311. customizer = length < 3 ? undefined$1 : customizer;
  4312. length = 1;
  4313. }
  4314. object2 = Object2(object2);
  4315. while (++index2 < length) {
  4316. var source = sources[index2];
  4317. if (source) {
  4318. assigner(object2, source, index2, customizer);
  4319. }
  4320. }
  4321. return object2;
  4322. });
  4323. }
  4324. function createBaseEach(eachFunc, fromRight) {
  4325. return function(collection, iteratee2) {
  4326. if (collection == null) {
  4327. return collection;
  4328. }
  4329. if (!isArrayLike(collection)) {
  4330. return eachFunc(collection, iteratee2);
  4331. }
  4332. var length = collection.length, index2 = fromRight ? length : -1, iterable = Object2(collection);
  4333. while (fromRight ? index2-- : ++index2 < length) {
  4334. if (iteratee2(iterable[index2], index2, iterable) === false) {
  4335. break;
  4336. }
  4337. }
  4338. return collection;
  4339. };
  4340. }
  4341. function createBaseFor(fromRight) {
  4342. return function(object2, iteratee2, keysFunc) {
  4343. var index2 = -1, iterable = Object2(object2), props = keysFunc(object2), length = props.length;
  4344. while (length--) {
  4345. var key = props[fromRight ? length : ++index2];
  4346. if (iteratee2(iterable[key], key, iterable) === false) {
  4347. break;
  4348. }
  4349. }
  4350. return object2;
  4351. };
  4352. }
  4353. function createBind(func, bitmask, thisArg) {
  4354. var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func);
  4355. function wrapper() {
  4356. var fn = this && this !== root && this instanceof wrapper ? Ctor : func;
  4357. return fn.apply(isBind ? thisArg : this, arguments);
  4358. }
  4359. return wrapper;
  4360. }
  4361. function createCaseFirst(methodName) {
  4362. return function(string) {
  4363. string = toString2(string);
  4364. var strSymbols = hasUnicode(string) ? stringToArray(string) : undefined$1;
  4365. var chr = strSymbols ? strSymbols[0] : string.charAt(0);
  4366. var trailing = strSymbols ? castSlice(strSymbols, 1).join("") : string.slice(1);
  4367. return chr[methodName]() + trailing;
  4368. };
  4369. }
  4370. function createCompounder(callback) {
  4371. return function(string) {
  4372. return arrayReduce(words(deburr(string).replace(reApos, "")), callback, "");
  4373. };
  4374. }
  4375. function createCtor(Ctor) {
  4376. return function() {
  4377. var args = arguments;
  4378. switch (args.length) {
  4379. case 0:
  4380. return new Ctor();
  4381. case 1:
  4382. return new Ctor(args[0]);
  4383. case 2:
  4384. return new Ctor(args[0], args[1]);
  4385. case 3:
  4386. return new Ctor(args[0], args[1], args[2]);
  4387. case 4:
  4388. return new Ctor(args[0], args[1], args[2], args[3]);
  4389. case 5:
  4390. return new Ctor(args[0], args[1], args[2], args[3], args[4]);
  4391. case 6:
  4392. return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
  4393. case 7:
  4394. return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
  4395. }
  4396. var thisBinding = baseCreate(Ctor.prototype), result3 = Ctor.apply(thisBinding, args);
  4397. return isObject2(result3) ? result3 : thisBinding;
  4398. };
  4399. }
  4400. function createCurry(func, bitmask, arity) {
  4401. var Ctor = createCtor(func);
  4402. function wrapper() {
  4403. var length = arguments.length, args = Array2(length), index2 = length, placeholder = getHolder(wrapper);
  4404. while (index2--) {
  4405. args[index2] = arguments[index2];
  4406. }
  4407. var holders = length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder ? [] : replaceHolders(args, placeholder);
  4408. length -= holders.length;
  4409. if (length < arity) {
  4410. return createRecurry(
  4411. func,
  4412. bitmask,
  4413. createHybrid,
  4414. wrapper.placeholder,
  4415. undefined$1,
  4416. args,
  4417. holders,
  4418. undefined$1,
  4419. undefined$1,
  4420. arity - length
  4421. );
  4422. }
  4423. var fn = this && this !== root && this instanceof wrapper ? Ctor : func;
  4424. return apply2(fn, this, args);
  4425. }
  4426. return wrapper;
  4427. }
  4428. function createFind(findIndexFunc) {
  4429. return function(collection, predicate, fromIndex) {
  4430. var iterable = Object2(collection);
  4431. if (!isArrayLike(collection)) {
  4432. var iteratee2 = getIteratee(predicate, 3);
  4433. collection = keys(collection);
  4434. predicate = function(key) {
  4435. return iteratee2(iterable[key], key, iterable);
  4436. };
  4437. }
  4438. var index2 = findIndexFunc(collection, predicate, fromIndex);
  4439. return index2 > -1 ? iterable[iteratee2 ? collection[index2] : index2] : undefined$1;
  4440. };
  4441. }
  4442. function createFlow(fromRight) {
  4443. return flatRest(function(funcs) {
  4444. var length = funcs.length, index2 = length, prereq = LodashWrapper.prototype.thru;
  4445. if (fromRight) {
  4446. funcs.reverse();
  4447. }
  4448. while (index2--) {
  4449. var func = funcs[index2];
  4450. if (typeof func != "function") {
  4451. throw new TypeError2(FUNC_ERROR_TEXT);
  4452. }
  4453. if (prereq && !wrapper && getFuncName(func) == "wrapper") {
  4454. var wrapper = new LodashWrapper([], true);
  4455. }
  4456. }
  4457. index2 = wrapper ? index2 : length;
  4458. while (++index2 < length) {
  4459. func = funcs[index2];
  4460. var funcName = getFuncName(func), data = funcName == "wrapper" ? getData(func) : undefined$1;
  4461. if (data && isLaziable(data[0]) && data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && !data[4].length && data[9] == 1) {
  4462. wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
  4463. } else {
  4464. wrapper = func.length == 1 && isLaziable(func) ? wrapper[funcName]() : wrapper.thru(func);
  4465. }
  4466. }
  4467. return function() {
  4468. var args = arguments, value = args[0];
  4469. if (wrapper && args.length == 1 && isArray2(value)) {
  4470. return wrapper.plant(value).value();
  4471. }
  4472. var index3 = 0, result3 = length ? funcs[index3].apply(this, args) : value;
  4473. while (++index3 < length) {
  4474. result3 = funcs[index3].call(this, result3);
  4475. }
  4476. return result3;
  4477. };
  4478. });
  4479. }
  4480. function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary2, arity) {
  4481. var isAry = bitmask & WRAP_ARY_FLAG, isBind = bitmask & WRAP_BIND_FLAG, isBindKey = bitmask & WRAP_BIND_KEY_FLAG, isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), isFlip = bitmask & WRAP_FLIP_FLAG, Ctor = isBindKey ? undefined$1 : createCtor(func);
  4482. function wrapper() {
  4483. var length = arguments.length, args = Array2(length), index2 = length;
  4484. while (index2--) {
  4485. args[index2] = arguments[index2];
  4486. }
  4487. if (isCurried) {
  4488. var placeholder = getHolder(wrapper), holdersCount = countHolders(args, placeholder);
  4489. }
  4490. if (partials) {
  4491. args = composeArgs(args, partials, holders, isCurried);
  4492. }
  4493. if (partialsRight) {
  4494. args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
  4495. }
  4496. length -= holdersCount;
  4497. if (isCurried && length < arity) {
  4498. var newHolders = replaceHolders(args, placeholder);
  4499. return createRecurry(
  4500. func,
  4501. bitmask,
  4502. createHybrid,
  4503. wrapper.placeholder,
  4504. thisArg,
  4505. args,
  4506. newHolders,
  4507. argPos,
  4508. ary2,
  4509. arity - length
  4510. );
  4511. }
  4512. var thisBinding = isBind ? thisArg : this, fn = isBindKey ? thisBinding[func] : func;
  4513. length = args.length;
  4514. if (argPos) {
  4515. args = reorder(args, argPos);
  4516. } else if (isFlip && length > 1) {
  4517. args.reverse();
  4518. }
  4519. if (isAry && ary2 < length) {
  4520. args.length = ary2;
  4521. }
  4522. if (this && this !== root && this instanceof wrapper) {
  4523. fn = Ctor || createCtor(fn);
  4524. }
  4525. return fn.apply(thisBinding, args);
  4526. }
  4527. return wrapper;
  4528. }
  4529. function createInverter(setter, toIteratee) {
  4530. return function(object2, iteratee2) {
  4531. return baseInverter(object2, setter, toIteratee(iteratee2), {});
  4532. };
  4533. }
  4534. function createMathOperation(operator, defaultValue) {
  4535. return function(value, other) {
  4536. var result3;
  4537. if (value === undefined$1 && other === undefined$1) {
  4538. return defaultValue;
  4539. }
  4540. if (value !== undefined$1) {
  4541. result3 = value;
  4542. }
  4543. if (other !== undefined$1) {
  4544. if (result3 === undefined$1) {
  4545. return other;
  4546. }
  4547. if (typeof value == "string" || typeof other == "string") {
  4548. value = baseToString(value);
  4549. other = baseToString(other);
  4550. } else {
  4551. value = baseToNumber(value);
  4552. other = baseToNumber(other);
  4553. }
  4554. result3 = operator(value, other);
  4555. }
  4556. return result3;
  4557. };
  4558. }
  4559. function createOver(arrayFunc) {
  4560. return flatRest(function(iteratees) {
  4561. iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
  4562. return baseRest(function(args) {
  4563. var thisArg = this;
  4564. return arrayFunc(iteratees, function(iteratee2) {
  4565. return apply2(iteratee2, thisArg, args);
  4566. });
  4567. });
  4568. });
  4569. }
  4570. function createPadding(length, chars) {
  4571. chars = chars === undefined$1 ? " " : baseToString(chars);
  4572. var charsLength = chars.length;
  4573. if (charsLength < 2) {
  4574. return charsLength ? baseRepeat(chars, length) : chars;
  4575. }
  4576. var result3 = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
  4577. return hasUnicode(chars) ? castSlice(stringToArray(result3), 0, length).join("") : result3.slice(0, length);
  4578. }
  4579. function createPartial(func, bitmask, thisArg, partials) {
  4580. var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func);
  4581. function wrapper() {
  4582. var argsIndex = -1, argsLength = arguments.length, leftIndex = -1, leftLength = partials.length, args = Array2(leftLength + argsLength), fn = this && this !== root && this instanceof wrapper ? Ctor : func;
  4583. while (++leftIndex < leftLength) {
  4584. args[leftIndex] = partials[leftIndex];
  4585. }
  4586. while (argsLength--) {
  4587. args[leftIndex++] = arguments[++argsIndex];
  4588. }
  4589. return apply2(fn, isBind ? thisArg : this, args);
  4590. }
  4591. return wrapper;
  4592. }
  4593. function createRange(fromRight) {
  4594. return function(start, end, step) {
  4595. if (step && typeof step != "number" && isIterateeCall(start, end, step)) {
  4596. end = step = undefined$1;
  4597. }
  4598. start = toFinite(start);
  4599. if (end === undefined$1) {
  4600. end = start;
  4601. start = 0;
  4602. } else {
  4603. end = toFinite(end);
  4604. }
  4605. step = step === undefined$1 ? start < end ? 1 : -1 : toFinite(step);
  4606. return baseRange(start, end, step, fromRight);
  4607. };
  4608. }
  4609. function createRelationalOperation(operator) {
  4610. return function(value, other) {
  4611. if (!(typeof value == "string" && typeof other == "string")) {
  4612. value = toNumber(value);
  4613. other = toNumber(other);
  4614. }
  4615. return operator(value, other);
  4616. };
  4617. }
  4618. function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary2, arity) {
  4619. var isCurry = bitmask & WRAP_CURRY_FLAG, newHolders = isCurry ? holders : undefined$1, newHoldersRight = isCurry ? undefined$1 : holders, newPartials = isCurry ? partials : undefined$1, newPartialsRight = isCurry ? undefined$1 : partials;
  4620. bitmask |= isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG;
  4621. bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
  4622. if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
  4623. bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
  4624. }
  4625. var newData = [
  4626. func,
  4627. bitmask,
  4628. thisArg,
  4629. newPartials,
  4630. newHolders,
  4631. newPartialsRight,
  4632. newHoldersRight,
  4633. argPos,
  4634. ary2,
  4635. arity
  4636. ];
  4637. var result3 = wrapFunc.apply(undefined$1, newData);
  4638. if (isLaziable(func)) {
  4639. setData(result3, newData);
  4640. }
  4641. result3.placeholder = placeholder;
  4642. return setWrapToString(result3, func, bitmask);
  4643. }
  4644. function createRound(methodName) {
  4645. var func = Math2[methodName];
  4646. return function(number2, precision) {
  4647. number2 = toNumber(number2);
  4648. precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
  4649. if (precision && nativeIsFinite(number2)) {
  4650. var pair = (toString2(number2) + "e").split("e"), value = func(pair[0] + "e" + (+pair[1] + precision));
  4651. pair = (toString2(value) + "e").split("e");
  4652. return +(pair[0] + "e" + (+pair[1] - precision));
  4653. }
  4654. return func(number2);
  4655. };
  4656. }
  4657. var createSet = !(Set2 && 1 / setToArray(new Set2([, -0]))[1] == INFINITY) ? noop2 : function(values2) {
  4658. return new Set2(values2);
  4659. };
  4660. function createToPairs(keysFunc) {
  4661. return function(object2) {
  4662. var tag = getTag(object2);
  4663. if (tag == mapTag) {
  4664. return mapToArray(object2);
  4665. }
  4666. if (tag == setTag) {
  4667. return setToPairs(object2);
  4668. }
  4669. return baseToPairs(object2, keysFunc(object2));
  4670. };
  4671. }
  4672. function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary2, arity) {
  4673. var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
  4674. if (!isBindKey && typeof func != "function") {
  4675. throw new TypeError2(FUNC_ERROR_TEXT);
  4676. }
  4677. var length = partials ? partials.length : 0;
  4678. if (!length) {
  4679. bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
  4680. partials = holders = undefined$1;
  4681. }
  4682. ary2 = ary2 === undefined$1 ? ary2 : nativeMax(toInteger(ary2), 0);
  4683. arity = arity === undefined$1 ? arity : toInteger(arity);
  4684. length -= holders ? holders.length : 0;
  4685. if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
  4686. var partialsRight = partials, holdersRight = holders;
  4687. partials = holders = undefined$1;
  4688. }
  4689. var data = isBindKey ? undefined$1 : getData(func);
  4690. var newData = [
  4691. func,
  4692. bitmask,
  4693. thisArg,
  4694. partials,
  4695. holders,
  4696. partialsRight,
  4697. holdersRight,
  4698. argPos,
  4699. ary2,
  4700. arity
  4701. ];
  4702. if (data) {
  4703. mergeData(newData, data);
  4704. }
  4705. func = newData[0];
  4706. bitmask = newData[1];
  4707. thisArg = newData[2];
  4708. partials = newData[3];
  4709. holders = newData[4];
  4710. arity = newData[9] = newData[9] === undefined$1 ? isBindKey ? 0 : func.length : nativeMax(newData[9] - length, 0);
  4711. if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
  4712. bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
  4713. }
  4714. if (!bitmask || bitmask == WRAP_BIND_FLAG) {
  4715. var result3 = createBind(func, bitmask, thisArg);
  4716. } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
  4717. result3 = createCurry(func, bitmask, arity);
  4718. } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
  4719. result3 = createPartial(func, bitmask, thisArg, partials);
  4720. } else {
  4721. result3 = createHybrid.apply(undefined$1, newData);
  4722. }
  4723. var setter = data ? baseSetData : setData;
  4724. return setWrapToString(setter(result3, newData), func, bitmask);
  4725. }
  4726. function customDefaultsAssignIn(objValue, srcValue, key, object2) {
  4727. if (objValue === undefined$1 || eq(objValue, objectProto[key]) && !hasOwnProperty2.call(object2, key)) {
  4728. return srcValue;
  4729. }
  4730. return objValue;
  4731. }
  4732. function customDefaultsMerge(objValue, srcValue, key, object2, source, stack) {
  4733. if (isObject2(objValue) && isObject2(srcValue)) {
  4734. stack.set(srcValue, objValue);
  4735. baseMerge(objValue, srcValue, undefined$1, customDefaultsMerge, stack);
  4736. stack["delete"](srcValue);
  4737. }
  4738. return objValue;
  4739. }
  4740. function customOmitClone(value) {
  4741. return isPlainObject2(value) ? undefined$1 : value;
  4742. }
  4743. function equalArrays(array2, other, bitmask, customizer, equalFunc, stack) {
  4744. var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array2.length, othLength = other.length;
  4745. if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
  4746. return false;
  4747. }
  4748. var arrStacked = stack.get(array2);
  4749. var othStacked = stack.get(other);
  4750. if (arrStacked && othStacked) {
  4751. return arrStacked == other && othStacked == array2;
  4752. }
  4753. var index2 = -1, result3 = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined$1;
  4754. stack.set(array2, other);
  4755. stack.set(other, array2);
  4756. while (++index2 < arrLength) {
  4757. var arrValue = array2[index2], othValue = other[index2];
  4758. if (customizer) {
  4759. var compared = isPartial ? customizer(othValue, arrValue, index2, other, array2, stack) : customizer(arrValue, othValue, index2, array2, other, stack);
  4760. }
  4761. if (compared !== undefined$1) {
  4762. if (compared) {
  4763. continue;
  4764. }
  4765. result3 = false;
  4766. break;
  4767. }
  4768. if (seen) {
  4769. if (!arraySome(other, function(othValue2, othIndex) {
  4770. if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) {
  4771. return seen.push(othIndex);
  4772. }
  4773. })) {
  4774. result3 = false;
  4775. break;
  4776. }
  4777. } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
  4778. result3 = false;
  4779. break;
  4780. }
  4781. }
  4782. stack["delete"](array2);
  4783. stack["delete"](other);
  4784. return result3;
  4785. }
  4786. function equalByTag(object2, other, tag, bitmask, customizer, equalFunc, stack) {
  4787. switch (tag) {
  4788. case dataViewTag:
  4789. if (object2.byteLength != other.byteLength || object2.byteOffset != other.byteOffset) {
  4790. return false;
  4791. }
  4792. object2 = object2.buffer;
  4793. other = other.buffer;
  4794. case arrayBufferTag:
  4795. if (object2.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object2), new Uint8Array2(other))) {
  4796. return false;
  4797. }
  4798. return true;
  4799. case boolTag:
  4800. case dateTag:
  4801. case numberTag:
  4802. return eq(+object2, +other);
  4803. case errorTag:
  4804. return object2.name == other.name && object2.message == other.message;
  4805. case regexpTag:
  4806. case stringTag:
  4807. return object2 == other + "";
  4808. case mapTag:
  4809. var convert = mapToArray;
  4810. case setTag:
  4811. var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
  4812. convert || (convert = setToArray);
  4813. if (object2.size != other.size && !isPartial) {
  4814. return false;
  4815. }
  4816. var stacked = stack.get(object2);
  4817. if (stacked) {
  4818. return stacked == other;
  4819. }
  4820. bitmask |= COMPARE_UNORDERED_FLAG;
  4821. stack.set(object2, other);
  4822. var result3 = equalArrays(convert(object2), convert(other), bitmask, customizer, equalFunc, stack);
  4823. stack["delete"](object2);
  4824. return result3;
  4825. case symbolTag:
  4826. if (symbolValueOf) {
  4827. return symbolValueOf.call(object2) == symbolValueOf.call(other);
  4828. }
  4829. }
  4830. return false;
  4831. }
  4832. function equalObjects(object2, other, bitmask, customizer, equalFunc, stack) {
  4833. var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object2), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length;
  4834. if (objLength != othLength && !isPartial) {
  4835. return false;
  4836. }
  4837. var index2 = objLength;
  4838. while (index2--) {
  4839. var key = objProps[index2];
  4840. if (!(isPartial ? key in other : hasOwnProperty2.call(other, key))) {
  4841. return false;
  4842. }
  4843. }
  4844. var objStacked = stack.get(object2);
  4845. var othStacked = stack.get(other);
  4846. if (objStacked && othStacked) {
  4847. return objStacked == other && othStacked == object2;
  4848. }
  4849. var result3 = true;
  4850. stack.set(object2, other);
  4851. stack.set(other, object2);
  4852. var skipCtor = isPartial;
  4853. while (++index2 < objLength) {
  4854. key = objProps[index2];
  4855. var objValue = object2[key], othValue = other[key];
  4856. if (customizer) {
  4857. var compared = isPartial ? customizer(othValue, objValue, key, other, object2, stack) : customizer(objValue, othValue, key, object2, other, stack);
  4858. }
  4859. if (!(compared === undefined$1 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
  4860. result3 = false;
  4861. break;
  4862. }
  4863. skipCtor || (skipCtor = key == "constructor");
  4864. }
  4865. if (result3 && !skipCtor) {
  4866. var objCtor = object2.constructor, othCtor = other.constructor;
  4867. if (objCtor != othCtor && ("constructor" in object2 && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
  4868. result3 = false;
  4869. }
  4870. }
  4871. stack["delete"](object2);
  4872. stack["delete"](other);
  4873. return result3;
  4874. }
  4875. function flatRest(func) {
  4876. return setToString(overRest(func, undefined$1, flatten), func + "");
  4877. }
  4878. function getAllKeys(object2) {
  4879. return baseGetAllKeys(object2, keys, getSymbols);
  4880. }
  4881. function getAllKeysIn(object2) {
  4882. return baseGetAllKeys(object2, keysIn, getSymbolsIn);
  4883. }
  4884. var getData = !metaMap ? noop2 : function(func) {
  4885. return metaMap.get(func);
  4886. };
  4887. function getFuncName(func) {
  4888. var result3 = func.name + "", array2 = realNames[result3], length = hasOwnProperty2.call(realNames, result3) ? array2.length : 0;
  4889. while (length--) {
  4890. var data = array2[length], otherFunc = data.func;
  4891. if (otherFunc == null || otherFunc == func) {
  4892. return data.name;
  4893. }
  4894. }
  4895. return result3;
  4896. }
  4897. function getHolder(func) {
  4898. var object2 = hasOwnProperty2.call(lodash2, "placeholder") ? lodash2 : func;
  4899. return object2.placeholder;
  4900. }
  4901. function getIteratee() {
  4902. var result3 = lodash2.iteratee || iteratee;
  4903. result3 = result3 === iteratee ? baseIteratee : result3;
  4904. return arguments.length ? result3(arguments[0], arguments[1]) : result3;
  4905. }
  4906. function getMapData(map2, key) {
  4907. var data = map2.__data__;
  4908. return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
  4909. }
  4910. function getMatchData(object2) {
  4911. var result3 = keys(object2), length = result3.length;
  4912. while (length--) {
  4913. var key = result3[length], value = object2[key];
  4914. result3[length] = [key, value, isStrictComparable(value)];
  4915. }
  4916. return result3;
  4917. }
  4918. function getNative(object2, key) {
  4919. var value = getValue(object2, key);
  4920. return baseIsNative(value) ? value : undefined$1;
  4921. }
  4922. function getRawTag(value) {
  4923. var isOwn = hasOwnProperty2.call(value, symToStringTag), tag = value[symToStringTag];
  4924. try {
  4925. value[symToStringTag] = undefined$1;
  4926. var unmasked = true;
  4927. } catch (e2) {
  4928. }
  4929. var result3 = nativeObjectToString.call(value);
  4930. if (unmasked) {
  4931. if (isOwn) {
  4932. value[symToStringTag] = tag;
  4933. } else {
  4934. delete value[symToStringTag];
  4935. }
  4936. }
  4937. return result3;
  4938. }
  4939. var getSymbols = !nativeGetSymbols ? stubArray : function(object2) {
  4940. if (object2 == null) {
  4941. return [];
  4942. }
  4943. object2 = Object2(object2);
  4944. return arrayFilter(nativeGetSymbols(object2), function(symbol) {
  4945. return propertyIsEnumerable.call(object2, symbol);
  4946. });
  4947. };
  4948. var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object2) {
  4949. var result3 = [];
  4950. while (object2) {
  4951. arrayPush(result3, getSymbols(object2));
  4952. object2 = getPrototype(object2);
  4953. }
  4954. return result3;
  4955. };
  4956. var getTag = baseGetTag;
  4957. if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap2 && getTag(new WeakMap2()) != weakMapTag) {
  4958. getTag = function(value) {
  4959. var result3 = baseGetTag(value), Ctor = result3 == objectTag ? value.constructor : undefined$1, ctorString = Ctor ? toSource(Ctor) : "";
  4960. if (ctorString) {
  4961. switch (ctorString) {
  4962. case dataViewCtorString:
  4963. return dataViewTag;
  4964. case mapCtorString:
  4965. return mapTag;
  4966. case promiseCtorString:
  4967. return promiseTag;
  4968. case setCtorString:
  4969. return setTag;
  4970. case weakMapCtorString:
  4971. return weakMapTag;
  4972. }
  4973. }
  4974. return result3;
  4975. };
  4976. }
  4977. function getView(start, end, transforms) {
  4978. var index2 = -1, length = transforms.length;
  4979. while (++index2 < length) {
  4980. var data = transforms[index2], size2 = data.size;
  4981. switch (data.type) {
  4982. case "drop":
  4983. start += size2;
  4984. break;
  4985. case "dropRight":
  4986. end -= size2;
  4987. break;
  4988. case "take":
  4989. end = nativeMin(end, start + size2);
  4990. break;
  4991. case "takeRight":
  4992. start = nativeMax(start, end - size2);
  4993. break;
  4994. }
  4995. }
  4996. return { "start": start, "end": end };
  4997. }
  4998. function getWrapDetails(source) {
  4999. var match = source.match(reWrapDetails);
  5000. return match ? match[1].split(reSplitDetails) : [];
  5001. }
  5002. function hasPath(object2, path, hasFunc) {
  5003. path = castPath(path, object2);
  5004. var index2 = -1, length = path.length, result3 = false;
  5005. while (++index2 < length) {
  5006. var key = toKey(path[index2]);
  5007. if (!(result3 = object2 != null && hasFunc(object2, key))) {
  5008. break;
  5009. }
  5010. object2 = object2[key];
  5011. }
  5012. if (result3 || ++index2 != length) {
  5013. return result3;
  5014. }
  5015. length = object2 == null ? 0 : object2.length;
  5016. return !!length && isLength(length) && isIndex(key, length) && (isArray2(object2) || isArguments(object2));
  5017. }
  5018. function initCloneArray(array2) {
  5019. var length = array2.length, result3 = new array2.constructor(length);
  5020. if (length && typeof array2[0] == "string" && hasOwnProperty2.call(array2, "index")) {
  5021. result3.index = array2.index;
  5022. result3.input = array2.input;
  5023. }
  5024. return result3;
  5025. }
  5026. function initCloneObject(object2) {
  5027. return typeof object2.constructor == "function" && !isPrototype(object2) ? baseCreate(getPrototype(object2)) : {};
  5028. }
  5029. function initCloneByTag(object2, tag, isDeep) {
  5030. var Ctor = object2.constructor;
  5031. switch (tag) {
  5032. case arrayBufferTag:
  5033. return cloneArrayBuffer(object2);
  5034. case boolTag:
  5035. case dateTag:
  5036. return new Ctor(+object2);
  5037. case dataViewTag:
  5038. return cloneDataView(object2, isDeep);
  5039. case float32Tag:
  5040. case float64Tag:
  5041. case int8Tag:
  5042. case int16Tag:
  5043. case int32Tag:
  5044. case uint8Tag:
  5045. case uint8ClampedTag:
  5046. case uint16Tag:
  5047. case uint32Tag:
  5048. return cloneTypedArray(object2, isDeep);
  5049. case mapTag:
  5050. return new Ctor();
  5051. case numberTag:
  5052. case stringTag:
  5053. return new Ctor(object2);
  5054. case regexpTag:
  5055. return cloneRegExp(object2);
  5056. case setTag:
  5057. return new Ctor();
  5058. case symbolTag:
  5059. return cloneSymbol(object2);
  5060. }
  5061. }
  5062. function insertWrapDetails(source, details) {
  5063. var length = details.length;
  5064. if (!length) {
  5065. return source;
  5066. }
  5067. var lastIndex = length - 1;
  5068. details[lastIndex] = (length > 1 ? "& " : "") + details[lastIndex];
  5069. details = details.join(length > 2 ? ", " : " ");
  5070. return source.replace(reWrapComment, "{\n/* [wrapped with " + details + "] */\n");
  5071. }
  5072. function isFlattenable(value) {
  5073. return isArray2(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
  5074. }
  5075. function isIndex(value, length) {
  5076. var type = typeof value;
  5077. length = length == null ? MAX_SAFE_INTEGER : length;
  5078. return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
  5079. }
  5080. function isIterateeCall(value, index2, object2) {
  5081. if (!isObject2(object2)) {
  5082. return false;
  5083. }
  5084. var type = typeof index2;
  5085. if (type == "number" ? isArrayLike(object2) && isIndex(index2, object2.length) : type == "string" && index2 in object2) {
  5086. return eq(object2[index2], value);
  5087. }
  5088. return false;
  5089. }
  5090. function isKey(value, object2) {
  5091. if (isArray2(value)) {
  5092. return false;
  5093. }
  5094. var type = typeof value;
  5095. if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) {
  5096. return true;
  5097. }
  5098. return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object2 != null && value in Object2(object2);
  5099. }
  5100. function isKeyable(value) {
  5101. var type = typeof value;
  5102. return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
  5103. }
  5104. function isLaziable(func) {
  5105. var funcName = getFuncName(func), other = lodash2[funcName];
  5106. if (typeof other != "function" || !(funcName in LazyWrapper.prototype)) {
  5107. return false;
  5108. }
  5109. if (func === other) {
  5110. return true;
  5111. }
  5112. var data = getData(other);
  5113. return !!data && func === data[0];
  5114. }
  5115. function isMasked(func) {
  5116. return !!maskSrcKey && maskSrcKey in func;
  5117. }
  5118. var isMaskable = coreJsData ? isFunction2 : stubFalse;
  5119. function isPrototype(value) {
  5120. var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
  5121. return value === proto;
  5122. }
  5123. function isStrictComparable(value) {
  5124. return value === value && !isObject2(value);
  5125. }
  5126. function matchesStrictComparable(key, srcValue) {
  5127. return function(object2) {
  5128. if (object2 == null) {
  5129. return false;
  5130. }
  5131. return object2[key] === srcValue && (srcValue !== undefined$1 || key in Object2(object2));
  5132. };
  5133. }
  5134. function memoizeCapped(func) {
  5135. var result3 = memoize(func, function(key) {
  5136. if (cache2.size === MAX_MEMOIZE_SIZE) {
  5137. cache2.clear();
  5138. }
  5139. return key;
  5140. });
  5141. var cache2 = result3.cache;
  5142. return result3;
  5143. }
  5144. function mergeData(data, source) {
  5145. var bitmask = data[1], srcBitmask = source[1], newBitmask = bitmask | srcBitmask, isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
  5146. var isCombo = srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_CURRY_FLAG || srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_REARG_FLAG && data[7].length <= source[8] || srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG) && source[7].length <= source[8] && bitmask == WRAP_CURRY_FLAG;
  5147. if (!(isCommon || isCombo)) {
  5148. return data;
  5149. }
  5150. if (srcBitmask & WRAP_BIND_FLAG) {
  5151. data[2] = source[2];
  5152. newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
  5153. }
  5154. var value = source[3];
  5155. if (value) {
  5156. var partials = data[3];
  5157. data[3] = partials ? composeArgs(partials, value, source[4]) : value;
  5158. data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
  5159. }
  5160. value = source[5];
  5161. if (value) {
  5162. partials = data[5];
  5163. data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
  5164. data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
  5165. }
  5166. value = source[7];
  5167. if (value) {
  5168. data[7] = value;
  5169. }
  5170. if (srcBitmask & WRAP_ARY_FLAG) {
  5171. data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
  5172. }
  5173. if (data[9] == null) {
  5174. data[9] = source[9];
  5175. }
  5176. data[0] = source[0];
  5177. data[1] = newBitmask;
  5178. return data;
  5179. }
  5180. function nativeKeysIn(object2) {
  5181. var result3 = [];
  5182. if (object2 != null) {
  5183. for (var key in Object2(object2)) {
  5184. result3.push(key);
  5185. }
  5186. }
  5187. return result3;
  5188. }
  5189. function objectToString2(value) {
  5190. return nativeObjectToString.call(value);
  5191. }
  5192. function overRest(func, start, transform2) {
  5193. start = nativeMax(start === undefined$1 ? func.length - 1 : start, 0);
  5194. return function() {
  5195. var args = arguments, index2 = -1, length = nativeMax(args.length - start, 0), array2 = Array2(length);
  5196. while (++index2 < length) {
  5197. array2[index2] = args[start + index2];
  5198. }
  5199. index2 = -1;
  5200. var otherArgs = Array2(start + 1);
  5201. while (++index2 < start) {
  5202. otherArgs[index2] = args[index2];
  5203. }
  5204. otherArgs[start] = transform2(array2);
  5205. return apply2(func, this, otherArgs);
  5206. };
  5207. }
  5208. function parent2(object2, path) {
  5209. return path.length < 2 ? object2 : baseGet(object2, baseSlice(path, 0, -1));
  5210. }
  5211. function reorder(array2, indexes) {
  5212. var arrLength = array2.length, length = nativeMin(indexes.length, arrLength), oldArray = copyArray(array2);
  5213. while (length--) {
  5214. var index2 = indexes[length];
  5215. array2[length] = isIndex(index2, arrLength) ? oldArray[index2] : undefined$1;
  5216. }
  5217. return array2;
  5218. }
  5219. function safeGet(object2, key) {
  5220. if (key === "constructor" && typeof object2[key] === "function") {
  5221. return;
  5222. }
  5223. if (key == "__proto__") {
  5224. return;
  5225. }
  5226. return object2[key];
  5227. }
  5228. var setData = shortOut(baseSetData);
  5229. var setTimeout2 = ctxSetTimeout || function(func, wait) {
  5230. return root.setTimeout(func, wait);
  5231. };
  5232. var setToString = shortOut(baseSetToString);
  5233. function setWrapToString(wrapper, reference, bitmask) {
  5234. var source = reference + "";
  5235. return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
  5236. }
  5237. function shortOut(func) {
  5238. var count = 0, lastCalled = 0;
  5239. return function() {
  5240. var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
  5241. lastCalled = stamp;
  5242. if (remaining > 0) {
  5243. if (++count >= HOT_COUNT) {
  5244. return arguments[0];
  5245. }
  5246. } else {
  5247. count = 0;
  5248. }
  5249. return func.apply(undefined$1, arguments);
  5250. };
  5251. }
  5252. function shuffleSelf(array2, size2) {
  5253. var index2 = -1, length = array2.length, lastIndex = length - 1;
  5254. size2 = size2 === undefined$1 ? length : size2;
  5255. while (++index2 < size2) {
  5256. var rand = baseRandom(index2, lastIndex), value = array2[rand];
  5257. array2[rand] = array2[index2];
  5258. array2[index2] = value;
  5259. }
  5260. array2.length = size2;
  5261. return array2;
  5262. }
  5263. var stringToPath = memoizeCapped(function(string) {
  5264. var result3 = [];
  5265. if (string.charCodeAt(0) === 46) {
  5266. result3.push("");
  5267. }
  5268. string.replace(rePropName, function(match, number2, quote, subString) {
  5269. result3.push(quote ? subString.replace(reEscapeChar, "$1") : number2 || match);
  5270. });
  5271. return result3;
  5272. });
  5273. function toKey(value) {
  5274. if (typeof value == "string" || isSymbol(value)) {
  5275. return value;
  5276. }
  5277. var result3 = value + "";
  5278. return result3 == "0" && 1 / value == -INFINITY ? "-0" : result3;
  5279. }
  5280. function toSource(func) {
  5281. if (func != null) {
  5282. try {
  5283. return funcToString.call(func);
  5284. } catch (e2) {
  5285. }
  5286. try {
  5287. return func + "";
  5288. } catch (e2) {
  5289. }
  5290. }
  5291. return "";
  5292. }
  5293. function updateWrapDetails(details, bitmask) {
  5294. arrayEach(wrapFlags, function(pair) {
  5295. var value = "_." + pair[0];
  5296. if (bitmask & pair[1] && !arrayIncludes(details, value)) {
  5297. details.push(value);
  5298. }
  5299. });
  5300. return details.sort();
  5301. }
  5302. function wrapperClone(wrapper) {
  5303. if (wrapper instanceof LazyWrapper) {
  5304. return wrapper.clone();
  5305. }
  5306. var result3 = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
  5307. result3.__actions__ = copyArray(wrapper.__actions__);
  5308. result3.__index__ = wrapper.__index__;
  5309. result3.__values__ = wrapper.__values__;
  5310. return result3;
  5311. }
  5312. function chunk(array2, size2, guard) {
  5313. if (guard ? isIterateeCall(array2, size2, guard) : size2 === undefined$1) {
  5314. size2 = 1;
  5315. } else {
  5316. size2 = nativeMax(toInteger(size2), 0);
  5317. }
  5318. var length = array2 == null ? 0 : array2.length;
  5319. if (!length || size2 < 1) {
  5320. return [];
  5321. }
  5322. var index2 = 0, resIndex = 0, result3 = Array2(nativeCeil(length / size2));
  5323. while (index2 < length) {
  5324. result3[resIndex++] = baseSlice(array2, index2, index2 += size2);
  5325. }
  5326. return result3;
  5327. }
  5328. function compact(array2) {
  5329. var index2 = -1, length = array2 == null ? 0 : array2.length, resIndex = 0, result3 = [];
  5330. while (++index2 < length) {
  5331. var value = array2[index2];
  5332. if (value) {
  5333. result3[resIndex++] = value;
  5334. }
  5335. }
  5336. return result3;
  5337. }
  5338. function concat() {
  5339. var length = arguments.length;
  5340. if (!length) {
  5341. return [];
  5342. }
  5343. var args = Array2(length - 1), array2 = arguments[0], index2 = length;
  5344. while (index2--) {
  5345. args[index2 - 1] = arguments[index2];
  5346. }
  5347. return arrayPush(isArray2(array2) ? copyArray(array2) : [array2], baseFlatten(args, 1));
  5348. }
  5349. var difference = baseRest(function(array2, values2) {
  5350. return isArrayLikeObject(array2) ? baseDifference(array2, baseFlatten(values2, 1, isArrayLikeObject, true)) : [];
  5351. });
  5352. var differenceBy = baseRest(function(array2, values2) {
  5353. var iteratee2 = last(values2);
  5354. if (isArrayLikeObject(iteratee2)) {
  5355. iteratee2 = undefined$1;
  5356. }
  5357. return isArrayLikeObject(array2) ? baseDifference(array2, baseFlatten(values2, 1, isArrayLikeObject, true), getIteratee(iteratee2, 2)) : [];
  5358. });
  5359. var differenceWith = baseRest(function(array2, values2) {
  5360. var comparator = last(values2);
  5361. if (isArrayLikeObject(comparator)) {
  5362. comparator = undefined$1;
  5363. }
  5364. return isArrayLikeObject(array2) ? baseDifference(array2, baseFlatten(values2, 1, isArrayLikeObject, true), undefined$1, comparator) : [];
  5365. });
  5366. function drop(array2, n2, guard) {
  5367. var length = array2 == null ? 0 : array2.length;
  5368. if (!length) {
  5369. return [];
  5370. }
  5371. n2 = guard || n2 === undefined$1 ? 1 : toInteger(n2);
  5372. return baseSlice(array2, n2 < 0 ? 0 : n2, length);
  5373. }
  5374. function dropRight(array2, n2, guard) {
  5375. var length = array2 == null ? 0 : array2.length;
  5376. if (!length) {
  5377. return [];
  5378. }
  5379. n2 = guard || n2 === undefined$1 ? 1 : toInteger(n2);
  5380. n2 = length - n2;
  5381. return baseSlice(array2, 0, n2 < 0 ? 0 : n2);
  5382. }
  5383. function dropRightWhile(array2, predicate) {
  5384. return array2 && array2.length ? baseWhile(array2, getIteratee(predicate, 3), true, true) : [];
  5385. }
  5386. function dropWhile(array2, predicate) {
  5387. return array2 && array2.length ? baseWhile(array2, getIteratee(predicate, 3), true) : [];
  5388. }
  5389. function fill(array2, value, start, end) {
  5390. var length = array2 == null ? 0 : array2.length;
  5391. if (!length) {
  5392. return [];
  5393. }
  5394. if (start && typeof start != "number" && isIterateeCall(array2, value, start)) {
  5395. start = 0;
  5396. end = length;
  5397. }
  5398. return baseFill(array2, value, start, end);
  5399. }
  5400. function findIndex(array2, predicate, fromIndex) {
  5401. var length = array2 == null ? 0 : array2.length;
  5402. if (!length) {
  5403. return -1;
  5404. }
  5405. var index2 = fromIndex == null ? 0 : toInteger(fromIndex);
  5406. if (index2 < 0) {
  5407. index2 = nativeMax(length + index2, 0);
  5408. }
  5409. return baseFindIndex(array2, getIteratee(predicate, 3), index2);
  5410. }
  5411. function findLastIndex(array2, predicate, fromIndex) {
  5412. var length = array2 == null ? 0 : array2.length;
  5413. if (!length) {
  5414. return -1;
  5415. }
  5416. var index2 = length - 1;
  5417. if (fromIndex !== undefined$1) {
  5418. index2 = toInteger(fromIndex);
  5419. index2 = fromIndex < 0 ? nativeMax(length + index2, 0) : nativeMin(index2, length - 1);
  5420. }
  5421. return baseFindIndex(array2, getIteratee(predicate, 3), index2, true);
  5422. }
  5423. function flatten(array2) {
  5424. var length = array2 == null ? 0 : array2.length;
  5425. return length ? baseFlatten(array2, 1) : [];
  5426. }
  5427. function flattenDeep(array2) {
  5428. var length = array2 == null ? 0 : array2.length;
  5429. return length ? baseFlatten(array2, INFINITY) : [];
  5430. }
  5431. function flattenDepth(array2, depth) {
  5432. var length = array2 == null ? 0 : array2.length;
  5433. if (!length) {
  5434. return [];
  5435. }
  5436. depth = depth === undefined$1 ? 1 : toInteger(depth);
  5437. return baseFlatten(array2, depth);
  5438. }
  5439. function fromPairs(pairs) {
  5440. var index2 = -1, length = pairs == null ? 0 : pairs.length, result3 = {};
  5441. while (++index2 < length) {
  5442. var pair = pairs[index2];
  5443. result3[pair[0]] = pair[1];
  5444. }
  5445. return result3;
  5446. }
  5447. function head(array2) {
  5448. return array2 && array2.length ? array2[0] : undefined$1;
  5449. }
  5450. function indexOf(array2, value, fromIndex) {
  5451. var length = array2 == null ? 0 : array2.length;
  5452. if (!length) {
  5453. return -1;
  5454. }
  5455. var index2 = fromIndex == null ? 0 : toInteger(fromIndex);
  5456. if (index2 < 0) {
  5457. index2 = nativeMax(length + index2, 0);
  5458. }
  5459. return baseIndexOf(array2, value, index2);
  5460. }
  5461. function initial(array2) {
  5462. var length = array2 == null ? 0 : array2.length;
  5463. return length ? baseSlice(array2, 0, -1) : [];
  5464. }
  5465. var intersection = baseRest(function(arrays) {
  5466. var mapped = arrayMap(arrays, castArrayLikeObject);
  5467. return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped) : [];
  5468. });
  5469. var intersectionBy = baseRest(function(arrays) {
  5470. var iteratee2 = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject);
  5471. if (iteratee2 === last(mapped)) {
  5472. iteratee2 = undefined$1;
  5473. } else {
  5474. mapped.pop();
  5475. }
  5476. return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, getIteratee(iteratee2, 2)) : [];
  5477. });
  5478. var intersectionWith = baseRest(function(arrays) {
  5479. var comparator = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject);
  5480. comparator = typeof comparator == "function" ? comparator : undefined$1;
  5481. if (comparator) {
  5482. mapped.pop();
  5483. }
  5484. return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, undefined$1, comparator) : [];
  5485. });
  5486. function join(array2, separator) {
  5487. return array2 == null ? "" : nativeJoin.call(array2, separator);
  5488. }
  5489. function last(array2) {
  5490. var length = array2 == null ? 0 : array2.length;
  5491. return length ? array2[length - 1] : undefined$1;
  5492. }
  5493. function lastIndexOf(array2, value, fromIndex) {
  5494. var length = array2 == null ? 0 : array2.length;
  5495. if (!length) {
  5496. return -1;
  5497. }
  5498. var index2 = length;
  5499. if (fromIndex !== undefined$1) {
  5500. index2 = toInteger(fromIndex);
  5501. index2 = index2 < 0 ? nativeMax(length + index2, 0) : nativeMin(index2, length - 1);
  5502. }
  5503. return value === value ? strictLastIndexOf(array2, value, index2) : baseFindIndex(array2, baseIsNaN, index2, true);
  5504. }
  5505. function nth(array2, n2) {
  5506. return array2 && array2.length ? baseNth(array2, toInteger(n2)) : undefined$1;
  5507. }
  5508. var pull = baseRest(pullAll);
  5509. function pullAll(array2, values2) {
  5510. return array2 && array2.length && values2 && values2.length ? basePullAll(array2, values2) : array2;
  5511. }
  5512. function pullAllBy(array2, values2, iteratee2) {
  5513. return array2 && array2.length && values2 && values2.length ? basePullAll(array2, values2, getIteratee(iteratee2, 2)) : array2;
  5514. }
  5515. function pullAllWith(array2, values2, comparator) {
  5516. return array2 && array2.length && values2 && values2.length ? basePullAll(array2, values2, undefined$1, comparator) : array2;
  5517. }
  5518. var pullAt = flatRest(function(array2, indexes) {
  5519. var length = array2 == null ? 0 : array2.length, result3 = baseAt(array2, indexes);
  5520. basePullAt(array2, arrayMap(indexes, function(index2) {
  5521. return isIndex(index2, length) ? +index2 : index2;
  5522. }).sort(compareAscending));
  5523. return result3;
  5524. });
  5525. function remove(array2, predicate) {
  5526. var result3 = [];
  5527. if (!(array2 && array2.length)) {
  5528. return result3;
  5529. }
  5530. var index2 = -1, indexes = [], length = array2.length;
  5531. predicate = getIteratee(predicate, 3);
  5532. while (++index2 < length) {
  5533. var value = array2[index2];
  5534. if (predicate(value, index2, array2)) {
  5535. result3.push(value);
  5536. indexes.push(index2);
  5537. }
  5538. }
  5539. basePullAt(array2, indexes);
  5540. return result3;
  5541. }
  5542. function reverse(array2) {
  5543. return array2 == null ? array2 : nativeReverse.call(array2);
  5544. }
  5545. function slice(array2, start, end) {
  5546. var length = array2 == null ? 0 : array2.length;
  5547. if (!length) {
  5548. return [];
  5549. }
  5550. if (end && typeof end != "number" && isIterateeCall(array2, start, end)) {
  5551. start = 0;
  5552. end = length;
  5553. } else {
  5554. start = start == null ? 0 : toInteger(start);
  5555. end = end === undefined$1 ? length : toInteger(end);
  5556. }
  5557. return baseSlice(array2, start, end);
  5558. }
  5559. function sortedIndex(array2, value) {
  5560. return baseSortedIndex(array2, value);
  5561. }
  5562. function sortedIndexBy(array2, value, iteratee2) {
  5563. return baseSortedIndexBy(array2, value, getIteratee(iteratee2, 2));
  5564. }
  5565. function sortedIndexOf(array2, value) {
  5566. var length = array2 == null ? 0 : array2.length;
  5567. if (length) {
  5568. var index2 = baseSortedIndex(array2, value);
  5569. if (index2 < length && eq(array2[index2], value)) {
  5570. return index2;
  5571. }
  5572. }
  5573. return -1;
  5574. }
  5575. function sortedLastIndex(array2, value) {
  5576. return baseSortedIndex(array2, value, true);
  5577. }
  5578. function sortedLastIndexBy(array2, value, iteratee2) {
  5579. return baseSortedIndexBy(array2, value, getIteratee(iteratee2, 2), true);
  5580. }
  5581. function sortedLastIndexOf(array2, value) {
  5582. var length = array2 == null ? 0 : array2.length;
  5583. if (length) {
  5584. var index2 = baseSortedIndex(array2, value, true) - 1;
  5585. if (eq(array2[index2], value)) {
  5586. return index2;
  5587. }
  5588. }
  5589. return -1;
  5590. }
  5591. function sortedUniq(array2) {
  5592. return array2 && array2.length ? baseSortedUniq(array2) : [];
  5593. }
  5594. function sortedUniqBy(array2, iteratee2) {
  5595. return array2 && array2.length ? baseSortedUniq(array2, getIteratee(iteratee2, 2)) : [];
  5596. }
  5597. function tail(array2) {
  5598. var length = array2 == null ? 0 : array2.length;
  5599. return length ? baseSlice(array2, 1, length) : [];
  5600. }
  5601. function take(array2, n2, guard) {
  5602. if (!(array2 && array2.length)) {
  5603. return [];
  5604. }
  5605. n2 = guard || n2 === undefined$1 ? 1 : toInteger(n2);
  5606. return baseSlice(array2, 0, n2 < 0 ? 0 : n2);
  5607. }
  5608. function takeRight(array2, n2, guard) {
  5609. var length = array2 == null ? 0 : array2.length;
  5610. if (!length) {
  5611. return [];
  5612. }
  5613. n2 = guard || n2 === undefined$1 ? 1 : toInteger(n2);
  5614. n2 = length - n2;
  5615. return baseSlice(array2, n2 < 0 ? 0 : n2, length);
  5616. }
  5617. function takeRightWhile(array2, predicate) {
  5618. return array2 && array2.length ? baseWhile(array2, getIteratee(predicate, 3), false, true) : [];
  5619. }
  5620. function takeWhile(array2, predicate) {
  5621. return array2 && array2.length ? baseWhile(array2, getIteratee(predicate, 3)) : [];
  5622. }
  5623. var union = baseRest(function(arrays) {
  5624. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
  5625. });
  5626. var unionBy = baseRest(function(arrays) {
  5627. var iteratee2 = last(arrays);
  5628. if (isArrayLikeObject(iteratee2)) {
  5629. iteratee2 = undefined$1;
  5630. }
  5631. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee2, 2));
  5632. });
  5633. var unionWith = baseRest(function(arrays) {
  5634. var comparator = last(arrays);
  5635. comparator = typeof comparator == "function" ? comparator : undefined$1;
  5636. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined$1, comparator);
  5637. });
  5638. function uniq(array2) {
  5639. return array2 && array2.length ? baseUniq(array2) : [];
  5640. }
  5641. function uniqBy(array2, iteratee2) {
  5642. return array2 && array2.length ? baseUniq(array2, getIteratee(iteratee2, 2)) : [];
  5643. }
  5644. function uniqWith(array2, comparator) {
  5645. comparator = typeof comparator == "function" ? comparator : undefined$1;
  5646. return array2 && array2.length ? baseUniq(array2, undefined$1, comparator) : [];
  5647. }
  5648. function unzip(array2) {
  5649. if (!(array2 && array2.length)) {
  5650. return [];
  5651. }
  5652. var length = 0;
  5653. array2 = arrayFilter(array2, function(group) {
  5654. if (isArrayLikeObject(group)) {
  5655. length = nativeMax(group.length, length);
  5656. return true;
  5657. }
  5658. });
  5659. return baseTimes(length, function(index2) {
  5660. return arrayMap(array2, baseProperty(index2));
  5661. });
  5662. }
  5663. function unzipWith(array2, iteratee2) {
  5664. if (!(array2 && array2.length)) {
  5665. return [];
  5666. }
  5667. var result3 = unzip(array2);
  5668. if (iteratee2 == null) {
  5669. return result3;
  5670. }
  5671. return arrayMap(result3, function(group) {
  5672. return apply2(iteratee2, undefined$1, group);
  5673. });
  5674. }
  5675. var without = baseRest(function(array2, values2) {
  5676. return isArrayLikeObject(array2) ? baseDifference(array2, values2) : [];
  5677. });
  5678. var xor = baseRest(function(arrays) {
  5679. return baseXor(arrayFilter(arrays, isArrayLikeObject));
  5680. });
  5681. var xorBy = baseRest(function(arrays) {
  5682. var iteratee2 = last(arrays);
  5683. if (isArrayLikeObject(iteratee2)) {
  5684. iteratee2 = undefined$1;
  5685. }
  5686. return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee2, 2));
  5687. });
  5688. var xorWith = baseRest(function(arrays) {
  5689. var comparator = last(arrays);
  5690. comparator = typeof comparator == "function" ? comparator : undefined$1;
  5691. return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined$1, comparator);
  5692. });
  5693. var zip = baseRest(unzip);
  5694. function zipObject(props, values2) {
  5695. return baseZipObject(props || [], values2 || [], assignValue);
  5696. }
  5697. function zipObjectDeep(props, values2) {
  5698. return baseZipObject(props || [], values2 || [], baseSet);
  5699. }
  5700. var zipWith = baseRest(function(arrays) {
  5701. var length = arrays.length, iteratee2 = length > 1 ? arrays[length - 1] : undefined$1;
  5702. iteratee2 = typeof iteratee2 == "function" ? (arrays.pop(), iteratee2) : undefined$1;
  5703. return unzipWith(arrays, iteratee2);
  5704. });
  5705. function chain(value) {
  5706. var result3 = lodash2(value);
  5707. result3.__chain__ = true;
  5708. return result3;
  5709. }
  5710. function tap(value, interceptor) {
  5711. interceptor(value);
  5712. return value;
  5713. }
  5714. function thru(value, interceptor) {
  5715. return interceptor(value);
  5716. }
  5717. var wrapperAt = flatRest(function(paths) {
  5718. var length = paths.length, start = length ? paths[0] : 0, value = this.__wrapped__, interceptor = function(object2) {
  5719. return baseAt(object2, paths);
  5720. };
  5721. if (length > 1 || this.__actions__.length || !(value instanceof LazyWrapper) || !isIndex(start)) {
  5722. return this.thru(interceptor);
  5723. }
  5724. value = value.slice(start, +start + (length ? 1 : 0));
  5725. value.__actions__.push({
  5726. "func": thru,
  5727. "args": [interceptor],
  5728. "thisArg": undefined$1
  5729. });
  5730. return new LodashWrapper(value, this.__chain__).thru(function(array2) {
  5731. if (length && !array2.length) {
  5732. array2.push(undefined$1);
  5733. }
  5734. return array2;
  5735. });
  5736. });
  5737. function wrapperChain() {
  5738. return chain(this);
  5739. }
  5740. function wrapperCommit() {
  5741. return new LodashWrapper(this.value(), this.__chain__);
  5742. }
  5743. function wrapperNext() {
  5744. if (this.__values__ === undefined$1) {
  5745. this.__values__ = toArray2(this.value());
  5746. }
  5747. var done = this.__index__ >= this.__values__.length, value = done ? undefined$1 : this.__values__[this.__index__++];
  5748. return { "done": done, "value": value };
  5749. }
  5750. function wrapperToIterator() {
  5751. return this;
  5752. }
  5753. function wrapperPlant(value) {
  5754. var result3, parent3 = this;
  5755. while (parent3 instanceof baseLodash) {
  5756. var clone3 = wrapperClone(parent3);
  5757. clone3.__index__ = 0;
  5758. clone3.__values__ = undefined$1;
  5759. if (result3) {
  5760. previous.__wrapped__ = clone3;
  5761. } else {
  5762. result3 = clone3;
  5763. }
  5764. var previous = clone3;
  5765. parent3 = parent3.__wrapped__;
  5766. }
  5767. previous.__wrapped__ = value;
  5768. return result3;
  5769. }
  5770. function wrapperReverse() {
  5771. var value = this.__wrapped__;
  5772. if (value instanceof LazyWrapper) {
  5773. var wrapped = value;
  5774. if (this.__actions__.length) {
  5775. wrapped = new LazyWrapper(this);
  5776. }
  5777. wrapped = wrapped.reverse();
  5778. wrapped.__actions__.push({
  5779. "func": thru,
  5780. "args": [reverse],
  5781. "thisArg": undefined$1
  5782. });
  5783. return new LodashWrapper(wrapped, this.__chain__);
  5784. }
  5785. return this.thru(reverse);
  5786. }
  5787. function wrapperValue() {
  5788. return baseWrapperValue(this.__wrapped__, this.__actions__);
  5789. }
  5790. var countBy = createAggregator(function(result3, value, key) {
  5791. if (hasOwnProperty2.call(result3, key)) {
  5792. ++result3[key];
  5793. } else {
  5794. baseAssignValue(result3, key, 1);
  5795. }
  5796. });
  5797. function every(collection, predicate, guard) {
  5798. var func = isArray2(collection) ? arrayEvery : baseEvery;
  5799. if (guard && isIterateeCall(collection, predicate, guard)) {
  5800. predicate = undefined$1;
  5801. }
  5802. return func(collection, getIteratee(predicate, 3));
  5803. }
  5804. function filter(collection, predicate) {
  5805. var func = isArray2(collection) ? arrayFilter : baseFilter;
  5806. return func(collection, getIteratee(predicate, 3));
  5807. }
  5808. var find = createFind(findIndex);
  5809. var findLast = createFind(findLastIndex);
  5810. function flatMap(collection, iteratee2) {
  5811. return baseFlatten(map(collection, iteratee2), 1);
  5812. }
  5813. function flatMapDeep(collection, iteratee2) {
  5814. return baseFlatten(map(collection, iteratee2), INFINITY);
  5815. }
  5816. function flatMapDepth(collection, iteratee2, depth) {
  5817. depth = depth === undefined$1 ? 1 : toInteger(depth);
  5818. return baseFlatten(map(collection, iteratee2), depth);
  5819. }
  5820. function forEach2(collection, iteratee2) {
  5821. var func = isArray2(collection) ? arrayEach : baseEach;
  5822. return func(collection, getIteratee(iteratee2, 3));
  5823. }
  5824. function forEachRight(collection, iteratee2) {
  5825. var func = isArray2(collection) ? arrayEachRight : baseEachRight;
  5826. return func(collection, getIteratee(iteratee2, 3));
  5827. }
  5828. var groupBy = createAggregator(function(result3, value, key) {
  5829. if (hasOwnProperty2.call(result3, key)) {
  5830. result3[key].push(value);
  5831. } else {
  5832. baseAssignValue(result3, key, [value]);
  5833. }
  5834. });
  5835. function includes(collection, value, fromIndex, guard) {
  5836. collection = isArrayLike(collection) ? collection : values(collection);
  5837. fromIndex = fromIndex && !guard ? toInteger(fromIndex) : 0;
  5838. var length = collection.length;
  5839. if (fromIndex < 0) {
  5840. fromIndex = nativeMax(length + fromIndex, 0);
  5841. }
  5842. return isString2(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1;
  5843. }
  5844. var invokeMap = baseRest(function(collection, path, args) {
  5845. var index2 = -1, isFunc = typeof path == "function", result3 = isArrayLike(collection) ? Array2(collection.length) : [];
  5846. baseEach(collection, function(value) {
  5847. result3[++index2] = isFunc ? apply2(path, value, args) : baseInvoke(value, path, args);
  5848. });
  5849. return result3;
  5850. });
  5851. var keyBy = createAggregator(function(result3, value, key) {
  5852. baseAssignValue(result3, key, value);
  5853. });
  5854. function map(collection, iteratee2) {
  5855. var func = isArray2(collection) ? arrayMap : baseMap;
  5856. return func(collection, getIteratee(iteratee2, 3));
  5857. }
  5858. function orderBy(collection, iteratees, orders, guard) {
  5859. if (collection == null) {
  5860. return [];
  5861. }
  5862. if (!isArray2(iteratees)) {
  5863. iteratees = iteratees == null ? [] : [iteratees];
  5864. }
  5865. orders = guard ? undefined$1 : orders;
  5866. if (!isArray2(orders)) {
  5867. orders = orders == null ? [] : [orders];
  5868. }
  5869. return baseOrderBy(collection, iteratees, orders);
  5870. }
  5871. var partition = createAggregator(function(result3, value, key) {
  5872. result3[key ? 0 : 1].push(value);
  5873. }, function() {
  5874. return [[], []];
  5875. });
  5876. function reduce(collection, iteratee2, accumulator) {
  5877. var func = isArray2(collection) ? arrayReduce : baseReduce, initAccum = arguments.length < 3;
  5878. return func(collection, getIteratee(iteratee2, 4), accumulator, initAccum, baseEach);
  5879. }
  5880. function reduceRight(collection, iteratee2, accumulator) {
  5881. var func = isArray2(collection) ? arrayReduceRight : baseReduce, initAccum = arguments.length < 3;
  5882. return func(collection, getIteratee(iteratee2, 4), accumulator, initAccum, baseEachRight);
  5883. }
  5884. function reject(collection, predicate) {
  5885. var func = isArray2(collection) ? arrayFilter : baseFilter;
  5886. return func(collection, negate(getIteratee(predicate, 3)));
  5887. }
  5888. function sample(collection) {
  5889. var func = isArray2(collection) ? arraySample : baseSample;
  5890. return func(collection);
  5891. }
  5892. function sampleSize(collection, n2, guard) {
  5893. if (guard ? isIterateeCall(collection, n2, guard) : n2 === undefined$1) {
  5894. n2 = 1;
  5895. } else {
  5896. n2 = toInteger(n2);
  5897. }
  5898. var func = isArray2(collection) ? arraySampleSize : baseSampleSize;
  5899. return func(collection, n2);
  5900. }
  5901. function shuffle(collection) {
  5902. var func = isArray2(collection) ? arrayShuffle : baseShuffle;
  5903. return func(collection);
  5904. }
  5905. function size(collection) {
  5906. if (collection == null) {
  5907. return 0;
  5908. }
  5909. if (isArrayLike(collection)) {
  5910. return isString2(collection) ? stringSize(collection) : collection.length;
  5911. }
  5912. var tag = getTag(collection);
  5913. if (tag == mapTag || tag == setTag) {
  5914. return collection.size;
  5915. }
  5916. return baseKeys(collection).length;
  5917. }
  5918. function some(collection, predicate, guard) {
  5919. var func = isArray2(collection) ? arraySome : baseSome;
  5920. if (guard && isIterateeCall(collection, predicate, guard)) {
  5921. predicate = undefined$1;
  5922. }
  5923. return func(collection, getIteratee(predicate, 3));
  5924. }
  5925. var sortBy = baseRest(function(collection, iteratees) {
  5926. if (collection == null) {
  5927. return [];
  5928. }
  5929. var length = iteratees.length;
  5930. if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
  5931. iteratees = [];
  5932. } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
  5933. iteratees = [iteratees[0]];
  5934. }
  5935. return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
  5936. });
  5937. var now2 = ctxNow || function() {
  5938. return root.Date.now();
  5939. };
  5940. function after(n2, func) {
  5941. if (typeof func != "function") {
  5942. throw new TypeError2(FUNC_ERROR_TEXT);
  5943. }
  5944. n2 = toInteger(n2);
  5945. return function() {
  5946. if (--n2 < 1) {
  5947. return func.apply(this, arguments);
  5948. }
  5949. };
  5950. }
  5951. function ary(func, n2, guard) {
  5952. n2 = guard ? undefined$1 : n2;
  5953. n2 = func && n2 == null ? func.length : n2;
  5954. return createWrap(func, WRAP_ARY_FLAG, undefined$1, undefined$1, undefined$1, undefined$1, n2);
  5955. }
  5956. function before(n2, func) {
  5957. var result3;
  5958. if (typeof func != "function") {
  5959. throw new TypeError2(FUNC_ERROR_TEXT);
  5960. }
  5961. n2 = toInteger(n2);
  5962. return function() {
  5963. if (--n2 > 0) {
  5964. result3 = func.apply(this, arguments);
  5965. }
  5966. if (n2 <= 1) {
  5967. func = undefined$1;
  5968. }
  5969. return result3;
  5970. };
  5971. }
  5972. var bind2 = baseRest(function(func, thisArg, partials) {
  5973. var bitmask = WRAP_BIND_FLAG;
  5974. if (partials.length) {
  5975. var holders = replaceHolders(partials, getHolder(bind2));
  5976. bitmask |= WRAP_PARTIAL_FLAG;
  5977. }
  5978. return createWrap(func, bitmask, thisArg, partials, holders);
  5979. });
  5980. var bindKey = baseRest(function(object2, key, partials) {
  5981. var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
  5982. if (partials.length) {
  5983. var holders = replaceHolders(partials, getHolder(bindKey));
  5984. bitmask |= WRAP_PARTIAL_FLAG;
  5985. }
  5986. return createWrap(key, bitmask, object2, partials, holders);
  5987. });
  5988. function curry(func, arity, guard) {
  5989. arity = guard ? undefined$1 : arity;
  5990. var result3 = createWrap(func, WRAP_CURRY_FLAG, undefined$1, undefined$1, undefined$1, undefined$1, undefined$1, arity);
  5991. result3.placeholder = curry.placeholder;
  5992. return result3;
  5993. }
  5994. function curryRight(func, arity, guard) {
  5995. arity = guard ? undefined$1 : arity;
  5996. var result3 = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined$1, undefined$1, undefined$1, undefined$1, undefined$1, arity);
  5997. result3.placeholder = curryRight.placeholder;
  5998. return result3;
  5999. }
  6000. function debounce(func, wait, options2) {
  6001. var lastArgs, lastThis, maxWait, result3, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
  6002. if (typeof func != "function") {
  6003. throw new TypeError2(FUNC_ERROR_TEXT);
  6004. }
  6005. wait = toNumber(wait) || 0;
  6006. if (isObject2(options2)) {
  6007. leading = !!options2.leading;
  6008. maxing = "maxWait" in options2;
  6009. maxWait = maxing ? nativeMax(toNumber(options2.maxWait) || 0, wait) : maxWait;
  6010. trailing = "trailing" in options2 ? !!options2.trailing : trailing;
  6011. }
  6012. function invokeFunc(time2) {
  6013. var args = lastArgs, thisArg = lastThis;
  6014. lastArgs = lastThis = undefined$1;
  6015. lastInvokeTime = time2;
  6016. result3 = func.apply(thisArg, args);
  6017. return result3;
  6018. }
  6019. function leadingEdge(time2) {
  6020. lastInvokeTime = time2;
  6021. timerId = setTimeout2(timerExpired, wait);
  6022. return leading ? invokeFunc(time2) : result3;
  6023. }
  6024. function remainingWait(time2) {
  6025. var timeSinceLastCall = time2 - lastCallTime, timeSinceLastInvoke = time2 - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
  6026. return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
  6027. }
  6028. function shouldInvoke(time2) {
  6029. var timeSinceLastCall = time2 - lastCallTime, timeSinceLastInvoke = time2 - lastInvokeTime;
  6030. return lastCallTime === undefined$1 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
  6031. }
  6032. function timerExpired() {
  6033. var time2 = now2();
  6034. if (shouldInvoke(time2)) {
  6035. return trailingEdge(time2);
  6036. }
  6037. timerId = setTimeout2(timerExpired, remainingWait(time2));
  6038. }
  6039. function trailingEdge(time2) {
  6040. timerId = undefined$1;
  6041. if (trailing && lastArgs) {
  6042. return invokeFunc(time2);
  6043. }
  6044. lastArgs = lastThis = undefined$1;
  6045. return result3;
  6046. }
  6047. function cancel() {
  6048. if (timerId !== undefined$1) {
  6049. clearTimeout2(timerId);
  6050. }
  6051. lastInvokeTime = 0;
  6052. lastArgs = lastCallTime = lastThis = timerId = undefined$1;
  6053. }
  6054. function flush() {
  6055. return timerId === undefined$1 ? result3 : trailingEdge(now2());
  6056. }
  6057. function debounced() {
  6058. var time2 = now2(), isInvoking = shouldInvoke(time2);
  6059. lastArgs = arguments;
  6060. lastThis = this;
  6061. lastCallTime = time2;
  6062. if (isInvoking) {
  6063. if (timerId === undefined$1) {
  6064. return leadingEdge(lastCallTime);
  6065. }
  6066. if (maxing) {
  6067. clearTimeout2(timerId);
  6068. timerId = setTimeout2(timerExpired, wait);
  6069. return invokeFunc(lastCallTime);
  6070. }
  6071. }
  6072. if (timerId === undefined$1) {
  6073. timerId = setTimeout2(timerExpired, wait);
  6074. }
  6075. return result3;
  6076. }
  6077. debounced.cancel = cancel;
  6078. debounced.flush = flush;
  6079. return debounced;
  6080. }
  6081. var defer = baseRest(function(func, args) {
  6082. return baseDelay(func, 1, args);
  6083. });
  6084. var delay = baseRest(function(func, wait, args) {
  6085. return baseDelay(func, toNumber(wait) || 0, args);
  6086. });
  6087. function flip(func) {
  6088. return createWrap(func, WRAP_FLIP_FLAG);
  6089. }
  6090. function memoize(func, resolver) {
  6091. if (typeof func != "function" || resolver != null && typeof resolver != "function") {
  6092. throw new TypeError2(FUNC_ERROR_TEXT);
  6093. }
  6094. var memoized = function() {
  6095. var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache2 = memoized.cache;
  6096. if (cache2.has(key)) {
  6097. return cache2.get(key);
  6098. }
  6099. var result3 = func.apply(this, args);
  6100. memoized.cache = cache2.set(key, result3) || cache2;
  6101. return result3;
  6102. };
  6103. memoized.cache = new (memoize.Cache || MapCache)();
  6104. return memoized;
  6105. }
  6106. memoize.Cache = MapCache;
  6107. function negate(predicate) {
  6108. if (typeof predicate != "function") {
  6109. throw new TypeError2(FUNC_ERROR_TEXT);
  6110. }
  6111. return function() {
  6112. var args = arguments;
  6113. switch (args.length) {
  6114. case 0:
  6115. return !predicate.call(this);
  6116. case 1:
  6117. return !predicate.call(this, args[0]);
  6118. case 2:
  6119. return !predicate.call(this, args[0], args[1]);
  6120. case 3:
  6121. return !predicate.call(this, args[0], args[1], args[2]);
  6122. }
  6123. return !predicate.apply(this, args);
  6124. };
  6125. }
  6126. function once(func) {
  6127. return before(2, func);
  6128. }
  6129. var overArgs = castRest(function(func, transforms) {
  6130. transforms = transforms.length == 1 && isArray2(transforms[0]) ? arrayMap(transforms[0], baseUnary(getIteratee())) : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
  6131. var funcsLength = transforms.length;
  6132. return baseRest(function(args) {
  6133. var index2 = -1, length = nativeMin(args.length, funcsLength);
  6134. while (++index2 < length) {
  6135. args[index2] = transforms[index2].call(this, args[index2]);
  6136. }
  6137. return apply2(func, this, args);
  6138. });
  6139. });
  6140. var partial = baseRest(function(func, partials) {
  6141. var holders = replaceHolders(partials, getHolder(partial));
  6142. return createWrap(func, WRAP_PARTIAL_FLAG, undefined$1, partials, holders);
  6143. });
  6144. var partialRight = baseRest(function(func, partials) {
  6145. var holders = replaceHolders(partials, getHolder(partialRight));
  6146. return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined$1, partials, holders);
  6147. });
  6148. var rearg = flatRest(function(func, indexes) {
  6149. return createWrap(func, WRAP_REARG_FLAG, undefined$1, undefined$1, undefined$1, indexes);
  6150. });
  6151. function rest(func, start) {
  6152. if (typeof func != "function") {
  6153. throw new TypeError2(FUNC_ERROR_TEXT);
  6154. }
  6155. start = start === undefined$1 ? start : toInteger(start);
  6156. return baseRest(func, start);
  6157. }
  6158. function spread2(func, start) {
  6159. if (typeof func != "function") {
  6160. throw new TypeError2(FUNC_ERROR_TEXT);
  6161. }
  6162. start = start == null ? 0 : nativeMax(toInteger(start), 0);
  6163. return baseRest(function(args) {
  6164. var array2 = args[start], otherArgs = castSlice(args, 0, start);
  6165. if (array2) {
  6166. arrayPush(otherArgs, array2);
  6167. }
  6168. return apply2(func, this, otherArgs);
  6169. });
  6170. }
  6171. function throttle2(func, wait, options2) {
  6172. var leading = true, trailing = true;
  6173. if (typeof func != "function") {
  6174. throw new TypeError2(FUNC_ERROR_TEXT);
  6175. }
  6176. if (isObject2(options2)) {
  6177. leading = "leading" in options2 ? !!options2.leading : leading;
  6178. trailing = "trailing" in options2 ? !!options2.trailing : trailing;
  6179. }
  6180. return debounce(func, wait, {
  6181. "leading": leading,
  6182. "maxWait": wait,
  6183. "trailing": trailing
  6184. });
  6185. }
  6186. function unary(func) {
  6187. return ary(func, 1);
  6188. }
  6189. function wrap(value, wrapper) {
  6190. return partial(castFunction(wrapper), value);
  6191. }
  6192. function castArray() {
  6193. if (!arguments.length) {
  6194. return [];
  6195. }
  6196. var value = arguments[0];
  6197. return isArray2(value) ? value : [value];
  6198. }
  6199. function clone2(value) {
  6200. return baseClone(value, CLONE_SYMBOLS_FLAG);
  6201. }
  6202. function cloneWith(value, customizer) {
  6203. customizer = typeof customizer == "function" ? customizer : undefined$1;
  6204. return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
  6205. }
  6206. function cloneDeep2(value) {
  6207. return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
  6208. }
  6209. function cloneDeepWith(value, customizer) {
  6210. customizer = typeof customizer == "function" ? customizer : undefined$1;
  6211. return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
  6212. }
  6213. function conformsTo(object2, source) {
  6214. return source == null || baseConformsTo(object2, source, keys(source));
  6215. }
  6216. function eq(value, other) {
  6217. return value === other || value !== value && other !== other;
  6218. }
  6219. var gt2 = createRelationalOperation(baseGt);
  6220. var gte = createRelationalOperation(function(value, other) {
  6221. return value >= other;
  6222. });
  6223. var isArguments = baseIsArguments(/* @__PURE__ */ function() {
  6224. return arguments;
  6225. }()) ? baseIsArguments : function(value) {
  6226. return isObjectLike(value) && hasOwnProperty2.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
  6227. };
  6228. var isArray2 = Array2.isArray;
  6229. var isArrayBuffer2 = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
  6230. function isArrayLike(value) {
  6231. return value != null && isLength(value.length) && !isFunction2(value);
  6232. }
  6233. function isArrayLikeObject(value) {
  6234. return isObjectLike(value) && isArrayLike(value);
  6235. }
  6236. function isBoolean2(value) {
  6237. return value === true || value === false || isObjectLike(value) && baseGetTag(value) == boolTag;
  6238. }
  6239. var isBuffer2 = nativeIsBuffer || stubFalse;
  6240. var isDate2 = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
  6241. function isElement(value) {
  6242. return isObjectLike(value) && value.nodeType === 1 && !isPlainObject2(value);
  6243. }
  6244. function isEmpty(value) {
  6245. if (value == null) {
  6246. return true;
  6247. }
  6248. if (isArrayLike(value) && (isArray2(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer2(value) || isTypedArray2(value) || isArguments(value))) {
  6249. return !value.length;
  6250. }
  6251. var tag = getTag(value);
  6252. if (tag == mapTag || tag == setTag) {
  6253. return !value.size;
  6254. }
  6255. if (isPrototype(value)) {
  6256. return !baseKeys(value).length;
  6257. }
  6258. for (var key in value) {
  6259. if (hasOwnProperty2.call(value, key)) {
  6260. return false;
  6261. }
  6262. }
  6263. return true;
  6264. }
  6265. function isEqual(value, other) {
  6266. return baseIsEqual(value, other);
  6267. }
  6268. function isEqualWith(value, other, customizer) {
  6269. customizer = typeof customizer == "function" ? customizer : undefined$1;
  6270. var result3 = customizer ? customizer(value, other) : undefined$1;
  6271. return result3 === undefined$1 ? baseIsEqual(value, other, undefined$1, customizer) : !!result3;
  6272. }
  6273. function isError(value) {
  6274. if (!isObjectLike(value)) {
  6275. return false;
  6276. }
  6277. var tag = baseGetTag(value);
  6278. return tag == errorTag || tag == domExcTag || typeof value.message == "string" && typeof value.name == "string" && !isPlainObject2(value);
  6279. }
  6280. function isFinite2(value) {
  6281. return typeof value == "number" && nativeIsFinite(value);
  6282. }
  6283. function isFunction2(value) {
  6284. if (!isObject2(value)) {
  6285. return false;
  6286. }
  6287. var tag = baseGetTag(value);
  6288. return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
  6289. }
  6290. function isInteger(value) {
  6291. return typeof value == "number" && value == toInteger(value);
  6292. }
  6293. function isLength(value) {
  6294. return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  6295. }
  6296. function isObject2(value) {
  6297. var type = typeof value;
  6298. return value != null && (type == "object" || type == "function");
  6299. }
  6300. function isObjectLike(value) {
  6301. return value != null && typeof value == "object";
  6302. }
  6303. var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
  6304. function isMatch(object2, source) {
  6305. return object2 === source || baseIsMatch(object2, source, getMatchData(source));
  6306. }
  6307. function isMatchWith(object2, source, customizer) {
  6308. customizer = typeof customizer == "function" ? customizer : undefined$1;
  6309. return baseIsMatch(object2, source, getMatchData(source), customizer);
  6310. }
  6311. function isNaN2(value) {
  6312. return isNumber2(value) && value != +value;
  6313. }
  6314. function isNative(value) {
  6315. if (isMaskable(value)) {
  6316. throw new Error2(CORE_ERROR_TEXT);
  6317. }
  6318. return baseIsNative(value);
  6319. }
  6320. function isNull(value) {
  6321. return value === null;
  6322. }
  6323. function isNil(value) {
  6324. return value == null;
  6325. }
  6326. function isNumber2(value) {
  6327. return typeof value == "number" || isObjectLike(value) && baseGetTag(value) == numberTag;
  6328. }
  6329. function isPlainObject2(value) {
  6330. if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
  6331. return false;
  6332. }
  6333. var proto = getPrototype(value);
  6334. if (proto === null) {
  6335. return true;
  6336. }
  6337. var Ctor = hasOwnProperty2.call(proto, "constructor") && proto.constructor;
  6338. return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
  6339. }
  6340. var isRegExp2 = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
  6341. function isSafeInteger(value) {
  6342. return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
  6343. }
  6344. var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
  6345. function isString2(value) {
  6346. return typeof value == "string" || !isArray2(value) && isObjectLike(value) && baseGetTag(value) == stringTag;
  6347. }
  6348. function isSymbol(value) {
  6349. return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
  6350. }
  6351. var isTypedArray2 = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
  6352. function isUndefined2(value) {
  6353. return value === undefined$1;
  6354. }
  6355. function isWeakMap(value) {
  6356. return isObjectLike(value) && getTag(value) == weakMapTag;
  6357. }
  6358. function isWeakSet(value) {
  6359. return isObjectLike(value) && baseGetTag(value) == weakSetTag;
  6360. }
  6361. var lt2 = createRelationalOperation(baseLt);
  6362. var lte = createRelationalOperation(function(value, other) {
  6363. return value <= other;
  6364. });
  6365. function toArray2(value) {
  6366. if (!value) {
  6367. return [];
  6368. }
  6369. if (isArrayLike(value)) {
  6370. return isString2(value) ? stringToArray(value) : copyArray(value);
  6371. }
  6372. if (symIterator && value[symIterator]) {
  6373. return iteratorToArray(value[symIterator]());
  6374. }
  6375. var tag = getTag(value), func = tag == mapTag ? mapToArray : tag == setTag ? setToArray : values;
  6376. return func(value);
  6377. }
  6378. function toFinite(value) {
  6379. if (!value) {
  6380. return value === 0 ? value : 0;
  6381. }
  6382. value = toNumber(value);
  6383. if (value === INFINITY || value === -INFINITY) {
  6384. var sign2 = value < 0 ? -1 : 1;
  6385. return sign2 * MAX_INTEGER;
  6386. }
  6387. return value === value ? value : 0;
  6388. }
  6389. function toInteger(value) {
  6390. var result3 = toFinite(value), remainder = result3 % 1;
  6391. return result3 === result3 ? remainder ? result3 - remainder : result3 : 0;
  6392. }
  6393. function toLength(value) {
  6394. return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
  6395. }
  6396. function toNumber(value) {
  6397. if (typeof value == "number") {
  6398. return value;
  6399. }
  6400. if (isSymbol(value)) {
  6401. return NAN;
  6402. }
  6403. if (isObject2(value)) {
  6404. var other = typeof value.valueOf == "function" ? value.valueOf() : value;
  6405. value = isObject2(other) ? other + "" : other;
  6406. }
  6407. if (typeof value != "string") {
  6408. return value === 0 ? value : +value;
  6409. }
  6410. value = baseTrim(value);
  6411. var isBinary = reIsBinary.test(value);
  6412. return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
  6413. }
  6414. function toPlainObject(value) {
  6415. return copyObject(value, keysIn(value));
  6416. }
  6417. function toSafeInteger(value) {
  6418. return value ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) : value === 0 ? value : 0;
  6419. }
  6420. function toString2(value) {
  6421. return value == null ? "" : baseToString(value);
  6422. }
  6423. var assign2 = createAssigner(function(object2, source) {
  6424. if (isPrototype(source) || isArrayLike(source)) {
  6425. copyObject(source, keys(source), object2);
  6426. return;
  6427. }
  6428. for (var key in source) {
  6429. if (hasOwnProperty2.call(source, key)) {
  6430. assignValue(object2, key, source[key]);
  6431. }
  6432. }
  6433. });
  6434. var assignIn = createAssigner(function(object2, source) {
  6435. copyObject(source, keysIn(source), object2);
  6436. });
  6437. var assignInWith = createAssigner(function(object2, source, srcIndex, customizer) {
  6438. copyObject(source, keysIn(source), object2, customizer);
  6439. });
  6440. var assignWith = createAssigner(function(object2, source, srcIndex, customizer) {
  6441. copyObject(source, keys(source), object2, customizer);
  6442. });
  6443. var at2 = flatRest(baseAt);
  6444. function create(prototype2, properties) {
  6445. var result3 = baseCreate(prototype2);
  6446. return properties == null ? result3 : baseAssign(result3, properties);
  6447. }
  6448. var defaults2 = baseRest(function(object2, sources) {
  6449. object2 = Object2(object2);
  6450. var index2 = -1;
  6451. var length = sources.length;
  6452. var guard = length > 2 ? sources[2] : undefined$1;
  6453. if (guard && isIterateeCall(sources[0], sources[1], guard)) {
  6454. length = 1;
  6455. }
  6456. while (++index2 < length) {
  6457. var source = sources[index2];
  6458. var props = keysIn(source);
  6459. var propsIndex = -1;
  6460. var propsLength = props.length;
  6461. while (++propsIndex < propsLength) {
  6462. var key = props[propsIndex];
  6463. var value = object2[key];
  6464. if (value === undefined$1 || eq(value, objectProto[key]) && !hasOwnProperty2.call(object2, key)) {
  6465. object2[key] = source[key];
  6466. }
  6467. }
  6468. }
  6469. return object2;
  6470. });
  6471. var defaultsDeep = baseRest(function(args) {
  6472. args.push(undefined$1, customDefaultsMerge);
  6473. return apply2(mergeWith, undefined$1, args);
  6474. });
  6475. function findKey2(object2, predicate) {
  6476. return baseFindKey(object2, getIteratee(predicate, 3), baseForOwn);
  6477. }
  6478. function findLastKey(object2, predicate) {
  6479. return baseFindKey(object2, getIteratee(predicate, 3), baseForOwnRight);
  6480. }
  6481. function forIn(object2, iteratee2) {
  6482. return object2 == null ? object2 : baseFor(object2, getIteratee(iteratee2, 3), keysIn);
  6483. }
  6484. function forInRight(object2, iteratee2) {
  6485. return object2 == null ? object2 : baseForRight(object2, getIteratee(iteratee2, 3), keysIn);
  6486. }
  6487. function forOwn(object2, iteratee2) {
  6488. return object2 && baseForOwn(object2, getIteratee(iteratee2, 3));
  6489. }
  6490. function forOwnRight(object2, iteratee2) {
  6491. return object2 && baseForOwnRight(object2, getIteratee(iteratee2, 3));
  6492. }
  6493. function functions(object2) {
  6494. return object2 == null ? [] : baseFunctions(object2, keys(object2));
  6495. }
  6496. function functionsIn(object2) {
  6497. return object2 == null ? [] : baseFunctions(object2, keysIn(object2));
  6498. }
  6499. function get(object2, path, defaultValue) {
  6500. var result3 = object2 == null ? undefined$1 : baseGet(object2, path);
  6501. return result3 === undefined$1 ? defaultValue : result3;
  6502. }
  6503. function has(object2, path) {
  6504. return object2 != null && hasPath(object2, path, baseHas);
  6505. }
  6506. function hasIn(object2, path) {
  6507. return object2 != null && hasPath(object2, path, baseHasIn);
  6508. }
  6509. var invert = createInverter(function(result3, value, key) {
  6510. if (value != null && typeof value.toString != "function") {
  6511. value = nativeObjectToString.call(value);
  6512. }
  6513. result3[value] = key;
  6514. }, constant(identity));
  6515. var invertBy = createInverter(function(result3, value, key) {
  6516. if (value != null && typeof value.toString != "function") {
  6517. value = nativeObjectToString.call(value);
  6518. }
  6519. if (hasOwnProperty2.call(result3, value)) {
  6520. result3[value].push(key);
  6521. } else {
  6522. result3[value] = [key];
  6523. }
  6524. }, getIteratee);
  6525. var invoke = baseRest(baseInvoke);
  6526. function keys(object2) {
  6527. return isArrayLike(object2) ? arrayLikeKeys(object2) : baseKeys(object2);
  6528. }
  6529. function keysIn(object2) {
  6530. return isArrayLike(object2) ? arrayLikeKeys(object2, true) : baseKeysIn(object2);
  6531. }
  6532. function mapKeys(object2, iteratee2) {
  6533. var result3 = {};
  6534. iteratee2 = getIteratee(iteratee2, 3);
  6535. baseForOwn(object2, function(value, key, object3) {
  6536. baseAssignValue(result3, iteratee2(value, key, object3), value);
  6537. });
  6538. return result3;
  6539. }
  6540. function mapValues(object2, iteratee2) {
  6541. var result3 = {};
  6542. iteratee2 = getIteratee(iteratee2, 3);
  6543. baseForOwn(object2, function(value, key, object3) {
  6544. baseAssignValue(result3, key, iteratee2(value, key, object3));
  6545. });
  6546. return result3;
  6547. }
  6548. var merge2 = createAssigner(function(object2, source, srcIndex) {
  6549. baseMerge(object2, source, srcIndex);
  6550. });
  6551. var mergeWith = createAssigner(function(object2, source, srcIndex, customizer) {
  6552. baseMerge(object2, source, srcIndex, customizer);
  6553. });
  6554. var omit = flatRest(function(object2, paths) {
  6555. var result3 = {};
  6556. if (object2 == null) {
  6557. return result3;
  6558. }
  6559. var isDeep = false;
  6560. paths = arrayMap(paths, function(path) {
  6561. path = castPath(path, object2);
  6562. isDeep || (isDeep = path.length > 1);
  6563. return path;
  6564. });
  6565. copyObject(object2, getAllKeysIn(object2), result3);
  6566. if (isDeep) {
  6567. result3 = baseClone(result3, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
  6568. }
  6569. var length = paths.length;
  6570. while (length--) {
  6571. baseUnset(result3, paths[length]);
  6572. }
  6573. return result3;
  6574. });
  6575. function omitBy(object2, predicate) {
  6576. return pickBy(object2, negate(getIteratee(predicate)));
  6577. }
  6578. var pick = flatRest(function(object2, paths) {
  6579. return object2 == null ? {} : basePick(object2, paths);
  6580. });
  6581. function pickBy(object2, predicate) {
  6582. if (object2 == null) {
  6583. return {};
  6584. }
  6585. var props = arrayMap(getAllKeysIn(object2), function(prop) {
  6586. return [prop];
  6587. });
  6588. predicate = getIteratee(predicate);
  6589. return basePickBy(object2, props, function(value, path) {
  6590. return predicate(value, path[0]);
  6591. });
  6592. }
  6593. function result2(object2, path, defaultValue) {
  6594. path = castPath(path, object2);
  6595. var index2 = -1, length = path.length;
  6596. if (!length) {
  6597. length = 1;
  6598. object2 = undefined$1;
  6599. }
  6600. while (++index2 < length) {
  6601. var value = object2 == null ? undefined$1 : object2[toKey(path[index2])];
  6602. if (value === undefined$1) {
  6603. index2 = length;
  6604. value = defaultValue;
  6605. }
  6606. object2 = isFunction2(value) ? value.call(object2) : value;
  6607. }
  6608. return object2;
  6609. }
  6610. function set2(object2, path, value) {
  6611. return object2 == null ? object2 : baseSet(object2, path, value);
  6612. }
  6613. function setWith(object2, path, value, customizer) {
  6614. customizer = typeof customizer == "function" ? customizer : undefined$1;
  6615. return object2 == null ? object2 : baseSet(object2, path, value, customizer);
  6616. }
  6617. var toPairs = createToPairs(keys);
  6618. var toPairsIn = createToPairs(keysIn);
  6619. function transform(object2, iteratee2, accumulator) {
  6620. var isArr = isArray2(object2), isArrLike = isArr || isBuffer2(object2) || isTypedArray2(object2);
  6621. iteratee2 = getIteratee(iteratee2, 4);
  6622. if (accumulator == null) {
  6623. var Ctor = object2 && object2.constructor;
  6624. if (isArrLike) {
  6625. accumulator = isArr ? new Ctor() : [];
  6626. } else if (isObject2(object2)) {
  6627. accumulator = isFunction2(Ctor) ? baseCreate(getPrototype(object2)) : {};
  6628. } else {
  6629. accumulator = {};
  6630. }
  6631. }
  6632. (isArrLike ? arrayEach : baseForOwn)(object2, function(value, index2, object3) {
  6633. return iteratee2(accumulator, value, index2, object3);
  6634. });
  6635. return accumulator;
  6636. }
  6637. function unset(object2, path) {
  6638. return object2 == null ? true : baseUnset(object2, path);
  6639. }
  6640. function update(object2, path, updater) {
  6641. return object2 == null ? object2 : baseUpdate(object2, path, castFunction(updater));
  6642. }
  6643. function updateWith(object2, path, updater, customizer) {
  6644. customizer = typeof customizer == "function" ? customizer : undefined$1;
  6645. return object2 == null ? object2 : baseUpdate(object2, path, castFunction(updater), customizer);
  6646. }
  6647. function values(object2) {
  6648. return object2 == null ? [] : baseValues(object2, keys(object2));
  6649. }
  6650. function valuesIn(object2) {
  6651. return object2 == null ? [] : baseValues(object2, keysIn(object2));
  6652. }
  6653. function clamp(number2, lower, upper) {
  6654. if (upper === undefined$1) {
  6655. upper = lower;
  6656. lower = undefined$1;
  6657. }
  6658. if (upper !== undefined$1) {
  6659. upper = toNumber(upper);
  6660. upper = upper === upper ? upper : 0;
  6661. }
  6662. if (lower !== undefined$1) {
  6663. lower = toNumber(lower);
  6664. lower = lower === lower ? lower : 0;
  6665. }
  6666. return baseClamp(toNumber(number2), lower, upper);
  6667. }
  6668. function inRange(number2, start, end) {
  6669. start = toFinite(start);
  6670. if (end === undefined$1) {
  6671. end = start;
  6672. start = 0;
  6673. } else {
  6674. end = toFinite(end);
  6675. }
  6676. number2 = toNumber(number2);
  6677. return baseInRange(number2, start, end);
  6678. }
  6679. function random2(lower, upper, floating) {
  6680. if (floating && typeof floating != "boolean" && isIterateeCall(lower, upper, floating)) {
  6681. upper = floating = undefined$1;
  6682. }
  6683. if (floating === undefined$1) {
  6684. if (typeof upper == "boolean") {
  6685. floating = upper;
  6686. upper = undefined$1;
  6687. } else if (typeof lower == "boolean") {
  6688. floating = lower;
  6689. lower = undefined$1;
  6690. }
  6691. }
  6692. if (lower === undefined$1 && upper === undefined$1) {
  6693. lower = 0;
  6694. upper = 1;
  6695. } else {
  6696. lower = toFinite(lower);
  6697. if (upper === undefined$1) {
  6698. upper = lower;
  6699. lower = 0;
  6700. } else {
  6701. upper = toFinite(upper);
  6702. }
  6703. }
  6704. if (lower > upper) {
  6705. var temp = lower;
  6706. lower = upper;
  6707. upper = temp;
  6708. }
  6709. if (floating || lower % 1 || upper % 1) {
  6710. var rand = nativeRandom();
  6711. return nativeMin(lower + rand * (upper - lower + freeParseFloat("1e-" + ((rand + "").length - 1))), upper);
  6712. }
  6713. return baseRandom(lower, upper);
  6714. }
  6715. var camelCase = createCompounder(function(result3, word, index2) {
  6716. word = word.toLowerCase();
  6717. return result3 + (index2 ? capitalize(word) : word);
  6718. });
  6719. function capitalize(string) {
  6720. return upperFirst(toString2(string).toLowerCase());
  6721. }
  6722. function deburr(string) {
  6723. string = toString2(string);
  6724. return string && string.replace(reLatin, deburrLetter).replace(reComboMark, "");
  6725. }
  6726. function endsWith2(string, target, position) {
  6727. string = toString2(string);
  6728. target = baseToString(target);
  6729. var length = string.length;
  6730. position = position === undefined$1 ? length : baseClamp(toInteger(position), 0, length);
  6731. var end = position;
  6732. position -= target.length;
  6733. return position >= 0 && string.slice(position, end) == target;
  6734. }
  6735. function escape2(string) {
  6736. string = toString2(string);
  6737. return string && reHasUnescapedHtml.test(string) ? string.replace(reUnescapedHtml, escapeHtmlChar) : string;
  6738. }
  6739. function escapeRegExp(string) {
  6740. string = toString2(string);
  6741. return string && reHasRegExpChar.test(string) ? string.replace(reRegExpChar, "\\$&") : string;
  6742. }
  6743. var kebabCase = createCompounder(function(result3, word, index2) {
  6744. return result3 + (index2 ? "-" : "") + word.toLowerCase();
  6745. });
  6746. var lowerCase = createCompounder(function(result3, word, index2) {
  6747. return result3 + (index2 ? " " : "") + word.toLowerCase();
  6748. });
  6749. var lowerFirst = createCaseFirst("toLowerCase");
  6750. function pad(string, length, chars) {
  6751. string = toString2(string);
  6752. length = toInteger(length);
  6753. var strLength = length ? stringSize(string) : 0;
  6754. if (!length || strLength >= length) {
  6755. return string;
  6756. }
  6757. var mid = (length - strLength) / 2;
  6758. return createPadding(nativeFloor(mid), chars) + string + createPadding(nativeCeil(mid), chars);
  6759. }
  6760. function padEnd(string, length, chars) {
  6761. string = toString2(string);
  6762. length = toInteger(length);
  6763. var strLength = length ? stringSize(string) : 0;
  6764. return length && strLength < length ? string + createPadding(length - strLength, chars) : string;
  6765. }
  6766. function padStart(string, length, chars) {
  6767. string = toString2(string);
  6768. length = toInteger(length);
  6769. var strLength = length ? stringSize(string) : 0;
  6770. return length && strLength < length ? createPadding(length - strLength, chars) + string : string;
  6771. }
  6772. function parseInt2(string, radix, guard) {
  6773. if (guard || radix == null) {
  6774. radix = 0;
  6775. } else if (radix) {
  6776. radix = +radix;
  6777. }
  6778. return nativeParseInt(toString2(string).replace(reTrimStart, ""), radix || 0);
  6779. }
  6780. function repeat2(string, n2, guard) {
  6781. if (guard ? isIterateeCall(string, n2, guard) : n2 === undefined$1) {
  6782. n2 = 1;
  6783. } else {
  6784. n2 = toInteger(n2);
  6785. }
  6786. return baseRepeat(toString2(string), n2);
  6787. }
  6788. function replace() {
  6789. var args = arguments, string = toString2(args[0]);
  6790. return args.length < 3 ? string : string.replace(args[1], args[2]);
  6791. }
  6792. var snakeCase = createCompounder(function(result3, word, index2) {
  6793. return result3 + (index2 ? "_" : "") + word.toLowerCase();
  6794. });
  6795. function split(string, separator, limit) {
  6796. if (limit && typeof limit != "number" && isIterateeCall(string, separator, limit)) {
  6797. separator = limit = undefined$1;
  6798. }
  6799. limit = limit === undefined$1 ? MAX_ARRAY_LENGTH : limit >>> 0;
  6800. if (!limit) {
  6801. return [];
  6802. }
  6803. string = toString2(string);
  6804. if (string && (typeof separator == "string" || separator != null && !isRegExp2(separator))) {
  6805. separator = baseToString(separator);
  6806. if (!separator && hasUnicode(string)) {
  6807. return castSlice(stringToArray(string), 0, limit);
  6808. }
  6809. }
  6810. return string.split(separator, limit);
  6811. }
  6812. var startCase = createCompounder(function(result3, word, index2) {
  6813. return result3 + (index2 ? " " : "") + upperFirst(word);
  6814. });
  6815. function startsWith2(string, target, position) {
  6816. string = toString2(string);
  6817. position = position == null ? 0 : baseClamp(toInteger(position), 0, string.length);
  6818. target = baseToString(target);
  6819. return string.slice(position, position + target.length) == target;
  6820. }
  6821. function template(string, options2, guard) {
  6822. var settings2 = lodash2.templateSettings;
  6823. if (guard && isIterateeCall(string, options2, guard)) {
  6824. options2 = undefined$1;
  6825. }
  6826. string = toString2(string);
  6827. options2 = assignInWith({}, options2, settings2, customDefaultsAssignIn);
  6828. var imports = assignInWith({}, options2.imports, settings2.imports, customDefaultsAssignIn), importsKeys = keys(imports), importsValues = baseValues(imports, importsKeys);
  6829. var isEscaping, isEvaluating, index2 = 0, interpolate = options2.interpolate || reNoMatch, source = "__p += '";
  6830. var reDelimiters = RegExp2(
  6831. (options2.escape || reNoMatch).source + "|" + interpolate.source + "|" + (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + "|" + (options2.evaluate || reNoMatch).source + "|$",
  6832. "g"
  6833. );
  6834. var sourceURL = "//# sourceURL=" + (hasOwnProperty2.call(options2, "sourceURL") ? (options2.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++templateCounter + "]") + "\n";
  6835. string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
  6836. interpolateValue || (interpolateValue = esTemplateValue);
  6837. source += string.slice(index2, offset).replace(reUnescapedString, escapeStringChar);
  6838. if (escapeValue) {
  6839. isEscaping = true;
  6840. source += "' +\n__e(" + escapeValue + ") +\n'";
  6841. }
  6842. if (evaluateValue) {
  6843. isEvaluating = true;
  6844. source += "';\n" + evaluateValue + ";\n__p += '";
  6845. }
  6846. if (interpolateValue) {
  6847. source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
  6848. }
  6849. index2 = offset + match.length;
  6850. return match;
  6851. });
  6852. source += "';\n";
  6853. var variable = hasOwnProperty2.call(options2, "variable") && options2.variable;
  6854. if (!variable) {
  6855. source = "with (obj) {\n" + source + "\n}\n";
  6856. } else if (reForbiddenIdentifierChars.test(variable)) {
  6857. throw new Error2(INVALID_TEMPL_VAR_ERROR_TEXT);
  6858. }
  6859. source = (isEvaluating ? source.replace(reEmptyStringLeading, "") : source).replace(reEmptyStringMiddle, "$1").replace(reEmptyStringTrailing, "$1;");
  6860. source = "function(" + (variable || "obj") + ") {\n" + (variable ? "" : "obj || (obj = {});\n") + "var __t, __p = ''" + (isEscaping ? ", __e = _.escape" : "") + (isEvaluating ? ", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n" : ";\n") + source + "return __p\n}";
  6861. var result3 = attempt(function() {
  6862. return Function2(importsKeys, sourceURL + "return " + source).apply(undefined$1, importsValues);
  6863. });
  6864. result3.source = source;
  6865. if (isError(result3)) {
  6866. throw result3;
  6867. }
  6868. return result3;
  6869. }
  6870. function toLower(value) {
  6871. return toString2(value).toLowerCase();
  6872. }
  6873. function toUpper(value) {
  6874. return toString2(value).toUpperCase();
  6875. }
  6876. function trim2(string, chars, guard) {
  6877. string = toString2(string);
  6878. if (string && (guard || chars === undefined$1)) {
  6879. return baseTrim(string);
  6880. }
  6881. if (!string || !(chars = baseToString(chars))) {
  6882. return string;
  6883. }
  6884. var strSymbols = stringToArray(string), chrSymbols = stringToArray(chars), start = charsStartIndex(strSymbols, chrSymbols), end = charsEndIndex(strSymbols, chrSymbols) + 1;
  6885. return castSlice(strSymbols, start, end).join("");
  6886. }
  6887. function trimEnd(string, chars, guard) {
  6888. string = toString2(string);
  6889. if (string && (guard || chars === undefined$1)) {
  6890. return string.slice(0, trimmedEndIndex(string) + 1);
  6891. }
  6892. if (!string || !(chars = baseToString(chars))) {
  6893. return string;
  6894. }
  6895. var strSymbols = stringToArray(string), end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
  6896. return castSlice(strSymbols, 0, end).join("");
  6897. }
  6898. function trimStart(string, chars, guard) {
  6899. string = toString2(string);
  6900. if (string && (guard || chars === undefined$1)) {
  6901. return string.replace(reTrimStart, "");
  6902. }
  6903. if (!string || !(chars = baseToString(chars))) {
  6904. return string;
  6905. }
  6906. var strSymbols = stringToArray(string), start = charsStartIndex(strSymbols, stringToArray(chars));
  6907. return castSlice(strSymbols, start).join("");
  6908. }
  6909. function truncate(string, options2) {
  6910. var length = DEFAULT_TRUNC_LENGTH, omission = DEFAULT_TRUNC_OMISSION;
  6911. if (isObject2(options2)) {
  6912. var separator = "separator" in options2 ? options2.separator : separator;
  6913. length = "length" in options2 ? toInteger(options2.length) : length;
  6914. omission = "omission" in options2 ? baseToString(options2.omission) : omission;
  6915. }
  6916. string = toString2(string);
  6917. var strLength = string.length;
  6918. if (hasUnicode(string)) {
  6919. var strSymbols = stringToArray(string);
  6920. strLength = strSymbols.length;
  6921. }
  6922. if (length >= strLength) {
  6923. return string;
  6924. }
  6925. var end = length - stringSize(omission);
  6926. if (end < 1) {
  6927. return omission;
  6928. }
  6929. var result3 = strSymbols ? castSlice(strSymbols, 0, end).join("") : string.slice(0, end);
  6930. if (separator === undefined$1) {
  6931. return result3 + omission;
  6932. }
  6933. if (strSymbols) {
  6934. end += result3.length - end;
  6935. }
  6936. if (isRegExp2(separator)) {
  6937. if (string.slice(end).search(separator)) {
  6938. var match, substring = result3;
  6939. if (!separator.global) {
  6940. separator = RegExp2(separator.source, toString2(reFlags.exec(separator)) + "g");
  6941. }
  6942. separator.lastIndex = 0;
  6943. while (match = separator.exec(substring)) {
  6944. var newEnd = match.index;
  6945. }
  6946. result3 = result3.slice(0, newEnd === undefined$1 ? end : newEnd);
  6947. }
  6948. } else if (string.indexOf(baseToString(separator), end) != end) {
  6949. var index2 = result3.lastIndexOf(separator);
  6950. if (index2 > -1) {
  6951. result3 = result3.slice(0, index2);
  6952. }
  6953. }
  6954. return result3 + omission;
  6955. }
  6956. function unescape2(string) {
  6957. string = toString2(string);
  6958. return string && reHasEscapedHtml.test(string) ? string.replace(reEscapedHtml, unescapeHtmlChar) : string;
  6959. }
  6960. var upperCase = createCompounder(function(result3, word, index2) {
  6961. return result3 + (index2 ? " " : "") + word.toUpperCase();
  6962. });
  6963. var upperFirst = createCaseFirst("toUpperCase");
  6964. function words(string, pattern2, guard) {
  6965. string = toString2(string);
  6966. pattern2 = guard ? undefined$1 : pattern2;
  6967. if (pattern2 === undefined$1) {
  6968. return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
  6969. }
  6970. return string.match(pattern2) || [];
  6971. }
  6972. var attempt = baseRest(function(func, args) {
  6973. try {
  6974. return apply2(func, undefined$1, args);
  6975. } catch (e2) {
  6976. return isError(e2) ? e2 : new Error2(e2);
  6977. }
  6978. });
  6979. var bindAll = flatRest(function(object2, methodNames) {
  6980. arrayEach(methodNames, function(key) {
  6981. key = toKey(key);
  6982. baseAssignValue(object2, key, bind2(object2[key], object2));
  6983. });
  6984. return object2;
  6985. });
  6986. function cond(pairs) {
  6987. var length = pairs == null ? 0 : pairs.length, toIteratee = getIteratee();
  6988. pairs = !length ? [] : arrayMap(pairs, function(pair) {
  6989. if (typeof pair[1] != "function") {
  6990. throw new TypeError2(FUNC_ERROR_TEXT);
  6991. }
  6992. return [toIteratee(pair[0]), pair[1]];
  6993. });
  6994. return baseRest(function(args) {
  6995. var index2 = -1;
  6996. while (++index2 < length) {
  6997. var pair = pairs[index2];
  6998. if (apply2(pair[0], this, args)) {
  6999. return apply2(pair[1], this, args);
  7000. }
  7001. }
  7002. });
  7003. }
  7004. function conforms(source) {
  7005. return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
  7006. }
  7007. function constant(value) {
  7008. return function() {
  7009. return value;
  7010. };
  7011. }
  7012. function defaultTo(value, defaultValue) {
  7013. return value == null || value !== value ? defaultValue : value;
  7014. }
  7015. var flow = createFlow();
  7016. var flowRight = createFlow(true);
  7017. function identity(value) {
  7018. return value;
  7019. }
  7020. function iteratee(func) {
  7021. return baseIteratee(typeof func == "function" ? func : baseClone(func, CLONE_DEEP_FLAG));
  7022. }
  7023. function matches(source) {
  7024. return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
  7025. }
  7026. function matchesProperty(path, srcValue) {
  7027. return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
  7028. }
  7029. var method = baseRest(function(path, args) {
  7030. return function(object2) {
  7031. return baseInvoke(object2, path, args);
  7032. };
  7033. });
  7034. var methodOf = baseRest(function(object2, args) {
  7035. return function(path) {
  7036. return baseInvoke(object2, path, args);
  7037. };
  7038. });
  7039. function mixin(object2, source, options2) {
  7040. var props = keys(source), methodNames = baseFunctions(source, props);
  7041. if (options2 == null && !(isObject2(source) && (methodNames.length || !props.length))) {
  7042. options2 = source;
  7043. source = object2;
  7044. object2 = this;
  7045. methodNames = baseFunctions(source, keys(source));
  7046. }
  7047. var chain2 = !(isObject2(options2) && "chain" in options2) || !!options2.chain, isFunc = isFunction2(object2);
  7048. arrayEach(methodNames, function(methodName) {
  7049. var func = source[methodName];
  7050. object2[methodName] = func;
  7051. if (isFunc) {
  7052. object2.prototype[methodName] = function() {
  7053. var chainAll = this.__chain__;
  7054. if (chain2 || chainAll) {
  7055. var result3 = object2(this.__wrapped__), actions = result3.__actions__ = copyArray(this.__actions__);
  7056. actions.push({ "func": func, "args": arguments, "thisArg": object2 });
  7057. result3.__chain__ = chainAll;
  7058. return result3;
  7059. }
  7060. return func.apply(object2, arrayPush([this.value()], arguments));
  7061. };
  7062. }
  7063. });
  7064. return object2;
  7065. }
  7066. function noConflict() {
  7067. if (root._ === this) {
  7068. root._ = oldDash;
  7069. }
  7070. return this;
  7071. }
  7072. function noop2() {
  7073. }
  7074. function nthArg(n2) {
  7075. n2 = toInteger(n2);
  7076. return baseRest(function(args) {
  7077. return baseNth(args, n2);
  7078. });
  7079. }
  7080. var over = createOver(arrayMap);
  7081. var overEvery = createOver(arrayEvery);
  7082. var overSome = createOver(arraySome);
  7083. function property(path) {
  7084. return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
  7085. }
  7086. function propertyOf(object2) {
  7087. return function(path) {
  7088. return object2 == null ? undefined$1 : baseGet(object2, path);
  7089. };
  7090. }
  7091. var range2 = createRange();
  7092. var rangeRight = createRange(true);
  7093. function stubArray() {
  7094. return [];
  7095. }
  7096. function stubFalse() {
  7097. return false;
  7098. }
  7099. function stubObject() {
  7100. return {};
  7101. }
  7102. function stubString() {
  7103. return "";
  7104. }
  7105. function stubTrue() {
  7106. return true;
  7107. }
  7108. function times2(n2, iteratee2) {
  7109. n2 = toInteger(n2);
  7110. if (n2 < 1 || n2 > MAX_SAFE_INTEGER) {
  7111. return [];
  7112. }
  7113. var index2 = MAX_ARRAY_LENGTH, length = nativeMin(n2, MAX_ARRAY_LENGTH);
  7114. iteratee2 = getIteratee(iteratee2);
  7115. n2 -= MAX_ARRAY_LENGTH;
  7116. var result3 = baseTimes(length, iteratee2);
  7117. while (++index2 < n2) {
  7118. iteratee2(index2);
  7119. }
  7120. return result3;
  7121. }
  7122. function toPath(value) {
  7123. if (isArray2(value)) {
  7124. return arrayMap(value, toKey);
  7125. }
  7126. return isSymbol(value) ? [value] : copyArray(stringToPath(toString2(value)));
  7127. }
  7128. function uniqueId(prefix) {
  7129. var id = ++idCounter;
  7130. return toString2(prefix) + id;
  7131. }
  7132. var add = createMathOperation(function(augend, addend) {
  7133. return augend + addend;
  7134. }, 0);
  7135. var ceil = createRound("ceil");
  7136. var divide2 = createMathOperation(function(dividend, divisor) {
  7137. return dividend / divisor;
  7138. }, 1);
  7139. var floor = createRound("floor");
  7140. function max(array2) {
  7141. return array2 && array2.length ? baseExtremum(array2, identity, baseGt) : undefined$1;
  7142. }
  7143. function maxBy(array2, iteratee2) {
  7144. return array2 && array2.length ? baseExtremum(array2, getIteratee(iteratee2, 2), baseGt) : undefined$1;
  7145. }
  7146. function mean(array2) {
  7147. return baseMean(array2, identity);
  7148. }
  7149. function meanBy(array2, iteratee2) {
  7150. return baseMean(array2, getIteratee(iteratee2, 2));
  7151. }
  7152. function min(array2) {
  7153. return array2 && array2.length ? baseExtremum(array2, identity, baseLt) : undefined$1;
  7154. }
  7155. function minBy(array2, iteratee2) {
  7156. return array2 && array2.length ? baseExtremum(array2, getIteratee(iteratee2, 2), baseLt) : undefined$1;
  7157. }
  7158. var multiply = createMathOperation(function(multiplier, multiplicand) {
  7159. return multiplier * multiplicand;
  7160. }, 1);
  7161. var round2 = createRound("round");
  7162. var subtract = createMathOperation(function(minuend, subtrahend) {
  7163. return minuend - subtrahend;
  7164. }, 0);
  7165. function sum(array2) {
  7166. return array2 && array2.length ? baseSum(array2, identity) : 0;
  7167. }
  7168. function sumBy(array2, iteratee2) {
  7169. return array2 && array2.length ? baseSum(array2, getIteratee(iteratee2, 2)) : 0;
  7170. }
  7171. lodash2.after = after;
  7172. lodash2.ary = ary;
  7173. lodash2.assign = assign2;
  7174. lodash2.assignIn = assignIn;
  7175. lodash2.assignInWith = assignInWith;
  7176. lodash2.assignWith = assignWith;
  7177. lodash2.at = at2;
  7178. lodash2.before = before;
  7179. lodash2.bind = bind2;
  7180. lodash2.bindAll = bindAll;
  7181. lodash2.bindKey = bindKey;
  7182. lodash2.castArray = castArray;
  7183. lodash2.chain = chain;
  7184. lodash2.chunk = chunk;
  7185. lodash2.compact = compact;
  7186. lodash2.concat = concat;
  7187. lodash2.cond = cond;
  7188. lodash2.conforms = conforms;
  7189. lodash2.constant = constant;
  7190. lodash2.countBy = countBy;
  7191. lodash2.create = create;
  7192. lodash2.curry = curry;
  7193. lodash2.curryRight = curryRight;
  7194. lodash2.debounce = debounce;
  7195. lodash2.defaults = defaults2;
  7196. lodash2.defaultsDeep = defaultsDeep;
  7197. lodash2.defer = defer;
  7198. lodash2.delay = delay;
  7199. lodash2.difference = difference;
  7200. lodash2.differenceBy = differenceBy;
  7201. lodash2.differenceWith = differenceWith;
  7202. lodash2.drop = drop;
  7203. lodash2.dropRight = dropRight;
  7204. lodash2.dropRightWhile = dropRightWhile;
  7205. lodash2.dropWhile = dropWhile;
  7206. lodash2.fill = fill;
  7207. lodash2.filter = filter;
  7208. lodash2.flatMap = flatMap;
  7209. lodash2.flatMapDeep = flatMapDeep;
  7210. lodash2.flatMapDepth = flatMapDepth;
  7211. lodash2.flatten = flatten;
  7212. lodash2.flattenDeep = flattenDeep;
  7213. lodash2.flattenDepth = flattenDepth;
  7214. lodash2.flip = flip;
  7215. lodash2.flow = flow;
  7216. lodash2.flowRight = flowRight;
  7217. lodash2.fromPairs = fromPairs;
  7218. lodash2.functions = functions;
  7219. lodash2.functionsIn = functionsIn;
  7220. lodash2.groupBy = groupBy;
  7221. lodash2.initial = initial;
  7222. lodash2.intersection = intersection;
  7223. lodash2.intersectionBy = intersectionBy;
  7224. lodash2.intersectionWith = intersectionWith;
  7225. lodash2.invert = invert;
  7226. lodash2.invertBy = invertBy;
  7227. lodash2.invokeMap = invokeMap;
  7228. lodash2.iteratee = iteratee;
  7229. lodash2.keyBy = keyBy;
  7230. lodash2.keys = keys;
  7231. lodash2.keysIn = keysIn;
  7232. lodash2.map = map;
  7233. lodash2.mapKeys = mapKeys;
  7234. lodash2.mapValues = mapValues;
  7235. lodash2.matches = matches;
  7236. lodash2.matchesProperty = matchesProperty;
  7237. lodash2.memoize = memoize;
  7238. lodash2.merge = merge2;
  7239. lodash2.mergeWith = mergeWith;
  7240. lodash2.method = method;
  7241. lodash2.methodOf = methodOf;
  7242. lodash2.mixin = mixin;
  7243. lodash2.negate = negate;
  7244. lodash2.nthArg = nthArg;
  7245. lodash2.omit = omit;
  7246. lodash2.omitBy = omitBy;
  7247. lodash2.once = once;
  7248. lodash2.orderBy = orderBy;
  7249. lodash2.over = over;
  7250. lodash2.overArgs = overArgs;
  7251. lodash2.overEvery = overEvery;
  7252. lodash2.overSome = overSome;
  7253. lodash2.partial = partial;
  7254. lodash2.partialRight = partialRight;
  7255. lodash2.partition = partition;
  7256. lodash2.pick = pick;
  7257. lodash2.pickBy = pickBy;
  7258. lodash2.property = property;
  7259. lodash2.propertyOf = propertyOf;
  7260. lodash2.pull = pull;
  7261. lodash2.pullAll = pullAll;
  7262. lodash2.pullAllBy = pullAllBy;
  7263. lodash2.pullAllWith = pullAllWith;
  7264. lodash2.pullAt = pullAt;
  7265. lodash2.range = range2;
  7266. lodash2.rangeRight = rangeRight;
  7267. lodash2.rearg = rearg;
  7268. lodash2.reject = reject;
  7269. lodash2.remove = remove;
  7270. lodash2.rest = rest;
  7271. lodash2.reverse = reverse;
  7272. lodash2.sampleSize = sampleSize;
  7273. lodash2.set = set2;
  7274. lodash2.setWith = setWith;
  7275. lodash2.shuffle = shuffle;
  7276. lodash2.slice = slice;
  7277. lodash2.sortBy = sortBy;
  7278. lodash2.sortedUniq = sortedUniq;
  7279. lodash2.sortedUniqBy = sortedUniqBy;
  7280. lodash2.split = split;
  7281. lodash2.spread = spread2;
  7282. lodash2.tail = tail;
  7283. lodash2.take = take;
  7284. lodash2.takeRight = takeRight;
  7285. lodash2.takeRightWhile = takeRightWhile;
  7286. lodash2.takeWhile = takeWhile;
  7287. lodash2.tap = tap;
  7288. lodash2.throttle = throttle2;
  7289. lodash2.thru = thru;
  7290. lodash2.toArray = toArray2;
  7291. lodash2.toPairs = toPairs;
  7292. lodash2.toPairsIn = toPairsIn;
  7293. lodash2.toPath = toPath;
  7294. lodash2.toPlainObject = toPlainObject;
  7295. lodash2.transform = transform;
  7296. lodash2.unary = unary;
  7297. lodash2.union = union;
  7298. lodash2.unionBy = unionBy;
  7299. lodash2.unionWith = unionWith;
  7300. lodash2.uniq = uniq;
  7301. lodash2.uniqBy = uniqBy;
  7302. lodash2.uniqWith = uniqWith;
  7303. lodash2.unset = unset;
  7304. lodash2.unzip = unzip;
  7305. lodash2.unzipWith = unzipWith;
  7306. lodash2.update = update;
  7307. lodash2.updateWith = updateWith;
  7308. lodash2.values = values;
  7309. lodash2.valuesIn = valuesIn;
  7310. lodash2.without = without;
  7311. lodash2.words = words;
  7312. lodash2.wrap = wrap;
  7313. lodash2.xor = xor;
  7314. lodash2.xorBy = xorBy;
  7315. lodash2.xorWith = xorWith;
  7316. lodash2.zip = zip;
  7317. lodash2.zipObject = zipObject;
  7318. lodash2.zipObjectDeep = zipObjectDeep;
  7319. lodash2.zipWith = zipWith;
  7320. lodash2.entries = toPairs;
  7321. lodash2.entriesIn = toPairsIn;
  7322. lodash2.extend = assignIn;
  7323. lodash2.extendWith = assignInWith;
  7324. mixin(lodash2, lodash2);
  7325. lodash2.add = add;
  7326. lodash2.attempt = attempt;
  7327. lodash2.camelCase = camelCase;
  7328. lodash2.capitalize = capitalize;
  7329. lodash2.ceil = ceil;
  7330. lodash2.clamp = clamp;
  7331. lodash2.clone = clone2;
  7332. lodash2.cloneDeep = cloneDeep2;
  7333. lodash2.cloneDeepWith = cloneDeepWith;
  7334. lodash2.cloneWith = cloneWith;
  7335. lodash2.conformsTo = conformsTo;
  7336. lodash2.deburr = deburr;
  7337. lodash2.defaultTo = defaultTo;
  7338. lodash2.divide = divide2;
  7339. lodash2.endsWith = endsWith2;
  7340. lodash2.eq = eq;
  7341. lodash2.escape = escape2;
  7342. lodash2.escapeRegExp = escapeRegExp;
  7343. lodash2.every = every;
  7344. lodash2.find = find;
  7345. lodash2.findIndex = findIndex;
  7346. lodash2.findKey = findKey2;
  7347. lodash2.findLast = findLast;
  7348. lodash2.findLastIndex = findLastIndex;
  7349. lodash2.findLastKey = findLastKey;
  7350. lodash2.floor = floor;
  7351. lodash2.forEach = forEach2;
  7352. lodash2.forEachRight = forEachRight;
  7353. lodash2.forIn = forIn;
  7354. lodash2.forInRight = forInRight;
  7355. lodash2.forOwn = forOwn;
  7356. lodash2.forOwnRight = forOwnRight;
  7357. lodash2.get = get;
  7358. lodash2.gt = gt2;
  7359. lodash2.gte = gte;
  7360. lodash2.has = has;
  7361. lodash2.hasIn = hasIn;
  7362. lodash2.head = head;
  7363. lodash2.identity = identity;
  7364. lodash2.includes = includes;
  7365. lodash2.indexOf = indexOf;
  7366. lodash2.inRange = inRange;
  7367. lodash2.invoke = invoke;
  7368. lodash2.isArguments = isArguments;
  7369. lodash2.isArray = isArray2;
  7370. lodash2.isArrayBuffer = isArrayBuffer2;
  7371. lodash2.isArrayLike = isArrayLike;
  7372. lodash2.isArrayLikeObject = isArrayLikeObject;
  7373. lodash2.isBoolean = isBoolean2;
  7374. lodash2.isBuffer = isBuffer2;
  7375. lodash2.isDate = isDate2;
  7376. lodash2.isElement = isElement;
  7377. lodash2.isEmpty = isEmpty;
  7378. lodash2.isEqual = isEqual;
  7379. lodash2.isEqualWith = isEqualWith;
  7380. lodash2.isError = isError;
  7381. lodash2.isFinite = isFinite2;
  7382. lodash2.isFunction = isFunction2;
  7383. lodash2.isInteger = isInteger;
  7384. lodash2.isLength = isLength;
  7385. lodash2.isMap = isMap;
  7386. lodash2.isMatch = isMatch;
  7387. lodash2.isMatchWith = isMatchWith;
  7388. lodash2.isNaN = isNaN2;
  7389. lodash2.isNative = isNative;
  7390. lodash2.isNil = isNil;
  7391. lodash2.isNull = isNull;
  7392. lodash2.isNumber = isNumber2;
  7393. lodash2.isObject = isObject2;
  7394. lodash2.isObjectLike = isObjectLike;
  7395. lodash2.isPlainObject = isPlainObject2;
  7396. lodash2.isRegExp = isRegExp2;
  7397. lodash2.isSafeInteger = isSafeInteger;
  7398. lodash2.isSet = isSet;
  7399. lodash2.isString = isString2;
  7400. lodash2.isSymbol = isSymbol;
  7401. lodash2.isTypedArray = isTypedArray2;
  7402. lodash2.isUndefined = isUndefined2;
  7403. lodash2.isWeakMap = isWeakMap;
  7404. lodash2.isWeakSet = isWeakSet;
  7405. lodash2.join = join;
  7406. lodash2.kebabCase = kebabCase;
  7407. lodash2.last = last;
  7408. lodash2.lastIndexOf = lastIndexOf;
  7409. lodash2.lowerCase = lowerCase;
  7410. lodash2.lowerFirst = lowerFirst;
  7411. lodash2.lt = lt2;
  7412. lodash2.lte = lte;
  7413. lodash2.max = max;
  7414. lodash2.maxBy = maxBy;
  7415. lodash2.mean = mean;
  7416. lodash2.meanBy = meanBy;
  7417. lodash2.min = min;
  7418. lodash2.minBy = minBy;
  7419. lodash2.stubArray = stubArray;
  7420. lodash2.stubFalse = stubFalse;
  7421. lodash2.stubObject = stubObject;
  7422. lodash2.stubString = stubString;
  7423. lodash2.stubTrue = stubTrue;
  7424. lodash2.multiply = multiply;
  7425. lodash2.nth = nth;
  7426. lodash2.noConflict = noConflict;
  7427. lodash2.noop = noop2;
  7428. lodash2.now = now2;
  7429. lodash2.pad = pad;
  7430. lodash2.padEnd = padEnd;
  7431. lodash2.padStart = padStart;
  7432. lodash2.parseInt = parseInt2;
  7433. lodash2.random = random2;
  7434. lodash2.reduce = reduce;
  7435. lodash2.reduceRight = reduceRight;
  7436. lodash2.repeat = repeat2;
  7437. lodash2.replace = replace;
  7438. lodash2.result = result2;
  7439. lodash2.round = round2;
  7440. lodash2.runInContext = runInContext2;
  7441. lodash2.sample = sample;
  7442. lodash2.size = size;
  7443. lodash2.snakeCase = snakeCase;
  7444. lodash2.some = some;
  7445. lodash2.sortedIndex = sortedIndex;
  7446. lodash2.sortedIndexBy = sortedIndexBy;
  7447. lodash2.sortedIndexOf = sortedIndexOf;
  7448. lodash2.sortedLastIndex = sortedLastIndex;
  7449. lodash2.sortedLastIndexBy = sortedLastIndexBy;
  7450. lodash2.sortedLastIndexOf = sortedLastIndexOf;
  7451. lodash2.startCase = startCase;
  7452. lodash2.startsWith = startsWith2;
  7453. lodash2.subtract = subtract;
  7454. lodash2.sum = sum;
  7455. lodash2.sumBy = sumBy;
  7456. lodash2.template = template;
  7457. lodash2.times = times2;
  7458. lodash2.toFinite = toFinite;
  7459. lodash2.toInteger = toInteger;
  7460. lodash2.toLength = toLength;
  7461. lodash2.toLower = toLower;
  7462. lodash2.toNumber = toNumber;
  7463. lodash2.toSafeInteger = toSafeInteger;
  7464. lodash2.toString = toString2;
  7465. lodash2.toUpper = toUpper;
  7466. lodash2.trim = trim2;
  7467. lodash2.trimEnd = trimEnd;
  7468. lodash2.trimStart = trimStart;
  7469. lodash2.truncate = truncate;
  7470. lodash2.unescape = unescape2;
  7471. lodash2.uniqueId = uniqueId;
  7472. lodash2.upperCase = upperCase;
  7473. lodash2.upperFirst = upperFirst;
  7474. lodash2.each = forEach2;
  7475. lodash2.eachRight = forEachRight;
  7476. lodash2.first = head;
  7477. mixin(lodash2, function() {
  7478. var source = {};
  7479. baseForOwn(lodash2, function(func, methodName) {
  7480. if (!hasOwnProperty2.call(lodash2.prototype, methodName)) {
  7481. source[methodName] = func;
  7482. }
  7483. });
  7484. return source;
  7485. }(), { "chain": false });
  7486. lodash2.VERSION = VERSION2;
  7487. arrayEach(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(methodName) {
  7488. lodash2[methodName].placeholder = lodash2;
  7489. });
  7490. arrayEach(["drop", "take"], function(methodName, index2) {
  7491. LazyWrapper.prototype[methodName] = function(n2) {
  7492. n2 = n2 === undefined$1 ? 1 : nativeMax(toInteger(n2), 0);
  7493. var result3 = this.__filtered__ && !index2 ? new LazyWrapper(this) : this.clone();
  7494. if (result3.__filtered__) {
  7495. result3.__takeCount__ = nativeMin(n2, result3.__takeCount__);
  7496. } else {
  7497. result3.__views__.push({
  7498. "size": nativeMin(n2, MAX_ARRAY_LENGTH),
  7499. "type": methodName + (result3.__dir__ < 0 ? "Right" : "")
  7500. });
  7501. }
  7502. return result3;
  7503. };
  7504. LazyWrapper.prototype[methodName + "Right"] = function(n2) {
  7505. return this.reverse()[methodName](n2).reverse();
  7506. };
  7507. });
  7508. arrayEach(["filter", "map", "takeWhile"], function(methodName, index2) {
  7509. var type = index2 + 1, isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
  7510. LazyWrapper.prototype[methodName] = function(iteratee2) {
  7511. var result3 = this.clone();
  7512. result3.__iteratees__.push({
  7513. "iteratee": getIteratee(iteratee2, 3),
  7514. "type": type
  7515. });
  7516. result3.__filtered__ = result3.__filtered__ || isFilter;
  7517. return result3;
  7518. };
  7519. });
  7520. arrayEach(["head", "last"], function(methodName, index2) {
  7521. var takeName = "take" + (index2 ? "Right" : "");
  7522. LazyWrapper.prototype[methodName] = function() {
  7523. return this[takeName](1).value()[0];
  7524. };
  7525. });
  7526. arrayEach(["initial", "tail"], function(methodName, index2) {
  7527. var dropName = "drop" + (index2 ? "" : "Right");
  7528. LazyWrapper.prototype[methodName] = function() {
  7529. return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
  7530. };
  7531. });
  7532. LazyWrapper.prototype.compact = function() {
  7533. return this.filter(identity);
  7534. };
  7535. LazyWrapper.prototype.find = function(predicate) {
  7536. return this.filter(predicate).head();
  7537. };
  7538. LazyWrapper.prototype.findLast = function(predicate) {
  7539. return this.reverse().find(predicate);
  7540. };
  7541. LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
  7542. if (typeof path == "function") {
  7543. return new LazyWrapper(this);
  7544. }
  7545. return this.map(function(value) {
  7546. return baseInvoke(value, path, args);
  7547. });
  7548. });
  7549. LazyWrapper.prototype.reject = function(predicate) {
  7550. return this.filter(negate(getIteratee(predicate)));
  7551. };
  7552. LazyWrapper.prototype.slice = function(start, end) {
  7553. start = toInteger(start);
  7554. var result3 = this;
  7555. if (result3.__filtered__ && (start > 0 || end < 0)) {
  7556. return new LazyWrapper(result3);
  7557. }
  7558. if (start < 0) {
  7559. result3 = result3.takeRight(-start);
  7560. } else if (start) {
  7561. result3 = result3.drop(start);
  7562. }
  7563. if (end !== undefined$1) {
  7564. end = toInteger(end);
  7565. result3 = end < 0 ? result3.dropRight(-end) : result3.take(end - start);
  7566. }
  7567. return result3;
  7568. };
  7569. LazyWrapper.prototype.takeRightWhile = function(predicate) {
  7570. return this.reverse().takeWhile(predicate).reverse();
  7571. };
  7572. LazyWrapper.prototype.toArray = function() {
  7573. return this.take(MAX_ARRAY_LENGTH);
  7574. };
  7575. baseForOwn(LazyWrapper.prototype, function(func, methodName) {
  7576. var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName), isTaker = /^(?:head|last)$/.test(methodName), lodashFunc = lodash2[isTaker ? "take" + (methodName == "last" ? "Right" : "") : methodName], retUnwrapped = isTaker || /^find/.test(methodName);
  7577. if (!lodashFunc) {
  7578. return;
  7579. }
  7580. lodash2.prototype[methodName] = function() {
  7581. var value = this.__wrapped__, args = isTaker ? [1] : arguments, isLazy = value instanceof LazyWrapper, iteratee2 = args[0], useLazy = isLazy || isArray2(value);
  7582. var interceptor = function(value2) {
  7583. var result4 = lodashFunc.apply(lodash2, arrayPush([value2], args));
  7584. return isTaker && chainAll ? result4[0] : result4;
  7585. };
  7586. if (useLazy && checkIteratee && typeof iteratee2 == "function" && iteratee2.length != 1) {
  7587. isLazy = useLazy = false;
  7588. }
  7589. var chainAll = this.__chain__, isHybrid = !!this.__actions__.length, isUnwrapped = retUnwrapped && !chainAll, onlyLazy = isLazy && !isHybrid;
  7590. if (!retUnwrapped && useLazy) {
  7591. value = onlyLazy ? value : new LazyWrapper(this);
  7592. var result3 = func.apply(value, args);
  7593. result3.__actions__.push({ "func": thru, "args": [interceptor], "thisArg": undefined$1 });
  7594. return new LodashWrapper(result3, chainAll);
  7595. }
  7596. if (isUnwrapped && onlyLazy) {
  7597. return func.apply(this, args);
  7598. }
  7599. result3 = this.thru(interceptor);
  7600. return isUnwrapped ? isTaker ? result3.value()[0] : result3.value() : result3;
  7601. };
  7602. });
  7603. arrayEach(["pop", "push", "shift", "sort", "splice", "unshift"], function(methodName) {
  7604. var func = arrayProto[methodName], chainName = /^(?:push|sort|unshift)$/.test(methodName) ? "tap" : "thru", retUnwrapped = /^(?:pop|shift)$/.test(methodName);
  7605. lodash2.prototype[methodName] = function() {
  7606. var args = arguments;
  7607. if (retUnwrapped && !this.__chain__) {
  7608. var value = this.value();
  7609. return func.apply(isArray2(value) ? value : [], args);
  7610. }
  7611. return this[chainName](function(value2) {
  7612. return func.apply(isArray2(value2) ? value2 : [], args);
  7613. });
  7614. };
  7615. });
  7616. baseForOwn(LazyWrapper.prototype, function(func, methodName) {
  7617. var lodashFunc = lodash2[methodName];
  7618. if (lodashFunc) {
  7619. var key = lodashFunc.name + "";
  7620. if (!hasOwnProperty2.call(realNames, key)) {
  7621. realNames[key] = [];
  7622. }
  7623. realNames[key].push({ "name": methodName, "func": lodashFunc });
  7624. }
  7625. });
  7626. realNames[createHybrid(undefined$1, WRAP_BIND_KEY_FLAG).name] = [{
  7627. "name": "wrapper",
  7628. "func": undefined$1
  7629. }];
  7630. LazyWrapper.prototype.clone = lazyClone;
  7631. LazyWrapper.prototype.reverse = lazyReverse;
  7632. LazyWrapper.prototype.value = lazyValue;
  7633. lodash2.prototype.at = wrapperAt;
  7634. lodash2.prototype.chain = wrapperChain;
  7635. lodash2.prototype.commit = wrapperCommit;
  7636. lodash2.prototype.next = wrapperNext;
  7637. lodash2.prototype.plant = wrapperPlant;
  7638. lodash2.prototype.reverse = wrapperReverse;
  7639. lodash2.prototype.toJSON = lodash2.prototype.valueOf = lodash2.prototype.value = wrapperValue;
  7640. lodash2.prototype.first = lodash2.prototype.head;
  7641. if (symIterator) {
  7642. lodash2.prototype[symIterator] = wrapperToIterator;
  7643. }
  7644. return lodash2;
  7645. };
  7646. var _2 = runInContext();
  7647. if (freeModule) {
  7648. (freeModule.exports = _2)._ = _2;
  7649. freeExports._ = _2;
  7650. } else {
  7651. root._ = _2;
  7652. }
  7653. }).call(commonjsGlobal);
  7654. })(lodash, lodash.exports);
  7655. var lodashExports = lodash.exports;
  7656. const _$1 = /* @__PURE__ */ getDefaultExportFromCjs(lodashExports);
  7657. /*!
  7658. * @intlify/shared v9.1.9
  7659. * (c) 2021 kazuya kawaguchi
  7660. * Released under the MIT License.
  7661. */
  7662. const inBrowser = typeof window !== "undefined";
  7663. let mark;
  7664. let measure;
  7665. {
  7666. const perf2 = inBrowser && window.performance;
  7667. if (perf2 && perf2.mark && perf2.measure && perf2.clearMarks && perf2.clearMeasures) {
  7668. mark = (tag) => perf2.mark(tag);
  7669. measure = (name2, startTag, endTag) => {
  7670. perf2.measure(name2, startTag, endTag);
  7671. perf2.clearMarks(startTag);
  7672. perf2.clearMarks(endTag);
  7673. };
  7674. }
  7675. }
  7676. const RE_ARGS = /\{([0-9a-zA-Z]+)\}/g;
  7677. function format(message, ...args) {
  7678. if (args.length === 1 && isObject$5(args[0])) {
  7679. args = args[0];
  7680. }
  7681. if (!args || !args.hasOwnProperty) {
  7682. args = {};
  7683. }
  7684. return message.replace(RE_ARGS, (match, identifier) => {
  7685. return args.hasOwnProperty(identifier) ? args[identifier] : "";
  7686. });
  7687. }
  7688. const hasSymbol = typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol";
  7689. const makeSymbol = (name2) => hasSymbol ? Symbol(name2) : name2;
  7690. const generateFormatCacheKey = (locale, key, source) => friendlyJSONstringify({ l: locale, k: key, s: source });
  7691. const friendlyJSONstringify = (json) => JSON.stringify(json).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u0027/g, "\\u0027");
  7692. const isNumber$1 = (val) => typeof val === "number" && isFinite(val);
  7693. const isDate$1 = (val) => toTypeString(val) === "[object Date]";
  7694. const isRegExp$1 = (val) => toTypeString(val) === "[object RegExp]";
  7695. const isEmptyObject = (val) => isPlainObject$1(val) && Object.keys(val).length === 0;
  7696. function warn(msg, err) {
  7697. if (typeof console !== "undefined") {
  7698. console.warn(`[intlify] ` + msg);
  7699. if (err) {
  7700. console.warn(err.stack);
  7701. }
  7702. }
  7703. }
  7704. const assign = Object.assign;
  7705. let _globalThis;
  7706. const getGlobalThis = () => {
  7707. return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
  7708. };
  7709. function escapeHtml(rawText) {
  7710. return rawText.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;");
  7711. }
  7712. const hasOwnProperty$3 = Object.prototype.hasOwnProperty;
  7713. function hasOwn$2(obj, key) {
  7714. return hasOwnProperty$3.call(obj, key);
  7715. }
  7716. const isArray$2 = Array.isArray;
  7717. const isFunction$1 = (val) => typeof val === "function";
  7718. const isString$1 = (val) => typeof val === "string";
  7719. const isBoolean$1 = (val) => typeof val === "boolean";
  7720. const isObject$5 = (val) => (
  7721. // eslint-disable-line
  7722. val !== null && typeof val === "object"
  7723. );
  7724. const objectToString = Object.prototype.toString;
  7725. const toTypeString = (value) => objectToString.call(value);
  7726. const isPlainObject$1 = (val) => toTypeString(val) === "[object Object]";
  7727. const toDisplayString = (val) => {
  7728. return val == null ? "" : isArray$2(val) || isPlainObject$1(val) && val.toString === objectToString ? JSON.stringify(val, null, 2) : String(val);
  7729. };
  7730. const RANGE = 2;
  7731. function generateCodeFrame(source, start = 0, end = source.length) {
  7732. const lines = source.split(/\r?\n/);
  7733. let count = 0;
  7734. const res = [];
  7735. for (let i2 = 0; i2 < lines.length; i2++) {
  7736. count += lines[i2].length + 1;
  7737. if (count >= start) {
  7738. for (let j2 = i2 - RANGE; j2 <= i2 + RANGE || end > count; j2++) {
  7739. if (j2 < 0 || j2 >= lines.length)
  7740. continue;
  7741. const line = j2 + 1;
  7742. res.push(`${line}${" ".repeat(3 - String(line).length)}| ${lines[j2]}`);
  7743. const lineLength = lines[j2].length;
  7744. if (j2 === i2) {
  7745. const pad = start - (count - lineLength) + 1;
  7746. const length = Math.max(1, end > count ? lineLength - pad : end - start);
  7747. res.push(` | ` + " ".repeat(pad) + "^".repeat(length));
  7748. } else if (j2 > i2) {
  7749. if (end > count) {
  7750. const length = Math.max(Math.min(end - count, lineLength), 1);
  7751. res.push(` | ` + "^".repeat(length));
  7752. }
  7753. count += lineLength + 1;
  7754. }
  7755. }
  7756. break;
  7757. }
  7758. }
  7759. return res.join("\n");
  7760. }
  7761. function createEmitter() {
  7762. const events = /* @__PURE__ */ new Map();
  7763. const emitter = {
  7764. events,
  7765. on(event, handler) {
  7766. const handlers = events.get(event);
  7767. const added = handlers && handlers.push(handler);
  7768. if (!added) {
  7769. events.set(event, [handler]);
  7770. }
  7771. },
  7772. off(event, handler) {
  7773. const handlers = events.get(event);
  7774. if (handlers) {
  7775. handlers.splice(handlers.indexOf(handler) >>> 0, 1);
  7776. }
  7777. },
  7778. emit(event, payload) {
  7779. (events.get(event) || []).slice().map((handler) => handler(payload));
  7780. (events.get("*") || []).slice().map((handler) => handler(event, payload));
  7781. }
  7782. };
  7783. return emitter;
  7784. }
  7785. /*!
  7786. * @intlify/message-resolver v9.1.9
  7787. * (c) 2021 kazuya kawaguchi
  7788. * Released under the MIT License.
  7789. */
  7790. const hasOwnProperty$2 = Object.prototype.hasOwnProperty;
  7791. function hasOwn$1(obj, key) {
  7792. return hasOwnProperty$2.call(obj, key);
  7793. }
  7794. const isObject$4 = (val) => (
  7795. // eslint-disable-line
  7796. val !== null && typeof val === "object"
  7797. );
  7798. const pathStateMachine = [];
  7799. pathStateMachine[
  7800. 0
  7801. /* BEFORE_PATH */
  7802. ] = {
  7803. [
  7804. "w"
  7805. /* WORKSPACE */
  7806. ]: [
  7807. 0
  7808. /* BEFORE_PATH */
  7809. ],
  7810. [
  7811. "i"
  7812. /* IDENT */
  7813. ]: [
  7814. 3,
  7815. 0
  7816. /* APPEND */
  7817. ],
  7818. [
  7819. "["
  7820. /* LEFT_BRACKET */
  7821. ]: [
  7822. 4
  7823. /* IN_SUB_PATH */
  7824. ],
  7825. [
  7826. "o"
  7827. /* END_OF_FAIL */
  7828. ]: [
  7829. 7
  7830. /* AFTER_PATH */
  7831. ]
  7832. };
  7833. pathStateMachine[
  7834. 1
  7835. /* IN_PATH */
  7836. ] = {
  7837. [
  7838. "w"
  7839. /* WORKSPACE */
  7840. ]: [
  7841. 1
  7842. /* IN_PATH */
  7843. ],
  7844. [
  7845. "."
  7846. /* DOT */
  7847. ]: [
  7848. 2
  7849. /* BEFORE_IDENT */
  7850. ],
  7851. [
  7852. "["
  7853. /* LEFT_BRACKET */
  7854. ]: [
  7855. 4
  7856. /* IN_SUB_PATH */
  7857. ],
  7858. [
  7859. "o"
  7860. /* END_OF_FAIL */
  7861. ]: [
  7862. 7
  7863. /* AFTER_PATH */
  7864. ]
  7865. };
  7866. pathStateMachine[
  7867. 2
  7868. /* BEFORE_IDENT */
  7869. ] = {
  7870. [
  7871. "w"
  7872. /* WORKSPACE */
  7873. ]: [
  7874. 2
  7875. /* BEFORE_IDENT */
  7876. ],
  7877. [
  7878. "i"
  7879. /* IDENT */
  7880. ]: [
  7881. 3,
  7882. 0
  7883. /* APPEND */
  7884. ],
  7885. [
  7886. "0"
  7887. /* ZERO */
  7888. ]: [
  7889. 3,
  7890. 0
  7891. /* APPEND */
  7892. ]
  7893. };
  7894. pathStateMachine[
  7895. 3
  7896. /* IN_IDENT */
  7897. ] = {
  7898. [
  7899. "i"
  7900. /* IDENT */
  7901. ]: [
  7902. 3,
  7903. 0
  7904. /* APPEND */
  7905. ],
  7906. [
  7907. "0"
  7908. /* ZERO */
  7909. ]: [
  7910. 3,
  7911. 0
  7912. /* APPEND */
  7913. ],
  7914. [
  7915. "w"
  7916. /* WORKSPACE */
  7917. ]: [
  7918. 1,
  7919. 1
  7920. /* PUSH */
  7921. ],
  7922. [
  7923. "."
  7924. /* DOT */
  7925. ]: [
  7926. 2,
  7927. 1
  7928. /* PUSH */
  7929. ],
  7930. [
  7931. "["
  7932. /* LEFT_BRACKET */
  7933. ]: [
  7934. 4,
  7935. 1
  7936. /* PUSH */
  7937. ],
  7938. [
  7939. "o"
  7940. /* END_OF_FAIL */
  7941. ]: [
  7942. 7,
  7943. 1
  7944. /* PUSH */
  7945. ]
  7946. };
  7947. pathStateMachine[
  7948. 4
  7949. /* IN_SUB_PATH */
  7950. ] = {
  7951. [
  7952. "'"
  7953. /* SINGLE_QUOTE */
  7954. ]: [
  7955. 5,
  7956. 0
  7957. /* APPEND */
  7958. ],
  7959. [
  7960. '"'
  7961. /* DOUBLE_QUOTE */
  7962. ]: [
  7963. 6,
  7964. 0
  7965. /* APPEND */
  7966. ],
  7967. [
  7968. "["
  7969. /* LEFT_BRACKET */
  7970. ]: [
  7971. 4,
  7972. 2
  7973. /* INC_SUB_PATH_DEPTH */
  7974. ],
  7975. [
  7976. "]"
  7977. /* RIGHT_BRACKET */
  7978. ]: [
  7979. 1,
  7980. 3
  7981. /* PUSH_SUB_PATH */
  7982. ],
  7983. [
  7984. "o"
  7985. /* END_OF_FAIL */
  7986. ]: 8,
  7987. [
  7988. "l"
  7989. /* ELSE */
  7990. ]: [
  7991. 4,
  7992. 0
  7993. /* APPEND */
  7994. ]
  7995. };
  7996. pathStateMachine[
  7997. 5
  7998. /* IN_SINGLE_QUOTE */
  7999. ] = {
  8000. [
  8001. "'"
  8002. /* SINGLE_QUOTE */
  8003. ]: [
  8004. 4,
  8005. 0
  8006. /* APPEND */
  8007. ],
  8008. [
  8009. "o"
  8010. /* END_OF_FAIL */
  8011. ]: 8,
  8012. [
  8013. "l"
  8014. /* ELSE */
  8015. ]: [
  8016. 5,
  8017. 0
  8018. /* APPEND */
  8019. ]
  8020. };
  8021. pathStateMachine[
  8022. 6
  8023. /* IN_DOUBLE_QUOTE */
  8024. ] = {
  8025. [
  8026. '"'
  8027. /* DOUBLE_QUOTE */
  8028. ]: [
  8029. 4,
  8030. 0
  8031. /* APPEND */
  8032. ],
  8033. [
  8034. "o"
  8035. /* END_OF_FAIL */
  8036. ]: 8,
  8037. [
  8038. "l"
  8039. /* ELSE */
  8040. ]: [
  8041. 6,
  8042. 0
  8043. /* APPEND */
  8044. ]
  8045. };
  8046. const literalValueRE = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
  8047. function isLiteral(exp) {
  8048. return literalValueRE.test(exp);
  8049. }
  8050. function stripQuotes(str) {
  8051. const a2 = str.charCodeAt(0);
  8052. const b2 = str.charCodeAt(str.length - 1);
  8053. return a2 === b2 && (a2 === 34 || a2 === 39) ? str.slice(1, -1) : str;
  8054. }
  8055. function getPathCharType(ch) {
  8056. if (ch === void 0 || ch === null) {
  8057. return "o";
  8058. }
  8059. const code2 = ch.charCodeAt(0);
  8060. switch (code2) {
  8061. case 91:
  8062. case 93:
  8063. case 46:
  8064. case 34:
  8065. case 39:
  8066. return ch;
  8067. case 95:
  8068. case 36:
  8069. case 45:
  8070. return "i";
  8071. case 9:
  8072. case 10:
  8073. case 13:
  8074. case 160:
  8075. case 65279:
  8076. case 8232:
  8077. case 8233:
  8078. return "w";
  8079. }
  8080. return "i";
  8081. }
  8082. function formatSubPath(path) {
  8083. const trimmed = path.trim();
  8084. if (path.charAt(0) === "0" && isNaN(parseInt(path))) {
  8085. return false;
  8086. }
  8087. return isLiteral(trimmed) ? stripQuotes(trimmed) : "*" + trimmed;
  8088. }
  8089. function parse$2(path) {
  8090. const keys = [];
  8091. let index2 = -1;
  8092. let mode = 0;
  8093. let subPathDepth = 0;
  8094. let c2;
  8095. let key;
  8096. let newChar;
  8097. let type;
  8098. let transition;
  8099. let action;
  8100. let typeMap;
  8101. const actions = [];
  8102. actions[
  8103. 0
  8104. /* APPEND */
  8105. ] = () => {
  8106. if (key === void 0) {
  8107. key = newChar;
  8108. } else {
  8109. key += newChar;
  8110. }
  8111. };
  8112. actions[
  8113. 1
  8114. /* PUSH */
  8115. ] = () => {
  8116. if (key !== void 0) {
  8117. keys.push(key);
  8118. key = void 0;
  8119. }
  8120. };
  8121. actions[
  8122. 2
  8123. /* INC_SUB_PATH_DEPTH */
  8124. ] = () => {
  8125. actions[
  8126. 0
  8127. /* APPEND */
  8128. ]();
  8129. subPathDepth++;
  8130. };
  8131. actions[
  8132. 3
  8133. /* PUSH_SUB_PATH */
  8134. ] = () => {
  8135. if (subPathDepth > 0) {
  8136. subPathDepth--;
  8137. mode = 4;
  8138. actions[
  8139. 0
  8140. /* APPEND */
  8141. ]();
  8142. } else {
  8143. subPathDepth = 0;
  8144. if (key === void 0) {
  8145. return false;
  8146. }
  8147. key = formatSubPath(key);
  8148. if (key === false) {
  8149. return false;
  8150. } else {
  8151. actions[
  8152. 1
  8153. /* PUSH */
  8154. ]();
  8155. }
  8156. }
  8157. };
  8158. function maybeUnescapeQuote() {
  8159. const nextChar = path[index2 + 1];
  8160. if (mode === 5 && nextChar === "'" || mode === 6 && nextChar === '"') {
  8161. index2++;
  8162. newChar = "\\" + nextChar;
  8163. actions[
  8164. 0
  8165. /* APPEND */
  8166. ]();
  8167. return true;
  8168. }
  8169. }
  8170. while (mode !== null) {
  8171. index2++;
  8172. c2 = path[index2];
  8173. if (c2 === "\\" && maybeUnescapeQuote()) {
  8174. continue;
  8175. }
  8176. type = getPathCharType(c2);
  8177. typeMap = pathStateMachine[mode];
  8178. transition = typeMap[type] || typeMap[
  8179. "l"
  8180. /* ELSE */
  8181. ] || 8;
  8182. if (transition === 8) {
  8183. return;
  8184. }
  8185. mode = transition[0];
  8186. if (transition[1] !== void 0) {
  8187. action = actions[transition[1]];
  8188. if (action) {
  8189. newChar = c2;
  8190. if (action() === false) {
  8191. return;
  8192. }
  8193. }
  8194. }
  8195. if (mode === 7) {
  8196. return keys;
  8197. }
  8198. }
  8199. }
  8200. const cache = /* @__PURE__ */ new Map();
  8201. function resolveValue(obj, path) {
  8202. if (!isObject$4(obj)) {
  8203. return null;
  8204. }
  8205. let hit = cache.get(path);
  8206. if (!hit) {
  8207. hit = parse$2(path);
  8208. if (hit) {
  8209. cache.set(path, hit);
  8210. }
  8211. }
  8212. if (!hit) {
  8213. return null;
  8214. }
  8215. const len = hit.length;
  8216. let last = obj;
  8217. let i2 = 0;
  8218. while (i2 < len) {
  8219. const val = last[hit[i2]];
  8220. if (val === void 0) {
  8221. return null;
  8222. }
  8223. last = val;
  8224. i2++;
  8225. }
  8226. return last;
  8227. }
  8228. function handleFlatJson(obj) {
  8229. if (!isObject$4(obj)) {
  8230. return obj;
  8231. }
  8232. for (const key in obj) {
  8233. if (!hasOwn$1(obj, key)) {
  8234. continue;
  8235. }
  8236. if (!key.includes(
  8237. "."
  8238. /* DOT */
  8239. )) {
  8240. if (isObject$4(obj[key])) {
  8241. handleFlatJson(obj[key]);
  8242. }
  8243. } else {
  8244. const subKeys = key.split(
  8245. "."
  8246. /* DOT */
  8247. );
  8248. const lastIndex = subKeys.length - 1;
  8249. let currentObj = obj;
  8250. for (let i2 = 0; i2 < lastIndex; i2++) {
  8251. if (!(subKeys[i2] in currentObj)) {
  8252. currentObj[subKeys[i2]] = {};
  8253. }
  8254. currentObj = currentObj[subKeys[i2]];
  8255. }
  8256. currentObj[subKeys[lastIndex]] = obj[key];
  8257. delete obj[key];
  8258. if (isObject$4(currentObj[subKeys[lastIndex]])) {
  8259. handleFlatJson(currentObj[subKeys[lastIndex]]);
  8260. }
  8261. }
  8262. }
  8263. return obj;
  8264. }
  8265. /*!
  8266. * @intlify/runtime v9.1.9
  8267. * (c) 2021 kazuya kawaguchi
  8268. * Released under the MIT License.
  8269. */
  8270. const DEFAULT_MODIFIER = (str) => str;
  8271. const DEFAULT_MESSAGE = (ctx) => "";
  8272. const DEFAULT_MESSAGE_DATA_TYPE = "text";
  8273. const DEFAULT_NORMALIZE = (values) => values.length === 0 ? "" : values.join("");
  8274. const DEFAULT_INTERPOLATE = toDisplayString;
  8275. function pluralDefault(choice, choicesLength) {
  8276. choice = Math.abs(choice);
  8277. if (choicesLength === 2) {
  8278. return choice ? choice > 1 ? 1 : 0 : 1;
  8279. }
  8280. return choice ? Math.min(choice, 2) : 0;
  8281. }
  8282. function getPluralIndex(options2) {
  8283. const index2 = isNumber$1(options2.pluralIndex) ? options2.pluralIndex : -1;
  8284. return options2.named && (isNumber$1(options2.named.count) || isNumber$1(options2.named.n)) ? isNumber$1(options2.named.count) ? options2.named.count : isNumber$1(options2.named.n) ? options2.named.n : index2 : index2;
  8285. }
  8286. function normalizeNamed(pluralIndex, props) {
  8287. if (!props.count) {
  8288. props.count = pluralIndex;
  8289. }
  8290. if (!props.n) {
  8291. props.n = pluralIndex;
  8292. }
  8293. }
  8294. function createMessageContext(options2 = {}) {
  8295. const locale = options2.locale;
  8296. const pluralIndex = getPluralIndex(options2);
  8297. const pluralRule = isObject$5(options2.pluralRules) && isString$1(locale) && isFunction$1(options2.pluralRules[locale]) ? options2.pluralRules[locale] : pluralDefault;
  8298. const orgPluralRule = isObject$5(options2.pluralRules) && isString$1(locale) && isFunction$1(options2.pluralRules[locale]) ? pluralDefault : void 0;
  8299. const plural = (messages2) => messages2[pluralRule(pluralIndex, messages2.length, orgPluralRule)];
  8300. const _list = options2.list || [];
  8301. const list = (index2) => _list[index2];
  8302. const _named = options2.named || {};
  8303. isNumber$1(options2.pluralIndex) && normalizeNamed(pluralIndex, _named);
  8304. const named = (key) => _named[key];
  8305. function message(key) {
  8306. const msg = isFunction$1(options2.messages) ? options2.messages(key) : isObject$5(options2.messages) ? options2.messages[key] : false;
  8307. return !msg ? options2.parent ? options2.parent.message(key) : DEFAULT_MESSAGE : msg;
  8308. }
  8309. const _modifier = (name2) => options2.modifiers ? options2.modifiers[name2] : DEFAULT_MODIFIER;
  8310. const normalize = isPlainObject$1(options2.processor) && isFunction$1(options2.processor.normalize) ? options2.processor.normalize : DEFAULT_NORMALIZE;
  8311. const interpolate = isPlainObject$1(options2.processor) && isFunction$1(options2.processor.interpolate) ? options2.processor.interpolate : DEFAULT_INTERPOLATE;
  8312. const type = isPlainObject$1(options2.processor) && isString$1(options2.processor.type) ? options2.processor.type : DEFAULT_MESSAGE_DATA_TYPE;
  8313. const ctx = {
  8314. [
  8315. "list"
  8316. /* LIST */
  8317. ]: list,
  8318. [
  8319. "named"
  8320. /* NAMED */
  8321. ]: named,
  8322. [
  8323. "plural"
  8324. /* PLURAL */
  8325. ]: plural,
  8326. [
  8327. "linked"
  8328. /* LINKED */
  8329. ]: (key, modifier) => {
  8330. const msg = message(key)(ctx);
  8331. return isString$1(modifier) ? _modifier(modifier)(msg) : msg;
  8332. },
  8333. [
  8334. "message"
  8335. /* MESSAGE */
  8336. ]: message,
  8337. [
  8338. "type"
  8339. /* TYPE */
  8340. ]: type,
  8341. [
  8342. "interpolate"
  8343. /* INTERPOLATE */
  8344. ]: interpolate,
  8345. [
  8346. "normalize"
  8347. /* NORMALIZE */
  8348. ]: normalize
  8349. };
  8350. return ctx;
  8351. }
  8352. /*!
  8353. * @intlify/message-compiler v9.1.9
  8354. * (c) 2021 kazuya kawaguchi
  8355. * Released under the MIT License.
  8356. */
  8357. const errorMessages$2 = {
  8358. // tokenizer error messages
  8359. [
  8360. 0
  8361. /* EXPECTED_TOKEN */
  8362. ]: `Expected token: '{0}'`,
  8363. [
  8364. 1
  8365. /* INVALID_TOKEN_IN_PLACEHOLDER */
  8366. ]: `Invalid token in placeholder: '{0}'`,
  8367. [
  8368. 2
  8369. /* UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER */
  8370. ]: `Unterminated single quote in placeholder`,
  8371. [
  8372. 3
  8373. /* UNKNOWN_ESCAPE_SEQUENCE */
  8374. ]: `Unknown escape sequence: \\{0}`,
  8375. [
  8376. 4
  8377. /* INVALID_UNICODE_ESCAPE_SEQUENCE */
  8378. ]: `Invalid unicode escape sequence: {0}`,
  8379. [
  8380. 5
  8381. /* UNBALANCED_CLOSING_BRACE */
  8382. ]: `Unbalanced closing brace`,
  8383. [
  8384. 6
  8385. /* UNTERMINATED_CLOSING_BRACE */
  8386. ]: `Unterminated closing brace`,
  8387. [
  8388. 7
  8389. /* EMPTY_PLACEHOLDER */
  8390. ]: `Empty placeholder`,
  8391. [
  8392. 8
  8393. /* NOT_ALLOW_NEST_PLACEHOLDER */
  8394. ]: `Not allowed nest placeholder`,
  8395. [
  8396. 9
  8397. /* INVALID_LINKED_FORMAT */
  8398. ]: `Invalid linked format`,
  8399. // parser error messages
  8400. [
  8401. 10
  8402. /* MUST_HAVE_MESSAGES_IN_PLURAL */
  8403. ]: `Plural must have messages`,
  8404. [
  8405. 11
  8406. /* UNEXPECTED_EMPTY_LINKED_MODIFIER */
  8407. ]: `Unexpected empty linked modifier`,
  8408. [
  8409. 12
  8410. /* UNEXPECTED_EMPTY_LINKED_KEY */
  8411. ]: `Unexpected empty linked key`,
  8412. [
  8413. 13
  8414. /* UNEXPECTED_LEXICAL_ANALYSIS */
  8415. ]: `Unexpected lexical analysis in token: '{0}'`
  8416. };
  8417. function createCompileError(code2, loc, options2 = {}) {
  8418. const { domain, messages: messages2, args } = options2;
  8419. const msg = format((messages2 || errorMessages$2)[code2] || "", ...args || []);
  8420. const error2 = new SyntaxError(String(msg));
  8421. error2.code = code2;
  8422. if (loc) {
  8423. error2.location = loc;
  8424. }
  8425. error2.domain = domain;
  8426. return error2;
  8427. }
  8428. /*!
  8429. * @intlify/devtools-if v9.1.9
  8430. * (c) 2021 kazuya kawaguchi
  8431. * Released under the MIT License.
  8432. */
  8433. const IntlifyDevToolsHooks = {
  8434. I18nInit: "i18n:init",
  8435. FunctionTranslate: "function:translate"
  8436. };
  8437. /*!
  8438. * @intlify/core-base v9.1.9
  8439. * (c) 2021 kazuya kawaguchi
  8440. * Released under the MIT License.
  8441. */
  8442. let devtools = null;
  8443. function setDevToolsHook(hook) {
  8444. devtools = hook;
  8445. }
  8446. function initI18nDevTools(i18n2, version, meta) {
  8447. devtools && devtools.emit(IntlifyDevToolsHooks.I18nInit, {
  8448. timestamp: Date.now(),
  8449. i18n: i18n2,
  8450. version,
  8451. meta
  8452. });
  8453. }
  8454. const translateDevTools = /* @__PURE__ */ createDevToolsHook(IntlifyDevToolsHooks.FunctionTranslate);
  8455. function createDevToolsHook(hook) {
  8456. return (payloads) => devtools && devtools.emit(hook, payloads);
  8457. }
  8458. const warnMessages$1 = {
  8459. [
  8460. 0
  8461. /* NOT_FOUND_KEY */
  8462. ]: `Not found '{key}' key in '{locale}' locale messages.`,
  8463. [
  8464. 1
  8465. /* FALLBACK_TO_TRANSLATE */
  8466. ]: `Fall back to translate '{key}' key with '{target}' locale.`,
  8467. [
  8468. 2
  8469. /* CANNOT_FORMAT_NUMBER */
  8470. ]: `Cannot format a number value due to not supported Intl.NumberFormat.`,
  8471. [
  8472. 3
  8473. /* FALLBACK_TO_NUMBER_FORMAT */
  8474. ]: `Fall back to number format '{key}' key with '{target}' locale.`,
  8475. [
  8476. 4
  8477. /* CANNOT_FORMAT_DATE */
  8478. ]: `Cannot format a date value due to not supported Intl.DateTimeFormat.`,
  8479. [
  8480. 5
  8481. /* FALLBACK_TO_DATE_FORMAT */
  8482. ]: `Fall back to datetime format '{key}' key with '{target}' locale.`
  8483. };
  8484. function getWarnMessage$1(code2, ...args) {
  8485. return format(warnMessages$1[code2], ...args);
  8486. }
  8487. const VERSION$2 = "9.1.9";
  8488. const NOT_REOSLVED = -1;
  8489. const MISSING_RESOLVE_VALUE = "";
  8490. function getDefaultLinkedModifiers() {
  8491. return {
  8492. upper: (val) => isString$1(val) ? val.toUpperCase() : val,
  8493. lower: (val) => isString$1(val) ? val.toLowerCase() : val,
  8494. // prettier-ignore
  8495. capitalize: (val) => isString$1(val) ? `${val.charAt(0).toLocaleUpperCase()}${val.substr(1)}` : val
  8496. };
  8497. }
  8498. let _compiler;
  8499. let _additionalMeta = null;
  8500. const setAdditionalMeta = (meta) => {
  8501. _additionalMeta = meta;
  8502. };
  8503. const getAdditionalMeta = () => _additionalMeta;
  8504. let _cid = 0;
  8505. function createCoreContext(options2 = {}) {
  8506. const version = isString$1(options2.version) ? options2.version : VERSION$2;
  8507. const locale = isString$1(options2.locale) ? options2.locale : "en-US";
  8508. const fallbackLocale = isArray$2(options2.fallbackLocale) || isPlainObject$1(options2.fallbackLocale) || isString$1(options2.fallbackLocale) || options2.fallbackLocale === false ? options2.fallbackLocale : locale;
  8509. const messages2 = isPlainObject$1(options2.messages) ? options2.messages : { [locale]: {} };
  8510. const datetimeFormats = isPlainObject$1(options2.datetimeFormats) ? options2.datetimeFormats : { [locale]: {} };
  8511. const numberFormats = isPlainObject$1(options2.numberFormats) ? options2.numberFormats : { [locale]: {} };
  8512. const modifiers = assign({}, options2.modifiers || {}, getDefaultLinkedModifiers());
  8513. const pluralRules = options2.pluralRules || {};
  8514. const missing = isFunction$1(options2.missing) ? options2.missing : null;
  8515. const missingWarn = isBoolean$1(options2.missingWarn) || isRegExp$1(options2.missingWarn) ? options2.missingWarn : true;
  8516. const fallbackWarn = isBoolean$1(options2.fallbackWarn) || isRegExp$1(options2.fallbackWarn) ? options2.fallbackWarn : true;
  8517. const fallbackFormat = !!options2.fallbackFormat;
  8518. const unresolving = !!options2.unresolving;
  8519. const postTranslation = isFunction$1(options2.postTranslation) ? options2.postTranslation : null;
  8520. const processor = isPlainObject$1(options2.processor) ? options2.processor : null;
  8521. const warnHtmlMessage = isBoolean$1(options2.warnHtmlMessage) ? options2.warnHtmlMessage : true;
  8522. const escapeParameter = !!options2.escapeParameter;
  8523. const messageCompiler = isFunction$1(options2.messageCompiler) ? options2.messageCompiler : _compiler;
  8524. const onWarn = isFunction$1(options2.onWarn) ? options2.onWarn : warn;
  8525. const internalOptions = options2;
  8526. const __datetimeFormatters = isObject$5(internalOptions.__datetimeFormatters) ? internalOptions.__datetimeFormatters : /* @__PURE__ */ new Map();
  8527. const __numberFormatters = isObject$5(internalOptions.__numberFormatters) ? internalOptions.__numberFormatters : /* @__PURE__ */ new Map();
  8528. const __meta = isObject$5(internalOptions.__meta) ? internalOptions.__meta : {};
  8529. _cid++;
  8530. const context = {
  8531. version,
  8532. cid: _cid,
  8533. locale,
  8534. fallbackLocale,
  8535. messages: messages2,
  8536. datetimeFormats,
  8537. numberFormats,
  8538. modifiers,
  8539. pluralRules,
  8540. missing,
  8541. missingWarn,
  8542. fallbackWarn,
  8543. fallbackFormat,
  8544. unresolving,
  8545. postTranslation,
  8546. processor,
  8547. warnHtmlMessage,
  8548. escapeParameter,
  8549. messageCompiler,
  8550. onWarn,
  8551. __datetimeFormatters,
  8552. __numberFormatters,
  8553. __meta
  8554. };
  8555. {
  8556. context.__v_emitter = internalOptions.__v_emitter != null ? internalOptions.__v_emitter : void 0;
  8557. }
  8558. {
  8559. initI18nDevTools(context, version, __meta);
  8560. }
  8561. return context;
  8562. }
  8563. function isTranslateFallbackWarn(fallback, key) {
  8564. return fallback instanceof RegExp ? fallback.test(key) : fallback;
  8565. }
  8566. function isTranslateMissingWarn(missing, key) {
  8567. return missing instanceof RegExp ? missing.test(key) : missing;
  8568. }
  8569. function handleMissing(context, key, locale, missingWarn, type) {
  8570. const { missing, onWarn } = context;
  8571. {
  8572. const emitter = context.__v_emitter;
  8573. if (emitter) {
  8574. emitter.emit("missing", {
  8575. locale,
  8576. key,
  8577. type,
  8578. groupId: `${type}:${key}`
  8579. });
  8580. }
  8581. }
  8582. if (missing !== null) {
  8583. const ret = missing(context, locale, key, type);
  8584. return isString$1(ret) ? ret : key;
  8585. } else {
  8586. if (isTranslateMissingWarn(missingWarn, key)) {
  8587. onWarn(getWarnMessage$1(0, { key, locale }));
  8588. }
  8589. return key;
  8590. }
  8591. }
  8592. function getLocaleChain(ctx, fallback, start) {
  8593. const context = ctx;
  8594. if (!context.__localeChainCache) {
  8595. context.__localeChainCache = /* @__PURE__ */ new Map();
  8596. }
  8597. let chain = context.__localeChainCache.get(start);
  8598. if (!chain) {
  8599. chain = [];
  8600. let block = [start];
  8601. while (isArray$2(block)) {
  8602. block = appendBlockToChain(chain, block, fallback);
  8603. }
  8604. const defaults2 = isArray$2(fallback) ? fallback : isPlainObject$1(fallback) ? fallback["default"] ? fallback["default"] : null : fallback;
  8605. block = isString$1(defaults2) ? [defaults2] : defaults2;
  8606. if (isArray$2(block)) {
  8607. appendBlockToChain(chain, block, false);
  8608. }
  8609. context.__localeChainCache.set(start, chain);
  8610. }
  8611. return chain;
  8612. }
  8613. function appendBlockToChain(chain, block, blocks) {
  8614. let follow = true;
  8615. for (let i2 = 0; i2 < block.length && isBoolean$1(follow); i2++) {
  8616. const locale = block[i2];
  8617. if (isString$1(locale)) {
  8618. follow = appendLocaleToChain(chain, block[i2], blocks);
  8619. }
  8620. }
  8621. return follow;
  8622. }
  8623. function appendLocaleToChain(chain, locale, blocks) {
  8624. let follow;
  8625. const tokens = locale.split("-");
  8626. do {
  8627. const target = tokens.join("-");
  8628. follow = appendItemToChain(chain, target, blocks);
  8629. tokens.splice(-1, 1);
  8630. } while (tokens.length && follow === true);
  8631. return follow;
  8632. }
  8633. function appendItemToChain(chain, target, blocks) {
  8634. let follow = false;
  8635. if (!chain.includes(target)) {
  8636. follow = true;
  8637. if (target) {
  8638. follow = target[target.length - 1] !== "!";
  8639. const locale = target.replace(/!/g, "");
  8640. chain.push(locale);
  8641. if ((isArray$2(blocks) || isPlainObject$1(blocks)) && blocks[locale]) {
  8642. follow = blocks[locale];
  8643. }
  8644. }
  8645. }
  8646. return follow;
  8647. }
  8648. function updateFallbackLocale(ctx, locale, fallback) {
  8649. const context = ctx;
  8650. context.__localeChainCache = /* @__PURE__ */ new Map();
  8651. getLocaleChain(ctx, fallback, locale);
  8652. }
  8653. function createCoreError(code2) {
  8654. return createCompileError(code2, null, { messages: errorMessages$1 });
  8655. }
  8656. const errorMessages$1 = {
  8657. [
  8658. 14
  8659. /* INVALID_ARGUMENT */
  8660. ]: "Invalid arguments",
  8661. [
  8662. 15
  8663. /* INVALID_DATE_ARGUMENT */
  8664. ]: "The date provided is an invalid Date object.Make sure your Date represents a valid date.",
  8665. [
  8666. 16
  8667. /* INVALID_ISO_DATE_ARGUMENT */
  8668. ]: "The argument provided is not a valid ISO date string"
  8669. };
  8670. const NOOP_MESSAGE_FUNCTION = () => "";
  8671. const isMessageFunction = (val) => isFunction$1(val);
  8672. function translate(context, ...args) {
  8673. const { fallbackFormat, postTranslation, unresolving, fallbackLocale, messages: messages2 } = context;
  8674. const [key, options2] = parseTranslateArgs(...args);
  8675. const missingWarn = isBoolean$1(options2.missingWarn) ? options2.missingWarn : context.missingWarn;
  8676. const fallbackWarn = isBoolean$1(options2.fallbackWarn) ? options2.fallbackWarn : context.fallbackWarn;
  8677. const escapeParameter = isBoolean$1(options2.escapeParameter) ? options2.escapeParameter : context.escapeParameter;
  8678. const resolvedMessage = !!options2.resolvedMessage;
  8679. const defaultMsgOrKey = isString$1(options2.default) || isBoolean$1(options2.default) ? !isBoolean$1(options2.default) ? options2.default : key : fallbackFormat ? key : "";
  8680. const enableDefaultMsg = fallbackFormat || defaultMsgOrKey !== "";
  8681. const locale = isString$1(options2.locale) ? options2.locale : context.locale;
  8682. escapeParameter && escapeParams(options2);
  8683. let [format2, targetLocale, message] = !resolvedMessage ? resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn) : [
  8684. key,
  8685. locale,
  8686. messages2[locale] || {}
  8687. ];
  8688. let cacheBaseKey = key;
  8689. if (!resolvedMessage && !(isString$1(format2) || isMessageFunction(format2))) {
  8690. if (enableDefaultMsg) {
  8691. format2 = defaultMsgOrKey;
  8692. cacheBaseKey = format2;
  8693. }
  8694. }
  8695. if (!resolvedMessage && (!(isString$1(format2) || isMessageFunction(format2)) || !isString$1(targetLocale))) {
  8696. return unresolving ? NOT_REOSLVED : key;
  8697. }
  8698. if (isString$1(format2) && context.messageCompiler == null) {
  8699. warn(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${key}'.`);
  8700. return key;
  8701. }
  8702. let occurred = false;
  8703. const errorDetector = () => {
  8704. occurred = true;
  8705. };
  8706. const msg = !isMessageFunction(format2) ? compileMessageFormat(context, key, targetLocale, format2, cacheBaseKey, errorDetector) : format2;
  8707. if (occurred) {
  8708. return format2;
  8709. }
  8710. const ctxOptions = getMessageContextOptions(context, targetLocale, message, options2);
  8711. const msgContext = createMessageContext(ctxOptions);
  8712. const messaged = evaluateMessage(context, msg, msgContext);
  8713. const ret = postTranslation ? postTranslation(messaged) : messaged;
  8714. {
  8715. const payloads = {
  8716. timestamp: Date.now(),
  8717. key: isString$1(key) ? key : isMessageFunction(format2) ? format2.key : "",
  8718. locale: targetLocale || (isMessageFunction(format2) ? format2.locale : ""),
  8719. format: isString$1(format2) ? format2 : isMessageFunction(format2) ? format2.source : "",
  8720. message: ret
  8721. };
  8722. payloads.meta = assign({}, context.__meta, getAdditionalMeta() || {});
  8723. translateDevTools(payloads);
  8724. }
  8725. return ret;
  8726. }
  8727. function escapeParams(options2) {
  8728. if (isArray$2(options2.list)) {
  8729. options2.list = options2.list.map((item) => isString$1(item) ? escapeHtml(item) : item);
  8730. } else if (isObject$5(options2.named)) {
  8731. Object.keys(options2.named).forEach((key) => {
  8732. if (isString$1(options2.named[key])) {
  8733. options2.named[key] = escapeHtml(options2.named[key]);
  8734. }
  8735. });
  8736. }
  8737. }
  8738. function resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn) {
  8739. const { messages: messages2, onWarn } = context;
  8740. const locales = getLocaleChain(context, fallbackLocale, locale);
  8741. let message = {};
  8742. let targetLocale;
  8743. let format2 = null;
  8744. let from = locale;
  8745. let to = null;
  8746. const type = "translate";
  8747. for (let i2 = 0; i2 < locales.length; i2++) {
  8748. targetLocale = to = locales[i2];
  8749. if (locale !== targetLocale && isTranslateFallbackWarn(fallbackWarn, key)) {
  8750. onWarn(getWarnMessage$1(1, {
  8751. key,
  8752. target: targetLocale
  8753. }));
  8754. }
  8755. if (locale !== targetLocale) {
  8756. const emitter = context.__v_emitter;
  8757. if (emitter) {
  8758. emitter.emit("fallback", {
  8759. type,
  8760. key,
  8761. from,
  8762. to,
  8763. groupId: `${type}:${key}`
  8764. });
  8765. }
  8766. }
  8767. message = messages2[targetLocale] || {};
  8768. let start = null;
  8769. let startTag;
  8770. let endTag;
  8771. if (inBrowser) {
  8772. start = window.performance.now();
  8773. startTag = "intlify-message-resolve-start";
  8774. endTag = "intlify-message-resolve-end";
  8775. mark && mark(startTag);
  8776. }
  8777. if ((format2 = resolveValue(message, key)) === null) {
  8778. format2 = message[key];
  8779. }
  8780. if (inBrowser) {
  8781. const end = window.performance.now();
  8782. const emitter = context.__v_emitter;
  8783. if (emitter && start && format2) {
  8784. emitter.emit("message-resolve", {
  8785. type: "message-resolve",
  8786. key,
  8787. message: format2,
  8788. time: end - start,
  8789. groupId: `${type}:${key}`
  8790. });
  8791. }
  8792. if (startTag && endTag && mark && measure) {
  8793. mark(endTag);
  8794. measure("intlify message resolve", startTag, endTag);
  8795. }
  8796. }
  8797. if (isString$1(format2) || isFunction$1(format2))
  8798. break;
  8799. const missingRet = handleMissing(context, key, targetLocale, missingWarn, type);
  8800. if (missingRet !== key) {
  8801. format2 = missingRet;
  8802. }
  8803. from = to;
  8804. }
  8805. return [format2, targetLocale, message];
  8806. }
  8807. function compileMessageFormat(context, key, targetLocale, format2, cacheBaseKey, errorDetector) {
  8808. const { messageCompiler, warnHtmlMessage } = context;
  8809. if (isMessageFunction(format2)) {
  8810. const msg2 = format2;
  8811. msg2.locale = msg2.locale || targetLocale;
  8812. msg2.key = msg2.key || key;
  8813. return msg2;
  8814. }
  8815. let start = null;
  8816. let startTag;
  8817. let endTag;
  8818. if (inBrowser) {
  8819. start = window.performance.now();
  8820. startTag = "intlify-message-compilation-start";
  8821. endTag = "intlify-message-compilation-end";
  8822. mark && mark(startTag);
  8823. }
  8824. const msg = messageCompiler(format2, getCompileOptions(context, targetLocale, cacheBaseKey, format2, warnHtmlMessage, errorDetector));
  8825. if (inBrowser) {
  8826. const end = window.performance.now();
  8827. const emitter = context.__v_emitter;
  8828. if (emitter && start) {
  8829. emitter.emit("message-compilation", {
  8830. type: "message-compilation",
  8831. message: format2,
  8832. time: end - start,
  8833. groupId: `${"translate"}:${key}`
  8834. });
  8835. }
  8836. if (startTag && endTag && mark && measure) {
  8837. mark(endTag);
  8838. measure("intlify message compilation", startTag, endTag);
  8839. }
  8840. }
  8841. msg.locale = targetLocale;
  8842. msg.key = key;
  8843. msg.source = format2;
  8844. return msg;
  8845. }
  8846. function evaluateMessage(context, msg, msgCtx) {
  8847. let start = null;
  8848. let startTag;
  8849. let endTag;
  8850. if (inBrowser) {
  8851. start = window.performance.now();
  8852. startTag = "intlify-message-evaluation-start";
  8853. endTag = "intlify-message-evaluation-end";
  8854. mark && mark(startTag);
  8855. }
  8856. const messaged = msg(msgCtx);
  8857. if (inBrowser) {
  8858. const end = window.performance.now();
  8859. const emitter = context.__v_emitter;
  8860. if (emitter && start) {
  8861. emitter.emit("message-evaluation", {
  8862. type: "message-evaluation",
  8863. value: messaged,
  8864. time: end - start,
  8865. groupId: `${"translate"}:${msg.key}`
  8866. });
  8867. }
  8868. if (startTag && endTag && mark && measure) {
  8869. mark(endTag);
  8870. measure("intlify message evaluation", startTag, endTag);
  8871. }
  8872. }
  8873. return messaged;
  8874. }
  8875. function parseTranslateArgs(...args) {
  8876. const [arg1, arg2, arg3] = args;
  8877. const options2 = {};
  8878. if (!isString$1(arg1) && !isNumber$1(arg1) && !isMessageFunction(arg1)) {
  8879. throw createCoreError(
  8880. 14
  8881. /* INVALID_ARGUMENT */
  8882. );
  8883. }
  8884. const key = isNumber$1(arg1) ? String(arg1) : isMessageFunction(arg1) ? arg1 : arg1;
  8885. if (isNumber$1(arg2)) {
  8886. options2.plural = arg2;
  8887. } else if (isString$1(arg2)) {
  8888. options2.default = arg2;
  8889. } else if (isPlainObject$1(arg2) && !isEmptyObject(arg2)) {
  8890. options2.named = arg2;
  8891. } else if (isArray$2(arg2)) {
  8892. options2.list = arg2;
  8893. }
  8894. if (isNumber$1(arg3)) {
  8895. options2.plural = arg3;
  8896. } else if (isString$1(arg3)) {
  8897. options2.default = arg3;
  8898. } else if (isPlainObject$1(arg3)) {
  8899. assign(options2, arg3);
  8900. }
  8901. return [key, options2];
  8902. }
  8903. function getCompileOptions(context, locale, key, source, warnHtmlMessage, errorDetector) {
  8904. return {
  8905. warnHtmlMessage,
  8906. onError: (err) => {
  8907. errorDetector && errorDetector(err);
  8908. {
  8909. const message = `Message compilation error: ${err.message}`;
  8910. const codeFrame = err.location && generateCodeFrame(source, err.location.start.offset, err.location.end.offset);
  8911. const emitter = context.__v_emitter;
  8912. if (emitter) {
  8913. emitter.emit("compile-error", {
  8914. message: source,
  8915. error: err.message,
  8916. start: err.location && err.location.start.offset,
  8917. end: err.location && err.location.end.offset,
  8918. groupId: `${"translate"}:${key}`
  8919. });
  8920. }
  8921. console.error(codeFrame ? `${message}
  8922. ${codeFrame}` : message);
  8923. }
  8924. },
  8925. onCacheKey: (source2) => generateFormatCacheKey(locale, key, source2)
  8926. };
  8927. }
  8928. function getMessageContextOptions(context, locale, message, options2) {
  8929. const { modifiers, pluralRules } = context;
  8930. const resolveMessage = (key) => {
  8931. const val = resolveValue(message, key);
  8932. if (isString$1(val)) {
  8933. let occurred = false;
  8934. const errorDetector = () => {
  8935. occurred = true;
  8936. };
  8937. const msg = compileMessageFormat(context, key, locale, val, key, errorDetector);
  8938. return !occurred ? msg : NOOP_MESSAGE_FUNCTION;
  8939. } else if (isMessageFunction(val)) {
  8940. return val;
  8941. } else {
  8942. return NOOP_MESSAGE_FUNCTION;
  8943. }
  8944. };
  8945. const ctxOptions = {
  8946. locale,
  8947. modifiers,
  8948. pluralRules,
  8949. messages: resolveMessage
  8950. };
  8951. if (context.processor) {
  8952. ctxOptions.processor = context.processor;
  8953. }
  8954. if (options2.list) {
  8955. ctxOptions.list = options2.list;
  8956. }
  8957. if (options2.named) {
  8958. ctxOptions.named = options2.named;
  8959. }
  8960. if (isNumber$1(options2.plural)) {
  8961. ctxOptions.pluralIndex = options2.plural;
  8962. }
  8963. return ctxOptions;
  8964. }
  8965. const intlDefined = typeof Intl !== "undefined";
  8966. const Availabilities = {
  8967. dateTimeFormat: intlDefined && typeof Intl.DateTimeFormat !== "undefined",
  8968. numberFormat: intlDefined && typeof Intl.NumberFormat !== "undefined"
  8969. };
  8970. function datetime(context, ...args) {
  8971. const { datetimeFormats, unresolving, fallbackLocale, onWarn } = context;
  8972. const { __datetimeFormatters } = context;
  8973. if (!Availabilities.dateTimeFormat) {
  8974. onWarn(getWarnMessage$1(
  8975. 4
  8976. /* CANNOT_FORMAT_DATE */
  8977. ));
  8978. return MISSING_RESOLVE_VALUE;
  8979. }
  8980. const [key, value, options2, overrides] = parseDateTimeArgs(...args);
  8981. const missingWarn = isBoolean$1(options2.missingWarn) ? options2.missingWarn : context.missingWarn;
  8982. const fallbackWarn = isBoolean$1(options2.fallbackWarn) ? options2.fallbackWarn : context.fallbackWarn;
  8983. const part = !!options2.part;
  8984. const locale = isString$1(options2.locale) ? options2.locale : context.locale;
  8985. const locales = getLocaleChain(context, fallbackLocale, locale);
  8986. if (!isString$1(key) || key === "") {
  8987. return new Intl.DateTimeFormat(locale).format(value);
  8988. }
  8989. let datetimeFormat = {};
  8990. let targetLocale;
  8991. let format2 = null;
  8992. let from = locale;
  8993. let to = null;
  8994. const type = "datetime format";
  8995. for (let i2 = 0; i2 < locales.length; i2++) {
  8996. targetLocale = to = locales[i2];
  8997. if (locale !== targetLocale && isTranslateFallbackWarn(fallbackWarn, key)) {
  8998. onWarn(getWarnMessage$1(5, {
  8999. key,
  9000. target: targetLocale
  9001. }));
  9002. }
  9003. if (locale !== targetLocale) {
  9004. const emitter = context.__v_emitter;
  9005. if (emitter) {
  9006. emitter.emit("fallback", {
  9007. type,
  9008. key,
  9009. from,
  9010. to,
  9011. groupId: `${type}:${key}`
  9012. });
  9013. }
  9014. }
  9015. datetimeFormat = datetimeFormats[targetLocale] || {};
  9016. format2 = datetimeFormat[key];
  9017. if (isPlainObject$1(format2))
  9018. break;
  9019. handleMissing(context, key, targetLocale, missingWarn, type);
  9020. from = to;
  9021. }
  9022. if (!isPlainObject$1(format2) || !isString$1(targetLocale)) {
  9023. return unresolving ? NOT_REOSLVED : key;
  9024. }
  9025. let id = `${targetLocale}__${key}`;
  9026. if (!isEmptyObject(overrides)) {
  9027. id = `${id}__${JSON.stringify(overrides)}`;
  9028. }
  9029. let formatter = __datetimeFormatters.get(id);
  9030. if (!formatter) {
  9031. formatter = new Intl.DateTimeFormat(targetLocale, assign({}, format2, overrides));
  9032. __datetimeFormatters.set(id, formatter);
  9033. }
  9034. return !part ? formatter.format(value) : formatter.formatToParts(value);
  9035. }
  9036. function parseDateTimeArgs(...args) {
  9037. const [arg1, arg2, arg3, arg4] = args;
  9038. let options2 = {};
  9039. let overrides = {};
  9040. let value;
  9041. if (isString$1(arg1)) {
  9042. if (!/\d{4}-\d{2}-\d{2}(T.*)?/.test(arg1)) {
  9043. throw createCoreError(
  9044. 16
  9045. /* INVALID_ISO_DATE_ARGUMENT */
  9046. );
  9047. }
  9048. value = new Date(arg1);
  9049. try {
  9050. value.toISOString();
  9051. } catch (e2) {
  9052. throw createCoreError(
  9053. 16
  9054. /* INVALID_ISO_DATE_ARGUMENT */
  9055. );
  9056. }
  9057. } else if (isDate$1(arg1)) {
  9058. if (isNaN(arg1.getTime())) {
  9059. throw createCoreError(
  9060. 15
  9061. /* INVALID_DATE_ARGUMENT */
  9062. );
  9063. }
  9064. value = arg1;
  9065. } else if (isNumber$1(arg1)) {
  9066. value = arg1;
  9067. } else {
  9068. throw createCoreError(
  9069. 14
  9070. /* INVALID_ARGUMENT */
  9071. );
  9072. }
  9073. if (isString$1(arg2)) {
  9074. options2.key = arg2;
  9075. } else if (isPlainObject$1(arg2)) {
  9076. options2 = arg2;
  9077. }
  9078. if (isString$1(arg3)) {
  9079. options2.locale = arg3;
  9080. } else if (isPlainObject$1(arg3)) {
  9081. overrides = arg3;
  9082. }
  9083. if (isPlainObject$1(arg4)) {
  9084. overrides = arg4;
  9085. }
  9086. return [options2.key || "", value, options2, overrides];
  9087. }
  9088. function clearDateTimeFormat(ctx, locale, format2) {
  9089. const context = ctx;
  9090. for (const key in format2) {
  9091. const id = `${locale}__${key}`;
  9092. if (!context.__datetimeFormatters.has(id)) {
  9093. continue;
  9094. }
  9095. context.__datetimeFormatters.delete(id);
  9096. }
  9097. }
  9098. function number$1(context, ...args) {
  9099. const { numberFormats, unresolving, fallbackLocale, onWarn } = context;
  9100. const { __numberFormatters } = context;
  9101. if (!Availabilities.numberFormat) {
  9102. onWarn(getWarnMessage$1(
  9103. 2
  9104. /* CANNOT_FORMAT_NUMBER */
  9105. ));
  9106. return MISSING_RESOLVE_VALUE;
  9107. }
  9108. const [key, value, options2, overrides] = parseNumberArgs(...args);
  9109. const missingWarn = isBoolean$1(options2.missingWarn) ? options2.missingWarn : context.missingWarn;
  9110. const fallbackWarn = isBoolean$1(options2.fallbackWarn) ? options2.fallbackWarn : context.fallbackWarn;
  9111. const part = !!options2.part;
  9112. const locale = isString$1(options2.locale) ? options2.locale : context.locale;
  9113. const locales = getLocaleChain(context, fallbackLocale, locale);
  9114. if (!isString$1(key) || key === "") {
  9115. return new Intl.NumberFormat(locale).format(value);
  9116. }
  9117. let numberFormat = {};
  9118. let targetLocale;
  9119. let format2 = null;
  9120. let from = locale;
  9121. let to = null;
  9122. const type = "number format";
  9123. for (let i2 = 0; i2 < locales.length; i2++) {
  9124. targetLocale = to = locales[i2];
  9125. if (locale !== targetLocale && isTranslateFallbackWarn(fallbackWarn, key)) {
  9126. onWarn(getWarnMessage$1(3, {
  9127. key,
  9128. target: targetLocale
  9129. }));
  9130. }
  9131. if (locale !== targetLocale) {
  9132. const emitter = context.__v_emitter;
  9133. if (emitter) {
  9134. emitter.emit("fallback", {
  9135. type,
  9136. key,
  9137. from,
  9138. to,
  9139. groupId: `${type}:${key}`
  9140. });
  9141. }
  9142. }
  9143. numberFormat = numberFormats[targetLocale] || {};
  9144. format2 = numberFormat[key];
  9145. if (isPlainObject$1(format2))
  9146. break;
  9147. handleMissing(context, key, targetLocale, missingWarn, type);
  9148. from = to;
  9149. }
  9150. if (!isPlainObject$1(format2) || !isString$1(targetLocale)) {
  9151. return unresolving ? NOT_REOSLVED : key;
  9152. }
  9153. let id = `${targetLocale}__${key}`;
  9154. if (!isEmptyObject(overrides)) {
  9155. id = `${id}__${JSON.stringify(overrides)}`;
  9156. }
  9157. let formatter = __numberFormatters.get(id);
  9158. if (!formatter) {
  9159. formatter = new Intl.NumberFormat(targetLocale, assign({}, format2, overrides));
  9160. __numberFormatters.set(id, formatter);
  9161. }
  9162. return !part ? formatter.format(value) : formatter.formatToParts(value);
  9163. }
  9164. function parseNumberArgs(...args) {
  9165. const [arg1, arg2, arg3, arg4] = args;
  9166. let options2 = {};
  9167. let overrides = {};
  9168. if (!isNumber$1(arg1)) {
  9169. throw createCoreError(
  9170. 14
  9171. /* INVALID_ARGUMENT */
  9172. );
  9173. }
  9174. const value = arg1;
  9175. if (isString$1(arg2)) {
  9176. options2.key = arg2;
  9177. } else if (isPlainObject$1(arg2)) {
  9178. options2 = arg2;
  9179. }
  9180. if (isString$1(arg3)) {
  9181. options2.locale = arg3;
  9182. } else if (isPlainObject$1(arg3)) {
  9183. overrides = arg3;
  9184. }
  9185. if (isPlainObject$1(arg4)) {
  9186. overrides = arg4;
  9187. }
  9188. return [options2.key || "", value, options2, overrides];
  9189. }
  9190. function clearNumberFormat(ctx, locale, format2) {
  9191. const context = ctx;
  9192. for (const key in format2) {
  9193. const id = `${locale}__${key}`;
  9194. if (!context.__numberFormatters.has(id)) {
  9195. continue;
  9196. }
  9197. context.__numberFormatters.delete(id);
  9198. }
  9199. }
  9200. function getDevtoolsGlobalHook() {
  9201. return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__;
  9202. }
  9203. function getTarget() {
  9204. return typeof navigator !== "undefined" && typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {};
  9205. }
  9206. const isProxyAvailable = typeof Proxy === "function";
  9207. const HOOK_SETUP = "devtools-plugin:setup";
  9208. const HOOK_PLUGIN_SETTINGS_SET = "plugin:settings:set";
  9209. class ApiProxy {
  9210. constructor(plugin, hook) {
  9211. this.target = null;
  9212. this.targetQueue = [];
  9213. this.onQueue = [];
  9214. this.plugin = plugin;
  9215. this.hook = hook;
  9216. const defaultSettings = {};
  9217. if (plugin.settings) {
  9218. for (const id in plugin.settings) {
  9219. const item = plugin.settings[id];
  9220. defaultSettings[id] = item.defaultValue;
  9221. }
  9222. }
  9223. const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`;
  9224. let currentSettings = { ...defaultSettings };
  9225. try {
  9226. const raw = localStorage.getItem(localSettingsSaveId);
  9227. const data = JSON.parse(raw);
  9228. Object.assign(currentSettings, data);
  9229. } catch (e2) {
  9230. }
  9231. this.fallbacks = {
  9232. getSettings() {
  9233. return currentSettings;
  9234. },
  9235. setSettings(value) {
  9236. try {
  9237. localStorage.setItem(localSettingsSaveId, JSON.stringify(value));
  9238. } catch (e2) {
  9239. }
  9240. currentSettings = value;
  9241. }
  9242. };
  9243. hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value) => {
  9244. if (pluginId === this.plugin.id) {
  9245. this.fallbacks.setSettings(value);
  9246. }
  9247. });
  9248. this.proxiedOn = new Proxy({}, {
  9249. get: (_target, prop) => {
  9250. if (this.target) {
  9251. return this.target.on[prop];
  9252. } else {
  9253. return (...args) => {
  9254. this.onQueue.push({
  9255. method: prop,
  9256. args
  9257. });
  9258. };
  9259. }
  9260. }
  9261. });
  9262. this.proxiedTarget = new Proxy({}, {
  9263. get: (_target, prop) => {
  9264. if (this.target) {
  9265. return this.target[prop];
  9266. } else if (prop === "on") {
  9267. return this.proxiedOn;
  9268. } else if (Object.keys(this.fallbacks).includes(prop)) {
  9269. return (...args) => {
  9270. this.targetQueue.push({
  9271. method: prop,
  9272. args,
  9273. resolve: () => {
  9274. }
  9275. });
  9276. return this.fallbacks[prop](...args);
  9277. };
  9278. } else {
  9279. return (...args) => {
  9280. return new Promise((resolve) => {
  9281. this.targetQueue.push({
  9282. method: prop,
  9283. args,
  9284. resolve
  9285. });
  9286. });
  9287. };
  9288. }
  9289. }
  9290. });
  9291. }
  9292. async setRealTarget(target) {
  9293. this.target = target;
  9294. for (const item of this.onQueue) {
  9295. this.target.on[item.method](...item.args);
  9296. }
  9297. for (const item of this.targetQueue) {
  9298. item.resolve(await this.target[item.method](...item.args));
  9299. }
  9300. }
  9301. }
  9302. function setupDevtoolsPlugin(pluginDescriptor, setupFn) {
  9303. const target = getTarget();
  9304. const hook = getDevtoolsGlobalHook();
  9305. const enableProxy = isProxyAvailable && pluginDescriptor.enableEarlyProxy;
  9306. if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) {
  9307. hook.emit(HOOK_SETUP, pluginDescriptor, setupFn);
  9308. } else {
  9309. const proxy = enableProxy ? new ApiProxy(pluginDescriptor, hook) : null;
  9310. const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];
  9311. list.push({
  9312. pluginDescriptor,
  9313. setupFn,
  9314. proxy
  9315. });
  9316. if (proxy)
  9317. setupFn(proxy.proxiedTarget);
  9318. }
  9319. }
  9320. /*!
  9321. * @intlify/vue-devtools v9.1.9
  9322. * (c) 2021 kazuya kawaguchi
  9323. * Released under the MIT License.
  9324. */
  9325. const VueDevToolsLabels = {
  9326. [
  9327. "vue-devtools-plugin-vue-i18n"
  9328. /* PLUGIN */
  9329. ]: "Vue I18n devtools",
  9330. [
  9331. "vue-i18n-resource-inspector"
  9332. /* CUSTOM_INSPECTOR */
  9333. ]: "I18n Resources",
  9334. [
  9335. "vue-i18n-timeline"
  9336. /* TIMELINE */
  9337. ]: "Vue I18n"
  9338. };
  9339. const VueDevToolsPlaceholders = {
  9340. [
  9341. "vue-i18n-resource-inspector"
  9342. /* CUSTOM_INSPECTOR */
  9343. ]: "Search for scopes ..."
  9344. };
  9345. const VueDevToolsTimelineColors = {
  9346. [
  9347. "vue-i18n-timeline"
  9348. /* TIMELINE */
  9349. ]: 16764185
  9350. };
  9351. /*!
  9352. * vue-i18n v9.1.9
  9353. * (c) 2022 kazuya kawaguchi
  9354. * Released under the MIT License.
  9355. */
  9356. const VERSION$1 = "9.1.9";
  9357. function initFeatureFlags() {
  9358. let needWarn = false;
  9359. {
  9360. needWarn = true;
  9361. }
  9362. if (needWarn) {
  9363. console.warn(`You are running the esm-bundler build of vue-i18n. It is recommended to configure your bundler to explicitly replace feature flag globals with boolean literals to get proper tree-shaking in the final bundle.`);
  9364. }
  9365. }
  9366. const warnMessages = {
  9367. [
  9368. 6
  9369. /* FALLBACK_TO_ROOT */
  9370. ]: `Fall back to {type} '{key}' with root locale.`,
  9371. [
  9372. 7
  9373. /* NOT_SUPPORTED_PRESERVE */
  9374. ]: `Not supported 'preserve'.`,
  9375. [
  9376. 8
  9377. /* NOT_SUPPORTED_FORMATTER */
  9378. ]: `Not supported 'formatter'.`,
  9379. [
  9380. 9
  9381. /* NOT_SUPPORTED_PRESERVE_DIRECTIVE */
  9382. ]: `Not supported 'preserveDirectiveContent'.`,
  9383. [
  9384. 10
  9385. /* NOT_SUPPORTED_GET_CHOICE_INDEX */
  9386. ]: `Not supported 'getChoiceIndex'.`,
  9387. [
  9388. 11
  9389. /* COMPONENT_NAME_LEGACY_COMPATIBLE */
  9390. ]: `Component name legacy compatible: '{name}' -> 'i18n'`,
  9391. [
  9392. 12
  9393. /* NOT_FOUND_PARENT_SCOPE */
  9394. ]: `Not found parent scope. use the global scope.`
  9395. };
  9396. function getWarnMessage(code2, ...args) {
  9397. return format(warnMessages[code2], ...args);
  9398. }
  9399. function createI18nError(code2, ...args) {
  9400. return createCompileError(code2, null, { messages: errorMessages, args });
  9401. }
  9402. const errorMessages = {
  9403. [
  9404. 14
  9405. /* UNEXPECTED_RETURN_TYPE */
  9406. ]: "Unexpected return type in composer",
  9407. [
  9408. 15
  9409. /* INVALID_ARGUMENT */
  9410. ]: "Invalid argument",
  9411. [
  9412. 16
  9413. /* MUST_BE_CALL_SETUP_TOP */
  9414. ]: "Must be called at the top of a `setup` function",
  9415. [
  9416. 17
  9417. /* NOT_INSLALLED */
  9418. ]: "Need to install with `app.use` function",
  9419. [
  9420. 22
  9421. /* UNEXPECTED_ERROR */
  9422. ]: "Unexpected error",
  9423. [
  9424. 18
  9425. /* NOT_AVAILABLE_IN_LEGACY_MODE */
  9426. ]: "Not available in legacy mode",
  9427. [
  9428. 19
  9429. /* REQUIRED_VALUE */
  9430. ]: `Required in value: {0}`,
  9431. [
  9432. 20
  9433. /* INVALID_VALUE */
  9434. ]: `Invalid value`,
  9435. [
  9436. 21
  9437. /* CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN */
  9438. ]: `Cannot setup vue-devtools plugin`
  9439. };
  9440. const DEVTOOLS_META = "__INTLIFY_META__";
  9441. const TransrateVNodeSymbol = makeSymbol("__transrateVNode");
  9442. const DatetimePartsSymbol = makeSymbol("__datetimeParts");
  9443. const NumberPartsSymbol = makeSymbol("__numberParts");
  9444. const EnableEmitter = makeSymbol("__enableEmitter");
  9445. const DisableEmitter = makeSymbol("__disableEmitter");
  9446. const SetPluralRulesSymbol = makeSymbol("__setPluralRules");
  9447. const InejctWithOption = makeSymbol("__injectWithOption");
  9448. let composerID = 0;
  9449. function defineCoreMissingHandler(missing) {
  9450. return (ctx, locale, key, type) => {
  9451. return missing(locale, key, vue.getCurrentInstance() || void 0, type);
  9452. };
  9453. }
  9454. function getLocaleMessages(locale, options2) {
  9455. const { messages: messages2, __i18n } = options2;
  9456. const ret = isPlainObject$1(messages2) ? messages2 : isArray$2(__i18n) ? {} : { [locale]: {} };
  9457. if (isArray$2(__i18n)) {
  9458. __i18n.forEach(({ locale: locale2, resource }) => {
  9459. if (locale2) {
  9460. ret[locale2] = ret[locale2] || {};
  9461. deepCopy(resource, ret[locale2]);
  9462. } else {
  9463. deepCopy(resource, ret);
  9464. }
  9465. });
  9466. }
  9467. if (options2.flatJson) {
  9468. for (const key in ret) {
  9469. if (hasOwn$2(ret, key)) {
  9470. handleFlatJson(ret[key]);
  9471. }
  9472. }
  9473. }
  9474. return ret;
  9475. }
  9476. const isNotObjectOrIsArray = (val) => !isObject$5(val) || isArray$2(val);
  9477. function deepCopy(src, des) {
  9478. if (isNotObjectOrIsArray(src) || isNotObjectOrIsArray(des)) {
  9479. throw createI18nError(
  9480. 20
  9481. /* INVALID_VALUE */
  9482. );
  9483. }
  9484. for (const key in src) {
  9485. if (hasOwn$2(src, key)) {
  9486. if (isNotObjectOrIsArray(src[key]) || isNotObjectOrIsArray(des[key])) {
  9487. des[key] = src[key];
  9488. } else {
  9489. deepCopy(src[key], des[key]);
  9490. }
  9491. }
  9492. }
  9493. }
  9494. const getMetaInfo = () => {
  9495. const instance = vue.getCurrentInstance();
  9496. return instance && instance.type[DEVTOOLS_META] ? { [DEVTOOLS_META]: instance.type[DEVTOOLS_META] } : null;
  9497. };
  9498. function createComposer(options2 = {}) {
  9499. const { __root } = options2;
  9500. const _isGlobal = __root === void 0;
  9501. let _inheritLocale = isBoolean$1(options2.inheritLocale) ? options2.inheritLocale : true;
  9502. const _locale = vue.ref(
  9503. // prettier-ignore
  9504. __root && _inheritLocale ? __root.locale.value : isString$1(options2.locale) ? options2.locale : "en-US"
  9505. );
  9506. const _fallbackLocale = vue.ref(
  9507. // prettier-ignore
  9508. __root && _inheritLocale ? __root.fallbackLocale.value : isString$1(options2.fallbackLocale) || isArray$2(options2.fallbackLocale) || isPlainObject$1(options2.fallbackLocale) || options2.fallbackLocale === false ? options2.fallbackLocale : _locale.value
  9509. );
  9510. const _messages = vue.ref(getLocaleMessages(_locale.value, options2));
  9511. const _datetimeFormats = vue.ref(isPlainObject$1(options2.datetimeFormats) ? options2.datetimeFormats : { [_locale.value]: {} });
  9512. const _numberFormats = vue.ref(isPlainObject$1(options2.numberFormats) ? options2.numberFormats : { [_locale.value]: {} });
  9513. let _missingWarn = __root ? __root.missingWarn : isBoolean$1(options2.missingWarn) || isRegExp$1(options2.missingWarn) ? options2.missingWarn : true;
  9514. let _fallbackWarn = __root ? __root.fallbackWarn : isBoolean$1(options2.fallbackWarn) || isRegExp$1(options2.fallbackWarn) ? options2.fallbackWarn : true;
  9515. let _fallbackRoot = __root ? __root.fallbackRoot : isBoolean$1(options2.fallbackRoot) ? options2.fallbackRoot : true;
  9516. let _fallbackFormat = !!options2.fallbackFormat;
  9517. let _missing = isFunction$1(options2.missing) ? options2.missing : null;
  9518. let _runtimeMissing = isFunction$1(options2.missing) ? defineCoreMissingHandler(options2.missing) : null;
  9519. let _postTranslation = isFunction$1(options2.postTranslation) ? options2.postTranslation : null;
  9520. let _warnHtmlMessage = isBoolean$1(options2.warnHtmlMessage) ? options2.warnHtmlMessage : true;
  9521. let _escapeParameter = !!options2.escapeParameter;
  9522. const _modifiers = __root ? __root.modifiers : isPlainObject$1(options2.modifiers) ? options2.modifiers : {};
  9523. let _pluralRules = options2.pluralRules || __root && __root.pluralRules;
  9524. let _context;
  9525. function getCoreContext() {
  9526. return createCoreContext({
  9527. version: VERSION$1,
  9528. locale: _locale.value,
  9529. fallbackLocale: _fallbackLocale.value,
  9530. messages: _messages.value,
  9531. messageCompiler: function compileToFunction(source) {
  9532. return (ctx) => {
  9533. return ctx.normalize([source]);
  9534. };
  9535. },
  9536. datetimeFormats: _datetimeFormats.value,
  9537. numberFormats: _numberFormats.value,
  9538. modifiers: _modifiers,
  9539. pluralRules: _pluralRules,
  9540. missing: _runtimeMissing === null ? void 0 : _runtimeMissing,
  9541. missingWarn: _missingWarn,
  9542. fallbackWarn: _fallbackWarn,
  9543. fallbackFormat: _fallbackFormat,
  9544. unresolving: true,
  9545. postTranslation: _postTranslation === null ? void 0 : _postTranslation,
  9546. warnHtmlMessage: _warnHtmlMessage,
  9547. escapeParameter: _escapeParameter,
  9548. __datetimeFormatters: isPlainObject$1(_context) ? _context.__datetimeFormatters : void 0,
  9549. __numberFormatters: isPlainObject$1(_context) ? _context.__numberFormatters : void 0,
  9550. __v_emitter: isPlainObject$1(_context) ? _context.__v_emitter : void 0,
  9551. __meta: { framework: "vue" }
  9552. });
  9553. }
  9554. _context = getCoreContext();
  9555. updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);
  9556. function trackReactivityValues() {
  9557. return [
  9558. _locale.value,
  9559. _fallbackLocale.value,
  9560. _messages.value,
  9561. _datetimeFormats.value,
  9562. _numberFormats.value
  9563. ];
  9564. }
  9565. const locale = vue.computed({
  9566. get: () => _locale.value,
  9567. set: (val) => {
  9568. _locale.value = val;
  9569. _context.locale = _locale.value;
  9570. }
  9571. });
  9572. const fallbackLocale = vue.computed({
  9573. get: () => _fallbackLocale.value,
  9574. set: (val) => {
  9575. _fallbackLocale.value = val;
  9576. _context.fallbackLocale = _fallbackLocale.value;
  9577. updateFallbackLocale(_context, _locale.value, val);
  9578. }
  9579. });
  9580. const messages2 = vue.computed(() => _messages.value);
  9581. const datetimeFormats = vue.computed(() => _datetimeFormats.value);
  9582. const numberFormats = vue.computed(() => _numberFormats.value);
  9583. function getPostTranslationHandler() {
  9584. return isFunction$1(_postTranslation) ? _postTranslation : null;
  9585. }
  9586. function setPostTranslationHandler(handler) {
  9587. _postTranslation = handler;
  9588. _context.postTranslation = handler;
  9589. }
  9590. function getMissingHandler() {
  9591. return _missing;
  9592. }
  9593. function setMissingHandler(handler) {
  9594. if (handler !== null) {
  9595. _runtimeMissing = defineCoreMissingHandler(handler);
  9596. }
  9597. _missing = handler;
  9598. _context.missing = _runtimeMissing;
  9599. }
  9600. function isResolvedTranslateMessage(type, arg) {
  9601. return type !== "translate" || !!arg.resolvedMessage === false;
  9602. }
  9603. function wrapWithDeps(fn, argumentParser, warnType, fallbackSuccess, fallbackFail, successCondition) {
  9604. trackReactivityValues();
  9605. let ret;
  9606. {
  9607. try {
  9608. setAdditionalMeta(getMetaInfo());
  9609. ret = fn(_context);
  9610. } finally {
  9611. setAdditionalMeta(null);
  9612. }
  9613. }
  9614. if (isNumber$1(ret) && ret === NOT_REOSLVED) {
  9615. const [key, arg2] = argumentParser();
  9616. if (__root && isString$1(key) && isResolvedTranslateMessage(warnType, arg2)) {
  9617. if (_fallbackRoot && (isTranslateFallbackWarn(_fallbackWarn, key) || isTranslateMissingWarn(_missingWarn, key))) {
  9618. warn(getWarnMessage(6, {
  9619. key,
  9620. type: warnType
  9621. }));
  9622. }
  9623. {
  9624. const { __v_emitter: emitter } = _context;
  9625. if (emitter && _fallbackRoot) {
  9626. emitter.emit("fallback", {
  9627. type: warnType,
  9628. key,
  9629. to: "global",
  9630. groupId: `${warnType}:${key}`
  9631. });
  9632. }
  9633. }
  9634. }
  9635. return __root && _fallbackRoot ? fallbackSuccess(__root) : fallbackFail(key);
  9636. } else if (successCondition(ret)) {
  9637. return ret;
  9638. } else {
  9639. throw createI18nError(
  9640. 14
  9641. /* UNEXPECTED_RETURN_TYPE */
  9642. );
  9643. }
  9644. }
  9645. function t2(...args) {
  9646. return wrapWithDeps((context) => translate(context, ...args), () => parseTranslateArgs(...args), "translate", (root) => root.t(...args), (key) => key, (val) => isString$1(val));
  9647. }
  9648. function rt2(...args) {
  9649. const [arg1, arg2, arg3] = args;
  9650. if (arg3 && !isObject$5(arg3)) {
  9651. throw createI18nError(
  9652. 15
  9653. /* INVALID_ARGUMENT */
  9654. );
  9655. }
  9656. return t2(...[arg1, arg2, assign({ resolvedMessage: true }, arg3 || {})]);
  9657. }
  9658. function d2(...args) {
  9659. return wrapWithDeps((context) => datetime(context, ...args), () => parseDateTimeArgs(...args), "datetime format", (root) => root.d(...args), () => MISSING_RESOLVE_VALUE, (val) => isString$1(val));
  9660. }
  9661. function n2(...args) {
  9662. return wrapWithDeps((context) => number$1(context, ...args), () => parseNumberArgs(...args), "number format", (root) => root.n(...args), () => MISSING_RESOLVE_VALUE, (val) => isString$1(val));
  9663. }
  9664. function normalize(values) {
  9665. return values.map((val) => isString$1(val) ? vue.createVNode(vue.Text, null, val, 0) : val);
  9666. }
  9667. const interpolate = (val) => val;
  9668. const processor = {
  9669. normalize,
  9670. interpolate,
  9671. type: "vnode"
  9672. };
  9673. function transrateVNode(...args) {
  9674. return wrapWithDeps(
  9675. (context) => {
  9676. let ret;
  9677. const _context2 = context;
  9678. try {
  9679. _context2.processor = processor;
  9680. ret = translate(_context2, ...args);
  9681. } finally {
  9682. _context2.processor = null;
  9683. }
  9684. return ret;
  9685. },
  9686. () => parseTranslateArgs(...args),
  9687. "translate",
  9688. // eslint-disable-next-line @typescript-eslint/no-explicit-any
  9689. (root) => root[TransrateVNodeSymbol](...args),
  9690. (key) => [vue.createVNode(vue.Text, null, key, 0)],
  9691. (val) => isArray$2(val)
  9692. );
  9693. }
  9694. function numberParts(...args) {
  9695. return wrapWithDeps(
  9696. (context) => number$1(context, ...args),
  9697. () => parseNumberArgs(...args),
  9698. "number format",
  9699. // eslint-disable-next-line @typescript-eslint/no-explicit-any
  9700. (root) => root[NumberPartsSymbol](...args),
  9701. () => [],
  9702. (val) => isString$1(val) || isArray$2(val)
  9703. );
  9704. }
  9705. function datetimeParts(...args) {
  9706. return wrapWithDeps(
  9707. (context) => datetime(context, ...args),
  9708. () => parseDateTimeArgs(...args),
  9709. "datetime format",
  9710. // eslint-disable-next-line @typescript-eslint/no-explicit-any
  9711. (root) => root[DatetimePartsSymbol](...args),
  9712. () => [],
  9713. (val) => isString$1(val) || isArray$2(val)
  9714. );
  9715. }
  9716. function setPluralRules(rules2) {
  9717. _pluralRules = rules2;
  9718. _context.pluralRules = _pluralRules;
  9719. }
  9720. function te2(key, locale2) {
  9721. const targetLocale = isString$1(locale2) ? locale2 : _locale.value;
  9722. const message = getLocaleMessage(targetLocale);
  9723. return resolveValue(message, key) !== null;
  9724. }
  9725. function resolveMessages(key) {
  9726. let messages22 = null;
  9727. const locales = getLocaleChain(_context, _fallbackLocale.value, _locale.value);
  9728. for (let i2 = 0; i2 < locales.length; i2++) {
  9729. const targetLocaleMessages = _messages.value[locales[i2]] || {};
  9730. const messageValue = resolveValue(targetLocaleMessages, key);
  9731. if (messageValue != null) {
  9732. messages22 = messageValue;
  9733. break;
  9734. }
  9735. }
  9736. return messages22;
  9737. }
  9738. function tm(key) {
  9739. const messages22 = resolveMessages(key);
  9740. return messages22 != null ? messages22 : __root ? __root.tm(key) || {} : {};
  9741. }
  9742. function getLocaleMessage(locale2) {
  9743. return _messages.value[locale2] || {};
  9744. }
  9745. function setLocaleMessage(locale2, message) {
  9746. _messages.value[locale2] = message;
  9747. _context.messages = _messages.value;
  9748. }
  9749. function mergeLocaleMessage(locale2, message) {
  9750. _messages.value[locale2] = _messages.value[locale2] || {};
  9751. deepCopy(message, _messages.value[locale2]);
  9752. _context.messages = _messages.value;
  9753. }
  9754. function getDateTimeFormat(locale2) {
  9755. return _datetimeFormats.value[locale2] || {};
  9756. }
  9757. function setDateTimeFormat(locale2, format2) {
  9758. _datetimeFormats.value[locale2] = format2;
  9759. _context.datetimeFormats = _datetimeFormats.value;
  9760. clearDateTimeFormat(_context, locale2, format2);
  9761. }
  9762. function mergeDateTimeFormat(locale2, format2) {
  9763. _datetimeFormats.value[locale2] = assign(_datetimeFormats.value[locale2] || {}, format2);
  9764. _context.datetimeFormats = _datetimeFormats.value;
  9765. clearDateTimeFormat(_context, locale2, format2);
  9766. }
  9767. function getNumberFormat(locale2) {
  9768. return _numberFormats.value[locale2] || {};
  9769. }
  9770. function setNumberFormat(locale2, format2) {
  9771. _numberFormats.value[locale2] = format2;
  9772. _context.numberFormats = _numberFormats.value;
  9773. clearNumberFormat(_context, locale2, format2);
  9774. }
  9775. function mergeNumberFormat(locale2, format2) {
  9776. _numberFormats.value[locale2] = assign(_numberFormats.value[locale2] || {}, format2);
  9777. _context.numberFormats = _numberFormats.value;
  9778. clearNumberFormat(_context, locale2, format2);
  9779. }
  9780. composerID++;
  9781. if (__root) {
  9782. vue.watch(__root.locale, (val) => {
  9783. if (_inheritLocale) {
  9784. _locale.value = val;
  9785. _context.locale = val;
  9786. updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);
  9787. }
  9788. });
  9789. vue.watch(__root.fallbackLocale, (val) => {
  9790. if (_inheritLocale) {
  9791. _fallbackLocale.value = val;
  9792. _context.fallbackLocale = val;
  9793. updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);
  9794. }
  9795. });
  9796. }
  9797. const composer = {
  9798. id: composerID,
  9799. locale,
  9800. fallbackLocale,
  9801. get inheritLocale() {
  9802. return _inheritLocale;
  9803. },
  9804. set inheritLocale(val) {
  9805. _inheritLocale = val;
  9806. if (val && __root) {
  9807. _locale.value = __root.locale.value;
  9808. _fallbackLocale.value = __root.fallbackLocale.value;
  9809. updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);
  9810. }
  9811. },
  9812. get availableLocales() {
  9813. return Object.keys(_messages.value).sort();
  9814. },
  9815. messages: messages2,
  9816. datetimeFormats,
  9817. numberFormats,
  9818. get modifiers() {
  9819. return _modifiers;
  9820. },
  9821. get pluralRules() {
  9822. return _pluralRules || {};
  9823. },
  9824. get isGlobal() {
  9825. return _isGlobal;
  9826. },
  9827. get missingWarn() {
  9828. return _missingWarn;
  9829. },
  9830. set missingWarn(val) {
  9831. _missingWarn = val;
  9832. _context.missingWarn = _missingWarn;
  9833. },
  9834. get fallbackWarn() {
  9835. return _fallbackWarn;
  9836. },
  9837. set fallbackWarn(val) {
  9838. _fallbackWarn = val;
  9839. _context.fallbackWarn = _fallbackWarn;
  9840. },
  9841. get fallbackRoot() {
  9842. return _fallbackRoot;
  9843. },
  9844. set fallbackRoot(val) {
  9845. _fallbackRoot = val;
  9846. },
  9847. get fallbackFormat() {
  9848. return _fallbackFormat;
  9849. },
  9850. set fallbackFormat(val) {
  9851. _fallbackFormat = val;
  9852. _context.fallbackFormat = _fallbackFormat;
  9853. },
  9854. get warnHtmlMessage() {
  9855. return _warnHtmlMessage;
  9856. },
  9857. set warnHtmlMessage(val) {
  9858. _warnHtmlMessage = val;
  9859. _context.warnHtmlMessage = val;
  9860. },
  9861. get escapeParameter() {
  9862. return _escapeParameter;
  9863. },
  9864. set escapeParameter(val) {
  9865. _escapeParameter = val;
  9866. _context.escapeParameter = val;
  9867. },
  9868. t: t2,
  9869. rt: rt2,
  9870. d: d2,
  9871. n: n2,
  9872. te: te2,
  9873. tm,
  9874. getLocaleMessage,
  9875. setLocaleMessage,
  9876. mergeLocaleMessage,
  9877. getDateTimeFormat,
  9878. setDateTimeFormat,
  9879. mergeDateTimeFormat,
  9880. getNumberFormat,
  9881. setNumberFormat,
  9882. mergeNumberFormat,
  9883. getPostTranslationHandler,
  9884. setPostTranslationHandler,
  9885. getMissingHandler,
  9886. setMissingHandler,
  9887. [TransrateVNodeSymbol]: transrateVNode,
  9888. [NumberPartsSymbol]: numberParts,
  9889. [DatetimePartsSymbol]: datetimeParts,
  9890. [SetPluralRulesSymbol]: setPluralRules,
  9891. [InejctWithOption]: options2.__injectWithOption
  9892. // eslint-disable-line @typescript-eslint/no-explicit-any
  9893. };
  9894. {
  9895. composer[EnableEmitter] = (emitter) => {
  9896. _context.__v_emitter = emitter;
  9897. };
  9898. composer[DisableEmitter] = () => {
  9899. _context.__v_emitter = void 0;
  9900. };
  9901. }
  9902. return composer;
  9903. }
  9904. function convertComposerOptions(options2) {
  9905. const locale = isString$1(options2.locale) ? options2.locale : "en-US";
  9906. const fallbackLocale = isString$1(options2.fallbackLocale) || isArray$2(options2.fallbackLocale) || isPlainObject$1(options2.fallbackLocale) || options2.fallbackLocale === false ? options2.fallbackLocale : locale;
  9907. const missing = isFunction$1(options2.missing) ? options2.missing : void 0;
  9908. const missingWarn = isBoolean$1(options2.silentTranslationWarn) || isRegExp$1(options2.silentTranslationWarn) ? !options2.silentTranslationWarn : true;
  9909. const fallbackWarn = isBoolean$1(options2.silentFallbackWarn) || isRegExp$1(options2.silentFallbackWarn) ? !options2.silentFallbackWarn : true;
  9910. const fallbackRoot = isBoolean$1(options2.fallbackRoot) ? options2.fallbackRoot : true;
  9911. const fallbackFormat = !!options2.formatFallbackMessages;
  9912. const modifiers = isPlainObject$1(options2.modifiers) ? options2.modifiers : {};
  9913. const pluralizationRules = options2.pluralizationRules;
  9914. const postTranslation = isFunction$1(options2.postTranslation) ? options2.postTranslation : void 0;
  9915. const warnHtmlMessage = isString$1(options2.warnHtmlInMessage) ? options2.warnHtmlInMessage !== "off" : true;
  9916. const escapeParameter = !!options2.escapeParameterHtml;
  9917. const inheritLocale = isBoolean$1(options2.sync) ? options2.sync : true;
  9918. if (options2.formatter) {
  9919. warn(getWarnMessage(
  9920. 8
  9921. /* NOT_SUPPORTED_FORMATTER */
  9922. ));
  9923. }
  9924. if (options2.preserveDirectiveContent) {
  9925. warn(getWarnMessage(
  9926. 9
  9927. /* NOT_SUPPORTED_PRESERVE_DIRECTIVE */
  9928. ));
  9929. }
  9930. let messages2 = options2.messages;
  9931. if (isPlainObject$1(options2.sharedMessages)) {
  9932. const sharedMessages = options2.sharedMessages;
  9933. const locales = Object.keys(sharedMessages);
  9934. messages2 = locales.reduce((messages22, locale2) => {
  9935. const message = messages22[locale2] || (messages22[locale2] = {});
  9936. assign(message, sharedMessages[locale2]);
  9937. return messages22;
  9938. }, messages2 || {});
  9939. }
  9940. const { __i18n, __root, __injectWithOption } = options2;
  9941. const datetimeFormats = options2.datetimeFormats;
  9942. const numberFormats = options2.numberFormats;
  9943. const flatJson = options2.flatJson;
  9944. return {
  9945. locale,
  9946. fallbackLocale,
  9947. messages: messages2,
  9948. flatJson,
  9949. datetimeFormats,
  9950. numberFormats,
  9951. missing,
  9952. missingWarn,
  9953. fallbackWarn,
  9954. fallbackRoot,
  9955. fallbackFormat,
  9956. modifiers,
  9957. pluralRules: pluralizationRules,
  9958. postTranslation,
  9959. warnHtmlMessage,
  9960. escapeParameter,
  9961. inheritLocale,
  9962. __i18n,
  9963. __root,
  9964. __injectWithOption
  9965. };
  9966. }
  9967. function createVueI18n(options2 = {}) {
  9968. const composer = createComposer(convertComposerOptions(options2));
  9969. const vueI18n = {
  9970. // id
  9971. id: composer.id,
  9972. // locale
  9973. get locale() {
  9974. return composer.locale.value;
  9975. },
  9976. set locale(val) {
  9977. composer.locale.value = val;
  9978. },
  9979. // fallbackLocale
  9980. get fallbackLocale() {
  9981. return composer.fallbackLocale.value;
  9982. },
  9983. set fallbackLocale(val) {
  9984. composer.fallbackLocale.value = val;
  9985. },
  9986. // messages
  9987. get messages() {
  9988. return composer.messages.value;
  9989. },
  9990. // datetimeFormats
  9991. get datetimeFormats() {
  9992. return composer.datetimeFormats.value;
  9993. },
  9994. // numberFormats
  9995. get numberFormats() {
  9996. return composer.numberFormats.value;
  9997. },
  9998. // availableLocales
  9999. get availableLocales() {
  10000. return composer.availableLocales;
  10001. },
  10002. // formatter
  10003. get formatter() {
  10004. warn(getWarnMessage(
  10005. 8
  10006. /* NOT_SUPPORTED_FORMATTER */
  10007. ));
  10008. return {
  10009. interpolate() {
  10010. return [];
  10011. }
  10012. };
  10013. },
  10014. set formatter(val) {
  10015. warn(getWarnMessage(
  10016. 8
  10017. /* NOT_SUPPORTED_FORMATTER */
  10018. ));
  10019. },
  10020. // missing
  10021. get missing() {
  10022. return composer.getMissingHandler();
  10023. },
  10024. set missing(handler) {
  10025. composer.setMissingHandler(handler);
  10026. },
  10027. // silentTranslationWarn
  10028. get silentTranslationWarn() {
  10029. return isBoolean$1(composer.missingWarn) ? !composer.missingWarn : composer.missingWarn;
  10030. },
  10031. set silentTranslationWarn(val) {
  10032. composer.missingWarn = isBoolean$1(val) ? !val : val;
  10033. },
  10034. // silentFallbackWarn
  10035. get silentFallbackWarn() {
  10036. return isBoolean$1(composer.fallbackWarn) ? !composer.fallbackWarn : composer.fallbackWarn;
  10037. },
  10038. set silentFallbackWarn(val) {
  10039. composer.fallbackWarn = isBoolean$1(val) ? !val : val;
  10040. },
  10041. // modifiers
  10042. get modifiers() {
  10043. return composer.modifiers;
  10044. },
  10045. // formatFallbackMessages
  10046. get formatFallbackMessages() {
  10047. return composer.fallbackFormat;
  10048. },
  10049. set formatFallbackMessages(val) {
  10050. composer.fallbackFormat = val;
  10051. },
  10052. // postTranslation
  10053. get postTranslation() {
  10054. return composer.getPostTranslationHandler();
  10055. },
  10056. set postTranslation(handler) {
  10057. composer.setPostTranslationHandler(handler);
  10058. },
  10059. // sync
  10060. get sync() {
  10061. return composer.inheritLocale;
  10062. },
  10063. set sync(val) {
  10064. composer.inheritLocale = val;
  10065. },
  10066. // warnInHtmlMessage
  10067. get warnHtmlInMessage() {
  10068. return composer.warnHtmlMessage ? "warn" : "off";
  10069. },
  10070. set warnHtmlInMessage(val) {
  10071. composer.warnHtmlMessage = val !== "off";
  10072. },
  10073. // escapeParameterHtml
  10074. get escapeParameterHtml() {
  10075. return composer.escapeParameter;
  10076. },
  10077. set escapeParameterHtml(val) {
  10078. composer.escapeParameter = val;
  10079. },
  10080. // preserveDirectiveContent
  10081. get preserveDirectiveContent() {
  10082. warn(getWarnMessage(
  10083. 9
  10084. /* NOT_SUPPORTED_PRESERVE_DIRECTIVE */
  10085. ));
  10086. return true;
  10087. },
  10088. set preserveDirectiveContent(val) {
  10089. warn(getWarnMessage(
  10090. 9
  10091. /* NOT_SUPPORTED_PRESERVE_DIRECTIVE */
  10092. ));
  10093. },
  10094. // pluralizationRules
  10095. get pluralizationRules() {
  10096. return composer.pluralRules || {};
  10097. },
  10098. // for internal
  10099. __composer: composer,
  10100. // t
  10101. t(...args) {
  10102. const [arg1, arg2, arg3] = args;
  10103. const options22 = {};
  10104. let list = null;
  10105. let named = null;
  10106. if (!isString$1(arg1)) {
  10107. throw createI18nError(
  10108. 15
  10109. /* INVALID_ARGUMENT */
  10110. );
  10111. }
  10112. const key = arg1;
  10113. if (isString$1(arg2)) {
  10114. options22.locale = arg2;
  10115. } else if (isArray$2(arg2)) {
  10116. list = arg2;
  10117. } else if (isPlainObject$1(arg2)) {
  10118. named = arg2;
  10119. }
  10120. if (isArray$2(arg3)) {
  10121. list = arg3;
  10122. } else if (isPlainObject$1(arg3)) {
  10123. named = arg3;
  10124. }
  10125. return composer.t(key, list || named || {}, options22);
  10126. },
  10127. rt(...args) {
  10128. return composer.rt(...args);
  10129. },
  10130. // tc
  10131. tc(...args) {
  10132. const [arg1, arg2, arg3] = args;
  10133. const options22 = { plural: 1 };
  10134. let list = null;
  10135. let named = null;
  10136. if (!isString$1(arg1)) {
  10137. throw createI18nError(
  10138. 15
  10139. /* INVALID_ARGUMENT */
  10140. );
  10141. }
  10142. const key = arg1;
  10143. if (isString$1(arg2)) {
  10144. options22.locale = arg2;
  10145. } else if (isNumber$1(arg2)) {
  10146. options22.plural = arg2;
  10147. } else if (isArray$2(arg2)) {
  10148. list = arg2;
  10149. } else if (isPlainObject$1(arg2)) {
  10150. named = arg2;
  10151. }
  10152. if (isString$1(arg3)) {
  10153. options22.locale = arg3;
  10154. } else if (isArray$2(arg3)) {
  10155. list = arg3;
  10156. } else if (isPlainObject$1(arg3)) {
  10157. named = arg3;
  10158. }
  10159. return composer.t(key, list || named || {}, options22);
  10160. },
  10161. // te
  10162. te(key, locale) {
  10163. return composer.te(key, locale);
  10164. },
  10165. // tm
  10166. tm(key) {
  10167. return composer.tm(key);
  10168. },
  10169. // getLocaleMessage
  10170. getLocaleMessage(locale) {
  10171. return composer.getLocaleMessage(locale);
  10172. },
  10173. // setLocaleMessage
  10174. setLocaleMessage(locale, message) {
  10175. composer.setLocaleMessage(locale, message);
  10176. },
  10177. // mergeLocaleMessage
  10178. mergeLocaleMessage(locale, message) {
  10179. composer.mergeLocaleMessage(locale, message);
  10180. },
  10181. // d
  10182. d(...args) {
  10183. return composer.d(...args);
  10184. },
  10185. // getDateTimeFormat
  10186. getDateTimeFormat(locale) {
  10187. return composer.getDateTimeFormat(locale);
  10188. },
  10189. // setDateTimeFormat
  10190. setDateTimeFormat(locale, format2) {
  10191. composer.setDateTimeFormat(locale, format2);
  10192. },
  10193. // mergeDateTimeFormat
  10194. mergeDateTimeFormat(locale, format2) {
  10195. composer.mergeDateTimeFormat(locale, format2);
  10196. },
  10197. // n
  10198. n(...args) {
  10199. return composer.n(...args);
  10200. },
  10201. // getNumberFormat
  10202. getNumberFormat(locale) {
  10203. return composer.getNumberFormat(locale);
  10204. },
  10205. // setNumberFormat
  10206. setNumberFormat(locale, format2) {
  10207. composer.setNumberFormat(locale, format2);
  10208. },
  10209. // mergeNumberFormat
  10210. mergeNumberFormat(locale, format2) {
  10211. composer.mergeNumberFormat(locale, format2);
  10212. },
  10213. // getChoiceIndex
  10214. // eslint-disable-next-line @typescript-eslint/no-unused-vars
  10215. getChoiceIndex(choice, choicesLength) {
  10216. warn(getWarnMessage(
  10217. 10
  10218. /* NOT_SUPPORTED_GET_CHOICE_INDEX */
  10219. ));
  10220. return -1;
  10221. },
  10222. // for internal
  10223. __onComponentInstanceCreated(target) {
  10224. const { componentInstanceCreatedListener } = options2;
  10225. if (componentInstanceCreatedListener) {
  10226. componentInstanceCreatedListener(target, vueI18n);
  10227. }
  10228. }
  10229. };
  10230. {
  10231. vueI18n.__enableEmitter = (emitter) => {
  10232. const __composer = composer;
  10233. __composer[EnableEmitter] && __composer[EnableEmitter](emitter);
  10234. };
  10235. vueI18n.__disableEmitter = () => {
  10236. const __composer = composer;
  10237. __composer[DisableEmitter] && __composer[DisableEmitter]();
  10238. };
  10239. }
  10240. return vueI18n;
  10241. }
  10242. const baseFormatProps = {
  10243. tag: {
  10244. type: [String, Object]
  10245. },
  10246. locale: {
  10247. type: String
  10248. },
  10249. scope: {
  10250. type: String,
  10251. validator: (val) => val === "parent" || val === "global",
  10252. default: "parent"
  10253. },
  10254. i18n: {
  10255. type: Object
  10256. }
  10257. };
  10258. const Translation = {
  10259. /* eslint-disable */
  10260. name: "i18n-t",
  10261. props: assign({
  10262. keypath: {
  10263. type: String,
  10264. required: true
  10265. },
  10266. plural: {
  10267. type: [Number, String],
  10268. // eslint-disable-next-line @typescript-eslint/no-explicit-any
  10269. validator: (val) => isNumber$1(val) || !isNaN(val)
  10270. }
  10271. }, baseFormatProps),
  10272. /* eslint-enable */
  10273. setup(props, context) {
  10274. const { slots, attrs } = context;
  10275. const i18n2 = props.i18n || useI18n({
  10276. useScope: props.scope,
  10277. __useComponent: true
  10278. });
  10279. const keys = Object.keys(slots).filter((key) => key !== "_");
  10280. return () => {
  10281. const options2 = {};
  10282. if (props.locale) {
  10283. options2.locale = props.locale;
  10284. }
  10285. if (props.plural !== void 0) {
  10286. options2.plural = isString$1(props.plural) ? +props.plural : props.plural;
  10287. }
  10288. const arg = getInterpolateArg(context, keys);
  10289. const children = i18n2[TransrateVNodeSymbol](props.keypath, arg, options2);
  10290. const assignedAttrs = assign({}, attrs);
  10291. return isString$1(props.tag) ? vue.h(props.tag, assignedAttrs, children) : isObject$5(props.tag) ? vue.h(props.tag, assignedAttrs, children) : vue.h(vue.Fragment, assignedAttrs, children);
  10292. };
  10293. }
  10294. };
  10295. function getInterpolateArg({ slots }, keys) {
  10296. if (keys.length === 1 && keys[0] === "default") {
  10297. return slots.default ? slots.default() : [];
  10298. } else {
  10299. return keys.reduce((arg, key) => {
  10300. const slot = slots[key];
  10301. if (slot) {
  10302. arg[key] = slot();
  10303. }
  10304. return arg;
  10305. }, {});
  10306. }
  10307. }
  10308. function renderFormatter(props, context, slotKeys, partFormatter) {
  10309. const { slots, attrs } = context;
  10310. return () => {
  10311. const options2 = { part: true };
  10312. let overrides = {};
  10313. if (props.locale) {
  10314. options2.locale = props.locale;
  10315. }
  10316. if (isString$1(props.format)) {
  10317. options2.key = props.format;
  10318. } else if (isObject$5(props.format)) {
  10319. if (isString$1(props.format.key)) {
  10320. options2.key = props.format.key;
  10321. }
  10322. overrides = Object.keys(props.format).reduce((options22, prop) => {
  10323. return slotKeys.includes(prop) ? assign({}, options22, { [prop]: props.format[prop] }) : options22;
  10324. }, {});
  10325. }
  10326. const parts = partFormatter(...[props.value, options2, overrides]);
  10327. let children = [options2.key];
  10328. if (isArray$2(parts)) {
  10329. children = parts.map((part, index2) => {
  10330. const slot = slots[part.type];
  10331. return slot ? slot({ [part.type]: part.value, index: index2, parts }) : [part.value];
  10332. });
  10333. } else if (isString$1(parts)) {
  10334. children = [parts];
  10335. }
  10336. const assignedAttrs = assign({}, attrs);
  10337. return isString$1(props.tag) ? vue.h(props.tag, assignedAttrs, children) : isObject$5(props.tag) ? vue.h(props.tag, assignedAttrs, children) : vue.h(vue.Fragment, assignedAttrs, children);
  10338. };
  10339. }
  10340. const NUMBER_FORMAT_KEYS = [
  10341. "localeMatcher",
  10342. "style",
  10343. "unit",
  10344. "unitDisplay",
  10345. "currency",
  10346. "currencyDisplay",
  10347. "useGrouping",
  10348. "numberingSystem",
  10349. "minimumIntegerDigits",
  10350. "minimumFractionDigits",
  10351. "maximumFractionDigits",
  10352. "minimumSignificantDigits",
  10353. "maximumSignificantDigits",
  10354. "notation",
  10355. "formatMatcher"
  10356. ];
  10357. const NumberFormat = {
  10358. /* eslint-disable */
  10359. name: "i18n-n",
  10360. props: assign({
  10361. value: {
  10362. type: Number,
  10363. required: true
  10364. },
  10365. format: {
  10366. type: [String, Object]
  10367. }
  10368. }, baseFormatProps),
  10369. /* eslint-enable */
  10370. setup(props, context) {
  10371. const i18n2 = props.i18n || useI18n({ useScope: "parent", __useComponent: true });
  10372. return renderFormatter(props, context, NUMBER_FORMAT_KEYS, (...args) => (
  10373. // eslint-disable-next-line @typescript-eslint/no-explicit-any
  10374. i18n2[NumberPartsSymbol](...args)
  10375. ));
  10376. }
  10377. };
  10378. const DATETIME_FORMAT_KEYS = [
  10379. "dateStyle",
  10380. "timeStyle",
  10381. "fractionalSecondDigits",
  10382. "calendar",
  10383. "dayPeriod",
  10384. "numberingSystem",
  10385. "localeMatcher",
  10386. "timeZone",
  10387. "hour12",
  10388. "hourCycle",
  10389. "formatMatcher",
  10390. "weekday",
  10391. "era",
  10392. "year",
  10393. "month",
  10394. "day",
  10395. "hour",
  10396. "minute",
  10397. "second",
  10398. "timeZoneName"
  10399. ];
  10400. const DatetimeFormat = {
  10401. /* eslint-disable */
  10402. name: "i18n-d",
  10403. props: assign({
  10404. value: {
  10405. type: [Number, Date],
  10406. required: true
  10407. },
  10408. format: {
  10409. type: [String, Object]
  10410. }
  10411. }, baseFormatProps),
  10412. /* eslint-enable */
  10413. setup(props, context) {
  10414. const i18n2 = props.i18n || useI18n({ useScope: "parent", __useComponent: true });
  10415. return renderFormatter(props, context, DATETIME_FORMAT_KEYS, (...args) => (
  10416. // eslint-disable-next-line @typescript-eslint/no-explicit-any
  10417. i18n2[DatetimePartsSymbol](...args)
  10418. ));
  10419. }
  10420. };
  10421. function getComposer$2(i18n2, instance) {
  10422. const i18nInternal = i18n2;
  10423. if (i18n2.mode === "composition") {
  10424. return i18nInternal.__getInstance(instance) || i18n2.global;
  10425. } else {
  10426. const vueI18n = i18nInternal.__getInstance(instance);
  10427. return vueI18n != null ? vueI18n.__composer : i18n2.global.__composer;
  10428. }
  10429. }
  10430. function vTDirective(i18n2) {
  10431. const bind2 = (el, { instance, value, modifiers }) => {
  10432. if (!instance || !instance.$) {
  10433. throw createI18nError(
  10434. 22
  10435. /* UNEXPECTED_ERROR */
  10436. );
  10437. }
  10438. const composer = getComposer$2(i18n2, instance.$);
  10439. if (modifiers.preserve) {
  10440. warn(getWarnMessage(
  10441. 7
  10442. /* NOT_SUPPORTED_PRESERVE */
  10443. ));
  10444. }
  10445. const parsedValue = parseValue(value);
  10446. el.textContent = composer.t(...makeParams(parsedValue));
  10447. };
  10448. return {
  10449. beforeMount: bind2,
  10450. beforeUpdate: bind2
  10451. };
  10452. }
  10453. function parseValue(value) {
  10454. if (isString$1(value)) {
  10455. return { path: value };
  10456. } else if (isPlainObject$1(value)) {
  10457. if (!("path" in value)) {
  10458. throw createI18nError(19, "path");
  10459. }
  10460. return value;
  10461. } else {
  10462. throw createI18nError(
  10463. 20
  10464. /* INVALID_VALUE */
  10465. );
  10466. }
  10467. }
  10468. function makeParams(value) {
  10469. const { path, locale, args, choice, plural } = value;
  10470. const options2 = {};
  10471. const named = args || {};
  10472. if (isString$1(locale)) {
  10473. options2.locale = locale;
  10474. }
  10475. if (isNumber$1(choice)) {
  10476. options2.plural = choice;
  10477. }
  10478. if (isNumber$1(plural)) {
  10479. options2.plural = plural;
  10480. }
  10481. return [path, named, options2];
  10482. }
  10483. function apply(app2, i18n2, ...options2) {
  10484. const pluginOptions = isPlainObject$1(options2[0]) ? options2[0] : {};
  10485. const useI18nComponentName = !!pluginOptions.useI18nComponentName;
  10486. const globalInstall = isBoolean$1(pluginOptions.globalInstall) ? pluginOptions.globalInstall : true;
  10487. if (globalInstall && useI18nComponentName) {
  10488. warn(getWarnMessage(11, {
  10489. name: Translation.name
  10490. }));
  10491. }
  10492. if (globalInstall) {
  10493. app2.component(!useI18nComponentName ? Translation.name : "i18n", Translation);
  10494. app2.component(NumberFormat.name, NumberFormat);
  10495. app2.component(DatetimeFormat.name, DatetimeFormat);
  10496. }
  10497. app2.directive("t", vTDirective(i18n2));
  10498. }
  10499. const VUE_I18N_COMPONENT_TYPES = "vue-i18n: composer properties";
  10500. let devtoolsApi;
  10501. async function enableDevTools(app2, i18n2) {
  10502. return new Promise((resolve, reject) => {
  10503. try {
  10504. setupDevtoolsPlugin({
  10505. id: "vue-devtools-plugin-vue-i18n",
  10506. label: VueDevToolsLabels[
  10507. "vue-devtools-plugin-vue-i18n"
  10508. /* PLUGIN */
  10509. ],
  10510. packageName: "vue-i18n",
  10511. homepage: "https://vue-i18n.intlify.dev",
  10512. logo: "https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",
  10513. componentStateTypes: [VUE_I18N_COMPONENT_TYPES],
  10514. app: app2
  10515. }, (api2) => {
  10516. devtoolsApi = api2;
  10517. api2.on.visitComponentTree(({ componentInstance, treeNode }) => {
  10518. updateComponentTreeTags(componentInstance, treeNode, i18n2);
  10519. });
  10520. api2.on.inspectComponent(({ componentInstance, instanceData }) => {
  10521. if (componentInstance.vnode.el.__VUE_I18N__ && instanceData) {
  10522. if (i18n2.mode === "legacy") {
  10523. if (componentInstance.vnode.el.__VUE_I18N__ !== i18n2.global.__composer) {
  10524. inspectComposer(instanceData, componentInstance.vnode.el.__VUE_I18N__);
  10525. }
  10526. } else {
  10527. inspectComposer(instanceData, componentInstance.vnode.el.__VUE_I18N__);
  10528. }
  10529. }
  10530. });
  10531. api2.addInspector({
  10532. id: "vue-i18n-resource-inspector",
  10533. label: VueDevToolsLabels[
  10534. "vue-i18n-resource-inspector"
  10535. /* CUSTOM_INSPECTOR */
  10536. ],
  10537. icon: "language",
  10538. treeFilterPlaceholder: VueDevToolsPlaceholders[
  10539. "vue-i18n-resource-inspector"
  10540. /* CUSTOM_INSPECTOR */
  10541. ]
  10542. });
  10543. api2.on.getInspectorTree((payload) => {
  10544. if (payload.app === app2 && payload.inspectorId === "vue-i18n-resource-inspector") {
  10545. registerScope(payload, i18n2);
  10546. }
  10547. });
  10548. api2.on.getInspectorState((payload) => {
  10549. if (payload.app === app2 && payload.inspectorId === "vue-i18n-resource-inspector") {
  10550. inspectScope(payload, i18n2);
  10551. }
  10552. });
  10553. api2.on.editInspectorState((payload) => {
  10554. if (payload.app === app2 && payload.inspectorId === "vue-i18n-resource-inspector") {
  10555. editScope(payload, i18n2);
  10556. }
  10557. });
  10558. api2.addTimelineLayer({
  10559. id: "vue-i18n-timeline",
  10560. label: VueDevToolsLabels[
  10561. "vue-i18n-timeline"
  10562. /* TIMELINE */
  10563. ],
  10564. color: VueDevToolsTimelineColors[
  10565. "vue-i18n-timeline"
  10566. /* TIMELINE */
  10567. ]
  10568. });
  10569. resolve(true);
  10570. });
  10571. } catch (e2) {
  10572. console.error(e2);
  10573. reject(false);
  10574. }
  10575. });
  10576. }
  10577. function updateComponentTreeTags(instance, treeNode, i18n2) {
  10578. const global2 = i18n2.mode === "composition" ? i18n2.global : i18n2.global.__composer;
  10579. if (instance && instance.vnode.el.__VUE_I18N__) {
  10580. if (instance.vnode.el.__VUE_I18N__ !== global2) {
  10581. const label = instance.type.name || instance.type.displayName || instance.type.__file;
  10582. const tag = {
  10583. label: `i18n (${label} Scope)`,
  10584. textColor: 0,
  10585. backgroundColor: 16764185
  10586. };
  10587. treeNode.tags.push(tag);
  10588. }
  10589. }
  10590. }
  10591. function inspectComposer(instanceData, composer) {
  10592. const type = VUE_I18N_COMPONENT_TYPES;
  10593. instanceData.state.push({
  10594. type,
  10595. key: "locale",
  10596. editable: true,
  10597. value: composer.locale.value
  10598. });
  10599. instanceData.state.push({
  10600. type,
  10601. key: "availableLocales",
  10602. editable: false,
  10603. value: composer.availableLocales
  10604. });
  10605. instanceData.state.push({
  10606. type,
  10607. key: "fallbackLocale",
  10608. editable: true,
  10609. value: composer.fallbackLocale.value
  10610. });
  10611. instanceData.state.push({
  10612. type,
  10613. key: "inheritLocale",
  10614. editable: true,
  10615. value: composer.inheritLocale
  10616. });
  10617. instanceData.state.push({
  10618. type,
  10619. key: "messages",
  10620. editable: false,
  10621. value: getLocaleMessageValue(composer.messages.value)
  10622. });
  10623. instanceData.state.push({
  10624. type,
  10625. key: "datetimeFormats",
  10626. editable: false,
  10627. value: composer.datetimeFormats.value
  10628. });
  10629. instanceData.state.push({
  10630. type,
  10631. key: "numberFormats",
  10632. editable: false,
  10633. value: composer.numberFormats.value
  10634. });
  10635. }
  10636. function getLocaleMessageValue(messages2) {
  10637. const value = {};
  10638. Object.keys(messages2).forEach((key) => {
  10639. const v2 = messages2[key];
  10640. if (isFunction$1(v2) && "source" in v2) {
  10641. value[key] = getMessageFunctionDetails(v2);
  10642. } else if (isObject$5(v2)) {
  10643. value[key] = getLocaleMessageValue(v2);
  10644. } else {
  10645. value[key] = v2;
  10646. }
  10647. });
  10648. return value;
  10649. }
  10650. const ESC = {
  10651. "<": "&lt;",
  10652. ">": "&gt;",
  10653. '"': "&quot;",
  10654. "&": "&amp;"
  10655. };
  10656. function escape$1(s2) {
  10657. return s2.replace(/[<>"&]/g, escapeChar);
  10658. }
  10659. function escapeChar(a2) {
  10660. return ESC[a2] || a2;
  10661. }
  10662. function getMessageFunctionDetails(func) {
  10663. const argString = func.source ? `("${escape$1(func.source)}")` : `(?)`;
  10664. return {
  10665. _custom: {
  10666. type: "function",
  10667. display: `<span>ƒ</span> ${argString}`
  10668. }
  10669. };
  10670. }
  10671. function registerScope(payload, i18n2) {
  10672. payload.rootNodes.push({
  10673. id: "global",
  10674. label: "Global Scope"
  10675. });
  10676. const global2 = i18n2.mode === "composition" ? i18n2.global : i18n2.global.__composer;
  10677. for (const [keyInstance, instance] of i18n2.__instances) {
  10678. const composer = i18n2.mode === "composition" ? instance : instance.__composer;
  10679. if (global2 === composer) {
  10680. continue;
  10681. }
  10682. const label = keyInstance.type.name || keyInstance.type.displayName || keyInstance.type.__file;
  10683. payload.rootNodes.push({
  10684. id: composer.id.toString(),
  10685. label: `${label} Scope`
  10686. });
  10687. }
  10688. }
  10689. function getComposer$1(nodeId, i18n2) {
  10690. if (nodeId === "global") {
  10691. return i18n2.mode === "composition" ? i18n2.global : i18n2.global.__composer;
  10692. } else {
  10693. const instance = Array.from(i18n2.__instances.values()).find((item) => item.id.toString() === nodeId);
  10694. if (instance) {
  10695. return i18n2.mode === "composition" ? instance : instance.__composer;
  10696. } else {
  10697. return null;
  10698. }
  10699. }
  10700. }
  10701. function inspectScope(payload, i18n2) {
  10702. const composer = getComposer$1(payload.nodeId, i18n2);
  10703. if (composer) {
  10704. payload.state = makeScopeInspectState(composer);
  10705. }
  10706. }
  10707. function makeScopeInspectState(composer) {
  10708. const state = {};
  10709. const localeType = "Locale related info";
  10710. const localeStates = [
  10711. {
  10712. type: localeType,
  10713. key: "locale",
  10714. editable: true,
  10715. value: composer.locale.value
  10716. },
  10717. {
  10718. type: localeType,
  10719. key: "fallbackLocale",
  10720. editable: true,
  10721. value: composer.fallbackLocale.value
  10722. },
  10723. {
  10724. type: localeType,
  10725. key: "availableLocales",
  10726. editable: false,
  10727. value: composer.availableLocales
  10728. },
  10729. {
  10730. type: localeType,
  10731. key: "inheritLocale",
  10732. editable: true,
  10733. value: composer.inheritLocale
  10734. }
  10735. ];
  10736. state[localeType] = localeStates;
  10737. const localeMessagesType = "Locale messages info";
  10738. const localeMessagesStates = [
  10739. {
  10740. type: localeMessagesType,
  10741. key: "messages",
  10742. editable: false,
  10743. value: getLocaleMessageValue(composer.messages.value)
  10744. }
  10745. ];
  10746. state[localeMessagesType] = localeMessagesStates;
  10747. const datetimeFormatsType = "Datetime formats info";
  10748. const datetimeFormatsStates = [
  10749. {
  10750. type: datetimeFormatsType,
  10751. key: "datetimeFormats",
  10752. editable: false,
  10753. value: composer.datetimeFormats.value
  10754. }
  10755. ];
  10756. state[datetimeFormatsType] = datetimeFormatsStates;
  10757. const numberFormatsType = "Datetime formats info";
  10758. const numberFormatsStates = [
  10759. {
  10760. type: numberFormatsType,
  10761. key: "numberFormats",
  10762. editable: false,
  10763. value: composer.numberFormats.value
  10764. }
  10765. ];
  10766. state[numberFormatsType] = numberFormatsStates;
  10767. return state;
  10768. }
  10769. function addTimelineEvent(event, payload) {
  10770. if (devtoolsApi) {
  10771. let groupId;
  10772. if (payload && "groupId" in payload) {
  10773. groupId = payload.groupId;
  10774. delete payload.groupId;
  10775. }
  10776. devtoolsApi.addTimelineEvent({
  10777. layerId: "vue-i18n-timeline",
  10778. event: {
  10779. title: event,
  10780. groupId,
  10781. time: Date.now(),
  10782. meta: {},
  10783. data: payload || {},
  10784. logType: event === "compile-error" ? "error" : event === "fallback" || event === "missing" ? "warning" : "default"
  10785. }
  10786. });
  10787. }
  10788. }
  10789. function editScope(payload, i18n2) {
  10790. const composer = getComposer$1(payload.nodeId, i18n2);
  10791. if (composer) {
  10792. const [field] = payload.path;
  10793. if (field === "locale" && isString$1(payload.state.value)) {
  10794. composer.locale.value = payload.state.value;
  10795. } else if (field === "fallbackLocale" && (isString$1(payload.state.value) || isArray$2(payload.state.value) || isObject$5(payload.state.value))) {
  10796. composer.fallbackLocale.value = payload.state.value;
  10797. } else if (field === "inheritLocale" && isBoolean$1(payload.state.value)) {
  10798. composer.inheritLocale = payload.state.value;
  10799. }
  10800. }
  10801. }
  10802. function defineMixin(vuei18n, composer, i18n2) {
  10803. return {
  10804. beforeCreate() {
  10805. const instance = vue.getCurrentInstance();
  10806. if (!instance) {
  10807. throw createI18nError(
  10808. 22
  10809. /* UNEXPECTED_ERROR */
  10810. );
  10811. }
  10812. const options2 = this.$options;
  10813. if (options2.i18n) {
  10814. const optionsI18n = options2.i18n;
  10815. if (options2.__i18n) {
  10816. optionsI18n.__i18n = options2.__i18n;
  10817. }
  10818. optionsI18n.__root = composer;
  10819. if (this === this.$root) {
  10820. this.$i18n = mergeToRoot(vuei18n, optionsI18n);
  10821. } else {
  10822. optionsI18n.__injectWithOption = true;
  10823. this.$i18n = createVueI18n(optionsI18n);
  10824. }
  10825. } else if (options2.__i18n) {
  10826. if (this === this.$root) {
  10827. this.$i18n = mergeToRoot(vuei18n, options2);
  10828. } else {
  10829. this.$i18n = createVueI18n({
  10830. __i18n: options2.__i18n,
  10831. __injectWithOption: true,
  10832. __root: composer
  10833. });
  10834. }
  10835. } else {
  10836. this.$i18n = vuei18n;
  10837. }
  10838. vuei18n.__onComponentInstanceCreated(this.$i18n);
  10839. i18n2.__setInstance(instance, this.$i18n);
  10840. this.$t = (...args) => this.$i18n.t(...args);
  10841. this.$rt = (...args) => this.$i18n.rt(...args);
  10842. this.$tc = (...args) => this.$i18n.tc(...args);
  10843. this.$te = (key, locale) => this.$i18n.te(key, locale);
  10844. this.$d = (...args) => this.$i18n.d(...args);
  10845. this.$n = (...args) => this.$i18n.n(...args);
  10846. this.$tm = (key) => this.$i18n.tm(key);
  10847. },
  10848. mounted() {
  10849. {
  10850. this.$el.__VUE_I18N__ = this.$i18n.__composer;
  10851. const emitter = this.__v_emitter = createEmitter();
  10852. const _vueI18n = this.$i18n;
  10853. _vueI18n.__enableEmitter && _vueI18n.__enableEmitter(emitter);
  10854. emitter.on("*", addTimelineEvent);
  10855. }
  10856. },
  10857. beforeUnmount() {
  10858. const instance = vue.getCurrentInstance();
  10859. if (!instance) {
  10860. throw createI18nError(
  10861. 22
  10862. /* UNEXPECTED_ERROR */
  10863. );
  10864. }
  10865. {
  10866. if (this.__v_emitter) {
  10867. this.__v_emitter.off("*", addTimelineEvent);
  10868. delete this.__v_emitter;
  10869. }
  10870. const _vueI18n = this.$i18n;
  10871. _vueI18n.__disableEmitter && _vueI18n.__disableEmitter();
  10872. delete this.$el.__VUE_I18N__;
  10873. }
  10874. delete this.$t;
  10875. delete this.$rt;
  10876. delete this.$tc;
  10877. delete this.$te;
  10878. delete this.$d;
  10879. delete this.$n;
  10880. delete this.$tm;
  10881. i18n2.__deleteInstance(instance);
  10882. delete this.$i18n;
  10883. }
  10884. };
  10885. }
  10886. function mergeToRoot(root, options2) {
  10887. root.locale = options2.locale || root.locale;
  10888. root.fallbackLocale = options2.fallbackLocale || root.fallbackLocale;
  10889. root.missing = options2.missing || root.missing;
  10890. root.silentTranslationWarn = options2.silentTranslationWarn || root.silentFallbackWarn;
  10891. root.silentFallbackWarn = options2.silentFallbackWarn || root.silentFallbackWarn;
  10892. root.formatFallbackMessages = options2.formatFallbackMessages || root.formatFallbackMessages;
  10893. root.postTranslation = options2.postTranslation || root.postTranslation;
  10894. root.warnHtmlInMessage = options2.warnHtmlInMessage || root.warnHtmlInMessage;
  10895. root.escapeParameterHtml = options2.escapeParameterHtml || root.escapeParameterHtml;
  10896. root.sync = options2.sync || root.sync;
  10897. root.__composer[SetPluralRulesSymbol](options2.pluralizationRules || root.pluralizationRules);
  10898. const messages2 = getLocaleMessages(root.locale, {
  10899. messages: options2.messages,
  10900. __i18n: options2.__i18n
  10901. });
  10902. Object.keys(messages2).forEach((locale) => root.mergeLocaleMessage(locale, messages2[locale]));
  10903. if (options2.datetimeFormats) {
  10904. Object.keys(options2.datetimeFormats).forEach((locale) => root.mergeDateTimeFormat(locale, options2.datetimeFormats[locale]));
  10905. }
  10906. if (options2.numberFormats) {
  10907. Object.keys(options2.numberFormats).forEach((locale) => root.mergeNumberFormat(locale, options2.numberFormats[locale]));
  10908. }
  10909. return root;
  10910. }
  10911. function createI18n(options2 = {}) {
  10912. const __legacyMode = isBoolean$1(options2.legacy) ? options2.legacy : true;
  10913. const __globalInjection = !!options2.globalInjection;
  10914. const __instances = /* @__PURE__ */ new Map();
  10915. const __global = __legacyMode ? createVueI18n(options2) : createComposer(options2);
  10916. const symbol = makeSymbol("vue-i18n");
  10917. const i18n2 = {
  10918. // mode
  10919. get mode() {
  10920. return __legacyMode ? "legacy" : "composition";
  10921. },
  10922. // install plugin
  10923. async install(app2, ...options22) {
  10924. {
  10925. app2.__VUE_I18N__ = i18n2;
  10926. }
  10927. app2.__VUE_I18N_SYMBOL__ = symbol;
  10928. app2.provide(app2.__VUE_I18N_SYMBOL__, i18n2);
  10929. if (!__legacyMode && __globalInjection) {
  10930. injectGlobalFields(app2, i18n2.global);
  10931. }
  10932. {
  10933. apply(app2, i18n2, ...options22);
  10934. }
  10935. if (__legacyMode) {
  10936. app2.mixin(defineMixin(__global, __global.__composer, i18n2));
  10937. }
  10938. {
  10939. const ret = await enableDevTools(app2, i18n2);
  10940. if (!ret) {
  10941. throw createI18nError(
  10942. 21
  10943. /* CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN */
  10944. );
  10945. }
  10946. const emitter = createEmitter();
  10947. if (__legacyMode) {
  10948. const _vueI18n = __global;
  10949. _vueI18n.__enableEmitter && _vueI18n.__enableEmitter(emitter);
  10950. } else {
  10951. const _composer = __global;
  10952. _composer[EnableEmitter] && _composer[EnableEmitter](emitter);
  10953. }
  10954. emitter.on("*", addTimelineEvent);
  10955. }
  10956. },
  10957. // global accessor
  10958. get global() {
  10959. return __global;
  10960. },
  10961. // @internal
  10962. __instances,
  10963. // @internal
  10964. __getInstance(component) {
  10965. return __instances.get(component) || null;
  10966. },
  10967. // @internal
  10968. __setInstance(component, instance) {
  10969. __instances.set(component, instance);
  10970. },
  10971. // @internal
  10972. __deleteInstance(component) {
  10973. __instances.delete(component);
  10974. }
  10975. };
  10976. return i18n2;
  10977. }
  10978. function useI18n(options2 = {}) {
  10979. const instance = vue.getCurrentInstance();
  10980. if (instance == null) {
  10981. throw createI18nError(
  10982. 16
  10983. /* MUST_BE_CALL_SETUP_TOP */
  10984. );
  10985. }
  10986. if (!instance.appContext.app.__VUE_I18N_SYMBOL__) {
  10987. throw createI18nError(
  10988. 17
  10989. /* NOT_INSLALLED */
  10990. );
  10991. }
  10992. const i18n2 = vue.inject(instance.appContext.app.__VUE_I18N_SYMBOL__);
  10993. if (!i18n2) {
  10994. throw createI18nError(
  10995. 22
  10996. /* UNEXPECTED_ERROR */
  10997. );
  10998. }
  10999. const global2 = i18n2.mode === "composition" ? i18n2.global : i18n2.global.__composer;
  11000. const scope = isEmptyObject(options2) ? "__i18n" in instance.type ? "local" : "global" : !options2.useScope ? "local" : options2.useScope;
  11001. if (scope === "global") {
  11002. let messages2 = isObject$5(options2.messages) ? options2.messages : {};
  11003. if ("__i18nGlobal" in instance.type) {
  11004. messages2 = getLocaleMessages(global2.locale.value, {
  11005. messages: messages2,
  11006. __i18n: instance.type.__i18nGlobal
  11007. });
  11008. }
  11009. const locales = Object.keys(messages2);
  11010. if (locales.length) {
  11011. locales.forEach((locale) => {
  11012. global2.mergeLocaleMessage(locale, messages2[locale]);
  11013. });
  11014. }
  11015. if (isObject$5(options2.datetimeFormats)) {
  11016. const locales2 = Object.keys(options2.datetimeFormats);
  11017. if (locales2.length) {
  11018. locales2.forEach((locale) => {
  11019. global2.mergeDateTimeFormat(locale, options2.datetimeFormats[locale]);
  11020. });
  11021. }
  11022. }
  11023. if (isObject$5(options2.numberFormats)) {
  11024. const locales2 = Object.keys(options2.numberFormats);
  11025. if (locales2.length) {
  11026. locales2.forEach((locale) => {
  11027. global2.mergeNumberFormat(locale, options2.numberFormats[locale]);
  11028. });
  11029. }
  11030. }
  11031. return global2;
  11032. }
  11033. if (scope === "parent") {
  11034. let composer2 = getComposer(i18n2, instance, options2.__useComponent);
  11035. if (composer2 == null) {
  11036. {
  11037. warn(getWarnMessage(
  11038. 12
  11039. /* NOT_FOUND_PARENT_SCOPE */
  11040. ));
  11041. }
  11042. composer2 = global2;
  11043. }
  11044. return composer2;
  11045. }
  11046. if (i18n2.mode === "legacy") {
  11047. throw createI18nError(
  11048. 18
  11049. /* NOT_AVAILABLE_IN_LEGACY_MODE */
  11050. );
  11051. }
  11052. const i18nInternal = i18n2;
  11053. let composer = i18nInternal.__getInstance(instance);
  11054. if (composer == null) {
  11055. const type = instance.type;
  11056. const composerOptions = assign({}, options2);
  11057. if (type.__i18n) {
  11058. composerOptions.__i18n = type.__i18n;
  11059. }
  11060. if (global2) {
  11061. composerOptions.__root = global2;
  11062. }
  11063. composer = createComposer(composerOptions);
  11064. setupLifeCycle(i18nInternal, instance, composer);
  11065. i18nInternal.__setInstance(instance, composer);
  11066. }
  11067. return composer;
  11068. }
  11069. function getComposer(i18n2, target, useComponent = false) {
  11070. let composer = null;
  11071. const root = target.root;
  11072. let current = target.parent;
  11073. while (current != null) {
  11074. const i18nInternal = i18n2;
  11075. if (i18n2.mode === "composition") {
  11076. composer = i18nInternal.__getInstance(current);
  11077. } else {
  11078. const vueI18n = i18nInternal.__getInstance(current);
  11079. if (vueI18n != null) {
  11080. composer = vueI18n.__composer;
  11081. }
  11082. if (useComponent && composer && !composer[InejctWithOption]) {
  11083. composer = null;
  11084. }
  11085. }
  11086. if (composer != null) {
  11087. break;
  11088. }
  11089. if (root === current) {
  11090. break;
  11091. }
  11092. current = current.parent;
  11093. }
  11094. return composer;
  11095. }
  11096. function setupLifeCycle(i18n2, target, composer) {
  11097. let emitter = null;
  11098. vue.onMounted(() => {
  11099. if (target.vnode.el) {
  11100. target.vnode.el.__VUE_I18N__ = composer;
  11101. emitter = createEmitter();
  11102. const _composer = composer;
  11103. _composer[EnableEmitter] && _composer[EnableEmitter](emitter);
  11104. emitter.on("*", addTimelineEvent);
  11105. }
  11106. }, target);
  11107. vue.onUnmounted(() => {
  11108. if (target.vnode.el && target.vnode.el.__VUE_I18N__) {
  11109. emitter && emitter.off("*", addTimelineEvent);
  11110. const _composer = composer;
  11111. _composer[DisableEmitter] && _composer[DisableEmitter]();
  11112. delete target.vnode.el.__VUE_I18N__;
  11113. }
  11114. i18n2.__deleteInstance(target);
  11115. }, target);
  11116. }
  11117. const globalExportProps = [
  11118. "locale",
  11119. "fallbackLocale",
  11120. "availableLocales"
  11121. ];
  11122. const globalExportMethods = ["t", "rt", "d", "n", "tm"];
  11123. function injectGlobalFields(app2, composer) {
  11124. const i18n2 = /* @__PURE__ */ Object.create(null);
  11125. globalExportProps.forEach((prop) => {
  11126. const desc = Object.getOwnPropertyDescriptor(composer, prop);
  11127. if (!desc) {
  11128. throw createI18nError(
  11129. 22
  11130. /* UNEXPECTED_ERROR */
  11131. );
  11132. }
  11133. const wrap = vue.isRef(desc.value) ? {
  11134. get() {
  11135. return desc.value.value;
  11136. },
  11137. // eslint-disable-next-line @typescript-eslint/no-explicit-any
  11138. set(val) {
  11139. desc.value.value = val;
  11140. }
  11141. } : {
  11142. get() {
  11143. return desc.get && desc.get();
  11144. }
  11145. };
  11146. Object.defineProperty(i18n2, prop, wrap);
  11147. });
  11148. app2.config.globalProperties.$i18n = i18n2;
  11149. globalExportMethods.forEach((method) => {
  11150. const desc = Object.getOwnPropertyDescriptor(composer, method);
  11151. if (!desc || !desc.value) {
  11152. throw createI18nError(
  11153. 22
  11154. /* UNEXPECTED_ERROR */
  11155. );
  11156. }
  11157. Object.defineProperty(app2.config.globalProperties, `$${method}`, desc);
  11158. });
  11159. }
  11160. {
  11161. initFeatureFlags();
  11162. }
  11163. {
  11164. const target = getGlobalThis();
  11165. target.__INTLIFY__ = true;
  11166. setDevToolsHook(target.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__);
  11167. }
  11168. const settings$1 = "Settings";
  11169. const agreement$1 = "User privacy Agreement";
  11170. const user_management$1 = "User management";
  11171. const role_management$1 = "Role management";
  11172. const menu_management$1 = "Menu management";
  11173. const post_management$1 = "Position management";
  11174. const org_management$1 = "Organization management";
  11175. const add_user$1 = "Add a user";
  11176. const about$1 = "About";
  11177. const common$1 = {
  11178. letcgo: "letcgo",
  11179. home: "Home",
  11180. category: "Category",
  11181. cart: "Cart",
  11182. my: "My",
  11183. product: "Product",
  11184. review: "Review",
  11185. detail: "Detail",
  11186. view_all: "View All",
  11187. none: "None",
  11188. all: "All",
  11189. search_products: "Search Products",
  11190. buy_now: "Buy Now",
  11191. sold: "Sold",
  11192. sales_volume: "Sales Volume",
  11193. go_buy: "Go Buy",
  11194. add_to_cart: "Add to Cart",
  11195. redeem_now: "Redeem Now",
  11196. sold_out: "Sold Out",
  11197. product_not_exist: "Product not available or has been removed",
  11198. awaiting_your_first_review: "Awaiting Your First Review",
  11199. browse_more: "Browse More",
  11200. select_product_options: "Please Select Product Options",
  11201. favorite: "Favorite",
  11202. unfavorite: "Unfavorite",
  11203. favorite_success: "Favorite Success",
  11204. points: "Points",
  11205. cancel: "Cancel",
  11206. confirm: "Confirm",
  11207. submit: "Submit",
  11208. save: "Save",
  11209. "delete": "Delete",
  11210. edit: "Edit",
  11211. close: "Close",
  11212. back: "Back",
  11213. next: "Next",
  11214. previous: "Previous",
  11215. yes: "Yes",
  11216. no: "No",
  11217. ok: "OK",
  11218. post: "Post",
  11219. loading: "Loading...",
  11220. refresh: "Refresh",
  11221. search: "Search",
  11222. reset: "Reset",
  11223. add: "Add",
  11224. update: "Update",
  11225. upload: "Upload",
  11226. download: "Download",
  11227. level: "Level",
  11228. no_level: "No Level",
  11229. select: "Select",
  11230. select_product_specification: "Please Select Product Specification",
  11231. clear: "Clear",
  11232. delete_footprint: "Delete Footprint",
  11233. select_all: "Select All",
  11234. my_footprints: "My Footprints",
  11235. total_goods: "Total {number} items",
  11236. recommended: "Recommended",
  11237. price_asc: "Price Low-High",
  11238. price_desc: "Price High-Low",
  11239. sales: "Sales",
  11240. newest: "Newest",
  11241. enter_keywords: "Enter Keywords",
  11242. checkout: "Checkout",
  11243. total: "Total",
  11244. "default": "Default",
  11245. empty_cart: "Your cart is empty, go shop around!",
  11246. select_area: "Select Area",
  11247. click_to_load_more: "Click to Load More",
  11248. system: "System",
  11249. current_version: "Current Version",
  11250. local_cache: "Local Cache",
  11251. about_us: "About Us",
  11252. logout_account: "Log Out",
  11253. confirm_logout: "Confirm Log Out?",
  11254. no_data: "No Data",
  11255. uploading: "Uploading",
  11256. verifying: "Verifying",
  11257. fetching: "Fetching",
  11258. save_success: "Save Successful",
  11259. update_success: "Update Successful",
  11260. logging_in: "Logging In",
  11261. login_success: "Login Successful",
  11262. registering: "Registering",
  11263. register_success: "Registration Successful",
  11264. sending: "Sending",
  11265. send_success: "Send Successful",
  11266. binding: "Binding",
  11267. bind_success: "Bind Successful",
  11268. unbind: "Unbinding",
  11269. unbind_success: "Unbind Successful",
  11270. claiming: "Claiming",
  11271. claim_success: "Claim Successful",
  11272. collect_success: "Collect Successful",
  11273. cancel_success: "Cancel Successful",
  11274. delete_success: "Delete Successful",
  11275. clear_success: "Clear Successful",
  11276. apply_success: "Apply Successful",
  11277. change_success: "Change Successful",
  11278. added_to_cart: "Added to Cart",
  11279. just_now: "Just Now",
  11280. minutes_ago: "{m} Minutes Ago",
  11281. hours_ago: "{h} Hours Ago",
  11282. days_ago: "{d} Days Ago",
  11283. months_ago: "{m} Months Ago",
  11284. years_ago: "{y} Years Ago",
  11285. copy_success: "Copy Successful!",
  11286. copy_fail: "Copy Failed!",
  11287. sms_error: "SMS Sending Error",
  11288. try_later: "Please Try Later",
  11289. phone_format_error: "Incorrect Phone Format",
  11290. get_verification_code: "Get Code",
  11291. use_wechat_browser: "Please Open in WeChat Browser",
  11292. platform_not_supported: "Platform Not Supported",
  11293. payment_manually_cancelled: "Payment Manually Cancelled",
  11294. alipay_payment: "Alipay Payment",
  11295. copy_link_to_browser: "Copy Link to Browser",
  11296. copy_link: "Copy Link",
  11297. wechat_payment: "WeChat Payment",
  11298. bind_wechat_for_payment: "Bind WeChat for Payment",
  11299. bind: "Bind",
  11300. balance_payment: "Balance Payment",
  11301. mock_payment: "Mock Payment",
  11302. update_prompt: "Update Prompt",
  11303. new_version_ready: "New Version Ready, Restart Now?",
  11304. latest_version: "Latest Version",
  11305. server_error_try_later: "Server Error, Please Try Later",
  11306. network_request_error: "Network Request Error",
  11307. request_error: "Request Error",
  11308. login_expired: "Your Login Has Expired",
  11309. please_login: "Please Log In",
  11310. access_denied: "Access Denied",
  11311. request_timeout: "Request Timeout",
  11312. frequent_requests: "Frequent Requests, Please Try Later",
  11313. server_unavailable: "Service Unimplemented",
  11314. network_error: "Network Error",
  11315. service_unavailable: "Service Unavailable",
  11316. network_timeout: "Network Timeout",
  11317. http_not_supported: "HTTP Version Not Supported",
  11318. server_exception: "Server Exception",
  11319. check_network_connection: "Check Your Network Connection",
  11320. not_bound_wechat: "WeChat Not Bound, Please Bind First",
  11321. platform_intro: "Platform Intro",
  11322. industry_intro: "Industry Intro",
  11323. latest_news: "Latest News",
  11324. shared_mall: "Shared Mall",
  11325. activities: "Activities",
  11326. videos: "Videos",
  11327. mall: "Mall",
  11328. shop_index: "Shop Index",
  11329. shop_category: "Shop Category",
  11330. all_product: "All Product"
  11331. };
  11332. const account$1 = {
  11333. account_login: "Account Login",
  11334. sms_login: "SMS Login",
  11335. register: "Register",
  11336. read_and_agree: "I have read and agree to the",
  11337. user_agreement: "User Agreement",
  11338. privacy_policy: "Privacy Policy",
  11339. and: "and",
  11340. wechat_authorization_login: "WeChat Authorization Login",
  11341. wechat_authorization_register: "WeChat Authorization Register",
  11342. please_agree: "Please check to agree",
  11343. register_by_sharing_only: "You can only register via sharing",
  11344. quick_login_failed: "Quick Login Failed",
  11345. username: "Username",
  11346. password: "Password",
  11347. enter_username: "Enter Username",
  11348. enter_valid_username: "Please enter a valid username!",
  11349. enter_password: "Enter Password",
  11350. login: "Login",
  11351. phone_number: "Phone",
  11352. verification_code: "Verification Code",
  11353. enter_verification_code: "Enter Verification Code",
  11354. get_verification_code: "Get Code",
  11355. incorrect_phone_format: "Incorrect Phone Format",
  11356. enter_phone_number: "Enter Phone Number",
  11357. username_exists: "Username Already Exists!",
  11358. change_phone_number: "Change Phone",
  11359. bind_phone_number: "Bind Phone",
  11360. old_phone_number: "Old Phone",
  11361. enter_old_phone_number: "Enter Old Phone",
  11362. security_notice: "For security, use your personal phone number",
  11363. new_phone_number: "New Phone",
  11364. enter_new_phone_number: "Enter New Phone",
  11365. login_again: "Update Successful, Log In Again",
  11366. change_password: "Change Password",
  11367. cancel_change: "Cancel Change",
  11368. password_requirements: "6-12 chars with letters & numbers",
  11369. modification_successful: "Successful Update",
  11370. authorization_info: "Authorization Info",
  11371. complete_profile: "Complete Your Profile",
  11372. avatar: "Avatar",
  11373. select_avatar: "Select Avatar",
  11374. nickname: "Nickname",
  11375. enter_nickname: "Enter Nickname",
  11376. confirm_authorization: "Confirm Authorization",
  11377. authorization_successful: "Authorization Successful",
  11378. first_time_login: "First-time Login, Verify Phone",
  11379. continue_login: "Continue Login",
  11380. change_alipay_account: "Change Alipay Account",
  11381. bind_alipay_account: "Bind Alipay Account",
  11382. bind_realname_alipay: "Bind Real-name Verified Alipay Account",
  11383. name: "Name",
  11384. enter_name: "Enter Name",
  11385. account: "Account",
  11386. enter_account: "Enter Account",
  11387. change_bank_card: "Change Bank Card",
  11388. bind_bank_card: "Bind Bank Card",
  11389. bank_branch: "Bank Branch",
  11390. bank_branch_example: "E.g., XX Bank Ltd. XX Branch",
  11391. account_holder: "Account Holder",
  11392. account_holder_name: "Holder's Name",
  11393. bank_account_number: "Bank Account Number",
  11394. select_account_login: "Select Account Login",
  11395. wechat_no_bind: "This WeChat is not linked to any account, please use another login method",
  11396. wechat_register: "WeChat Register",
  11397. wechat_no_account: "Your WeChat has no account, please register via sharing"
  11398. };
  11399. const review$1 = {
  11400. all_reviews: "All Reviews",
  11401. positive: "Positive",
  11402. neutral: "Neutral",
  11403. negative: "Negative"
  11404. };
  11405. const confirm$1 = {
  11406. confirm_order: "Confirm Order",
  11407. shipping_fee: "Shipping Fee",
  11408. free_shipping: "Free Shipping",
  11409. order_note: "Order Note",
  11410. communication_advice: "Contact seller first",
  11411. quantity: "Quantity",
  11412. price_details: "Price Details",
  11413. total_price: "Total Price",
  11414. total_items: "Total {count} items",
  11415. commission_deduction: "Commission Deduction",
  11416. deduction: "Deduct {count} yuan",
  11417. no_commission: "No Commission Use",
  11418. consumption_point_deduction: "Point Use",
  11419. no_consumption_points: "No Consumption Points",
  11420. total_items_count: "Total {count} items",
  11421. submit_order: "Submit Order",
  11422. select_shipping_address: "Select Shipping Address",
  11423. insufficient_commission: "Insufficient Commission",
  11424. insufficient_consumption_points: "Insufficient Consumption Points",
  11425. commission_points_no_mix: "Cannot Combine Commission with Consumption Points"
  11426. };
  11427. const address$1 = {
  11428. select_shipping_address: "Select Shipping Address",
  11429. shipping_address: "Shipping Address",
  11430. import_wechat_address: "Import from WeChat",
  11431. add_new_shipping_address: "Add Address",
  11432. no_shipping_address: "No Shipping Address",
  11433. edit_address: "Edit Address",
  11434. add_address: "Add Address",
  11435. recipient: "Recipient",
  11436. enter_recipient_name: "Enter Recipient's Name",
  11437. province_city_district: "Province/City/District",
  11438. select_province_city_district: "Select Province/City/District",
  11439. detailed_address: "Detailed Address",
  11440. enter_detailed_address: "Enter Detailed Address",
  11441. set_as_default_address: "Set as Default Address",
  11442. confirm_delete_address: "Confirm Delete This Address?",
  11443. virtual_goods_address: "Virtual Address",
  11444. edit_virtual_address: "Edit Virtual Address",
  11445. add_virtual_address: "Add Virtual Address",
  11446. set_as_default_virtual_address: "Set as Default Virtual Address"
  11447. };
  11448. const selectSku$1 = {
  11449. insufficient_stock: "Insufficient Stock",
  11450. select_specification: "Select Specification",
  11451. amount_less_than_min: "Amount Less Than Minimum Purchase",
  11452. insufficient_points: "Insufficient Points",
  11453. min_points_required: "Minimum of 1 Point Required",
  11454. purchase_quantity: "Purchase Quantity",
  11455. purchase_amount: "Purchase Amount",
  11456. available_points: "Available Points: {points}"
  11457. };
  11458. const cashier$1 = {
  11459. cashier: "Cashier",
  11460. select_payment_method: "Select Payment Method",
  11461. phone_number: "Phone Number",
  11462. enter_phone_number: "Enter Phone Number",
  11463. verification_code: "Verification Code",
  11464. enter_verification_code: "Enter Verification Code",
  11465. checking_payment_environment: "Checking Payment Environment",
  11466. payment_expired: "Payment Expired",
  11467. pay_now: "Pay Now",
  11468. verification_code_cannot_be_empty: "Verification Code Cannot Be Empty",
  11469. choose_payment_method: "Choose Payment Method",
  11470. order_paid: "Order Paid",
  11471. no_payment_order_found: "No Payment Order Found",
  11472. remaining_payment_time: "Remaining Payment Time {h}:{m}:{s}"
  11473. };
  11474. const share$1 = {
  11475. share: "Share",
  11476. poster_loading: "Poster Loading...",
  11477. long_press_to_save: "Long Press to Save",
  11478. save_success: "Save Successful",
  11479. save_failure: "Save Failed"
  11480. };
  11481. const merchant$1 = {
  11482. merchant_registration: "Merchant Signup",
  11483. merchant_name: "Merchant Name",
  11484. enter_merchant_name: "Enter Merchant Name",
  11485. contact_person: "Contact Person",
  11486. enter_contact_person: "Enter Contact Person",
  11487. contact_phone: "Contact Phone",
  11488. enter_contact_phone: "Enter Contact Phone",
  11489. legal_person: "Legal Representative",
  11490. enter_legal_person: "Enter Legal Representative",
  11491. legal_person_phone: "Legal Representative Phone",
  11492. enter_legal_person_phone: "Enter Legal Representative Phone",
  11493. legal_person_id_front: "Legal ID Front",
  11494. legal_person_id_back: "Legal ID Back",
  11495. location: "Location",
  11496. email: "Email",
  11497. enter_email: "Enter Email",
  11498. office_address: "Office Address",
  11499. enter_office_address: "Enter Office Address",
  11500. rights_phone: "Rights Phone",
  11501. enter_rights_phone: "Enter Rights Phone",
  11502. customer_service_phone: "Customer Service Phone",
  11503. enter_customer_service_phone: "Enter Customer Service Phone",
  11504. website: "Website",
  11505. enter_website: "Enter Website",
  11506. bank: "Bank",
  11507. enter_bank: "Enter Bank",
  11508. account_name: "Account Name",
  11509. enter_account_name: "Enter Account Name",
  11510. account_number: "Account Number",
  11511. enter_account_number: "Enter Account Number",
  11512. business_license: "Business License",
  11513. brand_authorization: "Brand Authorization",
  11514. download_template: "Download Template",
  11515. other_certificates: "Other Certificates",
  11516. introduction: "Introduction",
  11517. enter_introduction: "Enter Introduction",
  11518. status: "Status",
  11519. review_in_progress: "Review in Progress",
  11520. review_records: "Review Records",
  11521. changes: "Changes",
  11522. save_and_submit: "Save and Submit",
  11523. existing_merchant_alert: "Existing merchant account for user ({user}), please apply with a different account!",
  11524. merchant_name_required: "Merchant name is required",
  11525. introduction_required: "Introduction is required",
  11526. contact_required: "Contact is required",
  11527. contact_phone_required: "Contact phone is required",
  11528. customer_service_phone_required: "Customer service phone is required",
  11529. legal_person_required: "Legal representative is required",
  11530. legal_person_phone_required: "Legal representative phone is required",
  11531. account_name_required: "Account name is required",
  11532. account_number_required: "Account number is required",
  11533. bank_required: "Bank is required",
  11534. under_review: "Under Review",
  11535. approved: "Approved",
  11536. rejected: "Rejected",
  11537. non_exclusive_authorization: "Non-exclusive Brand Authorization",
  11538. select_location: "Select Location",
  11539. select_legal_person_id_front: "Select Upload of Legal ID Front (National Emblem)",
  11540. select_legal_person_id_back: "Select Upload of Legal ID Back (Portrait)",
  11541. upload_business_license: "Upload Business License",
  11542. upload_brand_authorization: "Upload Brand Authorization"
  11543. };
  11544. const useGoods$1 = {
  11545. redeemed: "Redeemed",
  11546. in_stock: "In Stock",
  11547. pending_payment: "Pending Payment",
  11548. awaiting_shipment: "Awaiting Shipment",
  11549. awaiting_write_off: "Awaiting Write-off",
  11550. awaiting_delivery: "Awaiting Delivery",
  11551. awaiting_review: "Awaiting Review",
  11552. completed: "Completed",
  11553. closed: "Closed",
  11554. complete_payment_by: "Please complete the payment by {time}",
  11555. merchant_not_shipped: "Merchant has not shipped yet, please be patient",
  11556. merchant_shipped: "Merchant has shipped, please be patient",
  11557. goods_received: "Goods received, go leave a review",
  11558. transaction_completed: "Transaction completed, thank you for your support",
  11559. transaction_closed: "Transaction closed",
  11560. apply_for_after_sales: "Apply for after-sales",
  11561. goods_awaiting_return: "Goods awaiting return",
  11562. merchant_awaiting_goods: "Merchant awaiting goods",
  11563. waiting_for_refund: "Waiting for refund",
  11564. refund_successful: "Refund successful",
  11565. buyer_cancelled: "Buyer cancelled",
  11566. merchant_refused: "Merchant refused",
  11567. merchant_refused_goods: "Merchant refused to receive goods",
  11568. unknown_status: "Unknown status",
  11569. refund_request_awaiting_merchant: "Refund request awaiting merchant",
  11570. return_goods_fill_logistics: "Return goods and fill logistics information",
  11571. return_refund_request_awaiting_merchant: "Return and refund request awaiting merchant",
  11572. refund_closed: "Refund closed",
  11573. merchant_disagrees_with_refund_request: "Merchant disagrees with refund request, reason:",
  11574. merchant_refuses_to_accept_goods: "Merchant refuses to accept goods, disagrees with refund, reason:"
  11575. };
  11576. const menu$1 = {
  11577. quick_menu: "Quick Menu",
  11578. search: "Search",
  11579. personal_center: "Center",
  11580. shopping_cart: "Cart",
  11581. browsing_history: "History",
  11582. my_favorites: "Favorites",
  11583. customer_service: "Service"
  11584. };
  11585. const user$3 = {
  11586. name: "Name",
  11587. username: "Username",
  11588. nickname: "Nickname",
  11589. password: "Password",
  11590. confirm_password: "Confirm password",
  11591. email: "Email",
  11592. phone: "Phone",
  11593. avatar: "Avatar",
  11594. status: "Status",
  11595. create_time: "Create time",
  11596. update_time: "Update time",
  11597. last_login_time: "Last login time",
  11598. last_login_ip: "Last login ip",
  11599. clear_cache: "Clera cache",
  11600. switch_language: "Switch language",
  11601. log_out: "Log out",
  11602. change: "Change",
  11603. sex: "Sex",
  11604. male: "Male",
  11605. female: "Female",
  11606. user_info: "User Information",
  11607. unbind_reminder: "Unbinding Reminder",
  11608. please_login: "Please Login"
  11609. };
  11610. const wallet$1 = {
  11611. wallet: "Wallet",
  11612. balance: "Balance",
  11613. commission: "Commission",
  11614. consumption_points: "Consumption",
  11615. team: "Team",
  11616. people: "People",
  11617. generation_rules: "Net Worth Rules",
  11618. benefits: "Net Worth Benefits",
  11619. recharge: "Recharge",
  11620. withdraw: "Withdraw",
  11621. transfer_points: "Transfer Points",
  11622. points_transfer: "Points Transfer",
  11623. current_peak: "Current Peak Available:",
  11624. commission_record: "Commission Record",
  11625. points_record: "Points Record",
  11626. withdrawal: "Withdrawal (expected within 24 hours)",
  11627. commission_rules: "Commission Calculation Rules",
  11628. exceed_limit: "Exceed Limit",
  11629. withdrawal_records: "Withdrawal Records",
  11630. wechat: "WeChat",
  11631. alipay: "Alipay",
  11632. bank_card: "Bank Card",
  11633. credited: "Credited",
  11634. withdrawal_failed: "Withdrawal Failed",
  11635. withdrawing: "Withdrawing",
  11636. select_withdrawal_method: "Select Withdrawal Method",
  11637. not_bound_click_to_bind: "Not Bound, Click to Bind",
  11638. withdrawal_amount: "Withdrawal Amount",
  11639. actual_amount_received: "Actual Amount Received",
  11640. note: "Note: Actual received amount {commission}, consumption points {consumption}.No withdrawal fee",
  11641. withdraw_to_wechat: "Withdraw to WeChat",
  11642. withdraw_to_alipay: "Withdraw to Alipay",
  11643. withdraw_to_bank_card: "Withdraw to Bank Card",
  11644. please_select_withdrawal_method: "Please Select Withdrawal Method",
  11645. enter_withdrawal_amount: "Enter Withdrawal Amount",
  11646. alipay_not_bound: "Alipay Account Not Bound",
  11647. bank_card_not_bound: "Bank Card Not Bound",
  11648. go_bind: "Go Bind",
  11649. application_successful: "Application Successful",
  11650. current_exchangeable_amount: "Your Current Exchangeable Amount:",
  11651. commission_to_points: "Convert to Points",
  11652. enter_transfer_amount: "Enter Transfer Amount",
  11653. current_commission_available: "Current Commission Available",
  11654. transfer_amount_cannot_be_empty: "Conversion Amount Cannot Be Empty",
  11655. transfer_amount_cannot_be_zero: "Conversion Amount Must Be Greater Than Zero",
  11656. commission_to_points_irreversible: "Conversion to points is irreversible. Proceed?",
  11657. conversion_successful: "Conversion Successful",
  11658. points_recharge: "Points Recharge",
  11659. recharge_amount: "Recharge Amount",
  11660. enter_recharge_amount: "Enter Recharge Amount",
  11661. actual_points_received: "Actual Points Received",
  11662. note_recharge_bonus: "Note: Recharge {amount} yuan or more to get {multiplier} times the points",
  11663. recharge_amount_less_than: "Recharge Amount Cannot Be Less Than {point}",
  11664. recipient: "Recipient",
  11665. enter_recipient_username: "Enter Recipient's Username",
  11666. recipient_phone: "Recipient's Phone",
  11667. enter_recipient_phone: "Enter Recipient's Phone Number",
  11668. transfer_amount: "Transfer Amount",
  11669. current_transferable_amount: "Current Transferable Amount:",
  11670. recipient_cannot_be_empty: "Recipient Cannot Be Empty",
  11671. recipient_phone_cannot_be_empty: "Recipient's Phone Cannot Be Empty",
  11672. verification_code_cannot_be_empty: "Verification Code Cannot Be Empty",
  11673. transfer_amount_less_than_zero: "Transfer Amount Must Be Greater Than Zero",
  11674. recipient_cannot_be_self: "Recipient Cannot Be Yourself",
  11675. user_does_not_exist: "User Does Not Exist!",
  11676. username_phone_mismatch: "Recipient's Username and Phone Number Do Not Match!",
  11677. cannot_transfer_to_self: "Cannot Transfer to Oneself",
  11678. transfer_successful: "Transfer Successful"
  11679. };
  11680. const team$1 = {
  11681. total_people: "Total {count} People",
  11682. retain_performance: "Keep Score",
  11683. referrer: "Referrer",
  11684. direct_referral: "Direct Referral",
  11685. team_count: "Team: {count} People",
  11686. new_performance_value: "New Score",
  11687. no_team_members: "No Team Members"
  11688. };
  11689. const sign$1 = {
  11690. check_in: "Check-in",
  11691. check_in_gift: "Gift with Check-in",
  11692. consecutive_check_ins: "Consecutive Check-ins:",
  11693. sunday: "Sun",
  11694. monday: "Mon",
  11695. tuesday: "Tue",
  11696. wednesday: "Wed",
  11697. thursday: "Thu",
  11698. friday: "Fri",
  11699. saturday: "Sat",
  11700. days: "Days",
  11701. month_year: "{month}/{year}",
  11702. already_checked_in: "Already Checked In",
  11703. check_in_description: "Check-in Description",
  11704. daily_check_in_fixed: "Daily check-in earns {social} social value",
  11705. congratulations_on_check_in: "Congratulations on Successful Check-in",
  11706. check_in_not_started: "Check-in Event Has Not Started",
  11707. daily_check_in_reward: "Earn {social} Points of Social Value for Daily Check-in",
  11708. level_upgraded: "Your Level has been Upgraded to {level}"
  11709. };
  11710. const order$1 = {
  11711. payment_result: "Payment Result",
  11712. payment_successful: "Payment Successful",
  11713. payment_failed: "Payment Failed",
  11714. order_closed: "Order Closed",
  11715. checking_payment_result: "Checking Payment Result...",
  11716. return_home: "Return Home",
  11717. retry_payment: "Retry Payment",
  11718. view_order: "View Order",
  11719. view_wallet: "View Wallet",
  11720. my_group_buying: "My Group Buying",
  11721. get_realtime_shipping_info: "Get Real-time Shipping and Order Status",
  11722. subscribe_now: "Subscribe Now",
  11723. pending_payment: "Pay Now",
  11724. pending_shipment: "To Ship",
  11725. pending_receipt: "To Receive",
  11726. pending_review: "To Review",
  11727. all_orders: "All",
  11728. my_orders: "My Orders",
  11729. no_orders: "No Orders",
  11730. order_number: "Order Number",
  11731. total_items: "Total {count} Items",
  11732. total_amount: "Total Amount",
  11733. group_details: "Group Buying Details",
  11734. view_details: "View Details",
  11735. view_logistics: "View Logistics",
  11736. confirm_receipt: "Confirm Receipt",
  11737. cancel_order: "Cancel",
  11738. review_order: "Review",
  11739. delete_order: "Delete",
  11740. continue_payment: "Continue Payment",
  11741. confirm_receipt_question: "Confirm Receipt?",
  11742. upgrade_wechat: "Please Upgrade WeChat Version",
  11743. confirm_cancel_order: "Are You Sure You Want to Cancel the Order?",
  11744. confirm_delete_order: "Are You Sure You Want to Delete the Order?",
  11745. order_details: "Order Details",
  11746. apply_for_service: "Apply for Service",
  11747. refund_in_progress: "Refund in Progress",
  11748. refund_successful: "Refund Successful",
  11749. copy: "Copy",
  11750. customer_message: "Customer Message",
  11751. order_time: "Order Time",
  11752. payment_time: "Payment Time",
  11753. payment_method: "Payment Method",
  11754. shipping_fee: "Shipping Fee",
  11755. use_commission: "Use Commission",
  11756. use_points: "Use Points",
  11757. discount_amount: "Discount Amount",
  11758. paid: "Paid",
  11759. amount_due: "Amount Due",
  11760. refunded: "Refunded",
  11761. cancel_request: "Cancel Request",
  11762. fill_return: "Fill Return",
  11763. confirm_cancel_request: "Are You Sure You Want to Cancel This Request?",
  11764. not_logged_in: "You are not logged in, please log in as {user} to continue",
  11765. account_switch_needed: "You are currently logged in as {user}, please switch to {user} to proceed",
  11766. product_quality: "Product Quality",
  11767. service_attitude: "Service Attitude",
  11768. meet_expectations: "Did the item meet your expectations? Share your experience to help others decide.",
  11769. confirm_post_review: "Post Review?",
  11770. missing_order_info: "Missing order information, please check",
  11771. no_reviews_pending: "No Reviews Pending",
  11772. after_sales_list: "After-Sales List",
  11773. apply_for_after_sales: "Apply for Service",
  11774. reason_for_application: "Reason for Application",
  11775. select_reason_for_application: "Select a Reason",
  11776. customer_prompt: "Please describe your issue, photo upload recommended",
  11777. contact_customer_service: "Contact Support",
  11778. select_after_sales_type: "Select Service Type",
  11779. please_fill_in_description: "Please Fill in the Description",
  11780. after_sales_details: "After-Sales Details",
  11781. total_refund: "Total Refund",
  11782. refund_amount: "Refund Amount",
  11783. refund_commission: "Refund Commission",
  11784. refund_points: "Refund Points",
  11785. service_order_number: "Service Id",
  11786. application_time: "Application Time",
  11787. after_sales_type: "After-Sales Type",
  11788. application_reason: "Application Reason",
  11789. related_description: "Related Description",
  11790. no_after_sales_details: "No After-Sales Details for This Order",
  11791. submit_application: "Apply Now",
  11792. processing: "Processing",
  11793. completed: "Completed",
  11794. refund_only: "Refund Only",
  11795. refund_and_return: "Refund and Return",
  11796. after_sales_progress: "After-Sales Progress",
  11797. logistics_tracking: "Logistics Tracking",
  11798. tracking_number: "Track #",
  11799. courier_company: "Courier",
  11800. shipping_time: "Shipped"
  11801. };
  11802. const setting$1 = {
  11803. signature: "Personal Signature",
  11804. set: "Settings",
  11805. bind: "Bind",
  11806. unbind: "Unbind",
  11807. physical_address_management: "Physical Address Management",
  11808. virtual_address_management: "Virtual Address Management",
  11809. alipay_account: "Alipay Account",
  11810. bank_card: "Bank Card",
  11811. enter_platform: "Enter Platform",
  11812. enter_merchant_backend: "Enter Merchant Backend",
  11813. my_qrcode: "My QR Code",
  11814. third_party_account_binding: "Third-party Account Binding",
  11815. wechat_public_account: "WeChat Public Account",
  11816. wechat_mini_program: "WeChat Mini Program",
  11817. wechat_open_platform: "WeChat Open Platform",
  11818. prompt: "Prompt",
  11819. confirm_logout: "Confirm logout?"
  11820. };
  11821. const pop$1 = {
  11822. confirm: "Confirm",
  11823. cancel: "Cancel",
  11824. Commission: {
  11825. usingCommission: "Using Commission",
  11826. availableCommission: "Your available commission",
  11827. currentOrderTotalPrice: "Current order price ",
  11828. canUseMaxCommission: ", maximum ",
  11829. commission: " commission can be used"
  11830. },
  11831. ConsumptionPoints: {
  11832. usingPoints: "Using Consumption Points",
  11833. availablePoints: "Your available consumption points",
  11834. currentOrderTotalPrice: "Current order price ",
  11835. canUseMaxPoints: ", maximum ",
  11836. points: " consumption points can be used"
  11837. },
  11838. congratulations: "Congratulations",
  11839. commission_earned: "Commission Earned",
  11840. social_value_earned: "Social Value Earned",
  11841. order_success: "Order Successful",
  11842. auto_checkin_success: "Congratulations! Auto Check-in Successful!",
  11843. daily_checkin_reward: "Earned {point} Points for Daily Check-in",
  11844. level_upgraded: "Your Level has been Upgraded to",
  11845. follow_public_account: "Follow Our Public Account",
  11846. long_press_qrcode_follow: "Long Press QR Code to Follow Public Account",
  11847. wechat_friend: "WeChat Friend",
  11848. create_poster: "Create Poster",
  11849. copy_link: "Copy Link"
  11850. };
  11851. const rules$1 = {
  11852. username: "Please enter your username",
  11853. username_taken: "Username is already taken!",
  11854. usernameNotnull: "Username cannot be empty",
  11855. nickname: "Please enter your nickname",
  11856. nicknameNotnull: "Nickname cannot be empty",
  11857. password: "Please enter your password",
  11858. passwordNotnull: "Password cannot be empty",
  11859. confirm_password: "Please confirm your password",
  11860. confirmPasswordNotnull: "Confirm password cannot be empty",
  11861. email: "Please enter your email",
  11862. emailNotnull: "Email cannot be empty",
  11863. phone: "Please enter your phone number",
  11864. phoneNotnull: "Phone number cannot be empty",
  11865. avatar: "Please upload your avatar",
  11866. avatarNotnull: "Avatar cannot be empty",
  11867. sex: "Please select your gender",
  11868. sexNotnull: "Gender cannot be empty",
  11869. password_error: "Passwords do not match",
  11870. click_change_password: "Click to change password",
  11871. modify_success: "Modification successful, please log in again",
  11872. unbind_warning: "After unbinding, you will no longer be able to log in to this account via WeChat",
  11873. bind_phone: "Please bind your phone number",
  11874. enter_username: "Enter Username",
  11875. username_required: "Username Required",
  11876. enter_phone: "Enter Phone Number",
  11877. incorrect_phone_format: "Incorrect Phone Format",
  11878. enter_password: "Enter Password",
  11879. password_requirements: "6-12 chars with letters & numbers",
  11880. enter_verification_code: "Enter Verification Code",
  11881. enter_name: "Enter Name",
  11882. enter_chinese_characters: "Enter Chinese Characters",
  11883. enter_invoice_title: "Enter Invoice Title",
  11884. enter_tax_number: "Enter Tax Number",
  11885. enter_bank: "Enter Bank",
  11886. enter_bank_card_number: "Enter Bank Card Number",
  11887. correct_bank_card_number: "Enter Correct Bank Card Number",
  11888. enter_alipay_account: "Enter Alipay Account",
  11889. correct_account_number: "Enter Correct Account",
  11890. enter_email: "Enter Email",
  11891. correct_email: "Enter Correct Email"
  11892. };
  11893. const en$3 = {
  11894. "lang.en": "EngLish",
  11895. "lang.zh-hans": "简体中文",
  11896. settings: settings$1,
  11897. agreement: agreement$1,
  11898. user_management: user_management$1,
  11899. role_management: role_management$1,
  11900. menu_management: menu_management$1,
  11901. post_management: post_management$1,
  11902. org_management: org_management$1,
  11903. add_user: add_user$1,
  11904. about: about$1,
  11905. "title.home": "Home",
  11906. "title.userinfo": "User Information",
  11907. "title.settings": "Settings",
  11908. "title.usercenter": "User Center",
  11909. "title.product_category": "Categories",
  11910. "title.cart": "Cart",
  11911. "title.search": "Search",
  11912. "title.product_details": "Details",
  11913. "title.group_buying": "Group Buy",
  11914. "title.flash_sale": "Flash Sale",
  11915. "title.product_list": "Products",
  11916. "title.rate_product": "Rate Product",
  11917. "title.product_reviews": "Reviews",
  11918. "title.order_details": "Order Details",
  11919. "title.confirm_order": "Confirm Order",
  11920. "title.my_orders": "My Orders",
  11921. "title.apply_service": "After-Sales",
  11922. "title.return_logistics": "Return Logistics",
  11923. "title.after_sales_list": "After-Sales",
  11924. "title.after_sales_details": "Service Details",
  11925. "title.after_sales_progress": "Service Progress",
  11926. "title.logistics_tracking": "Tracking",
  11927. "title.share": "Share",
  11928. "title.my_favorites": "Favorites",
  11929. "title.my_footprints": "Footprints",
  11930. "title.physical_address": "Shipping Address",
  11931. "title.virtual_address": "Virtual Address",
  11932. "title.edit_invoice": "Edit Invoice",
  11933. "title.manage_invoice": "Manage Invoice",
  11934. "title.edit_address": "Edit Address",
  11935. "title.my_balance": "My Balance",
  11936. "title.wallet": "Wallet",
  11937. "title.points_source": "Points Source",
  11938. "title.points_recharge": "Points Recharge",
  11939. "title.points_transfer": "Points Transfer",
  11940. "title.commission_to_points": "Convert to Points",
  11941. "title.withdraw": "Withdraw",
  11942. "title.withdraw_records": "Withdrawals",
  11943. "title.commission_exchange": "Exchange",
  11944. "title.team": "Team",
  11945. "title.distribution": "Distribution",
  11946. "title.my_commission": "My Commission",
  11947. "title.promote_products": "Promote",
  11948. "title.distribution_orders": "Dist. Orders",
  11949. "title.my_team": "My Team",
  11950. "title.promoter_ranking": "Promoter Rank",
  11951. "title.commission_ranking": "Commission Rank",
  11952. "title.apply_withdraw": "Withdraw",
  11953. "title.check_in_center": "Check-In",
  11954. "title.shop_home": "Shop Home",
  11955. "title.system_settings": "Settings",
  11956. "title.rich_text": "Rich Text",
  11957. "title.faq": "FAQ",
  11958. "title.error_page": "Error Page",
  11959. "title.coupon_center": "Coupons",
  11960. "title.coupons": "Coupons",
  11961. "title.customer_service": "Support",
  11962. "title.checkout": "Checkout",
  11963. "title.fuiou_result": "Payment Result",
  11964. "title.payment_result": "Payment Result",
  11965. "title.recharge_balance": "Recharge",
  11966. "title.recharge_records": "Recharge History",
  11967. "title.group_details": "Group Details",
  11968. "title.my_groups": "My Groups",
  11969. "title.marketing_products": "Marketing",
  11970. "title.group_activities": "Group Activities",
  11971. "title.seckill_activities": "Seckill",
  11972. "title.bargain_list": "Bargain List",
  11973. "title.bargain_details": "Bargain Details",
  11974. common: common$1,
  11975. account: account$1,
  11976. review: review$1,
  11977. confirm: confirm$1,
  11978. address: address$1,
  11979. selectSku: selectSku$1,
  11980. cashier: cashier$1,
  11981. share: share$1,
  11982. merchant: merchant$1,
  11983. useGoods: useGoods$1,
  11984. menu: menu$1,
  11985. user: user$3,
  11986. wallet: wallet$1,
  11987. team: team$1,
  11988. sign: sign$1,
  11989. order: order$1,
  11990. setting: setting$1,
  11991. pop: pop$1,
  11992. rules: rules$1
  11993. };
  11994. const settings = "设置";
  11995. const agreement = "用户隐私协议";
  11996. const user_management = "用户管理";
  11997. const role_management = "角色管理";
  11998. const menu_management = "菜单管理";
  11999. const post_management = "岗位管理";
  12000. const org_management = "组织管理";
  12001. const add_user = "新增用户";
  12002. const about = "关于";
  12003. const common = {
  12004. letcgo: "常来此购",
  12005. home: "首页",
  12006. category: "分类",
  12007. cart: "购物车",
  12008. my: "我的",
  12009. product: "商品",
  12010. review: "评价",
  12011. detail: "详情",
  12012. view_all: "查看全部",
  12013. none: "无",
  12014. all: "全部",
  12015. search_products: "搜索商品",
  12016. buy_now: "立即购买",
  12017. sold: "已售",
  12018. sales_volume: "销量",
  12019. go_buy: "去购买",
  12020. add_to_cart: "加入购物车",
  12021. redeem_now: "立即兑换",
  12022. sold_out: "已售罄",
  12023. product_not_exist: "商品不存在或已下架",
  12024. awaiting_your_first_review: "期待您的第一个评价",
  12025. browse_more: "再逛逛",
  12026. select_product_options: "请选择商品规格",
  12027. favorite: "收藏",
  12028. unfavorite: "取消收藏",
  12029. favorite_success: "收藏成功",
  12030. points: "积分",
  12031. cancel: "取消",
  12032. confirm: "确定",
  12033. submit: "提交",
  12034. save: "保存",
  12035. "delete": "删除",
  12036. edit: "编辑",
  12037. close: "关闭",
  12038. back: "返回",
  12039. next: "下一步",
  12040. previous: "上一步",
  12041. yes: "是",
  12042. no: "否",
  12043. ok: "好的",
  12044. post: "发布",
  12045. loading: "加载中...",
  12046. refresh: "刷新",
  12047. search: "搜索",
  12048. reset: "重置",
  12049. add: "添加",
  12050. update: "更新",
  12051. upload: "上传",
  12052. download: "下载",
  12053. level: "等级",
  12054. no_level: "无等级",
  12055. select: "选择",
  12056. select_product_specification: "请选择商品规格",
  12057. clear: "清空",
  12058. delete_footprint: "删除足迹",
  12059. select_all: "全选",
  12060. my_footprints: "我的足迹",
  12061. total_goods: "共 {number} 件商品",
  12062. recommended: "综合推荐",
  12063. price_asc: "价格升序",
  12064. price_desc: "价格降序",
  12065. sales: "销量",
  12066. newest: "新品优先",
  12067. enter_keywords: "请输入关键词",
  12068. checkout: "去结算",
  12069. total: "合计",
  12070. "default": "默认",
  12071. empty_cart: "购物车空空如也,快去逛逛吧~",
  12072. select_area: "选择区域",
  12073. click_to_load_more: "点击加载更多",
  12074. system: "系统",
  12075. current_version: "当前版本",
  12076. local_cache: "本地缓存",
  12077. about_us: "关于我们",
  12078. logout_account: "注销账号",
  12079. confirm_logout: "确认注销账号?",
  12080. no_data: "暂无数据",
  12081. uploading: "上传中",
  12082. verifying: "验证中",
  12083. fetching: "获取中",
  12084. save_success: "保存成功",
  12085. update_success: "更新成功",
  12086. logging_in: "登录中",
  12087. login_success: "登录成功",
  12088. registering: "注册中",
  12089. register_success: "注册成功",
  12090. sending: "发送中",
  12091. send_success: "发送成功",
  12092. binding: "绑定中",
  12093. bind_success: "绑定成功",
  12094. unbind: "解除绑定",
  12095. unbind_success: "解绑成功",
  12096. claiming: "领取中",
  12097. claim_success: "领取成功",
  12098. collect_success: "收藏成功",
  12099. cancel_success: "取消成功",
  12100. delete_success: "删除成功",
  12101. clear_success: "清空成功",
  12102. apply_success: "申请成功",
  12103. change_success: "变动成功",
  12104. added_to_cart: "已添加到购物车",
  12105. just_now: "刚刚",
  12106. minutes_ago: "{m}分钟前",
  12107. hours_ago: "{h}小时前",
  12108. days_ago: "{d}天前",
  12109. months_ago: "{m}个月前",
  12110. years_ago: "{y}年前",
  12111. copy_success: "复制成功!",
  12112. copy_fail: "复制失败!",
  12113. sms_error: "短信发送事件错误",
  12114. try_later: "请稍后再试",
  12115. phone_format_error: "手机号码格式不正确",
  12116. get_verification_code: "获取验证码",
  12117. use_wechat_browser: "请使用微信网页浏览器打开",
  12118. platform_not_supported: "暂不支持该平台",
  12119. payment_manually_cancelled: "支付已手动取消",
  12120. alipay_payment: "支付宝支付",
  12121. copy_link_to_browser: "复制链接到外部浏览器",
  12122. copy_link: "复制链接",
  12123. wechat_payment: "微信支付",
  12124. bind_wechat_for_payment: "请先绑定微信再使用微信支付",
  12125. bind: "绑定",
  12126. balance_payment: "余额支付",
  12127. mock_payment: "模拟支付",
  12128. update_prompt: "更新提示",
  12129. new_version_ready: "新版本已经准备好,是否重启应用?",
  12130. latest_version: "当前为最新版本",
  12131. server_error_try_later: "服务器开小差啦,请稍后再试~",
  12132. network_request_error: "网络请求出错",
  12133. request_error: "请求出错",
  12134. login_expired: "您的登陆已过期",
  12135. please_login: "请登录",
  12136. access_denied: "拒绝访问",
  12137. request_timeout: "请求超时",
  12138. frequent_requests: "请求频繁, 请稍后再访问",
  12139. server_unavailable: "服务未实现",
  12140. network_error: "网络错误",
  12141. service_unavailable: "服务不可用",
  12142. network_timeout: "网络超时",
  12143. http_not_supported: "HTTP 版本不受支持",
  12144. server_exception: "服务器异常",
  12145. check_network_connection: "请检查您的网络连接",
  12146. not_bound_wechat: "您未绑定微信,请先绑定",
  12147. platform_intro: "平台简介",
  12148. industry_intro: "产业介绍",
  12149. latest_news: "最新资讯",
  12150. shared_mall: "共享商城",
  12151. activities: "活动",
  12152. videos: "视频",
  12153. mall: "商城",
  12154. shop_index: "店铺首页",
  12155. shop_category: "店铺分类",
  12156. all_product: "所有商品"
  12157. };
  12158. const account = {
  12159. account_login: "账号登录",
  12160. sms_login: "短信登录",
  12161. register: "注册",
  12162. read_and_agree: "我已阅读并遵守",
  12163. user_agreement: "《用户协议》",
  12164. privacy_policy: "《隐私协议》",
  12165. and: "与",
  12166. wechat_authorization_login: "微信授权登录",
  12167. wechat_authorization_register: "微信授权注册",
  12168. please_agree: "请勾选同意",
  12169. register_by_sharing_only: "您只能通过分享注册",
  12170. quick_login_failed: "快捷登录失败",
  12171. username: "用户名",
  12172. password: "密码",
  12173. enter_username: "请输入用户名",
  12174. enter_valid_username: "请输入正确的用户名!",
  12175. enter_password: "请输入密码",
  12176. login: "登录",
  12177. phone_number: "手机号",
  12178. verification_code: "验证码",
  12179. enter_verification_code: "请输入验证码",
  12180. get_verification_code: "获取验证码",
  12181. incorrect_phone_format: "手机号码格式不正确",
  12182. enter_phone_number: "请输入手机号",
  12183. username_exists: "已存在用户名!",
  12184. change_phone_number: "更换手机号",
  12185. bind_phone_number: "绑定手机号",
  12186. old_phone_number: "原手机号",
  12187. enter_old_phone_number: "请输入原手机号",
  12188. security_notice: "为了您的账号安全,请使用本人手机号码",
  12189. new_phone_number: "新手机号",
  12190. enter_new_phone_number: "请输入新手机号",
  12191. login_again: "修改成功,请重新登录",
  12192. change_password: "修改密码",
  12193. cancel_change: "取消修改",
  12194. password_requirements: "需包含字母和数字,长度在6-12之间",
  12195. modification_successful: "修改成功",
  12196. authorization_info: "授权信息",
  12197. complete_profile: "完善您的头像、昵称、手机号",
  12198. avatar: "头像",
  12199. select_avatar: "请选择头像",
  12200. nickname: "昵称",
  12201. enter_nickname: "请输入昵称",
  12202. confirm_authorization: "确认授权",
  12203. authorization_successful: "授权成功",
  12204. first_time_login: "您首次登录,请输入手机号验证",
  12205. continue_login: "继续登录",
  12206. change_alipay_account: "更换支付宝账号",
  12207. bind_alipay_account: "绑定支付宝账号",
  12208. bind_realname_alipay: "请绑定已实名认证的支付宝账号",
  12209. name: "名称",
  12210. enter_name: "请输入名称",
  12211. account: "账号",
  12212. enter_account: "请输入账号",
  12213. change_bank_card: "更换银行卡",
  12214. bind_bank_card: "绑定银行卡",
  12215. bank_branch: "开户行",
  12216. bank_branch_example: "例:xx银行股份有限公司xx分行xx支行",
  12217. account_holder: "开户名",
  12218. account_holder_name: "个人姓名",
  12219. bank_account_number: "银行卡账号",
  12220. select_account_login: "请选择账号登录",
  12221. wechat_no_bind: "该微信暂绑定无账号,请使用其他登陆方式",
  12222. wechat_register: "微信注册",
  12223. wechat_no_account: "您的微信没有账号,请先注册"
  12224. };
  12225. const review = {
  12226. all_reviews: "全部评价",
  12227. positive: "好评",
  12228. neutral: "中评",
  12229. negative: "差评"
  12230. };
  12231. const confirm = {
  12232. confirm_order: "确认订单",
  12233. shipping_fee: "运费",
  12234. free_shipping: "包邮",
  12235. order_note: "订单备注",
  12236. communication_advice: "建议留言前先与商家沟通",
  12237. quantity: "数量",
  12238. price_details: "价格明细",
  12239. total_price: "商品总价",
  12240. total_items: "共{count}件商品",
  12241. commission_deduction: "佣金抵扣",
  12242. deduction: "抵扣{count}元",
  12243. no_commission: "不使用佣金",
  12244. consumption_point_deduction: "消费分抵扣",
  12245. no_consumption_points: "不使用消费分",
  12246. total_items_count: "共{count}件",
  12247. submit_order: "提交订单",
  12248. select_shipping_address: "请选择收货地址",
  12249. insufficient_commission: "可用佣金不足",
  12250. insufficient_consumption_points: "可用消费分不足",
  12251. commission_points_no_mix: "佣金不能搭配消费分使用"
  12252. };
  12253. const address = {
  12254. select_shipping_address: "请选择收货地址",
  12255. shipping_address: "收货地址",
  12256. import_wechat_address: "导入微信地址",
  12257. add_new_shipping_address: "新增收货地址",
  12258. no_shipping_address: "暂无收货地址",
  12259. edit_address: "编辑地址",
  12260. add_address: "新增地址",
  12261. recipient: "收货人",
  12262. enter_recipient_name: "请填写收货人姓名",
  12263. province_city_district: "省市区",
  12264. select_province_city_district: "请选择省市区",
  12265. detailed_address: "详细地址",
  12266. enter_detailed_address: "请输入详细地址",
  12267. set_as_default_address: "设为默认地址",
  12268. confirm_delete_address: "确认删除此收货地址吗?",
  12269. virtual_goods_address: "虚拟商品收货地址",
  12270. edit_virtual_address: "编辑虚拟地址",
  12271. add_virtual_address: "新增虚拟地址",
  12272. set_as_default_virtual_address: "设为默认虚拟地址"
  12273. };
  12274. const selectSku = {
  12275. insufficient_stock: "库存不足",
  12276. select_specification: "请选择规格",
  12277. amount_less_than_min: "输入金额少于可购买数量",
  12278. insufficient_points: "可用积分不足",
  12279. min_points_required: "最低使用1积分",
  12280. purchase_quantity: "购买数量",
  12281. purchase_amount: "购买金额",
  12282. available_points: "当前可用积分:{points}"
  12283. };
  12284. const cashier = {
  12285. cashier: "收银台",
  12286. select_payment_method: "选择支付方式",
  12287. phone_number: "手机号",
  12288. enter_phone_number: "请输入手机号",
  12289. verification_code: "验证码",
  12290. enter_verification_code: "请输入验证码",
  12291. checking_payment_environment: "检测支付环境中",
  12292. payment_expired: "支付已过期",
  12293. pay_now: "立即支付",
  12294. verification_code_cannot_be_empty: "验证码不能为空",
  12295. choose_payment_method: "请选择支付方式",
  12296. order_paid: "该订单已支付",
  12297. no_payment_order_found: "未查询到支付单信息",
  12298. remaining_payment_time: "剩余支付时间 {h}:{m}:{s}"
  12299. };
  12300. const share = {
  12301. share: "分享",
  12302. poster_loading: "海报加载中...",
  12303. long_press_to_save: "长按图片保存",
  12304. save_success: "保存成功",
  12305. save_failure: "保存失败"
  12306. };
  12307. const merchant = {
  12308. merchant_registration: "商家入驻",
  12309. merchant_name: "商家名称",
  12310. enter_merchant_name: "请输入商家名称",
  12311. contact_person: "联络人",
  12312. enter_contact_person: "请输入联络人",
  12313. contact_phone: "联络人手机号",
  12314. enter_contact_phone: "请输入联络人手机号",
  12315. legal_person: "法人",
  12316. enter_legal_person: "请输入法人",
  12317. legal_person_phone: "法人手机号",
  12318. enter_legal_person_phone: "请输入法人手机号",
  12319. legal_person_id_front: "法人身份证正面",
  12320. legal_person_id_back: "法人身份证反面",
  12321. location: "所在地",
  12322. email: "邮箱",
  12323. enter_email: "请输入邮箱",
  12324. office_address: "办公地址",
  12325. enter_office_address: "请输入办公地址",
  12326. rights_phone: "维权电话",
  12327. enter_rights_phone: "请输入维权电话",
  12328. customer_service_phone: "客服电话",
  12329. enter_customer_service_phone: "请输入客服电话",
  12330. website: "官网",
  12331. enter_website: "请输入官网",
  12332. bank: "开户银行",
  12333. enter_bank: "请输入开户银行",
  12334. account_name: "账户名称",
  12335. enter_account_name: "请输入账户名称",
  12336. account_number: "账户号码",
  12337. enter_account_number: "请输入账户号码",
  12338. business_license: "营业执照",
  12339. brand_authorization: "品牌授权书",
  12340. download_template: "下载模板",
  12341. other_certificates: "其他证书",
  12342. introduction: "简介",
  12343. enter_introduction: "请输入简介",
  12344. status: "状态",
  12345. review_in_progress: "审核中",
  12346. review_records: "审核记录",
  12347. changes: "变动",
  12348. save_and_submit: "保存并提交",
  12349. existing_merchant_alert: "当前用户({user}),已存在商户账号,请更换账号申请!",
  12350. merchant_name_required: "商户名称不能为空",
  12351. introduction_required: "简介不能为空",
  12352. contact_required: "联络人不能为空",
  12353. contact_phone_required: "联络人手机号不能为空",
  12354. customer_service_phone_required: "客服电话不能为空",
  12355. legal_person_required: "法人不能为空",
  12356. legal_person_phone_required: "法人电话不能为空",
  12357. account_name_required: "账户名称不能为空",
  12358. account_number_required: "账户号码不能为空",
  12359. bank_required: "开户银行不能为空",
  12360. under_review: "审核中",
  12361. approved: "通过",
  12362. rejected: "拒绝",
  12363. non_exclusive_authorization: "非独家品牌授权书",
  12364. select_location: "请选择所在地",
  12365. select_legal_person_id_front: "请选择上传法人身份证正面(国徽面)",
  12366. select_legal_person_id_back: "请选择上传法人身份证背面(人像面)",
  12367. upload_business_license: "请上传营业执照",
  12368. upload_brand_authorization: "请上传品牌授权书"
  12369. };
  12370. const useGoods = {
  12371. redeemed: "已兑换",
  12372. in_stock: "库存",
  12373. pending_payment: "待付款",
  12374. awaiting_shipment: "待发货",
  12375. awaiting_write_off: "待核销",
  12376. awaiting_delivery: "待收货",
  12377. awaiting_review: "待评价",
  12378. completed: "已完成",
  12379. closed: "已关闭",
  12380. complete_payment_by: "请在 {time} 前完成支付",
  12381. merchant_not_shipped: "商家未发货,请耐心等待",
  12382. merchant_shipped: "商家已发货,请耐心等待",
  12383. goods_received: "已收货,快去评价一下吧",
  12384. transaction_completed: "交易完成,感谢您的支持",
  12385. transaction_closed: "交易关闭",
  12386. apply_for_after_sales: "申请售后",
  12387. goods_awaiting_return: "商品待退货",
  12388. merchant_awaiting_goods: "商家待收货",
  12389. waiting_for_refund: "等待退款",
  12390. refund_successful: "退款成功",
  12391. buyer_cancelled: "买家取消",
  12392. merchant_refused: "商家拒绝",
  12393. merchant_refused_goods: "商家拒收货",
  12394. unknown_status: "未知状态",
  12395. refund_request_awaiting_merchant: "退款申请待商家处理",
  12396. return_goods_fill_logistics: "请退货并填写物流信息",
  12397. return_refund_request_awaiting_merchant: "退货退款申请待商家处理",
  12398. refund_closed: "退款关闭",
  12399. merchant_disagrees_with_refund_request: "商家不同意退款申请,拒绝原因:",
  12400. merchant_refuses_to_accept_goods: "商家拒绝收货,不同意退款,拒绝原因:"
  12401. };
  12402. const menu = {
  12403. quick_menu: "快捷菜单",
  12404. search: "搜索",
  12405. personal_center: "个人中心",
  12406. shopping_cart: "购物车",
  12407. browsing_history: "浏览记录",
  12408. my_favorites: "我的收藏",
  12409. customer_service: "客服"
  12410. };
  12411. const user$2 = {
  12412. name: "名称",
  12413. username: "用户名",
  12414. nickname: "昵称",
  12415. password: "密码",
  12416. confirm_password: "确认密码",
  12417. email: "邮箱",
  12418. phone: "手机号",
  12419. avatar: "头像",
  12420. status: "状态",
  12421. create_time: "创建时间",
  12422. update_time: "更新时间",
  12423. last_login_time: "最后登录时间",
  12424. last_login_ip: "最后登录IP",
  12425. clear_cache: "清理缓存",
  12426. switch_language: "切换语言",
  12427. log_out: "退出登录",
  12428. change: "修改",
  12429. sex: "性别",
  12430. male: "男",
  12431. female: "女",
  12432. user_info: "用户信息",
  12433. unbind_reminder: "解绑提醒",
  12434. please_login: "请登录"
  12435. };
  12436. const wallet = {
  12437. wallet: "钱包",
  12438. balance: "余额",
  12439. commission: "佣金",
  12440. consumption_points: "消费分",
  12441. team: "团队",
  12442. people: "人",
  12443. generation_rules: "身价产生规则",
  12444. benefits: "身价权益",
  12445. recharge: "充值",
  12446. withdraw: "提现",
  12447. transfer_points: "转消费分",
  12448. points_transfer: "消费分转让",
  12449. current_peak: "当前可获得峰值:",
  12450. commission_record: "佣金记录",
  12451. points_record: "消费分记录",
  12452. withdrawal: "提现 (预计24小时左右到账)",
  12453. commission_rules: "佣金计算规则",
  12454. exceed_limit: "超出额度",
  12455. withdrawal_records: "提现记录",
  12456. wechat: "微信",
  12457. alipay: "支付宝",
  12458. bank_card: "银行卡",
  12459. credited: "已到账",
  12460. withdrawal_failed: "提现失败",
  12461. withdrawing: "提现中",
  12462. select_withdrawal_method: "选择提现方式",
  12463. not_bound_click_to_bind: "暂未绑定,点击绑定",
  12464. withdrawal_amount: "提现金额",
  12465. actual_amount_received: "实到金额",
  12466. note: "备注:实际到账金额{commission},消费分{consumption}。免提现手续费",
  12467. withdraw_to_wechat: "提现到微信",
  12468. withdraw_to_alipay: "提现到支付宝",
  12469. withdraw_to_bank_card: "提现到银行卡",
  12470. please_select_withdrawal_method: "请选择提现方式",
  12471. enter_withdrawal_amount: "请输入提现金额",
  12472. alipay_not_bound: "未绑定支付宝账号",
  12473. bank_card_not_bound: "未绑定银行卡",
  12474. go_bind: "去绑定",
  12475. application_successful: "申请成功",
  12476. current_exchangeable_amount: "您当前可兑换金额:",
  12477. commission_to_points: "佣金转消费分",
  12478. enter_transfer_amount: "请输入转让金额",
  12479. current_commission_available: "您当前可转换的佣金额度",
  12480. transfer_amount_cannot_be_zero: "转换金额不能小于等于0",
  12481. commission_to_points_irreversible: "佣金转为消费分后不可逆,是否转换?",
  12482. conversion_successful: "转换成功",
  12483. points_recharge: "消费分充值",
  12484. recharge_amount: "充值金额",
  12485. enter_recharge_amount: "请输入充值金额",
  12486. actual_points_received: "实到消费分",
  12487. note_recharge_bonus: "备注:充值{amount}元及以上,可获得{multiplier}倍消费分",
  12488. recharge_amount_less_than: "充值金额不能少于{point}",
  12489. recipient: "接收人",
  12490. enter_recipient_username: "请输入接收人用户名",
  12491. recipient_phone: "接收人手机号",
  12492. enter_recipient_phone: "请输入接收人手机号",
  12493. transfer_amount: "转让金额",
  12494. current_transferable_amount: "您当前可转让的金额:",
  12495. recipient_cannot_be_empty: "接收人不能为空",
  12496. recipient_phone_cannot_be_empty: "接收人手机号不能为空",
  12497. verification_code_cannot_be_empty: "验证码不能为空",
  12498. transfer_amount_cannot_be_empty: "转让金额不能为空",
  12499. transfer_amount_less_than_zero: "转让金额不能小于等于0",
  12500. recipient_cannot_be_self: "接收人不能为自己",
  12501. user_does_not_exist: "用户不存在!",
  12502. username_phone_mismatch: "接收人用户名与手机号不匹配!",
  12503. cannot_transfer_to_self: "不能给自己转账",
  12504. transfer_successful: "转账成功"
  12505. };
  12506. const team = {
  12507. total_people: "共{count}人",
  12508. retain_performance: "保留绩效值",
  12509. referrer: "推荐人",
  12510. direct_referral: "直推人",
  12511. team_count: "团队:{count}人",
  12512. new_performance_value: "新增绩效值:",
  12513. no_team_members: "暂无团队成员"
  12514. };
  12515. const sign = {
  12516. check_in: "签到",
  12517. check_in_gift: "签到有礼",
  12518. consecutive_check_ins: "已连续签到",
  12519. days: "天",
  12520. sunday: "日",
  12521. monday: "一",
  12522. tuesday: "二",
  12523. wednesday: "三",
  12524. thursday: "四",
  12525. friday: "五",
  12526. saturday: "六",
  12527. month_year: "{year}年{month}月",
  12528. already_checked_in: "已签到",
  12529. check_in_description: "签到说明",
  12530. daily_check_in_fixed: "每日签到固定 {social} 身价",
  12531. congratulations_on_check_in: "恭喜签到成功",
  12532. check_in_not_started: "签到活动还未开始",
  12533. daily_check_in_reward: "获得每日签到{social}点身价",
  12534. level_upgraded: "您已升级等级为{level}"
  12535. };
  12536. const order = {
  12537. payment_result: "支付结果",
  12538. payment_successful: "支付成功",
  12539. payment_failed: "支付失败",
  12540. order_closed: "该订单已关闭",
  12541. checking_payment_result: "检测支付结果...",
  12542. return_home: "返回首页",
  12543. retry_payment: "重新支付",
  12544. view_order: "查看订单",
  12545. view_wallet: "查看钱包",
  12546. my_group_buying: "我的拼团",
  12547. get_realtime_shipping_info: "获取实时发货信息与订单状态",
  12548. subscribe_now: "立即订阅",
  12549. pending_payment: "待付款",
  12550. pending_shipment: "待发货",
  12551. pending_receipt: "待收货",
  12552. pending_review: "待评价",
  12553. all_orders: "全部订单",
  12554. my_orders: "我的订单",
  12555. no_orders: "暂无订单",
  12556. order_number: "订单号",
  12557. total_items: "共 {count} 件商品",
  12558. total_amount: "总金额",
  12559. group_details: "拼团详情",
  12560. view_details: "查看详情",
  12561. view_logistics: "查看物流",
  12562. confirm_receipt: "确认收货",
  12563. cancel_order: "取消订单",
  12564. review_order: "评价",
  12565. delete_order: "删除订单",
  12566. continue_payment: "继续支付",
  12567. confirm_receipt_question: "确认收货?",
  12568. upgrade_wechat: "请升级微信版本",
  12569. confirm_cancel_order: "确定要取消订单吗?",
  12570. confirm_delete_order: "确定要删除订单吗?",
  12571. order_details: "订单详情",
  12572. apply_for_service: "申请售后",
  12573. refund_in_progress: "退款中",
  12574. refund_successful: "退款成功",
  12575. copy: "复制",
  12576. customer_message: "用户留言",
  12577. order_time: "下单时间",
  12578. payment_time: "支付时间",
  12579. payment_method: "支付方式",
  12580. shipping_fee: "运费",
  12581. use_commission: "使用佣金",
  12582. use_points: "使用消费分",
  12583. discount_amount: "优惠金额",
  12584. paid: "已付款",
  12585. amount_due: "需付款",
  12586. refunded: "已退款",
  12587. cancel_request: "取消申请",
  12588. fill_return: "填写退货",
  12589. confirm_cancel_request: "确定要取消此申请吗",
  12590. not_logged_in: "您尚未登录,请登录: {user}后再试",
  12591. account_switch_needed: "您当前登录的账号是{user},请切换到{user}后再试",
  12592. product_quality: "商品质量",
  12593. service_attitude: "服务态度",
  12594. meet_expectations: "宝贝满足你的期待吗?说说你的使用心得,分享给想买的他们吧~",
  12595. confirm_post_review: "发布评论?",
  12596. missing_order_info: "缺少订单信息,请检查",
  12597. no_reviews_pending: "无待评价订单",
  12598. after_sales_list: "售后列表",
  12599. apply_for_after_sales: "申请售后",
  12600. reason_for_application: "申请原因",
  12601. select_reason_for_application: "请选择申请原因",
  12602. customer_prompt: "客官~请描述您遇到的问题,建议上传照片",
  12603. contact_customer_service: "联系客服",
  12604. select_after_sales_type: "请选择售后类型",
  12605. please_fill_in_description: "请填写相关描述",
  12606. after_sales_details: "售后详情",
  12607. total_refund: "退款总额",
  12608. refund_amount: "退款金额",
  12609. refund_commission: "退款佣金",
  12610. refund_points: "退款消费分",
  12611. service_order_number: "服务单号",
  12612. application_time: "申请时间",
  12613. after_sales_type: "售后类型",
  12614. application_reason: "申请原因",
  12615. related_description: "相关描述",
  12616. no_after_sales_details: "暂无该订单售后详情",
  12617. submit_application: "提交申请",
  12618. processing: "处理中",
  12619. completed: "完成",
  12620. refund_only: "仅退款",
  12621. refund_and_return: "退款退货",
  12622. after_sales_progress: "售后进度",
  12623. logistics_tracking: "物流追踪",
  12624. tracking_number: "快递单号",
  12625. courier_company: "快递公司",
  12626. shipping_time: "发货时间"
  12627. };
  12628. const setting = {
  12629. signature: "个性签名",
  12630. set: "设置",
  12631. bind: "绑定",
  12632. unbind: "解绑",
  12633. physical_address_management: "实体收货地址管理",
  12634. virtual_address_management: "虚拟收货地址管理",
  12635. alipay_account: "支付宝账号",
  12636. bank_card: "银行卡",
  12637. enter_platform: "进入平台",
  12638. enter_merchant_backend: "进入商家后台",
  12639. my_qrcode: "我的二维码",
  12640. third_party_account_binding: "第三方账号绑定",
  12641. wechat_public_account: "微信公众号",
  12642. wechat_mini_program: "微信小程序",
  12643. wechat_open_platform: "微信开放平台",
  12644. prompt: "提示",
  12645. confirm_logout: "确认退出账号?"
  12646. };
  12647. const pop = {
  12648. confirm: "确定",
  12649. cancel: "取消",
  12650. Commission: {
  12651. usingCommission: "使用佣金",
  12652. availableCommission: "您的可用佣金",
  12653. currentOrderTotalPrice: "当前订单价格",
  12654. canUseMaxCommission: ",可使用最高",
  12655. commission: "佣金"
  12656. },
  12657. ConsumptionPoints: {
  12658. usingPoints: "使用消费分",
  12659. availablePoints: "您的可用消费分",
  12660. currentOrderTotalPrice: "当前订单价格",
  12661. canUseMaxPoints: ",可使用最高",
  12662. points: "消费分"
  12663. },
  12664. congratulations: "恭喜",
  12665. commission_earned: "获得佣金",
  12666. social_value_earned: "获得身价",
  12667. order_success: "下单成功",
  12668. auto_checkin_success: "恭喜!自动签到成功!",
  12669. daily_checkin_reward: "获得每日签到{point}点身价",
  12670. level_upgraded: "您已升级等级为",
  12671. follow_public_account: "关注公众号",
  12672. long_press_qrcode_follow: "长按二维码关注公众号",
  12673. wechat_friend: "微信好友",
  12674. create_poster: "生成海报",
  12675. copy_link: "复制链接"
  12676. };
  12677. const rules = {
  12678. username: "请输入用户名",
  12679. username_taken: "用户名已被使用!",
  12680. usernameNotnull: "用户名不能为空",
  12681. nickname: "请输入昵称",
  12682. nicknameNotnull: "昵称不能为空",
  12683. password: "请输入密码",
  12684. passwordNotnull: "密码不能为空",
  12685. confirm_password: "请确认密码",
  12686. confirmPasswordNotnull: "确认密码不能为空",
  12687. email: "请输入邮箱",
  12688. emailNotnull: "邮箱不能为空",
  12689. phone: "请输入手机号",
  12690. phoneNotnull: "手机号不能为空",
  12691. avatar: "请上传头像",
  12692. avatarNotnull: "头像不能为空",
  12693. sex: "请选择性别",
  12694. sexNotnull: "性别不能为空",
  12695. password_error: "两次密码不一致",
  12696. click_change_password: "点击修改密码",
  12697. bind_phone: "请绑定手机号",
  12698. unbind_warning: "解绑后您将无法通过微信登录此账号",
  12699. modify_success: "修改成功,请重新登录",
  12700. enter_username: "请输入用户名",
  12701. username_required: "用户名不能为空",
  12702. enter_phone: "请输入手机号",
  12703. enter_password: "请输入密码",
  12704. password_requirements: "需包含字母和数字,长度在6-12之间",
  12705. enter_verification_code: "请输入验证码",
  12706. enter_name: "请输入姓名",
  12707. enter_chinese_characters: "请输入汉字",
  12708. enter_invoice_title: "请输入发票抬头名称",
  12709. enter_tax_number: "请输入税号",
  12710. enter_bank: "请输入开户行",
  12711. enter_bank_card_number: "请输入银行卡号",
  12712. correct_bank_card_number: "请输入正确的银行卡号",
  12713. enter_alipay_account: "请输入支付宝账号",
  12714. correct_account_number: "请输入正确账号",
  12715. enter_email: "请输入邮箱",
  12716. correct_email: "请输入正确邮箱账号"
  12717. };
  12718. const zhHans$3 = {
  12719. "lang.en": "EngLish",
  12720. "lang.zh-hans": "简体中文",
  12721. settings,
  12722. agreement,
  12723. user_management,
  12724. role_management,
  12725. menu_management,
  12726. post_management,
  12727. org_management,
  12728. add_user,
  12729. about,
  12730. "title.home": "首页",
  12731. "title.userinfo": "用户信息",
  12732. "title.settings": "用户设置",
  12733. "title.usercenter": "用户中心",
  12734. "title.product_category": "商品分类",
  12735. "title.cart": "购物车",
  12736. "title.search": "搜索",
  12737. "title.product_details": "商品详情",
  12738. "title.group_buying": "拼团商品",
  12739. "title.flash_sale": "秒杀商品",
  12740. "title.product_list": "商品列表",
  12741. "title.rate_product": "评价商品",
  12742. "title.product_reviews": "商品评价",
  12743. "title.order_details": "订单详情",
  12744. "title.confirm_order": "确认订单",
  12745. "title.my_orders": "我的订单",
  12746. "title.apply_service": "申请售后",
  12747. "title.return_logistics": "退货物流",
  12748. "title.after_sales_list": "售后列表",
  12749. "title.after_sales_details": "售后详情",
  12750. "title.after_sales_progress": "售后进度",
  12751. "title.logistics_tracking": "物流轨迹",
  12752. "title.share": "分享",
  12753. "title.my_favorites": "我的收藏",
  12754. "title.my_footprints": "我的足迹",
  12755. "title.physical_address": "实体商品收货地址",
  12756. "title.virtual_address": "虚拟商品收货地址",
  12757. "title.edit_invoice": "发票抬头编辑",
  12758. "title.manage_invoice": "发票抬头管理",
  12759. "title.edit_address": "编辑地址",
  12760. "title.my_balance": "我的余额",
  12761. "title.wallet": "钱包",
  12762. "title.points_source": "消费分来源",
  12763. "title.points_recharge": "消费分充值",
  12764. "title.points_transfer": "消费分转账",
  12765. "title.commission_to_points": "佣金转消费分",
  12766. "title.withdraw": "提现",
  12767. "title.withdraw_records": "提现记录",
  12768. "title.commission_exchange": "佣金兑换",
  12769. "title.team": "团队",
  12770. "title.distribution": "分销",
  12771. "title.my_commission": "我的佣金",
  12772. "title.promote_products": "推广商品",
  12773. "title.distribution_orders": "分销订单",
  12774. "title.my_team": "我的团队",
  12775. "title.promoter_ranking": "推广人排行榜",
  12776. "title.commission_ranking": "佣金排行榜",
  12777. "title.apply_withdraw": "申请提现",
  12778. "title.check_in_center": "签到中心",
  12779. "title.shop_home": "店铺",
  12780. "title.system_settings": "系统设置",
  12781. "title.rich_text": "富文本",
  12782. "title.faq": "常见问题",
  12783. "title.error_page": "错误页面",
  12784. "title.coupon_center": "领券中心",
  12785. "title.coupons": "优惠券",
  12786. "title.customer_service": "客服",
  12787. "title.checkout": "收银台",
  12788. "title.fuiou_result": "富友支付结果",
  12789. "title.payment_result": "支付结果",
  12790. "title.recharge_balance": "充值余额",
  12791. "title.recharge_records": "充值记录",
  12792. "title.group_details": "拼团详情",
  12793. "title.my_groups": "我的拼团",
  12794. "title.marketing_products": "营销商品",
  12795. "title.group_activities": "拼团活动",
  12796. "title.seckill_activities": "秒杀活动",
  12797. "title.bargain_list": "砍价列表",
  12798. "title.bargain_details": "砍价详情",
  12799. common,
  12800. account,
  12801. review,
  12802. confirm,
  12803. address,
  12804. selectSku,
  12805. cashier,
  12806. share,
  12807. merchant,
  12808. useGoods,
  12809. menu,
  12810. user: user$2,
  12811. wallet,
  12812. team,
  12813. sign,
  12814. order,
  12815. setting,
  12816. pop,
  12817. rules
  12818. };
  12819. const userLanguage = vue.ref(uni.getLocale() || "en-US");
  12820. uni.setStorageSync("userLanguage", userLanguage.value);
  12821. const i18n = createI18n({
  12822. locale: userLanguage.value,
  12823. fallbackLocale: "en-US",
  12824. messages: {
  12825. "en": en$3,
  12826. "zh-Hans": zhHans$3
  12827. }
  12828. });
  12829. async function setLanguage(language) {
  12830. userLanguage.value = language;
  12831. uni.setStorageSync("userLanguage", language);
  12832. uni.setLocale(language);
  12833. location.reload();
  12834. }
  12835. function t$6(key, params) {
  12836. return i18n.global.t(key, params);
  12837. }
  12838. const SocialApi = {
  12839. // 获得社交用户
  12840. getSocialUser: (type) => {
  12841. return request$1({
  12842. url: "/member/social-user/get",
  12843. method: "GET",
  12844. params: {
  12845. type
  12846. },
  12847. custom: {
  12848. showLoading: false
  12849. }
  12850. });
  12851. },
  12852. // 社交绑定
  12853. socialBind: (type, code2, state) => {
  12854. return request$1({
  12855. url: "/member/social-user/bind",
  12856. method: "POST",
  12857. data: {
  12858. type,
  12859. code: code2,
  12860. state
  12861. },
  12862. custom: {
  12863. custom: {
  12864. showSuccess: true,
  12865. loadingMsg: t$6("common.binding"),
  12866. successMsg: t$6("common.bind_success")
  12867. }
  12868. }
  12869. });
  12870. },
  12871. // 社交绑定
  12872. socialUnbind: (type, openid) => {
  12873. return request$1({
  12874. url: "/member/social-user/unbind",
  12875. method: "DELETE",
  12876. data: {
  12877. type,
  12878. openid
  12879. },
  12880. custom: {
  12881. showLoading: false,
  12882. loadingMsg: t$6("common.unbind"),
  12883. successMsg: t$6("common.unbind_success")
  12884. }
  12885. });
  12886. }
  12887. };
  12888. const __vite_glob_0_10 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  12889. __proto__: null,
  12890. default: SocialApi
  12891. }, Symbol.toStringTag, { value: "Module" }));
  12892. const socialType = 32;
  12893. const load$1 = async () => {
  12894. };
  12895. const login$1 = () => {
  12896. return new Promise(async (resolve, reject) => {
  12897. const loginRes = await uni.login({
  12898. provider: "weixin",
  12899. onlyAuthorize: true
  12900. });
  12901. debugger;
  12902. if (loginRes.errMsg == "login:ok") {
  12903. const res = await third.wechat.login({
  12904. platform: "openPlatform",
  12905. shareInfo: uni.getStorageSync("shareLog") || {},
  12906. payload: encodeURIComponent(
  12907. JSON.stringify({
  12908. code: loginRes.code
  12909. })
  12910. )
  12911. });
  12912. if (res.error === 0) {
  12913. resolve(true);
  12914. }
  12915. } else {
  12916. uni.showToast({
  12917. icon: "none",
  12918. title: loginRes.errMsg
  12919. });
  12920. }
  12921. resolve(false);
  12922. });
  12923. };
  12924. async function getInfo() {
  12925. const { code: code2, data } = await SocialApi.getSocialUser(socialType);
  12926. if (code2 !== 0) {
  12927. return void 0;
  12928. }
  12929. return data;
  12930. }
  12931. const service$1 = {
  12932. load: load$1,
  12933. login: login$1,
  12934. getInfo
  12935. };
  12936. const wechat = service$1;
  12937. const login = () => {
  12938. return new Promise(async (resolve, reject) => {
  12939. await uni.login({
  12940. provider: "apple",
  12941. success: () => {
  12942. uni.getUserInfo({
  12943. provider: "apple",
  12944. success: async (res) => {
  12945. if (res.errMsg === "getUserInfo:ok") {
  12946. const payload = res.userInfo;
  12947. const { error: error2 } = await third.apple.login({
  12948. payload,
  12949. shareInfo: uni.getStorageSync("shareLog") || {}
  12950. });
  12951. if (error2 === 0) {
  12952. resolve(true);
  12953. } else {
  12954. resolve(false);
  12955. }
  12956. }
  12957. }
  12958. });
  12959. },
  12960. fail: (err) => {
  12961. resolve(false);
  12962. }
  12963. });
  12964. });
  12965. };
  12966. const service = {
  12967. login
  12968. };
  12969. let apple = {};
  12970. if (typeof service !== "undefined") {
  12971. apple = service;
  12972. }
  12973. const apple$1 = apple;
  12974. function email$1(value) {
  12975. return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value);
  12976. }
  12977. function mobile$1(value) {
  12978. return /^1[3456789]\d{9}$/.test(value);
  12979. }
  12980. function url(value) {
  12981. return /^((https|http|ftp|rtsp|mms):\/\/)(([0-9a-zA-Z_!~*'().&=+$%-]+: )?[0-9a-zA-Z_!~*'().&=+$%-]+@)?(([0-9]{1,3}.){3}[0-9]{1,3}|([0-9a-zA-Z_!~*'()-]+.)*([0-9a-zA-Z][0-9a-zA-Z-]{0,61})?[0-9a-zA-Z].[a-zA-Z]{2,6})(:[0-9]{1,4})?((\/?)|(\/[0-9a-zA-Z_!~*'().;?:@&=+$,%#-]+)+\/?)$/.test(
  12982. value
  12983. );
  12984. }
  12985. function date(value) {
  12986. if (!value)
  12987. return false;
  12988. if (number(value))
  12989. value = +value;
  12990. return !/Invalid|NaN/.test(new Date(value).toString());
  12991. }
  12992. function dateISO(value) {
  12993. return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value);
  12994. }
  12995. function number(value) {
  12996. return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value);
  12997. }
  12998. function digits(value) {
  12999. return /^\d+$/.test(value);
  13000. }
  13001. function idCard(value) {
  13002. return /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(value);
  13003. }
  13004. function carNo(value) {
  13005. const xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
  13006. const creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
  13007. if (value.length === 7) {
  13008. return creg.test(value);
  13009. }
  13010. if (value.length === 8) {
  13011. return xreg.test(value);
  13012. }
  13013. return false;
  13014. }
  13015. function amount(value) {
  13016. return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value);
  13017. }
  13018. function chinese(value) {
  13019. const reg = /^[\u4e00-\u9fa5]+$/gi;
  13020. return reg.test(value);
  13021. }
  13022. function letter(value) {
  13023. return /^[a-zA-Z]*$/.test(value);
  13024. }
  13025. function enOrNum(value) {
  13026. const reg = /^[0-9a-zA-Z]*$/g;
  13027. return reg.test(value);
  13028. }
  13029. function contains(value, param) {
  13030. return value.indexOf(param) >= 0;
  13031. }
  13032. function range$1(value, param) {
  13033. return value >= param[0] && value <= param[1];
  13034. }
  13035. function rangeLength(value, param) {
  13036. return value.length >= param[0] && value.length <= param[1];
  13037. }
  13038. function landline(value) {
  13039. const reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
  13040. return reg.test(value);
  13041. }
  13042. function empty(value) {
  13043. switch (typeof value) {
  13044. case "undefined":
  13045. return true;
  13046. case "string":
  13047. if (value.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, "").length == 0)
  13048. return true;
  13049. break;
  13050. case "boolean":
  13051. if (!value)
  13052. return true;
  13053. break;
  13054. case "number":
  13055. if (value === 0 || isNaN(value))
  13056. return true;
  13057. break;
  13058. case "object":
  13059. if (value === null || value.length === 0)
  13060. return true;
  13061. for (const i2 in value) {
  13062. return false;
  13063. }
  13064. return true;
  13065. }
  13066. return false;
  13067. }
  13068. function jsonString(value) {
  13069. if (typeof value === "string") {
  13070. try {
  13071. const obj = JSON.parse(value);
  13072. if (typeof obj === "object" && obj) {
  13073. return true;
  13074. }
  13075. return false;
  13076. } catch (e2) {
  13077. return false;
  13078. }
  13079. }
  13080. return false;
  13081. }
  13082. function array(value) {
  13083. if (typeof Array.isArray === "function") {
  13084. return Array.isArray(value);
  13085. }
  13086. return Object.prototype.toString.call(value) === "[object Array]";
  13087. }
  13088. function object(value) {
  13089. return Object.prototype.toString.call(value) === "[object Object]";
  13090. }
  13091. function code$1(value, len = 6) {
  13092. return new RegExp(`^\\d{${len}}$`).test(value);
  13093. }
  13094. const test$1 = {
  13095. email: email$1,
  13096. mobile: mobile$1,
  13097. url,
  13098. date,
  13099. dateISO,
  13100. number,
  13101. digits,
  13102. idCard,
  13103. carNo,
  13104. amount,
  13105. chinese,
  13106. letter,
  13107. enOrNum,
  13108. contains,
  13109. range: range$1,
  13110. rangeLength,
  13111. empty,
  13112. isEmpty: empty,
  13113. isNumber: number,
  13114. jsonString,
  13115. landline,
  13116. object,
  13117. array,
  13118. code: code$1
  13119. };
  13120. function strip(num, precision = 15) {
  13121. return +parseFloat(Number(num).toPrecision(precision));
  13122. }
  13123. function digitLength(num) {
  13124. const eSplit = num.toString().split(/[eE]/);
  13125. const len = (eSplit[0].split(".")[1] || "").length - +(eSplit[1] || 0);
  13126. return len > 0 ? len : 0;
  13127. }
  13128. function float2Fixed(num) {
  13129. if (num.toString().indexOf("e") === -1) {
  13130. return Number(num.toString().replace(".", ""));
  13131. }
  13132. const dLen = digitLength(num);
  13133. return dLen > 0 ? strip(Number(num) * Math.pow(10, dLen)) : Number(num);
  13134. }
  13135. function checkBoundary(num) {
  13136. {
  13137. if (num > Number.MAX_SAFE_INTEGER || num < Number.MIN_SAFE_INTEGER) {
  13138. formatAppLog("warn", "at sheep/helper/digit.js:45", `${num} 超出了精度限制,结果可能不正确`);
  13139. }
  13140. }
  13141. }
  13142. function iteratorOperation(arr, operation) {
  13143. const [num1, num2, ...others] = arr;
  13144. let res = operation(num1, num2);
  13145. others.forEach((num) => {
  13146. res = operation(res, num);
  13147. });
  13148. return res;
  13149. }
  13150. function times(...nums) {
  13151. if (nums.length > 2) {
  13152. return iteratorOperation(nums, times);
  13153. }
  13154. const [num1, num2] = nums;
  13155. const num1Changed = float2Fixed(num1);
  13156. const num2Changed = float2Fixed(num2);
  13157. const baseNum = digitLength(num1) + digitLength(num2);
  13158. const leftValue = num1Changed * num2Changed;
  13159. checkBoundary(leftValue);
  13160. return leftValue / Math.pow(10, baseNum);
  13161. }
  13162. function divide(...nums) {
  13163. if (nums.length > 2) {
  13164. return iteratorOperation(nums, divide);
  13165. }
  13166. const [num1, num2] = nums;
  13167. const num1Changed = float2Fixed(num1);
  13168. const num2Changed = float2Fixed(num2);
  13169. checkBoundary(num1Changed);
  13170. checkBoundary(num2Changed);
  13171. return times(
  13172. num1Changed / num2Changed,
  13173. strip(Math.pow(10, digitLength(num2) - digitLength(num1)))
  13174. );
  13175. }
  13176. function round(num, ratio) {
  13177. const base = Math.pow(10, ratio);
  13178. let result2 = divide(Math.round(Math.abs(times(num, base))), base);
  13179. if (num < 0 && result2 !== 0) {
  13180. result2 = times(result2, -1);
  13181. }
  13182. return result2;
  13183. }
  13184. var weixinJsSdk = { exports: {} };
  13185. !function(e2, n2) {
  13186. weixinJsSdk.exports = n2(e2);
  13187. }(typeof window === "object" && window, function(r2, e2) {
  13188. if (!r2) {
  13189. formatAppLog("warn", "at node_modules/weixin-js-sdk/index.js:5", "can't use weixin-js-sdk in server side");
  13190. return;
  13191. }
  13192. var a2, c2, n2, i2, t2, o2, s2, d2, l2, u2, p2, f2, m2, g2, h2, S2, y2, I2, v2, _2, w2, T2;
  13193. if (!r2.jWeixin)
  13194. return a2 = {
  13195. config: "preVerifyJSAPI",
  13196. onMenuShareTimeline: "menu:share:timeline",
  13197. onMenuShareAppMessage: "menu:share:appmessage",
  13198. onMenuShareQQ: "menu:share:qq",
  13199. onMenuShareWeibo: "menu:share:weiboApp",
  13200. onMenuShareQZone: "menu:share:QZone",
  13201. previewImage: "imagePreview",
  13202. getLocation: "geoLocation",
  13203. openProductSpecificView: "openProductViewWithPid",
  13204. addCard: "batchAddCard",
  13205. openCard: "batchViewCard",
  13206. chooseWXPay: "getBrandWCPayRequest",
  13207. openEnterpriseRedPacket: "getRecevieBizHongBaoRequest",
  13208. startSearchBeacons: "startMonitoringBeacons",
  13209. stopSearchBeacons: "stopMonitoringBeacons",
  13210. onSearchBeacons: "onBeaconsInRange",
  13211. consumeAndShareCard: "consumedShareCard",
  13212. openAddress: "editAddress"
  13213. }, c2 = function() {
  13214. var e3, n3 = {};
  13215. for (e3 in a2)
  13216. n3[a2[e3]] = e3;
  13217. return n3;
  13218. }(), n2 = r2.document, i2 = n2.title, t2 = navigator.userAgent.toLowerCase(), f2 = navigator.platform.toLowerCase(), o2 = !(!f2.match("mac") && !f2.match("win")), s2 = -1 != t2.indexOf("wxdebugger"), d2 = -1 != t2.indexOf("micromessenger"), l2 = -1 != t2.indexOf("android"), u2 = -1 != t2.indexOf("iphone") || -1 != t2.indexOf("ipad"), p2 = (f2 = t2.match(/micromessenger\/(\d+\.\d+\.\d+)/) || t2.match(/micromessenger\/(\d+\.\d+)/)) ? f2[1] : "", m2 = {
  13219. initStartTime: L2(),
  13220. initEndTime: 0,
  13221. preVerifyStartTime: 0,
  13222. preVerifyEndTime: 0
  13223. }, g2 = {
  13224. version: 1,
  13225. appId: "",
  13226. initTime: 0,
  13227. preVerifyTime: 0,
  13228. networkType: "",
  13229. isPreVerifyOk: 1,
  13230. systemType: u2 ? 1 : l2 ? 2 : -1,
  13231. clientVersion: p2,
  13232. url: encodeURIComponent(location.href)
  13233. }, h2 = {}, S2 = { _completes: [] }, y2 = { state: 0, data: {} }, O2(function() {
  13234. m2.initEndTime = L2();
  13235. }), I2 = false, v2 = [], _2 = {
  13236. config: function(e3) {
  13237. C2("config", h2 = e3);
  13238. var o3 = false !== h2.check;
  13239. O2(function() {
  13240. if (o3)
  13241. k(
  13242. a2.config,
  13243. {
  13244. verifyJsApiList: A2(h2.jsApiList),
  13245. verifyOpenTagList: A2(h2.openTagList)
  13246. },
  13247. (S2._complete = function(e5) {
  13248. m2.preVerifyEndTime = L2(), y2.state = 1, y2.data = e5;
  13249. }, S2.success = function(e5) {
  13250. g2.isPreVerifyOk = 0;
  13251. }, S2.fail = function(e5) {
  13252. S2._fail ? S2._fail(e5) : y2.state = -1;
  13253. }, (t3 = S2._completes).push(function() {
  13254. B2();
  13255. }), S2.complete = function(e5) {
  13256. for (var n4 = 0, i4 = t3.length; n4 < i4; ++n4)
  13257. t3[n4]();
  13258. S2._completes = [];
  13259. }, S2)
  13260. ), m2.preVerifyStartTime = L2();
  13261. else {
  13262. y2.state = 1;
  13263. for (var e4 = S2._completes, n3 = 0, i3 = e4.length; n3 < i3; ++n3)
  13264. e4[n3]();
  13265. S2._completes = [];
  13266. }
  13267. var t3;
  13268. }), _2.invoke || (_2.invoke = function(e4, n3, i3) {
  13269. r2.WeixinJSBridge && WeixinJSBridge.invoke(e4, P2(n3), i3);
  13270. }, _2.on = function(e4, n3) {
  13271. r2.WeixinJSBridge && WeixinJSBridge.on(e4, n3);
  13272. });
  13273. },
  13274. ready: function(e3) {
  13275. (0 != y2.state || (S2._completes.push(e3), !d2 && h2.debug)) && e3();
  13276. },
  13277. error: function(e3) {
  13278. p2 < "6.0.2" || (-1 == y2.state ? e3(y2.data) : S2._fail = e3);
  13279. },
  13280. checkJsApi: function(e3) {
  13281. k(
  13282. "checkJsApi",
  13283. { jsApiList: A2(e3.jsApiList) },
  13284. (e3._complete = function(e4) {
  13285. l2 && (i3 = e4.checkResult) && (e4.checkResult = JSON.parse(i3));
  13286. var n3, i3 = e4, t3 = i3.checkResult;
  13287. for (n3 in t3) {
  13288. var o3 = c2[n3];
  13289. o3 && (t3[o3] = t3[n3], delete t3[n3]);
  13290. }
  13291. }, e3)
  13292. );
  13293. },
  13294. onMenuShareTimeline: function(e3) {
  13295. M2(
  13296. a2.onMenuShareTimeline,
  13297. {
  13298. complete: function() {
  13299. k(
  13300. "shareTimeline",
  13301. {
  13302. title: e3.title || i2,
  13303. desc: e3.title || i2,
  13304. img_url: e3.imgUrl || "",
  13305. link: e3.link || location.href,
  13306. type: e3.type || "link",
  13307. data_url: e3.dataUrl || ""
  13308. },
  13309. e3
  13310. );
  13311. }
  13312. },
  13313. e3
  13314. );
  13315. },
  13316. onMenuShareAppMessage: function(n3) {
  13317. M2(
  13318. a2.onMenuShareAppMessage,
  13319. {
  13320. complete: function(e3) {
  13321. "favorite" === e3.scene ? k("sendAppMessage", {
  13322. title: n3.title || i2,
  13323. desc: n3.desc || "",
  13324. link: n3.link || location.href,
  13325. img_url: n3.imgUrl || "",
  13326. type: n3.type || "link",
  13327. data_url: n3.dataUrl || ""
  13328. }) : k(
  13329. "sendAppMessage",
  13330. {
  13331. title: n3.title || i2,
  13332. desc: n3.desc || "",
  13333. link: n3.link || location.href,
  13334. img_url: n3.imgUrl || "",
  13335. type: n3.type || "link",
  13336. data_url: n3.dataUrl || ""
  13337. },
  13338. n3
  13339. );
  13340. }
  13341. },
  13342. n3
  13343. );
  13344. },
  13345. onMenuShareQQ: function(e3) {
  13346. M2(
  13347. a2.onMenuShareQQ,
  13348. {
  13349. complete: function() {
  13350. k(
  13351. "shareQQ",
  13352. {
  13353. title: e3.title || i2,
  13354. desc: e3.desc || "",
  13355. img_url: e3.imgUrl || "",
  13356. link: e3.link || location.href
  13357. },
  13358. e3
  13359. );
  13360. }
  13361. },
  13362. e3
  13363. );
  13364. },
  13365. onMenuShareWeibo: function(e3) {
  13366. M2(
  13367. a2.onMenuShareWeibo,
  13368. {
  13369. complete: function() {
  13370. k(
  13371. "shareWeiboApp",
  13372. {
  13373. title: e3.title || i2,
  13374. desc: e3.desc || "",
  13375. img_url: e3.imgUrl || "",
  13376. link: e3.link || location.href
  13377. },
  13378. e3
  13379. );
  13380. }
  13381. },
  13382. e3
  13383. );
  13384. },
  13385. onMenuShareQZone: function(e3) {
  13386. M2(
  13387. a2.onMenuShareQZone,
  13388. {
  13389. complete: function() {
  13390. k(
  13391. "shareQZone",
  13392. {
  13393. title: e3.title || i2,
  13394. desc: e3.desc || "",
  13395. img_url: e3.imgUrl || "",
  13396. link: e3.link || location.href
  13397. },
  13398. e3
  13399. );
  13400. }
  13401. },
  13402. e3
  13403. );
  13404. },
  13405. updateTimelineShareData: function(e3) {
  13406. k(
  13407. "updateTimelineShareData",
  13408. { title: e3.title, link: e3.link, imgUrl: e3.imgUrl },
  13409. e3
  13410. );
  13411. },
  13412. updateAppMessageShareData: function(e3) {
  13413. k(
  13414. "updateAppMessageShareData",
  13415. { title: e3.title, desc: e3.desc, link: e3.link, imgUrl: e3.imgUrl },
  13416. e3
  13417. );
  13418. },
  13419. startRecord: function(e3) {
  13420. k("startRecord", {}, e3);
  13421. },
  13422. stopRecord: function(e3) {
  13423. k("stopRecord", {}, e3);
  13424. },
  13425. onVoiceRecordEnd: function(e3) {
  13426. M2("onVoiceRecordEnd", e3);
  13427. },
  13428. playVoice: function(e3) {
  13429. k("playVoice", { localId: e3.localId }, e3);
  13430. },
  13431. pauseVoice: function(e3) {
  13432. k("pauseVoice", { localId: e3.localId }, e3);
  13433. },
  13434. stopVoice: function(e3) {
  13435. k("stopVoice", { localId: e3.localId }, e3);
  13436. },
  13437. onVoicePlayEnd: function(e3) {
  13438. M2("onVoicePlayEnd", e3);
  13439. },
  13440. uploadVoice: function(e3) {
  13441. k(
  13442. "uploadVoice",
  13443. {
  13444. localId: e3.localId,
  13445. isShowProgressTips: 0 == e3.isShowProgressTips ? 0 : 1
  13446. },
  13447. e3
  13448. );
  13449. },
  13450. downloadVoice: function(e3) {
  13451. k(
  13452. "downloadVoice",
  13453. {
  13454. serverId: e3.serverId,
  13455. isShowProgressTips: 0 == e3.isShowProgressTips ? 0 : 1
  13456. },
  13457. e3
  13458. );
  13459. },
  13460. translateVoice: function(e3) {
  13461. k(
  13462. "translateVoice",
  13463. {
  13464. localId: e3.localId,
  13465. isShowProgressTips: 0 == e3.isShowProgressTips ? 0 : 1
  13466. },
  13467. e3
  13468. );
  13469. },
  13470. chooseImage: function(e3) {
  13471. k(
  13472. "chooseImage",
  13473. {
  13474. scene: "1|2",
  13475. count: e3.count || 9,
  13476. sizeType: e3.sizeType || ["original", "compressed"],
  13477. sourceType: e3.sourceType || ["album", "camera"]
  13478. },
  13479. (e3._complete = function(e4) {
  13480. if (l2) {
  13481. var n3 = e4.localIds;
  13482. try {
  13483. n3 && (e4.localIds = JSON.parse(n3));
  13484. } catch (e5) {
  13485. }
  13486. }
  13487. }, e3)
  13488. );
  13489. },
  13490. getLocation: function(e3) {
  13491. e3 = e3 || {}, k(
  13492. a2.getLocation,
  13493. { type: e3.type || "wgs84" },
  13494. (e3._complete = function(e4) {
  13495. delete e4.type;
  13496. }, e3)
  13497. );
  13498. },
  13499. previewImage: function(e3) {
  13500. k(a2.previewImage, { current: e3.current, urls: e3.urls }, e3);
  13501. },
  13502. uploadImage: function(e3) {
  13503. k(
  13504. "uploadImage",
  13505. {
  13506. localId: e3.localId,
  13507. isShowProgressTips: 0 == e3.isShowProgressTips ? 0 : 1
  13508. },
  13509. e3
  13510. );
  13511. },
  13512. downloadImage: function(e3) {
  13513. k(
  13514. "downloadImage",
  13515. {
  13516. serverId: e3.serverId,
  13517. isShowProgressTips: 0 == e3.isShowProgressTips ? 0 : 1
  13518. },
  13519. e3
  13520. );
  13521. },
  13522. getLocalImgData: function(e3) {
  13523. false === I2 ? (I2 = true, k(
  13524. "getLocalImgData",
  13525. { localId: e3.localId },
  13526. (e3._complete = function(e4) {
  13527. var n3;
  13528. I2 = false, 0 < v2.length && (n3 = v2.shift(), wx.getLocalImgData(n3));
  13529. }, e3)
  13530. )) : v2.push(e3);
  13531. },
  13532. getNetworkType: function(e3) {
  13533. k(
  13534. "getNetworkType",
  13535. {},
  13536. (e3._complete = function(e4) {
  13537. var n3 = e4, e4 = n3.errMsg, i3 = (n3.errMsg = "getNetworkType:ok", n3.subtype);
  13538. if (delete n3.subtype, i3)
  13539. n3.networkType = i3;
  13540. else {
  13541. var i3 = e4.indexOf(":"), t3 = e4.substring(i3 + 1);
  13542. switch (t3) {
  13543. case "wifi":
  13544. case "edge":
  13545. case "wwan":
  13546. n3.networkType = t3;
  13547. break;
  13548. default:
  13549. n3.errMsg = "getNetworkType:fail";
  13550. }
  13551. }
  13552. }, e3)
  13553. );
  13554. },
  13555. openLocation: function(e3) {
  13556. k(
  13557. "openLocation",
  13558. {
  13559. latitude: e3.latitude,
  13560. longitude: e3.longitude,
  13561. name: e3.name || "",
  13562. address: e3.address || "",
  13563. scale: e3.scale || 28,
  13564. infoUrl: e3.infoUrl || ""
  13565. },
  13566. e3
  13567. );
  13568. },
  13569. hideOptionMenu: function(e3) {
  13570. k("hideOptionMenu", {}, e3);
  13571. },
  13572. showOptionMenu: function(e3) {
  13573. k("showOptionMenu", {}, e3);
  13574. },
  13575. closeWindow: function(e3) {
  13576. k("closeWindow", {}, e3 = e3 || {});
  13577. },
  13578. hideMenuItems: function(e3) {
  13579. k("hideMenuItems", { menuList: e3.menuList }, e3);
  13580. },
  13581. showMenuItems: function(e3) {
  13582. k("showMenuItems", { menuList: e3.menuList }, e3);
  13583. },
  13584. hideAllNonBaseMenuItem: function(e3) {
  13585. k("hideAllNonBaseMenuItem", {}, e3);
  13586. },
  13587. showAllNonBaseMenuItem: function(e3) {
  13588. k("showAllNonBaseMenuItem", {}, e3);
  13589. },
  13590. scanQRCode: function(e3) {
  13591. k(
  13592. "scanQRCode",
  13593. {
  13594. needResult: (e3 = e3 || {}).needResult || 0,
  13595. scanType: e3.scanType || ["qrCode", "barCode"]
  13596. },
  13597. (e3._complete = function(e4) {
  13598. var n3;
  13599. u2 && (n3 = e4.resultStr) && (n3 = JSON.parse(n3), e4.resultStr = n3 && n3.scan_code && n3.scan_code.scan_result);
  13600. }, e3)
  13601. );
  13602. },
  13603. openAddress: function(e3) {
  13604. k(
  13605. a2.openAddress,
  13606. {},
  13607. (e3._complete = function(e4) {
  13608. (e4 = e4).postalCode = e4.addressPostalCode, delete e4.addressPostalCode, e4.provinceName = e4.proviceFirstStageName, delete e4.proviceFirstStageName, e4.cityName = e4.addressCitySecondStageName, delete e4.addressCitySecondStageName, e4.countryName = e4.addressCountiesThirdStageName, delete e4.addressCountiesThirdStageName, e4.detailInfo = e4.addressDetailInfo, delete e4.addressDetailInfo;
  13609. }, e3)
  13610. );
  13611. },
  13612. openProductSpecificView: function(e3) {
  13613. k(
  13614. a2.openProductSpecificView,
  13615. {
  13616. pid: e3.productId,
  13617. view_type: e3.viewType || 0,
  13618. ext_info: e3.extInfo
  13619. },
  13620. e3
  13621. );
  13622. },
  13623. addCard: function(e3) {
  13624. for (var n3 = e3.cardList, i3 = [], t3 = 0, o3 = n3.length; t3 < o3; ++t3) {
  13625. var r3 = n3[t3], r3 = { card_id: r3.cardId, card_ext: r3.cardExt };
  13626. i3.push(r3);
  13627. }
  13628. k(
  13629. a2.addCard,
  13630. { card_list: i3 },
  13631. (e3._complete = function(e4) {
  13632. if (n4 = e4.card_list) {
  13633. for (var n4, i4 = 0, t4 = (n4 = JSON.parse(n4)).length; i4 < t4; ++i4) {
  13634. var o4 = n4[i4];
  13635. o4.cardId = o4.card_id, o4.cardExt = o4.card_ext, o4.isSuccess = !!o4.is_succ, delete o4.card_id, delete o4.card_ext, delete o4.is_succ;
  13636. }
  13637. e4.cardList = n4, delete e4.card_list;
  13638. }
  13639. }, e3)
  13640. );
  13641. },
  13642. chooseCard: function(e3) {
  13643. k(
  13644. "chooseCard",
  13645. {
  13646. app_id: h2.appId,
  13647. location_id: e3.shopId || "",
  13648. sign_type: e3.signType || "SHA1",
  13649. card_id: e3.cardId || "",
  13650. card_type: e3.cardType || "",
  13651. card_sign: e3.cardSign,
  13652. time_stamp: e3.timestamp + "",
  13653. nonce_str: e3.nonceStr
  13654. },
  13655. (e3._complete = function(e4) {
  13656. e4.cardList = e4.choose_card_info, delete e4.choose_card_info;
  13657. }, e3)
  13658. );
  13659. },
  13660. openCard: function(e3) {
  13661. for (var n3 = e3.cardList, i3 = [], t3 = 0, o3 = n3.length; t3 < o3; ++t3) {
  13662. var r3 = n3[t3], r3 = { card_id: r3.cardId, code: r3.code };
  13663. i3.push(r3);
  13664. }
  13665. k(a2.openCard, { card_list: i3 }, e3);
  13666. },
  13667. consumeAndShareCard: function(e3) {
  13668. k(
  13669. a2.consumeAndShareCard,
  13670. { consumedCardId: e3.cardId, consumedCode: e3.code },
  13671. e3
  13672. );
  13673. },
  13674. chooseWXPay: function(e3) {
  13675. k(a2.chooseWXPay, x(e3), e3), B2({ jsApiName: "chooseWXPay" });
  13676. },
  13677. openEnterpriseRedPacket: function(e3) {
  13678. k(a2.openEnterpriseRedPacket, x(e3), e3);
  13679. },
  13680. startSearchBeacons: function(e3) {
  13681. k(a2.startSearchBeacons, { ticket: e3.ticket }, e3);
  13682. },
  13683. stopSearchBeacons: function(e3) {
  13684. k(a2.stopSearchBeacons, {}, e3);
  13685. },
  13686. onSearchBeacons: function(e3) {
  13687. M2(a2.onSearchBeacons, e3);
  13688. },
  13689. openEnterpriseChat: function(e3) {
  13690. k(
  13691. "openEnterpriseChat",
  13692. { useridlist: e3.userIds, chatname: e3.groupName },
  13693. e3
  13694. );
  13695. },
  13696. launchMiniProgram: function(e3) {
  13697. k(
  13698. "launchMiniProgram",
  13699. {
  13700. targetAppId: e3.targetAppId,
  13701. path: function(e4) {
  13702. var n3;
  13703. if ("string" == typeof e4 && 0 < e4.length)
  13704. return n3 = e4.split("?")[0], n3 += ".html", void 0 !== (e4 = e4.split("?")[1]) ? n3 + "?" + e4 : n3;
  13705. }(e3.path),
  13706. envVersion: e3.envVersion
  13707. },
  13708. e3
  13709. );
  13710. },
  13711. openBusinessView: function(e3) {
  13712. k(
  13713. "openBusinessView",
  13714. {
  13715. businessType: e3.businessType,
  13716. queryString: e3.queryString || "",
  13717. envVersion: e3.envVersion
  13718. },
  13719. (e3._complete = function(n3) {
  13720. if (l2) {
  13721. var e4 = n3.extraData;
  13722. if (e4)
  13723. try {
  13724. n3.extraData = JSON.parse(e4);
  13725. } catch (e5) {
  13726. n3.extraData = {};
  13727. }
  13728. }
  13729. }, e3)
  13730. );
  13731. },
  13732. miniProgram: {
  13733. navigateBack: function(e3) {
  13734. e3 = e3 || {}, O2(function() {
  13735. k(
  13736. "invokeMiniProgramAPI",
  13737. { name: "navigateBack", arg: { delta: e3.delta || 1 } },
  13738. e3
  13739. );
  13740. });
  13741. },
  13742. navigateTo: function(e3) {
  13743. O2(function() {
  13744. k(
  13745. "invokeMiniProgramAPI",
  13746. { name: "navigateTo", arg: { url: e3.url } },
  13747. e3
  13748. );
  13749. });
  13750. },
  13751. redirectTo: function(e3) {
  13752. O2(function() {
  13753. k(
  13754. "invokeMiniProgramAPI",
  13755. { name: "redirectTo", arg: { url: e3.url } },
  13756. e3
  13757. );
  13758. });
  13759. },
  13760. switchTab: function(e3) {
  13761. O2(function() {
  13762. k(
  13763. "invokeMiniProgramAPI",
  13764. { name: "switchTab", arg: { url: e3.url } },
  13765. e3
  13766. );
  13767. });
  13768. },
  13769. reLaunch: function(e3) {
  13770. O2(function() {
  13771. k(
  13772. "invokeMiniProgramAPI",
  13773. { name: "reLaunch", arg: { url: e3.url } },
  13774. e3
  13775. );
  13776. });
  13777. },
  13778. postMessage: function(e3) {
  13779. O2(function() {
  13780. k(
  13781. "invokeMiniProgramAPI",
  13782. { name: "postMessage", arg: e3.data || {} },
  13783. e3
  13784. );
  13785. });
  13786. },
  13787. getEnv: function(e3) {
  13788. O2(function() {
  13789. e3({ miniprogram: "miniprogram" === r2.__wxjs_environment });
  13790. });
  13791. }
  13792. }
  13793. }, w2 = 1, T2 = {}, n2.addEventListener(
  13794. "error",
  13795. function(e3) {
  13796. var n3, i3, t3;
  13797. l2 || (t3 = (n3 = e3.target).tagName, i3 = n3.src, "IMG" != t3 && "VIDEO" != t3 && "AUDIO" != t3 && "SOURCE" != t3) || -1 != i3.indexOf("wxlocalresource://") && (e3.preventDefault(), e3.stopPropagation(), (t3 = n3["wx-id"]) || (t3 = w2++, n3["wx-id"] = t3), T2[t3] || (T2[t3] = true, wx.ready(function() {
  13798. wx.getLocalImgData({
  13799. localId: i3,
  13800. success: function(e4) {
  13801. n3.src = e4.localData;
  13802. }
  13803. });
  13804. })));
  13805. },
  13806. true
  13807. ), n2.addEventListener(
  13808. "load",
  13809. function(e3) {
  13810. var n3;
  13811. l2 || (n3 = (e3 = e3.target).tagName, e3.src, "IMG" != n3 && "VIDEO" != n3 && "AUDIO" != n3 && "SOURCE" != n3) || (n3 = e3["wx-id"]) && (T2[n3] = false);
  13812. },
  13813. true
  13814. ), e2 && (r2.wx = r2.jWeixin = _2), _2;
  13815. else
  13816. return r2.jWeixin;
  13817. function k(n3, e3, i3) {
  13818. r2.WeixinJSBridge ? WeixinJSBridge.invoke(n3, P2(e3), function(e4) {
  13819. V2(n3, e4, i3);
  13820. }) : C2(n3, i3);
  13821. }
  13822. function M2(n3, i3, t3) {
  13823. r2.WeixinJSBridge ? WeixinJSBridge.on(n3, function(e3) {
  13824. t3 && t3.trigger && t3.trigger(e3), V2(n3, e3, i3);
  13825. }) : C2(n3, t3 || i3);
  13826. }
  13827. function P2(e3) {
  13828. return (e3 = e3 || {}).appId = h2.appId, e3.verifyAppId = h2.appId, e3.verifySignType = "sha1", e3.verifyTimestamp = h2.timestamp + "", e3.verifyNonceStr = h2.nonceStr, e3.verifySignature = h2.signature, e3;
  13829. }
  13830. function x(e3) {
  13831. return {
  13832. timeStamp: e3.timestamp + "",
  13833. nonceStr: e3.nonceStr,
  13834. package: e3.package,
  13835. paySign: e3.paySign,
  13836. signType: e3.signType || "SHA1"
  13837. };
  13838. }
  13839. function V2(e3, n3, i3) {
  13840. "openEnterpriseChat" != e3 && "openBusinessView" !== e3 || (n3.errCode = n3.err_code), delete n3.err_code, delete n3.err_desc, delete n3.err_detail;
  13841. var t3 = n3.errMsg, e3 = (t3 || (t3 = n3.err_msg, delete n3.err_msg, t3 = function(e4, n4) {
  13842. var i4 = c2[e4];
  13843. i4 && (e4 = i4);
  13844. i4 = "ok";
  13845. {
  13846. var t4;
  13847. n4 && (t4 = n4.indexOf(":"), "access denied" != (i4 = (i4 = (i4 = -1 != (i4 = -1 != (i4 = "failed" == (i4 = "confirm" == (i4 = n4.substring(t4 + 1)) ? "ok" : i4) ? "fail" : i4).indexOf("failed_") ? i4.substring(7) : i4).indexOf("fail_") ? i4.substring(5) : i4).replace(/_/g, " ")).toLowerCase()) && "no permission to execute" != i4 || (i4 = "permission denied"), "" == (i4 = "config" == e4 && "function not exist" == i4 ? "ok" : i4)) && (i4 = "fail");
  13848. }
  13849. return n4 = e4 + ":" + i4;
  13850. }(e3, t3), n3.errMsg = t3), (i3 = i3 || {})._complete && (i3._complete(n3), delete i3._complete), t3 = n3.errMsg || "", h2.debug && !i3.isInnerInvoke && alert(JSON.stringify(n3)), t3.indexOf(":"));
  13851. switch (t3.substring(e3 + 1)) {
  13852. case "ok":
  13853. i3.success && i3.success(n3);
  13854. break;
  13855. case "cancel":
  13856. i3.cancel && i3.cancel(n3);
  13857. break;
  13858. default:
  13859. i3.fail && i3.fail(n3);
  13860. }
  13861. i3.complete && i3.complete(n3);
  13862. }
  13863. function A2(e3) {
  13864. if (e3) {
  13865. for (var n3 = 0, i3 = e3.length; n3 < i3; ++n3) {
  13866. var t3 = e3[n3], t3 = a2[t3];
  13867. t3 && (e3[n3] = t3);
  13868. }
  13869. return e3;
  13870. }
  13871. }
  13872. function C2(e3, n3) {
  13873. var i3;
  13874. !h2.debug || n3 && n3.isInnerInvoke || ((i3 = c2[e3]) && (e3 = i3), n3 && n3._complete && delete n3._complete, formatAppLog("log", "at node_modules/weixin-js-sdk/index.js:839", '"' + e3 + '",', n3 || ""));
  13875. }
  13876. function B2(n3) {
  13877. var i3;
  13878. o2 || s2 || h2.debug || p2 < "6.0.2" || g2.systemType < 0 || (i3 = new Image(), g2.appId = h2.appId, g2.initTime = m2.initEndTime - m2.initStartTime, g2.preVerifyTime = m2.preVerifyEndTime - m2.preVerifyStartTime, _2.getNetworkType({
  13879. isInnerInvoke: true,
  13880. success: function(e3) {
  13881. g2.networkType = e3.networkType;
  13882. e3 = "https://open.weixin.qq.com/sdk/report?v=" + g2.version + "&o=" + g2.isPreVerifyOk + "&s=" + g2.systemType + "&c=" + g2.clientVersion + "&a=" + g2.appId + "&n=" + g2.networkType + "&i=" + g2.initTime + "&p=" + g2.preVerifyTime + "&u=" + g2.url + "&jsapi_name=" + (n3 ? n3.jsApiName : "");
  13883. i3.src = e3;
  13884. }
  13885. }));
  13886. }
  13887. function L2() {
  13888. return (/* @__PURE__ */ new Date()).getTime();
  13889. }
  13890. function O2(e3) {
  13891. d2 && (r2.WeixinJSBridge ? e3() : n2.addEventListener && n2.addEventListener("WeixinJSBridgeReady", e3, false));
  13892. }
  13893. });
  13894. var weixinJsSdkExports = weixinJsSdk.exports;
  13895. const wx$1 = /* @__PURE__ */ getDefaultExportFromCjs(weixinJsSdkExports);
  13896. function range(min = 0, max = 0, value = 0) {
  13897. return Math.max(min, Math.min(max, Number(value)));
  13898. }
  13899. function getPx(value, unit = false) {
  13900. if (test$1.number(value)) {
  13901. return unit ? `${value}px` : Number(value);
  13902. }
  13903. if (/(rpx|upx)$/.test(value)) {
  13904. return unit ? `${uni.upx2px(parseInt(value))}px` : Number(uni.upx2px(parseInt(value)));
  13905. }
  13906. return unit ? `${parseInt(value)}px` : parseInt(value);
  13907. }
  13908. function sleep(value = 30) {
  13909. return new Promise((resolve) => {
  13910. setTimeout(() => {
  13911. resolve();
  13912. }, value);
  13913. });
  13914. }
  13915. function os$2() {
  13916. return uni.getSystemInfoSync().platform.toLowerCase();
  13917. }
  13918. function sys$1() {
  13919. return uni.getSystemInfoSync();
  13920. }
  13921. function random(min, max) {
  13922. if (min >= 0 && max > 0 && max >= min) {
  13923. const gab = max - min + 1;
  13924. return Math.floor(Math.random() * gab + min);
  13925. }
  13926. return 0;
  13927. }
  13928. function guid(len = 32, firstU = true, radix = null) {
  13929. const chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
  13930. const uuid = [];
  13931. radix = radix || chars.length;
  13932. if (len) {
  13933. for (let i2 = 0; i2 < len; i2++)
  13934. uuid[i2] = chars[0 | Math.random() * radix];
  13935. } else {
  13936. let r2;
  13937. uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-";
  13938. uuid[14] = "4";
  13939. for (let i2 = 0; i2 < 36; i2++) {
  13940. if (!uuid[i2]) {
  13941. r2 = 0 | Math.random() * 16;
  13942. uuid[i2] = chars[i2 == 19 ? r2 & 3 | 8 : r2];
  13943. }
  13944. }
  13945. }
  13946. if (firstU) {
  13947. uuid.shift();
  13948. return `u${uuid.join("")}`;
  13949. }
  13950. return uuid.join("");
  13951. }
  13952. function $parent(name2 = void 0) {
  13953. let parent2 = this.$parent;
  13954. while (parent2) {
  13955. if (parent2.$options && parent2.$options.name !== name2) {
  13956. parent2 = parent2.$parent;
  13957. } else {
  13958. return parent2;
  13959. }
  13960. }
  13961. return false;
  13962. }
  13963. function addStyle(customStyle, target = "object") {
  13964. if (test$1.empty(customStyle) || typeof customStyle === "object" && target === "object" || target === "string" && typeof customStyle === "string") {
  13965. return customStyle;
  13966. }
  13967. if (target === "object") {
  13968. customStyle = trim$1(customStyle);
  13969. const styleArray = customStyle.split(";");
  13970. const style = {};
  13971. for (let i2 = 0; i2 < styleArray.length; i2++) {
  13972. if (styleArray[i2]) {
  13973. const item = styleArray[i2].split(":");
  13974. style[trim$1(item[0])] = trim$1(item[1]);
  13975. }
  13976. }
  13977. return style;
  13978. }
  13979. let string = "";
  13980. for (const i2 in customStyle) {
  13981. const key = i2.replace(/([A-Z])/g, "-$1").toLowerCase();
  13982. string += `${key}:${customStyle[i2]};`;
  13983. }
  13984. return trim$1(string);
  13985. }
  13986. function addUnit(value = "auto", unit = "px") {
  13987. value = String(value);
  13988. return test$1.number(value) ? `${value}${unit}` : value;
  13989. }
  13990. function deepClone(obj) {
  13991. if ([null, void 0, NaN, false].includes(obj))
  13992. return obj;
  13993. if (typeof obj !== "object" && typeof obj !== "function") {
  13994. return obj;
  13995. }
  13996. const o2 = test$1.array(obj) ? [] : {};
  13997. for (const i2 in obj) {
  13998. if (obj.hasOwnProperty(i2)) {
  13999. o2[i2] = typeof obj[i2] === "object" ? deepClone(obj[i2]) : obj[i2];
  14000. }
  14001. }
  14002. return o2;
  14003. }
  14004. function deepMerge(target = {}, source = {}) {
  14005. target = deepClone(target);
  14006. if (typeof target !== "object" || typeof source !== "object")
  14007. return false;
  14008. for (const prop in source) {
  14009. if (!source.hasOwnProperty(prop))
  14010. continue;
  14011. if (prop in target) {
  14012. if (typeof target[prop] !== "object") {
  14013. target[prop] = source[prop];
  14014. } else if (typeof source[prop] !== "object") {
  14015. target[prop] = source[prop];
  14016. } else if (target[prop].concat && source[prop].concat) {
  14017. target[prop] = target[prop].concat(source[prop]);
  14018. } else {
  14019. target[prop] = deepMerge(target[prop], source[prop]);
  14020. }
  14021. } else {
  14022. target[prop] = source[prop];
  14023. }
  14024. }
  14025. return target;
  14026. }
  14027. function error$1(err) {
  14028. {
  14029. formatAppLog("error", "at sheep/helper/index.js:241", `SheepJS:${err}`);
  14030. }
  14031. }
  14032. function randomArray(array2 = []) {
  14033. return array2.sort(() => Math.random() - 0.5);
  14034. }
  14035. if (!String.prototype.padStart) {
  14036. String.prototype.padStart = function(maxLength, fillString = " ") {
  14037. if (Object.prototype.toString.call(fillString) !== "[object String]") {
  14038. throw new TypeError("fillString must be String");
  14039. }
  14040. const str = this;
  14041. if (str.length >= maxLength)
  14042. return String(str);
  14043. const fillLength = maxLength - str.length;
  14044. let times2 = Math.ceil(fillLength / fillString.length);
  14045. while (times2 >>= 1) {
  14046. fillString += fillString;
  14047. if (times2 === 1) {
  14048. fillString += fillString;
  14049. }
  14050. }
  14051. return fillString.slice(0, fillLength) + str;
  14052. };
  14053. }
  14054. function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd") {
  14055. let date2;
  14056. if (!dateTime) {
  14057. date2 = /* @__PURE__ */ new Date();
  14058. } else if (/^\d{10}$/.test(dateTime == null ? void 0 : dateTime.toString().trim())) {
  14059. date2 = new Date(dateTime * 1e3);
  14060. } else if (typeof dateTime === "string" && /^\d+$/.test(dateTime.trim())) {
  14061. date2 = new Date(Number(dateTime));
  14062. } else {
  14063. date2 = new Date(typeof dateTime === "string" ? dateTime.replace(/-/g, "/") : dateTime);
  14064. }
  14065. const timeSource = {
  14066. y: date2.getFullYear().toString(),
  14067. // 年
  14068. m: (date2.getMonth() + 1).toString().padStart(2, "0"),
  14069. // 月
  14070. d: date2.getDate().toString().padStart(2, "0"),
  14071. // 日
  14072. h: date2.getHours().toString().padStart(2, "0"),
  14073. // 时
  14074. M: date2.getMinutes().toString().padStart(2, "0"),
  14075. // 分
  14076. s: date2.getSeconds().toString().padStart(2, "0")
  14077. // 秒
  14078. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  14079. };
  14080. for (const key in timeSource) {
  14081. const [ret] = new RegExp(`${key}+`).exec(formatStr) || [];
  14082. if (ret) {
  14083. const beginIndex = key === "y" && ret.length === 2 ? 2 : 0;
  14084. formatStr = formatStr.replace(ret, timeSource[key].slice(beginIndex));
  14085. }
  14086. }
  14087. return formatStr;
  14088. }
  14089. function timeFrom(timestamp = null, format2 = "yyyy-mm-dd") {
  14090. if (timestamp == null)
  14091. timestamp = Number(/* @__PURE__ */ new Date());
  14092. timestamp = parseInt(timestamp);
  14093. if (timestamp.toString().length == 10)
  14094. timestamp *= 1e3;
  14095. let timer2 = (/* @__PURE__ */ new Date()).getTime() - timestamp;
  14096. timer2 = parseInt(timer2 / 1e3);
  14097. let tips = "";
  14098. switch (true) {
  14099. case timer2 < 300:
  14100. tips = t$6("common.just_now");
  14101. break;
  14102. case (timer2 >= 300 && timer2 < 3600):
  14103. tips = t$6("common.minutes_ago", { m: parseInt(timer2 / 60) });
  14104. break;
  14105. case (timer2 >= 3600 && timer2 < 86400):
  14106. tips = t$6("common.hours_ago", { h: parseInt(timer2 / 3600) });
  14107. break;
  14108. case (timer2 >= 86400 && timer2 < 2592e3):
  14109. tips = t$6("common.days_ago", { d: parseInt(timer2 / 86400) });
  14110. break;
  14111. default:
  14112. if (format2 === false) {
  14113. if (timer2 >= 2592e3 && timer2 < 365 * 86400) {
  14114. tips = t$6("common.months_ago", { m: parseInt(timer2 / (86400 * 30)) });
  14115. } else {
  14116. tips = t$6("common.years_ago", { y: parseInt(timer2 / (86400 * 365)) });
  14117. }
  14118. } else {
  14119. tips = timeFormat(timestamp, format2);
  14120. }
  14121. }
  14122. return tips;
  14123. }
  14124. function trim$1(str, pos = "both") {
  14125. str = String(str);
  14126. if (pos == "both") {
  14127. return str.replace(/^\s+|\s+$/g, "");
  14128. }
  14129. if (pos == "left") {
  14130. return str.replace(/^\s*/, "");
  14131. }
  14132. if (pos == "right") {
  14133. return str.replace(/(\s*$)/g, "");
  14134. }
  14135. if (pos == "all") {
  14136. return str.replace(/\s+/g, "");
  14137. }
  14138. return str;
  14139. }
  14140. function queryParams(data = {}, isPrefix = true, arrayFormat = "brackets") {
  14141. const prefix = isPrefix ? "?" : "";
  14142. const _result = [];
  14143. if (["indices", "brackets", "repeat", "comma"].indexOf(arrayFormat) == -1)
  14144. arrayFormat = "brackets";
  14145. for (const key in data) {
  14146. const value = data[key];
  14147. if (["", void 0, null].indexOf(value) >= 0) {
  14148. continue;
  14149. }
  14150. if (value.constructor === Array) {
  14151. switch (arrayFormat) {
  14152. case "indices":
  14153. for (let i2 = 0; i2 < value.length; i2++) {
  14154. _result.push(`${key}[${i2}]=${value[i2]}`);
  14155. }
  14156. break;
  14157. case "brackets":
  14158. value.forEach((_value) => {
  14159. _result.push(`${key}[]=${_value}`);
  14160. });
  14161. break;
  14162. case "repeat":
  14163. value.forEach((_value) => {
  14164. _result.push(`${key}=${_value}`);
  14165. });
  14166. break;
  14167. case "comma":
  14168. let commaStr = "";
  14169. value.forEach((_value) => {
  14170. commaStr += (commaStr ? "," : "") + _value;
  14171. });
  14172. _result.push(`${key}=${commaStr}`);
  14173. break;
  14174. default:
  14175. value.forEach((_value) => {
  14176. _result.push(`${key}[]=${_value}`);
  14177. });
  14178. }
  14179. } else {
  14180. _result.push(`${key}=${value}`);
  14181. }
  14182. }
  14183. return _result.length ? prefix + _result.join("&") : "";
  14184. }
  14185. function toast(title, duration2 = 2e3) {
  14186. uni.showToast({
  14187. title: String(title),
  14188. icon: "none",
  14189. duration: duration2
  14190. });
  14191. }
  14192. function type2icon(type = "success", fill = false) {
  14193. if (["primary", "info", "error", "warning", "success"].indexOf(type) == -1)
  14194. type = "success";
  14195. let iconName = "";
  14196. switch (type) {
  14197. case "primary":
  14198. iconName = "info-circle";
  14199. break;
  14200. case "info":
  14201. iconName = "info-circle";
  14202. break;
  14203. case "error":
  14204. iconName = "close-circle";
  14205. break;
  14206. case "warning":
  14207. iconName = "error-circle";
  14208. break;
  14209. case "success":
  14210. iconName = "checkmark-circle";
  14211. break;
  14212. default:
  14213. iconName = "checkmark-circle";
  14214. }
  14215. if (fill)
  14216. iconName += "-fill";
  14217. return iconName;
  14218. }
  14219. function priceFormat(number2, decimals = 0, decimalPoint = ".", thousandsSeparator = ",") {
  14220. number2 = `${number2}`.replace(/[^0-9+-Ee.]/g, "");
  14221. const n2 = !isFinite(+number2) ? 0 : +number2;
  14222. const prec = !isFinite(+decimals) ? 0 : Math.abs(decimals);
  14223. const sep = typeof thousandsSeparator === "undefined" ? "," : thousandsSeparator;
  14224. const dec = typeof decimalPoint === "undefined" ? "." : decimalPoint;
  14225. let s2 = "";
  14226. s2 = (prec ? round(n2, prec) + "" : `${Math.round(n2)}`).split(".");
  14227. const re2 = /(-?\d+)(\d{3})/;
  14228. while (re2.test(s2[0])) {
  14229. s2[0] = s2[0].replace(re2, `$1${sep}$2`);
  14230. }
  14231. if ((s2[1] || "").length < prec) {
  14232. s2[1] = s2[1] || "";
  14233. s2[1] += new Array(prec - s2[1].length + 1).join("0");
  14234. }
  14235. return s2.join(dec);
  14236. }
  14237. function getDuration(value, unit = true) {
  14238. const valueNum = parseInt(value);
  14239. if (unit) {
  14240. if (/s$/.test(value))
  14241. return value;
  14242. return value > 30 ? `${value}ms` : `${value}s`;
  14243. }
  14244. if (/ms$/.test(value))
  14245. return valueNum;
  14246. if (/s$/.test(value))
  14247. return valueNum > 30 ? valueNum : valueNum * 1e3;
  14248. return valueNum;
  14249. }
  14250. function padZero(value) {
  14251. return `00${value}`.slice(-2);
  14252. }
  14253. function getProperty(obj, key) {
  14254. if (!obj) {
  14255. return;
  14256. }
  14257. if (typeof key !== "string" || key === "") {
  14258. return "";
  14259. }
  14260. if (key.indexOf(".") !== -1) {
  14261. const keys = key.split(".");
  14262. let firstObj = obj[keys[0]] || {};
  14263. for (let i2 = 1; i2 < keys.length; i2++) {
  14264. if (firstObj) {
  14265. firstObj = firstObj[keys[i2]];
  14266. }
  14267. }
  14268. return firstObj;
  14269. }
  14270. return obj[key];
  14271. }
  14272. function setProperty(obj, key, value) {
  14273. if (!obj) {
  14274. return;
  14275. }
  14276. const inFn = function(_obj, keys, v2) {
  14277. if (keys.length === 1) {
  14278. _obj[keys[0]] = v2;
  14279. return;
  14280. }
  14281. while (keys.length > 1) {
  14282. const k = keys[0];
  14283. if (!_obj[k] || typeof _obj[k] !== "object") {
  14284. _obj[k] = {};
  14285. }
  14286. keys.shift();
  14287. inFn(_obj[k], keys, v2);
  14288. }
  14289. };
  14290. if (typeof key !== "string" || key === "")
  14291. ;
  14292. else if (key.indexOf(".") !== -1) {
  14293. const keys = key.split(".");
  14294. inFn(obj, keys, value);
  14295. } else {
  14296. obj[key] = value;
  14297. }
  14298. }
  14299. function page() {
  14300. var _a2;
  14301. const pages2 = getCurrentPages();
  14302. return `/${((_a2 = pages2[pages2.length - 1]) == null ? void 0 : _a2.route) ?? ""}`;
  14303. }
  14304. function pages$1() {
  14305. const pages2 = getCurrentPages();
  14306. return pages2;
  14307. }
  14308. function getRootUrl() {
  14309. let url2 = "";
  14310. return url2;
  14311. }
  14312. function copyText(text) {
  14313. uni.setClipboardData({
  14314. data: text,
  14315. success: function() {
  14316. toast(t$6("common.copy_success"));
  14317. },
  14318. fail: function() {
  14319. toast(t$6("common.copy_fail"));
  14320. }
  14321. });
  14322. }
  14323. const $helper = {
  14324. range,
  14325. getPx,
  14326. sleep,
  14327. os: os$2,
  14328. sys: sys$1,
  14329. random,
  14330. guid,
  14331. $parent,
  14332. addStyle,
  14333. addUnit,
  14334. deepClone,
  14335. deepMerge,
  14336. error: error$1,
  14337. randomArray,
  14338. timeFormat,
  14339. timeFrom,
  14340. trim: trim$1,
  14341. queryParams,
  14342. toast,
  14343. type2icon,
  14344. priceFormat,
  14345. getDuration,
  14346. padZero,
  14347. getProperty,
  14348. setProperty,
  14349. page,
  14350. pages: pages$1,
  14351. test: test$1,
  14352. getRootUrl,
  14353. copyText
  14354. };
  14355. var dayjs_min = { exports: {} };
  14356. (function(module, exports) {
  14357. !function(t2, e2) {
  14358. module.exports = e2();
  14359. }(commonjsGlobal, function() {
  14360. var t2 = 1e3, e2 = 6e4, n2 = 36e5, r2 = "millisecond", i2 = "second", s2 = "minute", u2 = "hour", a2 = "day", o2 = "week", c2 = "month", f2 = "quarter", h2 = "year", d2 = "date", l2 = "Invalid Date", $2 = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y2 = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M2 = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t3) {
  14361. var e3 = ["th", "st", "nd", "rd"], n3 = t3 % 100;
  14362. return "[" + t3 + (e3[(n3 - 20) % 10] || e3[n3] || e3[0]) + "]";
  14363. } }, m2 = function(t3, e3, n3) {
  14364. var r3 = String(t3);
  14365. return !r3 || r3.length >= e3 ? t3 : "" + Array(e3 + 1 - r3.length).join(n3) + t3;
  14366. }, v2 = { s: m2, z: function(t3) {
  14367. var e3 = -t3.utcOffset(), n3 = Math.abs(e3), r3 = Math.floor(n3 / 60), i3 = n3 % 60;
  14368. return (e3 <= 0 ? "+" : "-") + m2(r3, 2, "0") + ":" + m2(i3, 2, "0");
  14369. }, m: function t3(e3, n3) {
  14370. if (e3.date() < n3.date())
  14371. return -t3(n3, e3);
  14372. var r3 = 12 * (n3.year() - e3.year()) + (n3.month() - e3.month()), i3 = e3.clone().add(r3, c2), s3 = n3 - i3 < 0, u3 = e3.clone().add(r3 + (s3 ? -1 : 1), c2);
  14373. return +(-(r3 + (n3 - i3) / (s3 ? i3 - u3 : u3 - i3)) || 0);
  14374. }, a: function(t3) {
  14375. return t3 < 0 ? Math.ceil(t3) || 0 : Math.floor(t3);
  14376. }, p: function(t3) {
  14377. return { M: c2, y: h2, w: o2, d: a2, D: d2, h: u2, m: s2, s: i2, ms: r2, Q: f2 }[t3] || String(t3 || "").toLowerCase().replace(/s$/, "");
  14378. }, u: function(t3) {
  14379. return void 0 === t3;
  14380. } }, g2 = "en", D2 = {};
  14381. D2[g2] = M2;
  14382. var p2 = "$isDayjsObject", S2 = function(t3) {
  14383. return t3 instanceof _2 || !(!t3 || !t3[p2]);
  14384. }, w2 = function t3(e3, n3, r3) {
  14385. var i3;
  14386. if (!e3)
  14387. return g2;
  14388. if ("string" == typeof e3) {
  14389. var s3 = e3.toLowerCase();
  14390. D2[s3] && (i3 = s3), n3 && (D2[s3] = n3, i3 = s3);
  14391. var u3 = e3.split("-");
  14392. if (!i3 && u3.length > 1)
  14393. return t3(u3[0]);
  14394. } else {
  14395. var a3 = e3.name;
  14396. D2[a3] = e3, i3 = a3;
  14397. }
  14398. return !r3 && i3 && (g2 = i3), i3 || !r3 && g2;
  14399. }, O2 = function(t3, e3) {
  14400. if (S2(t3))
  14401. return t3.clone();
  14402. var n3 = "object" == typeof e3 ? e3 : {};
  14403. return n3.date = t3, n3.args = arguments, new _2(n3);
  14404. }, b2 = v2;
  14405. b2.l = w2, b2.i = S2, b2.w = function(t3, e3) {
  14406. return O2(t3, { locale: e3.$L, utc: e3.$u, x: e3.$x, $offset: e3.$offset });
  14407. };
  14408. var _2 = function() {
  14409. function M3(t3) {
  14410. this.$L = w2(t3.locale, null, true), this.parse(t3), this.$x = this.$x || t3.x || {}, this[p2] = true;
  14411. }
  14412. var m3 = M3.prototype;
  14413. return m3.parse = function(t3) {
  14414. this.$d = function(t4) {
  14415. var e3 = t4.date, n3 = t4.utc;
  14416. if (null === e3)
  14417. return /* @__PURE__ */ new Date(NaN);
  14418. if (b2.u(e3))
  14419. return /* @__PURE__ */ new Date();
  14420. if (e3 instanceof Date)
  14421. return new Date(e3);
  14422. if ("string" == typeof e3 && !/Z$/i.test(e3)) {
  14423. var r3 = e3.match($2);
  14424. if (r3) {
  14425. var i3 = r3[2] - 1 || 0, s3 = (r3[7] || "0").substring(0, 3);
  14426. return n3 ? new Date(Date.UTC(r3[1], i3, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3)) : new Date(r3[1], i3, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3);
  14427. }
  14428. }
  14429. return new Date(e3);
  14430. }(t3), this.init();
  14431. }, m3.init = function() {
  14432. var t3 = this.$d;
  14433. this.$y = t3.getFullYear(), this.$M = t3.getMonth(), this.$D = t3.getDate(), this.$W = t3.getDay(), this.$H = t3.getHours(), this.$m = t3.getMinutes(), this.$s = t3.getSeconds(), this.$ms = t3.getMilliseconds();
  14434. }, m3.$utils = function() {
  14435. return b2;
  14436. }, m3.isValid = function() {
  14437. return !(this.$d.toString() === l2);
  14438. }, m3.isSame = function(t3, e3) {
  14439. var n3 = O2(t3);
  14440. return this.startOf(e3) <= n3 && n3 <= this.endOf(e3);
  14441. }, m3.isAfter = function(t3, e3) {
  14442. return O2(t3) < this.startOf(e3);
  14443. }, m3.isBefore = function(t3, e3) {
  14444. return this.endOf(e3) < O2(t3);
  14445. }, m3.$g = function(t3, e3, n3) {
  14446. return b2.u(t3) ? this[e3] : this.set(n3, t3);
  14447. }, m3.unix = function() {
  14448. return Math.floor(this.valueOf() / 1e3);
  14449. }, m3.valueOf = function() {
  14450. return this.$d.getTime();
  14451. }, m3.startOf = function(t3, e3) {
  14452. var n3 = this, r3 = !!b2.u(e3) || e3, f3 = b2.p(t3), l3 = function(t4, e4) {
  14453. var i3 = b2.w(n3.$u ? Date.UTC(n3.$y, e4, t4) : new Date(n3.$y, e4, t4), n3);
  14454. return r3 ? i3 : i3.endOf(a2);
  14455. }, $3 = function(t4, e4) {
  14456. return b2.w(n3.toDate()[t4].apply(n3.toDate("s"), (r3 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e4)), n3);
  14457. }, y3 = this.$W, M4 = this.$M, m4 = this.$D, v3 = "set" + (this.$u ? "UTC" : "");
  14458. switch (f3) {
  14459. case h2:
  14460. return r3 ? l3(1, 0) : l3(31, 11);
  14461. case c2:
  14462. return r3 ? l3(1, M4) : l3(0, M4 + 1);
  14463. case o2:
  14464. var g3 = this.$locale().weekStart || 0, D3 = (y3 < g3 ? y3 + 7 : y3) - g3;
  14465. return l3(r3 ? m4 - D3 : m4 + (6 - D3), M4);
  14466. case a2:
  14467. case d2:
  14468. return $3(v3 + "Hours", 0);
  14469. case u2:
  14470. return $3(v3 + "Minutes", 1);
  14471. case s2:
  14472. return $3(v3 + "Seconds", 2);
  14473. case i2:
  14474. return $3(v3 + "Milliseconds", 3);
  14475. default:
  14476. return this.clone();
  14477. }
  14478. }, m3.endOf = function(t3) {
  14479. return this.startOf(t3, false);
  14480. }, m3.$set = function(t3, e3) {
  14481. var n3, o3 = b2.p(t3), f3 = "set" + (this.$u ? "UTC" : ""), l3 = (n3 = {}, n3[a2] = f3 + "Date", n3[d2] = f3 + "Date", n3[c2] = f3 + "Month", n3[h2] = f3 + "FullYear", n3[u2] = f3 + "Hours", n3[s2] = f3 + "Minutes", n3[i2] = f3 + "Seconds", n3[r2] = f3 + "Milliseconds", n3)[o3], $3 = o3 === a2 ? this.$D + (e3 - this.$W) : e3;
  14482. if (o3 === c2 || o3 === h2) {
  14483. var y3 = this.clone().set(d2, 1);
  14484. y3.$d[l3]($3), y3.init(), this.$d = y3.set(d2, Math.min(this.$D, y3.daysInMonth())).$d;
  14485. } else
  14486. l3 && this.$d[l3]($3);
  14487. return this.init(), this;
  14488. }, m3.set = function(t3, e3) {
  14489. return this.clone().$set(t3, e3);
  14490. }, m3.get = function(t3) {
  14491. return this[b2.p(t3)]();
  14492. }, m3.add = function(r3, f3) {
  14493. var d3, l3 = this;
  14494. r3 = Number(r3);
  14495. var $3 = b2.p(f3), y3 = function(t3) {
  14496. var e3 = O2(l3);
  14497. return b2.w(e3.date(e3.date() + Math.round(t3 * r3)), l3);
  14498. };
  14499. if ($3 === c2)
  14500. return this.set(c2, this.$M + r3);
  14501. if ($3 === h2)
  14502. return this.set(h2, this.$y + r3);
  14503. if ($3 === a2)
  14504. return y3(1);
  14505. if ($3 === o2)
  14506. return y3(7);
  14507. var M4 = (d3 = {}, d3[s2] = e2, d3[u2] = n2, d3[i2] = t2, d3)[$3] || 1, m4 = this.$d.getTime() + r3 * M4;
  14508. return b2.w(m4, this);
  14509. }, m3.subtract = function(t3, e3) {
  14510. return this.add(-1 * t3, e3);
  14511. }, m3.format = function(t3) {
  14512. var e3 = this, n3 = this.$locale();
  14513. if (!this.isValid())
  14514. return n3.invalidDate || l2;
  14515. var r3 = t3 || "YYYY-MM-DDTHH:mm:ssZ", i3 = b2.z(this), s3 = this.$H, u3 = this.$m, a3 = this.$M, o3 = n3.weekdays, c3 = n3.months, f3 = n3.meridiem, h3 = function(t4, n4, i4, s4) {
  14516. return t4 && (t4[n4] || t4(e3, r3)) || i4[n4].slice(0, s4);
  14517. }, d3 = function(t4) {
  14518. return b2.s(s3 % 12 || 12, t4, "0");
  14519. }, $3 = f3 || function(t4, e4, n4) {
  14520. var r4 = t4 < 12 ? "AM" : "PM";
  14521. return n4 ? r4.toLowerCase() : r4;
  14522. };
  14523. return r3.replace(y2, function(t4, r4) {
  14524. return r4 || function(t5) {
  14525. switch (t5) {
  14526. case "YY":
  14527. return String(e3.$y).slice(-2);
  14528. case "YYYY":
  14529. return b2.s(e3.$y, 4, "0");
  14530. case "M":
  14531. return a3 + 1;
  14532. case "MM":
  14533. return b2.s(a3 + 1, 2, "0");
  14534. case "MMM":
  14535. return h3(n3.monthsShort, a3, c3, 3);
  14536. case "MMMM":
  14537. return h3(c3, a3);
  14538. case "D":
  14539. return e3.$D;
  14540. case "DD":
  14541. return b2.s(e3.$D, 2, "0");
  14542. case "d":
  14543. return String(e3.$W);
  14544. case "dd":
  14545. return h3(n3.weekdaysMin, e3.$W, o3, 2);
  14546. case "ddd":
  14547. return h3(n3.weekdaysShort, e3.$W, o3, 3);
  14548. case "dddd":
  14549. return o3[e3.$W];
  14550. case "H":
  14551. return String(s3);
  14552. case "HH":
  14553. return b2.s(s3, 2, "0");
  14554. case "h":
  14555. return d3(1);
  14556. case "hh":
  14557. return d3(2);
  14558. case "a":
  14559. return $3(s3, u3, true);
  14560. case "A":
  14561. return $3(s3, u3, false);
  14562. case "m":
  14563. return String(u3);
  14564. case "mm":
  14565. return b2.s(u3, 2, "0");
  14566. case "s":
  14567. return String(e3.$s);
  14568. case "ss":
  14569. return b2.s(e3.$s, 2, "0");
  14570. case "SSS":
  14571. return b2.s(e3.$ms, 3, "0");
  14572. case "Z":
  14573. return i3;
  14574. }
  14575. return null;
  14576. }(t4) || i3.replace(":", "");
  14577. });
  14578. }, m3.utcOffset = function() {
  14579. return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
  14580. }, m3.diff = function(r3, d3, l3) {
  14581. var $3, y3 = this, M4 = b2.p(d3), m4 = O2(r3), v3 = (m4.utcOffset() - this.utcOffset()) * e2, g3 = this - m4, D3 = function() {
  14582. return b2.m(y3, m4);
  14583. };
  14584. switch (M4) {
  14585. case h2:
  14586. $3 = D3() / 12;
  14587. break;
  14588. case c2:
  14589. $3 = D3();
  14590. break;
  14591. case f2:
  14592. $3 = D3() / 3;
  14593. break;
  14594. case o2:
  14595. $3 = (g3 - v3) / 6048e5;
  14596. break;
  14597. case a2:
  14598. $3 = (g3 - v3) / 864e5;
  14599. break;
  14600. case u2:
  14601. $3 = g3 / n2;
  14602. break;
  14603. case s2:
  14604. $3 = g3 / e2;
  14605. break;
  14606. case i2:
  14607. $3 = g3 / t2;
  14608. break;
  14609. default:
  14610. $3 = g3;
  14611. }
  14612. return l3 ? $3 : b2.a($3);
  14613. }, m3.daysInMonth = function() {
  14614. return this.endOf(c2).$D;
  14615. }, m3.$locale = function() {
  14616. return D2[this.$L];
  14617. }, m3.locale = function(t3, e3) {
  14618. if (!t3)
  14619. return this.$L;
  14620. var n3 = this.clone(), r3 = w2(t3, e3, true);
  14621. return r3 && (n3.$L = r3), n3;
  14622. }, m3.clone = function() {
  14623. return b2.w(this.$d, this);
  14624. }, m3.toDate = function() {
  14625. return new Date(this.valueOf());
  14626. }, m3.toJSON = function() {
  14627. return this.isValid() ? this.toISOString() : null;
  14628. }, m3.toISOString = function() {
  14629. return this.$d.toISOString();
  14630. }, m3.toString = function() {
  14631. return this.$d.toUTCString();
  14632. }, M3;
  14633. }(), k = _2.prototype;
  14634. return O2.prototype = k, [["$ms", r2], ["$s", i2], ["$m", s2], ["$H", u2], ["$W", a2], ["$M", c2], ["$y", h2], ["$D", d2]].forEach(function(t3) {
  14635. k[t3[1]] = function(e3) {
  14636. return this.$g(e3, t3[0], t3[1]);
  14637. };
  14638. }), O2.extend = function(t3, e3) {
  14639. return t3.$i || (t3(e3, _2, O2), t3.$i = true), O2;
  14640. }, O2.locale = w2, O2.isDayjs = S2, O2.unix = function(t3) {
  14641. return O2(1e3 * t3);
  14642. }, O2.en = D2[g2], O2.Ls = D2, O2.p = {}, O2;
  14643. });
  14644. })(dayjs_min);
  14645. var dayjs_minExports = dayjs_min.exports;
  14646. const dayjs = /* @__PURE__ */ getDefaultExportFromCjs(dayjs_minExports);
  14647. const AuthUtil = {
  14648. // 使用手机 + 密码登录
  14649. login: (data) => {
  14650. return request$1({
  14651. url: "/member/auth/login",
  14652. method: "POST",
  14653. data,
  14654. custom: {
  14655. showSuccess: true,
  14656. loadingMsg: t$6("common.logging_in"),
  14657. successMsg: t$6("common.login_success")
  14658. }
  14659. });
  14660. },
  14661. // 使用手机 + 验证码登录
  14662. smsLogin: (data) => {
  14663. return request$1({
  14664. url: "/member/auth/sms-login",
  14665. method: "POST",
  14666. data,
  14667. custom: {
  14668. showSuccess: true,
  14669. loadingMsg: t$6("common.logging_in"),
  14670. successMsg: t$6("common.login_success")
  14671. }
  14672. });
  14673. },
  14674. // 账号注册
  14675. register: (data) => {
  14676. return request$1({
  14677. url: "/member/auth/sms-register",
  14678. method: "POST",
  14679. data,
  14680. custom: {
  14681. showSuccess: true,
  14682. loadingMsg: t$6("common.registering"),
  14683. successMsg: t$6("common.register_success")
  14684. }
  14685. });
  14686. },
  14687. // 注册校验用户名是否重复
  14688. verifyUsername: (username2) => {
  14689. return request$1({
  14690. url: "/member/user/verifyUsername?username=" + username2,
  14691. method: "GET"
  14692. });
  14693. },
  14694. // 根据用户名和手机号查询用户
  14695. verifyPhone: (username2, mobile2) => {
  14696. return request$1({
  14697. url: "/member/user/getUserByUserNameWithMobile?username=" + username2 + "&mobile=" + mobile2,
  14698. method: "GET"
  14699. });
  14700. },
  14701. // 发送手机验证码
  14702. sendSmsCode: (mobile2, scene) => {
  14703. return request$1({
  14704. url: "/member/auth/send-sms-code",
  14705. method: "POST",
  14706. data: {
  14707. mobile: mobile2,
  14708. scene
  14709. },
  14710. custom: {
  14711. loadingMsg: t$6("common.sending"),
  14712. showSuccess: true,
  14713. successMsg: t$6("common.send_success")
  14714. }
  14715. });
  14716. },
  14717. // 校验手机验证码
  14718. validatePhone: (mobile2, code2, scene) => {
  14719. return request$1({
  14720. url: "/member/auth/validate-sms-code",
  14721. method: "POST",
  14722. data: {
  14723. mobile: mobile2,
  14724. code: code2,
  14725. scene
  14726. }
  14727. });
  14728. },
  14729. // 微信公众号登录选择账号登录
  14730. selectUsernameLogin: (data) => {
  14731. return request$1({
  14732. url: "/member/auth/select-username-login",
  14733. method: "POST",
  14734. data,
  14735. custom: {
  14736. showSuccess: true,
  14737. loadingMsg: t$6("common.logging_in"),
  14738. successMsg: t$6("common.login_success")
  14739. }
  14740. });
  14741. },
  14742. // 微信公众号注册
  14743. officialRegister: (data) => {
  14744. return request$1({
  14745. url: "/member/auth/social-register",
  14746. method: "POST",
  14747. data,
  14748. custom: {
  14749. showSuccess: true,
  14750. loadingMsg: t$6("common.registering"),
  14751. successMsg: t$6("common.register_success")
  14752. }
  14753. });
  14754. },
  14755. // 微信公众号首次登录校验手机
  14756. OfficialEnterLogin: (reqVO, registerReqVO) => {
  14757. return request$1({
  14758. url: "/member/auth/social-login-validate-sms-code",
  14759. method: "POST",
  14760. data: {
  14761. reqVO,
  14762. registerReqVO
  14763. }
  14764. });
  14765. },
  14766. // 登出系统
  14767. logout: () => {
  14768. return request$1({
  14769. url: "/member/auth/logout",
  14770. method: "POST"
  14771. });
  14772. },
  14773. // 刷新令牌
  14774. refreshToken: (refreshToken2) => {
  14775. return request$1({
  14776. url: "/member/auth/refresh-token",
  14777. method: "POST",
  14778. params: {
  14779. refreshToken: refreshToken2
  14780. },
  14781. custom: {
  14782. loading: false,
  14783. // 不用加载中
  14784. showError: false
  14785. // 不展示错误提示
  14786. }
  14787. });
  14788. },
  14789. // 社交授权的跳转
  14790. socialAuthRedirect: (type, redirectUri) => {
  14791. return request$1({
  14792. url: "/member/auth/social-auth-redirect",
  14793. method: "GET",
  14794. params: {
  14795. type,
  14796. redirectUri
  14797. },
  14798. custom: {
  14799. showSuccess: true,
  14800. loadingMsg: t$6("common.logging_in")
  14801. }
  14802. });
  14803. },
  14804. // 社交快捷登录
  14805. socialLogin: (type, code2, state) => {
  14806. return request$1({
  14807. url: "/member/auth/social-login",
  14808. method: "POST",
  14809. data: {
  14810. type,
  14811. code: code2,
  14812. state
  14813. },
  14814. custom: {
  14815. showSuccess: true,
  14816. loadingMsg: t$6("common.logging_in")
  14817. }
  14818. });
  14819. },
  14820. // 微信小程序的一键登录
  14821. weixinMiniAppLogin: (phoneCode, loginCode, state) => {
  14822. return request$1({
  14823. url: "/member/auth/weixin-mini-app-login",
  14824. method: "POST",
  14825. data: {
  14826. phoneCode,
  14827. loginCode,
  14828. state
  14829. },
  14830. custom: {
  14831. showSuccess: true,
  14832. loadingMsg: t$6("common.logging_in"),
  14833. successMsg: t$6("common.login_success")
  14834. }
  14835. });
  14836. },
  14837. // 创建微信 JS SDK 初始化所需的签名
  14838. createWeixinMpJsapiSignature: (url2) => {
  14839. return request$1({
  14840. url: "/member/auth/create-weixin-jsapi-signature",
  14841. method: "POST",
  14842. params: {
  14843. url: url2
  14844. },
  14845. custom: {
  14846. showError: false,
  14847. showLoading: false
  14848. }
  14849. });
  14850. },
  14851. // 获得消费者跳转到平台或者商户的链接
  14852. getConsumerRedirectUrl: () => {
  14853. return request$1({
  14854. url: "/member/auth/redirectLogin",
  14855. method: "GET"
  14856. });
  14857. }
  14858. };
  14859. const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  14860. __proto__: null,
  14861. default: AuthUtil
  14862. }, Symbol.toStringTag, { value: "Module" }));
  14863. const SignInApi = {
  14864. // 获得签到规则列表
  14865. getSignInConfigList: () => {
  14866. return request$1({
  14867. url: "/member/sign-in/config/list",
  14868. method: "GET"
  14869. });
  14870. },
  14871. // 获得个人签到统计
  14872. getSignInRecordSummary: () => {
  14873. return request$1({
  14874. url: "/member/sign-in/record/get-summary",
  14875. method: "GET"
  14876. });
  14877. },
  14878. // 获得
  14879. getOwnSignInMoon: (params) => {
  14880. return request$1({
  14881. url: "/member/sign-in/record/get-own-signInMoon",
  14882. method: "GET",
  14883. params
  14884. });
  14885. },
  14886. // 签到
  14887. createSignInRecord: () => {
  14888. return request$1({
  14889. url: "/distri/user-sign-in-log/create",
  14890. method: "POST"
  14891. });
  14892. },
  14893. // 获得签到记录分页
  14894. getSignRecordPage: (params) => {
  14895. formatAppLog("log", "at sheep/api/member/signin.js:37", params);
  14896. const queryString = Object.keys(params).map((key) => encodeURIComponent(key) + "=" + params[key]).join("&");
  14897. return request$1({
  14898. url: `/member/sign-in/record/page?${queryString}`,
  14899. method: "GET"
  14900. });
  14901. }
  14902. };
  14903. const __vite_glob_0_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  14904. __proto__: null,
  14905. default: SignInApi
  14906. }, Symbol.toStringTag, { value: "Module" }));
  14907. let time = 30;
  14908. let timer = null;
  14909. async function onSign() {
  14910. const {
  14911. code: code2,
  14912. data
  14913. } = await SignInApi.createSignInRecord();
  14914. if (code2 === 0) {
  14915. showSignUpModal(data);
  14916. }
  14917. if (timer) {
  14918. clearInterval(timer);
  14919. }
  14920. uni.setStorageSync("isRun", false);
  14921. uni.setStorageSync("isSign", true);
  14922. }
  14923. function resetSignStatusIfNeeded() {
  14924. const today = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
  14925. const lastCheckDate = uni.getStorageSync("lastCheckDate");
  14926. if (today !== lastCheckDate) {
  14927. uni.setStorageSync("isSign", false);
  14928. uni.setStorageSync("lastCheckDate", today);
  14929. }
  14930. }
  14931. function autoSign() {
  14932. resetSignStatusIfNeeded();
  14933. const isLogin = vue.computed(() => sheep$1.$store("user").isLogin);
  14934. if (isLogin.value) {
  14935. uni.setStorageSync("isRun", true);
  14936. if (uni.getStorageSync("isRun") && !uni.getStorageSync("isSign")) {
  14937. timer = setInterval(() => {
  14938. time--;
  14939. if (uni.getStorageSync("isSign") || !isLogin.value) {
  14940. cancelAutoSign();
  14941. }
  14942. if (time <= 0 && !uni.getStorageSync("isSign")) {
  14943. clearInterval(timer);
  14944. onSign();
  14945. }
  14946. }, 1e3);
  14947. }
  14948. }
  14949. }
  14950. function cancelAutoSign() {
  14951. if (timer) {
  14952. clearInterval(timer);
  14953. }
  14954. time = 30;
  14955. uni.setStorageSync("isRun", false);
  14956. }
  14957. function showSignUpModal(obj) {
  14958. $store("modal").$patch((state) => {
  14959. state.signUp = true;
  14960. state.signUpInfo = obj;
  14961. });
  14962. }
  14963. function colseSignUpModal() {
  14964. $store("modal").$patch((state) => {
  14965. state.signUp = false;
  14966. });
  14967. }
  14968. function showWalletModal(obj) {
  14969. $store("modal").$patch((state) => {
  14970. state.getWallet = true;
  14971. state.getWalletInfo = obj;
  14972. });
  14973. }
  14974. function colseWalletModal() {
  14975. $store("modal").$patch((state) => {
  14976. state.getWallet = false;
  14977. });
  14978. }
  14979. function showSubscribeModal() {
  14980. const modal2 = $store("modal");
  14981. modal2.$patch((state) => {
  14982. state.subscribe = true;
  14983. });
  14984. }
  14985. function closeSubscribeModal() {
  14986. const modal2 = $store("modal");
  14987. modal2.$patch((state) => {
  14988. state.subscribe = false;
  14989. });
  14990. }
  14991. function showAuthModal(type = "accountLogin", isActive = "accountLogin") {
  14992. const modal2 = $store("modal");
  14993. if (modal2.auth !== "") {
  14994. closeAuthModal();
  14995. setTimeout(() => {
  14996. modal2.$patch((state) => {
  14997. state.auth = type;
  14998. state.isActive = isActive;
  14999. });
  15000. }, 100);
  15001. } else {
  15002. modal2.$patch((state) => {
  15003. state.auth = type;
  15004. state.isActive = isActive;
  15005. });
  15006. }
  15007. }
  15008. function closeAuthModal() {
  15009. $store("modal").$patch((state) => {
  15010. state.auth = "";
  15011. });
  15012. }
  15013. function showShareModal(spuId = 0) {
  15014. $store("modal").$patch((state) => {
  15015. state.share = true;
  15016. state.shareInfo.spuId = spuId;
  15017. });
  15018. }
  15019. function closeShareModal() {
  15020. $store("modal").$patch((state) => {
  15021. state.share = false;
  15022. });
  15023. }
  15024. function showMenuTools() {
  15025. $store("modal").$patch((state) => {
  15026. state.menu = true;
  15027. });
  15028. }
  15029. function closeMenuTools() {
  15030. $store("modal").$patch((state) => {
  15031. state.menu = false;
  15032. });
  15033. }
  15034. function getSmsCode(event, mobile2) {
  15035. const modalStore = $store("modal");
  15036. const lastSendTimer = modalStore.lastTimer[event];
  15037. if (typeof lastSendTimer === "undefined") {
  15038. $helper.toast(t$6("common.sms_error"));
  15039. return;
  15040. }
  15041. const duration2 = dayjs().unix() - lastSendTimer;
  15042. const canSend = duration2 >= 60;
  15043. if (!canSend) {
  15044. $helper.toast(t$6("common.try_later"));
  15045. return;
  15046. }
  15047. if (mobile2 && !test$1.mobile(mobile2)) {
  15048. $helper.toast(t$6("common.phone_format_error"));
  15049. return;
  15050. }
  15051. let scene = -1;
  15052. switch (event) {
  15053. case "resetPassword":
  15054. scene = 4;
  15055. break;
  15056. case "changePassword":
  15057. scene = 3;
  15058. break;
  15059. case "changeMobileOld":
  15060. scene = 2;
  15061. break;
  15062. case "changeMobileNew":
  15063. scene = 5;
  15064. break;
  15065. case "smsLogin":
  15066. scene = 1;
  15067. break;
  15068. case "consumptionTransfers":
  15069. scene = 11;
  15070. break;
  15071. case "zeroBuy":
  15072. scene = 12;
  15073. break;
  15074. }
  15075. AuthUtil.sendSmsCode(mobile2, scene).then((res) => {
  15076. if (res.code === 0) {
  15077. modalStore.$patch((state) => {
  15078. state.lastTimer[event] = dayjs().unix();
  15079. });
  15080. }
  15081. });
  15082. }
  15083. function getSmsTimer(event, mobile2 = "") {
  15084. const modalStore = $store("modal");
  15085. const lastSendTimer = modalStore.lastTimer[event];
  15086. if (typeof lastSendTimer === "undefined") {
  15087. $helper.toast(t$6("common.sms_error"));
  15088. return;
  15089. }
  15090. const duration2 = vue.ref(dayjs().unix() - lastSendTimer - 60);
  15091. const canSend = duration2.value >= 0;
  15092. if (canSend) {
  15093. return t$6("common.get_verification_code");
  15094. }
  15095. if (!canSend) {
  15096. setTimeout(() => {
  15097. duration2.value++;
  15098. }, 1e3);
  15099. return -duration2.value.toString() + " s";
  15100. }
  15101. }
  15102. function saveAdvHistory(adv) {
  15103. const modal2 = $store("modal");
  15104. modal2.$patch((state) => {
  15105. if (!state.advHistory.includes(adv.imgUrl)) {
  15106. state.advHistory.push(adv.imgUrl);
  15107. }
  15108. });
  15109. }
  15110. let flag;
  15111. function throttle$1(func, wait = 500, immediate = true) {
  15112. if (immediate) {
  15113. if (!flag) {
  15114. flag = true;
  15115. typeof func === "function" && func();
  15116. setTimeout(() => {
  15117. flag = false;
  15118. }, wait);
  15119. }
  15120. } else if (!flag) {
  15121. flag = true;
  15122. setTimeout(() => {
  15123. flag = false;
  15124. typeof func === "function" && func();
  15125. }, wait);
  15126. }
  15127. }
  15128. var define_ROUTES_MAP_default = { "/pages/index/FirstIndex": { path: "/pages/index/FirstIndex", aliasPath: "/", meta: { auth: false, sync: true, title: "首页", group: "商城" } }, "/pages/index/FirstActivity": { path: "/pages/index/FirstActivity", meta: { auth: false, sync: true, title: "活动", group: "商城" } }, "/pages/index/FirstVideo": { path: "/pages/index/FirstVideo", meta: { auth: false, sync: true, title: "视频", group: "商城" } }, "/pages/index/FirstList": { path: "/pages/index/FirstList", meta: { auth: false, sync: true, title: "列表", group: "商城" } }, "/pages/index/index": { path: "/pages/index/index", meta: { auth: false, sync: true, title: "首页", group: "商城" } }, "/pages/index/user": { path: "/pages/index/user", meta: { sync: true, title: "个人中心", group: "商城" } }, "/pages/index/category": { path: "/pages/index/category", meta: { sync: true, title: "商品分类", group: "商城" } }, "/pages/index/cart": { path: "/pages/index/cart", meta: { sync: true, title: "购物车", group: "商城" } }, "/pages/index/login": { path: "/pages/index/login" }, "/pages/index/search": { path: "/pages/index/search", meta: { sync: true, title: "搜索", group: "商城" } }, "/pages/index/page": { path: "/pages/index/page", meta: { auth: false, sync: true, title: "自定义页面", group: "商城" } }, "/pages/goods/index": { path: "/pages/goods/index", meta: { sync: true, title: "普通商品", group: "商品" } }, "/pages/goods/groupon": { path: "/pages/goods/groupon", meta: { sync: true, title: "拼团商品", group: "商品" } }, "/pages/goods/seckill": { path: "/pages/goods/seckill", meta: { sync: true, title: "秒杀商品", group: "商品" } }, "/pages/goods/list": { path: "/pages/goods/list", meta: { sync: true, title: "商品列表", group: "商品" } }, "/pages/goods/comment/add": { path: "/pages/goods/comment/add", meta: { auth: true } }, "/pages/goods/comment/list": { path: "/pages/goods/comment/list" }, "/pages/order/detail": { path: "/pages/order/detail", meta: { auth: true, title: "订单详情" } }, "/pages/order/confirm": { path: "/pages/order/confirm", meta: { auth: true, title: "确认订单" } }, "/pages/order/list": { path: "/pages/order/list", meta: { auth: true, sync: true, title: "用户订单", group: "订单中心" } }, "/pages/order/aftersale/apply": { path: "/pages/order/aftersale/apply", meta: { auth: true, title: "申请售后" } }, "/pages/order/aftersale/return-delivery": { path: "/pages/order/aftersale/return-delivery", meta: { auth: true, title: "退货物流" } }, "/pages/order/aftersale/list": { path: "/pages/order/aftersale/list", meta: { auth: true, sync: true, title: "售后订单", group: "订单中心" } }, "/pages/order/aftersale/detail": { path: "/pages/order/aftersale/detail", meta: { auth: true, title: "售后详情" } }, "/pages/order/aftersale/log": { path: "/pages/order/aftersale/log", meta: { auth: true, title: "售后进度" } }, "/pages/order/express/log": { path: "/pages/order/express/log", meta: { auth: true, title: "物流轨迹" } }, "/pages/order/otherlist": { path: "/pages/order/otherlist" }, "/pages/user/info": { path: "/pages/user/info", meta: { auth: true, sync: true, title: "用户信息", group: "用户中心" } }, "/pages/user/setting": { path: "/pages/user/setting", meta: { auth: true, sync: true, title: "用户设置", group: "用户中心" } }, "/pages/user/qrcode-share": { path: "/pages/user/qrcode-share", meta: { auth: true, sync: true, title: "我的二维码/分享页", group: "用户中心" } }, "/pages/user/goods-collect": { path: "/pages/user/goods-collect", meta: { auth: true, sync: true, title: "商品收藏", group: "用户中心" } }, "/pages/user/goods-log": { path: "/pages/user/goods-log", meta: { auth: true, sync: true, title: "浏览记录", group: "用户中心" } }, "/pages/user/address/list": { path: "/pages/user/address/list", meta: { auth: true, sync: true, title: "地址管理", group: "用户中心" } }, "/pages/user/dummyAddress/list": { path: "/pages/user/dummyAddress/list", meta: { auth: true, sync: true, title: "虚拟商品收货地址", group: "用户中心" } }, "/pages/user/invoice/edit": { path: "/pages/user/invoice/edit", meta: { auth: true, title: "发票抬头" } }, "/pages/user/invoice/list": { path: "/pages/user/invoice/list", meta: { auth: true, sync: true, title: "发票抬头管理", group: "用户中心" } }, "/pages/user/address/edit": { path: "/pages/user/address/edit", meta: { auth: true, title: "编辑地址" } }, "/pages/user/dummyAddress/edit": { path: "/pages/user/dummyAddress/edit", meta: { auth: true, title: "编辑地址" } }, "/pages/user/wallet/money": { path: "/pages/user/wallet/money", meta: { auth: true, sync: true, title: "用户余额", group: "用户中心" } }, "/pages/user/wallet/score": { path: "/pages/user/wallet/score", meta: { auth: true, sync: true, title: "钱包", group: "用户中心" } }, "/pages/user/wallet/consumptionLog": { path: "/pages/user/wallet/consumptionLog", meta: { auth: true, sync: true, title: "消费分来源", group: "用户中心" } }, "/pages/user/wallet/topupConsumptionPoints": { path: "/pages/user/wallet/topupConsumptionPoints", meta: { auth: true, sync: true, title: "消费分充值", group: "用户中心" } }, "/pages/user/wallet/consumptionTransfersLog": { path: "/pages/user/wallet/consumptionTransfersLog", meta: { auth: true, sync: true, title: "消费分转账", group: "用户中心" } }, "/pages/user/wallet/consumptionTransfers": { path: "/pages/user/wallet/consumptionTransfers", meta: { auth: true, sync: true, title: "消费分转让", group: "用户中心" } }, "/pages/user/wallet/scoreToConsumption": { path: "/pages/user/wallet/scoreToConsumption", meta: { auth: true, sync: true, title: "佣金转消费分", group: "用户中心" } }, "/pages/user/wallet/withdraw": { path: "/pages/user/wallet/withdraw", meta: { auth: true, sync: true, title: "提现", group: "提现" } }, "/pages/user/wallet/withdrawalLog": { path: "/pages/user/wallet/withdrawalLog", meta: { auth: true, sync: true, title: "提现记录", group: "提现记录" } }, "/pages/user/wallet/scoreToMoney": { path: "/pages/user/wallet/scoreToMoney", meta: { auth: true, sync: true, title: "佣金兑换", group: "用户中心" } }, "/pages/user/wallet/ScoreLog": { path: "/pages/user/wallet/ScoreLog" }, "/pages/user/wallet/maxScoreLog": { path: "/pages/user/wallet/maxScoreLog" }, "/pages/user/wallet/team": { path: "/pages/user/wallet/team", meta: { auth: true, sync: true, title: "团队", group: "用户中心" } }, "/pages/commission/index": { path: "/pages/commission/index", meta: { auth: true, sync: true, title: "分销中心", group: "分销商城" } }, "/pages/commission/wallet": { path: "/pages/commission/wallet", meta: { auth: true, sync: true, title: "用户佣金", group: "分销中心" } }, "/pages/commission/goods": { path: "/pages/commission/goods", meta: { auth: true, sync: true, title: "推广商品", group: "分销商城" } }, "/pages/commission/order": { path: "/pages/commission/order", meta: { auth: true, sync: true, title: "分销订单", group: "分销商城" } }, "/pages/commission/team": { path: "/pages/commission/team", meta: { auth: true, sync: true, title: "我的团队", group: "分销商城" } }, "/pages/commission/promoter": { path: "/pages/commission/promoter", meta: { auth: true, sync: true, title: "推广人排行榜", group: "分销商城" } }, "/pages/commission/commission-ranking": { path: "/pages/commission/commission-ranking", meta: { auth: true, sync: true, title: "佣金排行榜", group: "分销商城" } }, "/pages/commission/withdraw": { path: "/pages/commission/withdraw", meta: { auth: true, sync: true, title: "申请提现", group: "分销商城" } }, "/pages/app/sign": { path: "/pages/app/sign", meta: { auth: true, sync: true, title: "签到中心", group: "应用" } }, "/pages/shop/index": { path: "/pages/shop/index", meta: { auth: true, sync: true, title: "店铺首页", group: "应用" } }, "/pages/shop/category": { path: "/pages/shop/category", meta: { auth: true, sync: true, title: "店铺分类", group: "应用" } }, "/pages/shop/allproduct": { path: "/pages/shop/allproduct", meta: { auth: true, sync: true, title: "所有商品", group: "应用" } }, "/pages/public/setting": { path: "/pages/public/setting", meta: { sync: true, title: "系统设置", group: "通用" } }, "/pages/public/richtext": { path: "/pages/public/richtext", meta: { sync: true, title: "富文本", group: "通用" } }, "/pages/public/faq": { path: "/pages/public/faq", meta: { sync: true, title: "常见问题", group: "通用" } }, "/pages/public/error": { path: "/pages/public/error" }, "/pages/public/webview": { path: "/pages/public/webview" }, "/pages/public/merchant": { path: "/pages/public/merchant" }, "/pages/public/merchantApplyList": { path: "/pages/public/merchantApplyList" }, "/pages/coupon/list": { path: "/pages/coupon/list", meta: { sync: true, title: "领券中心", group: "优惠券" } }, "/pages/coupon/detail": { path: "/pages/coupon/detail", meta: { auth: false, sync: true, title: "优惠券详情", group: "优惠券" } }, "/pages/chat/index": { path: "/pages/chat/index", meta: { auth: true, sync: true, title: "客服", group: "客服" } }, "/pages/chat/speechtotext": { path: "/pages/chat/speechtotext", meta: { auth: true, sync: true, title: "语音转文字", group: "语音转文字" } }, "/pages/pay/index": { path: "/pages/pay/index" }, "/pages/pay/result": { path: "/pages/pay/result" }, "/pages/pay/resultYuan": { path: "/pages/pay/resultYuan" }, "/pages/pay/recharge": { path: "/pages/pay/recharge", meta: { auth: true, sync: true, title: "充值余额", group: "支付" } }, "/pages/pay/recharge-log": { path: "/pages/pay/recharge-log", meta: { auth: true, sync: true, title: "充值记录", group: "支付" } }, "/pages/activity/groupon/detail": { path: "/pages/activity/groupon/detail" }, "/pages/activity/groupon/order": { path: "/pages/activity/groupon/order", meta: { auth: true, sync: true, title: "拼团订单", group: "营销活动" } }, "/pages/activity/index": { path: "/pages/activity/index", meta: { sync: true, title: "营销商品", group: "营销活动" } }, "/pages/activity/groupon/list": { path: "/pages/activity/groupon/list", meta: { sync: true, title: "拼团活动", group: "营销活动" } }, "/pages/activity/seckill/list": { path: "/pages/activity/seckill/list", meta: { sync: true, title: "秒杀活动", group: "营销活动" } }, "/pages/activity/bargain/list": { path: "/pages/activity/bargain/list", meta: { sync: true, title: "砍价列表", group: "营销活动" } }, "/pages/activity/bargain/detail": { path: "/pages/activity/bargain/detail", meta: { sync: true, title: "砍价详情", group: "营销活动" } } };
  15129. var define_TABBAR_default = ["/pages/index/index", "/pages/index/cart", "/pages/index/user"];
  15130. const _go = (path, params = {}, options2 = {
  15131. redirect: false
  15132. }) => {
  15133. var _a2;
  15134. let page2 = "";
  15135. let query = "";
  15136. let url2 = "";
  15137. if (lodashExports.isString(path)) {
  15138. if (lodashExports.startsWith(path, "http")) {
  15139. page2 = `/pages/public/webview`;
  15140. query = `url=${encodeURIComponent(path)}`;
  15141. } else if (lodashExports.startsWith(path, "action:")) {
  15142. handleAction(path);
  15143. return;
  15144. } else {
  15145. [page2, query] = path.split("?");
  15146. }
  15147. if (!lodashExports.isEmpty(params)) {
  15148. let query2 = paramsToQuery(params);
  15149. if (lodashExports.isEmpty(query)) {
  15150. query = query2;
  15151. } else {
  15152. query += "&" + query2;
  15153. }
  15154. }
  15155. }
  15156. if (lodashExports.isObject(path)) {
  15157. page2 = path.url;
  15158. if (!lodashExports.isNil(path.params)) {
  15159. query = paramsToQuery(path.params);
  15160. }
  15161. }
  15162. const nextRoute = define_ROUTES_MAP_default[page2];
  15163. if (!nextRoute) {
  15164. formatAppLog("log", "at sheep/router/index.js:56", `%c跳转路径参数错误<${page2 || "EMPTY"}>`, "color:red;background:yellow");
  15165. return;
  15166. }
  15167. if (((_a2 = nextRoute.meta) == null ? void 0 : _a2.auth) && !$store("user").isLogin) {
  15168. showAuthModal();
  15169. return;
  15170. }
  15171. url2 = page2;
  15172. if (!lodashExports.isEmpty(query)) {
  15173. url2 += `?${query}`;
  15174. }
  15175. if (define_TABBAR_default.includes(page2)) {
  15176. uni.switchTab({
  15177. url: url2
  15178. });
  15179. return;
  15180. }
  15181. if (options2.redirect) {
  15182. uni.redirectTo({
  15183. url: url2
  15184. });
  15185. return;
  15186. }
  15187. uni.navigateTo({
  15188. url: url2
  15189. });
  15190. };
  15191. function go(...args) {
  15192. throttle$1(() => {
  15193. _go(...args);
  15194. });
  15195. }
  15196. function paramsToQuery(params) {
  15197. if (lodashExports.isEmpty(params)) {
  15198. return "";
  15199. }
  15200. let query = [];
  15201. for (let key in params) {
  15202. query.push(key + "=" + params[key]);
  15203. }
  15204. return query.join("&");
  15205. }
  15206. function back() {
  15207. uni.navigateBack();
  15208. }
  15209. function redirect(path, params = {}) {
  15210. go(path, params, {
  15211. redirect: true
  15212. });
  15213. }
  15214. function hasHistory() {
  15215. const pages2 = getCurrentPages();
  15216. if (pages2.length > 1) {
  15217. return true;
  15218. }
  15219. return false;
  15220. }
  15221. function getCurrentRoute(field = "") {
  15222. let currentPage = getCurrentPage();
  15223. if (field !== "") {
  15224. return currentPage.$page[field];
  15225. } else {
  15226. return currentPage.$page;
  15227. }
  15228. }
  15229. function getCurrentPage() {
  15230. let pages2 = getCurrentPages();
  15231. return pages2[pages2.length - 1];
  15232. }
  15233. function handleAction(path) {
  15234. const action = path.split(":");
  15235. switch (action[1]) {
  15236. case "showShareModal":
  15237. showShareModal();
  15238. break;
  15239. }
  15240. }
  15241. function error(errCode, errMsg = "") {
  15242. redirect("/pages/public/error", {
  15243. errCode,
  15244. errMsg
  15245. });
  15246. }
  15247. const $router = {
  15248. go,
  15249. back,
  15250. hasHistory,
  15251. redirect,
  15252. getCurrentPage,
  15253. getCurrentRoute,
  15254. error
  15255. };
  15256. const cdn = (url2 = "", cdnurl = "") => {
  15257. if (!url2)
  15258. return "";
  15259. if (url2.indexOf("http") === 0) {
  15260. return url2;
  15261. }
  15262. if (cdnurl === "") {
  15263. cdnurl = $store("app").info.cdnurl;
  15264. }
  15265. return cdnurl + url2;
  15266. };
  15267. const $url = {
  15268. // 添加cdn域名前缀
  15269. cdn,
  15270. // 对象存储自动剪裁缩略图
  15271. thumb: (url2 = "", params) => {
  15272. url2 = cdn(url2);
  15273. return append_thumbnail_params(url2, params);
  15274. },
  15275. // 静态资源地址
  15276. static: (url2 = "", staticurl = "") => {
  15277. if (staticurl === "") {
  15278. staticurl = staticUrl;
  15279. }
  15280. if (staticurl !== "local") {
  15281. url2 = cdn(url2, staticurl);
  15282. }
  15283. return url2;
  15284. },
  15285. // css背景图片地址
  15286. css: (url2 = "", staticurl = "") => {
  15287. if (staticurl === "") {
  15288. staticurl = staticUrl;
  15289. }
  15290. if (staticurl !== "local") {
  15291. url2 = cdn(url2, staticurl);
  15292. }
  15293. if (staticurl === "local") {
  15294. url2 = plus.io.convertLocalFileSystemURL(url2);
  15295. }
  15296. return `url(${url2})`;
  15297. }
  15298. };
  15299. function append_thumbnail_params(url2, params) {
  15300. const filesystem = $store("app").info.filesystem;
  15301. if (filesystem === "public") {
  15302. return url2;
  15303. }
  15304. let width = params.width || "200";
  15305. let height = params.height || "200";
  15306. let mode = params.mode || "lfit";
  15307. let quality = params.quality || 90;
  15308. let gravity = params.gravity || "center";
  15309. let suffix = "";
  15310. let crop_str = "";
  15311. let quality_str = "";
  15312. let size = width + "x" + height;
  15313. switch (filesystem) {
  15314. case "aliyun":
  15315. if (!gravity && gravity != "center") {
  15316. mode = "mfit";
  15317. crop_str = "/crop,g_" + gravityFormat("aliyun", gravity) + ",w_" + width + ",h_" + height;
  15318. }
  15319. if (quality > 0 && quality < 100) {
  15320. quality_str = "/quality,q_" + quality;
  15321. }
  15322. suffix = "x-oss-process=image/resize,m_" + mode + ",w_" + width + ",h_" + height;
  15323. suffix += crop_str + quality_str;
  15324. break;
  15325. case "qcloud":
  15326. let mode_str = "thumbnail";
  15327. if (mode == "fill" || !gravity && gravity != "center") {
  15328. mode_str = "crop";
  15329. mode = "fill";
  15330. crop_str = "/gravity/" + gravityFormat("qcloud", gravity);
  15331. }
  15332. if (quality > 0 && quality < 100) {
  15333. quality_str = "/rquality/" + quality;
  15334. }
  15335. switch (mode) {
  15336. case "lfit":
  15337. size = "" + size + ">";
  15338. break;
  15339. case "mfit":
  15340. size = "!" + size + "r";
  15341. case "fill":
  15342. break;
  15343. case "pad":
  15344. size = size + "/pad/1";
  15345. break;
  15346. case "fixed":
  15347. size = size + "!";
  15348. break;
  15349. }
  15350. suffix = "imageMogr2/" + mode_str + "/" + size + crop_str + quality_str;
  15351. break;
  15352. case "qiniu":
  15353. if (mode == "fill" || !gravity && gravity != "center") {
  15354. mode = "mfit";
  15355. crop_str = "/gravity/" + gravityFormat("qiniu", gravity) + "/crop/" + size;
  15356. }
  15357. if (quality > 0 && quality < 100) {
  15358. quality_str = "/quality/" + quality;
  15359. }
  15360. switch (mode) {
  15361. case "lfit":
  15362. case "pad":
  15363. size = size + ">";
  15364. break;
  15365. case "mfit":
  15366. size = "!" + size + "r";
  15367. break;
  15368. case "fill":
  15369. break;
  15370. case "fixed":
  15371. size = size + "!";
  15372. break;
  15373. }
  15374. suffix = "imageMogr2/thumbnail/" + size + crop_str + quality_str;
  15375. break;
  15376. }
  15377. return url2 + "?" + suffix;
  15378. }
  15379. const platformMap = ["H5", "WechatOfficialAccount", "WechatMiniProgram", "App"];
  15380. const fromMap = ["forward", "poster", "link"];
  15381. const getShareInfo = (scene = {
  15382. title: "",
  15383. // 自定义分享标题
  15384. desc: "",
  15385. // 自定义描述
  15386. image: "",
  15387. // 自定义分享图片
  15388. params: {}
  15389. // 自定义分享参数
  15390. }, poster = {
  15391. // 自定义海报数据
  15392. type: "user"
  15393. }) => {
  15394. let shareInfo = {
  15395. title: "",
  15396. // 分享标题
  15397. desc: "",
  15398. // 描述
  15399. image: "",
  15400. // 分享图片
  15401. path: "",
  15402. // 分享页面+参数
  15403. link: "",
  15404. // 分享Url+参数
  15405. query: "",
  15406. // 分享参数
  15407. poster
  15408. // 海报所需数据
  15409. };
  15410. const app2 = $store("app");
  15411. const shareConfig = app2.platform.share;
  15412. const query = buildSpmQuery(scene.params);
  15413. shareInfo.query = query;
  15414. shareInfo.link = buildSpmLink(query, shareConfig.linkAddress);
  15415. if (shareConfig.methods.includes("forward")) {
  15416. if (shareConfig.forwardInfo.title === "" || shareConfig.forwardInfo.image === "") {
  15417. formatAppLog("log", "at sheep/platform/share.js:52", "请在平台设置中配置转发信息");
  15418. }
  15419. shareInfo.title = scene.title || shareConfig.forwardInfo.title;
  15420. shareInfo.image = $url.cdn(scene.image || shareConfig.forwardInfo.image);
  15421. shareInfo.desc = scene.desc || shareConfig.forwardInfo.subtitle;
  15422. shareInfo.path = buildSpmPath(query);
  15423. }
  15424. return shareInfo;
  15425. };
  15426. const buildSpmQuery = (params) => {
  15427. const user2 = $store("user");
  15428. let shareId = "0";
  15429. if (typeof params.shareId === "undefined") {
  15430. if (user2.isLogin) {
  15431. shareId = user2.userInfo.id;
  15432. }
  15433. }
  15434. let page2 = "1";
  15435. if (typeof params.page !== "undefined") {
  15436. page2 = params.page;
  15437. }
  15438. let query = "0";
  15439. if (typeof params.query !== "undefined") {
  15440. query = params.query;
  15441. }
  15442. let platform2 = platformMap.indexOf(_platform.name) + 1;
  15443. let from = "1";
  15444. if (typeof params.from !== "undefined") {
  15445. from = platformMap.indexOf(params.from) + 1;
  15446. }
  15447. return `spm=${shareId}.${page2}.${query}.${platform2}.${from}`;
  15448. };
  15449. const buildSpmPath = (query) => {
  15450. return `/pages/index/index?${query}`;
  15451. };
  15452. const buildSpmLink = (query, linkAddress = "") => {
  15453. return `${linkAddress}?${query}`;
  15454. };
  15455. const decryptSpm = (spm) => {
  15456. const user2 = $store("user");
  15457. let shareParamsArray = spm.split(".");
  15458. let shareParams = {
  15459. spm,
  15460. shareId: 0,
  15461. page: "",
  15462. query: {},
  15463. platform: "",
  15464. from: ""
  15465. };
  15466. let query;
  15467. shareParams.shareId = shareParamsArray[0];
  15468. switch (shareParamsArray[1]) {
  15469. case "1":
  15470. shareParams.page = "/pages/index/index";
  15471. break;
  15472. case "2":
  15473. shareParams.page = "/pages/goods/index";
  15474. shareParams.query = {
  15475. linkId: shareParamsArray[2]
  15476. };
  15477. formatAppLog("log", "at sheep/platform/share.js:126", shareParams.query);
  15478. break;
  15479. case "3":
  15480. shareParams.page = "/pages/goods/groupon";
  15481. query = shareParamsArray[2].split(",");
  15482. shareParams.query = {
  15483. id: query[0],
  15484. activity_id: query[1]
  15485. };
  15486. break;
  15487. case "4":
  15488. shareParams.page = "/pages/goods/seckill";
  15489. query = shareParamsArray[2].split(",");
  15490. shareParams.query = {
  15491. id: query[1]
  15492. };
  15493. break;
  15494. case "5":
  15495. shareParams.page = "/pages/activity/groupon/detail";
  15496. shareParams.query = {
  15497. id: shareParamsArray[2]
  15498. };
  15499. break;
  15500. }
  15501. shareParams.platform = platformMap[shareParamsArray[3] - 1];
  15502. shareParams.from = fromMap[shareParamsArray[4] - 1];
  15503. if (shareParams.shareId != 0) {
  15504. if (user2.isLogin) {
  15505. user2.addShareLog(shareParams);
  15506. } else {
  15507. uni.setStorageSync("shareLog", shareParams);
  15508. }
  15509. }
  15510. if (shareParams.page !== "/pages/index/index") {
  15511. $router.go(shareParams.page, shareParams.query);
  15512. }
  15513. return shareParams;
  15514. };
  15515. const updateShareInfo = (shareInfo) => {
  15516. };
  15517. const $share = {
  15518. getShareInfo,
  15519. updateShareInfo,
  15520. decryptSpm
  15521. };
  15522. const PayOrderApi = {
  15523. // 获得支付订单
  15524. getOrder: (id) => {
  15525. return request$1({
  15526. url: "/pay/order/get",
  15527. method: "GET",
  15528. params: { id }
  15529. });
  15530. },
  15531. // 获得支付后的订单条件
  15532. getByStatus: (id) => {
  15533. return request$1({
  15534. url: "/trade/order/getPayOrderByStatus",
  15535. method: "GET",
  15536. params: { id }
  15537. });
  15538. },
  15539. // 获得支付后的订单条件2 实际用的
  15540. getByStatus2: (id) => {
  15541. return request$1({
  15542. url: "/trade/order/getPayOrderByStatus2",
  15543. method: "GET",
  15544. params: { id }
  15545. });
  15546. },
  15547. // 富友微信jsapi支付成功
  15548. getFuYouPayOrderByStatus: (payOrderNo) => {
  15549. return request$1({
  15550. url: "/trade/order/getFuYouPayOrderByStatus",
  15551. method: "POST",
  15552. params: {
  15553. payOrderNo
  15554. }
  15555. });
  15556. },
  15557. getPayOrder: (tradeOrderId) => {
  15558. return request$1({
  15559. url: "/trade/order/getPayOrder",
  15560. method: "GET",
  15561. params: { tradeOrderId }
  15562. });
  15563. },
  15564. // 提交支付订单
  15565. submitOrder: (data) => {
  15566. return request$1({
  15567. url: "/pay/order/submit",
  15568. method: "POST",
  15569. data
  15570. });
  15571. },
  15572. // 佣金、消费分抵扣完 0元购
  15573. ZeroPurchaseSubmit: (data) => {
  15574. return request$1({
  15575. url: "/trade/order/submit-ZeroPurchase",
  15576. method: "POST",
  15577. data
  15578. });
  15579. },
  15580. // 第三方富友支付
  15581. fuYouSubmitOrder: (data) => {
  15582. return request$1({
  15583. url: "/fuYou/pay/order/submit",
  15584. method: "POST",
  15585. data
  15586. });
  15587. }
  15588. };
  15589. const __vite_glob_0_17 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  15590. __proto__: null,
  15591. default: PayOrderApi
  15592. }, Symbol.toStringTag, { value: "Module" }));
  15593. class SheepPay {
  15594. constructor(payment, orderType, id, orderType2) {
  15595. this.payment = payment;
  15596. this.id = id;
  15597. this.orderType = orderType;
  15598. this.orderType2 = orderType2;
  15599. this.payAction();
  15600. }
  15601. payAction() {
  15602. const payAction = {
  15603. WechatOfficialAccount: {
  15604. wechat: () => {
  15605. this.wechatOfficialAccountPay();
  15606. },
  15607. JSAPI: () => {
  15608. this.fuYouWechatOfficialAccountPay();
  15609. },
  15610. alipay: () => {
  15611. this.redirectPay();
  15612. },
  15613. wallet: () => {
  15614. this.walletPay();
  15615. },
  15616. mock: () => {
  15617. this.mockPay();
  15618. },
  15619. wx_pub: () => {
  15620. payAction.WechatOfficialAccount.wechat();
  15621. }
  15622. },
  15623. WechatMiniProgram: {
  15624. wechat: () => {
  15625. this.wechatMiniProgramPay();
  15626. },
  15627. JSAPI: () => {
  15628. this.fuYouWechatOfficialAccountPay();
  15629. },
  15630. alipay: () => {
  15631. this.copyPayLink();
  15632. },
  15633. wallet: () => {
  15634. this.walletPay();
  15635. },
  15636. mock: () => {
  15637. this.mockPay();
  15638. },
  15639. wx_pub: () => {
  15640. this.wechatMiniProgramPay();
  15641. }
  15642. },
  15643. App: {
  15644. wechat: () => {
  15645. this.wechatAppPay();
  15646. },
  15647. JSAPI: () => {
  15648. this.fuYouWechatOfficialAccountPay();
  15649. },
  15650. alipay: () => {
  15651. this.alipay();
  15652. },
  15653. wallet: () => {
  15654. this.walletPay();
  15655. },
  15656. mock: () => {
  15657. this.mockPay();
  15658. }
  15659. },
  15660. H5: {
  15661. wechat: () => {
  15662. this.wechatWapPay();
  15663. },
  15664. JSAPI: () => {
  15665. this.fuYouWechatOfficialAccountPay();
  15666. },
  15667. alipay: () => {
  15668. this.redirectPay();
  15669. },
  15670. wallet: () => {
  15671. this.walletPay();
  15672. },
  15673. mock: () => {
  15674. this.mockPay();
  15675. },
  15676. wx_pub: () => {
  15677. payAction.WechatOfficialAccount.wechat();
  15678. }
  15679. }
  15680. };
  15681. return payAction[sheep$1.$platform.name][this.payment]();
  15682. }
  15683. // 预支付
  15684. prepay(channel) {
  15685. return new Promise(async (resolve, reject) => {
  15686. let data = {
  15687. id: this.id,
  15688. channelCode: channel,
  15689. channelExtras: {},
  15690. orderType: this.orderType2
  15691. };
  15692. if (["wx_pub", "wx_lite"].includes(channel)) {
  15693. const openid = await sheep$1.$platform.useProvider("wechat").getOpenid(true);
  15694. if (!openid) {
  15695. this.bindWeixin();
  15696. return;
  15697. }
  15698. data.channelExtras.openid = openid;
  15699. }
  15700. PayOrderApi.submitOrder(data).then((res) => {
  15701. res.code === 0 && resolve(res);
  15702. if (res.code !== 0 && res.msg.indexOf("无效的openid") >= 0) {
  15703. if (res.msg.indexOf("无效的openid") >= 0 || res.msg.indexOf("下单账号与支付账号不一致") >= 0) {
  15704. this.bindWeixin();
  15705. }
  15706. }
  15707. });
  15708. });
  15709. }
  15710. // 富友预支付
  15711. fuYouPrePay(channel) {
  15712. return new Promise(async (resolve, reject) => {
  15713. let data = {
  15714. id: this.id,
  15715. channelCode: channel,
  15716. orderType: this.orderType2,
  15717. req: {
  15718. trade_type: channel
  15719. }
  15720. };
  15721. if (["wx_pub", "wx_lite", "JSAPI"].includes(channel)) {
  15722. const openid = await sheep$1.$platform.useProvider("wechat").getOpenid(true);
  15723. if (!openid) {
  15724. this.bindWeixin();
  15725. return;
  15726. }
  15727. data.req.sub_openid = openid;
  15728. }
  15729. PayOrderApi.fuYouSubmitOrder(data).then((res) => {
  15730. res.code === 0 && resolve(res);
  15731. if (res.code !== 0 && res.msg.indexOf("无效的openid") >= 0) {
  15732. if (res.msg.indexOf("无效的openid") >= 0 || res.msg.indexOf("下单账号与支付账号不一致") >= 0) {
  15733. this.bindWeixin();
  15734. }
  15735. }
  15736. });
  15737. });
  15738. }
  15739. // 微信小程序支付
  15740. async wechatMiniProgramPay() {
  15741. let {
  15742. code: code2,
  15743. data
  15744. } = await this.prepay("wx_lite");
  15745. if (code2 !== 0) {
  15746. return;
  15747. }
  15748. const payConfig = JSON.parse(data.displayContent);
  15749. uni.requestPayment({
  15750. provider: "wxpay",
  15751. timeStamp: payConfig.timeStamp,
  15752. nonceStr: payConfig.nonceStr,
  15753. package: payConfig.packageValue,
  15754. signType: payConfig.signType,
  15755. paySign: payConfig.paySign,
  15756. success: (res) => {
  15757. this.payResult("success");
  15758. },
  15759. fail: (err) => {
  15760. if (err.errMsg === "requestPayment:fail cancel") {
  15761. sheep$1.$helper.toast(t$6("common.payment_manually_cancelled"));
  15762. } else {
  15763. this.payResult("fail");
  15764. }
  15765. }
  15766. });
  15767. }
  15768. // 余额支付
  15769. async walletPay() {
  15770. const {
  15771. code: code2
  15772. } = await this.prepay("wallet");
  15773. code2 === 0 && this.payResult("success");
  15774. }
  15775. // 模拟支付
  15776. async mockPay() {
  15777. const {
  15778. code: code2
  15779. } = await this.prepay("mock");
  15780. code2 === 0 && this.payResult("success");
  15781. }
  15782. // 支付宝复制链接支付 TODO 非繁人:待接入
  15783. async copyPayLink() {
  15784. let {
  15785. error: error2,
  15786. data
  15787. } = await this.prepay();
  15788. if (error2 === 0) {
  15789. uni.showModal({
  15790. title: t$6("common.alipay_payment"),
  15791. content: t$6("common.copy_link_to_browser"),
  15792. confirmText: t$6("common.copy_link"),
  15793. success: (res) => {
  15794. if (res.confirm) {
  15795. sheep$1.$helper.copyText(data.pay_data);
  15796. }
  15797. }
  15798. });
  15799. }
  15800. }
  15801. // 支付宝支付 TODO 非繁人:待接入
  15802. async alipay() {
  15803. let that = this;
  15804. const {
  15805. error: error2,
  15806. data
  15807. } = await this.prepay();
  15808. if (error2 === 0) {
  15809. uni.requestPayment({
  15810. provider: "alipay",
  15811. orderInfo: data.pay_data,
  15812. //支付宝订单数据
  15813. success: (res) => {
  15814. that.payResult("success");
  15815. },
  15816. fail: (err) => {
  15817. if (err.errMsg === "requestPayment:fail [paymentAlipay:62001]user cancel") {
  15818. sheep$1.$helper.toast(t$6("common.payment_manually_cancelled"));
  15819. } else {
  15820. that.payResult("fail");
  15821. }
  15822. }
  15823. });
  15824. }
  15825. }
  15826. // 微信支付 TODO 非繁人:待接入
  15827. async wechatAppPay() {
  15828. let that = this;
  15829. let {
  15830. error: error2,
  15831. data
  15832. } = await this.prepay();
  15833. if (error2 === 0) {
  15834. uni.requestPayment({
  15835. provider: "wxpay",
  15836. orderInfo: data.pay_data,
  15837. //微信订单数据(官方说是string。实测为object)
  15838. success: (res) => {
  15839. that.payResult("success");
  15840. },
  15841. fail: (err) => {
  15842. err.errMsg !== "requestPayment:fail cancel" && that.payResult("fail");
  15843. }
  15844. });
  15845. }
  15846. }
  15847. // 支付结果跳转,success:成功,fail:失败
  15848. payResult(resultType) {
  15849. sheep$1.$router.redirect("/pages/pay/resultYuan", {
  15850. id: this.id,
  15851. orderType: this.orderType,
  15852. payState: resultType
  15853. });
  15854. }
  15855. // 引导绑定微信
  15856. bindWeixin() {
  15857. uni.showModal({
  15858. title: t$6("common.wechat_payment"),
  15859. content: t$6("common.bind_wechat_for_payment"),
  15860. confirmText: t$6("common.bind"),
  15861. success: function(res) {
  15862. if (res.confirm) {
  15863. sheep$1.$platform.useProvider("wechat").bind();
  15864. }
  15865. }
  15866. });
  15867. }
  15868. }
  15869. function getPayMethods(channels) {
  15870. let payMethods = [
  15871. {
  15872. icon: "/static/images/wechat.png",
  15873. title: t$6("common.wechat_payment"),
  15874. value: "wx_pub",
  15875. disabled: false
  15876. },
  15877. {
  15878. icon: "/static/images/wechat.png",
  15879. title: t$6("common.wechat_payment"),
  15880. value: "JSAPI",
  15881. disabled: false
  15882. },
  15883. {
  15884. icon: "/static/images/alipay.png",
  15885. title: t$6("common.alipay_payment"),
  15886. value: "alipay",
  15887. disabled: false
  15888. },
  15889. {
  15890. icon: "/static/images/wallet.png",
  15891. title: t$6("common.balance_payment"),
  15892. value: "wallet",
  15893. disabled: false
  15894. },
  15895. {
  15896. icon: "/static/images/apple.png",
  15897. title: "Apple Pay",
  15898. value: "apple",
  15899. disabled: false
  15900. },
  15901. {
  15902. icon: "/static/images/wallet.png",
  15903. title: t$6("common.mock_payment"),
  15904. value: "mock",
  15905. disabled: false
  15906. }
  15907. ];
  15908. const platform2 = sheep$1.$platform.name;
  15909. const wechatMethod = payMethods[0];
  15910. if (platform2 === "WechatOfficialAccount" && channels.includes("wx_pub") || platform2 === "WechatMiniProgram" && channels.includes("wx_lite") || platform2 === "App" && channels.includes("wx_app")) {
  15911. wechatMethod.disabled = false;
  15912. }
  15913. const alipayMethod = payMethods[1];
  15914. if (platform2 === "WechatOfficialAccount" && channels.includes("alipay_wap") || platform2 === "WechatMiniProgram" && channels.includes("alipay_wap") || platform2 === "App" && channels.includes("alipay_app")) {
  15915. alipayMethod.disabled = false;
  15916. }
  15917. const walletMethod = payMethods[2];
  15918. if (channels.includes("wallet")) {
  15919. walletMethod.disabled = false;
  15920. }
  15921. const mockMethod = payMethods[4];
  15922. if (channels.includes("mock")) {
  15923. mockMethod.disabled = false;
  15924. }
  15925. function filterPayMethods(payMethods2, channels2) {
  15926. for (let i2 = payMethods2.length - 1; i2 >= 0; i2--) {
  15927. if (!channels2.includes(payMethods2[i2].value)) {
  15928. payMethods2.splice(i2, 1);
  15929. }
  15930. }
  15931. }
  15932. filterPayMethods(payMethods, channels);
  15933. formatAppLog("log", "at sheep/platform/pay.js:511", payMethods);
  15934. return payMethods;
  15935. }
  15936. const device = uni.getSystemInfoSync();
  15937. const os$1 = device.platform;
  15938. let name = "";
  15939. let provider = "";
  15940. let platform$4 = "";
  15941. let isWechatInstalled = true;
  15942. name = "App";
  15943. platform$4 = "openPlatform";
  15944. if (os$1 === "ios") {
  15945. isWechatInstalled = plus.ios.import("WXApi").isWXAppInstalled();
  15946. }
  15947. if (lodashExports.isEmpty(name)) {
  15948. uni.showToast({
  15949. title: t$6("common.platform_not_supported"),
  15950. icon: "none"
  15951. });
  15952. }
  15953. const load = () => {
  15954. };
  15955. const useProvider = (_provider = "") => {
  15956. if (_provider === "")
  15957. _provider = provider;
  15958. if (_provider === "wechat")
  15959. return wechat;
  15960. if (_provider === "apple")
  15961. return apple$1;
  15962. };
  15963. const pay = (payment, orderType, orderSN, orderType2) => {
  15964. return new SheepPay(payment, orderType, orderSN, orderType2);
  15965. };
  15966. const checkUpdate = (silence = false) => {
  15967. };
  15968. async function checkNetwork() {
  15969. const networkStatus = await uni.getNetworkType();
  15970. if (networkStatus.networkType == "none") {
  15971. return Promise.resolve(false);
  15972. }
  15973. return Promise.resolve(true);
  15974. }
  15975. const getCapsule = () => {
  15976. return {
  15977. bottom: 56,
  15978. height: 32,
  15979. left: 278,
  15980. right: 365,
  15981. top: 24,
  15982. width: 87
  15983. };
  15984. };
  15985. const capsule = getCapsule();
  15986. const getNavBar = () => {
  15987. return device.statusBarHeight + 44;
  15988. };
  15989. const navbar = getNavBar();
  15990. function getLandingPage() {
  15991. let page2 = "";
  15992. return page2;
  15993. }
  15994. const landingPage = getLandingPage();
  15995. const _platform = {
  15996. name,
  15997. device,
  15998. os: os$1,
  15999. provider,
  16000. platform: platform$4,
  16001. useProvider,
  16002. checkUpdate,
  16003. checkNetwork,
  16004. pay,
  16005. share: $share,
  16006. load,
  16007. capsule,
  16008. navbar,
  16009. landingPage,
  16010. isWechatInstalled
  16011. };
  16012. const CartApi = {
  16013. addCart: (data) => {
  16014. return request$1({
  16015. url: "/trade/cart/add",
  16016. method: "POST",
  16017. data,
  16018. custom: {
  16019. showSuccess: true,
  16020. successMsg: t$6("common.added_to_cart")
  16021. }
  16022. });
  16023. },
  16024. updateCartCount: (data) => {
  16025. return request$1({
  16026. url: "/trade/cart/update-count",
  16027. method: "PUT",
  16028. data
  16029. });
  16030. },
  16031. updateCartSelected: (data) => {
  16032. return request$1({
  16033. url: "/trade/cart/update-selected",
  16034. method: "PUT",
  16035. data
  16036. });
  16037. },
  16038. deleteCart: (ids) => {
  16039. return request$1({
  16040. url: "/trade/cart/delete",
  16041. method: "DELETE",
  16042. params: {
  16043. ids
  16044. }
  16045. });
  16046. },
  16047. getCartList: () => {
  16048. return request$1({
  16049. url: "/trade/cart/list",
  16050. method: "GET",
  16051. custom: {
  16052. showLoading: false,
  16053. auth: true
  16054. }
  16055. });
  16056. }
  16057. };
  16058. const __vite_glob_0_38 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  16059. __proto__: null,
  16060. default: CartApi
  16061. }, Symbol.toStringTag, { value: "Module" }));
  16062. const cart = defineStore({
  16063. id: "cart",
  16064. state: () => ({
  16065. shopNameMap: [],
  16066. shopSkuMap: [],
  16067. list: [],
  16068. // 购物车列表
  16069. selectedIds: [],
  16070. // 已选列表
  16071. isAllSelected: false,
  16072. // 是否全选
  16073. totalPriceSelected: 0
  16074. // 选中项总金额
  16075. }),
  16076. actions: {
  16077. // 获取购物车列表
  16078. async getList() {
  16079. const {
  16080. data,
  16081. code: code2
  16082. } = await CartApi.getCartList();
  16083. if (code2 === 0) {
  16084. this.list = data.validList;
  16085. this.shopSkuMap = data.shopSkuMap;
  16086. this.shopNameMap = data.shopNameMap;
  16087. this.selectedIds = [];
  16088. this.isAllSelected = true;
  16089. this.totalPriceSelected = 0;
  16090. this.list.forEach((item) => {
  16091. if (item.selected) {
  16092. this.selectedIds.push(item.id);
  16093. this.totalPriceSelected += item.count * item.sku.price;
  16094. } else {
  16095. this.isAllSelected = false;
  16096. }
  16097. });
  16098. }
  16099. },
  16100. // 添加购物车
  16101. async add(goodsInfo) {
  16102. const {
  16103. code: code2
  16104. } = await CartApi.addCart({
  16105. skuId: goodsInfo.id,
  16106. count: goodsInfo.goods_num
  16107. });
  16108. if (code2 === 0) {
  16109. await this.getList();
  16110. }
  16111. },
  16112. // 更新购物车
  16113. async update(goodsInfo) {
  16114. const {
  16115. code: code2
  16116. } = await CartApi.updateCartCount({
  16117. id: goodsInfo.goods_id,
  16118. count: goodsInfo.goods_num
  16119. });
  16120. if (code2 === 0) {
  16121. await this.getList();
  16122. }
  16123. },
  16124. // 移除购物车
  16125. async delete(ids) {
  16126. let id;
  16127. if (typeof ids === "number") {
  16128. id = ids;
  16129. } else {
  16130. id = ids.join(",");
  16131. }
  16132. const {
  16133. code: code2
  16134. } = await CartApi.deleteCart(id);
  16135. if (code2 === 0) {
  16136. await this.getList();
  16137. }
  16138. },
  16139. // 单选购物车商品
  16140. async selectSingle(goodsId) {
  16141. const {
  16142. code: code2
  16143. } = await CartApi.updateCartSelected({
  16144. ids: [goodsId],
  16145. selected: !this.selectedIds.includes(goodsId)
  16146. // 取反
  16147. });
  16148. if (code2 === 0) {
  16149. await this.getList();
  16150. }
  16151. },
  16152. // 全选购物车商品
  16153. async selectAll(flag2) {
  16154. const {
  16155. code: code2
  16156. } = await CartApi.updateCartSelected({
  16157. ids: this.list.map((item) => item.id),
  16158. selected: flag2
  16159. });
  16160. if (code2 === 0) {
  16161. await this.getList();
  16162. }
  16163. },
  16164. // 清空购物车。注意,仅用于用户退出时,重置数据
  16165. emptyList() {
  16166. this.list = [];
  16167. this.selectedIds = [];
  16168. this.isAllSelected = true;
  16169. this.totalPriceSelected = 0;
  16170. }
  16171. },
  16172. persist: {
  16173. enabled: true,
  16174. strategies: [{
  16175. key: "cart-store"
  16176. }]
  16177. }
  16178. });
  16179. const __vite_glob_0_1$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  16180. __proto__: null,
  16181. default: cart
  16182. }, Symbol.toStringTag, { value: "Module" }));
  16183. const UserApi = {
  16184. // 获得基本信息
  16185. getUserInfo: () => {
  16186. return request$1({
  16187. url: "/member/user/get",
  16188. method: "GET",
  16189. custom: {
  16190. showLoading: false,
  16191. auth: true
  16192. }
  16193. });
  16194. },
  16195. // 修改基本信息
  16196. updateUser: (data) => {
  16197. return request$1({
  16198. url: "/member/user/update",
  16199. method: "PUT",
  16200. data,
  16201. custom: {
  16202. auth: true,
  16203. showSuccess: true,
  16204. successMsg: t$6("common.update_success")
  16205. }
  16206. });
  16207. },
  16208. updateUserAlipayAccount: (data) => {
  16209. return request$1({
  16210. url: "/member/user/updateByAlipayAccount",
  16211. method: "PUT",
  16212. data,
  16213. custom: {
  16214. auth: true,
  16215. showSuccess: true,
  16216. successMsg: t$6("common.update_success")
  16217. }
  16218. });
  16219. },
  16220. updateUserBankAccount: (data) => {
  16221. return request$1({
  16222. url: "/member/user/updateByBankAccount",
  16223. method: "PUT",
  16224. data,
  16225. custom: {
  16226. auth: true,
  16227. showSuccess: true,
  16228. successMsg: t$6("common.update_success")
  16229. }
  16230. });
  16231. },
  16232. // 修改用户手机
  16233. updateUserMobile: (data) => {
  16234. return request$1({
  16235. url: "/member/user/update-mobile",
  16236. method: "PUT",
  16237. data,
  16238. custom: {
  16239. loadingMsg: t$6("common.verifying"),
  16240. showSuccess: true,
  16241. successMsg: t$6("account.modification_successful")
  16242. }
  16243. });
  16244. },
  16245. // 基于微信小程序的授权码,修改用户手机
  16246. updateUserMobileByWeixin: (code2) => {
  16247. return request$1({
  16248. url: "/member/user/update-mobile-by-weixin",
  16249. method: "PUT",
  16250. data: {
  16251. code: code2
  16252. },
  16253. custom: {
  16254. showSuccess: true,
  16255. loadingMsg: t$6("common.fetching"),
  16256. successMsg: t$6("account.modification_successful")
  16257. }
  16258. });
  16259. },
  16260. // 修改密码
  16261. updateUserPassword: (data) => {
  16262. return request$1({
  16263. url: "/member/user/update-password",
  16264. method: "PUT",
  16265. data,
  16266. custom: {
  16267. loadingMsg: t$6("common.verifying"),
  16268. showSuccess: true,
  16269. successMsg: t$6("account.modification_successful")
  16270. }
  16271. });
  16272. },
  16273. // 重置密码
  16274. resetUserPassword: (data) => {
  16275. return request$1({
  16276. url: "/member/user/reset-password",
  16277. method: "PUT",
  16278. data,
  16279. custom: {
  16280. loadingMsg: t$6("common.verifying"),
  16281. showSuccess: true,
  16282. successMsg: t$6("account.modification_successful")
  16283. }
  16284. });
  16285. },
  16286. // 更新安卓用户的极光id
  16287. updateAndroidJiGuangId: (registerId) => {
  16288. return request$1({
  16289. url: "/member/user/addRegisterId?registerId=" + registerId,
  16290. method: "PUT",
  16291. custom: {
  16292. showSuccess: false
  16293. }
  16294. });
  16295. }
  16296. };
  16297. const __vite_glob_0_11 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  16298. __proto__: null,
  16299. default: UserApi
  16300. }, Symbol.toStringTag, { value: "Module" }));
  16301. const PayWalletApi = {
  16302. // 获取钱包
  16303. getPayWallet() {
  16304. return request$1({
  16305. url: "/pay/wallet/get",
  16306. method: "GET",
  16307. custom: {
  16308. showLoading: false,
  16309. auth: true
  16310. }
  16311. });
  16312. },
  16313. // 获得佣金等基本信息
  16314. getDuserInfo: () => {
  16315. return request$1({
  16316. url: "/distri/duser/getDuserInfo",
  16317. method: "GET",
  16318. custom: {
  16319. showLoading: false,
  16320. auth: true
  16321. }
  16322. });
  16323. },
  16324. // 获得钱包流水分页
  16325. getWalletTransactionPage: (params) => {
  16326. const queryString = Object.keys(params).map((key) => encodeURIComponent(key) + "=" + params[key]).join("&");
  16327. return request$1({
  16328. url: `/pay/wallet-transaction/page?${queryString}`,
  16329. method: "GET"
  16330. });
  16331. },
  16332. // 获得钱包流水统计
  16333. getWalletTransactionSummary: (params) => {
  16334. const queryString = `createTime=${params.createTime[0]}&createTime=${params.createTime[1]}`;
  16335. return request$1({
  16336. url: `/pay/wallet-transaction/get-summary?${queryString}`,
  16337. // url: `/pay/wallet-transaction/get-summary`,
  16338. method: "GET"
  16339. // params: params
  16340. });
  16341. },
  16342. // 获得钱包充值套餐列表
  16343. getWalletRechargePackageList: () => {
  16344. return request$1({
  16345. url: "/pay/wallet-recharge-package/list",
  16346. method: "GET",
  16347. custom: {
  16348. showError: false,
  16349. showLoading: false
  16350. }
  16351. });
  16352. },
  16353. // 创建钱包充值记录(发起充值)
  16354. createWalletRecharge: (data) => {
  16355. return request$1({
  16356. url: "/pay/wallet-recharge/create",
  16357. method: "POST",
  16358. data
  16359. });
  16360. },
  16361. // 消费分充值
  16362. topupConsumptionPointsCreate: (data) => {
  16363. return request$1({
  16364. url: "/distri/user-top-up-consumption-points-order/create",
  16365. method: "POST",
  16366. data,
  16367. custom: {
  16368. showError: true,
  16369. showLoading: true
  16370. }
  16371. });
  16372. },
  16373. // 获得钱包充值记录分页
  16374. getWalletRechargePage: (params) => {
  16375. return request$1({
  16376. url: "/pay/wallet-recharge/page",
  16377. method: "GET",
  16378. params,
  16379. custom: {
  16380. showError: false,
  16381. showLoading: false
  16382. }
  16383. });
  16384. },
  16385. // 创建提现申请记录
  16386. createWithdrawal: (data) => {
  16387. return request$1({
  16388. url: "/distri/application-for-withdrawal/create",
  16389. method: "POST",
  16390. data
  16391. });
  16392. }
  16393. };
  16394. const __vite_glob_0_18 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  16395. __proto__: null,
  16396. default: PayWalletApi
  16397. }, Symbol.toStringTag, { value: "Module" }));
  16398. const OrderApi = {
  16399. // 计算订单信息
  16400. settlementOrder: (data) => {
  16401. const data2 = {
  16402. ...data
  16403. };
  16404. if (!(data.couponId > 0)) {
  16405. delete data2.couponId;
  16406. }
  16407. if (!(data.addressId > 0)) {
  16408. delete data2.addressId;
  16409. }
  16410. if (!data.combinationActivityId > 0) {
  16411. delete data2.combinationActivityId;
  16412. }
  16413. if (!(data.combinationHeadId > 0)) {
  16414. delete data2.combinationHeadId;
  16415. }
  16416. if (!(data.seckillActivityId > 0)) {
  16417. delete data2.seckillActivityId;
  16418. }
  16419. delete data2.items;
  16420. for (let i2 = 0; i2 < data.items.length; i2++) {
  16421. data2[encodeURIComponent("items[" + i2 + "].skuId")] = data.items[i2].skuId + "";
  16422. data2[encodeURIComponent("items[" + i2 + "].count")] = data.items[i2].count + "";
  16423. if (data.items[i2].cartId) {
  16424. data2[encodeURIComponent("items[" + i2 + "].cartId")] = data.items[i2].cartId + "";
  16425. }
  16426. }
  16427. const queryString = Object.keys(data2).map((key) => key + "=" + data2[key]).join("&");
  16428. return request$1({
  16429. url: `/trade/order/settlement?${queryString}`,
  16430. method: "GET",
  16431. custom: {
  16432. showError: true,
  16433. showLoading: true
  16434. }
  16435. });
  16436. },
  16437. // 创建订单
  16438. createOrder: (data) => {
  16439. return request$1({
  16440. url: `/trade/order/create`,
  16441. method: "POST",
  16442. data
  16443. });
  16444. },
  16445. // 获得订单
  16446. getOrder: (id) => {
  16447. return request$1({
  16448. url: `/trade/order/get-detail`,
  16449. method: "GET",
  16450. params: {
  16451. id
  16452. },
  16453. custom: {
  16454. showLoading: false
  16455. }
  16456. });
  16457. },
  16458. // 订单列表
  16459. getOrderPage: (params) => {
  16460. return request$1({
  16461. url: "/trade/order/page",
  16462. method: "GET",
  16463. params,
  16464. custom: {
  16465. showLoading: false
  16466. }
  16467. });
  16468. },
  16469. // 确认收货
  16470. receiveOrder: (id) => {
  16471. return request$1({
  16472. url: `/trade/order/receive`,
  16473. method: "PUT",
  16474. params: {
  16475. id
  16476. }
  16477. });
  16478. },
  16479. // 取消订单
  16480. cancelOrder: (id) => {
  16481. return request$1({
  16482. url: `/trade/order/cancel`,
  16483. method: "DELETE",
  16484. params: {
  16485. id
  16486. }
  16487. });
  16488. },
  16489. // 删除订单
  16490. deleteOrder: (id) => {
  16491. return request$1({
  16492. url: `/trade/order/delete`,
  16493. method: "DELETE",
  16494. params: {
  16495. id
  16496. }
  16497. });
  16498. },
  16499. // 获得交易订单的物流轨迹
  16500. getOrderExpressTrackList: (id) => {
  16501. return request$1({
  16502. url: `/trade/order/get-express-track-list`,
  16503. method: "GET",
  16504. params: {
  16505. id
  16506. }
  16507. });
  16508. },
  16509. // 获得交易订单数量
  16510. getOrderCount: () => {
  16511. return request$1({
  16512. url: "/trade/order/get-count",
  16513. method: "GET",
  16514. custom: {
  16515. showLoading: false,
  16516. auth: true
  16517. }
  16518. });
  16519. },
  16520. // 创建单个评论
  16521. createOrderItemComment: (data) => {
  16522. return request$1({
  16523. url: `/trade/order/item/create-comment`,
  16524. method: "POST",
  16525. data
  16526. });
  16527. }
  16528. };
  16529. const __vite_glob_0_41 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  16530. __proto__: null,
  16531. default: OrderApi
  16532. }, Symbol.toStringTag, { value: "Module" }));
  16533. const CouponApi = {
  16534. // 获得优惠劵模板列表
  16535. getCouponTemplateListByIds: (ids) => {
  16536. return request$1({
  16537. url: "/promotion/coupon-template/list-by-ids",
  16538. method: "GET",
  16539. params: { ids },
  16540. custom: {
  16541. showLoading: false,
  16542. // 不展示 Loading,避免领取优惠劵时,不成功提示
  16543. showError: false
  16544. }
  16545. });
  16546. },
  16547. // 获得优惠劵模版列表
  16548. getCouponTemplateList: (spuId, productScope, count) => {
  16549. return request$1({
  16550. url: "/promotion/coupon-template/list",
  16551. method: "GET",
  16552. params: { spuId, productScope, count }
  16553. });
  16554. },
  16555. // 获得优惠劵模版分页
  16556. getCouponTemplatePage: (params) => {
  16557. return request$1({
  16558. url: "/promotion/coupon-template/page",
  16559. method: "GET",
  16560. params
  16561. });
  16562. },
  16563. // 获得优惠劵模版
  16564. getCouponTemplate: (id) => {
  16565. return request$1({
  16566. url: "/promotion/coupon-template/get",
  16567. method: "GET",
  16568. params: { id }
  16569. });
  16570. },
  16571. // 我的优惠劵列表
  16572. getCouponPage: (params) => {
  16573. return request$1({
  16574. url: "/promotion/coupon/page",
  16575. method: "GET",
  16576. params
  16577. });
  16578. },
  16579. // 领取优惠券
  16580. takeCoupon: (templateId) => {
  16581. return request$1({
  16582. url: "/promotion/coupon/take",
  16583. method: "POST",
  16584. data: { templateId },
  16585. custom: {
  16586. auth: true,
  16587. showLoading: true,
  16588. loadingMsg: t$6("common.claiming"),
  16589. showSuccess: true,
  16590. successMsg: t$6("common.claim_success")
  16591. }
  16592. });
  16593. },
  16594. // 获得优惠劵
  16595. getCoupon: (id) => {
  16596. return request$1({
  16597. url: "/promotion/coupon/get",
  16598. method: "GET",
  16599. params: { id }
  16600. });
  16601. },
  16602. // 获得未使用的优惠劵数量
  16603. getUnusedCouponCount: () => {
  16604. return request$1({
  16605. url: "/promotion/coupon/get-unused-count",
  16606. method: "GET",
  16607. custom: {
  16608. showLoading: false,
  16609. auth: true
  16610. }
  16611. });
  16612. },
  16613. // 获得匹配指定商品的优惠劵列表
  16614. getMatchCouponList: (price, spuIds, skuIds, categoryIds) => {
  16615. return request$1({
  16616. url: "/promotion/coupon/match-list",
  16617. method: "GET",
  16618. params: {
  16619. price,
  16620. spuIds: spuIds.join(","),
  16621. skuIds: skuIds.join(","),
  16622. categoryIds: categoryIds.join(",")
  16623. },
  16624. custom: {
  16625. showError: false,
  16626. showLoading: false
  16627. // 避免影响 settlementOrder 结算的结果
  16628. }
  16629. });
  16630. }
  16631. };
  16632. const __vite_glob_0_28 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  16633. __proto__: null,
  16634. default: CouponApi
  16635. }, Symbol.toStringTag, { value: "Module" }));
  16636. const userInfo = vue.computed(() => sheep$1.$store("user").userInfo);
  16637. function isBetaUser() {
  16638. const username2 = userInfo.value.username;
  16639. return username2 === "ru10" || username2 === "迷鹿" || username2 === "非繁";
  16640. }
  16641. function isAndroid() {
  16642. return window.Android && window.Android.getIdentifier();
  16643. }
  16644. function getAndroidJiGuangId() {
  16645. return window.Android && window.Android.getRegistrationID();
  16646. }
  16647. const android = vue.computed(() => isAndroid());
  16648. const androidJiGuangId = vue.computed(() => getAndroidJiGuangId());
  16649. const defaultUserInfo = {
  16650. avatar: "",
  16651. // 头像
  16652. nickname: "",
  16653. // 昵称
  16654. gender: 0,
  16655. // 性别
  16656. mobile: "",
  16657. // 手机号
  16658. point: 0,
  16659. // 佣金
  16660. username: "",
  16661. //用户名
  16662. socialStatusLevel: "",
  16663. socialStatusLevelName: "",
  16664. socialStatusPoint: 0,
  16665. socialUpNeed: 0
  16666. };
  16667. const defaultUserWallet = {
  16668. integralDO: {
  16669. currentQuota: 0,
  16670. // 当前佣金
  16671. highQuota: 0,
  16672. //最高佣金
  16673. freezeQuota: 0,
  16674. //冻结佣金
  16675. consumptionPoints: 0
  16676. //消费分
  16677. },
  16678. descNo: 0,
  16679. //用户直推人人数
  16680. descPrice: 0,
  16681. //团队昨日贡献值
  16682. descTotalPrice: 0
  16683. // 团队历史总贡献值
  16684. };
  16685. const defaultNumData = {
  16686. unusedCouponCount: 0,
  16687. orderCount: {
  16688. allCount: 0,
  16689. unpaidCount: 0,
  16690. undeliveredCount: 0,
  16691. deliveredCount: 0,
  16692. uncommentedCount: 0,
  16693. afterSaleCount: 0
  16694. }
  16695. };
  16696. const user$1 = defineStore({
  16697. id: "user",
  16698. state: () => ({
  16699. userInfo: lodashExports.clone(defaultUserInfo),
  16700. // 用户信息
  16701. userWallet: lodashExports.clone(defaultUserWallet),
  16702. // 用户钱包信息
  16703. isLogin: !!uni.getStorageSync("token"),
  16704. // 登录状态
  16705. numData: lodashExports.cloneDeep(defaultNumData),
  16706. // 用户其他数据
  16707. lastUpdateTime: 0
  16708. // 上次更新时间
  16709. }),
  16710. actions: {
  16711. // 获取用户信息
  16712. async getInfo() {
  16713. const {
  16714. code: code2,
  16715. data
  16716. } = await UserApi.getUserInfo();
  16717. if (code2 !== 0) {
  16718. return;
  16719. }
  16720. this.userInfo = data;
  16721. return Promise.resolve(data);
  16722. },
  16723. // 获得用户钱包
  16724. async getWallet() {
  16725. const {
  16726. code: code2,
  16727. data
  16728. } = await PayWalletApi.getDuserInfo();
  16729. if (code2 !== 0) {
  16730. return;
  16731. }
  16732. if (android.value) {
  16733. if (!data.androidRegisterId || data.androidRegisterId !== androidJiGuangId.value) {
  16734. await UserApi.updateAndroidJiGuangId(androidJiGuangId.value);
  16735. }
  16736. }
  16737. this.userWallet = data;
  16738. this.userWallet.descNo = data.descNo + 1;
  16739. uni.setStorageSync("isSign", data.isSign);
  16740. },
  16741. // 获取订单、优惠券等其他资产信息
  16742. getNumData() {
  16743. OrderApi.getOrderCount().then((res) => {
  16744. if (res.code === 0) {
  16745. this.numData.orderCount = res.data;
  16746. }
  16747. });
  16748. CouponApi.getUnusedCouponCount().then((res) => {
  16749. if (res.code === 0) {
  16750. this.numData.unusedCouponCount = res.data;
  16751. }
  16752. });
  16753. },
  16754. // 添加分享记录
  16755. // TODO 非繁人:整理下;
  16756. async addShareLog(params) {
  16757. const {
  16758. error: error2
  16759. } = await userApi.addShareLog(params);
  16760. if (error2 === 0)
  16761. uni.removeStorageSync("shareLog");
  16762. },
  16763. // 设置 token
  16764. async setToken(token = "", refreshToken2 = "") {
  16765. if (token === "") {
  16766. this.isLogin = false;
  16767. uni.removeStorageSync("token");
  16768. uni.removeStorageSync("refresh-token");
  16769. } else {
  16770. this.isLogin = true;
  16771. uni.setStorageSync("token", token);
  16772. uni.setStorageSync("refresh-token", refreshToken2);
  16773. await this.loginAfter();
  16774. if (!this.userInfo.language) {
  16775. const language = uni.getStorageSync("userLanguage");
  16776. await UserApi.updateUser({ language });
  16777. setLanguage(language);
  16778. } else {
  16779. setLanguage(this.userInfo.language);
  16780. }
  16781. const openid = await sheep$1.$platform.useProvider("wechat").getOpenid(true);
  16782. if (!openid) {
  16783. uni.showModal({
  16784. title: t$6("common.letcgo"),
  16785. content: t$6("common.not_bound_wechat"),
  16786. confirmText: t$6("common.bind"),
  16787. success: function(res) {
  16788. if (res.confirm) {
  16789. sheep$1.$platform.useProvider("wechat").bind();
  16790. }
  16791. }
  16792. });
  16793. }
  16794. }
  16795. return this.isLogin;
  16796. },
  16797. // 更新用户相关信息 (手动限流,5 秒之内不刷新)
  16798. async updateUserData() {
  16799. if (!this.isLogin) {
  16800. this.resetUserData();
  16801. return;
  16802. }
  16803. const nowTime = (/* @__PURE__ */ new Date()).getTime();
  16804. if (this.lastUpdateTime + 5e3 > nowTime) {
  16805. return;
  16806. }
  16807. this.lastUpdateTime = nowTime;
  16808. await this.getInfo();
  16809. this.getWallet();
  16810. this.getNumData();
  16811. return this.userInfo;
  16812. },
  16813. // 重置用户默认数据
  16814. resetUserData() {
  16815. this.setToken();
  16816. this.userInfo = lodashExports.clone(defaultUserInfo);
  16817. this.userWallet = lodashExports.clone(defaultUserWallet);
  16818. this.numData = lodashExports.cloneDeep(defaultNumData);
  16819. cart().emptyList();
  16820. cancelAutoSign();
  16821. uni.removeStorageSync("isSign");
  16822. uni.removeStorageSync("openid");
  16823. },
  16824. // 登录后,加载各种信息
  16825. // TODO 非繁人:整理下;
  16826. async loginAfter() {
  16827. await this.updateUserData();
  16828. cart().getList();
  16829. $share.getShareInfo();
  16830. autoSign();
  16831. const shareLog = uni.getStorageSync("shareLog");
  16832. if (!lodashExports.isEmpty(shareLog)) {
  16833. this.addShareLog({
  16834. ...shareLog
  16835. });
  16836. }
  16837. setTimeout(async () => {
  16838. const openid = await sheep$1.$platform.useProvider("wechat").getOpenid(true);
  16839. if (!this.userInfo.subscribe && openid) {
  16840. showSubscribeModal();
  16841. }
  16842. }, 800);
  16843. },
  16844. // 登出系统
  16845. async logout() {
  16846. this.resetUserData();
  16847. return !this.isLogin;
  16848. }
  16849. },
  16850. persist: {
  16851. enabled: true,
  16852. strategies: [{
  16853. key: "user-store"
  16854. }]
  16855. }
  16856. });
  16857. const __vite_glob_0_4$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  16858. __proto__: null,
  16859. default: user$1
  16860. }, Symbol.toStringTag, { value: "Module" }));
  16861. const sys = defineStore({
  16862. id: "sys",
  16863. state: () => ({
  16864. theme: "",
  16865. // 主题,
  16866. mode: "light",
  16867. // 明亮模式、暗黑模式(暂未支持)
  16868. modeAuto: false,
  16869. // 跟随系统
  16870. fontSize: 1
  16871. // 设置默认字号等级(0-4)
  16872. }),
  16873. getters: {},
  16874. actions: {
  16875. setTheme(theme = "") {
  16876. var _a2;
  16877. if (theme === "") {
  16878. this.theme = ((_a2 = app$1().template) == null ? void 0 : _a2.basic.theme) || "orange";
  16879. } else {
  16880. this.theme = theme;
  16881. }
  16882. }
  16883. },
  16884. persist: {
  16885. enabled: true,
  16886. strategies: [
  16887. {
  16888. key: "sys-store"
  16889. }
  16890. ]
  16891. }
  16892. });
  16893. const __vite_glob_0_3$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  16894. __proto__: null,
  16895. default: sys
  16896. }, Symbol.toStringTag, { value: "Module" }));
  16897. const app$1 = defineStore({
  16898. id: "app",
  16899. state: () => ({
  16900. info: {
  16901. // 应用信息
  16902. name: "",
  16903. // 商城名称
  16904. logo: "",
  16905. // logo
  16906. version: "",
  16907. // 版本号
  16908. copyright: "",
  16909. // 版权信息 I
  16910. copytime: "",
  16911. // 版权信息 II
  16912. cdnurl: "",
  16913. // 云存储域名
  16914. filesystem: ""
  16915. // 云存储平台
  16916. },
  16917. platform: {
  16918. share: {
  16919. methods: [],
  16920. // 支持的分享方式
  16921. forwardInfo: {},
  16922. // 默认转发信息
  16923. posterInfo: {},
  16924. // 海报信息
  16925. linkAddress: ""
  16926. // 复制链接地址
  16927. },
  16928. bind_mobile: 0
  16929. // 登陆后绑定手机号提醒 (弱提醒,可手动关闭)
  16930. },
  16931. chat: {},
  16932. template: {
  16933. // 店铺装修模板
  16934. basic: {},
  16935. // 基本信息
  16936. home: {
  16937. // 首页模板
  16938. style: {},
  16939. data: []
  16940. },
  16941. user: {
  16942. // 个人中心模板
  16943. style: {},
  16944. data: []
  16945. }
  16946. },
  16947. shareInfo: {},
  16948. // 全局分享信息
  16949. has_wechat_trade_managed: 0
  16950. // 小程序发货信息管理 0 没有 || 1 有
  16951. }),
  16952. actions: {
  16953. // 获取Shopro应用配置和模板
  16954. async init(templateId = null) {
  16955. const networkStatus = await _platform.checkNetwork();
  16956. if (!networkStatus) {
  16957. $router.error("NetworkError");
  16958. }
  16959. await adaptTemplate(this.template, templateId);
  16960. {
  16961. this.info = {
  16962. name: "常来此购",
  16963. logo: "/static/zxlogo.png",
  16964. version: "1.1.13",
  16965. copyright: "全部开源,个人与企业可 100% 免费使用",
  16966. copytime: "Copyright© 2018-2024",
  16967. cdnurl: "https://file.sheepjs.com",
  16968. // 云存储域名
  16969. filesystem: "qcloud"
  16970. // 云存储平台
  16971. };
  16972. this.platform = {
  16973. share: {
  16974. methods: ["poster", "link"],
  16975. // linkAddress: "http://localhost/#/", //跳转链接
  16976. linkAddress: "https://zxgz.newfeifan.cn/#/",
  16977. //跳转链接
  16978. posterInfo: {
  16979. "user_bg": "/static/user-poster-bg.jpg",
  16980. "goods_bg": "/static/user-poster-bg.jpg",
  16981. "groupon_bg": "/static/img/shop/config/groupon-poster-bg.png"
  16982. }
  16983. },
  16984. bind_mobile: 0
  16985. };
  16986. this.chat = {
  16987. chat_domain: "https://api.shopro.sheepjs.com/chat",
  16988. room_id: "admin"
  16989. };
  16990. this.has_wechat_trade_managed = 0;
  16991. const sysStore = sys();
  16992. sysStore.setTheme();
  16993. const userStore = user$1();
  16994. if (userStore.isLogin) {
  16995. userStore.loginAfter();
  16996. }
  16997. return Promise.resolve(true);
  16998. }
  16999. }
  17000. },
  17001. persist: {
  17002. enabled: true,
  17003. strategies: [{
  17004. key: "app-store"
  17005. }]
  17006. }
  17007. });
  17008. const adaptTemplate = async (appTemplate, templateId) => {
  17009. var _a2;
  17010. const {
  17011. data: diyTemplate
  17012. } = templateId ? await DiyApi.getDiyTemplate(templateId) : await DiyApi.getUsedDiyTemplate();
  17013. if (!diyTemplate) {
  17014. $router.error("TemplateError");
  17015. return;
  17016. }
  17017. const tabBar2 = (_a2 = diyTemplate == null ? void 0 : diyTemplate.property) == null ? void 0 : _a2.tabBar;
  17018. if (tabBar2) {
  17019. appTemplate.basic.tabbar = tabBar2;
  17020. if (tabBar2 == null ? void 0 : tabBar2.theme) {
  17021. appTemplate.basic.theme = tabBar2 == null ? void 0 : tabBar2.theme;
  17022. }
  17023. }
  17024. appTemplate.home = diyTemplate == null ? void 0 : diyTemplate.home;
  17025. appTemplate.user = diyTemplate == null ? void 0 : diyTemplate.user;
  17026. };
  17027. const __vite_glob_0_0$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  17028. __proto__: null,
  17029. default: app$1
  17030. }, Symbol.toStringTag, { value: "Module" }));
  17031. const modal = defineStore({
  17032. id: "modal",
  17033. state: () => ({
  17034. auth: "",
  17035. // 授权弹框 accountLogin|smsLogin|resetPassword|changeMobile|changePassword|changeUsername
  17036. isActive: "",
  17037. share: false,
  17038. // 分享弹框
  17039. shareInfo: {
  17040. spuId: 0
  17041. },
  17042. // 分享弹框信息
  17043. signUp: false,
  17044. // 签到弹框
  17045. signUpInfo: {},
  17046. // 签到弹框信息
  17047. subscribe: false,
  17048. // 关注弹框
  17049. getWallet: false,
  17050. // 获得佣金/身价弹窗
  17051. getWalletInfo: {
  17052. points: 0,
  17053. socialStatus: 0
  17054. },
  17055. // 获得佣金/身价弹窗信息
  17056. menu: false,
  17057. // 快捷菜单弹框
  17058. advHistory: [],
  17059. // 广告弹框记录
  17060. lastTimer: {
  17061. // 短信验证码计时器,为了防止刷新请求做了持久化
  17062. smsLogin: 0,
  17063. // changeMobile: 0,
  17064. changeMobileOld: 0,
  17065. changeMobileNew: 0,
  17066. resetPassword: 0,
  17067. changePassword: 0,
  17068. consumptionTransfers: 0,
  17069. zeroBuy: 0
  17070. }
  17071. }),
  17072. persist: {
  17073. enabled: true,
  17074. strategies: [
  17075. {
  17076. key: "modal-store",
  17077. paths: ["lastTimer", "advHistory"]
  17078. }
  17079. ]
  17080. }
  17081. });
  17082. const __vite_glob_0_2$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  17083. __proto__: null,
  17084. default: modal
  17085. }, Symbol.toStringTag, { value: "Module" }));
  17086. var _a, _b;
  17087. const isH5 = typeof uni !== "undefined" ? ["web", "h5", void 0].includes((_b = (_a = uni == null ? void 0 : uni.getSystemInfoSync()) == null ? void 0 : _a.uniPlatform) == null ? void 0 : _b.toLocaleLowerCase()) : true;
  17088. const updateStorage = (strategy, store, options2) => {
  17089. const storage = strategy.storage;
  17090. const storeKey = strategy.key || store.$id;
  17091. const isCustomStorage = isH5 || (options2 == null ? void 0 : options2.enforceCustomStorage);
  17092. if (strategy.paths) {
  17093. const partialState = strategy.paths.reduce((finalObj, key) => {
  17094. finalObj[key] = store.$state[key];
  17095. return finalObj;
  17096. }, {});
  17097. if (isCustomStorage && storage) {
  17098. storage.setItem(storeKey, JSON.stringify(partialState));
  17099. } else {
  17100. uni.setStorage({ key: storeKey, data: JSON.stringify(partialState) });
  17101. }
  17102. } else if (isCustomStorage && storage) {
  17103. storage.setItem(storeKey, JSON.stringify(store.$state));
  17104. } else {
  17105. uni.setStorage({ key: storeKey, data: JSON.stringify(store.$state) });
  17106. }
  17107. };
  17108. var index = ({ options: options2, store }) => {
  17109. var _a2, _b2, _c, _d, _e2, _f;
  17110. if ((_a2 = options2.persist) == null ? void 0 : _a2.enabled) {
  17111. const defaultStrat = [
  17112. {
  17113. key: store.$id,
  17114. storage: ((_b2 = options2.persist) == null ? void 0 : _b2.H5Storage) || (window == null ? void 0 : window.sessionStorage)
  17115. }
  17116. ];
  17117. const strategies = ((_d = (_c = options2.persist) == null ? void 0 : _c.strategies) == null ? void 0 : _d.length) ? (_e2 = options2.persist) == null ? void 0 : _e2.strategies : defaultStrat;
  17118. strategies.forEach((strategy) => {
  17119. var _a3, _b3;
  17120. const storage = strategy.storage || ((_a3 = options2.persist) == null ? void 0 : _a3.H5Storage) || (window == null ? void 0 : window.sessionStorage);
  17121. const storeKey = strategy.key || store.$id;
  17122. let storageResult;
  17123. if (isH5 || ((_b3 = options2.persist) == null ? void 0 : _b3.enforceCustomStorage)) {
  17124. storageResult = storage.getItem(storeKey);
  17125. } else {
  17126. storageResult = uni.getStorageSync(storeKey);
  17127. }
  17128. if (storageResult) {
  17129. store.$patch(JSON.parse(storageResult));
  17130. updateStorage(strategy, store, options2.persist);
  17131. }
  17132. });
  17133. store.$subscribe(() => {
  17134. strategies.forEach((strategy) => {
  17135. updateStorage(strategy, store, options2.persist);
  17136. });
  17137. }, { detached: ((_f = options2.persist) == null ? void 0 : _f.detached) ? true : false });
  17138. }
  17139. };
  17140. const files$2 = /* @__PURE__ */ Object.assign({ "./app.js": __vite_glob_0_0$1, "./cart.js": __vite_glob_0_1$1, "./modal.js": __vite_glob_0_2$1, "./sys.js": __vite_glob_0_3$1, "./user.js": __vite_glob_0_4$1 });
  17141. const modules = {};
  17142. Object.keys(files$2).forEach((key) => {
  17143. modules[key.replace(/(.*\/)*([^.]+).*/gi, "$2")] = files$2[key].default;
  17144. });
  17145. const setupPinia = (app2) => {
  17146. const pinia = createPinia();
  17147. pinia.use(index);
  17148. app2.use(pinia);
  17149. };
  17150. const $store = (name2) => {
  17151. return modules[name2]();
  17152. };
  17153. const options = {
  17154. // 显示操作成功消息 默认不显示
  17155. showSuccess: false,
  17156. // 成功提醒 默认使用后端返回值
  17157. successMsg: "",
  17158. // 显示失败消息 默认显示
  17159. showError: true,
  17160. // 失败提醒 默认使用后端返回信息
  17161. errorMsg: "",
  17162. // 显示请求时loading模态框 默认显示
  17163. showLoading: true,
  17164. // loading提醒文字
  17165. loadingMsg: t$6("common.loading"),
  17166. // 需要授权才能请求 默认放开
  17167. auth: false
  17168. // ...
  17169. };
  17170. let LoadingInstance = {
  17171. target: null,
  17172. count: 0
  17173. };
  17174. function closeLoading() {
  17175. if (LoadingInstance.count > 0)
  17176. LoadingInstance.count--;
  17177. if (LoadingInstance.count === 0)
  17178. uni.hideLoading();
  17179. }
  17180. const http = new Request$1({
  17181. baseURL: baseUrl + apiPath,
  17182. timeout: 8e3,
  17183. method: "GET",
  17184. header: {
  17185. Accept: "text/json",
  17186. "Content-Type": "application/json;charset=UTF-8",
  17187. platform: _platform.name,
  17188. "Accept-Language": uni.getStorageSync("userLanguage") || uni.getLocale()
  17189. },
  17190. sslVerify: false,
  17191. custom: options
  17192. });
  17193. http.interceptors.request.use(
  17194. (config2) => {
  17195. if (config2.custom.auth && !$store("user").isLogin) {
  17196. showAuthModal();
  17197. return Promise.reject();
  17198. }
  17199. if (config2.custom.showLoading) {
  17200. LoadingInstance.count++;
  17201. LoadingInstance.count === 1 && uni.showLoading({
  17202. title: config2.custom.loadingMsg,
  17203. mask: true,
  17204. fail: () => {
  17205. uni.hideLoading();
  17206. }
  17207. });
  17208. }
  17209. const token = getAccessToken();
  17210. if (token) {
  17211. config2.header["Authorization"] = token;
  17212. }
  17213. config2.header["Accept"] = "*/*";
  17214. config2.header["tenant-id"] = "1";
  17215. config2.header["terminal"] = "20";
  17216. return config2;
  17217. },
  17218. (error2) => {
  17219. return Promise.reject(error2);
  17220. }
  17221. );
  17222. http.interceptors.response.use(
  17223. (response) => {
  17224. var _a2, _b2;
  17225. if (response.config.url.indexOf("/member/auth/") >= 0 && ((_b2 = (_a2 = response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.accessToken)) {
  17226. $store("user").setToken(response.data.data.accessToken, response.data.data.refreshToken);
  17227. }
  17228. response.config.custom.showLoading && closeLoading();
  17229. if (response.data.code !== 0) {
  17230. if (response.data.code === 401) {
  17231. cancelAutoSign();
  17232. return refreshToken(response.config);
  17233. }
  17234. if (response.config.custom.showError) {
  17235. cancelAutoSign();
  17236. uni.showToast({
  17237. title: response.data.msg || t$6("common.server_error_try_later"),
  17238. icon: "none",
  17239. mask: true
  17240. });
  17241. }
  17242. }
  17243. if (response.config.custom.showSuccess && response.config.custom.successMsg !== "" && response.data.code === 0) {
  17244. uni.showToast({
  17245. title: response.config.custom.successMsg,
  17246. icon: "none"
  17247. });
  17248. }
  17249. return Promise.resolve(response.data);
  17250. },
  17251. (error2) => {
  17252. var _a2;
  17253. formatAppLog("log", "at sheep/request/index.js:159", "服务器开小差");
  17254. cancelAutoSign();
  17255. const userStore = $store("user");
  17256. const isLogin = userStore.isLogin;
  17257. let errorMessage = t$6("common.network_request_error");
  17258. if (error2 !== void 0) {
  17259. switch (error2.statusCode) {
  17260. case 400:
  17261. errorMessage = t$6("common.request_error");
  17262. break;
  17263. case 401:
  17264. errorMessage = isLogin ? t$6("common.login_expired") : t$6("common.please_login");
  17265. break;
  17266. case 403:
  17267. errorMessage = t$6("common.access_denied");
  17268. break;
  17269. case 404:
  17270. errorMessage = t$6("common.request_error");
  17271. break;
  17272. case 408:
  17273. errorMessage = t$6("common.request_timeout");
  17274. break;
  17275. case 429:
  17276. errorMessage = t$6("common.frequent_requests");
  17277. break;
  17278. case 500:
  17279. errorMessage = t$6("common.server_error_try_later");
  17280. break;
  17281. case 501:
  17282. errorMessage = t$6("common.server_unavailable");
  17283. break;
  17284. case 502:
  17285. errorMessage = t$6("common.network_error");
  17286. break;
  17287. case 503:
  17288. errorMessage = t$6("common.service_unavailable");
  17289. break;
  17290. case 504:
  17291. errorMessage = t$6("common.network_timeout");
  17292. break;
  17293. case 505:
  17294. errorMessage = t$6("common.http_not_supported");
  17295. break;
  17296. }
  17297. if (error2.errMsg.includes("timeout"))
  17298. errorMessage = t$6("common.request_timeout");
  17299. }
  17300. if (error2 && error2.config) {
  17301. if (error2.config.custom.showError === false) {
  17302. uni.showToast({
  17303. title: ((_a2 = error2.data) == null ? void 0 : _a2.msg) || errorMessage,
  17304. icon: "none",
  17305. mask: true
  17306. });
  17307. }
  17308. error2.config.custom.showLoading && closeLoading();
  17309. }
  17310. return false;
  17311. }
  17312. );
  17313. let requestList = [];
  17314. let isRefreshToken = false;
  17315. const refreshToken = async (config2) => {
  17316. if (config2.url.indexOf("/member/auth/refresh-token") >= 0) {
  17317. return Promise.reject("error");
  17318. }
  17319. if (!isRefreshToken) {
  17320. isRefreshToken = true;
  17321. const refreshToken2 = getRefreshToken();
  17322. if (!refreshToken2) {
  17323. return handleAuthorized();
  17324. }
  17325. try {
  17326. const refreshTokenResult = await AuthUtil.refreshToken(refreshToken2);
  17327. if (refreshTokenResult.code !== 0) {
  17328. throw new Error("刷新令牌失败");
  17329. }
  17330. config2.header.Authorization = "Bearer " + getAccessToken();
  17331. requestList.forEach((cb) => {
  17332. cb();
  17333. });
  17334. requestList = [];
  17335. return request(config2);
  17336. } catch (e2) {
  17337. requestList.forEach((cb) => {
  17338. cb();
  17339. });
  17340. return handleAuthorized();
  17341. } finally {
  17342. requestList = [];
  17343. isRefreshToken = false;
  17344. }
  17345. } else {
  17346. return new Promise((resolve) => {
  17347. requestList.push(() => {
  17348. config2.header.Authorization = "Bearer " + getAccessToken();
  17349. resolve(request(config2));
  17350. });
  17351. });
  17352. }
  17353. };
  17354. const handleAuthorized = () => {
  17355. const userStore = $store("user");
  17356. userStore.logout(true);
  17357. showAuthModal();
  17358. return Promise.reject({
  17359. code: 401,
  17360. msg: userStore.isLogin ? t$6("common.login_expired") : t$6("common.please_login")
  17361. });
  17362. };
  17363. const getAccessToken = () => {
  17364. return uni.getStorageSync("token");
  17365. };
  17366. const getRefreshToken = () => {
  17367. return uni.getStorageSync("refresh-token");
  17368. };
  17369. const request = (config2) => {
  17370. return http.middleware(config2);
  17371. };
  17372. const request$1 = request;
  17373. const ConsumptionApi = {
  17374. // 获取消费分记录
  17375. getConsumptionLog: (params) => {
  17376. return request$1({
  17377. url: "/distri/consumption-change-log/page",
  17378. method: "GET",
  17379. params,
  17380. custom: {
  17381. showLoading: true,
  17382. showError: true
  17383. }
  17384. });
  17385. },
  17386. // 消费分转让
  17387. createConsumptionLog: (data) => {
  17388. return request$1({
  17389. url: "/distri/consumption-transfer-log/create",
  17390. method: "POST",
  17391. data,
  17392. custom: {
  17393. showLoading: true,
  17394. showError: true
  17395. }
  17396. });
  17397. },
  17398. // 获取消费分转让记录
  17399. getConsumptionTransfersLog: (params) => {
  17400. return request$1({
  17401. url: "/distri/consumption-transfer-log/page",
  17402. method: "GET",
  17403. params,
  17404. custom: {
  17405. showLoading: true,
  17406. showError: true
  17407. }
  17408. });
  17409. },
  17410. quotaTransition: (quota) => {
  17411. return request$1({
  17412. url: "/distri/integral/quotaTransition?quota=" + quota,
  17413. method: "PUT",
  17414. custom: {
  17415. showLoading: true,
  17416. showError: true
  17417. }
  17418. });
  17419. }
  17420. };
  17421. const __vite_glob_0_0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  17422. __proto__: null,
  17423. default: ConsumptionApi
  17424. }, Symbol.toStringTag, { value: "Module" }));
  17425. const ScoreApi = {
  17426. getScoreApi: (params) => {
  17427. return request$1({
  17428. url: "/distri/pt-profit-log/page",
  17429. method: "GET",
  17430. params,
  17431. custom: {
  17432. showLoading: false,
  17433. showError: false
  17434. }
  17435. });
  17436. },
  17437. getMaxScoreList: (params) => {
  17438. return request$1({
  17439. url: "/distri/pt-profit-log/getMaxAmountPage",
  17440. method: "GET",
  17441. params,
  17442. custom: {
  17443. showLoading: false,
  17444. showError: false
  17445. }
  17446. });
  17447. }
  17448. };
  17449. const __vite_glob_0_1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  17450. __proto__: null,
  17451. default: ScoreApi
  17452. }, Symbol.toStringTag, { value: "Module" }));
  17453. const ShareApi = {
  17454. // 查询商品linkId
  17455. getLinkId: (category, objectId) => {
  17456. return request$1({
  17457. url: "/distri/share-link/getShareLink",
  17458. method: "GET",
  17459. params: { category, objectId },
  17460. custom: {
  17461. showLoading: false,
  17462. showError: false
  17463. }
  17464. });
  17465. },
  17466. // 根据linkId查id
  17467. getObjectIdByLinkId: (linkId) => {
  17468. return request$1({
  17469. url: "/distri/share-link/getObjectIdByLinkId",
  17470. method: "GET",
  17471. params: { linkId },
  17472. custom: {
  17473. showLoading: false,
  17474. showError: false
  17475. }
  17476. });
  17477. }
  17478. };
  17479. const __vite_glob_0_2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  17480. __proto__: null,
  17481. default: ShareApi
  17482. }, Symbol.toStringTag, { value: "Module" }));
  17483. const TeamApi = {
  17484. // 查询商品linkId
  17485. getTeam: (params) => {
  17486. return request$1({
  17487. url: "/distri/share-path/getTeam",
  17488. method: "GET",
  17489. params,
  17490. custom: {
  17491. showLoading: true,
  17492. showError: false
  17493. }
  17494. });
  17495. }
  17496. };
  17497. const __vite_glob_0_3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  17498. __proto__: null,
  17499. default: TeamApi
  17500. }, Symbol.toStringTag, { value: "Module" }));
  17501. const WithdrawalApi = {
  17502. getWithdrawalPage: (params) => {
  17503. return request$1({
  17504. url: "/distri/application-for-withdrawal/page",
  17505. method: "GET",
  17506. params,
  17507. custom: {
  17508. showLoading: false,
  17509. showError: false
  17510. }
  17511. });
  17512. },
  17513. // 获得提现比例
  17514. getWithdrawalPercentage: (params) => {
  17515. return request$1({
  17516. url: "/distri/order-percentage/get",
  17517. method: "GET",
  17518. params,
  17519. custom: {
  17520. showLoading: false,
  17521. showError: false
  17522. }
  17523. });
  17524. }
  17525. };
  17526. const __vite_glob_0_4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  17527. __proto__: null,
  17528. default: WithdrawalApi
  17529. }, Symbol.toStringTag, { value: "Module" }));
  17530. const FileApi = {
  17531. // 上传文件
  17532. uploadFile: (file) => {
  17533. uni.getStorageSync("token");
  17534. uni.showLoading({
  17535. title: t$6("common.uploading")
  17536. });
  17537. return new Promise((resolve, reject) => {
  17538. uni.uploadFile({
  17539. url: baseUrl + apiPath + "/infra/file/upload",
  17540. filePath: file,
  17541. name: "file",
  17542. header: {
  17543. // Accept: 'text/json',
  17544. Accept: "*/*",
  17545. "tenant-id": "1"
  17546. // Authorization: 'Bearer test247',
  17547. },
  17548. success: (uploadFileRes) => {
  17549. let result2 = JSON.parse(uploadFileRes.data);
  17550. if (result2.error === 1) {
  17551. uni.showToast({
  17552. icon: "none",
  17553. title: result2.msg
  17554. });
  17555. } else {
  17556. return resolve(result2);
  17557. }
  17558. },
  17559. fail: (error2) => {
  17560. formatAppLog("log", "at sheep/api/infra/file.js:40", "上传失败:", error2);
  17561. return resolve(false);
  17562. },
  17563. complete: () => {
  17564. uni.hideLoading();
  17565. }
  17566. });
  17567. });
  17568. },
  17569. // 通过图片url获得文件流
  17570. getFileIO: async (fileUrl) => {
  17571. const response = await fetch("https://zxgz.newfeifan.cn/app-api/infra/file/downloadByUrl?fileUrl=" + fileUrl, { method: "GET" });
  17572. if (!response.ok) {
  17573. throw new Error("网络响应不是OK状态");
  17574. }
  17575. const blob = await response.blob();
  17576. return blob;
  17577. }
  17578. };
  17579. const __vite_glob_0_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  17580. __proto__: null,
  17581. default: FileApi
  17582. }, Symbol.toStringTag, { value: "Module" }));
  17583. const AddressApi = {
  17584. // 获得用户收件地址列表
  17585. getAddressList: (addressType = 1) => {
  17586. return request$1({
  17587. url: "/member/address/list",
  17588. method: "GET",
  17589. params: { addressType }
  17590. });
  17591. },
  17592. // 创建用户收件地址
  17593. createAddress: (data) => {
  17594. return request$1({
  17595. url: "/member/address/create",
  17596. method: "POST",
  17597. data,
  17598. custom: {
  17599. showSuccess: true,
  17600. successMsg: t$6("common.save_success")
  17601. }
  17602. });
  17603. },
  17604. // 更新用户收件地址
  17605. updateAddress: (data) => {
  17606. return request$1({
  17607. url: "/member/address/update",
  17608. method: "PUT",
  17609. data,
  17610. custom: {
  17611. showSuccess: true,
  17612. successMsg: t$6("common.update_success")
  17613. }
  17614. });
  17615. },
  17616. // 获得用户收件地址
  17617. getAddress: (id, addressType = 1) => {
  17618. formatAppLog("log", "at sheep/api/member/address.js:38", "123123", addressType);
  17619. return request$1({
  17620. url: "/member/address/get",
  17621. method: "GET",
  17622. params: { id, addressType }
  17623. });
  17624. },
  17625. // 删除用户收件地址
  17626. deleteAddress: (id, addressType = 1) => {
  17627. return request$1({
  17628. url: "/member/address/delete",
  17629. method: "DELETE",
  17630. params: { id, addressType }
  17631. });
  17632. }
  17633. };
  17634. const __vite_glob_0_6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  17635. __proto__: null,
  17636. default: AddressApi
  17637. }, Symbol.toStringTag, { value: "Module" }));
  17638. const PointApi = {
  17639. // 获得用户佣金记录分页
  17640. getPointRecordPage: (params) => {
  17641. if (params.addStatus === void 0) {
  17642. delete params.addStatus;
  17643. }
  17644. const queryString = Object.keys(params).map((key) => encodeURIComponent(key) + "=" + params[key]).join("&");
  17645. return request$1({
  17646. url: `/member/point/record/page?${queryString}`,
  17647. method: "GET"
  17648. });
  17649. }
  17650. };
  17651. const __vite_glob_0_8 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  17652. __proto__: null,
  17653. default: PointApi
  17654. }, Symbol.toStringTag, { value: "Module" }));
  17655. const app = {
  17656. //小程序直播
  17657. mplive: {
  17658. getRoomList: (ids) => request$1({
  17659. url: "app/mplive/getRoomList",
  17660. method: "GET",
  17661. params: {
  17662. ids: ids.join(",")
  17663. }
  17664. }),
  17665. getMpLink: () => request$1({
  17666. url: "app/mplive/getMpLink",
  17667. method: "GET"
  17668. })
  17669. }
  17670. };
  17671. const __vite_glob_0_12 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  17672. __proto__: null,
  17673. default: app
  17674. }, Symbol.toStringTag, { value: "Module" }));
  17675. const chat$1 = {
  17676. // 获取聊天token
  17677. unifiedToken: () => request$1({
  17678. url: "unifiedToken",
  17679. custom: {
  17680. showError: false,
  17681. showLoading: false
  17682. }
  17683. })
  17684. };
  17685. const __vite_glob_0_13 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  17686. __proto__: null,
  17687. default: chat$1
  17688. }, Symbol.toStringTag, { value: "Module" }));
  17689. const third$1 = {
  17690. // 微信相关
  17691. wechat: {
  17692. // 小程序订阅消息
  17693. subscribeTemplate: (params) => request$1({
  17694. url: "third/wechat/subscribeTemplate",
  17695. method: "GET",
  17696. params: {
  17697. platform: "miniProgram"
  17698. },
  17699. custom: {
  17700. showError: false,
  17701. showLoading: false
  17702. }
  17703. }),
  17704. // 获取微信小程序码
  17705. getWxacode: (path) => `${baseUrl}${apiPath}third/wechat/wxacode?platform=miniProgram&payload=${encodeURIComponent(
  17706. JSON.stringify({
  17707. path
  17708. })
  17709. )}`
  17710. },
  17711. // 苹果相关
  17712. apple: {
  17713. // 第三方登录
  17714. login: (data) => request$1({
  17715. url: "third/apple/login",
  17716. method: "POST",
  17717. data,
  17718. custom: {
  17719. showSuccess: true,
  17720. loadingMsg: t$6("common.logging_in")
  17721. }
  17722. })
  17723. }
  17724. };
  17725. const __vite_glob_0_15 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  17726. __proto__: null,
  17727. default: third$1
  17728. }, Symbol.toStringTag, { value: "Module" }));
  17729. const files$1 = /* @__PURE__ */ Object.assign({ "./app.js": __vite_glob_0_12, "./chat.js": __vite_glob_0_13, "./third.js": __vite_glob_0_15 });
  17730. let api$1 = {};
  17731. Object.keys(files$1).forEach((key) => {
  17732. api$1 = {
  17733. ...api$1,
  17734. [key.replace(/(.*\/)*([^.]+).*/gi, "$2")]: files$1[key].default
  17735. };
  17736. });
  17737. const api$2 = api$1;
  17738. const __vite_glob_0_14 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  17739. __proto__: null,
  17740. default: api$2
  17741. }, Symbol.toStringTag, { value: "Module" }));
  17742. const PayChannelApi = {
  17743. // 获得指定应用的开启的支付渠道编码列表
  17744. getEnableChannelCodeList: (appId) => {
  17745. return request$1({
  17746. url: "/pay/channel/get-enable-code-list",
  17747. method: "GET",
  17748. params: { appId }
  17749. });
  17750. }
  17751. };
  17752. const __vite_glob_0_16 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  17753. __proto__: null,
  17754. default: PayChannelApi
  17755. }, Symbol.toStringTag, { value: "Module" }));
  17756. const CategoryApi = {
  17757. // 查询分类列表
  17758. getCategoryList: () => {
  17759. return request$1({
  17760. url: "/product/category/list",
  17761. method: "GET"
  17762. });
  17763. },
  17764. // 查询分类列表,指定编号
  17765. getCategoryListByIds: (ids) => {
  17766. return request$1({
  17767. url: "/product/category/list-by-ids",
  17768. method: "GET",
  17769. params: { ids }
  17770. });
  17771. }
  17772. };
  17773. const __vite_glob_0_19 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  17774. __proto__: null,
  17775. default: CategoryApi
  17776. }, Symbol.toStringTag, { value: "Module" }));
  17777. const CommentApi = {
  17778. // 获得商品评价分页
  17779. getCommentPage: (spuId, pageNo, pageSize, type) => {
  17780. return request$1({
  17781. url: "/product/comment/page",
  17782. method: "GET",
  17783. params: {
  17784. spuId,
  17785. pageNo,
  17786. pageSize,
  17787. type
  17788. },
  17789. custom: {
  17790. showLoading: false,
  17791. showError: false
  17792. }
  17793. });
  17794. }
  17795. };
  17796. const __vite_glob_0_20 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  17797. __proto__: null,
  17798. default: CommentApi
  17799. }, Symbol.toStringTag, { value: "Module" }));
  17800. const FavoriteApi = {
  17801. // 获得商品收藏分页
  17802. getFavoritePage: (data) => {
  17803. return request$1({
  17804. url: "/product/favorite/page",
  17805. method: "GET",
  17806. params: data
  17807. });
  17808. },
  17809. // 检查是否收藏过商品
  17810. isFavoriteExists: (spuId) => {
  17811. return request$1({
  17812. url: "/product/favorite/exits",
  17813. method: "GET",
  17814. params: {
  17815. spuId
  17816. }
  17817. });
  17818. },
  17819. // 添加商品收藏
  17820. createFavorite: (spuId) => {
  17821. return request$1({
  17822. url: "/product/favorite/create",
  17823. method: "POST",
  17824. data: {
  17825. spuId
  17826. },
  17827. custom: {
  17828. auth: true,
  17829. showSuccess: true,
  17830. successMsg: t$6("common.collect_success")
  17831. }
  17832. });
  17833. },
  17834. // 添加商品收藏时调用的加身价
  17835. createCollectBefore: (spuId) => {
  17836. return request$1({
  17837. url: "/distri/user-collect-before/create",
  17838. method: "POST",
  17839. data: {
  17840. productSpuId: spuId
  17841. }
  17842. });
  17843. },
  17844. // 取消商品收藏
  17845. deleteFavorite: (spuId) => {
  17846. return request$1({
  17847. url: "/product/favorite/delete",
  17848. method: "DELETE",
  17849. data: {
  17850. spuId
  17851. },
  17852. custom: {
  17853. auth: true,
  17854. showSuccess: true,
  17855. successMsg: t$6("common.cancel_success")
  17856. }
  17857. });
  17858. }
  17859. };
  17860. const __vite_glob_0_21 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  17861. __proto__: null,
  17862. default: FavoriteApi
  17863. }, Symbol.toStringTag, { value: "Module" }));
  17864. const SpuHistoryApi = {
  17865. // 删除商品浏览记录
  17866. deleteBrowseHistory: (spuIds) => {
  17867. return request$1({
  17868. url: "/product/browse-history/delete",
  17869. method: "DELETE",
  17870. data: { spuIds },
  17871. custom: {
  17872. showSuccess: true,
  17873. successMsg: t$6("common.delete_success")
  17874. }
  17875. });
  17876. },
  17877. // 清空商品浏览记录
  17878. cleanBrowseHistory: () => {
  17879. return request$1({
  17880. url: "/product/browse-history/clean",
  17881. method: "DELETE",
  17882. custom: {
  17883. showSuccess: true,
  17884. successMsg: t$6("common.clear_success")
  17885. }
  17886. });
  17887. },
  17888. // 获得商品浏览记录分页
  17889. getBrowseHistoryPage: (data) => {
  17890. return request$1({
  17891. url: "/product/browse-history/page",
  17892. method: "GET",
  17893. data,
  17894. custom: {
  17895. showLoading: false
  17896. }
  17897. });
  17898. }
  17899. };
  17900. const __vite_glob_0_22 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  17901. __proto__: null,
  17902. default: SpuHistoryApi
  17903. }, Symbol.toStringTag, { value: "Module" }));
  17904. const SpuApi = {
  17905. // 获得商品 SPU 列表
  17906. getSpuListByIds: (ids) => {
  17907. return request$1({
  17908. url: "/product/spu/list-by-ids",
  17909. method: "GET",
  17910. params: { ids },
  17911. custom: {
  17912. showLoading: false,
  17913. showError: false
  17914. }
  17915. });
  17916. },
  17917. // 获得商品 SPU 分页
  17918. getSpuPage: (params) => {
  17919. return request$1({
  17920. url: "/product/spu/page",
  17921. method: "GET",
  17922. params,
  17923. custom: {
  17924. showLoading: false,
  17925. showError: false
  17926. }
  17927. });
  17928. },
  17929. // 查询商品
  17930. getSpuDetail: (id) => {
  17931. return request$1({
  17932. url: "/product/spu/get-detail",
  17933. method: "GET",
  17934. params: { id },
  17935. custom: {
  17936. showLoading: false,
  17937. showError: false
  17938. }
  17939. });
  17940. }
  17941. };
  17942. const __vite_glob_0_23 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  17943. __proto__: null,
  17944. default: SpuApi
  17945. }, Symbol.toStringTag, { value: "Module" }));
  17946. const ActivityApi = {
  17947. // 获得单个商品,近期参与的每个活动
  17948. getActivityListBySpuId: (spuId) => {
  17949. return request$1({
  17950. url: "/promotion/activity/list-by-spu-id",
  17951. method: "GET",
  17952. params: {
  17953. spuId
  17954. }
  17955. });
  17956. }
  17957. };
  17958. const __vite_glob_0_24 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  17959. __proto__: null,
  17960. default: ActivityApi
  17961. }, Symbol.toStringTag, { value: "Module" }));
  17962. const ArticleApi = {
  17963. // 获得文章详情
  17964. getArticle: (id, title) => {
  17965. return request$1({
  17966. url: "/promotion/article/get",
  17967. method: "GET",
  17968. params: { id, title }
  17969. });
  17970. },
  17971. // 获得文章列表
  17972. getHomeList: () => {
  17973. return request$1({
  17974. url: "/promotion/article/getHomeInfo",
  17975. method: "GET"
  17976. });
  17977. },
  17978. getArticleByCategory: (params) => {
  17979. return request$1({
  17980. url: "/promotion/article/page",
  17981. method: "GET",
  17982. params
  17983. });
  17984. }
  17985. };
  17986. const __vite_glob_0_25 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  17987. __proto__: null,
  17988. default: ArticleApi
  17989. }, Symbol.toStringTag, { value: "Module" }));
  17990. const BargainApi = {
  17991. // 获得砍价记录的概要信息
  17992. getBargainRecordSummary: () => {
  17993. return request$1({
  17994. url: "/promotion/bargain-record/get-summary",
  17995. method: "GET"
  17996. });
  17997. },
  17998. // 获得砍价活动分页
  17999. getBargainActivityPage: () => {
  18000. return request$1({
  18001. url: "/promotion/bargain-activity/page",
  18002. method: "GET"
  18003. });
  18004. },
  18005. // 获得砍价活动详情
  18006. getBargainActivityDetail(params) {
  18007. return request$1({
  18008. url: "/promotion/bargain-activity/get-detail",
  18009. method: "GET",
  18010. params
  18011. });
  18012. }
  18013. };
  18014. const __vite_glob_0_26 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  18015. __proto__: null,
  18016. default: BargainApi
  18017. }, Symbol.toStringTag, { value: "Module" }));
  18018. const CombinationApi = {
  18019. // 获得拼团活动列表
  18020. getCombinationActivityList: (count) => {
  18021. return request$1({
  18022. url: "/promotion/combination-activity/list",
  18023. method: "GET",
  18024. params: { count }
  18025. });
  18026. },
  18027. // 获得拼团活动分页
  18028. getCombinationActivityPage: (params) => {
  18029. return request$1({
  18030. url: "/promotion/combination-activity/page",
  18031. method: "GET",
  18032. params
  18033. });
  18034. },
  18035. // 获得拼团活动明细
  18036. getCombinationActivity: (id) => {
  18037. return request$1({
  18038. url: "/promotion/combination-activity/get-detail",
  18039. method: "GET",
  18040. params: {
  18041. id
  18042. }
  18043. });
  18044. },
  18045. // 获得最近 n 条拼团记录(团长发起的)
  18046. getHeadCombinationRecordList: (activityId, status, count) => {
  18047. return request$1({
  18048. url: "/promotion/combination-record/get-head-list",
  18049. method: "GET",
  18050. params: {
  18051. activityId,
  18052. status,
  18053. count
  18054. }
  18055. });
  18056. },
  18057. // 获得我的拼团记录分页
  18058. getCombinationRecordPage: (params) => {
  18059. return request$1({
  18060. url: "/promotion/combination-record/page",
  18061. method: "GET",
  18062. params
  18063. });
  18064. },
  18065. // 获得拼团记录明细
  18066. getCombinationRecordDetail: (id) => {
  18067. return request$1({
  18068. url: "/promotion/combination-record/get-detail",
  18069. method: "GET",
  18070. params: {
  18071. id
  18072. }
  18073. });
  18074. },
  18075. // 获得拼团记录的概要信息
  18076. getCombinationRecordSummary: () => {
  18077. return request$1({
  18078. url: "/promotion/combination-record/get-summary",
  18079. method: "GET"
  18080. });
  18081. }
  18082. };
  18083. const __vite_glob_0_27 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  18084. __proto__: null,
  18085. default: CombinationApi
  18086. }, Symbol.toStringTag, { value: "Module" }));
  18087. const PageApi = {
  18088. // 获得页面
  18089. getPage: (params) => {
  18090. return request$1({
  18091. url: "/promotion/diy-page/get",
  18092. method: "GET",
  18093. params
  18094. });
  18095. }
  18096. };
  18097. const __vite_glob_0_30 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  18098. __proto__: null,
  18099. default: PageApi
  18100. }, Symbol.toStringTag, { value: "Module" }));
  18101. const RewardActivityApi = {
  18102. // 获得满减送活动
  18103. getRewardActivity: (id) => {
  18104. return request$1({
  18105. url: "/promotion/reward-activity/get",
  18106. method: "GET",
  18107. params: { id }
  18108. });
  18109. }
  18110. };
  18111. const __vite_glob_0_31 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  18112. __proto__: null,
  18113. default: RewardActivityApi
  18114. }, Symbol.toStringTag, { value: "Module" }));
  18115. const SeckillApi = {
  18116. // 获得秒杀时间段列表
  18117. getSeckillConfigList: () => {
  18118. return request$1({ url: "promotion/seckill-config/list", method: "GET" });
  18119. },
  18120. // 获得当前秒杀活动
  18121. getNowSeckillActivity: () => {
  18122. return request$1({ url: "promotion/seckill-activity/get-now", method: "GET" });
  18123. },
  18124. // 获得秒杀活动分页
  18125. getSeckillActivityPage: (params) => {
  18126. return request$1({ url: "promotion/seckill-activity/page", method: "GET", params });
  18127. },
  18128. /**
  18129. * 获得秒杀活动明细
  18130. * @param {number} id 秒杀活动编号
  18131. * @return {*}
  18132. */
  18133. getSeckillActivity: (id) => {
  18134. return request$1({
  18135. url: "promotion/seckill-activity/get-detail",
  18136. method: "GET",
  18137. params: { id }
  18138. });
  18139. }
  18140. };
  18141. const __vite_glob_0_32 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  18142. __proto__: null,
  18143. default: SeckillApi
  18144. }, Symbol.toStringTag, { value: "Module" }));
  18145. const SaleApi = {
  18146. // 申请成为商户
  18147. createMerchant: (data) => {
  18148. return request$1({
  18149. url: "/sale/merchant-apply/create",
  18150. method: "POST",
  18151. data,
  18152. custom: {
  18153. showSuccess: true,
  18154. successMsg: t$6("common.apply_success")
  18155. }
  18156. });
  18157. },
  18158. // 获取商户信息
  18159. getMerchant: () => {
  18160. return request$1({
  18161. url: "/sale/merchant-apply/get",
  18162. method: "GET"
  18163. });
  18164. },
  18165. // 变动商户信息
  18166. updateMerchant: (data) => {
  18167. return request$1({
  18168. url: "/sale/merchant-apply/update",
  18169. method: "PUT",
  18170. data,
  18171. custom: {
  18172. showSuccess: true,
  18173. successMsg: t$6("common.change_success")
  18174. }
  18175. });
  18176. },
  18177. getMerchantPage: (params) => {
  18178. return request$1({
  18179. url: "/sale/merchant-apply-log/page",
  18180. method: "GET",
  18181. params,
  18182. custom: {
  18183. showLoading: true
  18184. }
  18185. });
  18186. },
  18187. checkContactNumber: (params) => {
  18188. return request$1({
  18189. url: "/system/users/getUserMobile",
  18190. method: "GET",
  18191. params,
  18192. custom: {
  18193. showLoading: true
  18194. }
  18195. });
  18196. },
  18197. checkSystemUser: (params) => {
  18198. return request$1({
  18199. url: "/sale/merchant-apply/isSystemUserByMobile",
  18200. method: "GET",
  18201. params,
  18202. custom: {
  18203. showLoading: true
  18204. }
  18205. });
  18206. }
  18207. };
  18208. const __vite_glob_0_33 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  18209. __proto__: null,
  18210. default: SaleApi
  18211. }, Symbol.toStringTag, { value: "Module" }));
  18212. const AreaApi = {
  18213. // 获得地区树
  18214. getAreaTree: () => {
  18215. return request$1({
  18216. url: "/system/area/tree",
  18217. method: "GET"
  18218. });
  18219. }
  18220. };
  18221. const __vite_glob_0_34 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  18222. __proto__: null,
  18223. default: AreaApi
  18224. }, Symbol.toStringTag, { value: "Module" }));
  18225. const VoiceApi = {
  18226. // 语音转文字
  18227. getVoiceToText: () => {
  18228. return request$1({
  18229. url: "/voice2text",
  18230. method: "POST"
  18231. });
  18232. }
  18233. };
  18234. const __vite_glob_0_35 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  18235. __proto__: null,
  18236. default: VoiceApi
  18237. }, Symbol.toStringTag, { value: "Module" }));
  18238. const AfterSaleApi = {
  18239. // 获得售后分页
  18240. getAfterSalePage: (params) => {
  18241. return request$1({
  18242. url: `/trade/after-sale/page`,
  18243. method: "GET",
  18244. params,
  18245. custom: {
  18246. showLoading: false
  18247. }
  18248. });
  18249. },
  18250. // 创建售后
  18251. createAfterSale: (data) => {
  18252. return request$1({
  18253. url: `/trade/after-sale/create`,
  18254. method: "POST",
  18255. data
  18256. });
  18257. },
  18258. // 获得售后
  18259. getAfterSale: (id) => {
  18260. return request$1({
  18261. url: `/trade/after-sale/get`,
  18262. method: "GET",
  18263. params: {
  18264. id
  18265. }
  18266. });
  18267. },
  18268. // 取消售后
  18269. cancelAfterSale: (id) => {
  18270. return request$1({
  18271. url: `/trade/after-sale/cancel`,
  18272. method: "DELETE",
  18273. params: {
  18274. id
  18275. }
  18276. });
  18277. },
  18278. // 获得售后日志列表
  18279. getAfterSaleLogList: (afterSaleId) => {
  18280. return request$1({
  18281. url: `/trade/after-sale-log/list`,
  18282. method: "GET",
  18283. params: {
  18284. afterSaleId
  18285. }
  18286. });
  18287. },
  18288. // 退回货物
  18289. deliveryAfterSale: (data) => {
  18290. return request$1({
  18291. url: `/trade/after-sale/delivery`,
  18292. method: "PUT",
  18293. data
  18294. });
  18295. }
  18296. };
  18297. const __vite_glob_0_36 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  18298. __proto__: null,
  18299. default: AfterSaleApi
  18300. }, Symbol.toStringTag, { value: "Module" }));
  18301. const BrokerageApi = {
  18302. // 获得个人分销信息
  18303. getBrokerageUser: () => {
  18304. return request$1({
  18305. url: "/trade/brokerage-user/get",
  18306. method: "GET"
  18307. });
  18308. },
  18309. // 获得个人分销统计
  18310. getBrokerageUserSummary: () => {
  18311. return request$1({
  18312. url: "/trade/brokerage-user/get-summary",
  18313. method: "GET"
  18314. });
  18315. },
  18316. // 获得分销记录分页
  18317. getBrokerageRecordPage: (params) => {
  18318. if (params.status === void 0) {
  18319. delete params.status;
  18320. }
  18321. const queryString = Object.keys(params).map((key) => encodeURIComponent(key) + "=" + params[key]).join("&");
  18322. return request$1({
  18323. url: `/trade/brokerage-record/page?${queryString}`,
  18324. method: "GET"
  18325. });
  18326. },
  18327. // 创建分销提现
  18328. createBrokerageWithdraw: (data) => {
  18329. return request$1({
  18330. url: "/trade/brokerage-withdraw/create",
  18331. method: "POST",
  18332. data
  18333. });
  18334. },
  18335. // 获得商品的分销金额
  18336. getProductBrokeragePrice: (spuId) => {
  18337. return request$1({
  18338. url: "/trade/brokerage-record/get-product-brokerage-price",
  18339. method: "GET",
  18340. params: {
  18341. spuId
  18342. }
  18343. });
  18344. },
  18345. // 获得分销用户排行(基于佣金)
  18346. getRankByPrice: (params) => {
  18347. const queryString = `times=${params.times[0]}&times=${params.times[1]}`;
  18348. return request$1({
  18349. url: `/trade/brokerage-user/get-rank-by-price?${queryString}`,
  18350. method: "GET"
  18351. });
  18352. },
  18353. // 获得分销用户排行分页(基于佣金)
  18354. getBrokerageUserChildSummaryPageByPrice: (params) => {
  18355. const queryString = Object.keys(params).map((key) => encodeURIComponent(key) + "=" + params[key]).join("&");
  18356. return request$1({
  18357. url: `/trade/brokerage-user/rank-page-by-price?${queryString}`,
  18358. method: "GET"
  18359. });
  18360. },
  18361. // 获得分销用户排行分页(基于用户量)
  18362. getBrokerageUserRankPageByUserCount: (params) => {
  18363. const queryString = Object.keys(params).map((key) => encodeURIComponent(key) + "=" + params[key]).join("&");
  18364. return request$1({
  18365. url: `/trade/brokerage-user/rank-page-by-user-count?${queryString}`,
  18366. method: "GET"
  18367. });
  18368. },
  18369. // 获得下级分销统计分页
  18370. getBrokerageUserChildSummaryPage: (params) => {
  18371. return request$1({
  18372. url: "/trade/brokerage-user/child-summary-page",
  18373. method: "GET",
  18374. params
  18375. });
  18376. }
  18377. };
  18378. const __vite_glob_0_37 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  18379. __proto__: null,
  18380. default: BrokerageApi
  18381. }, Symbol.toStringTag, { value: "Module" }));
  18382. const TradeConfigApi = {
  18383. // 获得交易配置
  18384. getTradeConfig: () => {
  18385. return request$1({
  18386. url: `/trade/config/get`,
  18387. method: "GET"
  18388. });
  18389. }
  18390. };
  18391. const __vite_glob_0_39 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  18392. __proto__: null,
  18393. default: TradeConfigApi
  18394. }, Symbol.toStringTag, { value: "Module" }));
  18395. const DeliveryApi = {
  18396. // 获得快递公司列表
  18397. getDeliveryExpressList: () => {
  18398. return request$1({
  18399. url: `/trade/delivery/express/list`,
  18400. method: "get"
  18401. });
  18402. }
  18403. };
  18404. const __vite_glob_0_40 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  18405. __proto__: null,
  18406. default: DeliveryApi
  18407. }, Symbol.toStringTag, { value: "Module" }));
  18408. const files = /* @__PURE__ */ Object.assign({ "./distri/consumption.js": __vite_glob_0_0, "./distri/score.js": __vite_glob_0_1, "./distri/share.js": __vite_glob_0_2, "./distri/team.js": __vite_glob_0_3, "./distri/withdrawal.js": __vite_glob_0_4, "./infra/file.js": __vite_glob_0_5, "./member/address.js": __vite_glob_0_6, "./member/auth.js": __vite_glob_0_7, "./member/point.js": __vite_glob_0_8, "./member/signin.js": __vite_glob_0_9, "./member/social.js": __vite_glob_0_10, "./member/user.js": __vite_glob_0_11, "./migration/app.js": __vite_glob_0_12, "./migration/chat.js": __vite_glob_0_13, "./migration/index.js": __vite_glob_0_14, "./migration/third.js": __vite_glob_0_15, "./pay/channel.js": __vite_glob_0_16, "./pay/order.js": __vite_glob_0_17, "./pay/wallet.js": __vite_glob_0_18, "./product/category.js": __vite_glob_0_19, "./product/comment.js": __vite_glob_0_20, "./product/favorite.js": __vite_glob_0_21, "./product/history.js": __vite_glob_0_22, "./product/spu.js": __vite_glob_0_23, "./promotion/activity.js": __vite_glob_0_24, "./promotion/article.js": __vite_glob_0_25, "./promotion/bargain.js": __vite_glob_0_26, "./promotion/combination.js": __vite_glob_0_27, "./promotion/coupon.js": __vite_glob_0_28, "./promotion/diy.js": __vite_glob_0_29, "./promotion/page.js": __vite_glob_0_30, "./promotion/rewardActivity.js": __vite_glob_0_31, "./promotion/seckill.js": __vite_glob_0_32, "./sale/sale.js": __vite_glob_0_33, "./system/area.js": __vite_glob_0_34, "./system/voice.js": __vite_glob_0_35, "./trade/afterSale.js": __vite_glob_0_36, "./trade/brokerage.js": __vite_glob_0_37, "./trade/cart.js": __vite_glob_0_38, "./trade/config.js": __vite_glob_0_39, "./trade/delivery.js": __vite_glob_0_40, "./trade/order.js": __vite_glob_0_41 });
  18409. let api = {};
  18410. Object.keys(files).forEach((key) => {
  18411. const fileName = key.replace(/(.*\/)*([^.]+).*/gi, "$2");
  18412. api = {
  18413. ...api,
  18414. [fileName]: files[key].default
  18415. };
  18416. });
  18417. const $api = api;
  18418. const zIndex = {
  18419. toast: 10090,
  18420. noNetwork: 10080,
  18421. popup: 10075,
  18422. // popup包含popup,actionsheet,keyboard,picker的值
  18423. mask: 10070,
  18424. navbar: 980,
  18425. topTips: 975,
  18426. sticky: 970,
  18427. indexListSticky: 965,
  18428. popover: 960
  18429. };
  18430. var relativeTime$1 = { exports: {} };
  18431. (function(module, exports) {
  18432. !function(r2, e2) {
  18433. module.exports = e2();
  18434. }(commonjsGlobal, function() {
  18435. return function(r2, e2, t2) {
  18436. r2 = r2 || {};
  18437. var n2 = e2.prototype, o2 = { future: "in %s", past: "%s ago", s: "a few seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", M: "a month", MM: "%d months", y: "a year", yy: "%d years" };
  18438. function i2(r3, e3, t3, o3) {
  18439. return n2.fromToBase(r3, e3, t3, o3);
  18440. }
  18441. t2.en.relativeTime = o2, n2.fromToBase = function(e3, n3, i3, d3, u2) {
  18442. for (var f2, a2, s2, l2 = i3.$locale().relativeTime || o2, h2 = r2.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], m2 = h2.length, c2 = 0; c2 < m2; c2 += 1) {
  18443. var y2 = h2[c2];
  18444. y2.d && (f2 = d3 ? t2(e3).diff(i3, y2.d, true) : i3.diff(e3, y2.d, true));
  18445. var p2 = (r2.rounding || Math.round)(Math.abs(f2));
  18446. if (s2 = f2 > 0, p2 <= y2.r || !y2.r) {
  18447. p2 <= 1 && c2 > 0 && (y2 = h2[c2 - 1]);
  18448. var v2 = l2[y2.l];
  18449. u2 && (p2 = u2("" + p2)), a2 = "string" == typeof v2 ? v2.replace("%d", p2) : v2(p2, n3, y2.l, s2);
  18450. break;
  18451. }
  18452. }
  18453. if (n3)
  18454. return a2;
  18455. var M2 = s2 ? l2.future : l2.past;
  18456. return "function" == typeof M2 ? M2(a2) : M2.replace("%s", a2);
  18457. }, n2.to = function(r3, e3) {
  18458. return i2(r3, e3, this, true);
  18459. }, n2.from = function(r3, e3) {
  18460. return i2(r3, e3, this);
  18461. };
  18462. var d2 = function(r3) {
  18463. return r3.$u ? t2.utc() : t2();
  18464. };
  18465. n2.toNow = function(r3) {
  18466. return this.to(d2(this), r3);
  18467. }, n2.fromNow = function(r3) {
  18468. return this.from(d2(this), r3);
  18469. };
  18470. };
  18471. });
  18472. })(relativeTime$1);
  18473. var relativeTimeExports = relativeTime$1.exports;
  18474. const relativeTime = /* @__PURE__ */ getDefaultExportFromCjs(relativeTimeExports);
  18475. var duration$1 = { exports: {} };
  18476. (function(module, exports) {
  18477. !function(t2, s2) {
  18478. module.exports = s2();
  18479. }(commonjsGlobal, function() {
  18480. var t2, s2, n2 = 1e3, i2 = 6e4, e2 = 36e5, r2 = 864e5, o2 = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, u2 = 31536e6, d2 = 2628e6, a2 = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/, h2 = { years: u2, months: d2, days: r2, hours: e2, minutes: i2, seconds: n2, milliseconds: 1, weeks: 6048e5 }, c2 = function(t3) {
  18481. return t3 instanceof g2;
  18482. }, f2 = function(t3, s3, n3) {
  18483. return new g2(t3, n3, s3.$l);
  18484. }, m2 = function(t3) {
  18485. return s2.p(t3) + "s";
  18486. }, l2 = function(t3) {
  18487. return t3 < 0;
  18488. }, $2 = function(t3) {
  18489. return l2(t3) ? Math.ceil(t3) : Math.floor(t3);
  18490. }, y2 = function(t3) {
  18491. return Math.abs(t3);
  18492. }, v2 = function(t3, s3) {
  18493. return t3 ? l2(t3) ? { negative: true, format: "" + y2(t3) + s3 } : { negative: false, format: "" + t3 + s3 } : { negative: false, format: "" };
  18494. }, g2 = function() {
  18495. function l3(t3, s3, n3) {
  18496. var i3 = this;
  18497. if (this.$d = {}, this.$l = n3, void 0 === t3 && (this.$ms = 0, this.parseFromMilliseconds()), s3)
  18498. return f2(t3 * h2[m2(s3)], this);
  18499. if ("number" == typeof t3)
  18500. return this.$ms = t3, this.parseFromMilliseconds(), this;
  18501. if ("object" == typeof t3)
  18502. return Object.keys(t3).forEach(function(s4) {
  18503. i3.$d[m2(s4)] = t3[s4];
  18504. }), this.calMilliseconds(), this;
  18505. if ("string" == typeof t3) {
  18506. var e3 = t3.match(a2);
  18507. if (e3) {
  18508. var r3 = e3.slice(2).map(function(t4) {
  18509. return null != t4 ? Number(t4) : 0;
  18510. });
  18511. return this.$d.years = r3[0], this.$d.months = r3[1], this.$d.weeks = r3[2], this.$d.days = r3[3], this.$d.hours = r3[4], this.$d.minutes = r3[5], this.$d.seconds = r3[6], this.calMilliseconds(), this;
  18512. }
  18513. }
  18514. return this;
  18515. }
  18516. var y3 = l3.prototype;
  18517. return y3.calMilliseconds = function() {
  18518. var t3 = this;
  18519. this.$ms = Object.keys(this.$d).reduce(function(s3, n3) {
  18520. return s3 + (t3.$d[n3] || 0) * h2[n3];
  18521. }, 0);
  18522. }, y3.parseFromMilliseconds = function() {
  18523. var t3 = this.$ms;
  18524. this.$d.years = $2(t3 / u2), t3 %= u2, this.$d.months = $2(t3 / d2), t3 %= d2, this.$d.days = $2(t3 / r2), t3 %= r2, this.$d.hours = $2(t3 / e2), t3 %= e2, this.$d.minutes = $2(t3 / i2), t3 %= i2, this.$d.seconds = $2(t3 / n2), t3 %= n2, this.$d.milliseconds = t3;
  18525. }, y3.toISOString = function() {
  18526. var t3 = v2(this.$d.years, "Y"), s3 = v2(this.$d.months, "M"), n3 = +this.$d.days || 0;
  18527. this.$d.weeks && (n3 += 7 * this.$d.weeks);
  18528. var i3 = v2(n3, "D"), e3 = v2(this.$d.hours, "H"), r3 = v2(this.$d.minutes, "M"), o3 = this.$d.seconds || 0;
  18529. this.$d.milliseconds && (o3 += this.$d.milliseconds / 1e3, o3 = Math.round(1e3 * o3) / 1e3);
  18530. var u3 = v2(o3, "S"), d3 = t3.negative || s3.negative || i3.negative || e3.negative || r3.negative || u3.negative, a3 = e3.format || r3.format || u3.format ? "T" : "", h3 = (d3 ? "-" : "") + "P" + t3.format + s3.format + i3.format + a3 + e3.format + r3.format + u3.format;
  18531. return "P" === h3 || "-P" === h3 ? "P0D" : h3;
  18532. }, y3.toJSON = function() {
  18533. return this.toISOString();
  18534. }, y3.format = function(t3) {
  18535. var n3 = t3 || "YYYY-MM-DDTHH:mm:ss", i3 = { Y: this.$d.years, YY: s2.s(this.$d.years, 2, "0"), YYYY: s2.s(this.$d.years, 4, "0"), M: this.$d.months, MM: s2.s(this.$d.months, 2, "0"), D: this.$d.days, DD: s2.s(this.$d.days, 2, "0"), H: this.$d.hours, HH: s2.s(this.$d.hours, 2, "0"), m: this.$d.minutes, mm: s2.s(this.$d.minutes, 2, "0"), s: this.$d.seconds, ss: s2.s(this.$d.seconds, 2, "0"), SSS: s2.s(this.$d.milliseconds, 3, "0") };
  18536. return n3.replace(o2, function(t4, s3) {
  18537. return s3 || String(i3[t4]);
  18538. });
  18539. }, y3.as = function(t3) {
  18540. return this.$ms / h2[m2(t3)];
  18541. }, y3.get = function(t3) {
  18542. var s3 = this.$ms, n3 = m2(t3);
  18543. return "milliseconds" === n3 ? s3 %= 1e3 : s3 = "weeks" === n3 ? $2(s3 / h2[n3]) : this.$d[n3], s3 || 0;
  18544. }, y3.add = function(t3, s3, n3) {
  18545. var i3;
  18546. return i3 = s3 ? t3 * h2[m2(s3)] : c2(t3) ? t3.$ms : f2(t3, this).$ms, f2(this.$ms + i3 * (n3 ? -1 : 1), this);
  18547. }, y3.subtract = function(t3, s3) {
  18548. return this.add(t3, s3, true);
  18549. }, y3.locale = function(t3) {
  18550. var s3 = this.clone();
  18551. return s3.$l = t3, s3;
  18552. }, y3.clone = function() {
  18553. return f2(this.$ms, this);
  18554. }, y3.humanize = function(s3) {
  18555. return t2().add(this.$ms, "ms").locale(this.$l).fromNow(!s3);
  18556. }, y3.valueOf = function() {
  18557. return this.asMilliseconds();
  18558. }, y3.milliseconds = function() {
  18559. return this.get("milliseconds");
  18560. }, y3.asMilliseconds = function() {
  18561. return this.as("milliseconds");
  18562. }, y3.seconds = function() {
  18563. return this.get("seconds");
  18564. }, y3.asSeconds = function() {
  18565. return this.as("seconds");
  18566. }, y3.minutes = function() {
  18567. return this.get("minutes");
  18568. }, y3.asMinutes = function() {
  18569. return this.as("minutes");
  18570. }, y3.hours = function() {
  18571. return this.get("hours");
  18572. }, y3.asHours = function() {
  18573. return this.as("hours");
  18574. }, y3.days = function() {
  18575. return this.get("days");
  18576. }, y3.asDays = function() {
  18577. return this.as("days");
  18578. }, y3.weeks = function() {
  18579. return this.get("weeks");
  18580. }, y3.asWeeks = function() {
  18581. return this.as("weeks");
  18582. }, y3.months = function() {
  18583. return this.get("months");
  18584. }, y3.asMonths = function() {
  18585. return this.as("months");
  18586. }, y3.years = function() {
  18587. return this.get("years");
  18588. }, y3.asYears = function() {
  18589. return this.as("years");
  18590. }, l3;
  18591. }(), p2 = function(t3, s3, n3) {
  18592. return t3.add(s3.years() * n3, "y").add(s3.months() * n3, "M").add(s3.days() * n3, "d").add(s3.hours() * n3, "h").add(s3.minutes() * n3, "m").add(s3.seconds() * n3, "s").add(s3.milliseconds() * n3, "ms");
  18593. };
  18594. return function(n3, i3, e3) {
  18595. t2 = e3, s2 = e3().$utils(), e3.duration = function(t3, s3) {
  18596. var n4 = e3.locale();
  18597. return f2(t3, { $l: n4 }, s3);
  18598. }, e3.isDuration = c2;
  18599. var r3 = i3.prototype.add, o3 = i3.prototype.subtract;
  18600. i3.prototype.add = function(t3, s3) {
  18601. return c2(t3) ? p2(this, t3, 1) : r3.bind(this)(t3, s3);
  18602. }, i3.prototype.subtract = function(t3, s3) {
  18603. return c2(t3) ? p2(this, t3, -1) : o3.bind(this)(t3, s3);
  18604. };
  18605. };
  18606. });
  18607. })(duration$1);
  18608. var durationExports = duration$1.exports;
  18609. const duration = /* @__PURE__ */ getDefaultExportFromCjs(durationExports);
  18610. var zhCn = { exports: {} };
  18611. (function(module, exports) {
  18612. !function(e2, _2) {
  18613. module.exports = _2(dayjs_minExports);
  18614. }(commonjsGlobal, function(e2) {
  18615. function _2(e3) {
  18616. return e3 && "object" == typeof e3 && "default" in e3 ? e3 : { default: e3 };
  18617. }
  18618. var t2 = _2(e2), d2 = { name: "zh-cn", weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"), weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"), weekdaysMin: "日_一_二_三_四_五_六".split("_"), months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"), monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"), ordinal: function(e3, _3) {
  18619. return "W" === _3 ? e3 + "周" : e3 + "日";
  18620. }, weekStart: 1, yearStart: 4, formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "YYYY/MM/DD", LL: "YYYY年M月D日", LLL: "YYYY年M月D日Ah点mm分", LLLL: "YYYY年M月D日ddddAh点mm分", l: "YYYY/M/D", ll: "YYYY年M月D日", lll: "YYYY年M月D日 HH:mm", llll: "YYYY年M月D日dddd HH:mm" }, relativeTime: { future: "%s内", past: "%s前", s: "几秒", m: "1 分钟", mm: "%d 分钟", h: "1 小时", hh: "%d 小时", d: "1 天", dd: "%d 天", M: "1 个月", MM: "%d 个月", y: "1 年", yy: "%d 年" }, meridiem: function(e3, _3) {
  18621. var t3 = 100 * e3 + _3;
  18622. return t3 < 600 ? "凌晨" : t3 < 900 ? "早上" : t3 < 1100 ? "上午" : t3 < 1300 ? "中午" : t3 < 1800 ? "下午" : "晚上";
  18623. } };
  18624. return t2.default.locale(d2, null, true), d2;
  18625. });
  18626. })(zhCn);
  18627. dayjs.locale("zh-cn");
  18628. dayjs.extend(relativeTime);
  18629. dayjs.extend(duration);
  18630. const sheep = {
  18631. $api,
  18632. $store,
  18633. $url,
  18634. $router,
  18635. $platform: _platform,
  18636. $helper,
  18637. $zIndex: zIndex
  18638. };
  18639. async function ShoproInit() {
  18640. await $store("app").init();
  18641. _platform.load();
  18642. }
  18643. const sheep$1 = sheep;
  18644. const _export_sfc = (sfc, props) => {
  18645. const target = sfc.__vccOpts || sfc;
  18646. for (const [key, val] of props) {
  18647. target[key] = val;
  18648. }
  18649. return target;
  18650. };
  18651. const _sfc_main$3v = {
  18652. __name: "su-video",
  18653. props: {
  18654. moveX: {
  18655. type: [Number],
  18656. default: 0
  18657. },
  18658. // 下标索引
  18659. uid: {
  18660. type: [Number, String],
  18661. default: 0
  18662. },
  18663. // 视频高度
  18664. height: {
  18665. type: Number,
  18666. default: 300
  18667. },
  18668. // 视频宽度
  18669. width: {
  18670. type: Number,
  18671. default: 750
  18672. },
  18673. // 指定视频初始播放位置,单位为秒(s)
  18674. initialTime: {
  18675. type: Number,
  18676. default: 1
  18677. },
  18678. src: {
  18679. type: String,
  18680. default: ""
  18681. },
  18682. poster: {
  18683. type: String,
  18684. default: "https://img1.baidu.com/it/u=1601695551,235775011&fm=26&fmt=auto"
  18685. },
  18686. autoplay: {
  18687. type: Boolean,
  18688. default: false
  18689. }
  18690. },
  18691. emits: ["videoTimeupdate"],
  18692. setup(__props, { expose: __expose, emit: __emit }) {
  18693. const vm = vue.getCurrentInstance();
  18694. const state = vue.reactive({
  18695. enableProgressGesture: true,
  18696. // 手势滑动
  18697. showModal: false
  18698. // 弹框
  18699. });
  18700. const props = __props;
  18701. const emits = __emit;
  18702. const timeupdate = (e2) => {
  18703. emits("videoTimeupdate", e2);
  18704. };
  18705. const videoErrorCallback = (e2) => {
  18706. uni.showToast({
  18707. title: JSON.stringify(e2),
  18708. icon: "none"
  18709. });
  18710. formatAppLog("log", "at sheep/ui/su-video/su-video.vue:114", "视频错误信息:", e2.target.errMsg);
  18711. };
  18712. const play = () => {
  18713. formatAppLog("log", "at sheep/ui/su-video/su-video.vue:119", "视频开始");
  18714. };
  18715. const pause = () => {
  18716. formatAppLog("log", "at sheep/ui/su-video/su-video.vue:123", "视频暂停");
  18717. };
  18718. const end = () => {
  18719. formatAppLog("log", "at sheep/ui/su-video/su-video.vue:127", "视频结束");
  18720. };
  18721. const startPlay = () => {
  18722. vue.nextTick(() => {
  18723. const video = uni.createVideoContext(`sVideo${props.index}`, vm);
  18724. video.play();
  18725. });
  18726. };
  18727. const pausePlay = () => {
  18728. const video = uni.createVideoContext(`sVideo${props.index}`, vm);
  18729. video.pause();
  18730. };
  18731. const beforePlay = () => {
  18732. uni.getNetworkType({
  18733. success: (res) => {
  18734. res.networkType;
  18735. startPlay();
  18736. }
  18737. });
  18738. };
  18739. __expose({
  18740. pausePlay
  18741. });
  18742. const __returned__ = { vm, state, props, emits, timeupdate, videoErrorCallback, play, pause, end, startPlay, pausePlay, beforePlay, reactive: vue.reactive, nextTick: vue.nextTick, getCurrentInstance: vue.getCurrentInstance, get sheep() {
  18743. return sheep$1;
  18744. } };
  18745. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  18746. return __returned__;
  18747. }
  18748. };
  18749. function _sfc_render$3u(_ctx, _cache, $props, $setup, $data, $options) {
  18750. return vue.openBlock(), vue.createElementBlock("view", { class: "ui-video-wrap" }, [
  18751. vue.createElementVNode("video", {
  18752. id: `sVideo${$props.uid}`,
  18753. class: "radius",
  18754. style: vue.normalizeStyle([{ height: $props.height + "rpx" }]),
  18755. src: $props.src,
  18756. controls: "",
  18757. "object-fit": "contain",
  18758. "enable-progress-gesture": $setup.state.enableProgressGesture,
  18759. "initial-time": $props.initialTime,
  18760. "x5-video-player-type": "h5",
  18761. "x-webkit-airplay": "allow",
  18762. "webkit-playsinline": "true",
  18763. onError: $setup.videoErrorCallback,
  18764. onTimeupdate: $setup.timeupdate,
  18765. onPlay: $setup.play,
  18766. onPause: $setup.pause,
  18767. onEnded: $setup.end,
  18768. poster: $props.poster,
  18769. autoplay: $props.autoplay
  18770. }, [
  18771. vue.createElementVNode(
  18772. "cover-view",
  18773. {
  18774. style: vue.normalizeStyle({ transform: "translateX(" + $props.moveX + "px)" })
  18775. },
  18776. null,
  18777. 4
  18778. /* STYLE */
  18779. )
  18780. ], 44, ["id", "src", "enable-progress-gesture", "initial-time", "poster", "autoplay"])
  18781. ]);
  18782. }
  18783. const __easycom_0$t = /* @__PURE__ */ _export_sfc(_sfc_main$3v, [["render", _sfc_render$3u], ["__scopeId", "data-v-f4b9589e"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/ui/su-video/su-video.vue"]]);
  18784. const _sfc_main$3u = {
  18785. __name: "su-swiper",
  18786. props: {
  18787. circular: {
  18788. type: Boolean,
  18789. default: true
  18790. },
  18791. autoplay: {
  18792. type: Boolean,
  18793. default: false
  18794. },
  18795. interval: {
  18796. type: Number,
  18797. default: 3e3
  18798. },
  18799. duration: {
  18800. type: Number,
  18801. default: 500
  18802. },
  18803. mode: {
  18804. type: String,
  18805. default: "default"
  18806. },
  18807. imageMode: {
  18808. type: String,
  18809. default: "scaleToFill"
  18810. },
  18811. list: {
  18812. type: Array,
  18813. default() {
  18814. return [];
  18815. }
  18816. },
  18817. dotStyle: {
  18818. type: String,
  18819. default: "long"
  18820. //default long tag
  18821. },
  18822. dotCur: {
  18823. type: String,
  18824. default: "ss-bg-opactity-block"
  18825. },
  18826. bg: {
  18827. type: String,
  18828. default: "bg-none"
  18829. },
  18830. height: {
  18831. type: Number,
  18832. default: 0
  18833. },
  18834. imgHeight: {
  18835. type: Number,
  18836. default: 0
  18837. },
  18838. imgTopRadius: {
  18839. type: Number,
  18840. default: 0
  18841. },
  18842. imgBottomRadius: {
  18843. type: Number,
  18844. default: 0
  18845. },
  18846. isPreview: {
  18847. type: Boolean,
  18848. default: false
  18849. },
  18850. seizeHeight: {
  18851. type: Number,
  18852. default: 200
  18853. }
  18854. },
  18855. setup(__props, { expose: __expose }) {
  18856. __expose();
  18857. const state = vue.reactive({
  18858. imgHeight: 0,
  18859. cur: 0,
  18860. moveX: 0,
  18861. videoPlaySataus: false,
  18862. heightList: []
  18863. });
  18864. const refs = vue.reactive({
  18865. videoRef: {}
  18866. });
  18867. const props = __props;
  18868. const swiperChange = (e2) => {
  18869. if (e2.detail.source !== "touch" && e2.detail.source !== "autoplay")
  18870. return;
  18871. state.cur = e2.detail.current;
  18872. state.videoPlaySataus = false;
  18873. if (props.list[state.cur].type === "video") {
  18874. refs.videoRef[`video_${state.cur}`].pausePlay();
  18875. }
  18876. };
  18877. const onSwiperItem = (item) => {
  18878. if (item.type === "video") {
  18879. state.videoPlaySataus = true;
  18880. } else {
  18881. if (item.urlParams && item.urlParams.title) {
  18882. sheep$1.$router.go(item.url, { title: item.urlParams.title });
  18883. } else {
  18884. sheep$1.$router.go(item.url);
  18885. }
  18886. onPreview();
  18887. }
  18888. };
  18889. const onPreview = () => {
  18890. if (!props.isPreview)
  18891. return;
  18892. let previewImage = lodashExports.clone(props.list);
  18893. previewImage.forEach((item, index2) => {
  18894. if (item.type === "video") {
  18895. previewImage.splice(index2, 1);
  18896. }
  18897. });
  18898. uni.previewImage({
  18899. urls: previewImage.length < 1 ? [props.src] : previewImage.reduce((pre, cur) => {
  18900. pre.push(cur.src);
  18901. return pre;
  18902. }, []),
  18903. current: state.cur
  18904. // longPressActions: {
  18905. // itemList: ['发送给朋友', '保存图片', '收藏'],
  18906. // success: function (data) {
  18907. // __f__('log','at sheep/ui/su-swiper/su-swiper.vue:222','选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
  18908. // },
  18909. // fail: function (err) {
  18910. // __f__('log','at sheep/ui/su-swiper/su-swiper.vue:225',err.errMsg);
  18911. // },
  18912. // },
  18913. });
  18914. };
  18915. const transition = (e2) => {
  18916. state.moveX = e2.detail.dx;
  18917. };
  18918. const animationfinish = (e2) => {
  18919. state.moveX = 0;
  18920. };
  18921. const videoTimeupdate = (e2) => {
  18922. props.list[state.cur].currentTime = e2.detail.currentTime;
  18923. };
  18924. const customStyle = vue.computed(() => {
  18925. let height;
  18926. if (props.height !== 0) {
  18927. height = props.height;
  18928. }
  18929. if (props.height === 0) {
  18930. if (state.imgHeight !== 0) {
  18931. height = state.imgHeight;
  18932. } else if (props.seizeHeight !== 0) {
  18933. height = props.seizeHeight;
  18934. }
  18935. }
  18936. return {
  18937. height: height + "rpx"
  18938. };
  18939. });
  18940. function onImgLoad(e2) {
  18941. if (props.height === 0) {
  18942. let newHeight = e2.detail.height / e2.detail.width * 750;
  18943. if (state.imgHeight < newHeight) {
  18944. state.imgHeight = newHeight;
  18945. }
  18946. }
  18947. }
  18948. const __returned__ = { state, refs, props, swiperChange, onSwiperItem, onPreview, transition, animationfinish, videoTimeupdate, customStyle, onImgLoad, reactive: vue.reactive, computed: vue.computed, get sheep() {
  18949. return sheep$1;
  18950. }, get clone() {
  18951. return lodashExports.clone;
  18952. } };
  18953. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  18954. return __returned__;
  18955. }
  18956. };
  18957. function _sfc_render$3t(_ctx, _cache, $props, $setup, $data, $options) {
  18958. const _component_su_video = resolveEasycom(vue.resolveDynamicComponent("su-video"), __easycom_0$t);
  18959. return vue.openBlock(), vue.createElementBlock("view", null, [
  18960. vue.createElementVNode(
  18961. "view",
  18962. {
  18963. class: vue.normalizeClass(["ui-swiper", [$setup.props.mode, $setup.props.bg, $setup.props.ui]])
  18964. },
  18965. [
  18966. vue.createElementVNode("swiper", {
  18967. circular: $setup.props.circular,
  18968. current: $setup.state.cur,
  18969. autoplay: $setup.props.autoplay && !$setup.state.videoPlaySataus,
  18970. interval: $setup.props.interval,
  18971. duration: $setup.props.duration,
  18972. onTransition: $setup.transition,
  18973. onAnimationfinish: $setup.animationfinish,
  18974. style: vue.normalizeStyle($setup.customStyle),
  18975. onChange: $setup.swiperChange
  18976. }, [
  18977. (vue.openBlock(true), vue.createElementBlock(
  18978. vue.Fragment,
  18979. null,
  18980. vue.renderList($setup.props.list, (item, index2) => {
  18981. return vue.openBlock(), vue.createElementBlock("swiper-item", {
  18982. class: vue.normalizeClass(["swiper-item", { cur: $setup.state.cur == index2 }]),
  18983. key: index2,
  18984. onClick: ($event) => $setup.onSwiperItem(item)
  18985. }, [
  18986. vue.createElementVNode("view", { class: "ui-swiper-main" }, [
  18987. item.type === "image" ? (vue.openBlock(), vue.createElementBlock("image", {
  18988. key: 0,
  18989. class: "swiper-image",
  18990. mode: $setup.props.imageMode,
  18991. src: item.src,
  18992. width: "100%",
  18993. height: "100%",
  18994. onLoad: $setup.onImgLoad
  18995. }, null, 40, ["mode", "src"])) : (vue.openBlock(), vue.createBlock(_component_su_video, {
  18996. key: 1,
  18997. ref_for: true,
  18998. ref: (el) => $setup.refs.videoRef[`video_${index2}`] = el,
  18999. poster: $setup.sheep.$url.cdn(item.poster),
  19000. src: $setup.sheep.$url.cdn(item.src),
  19001. index: index2,
  19002. moveX: $setup.state.moveX,
  19003. initialTime: item.currentTime || 0,
  19004. height: $props.seizeHeight,
  19005. onVideoTimeupdate: $setup.videoTimeupdate
  19006. }, null, 8, ["poster", "src", "index", "moveX", "initialTime", "height"]))
  19007. ])
  19008. ], 10, ["onClick"]);
  19009. }),
  19010. 128
  19011. /* KEYED_FRAGMENT */
  19012. ))
  19013. ], 44, ["circular", "current", "autoplay", "interval", "duration"]),
  19014. !$setup.state.videoPlaySataus ? (vue.openBlock(), vue.createElementBlock(
  19015. vue.Fragment,
  19016. { key: 0 },
  19017. [
  19018. $setup.props.dotStyle != "tag" ? (vue.openBlock(), vue.createElementBlock(
  19019. "view",
  19020. {
  19021. key: 0,
  19022. class: vue.normalizeClass(["ui-swiper-dot", $setup.props.dotStyle])
  19023. },
  19024. [
  19025. (vue.openBlock(true), vue.createElementBlock(
  19026. vue.Fragment,
  19027. null,
  19028. vue.renderList($setup.props.list, (item, index2) => {
  19029. return vue.openBlock(), vue.createElementBlock(
  19030. "view",
  19031. {
  19032. class: vue.normalizeClass(["line-box", [$setup.state.cur == index2 ? "cur" : "", $setup.props.dotCur]]),
  19033. key: index2
  19034. },
  19035. null,
  19036. 2
  19037. /* CLASS */
  19038. );
  19039. }),
  19040. 128
  19041. /* KEYED_FRAGMENT */
  19042. ))
  19043. ],
  19044. 2
  19045. /* CLASS */
  19046. )) : vue.createCommentVNode("v-if", true),
  19047. $setup.props.dotStyle == "tag" ? (vue.openBlock(), vue.createElementBlock(
  19048. "view",
  19049. {
  19050. key: 1,
  19051. class: vue.normalizeClass(["ui-swiper-dot", $setup.props.dotStyle])
  19052. },
  19053. [
  19054. vue.createElementVNode(
  19055. "view",
  19056. {
  19057. class: vue.normalizeClass(["ui-tag radius-lg", [$setup.props.dotCur]]),
  19058. style: { "pointer-events": "none", "padding": "0 10rpx" }
  19059. },
  19060. [
  19061. vue.createElementVNode(
  19062. "view",
  19063. { style: { "transform": "scale(0.7)" } },
  19064. vue.toDisplayString($setup.state.cur + 1) + " / " + vue.toDisplayString($setup.props.list.length),
  19065. 1
  19066. /* TEXT */
  19067. )
  19068. ],
  19069. 2
  19070. /* CLASS */
  19071. )
  19072. ],
  19073. 2
  19074. /* CLASS */
  19075. )) : vue.createCommentVNode("v-if", true)
  19076. ],
  19077. 64
  19078. /* STABLE_FRAGMENT */
  19079. )) : vue.createCommentVNode("v-if", true)
  19080. ],
  19081. 2
  19082. /* CLASS */
  19083. )
  19084. ]);
  19085. }
  19086. const __easycom_1$d = /* @__PURE__ */ _export_sfc(_sfc_main$3u, [["render", _sfc_render$3t], ["__scopeId", "data-v-b37b3c30"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/ui/su-swiper/su-swiper.vue"]]);
  19087. const _sfc_main$3t = {
  19088. __name: "s-image-banner",
  19089. props: {
  19090. data: {
  19091. type: Object,
  19092. default: () => ({})
  19093. },
  19094. styles: {
  19095. type: Object,
  19096. default: () => ({})
  19097. },
  19098. height: {
  19099. type: Number
  19100. }
  19101. },
  19102. setup(__props, { expose: __expose }) {
  19103. __expose();
  19104. const props = __props;
  19105. const imgList = vue.computed(
  19106. () => props.data.items.map((item) => {
  19107. const src = item.type === "img" ? item.imgUrl : item.videoUrl;
  19108. return {
  19109. ...item,
  19110. type: item.type === "img" ? "image" : "video",
  19111. src: sheep$1.$url.cdn(src),
  19112. poster: sheep$1.$url.cdn(item.imgUrl)
  19113. };
  19114. })
  19115. );
  19116. const __returned__ = { props, imgList, computed: vue.computed, get sheep() {
  19117. return sheep$1;
  19118. } };
  19119. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  19120. return __returned__;
  19121. }
  19122. };
  19123. function _sfc_render$3s(_ctx, _cache, $props, $setup, $data, $options) {
  19124. const _component_su_swiper = resolveEasycom(vue.resolveDynamicComponent("su-swiper"), __easycom_1$d);
  19125. return vue.openBlock(), vue.createBlock(_component_su_swiper, {
  19126. list: $setup.imgList,
  19127. dotStyle: $props.data.indicator === "dot" ? "long" : "tag",
  19128. imageMode: "scaleToFill",
  19129. dotCur: "bg-mask-40",
  19130. seizeHeight: 300,
  19131. autoplay: $props.data.autoplay,
  19132. interval: $props.data.interval * 1e3,
  19133. mode: $props.data.type,
  19134. height: $props.height
  19135. }, null, 8, ["list", "dotStyle", "autoplay", "interval", "mode", "height"]);
  19136. }
  19137. const __easycom_8$1 = /* @__PURE__ */ _export_sfc(_sfc_main$3t, [["render", _sfc_render$3s], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-image-banner/s-image-banner.vue"]]);
  19138. const _sfc_main$3s = {
  19139. name: "su-tabbar-item",
  19140. props: {
  19141. customStyle: {
  19142. type: [Object, String],
  19143. default: () => ({})
  19144. },
  19145. customClass: {
  19146. type: String,
  19147. default: ""
  19148. },
  19149. // 跳转的页面路径
  19150. url: {
  19151. type: String,
  19152. default: ""
  19153. },
  19154. // 页面跳转的类型
  19155. linkType: {
  19156. type: String,
  19157. default: "navigateTo"
  19158. },
  19159. // item标签的名称,作为与u-tabbar的value参数匹配的标识符
  19160. name: {
  19161. type: [String, Number, null],
  19162. default: ""
  19163. },
  19164. // uView内置图标或者绝对路径的图片
  19165. icon: {
  19166. icon: String,
  19167. default: ""
  19168. },
  19169. // 右上角的角标提示信息
  19170. badge: {
  19171. type: [String, Number, null],
  19172. default: ""
  19173. },
  19174. // 是否显示圆点,将会覆盖badge参数
  19175. dot: {
  19176. type: Boolean,
  19177. default: false
  19178. },
  19179. // 描述文本
  19180. text: {
  19181. type: String,
  19182. default: ""
  19183. },
  19184. // 控制徽标的位置,对象或者字符串形式,可以设置top和right属性
  19185. badgeStyle: {
  19186. type: [Object, String],
  19187. default: ""
  19188. },
  19189. isCenter: {
  19190. type: Boolean,
  19191. default: false
  19192. },
  19193. centerImage: {
  19194. type: String,
  19195. default: ""
  19196. }
  19197. },
  19198. data() {
  19199. return {
  19200. isActive: false,
  19201. // 是否处于激活状态
  19202. addStyle,
  19203. parentData: {
  19204. value: null,
  19205. activeColor: "",
  19206. color: ""
  19207. },
  19208. parent: {}
  19209. };
  19210. },
  19211. setup() {
  19212. const { t: t2 } = useI18n();
  19213. return {
  19214. t: t2
  19215. };
  19216. },
  19217. created() {
  19218. this.init();
  19219. },
  19220. methods: {
  19221. getParentData(parentName = "") {
  19222. if (!this.parent)
  19223. this.parent = {};
  19224. this.parent = $parent.call(this, parentName);
  19225. if (this.parent.children) {
  19226. this.parent.children.indexOf(this) === -1 && this.parent.children.push(this);
  19227. }
  19228. if (this.parent && this.parentData) {
  19229. Object.keys(this.parentData).map((key) => {
  19230. this.parentData[key] = this.parent[key];
  19231. });
  19232. }
  19233. },
  19234. init() {
  19235. this.updateParentData();
  19236. if (!this.parent) {
  19237. formatAppLog("log", "at sheep/ui/su-tabbar-item/su-tabbar-item.vue:168", "u-tabbar-item必须搭配u-tabbar组件使用");
  19238. }
  19239. const index2 = this.parent.children.indexOf(this);
  19240. this.isActive = (this.name.split("?")[0] || index2) === this.parentData.value;
  19241. },
  19242. updateParentData() {
  19243. this.getParentData("su-tabbar");
  19244. },
  19245. // 此方法将会被父组件u-tabbar调用
  19246. updateFromParent() {
  19247. this.init();
  19248. },
  19249. clickHandler() {
  19250. this.$nextTick(() => {
  19251. const index2 = this.parent.children.indexOf(this);
  19252. const name2 = this.name || index2;
  19253. if (name2 !== this.parent.value) {
  19254. this.parent.$emit("change", name2);
  19255. }
  19256. this.$emit("click", name2);
  19257. });
  19258. }
  19259. }
  19260. };
  19261. function _sfc_render$3r(_ctx, _cache, $props, $setup, $data, $options) {
  19262. return vue.openBlock(), vue.createElementBlock(
  19263. "view",
  19264. {
  19265. class: "u-tabbar-item",
  19266. style: vue.normalizeStyle([$data.addStyle($props.customStyle)])
  19267. },
  19268. [
  19269. $props.isCenter ? (vue.openBlock(), vue.createElementBlock("view", {
  19270. key: 0,
  19271. class: "tabbar-center-item"
  19272. }, [
  19273. vue.createElementVNode("image", {
  19274. class: "center-image",
  19275. src: $props.centerImage,
  19276. mode: "aspectFill"
  19277. }, null, 8, ["src"])
  19278. ])) : (vue.openBlock(), vue.createElementBlock(
  19279. vue.Fragment,
  19280. { key: 1 },
  19281. [
  19282. vue.createElementVNode("view", { class: "u-tabbar-item__icon" }, [
  19283. $props.icon ? (vue.openBlock(), vue.createElementBlock("image", {
  19284. key: 0,
  19285. name: $props.icon,
  19286. color: $data.isActive ? $data.parentData.activeColor : $data.parentData.color,
  19287. size: 20
  19288. }, null, 8, ["name", "color"])) : (vue.openBlock(), vue.createElementBlock(
  19289. vue.Fragment,
  19290. { key: 1 },
  19291. [
  19292. $data.isActive ? vue.renderSlot(_ctx.$slots, "active-icon", { key: 0 }, void 0, true) : vue.renderSlot(_ctx.$slots, "inactive-icon", { key: 1 }, void 0, true)
  19293. ],
  19294. 64
  19295. /* STABLE_FRAGMENT */
  19296. )),
  19297. vue.createCommentVNode(` <u-badge
  19298. absolute
  19299. :offset="[0, dot ? '34rpx' : badge > 9 ? '14rpx' : '20rpx']"
  19300. :customStyle="badgeStyle"
  19301. :isDot="dot"
  19302. :value="badge || (dot ? 1 : null)"
  19303. :show="dot || badge > 0"
  19304. ></u-badge> `)
  19305. ]),
  19306. vue.renderSlot(_ctx.$slots, "text", {}, () => [
  19307. vue.createElementVNode(
  19308. "text",
  19309. {
  19310. class: "u-tabbar-item__text",
  19311. style: vue.normalizeStyle({
  19312. color: $data.isActive ? $data.parentData.activeColor : $data.parentData.color
  19313. })
  19314. },
  19315. vue.toDisplayString($props.text),
  19316. 5
  19317. /* TEXT, STYLE */
  19318. )
  19319. ], true)
  19320. ],
  19321. 64
  19322. /* STABLE_FRAGMENT */
  19323. ))
  19324. ],
  19325. 4
  19326. /* STYLE */
  19327. );
  19328. }
  19329. const __easycom_0$s = /* @__PURE__ */ _export_sfc(_sfc_main$3s, [["render", _sfc_render$3r], ["__scopeId", "data-v-a62e13d6"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/ui/su-tabbar-item/su-tabbar-item.vue"]]);
  19330. const _sfc_main$3r = {
  19331. name: "su-tabbar",
  19332. props: {
  19333. customStyle: {
  19334. type: [Object, String],
  19335. default: () => ({})
  19336. },
  19337. customClass: {
  19338. type: String,
  19339. default: ""
  19340. },
  19341. // 跳转的页面路径
  19342. url: {
  19343. type: String,
  19344. default: ""
  19345. },
  19346. // 页面跳转的类型
  19347. linkType: {
  19348. type: String,
  19349. default: "navigateTo"
  19350. },
  19351. // 当前匹配项的name
  19352. value: {
  19353. type: [String, Number, null],
  19354. default: ""
  19355. },
  19356. // 是否为iPhoneX留出底部安全距离
  19357. safeAreaInsetBottom: {
  19358. type: Boolean,
  19359. default: true
  19360. },
  19361. // 是否显示上方边框
  19362. border: {
  19363. type: Boolean,
  19364. default: true
  19365. },
  19366. // 元素层级z-index
  19367. zIndex: {
  19368. type: [String, Number],
  19369. default: 10
  19370. },
  19371. // 选中标签的颜色
  19372. activeColor: {
  19373. type: String,
  19374. default: "#1989fa"
  19375. },
  19376. // 未选中标签的颜色
  19377. inactiveColor: {
  19378. type: String,
  19379. default: "#7d7e80"
  19380. },
  19381. // 是否固定在底部
  19382. fixed: {
  19383. type: Boolean,
  19384. default: true
  19385. },
  19386. // fixed定位固定在底部时,是否生成一个等高元素防止塌陷
  19387. placeholder: {
  19388. type: Boolean,
  19389. default: true
  19390. },
  19391. midTabBar: {
  19392. type: Boolean,
  19393. default: false
  19394. }
  19395. },
  19396. data() {
  19397. return {
  19398. placeholderHeight: 0,
  19399. safeBottomHeight: sheep$1.$platform.device.safeAreaInsets.bottom
  19400. };
  19401. },
  19402. computed: {
  19403. tabbarStyle() {
  19404. const style = {
  19405. zIndex: this.zIndex
  19406. };
  19407. return deepMerge(style, addStyle(this.customStyle));
  19408. },
  19409. // 监听多个参数的变化,通过在computed执行对应的操作
  19410. updateChild() {
  19411. return [this.value, this.activeColor, this.inactiveColor];
  19412. },
  19413. color() {
  19414. return this.inactiveColor;
  19415. },
  19416. updatePlaceholder() {
  19417. return [this.fixed, this.placeholder];
  19418. }
  19419. },
  19420. watch: {
  19421. updateChild() {
  19422. this.updateChildren();
  19423. },
  19424. updatePlaceholder() {
  19425. this.setPlaceholderHeight();
  19426. }
  19427. },
  19428. created() {
  19429. this.children = [];
  19430. },
  19431. mounted() {
  19432. this.setPlaceholderHeight();
  19433. },
  19434. methods: {
  19435. updateChildren() {
  19436. this.children.length && this.children.map((child) => child.updateFromParent());
  19437. },
  19438. getRect(selector, all) {
  19439. return new Promise((resolve) => {
  19440. uni.createSelectorQuery().in(this)[all ? "selectAll" : "select"](selector).boundingClientRect((rect) => {
  19441. if (all && Array.isArray(rect) && rect.length) {
  19442. resolve(rect);
  19443. }
  19444. if (!all && rect) {
  19445. resolve(rect);
  19446. }
  19447. }).exec();
  19448. });
  19449. },
  19450. // 设置用于防止塌陷元素的高度
  19451. async setPlaceholderHeight() {
  19452. if (!this.fixed || !this.placeholder)
  19453. return;
  19454. await sleep(20);
  19455. this.getRect(".u-tabbar__content").then(({
  19456. height = 50
  19457. }) => {
  19458. this.placeholderHeight = height;
  19459. });
  19460. }
  19461. }
  19462. };
  19463. function _sfc_render$3q(_ctx, _cache, $props, $setup, $data, $options) {
  19464. return vue.openBlock(), vue.createElementBlock("view", { class: "u-tabbar" }, [
  19465. vue.createElementVNode(
  19466. "view",
  19467. {
  19468. class: vue.normalizeClass(["u-tabbar__content", [$props.border && "u-border-top", $props.fixed && "u-tabbar--fixed", { "mid-tabbar": $props.midTabBar }]]),
  19469. ref: "u-tabbar__content",
  19470. onTouchmove: _cache[0] || (_cache[0] = vue.withModifiers(() => {
  19471. }, ["stop", "prevent"])),
  19472. style: vue.normalizeStyle([$options.tabbarStyle])
  19473. },
  19474. [
  19475. vue.createElementVNode("view", { class: "u-tabbar__content__item-wrapper" }, [
  19476. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  19477. ]),
  19478. $props.safeAreaInsetBottom ? (vue.openBlock(), vue.createElementBlock(
  19479. "view",
  19480. {
  19481. key: 0,
  19482. style: vue.normalizeStyle([{ height: $data.safeBottomHeight + "px" }])
  19483. },
  19484. null,
  19485. 4
  19486. /* STYLE */
  19487. )) : vue.createCommentVNode("v-if", true)
  19488. ],
  19489. 38
  19490. /* CLASS, STYLE, NEED_HYDRATION */
  19491. ),
  19492. $props.placeholder ? (vue.openBlock(), vue.createElementBlock(
  19493. "view",
  19494. {
  19495. key: 0,
  19496. class: "u-tabbar__placeholder",
  19497. style: vue.normalizeStyle({
  19498. height: $data.placeholderHeight + "px"
  19499. })
  19500. },
  19501. null,
  19502. 4
  19503. /* STYLE */
  19504. )) : vue.createCommentVNode("v-if", true)
  19505. ]);
  19506. }
  19507. const __easycom_1$c = /* @__PURE__ */ _export_sfc(_sfc_main$3r, [["render", _sfc_render$3q], ["__scopeId", "data-v-b5af0eb7"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/ui/su-tabbar/su-tabbar.vue"]]);
  19508. const _sfc_main$3q = {
  19509. __name: "s-tabbar",
  19510. props: {
  19511. path: {
  19512. type: String,
  19513. default: ""
  19514. },
  19515. tabbar: {
  19516. type: Object,
  19517. default: () => {
  19518. }
  19519. }
  19520. },
  19521. setup(__props, { expose: __expose }) {
  19522. __expose();
  19523. const props = __props;
  19524. const tabbar = vue.computed(() => {
  19525. var _a2;
  19526. if (props.tabbar)
  19527. return props.tabbar;
  19528. return (_a2 = sheep$1.$store("app").template.basic) == null ? void 0 : _a2.tabbar;
  19529. });
  19530. const tabbarStyle = vue.computed(() => {
  19531. const backgroundStyle = tabbar.value.style;
  19532. if (backgroundStyle.bgType === "color") {
  19533. return {
  19534. background: backgroundStyle.bgColor
  19535. };
  19536. }
  19537. if (backgroundStyle.bgType === "img")
  19538. return {
  19539. background: `url(${sheep$1.$url.cdn(
  19540. backgroundStyle.bgImg
  19541. )}) no-repeat top center / 100% auto`
  19542. };
  19543. });
  19544. const getTabbarCenter = (index2) => {
  19545. if (vue.unref(tabbar).mode !== 2)
  19546. return false;
  19547. return vue.unref(tabbar).items % 2 > 0 ? Math.ceil(vue.unref(tabbar).items.length / 2) === index2 + 1 : false;
  19548. };
  19549. const __returned__ = { props, tabbar, tabbarStyle, getTabbarCenter, computed: vue.computed, unref: vue.unref, get sheep() {
  19550. return sheep$1;
  19551. } };
  19552. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  19553. return __returned__;
  19554. }
  19555. };
  19556. function _sfc_render$3p(_ctx, _cache, $props, $setup, $data, $options) {
  19557. var _a2, _b2;
  19558. const _component_su_tabbar_item = resolveEasycom(vue.resolveDynamicComponent("su-tabbar-item"), __easycom_0$s);
  19559. const _component_su_tabbar = resolveEasycom(vue.resolveDynamicComponent("su-tabbar"), __easycom_1$c);
  19560. return ((_b2 = (_a2 = $setup.tabbar) == null ? void 0 : _a2.items) == null ? void 0 : _b2.length) > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  19561. key: 0,
  19562. class: "u-page__item"
  19563. }, [
  19564. vue.createVNode(_component_su_tabbar, {
  19565. value: $props.path,
  19566. fixed: true,
  19567. placeholder: true,
  19568. safeAreaInsetBottom: true,
  19569. inactiveColor: $setup.tabbar.style.color,
  19570. activeColor: $setup.tabbar.style.activeColor,
  19571. midTabBar: $setup.tabbar.mode === 2,
  19572. customStyle: $setup.tabbarStyle
  19573. }, {
  19574. default: vue.withCtx(() => [
  19575. (vue.openBlock(true), vue.createElementBlock(
  19576. vue.Fragment,
  19577. null,
  19578. vue.renderList($setup.tabbar.items, (item, index2) => {
  19579. return vue.openBlock(), vue.createBlock(_component_su_tabbar_item, {
  19580. key: item.text,
  19581. text: item.text,
  19582. name: item.url,
  19583. isCenter: $setup.getTabbarCenter(index2),
  19584. centerImage: $setup.sheep.$url.cdn(item.iconUrl),
  19585. onClick: ($event) => $setup.sheep.$router.go(item.url)
  19586. }, {
  19587. "active-icon": vue.withCtx(() => [
  19588. vue.createElementVNode("image", {
  19589. class: "u-page__item__slot-icon",
  19590. src: $setup.sheep.$url.cdn(item.activeIconUrl)
  19591. }, null, 8, ["src"])
  19592. ]),
  19593. "inactive-icon": vue.withCtx(() => [
  19594. vue.createElementVNode("image", {
  19595. class: "u-page__item__slot-icon",
  19596. src: $setup.sheep.$url.cdn(item.iconUrl)
  19597. }, null, 8, ["src"])
  19598. ]),
  19599. _: 2
  19600. /* DYNAMIC */
  19601. }, 1032, ["text", "name", "isCenter", "centerImage", "onClick"]);
  19602. }),
  19603. 128
  19604. /* KEYED_FRAGMENT */
  19605. ))
  19606. ]),
  19607. _: 1
  19608. /* STABLE */
  19609. }, 8, ["value", "inactiveColor", "activeColor", "midTabBar", "customStyle"])
  19610. ])) : vue.createCommentVNode("v-if", true);
  19611. }
  19612. const __easycom_3$7 = /* @__PURE__ */ _export_sfc(_sfc_main$3q, [["render", _sfc_render$3p], ["__scopeId", "data-v-434f93ee"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-tabbar/s-tabbar.vue"]]);
  19613. const block0 = (Comp) => {
  19614. (Comp.$wxs || (Comp.$wxs = [])).push("handler");
  19615. (Comp.$wxsModules || (Comp.$wxsModules = {}))["handler"] = "2f992f8c";
  19616. };
  19617. const _sfc_main$3p = {
  19618. name: "node",
  19619. options: {},
  19620. data() {
  19621. return {
  19622. ctrl: {}
  19623. };
  19624. },
  19625. props: {
  19626. name: String,
  19627. attrs: {
  19628. type: Object,
  19629. default() {
  19630. return {};
  19631. }
  19632. },
  19633. childs: Array,
  19634. opts: Array
  19635. },
  19636. components: {},
  19637. mounted() {
  19638. this.$nextTick(() => {
  19639. for (this.root = this.$parent; this.root.$options.name !== "mp-html"; this.root = this.root.$parent)
  19640. ;
  19641. });
  19642. if (this.opts[0]) {
  19643. let i2;
  19644. for (i2 = this.childs.length; i2--; ) {
  19645. if (this.childs[i2].name === "img")
  19646. break;
  19647. }
  19648. if (i2 !== -1) {
  19649. this.observer = uni.createIntersectionObserver(this).relativeToViewport({
  19650. top: 500,
  19651. bottom: 500
  19652. });
  19653. this.observer.observe("._img", (res) => {
  19654. if (res.intersectionRatio) {
  19655. this.$set(this.ctrl, "load", 1);
  19656. this.observer.disconnect();
  19657. }
  19658. });
  19659. }
  19660. }
  19661. },
  19662. beforeDestroy() {
  19663. if (this.observer) {
  19664. this.observer.disconnect();
  19665. }
  19666. },
  19667. methods: {
  19668. /**
  19669. * @description 播放视频事件
  19670. * @param {Event} e
  19671. */
  19672. play(e2) {
  19673. this.root.$emit("play");
  19674. },
  19675. /**
  19676. * @description 图片点击事件
  19677. * @param {Event} e
  19678. */
  19679. imgTap(e2) {
  19680. const node2 = this.childs[e2.currentTarget.dataset.i];
  19681. if (node2.a) {
  19682. this.linkTap(node2.a);
  19683. return;
  19684. }
  19685. if (node2.attrs.ignore)
  19686. return;
  19687. node2.attrs.src = node2.attrs.src || node2.attrs["data-src"];
  19688. this.root.$emit("imgtap", node2.attrs);
  19689. if (this.root.previewImg) {
  19690. uni.previewImage({
  19691. current: parseInt(node2.attrs.i),
  19692. urls: this.root.imgList
  19693. });
  19694. }
  19695. },
  19696. /**
  19697. * @description 图片长按
  19698. */
  19699. imgLongTap(e2) {
  19700. const attrs = this.childs[e2.currentTarget.dataset.i].attrs;
  19701. if (this.opts[3] && !attrs.ignore) {
  19702. uni.showActionSheet({
  19703. itemList: ["保存图片"],
  19704. success: () => {
  19705. const save = (path) => {
  19706. uni.saveImageToPhotosAlbum({
  19707. filePath: path,
  19708. success() {
  19709. uni.showToast({
  19710. title: "保存成功"
  19711. });
  19712. }
  19713. });
  19714. };
  19715. if (this.root.imgList[attrs.i].startsWith("http")) {
  19716. uni.downloadFile({
  19717. url: this.root.imgList[attrs.i],
  19718. success: (res) => save(res.tempFilePath)
  19719. });
  19720. } else {
  19721. save(this.root.imgList[attrs.i]);
  19722. }
  19723. }
  19724. });
  19725. }
  19726. },
  19727. /**
  19728. * @description 图片加载完成事件
  19729. * @param {Event} e
  19730. */
  19731. imgLoad(e2) {
  19732. const i2 = e2.currentTarget.dataset.i;
  19733. if (!this.childs[i2].w) {
  19734. this.$set(this.ctrl, i2, e2.detail.width);
  19735. } else if (this.opts[1] && !this.ctrl[i2] || this.ctrl[i2] === -1) {
  19736. this.$set(this.ctrl, i2, 1);
  19737. }
  19738. this.checkReady();
  19739. },
  19740. /**
  19741. * @description 检查是否所有图片加载完毕
  19742. */
  19743. checkReady() {
  19744. if (!this.root.lazyLoad) {
  19745. this.root._unloadimgs -= 1;
  19746. if (!this.root._unloadimgs) {
  19747. setTimeout(() => {
  19748. this.root.getRect().then((rect) => {
  19749. this.root.$emit("ready", rect);
  19750. }).catch(() => {
  19751. this.root.$emit("ready", {});
  19752. });
  19753. }, 350);
  19754. }
  19755. }
  19756. },
  19757. /**
  19758. * @description 链接点击事件
  19759. * @param {Event} e
  19760. */
  19761. linkTap(e2) {
  19762. const node2 = e2.currentTarget ? this.childs[e2.currentTarget.dataset.i] : {};
  19763. const attrs = node2.attrs || e2;
  19764. const href = attrs.href;
  19765. this.root.$emit("linktap", Object.assign({
  19766. innerText: this.root.getText(node2.children || [])
  19767. // 链接内的文本内容
  19768. }, attrs));
  19769. if (href) {
  19770. if (href[0] === "#") {
  19771. this.root.navigateTo(href.substring(1)).catch(() => {
  19772. });
  19773. } else if (href.split("?")[0].includes("://")) {
  19774. if (this.root.copyLink) {
  19775. plus.runtime.openWeb(href);
  19776. }
  19777. } else {
  19778. uni.navigateTo({
  19779. url: href,
  19780. fail() {
  19781. uni.switchTab({
  19782. url: href,
  19783. fail() {
  19784. }
  19785. });
  19786. }
  19787. });
  19788. }
  19789. }
  19790. },
  19791. /**
  19792. * @description 错误事件
  19793. * @param {Event} e
  19794. */
  19795. mediaError(e2) {
  19796. const i2 = e2.currentTarget.dataset.i;
  19797. const node2 = this.childs[i2];
  19798. if (node2.name === "video" || node2.name === "audio") {
  19799. let index2 = (this.ctrl[i2] || 0) + 1;
  19800. if (index2 > node2.src.length) {
  19801. index2 = 0;
  19802. }
  19803. if (index2 < node2.src.length) {
  19804. this.$set(this.ctrl, i2, index2);
  19805. return;
  19806. }
  19807. } else if (node2.name === "img") {
  19808. if (this.opts[2]) {
  19809. this.$set(this.ctrl, i2, -1);
  19810. }
  19811. this.checkReady();
  19812. }
  19813. if (this.root) {
  19814. this.root.$emit("error", {
  19815. source: node2.name,
  19816. attrs: node2.attrs,
  19817. errMsg: e2.detail.errMsg
  19818. });
  19819. }
  19820. }
  19821. }
  19822. };
  19823. function _sfc_render$3o(_ctx, _cache, $props, $setup, $data, $options) {
  19824. const _component_node = vue.resolveComponent("node", true);
  19825. return vue.openBlock(), vue.createElementBlock("view", {
  19826. id: $props.attrs.id,
  19827. class: vue.normalizeClass("_block _" + $props.name + " " + $props.attrs.class),
  19828. style: vue.normalizeStyle($props.attrs.style)
  19829. }, [
  19830. (vue.openBlock(true), vue.createElementBlock(
  19831. vue.Fragment,
  19832. null,
  19833. vue.renderList($props.childs, (n2, i2) => {
  19834. return vue.openBlock(), vue.createElementBlock(
  19835. vue.Fragment,
  19836. { key: i2 },
  19837. [
  19838. vue.createCommentVNode(" 图片 "),
  19839. vue.createCommentVNode(" 占位图 "),
  19840. n2.name === "img" && !n2.t && ($props.opts[1] && !$data.ctrl[i2] || $data.ctrl[i2] < 0) ? (vue.openBlock(), vue.createElementBlock("image", {
  19841. key: 0,
  19842. class: "_img",
  19843. style: vue.normalizeStyle(n2.attrs.style),
  19844. src: $data.ctrl[i2] < 0 ? $props.opts[2] : $props.opts[1],
  19845. mode: "widthFix"
  19846. }, null, 12, ["src"])) : vue.createCommentVNode("v-if", true),
  19847. vue.createCommentVNode(" 显示图片 "),
  19848. vue.createCommentVNode(" 表格中的图片,使用 rich-text 防止大小不正确 "),
  19849. n2.name === "img" && n2.t ? (vue.openBlock(), vue.createElementBlock("rich-text", {
  19850. key: 1,
  19851. style: vue.normalizeStyle("display:" + n2.t),
  19852. nodes: "<img class='_img' style='" + n2.attrs.style + "' src='" + n2.attrs.src + "'>",
  19853. "data-i": i2,
  19854. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.imgTap && $options.imgTap(...args), ["stop"]))
  19855. }, null, 12, ["nodes", "data-i"])) : n2.name === "img" ? (vue.openBlock(), vue.createElementBlock("image", {
  19856. key: 2,
  19857. id: n2.attrs.id,
  19858. class: vue.normalizeClass("_img " + n2.attrs.class),
  19859. style: vue.normalizeStyle(($data.ctrl[i2] === -1 ? "display:none;" : "") + "width:" + ($data.ctrl[i2] || 1) + "px;" + n2.attrs.style),
  19860. src: n2.attrs.src || ($data.ctrl.load ? n2.attrs["data-src"] : ""),
  19861. mode: !n2.h ? "widthFix" : !n2.w ? "heightFix" : "",
  19862. "data-i": i2,
  19863. onLoad: _cache[1] || (_cache[1] = (...args) => $options.imgLoad && $options.imgLoad(...args)),
  19864. onError: _cache[2] || (_cache[2] = (...args) => $options.mediaError && $options.mediaError(...args)),
  19865. onClick: _cache[3] || (_cache[3] = vue.withModifiers((...args) => $options.imgTap && $options.imgTap(...args), ["stop"])),
  19866. onLongpress: _cache[4] || (_cache[4] = (...args) => $options.imgLongTap && $options.imgLongTap(...args))
  19867. }, null, 46, ["id", "src", "mode", "data-i"])) : n2.text ? (vue.openBlock(), vue.createElementBlock(
  19868. vue.Fragment,
  19869. { key: 3 },
  19870. [
  19871. vue.createCommentVNode(" 文本 "),
  19872. vue.createElementVNode(
  19873. "text",
  19874. { decode: "" },
  19875. vue.toDisplayString(n2.text),
  19876. 1
  19877. /* TEXT */
  19878. )
  19879. ],
  19880. 2112
  19881. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  19882. )) : n2.name === "br" ? (vue.openBlock(), vue.createElementBlock("text", { key: 4 }, "\\n")) : n2.name === "a" ? (vue.openBlock(), vue.createElementBlock(
  19883. vue.Fragment,
  19884. { key: 5 },
  19885. [
  19886. vue.createCommentVNode(" 链接 "),
  19887. vue.createElementVNode("view", {
  19888. id: n2.attrs.id,
  19889. class: vue.normalizeClass((n2.attrs.href ? "_a " : "") + n2.attrs.class),
  19890. "hover-class": "_hover",
  19891. style: vue.normalizeStyle("display:inline;" + n2.attrs.style),
  19892. "data-i": i2,
  19893. onClick: _cache[5] || (_cache[5] = vue.withModifiers((...args) => $options.linkTap && $options.linkTap(...args), ["stop"]))
  19894. }, [
  19895. vue.createVNode(_component_node, {
  19896. name: "span",
  19897. childs: n2.children,
  19898. opts: $props.opts,
  19899. style: { "display": "inherit" }
  19900. }, null, 8, ["childs", "opts"])
  19901. ], 14, ["id", "data-i"])
  19902. ],
  19903. 2112
  19904. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  19905. )) : n2.html ? (vue.openBlock(), vue.createElementBlock(
  19906. vue.Fragment,
  19907. { key: 6 },
  19908. [
  19909. vue.createCommentVNode(" 视频 "),
  19910. vue.createElementVNode("view", {
  19911. id: n2.attrs.id,
  19912. class: vue.normalizeClass("_video " + n2.attrs.class),
  19913. style: vue.normalizeStyle(n2.attrs.style),
  19914. innerHTML: n2.html,
  19915. onVplay: _cache[6] || (_cache[6] = vue.withModifiers((...args) => $options.play && $options.play(...args), ["stop"]))
  19916. }, null, 46, ["id", "innerHTML"])
  19917. ],
  19918. 2112
  19919. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  19920. )) : n2.name === "iframe" ? (vue.openBlock(), vue.createElementBlock("iframe", {
  19921. key: 7,
  19922. style: vue.normalizeStyle(n2.attrs.style),
  19923. allowfullscreen: n2.attrs.allowfullscreen,
  19924. frameborder: n2.attrs.frameborder,
  19925. src: n2.attrs.src
  19926. }, null, 12, ["allowfullscreen", "frameborder", "src"])) : n2.name === "embed" ? (vue.openBlock(), vue.createElementBlock("embed", {
  19927. key: 8,
  19928. style: vue.normalizeStyle(n2.attrs.style),
  19929. src: n2.attrs.src
  19930. }, null, 12, ["src"])) : n2.name === "table" && n2.c || n2.name === "li" ? (vue.openBlock(), vue.createElementBlock("view", {
  19931. key: 9,
  19932. id: n2.attrs.id,
  19933. class: vue.normalizeClass("_" + n2.name + " " + n2.attrs.class),
  19934. style: vue.normalizeStyle(n2.attrs.style)
  19935. }, [
  19936. n2.name === "li" ? (vue.openBlock(), vue.createBlock(_component_node, {
  19937. key: 0,
  19938. childs: n2.children,
  19939. opts: $props.opts
  19940. }, null, 8, ["childs", "opts"])) : (vue.openBlock(true), vue.createElementBlock(
  19941. vue.Fragment,
  19942. { key: 1 },
  19943. vue.renderList(n2.children, (tbody, x) => {
  19944. return vue.openBlock(), vue.createElementBlock(
  19945. "view",
  19946. {
  19947. key: x,
  19948. class: vue.normalizeClass("_" + tbody.name + " " + tbody.attrs.class),
  19949. style: vue.normalizeStyle(tbody.attrs.style)
  19950. },
  19951. [
  19952. tbody.name === "td" || tbody.name === "th" ? (vue.openBlock(), vue.createBlock(_component_node, {
  19953. key: 0,
  19954. childs: tbody.children,
  19955. opts: $props.opts
  19956. }, null, 8, ["childs", "opts"])) : (vue.openBlock(true), vue.createElementBlock(
  19957. vue.Fragment,
  19958. { key: 1 },
  19959. vue.renderList(tbody.children, (tr, y2) => {
  19960. return vue.openBlock(), vue.createElementBlock(
  19961. vue.Fragment,
  19962. { key: y2 },
  19963. [
  19964. tr.name === "td" || tr.name === "th" ? (vue.openBlock(), vue.createElementBlock(
  19965. "view",
  19966. {
  19967. key: 0,
  19968. class: vue.normalizeClass("_" + tr.name + " " + tr.attrs.class),
  19969. style: vue.normalizeStyle(tr.attrs.style)
  19970. },
  19971. [
  19972. vue.createVNode(_component_node, {
  19973. childs: tr.children,
  19974. opts: $props.opts
  19975. }, null, 8, ["childs", "opts"])
  19976. ],
  19977. 6
  19978. /* CLASS, STYLE */
  19979. )) : (vue.openBlock(), vue.createElementBlock(
  19980. "view",
  19981. {
  19982. key: 1,
  19983. class: vue.normalizeClass("_" + tr.name + " " + tr.attrs.class),
  19984. style: vue.normalizeStyle(tr.attrs.style)
  19985. },
  19986. [
  19987. (vue.openBlock(true), vue.createElementBlock(
  19988. vue.Fragment,
  19989. null,
  19990. vue.renderList(tr.children, (td, z2) => {
  19991. return vue.openBlock(), vue.createElementBlock(
  19992. "view",
  19993. {
  19994. key: z2,
  19995. class: vue.normalizeClass("_" + td.name + " " + td.attrs.class),
  19996. style: vue.normalizeStyle(td.attrs.style)
  19997. },
  19998. [
  19999. vue.createVNode(_component_node, {
  20000. childs: td.children,
  20001. opts: $props.opts
  20002. }, null, 8, ["childs", "opts"])
  20003. ],
  20004. 6
  20005. /* CLASS, STYLE */
  20006. );
  20007. }),
  20008. 128
  20009. /* KEYED_FRAGMENT */
  20010. ))
  20011. ],
  20012. 6
  20013. /* CLASS, STYLE */
  20014. ))
  20015. ],
  20016. 64
  20017. /* STABLE_FRAGMENT */
  20018. );
  20019. }),
  20020. 128
  20021. /* KEYED_FRAGMENT */
  20022. ))
  20023. ],
  20024. 6
  20025. /* CLASS, STYLE */
  20026. );
  20027. }),
  20028. 128
  20029. /* KEYED_FRAGMENT */
  20030. ))
  20031. ], 14, ["id"])) : !n2.c ? (vue.openBlock(), vue.createElementBlock(
  20032. vue.Fragment,
  20033. { key: 10 },
  20034. [
  20035. vue.createCommentVNode(" 富文本 "),
  20036. vue.createElementVNode("rich-text", {
  20037. id: n2.attrs.id,
  20038. style: vue.normalizeStyle(n2.f + ";display:inline"),
  20039. preview: false,
  20040. selectable: $props.opts[4],
  20041. "user-select": $props.opts[4],
  20042. nodes: [n2]
  20043. }, null, 12, ["id", "selectable", "user-select", "nodes"])
  20044. ],
  20045. 2112
  20046. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  20047. )) : n2.c === 2 ? (vue.openBlock(), vue.createElementBlock(
  20048. vue.Fragment,
  20049. { key: 11 },
  20050. [
  20051. vue.createCommentVNode(" 继续递归 "),
  20052. vue.createElementVNode("view", {
  20053. id: n2.attrs.id,
  20054. class: vue.normalizeClass("_block _" + n2.name + " " + n2.attrs.class),
  20055. style: vue.normalizeStyle(n2.f + ";" + n2.attrs.style)
  20056. }, [
  20057. (vue.openBlock(true), vue.createElementBlock(
  20058. vue.Fragment,
  20059. null,
  20060. vue.renderList(n2.children, (n22, j2) => {
  20061. return vue.openBlock(), vue.createBlock(_component_node, {
  20062. key: j2,
  20063. style: vue.normalizeStyle(n22.f),
  20064. name: n22.name,
  20065. attrs: n22.attrs,
  20066. childs: n22.children,
  20067. opts: $props.opts
  20068. }, null, 8, ["style", "name", "attrs", "childs", "opts"]);
  20069. }),
  20070. 128
  20071. /* KEYED_FRAGMENT */
  20072. ))
  20073. ], 14, ["id"])
  20074. ],
  20075. 2112
  20076. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  20077. )) : (vue.openBlock(), vue.createBlock(_component_node, {
  20078. key: 12,
  20079. style: vue.normalizeStyle(n2.f),
  20080. name: n2.name,
  20081. attrs: n2.attrs,
  20082. childs: n2.children,
  20083. opts: $props.opts
  20084. }, null, 8, ["style", "name", "attrs", "childs", "opts"]))
  20085. ],
  20086. 64
  20087. /* STABLE_FRAGMENT */
  20088. );
  20089. }),
  20090. 128
  20091. /* KEYED_FRAGMENT */
  20092. ))
  20093. ], 14, ["id"]);
  20094. }
  20095. if (typeof block0 === "function")
  20096. block0(_sfc_main$3p);
  20097. const node = /* @__PURE__ */ _export_sfc(_sfc_main$3p, [["render", _sfc_render$3o], ["__scopeId", "data-v-8845ff2f"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/mp-html/components/mp-html/node/node.vue"]]);
  20098. const config = {
  20099. // 信任的标签(保持标签名不变)
  20100. trustTags: makeMap("a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,ruby,rt,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video"),
  20101. // 块级标签(转为 div,其他的非信任标签转为 span)
  20102. blockTags: makeMap("address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section"),
  20103. // 行内标签
  20104. inlineTags: makeMap("abbr,b,big,code,del,em,i,ins,label,q,small,span,strong,sub,sup"),
  20105. // 要移除的标签
  20106. ignoreTags: makeMap("area,base,canvas,embed,frame,head,iframe,input,link,map,meta,param,rp,script,source,style,textarea,title,track,wbr"),
  20107. // 自闭合的标签
  20108. voidTags: makeMap("area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr"),
  20109. // html 实体
  20110. entities: {
  20111. lt: "<",
  20112. gt: ">",
  20113. quot: '"',
  20114. apos: "'",
  20115. ensp: " ",
  20116. emsp: " ",
  20117. nbsp: " ",
  20118. semi: ";",
  20119. ndash: "–",
  20120. mdash: "—",
  20121. middot: "·",
  20122. lsquo: "‘",
  20123. rsquo: "’",
  20124. ldquo: "“",
  20125. rdquo: "”",
  20126. bull: "•",
  20127. hellip: "…",
  20128. larr: "←",
  20129. uarr: "↑",
  20130. rarr: "→",
  20131. darr: "↓"
  20132. },
  20133. // 默认的标签样式
  20134. tagStyle: {
  20135. address: "font-style:italic",
  20136. big: "display:inline;font-size:1.2em",
  20137. caption: "display:table-caption;text-align:center",
  20138. center: "text-align:center",
  20139. cite: "font-style:italic",
  20140. dd: "margin-left:40px",
  20141. mark: "background-color:yellow",
  20142. pre: "font-family:monospace;white-space:pre",
  20143. s: "text-decoration:line-through",
  20144. small: "display:inline;font-size:0.8em",
  20145. strike: "text-decoration:line-through",
  20146. u: "text-decoration:underline"
  20147. },
  20148. // svg 大小写对照表
  20149. svgDict: {
  20150. animatetransform: "animateTransform",
  20151. lineargradient: "linearGradient",
  20152. viewbox: "viewBox",
  20153. attributename: "attributeName",
  20154. repeatcount: "repeatCount",
  20155. repeatdur: "repeatDur"
  20156. }
  20157. };
  20158. const tagSelector = {};
  20159. const {
  20160. windowWidth
  20161. } = uni.getSystemInfoSync();
  20162. const blankChar = makeMap(" ,\r,\n, ,\f");
  20163. let idIndex = 0;
  20164. config.ignoreTags.iframe = void 0;
  20165. config.trustTags.iframe = true;
  20166. config.ignoreTags.embed = void 0;
  20167. config.trustTags.embed = true;
  20168. function makeMap(str) {
  20169. const map = /* @__PURE__ */ Object.create(null);
  20170. const list = str.split(",");
  20171. for (let i2 = list.length; i2--; ) {
  20172. map[list[i2]] = true;
  20173. }
  20174. return map;
  20175. }
  20176. function decodeEntity(str, amp) {
  20177. let i2 = str.indexOf("&");
  20178. while (i2 !== -1) {
  20179. const j2 = str.indexOf(";", i2 + 3);
  20180. let code2;
  20181. if (j2 === -1)
  20182. break;
  20183. if (str[i2 + 1] === "#") {
  20184. code2 = parseInt((str[i2 + 2] === "x" ? "0" : "") + str.substring(i2 + 2, j2));
  20185. if (!isNaN(code2)) {
  20186. str = str.substr(0, i2) + String.fromCharCode(code2) + str.substr(j2 + 1);
  20187. }
  20188. } else {
  20189. code2 = str.substring(i2 + 1, j2);
  20190. if (config.entities[code2] || code2 === "amp" && amp) {
  20191. str = str.substr(0, i2) + (config.entities[code2] || "&") + str.substr(j2 + 1);
  20192. }
  20193. }
  20194. i2 = str.indexOf("&", i2 + 1);
  20195. }
  20196. return str;
  20197. }
  20198. function mergeNodes(nodes) {
  20199. let i2 = nodes.length - 1;
  20200. for (let j2 = i2; j2 >= -1; j2--) {
  20201. if (j2 === -1 || nodes[j2].c || !nodes[j2].name || nodes[j2].name !== "div" && nodes[j2].name !== "p" && nodes[j2].name[0] !== "h" || (nodes[j2].attrs.style || "").includes("inline")) {
  20202. if (i2 - j2 >= 5) {
  20203. nodes.splice(j2 + 1, i2 - j2, {
  20204. name: "div",
  20205. attrs: {},
  20206. children: nodes.slice(j2 + 1, i2 + 1)
  20207. });
  20208. }
  20209. i2 = j2 - 1;
  20210. }
  20211. }
  20212. }
  20213. function Parser(vm) {
  20214. this.options = vm || {};
  20215. this.tagStyle = Object.assign({}, config.tagStyle, this.options.tagStyle);
  20216. this.imgList = vm.imgList || [];
  20217. this.imgList._unloadimgs = 0;
  20218. this.plugins = vm.plugins || [];
  20219. this.attrs = /* @__PURE__ */ Object.create(null);
  20220. this.stack = [];
  20221. this.nodes = [];
  20222. this.pre = (this.options.containerStyle || "").includes("white-space") && this.options.containerStyle.includes("pre") ? 2 : 0;
  20223. }
  20224. Parser.prototype.parse = function(content) {
  20225. for (let i2 = this.plugins.length; i2--; ) {
  20226. if (this.plugins[i2].onUpdate) {
  20227. content = this.plugins[i2].onUpdate(content, config) || content;
  20228. }
  20229. }
  20230. new Lexer(this).parse(content);
  20231. while (this.stack.length) {
  20232. this.popNode();
  20233. }
  20234. if (this.nodes.length > 50) {
  20235. mergeNodes(this.nodes);
  20236. }
  20237. return this.nodes;
  20238. };
  20239. Parser.prototype.expose = function() {
  20240. for (let i2 = this.stack.length; i2--; ) {
  20241. const item = this.stack[i2];
  20242. if (item.c || item.name === "a" || item.name === "video" || item.name === "audio")
  20243. return;
  20244. item.c = 1;
  20245. }
  20246. };
  20247. Parser.prototype.hook = function(node2) {
  20248. for (let i2 = this.plugins.length; i2--; ) {
  20249. if (this.plugins[i2].onParse && this.plugins[i2].onParse(node2, this) === false) {
  20250. return false;
  20251. }
  20252. }
  20253. return true;
  20254. };
  20255. Parser.prototype.getUrl = function(url2) {
  20256. const domain = this.options.domain;
  20257. if (url2[0] === "/") {
  20258. if (url2[1] === "/") {
  20259. url2 = (domain ? domain.split("://")[0] : "http") + ":" + url2;
  20260. } else if (domain) {
  20261. url2 = domain + url2;
  20262. } else {
  20263. url2 = plus.io.convertLocalFileSystemURL(url2);
  20264. }
  20265. } else if (!url2.includes("data:") && !url2.includes("://")) {
  20266. if (domain) {
  20267. url2 = domain + "/" + url2;
  20268. } else {
  20269. url2 = plus.io.convertLocalFileSystemURL(url2);
  20270. }
  20271. }
  20272. return url2;
  20273. };
  20274. Parser.prototype.parseStyle = function(node2) {
  20275. const attrs = node2.attrs;
  20276. const list = (this.tagStyle[node2.name] || "").split(";").concat((attrs.style || "").split(";"));
  20277. const styleObj = {};
  20278. let tmp = "";
  20279. if (attrs.id && !this.xml) {
  20280. if (this.options.useAnchor) {
  20281. this.expose();
  20282. } else if (node2.name !== "img" && node2.name !== "a" && node2.name !== "video" && node2.name !== "audio") {
  20283. attrs.id = void 0;
  20284. }
  20285. }
  20286. if (attrs.width) {
  20287. styleObj.width = parseFloat(attrs.width) + (attrs.width.includes("%") ? "%" : "px");
  20288. attrs.width = void 0;
  20289. }
  20290. if (attrs.height) {
  20291. styleObj.height = parseFloat(attrs.height) + (attrs.height.includes("%") ? "%" : "px");
  20292. attrs.height = void 0;
  20293. }
  20294. for (let i2 = 0, len = list.length; i2 < len; i2++) {
  20295. const info = list[i2].split(":");
  20296. if (info.length < 2)
  20297. continue;
  20298. const key = info.shift().trim().toLowerCase();
  20299. let value = info.join(":").trim();
  20300. if (value[0] === "-" && value.lastIndexOf("-") > 0 || value.includes("safe")) {
  20301. tmp += `;${key}:${value}`;
  20302. } else if (!styleObj[key] || value.includes("import") || !styleObj[key].includes("import")) {
  20303. if (value.includes("url")) {
  20304. let j2 = value.indexOf("(") + 1;
  20305. if (j2) {
  20306. while (value[j2] === '"' || value[j2] === "'" || blankChar[value[j2]]) {
  20307. j2++;
  20308. }
  20309. value = value.substr(0, j2) + this.getUrl(value.substr(j2));
  20310. }
  20311. } else if (value.includes("rpx")) {
  20312. value = value.replace(/[0-9.]+\s*rpx/g, ($2) => parseFloat($2) * windowWidth / 750 + "px");
  20313. }
  20314. styleObj[key] = value;
  20315. }
  20316. }
  20317. node2.attrs.style = tmp;
  20318. return styleObj;
  20319. };
  20320. Parser.prototype.onTagName = function(name2) {
  20321. this.tagName = this.xml ? name2 : name2.toLowerCase();
  20322. if (this.tagName === "svg") {
  20323. this.xml = (this.xml || 0) + 1;
  20324. }
  20325. };
  20326. Parser.prototype.onAttrName = function(name2) {
  20327. name2 = this.xml ? name2 : name2.toLowerCase();
  20328. if (name2.substr(0, 5) === "data-") {
  20329. if (name2 === "data-src" && !this.attrs.src) {
  20330. this.attrName = "src";
  20331. } else if (this.tagName === "img" || this.tagName === "a") {
  20332. this.attrName = name2;
  20333. } else {
  20334. this.attrName = void 0;
  20335. }
  20336. } else {
  20337. this.attrName = name2;
  20338. this.attrs[name2] = "T";
  20339. }
  20340. };
  20341. Parser.prototype.onAttrVal = function(val) {
  20342. const name2 = this.attrName || "";
  20343. if (name2 === "style" || name2 === "href") {
  20344. this.attrs[name2] = decodeEntity(val, true);
  20345. } else if (name2.includes("src")) {
  20346. this.attrs[name2] = this.getUrl(decodeEntity(val, true));
  20347. } else if (name2) {
  20348. this.attrs[name2] = val;
  20349. }
  20350. };
  20351. Parser.prototype.onOpenTag = function(selfClose) {
  20352. const node2 = /* @__PURE__ */ Object.create(null);
  20353. node2.name = this.tagName;
  20354. node2.attrs = this.attrs;
  20355. if (this.options.nodes.length) {
  20356. node2.type = "node";
  20357. }
  20358. this.attrs = /* @__PURE__ */ Object.create(null);
  20359. const attrs = node2.attrs;
  20360. const parent2 = this.stack[this.stack.length - 1];
  20361. const siblings = parent2 ? parent2.children : this.nodes;
  20362. const close = this.xml ? selfClose : config.voidTags[node2.name];
  20363. if (tagSelector[node2.name]) {
  20364. attrs.class = tagSelector[node2.name] + (attrs.class ? " " + attrs.class : "");
  20365. }
  20366. if (node2.name === "embed") {
  20367. this.expose();
  20368. }
  20369. if (node2.name === "video" || node2.name === "audio") {
  20370. if (node2.name === "video" && !attrs.id) {
  20371. attrs.id = "v" + idIndex++;
  20372. }
  20373. if (!attrs.controls && !attrs.autoplay) {
  20374. attrs.controls = "T";
  20375. }
  20376. node2.src = [];
  20377. if (attrs.src) {
  20378. node2.src.push(attrs.src);
  20379. attrs.src = void 0;
  20380. }
  20381. this.expose();
  20382. }
  20383. if (close) {
  20384. if (!this.hook(node2) || config.ignoreTags[node2.name]) {
  20385. if (node2.name === "base" && !this.options.domain) {
  20386. this.options.domain = attrs.href;
  20387. } else if (node2.name === "source" && parent2 && (parent2.name === "video" || parent2.name === "audio") && attrs.src) {
  20388. parent2.src.push(attrs.src);
  20389. }
  20390. return;
  20391. }
  20392. const styleObj = this.parseStyle(node2);
  20393. if (node2.name === "img") {
  20394. if (attrs.src) {
  20395. if (attrs.src.includes("webp")) {
  20396. node2.webp = "T";
  20397. }
  20398. if (attrs.src.includes("data:") && !attrs["original-src"]) {
  20399. attrs.ignore = "T";
  20400. }
  20401. if (!attrs.ignore || node2.webp || attrs.src.includes("cloud://")) {
  20402. for (let i2 = this.stack.length; i2--; ) {
  20403. const item = this.stack[i2];
  20404. if (item.name === "a") {
  20405. node2.a = item.attrs;
  20406. }
  20407. if (item.name === "table" && !node2.webp && !attrs.src.includes("cloud://")) {
  20408. if (!styleObj.display || styleObj.display.includes("inline")) {
  20409. node2.t = "inline-block";
  20410. } else {
  20411. node2.t = styleObj.display;
  20412. }
  20413. styleObj.display = void 0;
  20414. }
  20415. item.c = 1;
  20416. }
  20417. attrs.i = this.imgList.length.toString();
  20418. let src = attrs["original-src"] || attrs.src;
  20419. this.imgList.push(src);
  20420. if (!node2.t) {
  20421. this.imgList._unloadimgs += 1;
  20422. }
  20423. if (this.options.lazyLoad) {
  20424. attrs["data-src"] = attrs.src;
  20425. attrs.src = void 0;
  20426. }
  20427. }
  20428. }
  20429. if (styleObj.display === "inline") {
  20430. styleObj.display = "";
  20431. }
  20432. if (attrs.ignore) {
  20433. styleObj["max-width"] = styleObj["max-width"] || "100%";
  20434. attrs.style += ";-webkit-touch-callout:none";
  20435. }
  20436. if (parseInt(styleObj.width) > windowWidth) {
  20437. styleObj.height = void 0;
  20438. }
  20439. if (!isNaN(parseInt(styleObj.width))) {
  20440. node2.w = "T";
  20441. }
  20442. if (!isNaN(parseInt(styleObj.height)) && (!styleObj.height.includes("%") || parent2 && (parent2.attrs.style || "").includes("height"))) {
  20443. node2.h = "T";
  20444. }
  20445. } else if (node2.name === "svg") {
  20446. siblings.push(node2);
  20447. this.stack.push(node2);
  20448. this.popNode();
  20449. return;
  20450. }
  20451. for (const key in styleObj) {
  20452. if (styleObj[key]) {
  20453. attrs.style += `;${key}:${styleObj[key].replace(" !important", "")}`;
  20454. }
  20455. }
  20456. attrs.style = attrs.style.substr(1) || void 0;
  20457. } else {
  20458. if ((node2.name === "pre" || (attrs.style || "").includes("white-space") && attrs.style.includes("pre")) && this.pre !== 2) {
  20459. this.pre = node2.pre = 1;
  20460. }
  20461. node2.children = [];
  20462. this.stack.push(node2);
  20463. }
  20464. siblings.push(node2);
  20465. };
  20466. Parser.prototype.onCloseTag = function(name2) {
  20467. name2 = this.xml ? name2 : name2.toLowerCase();
  20468. let i2;
  20469. for (i2 = this.stack.length; i2--; ) {
  20470. if (this.stack[i2].name === name2)
  20471. break;
  20472. }
  20473. if (i2 !== -1) {
  20474. while (this.stack.length > i2) {
  20475. this.popNode();
  20476. }
  20477. } else if (name2 === "p" || name2 === "br") {
  20478. const siblings = this.stack.length ? this.stack[this.stack.length - 1].children : this.nodes;
  20479. siblings.push({
  20480. name: name2,
  20481. attrs: {
  20482. class: tagSelector[name2] || "",
  20483. style: this.tagStyle[name2] || ""
  20484. }
  20485. });
  20486. }
  20487. };
  20488. Parser.prototype.popNode = function() {
  20489. const node2 = this.stack.pop();
  20490. let attrs = node2.attrs;
  20491. const children = node2.children;
  20492. const parent2 = this.stack[this.stack.length - 1];
  20493. const siblings = parent2 ? parent2.children : this.nodes;
  20494. if (!this.hook(node2) || config.ignoreTags[node2.name]) {
  20495. if (node2.name === "title" && children.length && children[0].type === "text" && this.options.setTitle) {
  20496. uni.setNavigationBarTitle({
  20497. title: children[0].text
  20498. });
  20499. }
  20500. siblings.pop();
  20501. return;
  20502. }
  20503. if (node2.pre && this.pre !== 2) {
  20504. this.pre = node2.pre = void 0;
  20505. for (let i2 = this.stack.length; i2--; ) {
  20506. if (this.stack[i2].pre) {
  20507. this.pre = 1;
  20508. }
  20509. }
  20510. }
  20511. const styleObj = {};
  20512. if (node2.name === "svg") {
  20513. if (this.xml > 1) {
  20514. this.xml--;
  20515. return;
  20516. }
  20517. let src = "";
  20518. const style = attrs.style;
  20519. attrs.style = "";
  20520. attrs.xmlns = "http://www.w3.org/2000/svg";
  20521. (function traversal(node3) {
  20522. if (node3.type === "text") {
  20523. src += node3.text;
  20524. return;
  20525. }
  20526. const name2 = config.svgDict[node3.name] || node3.name;
  20527. src += "<" + name2;
  20528. for (const item in node3.attrs) {
  20529. const val = node3.attrs[item];
  20530. if (val) {
  20531. src += ` ${config.svgDict[item] || item}="${val}"`;
  20532. }
  20533. }
  20534. if (!node3.children) {
  20535. src += "/>";
  20536. } else {
  20537. src += ">";
  20538. for (let i2 = 0; i2 < node3.children.length; i2++) {
  20539. traversal(node3.children[i2]);
  20540. }
  20541. src += "</" + name2 + ">";
  20542. }
  20543. })(node2);
  20544. node2.name = "img";
  20545. node2.attrs = {
  20546. src: "data:image/svg+xml;utf8," + src.replace(/#/g, "%23"),
  20547. style,
  20548. ignore: "T"
  20549. };
  20550. node2.children = void 0;
  20551. this.xml = false;
  20552. return;
  20553. }
  20554. if (attrs.align) {
  20555. if (node2.name === "table") {
  20556. if (attrs.align === "center") {
  20557. styleObj["margin-inline-start"] = styleObj["margin-inline-end"] = "auto";
  20558. } else {
  20559. styleObj.float = attrs.align;
  20560. }
  20561. } else {
  20562. styleObj["text-align"] = attrs.align;
  20563. }
  20564. attrs.align = void 0;
  20565. }
  20566. if (attrs.dir) {
  20567. styleObj.direction = attrs.dir;
  20568. attrs.dir = void 0;
  20569. }
  20570. if (node2.name === "font") {
  20571. if (attrs.color) {
  20572. styleObj.color = attrs.color;
  20573. attrs.color = void 0;
  20574. }
  20575. if (attrs.face) {
  20576. styleObj["font-family"] = attrs.face;
  20577. attrs.face = void 0;
  20578. }
  20579. if (attrs.size) {
  20580. let size = parseInt(attrs.size);
  20581. if (!isNaN(size)) {
  20582. if (size < 1) {
  20583. size = 1;
  20584. } else if (size > 7) {
  20585. size = 7;
  20586. }
  20587. styleObj["font-size"] = ["x-small", "small", "medium", "large", "x-large", "xx-large", "xxx-large"][size - 1];
  20588. }
  20589. attrs.size = void 0;
  20590. }
  20591. }
  20592. if ((attrs.class || "").includes("align-center")) {
  20593. styleObj["text-align"] = "center";
  20594. }
  20595. Object.assign(styleObj, this.parseStyle(node2));
  20596. if (node2.name !== "table" && parseInt(styleObj.width) > windowWidth) {
  20597. styleObj["max-width"] = "100%";
  20598. styleObj["box-sizing"] = "border-box";
  20599. }
  20600. if (config.blockTags[node2.name]) {
  20601. node2.name = "div";
  20602. } else if (!config.trustTags[node2.name] && !this.xml) {
  20603. node2.name = "span";
  20604. }
  20605. if (node2.name === "a" || node2.name === "ad" || node2.name === "iframe") {
  20606. this.expose();
  20607. } else if (node2.name === "video") {
  20608. if ((styleObj.height || "").includes("auto")) {
  20609. styleObj.height = void 0;
  20610. }
  20611. let str = '<video style="width:100%;height:100%"';
  20612. for (const item in attrs) {
  20613. if (attrs[item]) {
  20614. str += " " + item + '="' + attrs[item] + '"';
  20615. }
  20616. }
  20617. if (this.options.pauseVideo) {
  20618. str += ` onplay="this.dispatchEvent(new CustomEvent('vplay',{bubbles:!0}));for(var e=document.getElementsByTagName('video'),t=0;t<e.length;t++)e[t]!=this&&e[t].pause()"`;
  20619. }
  20620. str += ">";
  20621. for (let i2 = 0; i2 < node2.src.length; i2++) {
  20622. str += '<source src="' + node2.src[i2] + '">';
  20623. }
  20624. str += "</video>";
  20625. node2.html = str;
  20626. } else if ((node2.name === "ul" || node2.name === "ol") && node2.c) {
  20627. const types2 = {
  20628. a: "lower-alpha",
  20629. A: "upper-alpha",
  20630. i: "lower-roman",
  20631. I: "upper-roman"
  20632. };
  20633. if (types2[attrs.type]) {
  20634. attrs.style += ";list-style-type:" + types2[attrs.type];
  20635. attrs.type = void 0;
  20636. }
  20637. for (let i2 = children.length; i2--; ) {
  20638. if (children[i2].name === "li") {
  20639. children[i2].c = 1;
  20640. }
  20641. }
  20642. } else if (node2.name === "table") {
  20643. let padding = parseFloat(attrs.cellpadding);
  20644. let spacing = parseFloat(attrs.cellspacing);
  20645. const border = parseFloat(attrs.border);
  20646. const bordercolor = styleObj["border-color"];
  20647. const borderstyle = styleObj["border-style"];
  20648. if (node2.c) {
  20649. if (isNaN(padding)) {
  20650. padding = 2;
  20651. }
  20652. if (isNaN(spacing)) {
  20653. spacing = 2;
  20654. }
  20655. }
  20656. if (border) {
  20657. attrs.style += `;border:${border}px ${borderstyle || "solid"} ${bordercolor || "gray"}`;
  20658. }
  20659. if (node2.flag && node2.c) {
  20660. styleObj.display = "grid";
  20661. if (spacing) {
  20662. styleObj["grid-gap"] = spacing + "px";
  20663. styleObj.padding = spacing + "px";
  20664. } else if (border) {
  20665. attrs.style += ";border-left:0;border-top:0";
  20666. }
  20667. const width = [];
  20668. const trList = [];
  20669. const cells = [];
  20670. const map = {};
  20671. (function traversal(nodes) {
  20672. for (let i2 = 0; i2 < nodes.length; i2++) {
  20673. if (nodes[i2].name === "tr") {
  20674. trList.push(nodes[i2]);
  20675. } else {
  20676. traversal(nodes[i2].children || []);
  20677. }
  20678. }
  20679. })(children);
  20680. for (let row = 1; row <= trList.length; row++) {
  20681. let col = 1;
  20682. for (let j2 = 0; j2 < trList[row - 1].children.length; j2++) {
  20683. const td = trList[row - 1].children[j2];
  20684. if (td.name === "td" || td.name === "th") {
  20685. while (map[row + "." + col]) {
  20686. col++;
  20687. }
  20688. let style = td.attrs.style || "";
  20689. let start = style.indexOf("width") ? style.indexOf(";width") : 0;
  20690. if (start !== -1) {
  20691. let end = style.indexOf(";", start + 6);
  20692. if (end === -1) {
  20693. end = style.length;
  20694. }
  20695. if (!td.attrs.colspan) {
  20696. width[col] = style.substring(start ? start + 7 : 6, end);
  20697. }
  20698. style = style.substr(0, start) + style.substr(end);
  20699. }
  20700. style += ";display:flex";
  20701. start = style.indexOf("vertical-align");
  20702. if (start !== -1) {
  20703. const val = style.substr(start + 15, 10);
  20704. if (val.includes("middle")) {
  20705. style += ";align-items:center";
  20706. } else if (val.includes("bottom")) {
  20707. style += ";align-items:flex-end";
  20708. }
  20709. } else {
  20710. style += ";align-items:center";
  20711. }
  20712. start = style.indexOf("text-align");
  20713. if (start !== -1) {
  20714. const val = style.substr(start + 11, 10);
  20715. if (val.includes("center")) {
  20716. style += ";justify-content: center";
  20717. } else if (val.includes("right")) {
  20718. style += ";justify-content: right";
  20719. }
  20720. }
  20721. style = (border ? `;border:${border}px ${borderstyle || "solid"} ${bordercolor || "gray"}` + (spacing ? "" : ";border-right:0;border-bottom:0") : "") + (padding ? `;padding:${padding}px` : "") + ";" + style;
  20722. if (td.attrs.colspan) {
  20723. style += `;grid-column-start:${col};grid-column-end:${col + parseInt(td.attrs.colspan)}`;
  20724. if (!td.attrs.rowspan) {
  20725. style += `;grid-row-start:${row};grid-row-end:${row + 1}`;
  20726. }
  20727. col += parseInt(td.attrs.colspan) - 1;
  20728. }
  20729. if (td.attrs.rowspan) {
  20730. style += `;grid-row-start:${row};grid-row-end:${row + parseInt(td.attrs.rowspan)}`;
  20731. if (!td.attrs.colspan) {
  20732. style += `;grid-column-start:${col};grid-column-end:${col + 1}`;
  20733. }
  20734. for (let rowspan = 1; rowspan < td.attrs.rowspan; rowspan++) {
  20735. for (let colspan = 0; colspan < (td.attrs.colspan || 1); colspan++) {
  20736. map[row + rowspan + "." + (col - colspan)] = 1;
  20737. }
  20738. }
  20739. }
  20740. if (style) {
  20741. td.attrs.style = style;
  20742. }
  20743. cells.push(td);
  20744. col++;
  20745. }
  20746. }
  20747. if (row === 1) {
  20748. let temp = "";
  20749. for (let i2 = 1; i2 < col; i2++) {
  20750. temp += (width[i2] ? width[i2] : "auto") + " ";
  20751. }
  20752. styleObj["grid-template-columns"] = temp;
  20753. }
  20754. }
  20755. node2.children = cells;
  20756. } else {
  20757. if (node2.c) {
  20758. styleObj.display = "table";
  20759. }
  20760. if (!isNaN(spacing)) {
  20761. styleObj["border-spacing"] = spacing + "px";
  20762. }
  20763. if (border || padding) {
  20764. (function traversal(nodes) {
  20765. for (let i2 = 0; i2 < nodes.length; i2++) {
  20766. const td = nodes[i2];
  20767. if (td.name === "th" || td.name === "td") {
  20768. if (border) {
  20769. td.attrs.style = `border:${border}px ${borderstyle || "solid"} ${bordercolor || "gray"};${td.attrs.style || ""}`;
  20770. }
  20771. if (padding) {
  20772. td.attrs.style = `padding:${padding}px;${td.attrs.style || ""}`;
  20773. }
  20774. } else if (td.children) {
  20775. traversal(td.children);
  20776. }
  20777. }
  20778. })(children);
  20779. }
  20780. }
  20781. if (this.options.scrollTable && !(attrs.style || "").includes("inline")) {
  20782. const table = Object.assign({}, node2);
  20783. node2.name = "div";
  20784. node2.attrs = {
  20785. style: "overflow:auto"
  20786. };
  20787. node2.children = [table];
  20788. attrs = table.attrs;
  20789. }
  20790. } else if ((node2.name === "td" || node2.name === "th") && (attrs.colspan || attrs.rowspan)) {
  20791. for (let i2 = this.stack.length; i2--; ) {
  20792. if (this.stack[i2].name === "table") {
  20793. this.stack[i2].flag = 1;
  20794. break;
  20795. }
  20796. }
  20797. } else if (node2.name === "ruby") {
  20798. node2.name = "span";
  20799. for (let i2 = 0; i2 < children.length - 1; i2++) {
  20800. if (children[i2].type === "text" && children[i2 + 1].name === "rt") {
  20801. children[i2] = {
  20802. name: "div",
  20803. attrs: {
  20804. style: "display:inline-block;text-align:center"
  20805. },
  20806. children: [{
  20807. name: "div",
  20808. attrs: {
  20809. style: "font-size:50%;" + (children[i2 + 1].attrs.style || "")
  20810. },
  20811. children: children[i2 + 1].children
  20812. }, children[i2]]
  20813. };
  20814. children.splice(i2 + 1, 1);
  20815. }
  20816. }
  20817. } else if (node2.c) {
  20818. (function traversal(node3) {
  20819. node3.c = 2;
  20820. for (let i2 = node3.children.length; i2--; ) {
  20821. const child = node3.children[i2];
  20822. if (child.name && (config.inlineTags[child.name] || (child.attrs.style || "").includes("inline") && child.children) && !child.c) {
  20823. traversal(child);
  20824. }
  20825. if (!child.c || child.name === "table") {
  20826. node3.c = 1;
  20827. }
  20828. }
  20829. })(node2);
  20830. }
  20831. if ((styleObj.display || "").includes("flex") && !node2.c) {
  20832. for (let i2 = children.length; i2--; ) {
  20833. const item = children[i2];
  20834. if (item.f) {
  20835. item.attrs.style = (item.attrs.style || "") + item.f;
  20836. item.f = void 0;
  20837. }
  20838. }
  20839. }
  20840. const flex = parent2 && ((parent2.attrs.style || "").includes("flex") || (parent2.attrs.style || "").includes("grid")) && !node2.c;
  20841. if (flex) {
  20842. node2.f = ";max-width:100%";
  20843. }
  20844. if (children.length >= 50 && node2.c && !(styleObj.display || "").includes("flex")) {
  20845. mergeNodes(children);
  20846. }
  20847. for (const key in styleObj) {
  20848. if (styleObj[key]) {
  20849. const val = `;${key}:${styleObj[key].replace(" !important", "")}`;
  20850. if (flex && (key.includes("flex") && key !== "flex-direction" || key === "align-self" || key.includes("grid") || styleObj[key][0] === "-" || key.includes("width") && val.includes("%"))) {
  20851. node2.f += val;
  20852. if (key === "width") {
  20853. attrs.style += ";width:100%";
  20854. }
  20855. } else {
  20856. attrs.style += val;
  20857. }
  20858. }
  20859. }
  20860. attrs.style = attrs.style.substr(1) || void 0;
  20861. };
  20862. Parser.prototype.onText = function(text) {
  20863. if (!this.pre) {
  20864. let trim2 = "";
  20865. let flag2;
  20866. for (let i2 = 0, len = text.length; i2 < len; i2++) {
  20867. if (!blankChar[text[i2]]) {
  20868. trim2 += text[i2];
  20869. } else {
  20870. if (trim2[trim2.length - 1] !== " ") {
  20871. trim2 += " ";
  20872. }
  20873. if (text[i2] === "\n" && !flag2) {
  20874. flag2 = true;
  20875. }
  20876. }
  20877. }
  20878. if (trim2 === " ") {
  20879. if (flag2)
  20880. return;
  20881. else {
  20882. const parent2 = this.stack[this.stack.length - 1];
  20883. if (parent2 && parent2.name[0] === "t")
  20884. return;
  20885. }
  20886. }
  20887. text = trim2;
  20888. }
  20889. const node2 = /* @__PURE__ */ Object.create(null);
  20890. node2.type = "text";
  20891. node2.text = decodeEntity(text);
  20892. if (this.hook(node2)) {
  20893. const siblings = this.stack.length ? this.stack[this.stack.length - 1].children : this.nodes;
  20894. siblings.push(node2);
  20895. }
  20896. };
  20897. function Lexer(handler) {
  20898. this.handler = handler;
  20899. }
  20900. Lexer.prototype.parse = function(content) {
  20901. this.content = content || "";
  20902. this.i = 0;
  20903. this.start = 0;
  20904. this.state = this.text;
  20905. for (let len = this.content.length; this.i !== -1 && this.i < len; ) {
  20906. this.state();
  20907. }
  20908. };
  20909. Lexer.prototype.checkClose = function(method) {
  20910. const selfClose = this.content[this.i] === "/";
  20911. if (this.content[this.i] === ">" || selfClose && this.content[this.i + 1] === ">") {
  20912. if (method) {
  20913. this.handler[method](this.content.substring(this.start, this.i));
  20914. }
  20915. this.i += selfClose ? 2 : 1;
  20916. this.start = this.i;
  20917. this.handler.onOpenTag(selfClose);
  20918. if (this.handler.tagName === "script") {
  20919. this.i = this.content.indexOf("</", this.i);
  20920. if (this.i !== -1) {
  20921. this.i += 2;
  20922. this.start = this.i;
  20923. }
  20924. this.state = this.endTag;
  20925. } else {
  20926. this.state = this.text;
  20927. }
  20928. return true;
  20929. }
  20930. return false;
  20931. };
  20932. Lexer.prototype.text = function() {
  20933. this.i = this.content.indexOf("<", this.i);
  20934. if (this.i === -1) {
  20935. if (this.start < this.content.length) {
  20936. this.handler.onText(this.content.substring(this.start, this.content.length));
  20937. }
  20938. return;
  20939. }
  20940. const c2 = this.content[this.i + 1];
  20941. if (c2 >= "a" && c2 <= "z" || c2 >= "A" && c2 <= "Z") {
  20942. if (this.start !== this.i) {
  20943. this.handler.onText(this.content.substring(this.start, this.i));
  20944. }
  20945. this.start = ++this.i;
  20946. this.state = this.tagName;
  20947. } else if (c2 === "/" || c2 === "!" || c2 === "?") {
  20948. if (this.start !== this.i) {
  20949. this.handler.onText(this.content.substring(this.start, this.i));
  20950. }
  20951. const next = this.content[this.i + 2];
  20952. if (c2 === "/" && (next >= "a" && next <= "z" || next >= "A" && next <= "Z")) {
  20953. this.i += 2;
  20954. this.start = this.i;
  20955. this.state = this.endTag;
  20956. return;
  20957. }
  20958. let end = "-->";
  20959. if (c2 !== "!" || this.content[this.i + 2] !== "-" || this.content[this.i + 3] !== "-") {
  20960. end = ">";
  20961. }
  20962. this.i = this.content.indexOf(end, this.i);
  20963. if (this.i !== -1) {
  20964. this.i += end.length;
  20965. this.start = this.i;
  20966. }
  20967. } else {
  20968. this.i++;
  20969. }
  20970. };
  20971. Lexer.prototype.tagName = function() {
  20972. if (blankChar[this.content[this.i]]) {
  20973. this.handler.onTagName(this.content.substring(this.start, this.i));
  20974. while (blankChar[this.content[++this.i]])
  20975. ;
  20976. if (this.i < this.content.length && !this.checkClose()) {
  20977. this.start = this.i;
  20978. this.state = this.attrName;
  20979. }
  20980. } else if (!this.checkClose("onTagName")) {
  20981. this.i++;
  20982. }
  20983. };
  20984. Lexer.prototype.attrName = function() {
  20985. let c2 = this.content[this.i];
  20986. if (blankChar[c2] || c2 === "=") {
  20987. this.handler.onAttrName(this.content.substring(this.start, this.i));
  20988. let needVal = c2 === "=";
  20989. const len = this.content.length;
  20990. while (++this.i < len) {
  20991. c2 = this.content[this.i];
  20992. if (!blankChar[c2]) {
  20993. if (this.checkClose())
  20994. return;
  20995. if (needVal) {
  20996. this.start = this.i;
  20997. this.state = this.attrVal;
  20998. return;
  20999. }
  21000. if (this.content[this.i] === "=") {
  21001. needVal = true;
  21002. } else {
  21003. this.start = this.i;
  21004. this.state = this.attrName;
  21005. return;
  21006. }
  21007. }
  21008. }
  21009. } else if (!this.checkClose("onAttrName")) {
  21010. this.i++;
  21011. }
  21012. };
  21013. Lexer.prototype.attrVal = function() {
  21014. const c2 = this.content[this.i];
  21015. const len = this.content.length;
  21016. if (c2 === '"' || c2 === "'") {
  21017. this.start = ++this.i;
  21018. this.i = this.content.indexOf(c2, this.i);
  21019. if (this.i === -1)
  21020. return;
  21021. this.handler.onAttrVal(this.content.substring(this.start, this.i));
  21022. } else {
  21023. for (; this.i < len; this.i++) {
  21024. if (blankChar[this.content[this.i]]) {
  21025. this.handler.onAttrVal(this.content.substring(this.start, this.i));
  21026. break;
  21027. } else if (this.checkClose("onAttrVal"))
  21028. return;
  21029. }
  21030. }
  21031. while (blankChar[this.content[++this.i]])
  21032. ;
  21033. if (this.i < len && !this.checkClose()) {
  21034. this.start = this.i;
  21035. this.state = this.attrName;
  21036. }
  21037. };
  21038. Lexer.prototype.endTag = function() {
  21039. const c2 = this.content[this.i];
  21040. if (blankChar[c2] || c2 === ">" || c2 === "/") {
  21041. this.handler.onCloseTag(this.content.substring(this.start, this.i));
  21042. if (c2 !== ">") {
  21043. this.i = this.content.indexOf(">", this.i);
  21044. if (this.i === -1)
  21045. return;
  21046. }
  21047. this.start = ++this.i;
  21048. this.state = this.text;
  21049. } else {
  21050. this.i++;
  21051. }
  21052. };
  21053. const plugins = [];
  21054. const _sfc_main$3o = {
  21055. name: "mp-html",
  21056. data() {
  21057. return {
  21058. nodes: []
  21059. };
  21060. },
  21061. props: {
  21062. containerStyle: {
  21063. type: String,
  21064. default: ""
  21065. },
  21066. content: {
  21067. type: String,
  21068. default: ""
  21069. },
  21070. copyLink: {
  21071. type: [Boolean, String],
  21072. default: true
  21073. },
  21074. domain: String,
  21075. errorImg: {
  21076. type: String,
  21077. default: ""
  21078. },
  21079. lazyLoad: {
  21080. type: [Boolean, String],
  21081. default: false
  21082. },
  21083. loadingImg: {
  21084. type: String,
  21085. default: ""
  21086. },
  21087. pauseVideo: {
  21088. type: [Boolean, String],
  21089. default: true
  21090. },
  21091. previewImg: {
  21092. type: [Boolean, String],
  21093. default: true
  21094. },
  21095. scrollTable: [Boolean, String],
  21096. selectable: [Boolean, String],
  21097. setTitle: {
  21098. type: [Boolean, String],
  21099. default: true
  21100. },
  21101. showImgMenu: {
  21102. type: [Boolean, String],
  21103. default: true
  21104. },
  21105. tagStyle: Object,
  21106. useAnchor: [Boolean, Number]
  21107. },
  21108. emits: ["load", "ready", "imgtap", "linktap", "play", "error"],
  21109. components: {
  21110. node
  21111. },
  21112. watch: {
  21113. content(content) {
  21114. this.setContent(content);
  21115. }
  21116. },
  21117. created() {
  21118. this.plugins = [];
  21119. for (let i2 = plugins.length; i2--; ) {
  21120. this.plugins.push(new plugins[i2](this));
  21121. }
  21122. },
  21123. mounted() {
  21124. if (this.content && !this.nodes.length) {
  21125. this.setContent(this.content);
  21126. }
  21127. },
  21128. beforeDestroy() {
  21129. this._hook("onDetached");
  21130. },
  21131. methods: {
  21132. /**
  21133. * @description 将锚点跳转的范围限定在一个 scroll-view 内
  21134. * @param {Object} page scroll-view 所在页面的示例
  21135. * @param {String} selector scroll-view 的选择器
  21136. * @param {String} scrollTop scroll-view scroll-top 属性绑定的变量名
  21137. */
  21138. in(page2, selector, scrollTop) {
  21139. if (page2 && selector && scrollTop) {
  21140. this._in = {
  21141. page: page2,
  21142. selector,
  21143. scrollTop
  21144. };
  21145. }
  21146. },
  21147. /**
  21148. * @description 锚点跳转
  21149. * @param {String} id 要跳转的锚点 id
  21150. * @param {Number} offset 跳转位置的偏移量
  21151. * @returns {Promise}
  21152. */
  21153. navigateTo(id, offset) {
  21154. return new Promise((resolve, reject) => {
  21155. if (!this.useAnchor) {
  21156. reject(Error("Anchor is disabled"));
  21157. return;
  21158. }
  21159. offset = offset || parseInt(this.useAnchor) || 0;
  21160. let deep = " ";
  21161. const selector = uni.createSelectorQuery().in(this._in ? this._in.page : this).select((this._in ? this._in.selector : "._root") + (id ? `${deep}#${id}` : "")).boundingClientRect();
  21162. if (this._in) {
  21163. selector.select(this._in.selector).scrollOffset().select(this._in.selector).boundingClientRect();
  21164. } else {
  21165. selector.selectViewport().scrollOffset();
  21166. }
  21167. selector.exec((res) => {
  21168. if (!res[0]) {
  21169. reject(Error("Label not found"));
  21170. return;
  21171. }
  21172. const scrollTop = res[1].scrollTop + res[0].top - (res[2] ? res[2].top : 0) + offset;
  21173. if (this._in) {
  21174. this._in.page[this._in.scrollTop] = scrollTop;
  21175. } else {
  21176. uni.pageScrollTo({
  21177. scrollTop,
  21178. duration: 300
  21179. });
  21180. }
  21181. resolve();
  21182. });
  21183. });
  21184. },
  21185. /**
  21186. * @description 获取文本内容
  21187. * @return {String}
  21188. */
  21189. getText(nodes) {
  21190. let text = "";
  21191. (function traversal(nodes2) {
  21192. for (let i2 = 0; i2 < nodes2.length; i2++) {
  21193. const node2 = nodes2[i2];
  21194. if (node2.type === "text") {
  21195. text += node2.text.replace(/&amp;/g, "&");
  21196. } else if (node2.name === "br") {
  21197. text += "\n";
  21198. } else {
  21199. const isBlock = node2.name === "p" || node2.name === "div" || node2.name === "tr" || node2.name === "li" || node2.name[0] === "h" && node2.name[1] > "0" && node2.name[1] < "7";
  21200. if (isBlock && text && text[text.length - 1] !== "\n") {
  21201. text += "\n";
  21202. }
  21203. if (node2.children) {
  21204. traversal(node2.children);
  21205. }
  21206. if (isBlock && text[text.length - 1] !== "\n") {
  21207. text += "\n";
  21208. } else if (node2.name === "td" || node2.name === "th") {
  21209. text += " ";
  21210. }
  21211. }
  21212. }
  21213. })(nodes || this.nodes);
  21214. return text;
  21215. },
  21216. /**
  21217. * @description 获取内容大小和位置
  21218. * @return {Promise}
  21219. */
  21220. getRect() {
  21221. return new Promise((resolve, reject) => {
  21222. uni.createSelectorQuery().in(this).select("#_root").boundingClientRect().exec((res) => res[0] ? resolve(res[0]) : reject(Error("Root label not found")));
  21223. });
  21224. },
  21225. /**
  21226. * @description 暂停播放媒体
  21227. */
  21228. pauseMedia() {
  21229. for (let i2 = (this._videos || []).length; i2--; ) {
  21230. this._videos[i2].pause();
  21231. }
  21232. const command = 'for(var e=document.getElementsByTagName("video"),i=e.length;i--;)e[i].pause()';
  21233. let page2 = this.$parent;
  21234. while (!page2.$scope)
  21235. page2 = page2.$parent;
  21236. page2.$scope.$getAppWebview().evalJS(command);
  21237. },
  21238. /**
  21239. * @description 设置媒体播放速率
  21240. * @param {Number} rate 播放速率
  21241. */
  21242. setPlaybackRate(rate) {
  21243. this.playbackRate = rate;
  21244. for (let i2 = (this._videos || []).length; i2--; ) {
  21245. this._videos[i2].playbackRate(rate);
  21246. }
  21247. const command = 'for(var e=document.getElementsByTagName("video"),i=e.length;i--;)e[i].playbackRate=' + rate;
  21248. let page2 = this.$parent;
  21249. while (!page2.$scope)
  21250. page2 = page2.$parent;
  21251. page2.$scope.$getAppWebview().evalJS(command);
  21252. },
  21253. /**
  21254. * @description 设置内容
  21255. * @param {String} content html 内容
  21256. * @param {Boolean} append 是否在尾部追加
  21257. */
  21258. setContent(content, append) {
  21259. if (!append || !this.imgList) {
  21260. this.imgList = [];
  21261. }
  21262. const nodes = new Parser(this).parse(content);
  21263. this.$set(this, "nodes", append ? (this.nodes || []).concat(nodes) : nodes);
  21264. this._videos = [];
  21265. this.$nextTick(() => {
  21266. this._hook("onLoad");
  21267. this.$emit("load");
  21268. });
  21269. if (this.lazyLoad || this.imgList._unloadimgs < this.imgList.length / 2) {
  21270. let height = 0;
  21271. const callback = (rect) => {
  21272. if (!rect || !rect.height)
  21273. rect = {};
  21274. if (rect.height === height) {
  21275. this.$emit("ready", rect);
  21276. } else {
  21277. height = rect.height;
  21278. setTimeout(() => {
  21279. this.getRect().then(callback).catch(callback);
  21280. }, 350);
  21281. }
  21282. };
  21283. this.getRect().then(callback).catch(callback);
  21284. } else {
  21285. if (!this.imgList._unloadimgs) {
  21286. this.getRect().then((rect) => {
  21287. this.$emit("ready", rect);
  21288. }).catch(() => {
  21289. this.$emit("ready", {});
  21290. });
  21291. }
  21292. }
  21293. },
  21294. /**
  21295. * @description 调用插件钩子函数
  21296. */
  21297. _hook(name2) {
  21298. for (let i2 = plugins.length; i2--; ) {
  21299. if (this.plugins[i2][name2]) {
  21300. this.plugins[i2][name2]();
  21301. }
  21302. }
  21303. }
  21304. }
  21305. };
  21306. function _sfc_render$3n(_ctx, _cache, $props, $setup, $data, $options) {
  21307. const _component_node = vue.resolveComponent("node");
  21308. return vue.openBlock(), vue.createElementBlock(
  21309. "view",
  21310. {
  21311. id: "_root",
  21312. class: vue.normalizeClass(($props.selectable ? "_select " : "") + "_root"),
  21313. style: vue.normalizeStyle($props.containerStyle)
  21314. },
  21315. [
  21316. !$data.nodes[0] ? vue.renderSlot(_ctx.$slots, "default", { key: 0 }, void 0, true) : (vue.openBlock(), vue.createBlock(_component_node, {
  21317. key: 1,
  21318. childs: $data.nodes,
  21319. opts: [$props.lazyLoad, $props.loadingImg, $props.errorImg, $props.showImgMenu, $props.selectable],
  21320. name: "span"
  21321. }, null, 8, ["childs", "opts"]))
  21322. ],
  21323. 6
  21324. /* CLASS, STYLE */
  21325. );
  21326. }
  21327. const __easycom_0$r = /* @__PURE__ */ _export_sfc(_sfc_main$3o, [["render", _sfc_render$3n], ["__scopeId", "data-v-a290f043"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/mp-html/components/mp-html/mp-html.vue"]]);
  21328. const _sfc_main$3n = {
  21329. __name: "su-status-bar",
  21330. setup(__props, { expose: __expose }) {
  21331. __expose();
  21332. const statusBarHeight = sheep$1.$platform.device.statusBarHeight + "px";
  21333. const __returned__ = { statusBarHeight, get sheep() {
  21334. return sheep$1;
  21335. } };
  21336. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  21337. return __returned__;
  21338. }
  21339. };
  21340. function _sfc_render$3m(_ctx, _cache, $props, $setup, $data, $options) {
  21341. return vue.openBlock(), vue.createElementBlock(
  21342. "view",
  21343. {
  21344. style: vue.normalizeStyle({ height: $setup.statusBarHeight }),
  21345. class: "uni-status-bar"
  21346. },
  21347. [
  21348. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  21349. ],
  21350. 4
  21351. /* STYLE */
  21352. );
  21353. }
  21354. const __easycom_0$q = /* @__PURE__ */ _export_sfc(_sfc_main$3n, [["render", _sfc_render$3m], ["__scopeId", "data-v-78e027a3"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/ui/su-status-bar/su-status-bar.vue"]]);
  21355. const icons = {
  21356. "id": "2852637",
  21357. "name": "uniui图标库",
  21358. "font_family": "uniicons",
  21359. "css_prefix_text": "uniui-",
  21360. "description": "",
  21361. "glyphs": [
  21362. {
  21363. "icon_id": "25027049",
  21364. "name": "yanse",
  21365. "font_class": "color",
  21366. "unicode": "e6cf",
  21367. "unicode_decimal": 59087
  21368. },
  21369. {
  21370. "icon_id": "25027048",
  21371. "name": "wallet",
  21372. "font_class": "wallet",
  21373. "unicode": "e6b1",
  21374. "unicode_decimal": 59057
  21375. },
  21376. {
  21377. "icon_id": "25015720",
  21378. "name": "settings-filled",
  21379. "font_class": "settings-filled",
  21380. "unicode": "e6ce",
  21381. "unicode_decimal": 59086
  21382. },
  21383. {
  21384. "icon_id": "25015434",
  21385. "name": "shimingrenzheng-filled",
  21386. "font_class": "auth-filled",
  21387. "unicode": "e6cc",
  21388. "unicode_decimal": 59084
  21389. },
  21390. {
  21391. "icon_id": "24934246",
  21392. "name": "shop-filled",
  21393. "font_class": "shop-filled",
  21394. "unicode": "e6cd",
  21395. "unicode_decimal": 59085
  21396. },
  21397. {
  21398. "icon_id": "24934159",
  21399. "name": "staff-filled-01",
  21400. "font_class": "staff-filled",
  21401. "unicode": "e6cb",
  21402. "unicode_decimal": 59083
  21403. },
  21404. {
  21405. "icon_id": "24932461",
  21406. "name": "VIP-filled",
  21407. "font_class": "vip-filled",
  21408. "unicode": "e6c6",
  21409. "unicode_decimal": 59078
  21410. },
  21411. {
  21412. "icon_id": "24932462",
  21413. "name": "plus_circle_fill",
  21414. "font_class": "plus-filled",
  21415. "unicode": "e6c7",
  21416. "unicode_decimal": 59079
  21417. },
  21418. {
  21419. "icon_id": "24932463",
  21420. "name": "folder_add-filled",
  21421. "font_class": "folder-add-filled",
  21422. "unicode": "e6c8",
  21423. "unicode_decimal": 59080
  21424. },
  21425. {
  21426. "icon_id": "24932464",
  21427. "name": "yanse-filled",
  21428. "font_class": "color-filled",
  21429. "unicode": "e6c9",
  21430. "unicode_decimal": 59081
  21431. },
  21432. {
  21433. "icon_id": "24932465",
  21434. "name": "tune-filled",
  21435. "font_class": "tune-filled",
  21436. "unicode": "e6ca",
  21437. "unicode_decimal": 59082
  21438. },
  21439. {
  21440. "icon_id": "24932455",
  21441. "name": "a-rilidaka-filled",
  21442. "font_class": "calendar-filled",
  21443. "unicode": "e6c0",
  21444. "unicode_decimal": 59072
  21445. },
  21446. {
  21447. "icon_id": "24932456",
  21448. "name": "notification-filled",
  21449. "font_class": "notification-filled",
  21450. "unicode": "e6c1",
  21451. "unicode_decimal": 59073
  21452. },
  21453. {
  21454. "icon_id": "24932457",
  21455. "name": "wallet-filled",
  21456. "font_class": "wallet-filled",
  21457. "unicode": "e6c2",
  21458. "unicode_decimal": 59074
  21459. },
  21460. {
  21461. "icon_id": "24932458",
  21462. "name": "paihangbang-filled",
  21463. "font_class": "medal-filled",
  21464. "unicode": "e6c3",
  21465. "unicode_decimal": 59075
  21466. },
  21467. {
  21468. "icon_id": "24932459",
  21469. "name": "gift-filled",
  21470. "font_class": "gift-filled",
  21471. "unicode": "e6c4",
  21472. "unicode_decimal": 59076
  21473. },
  21474. {
  21475. "icon_id": "24932460",
  21476. "name": "fire-filled",
  21477. "font_class": "fire-filled",
  21478. "unicode": "e6c5",
  21479. "unicode_decimal": 59077
  21480. },
  21481. {
  21482. "icon_id": "24928001",
  21483. "name": "refreshempty",
  21484. "font_class": "refreshempty",
  21485. "unicode": "e6bf",
  21486. "unicode_decimal": 59071
  21487. },
  21488. {
  21489. "icon_id": "24926853",
  21490. "name": "location-ellipse",
  21491. "font_class": "location-filled",
  21492. "unicode": "e6af",
  21493. "unicode_decimal": 59055
  21494. },
  21495. {
  21496. "icon_id": "24926735",
  21497. "name": "person-filled",
  21498. "font_class": "person-filled",
  21499. "unicode": "e69d",
  21500. "unicode_decimal": 59037
  21501. },
  21502. {
  21503. "icon_id": "24926703",
  21504. "name": "personadd-filled",
  21505. "font_class": "personadd-filled",
  21506. "unicode": "e698",
  21507. "unicode_decimal": 59032
  21508. },
  21509. {
  21510. "icon_id": "24923351",
  21511. "name": "back",
  21512. "font_class": "back",
  21513. "unicode": "e6b9",
  21514. "unicode_decimal": 59065
  21515. },
  21516. {
  21517. "icon_id": "24923352",
  21518. "name": "forward",
  21519. "font_class": "forward",
  21520. "unicode": "e6ba",
  21521. "unicode_decimal": 59066
  21522. },
  21523. {
  21524. "icon_id": "24923353",
  21525. "name": "arrowthinright",
  21526. "font_class": "arrow-right",
  21527. "unicode": "e6bb",
  21528. "unicode_decimal": 59067
  21529. },
  21530. {
  21531. "icon_id": "24923353",
  21532. "name": "arrowthinright",
  21533. "font_class": "arrowthinright",
  21534. "unicode": "e6bb",
  21535. "unicode_decimal": 59067
  21536. },
  21537. {
  21538. "icon_id": "24923354",
  21539. "name": "arrowthinleft",
  21540. "font_class": "arrow-left",
  21541. "unicode": "e6bc",
  21542. "unicode_decimal": 59068
  21543. },
  21544. {
  21545. "icon_id": "24923354",
  21546. "name": "arrowthinleft",
  21547. "font_class": "arrowthinleft",
  21548. "unicode": "e6bc",
  21549. "unicode_decimal": 59068
  21550. },
  21551. {
  21552. "icon_id": "24923355",
  21553. "name": "arrowthinup",
  21554. "font_class": "arrow-up",
  21555. "unicode": "e6bd",
  21556. "unicode_decimal": 59069
  21557. },
  21558. {
  21559. "icon_id": "24923355",
  21560. "name": "arrowthinup",
  21561. "font_class": "arrowthinup",
  21562. "unicode": "e6bd",
  21563. "unicode_decimal": 59069
  21564. },
  21565. {
  21566. "icon_id": "24923356",
  21567. "name": "arrowthindown",
  21568. "font_class": "arrow-down",
  21569. "unicode": "e6be",
  21570. "unicode_decimal": 59070
  21571. },
  21572. {
  21573. "icon_id": "24923356",
  21574. "name": "arrowthindown",
  21575. "font_class": "arrowthindown",
  21576. "unicode": "e6be",
  21577. "unicode_decimal": 59070
  21578. },
  21579. {
  21580. "icon_id": "24923349",
  21581. "name": "arrowdown",
  21582. "font_class": "bottom",
  21583. "unicode": "e6b8",
  21584. "unicode_decimal": 59064
  21585. },
  21586. {
  21587. "icon_id": "24923349",
  21588. "name": "arrowdown",
  21589. "font_class": "arrowdown",
  21590. "unicode": "e6b8",
  21591. "unicode_decimal": 59064
  21592. },
  21593. {
  21594. "icon_id": "24923346",
  21595. "name": "arrowright",
  21596. "font_class": "right",
  21597. "unicode": "e6b5",
  21598. "unicode_decimal": 59061
  21599. },
  21600. {
  21601. "icon_id": "24923346",
  21602. "name": "arrowright",
  21603. "font_class": "arrowright",
  21604. "unicode": "e6b5",
  21605. "unicode_decimal": 59061
  21606. },
  21607. {
  21608. "icon_id": "24923347",
  21609. "name": "arrowup",
  21610. "font_class": "top",
  21611. "unicode": "e6b6",
  21612. "unicode_decimal": 59062
  21613. },
  21614. {
  21615. "icon_id": "24923347",
  21616. "name": "arrowup",
  21617. "font_class": "arrowup",
  21618. "unicode": "e6b6",
  21619. "unicode_decimal": 59062
  21620. },
  21621. {
  21622. "icon_id": "24923348",
  21623. "name": "arrowleft",
  21624. "font_class": "left",
  21625. "unicode": "e6b7",
  21626. "unicode_decimal": 59063
  21627. },
  21628. {
  21629. "icon_id": "24923348",
  21630. "name": "arrowleft",
  21631. "font_class": "arrowleft",
  21632. "unicode": "e6b7",
  21633. "unicode_decimal": 59063
  21634. },
  21635. {
  21636. "icon_id": "24923334",
  21637. "name": "eye",
  21638. "font_class": "eye",
  21639. "unicode": "e651",
  21640. "unicode_decimal": 58961
  21641. },
  21642. {
  21643. "icon_id": "24923335",
  21644. "name": "eye-filled",
  21645. "font_class": "eye-filled",
  21646. "unicode": "e66a",
  21647. "unicode_decimal": 58986
  21648. },
  21649. {
  21650. "icon_id": "24923336",
  21651. "name": "eye-slash",
  21652. "font_class": "eye-slash",
  21653. "unicode": "e6b3",
  21654. "unicode_decimal": 59059
  21655. },
  21656. {
  21657. "icon_id": "24923337",
  21658. "name": "eye-slash-filled",
  21659. "font_class": "eye-slash-filled",
  21660. "unicode": "e6b4",
  21661. "unicode_decimal": 59060
  21662. },
  21663. {
  21664. "icon_id": "24923305",
  21665. "name": "info-filled",
  21666. "font_class": "info-filled",
  21667. "unicode": "e649",
  21668. "unicode_decimal": 58953
  21669. },
  21670. {
  21671. "icon_id": "24923299",
  21672. "name": "reload-01",
  21673. "font_class": "reload",
  21674. "unicode": "e6b2",
  21675. "unicode_decimal": 59058
  21676. },
  21677. {
  21678. "icon_id": "24923195",
  21679. "name": "mic_slash_fill",
  21680. "font_class": "micoff-filled",
  21681. "unicode": "e6b0",
  21682. "unicode_decimal": 59056
  21683. },
  21684. {
  21685. "icon_id": "24923165",
  21686. "name": "map-pin-ellipse",
  21687. "font_class": "map-pin-ellipse",
  21688. "unicode": "e6ac",
  21689. "unicode_decimal": 59052
  21690. },
  21691. {
  21692. "icon_id": "24923166",
  21693. "name": "map-pin",
  21694. "font_class": "map-pin",
  21695. "unicode": "e6ad",
  21696. "unicode_decimal": 59053
  21697. },
  21698. {
  21699. "icon_id": "24923167",
  21700. "name": "location",
  21701. "font_class": "location",
  21702. "unicode": "e6ae",
  21703. "unicode_decimal": 59054
  21704. },
  21705. {
  21706. "icon_id": "24923064",
  21707. "name": "starhalf",
  21708. "font_class": "starhalf",
  21709. "unicode": "e683",
  21710. "unicode_decimal": 59011
  21711. },
  21712. {
  21713. "icon_id": "24923065",
  21714. "name": "star",
  21715. "font_class": "star",
  21716. "unicode": "e688",
  21717. "unicode_decimal": 59016
  21718. },
  21719. {
  21720. "icon_id": "24923066",
  21721. "name": "star-filled",
  21722. "font_class": "star-filled",
  21723. "unicode": "e68f",
  21724. "unicode_decimal": 59023
  21725. },
  21726. {
  21727. "icon_id": "24899646",
  21728. "name": "a-rilidaka",
  21729. "font_class": "calendar",
  21730. "unicode": "e6a0",
  21731. "unicode_decimal": 59040
  21732. },
  21733. {
  21734. "icon_id": "24899647",
  21735. "name": "fire",
  21736. "font_class": "fire",
  21737. "unicode": "e6a1",
  21738. "unicode_decimal": 59041
  21739. },
  21740. {
  21741. "icon_id": "24899648",
  21742. "name": "paihangbang",
  21743. "font_class": "medal",
  21744. "unicode": "e6a2",
  21745. "unicode_decimal": 59042
  21746. },
  21747. {
  21748. "icon_id": "24899649",
  21749. "name": "font",
  21750. "font_class": "font",
  21751. "unicode": "e6a3",
  21752. "unicode_decimal": 59043
  21753. },
  21754. {
  21755. "icon_id": "24899650",
  21756. "name": "gift",
  21757. "font_class": "gift",
  21758. "unicode": "e6a4",
  21759. "unicode_decimal": 59044
  21760. },
  21761. {
  21762. "icon_id": "24899651",
  21763. "name": "link",
  21764. "font_class": "link",
  21765. "unicode": "e6a5",
  21766. "unicode_decimal": 59045
  21767. },
  21768. {
  21769. "icon_id": "24899652",
  21770. "name": "notification",
  21771. "font_class": "notification",
  21772. "unicode": "e6a6",
  21773. "unicode_decimal": 59046
  21774. },
  21775. {
  21776. "icon_id": "24899653",
  21777. "name": "staff",
  21778. "font_class": "staff",
  21779. "unicode": "e6a7",
  21780. "unicode_decimal": 59047
  21781. },
  21782. {
  21783. "icon_id": "24899654",
  21784. "name": "VIP",
  21785. "font_class": "vip",
  21786. "unicode": "e6a8",
  21787. "unicode_decimal": 59048
  21788. },
  21789. {
  21790. "icon_id": "24899655",
  21791. "name": "folder_add",
  21792. "font_class": "folder-add",
  21793. "unicode": "e6a9",
  21794. "unicode_decimal": 59049
  21795. },
  21796. {
  21797. "icon_id": "24899656",
  21798. "name": "tune",
  21799. "font_class": "tune",
  21800. "unicode": "e6aa",
  21801. "unicode_decimal": 59050
  21802. },
  21803. {
  21804. "icon_id": "24899657",
  21805. "name": "shimingrenzheng",
  21806. "font_class": "auth",
  21807. "unicode": "e6ab",
  21808. "unicode_decimal": 59051
  21809. },
  21810. {
  21811. "icon_id": "24899565",
  21812. "name": "person",
  21813. "font_class": "person",
  21814. "unicode": "e699",
  21815. "unicode_decimal": 59033
  21816. },
  21817. {
  21818. "icon_id": "24899566",
  21819. "name": "email-filled",
  21820. "font_class": "email-filled",
  21821. "unicode": "e69a",
  21822. "unicode_decimal": 59034
  21823. },
  21824. {
  21825. "icon_id": "24899567",
  21826. "name": "phone-filled",
  21827. "font_class": "phone-filled",
  21828. "unicode": "e69b",
  21829. "unicode_decimal": 59035
  21830. },
  21831. {
  21832. "icon_id": "24899568",
  21833. "name": "phone",
  21834. "font_class": "phone",
  21835. "unicode": "e69c",
  21836. "unicode_decimal": 59036
  21837. },
  21838. {
  21839. "icon_id": "24899570",
  21840. "name": "email",
  21841. "font_class": "email",
  21842. "unicode": "e69e",
  21843. "unicode_decimal": 59038
  21844. },
  21845. {
  21846. "icon_id": "24899571",
  21847. "name": "personadd",
  21848. "font_class": "personadd",
  21849. "unicode": "e69f",
  21850. "unicode_decimal": 59039
  21851. },
  21852. {
  21853. "icon_id": "24899558",
  21854. "name": "chatboxes-filled",
  21855. "font_class": "chatboxes-filled",
  21856. "unicode": "e692",
  21857. "unicode_decimal": 59026
  21858. },
  21859. {
  21860. "icon_id": "24899559",
  21861. "name": "contact",
  21862. "font_class": "contact",
  21863. "unicode": "e693",
  21864. "unicode_decimal": 59027
  21865. },
  21866. {
  21867. "icon_id": "24899560",
  21868. "name": "chatbubble-filled",
  21869. "font_class": "chatbubble-filled",
  21870. "unicode": "e694",
  21871. "unicode_decimal": 59028
  21872. },
  21873. {
  21874. "icon_id": "24899561",
  21875. "name": "contact-filled",
  21876. "font_class": "contact-filled",
  21877. "unicode": "e695",
  21878. "unicode_decimal": 59029
  21879. },
  21880. {
  21881. "icon_id": "24899562",
  21882. "name": "chatboxes",
  21883. "font_class": "chatboxes",
  21884. "unicode": "e696",
  21885. "unicode_decimal": 59030
  21886. },
  21887. {
  21888. "icon_id": "24899563",
  21889. "name": "chatbubble",
  21890. "font_class": "chatbubble",
  21891. "unicode": "e697",
  21892. "unicode_decimal": 59031
  21893. },
  21894. {
  21895. "icon_id": "24881290",
  21896. "name": "upload-filled",
  21897. "font_class": "upload-filled",
  21898. "unicode": "e68e",
  21899. "unicode_decimal": 59022
  21900. },
  21901. {
  21902. "icon_id": "24881292",
  21903. "name": "upload",
  21904. "font_class": "upload",
  21905. "unicode": "e690",
  21906. "unicode_decimal": 59024
  21907. },
  21908. {
  21909. "icon_id": "24881293",
  21910. "name": "weixin",
  21911. "font_class": "weixin",
  21912. "unicode": "e691",
  21913. "unicode_decimal": 59025
  21914. },
  21915. {
  21916. "icon_id": "24881274",
  21917. "name": "compose",
  21918. "font_class": "compose",
  21919. "unicode": "e67f",
  21920. "unicode_decimal": 59007
  21921. },
  21922. {
  21923. "icon_id": "24881275",
  21924. "name": "qq",
  21925. "font_class": "qq",
  21926. "unicode": "e680",
  21927. "unicode_decimal": 59008
  21928. },
  21929. {
  21930. "icon_id": "24881276",
  21931. "name": "download-filled",
  21932. "font_class": "download-filled",
  21933. "unicode": "e681",
  21934. "unicode_decimal": 59009
  21935. },
  21936. {
  21937. "icon_id": "24881277",
  21938. "name": "pengyouquan",
  21939. "font_class": "pyq",
  21940. "unicode": "e682",
  21941. "unicode_decimal": 59010
  21942. },
  21943. {
  21944. "icon_id": "24881279",
  21945. "name": "sound",
  21946. "font_class": "sound",
  21947. "unicode": "e684",
  21948. "unicode_decimal": 59012
  21949. },
  21950. {
  21951. "icon_id": "24881280",
  21952. "name": "trash-filled",
  21953. "font_class": "trash-filled",
  21954. "unicode": "e685",
  21955. "unicode_decimal": 59013
  21956. },
  21957. {
  21958. "icon_id": "24881281",
  21959. "name": "sound-filled",
  21960. "font_class": "sound-filled",
  21961. "unicode": "e686",
  21962. "unicode_decimal": 59014
  21963. },
  21964. {
  21965. "icon_id": "24881282",
  21966. "name": "trash",
  21967. "font_class": "trash",
  21968. "unicode": "e687",
  21969. "unicode_decimal": 59015
  21970. },
  21971. {
  21972. "icon_id": "24881284",
  21973. "name": "videocam-filled",
  21974. "font_class": "videocam-filled",
  21975. "unicode": "e689",
  21976. "unicode_decimal": 59017
  21977. },
  21978. {
  21979. "icon_id": "24881285",
  21980. "name": "spinner-cycle",
  21981. "font_class": "spinner-cycle",
  21982. "unicode": "e68a",
  21983. "unicode_decimal": 59018
  21984. },
  21985. {
  21986. "icon_id": "24881286",
  21987. "name": "weibo",
  21988. "font_class": "weibo",
  21989. "unicode": "e68b",
  21990. "unicode_decimal": 59019
  21991. },
  21992. {
  21993. "icon_id": "24881288",
  21994. "name": "videocam",
  21995. "font_class": "videocam",
  21996. "unicode": "e68c",
  21997. "unicode_decimal": 59020
  21998. },
  21999. {
  22000. "icon_id": "24881289",
  22001. "name": "download",
  22002. "font_class": "download",
  22003. "unicode": "e68d",
  22004. "unicode_decimal": 59021
  22005. },
  22006. {
  22007. "icon_id": "24879601",
  22008. "name": "help",
  22009. "font_class": "help",
  22010. "unicode": "e679",
  22011. "unicode_decimal": 59001
  22012. },
  22013. {
  22014. "icon_id": "24879602",
  22015. "name": "navigate-filled",
  22016. "font_class": "navigate-filled",
  22017. "unicode": "e67a",
  22018. "unicode_decimal": 59002
  22019. },
  22020. {
  22021. "icon_id": "24879603",
  22022. "name": "plusempty",
  22023. "font_class": "plusempty",
  22024. "unicode": "e67b",
  22025. "unicode_decimal": 59003
  22026. },
  22027. {
  22028. "icon_id": "24879604",
  22029. "name": "smallcircle",
  22030. "font_class": "smallcircle",
  22031. "unicode": "e67c",
  22032. "unicode_decimal": 59004
  22033. },
  22034. {
  22035. "icon_id": "24879605",
  22036. "name": "minus-filled",
  22037. "font_class": "minus-filled",
  22038. "unicode": "e67d",
  22039. "unicode_decimal": 59005
  22040. },
  22041. {
  22042. "icon_id": "24879606",
  22043. "name": "micoff",
  22044. "font_class": "micoff",
  22045. "unicode": "e67e",
  22046. "unicode_decimal": 59006
  22047. },
  22048. {
  22049. "icon_id": "24879588",
  22050. "name": "closeempty",
  22051. "font_class": "closeempty",
  22052. "unicode": "e66c",
  22053. "unicode_decimal": 58988
  22054. },
  22055. {
  22056. "icon_id": "24879589",
  22057. "name": "clear",
  22058. "font_class": "clear",
  22059. "unicode": "e66d",
  22060. "unicode_decimal": 58989
  22061. },
  22062. {
  22063. "icon_id": "24879590",
  22064. "name": "navigate",
  22065. "font_class": "navigate",
  22066. "unicode": "e66e",
  22067. "unicode_decimal": 58990
  22068. },
  22069. {
  22070. "icon_id": "24879591",
  22071. "name": "minus",
  22072. "font_class": "minus",
  22073. "unicode": "e66f",
  22074. "unicode_decimal": 58991
  22075. },
  22076. {
  22077. "icon_id": "24879592",
  22078. "name": "image",
  22079. "font_class": "image",
  22080. "unicode": "e670",
  22081. "unicode_decimal": 58992
  22082. },
  22083. {
  22084. "icon_id": "24879593",
  22085. "name": "mic",
  22086. "font_class": "mic",
  22087. "unicode": "e671",
  22088. "unicode_decimal": 58993
  22089. },
  22090. {
  22091. "icon_id": "24879594",
  22092. "name": "paperplane",
  22093. "font_class": "paperplane",
  22094. "unicode": "e672",
  22095. "unicode_decimal": 58994
  22096. },
  22097. {
  22098. "icon_id": "24879595",
  22099. "name": "close",
  22100. "font_class": "close",
  22101. "unicode": "e673",
  22102. "unicode_decimal": 58995
  22103. },
  22104. {
  22105. "icon_id": "24879596",
  22106. "name": "help-filled",
  22107. "font_class": "help-filled",
  22108. "unicode": "e674",
  22109. "unicode_decimal": 58996
  22110. },
  22111. {
  22112. "icon_id": "24879597",
  22113. "name": "plus-filled",
  22114. "font_class": "paperplane-filled",
  22115. "unicode": "e675",
  22116. "unicode_decimal": 58997
  22117. },
  22118. {
  22119. "icon_id": "24879598",
  22120. "name": "plus",
  22121. "font_class": "plus",
  22122. "unicode": "e676",
  22123. "unicode_decimal": 58998
  22124. },
  22125. {
  22126. "icon_id": "24879599",
  22127. "name": "mic-filled",
  22128. "font_class": "mic-filled",
  22129. "unicode": "e677",
  22130. "unicode_decimal": 58999
  22131. },
  22132. {
  22133. "icon_id": "24879600",
  22134. "name": "image-filled",
  22135. "font_class": "image-filled",
  22136. "unicode": "e678",
  22137. "unicode_decimal": 59e3
  22138. },
  22139. {
  22140. "icon_id": "24855900",
  22141. "name": "locked-filled",
  22142. "font_class": "locked-filled",
  22143. "unicode": "e668",
  22144. "unicode_decimal": 58984
  22145. },
  22146. {
  22147. "icon_id": "24855901",
  22148. "name": "info",
  22149. "font_class": "info",
  22150. "unicode": "e669",
  22151. "unicode_decimal": 58985
  22152. },
  22153. {
  22154. "icon_id": "24855903",
  22155. "name": "locked",
  22156. "font_class": "locked",
  22157. "unicode": "e66b",
  22158. "unicode_decimal": 58987
  22159. },
  22160. {
  22161. "icon_id": "24855884",
  22162. "name": "camera-filled",
  22163. "font_class": "camera-filled",
  22164. "unicode": "e658",
  22165. "unicode_decimal": 58968
  22166. },
  22167. {
  22168. "icon_id": "24855885",
  22169. "name": "chat-filled",
  22170. "font_class": "chat-filled",
  22171. "unicode": "e659",
  22172. "unicode_decimal": 58969
  22173. },
  22174. {
  22175. "icon_id": "24855886",
  22176. "name": "camera",
  22177. "font_class": "camera",
  22178. "unicode": "e65a",
  22179. "unicode_decimal": 58970
  22180. },
  22181. {
  22182. "icon_id": "24855887",
  22183. "name": "circle",
  22184. "font_class": "circle",
  22185. "unicode": "e65b",
  22186. "unicode_decimal": 58971
  22187. },
  22188. {
  22189. "icon_id": "24855888",
  22190. "name": "checkmarkempty",
  22191. "font_class": "checkmarkempty",
  22192. "unicode": "e65c",
  22193. "unicode_decimal": 58972
  22194. },
  22195. {
  22196. "icon_id": "24855889",
  22197. "name": "chat",
  22198. "font_class": "chat",
  22199. "unicode": "e65d",
  22200. "unicode_decimal": 58973
  22201. },
  22202. {
  22203. "icon_id": "24855890",
  22204. "name": "circle-filled",
  22205. "font_class": "circle-filled",
  22206. "unicode": "e65e",
  22207. "unicode_decimal": 58974
  22208. },
  22209. {
  22210. "icon_id": "24855891",
  22211. "name": "flag",
  22212. "font_class": "flag",
  22213. "unicode": "e65f",
  22214. "unicode_decimal": 58975
  22215. },
  22216. {
  22217. "icon_id": "24855892",
  22218. "name": "flag-filled",
  22219. "font_class": "flag-filled",
  22220. "unicode": "e660",
  22221. "unicode_decimal": 58976
  22222. },
  22223. {
  22224. "icon_id": "24855893",
  22225. "name": "gear-filled",
  22226. "font_class": "gear-filled",
  22227. "unicode": "e661",
  22228. "unicode_decimal": 58977
  22229. },
  22230. {
  22231. "icon_id": "24855894",
  22232. "name": "home",
  22233. "font_class": "home",
  22234. "unicode": "e662",
  22235. "unicode_decimal": 58978
  22236. },
  22237. {
  22238. "icon_id": "24855895",
  22239. "name": "home-filled",
  22240. "font_class": "home-filled",
  22241. "unicode": "e663",
  22242. "unicode_decimal": 58979
  22243. },
  22244. {
  22245. "icon_id": "24855896",
  22246. "name": "gear",
  22247. "font_class": "gear",
  22248. "unicode": "e664",
  22249. "unicode_decimal": 58980
  22250. },
  22251. {
  22252. "icon_id": "24855897",
  22253. "name": "smallcircle-filled",
  22254. "font_class": "smallcircle-filled",
  22255. "unicode": "e665",
  22256. "unicode_decimal": 58981
  22257. },
  22258. {
  22259. "icon_id": "24855898",
  22260. "name": "map-filled",
  22261. "font_class": "map-filled",
  22262. "unicode": "e666",
  22263. "unicode_decimal": 58982
  22264. },
  22265. {
  22266. "icon_id": "24855899",
  22267. "name": "map",
  22268. "font_class": "map",
  22269. "unicode": "e667",
  22270. "unicode_decimal": 58983
  22271. },
  22272. {
  22273. "icon_id": "24855825",
  22274. "name": "refresh-filled",
  22275. "font_class": "refresh-filled",
  22276. "unicode": "e656",
  22277. "unicode_decimal": 58966
  22278. },
  22279. {
  22280. "icon_id": "24855826",
  22281. "name": "refresh",
  22282. "font_class": "refresh",
  22283. "unicode": "e657",
  22284. "unicode_decimal": 58967
  22285. },
  22286. {
  22287. "icon_id": "24855808",
  22288. "name": "cloud-upload",
  22289. "font_class": "cloud-upload",
  22290. "unicode": "e645",
  22291. "unicode_decimal": 58949
  22292. },
  22293. {
  22294. "icon_id": "24855809",
  22295. "name": "cloud-download-filled",
  22296. "font_class": "cloud-download-filled",
  22297. "unicode": "e646",
  22298. "unicode_decimal": 58950
  22299. },
  22300. {
  22301. "icon_id": "24855810",
  22302. "name": "cloud-download",
  22303. "font_class": "cloud-download",
  22304. "unicode": "e647",
  22305. "unicode_decimal": 58951
  22306. },
  22307. {
  22308. "icon_id": "24855811",
  22309. "name": "cloud-upload-filled",
  22310. "font_class": "cloud-upload-filled",
  22311. "unicode": "e648",
  22312. "unicode_decimal": 58952
  22313. },
  22314. {
  22315. "icon_id": "24855813",
  22316. "name": "redo",
  22317. "font_class": "redo",
  22318. "unicode": "e64a",
  22319. "unicode_decimal": 58954
  22320. },
  22321. {
  22322. "icon_id": "24855814",
  22323. "name": "images-filled",
  22324. "font_class": "images-filled",
  22325. "unicode": "e64b",
  22326. "unicode_decimal": 58955
  22327. },
  22328. {
  22329. "icon_id": "24855815",
  22330. "name": "undo-filled",
  22331. "font_class": "undo-filled",
  22332. "unicode": "e64c",
  22333. "unicode_decimal": 58956
  22334. },
  22335. {
  22336. "icon_id": "24855816",
  22337. "name": "more",
  22338. "font_class": "more",
  22339. "unicode": "e64d",
  22340. "unicode_decimal": 58957
  22341. },
  22342. {
  22343. "icon_id": "24855817",
  22344. "name": "more-filled",
  22345. "font_class": "more-filled",
  22346. "unicode": "e64e",
  22347. "unicode_decimal": 58958
  22348. },
  22349. {
  22350. "icon_id": "24855818",
  22351. "name": "undo",
  22352. "font_class": "undo",
  22353. "unicode": "e64f",
  22354. "unicode_decimal": 58959
  22355. },
  22356. {
  22357. "icon_id": "24855819",
  22358. "name": "images",
  22359. "font_class": "images",
  22360. "unicode": "e650",
  22361. "unicode_decimal": 58960
  22362. },
  22363. {
  22364. "icon_id": "24855821",
  22365. "name": "paperclip",
  22366. "font_class": "paperclip",
  22367. "unicode": "e652",
  22368. "unicode_decimal": 58962
  22369. },
  22370. {
  22371. "icon_id": "24855822",
  22372. "name": "settings",
  22373. "font_class": "settings",
  22374. "unicode": "e653",
  22375. "unicode_decimal": 58963
  22376. },
  22377. {
  22378. "icon_id": "24855823",
  22379. "name": "search",
  22380. "font_class": "search",
  22381. "unicode": "e654",
  22382. "unicode_decimal": 58964
  22383. },
  22384. {
  22385. "icon_id": "24855824",
  22386. "name": "redo-filled",
  22387. "font_class": "redo-filled",
  22388. "unicode": "e655",
  22389. "unicode_decimal": 58965
  22390. },
  22391. {
  22392. "icon_id": "24841702",
  22393. "name": "list",
  22394. "font_class": "list",
  22395. "unicode": "e644",
  22396. "unicode_decimal": 58948
  22397. },
  22398. {
  22399. "icon_id": "24841489",
  22400. "name": "mail-open-filled",
  22401. "font_class": "mail-open-filled",
  22402. "unicode": "e63a",
  22403. "unicode_decimal": 58938
  22404. },
  22405. {
  22406. "icon_id": "24841491",
  22407. "name": "hand-thumbsdown-filled",
  22408. "font_class": "hand-down-filled",
  22409. "unicode": "e63c",
  22410. "unicode_decimal": 58940
  22411. },
  22412. {
  22413. "icon_id": "24841492",
  22414. "name": "hand-thumbsdown",
  22415. "font_class": "hand-down",
  22416. "unicode": "e63d",
  22417. "unicode_decimal": 58941
  22418. },
  22419. {
  22420. "icon_id": "24841493",
  22421. "name": "hand-thumbsup-filled",
  22422. "font_class": "hand-up-filled",
  22423. "unicode": "e63e",
  22424. "unicode_decimal": 58942
  22425. },
  22426. {
  22427. "icon_id": "24841494",
  22428. "name": "hand-thumbsup",
  22429. "font_class": "hand-up",
  22430. "unicode": "e63f",
  22431. "unicode_decimal": 58943
  22432. },
  22433. {
  22434. "icon_id": "24841496",
  22435. "name": "heart-filled",
  22436. "font_class": "heart-filled",
  22437. "unicode": "e641",
  22438. "unicode_decimal": 58945
  22439. },
  22440. {
  22441. "icon_id": "24841498",
  22442. "name": "mail-open",
  22443. "font_class": "mail-open",
  22444. "unicode": "e643",
  22445. "unicode_decimal": 58947
  22446. },
  22447. {
  22448. "icon_id": "24841488",
  22449. "name": "heart",
  22450. "font_class": "heart",
  22451. "unicode": "e639",
  22452. "unicode_decimal": 58937
  22453. },
  22454. {
  22455. "icon_id": "24839963",
  22456. "name": "loop",
  22457. "font_class": "loop",
  22458. "unicode": "e633",
  22459. "unicode_decimal": 58931
  22460. },
  22461. {
  22462. "icon_id": "24839866",
  22463. "name": "pulldown",
  22464. "font_class": "pulldown",
  22465. "unicode": "e632",
  22466. "unicode_decimal": 58930
  22467. },
  22468. {
  22469. "icon_id": "24813798",
  22470. "name": "scan",
  22471. "font_class": "scan",
  22472. "unicode": "e62a",
  22473. "unicode_decimal": 58922
  22474. },
  22475. {
  22476. "icon_id": "24813786",
  22477. "name": "bars",
  22478. "font_class": "bars",
  22479. "unicode": "e627",
  22480. "unicode_decimal": 58919
  22481. },
  22482. {
  22483. "icon_id": "24813788",
  22484. "name": "cart-filled",
  22485. "font_class": "cart-filled",
  22486. "unicode": "e629",
  22487. "unicode_decimal": 58921
  22488. },
  22489. {
  22490. "icon_id": "24813790",
  22491. "name": "checkbox",
  22492. "font_class": "checkbox",
  22493. "unicode": "e62b",
  22494. "unicode_decimal": 58923
  22495. },
  22496. {
  22497. "icon_id": "24813791",
  22498. "name": "checkbox-filled",
  22499. "font_class": "checkbox-filled",
  22500. "unicode": "e62c",
  22501. "unicode_decimal": 58924
  22502. },
  22503. {
  22504. "icon_id": "24813794",
  22505. "name": "shop",
  22506. "font_class": "shop",
  22507. "unicode": "e62f",
  22508. "unicode_decimal": 58927
  22509. },
  22510. {
  22511. "icon_id": "24813795",
  22512. "name": "headphones",
  22513. "font_class": "headphones",
  22514. "unicode": "e630",
  22515. "unicode_decimal": 58928
  22516. },
  22517. {
  22518. "icon_id": "24813796",
  22519. "name": "cart",
  22520. "font_class": "cart",
  22521. "unicode": "e631",
  22522. "unicode_decimal": 58929
  22523. }
  22524. ]
  22525. };
  22526. const getVal = (val) => {
  22527. const reg = /^[0-9]*$/g;
  22528. return typeof val === "number" || reg.test(val) ? val + "px" : val;
  22529. };
  22530. const _sfc_main$3m = {
  22531. name: "UniIcons",
  22532. emits: ["click"],
  22533. props: {
  22534. type: {
  22535. type: String,
  22536. default: ""
  22537. },
  22538. color: {
  22539. type: String,
  22540. default: "#333333"
  22541. },
  22542. size: {
  22543. type: [Number, String],
  22544. default: 16
  22545. },
  22546. customPrefix: {
  22547. type: String,
  22548. default: ""
  22549. }
  22550. },
  22551. data() {
  22552. return {
  22553. icons: icons.glyphs
  22554. };
  22555. },
  22556. computed: {
  22557. unicode() {
  22558. let code2 = this.icons.find((v2) => v2.font_class === this.type);
  22559. if (code2) {
  22560. return unescape(`%u${code2.unicode}`);
  22561. }
  22562. return "";
  22563. },
  22564. iconSize() {
  22565. return getVal(this.size);
  22566. }
  22567. },
  22568. methods: {
  22569. _onClick() {
  22570. this.$emit("click");
  22571. }
  22572. }
  22573. };
  22574. function _sfc_render$3l(_ctx, _cache, $props, $setup, $data, $options) {
  22575. return vue.openBlock(), vue.createElementBlock(
  22576. "text",
  22577. {
  22578. style: vue.normalizeStyle({ color: $props.color, "font-size": $options.iconSize }),
  22579. class: vue.normalizeClass(["uni-icons", ["uniui-" + $props.type, $props.customPrefix, $props.customPrefix ? $props.type : ""]]),
  22580. onClick: _cache[0] || (_cache[0] = (...args) => $options._onClick && $options._onClick(...args))
  22581. },
  22582. null,
  22583. 6
  22584. /* CLASS, STYLE */
  22585. );
  22586. }
  22587. const __easycom_1$b = /* @__PURE__ */ _export_sfc(_sfc_main$3m, [["render", _sfc_render$3l], ["__scopeId", "data-v-d31e1c47"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-icons/components/uni-icons/uni-icons.vue"]]);
  22588. const isObject$3 = (val) => val !== null && typeof val === "object";
  22589. const defaultDelimiters = ["{", "}"];
  22590. class BaseFormatter {
  22591. constructor() {
  22592. this._caches = /* @__PURE__ */ Object.create(null);
  22593. }
  22594. interpolate(message, values, delimiters = defaultDelimiters) {
  22595. if (!values) {
  22596. return [message];
  22597. }
  22598. let tokens = this._caches[message];
  22599. if (!tokens) {
  22600. tokens = parse$1(message, delimiters);
  22601. this._caches[message] = tokens;
  22602. }
  22603. return compile(tokens, values);
  22604. }
  22605. }
  22606. const RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  22607. const RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  22608. function parse$1(format2, [startDelimiter, endDelimiter]) {
  22609. const tokens = [];
  22610. let position = 0;
  22611. let text = "";
  22612. while (position < format2.length) {
  22613. let char = format2[position++];
  22614. if (char === startDelimiter) {
  22615. if (text) {
  22616. tokens.push({ type: "text", value: text });
  22617. }
  22618. text = "";
  22619. let sub = "";
  22620. char = format2[position++];
  22621. while (char !== void 0 && char !== endDelimiter) {
  22622. sub += char;
  22623. char = format2[position++];
  22624. }
  22625. const isClosed = char === endDelimiter;
  22626. const type = RE_TOKEN_LIST_VALUE.test(sub) ? "list" : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? "named" : "unknown";
  22627. tokens.push({ value: sub, type });
  22628. } else {
  22629. text += char;
  22630. }
  22631. }
  22632. text && tokens.push({ type: "text", value: text });
  22633. return tokens;
  22634. }
  22635. function compile(tokens, values) {
  22636. const compiled = [];
  22637. let index2 = 0;
  22638. const mode = Array.isArray(values) ? "list" : isObject$3(values) ? "named" : "unknown";
  22639. if (mode === "unknown") {
  22640. return compiled;
  22641. }
  22642. while (index2 < tokens.length) {
  22643. const token = tokens[index2];
  22644. switch (token.type) {
  22645. case "text":
  22646. compiled.push(token.value);
  22647. break;
  22648. case "list":
  22649. compiled.push(values[parseInt(token.value, 10)]);
  22650. break;
  22651. case "named":
  22652. if (mode === "named") {
  22653. compiled.push(values[token.value]);
  22654. } else {
  22655. {
  22656. console.warn(`Type of token '${token.type}' and format of value '${mode}' don't match!`);
  22657. }
  22658. }
  22659. break;
  22660. case "unknown":
  22661. {
  22662. console.warn(`Detect 'unknown' type of token!`);
  22663. }
  22664. break;
  22665. }
  22666. index2++;
  22667. }
  22668. return compiled;
  22669. }
  22670. const LOCALE_ZH_HANS = "zh-Hans";
  22671. const LOCALE_ZH_HANT = "zh-Hant";
  22672. const LOCALE_EN = "en";
  22673. const LOCALE_FR = "fr";
  22674. const LOCALE_ES = "es";
  22675. const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
  22676. const hasOwn = (val, key) => hasOwnProperty$1.call(val, key);
  22677. const defaultFormatter = new BaseFormatter();
  22678. function include(str, parts) {
  22679. return !!parts.find((part) => str.indexOf(part) !== -1);
  22680. }
  22681. function startsWith(str, parts) {
  22682. return parts.find((part) => str.indexOf(part) === 0);
  22683. }
  22684. function normalizeLocale(locale, messages2) {
  22685. if (!locale) {
  22686. return;
  22687. }
  22688. locale = locale.trim().replace(/_/g, "-");
  22689. if (messages2 && messages2[locale]) {
  22690. return locale;
  22691. }
  22692. locale = locale.toLowerCase();
  22693. if (locale === "chinese") {
  22694. return LOCALE_ZH_HANS;
  22695. }
  22696. if (locale.indexOf("zh") === 0) {
  22697. if (locale.indexOf("-hans") > -1) {
  22698. return LOCALE_ZH_HANS;
  22699. }
  22700. if (locale.indexOf("-hant") > -1) {
  22701. return LOCALE_ZH_HANT;
  22702. }
  22703. if (include(locale, ["-tw", "-hk", "-mo", "-cht"])) {
  22704. return LOCALE_ZH_HANT;
  22705. }
  22706. return LOCALE_ZH_HANS;
  22707. }
  22708. let locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
  22709. if (messages2 && Object.keys(messages2).length > 0) {
  22710. locales = Object.keys(messages2);
  22711. }
  22712. const lang = startsWith(locale, locales);
  22713. if (lang) {
  22714. return lang;
  22715. }
  22716. }
  22717. class I18n {
  22718. constructor({ locale, fallbackLocale, messages: messages2, watcher, formater: formater2 }) {
  22719. this.locale = LOCALE_EN;
  22720. this.fallbackLocale = LOCALE_EN;
  22721. this.message = {};
  22722. this.messages = {};
  22723. this.watchers = [];
  22724. if (fallbackLocale) {
  22725. this.fallbackLocale = fallbackLocale;
  22726. }
  22727. this.formater = formater2 || defaultFormatter;
  22728. this.messages = messages2 || {};
  22729. this.setLocale(locale || LOCALE_EN);
  22730. if (watcher) {
  22731. this.watchLocale(watcher);
  22732. }
  22733. }
  22734. setLocale(locale) {
  22735. const oldLocale = this.locale;
  22736. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  22737. if (!this.messages[this.locale]) {
  22738. this.messages[this.locale] = {};
  22739. }
  22740. this.message = this.messages[this.locale];
  22741. if (oldLocale !== this.locale) {
  22742. this.watchers.forEach((watcher) => {
  22743. watcher(this.locale, oldLocale);
  22744. });
  22745. }
  22746. }
  22747. getLocale() {
  22748. return this.locale;
  22749. }
  22750. watchLocale(fn) {
  22751. const index2 = this.watchers.push(fn) - 1;
  22752. return () => {
  22753. this.watchers.splice(index2, 1);
  22754. };
  22755. }
  22756. add(locale, message, override = true) {
  22757. const curMessages = this.messages[locale];
  22758. if (curMessages) {
  22759. if (override) {
  22760. Object.assign(curMessages, message);
  22761. } else {
  22762. Object.keys(message).forEach((key) => {
  22763. if (!hasOwn(curMessages, key)) {
  22764. curMessages[key] = message[key];
  22765. }
  22766. });
  22767. }
  22768. } else {
  22769. this.messages[locale] = message;
  22770. }
  22771. }
  22772. f(message, values, delimiters) {
  22773. return this.formater.interpolate(message, values, delimiters).join("");
  22774. }
  22775. t(key, locale, values) {
  22776. let message = this.message;
  22777. if (typeof locale === "string") {
  22778. locale = normalizeLocale(locale, this.messages);
  22779. locale && (message = this.messages[locale]);
  22780. } else {
  22781. values = locale;
  22782. }
  22783. if (!hasOwn(message, key)) {
  22784. console.warn(`Cannot translate the value of keypath ${key}. Use the value of keypath as default.`);
  22785. return key;
  22786. }
  22787. return this.formater.interpolate(message[key], values).join("");
  22788. }
  22789. }
  22790. function watchAppLocale(appVm, i18n2) {
  22791. if (appVm.$watchLocale) {
  22792. appVm.$watchLocale((newLocale) => {
  22793. i18n2.setLocale(newLocale);
  22794. });
  22795. } else {
  22796. appVm.$watch(() => appVm.$locale, (newLocale) => {
  22797. i18n2.setLocale(newLocale);
  22798. });
  22799. }
  22800. }
  22801. function getDefaultLocale() {
  22802. if (typeof uni !== "undefined" && uni.getLocale) {
  22803. return uni.getLocale();
  22804. }
  22805. if (typeof global !== "undefined" && global.getLocale) {
  22806. return global.getLocale();
  22807. }
  22808. return LOCALE_EN;
  22809. }
  22810. function initVueI18n(locale, messages2 = {}, fallbackLocale, watcher) {
  22811. if (typeof locale !== "string") {
  22812. const options2 = [
  22813. messages2,
  22814. locale
  22815. ];
  22816. locale = options2[0];
  22817. messages2 = options2[1];
  22818. }
  22819. if (typeof locale !== "string") {
  22820. locale = getDefaultLocale();
  22821. }
  22822. if (typeof fallbackLocale !== "string") {
  22823. fallbackLocale = typeof __uniConfig !== "undefined" && __uniConfig.fallbackLocale || LOCALE_EN;
  22824. }
  22825. const i18n2 = new I18n({
  22826. locale,
  22827. fallbackLocale,
  22828. messages: messages2,
  22829. watcher
  22830. });
  22831. let t2 = (key, values) => {
  22832. if (typeof getApp !== "function") {
  22833. t2 = function(key2, values2) {
  22834. return i18n2.t(key2, values2);
  22835. };
  22836. } else {
  22837. let isWatchedAppLocale = false;
  22838. t2 = function(key2, values2) {
  22839. const appVm = getApp().$vm;
  22840. if (appVm) {
  22841. appVm.$locale;
  22842. if (!isWatchedAppLocale) {
  22843. isWatchedAppLocale = true;
  22844. watchAppLocale(appVm, i18n2);
  22845. }
  22846. }
  22847. return i18n2.t(key2, values2);
  22848. };
  22849. }
  22850. return t2(key, values);
  22851. };
  22852. return {
  22853. i18n: i18n2,
  22854. f(message, values, delimiters) {
  22855. return i18n2.f(message, values, delimiters);
  22856. },
  22857. t(key, values) {
  22858. return t2(key, values);
  22859. },
  22860. add(locale2, message, override = true) {
  22861. return i18n2.add(locale2, message, override);
  22862. },
  22863. watch(fn) {
  22864. return i18n2.watchLocale(fn);
  22865. },
  22866. getLocale() {
  22867. return i18n2.getLocale();
  22868. },
  22869. setLocale(newLocale) {
  22870. return i18n2.setLocale(newLocale);
  22871. }
  22872. };
  22873. }
  22874. const en$2 = {
  22875. "uni-search-bar.cancel": "cancel",
  22876. "uni-search-bar.placeholder": "Search enter content"
  22877. };
  22878. const zhHans$2 = {
  22879. "uni-search-bar.cancel": "cancel",
  22880. "uni-search-bar.placeholder": "请输入搜索内容"
  22881. };
  22882. const zhHant$2 = {
  22883. "uni-search-bar.cancel": "cancel",
  22884. "uni-search-bar.placeholder": "請輸入搜索內容"
  22885. };
  22886. const messages$2 = {
  22887. en: en$2,
  22888. "zh-Hans": zhHans$2,
  22889. "zh-Hant": zhHant$2
  22890. };
  22891. const {
  22892. t: t$5
  22893. } = initVueI18n(messages$2);
  22894. const _sfc_main$3l = {
  22895. name: "UniSearchBar",
  22896. emits: ["input", "update:modelValue", "clear", "cancel", "confirm", "blur", "focus"],
  22897. props: {
  22898. placeholder: {
  22899. type: String,
  22900. default: ""
  22901. },
  22902. radius: {
  22903. type: [Number, String],
  22904. default: 5
  22905. },
  22906. clearButton: {
  22907. type: String,
  22908. default: "auto"
  22909. },
  22910. cancelButton: {
  22911. type: String,
  22912. default: "auto"
  22913. },
  22914. cancelText: {
  22915. type: String,
  22916. default: "取消"
  22917. },
  22918. bgColor: {
  22919. type: String,
  22920. default: "#F8F8F8"
  22921. },
  22922. maxlength: {
  22923. type: [Number, String],
  22924. default: 100
  22925. },
  22926. value: {
  22927. type: [Number, String],
  22928. default: ""
  22929. },
  22930. modelValue: {
  22931. type: [Number, String],
  22932. default: ""
  22933. },
  22934. focus: {
  22935. type: Boolean,
  22936. default: false
  22937. },
  22938. readonly: {
  22939. type: Boolean,
  22940. default: false
  22941. }
  22942. },
  22943. data() {
  22944. return {
  22945. show: false,
  22946. showSync: false,
  22947. searchVal: ""
  22948. };
  22949. },
  22950. computed: {
  22951. cancelTextI18n() {
  22952. return this.cancelText || t$5("uni-search-bar.cancel");
  22953. },
  22954. placeholderText() {
  22955. return this.placeholder || t$5("uni-search-bar.placeholder");
  22956. }
  22957. },
  22958. watch: {
  22959. modelValue: {
  22960. immediate: true,
  22961. handler(newVal) {
  22962. this.searchVal = newVal;
  22963. if (newVal) {
  22964. this.show = true;
  22965. }
  22966. }
  22967. },
  22968. focus: {
  22969. immediate: true,
  22970. handler(newVal) {
  22971. if (newVal) {
  22972. if (this.readonly)
  22973. return;
  22974. this.show = true;
  22975. this.$nextTick(() => {
  22976. this.showSync = true;
  22977. });
  22978. }
  22979. }
  22980. },
  22981. searchVal(newVal, oldVal) {
  22982. this.$emit("input", newVal);
  22983. this.$emit("update:modelValue", newVal);
  22984. }
  22985. },
  22986. methods: {
  22987. searchClick() {
  22988. if (this.readonly)
  22989. return;
  22990. if (this.show) {
  22991. return;
  22992. }
  22993. this.show = true;
  22994. this.$nextTick(() => {
  22995. this.showSync = true;
  22996. });
  22997. },
  22998. clear() {
  22999. this.$emit("clear", {
  23000. value: this.searchVal
  23001. });
  23002. this.searchVal = "";
  23003. },
  23004. cancel() {
  23005. if (this.readonly)
  23006. return;
  23007. this.$emit("cancel", {
  23008. value: this.searchVal
  23009. });
  23010. this.searchVal = "";
  23011. this.show = false;
  23012. this.showSync = false;
  23013. plus.key.hideSoftKeybord();
  23014. },
  23015. confirm() {
  23016. plus.key.hideSoftKeybord();
  23017. this.$emit("confirm", {
  23018. value: this.searchVal
  23019. });
  23020. },
  23021. blur() {
  23022. plus.key.hideSoftKeybord();
  23023. this.$emit("blur", {
  23024. value: this.searchVal
  23025. });
  23026. },
  23027. emitFocus(e2) {
  23028. this.$emit("focus", e2.detail);
  23029. }
  23030. }
  23031. };
  23032. function _sfc_render$3k(_ctx, _cache, $props, $setup, $data, $options) {
  23033. const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$b);
  23034. return vue.openBlock(), vue.createElementBlock("view", { class: "uni-searchbar" }, [
  23035. vue.createElementVNode(
  23036. "view",
  23037. {
  23038. style: vue.normalizeStyle({ borderRadius: $props.radius + "px", backgroundColor: $props.bgColor }),
  23039. class: "uni-searchbar__box",
  23040. onClick: _cache[5] || (_cache[5] = (...args) => $options.searchClick && $options.searchClick(...args))
  23041. },
  23042. [
  23043. vue.createElementVNode("view", { class: "uni-searchbar__box-icon-search" }, [
  23044. vue.renderSlot(_ctx.$slots, "searchIcon", {}, () => [
  23045. vue.createVNode(_component_uni_icons, {
  23046. color: "#c0c4cc",
  23047. size: "18",
  23048. type: "search"
  23049. })
  23050. ], true)
  23051. ]),
  23052. $data.show || $data.searchVal ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
  23053. key: 0,
  23054. focus: $data.showSync,
  23055. disabled: $props.readonly,
  23056. placeholder: $options.placeholderText,
  23057. maxlength: $props.maxlength,
  23058. class: "uni-searchbar__box-search-input",
  23059. "confirm-type": "search",
  23060. type: "text",
  23061. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.searchVal = $event),
  23062. onConfirm: _cache[1] || (_cache[1] = (...args) => $options.confirm && $options.confirm(...args)),
  23063. onBlur: _cache[2] || (_cache[2] = (...args) => $options.blur && $options.blur(...args)),
  23064. onFocus: _cache[3] || (_cache[3] = (...args) => $options.emitFocus && $options.emitFocus(...args))
  23065. }, null, 40, ["focus", "disabled", "placeholder", "maxlength"])), [
  23066. [vue.vModelText, $data.searchVal]
  23067. ]) : (vue.openBlock(), vue.createElementBlock(
  23068. "text",
  23069. {
  23070. key: 1,
  23071. class: "uni-searchbar__text-placeholder"
  23072. },
  23073. vue.toDisplayString($props.placeholder),
  23074. 1
  23075. /* TEXT */
  23076. )),
  23077. $data.show && ($props.clearButton === "always" || $props.clearButton === "auto" && $data.searchVal !== "") && !$props.readonly ? (vue.openBlock(), vue.createElementBlock("view", {
  23078. key: 2,
  23079. class: "uni-searchbar__box-icon-clear",
  23080. onClick: _cache[4] || (_cache[4] = (...args) => $options.clear && $options.clear(...args))
  23081. }, [
  23082. vue.renderSlot(_ctx.$slots, "clearIcon", {}, () => [
  23083. vue.createVNode(_component_uni_icons, {
  23084. color: "#c0c4cc",
  23085. size: "20",
  23086. type: "clear"
  23087. })
  23088. ], true)
  23089. ])) : vue.createCommentVNode("v-if", true)
  23090. ],
  23091. 4
  23092. /* STYLE */
  23093. ),
  23094. $props.cancelButton === "always" || $data.show && $props.cancelButton === "auto" ? (vue.openBlock(), vue.createElementBlock(
  23095. "text",
  23096. {
  23097. key: 0,
  23098. onClick: _cache[6] || (_cache[6] = (...args) => $options.cancel && $options.cancel(...args)),
  23099. class: "uni-searchbar__cancel"
  23100. },
  23101. vue.toDisplayString($options.cancelTextI18n),
  23102. 1
  23103. /* TEXT */
  23104. )) : vue.createCommentVNode("v-if", true)
  23105. ]);
  23106. }
  23107. const __easycom_0$p = /* @__PURE__ */ _export_sfc(_sfc_main$3l, [["render", _sfc_render$3k], ["__scopeId", "data-v-f07ef577"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-search-bar/components/uni-search-bar/uni-search-bar.vue"]]);
  23108. const _sfc_main$3k = {
  23109. __name: "su-navbar",
  23110. props: {
  23111. dark: {
  23112. type: Boolean,
  23113. default: false
  23114. },
  23115. modelValue: {
  23116. type: String,
  23117. default: ""
  23118. },
  23119. title: {
  23120. type: String,
  23121. default: ""
  23122. },
  23123. titleAlign: {
  23124. type: String,
  23125. default: "center"
  23126. // left | center
  23127. },
  23128. rightText: {
  23129. type: String,
  23130. default: ""
  23131. },
  23132. leftIcon: {
  23133. type: String,
  23134. default: "left"
  23135. },
  23136. rightIcon: {
  23137. type: String,
  23138. default: ""
  23139. },
  23140. fixed: {
  23141. type: [Boolean, String],
  23142. default: true
  23143. },
  23144. placeholder: {
  23145. type: [Boolean, String],
  23146. default: true
  23147. },
  23148. color: {
  23149. type: String,
  23150. default: ""
  23151. },
  23152. backgroundColor: {
  23153. type: String,
  23154. default: ""
  23155. },
  23156. opacity: {
  23157. type: [Boolean, String],
  23158. default: false
  23159. },
  23160. opacityBgUi: {
  23161. type: String,
  23162. default: "bg-white"
  23163. },
  23164. statusBar: {
  23165. type: [Boolean, String],
  23166. default: false
  23167. },
  23168. shadow: {
  23169. type: [Boolean, String],
  23170. default: false
  23171. },
  23172. border: {
  23173. type: [Boolean, String],
  23174. default: false
  23175. },
  23176. height: {
  23177. type: [Number, String],
  23178. default: 44
  23179. },
  23180. leftWidth: {
  23181. type: [Number, String],
  23182. default: 80
  23183. },
  23184. rightWidth: {
  23185. type: [Number, String],
  23186. default: 0
  23187. },
  23188. tools: {
  23189. type: String,
  23190. default: "title"
  23191. },
  23192. defaultSearch: {
  23193. type: String,
  23194. default: ""
  23195. }
  23196. },
  23197. emits: ["clickLeft", "clickRight", "clickTitle", "search"],
  23198. setup(__props, { expose: __expose, emit: __emit }) {
  23199. __expose();
  23200. const getVal2 = (val) => typeof val === "number" ? val + "px" : val;
  23201. const emits = __emit;
  23202. const props = __props;
  23203. const capsuleStyle = vue.computed(() => {
  23204. return {
  23205. width: sheep$1.$platform.capsule.width + "px",
  23206. height: sheep$1.$platform.capsule.height + "px",
  23207. margin: "0 " + (sheep$1.$platform.device.windowWidth - sheep$1.$platform.capsule.right) + "px"
  23208. };
  23209. });
  23210. const searchModel = vue.computed(() => {
  23211. return props.defaultSearch;
  23212. });
  23213. const themeBgColor = vue.computed(() => {
  23214. if (props.dark) {
  23215. if (props.backgroundColor) {
  23216. return props.backgroundColor;
  23217. } else {
  23218. return props.dark ? "#333" : "#FFF";
  23219. }
  23220. }
  23221. return props.backgroundColor || "#FFF";
  23222. });
  23223. const themeColor = vue.computed(() => {
  23224. if (props.dark) {
  23225. if (props.color) {
  23226. return props.color;
  23227. } else {
  23228. return props.dark ? "#fff" : "#333";
  23229. }
  23230. }
  23231. return props.color || "#333";
  23232. });
  23233. const navbarHeight = vue.computed(() => {
  23234. return getVal2(props.height);
  23235. });
  23236. const leftIconWidth = vue.computed(() => {
  23237. return getVal2(props.leftWidth);
  23238. });
  23239. const rightIconWidth = vue.computed(() => {
  23240. return getVal2(props.rightWidth);
  23241. });
  23242. function onSearch(e2) {
  23243. emits("search", e2.value);
  23244. }
  23245. onLoad(() => {
  23246. if (uni.report && props.title !== "") {
  23247. uni.report("title", props.title);
  23248. }
  23249. });
  23250. const hasHistory2 = sheep$1.$router.hasHistory();
  23251. function onClickLeft() {
  23252. if (hasHistory2) {
  23253. sheep$1.$router.back();
  23254. } else {
  23255. sheep$1.$router.go("/pages/index/index");
  23256. }
  23257. emits("clickLeft");
  23258. }
  23259. function onClickRight() {
  23260. showMenuTools();
  23261. }
  23262. function onClickTitle() {
  23263. emits("clickTitle");
  23264. }
  23265. const __returned__ = { getVal: getVal2, emits, props, capsuleStyle, searchModel, themeBgColor, themeColor, navbarHeight, leftIconWidth, rightIconWidth, onSearch, hasHistory: hasHistory2, onClickLeft, onClickRight, onClickTitle, get sheep() {
  23266. return sheep$1;
  23267. }, get onLoad() {
  23268. return onLoad;
  23269. }, get showMenuTools() {
  23270. return showMenuTools;
  23271. }, get closeMenuTools() {
  23272. return closeMenuTools;
  23273. }, computed: vue.computed, ref: vue.ref };
  23274. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  23275. return __returned__;
  23276. }
  23277. };
  23278. function _sfc_render$3j(_ctx, _cache, $props, $setup, $data, $options) {
  23279. const _component_su_status_bar = resolveEasycom(vue.resolveDynamicComponent("su-status-bar"), __easycom_0$q);
  23280. const _component_uni_search_bar = resolveEasycom(vue.resolveDynamicComponent("uni-search-bar"), __easycom_0$p);
  23281. return vue.openBlock(), vue.createElementBlock(
  23282. "view",
  23283. {
  23284. class: vue.normalizeClass(["uni-navbar", { "uni-dark": $props.dark }])
  23285. },
  23286. [
  23287. vue.createElementVNode(
  23288. "view",
  23289. {
  23290. class: vue.normalizeClass([{
  23291. "uni-navbar--fixed": $props.fixed,
  23292. "uni-navbar--shadow": $props.shadow,
  23293. "uni-navbar--border": $props.border
  23294. }, "uni-navbar__content"])
  23295. },
  23296. [
  23297. vue.createElementVNode(
  23298. "view",
  23299. {
  23300. class: vue.normalizeClass(["fixed-bg", [$props.opacity ? "" : $props.opacityBgUi]])
  23301. },
  23302. null,
  23303. 2
  23304. /* CLASS */
  23305. ),
  23306. $props.statusBar ? (vue.openBlock(), vue.createBlock(_component_su_status_bar, { key: 0 })) : vue.createCommentVNode("v-if", true),
  23307. vue.createElementVNode(
  23308. "view",
  23309. {
  23310. style: vue.normalizeStyle({
  23311. color: $setup.themeColor,
  23312. height: $setup.navbarHeight,
  23313. background: $props.backgroundColor
  23314. }),
  23315. class: "uni-navbar__header"
  23316. },
  23317. [
  23318. vue.createElementVNode(
  23319. "view",
  23320. {
  23321. class: "uni-navbar__header-btns uni-navbar__header-btns-left",
  23322. style: vue.normalizeStyle({ width: $setup.leftIconWidth })
  23323. },
  23324. [
  23325. vue.renderSlot(_ctx.$slots, "left", {}, () => [
  23326. $props.leftIcon.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  23327. key: 0,
  23328. class: "uni-navbar__content_view"
  23329. }, [
  23330. vue.createElementVNode("view", { class: "icon-box ss-flex" }, [
  23331. vue.createElementVNode("view", {
  23332. class: "icon-button icon-button-left ss-flex ss-row-center",
  23333. onClick: $setup.onClickLeft
  23334. }, [
  23335. $setup.hasHistory ? (vue.openBlock(), vue.createElementBlock("text", {
  23336. key: 0,
  23337. class: "sicon-back"
  23338. })) : (vue.openBlock(), vue.createElementBlock("text", {
  23339. key: 1,
  23340. class: "sicon-home"
  23341. }))
  23342. ]),
  23343. vue.createElementVNode("view", { class: "line" }),
  23344. vue.createElementVNode("view", {
  23345. class: "icon-button icon-button-right ss-flex ss-row-center",
  23346. onClick: _cache[0] || (_cache[0] = (...args) => $setup.showMenuTools && $setup.showMenuTools(...args))
  23347. }, [
  23348. vue.createElementVNode("text", { class: "sicon-more" })
  23349. ])
  23350. ])
  23351. ])) : vue.createCommentVNode("v-if", true),
  23352. $props.titleAlign === "left" && $props.title.length && $setup.sheep.$platform.name !== "WechatOfficialAccount" ? (vue.openBlock(), vue.createElementBlock(
  23353. "view",
  23354. {
  23355. key: 1,
  23356. class: vue.normalizeClass([{ "uni-navbar-btn-icon-left": !$props.leftIcon.length > 0 }, "uni-navbar-btn-text"])
  23357. },
  23358. [
  23359. vue.createElementVNode(
  23360. "text",
  23361. {
  23362. style: vue.normalizeStyle({ color: $setup.themeColor, fontSize: "18px" })
  23363. },
  23364. vue.toDisplayString($props.title),
  23365. 5
  23366. /* TEXT, STYLE */
  23367. )
  23368. ],
  23369. 2
  23370. /* CLASS */
  23371. )) : vue.createCommentVNode("v-if", true)
  23372. ], true)
  23373. ],
  23374. 4
  23375. /* STYLE */
  23376. ),
  23377. $props.tools === "search" ? (vue.openBlock(), vue.createElementBlock("view", {
  23378. key: 0,
  23379. class: "ss-flex-1"
  23380. }, [
  23381. vue.renderSlot(_ctx.$slots, "center", {}, () => [
  23382. vue.createVNode(_component_uni_search_bar, {
  23383. class: "ss-flex-1 search-box",
  23384. radius: 20,
  23385. placeholder: _ctx.$t("common.enter_keywords"),
  23386. cancelButton: "none",
  23387. modelValue: $setup.searchModel,
  23388. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.searchModel = $event),
  23389. onConfirm: $setup.onSearch
  23390. }, null, 8, ["placeholder", "modelValue"])
  23391. ], true)
  23392. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  23393. key: 1,
  23394. class: "uni-navbar__header-container",
  23395. onClick: $setup.onClickTitle
  23396. }, [
  23397. vue.renderSlot(_ctx.$slots, "center", {}, () => [
  23398. $props.tools === "title" && $props.titleAlign === "center" && $props.title.length ? (vue.openBlock(), vue.createElementBlock("view", {
  23399. key: 0,
  23400. class: "uni-navbar__header-container-inner"
  23401. }, [
  23402. vue.createElementVNode(
  23403. "text",
  23404. {
  23405. style: vue.normalizeStyle({ color: $setup.themeColor, fontSize: "36rpx" }),
  23406. class: "ss-line-1"
  23407. },
  23408. vue.toDisplayString($props.title),
  23409. 5
  23410. /* TEXT, STYLE */
  23411. )
  23412. ])) : vue.createCommentVNode("v-if", true)
  23413. ], true)
  23414. ]))
  23415. ],
  23416. 4
  23417. /* STYLE */
  23418. )
  23419. ],
  23420. 2
  23421. /* CLASS */
  23422. ),
  23423. $props.placeholder ? (vue.openBlock(), vue.createElementBlock("view", {
  23424. key: 0,
  23425. class: "uni-navbar__placeholder"
  23426. }, [
  23427. $props.statusBar ? (vue.openBlock(), vue.createBlock(_component_su_status_bar, { key: 0 })) : vue.createCommentVNode("v-if", true),
  23428. vue.createElementVNode(
  23429. "view",
  23430. {
  23431. class: "uni-navbar__placeholder-view",
  23432. style: vue.normalizeStyle({ height: $setup.navbarHeight })
  23433. },
  23434. null,
  23435. 4
  23436. /* STYLE */
  23437. )
  23438. ])) : vue.createCommentVNode("v-if", true),
  23439. vue.createCommentVNode(" 头部问题 ")
  23440. ],
  23441. 2
  23442. /* CLASS */
  23443. );
  23444. }
  23445. const __easycom_0$o = /* @__PURE__ */ _export_sfc(_sfc_main$3k, [["render", _sfc_render$3j], ["__scopeId", "data-v-305eaf98"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/ui/su-navbar/su-navbar.vue"]]);
  23446. const _sfc_main$3j = {
  23447. __name: "su-fixed",
  23448. props: {
  23449. noNav: {
  23450. type: Boolean,
  23451. default: false
  23452. },
  23453. bottom: {
  23454. type: Boolean,
  23455. default: false
  23456. },
  23457. bg: {
  23458. type: String,
  23459. default: ""
  23460. },
  23461. bgStyles: {
  23462. type: Object,
  23463. default() {
  23464. }
  23465. },
  23466. val: {
  23467. type: Number,
  23468. default: 0
  23469. },
  23470. width: {
  23471. type: [String, Number],
  23472. default: 0
  23473. },
  23474. alway: {
  23475. type: Boolean,
  23476. default: true
  23477. },
  23478. opacity: {
  23479. type: Boolean,
  23480. default: false
  23481. },
  23482. index: {
  23483. type: [Number, String],
  23484. default: 0
  23485. },
  23486. placeholder: {
  23487. type: [Boolean],
  23488. default: false
  23489. },
  23490. sticky: {
  23491. type: [Boolean],
  23492. default: false
  23493. },
  23494. noFixed: {
  23495. type: Boolean,
  23496. default: false
  23497. },
  23498. ui: {
  23499. type: String,
  23500. default: ""
  23501. },
  23502. clickTo: {
  23503. type: Boolean,
  23504. default: false
  23505. },
  23506. //是否需要安全区
  23507. isInset: {
  23508. type: Boolean,
  23509. default: true
  23510. }
  23511. },
  23512. setup(__props, { expose: __expose }) {
  23513. __expose();
  23514. const { safeAreaInsets } = sheep$1.$platform.device;
  23515. const vm = vue.getCurrentInstance();
  23516. const uuid = sheep$1.$helper.guid();
  23517. const sys_navBar = sheep$1.$platform.navbar;
  23518. const state = vue.reactive({
  23519. content: {},
  23520. fixed: true,
  23521. scrollTop: 0,
  23522. opacityVal: 0
  23523. });
  23524. const insetHeight = vue.computed(() => {
  23525. if (state.fixed && props.bottom) {
  23526. if (props.isInset) {
  23527. return props.val + "px";
  23528. } else {
  23529. return props.val + safeAreaInsets.bottom + "px";
  23530. }
  23531. } else {
  23532. return "auto";
  23533. }
  23534. });
  23535. const props = __props;
  23536. state.fixed = !vue.unref(props.sticky);
  23537. onPageScroll((e2) => {
  23538. let top = e2.scrollTop;
  23539. state.scrollTop = top;
  23540. state.opacityVal = top > sheep$1.$platform.navbar ? 1 : top * 0.01;
  23541. });
  23542. vue.onMounted(() => {
  23543. vue.nextTick(() => {
  23544. computedQuery();
  23545. });
  23546. });
  23547. const computedQuery = () => {
  23548. uni.createSelectorQuery().in(vm).select(`#fixed-${uuid}`).boundingClientRect((data) => {
  23549. if (data != null) {
  23550. state.content = data;
  23551. if (vue.unref(props.sticky)) {
  23552. setFixed(state.scrollTop);
  23553. }
  23554. }
  23555. }).exec();
  23556. };
  23557. const setFixed = (value) => {
  23558. if (vue.unref(props.bottom)) {
  23559. state.fixed = value >= state.content.bottom - sheep$1.$platform.device.windowHeight + state.content.height + vue.unref(props.val);
  23560. } else {
  23561. state.fixed = value >= state.content.top - (vue.unref(props.noNav) ? vue.unref(props.val) : vue.unref(props.val) + sheep$1.$platform.navbar);
  23562. }
  23563. };
  23564. const toTop = () => {
  23565. if (props.hasToTop) {
  23566. uni.pageScrollTo({
  23567. scrollTop: state.content.top,
  23568. duration: 100
  23569. });
  23570. }
  23571. };
  23572. const __returned__ = { safeAreaInsets, vm, uuid, sys_navBar, state, insetHeight, props, computedQuery, setFixed, toTop, get onPageScroll() {
  23573. return onPageScroll;
  23574. }, getCurrentInstance: vue.getCurrentInstance, unref: vue.unref, onMounted: vue.onMounted, reactive: vue.reactive, nextTick: vue.nextTick, computed: vue.computed, get sheep() {
  23575. return sheep$1;
  23576. } };
  23577. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  23578. return __returned__;
  23579. }
  23580. };
  23581. function _sfc_render$3i(_ctx, _cache, $props, $setup, $data, $options) {
  23582. return vue.openBlock(), vue.createElementBlock("view", { class: "ui-fixed" }, [
  23583. vue.createElementVNode("view", {
  23584. class: vue.normalizeClass(["ui-fixed-box", [{ fixed: $setup.state.fixed }]]),
  23585. id: `fixed-${$setup.uuid}`,
  23586. style: vue.normalizeStyle([
  23587. {
  23588. left: $props.sticky ? "auto" : "0px",
  23589. top: $setup.state.fixed && !$props.bottom ? ($props.noNav ? $props.val : $props.val + $setup.sys_navBar) + "px" : "auto",
  23590. bottom: $setup.insetHeight,
  23591. zIndex: $props.index + $setup.sheep.$zIndex.navbar
  23592. },
  23593. !$props.alway ? { opacity: $setup.state.opacityVal } : ""
  23594. ])
  23595. }, [
  23596. vue.createElementVNode(
  23597. "view",
  23598. {
  23599. class: "ui-fixed-content",
  23600. onClick: $setup.toTop,
  23601. style: vue.normalizeStyle([{ zIndex: $props.index + $setup.sheep.$zIndex.navbar }])
  23602. },
  23603. [
  23604. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
  23605. $setup.safeAreaInsets.bottom && $props.bottom && $props.isInset ? (vue.openBlock(), vue.createElementBlock(
  23606. "view",
  23607. {
  23608. key: 0,
  23609. class: "inset-bottom",
  23610. style: vue.normalizeStyle([{ height: $setup.safeAreaInsets.bottom + "px" }])
  23611. },
  23612. null,
  23613. 4
  23614. /* STYLE */
  23615. )) : vue.createCommentVNode("v-if", true)
  23616. ],
  23617. 4
  23618. /* STYLE */
  23619. ),
  23620. $props.bottom ? (vue.openBlock(), vue.createElementBlock(
  23621. "view",
  23622. {
  23623. key: 0,
  23624. class: vue.normalizeClass(["ui-fixed-bottom", [$props.bg]])
  23625. },
  23626. null,
  23627. 2
  23628. /* CLASS */
  23629. )) : vue.createCommentVNode("v-if", true),
  23630. vue.createElementVNode(
  23631. "view",
  23632. {
  23633. class: vue.normalizeClass(["ui-fixed-bg", [$props.ui, $props.bg]]),
  23634. style: vue.normalizeStyle([
  23635. { zIndex: $props.index + $setup.sheep.$zIndex.navbar - 1 },
  23636. $props.bgStyles,
  23637. $props.opacity ? { opacity: $setup.state.opacityVal } : ""
  23638. ])
  23639. },
  23640. null,
  23641. 6
  23642. /* CLASS, STYLE */
  23643. )
  23644. ], 14, ["id"]),
  23645. ($props.sticky ? $setup.state.fixed : $props.placeholder && $setup.state.fixed) ? (vue.openBlock(), vue.createElementBlock(
  23646. "view",
  23647. {
  23648. key: 0,
  23649. class: "skeleton",
  23650. style: vue.normalizeStyle([{ height: $setup.state.content.height + "px", width: $props.width + "px" }])
  23651. },
  23652. null,
  23653. 4
  23654. /* STYLE */
  23655. )) : vue.createCommentVNode("v-if", true)
  23656. ]);
  23657. }
  23658. const __easycom_2$9 = /* @__PURE__ */ _export_sfc(_sfc_main$3j, [["render", _sfc_render$3i], ["__scopeId", "data-v-96c3469f"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/ui/su-fixed/su-fixed.vue"]]);
  23659. const _sfc_main$3i = {
  23660. __name: "navbar",
  23661. props: {
  23662. sticky: Boolean,
  23663. zIndex: {
  23664. type: Number,
  23665. default: 100
  23666. },
  23667. back: {
  23668. //是否返回上一页
  23669. type: Boolean,
  23670. default: true
  23671. },
  23672. backtext: {
  23673. //返回文本
  23674. type: String,
  23675. default: ""
  23676. },
  23677. bg: {
  23678. type: String,
  23679. default: "bg-white"
  23680. },
  23681. status: {
  23682. //状态栏颜色 可以选择light dark/其他字符串视为黑色
  23683. type: String,
  23684. default: ""
  23685. },
  23686. // 常驻
  23687. alway: {
  23688. type: Boolean,
  23689. default: true
  23690. },
  23691. opacity: {
  23692. //是否开启滑动渐变
  23693. type: Boolean,
  23694. default: false
  23695. },
  23696. opacityBg: {
  23697. //开启滑动渐变后 返回按钮是否添加背景
  23698. type: Boolean,
  23699. default: false
  23700. },
  23701. noFixed: {
  23702. //是否浮动
  23703. type: Boolean,
  23704. default: false
  23705. },
  23706. ui: {
  23707. type: String,
  23708. default: ""
  23709. },
  23710. capsule: {
  23711. //是否开启胶囊返回
  23712. type: Boolean,
  23713. default: false
  23714. },
  23715. stopBack: {
  23716. type: Boolean,
  23717. default: false
  23718. },
  23719. placeholder: {
  23720. type: [Boolean],
  23721. default: true
  23722. },
  23723. bgStyles: {
  23724. type: Object,
  23725. default() {
  23726. }
  23727. }
  23728. },
  23729. emits: ["navback"],
  23730. setup(__props, { expose: __expose, emit: __emit }) {
  23731. __expose();
  23732. const state = vue.reactive({
  23733. statusCur: "",
  23734. capsuleStyle: {},
  23735. capsuleBack: {}
  23736. });
  23737. const sys_statusBar = sheep$1.$platform.device.statusBarHeight;
  23738. const sys_navBar = sheep$1.$platform.navbar;
  23739. const props = __props;
  23740. const emits = __emit;
  23741. vue.onBeforeMount(() => {
  23742. init();
  23743. });
  23744. const onNavback = () => {
  23745. sheep$1.$router.back();
  23746. };
  23747. const init = () => {
  23748. state.capsuleStyle = {
  23749. width: sheep$1.$platform.capsule.width + "px",
  23750. height: sheep$1.$platform.capsule.height + "px",
  23751. margin: "0 " + (sheep$1.$platform.device.windowWidth - sheep$1.$platform.capsule.right) + "px"
  23752. };
  23753. state.capsuleBack = state.capsuleStyle;
  23754. };
  23755. const __returned__ = { state, sys_statusBar, sys_navBar, props, emits, onNavback, init, computed: vue.computed, reactive: vue.reactive, onBeforeMount: vue.onBeforeMount, get sheep() {
  23756. return sheep$1;
  23757. } };
  23758. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  23759. return __returned__;
  23760. }
  23761. };
  23762. function _sfc_render$3h(_ctx, _cache, $props, $setup, $data, $options) {
  23763. const _component_su_status_bar = resolveEasycom(vue.resolveDynamicComponent("su-status-bar"), __easycom_0$q);
  23764. const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9);
  23765. return vue.openBlock(), vue.createBlock(_component_su_fixed, {
  23766. noFixed: $setup.props.noFixed,
  23767. alway: $setup.props.alway,
  23768. bgStyles: $setup.props.bgStyles,
  23769. val: 0,
  23770. index: $setup.props.zIndex,
  23771. noNav: "",
  23772. bg: $setup.props.bg,
  23773. ui: $setup.props.ui,
  23774. opacity: $setup.props.opacity,
  23775. placeholder: $setup.props.placeholder,
  23776. sticky: $setup.props.sticky
  23777. }, {
  23778. default: vue.withCtx(() => [
  23779. vue.createVNode(_component_su_status_bar),
  23780. vue.createCommentVNode(`
  23781. :class="[{ 'border-bottom': !props.opacity && props.bg != 'bg-none' }]"
  23782. `),
  23783. vue.createElementVNode("view", { class: "ui-navbar-box" }, [
  23784. vue.createElementVNode(
  23785. "view",
  23786. {
  23787. class: vue.normalizeClass([
  23788. "ui-bar",
  23789. $setup.props.status == "" ? `text-a` : $setup.props.status == "light" ? "text-white" : "text-black"
  23790. ]),
  23791. style: vue.normalizeStyle([{ height: $setup.sys_navBar - $setup.sys_statusBar + "px" }])
  23792. },
  23793. [
  23794. vue.renderSlot(_ctx.$slots, "item", {}, void 0, true),
  23795. vue.createElementVNode("view", { class: "right" })
  23796. ],
  23797. 6
  23798. /* CLASS, STYLE */
  23799. )
  23800. ])
  23801. ]),
  23802. _: 3
  23803. /* FORWARDED */
  23804. }, 8, ["noFixed", "alway", "bgStyles", "index", "bg", "ui", "opacity", "placeholder", "sticky"]);
  23805. }
  23806. const Navbar = /* @__PURE__ */ _export_sfc(_sfc_main$3i, [["render", _sfc_render$3h], ["__scopeId", "data-v-81e1f503"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-custom-navbar/components/navbar.vue"]]);
  23807. const _sfc_main$3h = {
  23808. __name: "s-search-block",
  23809. props: {
  23810. data: {
  23811. type: Object,
  23812. default: () => ({})
  23813. },
  23814. // 输入框背景色
  23815. elBackground: {
  23816. type: String,
  23817. default: ""
  23818. },
  23819. height: {
  23820. type: Number,
  23821. default: 36
  23822. },
  23823. // 图标颜色
  23824. iconColor: {
  23825. type: String,
  23826. default: "#b0b3bf"
  23827. },
  23828. // 字体颜色
  23829. fontColor: {
  23830. type: String,
  23831. default: "#b0b3bf"
  23832. },
  23833. // placeholder
  23834. placeholder: {
  23835. type: String,
  23836. default: "这是一个搜索框"
  23837. },
  23838. radius: {
  23839. type: Number,
  23840. default: 10
  23841. },
  23842. width: {
  23843. type: String,
  23844. default: "100%"
  23845. },
  23846. navbar: {
  23847. type: Boolean,
  23848. default: true
  23849. }
  23850. },
  23851. emits: ["click"],
  23852. setup(__props, { expose: __expose, emit: __emit }) {
  23853. __expose();
  23854. const state = vue.reactive({
  23855. searchVal: ""
  23856. });
  23857. const emits = __emit;
  23858. const props = __props;
  23859. const click2 = () => {
  23860. emits("click");
  23861. };
  23862. function onSearch(e2) {
  23863. if (e2.value) {
  23864. sheep$1.$router.go("/pages/goods/list", {
  23865. keyword: e2.value
  23866. });
  23867. setTimeout(() => {
  23868. state.searchVal = "";
  23869. }, 100);
  23870. }
  23871. }
  23872. const __returned__ = { state, emits, props, click: click2, onSearch, computed: vue.computed, reactive: vue.reactive, get sheep() {
  23873. return sheep$1;
  23874. } };
  23875. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  23876. return __returned__;
  23877. }
  23878. };
  23879. function _sfc_render$3g(_ctx, _cache, $props, $setup, $data, $options) {
  23880. const _component_uni_search_bar = resolveEasycom(vue.resolveDynamicComponent("uni-search-bar"), __easycom_0$p);
  23881. return vue.openBlock(), vue.createElementBlock(
  23882. "view",
  23883. {
  23884. class: vue.normalizeClass(["search-content ss-flex ss-col-center ss-row-between", [{ "border-content": $props.navbar }]]),
  23885. onClick: $setup.click,
  23886. style: vue.normalizeStyle([
  23887. {
  23888. borderRadius: $props.radius + "px",
  23889. background: $props.elBackground,
  23890. height: $props.height + "px",
  23891. width: $props.width
  23892. }
  23893. ])
  23894. },
  23895. [
  23896. $props.navbar ? (vue.openBlock(), vue.createElementBlock("view", {
  23897. key: 0,
  23898. class: "ss-flex ss-col-center"
  23899. }, [
  23900. vue.createElementVNode(
  23901. "view",
  23902. {
  23903. class: "search-icon _icon-search ss-m-l-10",
  23904. style: vue.normalizeStyle([{ color: $setup.props.iconColor }])
  23905. },
  23906. null,
  23907. 4
  23908. /* STYLE */
  23909. ),
  23910. vue.createElementVNode(
  23911. "view",
  23912. {
  23913. class: "search-input ss-flex-1 ss-line-1",
  23914. style: vue.normalizeStyle([{ color: $props.fontColor, width: $props.width }])
  23915. },
  23916. vue.toDisplayString($props.placeholder),
  23917. 5
  23918. /* TEXT, STYLE */
  23919. )
  23920. ])) : vue.createCommentVNode("v-if", true),
  23921. !$props.navbar ? (vue.openBlock(), vue.createBlock(_component_uni_search_bar, {
  23922. key: 1,
  23923. class: "ss-flex-1",
  23924. radius: $props.data.borderRadius,
  23925. placeholder: $props.data.placeholder,
  23926. cancelButton: "none",
  23927. clearButton: "none",
  23928. onConfirm: $setup.onSearch,
  23929. modelValue: $setup.state.searchVal,
  23930. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.state.searchVal = $event)
  23931. }, null, 8, ["radius", "placeholder", "modelValue"])) : vue.createCommentVNode("v-if", true),
  23932. vue.createElementVNode("view", { class: "keyword-link ss-flex" }, [
  23933. (vue.openBlock(true), vue.createElementBlock(
  23934. vue.Fragment,
  23935. null,
  23936. vue.renderList($props.data.hotKeywords, (item, index2) => {
  23937. return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
  23938. vue.createElementVNode("view", {
  23939. class: "ss-m-r-16",
  23940. style: vue.normalizeStyle([{ color: $props.data.textColor }]),
  23941. onClick: vue.withModifiers(($event) => $setup.sheep.$router.go("/pages/goods/list", { keyword: item }), ["stop"])
  23942. }, vue.toDisplayString(item), 13, ["onClick"])
  23943. ]);
  23944. }),
  23945. 128
  23946. /* KEYED_FRAGMENT */
  23947. ))
  23948. ]),
  23949. $props.data.hotKeywords && $props.data.hotKeywords.length && $props.navbar ? (vue.openBlock(), vue.createElementBlock("view", {
  23950. key: 2,
  23951. class: "ss-flex"
  23952. }, [
  23953. (vue.openBlock(true), vue.createElementBlock(
  23954. vue.Fragment,
  23955. null,
  23956. vue.renderList($props.data.hotKeywords, (item, index2) => {
  23957. return vue.openBlock(), vue.createElementBlock(
  23958. "button",
  23959. {
  23960. class: "ss-reset-button keyword-btn",
  23961. key: index2,
  23962. style: vue.normalizeStyle([{ color: $props.data.textColor, marginRight: "10rpx" }])
  23963. },
  23964. vue.toDisplayString(item),
  23965. 5
  23966. /* TEXT, STYLE */
  23967. );
  23968. }),
  23969. 128
  23970. /* KEYED_FRAGMENT */
  23971. ))
  23972. ])) : vue.createCommentVNode("v-if", true)
  23973. ],
  23974. 6
  23975. /* CLASS, STYLE */
  23976. );
  23977. }
  23978. const __easycom_0$n = /* @__PURE__ */ _export_sfc(_sfc_main$3h, [["render", _sfc_render$3g], ["__scopeId", "data-v-1f3fe5bf"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-search-block/s-search-block.vue"]]);
  23979. const _sfc_main$3g = {
  23980. __name: "navbar-item",
  23981. props: {
  23982. data: {
  23983. type: Object,
  23984. default: () => ({})
  23985. },
  23986. width: {
  23987. type: String,
  23988. default: "1px"
  23989. }
  23990. },
  23991. setup(__props, { expose: __expose }) {
  23992. __expose();
  23993. const props = __props;
  23994. const height = vue.computed(() => sheep$1.$platform.capsule.height);
  23995. const __returned__ = { props, height, get sheep() {
  23996. return sheep$1;
  23997. }, computed: vue.computed };
  23998. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  23999. return __returned__;
  24000. }
  24001. };
  24002. function _sfc_render$3f(_ctx, _cache, $props, $setup, $data, $options) {
  24003. const _component_s_search_block = resolveEasycom(vue.resolveDynamicComponent("s-search-block"), __easycom_0$n);
  24004. return vue.openBlock(), vue.createElementBlock("view", { class: "ss-flex ss-col-center" }, [
  24005. $props.data.type === "text" ? (vue.openBlock(), vue.createElementBlock(
  24006. "view",
  24007. {
  24008. key: 0,
  24009. class: "nav-title inline",
  24010. style: vue.normalizeStyle([{ color: $props.data.textColor, width: $props.width }])
  24011. },
  24012. vue.toDisplayString($props.data.text),
  24013. 5
  24014. /* TEXT, STYLE */
  24015. )) : vue.createCommentVNode("v-if", true),
  24016. $props.data.type === "image" ? (vue.openBlock(), vue.createElementBlock(
  24017. "view",
  24018. {
  24019. key: 1,
  24020. style: vue.normalizeStyle([{ width: $props.width }]),
  24021. class: "menu-icon-wrap ss-flex ss-row-center ss-col-center",
  24022. onClick: _cache[0] || (_cache[0] = ($event) => $setup.sheep.$router.go($props.data.url))
  24023. },
  24024. [
  24025. vue.createElementVNode("image", {
  24026. class: "nav-image",
  24027. src: $setup.sheep.$url.cdn($props.data.src),
  24028. mode: "aspectFit"
  24029. }, null, 8, ["src"])
  24030. ],
  24031. 4
  24032. /* STYLE */
  24033. )) : vue.createCommentVNode("v-if", true),
  24034. $props.data.type == "search" ? (vue.openBlock(), vue.createElementBlock(
  24035. "view",
  24036. {
  24037. key: 2,
  24038. class: "ss-flex-1",
  24039. style: vue.normalizeStyle([{ width: $props.width }])
  24040. },
  24041. [
  24042. vue.createVNode(_component_s_search_block, {
  24043. placeholder: $props.data.placeholder || "搜索关键字",
  24044. radius: $props.data.borderRadius,
  24045. elBackground: "#fff",
  24046. height: $setup.height,
  24047. width: $props.width,
  24048. onClick: _cache[1] || (_cache[1] = ($event) => $setup.sheep.$router.go("/pages/index/search"))
  24049. }, null, 8, ["placeholder", "radius", "height", "width"])
  24050. ],
  24051. 4
  24052. /* STYLE */
  24053. )) : vue.createCommentVNode("v-if", true)
  24054. ]);
  24055. }
  24056. const NavbarItem = /* @__PURE__ */ _export_sfc(_sfc_main$3g, [["render", _sfc_render$3f], ["__scopeId", "data-v-c063d35d"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-custom-navbar/components/navbar-item.vue"]]);
  24057. const _sfc_main$3f = {
  24058. __name: "s-custom-navbar",
  24059. props: {
  24060. data: {
  24061. type: Object,
  24062. default: () => ({})
  24063. },
  24064. showLeftButton: {
  24065. type: Boolean,
  24066. default: false
  24067. }
  24068. },
  24069. setup(__props, { expose: __expose }) {
  24070. __expose();
  24071. const props = __props;
  24072. const hasHistory2 = sheep$1.$router.hasHistory();
  24073. const sticky = vue.computed(() => {
  24074. if (props.data.mode == "inner") {
  24075. if (props.data.alway) {
  24076. return false;
  24077. }
  24078. }
  24079. if (props.data.mode == "normal") {
  24080. return false;
  24081. }
  24082. });
  24083. const navList = vue.computed(() => {
  24084. if (!props.data.list)
  24085. return [];
  24086. return props.data.list.app;
  24087. });
  24088. const windowWidth2 = sheep$1.$platform.device.windowWidth;
  24089. const cell = vue.computed(() => {
  24090. if (vue.unref(navList).length) {
  24091. let cell2 = (windowWidth2 - 90) / 8;
  24092. return cell2;
  24093. }
  24094. });
  24095. const parseImgStyle = (item) => {
  24096. let obj = {
  24097. width: item.width * cell.value + (item.width - 1) * 10 + "px",
  24098. left: item.left * cell.value + (item.left + 1) * 10 + "px",
  24099. "border-radius": item.borderRadius + "px"
  24100. };
  24101. return obj;
  24102. };
  24103. const isAlway = vue.computed(
  24104. () => props.data.mode === "inner" ? Boolean(props.data.alwaysShow) : true
  24105. );
  24106. const isOpacity = vue.computed(
  24107. () => props.data.mode === "normal" ? false : props.showLeftButton ? false : props.data.mode === "inner"
  24108. );
  24109. const isPlaceholder = vue.computed(() => props.data.mode === "normal");
  24110. const bgStyles = vue.computed(() => {
  24111. if (props.data.type) {
  24112. return {
  24113. background: props.data.type == "color" ? props.data.color : `url(${sheep$1.$url.cdn(props.data.src)}) no-repeat top center / 100% 100%`
  24114. };
  24115. }
  24116. });
  24117. function onClickLeft() {
  24118. if (hasHistory2) {
  24119. sheep$1.$router.back();
  24120. } else {
  24121. sheep$1.$router.go("/pages/index/index");
  24122. }
  24123. }
  24124. function onClickRight() {
  24125. showMenuTools();
  24126. }
  24127. const __returned__ = { props, hasHistory: hasHistory2, sticky, navList, windowWidth: windowWidth2, cell, parseImgStyle, isAlway, isOpacity, isPlaceholder, bgStyles, onClickLeft, onClickRight, computed: vue.computed, unref: vue.unref, get sheep() {
  24128. return sheep$1;
  24129. }, Navbar, NavbarItem, get showMenuTools() {
  24130. return showMenuTools;
  24131. } };
  24132. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  24133. return __returned__;
  24134. }
  24135. };
  24136. function _sfc_render$3e(_ctx, _cache, $props, $setup, $data, $options) {
  24137. return vue.openBlock(), vue.createBlock($setup["Navbar"], {
  24138. alway: $setup.isAlway,
  24139. back: false,
  24140. bg: "",
  24141. placeholder: $setup.isPlaceholder,
  24142. bgStyles: $setup.bgStyles,
  24143. opacity: $setup.isOpacity,
  24144. sticky: $setup.sticky
  24145. }, {
  24146. item: vue.withCtx(() => [
  24147. vue.createElementVNode("view", { class: "nav-box" }, [
  24148. $props.showLeftButton ? (vue.openBlock(), vue.createElementBlock("view", {
  24149. key: 0,
  24150. class: "nav-icon"
  24151. }, [
  24152. vue.createElementVNode(
  24153. "view",
  24154. {
  24155. class: vue.normalizeClass(["icon-box ss-flex", { "inner-icon-box": $props.data.mode == "inner" }])
  24156. },
  24157. [
  24158. vue.createElementVNode("view", {
  24159. class: "icon-button icon-button-left ss-flex ss-row-center",
  24160. onClick: $setup.onClickLeft
  24161. }, [
  24162. $setup.hasHistory ? (vue.openBlock(), vue.createElementBlock("text", {
  24163. key: 0,
  24164. class: "sicon-back"
  24165. })) : (vue.openBlock(), vue.createElementBlock("text", {
  24166. key: 1,
  24167. class: "sicon-home"
  24168. }))
  24169. ]),
  24170. vue.createElementVNode("view", { class: "line" }),
  24171. vue.createElementVNode("view", {
  24172. class: "icon-button icon-button-right ss-flex ss-row-center",
  24173. onClick: $setup.onClickRight
  24174. }, [
  24175. vue.createElementVNode("text", { class: "sicon-more" })
  24176. ])
  24177. ],
  24178. 2
  24179. /* CLASS */
  24180. )
  24181. ])) : vue.createCommentVNode("v-if", true),
  24182. (vue.openBlock(true), vue.createElementBlock(
  24183. vue.Fragment,
  24184. null,
  24185. vue.renderList($setup.navList, (item, index2) => {
  24186. return vue.openBlock(), vue.createElementBlock(
  24187. "view",
  24188. {
  24189. class: vue.normalizeClass(["nav-item", [{ "ss-flex ss-col-center ss-row-center": item.type !== "search" }]]),
  24190. key: index2,
  24191. style: vue.normalizeStyle([$setup.parseImgStyle(item)])
  24192. },
  24193. [
  24194. vue.createVNode($setup["NavbarItem"], {
  24195. data: item,
  24196. width: $setup.parseImgStyle(item).width
  24197. }, null, 8, ["data", "width"])
  24198. ],
  24199. 6
  24200. /* CLASS, STYLE */
  24201. );
  24202. }),
  24203. 128
  24204. /* KEYED_FRAGMENT */
  24205. ))
  24206. ])
  24207. ]),
  24208. _: 1
  24209. /* STABLE */
  24210. }, 8, ["alway", "placeholder", "bgStyles", "opacity", "sticky"]);
  24211. }
  24212. const __easycom_1$a = /* @__PURE__ */ _export_sfc(_sfc_main$3f, [["render", _sfc_render$3e], ["__scopeId", "data-v-6417c6b5"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-custom-navbar/s-custom-navbar.vue"]]);
  24213. const _sfc_main$3e = {
  24214. __name: "su-inner-navbar",
  24215. props: {
  24216. zIndex: {
  24217. type: Number,
  24218. default: 100
  24219. },
  24220. title: {
  24221. //返回文本
  24222. type: String,
  24223. default: ""
  24224. },
  24225. bg: {
  24226. type: String,
  24227. default: "bg-white"
  24228. },
  24229. // 常驻
  24230. alway: {
  24231. type: Boolean,
  24232. default: true
  24233. },
  24234. opacity: {
  24235. //是否开启滑动渐变
  24236. type: Boolean,
  24237. default: true
  24238. },
  24239. noFixed: {
  24240. //是否浮动
  24241. type: Boolean,
  24242. default: true
  24243. },
  24244. ui: {
  24245. type: String,
  24246. default: ""
  24247. },
  24248. capsule: {
  24249. //是否开启胶囊返回
  24250. type: Boolean,
  24251. default: false
  24252. },
  24253. stopBack: {
  24254. type: Boolean,
  24255. default: false
  24256. },
  24257. placeholder: {
  24258. type: [Boolean],
  24259. default: false
  24260. },
  24261. bgStyles: {
  24262. type: Object,
  24263. default() {
  24264. }
  24265. }
  24266. },
  24267. emits: ["navback", "clickLeft"],
  24268. setup(__props, { expose: __expose, emit: __emit }) {
  24269. __expose();
  24270. const state = vue.reactive({
  24271. statusCur: "",
  24272. capsuleStyle: {},
  24273. capsuleBack: {},
  24274. isDark: true
  24275. });
  24276. const sys_statusBar = sheep$1.$platform.device.statusBarHeight;
  24277. const sys_navBar = sheep$1.$platform.navbar;
  24278. const props = __props;
  24279. const emits = __emit;
  24280. const hasHistory2 = sheep$1.$router.hasHistory();
  24281. vue.onBeforeMount(() => {
  24282. init();
  24283. });
  24284. onPageScroll((e2) => {
  24285. let top = e2.scrollTop;
  24286. state.isDark = top < sheep$1.$platform.navbar;
  24287. });
  24288. function onClickLeft() {
  24289. if (hasHistory2) {
  24290. sheep$1.$router.back();
  24291. } else {
  24292. sheep$1.$router.go("/pages/index/index");
  24293. }
  24294. emits("clickLeft");
  24295. }
  24296. function onClickRight() {
  24297. showMenuTools();
  24298. }
  24299. const init = () => {
  24300. state.capsuleStyle = {
  24301. width: sheep$1.$platform.capsule.width + "px",
  24302. height: sheep$1.$platform.capsule.height + "px"
  24303. };
  24304. state.capsuleBack = state.capsuleStyle;
  24305. };
  24306. const __returned__ = { state, sys_statusBar, sys_navBar, props, emits, hasHistory: hasHistory2, onClickLeft, onClickRight, init, computed: vue.computed, reactive: vue.reactive, onBeforeMount: vue.onBeforeMount, ref: vue.ref, get sheep() {
  24307. return sheep$1;
  24308. }, get onPageScroll() {
  24309. return onPageScroll;
  24310. }, get showMenuTools() {
  24311. return showMenuTools;
  24312. }, get closeMenuTools() {
  24313. return closeMenuTools;
  24314. } };
  24315. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  24316. return __returned__;
  24317. }
  24318. };
  24319. function _sfc_render$3d(_ctx, _cache, $props, $setup, $data, $options) {
  24320. const _component_su_status_bar = resolveEasycom(vue.resolveDynamicComponent("su-status-bar"), __easycom_0$q);
  24321. const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9);
  24322. return vue.openBlock(), vue.createBlock(_component_su_fixed, {
  24323. noFixed: $setup.props.noFixed,
  24324. alway: $setup.props.alway,
  24325. bgStyles: $setup.props.bgStyles,
  24326. val: 0,
  24327. index: $setup.props.zIndex,
  24328. noNav: "",
  24329. bg: $setup.props.bg,
  24330. ui: $setup.props.ui,
  24331. opacity: $setup.props.opacity,
  24332. placeholder: $setup.props.placeholder
  24333. }, {
  24334. default: vue.withCtx(() => [
  24335. vue.createVNode(_component_su_status_bar),
  24336. vue.createCommentVNode(`
  24337. :class="[{ 'border-bottom': !props.opacity && props.bg != 'bg-none' }]"
  24338. `),
  24339. vue.createElementVNode("view", { class: "ui-navbar-box" }, [
  24340. vue.createElementVNode(
  24341. "view",
  24342. {
  24343. class: vue.normalizeClass(["ui-bar ss-p-x-20", $setup.state.isDark ? "text-white" : "text-black"]),
  24344. style: vue.normalizeStyle([{ height: $setup.sys_navBar - $setup.sys_statusBar + "px" }])
  24345. },
  24346. [
  24347. vue.createElementVNode("view", { class: "icon-box ss-flex" }, [
  24348. vue.createElementVNode("view", {
  24349. class: "icon-button icon-button-left ss-flex ss-row-center",
  24350. onClick: $setup.onClickLeft
  24351. }, [
  24352. $setup.hasHistory ? (vue.openBlock(), vue.createElementBlock("text", {
  24353. key: 0,
  24354. class: "sicon-back"
  24355. })) : (vue.openBlock(), vue.createElementBlock("text", {
  24356. key: 1,
  24357. class: "sicon-home"
  24358. }))
  24359. ]),
  24360. vue.createElementVNode("view", { class: "line" }),
  24361. vue.createElementVNode("view", {
  24362. class: "icon-button icon-button-right ss-flex ss-row-center",
  24363. onClick: $setup.onClickRight
  24364. }, [
  24365. vue.createElementVNode("text", { class: "sicon-more" })
  24366. ])
  24367. ]),
  24368. vue.renderSlot(_ctx.$slots, "center", {}, () => [
  24369. vue.createElementVNode(
  24370. "view",
  24371. { class: "center navbar-title" },
  24372. vue.toDisplayString($props.title),
  24373. 1
  24374. /* TEXT */
  24375. )
  24376. ], true)
  24377. ],
  24378. 6
  24379. /* CLASS, STYLE */
  24380. )
  24381. ])
  24382. ]),
  24383. _: 3
  24384. /* FORWARDED */
  24385. }, 8, ["noFixed", "alway", "bgStyles", "index", "bg", "ui", "opacity", "placeholder"]);
  24386. }
  24387. const __easycom_2$8 = /* @__PURE__ */ _export_sfc(_sfc_main$3e, [["render", _sfc_render$3d], ["__scopeId", "data-v-374b2fee"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/ui/su-inner-navbar/su-inner-navbar.vue"]]);
  24388. class MPAnimation {
  24389. constructor(options2, _this) {
  24390. this.options = options2;
  24391. this.animation = uni.createAnimation(options2);
  24392. this.currentStepAnimates = {};
  24393. this.next = 0;
  24394. this.$ = _this;
  24395. }
  24396. _nvuePushAnimates(type, args) {
  24397. let aniObj = this.currentStepAnimates[this.next];
  24398. let styles = {};
  24399. if (!aniObj) {
  24400. styles = {
  24401. styles: {},
  24402. config: {}
  24403. };
  24404. } else {
  24405. styles = aniObj;
  24406. }
  24407. if (animateTypes1.includes(type)) {
  24408. if (!styles.styles.transform) {
  24409. styles.styles.transform = "";
  24410. }
  24411. let unit = "";
  24412. if (type === "rotate") {
  24413. unit = "deg";
  24414. }
  24415. styles.styles.transform += `${type}(${args + unit}) `;
  24416. } else {
  24417. styles.styles[type] = `${args}`;
  24418. }
  24419. this.currentStepAnimates[this.next] = styles;
  24420. }
  24421. _animateRun(styles = {}, config2 = {}) {
  24422. let ref = this.$.$refs["ani"].ref;
  24423. if (!ref)
  24424. return;
  24425. return new Promise((resolve, reject) => {
  24426. nvueAnimation.transition(ref, {
  24427. styles,
  24428. ...config2
  24429. }, (res) => {
  24430. resolve();
  24431. });
  24432. });
  24433. }
  24434. _nvueNextAnimate(animates, step = 0, fn) {
  24435. let obj = animates[step];
  24436. if (obj) {
  24437. let {
  24438. styles,
  24439. config: config2
  24440. } = obj;
  24441. this._animateRun(styles, config2).then(() => {
  24442. step += 1;
  24443. this._nvueNextAnimate(animates, step, fn);
  24444. });
  24445. } else {
  24446. this.currentStepAnimates = {};
  24447. typeof fn === "function" && fn();
  24448. this.isEnd = true;
  24449. }
  24450. }
  24451. step(config2 = {}) {
  24452. this.animation.step(config2);
  24453. return this;
  24454. }
  24455. run(fn) {
  24456. this.$.animationData = this.animation.export();
  24457. this.$.timer = setTimeout(() => {
  24458. typeof fn === "function" && fn();
  24459. }, this.$.durationTime);
  24460. }
  24461. }
  24462. const animateTypes1 = [
  24463. "matrix",
  24464. "matrix3d",
  24465. "rotate",
  24466. "rotate3d",
  24467. "rotateX",
  24468. "rotateY",
  24469. "rotateZ",
  24470. "scale",
  24471. "scale3d",
  24472. "scaleX",
  24473. "scaleY",
  24474. "scaleZ",
  24475. "skew",
  24476. "skewX",
  24477. "skewY",
  24478. "translate",
  24479. "translate3d",
  24480. "translateX",
  24481. "translateY",
  24482. "translateZ"
  24483. ];
  24484. const animateTypes2 = ["opacity", "backgroundColor"];
  24485. const animateTypes3 = ["width", "height", "left", "right", "top", "bottom"];
  24486. animateTypes1.concat(animateTypes2, animateTypes3).forEach((type) => {
  24487. MPAnimation.prototype[type] = function(...args) {
  24488. this.animation[type](...args);
  24489. return this;
  24490. };
  24491. });
  24492. function createAnimation(option, _this) {
  24493. if (!_this)
  24494. return;
  24495. clearTimeout(_this.timer);
  24496. return new MPAnimation(option, _this);
  24497. }
  24498. const _sfc_main$3d = {
  24499. name: "uniTransition",
  24500. emits: ["click", "change"],
  24501. props: {
  24502. show: {
  24503. type: Boolean,
  24504. default: false
  24505. },
  24506. modeClass: {
  24507. type: [Array, String],
  24508. default() {
  24509. return "fade";
  24510. }
  24511. },
  24512. duration: {
  24513. type: Number,
  24514. default: 300
  24515. },
  24516. styles: {
  24517. type: Object,
  24518. default() {
  24519. return {};
  24520. }
  24521. },
  24522. customClass: {
  24523. type: String,
  24524. default: ""
  24525. }
  24526. },
  24527. data() {
  24528. return {
  24529. isShow: false,
  24530. transform: "",
  24531. opacity: 1,
  24532. animationData: {},
  24533. durationTime: 300,
  24534. config: {}
  24535. };
  24536. },
  24537. watch: {
  24538. show: {
  24539. handler(newVal) {
  24540. if (newVal) {
  24541. this.open();
  24542. } else {
  24543. if (this.isShow) {
  24544. this.close();
  24545. }
  24546. }
  24547. },
  24548. immediate: true
  24549. }
  24550. },
  24551. computed: {
  24552. // 生成样式数据
  24553. stylesObject() {
  24554. let styles = {
  24555. ...this.styles,
  24556. "transition-duration": this.duration / 1e3 + "s"
  24557. };
  24558. let transform = "";
  24559. for (let i2 in styles) {
  24560. let line = this.toLine(i2);
  24561. transform += line + ":" + styles[i2] + ";";
  24562. }
  24563. return transform;
  24564. },
  24565. // 初始化动画条件
  24566. transformStyles() {
  24567. return "transform:" + this.transform + ";opacity:" + this.opacity + ";" + this.stylesObject;
  24568. }
  24569. },
  24570. created() {
  24571. this.config = {
  24572. duration: this.duration,
  24573. timingFunction: "ease",
  24574. transformOrigin: "50% 50%",
  24575. delay: 0
  24576. };
  24577. this.durationTime = this.duration;
  24578. },
  24579. methods: {
  24580. /**
  24581. * ref 触发 初始化动画
  24582. */
  24583. init(obj = {}) {
  24584. if (obj.duration) {
  24585. this.durationTime = obj.duration;
  24586. }
  24587. this.animation = createAnimation(Object.assign(this.config, obj), this);
  24588. },
  24589. /**
  24590. * 点击组件触发回调
  24591. */
  24592. onClick() {
  24593. this.$emit("click", {
  24594. detail: this.isShow
  24595. });
  24596. },
  24597. /**
  24598. * ref 触发 动画分组
  24599. * @param {Object} obj
  24600. */
  24601. step(obj, config2 = {}) {
  24602. if (!this.animation)
  24603. return;
  24604. for (let i2 in obj) {
  24605. try {
  24606. if (typeof obj[i2] === "object") {
  24607. this.animation[i2](...obj[i2]);
  24608. } else {
  24609. this.animation[i2](obj[i2]);
  24610. }
  24611. } catch (e2) {
  24612. formatAppLog("error", "at uni_modules/uni-transition/components/uni-transition/uni-transition.vue:161", `方法 ${i2} 不存在`);
  24613. }
  24614. }
  24615. this.animation.step(config2);
  24616. return this;
  24617. },
  24618. /**
  24619. * ref 触发 执行动画
  24620. */
  24621. run(fn) {
  24622. if (!this.animation)
  24623. return;
  24624. this.animation.run(fn);
  24625. },
  24626. // 开始过度动画
  24627. open() {
  24628. clearTimeout(this.timer);
  24629. this.transform = "";
  24630. this.isShow = true;
  24631. let { opacity, transform } = this.styleInit(false);
  24632. if (typeof opacity !== "undefined") {
  24633. this.opacity = opacity;
  24634. }
  24635. this.transform = transform;
  24636. this.$nextTick(() => {
  24637. this.timer = setTimeout(() => {
  24638. this.animation = createAnimation(this.config, this);
  24639. this.tranfromInit(false).step();
  24640. this.animation.run();
  24641. this.$emit("change", {
  24642. detail: this.isShow
  24643. });
  24644. }, 20);
  24645. });
  24646. },
  24647. // 关闭过度动画
  24648. close(type) {
  24649. if (!this.animation)
  24650. return;
  24651. this.tranfromInit(true).step().run(() => {
  24652. this.isShow = false;
  24653. this.animationData = null;
  24654. this.animation = null;
  24655. let { opacity, transform } = this.styleInit(false);
  24656. this.opacity = opacity || 1;
  24657. this.transform = transform;
  24658. this.$emit("change", {
  24659. detail: this.isShow
  24660. });
  24661. });
  24662. },
  24663. // 处理动画开始前的默认样式
  24664. styleInit(type) {
  24665. let styles = {
  24666. transform: ""
  24667. };
  24668. let buildStyle = (type2, mode) => {
  24669. if (mode === "fade") {
  24670. styles.opacity = this.animationType(type2)[mode];
  24671. } else {
  24672. styles.transform += this.animationType(type2)[mode] + " ";
  24673. }
  24674. };
  24675. if (typeof this.modeClass === "string") {
  24676. buildStyle(type, this.modeClass);
  24677. } else {
  24678. this.modeClass.forEach((mode) => {
  24679. buildStyle(type, mode);
  24680. });
  24681. }
  24682. return styles;
  24683. },
  24684. // 处理内置组合动画
  24685. tranfromInit(type) {
  24686. let buildTranfrom = (type2, mode) => {
  24687. let aniNum = null;
  24688. if (mode === "fade") {
  24689. aniNum = type2 ? 0 : 1;
  24690. } else {
  24691. aniNum = type2 ? "-100%" : "0";
  24692. if (mode === "zoom-in") {
  24693. aniNum = type2 ? 0.8 : 1;
  24694. }
  24695. if (mode === "zoom-out") {
  24696. aniNum = type2 ? 1.2 : 1;
  24697. }
  24698. if (mode === "slide-right") {
  24699. aniNum = type2 ? "100%" : "0";
  24700. }
  24701. if (mode === "slide-bottom") {
  24702. aniNum = type2 ? "100%" : "0";
  24703. }
  24704. }
  24705. this.animation[this.animationMode()[mode]](aniNum);
  24706. };
  24707. if (typeof this.modeClass === "string") {
  24708. buildTranfrom(type, this.modeClass);
  24709. } else {
  24710. this.modeClass.forEach((mode) => {
  24711. buildTranfrom(type, mode);
  24712. });
  24713. }
  24714. return this.animation;
  24715. },
  24716. animationType(type) {
  24717. return {
  24718. fade: type ? 1 : 0,
  24719. "slide-top": `translateY(${type ? "0" : "-100%"})`,
  24720. "slide-right": `translateX(${type ? "0" : "100%"})`,
  24721. "slide-bottom": `translateY(${type ? "0" : "100%"})`,
  24722. "slide-left": `translateX(${type ? "0" : "-100%"})`,
  24723. "zoom-in": `scaleX(${type ? 1 : 0.8}) scaleY(${type ? 1 : 0.8})`,
  24724. "zoom-out": `scaleX(${type ? 1 : 1.2}) scaleY(${type ? 1 : 1.2})`
  24725. };
  24726. },
  24727. // 内置动画类型与实际动画对应字典
  24728. animationMode() {
  24729. return {
  24730. fade: "opacity",
  24731. "slide-top": "translateY",
  24732. "slide-right": "translateX",
  24733. "slide-bottom": "translateY",
  24734. "slide-left": "translateX",
  24735. "zoom-in": "scale",
  24736. "zoom-out": "scale"
  24737. };
  24738. },
  24739. // 驼峰转中横线
  24740. toLine(name2) {
  24741. return name2.replace(/([A-Z])/g, "-$1").toLowerCase();
  24742. }
  24743. }
  24744. };
  24745. function _sfc_render$3c(_ctx, _cache, $props, $setup, $data, $options) {
  24746. return $data.isShow ? (vue.openBlock(), vue.createElementBlock("view", {
  24747. key: 0,
  24748. ref: "ani",
  24749. animation: $data.animationData,
  24750. class: vue.normalizeClass($props.customClass),
  24751. style: vue.normalizeStyle($options.transformStyles),
  24752. onClick: _cache[0] || (_cache[0] = (...args) => $options.onClick && $options.onClick(...args))
  24753. }, [
  24754. vue.renderSlot(_ctx.$slots, "default")
  24755. ], 14, ["animation"])) : vue.createCommentVNode("v-if", true);
  24756. }
  24757. const __easycom_0$m = /* @__PURE__ */ _export_sfc(_sfc_main$3d, [["render", _sfc_render$3c], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-transition/components/uni-transition/uni-transition.vue"]]);
  24758. const _sfc_main$3c = {
  24759. name: "SuPopup",
  24760. components: {},
  24761. emits: ["change", "maskClick", "close"],
  24762. props: {
  24763. // 开启状态
  24764. show: {
  24765. type: Boolean,
  24766. default: false
  24767. },
  24768. // 顶部,底部时有效
  24769. space: {
  24770. type: Number,
  24771. default: 0
  24772. },
  24773. // 默认圆角
  24774. round: {
  24775. type: [String, Number],
  24776. default: 0
  24777. },
  24778. // 是否显示关闭
  24779. showClose: {
  24780. type: Boolean,
  24781. default: false
  24782. },
  24783. // 开启动画
  24784. animation: {
  24785. type: Boolean,
  24786. default: true
  24787. },
  24788. // 弹出层类型,可选值,top: 顶部弹出层;bottom:底部弹出层;center:全屏弹出层
  24789. // message: 消息提示 ; dialog : 对话框
  24790. type: {
  24791. type: String,
  24792. default: "bottom"
  24793. },
  24794. // maskClick
  24795. isMaskClick: {
  24796. type: Boolean,
  24797. default: null
  24798. },
  24799. // TODO 2 个版本后废弃属性 ,使用 isMaskClick
  24800. maskClick: {
  24801. type: Boolean,
  24802. default: null
  24803. },
  24804. // 可设置none
  24805. backgroundColor: {
  24806. type: String,
  24807. default: "#ffffff"
  24808. },
  24809. backgroundImage: {
  24810. type: String,
  24811. default: ""
  24812. },
  24813. safeArea: {
  24814. type: Boolean,
  24815. default: true
  24816. },
  24817. maskBackgroundColor: {
  24818. type: String,
  24819. default: "rgba(0, 0, 0, 0.4)"
  24820. },
  24821. zIndex: {
  24822. type: [String, Number],
  24823. default: 10075
  24824. }
  24825. },
  24826. watch: {
  24827. show: {
  24828. handler: function(newValue, oldValue) {
  24829. if (typeof oldValue === "undefined" && !newValue) {
  24830. return;
  24831. }
  24832. if (newValue) {
  24833. this.open();
  24834. } else {
  24835. this.close();
  24836. }
  24837. },
  24838. immediate: true
  24839. },
  24840. /**
  24841. * 监听type类型
  24842. */
  24843. type: {
  24844. handler: function(type) {
  24845. if (!this.config[type])
  24846. return;
  24847. this[this.config[type]](true);
  24848. },
  24849. immediate: true
  24850. },
  24851. isDesktop: {
  24852. handler: function(newVal) {
  24853. if (!this.config[newVal])
  24854. return;
  24855. this[this.config[this.type]](true);
  24856. },
  24857. immediate: true
  24858. },
  24859. /**
  24860. * 监听遮罩是否可点击
  24861. * @param {Object} val
  24862. */
  24863. maskClick: {
  24864. handler: function(val) {
  24865. this.mkclick = val;
  24866. },
  24867. immediate: true
  24868. },
  24869. isMaskClick: {
  24870. handler: function(val) {
  24871. this.mkclick = val;
  24872. },
  24873. immediate: true
  24874. },
  24875. // H5 下禁止底部滚动
  24876. showPopup(show) {
  24877. }
  24878. },
  24879. data() {
  24880. return {
  24881. sheep: sheep$1,
  24882. duration: 300,
  24883. ani: [],
  24884. showPopup: false,
  24885. showTrans: false,
  24886. popupWidth: 0,
  24887. popupHeight: 0,
  24888. config: {
  24889. top: "top",
  24890. bottom: "bottom",
  24891. center: "center",
  24892. left: "left",
  24893. right: "right",
  24894. message: "top",
  24895. dialog: "center",
  24896. share: "bottom"
  24897. },
  24898. maskClass: {
  24899. position: "fixed",
  24900. bottom: 0,
  24901. top: 0,
  24902. left: 0,
  24903. right: 0,
  24904. backgroundColor: "rgba(0, 0, 0, 0.4)"
  24905. },
  24906. transClass: {
  24907. position: "fixed",
  24908. left: 0,
  24909. right: 0
  24910. },
  24911. maskShow: true,
  24912. mkclick: true,
  24913. popupstyle: this.isDesktop ? "fixforpc-top" : "top"
  24914. };
  24915. },
  24916. computed: {
  24917. isDesktop() {
  24918. return this.popupWidth >= 500 && this.popupHeight >= 500;
  24919. },
  24920. bg() {
  24921. if (this.backgroundColor === "" || this.backgroundColor === "none") {
  24922. return "transparent";
  24923. }
  24924. return this.backgroundColor;
  24925. },
  24926. borderRadius() {
  24927. if (this.round) {
  24928. if (this.type === "bottom") {
  24929. return {
  24930. "border-top-left-radius": parseFloat(this.round) + "px",
  24931. "border-top-right-radius": parseFloat(this.round) + "px"
  24932. };
  24933. }
  24934. if (this.type === "center") {
  24935. return {
  24936. "border-top-left-radius": parseFloat(this.round) + "px",
  24937. "border-top-right-radius": parseFloat(this.round) + "px",
  24938. "border-bottom-left-radius": parseFloat(this.round) + "px",
  24939. "border-bottom-right-radius": parseFloat(this.round) + "px"
  24940. };
  24941. }
  24942. if (this.type === "top") {
  24943. return {
  24944. "border-bottom-left-radius": parseFloat(this.round) + "px",
  24945. "border-bottom-right-radius": parseFloat(this.round) + "px"
  24946. };
  24947. }
  24948. }
  24949. }
  24950. },
  24951. mounted() {
  24952. const fixSize = () => {
  24953. const { windowWidth: windowWidth2, windowHeight, windowTop, safeArea, screenHeight, safeAreaInsets } = sheep$1.$platform.device;
  24954. this.popupWidth = windowWidth2;
  24955. this.popupHeight = windowHeight + (windowTop || 0);
  24956. if (safeArea && this.safeArea) {
  24957. this.safeAreaInsets = safeAreaInsets.bottom;
  24958. } else {
  24959. this.safeAreaInsets = 0;
  24960. }
  24961. };
  24962. fixSize();
  24963. },
  24964. // TODO vue3
  24965. unmounted() {
  24966. this.setH5Visible();
  24967. },
  24968. created() {
  24969. if (this.isMaskClick === null && this.maskClick === null) {
  24970. this.mkclick = true;
  24971. } else {
  24972. this.mkclick = this.isMaskClick !== null ? this.isMaskClick : this.maskClick;
  24973. }
  24974. if (this.animation) {
  24975. this.duration = 300;
  24976. } else {
  24977. this.duration = 0;
  24978. }
  24979. this.messageChild = null;
  24980. this.clearPropagation = false;
  24981. this.maskClass.backgroundColor = this.maskBackgroundColor;
  24982. },
  24983. methods: {
  24984. setH5Visible() {
  24985. },
  24986. /**
  24987. * 公用方法,不显示遮罩层
  24988. */
  24989. closeMask() {
  24990. this.maskShow = false;
  24991. },
  24992. /**
  24993. * 公用方法,遮罩层禁止点击
  24994. */
  24995. disableMask() {
  24996. this.mkclick = false;
  24997. },
  24998. // TODO nvue 取消冒泡
  24999. clear(e2) {
  25000. e2.stopPropagation();
  25001. this.clearPropagation = true;
  25002. },
  25003. open(direction) {
  25004. if (this.showPopup) {
  25005. clearTimeout(this.timer);
  25006. this.showPopup = false;
  25007. }
  25008. let innerType = ["top", "center", "bottom", "left", "right", "message", "dialog", "share"];
  25009. if (!(direction && innerType.indexOf(direction) !== -1)) {
  25010. direction = this.type;
  25011. }
  25012. if (!this.config[direction]) {
  25013. formatAppLog("error", "at sheep/ui/su-popup/su-popup.vue:384", "缺少类型:", direction);
  25014. return;
  25015. }
  25016. this[this.config[direction]]();
  25017. this.$emit("change", {
  25018. show: true,
  25019. type: direction
  25020. });
  25021. },
  25022. close(type) {
  25023. this.showTrans = false;
  25024. this.$emit("change", {
  25025. show: false,
  25026. type: this.type
  25027. });
  25028. this.$emit("close");
  25029. clearTimeout(this.timer);
  25030. this.timer = setTimeout(() => {
  25031. this.showPopup = false;
  25032. }, 300);
  25033. },
  25034. // TODO 处理冒泡事件,头条的冒泡事件有问题 ,先这样兼容
  25035. touchstart() {
  25036. this.clearPropagation = false;
  25037. },
  25038. onTap() {
  25039. if (this.clearPropagation) {
  25040. this.clearPropagation = false;
  25041. return;
  25042. }
  25043. this.$emit("maskClick");
  25044. if (!this.mkclick)
  25045. return;
  25046. this.close();
  25047. },
  25048. /**
  25049. * 顶部弹出样式处理
  25050. */
  25051. top(type) {
  25052. this.popupstyle = this.isDesktop ? "fixforpc-top" : "top";
  25053. this.ani = ["slide-top"];
  25054. this.transClass = {
  25055. position: "fixed",
  25056. left: 0,
  25057. right: 0,
  25058. top: this.space + "px",
  25059. backgroundColor: this.bg
  25060. };
  25061. if (type)
  25062. return;
  25063. this.showPopup = true;
  25064. this.showTrans = true;
  25065. this.$nextTick(() => {
  25066. if (this.messageChild && this.type === "message") {
  25067. this.messageChild.timerClose();
  25068. }
  25069. });
  25070. },
  25071. /**
  25072. * 底部弹出样式处理
  25073. */
  25074. bottom(type) {
  25075. this.popupstyle = "bottom";
  25076. this.ani = ["slide-bottom"];
  25077. this.transClass = {
  25078. position: "fixed",
  25079. left: 0,
  25080. right: 0,
  25081. bottom: 0,
  25082. paddingBottom: this.safeAreaInsets + this.space + "px",
  25083. backgroundColor: this.bg
  25084. };
  25085. if (type)
  25086. return;
  25087. this.showPopup = true;
  25088. this.showTrans = true;
  25089. },
  25090. /**
  25091. * 中间弹出样式处理
  25092. */
  25093. center(type) {
  25094. this.popupstyle = "center";
  25095. this.ani = ["zoom-out", "fade"];
  25096. this.transClass = {
  25097. position: "fixed",
  25098. display: "flex",
  25099. flexDirection: "column",
  25100. bottom: 0,
  25101. left: 0,
  25102. right: 0,
  25103. top: 0,
  25104. justifyContent: "center",
  25105. alignItems: "center"
  25106. };
  25107. if (type)
  25108. return;
  25109. this.showPopup = true;
  25110. this.showTrans = true;
  25111. },
  25112. left(type) {
  25113. this.popupstyle = "left";
  25114. this.ani = ["slide-left"];
  25115. this.transClass = {
  25116. position: "fixed",
  25117. left: 0,
  25118. bottom: 0,
  25119. top: 0,
  25120. backgroundColor: this.bg,
  25121. display: "flex",
  25122. flexDirection: "column"
  25123. };
  25124. if (type)
  25125. return;
  25126. this.showPopup = true;
  25127. this.showTrans = true;
  25128. },
  25129. right(type) {
  25130. this.popupstyle = "right";
  25131. this.ani = ["slide-right"];
  25132. this.transClass = {
  25133. position: "fixed",
  25134. bottom: 0,
  25135. right: 0,
  25136. top: 0,
  25137. backgroundColor: this.bg,
  25138. display: "flex",
  25139. flexDirection: "column"
  25140. };
  25141. if (type)
  25142. return;
  25143. this.showPopup = true;
  25144. this.showTrans = true;
  25145. }
  25146. }
  25147. };
  25148. const __injectCSSVars__ = () => {
  25149. vue.useCssVars((_ctx) => ({
  25150. "f2bacd7c-backgroundImage": _ctx.backgroundImage
  25151. }));
  25152. };
  25153. const __setup__ = _sfc_main$3c.setup;
  25154. _sfc_main$3c.setup = __setup__ ? (props, ctx) => {
  25155. __injectCSSVars__();
  25156. return __setup__(props, ctx);
  25157. } : __injectCSSVars__;
  25158. function _sfc_render$3b(_ctx, _cache, $props, $setup, $data, $options) {
  25159. const _component_uni_transition = resolveEasycom(vue.resolveDynamicComponent("uni-transition"), __easycom_0$m);
  25160. const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$b);
  25161. return $data.showPopup ? (vue.openBlock(), vue.createElementBlock(
  25162. "view",
  25163. {
  25164. key: 0,
  25165. class: vue.normalizeClass(["uni-popup", [$data.popupstyle, $options.isDesktop ? "fixforpc-z-index" : ""]]),
  25166. style: vue.normalizeStyle([{ zIndex: $props.zIndex }]),
  25167. onTouchmove: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.clear && $options.clear(...args), ["stop", "prevent"]))
  25168. },
  25169. [
  25170. vue.createElementVNode(
  25171. "view",
  25172. {
  25173. onTouchstart: _cache[1] || (_cache[1] = (...args) => $options.touchstart && $options.touchstart(...args))
  25174. },
  25175. [
  25176. $data.maskShow ? (vue.openBlock(), vue.createBlock(_component_uni_transition, {
  25177. key: "1",
  25178. name: "mask",
  25179. "mode-class": "fade",
  25180. styles: $data.maskClass,
  25181. duration: $data.duration,
  25182. show: $data.showTrans,
  25183. onClick: $options.onTap
  25184. }, null, 8, ["styles", "duration", "show", "onClick"])) : vue.createCommentVNode("v-if", true),
  25185. vue.createVNode(_component_uni_transition, {
  25186. key: "2",
  25187. "mode-class": $data.ani,
  25188. name: "content",
  25189. styles: { ...$data.transClass, ...$options.borderRadius },
  25190. duration: $data.duration,
  25191. show: $data.showTrans,
  25192. onClick: $options.onTap
  25193. }, {
  25194. default: vue.withCtx(() => [
  25195. $data.showPopup ? (vue.openBlock(), vue.createElementBlock(
  25196. "view",
  25197. {
  25198. key: 0,
  25199. class: vue.normalizeClass(["uni-popup__wrapper", [$data.popupstyle]]),
  25200. style: vue.normalizeStyle([{ backgroundColor: $options.bg }, $options.borderRadius]),
  25201. onClick: _cache[0] || (_cache[0] = (...args) => $options.clear && $options.clear(...args))
  25202. },
  25203. [
  25204. $props.showClose ? (vue.openBlock(), vue.createBlock(_component_uni_icons, {
  25205. key: 0,
  25206. class: "close-icon",
  25207. color: "#F6F6F6",
  25208. type: "closeempty",
  25209. size: "32",
  25210. onClick: $options.close
  25211. }, null, 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  25212. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  25213. ],
  25214. 6
  25215. /* CLASS, STYLE */
  25216. )) : vue.createCommentVNode("v-if", true)
  25217. ]),
  25218. _: 3
  25219. /* FORWARDED */
  25220. }, 8, ["mode-class", "styles", "duration", "show", "onClick"])
  25221. ],
  25222. 32
  25223. /* NEED_HYDRATION */
  25224. )
  25225. ],
  25226. 38
  25227. /* CLASS, STYLE, NEED_HYDRATION */
  25228. )) : vue.createCommentVNode("v-if", true);
  25229. }
  25230. const __easycom_4$3 = /* @__PURE__ */ _export_sfc(_sfc_main$3c, [["render", _sfc_render$3b], ["__scopeId", "data-v-f2bacd7c"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/ui/su-popup/su-popup.vue"]]);
  25231. const formatToFraction = (num) => {
  25232. if (typeof num === "undefined")
  25233. return 0;
  25234. const parsedNumber = typeof num === "string" ? parseFloat(num) : num;
  25235. return parseFloat((parsedNumber / 100).toFixed(2));
  25236. };
  25237. const floatToFixed2 = (num) => {
  25238. let str = "0.00";
  25239. if (typeof num === "undefined") {
  25240. return str;
  25241. }
  25242. const f2 = formatToFraction(num);
  25243. const decimalPart = f2.toString().split(".")[1];
  25244. const len = decimalPart ? decimalPart.length : 0;
  25245. switch (len) {
  25246. case 0:
  25247. str = f2.toString() + ".00";
  25248. break;
  25249. case 1:
  25250. str = f2.toString() + ".0";
  25251. break;
  25252. case 2:
  25253. str = f2.toString();
  25254. break;
  25255. }
  25256. return str;
  25257. };
  25258. function formatDate(date2, format2) {
  25259. if (!date2) {
  25260. return "";
  25261. }
  25262. if (format2 === void 0) {
  25263. format2 = "YYYY-MM-DD HH:mm:ss";
  25264. }
  25265. return dayjs(date2).format(format2);
  25266. }
  25267. function handleTree(data, id = "id", parentId = "parentId", children = "children", rootId = 0) {
  25268. const cloneData = JSON.parse(JSON.stringify(data));
  25269. const treeData = cloneData.filter((father) => {
  25270. let branchArr = cloneData.filter((child) => {
  25271. return father[id] === child[parentId];
  25272. });
  25273. branchArr.length > 0 ? father.children = branchArr : "";
  25274. return father[parentId] === rootId;
  25275. });
  25276. return treeData !== "" ? treeData : data;
  25277. }
  25278. function resetPagination(pagination) {
  25279. pagination.list = [];
  25280. pagination.total = 0;
  25281. pagination.pageNo = 1;
  25282. }
  25283. function formatSales(type, num) {
  25284. let prefix = type !== "exact" && num < 10 ? t$6("common.sales_volume") : t$6("common.sold");
  25285. return formatNum(prefix, type, num);
  25286. }
  25287. function formatStock(type, num) {
  25288. return formatNum(t$6("useGoods.in_stock"), type, num);
  25289. }
  25290. function formatNum(prefix, type, num) {
  25291. num = num || 0;
  25292. if (type === "exact") {
  25293. return prefix + num;
  25294. }
  25295. if (num < 10) {
  25296. return `${prefix}≤10`;
  25297. }
  25298. let pow = Math.pow(10, `${num}`.length - 1);
  25299. return `${prefix}${num / pow * pow}+`;
  25300. }
  25301. const VIDEO_SUFFIX_LIST = [".avi", ".mp4"];
  25302. function formatGoodsSwiper(urlList) {
  25303. return (urlList == null ? void 0 : urlList.filter((url2) => url2).map((url2, key) => {
  25304. const isVideo = VIDEO_SUFFIX_LIST.some((suffix) => url2.includes(suffix));
  25305. const type = isVideo ? "video" : "image";
  25306. const src = $url.cdn(url2);
  25307. return {
  25308. type,
  25309. src
  25310. };
  25311. })) || [];
  25312. }
  25313. function formatOrderColor(order2) {
  25314. if (order2.status === 0) {
  25315. return "info-color";
  25316. }
  25317. if (order2.status === 10 || order2.status === 20 || order2.status === 30 && !order2.commentStatus) {
  25318. return "warning-color";
  25319. }
  25320. if (order2.status === 30 && order2.commentStatus) {
  25321. return "success-color";
  25322. }
  25323. return "danger-color";
  25324. }
  25325. function formatOrderStatus(order2) {
  25326. if (order2.status === 0) {
  25327. return t$6("useGoods.pending_payment");
  25328. }
  25329. if (order2.status === 10 && order2.deliveryType === 1 || order2.status === 10 && order2.deliveryType === 3) {
  25330. return t$6("useGoods.awaiting_shipment");
  25331. }
  25332. if (order2.status === 10 && order2.deliveryType === 2) {
  25333. return t$6("useGoods.awaiting_write_off");
  25334. }
  25335. if (order2.status === 20) {
  25336. return t$6("useGoods.awaiting_delivery");
  25337. }
  25338. if (order2.status === 30 && !order2.commentStatus) {
  25339. return t$6("useGoods.awaiting_review");
  25340. }
  25341. if (order2.status === 30 && order2.commentStatus) {
  25342. return t$6("useGoods.completed");
  25343. }
  25344. return t$6("useGoods.closed");
  25345. }
  25346. function formatOrderStatusDescription(order2) {
  25347. if (order2.status === 0) {
  25348. return t$6("useGoods.complete_payment_by", { time: formatDate(order2.payExpireTime) });
  25349. }
  25350. if (order2.status === 10) {
  25351. return t$6("useGoods.merchant_not_shipped");
  25352. }
  25353. if (order2.status === 20) {
  25354. return t$6("useGoods.merchant_shipped");
  25355. }
  25356. if (order2.status === 30 && !order2.commentStatus) {
  25357. return t$6("useGoods.goods_received");
  25358. }
  25359. if (order2.status === 30 && order2.commentStatus) {
  25360. return t$6("useGoods.transaction_completed");
  25361. }
  25362. return t$6("useGoods.transaction_closed");
  25363. }
  25364. function handleOrderButtons(order2) {
  25365. var _a2, _b2;
  25366. console.log();
  25367. order2.buttons = [];
  25368. if (order2.type === 3) {
  25369. order2.buttons.push("combination");
  25370. }
  25371. if (order2.status === 20) {
  25372. order2.buttons.push("express");
  25373. order2.buttons.push("confirm");
  25374. }
  25375. if (order2.logisticsId > 0) {
  25376. order2.buttons.push("express");
  25377. }
  25378. if (order2.status === 0) {
  25379. order2.buttons.push("cancel");
  25380. order2.buttons.push("pay");
  25381. }
  25382. if (order2.status === 30 && !order2.commentStatus) {
  25383. order2.buttons.push("comment");
  25384. }
  25385. if (order2.status === 40) {
  25386. order2.buttons.push("delete");
  25387. }
  25388. if ([10, 20, 30].includes((_a2 = order2.items[0]) == null ? void 0 : _a2.refundStatus)) {
  25389. order2.buttons.push("aftersaleCancel");
  25390. }
  25391. if (((_b2 = order2.items[0]) == null ? void 0 : _b2.refundStatus) === 20) {
  25392. order2.buttons.push("aftersaleDelivery");
  25393. }
  25394. }
  25395. function formatAfterSaleStatus(afterSale) {
  25396. if (afterSale.status === 10) {
  25397. return t$6("useGoods.apply_for_after_sales");
  25398. }
  25399. if (afterSale.status === 20) {
  25400. return t$6("useGoods.goods_awaiting_return");
  25401. }
  25402. if (afterSale.status === 30) {
  25403. return t$6("useGoods.merchant_awaiting_goods");
  25404. }
  25405. if (afterSale.status === 40) {
  25406. return t$6("useGoods.waiting_for_refund");
  25407. }
  25408. if (afterSale.status === 50) {
  25409. return t$6("useGoods.refund_successful");
  25410. }
  25411. if (afterSale.status === 61) {
  25412. return t$6("useGoods.buyer_cancelled");
  25413. }
  25414. if (afterSale.status === 62) {
  25415. return t$6("useGoods.merchant_refused");
  25416. }
  25417. if (afterSale.status === 63) {
  25418. return t$6("useGoods.merchant_refused_goods");
  25419. }
  25420. return t$6("useGoods.unknown_status");
  25421. }
  25422. function formatAfterSaleStatusDescription(afterSale) {
  25423. if (afterSale.status === 10) {
  25424. return t$6("useGoods.refund_request_awaiting_merchant");
  25425. }
  25426. if (afterSale.status === 20) {
  25427. return t$6("useGoods.return_goods_fill_logistics");
  25428. }
  25429. if (afterSale.status === 30) {
  25430. return t$6("useGoods.return_refund_request_awaiting_merchant");
  25431. }
  25432. if (afterSale.status === 40) {
  25433. return t$6("useGoods.waiting_for_refund");
  25434. }
  25435. if (afterSale.status === 50) {
  25436. return t$6("useGoods.refund_successful");
  25437. }
  25438. if (afterSale.status === 61) {
  25439. return t$6("useGoods.refund_closed");
  25440. }
  25441. if (afterSale.status === 62) {
  25442. return t$6("useGoods.merchant_disagrees_with_refund_request") + `${afterSale.auditReason}`;
  25443. }
  25444. if (afterSale.status === 63) {
  25445. return t$6("useGoods.merchant_refuses_to_accept_goods") + `${afterSale.auditReason}`;
  25446. }
  25447. return t$6("useGoods.unknown_status");
  25448. }
  25449. function handleAfterSaleButtons(afterSale) {
  25450. formatAppLog("log", "at sheep/hooks/useGoods.js:291", afterSale);
  25451. afterSale.buttons = [];
  25452. if ([10, 20, 30].includes(afterSale.status)) {
  25453. afterSale.buttons.push("cancel");
  25454. }
  25455. if (afterSale.status === 20) {
  25456. afterSale.buttons.push("delivery");
  25457. }
  25458. }
  25459. function useDurationTime(toTime, fromTime = "") {
  25460. toTime = getDayjsTime(toTime);
  25461. if (fromTime === "") {
  25462. fromTime = dayjs();
  25463. }
  25464. let duration2 = vue.ref(toTime - fromTime);
  25465. if (duration2.value > 0) {
  25466. setTimeout(() => {
  25467. if (duration2.value > 0) {
  25468. duration2.value -= 1e3;
  25469. }
  25470. }, 1e3);
  25471. }
  25472. let durationTime = dayjs.duration(duration2.value);
  25473. return {
  25474. h: (durationTime.months() * 30 * 24 + durationTime.days() * 24 + durationTime.hours()).toString().padStart(2, "0"),
  25475. m: durationTime.minutes().toString().padStart(2, "0"),
  25476. s: durationTime.seconds().toString().padStart(2, "0"),
  25477. ms: durationTime.$ms
  25478. };
  25479. }
  25480. function getDayjsTime(time2) {
  25481. time2 = time2.toString();
  25482. if (time2.indexOf("-") > 0) {
  25483. return dayjs(time2);
  25484. }
  25485. if (time2.length > 10) {
  25486. return dayjs(parseInt(time2));
  25487. }
  25488. if (time2.length === 10) {
  25489. return dayjs.unix(parseInt(time2));
  25490. }
  25491. }
  25492. function fen2yuan(price) {
  25493. return (price / 100).toFixed(2);
  25494. }
  25495. function fen2yuan6(price) {
  25496. return (price / 100).toFixed(6);
  25497. }
  25498. function points2point(point) {
  25499. return (point / 1e6).toFixed(3).slice(0, -1);
  25500. }
  25501. function convertProductPropertyList(skus) {
  25502. let result2 = [];
  25503. for (const sku of skus) {
  25504. if (!sku.properties) {
  25505. continue;
  25506. }
  25507. for (const property of sku.properties) {
  25508. let resultProperty = result2.find((item) => item.id === property.propertyId);
  25509. if (!resultProperty) {
  25510. resultProperty = {
  25511. id: property.propertyId,
  25512. name: property.propertyName,
  25513. values: []
  25514. };
  25515. result2.push(resultProperty);
  25516. }
  25517. let resultValue = resultProperty.values.find((item) => item.id === property.valueId);
  25518. if (!resultValue) {
  25519. resultProperty.values.push({
  25520. id: property.valueId,
  25521. name: property.valueName
  25522. });
  25523. }
  25524. }
  25525. }
  25526. return result2;
  25527. }
  25528. function formatRewardActivityRule(activity, rule) {
  25529. if (activity.conditionType === 10) {
  25530. return `满 ${fen2yuan(rule.limit)} 元减 ${fen2yuan(rule.discountPrice)} 元`;
  25531. }
  25532. if (activity.conditionType === 20) {
  25533. return `满 ${rule.limit} 件减 ${fen2yuan(rule.discountPrice)} 元`;
  25534. }
  25535. return "";
  25536. }
  25537. const _sfc_main$3b = {
  25538. __name: "s-wallet-modal",
  25539. setup(__props, { expose: __expose }) {
  25540. __expose();
  25541. vue.useCssVars((_ctx) => ({
  25542. "bd9b951b-headerBg": vue.unref(headerBg)
  25543. }));
  25544. const headerBg = sheep$1.$url.css("/static/images/sign.png");
  25545. const show = vue.computed(() => sheep$1.$store("modal").getWallet);
  25546. const state = vue.computed(() => sheep$1.$store("modal").getWalletInfo);
  25547. const __returned__ = { headerBg, show, state, computed: vue.computed, reactive: vue.reactive, ref: vue.ref, watch: vue.watch, get sheep() {
  25548. return sheep$1;
  25549. }, get showWalletModal() {
  25550. return showWalletModal;
  25551. }, get colseWalletModal() {
  25552. return colseWalletModal;
  25553. }, get points2point() {
  25554. return points2point;
  25555. }, get t() {
  25556. return t$6;
  25557. } };
  25558. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  25559. return __returned__;
  25560. }
  25561. };
  25562. function _sfc_render$3a(_ctx, _cache, $props, $setup, $data, $options) {
  25563. const _component_su_popup = resolveEasycom(vue.resolveDynamicComponent("su-popup"), __easycom_4$3);
  25564. return vue.openBlock(), vue.createElementBlock(
  25565. vue.Fragment,
  25566. null,
  25567. [
  25568. vue.createCommentVNode(" 规格弹窗 "),
  25569. vue.createCommentVNode(" showClose "),
  25570. vue.createVNode(_component_su_popup, {
  25571. show: $setup.show,
  25572. onClose: $setup.colseWalletModal,
  25573. type: "center",
  25574. round: "10"
  25575. }, {
  25576. default: vue.withCtx(() => [
  25577. vue.createElementVNode("view", { class: "model-box ss-flex-col" }, [
  25578. vue.createElementVNode("view", { class: "ss-m-t-56 ss-flex-col ss-col-center" }, [
  25579. vue.createElementVNode("text", { class: "cicon-check-round" }),
  25580. !$setup.state.msg ? (vue.openBlock(), vue.createElementBlock(
  25581. vue.Fragment,
  25582. { key: 0 },
  25583. [
  25584. vue.createElementVNode(
  25585. "view",
  25586. { class: "score-title" },
  25587. vue.toDisplayString($setup.t("pop.congratulations")),
  25588. 1
  25589. /* TEXT */
  25590. ),
  25591. $setup.state.points && $setup.state.points !== "null" && $setup.points2point($setup.state.points) > 0 || $setup.state.socialStatus && $setup.state.socialStatus !== "null" ? (vue.openBlock(), vue.createElementBlock(
  25592. vue.Fragment,
  25593. { key: 0 },
  25594. [
  25595. $setup.state.points && $setup.points2point($setup.state.points) > 0 ? (vue.openBlock(), vue.createElementBlock(
  25596. "view",
  25597. {
  25598. key: 0,
  25599. class: "model-title ss-flex ss-col-center ss-m-t-15 ss-font-35"
  25600. },
  25601. vue.toDisplayString($setup.t("pop.commission_earned")) + ":" + vue.toDisplayString($setup.points2point($setup.state.points)),
  25602. 1
  25603. /* TEXT */
  25604. )) : vue.createCommentVNode("v-if", true),
  25605. $setup.state.socialStatus ? (vue.openBlock(), vue.createElementBlock(
  25606. "view",
  25607. {
  25608. key: 1,
  25609. class: "model-title ss-flex ss-col-center ss-m-t-15 ss-font-35"
  25610. },
  25611. vue.toDisplayString($setup.t("pop.social_value_earned")) + ":" + vue.toDisplayString($setup.state.socialStatus),
  25612. 1
  25613. /* TEXT */
  25614. )) : vue.createCommentVNode("v-if", true)
  25615. ],
  25616. 64
  25617. /* STABLE_FRAGMENT */
  25618. )) : (vue.openBlock(), vue.createElementBlock(
  25619. "view",
  25620. {
  25621. key: 1,
  25622. class: "model-title ss-flex ss-col-center ss-m-y-15"
  25623. },
  25624. vue.toDisplayString($setup.t("pop.order_success")),
  25625. 1
  25626. /* TEXT */
  25627. ))
  25628. ],
  25629. 64
  25630. /* STABLE_FRAGMENT */
  25631. )) : (vue.openBlock(), vue.createElementBlock(
  25632. "view",
  25633. {
  25634. key: 1,
  25635. class: "model-title ss-flex ss-col-center ss-m-y-15"
  25636. },
  25637. vue.toDisplayString($setup.state.msg),
  25638. 1
  25639. /* TEXT */
  25640. ))
  25641. ]),
  25642. vue.createElementVNode("view", { class: "model-bg ss-flex-col ss-col-center ss-row-right" }, [
  25643. vue.createElementVNode("view", { class: "ss-m-b-40" }, [
  25644. vue.createElementVNode(
  25645. "button",
  25646. {
  25647. class: "ss-reset-button confirm-btn",
  25648. onClick: _cache[0] || (_cache[0] = ($event) => {
  25649. $setup.colseWalletModal();
  25650. })
  25651. },
  25652. vue.toDisplayString($setup.t("common.confirm")),
  25653. 1
  25654. /* TEXT */
  25655. )
  25656. ])
  25657. ])
  25658. ])
  25659. ]),
  25660. _: 1
  25661. /* STABLE */
  25662. }, 8, ["show", "onClose"])
  25663. ],
  25664. 2112
  25665. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  25666. );
  25667. }
  25668. const __easycom_4$2 = /* @__PURE__ */ _export_sfc(_sfc_main$3b, [["render", _sfc_render$3a], ["__scopeId", "data-v-bd9b951b"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-wallet-modal/s-wallet-modal.vue"]]);
  25669. const _sfc_main$3a = {
  25670. __name: "s-signup-modal",
  25671. setup(__props, { expose: __expose }) {
  25672. __expose();
  25673. vue.useCssVars((_ctx) => ({
  25674. "a1af371b-headerBg": vue.unref(headerBg)
  25675. }));
  25676. const headerBg = sheep$1.$url.css("/static/images/sign.png");
  25677. const show = vue.computed(() => sheep$1.$store("modal").signUp);
  25678. const state = vue.computed(() => sheep$1.$store("modal").signUpInfo);
  25679. vue.watch(() => show.value, (newValue) => {
  25680. if (newValue) {
  25681. setTimeout(colseSignUpModal, 3e3);
  25682. }
  25683. });
  25684. const __returned__ = { headerBg, show, state, computed: vue.computed, reactive: vue.reactive, ref: vue.ref, watch: vue.watch, get sheep() {
  25685. return sheep$1;
  25686. }, get t() {
  25687. return t$6;
  25688. }, get colseSignUpModal() {
  25689. return colseSignUpModal;
  25690. }, get showSignUpModal() {
  25691. return showSignUpModal;
  25692. } };
  25693. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  25694. return __returned__;
  25695. }
  25696. };
  25697. function _sfc_render$39(_ctx, _cache, $props, $setup, $data, $options) {
  25698. const _component_su_popup = resolveEasycom(vue.resolveDynamicComponent("su-popup"), __easycom_4$3);
  25699. return vue.openBlock(), vue.createElementBlock(
  25700. vue.Fragment,
  25701. null,
  25702. [
  25703. vue.createCommentVNode(" 规格弹窗 "),
  25704. vue.createCommentVNode(" showClose "),
  25705. vue.createVNode(_component_su_popup, {
  25706. show: $setup.show,
  25707. onClose: $setup.colseSignUpModal,
  25708. type: "center",
  25709. round: "10"
  25710. }, {
  25711. default: vue.withCtx(() => {
  25712. var _a2, _b2, _c;
  25713. return [
  25714. vue.createElementVNode("view", { class: "model-box ss-flex-col" }, [
  25715. vue.createElementVNode("view", { class: "ss-m-t-56 ss-flex-col ss-col-center" }, [
  25716. vue.createElementVNode("text", { class: "cicon-check-round" }),
  25717. vue.createElementVNode(
  25718. "view",
  25719. { class: "score-title" },
  25720. vue.toDisplayString($setup.t("pop.auto_checkin_success")),
  25721. 1
  25722. /* TEXT */
  25723. ),
  25724. vue.createElementVNode("view", { class: "model-title ss-flex ss-col-center ss-m-t-22 ss-m-b-30" }, [
  25725. vue.createTextVNode(
  25726. vue.toDisplayString($setup.t("pop.daily_checkin_reward", { point: (_a2 = $setup.state) == null ? void 0 : _a2.social })) + " ",
  25727. 1
  25728. /* TEXT */
  25729. ),
  25730. vue.createCommentVNode(" 获得每日签到{{state?.social}}点身价 ")
  25731. ]),
  25732. ((_b2 = $setup.state) == null ? void 0 : _b2.upgradeOrNot) ? (vue.openBlock(), vue.createElementBlock(
  25733. "view",
  25734. {
  25735. key: 0,
  25736. class: "model-title ss-flex ss-col-center ss-m-b-30"
  25737. },
  25738. vue.toDisplayString($setup.t("pop.level_upgraded")) + vue.toDisplayString((_c = $setup.state) == null ? void 0 : _c.socialStatusName),
  25739. 1
  25740. /* TEXT */
  25741. )) : vue.createCommentVNode("v-if", true)
  25742. ]),
  25743. vue.createElementVNode("view", { class: "model-bg ss-flex-col ss-col-center ss-row-right" }, [
  25744. vue.createElementVNode("view", { class: "ss-m-b-40" }, [
  25745. vue.createElementVNode(
  25746. "button",
  25747. {
  25748. class: "ss-reset-button confirm-btn",
  25749. onClick: _cache[0] || (_cache[0] = ($event) => {
  25750. $setup.colseSignUpModal();
  25751. })
  25752. },
  25753. vue.toDisplayString($setup.t("common.confirm")),
  25754. 1
  25755. /* TEXT */
  25756. )
  25757. ])
  25758. ])
  25759. ])
  25760. ];
  25761. }),
  25762. _: 1
  25763. /* STABLE */
  25764. }, 8, ["show", "onClose"])
  25765. ],
  25766. 2112
  25767. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  25768. );
  25769. }
  25770. const __easycom_5$2 = /* @__PURE__ */ _export_sfc(_sfc_main$3a, [["render", _sfc_render$39], ["__scopeId", "data-v-a1af371b"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-signup-modal/s-signup-modal.vue"]]);
  25771. var qsCanvas = { exports: {} };
  25772. (function(module) {
  25773. (function() {
  25774. var _nc;
  25775. const platform2 = getPlatform(), isUni = platform2 == "uni", isNode = platform2 == "node", isWeb = platform2 == "web", imgCache = {}, vmCache = {}, asyncDrawWhiteList = Object.freeze([
  25776. "init",
  25777. "initAsyncDrawMode",
  25778. "initArgs",
  25779. "initCanvas",
  25780. "handleCtx",
  25781. "initData",
  25782. "draw",
  25783. "toImage",
  25784. "updateCanvasWH",
  25785. "clear",
  25786. "restoreAsyncDrawMode"
  25787. ]), calcMethods = Object.freeze([
  25788. "setPaintbrush",
  25789. "setPaintbrushProp",
  25790. "resetPaintbrush",
  25791. "savePaintbrush",
  25792. "restorePaintbrush",
  25793. "calcText",
  25794. "calcImg",
  25795. "measureText",
  25796. "loadImage"
  25797. ]), asyncDrawMethods = Object.freeze([
  25798. "setPaintbrush",
  25799. "setPaintbrushProp",
  25800. "resetPaintbrush",
  25801. "savePaintbrush",
  25802. "restorePaintbrush",
  25803. "drawText",
  25804. "drawStraightLine",
  25805. "drawDoubleStraightLine",
  25806. "drawDotted",
  25807. "drawDottedStraightLine",
  25808. "drawLine",
  25809. "drawTextDecoration",
  25810. "drawImg",
  25811. "drawQrCode",
  25812. "setCircle",
  25813. "setRect"
  25814. ]), allSelfMethods = Object.freeze([
  25815. "setPaintbrush",
  25816. "setPaintbrushProp",
  25817. "resetPaintbrush",
  25818. "savePaintbrush",
  25819. "restorePaintbrush",
  25820. "drawText",
  25821. "drawStraightLine",
  25822. "drawDoubleStraightLine",
  25823. "drawDotted",
  25824. "drawDottedStraightLine",
  25825. "drawLine",
  25826. "drawTextDecoration",
  25827. "drawImg",
  25828. "drawQrCode",
  25829. "setCircle",
  25830. "setRect",
  25831. "calcText",
  25832. "calcImg",
  25833. "measureText",
  25834. "loadImage",
  25835. "drawArray",
  25836. "drawItem"
  25837. ]), needReturnMethods = Object.freeze(["drawText", "drawImg"]), commonMethods = Object.freeze([
  25838. "drawImage",
  25839. "putImageData",
  25840. "getImageData",
  25841. "createImageData",
  25842. "addPage",
  25843. "save",
  25844. "restore",
  25845. "rotate",
  25846. "translate",
  25847. "transform",
  25848. "getTransform",
  25849. "resetTransform",
  25850. "setTransform",
  25851. "isPointInPath",
  25852. "scale",
  25853. "clip",
  25854. "fill",
  25855. "stroke",
  25856. "fillText",
  25857. "strokeText",
  25858. "fillRect",
  25859. "strokeRect",
  25860. "clearRect",
  25861. "rect",
  25862. "measureText",
  25863. "moveTo",
  25864. "lineTo",
  25865. "bezierCurveTo",
  25866. "quadraticCurveTo",
  25867. "beginPath",
  25868. "closePath",
  25869. "arc",
  25870. "arcTo",
  25871. "ellipse",
  25872. "setLineDash",
  25873. "getLineDash",
  25874. "createPattern",
  25875. "createLinearGradient",
  25876. "createRadialGradient"
  25877. ]);
  25878. let nodeCanvas, id = 1;
  25879. function notUnd(t2) {
  25880. return String(t2) != "undefined";
  25881. }
  25882. function isNull(a2) {
  25883. return !((a2 || a2 == 0) && !["undefined", "null"].includes(String(a2)));
  25884. }
  25885. function getPlatform() {
  25886. if (notUnd(typeof uni))
  25887. return "uni";
  25888. if (notUnd(typeof window) && notUnd(typeof document))
  25889. return "web";
  25890. return "node";
  25891. }
  25892. function getCtx(vm, args) {
  25893. if (isUni) {
  25894. if (!args.canvasId) {
  25895. throw new Error("canvasId 不能为空");
  25896. }
  25897. }
  25898. let canvas, obj = {};
  25899. switch (platform2) {
  25900. case "uni":
  25901. canvas = uni.createCanvasContext(args.canvasId, vm);
  25902. obj.canvas = canvas;
  25903. obj.ctx = canvas;
  25904. break;
  25905. case "web":
  25906. canvas = (args == null ? void 0 : args.canvasId) ? document.getElementById(args == null ? void 0 : args.canvasId) : document.createElement("canvas");
  25907. canvas.width = (args == null ? void 0 : args.width) || 10;
  25908. canvas.height = (args == null ? void 0 : args.height) || 10;
  25909. obj.canvas = canvas;
  25910. obj.ctx = canvas.getContext("2d");
  25911. break;
  25912. case "node":
  25913. canvas = nodeCanvas.createCanvas((args == null ? void 0 : args.width) || 10, (args == null ? void 0 : args.height) || 10);
  25914. obj.canvas = canvas;
  25915. obj.ctx = canvas.getContext("2d");
  25916. break;
  25917. }
  25918. return obj;
  25919. }
  25920. const _QSCanvas = class _QSCanvas {
  25921. constructor(obj, vm) {
  25922. __privateAdd(this, _nc, void 0);
  25923. this._id = id++;
  25924. vmCache[this._id] = vm;
  25925. if (obj) {
  25926. this.init(obj);
  25927. }
  25928. }
  25929. init(obj = {}) {
  25930. this.initArgs(obj).initData().initCanvas().handleCtx().resetPaintbrush();
  25931. if (this._data.asyncDrawMode === true) {
  25932. __privateSet(this, _nc, new _QSCanvas({ asyncDrawMode: false }));
  25933. this.initAsyncDrawMode();
  25934. }
  25935. }
  25936. initAsyncDrawMode() {
  25937. if (isUni)
  25938. return;
  25939. const ctxMethods = this._data.ctxMethods;
  25940. const arr = [.../* @__PURE__ */ new Set([...allSelfMethods, ...ctxMethods])];
  25941. for (let i2 = 0; i2 < arr.length; i2++) {
  25942. const item = arr[i2];
  25943. this.handleAsyncDrawModeItem(item);
  25944. }
  25945. }
  25946. handleAsyncDrawModeItem(i2) {
  25947. if (isUni)
  25948. return;
  25949. if (asyncDrawWhiteList.includes(i2)) {
  25950. formatAppLog("log", "at node_modules/qs-canvas/index.js:124", "白名单跳过");
  25951. return;
  25952. }
  25953. if (typeof this[i2] == "function") {
  25954. if (!this._data.nMethods[i2])
  25955. this._data.nMethods[i2] = this[i2];
  25956. let _this = this;
  25957. this[i2] = function() {
  25958. let r2;
  25959. if (calcMethods.includes(i2)) {
  25960. r2 = __privateGet(_this, _nc)[i2](...arguments);
  25961. }
  25962. if (r2 && r2 !== _this && r2 !== __privateGet(_this, _nc))
  25963. return r2;
  25964. if (asyncDrawMethods.includes(i2) || _this._data.ctxMethods.includes(i2)) {
  25965. _this._data.asyncDrawQueue.push({ method: i2, args: arguments });
  25966. }
  25967. if (needReturnMethods.includes(i2)) {
  25968. return __privateGet(_this, _nc)[i2](...arguments);
  25969. }
  25970. };
  25971. }
  25972. }
  25973. restoreAsyncDrawMode() {
  25974. if (isUni)
  25975. return;
  25976. const nMethods = this._data.nMethods;
  25977. for (const i2 in nMethods) {
  25978. this[i2] = nMethods[i2];
  25979. }
  25980. }
  25981. initArgs(obj = {}) {
  25982. this._args = obj;
  25983. return this;
  25984. }
  25985. initCanvas() {
  25986. const canvasObj = getCtx(vmCache[this._id], this._args);
  25987. this.canvas = canvasObj.canvas;
  25988. this.ctx = canvasObj.ctx;
  25989. return this;
  25990. }
  25991. /**
  25992. * 使QSCanvas拥有原有方法
  25993. */
  25994. handleCtx() {
  25995. const ctx = this.ctx;
  25996. const active = (i2) => {
  25997. this._data.ctxMethods.push(i2);
  25998. this[i2] = ctx[i2].bind(ctx);
  25999. return;
  26000. };
  26001. for (const i2 in ctx) {
  26002. if (typeof ctx[i2] == "function") {
  26003. if (!this[i2]) {
  26004. active(i2);
  26005. }
  26006. }
  26007. }
  26008. for (let k = 0; k < commonMethods.length; k++) {
  26009. const i2 = commonMethods[k];
  26010. if (typeof ctx[i2] == "function") {
  26011. if (!this[i2]) {
  26012. active(i2);
  26013. }
  26014. }
  26015. }
  26016. return this;
  26017. }
  26018. initData() {
  26019. this._data = {
  26020. oldPaintbrushProps: {},
  26021. savedPaintbrushProps: [],
  26022. font: { fontStyle: "normal", fontVariant: "normal", fontWeight: "normal", fontSize: 10, fontFamily: "sans-serif" },
  26023. height: this._args.height || 10,
  26024. width: this._args.width || 10,
  26025. whChange: false,
  26026. asyncDrawQueue: [],
  26027. nMethods: {},
  26028. asyncDrawMode: isNode || isWeb ? this._args.asyncDrawMode !== false : false,
  26029. ctxMethods: []
  26030. };
  26031. return this;
  26032. }
  26033. /**
  26034. * 设置画笔
  26035. */
  26036. setPaintbrush(obj = {}) {
  26037. filterPaintbrushProps(obj);
  26038. for (const k in obj) {
  26039. this.setPaintbrushProp(k, obj[k]);
  26040. }
  26041. return this;
  26042. }
  26043. /**
  26044. * 设置画笔操作兼容uni
  26045. */
  26046. setPaintbrushProp(prop, data) {
  26047. if (isNull(prop) || isNull(data))
  26048. return;
  26049. prop = hyphen2Hump(prop);
  26050. const ctx = this.ctx;
  26051. if (prop == "font") {
  26052. if (data) {
  26053. if (typeof data != "object") {
  26054. formatAppLog("warn", "at node_modules/qs-canvas/index.js:235", "font属性需Object格式");
  26055. return;
  26056. }
  26057. for (const k in data)
  26058. if (isNull(data[k]))
  26059. delete data[k];
  26060. const font = { ...this._data.font, ...data };
  26061. if (isUni)
  26062. font.fontSize = Math.round(font.fontSize);
  26063. this._data.font = font;
  26064. const f2 = this._data.font;
  26065. this._data.oldPaintbrushProps[prop] = f2;
  26066. const setFont = () => {
  26067. ctx.font = `${f2.fontStyle || "normal"} ${f2.fontVariant || "normal"} ${f2.fontWeight || "normal"} ${f2.fontSize ?? 10}px ${f2.fontFamily || "sans-serif"}`;
  26068. };
  26069. if (isUni) {
  26070. setFont();
  26071. } else
  26072. setFont();
  26073. }
  26074. } else {
  26075. this._data.oldPaintbrushProps[prop] = data;
  26076. const fnn = "set" + prop[0].toUpperCase() + prop.slice(1);
  26077. if (typeof (ctx == null ? void 0 : ctx[fnn]) == "function") {
  26078. ctx[fnn](data);
  26079. } else {
  26080. ctx[prop] = data;
  26081. }
  26082. }
  26083. return this;
  26084. }
  26085. /**
  26086. * 重置画笔
  26087. */
  26088. resetPaintbrush(obj = {}) {
  26089. this.setPaintbrush({
  26090. fillStyle: "#000000",
  26091. strokeStyle: "#000000",
  26092. shadowColor: "#000000",
  26093. shadowBlur: 0,
  26094. shadowOffsetX: 0,
  26095. shadowOffsetY: 0,
  26096. lineCap: "butt",
  26097. lineJoin: "miter",
  26098. lineWidth: 1,
  26099. miterLimit: 10,
  26100. font: this._data.font,
  26101. textAlign: "start",
  26102. textBaseline: "top",
  26103. globalAlpha: 1,
  26104. globalCompositeOperation: "source-over",
  26105. ...obj
  26106. });
  26107. return this;
  26108. }
  26109. saveAndSetPaintbrush(paintbrushProps = {}) {
  26110. this.savePaintbrush();
  26111. this.setPaintbrush(paintbrushProps);
  26112. return this;
  26113. }
  26114. /**
  26115. * 保存画笔设置
  26116. */
  26117. savePaintbrush() {
  26118. this._data.savedPaintbrushProps.unshift({ ...this._data.oldPaintbrushProps });
  26119. return this;
  26120. }
  26121. /**
  26122. * 恢复上次保存的画笔设置
  26123. */
  26124. restorePaintbrush() {
  26125. const savedProps = this._data.savedPaintbrushProps.shift();
  26126. if (savedProps)
  26127. this._data.oldPaintbrushProps = { ...this._data.oldPaintbrushProps, ...savedProps };
  26128. this.resetPaintbrush({ ...this._data.oldPaintbrushProps });
  26129. return this;
  26130. }
  26131. /**
  26132. * 更新画布宽高
  26133. */
  26134. updateCanvasWH(obj = {}) {
  26135. var _a2, _b2, _c;
  26136. let { width, height, delay } = obj, setCanvasWH = (_a2 = this._args) == null ? void 0 : _a2.setCanvasWH;
  26137. width = width || ((_b2 = this._data) == null ? void 0 : _b2.width) || 10;
  26138. height = height || ((_c = this._data) == null ? void 0 : _c.height) || 10;
  26139. return new Promise((rs2, rj) => {
  26140. if (isUni) {
  26141. if (!setCanvasWH || typeof setCanvasWH != "function") {
  26142. rj("setCanvasWH异常, uni-app 请在初始化时传入setCanvasWH函数");
  26143. return;
  26144. }
  26145. setCanvasWH({ height, width });
  26146. setTimeout(() => {
  26147. rs2();
  26148. }, delay ?? 50);
  26149. } else {
  26150. this.canvas.height = height;
  26151. this.canvas.width = width;
  26152. rs2();
  26153. }
  26154. }).then((r2) => {
  26155. if (this._data.width != width || this._data.height != height) {
  26156. this._data.whChange = true;
  26157. }
  26158. this._data.width = width;
  26159. this._data.height = height;
  26160. if (!this._data.asyncDrawMode)
  26161. this.resetPaintbrush(this._data.oldPaintbrushProps);
  26162. });
  26163. }
  26164. /**
  26165. * 清除画布内容
  26166. */
  26167. clear() {
  26168. this.ctx.clearRect(0, 0, this._data.width || 999999, this._data.height || 999999);
  26169. return this;
  26170. }
  26171. /**
  26172. * 兼容uni draw
  26173. */
  26174. draw(obj = {}) {
  26175. const { reserve } = obj;
  26176. return new Promise((rs2, rj) => {
  26177. if (isUni) {
  26178. let done = false;
  26179. const settimeoutkey = setTimeout(() => {
  26180. if (!done) {
  26181. rs2();
  26182. } else {
  26183. clearTimeout(settimeoutkey);
  26184. }
  26185. }, 3e3);
  26186. this.ctx.draw(reserve ?? false, () => {
  26187. done = true;
  26188. clearTimeout(settimeoutkey);
  26189. rs2();
  26190. });
  26191. } else {
  26192. if (this._data.asyncDrawMode) {
  26193. if (reserve !== true)
  26194. this.clear();
  26195. this.restoreAsyncDrawMode();
  26196. this.resetPaintbrush();
  26197. const arr = this._data.asyncDrawQueue;
  26198. new Promise(async (resolve, reject) => {
  26199. for (let i2 = 0; i2 < arr.length; i2++) {
  26200. const item = arr[i2];
  26201. try {
  26202. const r2 = this[item.method].call(this, ...item.args);
  26203. if (typeof (r2 == null ? void 0 : r2.then) == "function")
  26204. await r2;
  26205. } catch (error2) {
  26206. reject(error2);
  26207. return;
  26208. }
  26209. }
  26210. resolve();
  26211. }).then(() => {
  26212. this._data.asyncDrawQueue = [];
  26213. this.initAsyncDrawMode();
  26214. rs2();
  26215. }).catch((err) => {
  26216. this.initAsyncDrawMode();
  26217. rj(err);
  26218. });
  26219. } else {
  26220. rs2();
  26221. }
  26222. }
  26223. });
  26224. }
  26225. /**
  26226. * canvas2image
  26227. */
  26228. toImage(obj = {}) {
  26229. return new Promise((rs2, rj) => {
  26230. if (isUni) {
  26231. const canvasId = this._args.canvasId;
  26232. if (!canvasId) {
  26233. rj("canvasId不存在");
  26234. return;
  26235. }
  26236. uni.canvasToTempFilePath({
  26237. ...obj,
  26238. canvasId,
  26239. success: (r2) => {
  26240. var _a2;
  26241. (_a2 = obj.success) == null ? void 0 : _a2.call(obj, r2);
  26242. rs2(r2.tempFilePath);
  26243. },
  26244. fail: (err) => {
  26245. var _a2;
  26246. (_a2 = obj.fail) == null ? void 0 : _a2.call(obj, err);
  26247. rj(err);
  26248. }
  26249. }, vmCache[this._id]);
  26250. } else {
  26251. rs2(this.canvas.toDataURL(`image/${["jpg", "jpeg"].includes(obj.fileType) ? "jpeg" : "png"}`, obj.quality ?? 1));
  26252. }
  26253. });
  26254. }
  26255. /**
  26256. * 计算文字多行
  26257. */
  26258. calcText(obj = {}) {
  26259. const line = obj.line || -1;
  26260. return new Promise((rs2, rj) => {
  26261. try {
  26262. let run = function(text, endLine) {
  26263. let endLineWidth = 0;
  26264. const textWidth = mt2(text).width;
  26265. if (endLine) {
  26266. if (textWidth < obj.maxWidth || text.length < 2) {
  26267. return { index: text.length, ellipsis: false, width: textWidth };
  26268. } else {
  26269. endLineWidth = mt2("...").width;
  26270. }
  26271. }
  26272. const textWidthEndLineWidth = textWidth + endLineWidth;
  26273. if (textWidthEndLineWidth < obj.maxWidth || text.length < 2) {
  26274. return { index: text.length, ellipsis: false, width: textWidthEndLineWidth };
  26275. }
  26276. let loop = true, mid = Math.floor((text.length + 1) / 2), oldMid = 1, mode = "", tw;
  26277. while (loop) {
  26278. if (mid <= 1) {
  26279. loop = false;
  26280. break;
  26281. }
  26282. if (mid > text.length) {
  26283. mid = text.length;
  26284. loop = false;
  26285. break;
  26286. }
  26287. const t2 = text.substr(0, mid);
  26288. tw = mt2(t2).width + endLineWidth;
  26289. if (tw > obj.maxWidth) {
  26290. text = t2;
  26291. if (mode == "xy" && Math.abs(oldMid - mid) < 1) {
  26292. loop = false;
  26293. } else {
  26294. mode = "dy";
  26295. oldMid = mid;
  26296. mid = Math.floor((t2.length + 1) / 2);
  26297. }
  26298. } else if (tw == obj.maxWidth) {
  26299. loop = false;
  26300. } else {
  26301. if (mid <= 1 || Math.abs(oldMid - mid) < 1) {
  26302. loop = false;
  26303. } else {
  26304. mode = "xy";
  26305. oldMid = mid;
  26306. mid += Math.floor((text.length - mid) / 2);
  26307. }
  26308. }
  26309. }
  26310. return { index: mid, ellipsis: endLine, width: tw };
  26311. };
  26312. this.saveAndSetPaintbrush({
  26313. ...obj.paintbrushProps || {}
  26314. });
  26315. const mt2 = this.measureText;
  26316. let splitTexts = [], str = obj.val, width = 0;
  26317. const font = { ...this._data.font };
  26318. if (obj.maxWidth) {
  26319. let i2 = 0;
  26320. while (str.length) {
  26321. const endLine = line > 0 && splitTexts.length + 1 >= line, { index: len, ellipsis, width: width2 } = run(str, endLine);
  26322. const txt = str.substr(0, len);
  26323. splitTexts.push({ ...obj, val: txt, y: i2 ? obj.y + (font.fontSize + (obj.lineHeight || 0)) * i2 : obj.y, width: width2 });
  26324. if (endLine) {
  26325. if (ellipsis)
  26326. splitTexts[splitTexts.length - 1].val += "...";
  26327. str = "";
  26328. } else
  26329. str = str.slice(len);
  26330. i2++;
  26331. }
  26332. width = splitTexts.length == 1 ? splitTexts[0].width : splitTexts.length > 1 ? obj.maxWidth : 0;
  26333. } else {
  26334. splitTexts = [obj];
  26335. width = mt2(obj.val).width;
  26336. }
  26337. this.restorePaintbrush();
  26338. rs2({
  26339. ...obj,
  26340. calcTexts: splitTexts,
  26341. _calc: true,
  26342. left: obj.x,
  26343. top: obj.y,
  26344. right: obj.x + width,
  26345. bottom: splitTexts[splitTexts.length - 1].y + font.fontSize,
  26346. width,
  26347. height: splitTexts[splitTexts.length - 1].y + font.fontSize - obj.y,
  26348. fontSize: font.fontSize
  26349. });
  26350. } catch (error2) {
  26351. rj(error2);
  26352. }
  26353. });
  26354. }
  26355. /* 绘制 */
  26356. /**
  26357. * 绘制文本
  26358. */
  26359. drawText(obj = {}) {
  26360. return new Promise(async (rs2, rj) => {
  26361. try {
  26362. if (!obj.val) {
  26363. formatAppLog("warn", "at node_modules/qs-canvas/index.js:547", `需绘制的文本为空`);
  26364. rs2();
  26365. return;
  26366. }
  26367. this.saveAndSetPaintbrush({
  26368. ...obj.paintbrushProps || {}
  26369. });
  26370. const ft2 = (obj2) => {
  26371. this.fillText(obj2.val, obj2.x, obj2.y);
  26372. }, ftItem = (item) => {
  26373. ft2(item);
  26374. if (item.textDecoration)
  26375. this.drawTextDecoration(item);
  26376. };
  26377. const calcR = obj._calc ? obj : await this.calcText(obj);
  26378. for (let i2 = 0; i2 < calcR.calcTexts.length; i2++) {
  26379. ftItem(calcR.calcTexts[i2]);
  26380. }
  26381. this.restorePaintbrush();
  26382. rs2(calcR);
  26383. } catch (error2) {
  26384. rj(error2);
  26385. }
  26386. });
  26387. }
  26388. drawStraightLine(obj = {}) {
  26389. const { x1, y1, x2, y2, paintbrushProps } = obj, ctx = this.ctx;
  26390. ctx.beginPath();
  26391. ctx.moveTo(x1, y1);
  26392. ctx.lineTo(x2, y2);
  26393. this.saveAndSetPaintbrush(paintbrushProps || {});
  26394. ctx.stroke();
  26395. this.restorePaintbrush();
  26396. }
  26397. drawDoubleStraightLine(obj = {}) {
  26398. let { gap } = obj;
  26399. gap = gap ?? 1;
  26400. this.drawStraightLine(obj);
  26401. this.drawStraightLine({ ...obj, y1: obj.y1 + gap, y2: obj.y2 + gap });
  26402. }
  26403. drawDotted(obj = {}) {
  26404. this.setCircle(obj);
  26405. if (obj.clip)
  26406. obj.clip = false;
  26407. this.saveAndSetPaintbrush(obj.paintbrushProps || {});
  26408. this.ctx.fill();
  26409. this.restorePaintbrush();
  26410. }
  26411. drawDottedStraightLine(obj = {}) {
  26412. let { x1, x2, y1, y2, gap, width, paintbrushProps } = obj;
  26413. x2 = x2 - width;
  26414. gap = gap || 1;
  26415. const len = Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2));
  26416. const points = getPoints(x1, y1, x2, y2, Math.floor((len - gap) / (width + gap)), 9999999999);
  26417. this.saveAndSetPaintbrush(paintbrushProps);
  26418. this.drawDotted({ x: x1, y: y1, d: width });
  26419. for (let i2 = 0; i2 < points.length; i2++)
  26420. this.drawDotted({ x: points[i2][0], y: points[i2][1], d: width });
  26421. this.drawDotted({ x: x2, y: y2, d: width });
  26422. this.restorePaintbrush();
  26423. }
  26424. drawLine(obj = {}) {
  26425. const { style } = obj;
  26426. switch (style) {
  26427. case "double":
  26428. obj.gap = (obj.width || 1) * 1.5;
  26429. this.drawDoubleStraightLine(obj);
  26430. break;
  26431. case "solide":
  26432. this.drawStraightLine(obj);
  26433. break;
  26434. case "dotted":
  26435. obj.gap = (obj.gap || 1) * 1.5;
  26436. obj.paintbrushProps = { fillStyle: obj.color };
  26437. this.drawDottedStraightLine(obj);
  26438. break;
  26439. }
  26440. }
  26441. /**
  26442. * {
  26443. ...(drawText属性),
  26444. textDecoration: {
  26445. line, //类型 同css text-decoration-line
  26446. color, //线颜色
  26447. width, //线宽度
  26448. * }
  26449. * }
  26450. */
  26451. drawTextDecoration(obj = {}) {
  26452. this.savePaintbrush();
  26453. const oldProps = this._data.oldPaintbrushProps, tw = this.measureText(obj.val).width, tD = obj.textDecoration, line = tD.line || "line-through", color = tD.color || obj.color || oldProps.fillStyle || "#000000", width = tD.thickness || tD.width || (obj.fontSize ? obj.fontSize * 0.1 : false) || 1, style = tD.style || "solide", offset = tD.offset || 0, gap = tD.gap ?? 1, fontSize = obj.fontSize || this._data.font.fontSize;
  26454. this.setPaintbrush({ lineWidth: width, strokeStyle: color });
  26455. let y2 = 0;
  26456. switch (line) {
  26457. case "line-through":
  26458. y2 = obj.y + fontSize / 2 - width / 2;
  26459. break;
  26460. case "underline":
  26461. y2 = obj.y + fontSize;
  26462. break;
  26463. case "overline":
  26464. y2 = obj.y;
  26465. break;
  26466. }
  26467. switch (oldProps.textBaseline) {
  26468. case "top":
  26469. y2 += width / 2;
  26470. break;
  26471. case "bottom":
  26472. y2 -= fontSize;
  26473. break;
  26474. case "center":
  26475. y2 -= fontSize / 2;
  26476. break;
  26477. }
  26478. y2 += offset;
  26479. switch (line) {
  26480. case "line-through":
  26481. case "underline":
  26482. case "overline":
  26483. this.drawLine({ x1: obj.x, y1: y2, x2: obj.x + tw, y2, style, gap, width, color });
  26484. break;
  26485. }
  26486. this.restorePaintbrush();
  26487. }
  26488. /**
  26489. * 绘制图片
  26490. */
  26491. drawImg(obj = {}) {
  26492. return new Promise(async (rs2, rj) => {
  26493. try {
  26494. if (!obj.val) {
  26495. formatAppLog("warn", "at node_modules/qs-canvas/index.js:687", `需绘制的图片为空`);
  26496. rs2();
  26497. return;
  26498. }
  26499. const calcR = obj._calc ? obj : await this.calcImg(obj);
  26500. if ((calcR == null ? void 0 : calcR.drawImageArgs) && Array.isArray(calcR.drawImageArgs))
  26501. this.ctx.drawImage(...(calcR == null ? void 0 : calcR.drawImageArgs) || []);
  26502. rs2(calcR);
  26503. } catch (error2) {
  26504. rj(error2);
  26505. }
  26506. });
  26507. }
  26508. calcImg(obj = {}) {
  26509. return new Promise(async (rs2, rj) => {
  26510. try {
  26511. if (!obj.val) {
  26512. formatAppLog("warn", "at node_modules/qs-canvas/index.js:704", `需绘制的图片为空`);
  26513. rs2();
  26514. return;
  26515. }
  26516. const img = await this.loadImage(obj.val), mode = obj.mode || "scaleToFill";
  26517. let arr, x = obj.x || 0, y2 = obj.y || 0, w2 = obj.width || 0, h2 = obj.height || 0, sw = img.width, sh = img.height, sx = 0, sy = 0;
  26518. const get_6 = () => {
  26519. if (isUni) {
  26520. }
  26521. return [sx, sy, sw, sh, x, y2, w2, h2];
  26522. };
  26523. switch (mode) {
  26524. case "aspectFit":
  26525. h2 = img.height / img.width * w2;
  26526. if (h2 < obj.height) {
  26527. y2 = Number(obj.y) + obj.height / 2 - h2 / 2;
  26528. } else {
  26529. h2 = obj.height;
  26530. w2 = img.width / img.height * h2;
  26531. x = Number(obj.x) + obj.width / 2 - w2 / 2;
  26532. }
  26533. arr = get_6();
  26534. break;
  26535. case "aspectFill":
  26536. h2 = img.height / img.width * w2;
  26537. if (h2 < obj.height) {
  26538. h2 = obj.height;
  26539. sx = img.width / img.height * obj.height;
  26540. sx = (sx - obj.width) / sx * img.width / 2;
  26541. sw = img.width - sx * 2;
  26542. } else {
  26543. sy = (h2 - obj.height) / h2 * img.height / 2;
  26544. sh = img.height - sy * 2;
  26545. }
  26546. w2 = obj.width;
  26547. h2 = obj.height;
  26548. arr = get_6();
  26549. break;
  26550. case "widthFix":
  26551. h2 = obj.height = img.height / img.width * obj.width;
  26552. arr = [x, y2, w2, h2];
  26553. break;
  26554. case "heightFix":
  26555. w2 = obj.width = img.width / img.height * obj.height;
  26556. arr = [x, y2, w2, h2];
  26557. break;
  26558. default:
  26559. arr = [x, y2, w2, h2];
  26560. }
  26561. arr.unshift(isUni ? img.toString() : img);
  26562. rs2({ ...obj, drawImageArgs: [...arr], img, left: obj.x, top: obj.y, right: obj.x + obj.width, bottom: obj.y + obj.height, _calc: true });
  26563. } catch (error2) {
  26564. rj(error2);
  26565. }
  26566. });
  26567. }
  26568. /**
  26569. * 绘制二维码
  26570. * 诗小柒 的二维码生成器代码
  26571. */
  26572. drawQrCode(obj = {}) {
  26573. return new Promise((rs2, rj) => {
  26574. if (!(obj == null ? void 0 : obj.val)) {
  26575. formatAppLog("warn", "at node_modules/qs-canvas/index.js:771", "绘制二维码val为空");
  26576. rs2();
  26577. return;
  26578. }
  26579. this.savePaintbrush();
  26580. let qrcodeAlgObjCache = [];
  26581. let options2 = {
  26582. text: String(obj.val || "") || "",
  26583. // 生成内容
  26584. size: Number(obj.size || 0) || 200,
  26585. // 二维码大小
  26586. background: String(obj.background || "") || "#ffffff",
  26587. // 背景色
  26588. foreground: String(obj.foreground || "") || "#000000",
  26589. // 前景色
  26590. pdground: String(obj.pdground || "") || "#000000",
  26591. // 定位角点颜色
  26592. correctLevel: Number(obj.correctLevel || 0) || 3,
  26593. // 容错级别
  26594. dx: Number(obj.x || 0) || 0,
  26595. // x轴距离
  26596. dy: Number(obj.y || 0) || 0
  26597. // y轴距离
  26598. };
  26599. let qrCodeAlg = null;
  26600. let d2 = 0;
  26601. for (var i2 = 0, l2 = qrcodeAlgObjCache.length; i2 < l2; i2++) {
  26602. d2 = i2;
  26603. if (qrcodeAlgObjCache[i2].text == options2.text && qrcodeAlgObjCache[i2].text.correctLevel == options2.correctLevel) {
  26604. qrCodeAlg = qrcodeAlgObjCache[i2].obj;
  26605. break;
  26606. }
  26607. }
  26608. if (d2 == l2) {
  26609. qrCodeAlg = new QRCodeAlg(options2.text, options2.correctLevel);
  26610. qrcodeAlgObjCache.push({
  26611. text: options2.text,
  26612. correctLevel: options2.correctLevel,
  26613. obj: qrCodeAlg
  26614. });
  26615. }
  26616. let getForeGround = function(config2) {
  26617. let options3 = config2.options;
  26618. if (options3.pdground && (config2.row > 1 && config2.row < 5 && config2.col > 1 && config2.col < 5 || config2.row > config2.count - 6 && config2.row < config2.count - 2 && config2.col > 1 && config2.col < 5 || config2.row > 1 && config2.row < 5 && config2.col > config2.count - 6 && config2.col < config2.count - 2)) {
  26619. return options3.pdground;
  26620. }
  26621. return options3.foreground;
  26622. };
  26623. let count = qrCodeAlg.getModuleCount();
  26624. let ratioSize = options2.size;
  26625. let tileW = ratioSize / count;
  26626. let tileH = ratioSize / count;
  26627. for (let row = 0; row < count; row++) {
  26628. for (let col = 0; col < count; col++) {
  26629. let w2 = (col + 1) * tileW - col * tileW;
  26630. let h2 = (row + 1) * tileW - row * tileW;
  26631. let foreground = getForeGround({
  26632. row,
  26633. col,
  26634. count,
  26635. options: options2
  26636. });
  26637. this.setPaintbrush({ fillStyle: qrCodeAlg.modules[row][col] ? foreground : options2.background });
  26638. this.ctx.fillRect(options2.dx + col * tileW, options2.dy + row * tileH, w2, h2);
  26639. }
  26640. }
  26641. this.restorePaintbrush();
  26642. rs2({ ...obj, height: obj.size, width: obj.size, left: obj.x, top: obj.y, right: obj.x + obj.width, bottom: obj.y + obj.size });
  26643. });
  26644. }
  26645. /**
  26646. * 圆形
  26647. */
  26648. setCircle(obj = {}) {
  26649. const ctx = this.ctx;
  26650. let { x, y: y2, d: d2, mode } = obj;
  26651. mode = mode || "leftTop";
  26652. const r2 = d2 / 2;
  26653. if (obj.clip)
  26654. ctx.save();
  26655. ctx.beginPath();
  26656. switch (mode) {
  26657. case "leftTop":
  26658. ctx.arc(x + r2, y2 + r2, r2, 0, 2 * Math.PI);
  26659. break;
  26660. case "center":
  26661. ctx.arc(x, y2, r2, 0, 2 * Math.PI);
  26662. break;
  26663. }
  26664. ctx.closePath();
  26665. if (obj.clip)
  26666. ctx.clip();
  26667. return this;
  26668. }
  26669. /**
  26670. * 矩形
  26671. */
  26672. setRect(obj = {}) {
  26673. const ctx = this.ctx;
  26674. const { x, y: y2, r: r2, height, width } = obj;
  26675. if (obj.clip)
  26676. ctx.save();
  26677. ctx.beginPath();
  26678. if (r2 && r2 > 0) {
  26679. ctx.arc(x + r2, y2 + r2, r2, 1 * Math.PI, 1.5 * Math.PI);
  26680. ctx.lineTo(x + width - r2, y2);
  26681. ctx.arc(x + width - r2, y2 + r2, r2, 1.5 * Math.PI, 0);
  26682. ctx.lineTo(x + width, y2 + height - r2);
  26683. ctx.arc(x + width - r2, y2 + height - r2, r2, 0, 0.5 * Math.PI);
  26684. ctx.lineTo(x + r2, y2 + height);
  26685. ctx.arc(x + r2, y2 + height - r2, r2, 0.5 * Math.PI, 1 * Math.PI);
  26686. ctx.lineTo(x, y2 + r2);
  26687. } else {
  26688. ctx.moveTo(x, y2);
  26689. ctx.lineTo(x + width, y2);
  26690. ctx.lineTo(x + width, y2 + height);
  26691. ctx.lineTo(x, y2 + height);
  26692. ctx.lineTo(x, y2);
  26693. }
  26694. ctx.closePath();
  26695. if (obj.clip)
  26696. ctx.clip();
  26697. return this;
  26698. }
  26699. /**
  26700. * 加载图片
  26701. */
  26702. loadImage(url2) {
  26703. return new Promise(async (resolve, reject) => {
  26704. if (!url2) {
  26705. formatAppLog("warn", "at node_modules/qs-canvas/index.js:899", "加载图片url为空");
  26706. resolve();
  26707. return;
  26708. }
  26709. if (imgCache[url2]) {
  26710. resolve(imgCache[url2]);
  26711. return;
  26712. }
  26713. let img;
  26714. try {
  26715. switch (platform2) {
  26716. case "uni":
  26717. img = await new Promise((rs2, rj) => {
  26718. if (url2._loaded) {
  26719. rs2(url2);
  26720. return;
  26721. }
  26722. if (~url2.indexOf("data:image")) {
  26723. let tempFilePath = url2, imageInfoR = {};
  26724. imgTools.base64ToPath(url2).then((t2) => {
  26725. tempFilePath = t2;
  26726. uni.getImageInfo({
  26727. src: tempFilePath,
  26728. success: (imgInfo) => {
  26729. imageInfoR = imgInfo;
  26730. const uniImg = new String(tempFilePath);
  26731. for (const i2 in imageInfoR)
  26732. uniImg[i2] = imageInfoR[i2];
  26733. uniImg._loaded = true;
  26734. rs2(uniImg);
  26735. },
  26736. fail: (err) => rj(err)
  26737. });
  26738. }).catch((err) => {
  26739. rj(err);
  26740. });
  26741. } else if (url2.substr(0, 4) == "http") {
  26742. uni.downloadFile({
  26743. url: url2,
  26744. success: ({ tempFilePath }) => {
  26745. uni.getImageInfo({
  26746. src: tempFilePath,
  26747. success: (imageInfoR) => {
  26748. const uniImg = new String(tempFilePath);
  26749. for (const i2 in imageInfoR)
  26750. uniImg[i2] = imageInfoR[i2];
  26751. uniImg._loaded = true;
  26752. rs2(uniImg);
  26753. },
  26754. fail: (err) => rj(err)
  26755. });
  26756. },
  26757. fail: (error2) => rj(error2)
  26758. });
  26759. } else {
  26760. uni.getImageInfo({
  26761. src: url2,
  26762. success: (imageInfoR) => {
  26763. const uniImg = new String(url2);
  26764. for (const i2 in imageInfoR)
  26765. uniImg[i2] = imageInfoR[i2];
  26766. uniImg._loaded = true;
  26767. rs2(uniImg);
  26768. },
  26769. fail: (err) => rj(err)
  26770. });
  26771. }
  26772. });
  26773. break;
  26774. case "web":
  26775. img = await new Promise((rs2, rj) => {
  26776. if (typeof url2 != "string") {
  26777. rs2(url2);
  26778. return;
  26779. }
  26780. const imgObj = new Image();
  26781. imgObj.onload = () => {
  26782. rs2(imgObj);
  26783. };
  26784. imgObj.onerror = (err) => {
  26785. rj(err);
  26786. };
  26787. imgObj.src = url2;
  26788. });
  26789. break;
  26790. case "node":
  26791. img = await new Promise((rs2, rj) => {
  26792. if (typeof url2 != "string") {
  26793. rs2(url2);
  26794. return;
  26795. }
  26796. nodeCanvas.loadImage(url2).then((res) => {
  26797. rs2(res);
  26798. }).catch((err) => {
  26799. rj(err);
  26800. });
  26801. });
  26802. break;
  26803. }
  26804. } catch (error2) {
  26805. reject(error2);
  26806. }
  26807. imgCache[url2] = img;
  26808. resolve(img);
  26809. });
  26810. }
  26811. drawArray(data) {
  26812. return new Promise(async (rs2, rj) => {
  26813. try {
  26814. if (!data) {
  26815. rj("drawArray需绘制参数不存在");
  26816. return;
  26817. }
  26818. if (!Array.isArray(data)) {
  26819. rj("drawArray参数需要是Array");
  26820. return;
  26821. }
  26822. data = [...data].sort((a2, b2) => ((a2 == null ? void 0 : a2.zIndex) ?? 0) - ((b2 == null ? void 0 : b2.zIndex) ?? 0));
  26823. const arr = [];
  26824. for (let i2 = 0; i2 < data.length; i2++) {
  26825. const item = data[i2];
  26826. let r2;
  26827. switch (typeof item) {
  26828. case "function":
  26829. r2 = item();
  26830. if (typeof (r2 == null ? void 0 : r2.then) == "function")
  26831. r2 = await r2;
  26832. break;
  26833. case "object":
  26834. if (Array.isArray(item))
  26835. r2 = await this.drawArray(item);
  26836. else
  26837. r2 = await this.drawItem(item);
  26838. break;
  26839. }
  26840. arr.push({ item, result: r2 });
  26841. }
  26842. rs2(arr);
  26843. } catch (error2) {
  26844. rj(error2);
  26845. }
  26846. });
  26847. }
  26848. drawItem(obj = {}) {
  26849. return new Promise(async (rs2, rj) => {
  26850. var _a2, _b2;
  26851. try {
  26852. let r2;
  26853. switch (obj.type) {
  26854. case "text":
  26855. r2 = await this.drawText(obj);
  26856. break;
  26857. case "image":
  26858. r2 = await this.drawImg(obj);
  26859. break;
  26860. case "qrcode":
  26861. r2 = await this.drawQrCode(obj);
  26862. break;
  26863. case "method":
  26864. r2 = (_a2 = this[obj.name]) == null ? void 0 : _a2.call(this, ...obj.data ? Array.isArray(obj.data) ? obj.data : [obj.data] : []);
  26865. if (typeof (r2 == null ? void 0 : r2.then) == "function")
  26866. r2 = await r2;
  26867. break;
  26868. case "function":
  26869. r2 = (_b2 = obj.val) == null ? void 0 : _b2.call(obj);
  26870. if (typeof (r2 == null ? void 0 : r2.then) == "function")
  26871. r2 = await r2;
  26872. break;
  26873. }
  26874. rs2(r2);
  26875. } catch (error2) {
  26876. rj(error2);
  26877. }
  26878. });
  26879. }
  26880. drawRichText(html) {
  26881. return new Promise(async (rs2, rj) => {
  26882. if (!html) {
  26883. rj("drawRichText需绘制参数不存在");
  26884. return;
  26885. }
  26886. if (typeof html == "string")
  26887. html = htmlParse(html);
  26888. const result2 = [];
  26889. function run(arr, parent2) {
  26890. return new Promise(async (res, rej) => {
  26891. var _a2;
  26892. for (let i2 = 0; i2 < arr.length; i2++) {
  26893. const item = arr[i2];
  26894. if (item.type == "text")
  26895. ;
  26896. else {
  26897. switch (item.name) {
  26898. }
  26899. }
  26900. result2.push(item);
  26901. if ((_a2 = item.children) == null ? void 0 : _a2.length) {
  26902. item.__handle = function(obj) {
  26903. };
  26904. try {
  26905. await run(item.children, item);
  26906. } catch (error2) {
  26907. rej(error2);
  26908. return;
  26909. }
  26910. }
  26911. }
  26912. res(result2);
  26913. });
  26914. }
  26915. try {
  26916. rs2({ html, htmlParses: await run(html) });
  26917. } catch (error2) {
  26918. rj(error2);
  26919. }
  26920. });
  26921. }
  26922. };
  26923. _nc = new WeakMap();
  26924. let QSCanvas2 = _QSCanvas;
  26925. function filterPaintbrushProps(obj) {
  26926. switch (obj == null ? void 0 : obj.textBaseline) {
  26927. case "normal":
  26928. if (isUni)
  26929. obj.textBaseline = "alphabetic";
  26930. break;
  26931. case "hanging":
  26932. if (isUni)
  26933. obj.textBaseline = "top";
  26934. break;
  26935. case "ideographic":
  26936. if (isUni)
  26937. obj.textBaseline = "bottom";
  26938. break;
  26939. }
  26940. switch (obj == null ? void 0 : obj.textAlign) {
  26941. case "start":
  26942. obj.textAlign = "left";
  26943. break;
  26944. case "end":
  26945. obj.textAlign = "right";
  26946. break;
  26947. }
  26948. }
  26949. function hyphen2Hump(s2) {
  26950. if (!s2)
  26951. return "";
  26952. const arr = s2.split("-");
  26953. for (var i2 = 1; i2 < arr.length; i2++) {
  26954. arr[i2] = arr[i2].charAt(0).toUpperCase() + arr[i2].substring(1);
  26955. }
  26956. return arr.join("");
  26957. }
  26958. function getPoints(x1, y1, x2, y2, pointCount, level) {
  26959. let a2, b2, rSquare, k, kv, points = [];
  26960. if (x1 === x2) {
  26961. a2 = x1 + (y2 - y1) * level;
  26962. b2 = y1 + (y2 - y1) / 2;
  26963. rSquare = (x1 - a2) ** 2 + (y1 - b2) ** 2;
  26964. } else if (y1 === y2) {
  26965. a2 = x1 + (x2 - x1) / 2;
  26966. b2 = y1 - (x2 - x1) * level;
  26967. rSquare = (x1 - a2) ** 2 + (y1 - b2) ** 2;
  26968. } else {
  26969. let xc = (x1 + x2) / 2, yc = (y1 + y2) / 2, lenSquare = ((x2 - x1) ** 2 + (y2 - y1) ** 2) * level ** 2;
  26970. k = (x2 - x1) / (y1 - y2);
  26971. let l2 = yc - k * xc;
  26972. let a1 = 1 + k ** 2, b1 = 2 * k * (l2 - yc) - 2 * xc, c1 = xc ** 2 + (l2 - yc) ** 2 - lenSquare;
  26973. kv = -1 / k;
  26974. a2 = (-b1 + Math.sqrt(b1 ** 2 - 4 * a1 * c1) * (kv > 0 && x2 > x1 || kv < 0 && x2 < x1 ? 1 : -1)) / (2 * a1);
  26975. b2 = k * a2 + l2;
  26976. rSquare = (x1 - a2) ** 2 + (y1 - b2) ** 2;
  26977. }
  26978. if (x1 === x2 || Math.abs(kv) > 1) {
  26979. let yDistance = y2 - y1;
  26980. let yDis = yDistance / (pointCount + 1);
  26981. for (let i2 = 0; i2 < pointCount; i2++) {
  26982. let y3 = y1 + yDis * (i2 + 1);
  26983. let x = Math.sqrt(rSquare - (y3 - b2) ** 2) * (y2 > y1 ? -1 : 1) + a2;
  26984. points.push([x, y3]);
  26985. }
  26986. } else {
  26987. let xDistance = x2 - x1;
  26988. let xDis = xDistance / (pointCount + 1);
  26989. for (let i2 = 0; i2 < pointCount; i2++) {
  26990. let x = x1 + xDis * (i2 + 1);
  26991. let y3 = Math.sqrt(rSquare - (x - a2) ** 2) * (x2 > x1 ? 1 : -1) + b2;
  26992. points.push([x, y3]);
  26993. }
  26994. }
  26995. return points;
  26996. }
  26997. var QRCodeAlg = function() {
  26998. function unicodeFormat8(code2) {
  26999. var c0, c1, c2;
  27000. if (code2 < 128) {
  27001. return [code2];
  27002. } else if (code2 < 2048) {
  27003. c0 = 192 + (code2 >> 6);
  27004. c1 = 128 + (code2 & 63);
  27005. return [c0, c1];
  27006. } else {
  27007. c0 = 224 + (code2 >> 12);
  27008. c1 = 128 + (code2 >> 6 & 63);
  27009. c2 = 128 + (code2 & 63);
  27010. return [c0, c1, c2];
  27011. }
  27012. }
  27013. function getUTF8Bytes(string) {
  27014. var utf8codes = [];
  27015. for (var i3 = 0; i3 < string.length; i3++) {
  27016. var code2 = string.charCodeAt(i3);
  27017. var utf8 = unicodeFormat8(code2);
  27018. for (var j2 = 0; j2 < utf8.length; j2++) {
  27019. utf8codes.push(utf8[j2]);
  27020. }
  27021. }
  27022. return utf8codes;
  27023. }
  27024. function QRCodeAlg2(data, errorCorrectLevel) {
  27025. this.typeNumber = -1;
  27026. this.errorCorrectLevel = errorCorrectLevel;
  27027. this.modules = null;
  27028. this.moduleCount = 0;
  27029. this.dataCache = null;
  27030. this.rsBlocks = null;
  27031. this.totalDataCount = -1;
  27032. this.data = data;
  27033. this.utf8bytes = getUTF8Bytes(data);
  27034. this.make();
  27035. }
  27036. QRCodeAlg2.prototype = { constructor: QRCodeAlg2, getModuleCount: function() {
  27037. return this.moduleCount;
  27038. }, make: function() {
  27039. this.getRightType();
  27040. this.dataCache = this.createData();
  27041. this.createQrcode();
  27042. }, makeImpl: function(maskPattern) {
  27043. this.moduleCount = this.typeNumber * 4 + 17;
  27044. this.modules = new Array(this.moduleCount);
  27045. for (var row = 0; row < this.moduleCount; row++) {
  27046. this.modules[row] = new Array(this.moduleCount);
  27047. }
  27048. this.setupPositionProbePattern(0, 0);
  27049. this.setupPositionProbePattern(this.moduleCount - 7, 0);
  27050. this.setupPositionProbePattern(0, this.moduleCount - 7);
  27051. this.setupPositionAdjustPattern();
  27052. this.setupTimingPattern();
  27053. this.setupTypeInfo(true, maskPattern);
  27054. if (this.typeNumber >= 7) {
  27055. this.setupTypeNumber(true);
  27056. }
  27057. this.mapData(this.dataCache, maskPattern);
  27058. }, setupPositionProbePattern: function(row, col) {
  27059. for (var r2 = -1; r2 <= 7; r2++) {
  27060. if (row + r2 <= -1 || this.moduleCount <= row + r2)
  27061. continue;
  27062. for (var c2 = -1; c2 <= 7; c2++) {
  27063. if (col + c2 <= -1 || this.moduleCount <= col + c2)
  27064. continue;
  27065. if (0 <= r2 && r2 <= 6 && (c2 == 0 || c2 == 6) || 0 <= c2 && c2 <= 6 && (r2 == 0 || r2 == 6) || 2 <= r2 && r2 <= 4 && 2 <= c2 && c2 <= 4) {
  27066. this.modules[row + r2][col + c2] = true;
  27067. } else {
  27068. this.modules[row + r2][col + c2] = false;
  27069. }
  27070. }
  27071. }
  27072. }, createQrcode: function() {
  27073. var minLostPoint = 0;
  27074. var pattern2 = 0;
  27075. var bestModules = null;
  27076. for (var i3 = 0; i3 < 8; i3++) {
  27077. this.makeImpl(i3);
  27078. var lostPoint = QRUtil.getLostPoint(this);
  27079. if (i3 == 0 || minLostPoint > lostPoint) {
  27080. minLostPoint = lostPoint;
  27081. pattern2 = i3;
  27082. bestModules = this.modules;
  27083. }
  27084. }
  27085. this.modules = bestModules;
  27086. this.setupTypeInfo(false, pattern2);
  27087. if (this.typeNumber >= 7) {
  27088. this.setupTypeNumber(false);
  27089. }
  27090. }, setupTimingPattern: function() {
  27091. for (var r2 = 8; r2 < this.moduleCount - 8; r2++) {
  27092. if (this.modules[r2][6] != null) {
  27093. continue;
  27094. }
  27095. this.modules[r2][6] = r2 % 2 == 0;
  27096. if (this.modules[6][r2] != null) {
  27097. continue;
  27098. }
  27099. this.modules[6][r2] = r2 % 2 == 0;
  27100. }
  27101. }, setupPositionAdjustPattern: function() {
  27102. var pos = QRUtil.getPatternPosition(this.typeNumber);
  27103. for (var i3 = 0; i3 < pos.length; i3++) {
  27104. for (var j2 = 0; j2 < pos.length; j2++) {
  27105. var row = pos[i3];
  27106. var col = pos[j2];
  27107. if (this.modules[row][col] != null) {
  27108. continue;
  27109. }
  27110. for (var r2 = -2; r2 <= 2; r2++) {
  27111. for (var c2 = -2; c2 <= 2; c2++) {
  27112. if (r2 == -2 || r2 == 2 || c2 == -2 || c2 == 2 || r2 == 0 && c2 == 0) {
  27113. this.modules[row + r2][col + c2] = true;
  27114. } else {
  27115. this.modules[row + r2][col + c2] = false;
  27116. }
  27117. }
  27118. }
  27119. }
  27120. }
  27121. }, setupTypeNumber: function(test2) {
  27122. var bits = QRUtil.getBCHTypeNumber(this.typeNumber);
  27123. for (var i3 = 0; i3 < 18; i3++) {
  27124. var mod = !test2 && (bits >> i3 & 1) == 1;
  27125. this.modules[Math.floor(i3 / 3)][i3 % 3 + this.moduleCount - 8 - 3] = mod;
  27126. this.modules[i3 % 3 + this.moduleCount - 8 - 3][Math.floor(i3 / 3)] = mod;
  27127. }
  27128. }, setupTypeInfo: function(test2, maskPattern) {
  27129. var data = QRErrorCorrectLevel[this.errorCorrectLevel] << 3 | maskPattern;
  27130. var bits = QRUtil.getBCHTypeInfo(data);
  27131. for (var i3 = 0; i3 < 15; i3++) {
  27132. var mod = !test2 && (bits >> i3 & 1) == 1;
  27133. if (i3 < 6) {
  27134. this.modules[i3][8] = mod;
  27135. } else if (i3 < 8) {
  27136. this.modules[i3 + 1][8] = mod;
  27137. } else {
  27138. this.modules[this.moduleCount - 15 + i3][8] = mod;
  27139. }
  27140. var mod = !test2 && (bits >> i3 & 1) == 1;
  27141. if (i3 < 8) {
  27142. this.modules[8][this.moduleCount - i3 - 1] = mod;
  27143. } else if (i3 < 9) {
  27144. this.modules[8][15 - i3 - 1 + 1] = mod;
  27145. } else {
  27146. this.modules[8][15 - i3 - 1] = mod;
  27147. }
  27148. }
  27149. this.modules[this.moduleCount - 8][8] = !test2;
  27150. }, createData: function() {
  27151. var buffer = new QRBitBuffer();
  27152. var lengthBits = this.typeNumber > 9 ? 16 : 8;
  27153. buffer.put(4, 4);
  27154. buffer.put(this.utf8bytes.length, lengthBits);
  27155. for (var i3 = 0, l2 = this.utf8bytes.length; i3 < l2; i3++) {
  27156. buffer.put(this.utf8bytes[i3], 8);
  27157. }
  27158. if (buffer.length + 4 <= this.totalDataCount * 8) {
  27159. buffer.put(0, 4);
  27160. }
  27161. while (buffer.length % 8 != 0) {
  27162. buffer.putBit(false);
  27163. }
  27164. while (true) {
  27165. if (buffer.length >= this.totalDataCount * 8) {
  27166. break;
  27167. }
  27168. buffer.put(QRCodeAlg2.PAD0, 8);
  27169. if (buffer.length >= this.totalDataCount * 8) {
  27170. break;
  27171. }
  27172. buffer.put(QRCodeAlg2.PAD1, 8);
  27173. }
  27174. return this.createBytes(buffer);
  27175. }, createBytes: function(buffer) {
  27176. var offset = 0;
  27177. var maxDcCount = 0;
  27178. var maxEcCount = 0;
  27179. var length = this.rsBlock.length / 3;
  27180. var rsBlocks = new Array();
  27181. for (var i3 = 0; i3 < length; i3++) {
  27182. var count = this.rsBlock[i3 * 3 + 0];
  27183. var totalCount = this.rsBlock[i3 * 3 + 1];
  27184. var dataCount = this.rsBlock[i3 * 3 + 2];
  27185. for (var j2 = 0; j2 < count; j2++) {
  27186. rsBlocks.push([dataCount, totalCount]);
  27187. }
  27188. }
  27189. var dcdata = new Array(rsBlocks.length);
  27190. var ecdata = new Array(rsBlocks.length);
  27191. for (var r2 = 0; r2 < rsBlocks.length; r2++) {
  27192. var dcCount = rsBlocks[r2][0];
  27193. var ecCount = rsBlocks[r2][1] - dcCount;
  27194. maxDcCount = Math.max(maxDcCount, dcCount);
  27195. maxEcCount = Math.max(maxEcCount, ecCount);
  27196. dcdata[r2] = new Array(dcCount);
  27197. for (var i3 = 0; i3 < dcdata[r2].length; i3++) {
  27198. dcdata[r2][i3] = 255 & buffer.buffer[i3 + offset];
  27199. }
  27200. offset += dcCount;
  27201. var rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount);
  27202. var rawPoly = new QRPolynomial(dcdata[r2], rsPoly.getLength() - 1);
  27203. var modPoly = rawPoly.mod(rsPoly);
  27204. ecdata[r2] = new Array(rsPoly.getLength() - 1);
  27205. for (var i3 = 0; i3 < ecdata[r2].length; i3++) {
  27206. var modIndex = i3 + modPoly.getLength() - ecdata[r2].length;
  27207. ecdata[r2][i3] = modIndex >= 0 ? modPoly.get(modIndex) : 0;
  27208. }
  27209. }
  27210. var data = new Array(this.totalDataCount);
  27211. var index2 = 0;
  27212. for (var i3 = 0; i3 < maxDcCount; i3++) {
  27213. for (var r2 = 0; r2 < rsBlocks.length; r2++) {
  27214. if (i3 < dcdata[r2].length) {
  27215. data[index2++] = dcdata[r2][i3];
  27216. }
  27217. }
  27218. }
  27219. for (var i3 = 0; i3 < maxEcCount; i3++) {
  27220. for (var r2 = 0; r2 < rsBlocks.length; r2++) {
  27221. if (i3 < ecdata[r2].length) {
  27222. data[index2++] = ecdata[r2][i3];
  27223. }
  27224. }
  27225. }
  27226. return data;
  27227. }, mapData: function(data, maskPattern) {
  27228. var inc = -1;
  27229. var row = this.moduleCount - 1;
  27230. var bitIndex = 7;
  27231. var byteIndex = 0;
  27232. for (var col = this.moduleCount - 1; col > 0; col -= 2) {
  27233. if (col == 6)
  27234. col--;
  27235. while (true) {
  27236. for (var c2 = 0; c2 < 2; c2++) {
  27237. if (this.modules[row][col - c2] == null) {
  27238. var dark = false;
  27239. if (byteIndex < data.length) {
  27240. dark = (data[byteIndex] >>> bitIndex & 1) == 1;
  27241. }
  27242. var mask = QRUtil.getMask(maskPattern, row, col - c2);
  27243. if (mask) {
  27244. dark = !dark;
  27245. }
  27246. this.modules[row][col - c2] = dark;
  27247. bitIndex--;
  27248. if (bitIndex == -1) {
  27249. byteIndex++;
  27250. bitIndex = 7;
  27251. }
  27252. }
  27253. }
  27254. row += inc;
  27255. if (row < 0 || this.moduleCount <= row) {
  27256. row -= inc;
  27257. inc = -inc;
  27258. break;
  27259. }
  27260. }
  27261. }
  27262. } };
  27263. QRCodeAlg2.PAD0 = 236;
  27264. QRCodeAlg2.PAD1 = 17;
  27265. var QRErrorCorrectLevel = [1, 0, 3, 2];
  27266. var QRMaskPattern = { PATTERN000: 0, PATTERN001: 1, PATTERN010: 2, PATTERN011: 3, PATTERN100: 4, PATTERN101: 5, PATTERN110: 6, PATTERN111: 7 };
  27267. var QRUtil = { PATTERN_POSITION_TABLE: [[], [6, 18], [6, 22], [6, 26], [6, 30], [6, 34], [6, 22, 38], [6, 24, 42], [6, 26, 46], [6, 28, 50], [6, 30, 54], [6, 32, 58], [6, 34, 62], [6, 26, 46, 66], [6, 26, 48, 70], [6, 26, 50, 74], [6, 30, 54, 78], [6, 30, 56, 82], [6, 30, 58, 86], [6, 34, 62, 90], [6, 28, 50, 72, 94], [6, 26, 50, 74, 98], [6, 30, 54, 78, 102], [6, 28, 54, 80, 106], [6, 32, 58, 84, 110], [6, 30, 58, 86, 114], [6, 34, 62, 90, 118], [6, 26, 50, 74, 98, 122], [6, 30, 54, 78, 102, 126], [6, 26, 52, 78, 104, 130], [6, 30, 56, 82, 108, 134], [6, 34, 60, 86, 112, 138], [6, 30, 58, 86, 114, 142], [6, 34, 62, 90, 118, 146], [6, 30, 54, 78, 102, 126, 150], [6, 24, 50, 76, 102, 128, 154], [6, 28, 54, 80, 106, 132, 158], [6, 32, 58, 84, 110, 136, 162], [6, 26, 54, 82, 110, 138, 166], [6, 30, 58, 86, 114, 142, 170]], G15: 1 << 10 | 1 << 8 | 1 << 5 | 1 << 4 | 1 << 2 | 1 << 1 | 1 << 0, G18: 1 << 12 | 1 << 11 | 1 << 10 | 1 << 9 | 1 << 8 | 1 << 5 | 1 << 2 | 1 << 0, G15_MASK: 1 << 14 | 1 << 12 | 1 << 10 | 1 << 4 | 1 << 1, getBCHTypeInfo: function(data) {
  27268. var d2 = data << 10;
  27269. while (QRUtil.getBCHDigit(d2) - QRUtil.getBCHDigit(QRUtil.G15) >= 0) {
  27270. d2 ^= QRUtil.G15 << QRUtil.getBCHDigit(d2) - QRUtil.getBCHDigit(QRUtil.G15);
  27271. }
  27272. return (data << 10 | d2) ^ QRUtil.G15_MASK;
  27273. }, getBCHTypeNumber: function(data) {
  27274. var d2 = data << 12;
  27275. while (QRUtil.getBCHDigit(d2) - QRUtil.getBCHDigit(QRUtil.G18) >= 0) {
  27276. d2 ^= QRUtil.G18 << QRUtil.getBCHDigit(d2) - QRUtil.getBCHDigit(QRUtil.G18);
  27277. }
  27278. return data << 12 | d2;
  27279. }, getBCHDigit: function(data) {
  27280. var digit = 0;
  27281. while (data != 0) {
  27282. digit++;
  27283. data >>>= 1;
  27284. }
  27285. return digit;
  27286. }, getPatternPosition: function(typeNumber) {
  27287. return QRUtil.PATTERN_POSITION_TABLE[typeNumber - 1];
  27288. }, getMask: function(maskPattern, i3, j2) {
  27289. switch (maskPattern) {
  27290. case QRMaskPattern.PATTERN000:
  27291. return (i3 + j2) % 2 == 0;
  27292. case QRMaskPattern.PATTERN001:
  27293. return i3 % 2 == 0;
  27294. case QRMaskPattern.PATTERN010:
  27295. return j2 % 3 == 0;
  27296. case QRMaskPattern.PATTERN011:
  27297. return (i3 + j2) % 3 == 0;
  27298. case QRMaskPattern.PATTERN100:
  27299. return (Math.floor(i3 / 2) + Math.floor(j2 / 3)) % 2 == 0;
  27300. case QRMaskPattern.PATTERN101:
  27301. return i3 * j2 % 2 + i3 * j2 % 3 == 0;
  27302. case QRMaskPattern.PATTERN110:
  27303. return (i3 * j2 % 2 + i3 * j2 % 3) % 2 == 0;
  27304. case QRMaskPattern.PATTERN111:
  27305. return (i3 * j2 % 3 + (i3 + j2) % 2) % 2 == 0;
  27306. default:
  27307. throw new Error("bad maskPattern:" + maskPattern);
  27308. }
  27309. }, getErrorCorrectPolynomial: function(errorCorrectLength) {
  27310. var a2 = new QRPolynomial([1], 0);
  27311. for (var i3 = 0; i3 < errorCorrectLength; i3++) {
  27312. a2 = a2.multiply(new QRPolynomial([1, QRMath.gexp(i3)], 0));
  27313. }
  27314. return a2;
  27315. }, getLostPoint: function(qrCode) {
  27316. var moduleCount = qrCode.getModuleCount(), lostPoint = 0, darkCount = 0;
  27317. for (var row = 0; row < moduleCount; row++) {
  27318. var sameCount = 0;
  27319. var head = qrCode.modules[row][0];
  27320. for (var col = 0; col < moduleCount; col++) {
  27321. var current = qrCode.modules[row][col];
  27322. if (col < moduleCount - 6) {
  27323. if (current && !qrCode.modules[row][col + 1] && qrCode.modules[row][col + 2] && qrCode.modules[row][col + 3] && qrCode.modules[row][col + 4] && !qrCode.modules[row][col + 5] && qrCode.modules[row][col + 6]) {
  27324. if (col < moduleCount - 10) {
  27325. if (qrCode.modules[row][col + 7] && qrCode.modules[row][col + 8] && qrCode.modules[row][col + 9] && qrCode.modules[row][col + 10]) {
  27326. lostPoint += 40;
  27327. }
  27328. } else if (col > 3) {
  27329. if (qrCode.modules[row][col - 1] && qrCode.modules[row][col - 2] && qrCode.modules[row][col - 3] && qrCode.modules[row][col - 4]) {
  27330. lostPoint += 40;
  27331. }
  27332. }
  27333. }
  27334. }
  27335. if (row < moduleCount - 1 && col < moduleCount - 1) {
  27336. var count = 0;
  27337. if (current)
  27338. count++;
  27339. if (qrCode.modules[row + 1][col])
  27340. count++;
  27341. if (qrCode.modules[row][col + 1])
  27342. count++;
  27343. if (qrCode.modules[row + 1][col + 1])
  27344. count++;
  27345. if (count == 0 || count == 4) {
  27346. lostPoint += 3;
  27347. }
  27348. }
  27349. if (head ^ current) {
  27350. sameCount++;
  27351. } else {
  27352. head = current;
  27353. if (sameCount >= 5) {
  27354. lostPoint += 3 + sameCount - 5;
  27355. }
  27356. sameCount = 1;
  27357. }
  27358. if (current) {
  27359. darkCount++;
  27360. }
  27361. }
  27362. }
  27363. for (var col = 0; col < moduleCount; col++) {
  27364. var sameCount = 0;
  27365. var head = qrCode.modules[0][col];
  27366. for (var row = 0; row < moduleCount; row++) {
  27367. var current = qrCode.modules[row][col];
  27368. if (row < moduleCount - 6) {
  27369. if (current && !qrCode.modules[row + 1][col] && qrCode.modules[row + 2][col] && qrCode.modules[row + 3][col] && qrCode.modules[row + 4][col] && !qrCode.modules[row + 5][col] && qrCode.modules[row + 6][col]) {
  27370. if (row < moduleCount - 10) {
  27371. if (qrCode.modules[row + 7][col] && qrCode.modules[row + 8][col] && qrCode.modules[row + 9][col] && qrCode.modules[row + 10][col]) {
  27372. lostPoint += 40;
  27373. }
  27374. } else if (row > 3) {
  27375. if (qrCode.modules[row - 1][col] && qrCode.modules[row - 2][col] && qrCode.modules[row - 3][col] && qrCode.modules[row - 4][col]) {
  27376. lostPoint += 40;
  27377. }
  27378. }
  27379. }
  27380. }
  27381. if (head ^ current) {
  27382. sameCount++;
  27383. } else {
  27384. head = current;
  27385. if (sameCount >= 5) {
  27386. lostPoint += 3 + sameCount - 5;
  27387. }
  27388. sameCount = 1;
  27389. }
  27390. }
  27391. }
  27392. var ratio = Math.abs(100 * darkCount / moduleCount / moduleCount - 50) / 5;
  27393. lostPoint += ratio * 10;
  27394. return lostPoint;
  27395. } };
  27396. var QRMath = { glog: function(n2) {
  27397. if (n2 < 1) {
  27398. throw new Error("glog(" + n2 + ")");
  27399. }
  27400. return QRMath.LOG_TABLE[n2];
  27401. }, gexp: function(n2) {
  27402. while (n2 < 0) {
  27403. n2 += 255;
  27404. }
  27405. while (n2 >= 256) {
  27406. n2 -= 255;
  27407. }
  27408. return QRMath.EXP_TABLE[n2];
  27409. }, EXP_TABLE: new Array(256), LOG_TABLE: new Array(256) };
  27410. for (var i2 = 0; i2 < 8; i2++) {
  27411. QRMath.EXP_TABLE[i2] = 1 << i2;
  27412. }
  27413. for (var i2 = 8; i2 < 256; i2++) {
  27414. QRMath.EXP_TABLE[i2] = QRMath.EXP_TABLE[i2 - 4] ^ QRMath.EXP_TABLE[i2 - 5] ^ QRMath.EXP_TABLE[i2 - 6] ^ QRMath.EXP_TABLE[i2 - 8];
  27415. }
  27416. for (var i2 = 0; i2 < 255; i2++) {
  27417. QRMath.LOG_TABLE[QRMath.EXP_TABLE[i2]] = i2;
  27418. }
  27419. function QRPolynomial(num, shift) {
  27420. if (num.length == void 0) {
  27421. throw new Error(num.length + "/" + shift);
  27422. }
  27423. var offset = 0;
  27424. while (offset < num.length && num[offset] == 0) {
  27425. offset++;
  27426. }
  27427. this.num = new Array(num.length - offset + shift);
  27428. for (var i3 = 0; i3 < num.length - offset; i3++) {
  27429. this.num[i3] = num[i3 + offset];
  27430. }
  27431. }
  27432. QRPolynomial.prototype = { get: function(index2) {
  27433. return this.num[index2];
  27434. }, getLength: function() {
  27435. return this.num.length;
  27436. }, multiply: function(e2) {
  27437. var num = new Array(this.getLength() + e2.getLength() - 1);
  27438. for (var i3 = 0; i3 < this.getLength(); i3++) {
  27439. for (var j2 = 0; j2 < e2.getLength(); j2++) {
  27440. num[i3 + j2] ^= QRMath.gexp(QRMath.glog(this.get(i3)) + QRMath.glog(e2.get(j2)));
  27441. }
  27442. }
  27443. return new QRPolynomial(num, 0);
  27444. }, mod: function(e2) {
  27445. var tl = this.getLength(), el = e2.getLength();
  27446. if (tl - el < 0) {
  27447. return this;
  27448. }
  27449. var num = new Array(tl);
  27450. for (var i3 = 0; i3 < tl; i3++) {
  27451. num[i3] = this.get(i3);
  27452. }
  27453. while (num.length >= el) {
  27454. var ratio = QRMath.glog(num[0]) - QRMath.glog(e2.get(0));
  27455. for (var i3 = 0; i3 < e2.getLength(); i3++) {
  27456. num[i3] ^= QRMath.gexp(QRMath.glog(e2.get(i3)) + ratio);
  27457. }
  27458. while (num[0] == 0) {
  27459. num.shift();
  27460. }
  27461. }
  27462. return new QRPolynomial(num, 0);
  27463. } };
  27464. var RS_BLOCK_TABLE = [[1, 26, 19], [1, 26, 16], [1, 26, 13], [1, 26, 9], [1, 44, 34], [1, 44, 28], [1, 44, 22], [1, 44, 16], [1, 70, 55], [1, 70, 44], [2, 35, 17], [2, 35, 13], [1, 100, 80], [2, 50, 32], [2, 50, 24], [4, 25, 9], [1, 134, 108], [2, 67, 43], [2, 33, 15, 2, 34, 16], [2, 33, 11, 2, 34, 12], [2, 86, 68], [4, 43, 27], [4, 43, 19], [4, 43, 15], [2, 98, 78], [4, 49, 31], [2, 32, 14, 4, 33, 15], [4, 39, 13, 1, 40, 14], [2, 121, 97], [2, 60, 38, 2, 61, 39], [4, 40, 18, 2, 41, 19], [4, 40, 14, 2, 41, 15], [2, 146, 116], [3, 58, 36, 2, 59, 37], [4, 36, 16, 4, 37, 17], [4, 36, 12, 4, 37, 13], [2, 86, 68, 2, 87, 69], [4, 69, 43, 1, 70, 44], [6, 43, 19, 2, 44, 20], [6, 43, 15, 2, 44, 16], [4, 101, 81], [1, 80, 50, 4, 81, 51], [4, 50, 22, 4, 51, 23], [3, 36, 12, 8, 37, 13], [2, 116, 92, 2, 117, 93], [6, 58, 36, 2, 59, 37], [4, 46, 20, 6, 47, 21], [7, 42, 14, 4, 43, 15], [4, 133, 107], [8, 59, 37, 1, 60, 38], [8, 44, 20, 4, 45, 21], [12, 33, 11, 4, 34, 12], [3, 145, 115, 1, 146, 116], [4, 64, 40, 5, 65, 41], [11, 36, 16, 5, 37, 17], [11, 36, 12, 5, 37, 13], [5, 109, 87, 1, 110, 88], [5, 65, 41, 5, 66, 42], [5, 54, 24, 7, 55, 25], [11, 36, 12], [5, 122, 98, 1, 123, 99], [7, 73, 45, 3, 74, 46], [15, 43, 19, 2, 44, 20], [3, 45, 15, 13, 46, 16], [1, 135, 107, 5, 136, 108], [10, 74, 46, 1, 75, 47], [1, 50, 22, 15, 51, 23], [2, 42, 14, 17, 43, 15], [5, 150, 120, 1, 151, 121], [9, 69, 43, 4, 70, 44], [17, 50, 22, 1, 51, 23], [2, 42, 14, 19, 43, 15], [3, 141, 113, 4, 142, 114], [3, 70, 44, 11, 71, 45], [17, 47, 21, 4, 48, 22], [9, 39, 13, 16, 40, 14], [3, 135, 107, 5, 136, 108], [3, 67, 41, 13, 68, 42], [15, 54, 24, 5, 55, 25], [15, 43, 15, 10, 44, 16], [4, 144, 116, 4, 145, 117], [17, 68, 42], [17, 50, 22, 6, 51, 23], [19, 46, 16, 6, 47, 17], [2, 139, 111, 7, 140, 112], [17, 74, 46], [7, 54, 24, 16, 55, 25], [34, 37, 13], [4, 151, 121, 5, 152, 122], [4, 75, 47, 14, 76, 48], [11, 54, 24, 14, 55, 25], [16, 45, 15, 14, 46, 16], [6, 147, 117, 4, 148, 118], [6, 73, 45, 14, 74, 46], [11, 54, 24, 16, 55, 25], [30, 46, 16, 2, 47, 17], [8, 132, 106, 4, 133, 107], [8, 75, 47, 13, 76, 48], [7, 54, 24, 22, 55, 25], [22, 45, 15, 13, 46, 16], [10, 142, 114, 2, 143, 115], [19, 74, 46, 4, 75, 47], [28, 50, 22, 6, 51, 23], [33, 46, 16, 4, 47, 17], [8, 152, 122, 4, 153, 123], [22, 73, 45, 3, 74, 46], [8, 53, 23, 26, 54, 24], [12, 45, 15, 28, 46, 16], [3, 147, 117, 10, 148, 118], [3, 73, 45, 23, 74, 46], [4, 54, 24, 31, 55, 25], [11, 45, 15, 31, 46, 16], [7, 146, 116, 7, 147, 117], [21, 73, 45, 7, 74, 46], [1, 53, 23, 37, 54, 24], [19, 45, 15, 26, 46, 16], [5, 145, 115, 10, 146, 116], [19, 75, 47, 10, 76, 48], [15, 54, 24, 25, 55, 25], [23, 45, 15, 25, 46, 16], [13, 145, 115, 3, 146, 116], [2, 74, 46, 29, 75, 47], [42, 54, 24, 1, 55, 25], [23, 45, 15, 28, 46, 16], [17, 145, 115], [10, 74, 46, 23, 75, 47], [10, 54, 24, 35, 55, 25], [19, 45, 15, 35, 46, 16], [17, 145, 115, 1, 146, 116], [14, 74, 46, 21, 75, 47], [29, 54, 24, 19, 55, 25], [11, 45, 15, 46, 46, 16], [13, 145, 115, 6, 146, 116], [14, 74, 46, 23, 75, 47], [44, 54, 24, 7, 55, 25], [59, 46, 16, 1, 47, 17], [12, 151, 121, 7, 152, 122], [12, 75, 47, 26, 76, 48], [39, 54, 24, 14, 55, 25], [22, 45, 15, 41, 46, 16], [6, 151, 121, 14, 152, 122], [6, 75, 47, 34, 76, 48], [46, 54, 24, 10, 55, 25], [2, 45, 15, 64, 46, 16], [17, 152, 122, 4, 153, 123], [29, 74, 46, 14, 75, 47], [49, 54, 24, 10, 55, 25], [24, 45, 15, 46, 46, 16], [4, 152, 122, 18, 153, 123], [13, 74, 46, 32, 75, 47], [48, 54, 24, 14, 55, 25], [42, 45, 15, 32, 46, 16], [20, 147, 117, 4, 148, 118], [40, 75, 47, 7, 76, 48], [43, 54, 24, 22, 55, 25], [10, 45, 15, 67, 46, 16], [19, 148, 118, 6, 149, 119], [18, 75, 47, 31, 76, 48], [34, 54, 24, 34, 55, 25], [20, 45, 15, 61, 46, 16]];
  27465. QRCodeAlg2.prototype.getRightType = function() {
  27466. for (var typeNumber = 1; typeNumber < 41; typeNumber++) {
  27467. var rsBlock = RS_BLOCK_TABLE[(typeNumber - 1) * 4 + this.errorCorrectLevel];
  27468. if (rsBlock == void 0) {
  27469. throw new Error("bad rs block @ typeNumber:" + typeNumber + "/errorCorrectLevel:" + this.errorCorrectLevel);
  27470. }
  27471. var length = rsBlock.length / 3;
  27472. var totalDataCount = 0;
  27473. for (var i3 = 0; i3 < length; i3++) {
  27474. var count = rsBlock[i3 * 3 + 0];
  27475. var dataCount = rsBlock[i3 * 3 + 2];
  27476. totalDataCount += dataCount * count;
  27477. }
  27478. var lengthBytes = typeNumber > 9 ? 2 : 1;
  27479. if (this.utf8bytes.length + lengthBytes < totalDataCount || typeNumber == 40) {
  27480. this.typeNumber = typeNumber;
  27481. this.rsBlock = rsBlock;
  27482. this.totalDataCount = totalDataCount;
  27483. break;
  27484. }
  27485. }
  27486. };
  27487. function QRBitBuffer() {
  27488. this.buffer = new Array();
  27489. this.length = 0;
  27490. }
  27491. QRBitBuffer.prototype = { get: function(index2) {
  27492. var bufIndex = Math.floor(index2 / 8);
  27493. return this.buffer[bufIndex] >>> 7 - index2 % 8 & 1;
  27494. }, put: function(num, length) {
  27495. for (var i3 = 0; i3 < length; i3++) {
  27496. this.putBit(num >>> length - i3 - 1 & 1);
  27497. }
  27498. }, putBit: function(bit) {
  27499. var bufIndex = Math.floor(this.length / 8);
  27500. if (this.buffer.length <= bufIndex) {
  27501. this.buffer.push(0);
  27502. }
  27503. if (bit) {
  27504. this.buffer[bufIndex] |= 128 >>> this.length % 8;
  27505. }
  27506. this.length++;
  27507. } };
  27508. return QRCodeAlg2;
  27509. }();
  27510. var htmlParse = function() {
  27511. var startTag = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/;
  27512. var endTag = /^<\/([-A-Za-z0-9_]+)[^>]*>/;
  27513. var attr = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g;
  27514. var empty2 = makeMap2("area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr");
  27515. var block = makeMap2("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");
  27516. var inline = makeMap2("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");
  27517. var closeSelf = makeMap2("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr");
  27518. var fillAttrs = makeMap2("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected");
  27519. var special = makeMap2("script,style");
  27520. function HTMLParser(html, handler) {
  27521. var index2;
  27522. var chars;
  27523. var match;
  27524. var stack = [];
  27525. var last = html;
  27526. stack.last = function() {
  27527. return this[this.length - 1];
  27528. };
  27529. while (html) {
  27530. chars = true;
  27531. if (!stack.last() || !special[stack.last()]) {
  27532. if (html.indexOf("<!--") == 0) {
  27533. index2 = html.indexOf("-->");
  27534. if (index2 >= 0) {
  27535. if (handler.comment) {
  27536. handler.comment(html.substring(4, index2));
  27537. }
  27538. html = html.substring(index2 + 3);
  27539. chars = false;
  27540. }
  27541. } else if (html.indexOf("</") == 0) {
  27542. match = html.match(endTag);
  27543. if (match) {
  27544. html = html.substring(match[0].length);
  27545. match[0].replace(endTag, parseEndTag);
  27546. chars = false;
  27547. }
  27548. } else if (html.indexOf("<") == 0) {
  27549. match = html.match(startTag);
  27550. if (match) {
  27551. html = html.substring(match[0].length);
  27552. match[0].replace(startTag, parseStartTag);
  27553. chars = false;
  27554. }
  27555. }
  27556. if (chars) {
  27557. index2 = html.indexOf("<");
  27558. var text = index2 < 0 ? html : html.substring(0, index2);
  27559. html = index2 < 0 ? "" : html.substring(index2);
  27560. if (handler.chars) {
  27561. handler.chars(text);
  27562. }
  27563. }
  27564. } else {
  27565. html = html.replace(new RegExp("([\\s\\S]*?)</" + stack.last() + "[^>]*>"), function(all, text2) {
  27566. text2 = text2.replace(/<!--([\s\S]*?)-->|<!\[CDATA\[([\s\S]*?)]]>/g, "$1$2");
  27567. if (handler.chars) {
  27568. handler.chars(text2);
  27569. }
  27570. return "";
  27571. });
  27572. parseEndTag("", stack.last());
  27573. }
  27574. if (html == last) {
  27575. throw "Parse Error: " + html;
  27576. }
  27577. last = html;
  27578. }
  27579. parseEndTag();
  27580. function parseStartTag(tag, tagName, rest, unary) {
  27581. tagName = tagName.toLowerCase();
  27582. if (block[tagName]) {
  27583. while (stack.last() && inline[stack.last()]) {
  27584. parseEndTag("", stack.last());
  27585. }
  27586. }
  27587. if (closeSelf[tagName] && stack.last() == tagName) {
  27588. parseEndTag("", tagName);
  27589. }
  27590. unary = empty2[tagName] || !!unary;
  27591. if (!unary) {
  27592. stack.push(tagName);
  27593. }
  27594. if (handler.start) {
  27595. var attrs = [];
  27596. rest.replace(attr, function(match2, name2) {
  27597. var value = arguments[2] ? arguments[2] : arguments[3] ? arguments[3] : arguments[4] ? arguments[4] : fillAttrs[name2] ? name2 : "";
  27598. attrs.push({ name: name2, value, escaped: value.replace(/(^|[^\\])"/g, '$1\\"') });
  27599. });
  27600. if (handler.start) {
  27601. handler.start(tagName, attrs, unary);
  27602. }
  27603. }
  27604. }
  27605. function parseEndTag(tag, tagName) {
  27606. if (!tagName) {
  27607. var pos = 0;
  27608. } else {
  27609. for (var pos = stack.length - 1; pos >= 0; pos--) {
  27610. if (stack[pos] == tagName) {
  27611. break;
  27612. }
  27613. }
  27614. }
  27615. if (pos >= 0) {
  27616. for (var i2 = stack.length - 1; i2 >= pos; i2--) {
  27617. if (handler.end) {
  27618. handler.end(stack[i2]);
  27619. }
  27620. }
  27621. stack.length = pos;
  27622. }
  27623. }
  27624. }
  27625. function makeMap2(str) {
  27626. var obj = {};
  27627. var items = str.split(",");
  27628. for (var i2 = 0; i2 < items.length; i2++) {
  27629. obj[items[i2]] = true;
  27630. }
  27631. return obj;
  27632. }
  27633. function removeDOCTYPE(html) {
  27634. return html.replace(/<\?xml.*\?>\n/, "").replace(/<!doctype.*>\n/, "").replace(/<!DOCTYPE.*>\n/, "");
  27635. }
  27636. function parseAttrs(attrs) {
  27637. return attrs.reduce(function(pre, attr2) {
  27638. var value = attr2.value;
  27639. var name2 = attr2.name;
  27640. if (pre[name2]) {
  27641. pre[name2] = pre[name2] + " " + value;
  27642. } else {
  27643. pre[name2] = value;
  27644. }
  27645. return pre;
  27646. }, {});
  27647. }
  27648. function parseHtml(html) {
  27649. html = removeDOCTYPE(html);
  27650. var stacks = [];
  27651. var results = { node: "root", children: [] };
  27652. HTMLParser(html, { start: function start(tag, attrs, unary) {
  27653. var node2 = { name: tag };
  27654. if (attrs.length !== 0) {
  27655. node2.attrs = parseAttrs(attrs);
  27656. }
  27657. if (unary) {
  27658. var parent2 = stacks[0] || results;
  27659. if (!parent2.children) {
  27660. parent2.children = [];
  27661. }
  27662. parent2.children.push(node2);
  27663. } else {
  27664. stacks.unshift(node2);
  27665. }
  27666. }, end: function end(tag) {
  27667. var node2 = stacks.shift();
  27668. if (node2.name !== tag)
  27669. formatAppLog("error", "at node_modules/qs-canvas/index.js:1260", "invalid state: mismatch end tag");
  27670. if (stacks.length === 0) {
  27671. results.children.push(node2);
  27672. } else {
  27673. var parent2 = stacks[0];
  27674. if (!parent2.children) {
  27675. parent2.children = [];
  27676. }
  27677. parent2.children.push(node2);
  27678. }
  27679. }, chars: function chars(text) {
  27680. var node2 = { type: "text", text };
  27681. if (stacks.length === 0) {
  27682. results.children.push(node2);
  27683. } else {
  27684. var parent2 = stacks[0];
  27685. if (!parent2.children) {
  27686. parent2.children = [];
  27687. }
  27688. parent2.children.push(node2);
  27689. }
  27690. }, comment: function comment(text) {
  27691. var node2 = { node: "comment", text };
  27692. var parent2 = stacks[0];
  27693. if (!parent2.children) {
  27694. parent2.children = [];
  27695. }
  27696. parent2.children.push(node2);
  27697. } });
  27698. return results.children;
  27699. }
  27700. return parseHtml;
  27701. }();
  27702. var imgTools = /* @__PURE__ */ function() {
  27703. function getLocalFilePath(path) {
  27704. if (path.indexOf("_www") === 0 || path.indexOf("_doc") === 0 || path.indexOf("_documents") === 0 || path.indexOf("_downloads") === 0) {
  27705. return path;
  27706. }
  27707. if (path.indexOf("file://") === 0) {
  27708. return path;
  27709. }
  27710. if (path.indexOf("/storage/emulated/0/") === 0) {
  27711. return path;
  27712. }
  27713. if (path.indexOf("/") === 0) {
  27714. var localFilePath = plus.io.convertAbsoluteFileSystem(path);
  27715. if (localFilePath !== path) {
  27716. return localFilePath;
  27717. } else {
  27718. path = path.substr(1);
  27719. }
  27720. }
  27721. return "_www/" + path;
  27722. }
  27723. function dataUrlToBase64(str) {
  27724. var array2 = str.split(",");
  27725. return array2[array2.length - 1];
  27726. }
  27727. var index2 = 0;
  27728. function getNewFileId() {
  27729. return Date.now() + String(index2++);
  27730. }
  27731. function biggerThan(v1, v2) {
  27732. var v1Array = v1.split(".");
  27733. var v2Array = v2.split(".");
  27734. var update = false;
  27735. for (var index3 = 0; index3 < v2Array.length; index3++) {
  27736. var diff = v1Array[index3] - v2Array[index3];
  27737. if (diff !== 0) {
  27738. update = diff > 0;
  27739. break;
  27740. }
  27741. }
  27742. return update;
  27743. }
  27744. function pathToBase64(path) {
  27745. return new Promise(function(resolve, reject) {
  27746. if (typeof window === "object" && "document" in window) {
  27747. if (typeof FileReader === "function") {
  27748. var xhr = new XMLHttpRequest();
  27749. xhr.open("GET", path, true);
  27750. xhr.responseType = "blob";
  27751. xhr.onload = function() {
  27752. if (this.status === 200) {
  27753. let fileReader = new FileReader();
  27754. fileReader.onload = function(e2) {
  27755. resolve(e2.target.result);
  27756. };
  27757. fileReader.onerror = reject;
  27758. fileReader.readAsDataURL(this.response);
  27759. }
  27760. };
  27761. xhr.onerror = reject;
  27762. xhr.send();
  27763. return;
  27764. }
  27765. var canvas = document.createElement("canvas");
  27766. var c2x = canvas.getContext("2d");
  27767. var img = new Image();
  27768. img.onload = function() {
  27769. canvas.width = img.width;
  27770. canvas.height = img.height;
  27771. c2x.drawImage(img, 0, 0);
  27772. resolve(canvas.toDataURL());
  27773. canvas.height = canvas.width = 0;
  27774. };
  27775. img.onerror = reject;
  27776. img.src = path;
  27777. return;
  27778. }
  27779. if (typeof plus === "object") {
  27780. plus.io.resolveLocalFileSystemURL(getLocalFilePath(path), function(entry) {
  27781. entry.file(function(file) {
  27782. var fileReader = new plus.io.FileReader();
  27783. fileReader.onload = function(data) {
  27784. resolve(data.target.result);
  27785. };
  27786. fileReader.onerror = function(error2) {
  27787. reject(error2);
  27788. };
  27789. fileReader.readAsDataURL(file);
  27790. }, function(error2) {
  27791. reject(error2);
  27792. });
  27793. }, function(error2) {
  27794. reject(error2);
  27795. });
  27796. return;
  27797. }
  27798. if (typeof wx === "object" && wx.canIUse("getFileSystemManager")) {
  27799. wx.getFileSystemManager().readFile({
  27800. filePath: path,
  27801. encoding: "base64",
  27802. success: function(res) {
  27803. resolve("data:image/png;base64," + res.data);
  27804. },
  27805. fail: function(error2) {
  27806. reject(error2);
  27807. }
  27808. });
  27809. return;
  27810. }
  27811. reject(new Error("not support"));
  27812. });
  27813. }
  27814. function base64ToPath(base64) {
  27815. return new Promise(function(resolve, reject) {
  27816. if (typeof window === "object" && "document" in window) {
  27817. base64 = base64.split(",");
  27818. var type = base64[0].match(/:(.*?);/)[1];
  27819. var str = atob(base64[1]);
  27820. var n2 = str.length;
  27821. var array2 = new Uint8Array(n2);
  27822. while (n2--) {
  27823. array2[n2] = str.charCodeAt(n2);
  27824. }
  27825. return resolve((window.URL || window.webkitURL).createObjectURL(new Blob([array2], { type })));
  27826. }
  27827. var extName = base64.split(",")[0].match(/data\:\S+\/(\S+);/);
  27828. if (extName) {
  27829. extName = extName[1];
  27830. } else {
  27831. reject(new Error("base64 error"));
  27832. }
  27833. var fileName = getNewFileId() + "." + extName;
  27834. if (typeof plus === "object") {
  27835. var basePath = "_doc";
  27836. var dirPath = "uniapp_temp";
  27837. var filePath = basePath + "/" + dirPath + "/" + fileName;
  27838. if (!biggerThan(plus.os.name === "Android" ? "1.9.9.80627" : "1.9.9.80472", plus.runtime.innerVersion)) {
  27839. plus.io.resolveLocalFileSystemURL(basePath, function(entry) {
  27840. entry.getDirectory(dirPath, {
  27841. create: true,
  27842. exclusive: false
  27843. }, function(entry2) {
  27844. entry2.getFile(fileName, {
  27845. create: true,
  27846. exclusive: false
  27847. }, function(entry3) {
  27848. entry3.createWriter(function(writer) {
  27849. writer.onwrite = function() {
  27850. resolve(filePath);
  27851. };
  27852. writer.onerror = reject;
  27853. writer.seek(0);
  27854. writer.writeAsBinary(dataUrlToBase64(base64));
  27855. }, reject);
  27856. }, reject);
  27857. }, reject);
  27858. }, reject);
  27859. return;
  27860. }
  27861. var bitmap = new plus.nativeObj.Bitmap(fileName);
  27862. bitmap.loadBase64Data(base64, function() {
  27863. bitmap.save(filePath, {}, function() {
  27864. bitmap.clear();
  27865. resolve(filePath);
  27866. }, function(error2) {
  27867. bitmap.clear();
  27868. reject(error2);
  27869. });
  27870. }, function(error2) {
  27871. bitmap.clear();
  27872. reject(error2);
  27873. });
  27874. return;
  27875. }
  27876. function getEnvPath() {
  27877. var _a2, _b2, _c, _d, _e2, _f;
  27878. if (typeof my === "object" && ((_a2 = my == null ? void 0 : my.env) == null ? void 0 : _a2.USER_DATA_PATH)) {
  27879. return my.env.USER_DATA_PATH;
  27880. }
  27881. if (typeof swan === "object" && ((_b2 = swan == null ? void 0 : swan.env) == null ? void 0 : _b2.USER_DATA_PATH)) {
  27882. return swan.env.USER_DATA_PATH;
  27883. }
  27884. if (typeof tt === "object" && ((_c = tt == null ? void 0 : tt.env) == null ? void 0 : _c.USER_DATA_PATH)) {
  27885. return tt.env.USER_DATA_PATH;
  27886. }
  27887. if (typeof qq === "object" && ((_d = qq == null ? void 0 : qq.env) == null ? void 0 : _d.USER_DATA_PATH)) {
  27888. return qq.env.USER_DATA_PATH;
  27889. }
  27890. if (typeof qh === "object" && ((_e2 = qh == null ? void 0 : qh.env) == null ? void 0 : _e2.USER_DATA_PATH)) {
  27891. return qh.env.USER_DATA_PATH;
  27892. }
  27893. if (typeof wx === "object" && ((_f = wx == null ? void 0 : wx.env) == null ? void 0 : _f.USER_DATA_PATH)) {
  27894. return wx.env.USER_DATA_PATH;
  27895. }
  27896. return "https://user";
  27897. }
  27898. try {
  27899. var filePath = getEnvPath() + "/" + fileName;
  27900. uni.getFileSystemManager().writeFile({
  27901. filePath,
  27902. data: dataUrlToBase64(base64),
  27903. encoding: "base64",
  27904. success: function() {
  27905. resolve(filePath);
  27906. },
  27907. fail: function(error2) {
  27908. reject(error2);
  27909. }
  27910. });
  27911. } catch (e2) {
  27912. reject(new Error("not support"));
  27913. }
  27914. });
  27915. }
  27916. return { pathToBase64, base64ToPath };
  27917. }();
  27918. if (notUnd("object")) {
  27919. module.exports = QSCanvas2;
  27920. }
  27921. return QSCanvas2;
  27922. })();
  27923. })(qsCanvas);
  27924. var qsCanvasExports = qsCanvas.exports;
  27925. const QSCanvas = /* @__PURE__ */ getDefaultExportFromCjs(qsCanvasExports);
  27926. var define_import_meta_env_default = { SHOPRO_VERSION: "v1.8.3", SHOPRO_BASE_URL: "https://zxgz.newfeifan.cn", SHOPRO_DEV_BASE_URL: "https://zxgz.newfeifan.cn", SHOPRO_API_PATH: "/app-api", SHOPRO_DEV_PORT: "3000", SHOPRO_STATIC_URL: "http://localhost", SHOPRO_MPLIVE_ON: "0", BASE_URL: "/", MODE: "development", DEV: true, PROD: false, SSR: false };
  27927. const _sfc_main$39 = {
  27928. __name: "s-follow-modal",
  27929. setup(__props, { expose: __expose }) {
  27930. __expose();
  27931. const show = vue.computed(() => sheep$1.$store("modal").subscribe);
  27932. const imagePath = vue.ref("");
  27933. async function drawQrCode(url2) {
  27934. formatAppLog("log", "at sheep/components/s-follow-modal/s-follow-modal.vue:47", url2);
  27935. const qsc = new QSCanvas({
  27936. canvasId: "myCanvas",
  27937. width: 300,
  27938. height: 300,
  27939. setCanvasWH: (canvas) => {
  27940. canvas.width = 300;
  27941. canvas.height = 300;
  27942. }
  27943. });
  27944. await qsc.drawQrCode({
  27945. val: url2,
  27946. // 二维码内容
  27947. x: 25,
  27948. y: 15,
  27949. size: 250,
  27950. // 二维码大小
  27951. background: "#ffffff",
  27952. // 背景色
  27953. foreground: "#000000",
  27954. // 前景色
  27955. pdground: "#000000",
  27956. // 定位角点颜色
  27957. correctLevel: 3
  27958. // 容错级别
  27959. });
  27960. const qrY = 15;
  27961. const qrHeight = 250;
  27962. const textX = 300 / 2;
  27963. const textY = qrY + qrHeight + 15;
  27964. await qsc.drawText({
  27965. val: t$6("pop.long_press_qrcode_follow"),
  27966. // 文字内容
  27967. x: textX,
  27968. y: textY,
  27969. maxWidth: 250,
  27970. // 文字的最大宽度,确保文字不会超出画布
  27971. paintbrushProps: {
  27972. fillStyle: "#333",
  27973. // 文字颜色
  27974. textAlign: "center",
  27975. // 文字水平居中
  27976. textBaseline: "middle",
  27977. // 文字垂直居中
  27978. font: {
  27979. // 字体属性以对象格式传递
  27980. fontStyle: "normal",
  27981. // 字体样式
  27982. fontVariant: "normal",
  27983. // 字体变体
  27984. fontWeight: "normal",
  27985. // 字体粗细
  27986. fontSize: 14,
  27987. // 字体大小
  27988. fontFamily: "sans-serif"
  27989. // 字体系列
  27990. }
  27991. }
  27992. });
  27993. await qsc.draw();
  27994. const imagePathData = await qsc.toImage();
  27995. if (imagePathData) {
  27996. imagePath.value = imagePathData;
  27997. }
  27998. }
  27999. function createQrcode() {
  28000. let SHOPRO_DEV_BASE_URL = "https://zxgz.newfeifan.cn";
  28001. formatAppLog("log", "at sheep/components/s-follow-modal/s-follow-modal.vue:113", "当前接口Url", SHOPRO_DEV_BASE_URL);
  28002. if (SHOPRO_DEV_BASE_URL.includes("letcgo.com")) {
  28003. drawQrCode(define_import_meta_env_default.SHOPRO_MP_HOME_PAGE_LETCGO);
  28004. } else {
  28005. drawQrCode(define_import_meta_env_default.SHOPRO_MP_HOME_PAGE_FEIFAN);
  28006. }
  28007. }
  28008. vue.watchEffect(() => {
  28009. if (show.value) {
  28010. vue.nextTick().then(() => {
  28011. createQrcode();
  28012. });
  28013. }
  28014. });
  28015. const __returned__ = { show, imagePath, drawQrCode, createQrcode, computed: vue.computed, onMounted: vue.onMounted, ref: vue.ref, watchEffect: vue.watchEffect, nextTick: vue.nextTick, get sheep() {
  28016. return sheep$1;
  28017. }, get QSCanvas() {
  28018. return QSCanvas;
  28019. }, get onShow() {
  28020. return onShow;
  28021. }, get closeSubscribeModal() {
  28022. return closeSubscribeModal;
  28023. }, get t() {
  28024. return t$6;
  28025. } };
  28026. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  28027. return __returned__;
  28028. }
  28029. };
  28030. function _sfc_render$38(_ctx, _cache, $props, $setup, $data, $options) {
  28031. const _component_su_popup = resolveEasycom(vue.resolveDynamicComponent("su-popup"), __easycom_4$3);
  28032. return vue.openBlock(), vue.createElementBlock(
  28033. vue.Fragment,
  28034. null,
  28035. [
  28036. vue.createCommentVNode(" 关注 "),
  28037. vue.createVNode(_component_su_popup, {
  28038. show: $setup.show,
  28039. round: "10",
  28040. onClose: $setup.closeSubscribeModal
  28041. }, {
  28042. default: vue.withCtx(() => [
  28043. vue.createElementVNode("view", { class: "login-wrap" }, [
  28044. vue.createElementVNode("view", { class: "head-box" }, [
  28045. vue.createElementVNode("view", { class: "ss-m-b-20" }, [
  28046. vue.createElementVNode(
  28047. "view",
  28048. { class: "head-title ss-m-r-40 head-title-animation" },
  28049. vue.toDisplayString($setup.t("pop.follow_public_account")),
  28050. 1
  28051. /* TEXT */
  28052. ),
  28053. vue.createElementVNode("view", { class: "ss-flex ss-row-center" }, [
  28054. vue.createElementVNode("canvas", {
  28055. class: "hideCanvas",
  28056. "canvas-id": "myCanvas",
  28057. style: { "width": "300px", "height": "300px" }
  28058. }),
  28059. vue.createElementVNode("image", {
  28060. src: $setup.imagePath,
  28061. mode: "widthFix"
  28062. }, null, 8, ["src"])
  28063. ])
  28064. ])
  28065. ])
  28066. ])
  28067. ]),
  28068. _: 1
  28069. /* STABLE */
  28070. }, 8, ["show", "onClose"])
  28071. ],
  28072. 2112
  28073. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  28074. );
  28075. }
  28076. const __easycom_6$1 = /* @__PURE__ */ _export_sfc(_sfc_main$39, [["render", _sfc_render$38], ["__scopeId", "data-v-7b106c15"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-follow-modal/s-follow-modal.vue"]]);
  28077. const _sfc_main$38 = {
  28078. name: "uni-easyinput",
  28079. emits: ["click", "iconClick", "update:modelValue", "input", "focus", "blur", "confirm"],
  28080. model: {
  28081. prop: "modelValue",
  28082. event: "update:modelValue"
  28083. },
  28084. props: {
  28085. name: String,
  28086. value: [Number, String],
  28087. modelValue: [Number, String],
  28088. type: {
  28089. type: String,
  28090. default: "text"
  28091. },
  28092. clearable: {
  28093. type: Boolean,
  28094. default: true
  28095. },
  28096. autoHeight: {
  28097. type: Boolean,
  28098. default: false
  28099. },
  28100. placeholder: String,
  28101. placeholderStyle: String,
  28102. focus: {
  28103. type: Boolean,
  28104. default: false
  28105. },
  28106. disabled: {
  28107. type: Boolean,
  28108. default: false
  28109. },
  28110. maxlength: {
  28111. type: [Number, String],
  28112. default: 140
  28113. },
  28114. confirmType: {
  28115. type: String,
  28116. default: "done"
  28117. },
  28118. clearSize: {
  28119. type: [Number, String],
  28120. default: 15
  28121. },
  28122. inputBorder: {
  28123. type: Boolean,
  28124. default: true
  28125. },
  28126. prefixIcon: {
  28127. type: String,
  28128. default: ""
  28129. },
  28130. suffixIcon: {
  28131. type: String,
  28132. default: ""
  28133. },
  28134. trim: {
  28135. type: [Boolean, String],
  28136. default: true
  28137. },
  28138. passwordIcon: {
  28139. type: Boolean,
  28140. default: true
  28141. },
  28142. styles: {
  28143. type: Object,
  28144. default() {
  28145. return {
  28146. color: "#333",
  28147. disableColor: "#ffffff",
  28148. borderColor: "#ffffff"
  28149. };
  28150. }
  28151. },
  28152. errorMessage: {
  28153. type: [String, Boolean],
  28154. default: ""
  28155. },
  28156. paddingLeft: {
  28157. type: [Number, String],
  28158. default: 0
  28159. }
  28160. },
  28161. data() {
  28162. return {
  28163. focused: false,
  28164. errMsg: "",
  28165. val: "",
  28166. showMsg: "",
  28167. border: false,
  28168. isFirstBorder: false,
  28169. showClearIcon: false,
  28170. showPassword: false
  28171. };
  28172. },
  28173. computed: {
  28174. msg() {
  28175. return this.errorMessage || this.errMsg;
  28176. },
  28177. // 因为uniapp的input组件的maxlength组件必须要数值,这里转为数值,用户可以传入字符串数值
  28178. inputMaxlength() {
  28179. return Number(this.maxlength);
  28180. }
  28181. },
  28182. watch: {
  28183. value(newVal) {
  28184. if (this.errMsg)
  28185. this.errMsg = "";
  28186. this.val = newVal;
  28187. if (this.form && this.formItem && !this.is_reset) {
  28188. this.is_reset = false;
  28189. this.formItem.setValue(newVal);
  28190. }
  28191. },
  28192. modelValue(newVal) {
  28193. if (this.errMsg)
  28194. this.errMsg = "";
  28195. this.val = newVal;
  28196. if (this.form && this.formItem && !this.is_reset) {
  28197. this.is_reset = false;
  28198. this.formItem.setValue(newVal);
  28199. }
  28200. },
  28201. focus(newVal) {
  28202. this.$nextTick(() => {
  28203. this.focused = this.focus;
  28204. });
  28205. }
  28206. },
  28207. created() {
  28208. if (!this.value && this.value !== 0) {
  28209. this.val = this.modelValue;
  28210. }
  28211. if (!this.modelValue && this.modelValue !== 0) {
  28212. this.val = this.value;
  28213. }
  28214. this.form = this.getForm("uniForms");
  28215. this.formItem = this.getForm("uniFormsItem");
  28216. if (this.form && this.formItem) {
  28217. if (this.formItem.name) {
  28218. if (!this.is_reset) {
  28219. this.is_reset = false;
  28220. this.formItem.setValue(this.val);
  28221. }
  28222. this.rename = this.formItem.name;
  28223. this.form.inputChildrens.push(this);
  28224. }
  28225. }
  28226. },
  28227. mounted() {
  28228. this.$nextTick(() => {
  28229. this.focused = this.focus;
  28230. });
  28231. },
  28232. methods: {
  28233. /**
  28234. * 初始化变量值
  28235. */
  28236. init() {
  28237. },
  28238. onClickIcon(type) {
  28239. this.$emit("iconClick", type);
  28240. },
  28241. /**
  28242. * 获取父元素实例
  28243. */
  28244. getForm(name2 = "uniForms") {
  28245. let parent2 = this.$parent;
  28246. let parentName = parent2.$options.name;
  28247. while (parentName !== name2) {
  28248. parent2 = parent2.$parent;
  28249. if (!parent2)
  28250. return false;
  28251. parentName = parent2.$options.name;
  28252. }
  28253. return parent2;
  28254. },
  28255. onEyes() {
  28256. this.showPassword = !this.showPassword;
  28257. },
  28258. onInput(event) {
  28259. let value = event.detail.value;
  28260. if (this.trim) {
  28261. if (typeof this.trim === "boolean" && this.trim) {
  28262. value = this.trimStr(value);
  28263. }
  28264. if (typeof this.trim === "string") {
  28265. value = this.trimStr(value, this.trim);
  28266. }
  28267. }
  28268. if (this.errMsg)
  28269. this.errMsg = "";
  28270. this.val = value;
  28271. this.$emit("input", value);
  28272. this.$emit("update:modelValue", value);
  28273. },
  28274. onFocus(event) {
  28275. this.$emit("focus", event);
  28276. },
  28277. onBlur(event) {
  28278. event.detail.value;
  28279. this.$emit("blur", event);
  28280. },
  28281. onConfirm(e2) {
  28282. this.$emit("confirm", e2.detail.value);
  28283. },
  28284. onClear(event) {
  28285. this.val = "";
  28286. this.$emit("input", "");
  28287. this.$emit("update:modelValue", "");
  28288. },
  28289. fieldClick() {
  28290. this.$emit("click");
  28291. },
  28292. trimStr(str, pos = "both") {
  28293. if (pos === "both") {
  28294. return str.trim();
  28295. } else if (pos === "left") {
  28296. return str.trimLeft();
  28297. } else if (pos === "right") {
  28298. return str.trimRight();
  28299. } else if (pos === "start") {
  28300. return str.trimStart();
  28301. } else if (pos === "end") {
  28302. return str.trimEnd();
  28303. } else if (pos === "all") {
  28304. return str.replace(/\s+/g, "");
  28305. } else if (pos === "none") {
  28306. return str;
  28307. }
  28308. return str;
  28309. }
  28310. }
  28311. };
  28312. function _sfc_render$37(_ctx, _cache, $props, $setup, $data, $options) {
  28313. const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$b);
  28314. return vue.openBlock(), vue.createElementBlock(
  28315. "view",
  28316. {
  28317. class: vue.normalizeClass(["uni-easyinput", { "uni-easyinput-error": $options.msg }]),
  28318. style: vue.normalizeStyle({ color: $props.inputBorder && $options.msg ? "#e43d33" : $props.styles.color })
  28319. },
  28320. [
  28321. vue.createElementVNode(
  28322. "view",
  28323. {
  28324. class: vue.normalizeClass(["uni-easyinput__content", {
  28325. "is-input-border": $props.inputBorder,
  28326. "is-input-error-border": $props.inputBorder && $options.msg,
  28327. "is-textarea": $props.type === "textarea",
  28328. "is-disabled": $props.disabled
  28329. }]),
  28330. style: vue.normalizeStyle({
  28331. "border-color": $props.inputBorder && $options.msg ? "#dd524d" : $props.styles.borderColor,
  28332. "background-color": $props.disabled ? $props.styles.disableColor : ""
  28333. })
  28334. },
  28335. [
  28336. $props.prefixIcon ? (vue.openBlock(), vue.createBlock(_component_uni_icons, {
  28337. key: 0,
  28338. class: "content-clear-icon",
  28339. type: $props.prefixIcon,
  28340. color: "#c0c4cc",
  28341. onClick: _cache[0] || (_cache[0] = ($event) => $options.onClickIcon("prefix"))
  28342. }, null, 8, ["type"])) : vue.createCommentVNode("v-if", true),
  28343. $props.type === "textarea" ? (vue.openBlock(), vue.createElementBlock("textarea", {
  28344. key: 1,
  28345. class: vue.normalizeClass(["uni-easyinput__content-textarea", { "input-padding": $props.inputBorder }]),
  28346. name: $props.name,
  28347. value: $data.val,
  28348. placeholder: $props.placeholder,
  28349. placeholderStyle: $props.placeholderStyle,
  28350. disabled: $props.disabled,
  28351. "placeholder-class": "uni-easyinput__placeholder-class",
  28352. maxlength: $options.inputMaxlength,
  28353. focus: $data.focused,
  28354. autoHeight: $props.autoHeight,
  28355. onInput: _cache[1] || (_cache[1] = (...args) => $options.onInput && $options.onInput(...args)),
  28356. onBlur: _cache[2] || (_cache[2] = (...args) => $options.onBlur && $options.onBlur(...args)),
  28357. onFocus: _cache[3] || (_cache[3] = (...args) => $options.onFocus && $options.onFocus(...args)),
  28358. onConfirm: _cache[4] || (_cache[4] = (...args) => $options.onConfirm && $options.onConfirm(...args))
  28359. }, null, 42, ["name", "value", "placeholder", "placeholderStyle", "disabled", "maxlength", "focus", "autoHeight"])) : (vue.openBlock(), vue.createElementBlock("input", {
  28360. key: 2,
  28361. type: $props.type === "password" ? "text" : $props.type,
  28362. class: "uni-easyinput__content-input",
  28363. style: vue.normalizeStyle({
  28364. "padding-right": $props.type === "password" || $props.clearable || $props.prefixIcon ? "" : "10px",
  28365. "padding-left": $props.paddingLeft + "px"
  28366. }),
  28367. name: $props.name,
  28368. value: $data.val,
  28369. password: !$data.showPassword && $props.type === "password",
  28370. placeholder: $props.placeholder,
  28371. placeholderStyle: $props.placeholderStyle,
  28372. "placeholder-class": "uni-easyinput__placeholder-class",
  28373. disabled: $props.disabled,
  28374. maxlength: $options.inputMaxlength,
  28375. focus: $data.focused,
  28376. confirmType: $props.confirmType,
  28377. onFocus: _cache[5] || (_cache[5] = (...args) => $options.onFocus && $options.onFocus(...args)),
  28378. onBlur: _cache[6] || (_cache[6] = (...args) => $options.onBlur && $options.onBlur(...args)),
  28379. onInput: _cache[7] || (_cache[7] = (...args) => $options.onInput && $options.onInput(...args)),
  28380. onChange: _cache[8] || (_cache[8] = (...args) => $options.onInput && $options.onInput(...args)),
  28381. onConfirm: _cache[9] || (_cache[9] = (...args) => $options.onConfirm && $options.onConfirm(...args)),
  28382. "cursor-spacing": 30,
  28383. "always-embed": ""
  28384. }, null, 44, ["type", "name", "value", "password", "placeholder", "placeholderStyle", "disabled", "maxlength", "focus", "confirmType"])),
  28385. $props.type === "password" && $props.passwordIcon ? (vue.openBlock(), vue.createElementBlock(
  28386. vue.Fragment,
  28387. { key: 3 },
  28388. [
  28389. $data.val ? (vue.openBlock(), vue.createBlock(_component_uni_icons, {
  28390. key: 0,
  28391. class: vue.normalizeClass(["content-clear-icon", { "is-textarea-icon": $props.type === "textarea" }]),
  28392. type: $data.showPassword ? "eye-slash-filled" : "eye-filled",
  28393. size: 18,
  28394. color: "#c0c4cc",
  28395. onClick: $options.onEyes
  28396. }, null, 8, ["class", "type", "onClick"])) : vue.createCommentVNode("v-if", true)
  28397. ],
  28398. 64
  28399. /* STABLE_FRAGMENT */
  28400. )) : $props.suffixIcon ? (vue.openBlock(), vue.createElementBlock(
  28401. vue.Fragment,
  28402. { key: 4 },
  28403. [
  28404. $props.suffixIcon ? (vue.openBlock(), vue.createBlock(_component_uni_icons, {
  28405. key: 0,
  28406. class: "content-clear-icon",
  28407. type: $props.suffixIcon,
  28408. color: "#c0c4cc",
  28409. onClick: _cache[10] || (_cache[10] = ($event) => $options.onClickIcon("suffix"))
  28410. }, null, 8, ["type"])) : vue.createCommentVNode("v-if", true)
  28411. ],
  28412. 64
  28413. /* STABLE_FRAGMENT */
  28414. )) : (vue.openBlock(), vue.createElementBlock(
  28415. vue.Fragment,
  28416. { key: 5 },
  28417. [
  28418. $props.clearable && $data.val && !$props.disabled ? (vue.openBlock(), vue.createBlock(_component_uni_icons, {
  28419. key: 0,
  28420. class: vue.normalizeClass(["content-clear-icon", { "is-textarea-icon": $props.type === "textarea" }]),
  28421. type: "clear",
  28422. size: $props.clearSize,
  28423. color: "#c0c4cc",
  28424. onClick: $options.onClear
  28425. }, null, 8, ["class", "size", "onClick"])) : vue.createCommentVNode("v-if", true)
  28426. ],
  28427. 64
  28428. /* STABLE_FRAGMENT */
  28429. )),
  28430. vue.renderSlot(_ctx.$slots, "right", {}, void 0, true)
  28431. ],
  28432. 6
  28433. /* CLASS, STYLE */
  28434. )
  28435. ],
  28436. 6
  28437. /* CLASS, STYLE */
  28438. );
  28439. }
  28440. const __easycom_0$l = /* @__PURE__ */ _export_sfc(_sfc_main$38, [["render", _sfc_render$37], ["__scopeId", "data-v-09fd5285"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue"]]);
  28441. const _sfc_main$37 = {
  28442. name: "uniFormsItem",
  28443. props: {
  28444. // 自定义内容
  28445. custom: {
  28446. type: Boolean,
  28447. default: false
  28448. },
  28449. // 是否显示报错信息
  28450. showMessage: {
  28451. type: Boolean,
  28452. default: true
  28453. },
  28454. name: String,
  28455. required: Boolean,
  28456. validateTrigger: {
  28457. type: String,
  28458. default: ""
  28459. },
  28460. leftIcon: String,
  28461. iconColor: {
  28462. type: String,
  28463. default: "#606266"
  28464. },
  28465. label: String,
  28466. // 左边标题的宽度单位px
  28467. labelWidth: {
  28468. type: [Number, String],
  28469. default: ""
  28470. },
  28471. // 对齐方式,left|center|right
  28472. labelAlign: {
  28473. type: String,
  28474. default: ""
  28475. },
  28476. // lable的位置,可选为 left-左边,top-上边
  28477. labelPosition: {
  28478. type: String,
  28479. default: ""
  28480. },
  28481. errorMessage: {
  28482. type: [String, Boolean],
  28483. default: ""
  28484. },
  28485. // 表单校验规则
  28486. rules: {
  28487. type: Array,
  28488. default() {
  28489. return [];
  28490. }
  28491. }
  28492. },
  28493. data() {
  28494. return {
  28495. errorTop: false,
  28496. errorBottom: false,
  28497. labelMarginBottom: "",
  28498. errorWidth: "",
  28499. errMsg: "",
  28500. val: "",
  28501. labelPos: "",
  28502. labelWid: "",
  28503. labelAli: "",
  28504. showMsg: "undertext",
  28505. border: false,
  28506. isFirstBorder: false,
  28507. isArray: false,
  28508. arrayField: ""
  28509. };
  28510. },
  28511. computed: {
  28512. msg() {
  28513. return this.errorMessage || this.errMsg;
  28514. },
  28515. fieldStyle() {
  28516. let style = {};
  28517. if (this.labelPos == "top") {
  28518. style.padding = "0 0";
  28519. this.labelMarginBottom = "6px";
  28520. }
  28521. if (this.labelPos == "left" && this.msg !== false && this.msg != "") {
  28522. style.paddingBottom = "0px";
  28523. this.errorBottom = true;
  28524. this.errorTop = false;
  28525. } else if (this.labelPos == "top" && this.msg !== false && this.msg != "") {
  28526. this.errorBottom = false;
  28527. this.errorTop = true;
  28528. } else {
  28529. this.errorTop = false;
  28530. this.errorBottom = false;
  28531. }
  28532. return style;
  28533. },
  28534. // uni不支持在computed中写style.justifyContent = 'center'的形式,故用此方法
  28535. justifyContent() {
  28536. if (this.labelAli === "left")
  28537. return "flex-start";
  28538. if (this.labelAli === "center")
  28539. return "center";
  28540. if (this.labelAli === "right")
  28541. return "flex-end";
  28542. },
  28543. labelLeft() {
  28544. return (this.labelPos === "left" ? parseInt(this.labelWid) : 0) + "rpx";
  28545. }
  28546. },
  28547. watch: {
  28548. validateTrigger(trigger) {
  28549. this.formTrigger = trigger;
  28550. }
  28551. },
  28552. created() {
  28553. this.form = this.getForm();
  28554. this.group = this.getForm("uniGroup");
  28555. this.formRules = [];
  28556. this.formTrigger = this.validateTrigger;
  28557. if (this.name && this.name.indexOf("[") !== -1 && this.name.indexOf("]") !== -1) {
  28558. this.isArray = true;
  28559. this.arrayField = this.name;
  28560. this.form.formData[this.name] = this.form._getValue(this.name, "");
  28561. }
  28562. },
  28563. mounted() {
  28564. if (this.form) {
  28565. this.form.childrens.push(this);
  28566. }
  28567. this.init();
  28568. },
  28569. unmounted() {
  28570. this.__isUnmounted = true;
  28571. this.unInit();
  28572. },
  28573. methods: {
  28574. init() {
  28575. if (this.form) {
  28576. let {
  28577. formRules,
  28578. validator: validator2,
  28579. formData,
  28580. value,
  28581. labelPosition,
  28582. labelWidth,
  28583. labelAlign,
  28584. errShowType
  28585. } = this.form;
  28586. this.labelPos = this.labelPosition ? this.labelPosition : labelPosition;
  28587. if (this.label) {
  28588. this.labelWid = this.labelWidth ? this.labelWidth : labelWidth || 140;
  28589. } else {
  28590. this.labelWid = this.labelWidth ? this.labelWidth : labelWidth || "auto";
  28591. }
  28592. if (this.labelWid && this.labelWid !== "auto") {
  28593. this.labelWid += "rpx";
  28594. }
  28595. this.labelAli = this.labelAlign ? this.labelAlign : labelAlign;
  28596. if (!this.form.isFirstBorder) {
  28597. this.form.isFirstBorder = true;
  28598. this.isFirstBorder = true;
  28599. }
  28600. if (this.group) {
  28601. if (!this.group.isFirstBorder) {
  28602. this.group.isFirstBorder = true;
  28603. this.isFirstBorder = true;
  28604. }
  28605. }
  28606. this.border = this.form.border;
  28607. this.showMsg = errShowType;
  28608. let name2 = this.isArray ? this.arrayField : this.name;
  28609. if (!name2)
  28610. return;
  28611. if (formRules && this.rules.length > 0) {
  28612. if (!formRules[name2]) {
  28613. formRules[name2] = {
  28614. rules: this.rules
  28615. };
  28616. }
  28617. validator2.updateSchema(formRules);
  28618. }
  28619. this.formRules = formRules[name2] || {};
  28620. this.validator = validator2;
  28621. } else {
  28622. this.labelPos = this.labelPosition || "left";
  28623. this.labelWid = this.labelWidth || 130;
  28624. this.labelAli = this.labelAlign || "left";
  28625. }
  28626. },
  28627. unInit() {
  28628. if (this.form) {
  28629. this.form.childrens.forEach((item, index2) => {
  28630. if (item === this) {
  28631. this.form.childrens.splice(index2, 1);
  28632. delete this.form.formData[item.name];
  28633. }
  28634. });
  28635. }
  28636. },
  28637. /**
  28638. * 获取父元素实例
  28639. */
  28640. getForm(name2 = "uniForms") {
  28641. let parent2 = this.$parent;
  28642. let parentName = parent2.$options.name;
  28643. while (parentName !== name2) {
  28644. parent2 = parent2.$parent;
  28645. if (!parent2)
  28646. return false;
  28647. parentName = parent2.$options.name;
  28648. }
  28649. return parent2;
  28650. },
  28651. /**
  28652. * 移除该表单项的校验结果
  28653. */
  28654. clearValidate() {
  28655. this.errMsg = "";
  28656. },
  28657. /**
  28658. * 子组件调用,如 easyinput
  28659. * @param {Object} value
  28660. */
  28661. setValue(value) {
  28662. let name2 = this.isArray ? this.arrayField : this.name;
  28663. if (name2) {
  28664. if (this.errMsg)
  28665. this.errMsg = "";
  28666. this.form.formData[name2] = this.form._getValue(name2, value);
  28667. if (!this.formRules || typeof this.formRules && JSON.stringify(this.formRules) === "{}")
  28668. return;
  28669. this.triggerCheck(this.form._getValue(this.name, value));
  28670. }
  28671. },
  28672. /**
  28673. * 校验规则
  28674. * @param {Object} value
  28675. */
  28676. async triggerCheck(value, formTrigger) {
  28677. this.errMsg = "";
  28678. if (!this.validator || Object.keys(this.formRules).length === 0)
  28679. return;
  28680. const isNoField = this.isRequired(this.formRules.rules || []);
  28681. let isTrigger = this.isTrigger(
  28682. this.formRules.validateTrigger,
  28683. this.validateTrigger,
  28684. this.form.validateTrigger
  28685. );
  28686. let result2 = null;
  28687. if (!!isTrigger || formTrigger) {
  28688. let name2 = this.isArray ? this.arrayField : this.name;
  28689. result2 = await this.validator.validateUpdate(
  28690. {
  28691. [name2]: value
  28692. },
  28693. this.form.formData
  28694. );
  28695. }
  28696. if (!isNoField && (value === void 0 || value === "")) {
  28697. result2 = null;
  28698. }
  28699. const inputComp = this.form.inputChildrens.find((child) => child.rename === this.name);
  28700. if ((isTrigger || formTrigger) && result2 && result2.errorMessage) {
  28701. if (inputComp) {
  28702. inputComp.errMsg = result2.errorMessage;
  28703. }
  28704. if (this.form.errShowType === "toast") {
  28705. uni.showToast({
  28706. title: result2.errorMessage || "校验错误",
  28707. icon: "none"
  28708. });
  28709. }
  28710. if (this.form.errShowType === "modal") {
  28711. uni.showModal({
  28712. title: "提示",
  28713. content: result2.errorMessage || "校验错误"
  28714. });
  28715. }
  28716. } else {
  28717. if (inputComp) {
  28718. inputComp.errMsg = "";
  28719. }
  28720. }
  28721. this.errMsg = !result2 ? "" : result2.errorMessage;
  28722. this.form.validateCheck(result2 ? result2 : null);
  28723. return result2 ? result2 : null;
  28724. },
  28725. /**
  28726. * 触发时机
  28727. * @param {Object} event
  28728. */
  28729. isTrigger(rule, itemRlue, parentRule) {
  28730. if (rule === "submit" || !rule) {
  28731. if (rule === void 0) {
  28732. if (itemRlue !== "bind") {
  28733. if (!itemRlue) {
  28734. return parentRule === "bind" ? true : false;
  28735. }
  28736. return false;
  28737. }
  28738. return true;
  28739. }
  28740. return false;
  28741. }
  28742. return true;
  28743. },
  28744. // 是否有必填字段
  28745. isRequired(rules2) {
  28746. let isNoField = false;
  28747. for (let i2 = 0; i2 < rules2.length; i2++) {
  28748. const ruleData = rules2[i2];
  28749. if (ruleData.required) {
  28750. isNoField = true;
  28751. break;
  28752. }
  28753. }
  28754. return isNoField;
  28755. }
  28756. }
  28757. };
  28758. function _sfc_render$36(_ctx, _cache, $props, $setup, $data, $options) {
  28759. const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$b);
  28760. return vue.openBlock(), vue.createElementBlock("view", { class: "" }, [
  28761. vue.createElementVNode(
  28762. "view",
  28763. {
  28764. class: vue.normalizeClass(["uni-forms-item", {
  28765. "uni-forms-item--border": $data.border,
  28766. "is-first-border": $data.border && $data.isFirstBorder,
  28767. "uni-forms-item-error": $options.msg
  28768. }])
  28769. },
  28770. [
  28771. vue.createElementVNode("view", { class: "uni-forms-item__box" }, [
  28772. vue.createElementVNode(
  28773. "view",
  28774. {
  28775. class: vue.normalizeClass(["uni-forms-item__inner", ["is-direction-" + $data.labelPos]])
  28776. },
  28777. [
  28778. vue.createElementVNode(
  28779. "view",
  28780. {
  28781. class: "uni-forms-item__label",
  28782. style: vue.normalizeStyle({ width: $data.labelWid, justifyContent: $options.justifyContent })
  28783. },
  28784. [
  28785. vue.renderSlot(_ctx.$slots, "label", {}, () => [
  28786. $props.required ? (vue.openBlock(), vue.createElementBlock("text", {
  28787. key: 0,
  28788. class: "is-required"
  28789. }, "*")) : vue.createCommentVNode("v-if", true),
  28790. $props.leftIcon ? (vue.openBlock(), vue.createBlock(_component_uni_icons, {
  28791. key: 1,
  28792. class: "label-icon",
  28793. size: "16",
  28794. type: $props.leftIcon,
  28795. color: $props.iconColor
  28796. }, null, 8, ["type", "color"])) : vue.createCommentVNode("v-if", true),
  28797. vue.createElementVNode(
  28798. "text",
  28799. { class: "label-text" },
  28800. vue.toDisplayString($props.label),
  28801. 1
  28802. /* TEXT */
  28803. ),
  28804. $props.label ? (vue.openBlock(), vue.createElementBlock("view", {
  28805. key: 2,
  28806. class: "label-seat"
  28807. })) : vue.createCommentVNode("v-if", true)
  28808. ], true)
  28809. ],
  28810. 4
  28811. /* STYLE */
  28812. ),
  28813. vue.createElementVNode(
  28814. "view",
  28815. {
  28816. class: vue.normalizeClass(["uni-forms-item__content", { "is-input-error-border": $options.msg }])
  28817. },
  28818. [
  28819. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  28820. ],
  28821. 2
  28822. /* CLASS */
  28823. )
  28824. ],
  28825. 2
  28826. /* CLASS */
  28827. ),
  28828. $options.msg ? (vue.openBlock(), vue.createElementBlock(
  28829. "view",
  28830. {
  28831. key: 0,
  28832. class: vue.normalizeClass(["uni-error-message", { "uni-error-msg--boeder": $data.border }]),
  28833. style: vue.normalizeStyle({
  28834. paddingLeft: $options.labelLeft
  28835. })
  28836. },
  28837. [
  28838. vue.createElementVNode(
  28839. "text",
  28840. { class: "uni-error-message-text" },
  28841. vue.toDisplayString($data.showMsg === "undertext" ? $options.msg : ""),
  28842. 1
  28843. /* TEXT */
  28844. )
  28845. ],
  28846. 6
  28847. /* CLASS, STYLE */
  28848. )) : vue.createCommentVNode("v-if", true)
  28849. ])
  28850. ],
  28851. 2
  28852. /* CLASS */
  28853. )
  28854. ]);
  28855. }
  28856. const __easycom_1$9 = /* @__PURE__ */ _export_sfc(_sfc_main$37, [["render", _sfc_render$36], ["__scopeId", "data-v-462874dd"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.vue"]]);
  28857. var pattern = {
  28858. email: /^\S+?@\S+?\.\S+?$/,
  28859. idcard: /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
  28860. url: new RegExp(
  28861. "^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$",
  28862. "i"
  28863. )
  28864. };
  28865. const FORMAT_MAPPING = {
  28866. "int": "integer",
  28867. "bool": "boolean",
  28868. "double": "number",
  28869. "long": "number",
  28870. "password": "string"
  28871. // "fileurls": 'array'
  28872. };
  28873. function formatMessage(args, resources = "") {
  28874. var defaultMessage = ["label"];
  28875. defaultMessage.forEach((item) => {
  28876. if (args[item] === void 0) {
  28877. args[item] = "";
  28878. }
  28879. });
  28880. let str = resources;
  28881. for (let key in args) {
  28882. let reg = new RegExp("{" + key + "}");
  28883. str = str.replace(reg, args[key]);
  28884. }
  28885. return str;
  28886. }
  28887. function isEmptyValue(value, type) {
  28888. if (value === void 0 || value === null) {
  28889. return true;
  28890. }
  28891. if (typeof value === "string" && !value) {
  28892. return true;
  28893. }
  28894. if (Array.isArray(value) && !value.length) {
  28895. return true;
  28896. }
  28897. if (type === "object" && !Object.keys(value).length) {
  28898. return true;
  28899. }
  28900. return false;
  28901. }
  28902. const types = {
  28903. integer(value) {
  28904. return types.number(value) && parseInt(value, 10) === value;
  28905. },
  28906. string(value) {
  28907. return typeof value === "string";
  28908. },
  28909. number(value) {
  28910. if (isNaN(value)) {
  28911. return false;
  28912. }
  28913. return typeof value === "number";
  28914. },
  28915. "boolean": function(value) {
  28916. return typeof value === "boolean";
  28917. },
  28918. "float": function(value) {
  28919. return types.number(value) && !types.integer(value);
  28920. },
  28921. array(value) {
  28922. return Array.isArray(value);
  28923. },
  28924. object(value) {
  28925. return typeof value === "object" && !types.array(value);
  28926. },
  28927. date(value) {
  28928. return value instanceof Date;
  28929. },
  28930. timestamp(value) {
  28931. if (!this.integer(value) || Math.abs(value).toString().length > 16) {
  28932. return false;
  28933. }
  28934. return true;
  28935. },
  28936. file(value) {
  28937. return typeof value.url === "string";
  28938. },
  28939. email(value) {
  28940. return typeof value === "string" && !!value.match(pattern.email) && value.length < 255;
  28941. },
  28942. url(value) {
  28943. return typeof value === "string" && !!value.match(pattern.url);
  28944. },
  28945. pattern(reg, value) {
  28946. try {
  28947. return new RegExp(reg).test(value);
  28948. } catch (e2) {
  28949. return false;
  28950. }
  28951. },
  28952. method(value) {
  28953. return typeof value === "function";
  28954. },
  28955. idcard(value) {
  28956. return typeof value === "string" && !!value.match(pattern.idcard);
  28957. },
  28958. "url-https"(value) {
  28959. return this.url(value) && value.startsWith("https://");
  28960. },
  28961. "url-scheme"(value) {
  28962. return value.startsWith("://");
  28963. },
  28964. "url-web"(value) {
  28965. return false;
  28966. }
  28967. };
  28968. class RuleValidator {
  28969. constructor(message) {
  28970. this._message = message;
  28971. }
  28972. async validateRule(fieldKey, fieldValue, value, data, allData) {
  28973. var result2 = null;
  28974. let rules2 = fieldValue.rules;
  28975. let hasRequired = rules2.findIndex((item) => {
  28976. return item.required;
  28977. });
  28978. if (hasRequired < 0) {
  28979. if (value === null || value === void 0) {
  28980. return result2;
  28981. }
  28982. if (typeof value === "string" && !value.length) {
  28983. return result2;
  28984. }
  28985. }
  28986. var message = this._message;
  28987. if (rules2 === void 0) {
  28988. return message["default"];
  28989. }
  28990. for (var i2 = 0; i2 < rules2.length; i2++) {
  28991. let rule = rules2[i2];
  28992. let vt2 = this._getValidateType(rule);
  28993. Object.assign(rule, {
  28994. label: fieldValue.label || `["${fieldKey}"]`
  28995. });
  28996. if (RuleValidatorHelper[vt2]) {
  28997. result2 = RuleValidatorHelper[vt2](rule, value, message);
  28998. if (result2 != null) {
  28999. break;
  29000. }
  29001. }
  29002. if (rule.validateExpr) {
  29003. let now2 = Date.now();
  29004. let resultExpr = rule.validateExpr(value, allData, now2);
  29005. if (resultExpr === false) {
  29006. result2 = this._getMessage(rule, rule.errorMessage || this._message["default"]);
  29007. break;
  29008. }
  29009. }
  29010. if (rule.validateFunction) {
  29011. result2 = await this.validateFunction(rule, value, data, allData, vt2);
  29012. if (result2 !== null) {
  29013. break;
  29014. }
  29015. }
  29016. }
  29017. if (result2 !== null) {
  29018. result2 = message.TAG + result2;
  29019. }
  29020. return result2;
  29021. }
  29022. async validateFunction(rule, value, data, allData, vt2) {
  29023. let result2 = null;
  29024. try {
  29025. let callbackMessage = null;
  29026. const res = await rule.validateFunction(rule, value, allData || data, (message) => {
  29027. callbackMessage = message;
  29028. });
  29029. if (callbackMessage || typeof res === "string" && res || res === false) {
  29030. result2 = this._getMessage(rule, callbackMessage || res, vt2);
  29031. }
  29032. } catch (e2) {
  29033. result2 = this._getMessage(rule, e2.message, vt2);
  29034. }
  29035. return result2;
  29036. }
  29037. _getMessage(rule, message, vt2) {
  29038. return formatMessage(rule, message || rule.errorMessage || this._message[vt2] || message["default"]);
  29039. }
  29040. _getValidateType(rule) {
  29041. var result2 = "";
  29042. if (rule.required) {
  29043. result2 = "required";
  29044. } else if (rule.format) {
  29045. result2 = "format";
  29046. } else if (rule.arrayType) {
  29047. result2 = "arrayTypeFormat";
  29048. } else if (rule.range) {
  29049. result2 = "range";
  29050. } else if (rule.maximum !== void 0 || rule.minimum !== void 0) {
  29051. result2 = "rangeNumber";
  29052. } else if (rule.maxLength !== void 0 || rule.minLength !== void 0) {
  29053. result2 = "rangeLength";
  29054. } else if (rule.pattern) {
  29055. result2 = "pattern";
  29056. } else if (rule.validateFunction) {
  29057. result2 = "validateFunction";
  29058. }
  29059. return result2;
  29060. }
  29061. }
  29062. const RuleValidatorHelper = {
  29063. required(rule, value, message) {
  29064. if (rule.required && isEmptyValue(value, rule.format || typeof value)) {
  29065. return formatMessage(rule, rule.errorMessage || message.required);
  29066. }
  29067. return null;
  29068. },
  29069. range(rule, value, message) {
  29070. const {
  29071. range: range2,
  29072. errorMessage
  29073. } = rule;
  29074. let list = new Array(range2.length);
  29075. for (let i2 = 0; i2 < range2.length; i2++) {
  29076. const item = range2[i2];
  29077. if (types.object(item) && item.value !== void 0) {
  29078. list[i2] = item.value;
  29079. } else {
  29080. list[i2] = item;
  29081. }
  29082. }
  29083. let result2 = false;
  29084. if (Array.isArray(value)) {
  29085. result2 = new Set(value.concat(list)).size === list.length;
  29086. } else {
  29087. if (list.indexOf(value) > -1) {
  29088. result2 = true;
  29089. }
  29090. }
  29091. if (!result2) {
  29092. return formatMessage(rule, errorMessage || message["enum"]);
  29093. }
  29094. return null;
  29095. },
  29096. rangeNumber(rule, value, message) {
  29097. if (!types.number(value)) {
  29098. return formatMessage(rule, rule.errorMessage || message.pattern.mismatch);
  29099. }
  29100. let {
  29101. minimum,
  29102. maximum,
  29103. exclusiveMinimum,
  29104. exclusiveMaximum
  29105. } = rule;
  29106. let min = exclusiveMinimum ? value <= minimum : value < minimum;
  29107. let max = exclusiveMaximum ? value >= maximum : value > maximum;
  29108. if (minimum !== void 0 && min) {
  29109. return formatMessage(rule, rule.errorMessage || message["number"][exclusiveMinimum ? "exclusiveMinimum" : "minimum"]);
  29110. } else if (maximum !== void 0 && max) {
  29111. return formatMessage(rule, rule.errorMessage || message["number"][exclusiveMaximum ? "exclusiveMaximum" : "maximum"]);
  29112. } else if (minimum !== void 0 && maximum !== void 0 && (min || max)) {
  29113. return formatMessage(rule, rule.errorMessage || message["number"].range);
  29114. }
  29115. return null;
  29116. },
  29117. rangeLength(rule, value, message) {
  29118. if (!types.string(value) && !types.array(value)) {
  29119. return formatMessage(rule, rule.errorMessage || message.pattern.mismatch);
  29120. }
  29121. let min = rule.minLength;
  29122. let max = rule.maxLength;
  29123. let val = value.length;
  29124. if (min !== void 0 && val < min) {
  29125. return formatMessage(rule, rule.errorMessage || message["length"].minLength);
  29126. } else if (max !== void 0 && val > max) {
  29127. return formatMessage(rule, rule.errorMessage || message["length"].maxLength);
  29128. } else if (min !== void 0 && max !== void 0 && (val < min || val > max)) {
  29129. return formatMessage(rule, rule.errorMessage || message["length"].range);
  29130. }
  29131. return null;
  29132. },
  29133. pattern(rule, value, message) {
  29134. if (!types["pattern"](rule.pattern, value)) {
  29135. return formatMessage(rule, rule.errorMessage || message.pattern.mismatch);
  29136. }
  29137. return null;
  29138. },
  29139. format(rule, value, message) {
  29140. var customTypes = Object.keys(types);
  29141. var format2 = FORMAT_MAPPING[rule.format] ? FORMAT_MAPPING[rule.format] : rule.format || rule.arrayType;
  29142. if (customTypes.indexOf(format2) > -1) {
  29143. if (!types[format2](value)) {
  29144. return formatMessage(rule, rule.errorMessage || message.typeError);
  29145. }
  29146. }
  29147. return null;
  29148. },
  29149. arrayTypeFormat(rule, value, message) {
  29150. if (!Array.isArray(value)) {
  29151. return formatMessage(rule, rule.errorMessage || message.typeError);
  29152. }
  29153. for (let i2 = 0; i2 < value.length; i2++) {
  29154. const element = value[i2];
  29155. let formatResult = this.format(rule, element, message);
  29156. if (formatResult !== null) {
  29157. return formatResult;
  29158. }
  29159. }
  29160. return null;
  29161. }
  29162. };
  29163. class SchemaValidator extends RuleValidator {
  29164. constructor(schema, options2) {
  29165. super(SchemaValidator.message);
  29166. this._schema = schema;
  29167. this._options = options2 || null;
  29168. }
  29169. updateSchema(schema) {
  29170. this._schema = schema;
  29171. }
  29172. async validate(data, allData) {
  29173. let result2 = this._checkFieldInSchema(data);
  29174. if (!result2) {
  29175. result2 = await this.invokeValidate(data, false, allData);
  29176. }
  29177. return result2.length ? result2[0] : null;
  29178. }
  29179. async validateAll(data, allData) {
  29180. let result2 = this._checkFieldInSchema(data);
  29181. if (!result2) {
  29182. result2 = await this.invokeValidate(data, true, allData);
  29183. }
  29184. return result2;
  29185. }
  29186. async validateUpdate(data, allData) {
  29187. let result2 = this._checkFieldInSchema(data);
  29188. if (!result2) {
  29189. result2 = await this.invokeValidateUpdate(data, false, allData);
  29190. }
  29191. return result2.length ? result2[0] : null;
  29192. }
  29193. async invokeValidate(data, all, allData) {
  29194. let result2 = [];
  29195. let schema = this._schema;
  29196. for (let key in schema) {
  29197. let value = schema[key];
  29198. let errorMessage = await this.validateRule(key, value, data[key], data, allData);
  29199. if (errorMessage != null) {
  29200. result2.push({
  29201. key,
  29202. errorMessage
  29203. });
  29204. if (!all)
  29205. break;
  29206. }
  29207. }
  29208. return result2;
  29209. }
  29210. async invokeValidateUpdate(data, all, allData) {
  29211. let result2 = [];
  29212. for (let key in data) {
  29213. let errorMessage = await this.validateRule(key, this._schema[key], data[key], data, allData);
  29214. if (errorMessage != null) {
  29215. result2.push({
  29216. key,
  29217. errorMessage
  29218. });
  29219. if (!all)
  29220. break;
  29221. }
  29222. }
  29223. return result2;
  29224. }
  29225. _checkFieldInSchema(data) {
  29226. var keys = Object.keys(data);
  29227. var keys2 = Object.keys(this._schema);
  29228. if (new Set(keys.concat(keys2)).size === keys2.length) {
  29229. return "";
  29230. }
  29231. var noExistFields = keys.filter((key) => {
  29232. return keys2.indexOf(key) < 0;
  29233. });
  29234. var errorMessage = formatMessage({
  29235. field: JSON.stringify(noExistFields)
  29236. }, SchemaValidator.message.TAG + SchemaValidator.message["defaultInvalid"]);
  29237. return [{
  29238. key: "invalid",
  29239. errorMessage
  29240. }];
  29241. }
  29242. }
  29243. function Message() {
  29244. return {
  29245. TAG: "",
  29246. default: "验证错误",
  29247. defaultInvalid: "提交的字段{field}在数据库中并不存在",
  29248. validateFunction: "验证无效",
  29249. required: "{label}必填",
  29250. "enum": "{label}超出范围",
  29251. timestamp: "{label}格式无效",
  29252. whitespace: "{label}不能为空",
  29253. typeError: "{label}类型无效",
  29254. date: {
  29255. format: "{label}日期{value}格式无效",
  29256. parse: "{label}日期无法解析,{value}无效",
  29257. invalid: "{label}日期{value}无效"
  29258. },
  29259. length: {
  29260. minLength: "{label}长度不能少于{minLength}",
  29261. maxLength: "{label}长度不能超过{maxLength}",
  29262. range: "{label}必须介于{minLength}和{maxLength}之间"
  29263. },
  29264. number: {
  29265. minimum: "{label}不能小于{minimum}",
  29266. maximum: "{label}不能大于{maximum}",
  29267. exclusiveMinimum: "{label}不能小于等于{minimum}",
  29268. exclusiveMaximum: "{label}不能大于等于{maximum}",
  29269. range: "{label}必须介于{minimum}and{maximum}之间"
  29270. },
  29271. pattern: {
  29272. mismatch: "{label}格式不匹配"
  29273. }
  29274. };
  29275. }
  29276. SchemaValidator.message = new Message();
  29277. const _sfc_main$36 = {
  29278. name: "uniForms",
  29279. components: {},
  29280. emits: ["input", "reset", "validate", "submit"],
  29281. props: {
  29282. // 即将弃用
  29283. value: {
  29284. type: Object,
  29285. default() {
  29286. return {};
  29287. }
  29288. },
  29289. // 替换 value 属性
  29290. modelValue: {
  29291. type: Object,
  29292. default() {
  29293. return {};
  29294. }
  29295. },
  29296. // 表单校验规则
  29297. rules: {
  29298. type: Object,
  29299. default() {
  29300. return {};
  29301. }
  29302. },
  29303. // 校验触发器方式,默认 关闭
  29304. validateTrigger: {
  29305. type: String,
  29306. default: ""
  29307. },
  29308. // label 位置,可选值 top/left
  29309. labelPosition: {
  29310. type: String,
  29311. default: "left"
  29312. },
  29313. // label 宽度,单位 px
  29314. labelWidth: {
  29315. type: [String, Number],
  29316. default: ""
  29317. },
  29318. // label 居中方式,可选值 left/center/right
  29319. labelAlign: {
  29320. type: String,
  29321. default: "left"
  29322. },
  29323. errShowType: {
  29324. type: String,
  29325. default: "undertext"
  29326. },
  29327. border: {
  29328. type: Boolean,
  29329. default: false
  29330. }
  29331. },
  29332. data() {
  29333. return {
  29334. formData: {}
  29335. };
  29336. },
  29337. computed: {
  29338. dataValue() {
  29339. if (JSON.stringify(this.modelValue) === "{}") {
  29340. return this.value;
  29341. } else {
  29342. return this.modelValue;
  29343. }
  29344. }
  29345. },
  29346. watch: {
  29347. rules(newVal) {
  29348. this.init(newVal);
  29349. },
  29350. labelPosition() {
  29351. this.childrens.forEach((vm) => {
  29352. vm.init();
  29353. });
  29354. }
  29355. },
  29356. created() {
  29357. let getbinddata = getApp().$vm.$.appContext.config.globalProperties.binddata;
  29358. if (!getbinddata) {
  29359. getApp().$vm.$.appContext.config.globalProperties.binddata = function(name2, value, formName) {
  29360. if (formName) {
  29361. this.$refs[formName].setValue(name2, value);
  29362. } else {
  29363. let formVm;
  29364. for (let i2 in this.$refs) {
  29365. const vm = this.$refs[i2];
  29366. if (vm && vm.$options && vm.$options.name === "uniForms") {
  29367. formVm = vm;
  29368. break;
  29369. }
  29370. }
  29371. if (!formVm)
  29372. return formatAppLog("error", "at uni_modules/uni-forms/components/uni-forms/uni-forms.vue:152", "当前 uni-froms 组件缺少 ref 属性");
  29373. formVm.setValue(name2, value);
  29374. }
  29375. };
  29376. }
  29377. this.unwatchs = [];
  29378. this.childrens = [];
  29379. this.inputChildrens = [];
  29380. this.checkboxChildrens = [];
  29381. this.formRules = [];
  29382. this.init(this.rules);
  29383. },
  29384. // mounted() {
  29385. // this.init(this.rules)
  29386. // },
  29387. methods: {
  29388. init(formRules) {
  29389. if (Object.keys(formRules).length === 0) {
  29390. this.formData = this.dataValue;
  29391. return;
  29392. }
  29393. this.formRules = formRules;
  29394. this.validator = new SchemaValidator(formRules);
  29395. this.registerWatch();
  29396. },
  29397. // 监听 watch
  29398. registerWatch() {
  29399. this.unwatchs.forEach((v2) => v2());
  29400. this.childrens.forEach((v2) => {
  29401. v2.init();
  29402. });
  29403. Object.keys(this.dataValue).forEach((key) => {
  29404. let watch = this.$watch(
  29405. "dataValue." + key,
  29406. (value) => {
  29407. if (!value)
  29408. return;
  29409. if (value.toString() === "[object Object]") {
  29410. for (let i2 in value) {
  29411. let name2 = `${key}[${i2}]`;
  29412. this.formData[name2] = this._getValue(name2, value[i2]);
  29413. }
  29414. } else {
  29415. this.formData[key] = this._getValue(key, value);
  29416. }
  29417. },
  29418. {
  29419. deep: true,
  29420. immediate: true
  29421. }
  29422. );
  29423. this.unwatchs.push(watch);
  29424. });
  29425. },
  29426. /**
  29427. * 公开给用户使用
  29428. * 设置校验规则
  29429. * @param {Object} formRules
  29430. */
  29431. setRules(formRules) {
  29432. this.init(formRules);
  29433. },
  29434. /**
  29435. * 公开给用户使用
  29436. * 设置自定义表单组件 value 值
  29437. * @param {String} name 字段名称
  29438. * @param {String} value 字段值
  29439. */
  29440. setValue(name2, value, callback) {
  29441. let example = this.childrens.find((child) => child.name === name2);
  29442. if (!example)
  29443. return null;
  29444. value = this._getValue(example.name, value);
  29445. this.formData[name2] = value;
  29446. example.val = value;
  29447. return example.triggerCheck(value, callback);
  29448. },
  29449. /**
  29450. * 表单重置
  29451. * @param {Object} event
  29452. */
  29453. resetForm(event) {
  29454. this.childrens.forEach((item) => {
  29455. item.errMsg = "";
  29456. const inputComp = this.inputChildrens.find((child) => child.rename === item.name);
  29457. if (inputComp) {
  29458. inputComp.errMsg = "";
  29459. inputComp.is_reset = true;
  29460. inputComp.$emit("input", inputComp.multiple ? [] : "");
  29461. inputComp.$emit("update:modelValue", inputComp.multiple ? [] : "");
  29462. }
  29463. });
  29464. this.childrens.forEach((item) => {
  29465. if (item.name) {
  29466. this.formData[item.name] = this._getValue(item.name, "");
  29467. }
  29468. });
  29469. this.$emit("reset", event);
  29470. },
  29471. /**
  29472. * 触发表单校验,通过 @validate 获取
  29473. * @param {Object} validate
  29474. */
  29475. validateCheck(validate) {
  29476. if (validate === null)
  29477. validate = null;
  29478. this.$emit("validate", validate);
  29479. },
  29480. /**
  29481. * 校验所有或者部分表单
  29482. */
  29483. async validateAll(invalidFields, type, keepitem, callback) {
  29484. let childrens = [];
  29485. for (let i2 in invalidFields) {
  29486. const item = this.childrens.find((v2) => v2.name === i2);
  29487. if (item) {
  29488. childrens.push(item);
  29489. }
  29490. }
  29491. if (!callback && typeof keepitem === "function") {
  29492. callback = keepitem;
  29493. }
  29494. let promise;
  29495. if (!callback && typeof callback !== "function" && Promise) {
  29496. promise = new Promise((resolve, reject) => {
  29497. callback = function(valid, invalidFields2) {
  29498. !valid ? resolve(invalidFields2) : reject(valid);
  29499. };
  29500. });
  29501. }
  29502. let results = [];
  29503. let newFormData = {};
  29504. if (this.validator) {
  29505. for (let key in childrens) {
  29506. const child = childrens[key];
  29507. let name2 = child.isArray ? child.arrayField : child.name;
  29508. if (child.isArray) {
  29509. if (child.name.indexOf("[") !== -1 && child.name.indexOf("]") !== -1) {
  29510. const fieldData = child.name.split("[");
  29511. const fieldName = fieldData[0];
  29512. const fieldValue = fieldData[1].replace("]", "");
  29513. if (!newFormData[fieldName]) {
  29514. newFormData[fieldName] = {};
  29515. }
  29516. newFormData[fieldName][fieldValue] = this._getValue(name2, invalidFields[name2]);
  29517. }
  29518. } else {
  29519. newFormData[name2] = this._getValue(name2, invalidFields[name2]);
  29520. }
  29521. const result2 = await child.triggerCheck(invalidFields[name2], true);
  29522. if (result2) {
  29523. results.push(result2);
  29524. if (this.errShowType === "toast" || this.errShowType === "modal")
  29525. break;
  29526. }
  29527. }
  29528. } else {
  29529. newFormData = invalidFields;
  29530. }
  29531. if (Array.isArray(results)) {
  29532. if (results.length === 0)
  29533. results = null;
  29534. }
  29535. if (Array.isArray(keepitem)) {
  29536. keepitem.forEach((v2) => {
  29537. newFormData[v2] = this.dataValue[v2];
  29538. });
  29539. }
  29540. if (type === "submit") {
  29541. this.$emit("submit", {
  29542. detail: {
  29543. value: newFormData,
  29544. errors: results
  29545. }
  29546. });
  29547. } else {
  29548. this.$emit("validate", results);
  29549. }
  29550. callback && typeof callback === "function" && callback(results, newFormData);
  29551. if (promise && callback) {
  29552. return promise;
  29553. } else {
  29554. return null;
  29555. }
  29556. },
  29557. submitForm() {
  29558. },
  29559. /**
  29560. * 外部调用方法
  29561. * 手动提交校验表单
  29562. * 对整个表单进行校验的方法,参数为一个回调函数。
  29563. */
  29564. submit(keepitem, callback, type) {
  29565. for (let i2 in this.dataValue) {
  29566. const itemData = this.childrens.find((v2) => v2.name === i2);
  29567. if (itemData) {
  29568. if (this.formData[i2] === void 0) {
  29569. this.formData[i2] = this._getValue(i2, this.dataValue[i2]);
  29570. }
  29571. }
  29572. }
  29573. if (!type) {
  29574. formatAppLog("warn", "at uni_modules/uni-forms/components/uni-forms/uni-forms.vue:371", "submit 方法即将废弃,请使用validate方法代替!");
  29575. }
  29576. return this.validateAll(this.formData, "submit", keepitem, callback);
  29577. },
  29578. /**
  29579. * 外部调用方法
  29580. * 校验表单
  29581. * 对整个表单进行校验的方法,参数为一个回调函数。
  29582. */
  29583. validate(keepitem, callback) {
  29584. return this.submit(keepitem, callback, true);
  29585. },
  29586. /**
  29587. * 部分表单校验
  29588. * @param {Object} props
  29589. * @param {Object} cb
  29590. */
  29591. validateField(props, callback) {
  29592. props = [].concat(props);
  29593. let invalidFields = {};
  29594. this.childrens.forEach((item) => {
  29595. if (props.indexOf(item.name) !== -1) {
  29596. invalidFields = Object.assign({}, invalidFields, {
  29597. [item.name]: this.formData[item.name]
  29598. });
  29599. }
  29600. });
  29601. return this.validateAll(invalidFields, "submit", [], callback);
  29602. },
  29603. /**
  29604. * 对整个表单进行重置,将所有字段值重置为初始值并移除校验结果
  29605. */
  29606. resetFields() {
  29607. this.resetForm();
  29608. },
  29609. /**
  29610. * 移除表单项的校验结果。传入待移除的表单项的 prop 属性或者 prop 组成的数组,如不传则移除整个表单的校验结果
  29611. */
  29612. clearValidate(props) {
  29613. props = [].concat(props);
  29614. this.childrens.forEach((item) => {
  29615. const inputComp = this.inputChildrens.find((child) => child.rename === item.name);
  29616. if (props.length === 0) {
  29617. item.errMsg = "";
  29618. if (inputComp) {
  29619. inputComp.errMsg = "";
  29620. }
  29621. } else {
  29622. if (props.indexOf(item.name) !== -1) {
  29623. item.errMsg = "";
  29624. if (inputComp) {
  29625. inputComp.errMsg = "";
  29626. }
  29627. }
  29628. }
  29629. });
  29630. },
  29631. /**
  29632. * 把 value 转换成指定的类型
  29633. * @param {Object} key
  29634. * @param {Object} value
  29635. */
  29636. _getValue(key, value) {
  29637. const rules2 = this.formRules[key] && this.formRules[key].rules || [];
  29638. const isRuleNum = rules2.find((val) => val.format && this.type_filter(val.format));
  29639. const isRuleBool = rules2.find((val) => val.format && val.format === "boolean" || val.format === "bool");
  29640. if (isRuleNum) {
  29641. value = isNaN(value) ? value : value === "" || value === null ? null : Number(value);
  29642. }
  29643. if (isRuleBool) {
  29644. value = !value ? false : true;
  29645. }
  29646. return value;
  29647. },
  29648. /**
  29649. * 过滤数字类型
  29650. * @param {Object} format
  29651. */
  29652. type_filter(format2) {
  29653. return format2 === "int" || format2 === "double" || format2 === "number" || format2 === "timestamp";
  29654. }
  29655. }
  29656. };
  29657. function _sfc_render$35(_ctx, _cache, $props, $setup, $data, $options) {
  29658. return vue.openBlock(), vue.createElementBlock(
  29659. "view",
  29660. {
  29661. class: vue.normalizeClass(["uni-forms", { "uni-forms--top": !$props.border }])
  29662. },
  29663. [
  29664. vue.createElementVNode(
  29665. "form",
  29666. {
  29667. onSubmit: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.submitForm && $options.submitForm(...args), ["stop"])),
  29668. onReset: _cache[1] || (_cache[1] = (...args) => $options.resetForm && $options.resetForm(...args))
  29669. },
  29670. [
  29671. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  29672. ],
  29673. 32
  29674. /* NEED_HYDRATION */
  29675. )
  29676. ],
  29677. 2
  29678. /* CLASS */
  29679. );
  29680. }
  29681. const __easycom_2$7 = /* @__PURE__ */ _export_sfc(_sfc_main$36, [["render", _sfc_render$35], ["__scopeId", "data-v-9a1e3c32"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-forms/components/uni-forms/uni-forms.vue"]]);
  29682. const username = {
  29683. rules: [
  29684. {
  29685. required: true,
  29686. errorMessage: t$6("rules.enter_username")
  29687. },
  29688. {
  29689. validateFunction: function(rule, value, data, callback) {
  29690. if (!value) {
  29691. callback(t$6("rules.username_required"));
  29692. }
  29693. return true;
  29694. }
  29695. }
  29696. ]
  29697. };
  29698. const mobile = {
  29699. rules: [
  29700. {
  29701. required: true,
  29702. errorMessage: t$6("rules.enter_phone")
  29703. },
  29704. {
  29705. validateFunction: function(rule, value, data, callback) {
  29706. if (!test$1.mobile(value)) {
  29707. callback(t$6("rules.incorrect_phone_format"));
  29708. }
  29709. return true;
  29710. }
  29711. }
  29712. ]
  29713. };
  29714. const password = {
  29715. rules: [
  29716. {
  29717. required: true,
  29718. errorMessage: t$6("rules.enter_password")
  29719. },
  29720. {
  29721. validateFunction: function(rule, value, data, callback) {
  29722. if (!/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]+\S{5,12}$/.test(value)) {
  29723. callback(t$6("rules.password_requirements"));
  29724. }
  29725. return true;
  29726. }
  29727. }
  29728. ]
  29729. };
  29730. const code = {
  29731. rules: [
  29732. {
  29733. required: true,
  29734. errorMessage: t$6("rules.enter_verification_code")
  29735. }
  29736. ]
  29737. };
  29738. ({
  29739. rules: [
  29740. {
  29741. required: true,
  29742. errorMessage: t$6("rules.enter_name")
  29743. },
  29744. {
  29745. validateFunction: function(rule, value, data, callback) {
  29746. if (!test$1.chinese(value)) {
  29747. callback(t$6("rules.enter_chinese_characters"));
  29748. }
  29749. return true;
  29750. }
  29751. }
  29752. ]
  29753. });
  29754. ({
  29755. rules: [
  29756. {
  29757. required: true,
  29758. errorMessage: t$6("rules.enter_invoice_title")
  29759. },
  29760. {
  29761. validateFunction: function(rule, value, data, callback) {
  29762. if (!test$1.chinese(value)) {
  29763. callback(t$6("rules.enter_chinese_characters"));
  29764. }
  29765. return true;
  29766. }
  29767. }
  29768. ]
  29769. });
  29770. ({
  29771. rules: [
  29772. {
  29773. required: true,
  29774. errorMessage: t$6("rules.enter_tax_number")
  29775. }
  29776. ]
  29777. });
  29778. ({
  29779. rules: [
  29780. {
  29781. required: true,
  29782. errorMessage: t$6("rules.enter_bank")
  29783. },
  29784. {
  29785. validateFunction: function(rule, value, data, callback) {
  29786. if (!test$1.chinese(value)) {
  29787. callback(t$6("rules.enter_chinese_characters"));
  29788. }
  29789. return true;
  29790. }
  29791. }
  29792. ]
  29793. });
  29794. const bankCode = {
  29795. rules: [
  29796. {
  29797. required: true,
  29798. errorMessage: t$6("rules.enter_bank_card_number")
  29799. },
  29800. {
  29801. validateFunction: function(rule, value, data, callback) {
  29802. if (!/^\d+$/.test(value)) {
  29803. callback(t$6("rules.correct_bank_card_number"));
  29804. }
  29805. return true;
  29806. }
  29807. }
  29808. ]
  29809. };
  29810. const alipayAccount$1 = {
  29811. rules: [
  29812. {
  29813. required: true,
  29814. errorMessage: t$6("rules.enter_alipay_account")
  29815. },
  29816. {
  29817. validateFunction: function(rule, value, data, callback) {
  29818. let isEmail = test$1.email(value);
  29819. let isMobile = test$1.mobile(value);
  29820. if (!isEmail && !isMobile) {
  29821. callback(t$6("rules.correct_account_number"));
  29822. }
  29823. return true;
  29824. }
  29825. }
  29826. ]
  29827. };
  29828. const email = {
  29829. rules: [
  29830. {
  29831. required: true,
  29832. errorMessage: t$6("rules.enter_email")
  29833. },
  29834. {
  29835. validateFunction: function(rule, value, data, callback) {
  29836. let isEmail = test$1.email(value);
  29837. if (!isEmail) {
  29838. callback(t$6("rules.correct_email"));
  29839. }
  29840. return true;
  29841. }
  29842. }
  29843. ]
  29844. };
  29845. const _sfc_main$35 = {
  29846. __name: "account-login",
  29847. props: {
  29848. agreeStatus: {
  29849. type: Boolean,
  29850. default: false
  29851. }
  29852. },
  29853. emits: ["onConfirm"],
  29854. setup(__props, { expose: __expose, emit: __emit }) {
  29855. __expose();
  29856. const accountLoginRef = vue.ref(null);
  29857. const emits = __emit;
  29858. const props = __props;
  29859. const state = vue.reactive({
  29860. model: {
  29861. username: "",
  29862. // 账号
  29863. password: ""
  29864. // 密码
  29865. },
  29866. rules: {
  29867. username,
  29868. password
  29869. }
  29870. });
  29871. async function accountLoginSubmit() {
  29872. const validate = await vue.unref(accountLoginRef).validate().catch((error2) => {
  29873. formatAppLog("log", "at sheep/components/s-auth-modal/components/account-login.vue:73", "error: ", error2);
  29874. });
  29875. if (!validate)
  29876. return;
  29877. if (!props.agreeStatus) {
  29878. emits("onConfirm", true);
  29879. sheep$1.$helper.toast(t$6("account.please_agree"));
  29880. return;
  29881. }
  29882. const {
  29883. code: code2,
  29884. data
  29885. } = await AuthUtil.login(state.model);
  29886. if (code2 === 0) {
  29887. closeAuthModal();
  29888. }
  29889. }
  29890. const __returned__ = { accountLoginRef, emits, props, state, accountLoginSubmit, ref: vue.ref, reactive: vue.reactive, unref: vue.unref, computed: vue.computed, get sheep() {
  29891. return sheep$1;
  29892. }, get username() {
  29893. return username;
  29894. }, get password() {
  29895. return password;
  29896. }, get showAuthModal() {
  29897. return showAuthModal;
  29898. }, get closeAuthModal() {
  29899. return closeAuthModal;
  29900. }, get AuthUtil() {
  29901. return AuthUtil;
  29902. }, get t() {
  29903. return t$6;
  29904. } };
  29905. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  29906. return __returned__;
  29907. }
  29908. };
  29909. function _sfc_render$34(_ctx, _cache, $props, $setup, $data, $options) {
  29910. const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l);
  29911. const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9);
  29912. const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7);
  29913. return vue.openBlock(), vue.createElementBlock("view", null, [
  29914. vue.createCommentVNode(" 表单项 "),
  29915. vue.createVNode(_component_uni_forms, {
  29916. ref: "accountLoginRef",
  29917. modelValue: $setup.state.model,
  29918. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.model = $event),
  29919. rules: $setup.state.rules,
  29920. validateTrigger: "bind",
  29921. labelWidth: "160",
  29922. labelAlign: "center",
  29923. class: "loginUniForm"
  29924. }, {
  29925. default: vue.withCtx(() => [
  29926. vue.createVNode(_component_uni_forms_item, {
  29927. name: "username",
  29928. label: $setup.t("account.username"),
  29929. class: "loginUniFormItem"
  29930. }, {
  29931. default: vue.withCtx(() => [
  29932. vue.createVNode(_component_uni_easyinput, {
  29933. placeholder: $setup.t("account.enter_username"),
  29934. modelValue: $setup.state.model.username,
  29935. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.state.model.username = $event),
  29936. inputBorder: false
  29937. }, null, 8, ["placeholder", "modelValue"])
  29938. ]),
  29939. _: 1
  29940. /* STABLE */
  29941. }, 8, ["label"]),
  29942. vue.createVNode(_component_uni_forms_item, {
  29943. name: "password",
  29944. label: $setup.t("account.password"),
  29945. class: "loginUniFormItem"
  29946. }, {
  29947. default: vue.withCtx(() => [
  29948. vue.createVNode(_component_uni_easyinput, {
  29949. type: "password",
  29950. placeholder: $setup.t("account.enter_password"),
  29951. modelValue: $setup.state.model.password,
  29952. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.model.password = $event),
  29953. inputBorder: false
  29954. }, null, 8, ["placeholder", "modelValue"])
  29955. ]),
  29956. _: 1
  29957. /* STABLE */
  29958. }, 8, ["label"])
  29959. ]),
  29960. _: 1
  29961. /* STABLE */
  29962. }, 8, ["modelValue", "rules"]),
  29963. vue.createElementVNode("view", { style: { "display": "flex", "justify-content": "space-between", "margin-top": "20rpx" } }, [
  29964. vue.createCommentVNode(` <button class="ss-reset-button forgot-btn" @tap="showAuthModal('resetPassword')">\r
  29965. 忘记密码\r
  29966. </button> `),
  29967. vue.createElementVNode(
  29968. "button",
  29969. {
  29970. class: "ss-reset-button login-btn-start",
  29971. onClick: $setup.accountLoginSubmit
  29972. },
  29973. vue.toDisplayString($setup.t("account.login")),
  29974. 1
  29975. /* TEXT */
  29976. )
  29977. ])
  29978. ]);
  29979. }
  29980. const accountLogin = /* @__PURE__ */ _export_sfc(_sfc_main$35, [["render", _sfc_render$34], ["__scopeId", "data-v-f21c903c"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-auth-modal/components/account-login.vue"]]);
  29981. const countryData = [
  29982. {
  29983. english_name: "China",
  29984. chinese_name: "中国",
  29985. country_code: "CN",
  29986. phone_code: "86"
  29987. },
  29988. {
  29989. english_name: "Hong Kong",
  29990. chinese_name: "中国香港",
  29991. country_code: "HK",
  29992. phone_code: "852"
  29993. },
  29994. {
  29995. english_name: "Taiwan",
  29996. chinese_name: "中国台湾",
  29997. country_code: "TW",
  29998. phone_code: "886"
  29999. },
  30000. {
  30001. english_name: "Macau",
  30002. chinese_name: "中国澳门",
  30003. country_code: "MO",
  30004. phone_code: "853"
  30005. },
  30006. {
  30007. english_name: "Central African Republic",
  30008. chinese_name: "中非共和国",
  30009. country_code: "CF",
  30010. phone_code: "236"
  30011. },
  30012. {
  30013. english_name: "Chile",
  30014. chinese_name: "智利",
  30015. country_code: "CL",
  30016. phone_code: "56"
  30017. },
  30018. {
  30019. english_name: "Gibraltar",
  30020. chinese_name: "直布罗陀",
  30021. country_code: "GI",
  30022. phone_code: "350"
  30023. },
  30024. {
  30025. english_name: "Chad",
  30026. chinese_name: "乍得",
  30027. country_code: "TD",
  30028. phone_code: "235"
  30029. },
  30030. {
  30031. english_name: "Zambia",
  30032. chinese_name: "赞比亚",
  30033. country_code: "ZM",
  30034. phone_code: "260"
  30035. },
  30036. {
  30037. english_name: "Vietnam",
  30038. chinese_name: "越南",
  30039. country_code: "VN",
  30040. phone_code: "84"
  30041. },
  30042. {
  30043. english_name: "Jordan",
  30044. chinese_name: "约旦",
  30045. country_code: "JO",
  30046. phone_code: "962"
  30047. },
  30048. {
  30049. english_name: "Virgin Islands, British",
  30050. chinese_name: "英属处女群岛",
  30051. country_code: "VG",
  30052. phone_code: "1340"
  30053. },
  30054. {
  30055. english_name: "United Kingdom",
  30056. chinese_name: "英国",
  30057. country_code: "GB",
  30058. phone_code: "44"
  30059. },
  30060. {
  30061. english_name: "Indonesia",
  30062. chinese_name: "印度尼西亚",
  30063. country_code: "ID",
  30064. phone_code: "62"
  30065. },
  30066. {
  30067. english_name: "India",
  30068. chinese_name: "印度",
  30069. country_code: "IN",
  30070. phone_code: "91"
  30071. },
  30072. {
  30073. english_name: "Italy",
  30074. chinese_name: "意大利",
  30075. country_code: "IT",
  30076. phone_code: "39"
  30077. },
  30078. {
  30079. english_name: "Israel",
  30080. chinese_name: "以色列",
  30081. country_code: "IL",
  30082. phone_code: "972"
  30083. },
  30084. {
  30085. english_name: "Iran",
  30086. chinese_name: "伊朗",
  30087. country_code: "IR",
  30088. phone_code: "98"
  30089. },
  30090. {
  30091. english_name: "Iraq",
  30092. chinese_name: "伊拉克",
  30093. country_code: "IQ",
  30094. phone_code: "964"
  30095. },
  30096. {
  30097. english_name: "Yemen",
  30098. chinese_name: "也门",
  30099. country_code: "YE",
  30100. phone_code: "967"
  30101. },
  30102. {
  30103. english_name: "Armenia",
  30104. chinese_name: "亚美尼亚",
  30105. country_code: "AM",
  30106. phone_code: "374"
  30107. },
  30108. {
  30109. english_name: "Jamaica",
  30110. chinese_name: "牙买加",
  30111. country_code: "JM",
  30112. phone_code: "1876"
  30113. },
  30114. {
  30115. english_name: "Syria",
  30116. chinese_name: "叙利亚",
  30117. country_code: "SY",
  30118. phone_code: "963"
  30119. },
  30120. {
  30121. english_name: "Hungary",
  30122. chinese_name: "匈牙利",
  30123. country_code: "HU",
  30124. phone_code: "36"
  30125. },
  30126. {
  30127. english_name: "New Zealand",
  30128. chinese_name: "新西兰",
  30129. country_code: "NZ",
  30130. phone_code: "64"
  30131. },
  30132. {
  30133. english_name: "New Caledonia",
  30134. chinese_name: "新喀里多尼亚",
  30135. country_code: "NC",
  30136. phone_code: "687"
  30137. },
  30138. {
  30139. english_name: "Singapore",
  30140. chinese_name: "新加坡",
  30141. country_code: "SG",
  30142. phone_code: "65"
  30143. },
  30144. {
  30145. english_name: "Ivory Coast",
  30146. chinese_name: "象牙海岸",
  30147. country_code: "CI",
  30148. phone_code: "225"
  30149. },
  30150. {
  30151. english_name: "Greece",
  30152. chinese_name: "希腊",
  30153. country_code: "GR",
  30154. phone_code: "30"
  30155. },
  30156. {
  30157. english_name: "Spain",
  30158. chinese_name: "西班牙",
  30159. country_code: "ES",
  30160. phone_code: "34"
  30161. },
  30162. {
  30163. english_name: "Uzbekistan",
  30164. chinese_name: "乌兹别克斯坦",
  30165. country_code: "UZ",
  30166. phone_code: "998"
  30167. },
  30168. {
  30169. english_name: "Uruguay",
  30170. chinese_name: "乌拉圭",
  30171. country_code: "UY",
  30172. phone_code: "598"
  30173. },
  30174. {
  30175. english_name: "Ukraine",
  30176. chinese_name: "乌克兰",
  30177. country_code: "UA",
  30178. phone_code: "380"
  30179. },
  30180. {
  30181. english_name: "Uganda",
  30182. chinese_name: "乌干达",
  30183. country_code: "UG",
  30184. phone_code: "256"
  30185. },
  30186. {
  30187. english_name: "Brunei",
  30188. chinese_name: "文莱",
  30189. country_code: "BN",
  30190. phone_code: "673"
  30191. },
  30192. {
  30193. english_name: "Venezuela",
  30194. chinese_name: "委内瑞拉",
  30195. country_code: "VE",
  30196. phone_code: "58"
  30197. },
  30198. {
  30199. english_name: "Vanuatu",
  30200. chinese_name: "瓦努阿图",
  30201. country_code: "VU",
  30202. phone_code: "678"
  30203. },
  30204. {
  30205. english_name: "Turkmenistan",
  30206. chinese_name: "土库曼斯坦",
  30207. country_code: "TM",
  30208. phone_code: "993"
  30209. },
  30210. {
  30211. english_name: "Turkey",
  30212. chinese_name: "土耳其",
  30213. country_code: "TR",
  30214. phone_code: "90"
  30215. },
  30216. {
  30217. english_name: "Tunisia",
  30218. chinese_name: "突尼斯",
  30219. country_code: "TN",
  30220. phone_code: "216"
  30221. },
  30222. {
  30223. english_name: "Trinidad and Tobago",
  30224. chinese_name: "特立尼达和多巴哥",
  30225. country_code: "TT",
  30226. phone_code: "1868"
  30227. },
  30228. {
  30229. english_name: "Turks and Caicos Islands",
  30230. chinese_name: "特克斯和凯科斯群岛",
  30231. country_code: "TC",
  30232. phone_code: "1649"
  30233. },
  30234. {
  30235. english_name: "Tonga",
  30236. chinese_name: "汤加",
  30237. country_code: "TO",
  30238. phone_code: "676"
  30239. },
  30240. {
  30241. english_name: "Tanzania",
  30242. chinese_name: "坦桑尼亚",
  30243. country_code: "TZ",
  30244. phone_code: "255"
  30245. },
  30246. {
  30247. english_name: "Thailand",
  30248. chinese_name: "泰国",
  30249. country_code: "TH",
  30250. phone_code: "66"
  30251. },
  30252. {
  30253. english_name: "Tajikistan",
  30254. chinese_name: "塔吉克斯坦",
  30255. country_code: "TJ",
  30256. phone_code: "992"
  30257. },
  30258. {
  30259. english_name: "Somalia",
  30260. chinese_name: "索马里",
  30261. country_code: "SO",
  30262. phone_code: "252"
  30263. },
  30264. {
  30265. english_name: "Solomon Islands",
  30266. chinese_name: "所罗门群岛",
  30267. country_code: "SB",
  30268. phone_code: "677"
  30269. },
  30270. {
  30271. english_name: "Suriname",
  30272. chinese_name: "苏里南",
  30273. country_code: "SR",
  30274. phone_code: "597"
  30275. },
  30276. {
  30277. english_name: "Sudan",
  30278. chinese_name: "苏丹",
  30279. country_code: "SD",
  30280. phone_code: "249"
  30281. },
  30282. {
  30283. english_name: "Swaziland",
  30284. chinese_name: "斯威士兰",
  30285. country_code: "SZ",
  30286. phone_code: "268"
  30287. },
  30288. {
  30289. english_name: "Slovenia",
  30290. chinese_name: "斯洛文尼亚",
  30291. country_code: "SI",
  30292. phone_code: "386"
  30293. },
  30294. {
  30295. english_name: "Slovakia",
  30296. chinese_name: "斯洛伐克",
  30297. country_code: "SK",
  30298. phone_code: "421"
  30299. },
  30300. {
  30301. english_name: "Sri Lanka",
  30302. chinese_name: "斯里兰卡",
  30303. country_code: "LK",
  30304. phone_code: "94"
  30305. },
  30306. {
  30307. english_name: "Saint Vincent and The Grenadines",
  30308. chinese_name: "圣文森特和格林纳丁斯",
  30309. country_code: "VC",
  30310. phone_code: "1784"
  30311. },
  30312. {
  30313. english_name: "San Marino",
  30314. chinese_name: "圣马力诺",
  30315. country_code: "SM",
  30316. phone_code: "378"
  30317. },
  30318. {
  30319. english_name: "Saint Maarten (Dutch Part)",
  30320. chinese_name: "圣马丁岛(荷兰部分)",
  30321. country_code: "SX",
  30322. phone_code: "1721"
  30323. },
  30324. {
  30325. english_name: "Saint Lucia",
  30326. chinese_name: "圣露西亚",
  30327. country_code: "LC",
  30328. phone_code: "1758"
  30329. },
  30330. {
  30331. english_name: "Saint Kitts and Nevis",
  30332. chinese_name: "圣基茨和尼维斯",
  30333. country_code: "KN",
  30334. phone_code: "1869"
  30335. },
  30336. {
  30337. english_name: "Sao Tome and Principe",
  30338. chinese_name: "圣多美和普林西比",
  30339. country_code: "ST",
  30340. phone_code: "239"
  30341. },
  30342. {
  30343. english_name: "Saint Pierre and Miquelon",
  30344. chinese_name: "圣彼埃尔和密克隆岛",
  30345. country_code: "PM",
  30346. phone_code: "508"
  30347. },
  30348. {
  30349. english_name: "Saudi Arabia",
  30350. chinese_name: "沙特阿拉伯",
  30351. country_code: "SA",
  30352. phone_code: "966"
  30353. },
  30354. {
  30355. english_name: "Seychelles",
  30356. chinese_name: "塞舌尔",
  30357. country_code: "SC",
  30358. phone_code: "248"
  30359. },
  30360. {
  30361. english_name: "Cyprus",
  30362. chinese_name: "塞浦路斯",
  30363. country_code: "CY",
  30364. phone_code: "357"
  30365. },
  30366. {
  30367. english_name: "Senegal",
  30368. chinese_name: "塞内加尔",
  30369. country_code: "SN",
  30370. phone_code: "221"
  30371. },
  30372. {
  30373. english_name: "Sierra Leone",
  30374. chinese_name: "塞拉利昂",
  30375. country_code: "SL",
  30376. phone_code: "232"
  30377. },
  30378. {
  30379. english_name: "Serbia",
  30380. chinese_name: "塞尔维亚",
  30381. country_code: "RS",
  30382. phone_code: "381"
  30383. },
  30384. {
  30385. english_name: "Samoa",
  30386. chinese_name: "萨摩亚",
  30387. country_code: "WS",
  30388. phone_code: "685"
  30389. },
  30390. {
  30391. english_name: "El Salvador",
  30392. chinese_name: "萨尔瓦多",
  30393. country_code: "SV",
  30394. phone_code: "503"
  30395. },
  30396. {
  30397. english_name: "Switzerland",
  30398. chinese_name: "瑞士",
  30399. country_code: "CH",
  30400. phone_code: "41"
  30401. },
  30402. {
  30403. english_name: "Sweden",
  30404. chinese_name: "瑞典",
  30405. country_code: "SE",
  30406. phone_code: "46"
  30407. },
  30408. {
  30409. english_name: "Japan",
  30410. chinese_name: "日本",
  30411. country_code: "JP",
  30412. phone_code: "81"
  30413. },
  30414. {
  30415. english_name: "Portugal",
  30416. chinese_name: "葡萄牙",
  30417. country_code: "PT",
  30418. phone_code: "351"
  30419. },
  30420. {
  30421. english_name: "Palau",
  30422. chinese_name: "帕劳",
  30423. country_code: "PW",
  30424. phone_code: "680"
  30425. },
  30426. {
  30427. english_name: "Norway",
  30428. chinese_name: "挪威",
  30429. country_code: "NO",
  30430. phone_code: "47"
  30431. },
  30432. {
  30433. english_name: "Nigeria",
  30434. chinese_name: "尼日利亚",
  30435. country_code: "NG",
  30436. phone_code: "234"
  30437. },
  30438. {
  30439. english_name: "Niger",
  30440. chinese_name: "尼日尔",
  30441. country_code: "NE",
  30442. phone_code: "227"
  30443. },
  30444. {
  30445. english_name: "Nepal",
  30446. chinese_name: "尼泊尔",
  30447. country_code: "NP",
  30448. phone_code: "977"
  30449. },
  30450. {
  30451. english_name: "Nicaragua",
  30452. chinese_name: "尼加拉瓜",
  30453. country_code: "NI",
  30454. phone_code: "505"
  30455. },
  30456. {
  30457. english_name: "South Africa",
  30458. chinese_name: "南非",
  30459. country_code: "ZA",
  30460. phone_code: "27"
  30461. },
  30462. {
  30463. english_name: "Namibia",
  30464. chinese_name: "纳米比亚",
  30465. country_code: "NA",
  30466. phone_code: "264"
  30467. },
  30468. {
  30469. english_name: "Mexico",
  30470. chinese_name: "墨西哥",
  30471. country_code: "MX",
  30472. phone_code: "52"
  30473. },
  30474. {
  30475. english_name: "Mozambique",
  30476. chinese_name: "莫桑比克",
  30477. country_code: "MZ",
  30478. phone_code: "258"
  30479. },
  30480. {
  30481. english_name: "Monaco",
  30482. chinese_name: "摩纳哥",
  30483. country_code: "MC",
  30484. phone_code: "377"
  30485. },
  30486. {
  30487. english_name: "Morocco",
  30488. chinese_name: "摩洛哥",
  30489. country_code: "MA",
  30490. phone_code: "212"
  30491. },
  30492. {
  30493. english_name: "Moldova",
  30494. chinese_name: "摩尔多瓦",
  30495. country_code: "MD",
  30496. phone_code: "373"
  30497. },
  30498. {
  30499. english_name: "Myanmar",
  30500. chinese_name: "缅甸",
  30501. country_code: "MM",
  30502. phone_code: "95"
  30503. },
  30504. {
  30505. english_name: "Peru",
  30506. chinese_name: "秘鲁",
  30507. country_code: "PE",
  30508. phone_code: "51"
  30509. },
  30510. {
  30511. english_name: "Bangladesh",
  30512. chinese_name: "孟加拉国",
  30513. country_code: "BD",
  30514. phone_code: "880"
  30515. },
  30516. {
  30517. english_name: "Montserrat",
  30518. chinese_name: "蒙特塞拉特岛",
  30519. country_code: "MS",
  30520. phone_code: "1664"
  30521. },
  30522. {
  30523. english_name: "Mongolia",
  30524. chinese_name: "蒙古",
  30525. country_code: "MN",
  30526. phone_code: "976"
  30527. },
  30528. {
  30529. english_name: "Virgin Islands, US",
  30530. chinese_name: "美属维尔京群岛",
  30531. country_code: "VI",
  30532. phone_code: "1284"
  30533. },
  30534. {
  30535. english_name: "American Samoa",
  30536. chinese_name: "美属萨摩亚",
  30537. country_code: "AS",
  30538. phone_code: "1684"
  30539. },
  30540. {
  30541. english_name: "United States",
  30542. chinese_name: "美国",
  30543. country_code: "US",
  30544. phone_code: "1"
  30545. },
  30546. {
  30547. english_name: "Mauritania",
  30548. chinese_name: "毛里塔尼亚",
  30549. country_code: "MR",
  30550. phone_code: "222"
  30551. },
  30552. {
  30553. english_name: "Mauritius",
  30554. chinese_name: "毛里求斯",
  30555. country_code: "MU",
  30556. phone_code: "230"
  30557. },
  30558. {
  30559. english_name: "Mayotte",
  30560. chinese_name: "马约特",
  30561. country_code: "YT",
  30562. phone_code: "269"
  30563. },
  30564. {
  30565. english_name: "Martinique",
  30566. chinese_name: "马提尼克",
  30567. country_code: "MQ",
  30568. phone_code: "596"
  30569. },
  30570. {
  30571. english_name: "Macedonia",
  30572. chinese_name: "马其顿",
  30573. country_code: "MK",
  30574. phone_code: "389"
  30575. },
  30576. {
  30577. english_name: "Mali",
  30578. chinese_name: "马里",
  30579. country_code: "ML",
  30580. phone_code: "223"
  30581. },
  30582. {
  30583. english_name: "Malaysia",
  30584. chinese_name: "马来西亚",
  30585. country_code: "MY",
  30586. phone_code: "60"
  30587. },
  30588. {
  30589. english_name: "Malawi",
  30590. chinese_name: "马拉维",
  30591. country_code: "MW",
  30592. phone_code: "265"
  30593. },
  30594. {
  30595. english_name: "Malta",
  30596. chinese_name: "马耳他",
  30597. country_code: "MT",
  30598. phone_code: "356"
  30599. },
  30600. {
  30601. english_name: "Maldives",
  30602. chinese_name: "马尔代夫",
  30603. country_code: "MV",
  30604. phone_code: "960"
  30605. },
  30606. {
  30607. english_name: "Madagascar",
  30608. chinese_name: "马达加斯加",
  30609. country_code: "MG",
  30610. phone_code: "261"
  30611. },
  30612. {
  30613. english_name: "Romania",
  30614. chinese_name: "罗马尼亚",
  30615. country_code: "RO",
  30616. phone_code: "40"
  30617. },
  30618. {
  30619. english_name: "Rwanda",
  30620. chinese_name: "卢旺达",
  30621. country_code: "RW",
  30622. phone_code: "250"
  30623. },
  30624. {
  30625. english_name: "Luxembourg",
  30626. chinese_name: "卢森堡",
  30627. country_code: "LU",
  30628. phone_code: "352"
  30629. },
  30630. {
  30631. english_name: "Réunion Island",
  30632. chinese_name: "留尼汪",
  30633. country_code: "RE",
  30634. phone_code: "262"
  30635. },
  30636. {
  30637. english_name: "Liechtenstein",
  30638. chinese_name: "列支敦士登",
  30639. country_code: "LI",
  30640. phone_code: "423"
  30641. },
  30642. {
  30643. english_name: "Libya",
  30644. chinese_name: "利比亚",
  30645. country_code: "LY",
  30646. phone_code: "218"
  30647. },
  30648. {
  30649. english_name: "Liberia",
  30650. chinese_name: "利比里亚",
  30651. country_code: "LR",
  30652. phone_code: "231"
  30653. },
  30654. {
  30655. english_name: "Lithuania",
  30656. chinese_name: "立陶宛",
  30657. country_code: "LT",
  30658. phone_code: "370"
  30659. },
  30660. {
  30661. english_name: "Lebanon",
  30662. chinese_name: "黎巴嫩",
  30663. country_code: "LB",
  30664. phone_code: "961"
  30665. },
  30666. {
  30667. english_name: "Laos",
  30668. chinese_name: "老挝",
  30669. country_code: "LA",
  30670. phone_code: "856"
  30671. },
  30672. {
  30673. english_name: "Lesotho",
  30674. chinese_name: "莱索托",
  30675. country_code: "LS",
  30676. phone_code: "266"
  30677. },
  30678. {
  30679. english_name: "Latvia",
  30680. chinese_name: "拉脱维亚",
  30681. country_code: "LV",
  30682. phone_code: "371"
  30683. },
  30684. {
  30685. english_name: "Curacao",
  30686. chinese_name: "库拉索",
  30687. country_code: "CW",
  30688. phone_code: "599"
  30689. },
  30690. {
  30691. english_name: "Cook Islands",
  30692. chinese_name: "库克群岛",
  30693. country_code: "CK",
  30694. phone_code: "682"
  30695. },
  30696. {
  30697. english_name: "Kenya",
  30698. chinese_name: "肯尼亚",
  30699. country_code: "KE",
  30700. phone_code: "254"
  30701. },
  30702. {
  30703. english_name: "Croatia",
  30704. chinese_name: "克罗地亚",
  30705. country_code: "HR",
  30706. phone_code: "385"
  30707. },
  30708. {
  30709. english_name: "Kuwait",
  30710. chinese_name: "科威特",
  30711. country_code: "KW",
  30712. phone_code: "965"
  30713. },
  30714. {
  30715. english_name: "Comoros",
  30716. chinese_name: "科摩罗",
  30717. country_code: "KM",
  30718. phone_code: "269"
  30719. },
  30720. {
  30721. english_name: "Cape Verde",
  30722. chinese_name: "开普",
  30723. country_code: "CV",
  30724. phone_code: "238"
  30725. },
  30726. {
  30727. english_name: "Cayman Islands",
  30728. chinese_name: "开曼群岛",
  30729. country_code: "KY",
  30730. phone_code: "1345"
  30731. },
  30732. {
  30733. english_name: "Qatar",
  30734. chinese_name: "卡塔尔",
  30735. country_code: "QA",
  30736. phone_code: "974"
  30737. },
  30738. {
  30739. english_name: "Cameroon",
  30740. chinese_name: "喀麦隆",
  30741. country_code: "CM",
  30742. phone_code: "237"
  30743. },
  30744. {
  30745. english_name: "Zimbabwe",
  30746. chinese_name: "津巴布韦",
  30747. country_code: "ZW",
  30748. phone_code: "263"
  30749. },
  30750. {
  30751. english_name: "Czech",
  30752. chinese_name: "捷克",
  30753. country_code: "CZ",
  30754. phone_code: "420"
  30755. },
  30756. {
  30757. english_name: "Cambodia",
  30758. chinese_name: "柬埔寨",
  30759. country_code: "KH",
  30760. phone_code: "855"
  30761. },
  30762. {
  30763. english_name: "Gabon",
  30764. chinese_name: "加蓬",
  30765. country_code: "GA",
  30766. phone_code: "241"
  30767. },
  30768. {
  30769. english_name: "Ghana",
  30770. chinese_name: "加纳",
  30771. country_code: "GH",
  30772. phone_code: "233"
  30773. },
  30774. {
  30775. english_name: "Canada",
  30776. chinese_name: "加拿大",
  30777. country_code: "CA",
  30778. phone_code: "1"
  30779. },
  30780. {
  30781. english_name: "Guinea-Bissau",
  30782. chinese_name: "几内亚比绍共和国",
  30783. country_code: "GW",
  30784. phone_code: "245"
  30785. },
  30786. {
  30787. english_name: "Guinea",
  30788. chinese_name: "几内亚",
  30789. country_code: "GN",
  30790. phone_code: "224"
  30791. },
  30792. {
  30793. english_name: "Kyrgyzstan",
  30794. chinese_name: "吉尔吉斯斯坦",
  30795. country_code: "KG",
  30796. phone_code: "996"
  30797. },
  30798. {
  30799. english_name: "Djibouti",
  30800. chinese_name: "吉布提",
  30801. country_code: "DJ",
  30802. phone_code: "253"
  30803. },
  30804. {
  30805. english_name: "Kiribati",
  30806. chinese_name: "基里巴斯",
  30807. country_code: "KI",
  30808. phone_code: "686"
  30809. },
  30810. {
  30811. english_name: "Honduras",
  30812. chinese_name: "洪都拉斯",
  30813. country_code: "HN",
  30814. phone_code: "504"
  30815. },
  30816. {
  30817. english_name: "Montenegro",
  30818. chinese_name: "黑山",
  30819. country_code: "ME",
  30820. phone_code: "382"
  30821. },
  30822. {
  30823. english_name: "Netherlands",
  30824. chinese_name: "荷兰",
  30825. country_code: "NL",
  30826. phone_code: "31"
  30827. },
  30828. {
  30829. english_name: "South Korea",
  30830. chinese_name: "韩国",
  30831. country_code: "KR",
  30832. phone_code: "82"
  30833. },
  30834. {
  30835. english_name: "Haiti",
  30836. chinese_name: "海地",
  30837. country_code: "HT",
  30838. phone_code: "509"
  30839. },
  30840. {
  30841. english_name: "Kazakhstan",
  30842. chinese_name: "哈萨克斯坦",
  30843. country_code: "KZ",
  30844. phone_code: "7"
  30845. },
  30846. {
  30847. english_name: "Guyana",
  30848. chinese_name: "圭亚那",
  30849. country_code: "GY",
  30850. phone_code: "592"
  30851. },
  30852. {
  30853. english_name: "Guam",
  30854. chinese_name: "关岛",
  30855. country_code: "GU",
  30856. phone_code: "1671"
  30857. },
  30858. {
  30859. english_name: "Guatemala",
  30860. chinese_name: "瓜地马拉",
  30861. country_code: "GT",
  30862. phone_code: "502"
  30863. },
  30864. {
  30865. english_name: "Guadeloupe",
  30866. chinese_name: "瓜德罗普岛",
  30867. country_code: "GP",
  30868. phone_code: "590"
  30869. },
  30870. {
  30871. english_name: "Cuba",
  30872. chinese_name: "古巴",
  30873. country_code: "CU",
  30874. phone_code: "53"
  30875. },
  30876. {
  30877. english_name: "Georgia",
  30878. chinese_name: "格鲁吉亚",
  30879. country_code: "GE",
  30880. phone_code: "995"
  30881. },
  30882. {
  30883. english_name: "Greenland",
  30884. chinese_name: "格陵兰岛",
  30885. country_code: "GL",
  30886. phone_code: "299"
  30887. },
  30888. {
  30889. english_name: "Grenada",
  30890. chinese_name: "格林纳达",
  30891. country_code: "GD",
  30892. phone_code: "1473"
  30893. },
  30894. {
  30895. english_name: "Costa Rica",
  30896. chinese_name: "哥斯达黎加",
  30897. country_code: "CR",
  30898. phone_code: "506"
  30899. },
  30900. {
  30901. english_name: "Colombia",
  30902. chinese_name: "哥伦比亚",
  30903. country_code: "CO",
  30904. phone_code: "57"
  30905. },
  30906. {
  30907. english_name: "Democratic Republic of the Congo",
  30908. chinese_name: "刚果民主共和国",
  30909. country_code: "CD",
  30910. phone_code: "243"
  30911. },
  30912. {
  30913. english_name: "Republic Of The Congo",
  30914. chinese_name: "刚果共和国",
  30915. country_code: "CG",
  30916. phone_code: "242"
  30917. },
  30918. {
  30919. english_name: "Gambia",
  30920. chinese_name: "冈比亚",
  30921. country_code: "GM",
  30922. phone_code: "220"
  30923. },
  30924. {
  30925. english_name: "Finland",
  30926. chinese_name: "芬兰",
  30927. country_code: "FI",
  30928. phone_code: "358"
  30929. },
  30930. {
  30931. english_name: "Fiji",
  30932. chinese_name: "斐济",
  30933. country_code: "FJ",
  30934. phone_code: "679"
  30935. },
  30936. {
  30937. english_name: "Philippines",
  30938. chinese_name: "菲律宾",
  30939. country_code: "PH",
  30940. phone_code: "63"
  30941. },
  30942. {
  30943. english_name: "French Guiana",
  30944. chinese_name: "法属圭亚那",
  30945. country_code: "GF",
  30946. phone_code: "594"
  30947. },
  30948. {
  30949. english_name: "French Polynesia",
  30950. chinese_name: "法属波利尼西亚",
  30951. country_code: "PF",
  30952. phone_code: "689"
  30953. },
  30954. {
  30955. english_name: "Faroe Islands",
  30956. chinese_name: "法罗群岛",
  30957. country_code: "FO",
  30958. phone_code: "298"
  30959. },
  30960. {
  30961. english_name: "France",
  30962. chinese_name: "法国",
  30963. country_code: "FR",
  30964. phone_code: "33"
  30965. },
  30966. {
  30967. english_name: "Eritrea",
  30968. chinese_name: "厄立特里亚",
  30969. country_code: "ER",
  30970. phone_code: "291"
  30971. },
  30972. {
  30973. english_name: "Ecuador",
  30974. chinese_name: "厄瓜多尔",
  30975. country_code: "EC",
  30976. phone_code: "593"
  30977. },
  30978. {
  30979. english_name: "Russia",
  30980. chinese_name: "俄罗斯",
  30981. country_code: "RU",
  30982. phone_code: "7"
  30983. },
  30984. {
  30985. english_name: "Dominican Republic",
  30986. chinese_name: "多米尼加共和国",
  30987. country_code: "DO",
  30988. phone_code: "1809"
  30989. },
  30990. {
  30991. english_name: "Dominica",
  30992. chinese_name: "多米尼加",
  30993. country_code: "DM",
  30994. phone_code: "1767"
  30995. },
  30996. {
  30997. english_name: "Togo",
  30998. chinese_name: "多哥",
  30999. country_code: "TG",
  31000. phone_code: "228"
  31001. },
  31002. {
  31003. english_name: "Timor-Leste",
  31004. chinese_name: "东帝汶",
  31005. country_code: "TL",
  31006. phone_code: "670"
  31007. },
  31008. {
  31009. english_name: "Germany",
  31010. chinese_name: "德国",
  31011. country_code: "DE",
  31012. phone_code: "49"
  31013. },
  31014. {
  31015. english_name: "Denmark",
  31016. chinese_name: "丹麦",
  31017. country_code: "DK",
  31018. phone_code: "45"
  31019. },
  31020. {
  31021. english_name: "Equatorial Guinea",
  31022. chinese_name: "赤道几内亚",
  31023. country_code: "GQ",
  31024. phone_code: "240"
  31025. },
  31026. {
  31027. english_name: "Burundi",
  31028. chinese_name: "布隆迪",
  31029. country_code: "BI",
  31030. phone_code: "257"
  31031. },
  31032. {
  31033. english_name: "Burkina Faso",
  31034. chinese_name: "布基纳法索",
  31035. country_code: "BF",
  31036. phone_code: "226"
  31037. },
  31038. {
  31039. english_name: "Bhutan",
  31040. chinese_name: "不丹",
  31041. country_code: "BT",
  31042. phone_code: "975"
  31043. },
  31044. {
  31045. english_name: "Botswana",
  31046. chinese_name: "博茨瓦纳",
  31047. country_code: "BW",
  31048. phone_code: "267"
  31049. },
  31050. {
  31051. english_name: "Belize",
  31052. chinese_name: "伯利兹",
  31053. country_code: "BZ",
  31054. phone_code: "501"
  31055. },
  31056. {
  31057. english_name: "Bolivia",
  31058. chinese_name: "玻利维亚",
  31059. country_code: "BO",
  31060. phone_code: "591"
  31061. },
  31062. {
  31063. english_name: "Bosnia and Herzegovina",
  31064. chinese_name: "波斯尼亚和黑塞哥维那",
  31065. country_code: "BA",
  31066. phone_code: "387"
  31067. },
  31068. {
  31069. english_name: "Poland",
  31070. chinese_name: "波兰",
  31071. country_code: "PL",
  31072. phone_code: "48"
  31073. },
  31074. {
  31075. english_name: "Puerto Rico",
  31076. chinese_name: "波多黎各",
  31077. country_code: "PR",
  31078. phone_code: "1787"
  31079. },
  31080. {
  31081. english_name: "Iceland",
  31082. chinese_name: "冰岛",
  31083. country_code: "IS",
  31084. phone_code: "354"
  31085. },
  31086. {
  31087. english_name: "Belgium",
  31088. chinese_name: "比利时",
  31089. country_code: "BE",
  31090. phone_code: "32"
  31091. },
  31092. {
  31093. english_name: "Benin",
  31094. chinese_name: "贝宁",
  31095. country_code: "BJ",
  31096. phone_code: "229"
  31097. },
  31098. {
  31099. english_name: "Bulgaria",
  31100. chinese_name: "保加利亚",
  31101. country_code: "BG",
  31102. phone_code: "359"
  31103. },
  31104. {
  31105. english_name: "Bermuda",
  31106. chinese_name: "百慕大群岛",
  31107. country_code: "BM",
  31108. phone_code: "1441"
  31109. },
  31110. {
  31111. english_name: "Belarus",
  31112. chinese_name: "白俄罗斯",
  31113. country_code: "BY",
  31114. phone_code: "375"
  31115. },
  31116. {
  31117. english_name: "Brazil",
  31118. chinese_name: "巴西",
  31119. country_code: "BR",
  31120. phone_code: "55"
  31121. },
  31122. {
  31123. english_name: "Panama",
  31124. chinese_name: "巴拿马",
  31125. country_code: "PA",
  31126. phone_code: "507"
  31127. },
  31128. {
  31129. english_name: "Bahrain",
  31130. chinese_name: "巴林",
  31131. country_code: "BH",
  31132. phone_code: "973"
  31133. },
  31134. {
  31135. english_name: "Palestine",
  31136. chinese_name: "巴勒斯坦",
  31137. country_code: "BL",
  31138. phone_code: "970"
  31139. },
  31140. {
  31141. english_name: "Paraguay",
  31142. chinese_name: "巴拉圭",
  31143. country_code: "PY",
  31144. phone_code: "595"
  31145. },
  31146. {
  31147. english_name: "Pakistan",
  31148. chinese_name: "巴基斯坦",
  31149. country_code: "PK",
  31150. phone_code: "92"
  31151. },
  31152. {
  31153. english_name: "Bahamas",
  31154. chinese_name: "巴哈马",
  31155. country_code: "BS",
  31156. phone_code: "1242"
  31157. },
  31158. {
  31159. english_name: "Papua New Guinea",
  31160. chinese_name: "巴布亚新几内亚",
  31161. country_code: "PG",
  31162. phone_code: "675"
  31163. },
  31164. {
  31165. english_name: "Barbados",
  31166. chinese_name: "巴巴多斯",
  31167. country_code: "BB",
  31168. phone_code: "1246"
  31169. },
  31170. {
  31171. english_name: "Australia",
  31172. chinese_name: "澳大利亚",
  31173. country_code: "AU",
  31174. phone_code: "61"
  31175. },
  31176. {
  31177. english_name: "Austria",
  31178. chinese_name: "奥地利",
  31179. country_code: "AT",
  31180. phone_code: "43"
  31181. },
  31182. {
  31183. english_name: "Antigua and Barbuda",
  31184. chinese_name: "安提瓜和巴布达",
  31185. country_code: "AG",
  31186. phone_code: "1268"
  31187. },
  31188. {
  31189. english_name: "Anguilla",
  31190. chinese_name: "安圭拉",
  31191. country_code: "AI",
  31192. phone_code: "1264"
  31193. },
  31194. {
  31195. english_name: "Angola",
  31196. chinese_name: "安哥拉",
  31197. country_code: "AO",
  31198. phone_code: "244"
  31199. },
  31200. {
  31201. english_name: "Andorra",
  31202. chinese_name: "安道尔",
  31203. country_code: "AD",
  31204. phone_code: "376"
  31205. },
  31206. {
  31207. english_name: "Estonia",
  31208. chinese_name: "爱沙尼亚",
  31209. country_code: "EE",
  31210. phone_code: "372"
  31211. },
  31212. {
  31213. english_name: "Ireland",
  31214. chinese_name: "爱尔兰",
  31215. country_code: "IE",
  31216. phone_code: "353"
  31217. },
  31218. {
  31219. english_name: "Ethiopia",
  31220. chinese_name: "埃塞俄比亚",
  31221. country_code: "ET",
  31222. phone_code: "251"
  31223. },
  31224. {
  31225. english_name: "Egypt",
  31226. chinese_name: "埃及",
  31227. country_code: "EG",
  31228. phone_code: "20"
  31229. },
  31230. {
  31231. english_name: "Azerbaijan",
  31232. chinese_name: "阿塞拜疆",
  31233. country_code: "AZ",
  31234. phone_code: "994"
  31235. },
  31236. {
  31237. english_name: "Oman",
  31238. chinese_name: "阿曼",
  31239. country_code: "OM",
  31240. phone_code: "968"
  31241. },
  31242. {
  31243. english_name: "Aruba",
  31244. chinese_name: "阿鲁巴",
  31245. country_code: "AW",
  31246. phone_code: "297"
  31247. },
  31248. {
  31249. english_name: "United Arab Emirates",
  31250. chinese_name: "阿拉伯联合酋长国",
  31251. country_code: "AE",
  31252. phone_code: "971"
  31253. },
  31254. {
  31255. english_name: "Argentina",
  31256. chinese_name: "阿根廷",
  31257. country_code: "AR",
  31258. phone_code: "54"
  31259. },
  31260. {
  31261. english_name: "Afghanistan",
  31262. chinese_name: "阿富汗",
  31263. country_code: "AF",
  31264. phone_code: "93"
  31265. },
  31266. {
  31267. english_name: "Algeria",
  31268. chinese_name: "阿尔及利亚",
  31269. country_code: "DZ",
  31270. phone_code: "213"
  31271. },
  31272. {
  31273. english_name: "Albania",
  31274. chinese_name: "阿尔巴尼亚",
  31275. country_code: "AL",
  31276. phone_code: "355"
  31277. }
  31278. ];
  31279. const metadata$1 = { "version": 4, "country_calling_codes": { "1": ["US", "AG", "AI", "AS", "BB", "BM", "BS", "CA", "DM", "DO", "GD", "GU", "JM", "KN", "KY", "LC", "MP", "MS", "PR", "SX", "TC", "TT", "VC", "VG", "VI"], "7": ["RU", "KZ"], "20": ["EG"], "27": ["ZA"], "30": ["GR"], "31": ["NL"], "32": ["BE"], "33": ["FR"], "34": ["ES"], "36": ["HU"], "39": ["IT", "VA"], "40": ["RO"], "41": ["CH"], "43": ["AT"], "44": ["GB", "GG", "IM", "JE"], "45": ["DK"], "46": ["SE"], "47": ["NO", "SJ"], "48": ["PL"], "49": ["DE"], "51": ["PE"], "52": ["MX"], "53": ["CU"], "54": ["AR"], "55": ["BR"], "56": ["CL"], "57": ["CO"], "58": ["VE"], "60": ["MY"], "61": ["AU", "CC", "CX"], "62": ["ID"], "63": ["PH"], "64": ["NZ"], "65": ["SG"], "66": ["TH"], "81": ["JP"], "82": ["KR"], "84": ["VN"], "86": ["CN"], "90": ["TR"], "91": ["IN"], "92": ["PK"], "93": ["AF"], "94": ["LK"], "95": ["MM"], "98": ["IR"], "211": ["SS"], "212": ["MA", "EH"], "213": ["DZ"], "216": ["TN"], "218": ["LY"], "220": ["GM"], "221": ["SN"], "222": ["MR"], "223": ["ML"], "224": ["GN"], "225": ["CI"], "226": ["BF"], "227": ["NE"], "228": ["TG"], "229": ["BJ"], "230": ["MU"], "231": ["LR"], "232": ["SL"], "233": ["GH"], "234": ["NG"], "235": ["TD"], "236": ["CF"], "237": ["CM"], "238": ["CV"], "239": ["ST"], "240": ["GQ"], "241": ["GA"], "242": ["CG"], "243": ["CD"], "244": ["AO"], "245": ["GW"], "246": ["IO"], "247": ["AC"], "248": ["SC"], "249": ["SD"], "250": ["RW"], "251": ["ET"], "252": ["SO"], "253": ["DJ"], "254": ["KE"], "255": ["TZ"], "256": ["UG"], "257": ["BI"], "258": ["MZ"], "260": ["ZM"], "261": ["MG"], "262": ["RE", "YT"], "263": ["ZW"], "264": ["NA"], "265": ["MW"], "266": ["LS"], "267": ["BW"], "268": ["SZ"], "269": ["KM"], "290": ["SH", "TA"], "291": ["ER"], "297": ["AW"], "298": ["FO"], "299": ["GL"], "350": ["GI"], "351": ["PT"], "352": ["LU"], "353": ["IE"], "354": ["IS"], "355": ["AL"], "356": ["MT"], "357": ["CY"], "358": ["FI", "AX"], "359": ["BG"], "370": ["LT"], "371": ["LV"], "372": ["EE"], "373": ["MD"], "374": ["AM"], "375": ["BY"], "376": ["AD"], "377": ["MC"], "378": ["SM"], "380": ["UA"], "381": ["RS"], "382": ["ME"], "383": ["XK"], "385": ["HR"], "386": ["SI"], "387": ["BA"], "389": ["MK"], "420": ["CZ"], "421": ["SK"], "423": ["LI"], "500": ["FK"], "501": ["BZ"], "502": ["GT"], "503": ["SV"], "504": ["HN"], "505": ["NI"], "506": ["CR"], "507": ["PA"], "508": ["PM"], "509": ["HT"], "590": ["GP", "BL", "MF"], "591": ["BO"], "592": ["GY"], "593": ["EC"], "594": ["GF"], "595": ["PY"], "596": ["MQ"], "597": ["SR"], "598": ["UY"], "599": ["CW", "BQ"], "670": ["TL"], "672": ["NF"], "673": ["BN"], "674": ["NR"], "675": ["PG"], "676": ["TO"], "677": ["SB"], "678": ["VU"], "679": ["FJ"], "680": ["PW"], "681": ["WF"], "682": ["CK"], "683": ["NU"], "685": ["WS"], "686": ["KI"], "687": ["NC"], "688": ["TV"], "689": ["PF"], "690": ["TK"], "691": ["FM"], "692": ["MH"], "850": ["KP"], "852": ["HK"], "853": ["MO"], "855": ["KH"], "856": ["LA"], "880": ["BD"], "886": ["TW"], "960": ["MV"], "961": ["LB"], "962": ["JO"], "963": ["SY"], "964": ["IQ"], "965": ["KW"], "966": ["SA"], "967": ["YE"], "968": ["OM"], "970": ["PS"], "971": ["AE"], "972": ["IL"], "973": ["BH"], "974": ["QA"], "975": ["BT"], "976": ["MN"], "977": ["NP"], "992": ["TJ"], "993": ["TM"], "994": ["AZ"], "995": ["GE"], "996": ["KG"], "998": ["UZ"] }, "countries": { "AC": ["247", "00", "(?:[01589]\\d|[46])\\d{4}", [5, 6]], "AD": ["376", "00", "(?:1|6\\d)\\d{7}|[135-9]\\d{5}", [6, 8, 9], [["(\\d{3})(\\d{3})", "$1 $2", ["[135-9]"]], ["(\\d{4})(\\d{4})", "$1 $2", ["1"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["6"]]]], "AE": ["971", "00", "(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}", [5, 6, 7, 8, 9, 10, 11, 12], [["(\\d{3})(\\d{2,9})", "$1 $2", ["60|8"]], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["[236]|[479][2-8]"], "0$1"], ["(\\d{3})(\\d)(\\d{5})", "$1 $2 $3", ["[479]"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["5"], "0$1"]], "0"], "AF": ["93", "00", "[2-7]\\d{8}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-7]"], "0$1"]], "0"], "AG": ["1", "011", "(?:268|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([457]\\d{6})$|1", "268$1", 0, "268"], "AI": ["1", "011", "(?:264|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2457]\\d{6})$|1", "264$1", 0, "264"], "AL": ["355", "00", "(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}", [6, 7, 8, 9], [["(\\d{3})(\\d{3,4})", "$1 $2", ["80|9"], "0$1"], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["4[2-6]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2358][2-5]|4"], "0$1"], ["(\\d{3})(\\d{5})", "$1 $2", ["[23578]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["6"], "0$1"]], "0"], "AM": ["374", "00", "(?:[1-489]\\d|55|60|77)\\d{6}", [8], [["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["[89]0"], "0 $1"], ["(\\d{3})(\\d{5})", "$1 $2", ["2|3[12]"], "(0$1)"], ["(\\d{2})(\\d{6})", "$1 $2", ["1|47"], "(0$1)"], ["(\\d{2})(\\d{6})", "$1 $2", ["[3-9]"], "0$1"]], "0"], "AO": ["244", "00", "[29]\\d{8}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[29]"]]]], "AR": ["54", "00", "(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}", [10, 11], [["(\\d{4})(\\d{2})(\\d{4})", "$1 $2-$3", ["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])", "2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)", "2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]", "2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"], "0$1", 1], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2-$3", ["1"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1-$2-$3", ["[68]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2-$3", ["[23]"], "0$1", 1], ["(\\d)(\\d{4})(\\d{2})(\\d{4})", "$2 15-$3-$4", ["9(?:2[2-469]|3[3-578])", "9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))", "9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)", "9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]", "9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"], "0$1", 0, "$1 $2 $3-$4"], ["(\\d)(\\d{2})(\\d{4})(\\d{4})", "$2 15-$3-$4", ["91"], "0$1", 0, "$1 $2 $3-$4"], ["(\\d{3})(\\d{3})(\\d{5})", "$1-$2-$3", ["8"], "0$1"], ["(\\d)(\\d{3})(\\d{3})(\\d{4})", "$2 15-$3-$4", ["9"], "0$1", 0, "$1 $2 $3-$4"]], "0", 0, "0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?", "9$1"], "AS": ["1", "011", "(?:[58]\\d\\d|684|900)\\d{7}", [10], 0, "1", 0, "([267]\\d{6})$|1", "684$1", 0, "684"], "AT": ["43", "00", "1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}", [4, 5, 6, 7, 8, 9, 10, 11, 12, 13], [["(\\d)(\\d{3,12})", "$1 $2", ["1(?:11|[2-9])"], "0$1"], ["(\\d{3})(\\d{2})", "$1 $2", ["517"], "0$1"], ["(\\d{2})(\\d{3,5})", "$1 $2", ["5[079]"], "0$1"], ["(\\d{3})(\\d{3,10})", "$1 $2", ["(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:20|32|8)|[89]"], "0$1"], ["(\\d{4})(\\d{3,9})", "$1 $2", ["[2-467]|5[2-6]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["5"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4,7})", "$1 $2 $3", ["5"], "0$1"]], "0"], "AU": ["61", "001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011", "1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}", [5, 6, 7, 8, 9, 10, 12], [["(\\d{2})(\\d{3,4})", "$1 $2", ["16"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2,4})", "$1 $2 $3", ["16"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["14|4"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["[2378]"], "(0$1)"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1(?:30|[89])"]]], "0", 0, "(183[12])|0", 0, 0, 0, [["(?:(?:(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|7(?:[013-57-9]\\d|2[0-8]))\\d|3(?:(?:[0-3589]\\d|6[1-9]|7[0-35-9])\\d|4(?:[0-578]\\d|90)))\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|3\\d\\d)|(?:6[0-8]|[78]\\d)\\d{3}|9(?:[02-9]\\d{3}|1(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79])))))\\d{3}", [9]], ["4(?:79[01]|83[0-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}", [9]], ["180(?:0\\d{3}|2)\\d{3}", [7, 10]], ["190[0-26]\\d{6}", [10]], 0, 0, 0, ["163\\d{2,6}", [5, 6, 7, 8, 9]], ["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}", [9]], ["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}", [6, 8, 10, 12]]], "0011"], "AW": ["297", "00", "(?:[25-79]\\d\\d|800)\\d{4}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[25-9]"]]]], "AX": ["358", "00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))", "2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}", [5, 6, 7, 8, 9, 10, 11, 12], 0, "0", 0, 0, 0, 0, "18", 0, "00"], "AZ": ["994", "00", "365\\d{6}|(?:[124579]\\d|60|88)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["90"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["1[28]|2|365|46", "1[28]|2|365[45]|46", "1[28]|2|365(?:4|5[02])|46"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[13-9]"], "0$1"]], "0"], "BA": ["387", "00", "6\\d{8}|(?:[35689]\\d|49|70)\\d{6}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["6[1-3]|[7-9]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2-$3", ["[3-5]|6[56]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["6"], "0$1"]], "0"], "BB": ["1", "011", "(?:246|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "246$1", 0, "246"], "BD": ["880", "00", "[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}", [6, 7, 8, 9, 10], [["(\\d{2})(\\d{4,6})", "$1-$2", ["31[5-8]|[459]1"], "0$1"], ["(\\d{3})(\\d{3,7})", "$1-$2", ["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"], "0$1"], ["(\\d{4})(\\d{3,6})", "$1-$2", ["[13-9]|2[23]"], "0$1"], ["(\\d)(\\d{7,8})", "$1-$2", ["2"], "0$1"]], "0"], "BE": ["32", "00", "4\\d{8}|[1-9]\\d{7}", [8, 9], [["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["(?:80|9)0"], "0$1"], ["(\\d)(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[239]|4[23]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[15-8]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["4"], "0$1"]], "0"], "BF": ["226", "00", "[025-7]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[025-7]"]]]], "BG": ["359", "00", "00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}", [6, 7, 8, 9, 12], [["(\\d)(\\d)(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["2"], "0$1"], ["(\\d{3})(\\d{4})", "$1 $2", ["43[1-6]|70[1-9]"], "0$1"], ["(\\d)(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2,3})", "$1 $2 $3", ["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["(?:70|8)0"], "0$1"], ["(\\d{3})(\\d{3})(\\d{2})", "$1 $2 $3", ["43[1-7]|7"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[48]|9[08]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["9"], "0$1"]], "0"], "BH": ["973", "00", "[136-9]\\d{7}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[13679]|8[02-4679]"]]]], "BI": ["257", "00", "(?:[267]\\d|31)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2367]"]]]], "BJ": ["229", "00", "[24-689]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[24-689]"]]]], "BL": ["590", "00", "590\\d{6}|(?:69|80|9\\d)\\d{7}", [9], 0, "0", 0, 0, 0, 0, 0, [["590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}"], ["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"], ["80[0-5]\\d{6}"], 0, 0, 0, 0, 0, ["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]], "BM": ["1", "011", "(?:441|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "441$1", 0, "441"], "BN": ["673", "00", "[2-578]\\d{6}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-578]"]]]], "BO": ["591", "00(?:1\\d)?", "8001\\d{5}|(?:[2-467]\\d|50)\\d{6}", [8, 9], [["(\\d)(\\d{7})", "$1 $2", ["[235]|4[46]"]], ["(\\d{8})", "$1", ["[67]"]], ["(\\d{3})(\\d{2})(\\d{4})", "$1 $2 $3", ["8"]]], "0", 0, "0(1\\d)?"], "BQ": ["599", "00", "(?:[34]1|7\\d)\\d{5}", [7], 0, 0, 0, 0, 0, 0, "[347]"], "BR": ["55", "00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)", "(?:[1-46-9]\\d\\d|5(?:[0-46-9]\\d|5[0-46-9]))\\d{8}|[1-9]\\d{9}|[3589]\\d{8}|[34]\\d{7}", [8, 9, 10, 11], [["(\\d{4})(\\d{4})", "$1-$2", ["300|4(?:0[02]|37)", "4(?:02|37)0|[34]00"]], ["(\\d{3})(\\d{2,3})(\\d{4})", "$1 $2 $3", ["(?:[358]|90)0"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2-$3", ["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"], "($1)"], ["(\\d{2})(\\d{5})(\\d{4})", "$1 $2-$3", ["[16][1-9]|[2-57-9]"], "($1)"]], "0", 0, "(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?", "$2"], "BS": ["1", "011", "(?:242|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([3-8]\\d{6})$|1", "242$1", 0, "242"], "BT": ["975", "00", "[17]\\d{7}|[2-8]\\d{6}", [7, 8], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-68]|7[246]"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["1[67]|7"]]]], "BW": ["267", "00", "(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}", [7, 8, 10], [["(\\d{2})(\\d{5})", "$1 $2", ["90"]], ["(\\d{3})(\\d{4})", "$1 $2", ["[24-6]|3[15-9]"]], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[37]"]], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["0"]], ["(\\d{3})(\\d{4})(\\d{3})", "$1 $2 $3", ["8"]]]], "BY": ["375", "810", "(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}", [6, 7, 8, 9, 10, 11], [["(\\d{3})(\\d{3})", "$1 $2", ["800"], "8 $1"], ["(\\d{3})(\\d{2})(\\d{2,4})", "$1 $2 $3", ["800"], "8 $1"], ["(\\d{4})(\\d{2})(\\d{3})", "$1 $2-$3", ["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])", "1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"], "8 0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["1(?:[56]|7[467])|2[1-3]"], "8 0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["[1-4]"], "8 0$1"], ["(\\d{3})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["[89]"], "8 $1"]], "8", 0, "0|80?", 0, 0, 0, 0, "8~10"], "BZ": ["501", "00", "(?:0800\\d|[2-8])\\d{6}", [7, 11], [["(\\d{3})(\\d{4})", "$1-$2", ["[2-8]"]], ["(\\d)(\\d{3})(\\d{4})(\\d{3})", "$1-$2-$3-$4", ["0"]]]], "CA": ["1", "011", "(?:[2-8]\\d|90)\\d{8}|3\\d{6}", [7, 10], 0, "1", 0, 0, 0, 0, 0, [["(?:2(?:04|[23]6|[48]9|50|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|90[25])[2-9]\\d{6}", [10]], ["", [10]], ["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}", [10]], ["900[2-9]\\d{6}", [10]], ["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:00|2[125-9]|33|44|66|77|88)|622)[2-9]\\d{6}", [10]], 0, ["310\\d{4}", [7]], 0, ["600[2-9]\\d{6}", [10]]]], "CC": ["61", "001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011", "1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}", [6, 7, 8, 9, 10, 12], 0, "0", 0, "([59]\\d{7})$|0", "8$1", 0, 0, [["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}", [9]], ["4(?:79[01]|83[0-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}", [9]], ["180(?:0\\d{3}|2)\\d{3}", [7, 10]], ["190[0-26]\\d{6}", [10]], 0, 0, 0, 0, ["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}", [9]], ["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}", [6, 8, 10, 12]]], "0011"], "CD": ["243", "00", "(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}", [7, 8, 9, 10], [["(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["88"], "0$1"], ["(\\d{2})(\\d{5})", "$1 $2", ["[1-6]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[89]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["5"], "0$1"]], "0"], "CF": ["236", "00", "(?:[27]\\d{3}|8776)\\d{4}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[278]"]]]], "CG": ["242", "00", "222\\d{6}|(?:0\\d|80)\\d{7}", [9], [["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["8"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[02]"]]]], "CH": ["41", "00", "8\\d{11}|[2-9]\\d{8}", [9, 12], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8[047]|90"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-79]|81"], "0$1"], ["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["8"], "0$1"]], "0"], "CI": ["225", "00", "[02]\\d{9}", [10], [["(\\d{2})(\\d{2})(\\d)(\\d{5})", "$1 $2 $3 $4", ["2"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3 $4", ["0"]]]], "CK": ["682", "00", "[2-578]\\d{4}", [5], [["(\\d{2})(\\d{3})", "$1 $2", ["[2-578]"]]]], "CL": ["56", "(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0", "12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}", [9, 10, 11], [["(\\d{5})(\\d{4})", "$1 $2", ["219", "2196"], "($1)"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["44"]], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["2[1-36]"], "($1)"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["9[2-9]"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[1-9])"], "($1)"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["60|8"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]], ["(\\d{3})(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["60"]]]], "CM": ["237", "00", "[26]\\d{8}|88\\d{6,7}", [8, 9], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["88"]], ["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["[26]|88"]]]], "CN": ["86", "00|1(?:[12]\\d|79)\\d\\d00", "(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}", [7, 8, 9, 10, 11, 12], [["(\\d{2})(\\d{5,6})", "$1 $2", ["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]", "(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1", "10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12", "10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123", "10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"], "0$1"], ["(\\d{3})(\\d{5,6})", "$1 $2", ["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]", "(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]", "85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])", "85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["(?:4|80)0"]], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["10|2(?:[02-57-9]|1[1-9])", "10|2(?:[02-57-9]|1[1-9])", "10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"], "0$1", 1], ["(\\d{3})(\\d{7,8})", "$1 $2", ["9"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["80"], "0$1", 1], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["[3-578]"], "0$1", 1], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["1[3-9]"]], ["(\\d{2})(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3 $4", ["[12]"], "0$1", 1]], "0", 0, "(1(?:[12]\\d|79)\\d\\d)|0", 0, 0, 0, 0, "00"], "CO": ["57", "00(?:4(?:[14]4|56)|[579])", "(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}", [8, 10, 11], [["(\\d{4})(\\d{4})", "$1 $2", ["46"]], ["(\\d{3})(\\d{7})", "$1 $2", ["6|90"], "($1)"], ["(\\d{3})(\\d{7})", "$1 $2", ["3[0-357]|91"]], ["(\\d)(\\d{3})(\\d{7})", "$1-$2-$3", ["1"], "0$1", 0, "$1 $2 $3"]], "0", 0, "0([3579]|4(?:[14]4|56))?"], "CR": ["506", "00", "(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}", [8, 10], [["(\\d{4})(\\d{4})", "$1 $2", ["[2-7]|8[3-9]"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1-$2-$3", ["[89]"]]], 0, 0, "(19(?:0[0-2468]|1[09]|20|66|77|99))"], "CU": ["53", "119", "(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}", [6, 7, 8, 10], [["(\\d{2})(\\d{4,6})", "$1 $2", ["2[1-4]|[34]"], "(0$1)"], ["(\\d)(\\d{6,7})", "$1 $2", ["7"], "(0$1)"], ["(\\d)(\\d{7})", "$1 $2", ["[56]"], "0$1"], ["(\\d{3})(\\d{7})", "$1 $2", ["8"], "0$1"]], "0"], "CV": ["238", "0", "(?:[2-59]\\d\\d|800)\\d{4}", [7], [["(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3", ["[2-589]"]]]], "CW": ["599", "00", "(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}", [7, 8], [["(\\d{3})(\\d{4})", "$1 $2", ["[3467]"]], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["9[4-8]"]]], 0, 0, 0, 0, 0, "[69]"], "CX": ["61", "001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011", "1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}", [6, 7, 8, 9, 10, 12], 0, "0", 0, "([59]\\d{7})$|0", "8$1", 0, 0, [["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}", [9]], ["4(?:79[01]|83[0-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}", [9]], ["180(?:0\\d{3}|2)\\d{3}", [7, 10]], ["190[0-26]\\d{6}", [10]], 0, 0, 0, 0, ["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}", [9]], ["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}", [6, 8, 10, 12]]], "0011"], "CY": ["357", "00", "(?:[279]\\d|[58]0)\\d{6}", [8], [["(\\d{2})(\\d{6})", "$1 $2", ["[257-9]"]]]], "CZ": ["420", "00", "(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}", [9, 10, 11, 12], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-8]|9[015-7]"]], ["(\\d{2})(\\d{3})(\\d{3})(\\d{2})", "$1 $2 $3 $4", ["96"]], ["(\\d{2})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["9"]], ["(\\d{3})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["9"]]]], "DE": ["49", "00", "[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}", [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], [["(\\d{2})(\\d{3,13})", "$1 $2", ["3[02]|40|[68]9"], "0$1"], ["(\\d{3})(\\d{3,12})", "$1 $2", ["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1", "2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"], "0$1"], ["(\\d{4})(\\d{2,11})", "$1 $2", ["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]", "[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"], "0$1"], ["(\\d{3})(\\d{4})", "$1 $2", ["138"], "0$1"], ["(\\d{5})(\\d{2,10})", "$1 $2", ["3"], "0$1"], ["(\\d{3})(\\d{5,11})", "$1 $2", ["181"], "0$1"], ["(\\d{3})(\\d)(\\d{4,10})", "$1 $2 $3", ["1(?:3|80)|9"], "0$1"], ["(\\d{3})(\\d{7,8})", "$1 $2", ["1[67]"], "0$1"], ["(\\d{3})(\\d{7,12})", "$1 $2", ["8"], "0$1"], ["(\\d{5})(\\d{6})", "$1 $2", ["185", "1850", "18500"], "0$1"], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["7"], "0$1"], ["(\\d{4})(\\d{7})", "$1 $2", ["18[68]"], "0$1"], ["(\\d{4})(\\d{7})", "$1 $2", ["15[1279]"], "0$1"], ["(\\d{5})(\\d{6})", "$1 $2", ["15[03568]", "15(?:[0568]|31)"], "0$1"], ["(\\d{3})(\\d{8})", "$1 $2", ["18"], "0$1"], ["(\\d{3})(\\d{2})(\\d{7,8})", "$1 $2 $3", ["1(?:6[023]|7)"], "0$1"], ["(\\d{4})(\\d{2})(\\d{7})", "$1 $2 $3", ["15[279]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{8})", "$1 $2 $3", ["15"], "0$1"]], "0"], "DJ": ["253", "00", "(?:2\\d|77)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[27]"]]]], "DK": ["45", "00", "[2-9]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-9]"]]]], "DM": ["1", "011", "(?:[58]\\d\\d|767|900)\\d{7}", [10], 0, "1", 0, "([2-7]\\d{6})$|1", "767$1", 0, "767"], "DO": ["1", "011", "(?:[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, 0, 0, 0, "8001|8[024]9"], "DZ": ["213", "00", "(?:[1-4]|[5-79]\\d|80)\\d{7}", [8, 9], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[1-4]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["9"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-8]"], "0$1"]], "0"], "EC": ["593", "00", "1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}", [8, 9, 10, 11], [["(\\d)(\\d{3})(\\d{4})", "$1 $2-$3", ["[2-7]"], "(0$1)", 0, "$1-$2-$3"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["9"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["1"]]], "0"], "EE": ["372", "00", "8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}", [7, 8, 10], [["(\\d{3})(\\d{4})", "$1 $2", ["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88", "[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]], ["(\\d{4})(\\d{3,4})", "$1 $2", ["[45]|8(?:00|[1-49])", "[45]|8(?:00[1-9]|[1-49])"]], ["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["7"]], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"]]]], "EG": ["20", "00", "[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}", [8, 9, 10], [["(\\d)(\\d{7,8})", "$1 $2", ["[23]"], "0$1"], ["(\\d{2})(\\d{6,7})", "$1 $2", ["1[35]|[4-6]|8[2468]|9[235-7]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[89]"], "0$1"], ["(\\d{2})(\\d{8})", "$1 $2", ["1"], "0$1"]], "0"], "EH": ["212", "00", "[5-8]\\d{8}", [9], 0, "0", 0, 0, 0, 0, "528[89]"], "ER": ["291", "00", "[178]\\d{6}", [7], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[178]"], "0$1"]], "0"], "ES": ["34", "00", "[5-9]\\d{8}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[89]00"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-9]"]]]], "ET": ["251", "00", "(?:11|[2-579]\\d)\\d{7}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1-579]"], "0$1"]], "0"], "FI": ["358", "00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))", "[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}", [5, 6, 7, 8, 9, 10, 11, 12], [["(\\d{5})", "$1", ["20[2-59]"], "0$1"], ["(\\d{3})(\\d{3,7})", "$1 $2", ["(?:[1-3]0|[68])0|70[07-9]"], "0$1"], ["(\\d{2})(\\d{4,8})", "$1 $2", ["[14]|2[09]|50|7[135]"], "0$1"], ["(\\d{2})(\\d{6,10})", "$1 $2", ["7"], "0$1"], ["(\\d)(\\d{4,9})", "$1 $2", ["(?:1[49]|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"], "0$1"]], "0", 0, 0, 0, 0, "1[03-79]|[2-9]", 0, "00"], "FJ": ["679", "0(?:0|52)", "45\\d{5}|(?:0800\\d|[235-9])\\d{6}", [7, 11], [["(\\d{3})(\\d{4})", "$1 $2", ["[235-9]|45"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["0"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "FK": ["500", "00", "[2-7]\\d{4}", [5]], "FM": ["691", "00", "(?:[39]\\d\\d|820)\\d{4}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[389]"]]]], "FO": ["298", "00", "[2-9]\\d{5}", [6], [["(\\d{6})", "$1", ["[2-9]"]]], 0, 0, "(10(?:01|[12]0|88))"], "FR": ["33", "00", "[1-9]\\d{8}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0 $1"], ["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["[1-79]"], "0$1"]], "0"], "GA": ["241", "00", "(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}", [7, 8], [["(\\d)(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-7]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["0"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["11|[67]"], "0$1"]], 0, 0, "0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})", "$1"], "GB": ["44", "00", "[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}", [7, 9, 10], [["(\\d{3})(\\d{4})", "$1 $2", ["800", "8001", "80011", "800111", "8001111"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3", ["845", "8454", "84546", "845464"], "0$1"], ["(\\d{3})(\\d{6})", "$1 $2", ["800"], "0$1"], ["(\\d{5})(\\d{4,5})", "$1 $2", ["1(?:38|5[23]|69|76|94)", "1(?:(?:38|69)7|5(?:24|39)|768|946)", "1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"], "0$1"], ["(\\d{4})(\\d{5,6})", "$1 $2", ["1(?:[2-69][02-9]|[78])"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["[25]|7(?:0|6[02-9])", "[25]|7(?:0|6(?:[03-9]|2[356]))"], "0$1"], ["(\\d{4})(\\d{6})", "$1 $2", ["7"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1389]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-35])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|50))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}", [9, 10]], ["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}", [10]], ["80[08]\\d{7}|800\\d{6}|8001111"], ["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d", [7, 10]], ["70\\d{8}", [10]], 0, ["(?:3[0347]|55)\\d{8}", [10]], ["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}", [10]], ["56\\d{8}", [10]]], 0, " x"], "GD": ["1", "011", "(?:473|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "473$1", 0, "473"], "GE": ["995", "00", "(?:[3-57]\\d\\d|800)\\d{6}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["70"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["32"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[57]"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[348]"], "0$1"]], "0"], "GF": ["594", "00", "[56]94\\d{6}|(?:80|9\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[56]|9[47]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[89]"], "0$1"]], "0"], "GG": ["44", "00", "(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?", [7, 9, 10], 0, "0", 0, "([25-9]\\d{5})$|0", "1481$1", 0, 0, [["1481[25-9]\\d{5}", [10]], ["7(?:(?:781|839)\\d|911[17])\\d{5}", [10]], ["80[08]\\d{7}|800\\d{6}|8001111"], ["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d", [7, 10]], ["70\\d{8}", [10]], 0, ["(?:3[0347]|55)\\d{8}", [10]], ["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}", [10]], ["56\\d{8}", [10]]]], "GH": ["233", "00", "(?:[235]\\d{3}|800)\\d{5}", [8, 9], [["(\\d{3})(\\d{5})", "$1 $2", ["8"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[235]"], "0$1"]], "0"], "GI": ["350", "00", "(?:[25]\\d|60)\\d{6}", [8], [["(\\d{3})(\\d{5})", "$1 $2", ["2"]]]], "GL": ["299", "00", "(?:19|[2-689]\\d|70)\\d{4}", [6], [["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["19|[2-9]"]]]], "GM": ["220", "00", "[2-9]\\d{6}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-9]"]]]], "GN": ["224", "00", "722\\d{6}|(?:3|6\\d)\\d{7}", [8, 9], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["3"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[67]"]]]], "GP": ["590", "00", "590\\d{6}|(?:69|80|9\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[569]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"], ["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"], ["80[0-5]\\d{6}"], 0, 0, 0, 0, 0, ["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]], "GQ": ["240", "00", "222\\d{6}|(?:3\\d|55|[89]0)\\d{7}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[235]"]], ["(\\d{3})(\\d{6})", "$1 $2", ["[89]"]]]], "GR": ["30", "00", "5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}", [10, 11, 12], [["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["21|7"]], ["(\\d{4})(\\d{6})", "$1 $2", ["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2689]"]], ["(\\d{3})(\\d{3,4})(\\d{5})", "$1 $2 $3", ["8"]]]], "GT": ["502", "00", "80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}", [8, 11], [["(\\d{4})(\\d{4})", "$1 $2", ["[2-8]"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]]]], "GU": ["1", "011", "(?:[58]\\d\\d|671|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "671$1", 0, "671"], "GW": ["245", "00", "[49]\\d{8}|4\\d{6}", [7, 9], [["(\\d{3})(\\d{4})", "$1 $2", ["40"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[49]"]]]], "GY": ["592", "001", "(?:[2-8]\\d{3}|9008)\\d{3}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-9]"]]]], "HK": ["852", "00(?:30|5[09]|[126-9]?)", "8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}", [5, 6, 7, 8, 9, 11], [["(\\d{3})(\\d{2,5})", "$1 $2", ["900", "9003"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"]], ["(\\d{3})(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["9"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "HN": ["504", "00", "8\\d{10}|[237-9]\\d{7}", [8, 11], [["(\\d{4})(\\d{4})", "$1-$2", ["[237-9]"]]]], "HR": ["385", "00", "(?:[24-69]\\d|3[0-79])\\d{7}|80\\d{5,7}|[1-79]\\d{7}|6\\d{5,6}", [6, 7, 8, 9], [["(\\d{2})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["6[01]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["8"], "0$1"], ["(\\d)(\\d{4})(\\d{3})", "$1 $2 $3", ["1"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["6|7[245]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["9"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2-57]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"], "0$1"]], "0"], "HT": ["509", "00", "(?:[2-489]\\d|55)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["[2-589]"]]]], "HU": ["36", "00", "[235-7]\\d{8}|[1-9]\\d{7}", [8, 9], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "(06 $1)"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"], "(06 $1)"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2-9]"], "06 $1"]], "06"], "ID": ["62", "00[89]", "00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}", [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["15"]], ["(\\d{2})(\\d{5,9})", "$1 $2", ["2[124]|[36]1"], "(0$1)"], ["(\\d{3})(\\d{5,7})", "$1 $2", ["800"], "0$1"], ["(\\d{3})(\\d{5,8})", "$1 $2", ["[2-79]"], "(0$1)"], ["(\\d{3})(\\d{3,4})(\\d{3})", "$1-$2-$3", ["8[1-35-9]"], "0$1"], ["(\\d{3})(\\d{6,8})", "$1 $2", ["1"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["804"], "0$1"], ["(\\d{3})(\\d)(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["80"], "0$1"], ["(\\d{3})(\\d{4})(\\d{4,5})", "$1-$2-$3", ["8"], "0$1"]], "0"], "IE": ["353", "00", "(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}", [7, 8, 9, 10], [["(\\d{2})(\\d{5})", "$1 $2", ["2[24-9]|47|58|6[237-9]|9[35-9]"], "(0$1)"], ["(\\d{3})(\\d{5})", "$1 $2", ["[45]0"], "(0$1)"], ["(\\d)(\\d{3,4})(\\d{4})", "$1 $2 $3", ["1"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2569]|4[1-69]|7[14]"], "(0$1)"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["70"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["81"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[78]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1"]], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["4"], "(0$1)"], ["(\\d{2})(\\d)(\\d{3})(\\d{4})", "$1 $2 $3 $4", ["8"], "0$1"]], "0"], "IL": ["972", "0(?:0|1[2-9])", "1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}", [7, 8, 9, 10, 11, 12], [["(\\d{4})(\\d{3})", "$1-$2", ["125"]], ["(\\d{4})(\\d{2})(\\d{2})", "$1-$2-$3", ["121"]], ["(\\d)(\\d{3})(\\d{4})", "$1-$2-$3", ["[2-489]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1-$2-$3", ["[57]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1-$2-$3", ["12"]], ["(\\d{4})(\\d{6})", "$1-$2", ["159"]], ["(\\d)(\\d{3})(\\d{3})(\\d{3})", "$1-$2-$3-$4", ["1[7-9]"]], ["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})", "$1-$2 $3-$4", ["15"]]], "0"], "IM": ["44", "00", "1624\\d{6}|(?:[3578]\\d|90)\\d{8}", [10], 0, "0", 0, "([25-8]\\d{5})$|0", "1624$1", 0, "74576|(?:16|7[56])24"], "IN": ["91", "00", "(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}", [8, 9, 10, 11, 12, 13], [["(\\d{8})", "$1", ["5(?:0|2[23]|3[03]|[67]1|88)", "5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)", "5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"], 0, 1], ["(\\d{4})(\\d{4,5})", "$1 $2", ["180", "1800"], 0, 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["140"], 0, 1], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["11|2[02]|33|4[04]|79[1-7]|80[2-46]", "11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])", "11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]", "1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]", "1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"], "0$1", 1], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807", "1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]", "1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"], "0$1", 1], ["(\\d{5})(\\d{5})", "$1 $2", ["[6-9]"], "0$1", 1], ["(\\d{4})(\\d{2,4})(\\d{4})", "$1 $2 $3", ["1(?:6|8[06])", "1(?:6|8[06]0)"], 0, 1], ["(\\d{4})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["18"], 0, 1]], "0"], "IO": ["246", "00", "3\\d{6}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["3"]]]], "IQ": ["964", "00", "(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}", [8, 9, 10], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2-6]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["7"], "0$1"]], "0"], "IR": ["98", "00", "[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}", [4, 5, 6, 7, 10], [["(\\d{4,5})", "$1", ["96"], "0$1"], ["(\\d{2})(\\d{4,5})", "$1 $2", ["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["9"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["[1-8]"], "0$1"]], "0"], "IS": ["354", "00|1(?:0(?:01|[12]0)|100)", "(?:38\\d|[4-9])\\d{6}", [7, 9], [["(\\d{3})(\\d{4})", "$1 $2", ["[4-9]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["3"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "IT": ["39", "00", "0\\d{5,10}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?", [6, 7, 8, 9, 10, 11, 12], [["(\\d{2})(\\d{4,6})", "$1 $2", ["0[26]"]], ["(\\d{3})(\\d{3,6})", "$1 $2", ["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])", "0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]], ["(\\d{4})(\\d{2,6})", "$1 $2", ["0(?:[13-579][2-46-8]|8[236-8])"]], ["(\\d{4})(\\d{4})", "$1 $2", ["894"]], ["(\\d{2})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["0[26]|5"]], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["1(?:44|[679])|[378]|43"]], ["(\\d{3})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["0[13-57-9][0159]|14"]], ["(\\d{2})(\\d{4})(\\d{5})", "$1 $2 $3", ["0[26]"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["0"]], ["(\\d{3})(\\d{4})(\\d{4,5})", "$1 $2 $3", ["3"]]], 0, 0, 0, 0, 0, 0, [["0669[0-79]\\d{1,6}|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}", [6, 7, 8, 9, 10, 11]], ["3[2-9]\\d{7,8}|(?:31|43)\\d{8}", [9, 10]], ["80(?:0\\d{3}|3)\\d{3}", [6, 9]], ["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}", [6, 8, 9, 10]], ["1(?:78\\d|99)\\d{6}", [9, 10]], ["3[2-8]\\d{9,10}", [11, 12]], 0, 0, ["55\\d{8}", [10]], ["84(?:[08]\\d{3}|[17])\\d{3}", [6, 9]]]], "JE": ["44", "00", "1534\\d{6}|(?:[3578]\\d|90)\\d{8}", [10], 0, "0", 0, "([0-24-8]\\d{5})$|0", "1534$1", 0, 0, [["1534[0-24-8]\\d{5}"], ["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"], ["80(?:07(?:35|81)|8901)\\d{4}"], ["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"], ["701511\\d{4}"], 0, ["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"], ["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"], ["56\\d{8}"]]], "JM": ["1", "011", "(?:[58]\\d\\d|658|900)\\d{7}", [10], 0, "1", 0, 0, 0, 0, "658|876"], "JO": ["962", "00", "(?:(?:[2689]|7\\d)\\d|32|53)\\d{6}", [8, 9], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["[2356]|87"], "(0$1)"], ["(\\d{3})(\\d{5,6})", "$1 $2", ["[89]"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["70"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["7"], "0$1"]], "0"], "JP": ["81", "010", "00[1-9]\\d{6,14}|[257-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}", [8, 9, 10, 11, 12, 13, 14, 15, 16, 17], [["(\\d{3})(\\d{3})(\\d{3})", "$1-$2-$3", ["(?:12|57|99)0"], "0$1"], ["(\\d{4})(\\d)(\\d{4})", "$1-$2-$3", ["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])", "1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]", "1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1-$2-$3", ["60"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1-$2-$3", ["[36]|4(?:2[09]|7[01])", "[36]|4(?:2(?:0|9[02-69])|7(?:0[019]|1))"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1-$2-$3", ["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])", "1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]", "1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{4})", "$1-$2-$3", ["[14]|[289][2-9]|5[3-9]|7[2-4679]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1-$2-$3", ["800"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1-$2-$3", ["[257-9]"], "0$1"]], "0", 0, "(000[259]\\d{6})$|(?:(?:003768)0?)|0", "$1"], "KE": ["254", "000", "(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}", [7, 8, 9, 10], [["(\\d{2})(\\d{5,7})", "$1 $2", ["[24-6]"], "0$1"], ["(\\d{3})(\\d{6})", "$1 $2", ["[17]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[89]"], "0$1"]], "0"], "KG": ["996", "00", "8\\d{9}|[235-9]\\d{8}", [9, 10], [["(\\d{4})(\\d{5})", "$1 $2", ["3(?:1[346]|[24-79])"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[235-79]|88"], "0$1"], ["(\\d{3})(\\d{3})(\\d)(\\d{2,3})", "$1 $2 $3 $4", ["8"], "0$1"]], "0"], "KH": ["855", "00[14-9]", "1\\d{9}|[1-9]\\d{7,8}", [8, 9, 10], [["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[1-9]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1"]]], "0"], "KI": ["686", "00", "(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}", [5, 8], 0, "0"], "KM": ["269", "00", "[3478]\\d{6}", [7], [["(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3", ["[3478]"]]]], "KN": ["1", "011", "(?:[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-7]\\d{6})$|1", "869$1", 0, "869"], "KP": ["850", "00|99", "85\\d{6}|(?:19\\d|[2-7])\\d{7}", [8, 10], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"], "0$1"], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-7]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "0$1"]], "0"], "KR": ["82", "00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))", "00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}", [5, 6, 8, 9, 10, 11, 12, 13, 14], [["(\\d{2})(\\d{3,4})", "$1-$2", ["(?:3[1-3]|[46][1-4]|5[1-5])1"], "0$1"], ["(\\d{4})(\\d{4})", "$1-$2", ["1"]], ["(\\d)(\\d{3,4})(\\d{4})", "$1-$2-$3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1-$2-$3", ["[36]0|8"], "0$1"], ["(\\d{2})(\\d{3,4})(\\d{4})", "$1-$2-$3", ["[1346]|5[1-5]"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1-$2-$3", ["[57]"], "0$1"], ["(\\d{2})(\\d{5})(\\d{4})", "$1-$2-$3", ["5"], "0$1"]], "0", 0, "0(8(?:[1-46-8]|5\\d\\d))?"], "KW": ["965", "00", "18\\d{5}|(?:[2569]\\d|41)\\d{6}", [7, 8], [["(\\d{4})(\\d{3,4})", "$1 $2", ["[169]|2(?:[235]|4[1-35-9])|52"]], ["(\\d{3})(\\d{5})", "$1 $2", ["[245]"]]]], "KY": ["1", "011", "(?:345|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "345$1", 0, "345"], "KZ": ["7", "810", "(?:33622|8\\d{8})\\d{5}|[78]\\d{9}", [10, 14], 0, "8", 0, 0, 0, 0, "33|7", 0, "8~10"], "LA": ["856", "00", "[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}", [8, 9, 10], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["2[13]|3[14]|[4-8]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["30[0135-9]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["[23]"], "0$1"]], "0"], "LB": ["961", "00", "[27-9]\\d{7}|[13-9]\\d{6}", [7, 8], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[13-69]|7(?:[2-57]|62|8[0-7]|9[04-9])|8[02-9]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[27-9]"]]], "0"], "LC": ["1", "011", "(?:[58]\\d\\d|758|900)\\d{7}", [10], 0, "1", 0, "([2-8]\\d{6})$|1", "758$1", 0, "758"], "LI": ["423", "00", "[68]\\d{8}|(?:[2378]\\d|90)\\d{5}", [7, 9], [["(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3", ["[2379]|8(?:0[09]|7)", "[2379]|8(?:0(?:02|9)|7)"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["69"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["6"]]], "0", 0, "(1001)|0"], "LK": ["94", "00", "[1-9]\\d{8}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["7"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[1-689]"], "0$1"]], "0"], "LR": ["231", "00", "(?:[245]\\d|33|77|88)\\d{7}|(?:2\\d|[4-6])\\d{6}", [7, 8, 9], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["4[67]|[56]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-578]"], "0$1"]], "0"], "LS": ["266", "00", "(?:[256]\\d\\d|800)\\d{5}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[2568]"]]]], "LT": ["370", "00", "(?:[3469]\\d|52|[78]0)\\d{6}", [8], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["52[0-7]"], "(0-$1)", 1], ["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["[7-9]"], "0 $1", 1], ["(\\d{2})(\\d{6})", "$1 $2", ["37|4(?:[15]|6[1-8])"], "(0-$1)", 1], ["(\\d{3})(\\d{5})", "$1 $2", ["[3-6]"], "(0-$1)", 1]], "0", 0, "[08]"], "LU": ["352", "00", "35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}", [4, 5, 6, 7, 8, 9, 10, 11], [["(\\d{2})(\\d{3})", "$1 $2", ["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]], ["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]], ["(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["20[2-689]"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})", "$1 $2 $3 $4", ["2(?:[0367]|4[3-8])"]], ["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["80[01]|90[015]"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["20"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["6"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})", "$1 $2 $3 $4 $5", ["2(?:[0367]|4[3-8])"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})", "$1 $2 $3 $4", ["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]]], 0, 0, "(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"], "LV": ["371", "00", "(?:[268]\\d|90)\\d{6}", [8], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[269]|8[01]"]]]], "LY": ["218", "00", "[2-9]\\d{8}", [9], [["(\\d{2})(\\d{7})", "$1-$2", ["[2-9]"], "0$1"]], "0"], "MA": ["212", "00", "[5-8]\\d{8}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["5[45]"], "0$1"], ["(\\d{4})(\\d{5})", "$1-$2", ["5(?:2[2-46-9]|3[3-9]|9)|8(?:0[89]|92)"], "0$1"], ["(\\d{2})(\\d{7})", "$1-$2", ["8"], "0$1"], ["(\\d{3})(\\d{6})", "$1-$2", ["[5-7]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["5(?:2(?:[0-25-79]\\d|3[1-578]|4[02-46-8]|8[0235-7])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[014-9]|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}"], ["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-4]|5[01]|8[0-3]))\\d{6}"], ["80[0-7]\\d{6}"], ["89\\d{7}"], 0, 0, 0, 0, ["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]], "MC": ["377", "00", "(?:[3489]|6\\d)\\d{7}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["4"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[389]"]], ["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["6"], "0$1"]], "0"], "MD": ["373", "00", "(?:[235-7]\\d|[89]0)\\d{6}", [8], [["(\\d{3})(\\d{5})", "$1 $2", ["[89]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["22|3"], "0$1"], ["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["[25-7]"], "0$1"]], "0"], "ME": ["382", "00", "(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2-9]"], "0$1"]], "0"], "MF": ["590", "00", "590\\d{6}|(?:69|80|9\\d)\\d{7}", [9], 0, "0", 0, 0, 0, 0, 0, [["590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}"], ["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"], ["80[0-5]\\d{6}"], 0, 0, 0, 0, 0, ["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]], "MG": ["261", "00", "[23]\\d{8}", [9], [["(\\d{2})(\\d{2})(\\d{3})(\\d{2})", "$1 $2 $3 $4", ["[23]"], "0$1"]], "0", 0, "([24-9]\\d{6})$|0", "20$1"], "MH": ["692", "011", "329\\d{4}|(?:[256]\\d|45)\\d{5}", [7], [["(\\d{3})(\\d{4})", "$1-$2", ["[2-6]"]]], "1"], "MK": ["389", "00", "[2-578]\\d{7}", [8], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["2|34[47]|4(?:[37]7|5[47]|64)"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[347]"], "0$1"], ["(\\d{3})(\\d)(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[58]"], "0$1"]], "0"], "ML": ["223", "00", "[24-9]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[24-9]"]]]], "MM": ["95", "00", "1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}", [6, 7, 8, 9, 10], [["(\\d)(\\d{2})(\\d{3})", "$1 $2 $3", ["16|2"], "0$1"], ["(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"], "0$1"], ["(\\d)(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[12]|452|678|86", "[12]|452|6788|86"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[4-7]|8[1-35]"], "0$1"], ["(\\d)(\\d{3})(\\d{4,6})", "$1 $2 $3", ["9(?:2[0-4]|[35-9]|4[137-9])"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"], "0$1"], ["(\\d)(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["92"], "0$1"], ["(\\d)(\\d{5})(\\d{4})", "$1 $2 $3", ["9"], "0$1"]], "0"], "MN": ["976", "001", "[12]\\d{7,9}|[5-9]\\d{7}", [8, 9, 10], [["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["[12]1"], "0$1"], ["(\\d{4})(\\d{4})", "$1 $2", ["[5-9]"]], ["(\\d{3})(\\d{5,6})", "$1 $2", ["[12]2[1-3]"], "0$1"], ["(\\d{4})(\\d{5,6})", "$1 $2", ["[12](?:27|3[2-8]|4[2-68]|5[1-4689])", "[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"], "0$1"], ["(\\d{5})(\\d{4,5})", "$1 $2", ["[12]"], "0$1"]], "0"], "MO": ["853", "00", "0800\\d{3}|(?:28|[68]\\d)\\d{6}", [7, 8], [["(\\d{4})(\\d{3})", "$1 $2", ["0"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[268]"]]]], "MP": ["1", "011", "[58]\\d{9}|(?:67|90)0\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "670$1", 0, "670"], "MQ": ["596", "00", "596\\d{6}|(?:69|[89]\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[569]|8(?:0[6-9]|[36])"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0$1"]], "0"], "MR": ["222", "00", "(?:[2-4]\\d\\d|800)\\d{5}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-48]"]]]], "MS": ["1", "011", "(?:[58]\\d\\d|664|900)\\d{7}", [10], 0, "1", 0, "([34]\\d{6})$|1", "664$1", 0, "664"], "MT": ["356", "00", "3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[2357-9]"]]]], "MU": ["230", "0(?:0|[24-7]0|3[03])", "(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}", [7, 8, 10], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-46]|8[013]"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[57]"]], ["(\\d{5})(\\d{5})", "$1 $2", ["8"]]], 0, 0, 0, 0, 0, 0, 0, "020"], "MV": ["960", "0(?:0|19)", "(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}", [7, 10], [["(\\d{3})(\\d{4})", "$1-$2", ["[34679]"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[89]"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "MW": ["265", "00", "(?:[1289]\\d|31|77)\\d{7}|1\\d{6}", [7, 9], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["1[2-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[137-9]"], "0$1"]], "0"], "MX": ["52", "0[09]", "[2-9]\\d{9}", [10], [["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["33|5[56]|81"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-9]"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "MY": ["60", "00", "1\\d{8,9}|(?:3\\d|[4-9])\\d{7}", [8, 9, 10], [["(\\d)(\\d{3})(\\d{4})", "$1-$2 $3", ["[4-79]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1-$2 $3", ["1(?:[02469]|[378][1-9]|53)|8", "1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1-$2 $3", ["3"], "0$1"], ["(\\d)(\\d{3})(\\d{2})(\\d{4})", "$1-$2-$3-$4", ["1(?:[367]|80)"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1-$2 $3", ["15"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1-$2 $3", ["1"], "0$1"]], "0"], "MZ": ["258", "00", "(?:2|8\\d)\\d{7}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2|8[2-79]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"]]]], "NA": ["264", "00", "[68]\\d{7,8}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["88"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["6"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["87"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"], "0$1"]], "0"], "NC": ["687", "00", "(?:050|[2-57-9]\\d\\d)\\d{3}", [6], [["(\\d{2})(\\d{2})(\\d{2})", "$1.$2.$3", ["[02-57-9]"]]]], "NE": ["227", "00", "[027-9]\\d{7}", [8], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["08"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[089]|2[013]|7[0467]"]]]], "NF": ["672", "00", "[13]\\d{5}", [6], [["(\\d{2})(\\d{4})", "$1 $2", ["1[0-3]"]], ["(\\d)(\\d{5})", "$1 $2", ["[13]"]]], 0, 0, "([0-258]\\d{4})$", "3$1"], "NG": ["234", "009", "38\\d{6}|[78]\\d{9,13}|(?:20|9\\d)\\d{8}", [8, 10, 11, 12, 13, 14], [["(\\d{2})(\\d{3})(\\d{2,3})", "$1 $2 $3", ["3"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[7-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["20[129]"], "0$1"], ["(\\d{4})(\\d{2})(\\d{4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{3})(\\d{4})(\\d{4,5})", "$1 $2 $3", ["[78]"], "0$1"], ["(\\d{3})(\\d{5})(\\d{5,6})", "$1 $2 $3", ["[78]"], "0$1"]], "0"], "NI": ["505", "00", "(?:1800|[25-8]\\d{3})\\d{4}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[125-8]"]]]], "NL": ["31", "00", "(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}", [5, 6, 7, 8, 9, 10, 11], [["(\\d{3})(\\d{4,7})", "$1 $2", ["[89]0"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["66"], "0$1"], ["(\\d)(\\d{8})", "$1 $2", ["6"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1-578]|91"], "0$1"], ["(\\d{3})(\\d{3})(\\d{5})", "$1 $2 $3", ["9"], "0$1"]], "0"], "NO": ["47", "00", "(?:0|[2-9]\\d{3})\\d{4}", [5, 8], [["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["8"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-79]"]]], 0, 0, 0, 0, 0, "[02-689]|7[0-8]"], "NP": ["977", "00", "(?:1\\d|9)\\d{9}|[1-9]\\d{7}", [8, 10, 11], [["(\\d)(\\d{7})", "$1-$2", ["1[2-6]"], "0$1"], ["(\\d{2})(\\d{6})", "$1-$2", ["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"], "0$1"], ["(\\d{3})(\\d{7})", "$1-$2", ["9"]]], "0"], "NR": ["674", "00", "(?:444|(?:55|8\\d)\\d|666)\\d{4}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[4-68]"]]]], "NU": ["683", "00", "(?:[4-7]|888\\d)\\d{3}", [4, 7], [["(\\d{3})(\\d{4})", "$1 $2", ["8"]]]], "NZ": ["64", "0(?:0|161)", "[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}", [5, 6, 7, 8, 9, 10], [["(\\d{2})(\\d{3,8})", "$1 $2", ["8[1-79]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["50[036-8]|8|90", "50(?:[0367]|88)|8|90"], "0$1"], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["24|[346]|7[2-57-9]|9[2-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2(?:10|74)|[589]"], "0$1"], ["(\\d{2})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["1|2[028]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,5})", "$1 $2 $3", ["2(?:[169]|7[0-35-9])|7"], "0$1"]], "0", 0, 0, 0, 0, 0, 0, "00"], "OM": ["968", "00", "(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}", [7, 8, 9], [["(\\d{3})(\\d{4,6})", "$1 $2", ["[58]"]], ["(\\d{2})(\\d{6})", "$1 $2", ["2"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[179]"]]]], "PA": ["507", "00", "(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}", [7, 8, 10, 11], [["(\\d{3})(\\d{4})", "$1-$2", ["[1-57-9]"]], ["(\\d{4})(\\d{4})", "$1-$2", ["[68]"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"]]]], "PE": ["51", "00|19(?:1[124]|77|90)00", "(?:[14-8]|9\\d)\\d{7}", [8, 9], [["(\\d{3})(\\d{5})", "$1 $2", ["80"], "(0$1)"], ["(\\d)(\\d{7})", "$1 $2", ["1"], "(0$1)"], ["(\\d{2})(\\d{6})", "$1 $2", ["[4-8]"], "(0$1)"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["9"]]], "0", 0, 0, 0, 0, 0, 0, "00", " Anexo "], "PF": ["689", "00", "4\\d{5}(?:\\d{2})?|8\\d{7,8}", [6, 8, 9], [["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["44"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["4|8[7-9]"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"]]]], "PG": ["675", "00|140[1-3]", "(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}", [7, 8], [["(\\d{3})(\\d{4})", "$1 $2", ["18|[2-69]|85"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[78]"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "PH": ["63", "00", "(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}", [6, 8, 9, 10, 11, 12, 13], [["(\\d)(\\d{5})", "$1 $2", ["2"], "(0$1)"], ["(\\d{4})(\\d{4,6})", "$1 $2", ["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2", "3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"], "(0$1)"], ["(\\d{5})(\\d{4})", "$1 $2", ["346|4(?:27|9[35])|883", "3469|4(?:279|9(?:30|56))|8834"], "(0$1)"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["2"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[3-7]|8[2-8]"], "(0$1)"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[89]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]], ["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})", "$1 $2 $3 $4", ["1"]]], "0"], "PK": ["92", "00", "122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}", [8, 9, 10, 11, 12], [["(\\d{3})(\\d{3})(\\d{2,7})", "$1 $2 $3", ["[89]0"], "0$1"], ["(\\d{4})(\\d{5})", "$1 $2", ["1"]], ["(\\d{3})(\\d{6,7})", "$1 $2", ["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])", "9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"], "(0$1)"], ["(\\d{2})(\\d{7,8})", "$1 $2", ["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"], "(0$1)"], ["(\\d{5})(\\d{5})", "$1 $2", ["58"], "(0$1)"], ["(\\d{3})(\\d{7})", "$1 $2", ["3"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"], "(0$1)"], ["(\\d{3})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["[24-9]"], "(0$1)"]], "0"], "PL": ["48", "00", "(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}", [6, 7, 8, 9, 10], [["(\\d{5})", "$1", ["19"]], ["(\\d{3})(\\d{3})", "$1 $2", ["11|20|64"]], ["(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1", "(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]], ["(\\d{3})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["64"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["1[2-8]|[2-7]|8[1-79]|9[145]"]], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["8"]]]], "PM": ["508", "00", "[45]\\d{5}|(?:708|8\\d\\d)\\d{6}", [6, 9], [["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["[45]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["7"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0$1"]], "0"], "PR": ["1", "011", "(?:[589]\\d\\d|787)\\d{7}", [10], 0, "1", 0, 0, 0, 0, "787|939"], "PS": ["970", "00", "[2489]2\\d{6}|(?:1\\d|5)\\d{8}", [8, 9, 10], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["[2489]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["5"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1"]]], "0"], "PT": ["351", "00", "1693\\d{5}|(?:[26-9]\\d|30)\\d{7}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["2[12]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["16|[236-9]"]]]], "PW": ["680", "01[12]", "(?:[24-8]\\d\\d|345|900)\\d{4}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-9]"]]]], "PY": ["595", "00", "59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}", [6, 7, 8, 9, 10, 11], [["(\\d{3})(\\d{3,6})", "$1 $2", ["[2-9]0"], "0$1"], ["(\\d{2})(\\d{5})", "$1 $2", ["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"], "(0$1)"], ["(\\d{3})(\\d{4,5})", "$1 $2", ["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["87"]], ["(\\d{3})(\\d{6})", "$1 $2", ["9(?:[5-79]|8[1-7])"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-8]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["9"]]], "0"], "QA": ["974", "00", "800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}", [7, 8, 9, 11], [["(\\d{3})(\\d{4})", "$1 $2", ["2[16]|8"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[3-7]"]]]], "RE": ["262", "00", "(?:26|[689]\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2689]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}"], ["69(?:2\\d\\d|3(?:[06][0-6]|1[013]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))\\d{4}"], ["80\\d{7}"], ["89[1-37-9]\\d{6}"], 0, 0, 0, 0, ["9(?:399[0-3]|479[0-5]|76(?:2[278]|3[0-37]))\\d{4}"], ["8(?:1[019]|2[0156]|84|90)\\d{6}"]]], "RO": ["40", "00", "(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}", [6, 9], [["(\\d{3})(\\d{3})", "$1 $2", ["2[3-6]", "2[3-6]\\d9"], "0$1"], ["(\\d{2})(\\d{4})", "$1 $2", ["219|31"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[23]1"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[236-9]"], "0$1"]], "0", 0, 0, 0, 0, 0, 0, 0, " int "], "RS": ["381", "00", "38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}", [6, 7, 8, 9, 10, 11, 12], [["(\\d{3})(\\d{3,9})", "$1 $2", ["(?:2[389]|39)0|[7-9]"], "0$1"], ["(\\d{2})(\\d{5,10})", "$1 $2", ["[1-36]"], "0$1"]], "0"], "RU": ["7", "810", "8\\d{13}|[347-9]\\d{9}", [10, 14], [["(\\d{4})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["7(?:1[0-8]|2[1-9])", "7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))", "7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"], "8 ($1)", 1], ["(\\d{5})(\\d)(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["7(?:1[0-68]|2[1-9])", "7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))", "7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"], "8 ($1)", 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["7"], "8 ($1)", 1], ["(\\d{3})(\\d{3})(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["[349]|8(?:[02-7]|1[1-8])"], "8 ($1)", 1], ["(\\d{4})(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["8"], "8 ($1)"]], "8", 0, 0, 0, 0, "3[04-689]|[489]", 0, "8~10"], "RW": ["250", "00", "(?:06|[27]\\d\\d|[89]00)\\d{6}", [8, 9], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["0"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["2"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[7-9]"], "0$1"]], "0"], "SA": ["966", "00", "92\\d{7}|(?:[15]|8\\d)\\d{8}", [9, 10], [["(\\d{4})(\\d{5})", "$1 $2", ["9"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["5"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["81"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"]]], "0"], "SB": ["677", "0[01]", "[6-9]\\d{6}|[1-6]\\d{4}", [5, 7], [["(\\d{2})(\\d{5})", "$1 $2", ["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]]], "SC": ["248", "010|0[0-2]", "(?:[2489]\\d|64)\\d{5}", [7], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[246]|9[57]"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "SD": ["249", "00", "[19]\\d{8}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[19]"], "0$1"]], "0"], "SE": ["46", "00", "(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}", [6, 7, 8, 9, 10, 12], [["(\\d{2})(\\d{2,3})(\\d{2})", "$1-$2 $3", ["20"], "0$1", 0, "$1 $2 $3"], ["(\\d{3})(\\d{4})", "$1-$2", ["9(?:00|39|44|9)"], "0$1", 0, "$1 $2"], ["(\\d{2})(\\d{3})(\\d{2})", "$1-$2 $3", ["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"], "0$1", 0, "$1 $2 $3"], ["(\\d)(\\d{2,3})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["8"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2,3})(\\d{2})", "$1-$2 $3", ["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"], "0$1", 0, "$1 $2 $3"], ["(\\d{3})(\\d{2,3})(\\d{3})", "$1-$2 $3", ["9(?:00|39|44)"], "0$1", 0, "$1 $2 $3"], ["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["10|7"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d)(\\d{3})(\\d{3})(\\d{2})", "$1-$2 $3 $4", ["8"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{3})", "$1-$2 $3 $4", ["9"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1-$2 $3 $4 $5", ["[26]"], "0$1", 0, "$1 $2 $3 $4 $5"]], "0"], "SG": ["65", "0[0-3]\\d", "(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}", [8, 10, 11], [["(\\d{4})(\\d{4})", "$1 $2", ["[369]|8(?:0[1-9]|[1-9])"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"]], ["(\\d{4})(\\d{4})(\\d{3})", "$1 $2 $3", ["7"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]]]], "SH": ["290", "00", "(?:[256]\\d|8)\\d{3}", [4, 5], 0, 0, 0, 0, 0, 0, "[256]"], "SI": ["386", "00|10(?:22|66|88|99)", "[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}", [5, 6, 7, 8], [["(\\d{2})(\\d{3,6})", "$1 $2", ["8[09]|9"], "0$1"], ["(\\d{3})(\\d{5})", "$1 $2", ["59|8"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[37][01]|4[0139]|51|6"], "0$1"], ["(\\d)(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[1-57]"], "(0$1)"]], "0", 0, 0, 0, 0, 0, 0, "00"], "SJ": ["47", "00", "0\\d{4}|(?:[489]\\d|79)\\d{6}", [5, 8], 0, 0, 0, 0, 0, 0, "79"], "SK": ["421", "00", "[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}", [6, 7, 9], [["(\\d)(\\d{2})(\\d{3,4})", "$1 $2 $3", ["21"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["[3-5][1-8]1", "[3-5][1-8]1[67]"], "0$1"], ["(\\d)(\\d{3})(\\d{3})(\\d{2})", "$1/$2 $3 $4", ["2"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[689]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1/$2 $3 $4", ["[3-5]"], "0$1"]], "0"], "SL": ["232", "00", "(?:[237-9]\\d|66)\\d{6}", [8], [["(\\d{2})(\\d{6})", "$1 $2", ["[236-9]"], "(0$1)"]], "0"], "SM": ["378", "00", "(?:0549|[5-7]\\d)\\d{6}", [8, 10], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-7]"]], ["(\\d{4})(\\d{6})", "$1 $2", ["0"]]], 0, 0, "([89]\\d{5})$", "0549$1"], "SN": ["221", "00", "(?:[378]\\d|93)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"]], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[379]"]]]], "SO": ["252", "00", "[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}", [6, 7, 8, 9], [["(\\d{2})(\\d{4})", "$1 $2", ["8[125]"]], ["(\\d{6})", "$1", ["[134]"]], ["(\\d)(\\d{6})", "$1 $2", ["[15]|2[0-79]|3[0-46-8]|4[0-7]"]], ["(\\d)(\\d{7})", "$1 $2", ["(?:2|90)4|[67]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[348]|64|79|90"]], ["(\\d{2})(\\d{5,7})", "$1 $2", ["1|28|6[0-35-9]|77|9[2-9]"]]], "0"], "SR": ["597", "00", "(?:[2-5]|68|[78]\\d)\\d{5}", [6, 7], [["(\\d{2})(\\d{2})(\\d{2})", "$1-$2-$3", ["56"]], ["(\\d{3})(\\d{3})", "$1-$2", ["[2-5]"]], ["(\\d{3})(\\d{4})", "$1-$2", ["[6-8]"]]]], "SS": ["211", "00", "[19]\\d{8}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[19]"], "0$1"]], "0"], "ST": ["239", "00", "(?:22|9\\d)\\d{5}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[29]"]]]], "SV": ["503", "00", "[267]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?", [7, 8, 11], [["(\\d{3})(\\d{4})", "$1 $2", ["[89]"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[267]"]], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["[89]"]]]], "SX": ["1", "011", "7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "(5\\d{6})$|1", "721$1", 0, "721"], "SY": ["963", "00", "[1-39]\\d{8}|[1-5]\\d{7}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[1-5]"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["9"], "0$1", 1]], "0"], "SZ": ["268", "00", "0800\\d{4}|(?:[237]\\d|900)\\d{6}", [8, 9], [["(\\d{4})(\\d{4})", "$1 $2", ["[0237]"]], ["(\\d{5})(\\d{4})", "$1 $2", ["9"]]]], "TA": ["290", "00", "8\\d{3}", [4], 0, 0, 0, 0, 0, 0, "8"], "TC": ["1", "011", "(?:[58]\\d\\d|649|900)\\d{7}", [10], 0, "1", 0, "([2-479]\\d{6})$|1", "649$1", 0, "649"], "TD": ["235", "00|16", "(?:22|[689]\\d|77)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[26-9]"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "TG": ["228", "00", "[279]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[279]"]]]], "TH": ["66", "00[1-9]", "(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}", [8, 9, 10, 13], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[13-9]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1"]]], "0"], "TJ": ["992", "810", "[0-57-9]\\d{8}", [9], [["(\\d{6})(\\d)(\\d{2})", "$1 $2 $3", ["331", "3317"]], ["(\\d{3})(\\d{2})(\\d{4})", "$1 $2 $3", ["44[02-479]|[34]7"]], ["(\\d{4})(\\d)(\\d{4})", "$1 $2 $3", ["3(?:[1245]|3[12])"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[0-57-9]"]]], 0, 0, 0, 0, 0, 0, 0, "8~10"], "TK": ["690", "00", "[2-47]\\d{3,6}", [4, 5, 6, 7]], "TL": ["670", "00", "7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}", [7, 8], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-489]|70"]], ["(\\d{4})(\\d{4})", "$1 $2", ["7"]]]], "TM": ["993", "810", "(?:[1-6]\\d|71)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["12"], "(8 $1)"], ["(\\d{3})(\\d)(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["[1-5]"], "(8 $1)"], ["(\\d{2})(\\d{6})", "$1 $2", ["[67]"], "8 $1"]], "8", 0, 0, 0, 0, 0, 0, "8~10"], "TN": ["216", "00", "[2-57-9]\\d{7}", [8], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-57-9]"]]]], "TO": ["676", "00", "(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}", [5, 7], [["(\\d{2})(\\d{3})", "$1-$2", ["[2-4]|50|6[09]|7[0-24-69]|8[05]"]], ["(\\d{4})(\\d{3})", "$1 $2", ["0"]], ["(\\d{3})(\\d{4})", "$1 $2", ["[5-9]"]]]], "TR": ["90", "00", "4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}", [7, 10, 12, 13], [["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["512|8[01589]|90"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["5(?:[0-59]|61)", "5(?:[0-59]|61[06])", "5(?:[0-59]|61[06]1)"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[24][1-8]|3[1-9]"], "(0$1)", 1], ["(\\d{3})(\\d{3})(\\d{6,7})", "$1 $2 $3", ["80"], "0$1", 1]], "0"], "TT": ["1", "011", "(?:[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-46-8]\\d{6})$|1", "868$1", 0, "868"], "TV": ["688", "00", "(?:2|7\\d\\d|90)\\d{4}", [5, 6, 7], [["(\\d{2})(\\d{3})", "$1 $2", ["2"]], ["(\\d{2})(\\d{4})", "$1 $2", ["90"]], ["(\\d{2})(\\d{5})", "$1 $2", ["7"]]]], "TW": ["886", "0(?:0[25-79]|19)", "[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}", [7, 8, 9, 10, 11], [["(\\d{2})(\\d)(\\d{4})", "$1 $2 $3", ["202"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[258]0"], "0$1"], ["(\\d)(\\d{3,4})(\\d{4})", "$1 $2 $3", ["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]", "[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[49]"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4,5})", "$1 $2 $3", ["7"], "0$1"]], "0", 0, 0, 0, 0, 0, 0, 0, "#"], "TZ": ["255", "00[056]", "(?:[25-8]\\d|41|90)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{4})", "$1 $2 $3", ["[89]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[24]"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["5"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[67]"], "0$1"]], "0"], "UA": ["380", "00", "[89]\\d{9}|[3-9]\\d{8}", [9, 10], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]", "6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"], "0$1"], ["(\\d{4})(\\d{5})", "$1 $2", ["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])", "3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[3-7]|89|9[1-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[89]"], "0$1"]], "0", 0, 0, 0, 0, 0, 0, "0~0"], "UG": ["256", "00[057]", "800\\d{6}|(?:[29]0|[347]\\d)\\d{7}", [9], [["(\\d{4})(\\d{5})", "$1 $2", ["202", "2024"], "0$1"], ["(\\d{3})(\\d{6})", "$1 $2", ["[27-9]|4(?:6[45]|[7-9])"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["[34]"], "0$1"]], "0"], "US": ["1", "011", "[2-9]\\d{9}|3\\d{6}", [10], [["(\\d{3})(\\d{4})", "$1-$2", ["310"], 0, 1], ["(\\d{3})(\\d{3})(\\d{4})", "($1) $2-$3", ["[2-9]"], 0, 1, "$1-$2-$3"]], "1", 0, 0, 0, 0, 0, [["(?:3052(?:0[0-8]|[1-9]\\d)|5056(?:[0-35-9]\\d|4[468])|7302[0-4]\\d)\\d{4}|(?:305[3-9]|472[24]|505[2-57-9]|7306|983[2-47-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-47-9]|1[02-9]|2[013569]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}"], [""], ["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"], ["900[2-9]\\d{6}"], ["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"], 0, 0, 0, ["305209\\d{4}"]]], "UY": ["598", "0(?:0|1[3-9]\\d)", "0004\\d{2,9}|[1249]\\d{7}|(?:[49]\\d|80)\\d{5}", [6, 7, 8, 9, 10, 11, 12, 13], [["(\\d{3})(\\d{3,4})", "$1 $2", ["0"]], ["(\\d{3})(\\d{4})", "$1 $2", ["[49]0|8"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["9"], "0$1"], ["(\\d{4})(\\d{4})", "$1 $2", ["[124]"]], ["(\\d{3})(\\d{3})(\\d{2,4})", "$1 $2 $3", ["0"]], ["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})", "$1 $2 $3 $4", ["0"]]], "0", 0, 0, 0, 0, 0, 0, "00", " int. "], "UZ": ["998", "00", "(?:20|33|[5-79]\\d|88)\\d{7}", [9], [["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[235-9]"]]]], "VA": ["39", "00", "0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}", [6, 7, 8, 9, 10, 11, 12], 0, 0, 0, 0, 0, 0, "06698"], "VC": ["1", "011", "(?:[58]\\d\\d|784|900)\\d{7}", [10], 0, "1", 0, "([2-7]\\d{6})$|1", "784$1", 0, "784"], "VE": ["58", "00", "[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}", [10], [["(\\d{3})(\\d{7})", "$1-$2", ["[24-689]"], "0$1"]], "0"], "VG": ["1", "011", "(?:284|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-578]\\d{6})$|1", "284$1", 0, "284"], "VI": ["1", "011", "[58]\\d{9}|(?:34|90)0\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "340$1", 0, "340"], "VN": ["84", "00", "[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}", [7, 8, 9, 10], [["(\\d{2})(\\d{5})", "$1 $2", ["80"], "0$1", 1], ["(\\d{4})(\\d{4,6})", "$1 $2", ["1"], 0, 1], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["6"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[357-9]"], "0$1", 1], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["2[48]"], "0$1", 1], ["(\\d{3})(\\d{4})(\\d{3})", "$1 $2 $3", ["2"], "0$1", 1]], "0"], "VU": ["678", "00", "[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}", [5, 7], [["(\\d{3})(\\d{4})", "$1 $2", ["[57-9]"]]]], "WF": ["681", "00", "(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}", [6, 9], [["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["[47-9]"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"]]]], "WS": ["685", "0", "(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}", [5, 6, 7, 10], [["(\\d{5})", "$1", ["[2-5]|6[1-9]"]], ["(\\d{3})(\\d{3,7})", "$1 $2", ["[68]"]], ["(\\d{2})(\\d{5})", "$1 $2", ["7"]]]], "XK": ["383", "00", "2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}", [8, 9, 10, 11, 12], [["(\\d{3})(\\d{5})", "$1 $2", ["[89]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-4]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["2|39"], "0$1"], ["(\\d{2})(\\d{7,10})", "$1 $2", ["3"], "0$1"]], "0"], "YE": ["967", "00", "(?:1|7\\d)\\d{7}|[1-7]\\d{6}", [7, 8, 9], [["(\\d)(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[1-6]|7(?:[24-6]|8[0-7])"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["7"], "0$1"]], "0"], "YT": ["262", "00", "(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}", [9], 0, "0", 0, 0, 0, 0, 0, [["269(?:0[0-467]|15|5[0-4]|6\\d|[78]0)\\d{4}"], ["639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])\\d{4}"], ["80\\d{7}"], 0, 0, 0, 0, 0, ["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]], "ZA": ["27", "00", "[1-79]\\d{8}|8\\d{4,9}", [5, 6, 7, 8, 9, 10], [["(\\d{2})(\\d{3,4})", "$1 $2", ["8[1-4]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2,3})", "$1 $2 $3", ["8[1-4]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["860"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"], "0$1"]], "0"], "ZM": ["260", "00", "800\\d{6}|(?:21|63|[79]\\d)\\d{7}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[28]"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["[79]"], "0$1"]], "0"], "ZW": ["263", "00", "2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}", [5, 6, 7, 8, 9, 10], [["(\\d{3})(\\d{3,5})", "$1 $2", ["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"], "0$1"], ["(\\d)(\\d{3})(\\d{2,4})", "$1 $2 $3", ["[49]"], "0$1"], ["(\\d{3})(\\d{4})", "$1 $2", ["80"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2", "2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["7"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)", "2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"], "0$1"], ["(\\d{4})(\\d{6})", "$1 $2", ["8"], "0$1"], ["(\\d{2})(\\d{3,5})", "$1 $2", ["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["29[013-9]|39|54"], "0$1"], ["(\\d{4})(\\d{3,5})", "$1 $2", ["(?:25|54)8", "258|5483"], "0$1"]], "0"] }, "nonGeographic": { "800": ["800", 0, "(?:00|[1-9]\\d)\\d{6}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["\\d"]]], 0, 0, 0, 0, 0, 0, [0, 0, ["(?:00|[1-9]\\d)\\d{6}"]]], "808": ["808", 0, "[1-9]\\d{7}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[1-9]"]]], 0, 0, 0, 0, 0, 0, [0, 0, 0, 0, 0, 0, 0, 0, 0, ["[1-9]\\d{7}"]]], "870": ["870", 0, "7\\d{11}|[35-7]\\d{8}", [9, 12], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[35-7]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"]]], "878": ["878", 0, "10\\d{10}", [12], [["(\\d{2})(\\d{5})(\\d{5})", "$1 $2 $3", ["1"]]], 0, 0, 0, 0, 0, 0, [0, 0, 0, 0, 0, 0, 0, 0, ["10\\d{10}"]]], "881": ["881", 0, "6\\d{9}|[0-36-9]\\d{8}", [9, 10], [["(\\d)(\\d{3})(\\d{5})", "$1 $2 $3", ["[0-37-9]"]], ["(\\d)(\\d{3})(\\d{5,6})", "$1 $2 $3", ["6"]]], 0, 0, 0, 0, 0, 0, [0, ["6\\d{9}|[0-36-9]\\d{8}"]]], "882": ["882", 0, "[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?", [7, 8, 9, 10, 11, 12], [["(\\d{2})(\\d{5})", "$1 $2", ["16|342"]], ["(\\d{2})(\\d{6})", "$1 $2", ["49"]], ["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["1[36]|9"]], ["(\\d{2})(\\d{4})(\\d{3})", "$1 $2 $3", ["3[23]"]], ["(\\d{2})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["16"]], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["10|23|3(?:[15]|4[57])|4|51"]], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["34"]], ["(\\d{2})(\\d{4,5})(\\d{5})", "$1 $2 $3", ["[1-35]"]]], 0, 0, 0, 0, 0, 0, [0, ["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}", [7, 8, 9, 10, 12]], 0, 0, 0, ["348[57]\\d{7}", [11]], 0, 0, ["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]], "883": ["883", 0, "(?:[1-4]\\d|51)\\d{6,10}", [8, 9, 10, 11, 12], [["(\\d{3})(\\d{3})(\\d{2,8})", "$1 $2 $3", ["[14]|2[24-689]|3[02-689]|51[24-9]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["510"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["21"]], ["(\\d{4})(\\d{4})(\\d{4})", "$1 $2 $3", ["51[13]"]], ["(\\d{3})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["[235]"]]], 0, 0, 0, 0, 0, 0, [0, 0, 0, 0, 0, 0, 0, 0, ["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]], "888": ["888", 0, "\\d{11}", [11], [["(\\d{3})(\\d{3})(\\d{5})", "$1 $2 $3"]], 0, 0, 0, 0, 0, 0, [0, 0, 0, 0, 0, 0, ["\\d{11}"]]], "979": ["979", 0, "[1359]\\d{8}", [9], [["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["[1359]"]]], 0, 0, 0, 0, 0, 0, [0, 0, 0, ["[1359]\\d{8}"]]] } };
  31280. function withMetadataArgument$1(func, _arguments) {
  31281. var args = Array.prototype.slice.call(_arguments);
  31282. args.push(metadata$1);
  31283. return func.apply(this, args);
  31284. }
  31285. function _typeof$1(obj) {
  31286. "@babel/helpers - typeof";
  31287. return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) {
  31288. return typeof obj2;
  31289. } : function(obj2) {
  31290. return obj2 && "function" == typeof Symbol && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
  31291. }, _typeof$1(obj);
  31292. }
  31293. function _defineProperties$8(target, props) {
  31294. for (var i2 = 0; i2 < props.length; i2++) {
  31295. var descriptor = props[i2];
  31296. descriptor.enumerable = descriptor.enumerable || false;
  31297. descriptor.configurable = true;
  31298. if ("value" in descriptor)
  31299. descriptor.writable = true;
  31300. Object.defineProperty(target, descriptor.key, descriptor);
  31301. }
  31302. }
  31303. function _createClass$8(Constructor, protoProps, staticProps) {
  31304. if (protoProps)
  31305. _defineProperties$8(Constructor.prototype, protoProps);
  31306. if (staticProps)
  31307. _defineProperties$8(Constructor, staticProps);
  31308. Object.defineProperty(Constructor, "prototype", { writable: false });
  31309. return Constructor;
  31310. }
  31311. function _classCallCheck$8(instance, Constructor) {
  31312. if (!(instance instanceof Constructor)) {
  31313. throw new TypeError("Cannot call a class as a function");
  31314. }
  31315. }
  31316. function _inherits(subClass, superClass) {
  31317. if (typeof superClass !== "function" && superClass !== null) {
  31318. throw new TypeError("Super expression must either be null or a function");
  31319. }
  31320. subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
  31321. Object.defineProperty(subClass, "prototype", { writable: false });
  31322. if (superClass)
  31323. _setPrototypeOf(subClass, superClass);
  31324. }
  31325. function _createSuper(Derived) {
  31326. var hasNativeReflectConstruct = _isNativeReflectConstruct();
  31327. return function _createSuperInternal() {
  31328. var Super = _getPrototypeOf(Derived), result2;
  31329. if (hasNativeReflectConstruct) {
  31330. var NewTarget = _getPrototypeOf(this).constructor;
  31331. result2 = Reflect.construct(Super, arguments, NewTarget);
  31332. } else {
  31333. result2 = Super.apply(this, arguments);
  31334. }
  31335. return _possibleConstructorReturn(this, result2);
  31336. };
  31337. }
  31338. function _possibleConstructorReturn(self2, call) {
  31339. if (call && (_typeof$1(call) === "object" || typeof call === "function")) {
  31340. return call;
  31341. } else if (call !== void 0) {
  31342. throw new TypeError("Derived constructors may only return object or undefined");
  31343. }
  31344. return _assertThisInitialized(self2);
  31345. }
  31346. function _assertThisInitialized(self2) {
  31347. if (self2 === void 0) {
  31348. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  31349. }
  31350. return self2;
  31351. }
  31352. function _wrapNativeSuper(Class) {
  31353. var _cache = typeof Map === "function" ? /* @__PURE__ */ new Map() : void 0;
  31354. _wrapNativeSuper = function _wrapNativeSuper2(Class2) {
  31355. if (Class2 === null || !_isNativeFunction(Class2))
  31356. return Class2;
  31357. if (typeof Class2 !== "function") {
  31358. throw new TypeError("Super expression must either be null or a function");
  31359. }
  31360. if (typeof _cache !== "undefined") {
  31361. if (_cache.has(Class2))
  31362. return _cache.get(Class2);
  31363. _cache.set(Class2, Wrapper);
  31364. }
  31365. function Wrapper() {
  31366. return _construct(Class2, arguments, _getPrototypeOf(this).constructor);
  31367. }
  31368. Wrapper.prototype = Object.create(Class2.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } });
  31369. return _setPrototypeOf(Wrapper, Class2);
  31370. };
  31371. return _wrapNativeSuper(Class);
  31372. }
  31373. function _construct(Parent, args, Class) {
  31374. if (_isNativeReflectConstruct()) {
  31375. _construct = Reflect.construct;
  31376. } else {
  31377. _construct = function _construct2(Parent2, args2, Class2) {
  31378. var a2 = [null];
  31379. a2.push.apply(a2, args2);
  31380. var Constructor = Function.bind.apply(Parent2, a2);
  31381. var instance = new Constructor();
  31382. if (Class2)
  31383. _setPrototypeOf(instance, Class2.prototype);
  31384. return instance;
  31385. };
  31386. }
  31387. return _construct.apply(null, arguments);
  31388. }
  31389. function _isNativeReflectConstruct() {
  31390. if (typeof Reflect === "undefined" || !Reflect.construct)
  31391. return false;
  31392. if (Reflect.construct.sham)
  31393. return false;
  31394. if (typeof Proxy === "function")
  31395. return true;
  31396. try {
  31397. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
  31398. }));
  31399. return true;
  31400. } catch (e2) {
  31401. return false;
  31402. }
  31403. }
  31404. function _isNativeFunction(fn) {
  31405. return Function.toString.call(fn).indexOf("[native code]") !== -1;
  31406. }
  31407. function _setPrototypeOf(o2, p2) {
  31408. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf2(o3, p3) {
  31409. o3.__proto__ = p3;
  31410. return o3;
  31411. };
  31412. return _setPrototypeOf(o2, p2);
  31413. }
  31414. function _getPrototypeOf(o2) {
  31415. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf2(o3) {
  31416. return o3.__proto__ || Object.getPrototypeOf(o3);
  31417. };
  31418. return _getPrototypeOf(o2);
  31419. }
  31420. var ParseError = /* @__PURE__ */ function(_Error) {
  31421. _inherits(ParseError2, _Error);
  31422. var _super = _createSuper(ParseError2);
  31423. function ParseError2(code2) {
  31424. var _this;
  31425. _classCallCheck$8(this, ParseError2);
  31426. _this = _super.call(this, code2);
  31427. Object.setPrototypeOf(_assertThisInitialized(_this), ParseError2.prototype);
  31428. _this.name = _this.constructor.name;
  31429. return _this;
  31430. }
  31431. return _createClass$8(ParseError2);
  31432. }(/* @__PURE__ */ _wrapNativeSuper(Error));
  31433. var MIN_LENGTH_FOR_NSN = 2;
  31434. var MAX_LENGTH_FOR_NSN = 17;
  31435. var MAX_LENGTH_COUNTRY_CODE = 3;
  31436. var VALID_DIGITS = "0-90-9٠-٩۰-۹";
  31437. var DASHES = "-‐-―−ー-";
  31438. var SLASHES = "//";
  31439. var DOTS = "..";
  31440. var WHITESPACE = "  ­​⁠ ";
  31441. var BRACKETS = "()()[]\\[\\]";
  31442. var TILDES = "~⁓∼~";
  31443. var VALID_PUNCTUATION = "".concat(DASHES).concat(SLASHES).concat(DOTS).concat(WHITESPACE).concat(BRACKETS).concat(TILDES);
  31444. var PLUS_CHARS = "++";
  31445. function compare(a2, b2) {
  31446. a2 = a2.split("-");
  31447. b2 = b2.split("-");
  31448. var pa = a2[0].split(".");
  31449. var pb = b2[0].split(".");
  31450. for (var i2 = 0; i2 < 3; i2++) {
  31451. var na = Number(pa[i2]);
  31452. var nb = Number(pb[i2]);
  31453. if (na > nb)
  31454. return 1;
  31455. if (nb > na)
  31456. return -1;
  31457. if (!isNaN(na) && isNaN(nb))
  31458. return 1;
  31459. if (isNaN(na) && !isNaN(nb))
  31460. return -1;
  31461. }
  31462. if (a2[1] && b2[1]) {
  31463. return a2[1] > b2[1] ? 1 : a2[1] < b2[1] ? -1 : 0;
  31464. }
  31465. return !a2[1] && b2[1] ? 1 : a2[1] && !b2[1] ? -1 : 0;
  31466. }
  31467. var objectConstructor = {}.constructor;
  31468. function isObject$2(object2) {
  31469. return object2 !== void 0 && object2 !== null && object2.constructor === objectConstructor;
  31470. }
  31471. function _typeof(obj) {
  31472. "@babel/helpers - typeof";
  31473. return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) {
  31474. return typeof obj2;
  31475. } : function(obj2) {
  31476. return obj2 && "function" == typeof Symbol && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
  31477. }, _typeof(obj);
  31478. }
  31479. function _classCallCheck$7(instance, Constructor) {
  31480. if (!(instance instanceof Constructor)) {
  31481. throw new TypeError("Cannot call a class as a function");
  31482. }
  31483. }
  31484. function _defineProperties$7(target, props) {
  31485. for (var i2 = 0; i2 < props.length; i2++) {
  31486. var descriptor = props[i2];
  31487. descriptor.enumerable = descriptor.enumerable || false;
  31488. descriptor.configurable = true;
  31489. if ("value" in descriptor)
  31490. descriptor.writable = true;
  31491. Object.defineProperty(target, descriptor.key, descriptor);
  31492. }
  31493. }
  31494. function _createClass$7(Constructor, protoProps, staticProps) {
  31495. if (protoProps)
  31496. _defineProperties$7(Constructor.prototype, protoProps);
  31497. if (staticProps)
  31498. _defineProperties$7(Constructor, staticProps);
  31499. Object.defineProperty(Constructor, "prototype", { writable: false });
  31500. return Constructor;
  31501. }
  31502. var V3 = "1.2.0";
  31503. var V4 = "1.7.35";
  31504. var DEFAULT_EXT_PREFIX = " ext. ";
  31505. var CALLING_CODE_REG_EXP = /^\d+$/;
  31506. var Metadata = /* @__PURE__ */ function() {
  31507. function Metadata2(metadata2) {
  31508. _classCallCheck$7(this, Metadata2);
  31509. validateMetadata(metadata2);
  31510. this.metadata = metadata2;
  31511. setVersion.call(this, metadata2);
  31512. }
  31513. _createClass$7(Metadata2, [{
  31514. key: "getCountries",
  31515. value: function getCountries() {
  31516. return Object.keys(this.metadata.countries).filter(function(_2) {
  31517. return _2 !== "001";
  31518. });
  31519. }
  31520. }, {
  31521. key: "getCountryMetadata",
  31522. value: function getCountryMetadata(countryCode) {
  31523. return this.metadata.countries[countryCode];
  31524. }
  31525. }, {
  31526. key: "nonGeographic",
  31527. value: function nonGeographic() {
  31528. if (this.v1 || this.v2 || this.v3)
  31529. return;
  31530. return this.metadata.nonGeographic || this.metadata.nonGeographical;
  31531. }
  31532. }, {
  31533. key: "hasCountry",
  31534. value: function hasCountry(country) {
  31535. return this.getCountryMetadata(country) !== void 0;
  31536. }
  31537. }, {
  31538. key: "hasCallingCode",
  31539. value: function hasCallingCode(callingCode) {
  31540. if (this.getCountryCodesForCallingCode(callingCode)) {
  31541. return true;
  31542. }
  31543. if (this.nonGeographic()) {
  31544. if (this.nonGeographic()[callingCode]) {
  31545. return true;
  31546. }
  31547. } else {
  31548. var countryCodes = this.countryCallingCodes()[callingCode];
  31549. if (countryCodes && countryCodes.length === 1 && countryCodes[0] === "001") {
  31550. return true;
  31551. }
  31552. }
  31553. }
  31554. }, {
  31555. key: "isNonGeographicCallingCode",
  31556. value: function isNonGeographicCallingCode(callingCode) {
  31557. if (this.nonGeographic()) {
  31558. return this.nonGeographic()[callingCode] ? true : false;
  31559. } else {
  31560. return this.getCountryCodesForCallingCode(callingCode) ? false : true;
  31561. }
  31562. }
  31563. // Deprecated.
  31564. }, {
  31565. key: "country",
  31566. value: function country(countryCode) {
  31567. return this.selectNumberingPlan(countryCode);
  31568. }
  31569. }, {
  31570. key: "selectNumberingPlan",
  31571. value: function selectNumberingPlan(countryCode, callingCode) {
  31572. if (countryCode && CALLING_CODE_REG_EXP.test(countryCode)) {
  31573. callingCode = countryCode;
  31574. countryCode = null;
  31575. }
  31576. if (countryCode && countryCode !== "001") {
  31577. if (!this.hasCountry(countryCode)) {
  31578. throw new Error("Unknown country: ".concat(countryCode));
  31579. }
  31580. this.numberingPlan = new NumberingPlan(this.getCountryMetadata(countryCode), this);
  31581. } else if (callingCode) {
  31582. if (!this.hasCallingCode(callingCode)) {
  31583. throw new Error("Unknown calling code: ".concat(callingCode));
  31584. }
  31585. this.numberingPlan = new NumberingPlan(this.getNumberingPlanMetadata(callingCode), this);
  31586. } else {
  31587. this.numberingPlan = void 0;
  31588. }
  31589. return this;
  31590. }
  31591. }, {
  31592. key: "getCountryCodesForCallingCode",
  31593. value: function getCountryCodesForCallingCode(callingCode) {
  31594. var countryCodes = this.countryCallingCodes()[callingCode];
  31595. if (countryCodes) {
  31596. if (countryCodes.length === 1 && countryCodes[0].length === 3) {
  31597. return;
  31598. }
  31599. return countryCodes;
  31600. }
  31601. }
  31602. }, {
  31603. key: "getCountryCodeForCallingCode",
  31604. value: function getCountryCodeForCallingCode(callingCode) {
  31605. var countryCodes = this.getCountryCodesForCallingCode(callingCode);
  31606. if (countryCodes) {
  31607. return countryCodes[0];
  31608. }
  31609. }
  31610. }, {
  31611. key: "getNumberingPlanMetadata",
  31612. value: function getNumberingPlanMetadata(callingCode) {
  31613. var countryCode = this.getCountryCodeForCallingCode(callingCode);
  31614. if (countryCode) {
  31615. return this.getCountryMetadata(countryCode);
  31616. }
  31617. if (this.nonGeographic()) {
  31618. var metadata2 = this.nonGeographic()[callingCode];
  31619. if (metadata2) {
  31620. return metadata2;
  31621. }
  31622. } else {
  31623. var countryCodes = this.countryCallingCodes()[callingCode];
  31624. if (countryCodes && countryCodes.length === 1 && countryCodes[0] === "001") {
  31625. return this.metadata.countries["001"];
  31626. }
  31627. }
  31628. }
  31629. // Deprecated.
  31630. }, {
  31631. key: "countryCallingCode",
  31632. value: function countryCallingCode() {
  31633. return this.numberingPlan.callingCode();
  31634. }
  31635. // Deprecated.
  31636. }, {
  31637. key: "IDDPrefix",
  31638. value: function IDDPrefix() {
  31639. return this.numberingPlan.IDDPrefix();
  31640. }
  31641. // Deprecated.
  31642. }, {
  31643. key: "defaultIDDPrefix",
  31644. value: function defaultIDDPrefix() {
  31645. return this.numberingPlan.defaultIDDPrefix();
  31646. }
  31647. // Deprecated.
  31648. }, {
  31649. key: "nationalNumberPattern",
  31650. value: function nationalNumberPattern() {
  31651. return this.numberingPlan.nationalNumberPattern();
  31652. }
  31653. // Deprecated.
  31654. }, {
  31655. key: "possibleLengths",
  31656. value: function possibleLengths() {
  31657. return this.numberingPlan.possibleLengths();
  31658. }
  31659. // Deprecated.
  31660. }, {
  31661. key: "formats",
  31662. value: function formats() {
  31663. return this.numberingPlan.formats();
  31664. }
  31665. // Deprecated.
  31666. }, {
  31667. key: "nationalPrefixForParsing",
  31668. value: function nationalPrefixForParsing() {
  31669. return this.numberingPlan.nationalPrefixForParsing();
  31670. }
  31671. // Deprecated.
  31672. }, {
  31673. key: "nationalPrefixTransformRule",
  31674. value: function nationalPrefixTransformRule() {
  31675. return this.numberingPlan.nationalPrefixTransformRule();
  31676. }
  31677. // Deprecated.
  31678. }, {
  31679. key: "leadingDigits",
  31680. value: function leadingDigits() {
  31681. return this.numberingPlan.leadingDigits();
  31682. }
  31683. // Deprecated.
  31684. }, {
  31685. key: "hasTypes",
  31686. value: function hasTypes() {
  31687. return this.numberingPlan.hasTypes();
  31688. }
  31689. // Deprecated.
  31690. }, {
  31691. key: "type",
  31692. value: function type(_type) {
  31693. return this.numberingPlan.type(_type);
  31694. }
  31695. // Deprecated.
  31696. }, {
  31697. key: "ext",
  31698. value: function ext() {
  31699. return this.numberingPlan.ext();
  31700. }
  31701. }, {
  31702. key: "countryCallingCodes",
  31703. value: function countryCallingCodes() {
  31704. if (this.v1)
  31705. return this.metadata.country_phone_code_to_countries;
  31706. return this.metadata.country_calling_codes;
  31707. }
  31708. // Deprecated.
  31709. }, {
  31710. key: "chooseCountryByCountryCallingCode",
  31711. value: function chooseCountryByCountryCallingCode(callingCode) {
  31712. return this.selectNumberingPlan(callingCode);
  31713. }
  31714. }, {
  31715. key: "hasSelectedNumberingPlan",
  31716. value: function hasSelectedNumberingPlan() {
  31717. return this.numberingPlan !== void 0;
  31718. }
  31719. }]);
  31720. return Metadata2;
  31721. }();
  31722. var NumberingPlan = /* @__PURE__ */ function() {
  31723. function NumberingPlan2(metadata2, globalMetadataObject) {
  31724. _classCallCheck$7(this, NumberingPlan2);
  31725. this.globalMetadataObject = globalMetadataObject;
  31726. this.metadata = metadata2;
  31727. setVersion.call(this, globalMetadataObject.metadata);
  31728. }
  31729. _createClass$7(NumberingPlan2, [{
  31730. key: "callingCode",
  31731. value: function callingCode() {
  31732. return this.metadata[0];
  31733. }
  31734. // Formatting information for regions which share
  31735. // a country calling code is contained by only one region
  31736. // for performance reasons. For example, for NANPA region
  31737. // ("North American Numbering Plan Administration",
  31738. // which includes USA, Canada, Cayman Islands, Bahamas, etc)
  31739. // it will be contained in the metadata for `US`.
  31740. }, {
  31741. key: "getDefaultCountryMetadataForRegion",
  31742. value: function getDefaultCountryMetadataForRegion() {
  31743. return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode());
  31744. }
  31745. // Is always present.
  31746. }, {
  31747. key: "IDDPrefix",
  31748. value: function IDDPrefix() {
  31749. if (this.v1 || this.v2)
  31750. return;
  31751. return this.metadata[1];
  31752. }
  31753. // Is only present when a country supports multiple IDD prefixes.
  31754. }, {
  31755. key: "defaultIDDPrefix",
  31756. value: function defaultIDDPrefix() {
  31757. if (this.v1 || this.v2)
  31758. return;
  31759. return this.metadata[12];
  31760. }
  31761. }, {
  31762. key: "nationalNumberPattern",
  31763. value: function nationalNumberPattern() {
  31764. if (this.v1 || this.v2)
  31765. return this.metadata[1];
  31766. return this.metadata[2];
  31767. }
  31768. // "possible length" data is always present in Google's metadata.
  31769. }, {
  31770. key: "possibleLengths",
  31771. value: function possibleLengths() {
  31772. if (this.v1)
  31773. return;
  31774. return this.metadata[this.v2 ? 2 : 3];
  31775. }
  31776. }, {
  31777. key: "_getFormats",
  31778. value: function _getFormats(metadata2) {
  31779. return metadata2[this.v1 ? 2 : this.v2 ? 3 : 4];
  31780. }
  31781. // For countries of the same region (e.g. NANPA)
  31782. // formats are all stored in the "main" country for that region.
  31783. // E.g. "RU" and "KZ", "US" and "CA".
  31784. }, {
  31785. key: "formats",
  31786. value: function formats() {
  31787. var _this = this;
  31788. var formats2 = this._getFormats(this.metadata) || this._getFormats(this.getDefaultCountryMetadataForRegion()) || [];
  31789. return formats2.map(function(_2) {
  31790. return new Format(_2, _this);
  31791. });
  31792. }
  31793. }, {
  31794. key: "nationalPrefix",
  31795. value: function nationalPrefix() {
  31796. return this.metadata[this.v1 ? 3 : this.v2 ? 4 : 5];
  31797. }
  31798. }, {
  31799. key: "_getNationalPrefixFormattingRule",
  31800. value: function _getNationalPrefixFormattingRule(metadata2) {
  31801. return metadata2[this.v1 ? 4 : this.v2 ? 5 : 6];
  31802. }
  31803. // For countries of the same region (e.g. NANPA)
  31804. // national prefix formatting rule is stored in the "main" country for that region.
  31805. // E.g. "RU" and "KZ", "US" and "CA".
  31806. }, {
  31807. key: "nationalPrefixFormattingRule",
  31808. value: function nationalPrefixFormattingRule() {
  31809. return this._getNationalPrefixFormattingRule(this.metadata) || this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion());
  31810. }
  31811. }, {
  31812. key: "_nationalPrefixForParsing",
  31813. value: function _nationalPrefixForParsing() {
  31814. return this.metadata[this.v1 ? 5 : this.v2 ? 6 : 7];
  31815. }
  31816. }, {
  31817. key: "nationalPrefixForParsing",
  31818. value: function nationalPrefixForParsing() {
  31819. return this._nationalPrefixForParsing() || this.nationalPrefix();
  31820. }
  31821. }, {
  31822. key: "nationalPrefixTransformRule",
  31823. value: function nationalPrefixTransformRule() {
  31824. return this.metadata[this.v1 ? 6 : this.v2 ? 7 : 8];
  31825. }
  31826. }, {
  31827. key: "_getNationalPrefixIsOptionalWhenFormatting",
  31828. value: function _getNationalPrefixIsOptionalWhenFormatting() {
  31829. return !!this.metadata[this.v1 ? 7 : this.v2 ? 8 : 9];
  31830. }
  31831. // For countries of the same region (e.g. NANPA)
  31832. // "national prefix is optional when formatting" flag is
  31833. // stored in the "main" country for that region.
  31834. // E.g. "RU" and "KZ", "US" and "CA".
  31835. }, {
  31836. key: "nationalPrefixIsOptionalWhenFormattingInNationalFormat",
  31837. value: function nationalPrefixIsOptionalWhenFormattingInNationalFormat() {
  31838. return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata) || this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion());
  31839. }
  31840. }, {
  31841. key: "leadingDigits",
  31842. value: function leadingDigits() {
  31843. return this.metadata[this.v1 ? 8 : this.v2 ? 9 : 10];
  31844. }
  31845. }, {
  31846. key: "types",
  31847. value: function types2() {
  31848. return this.metadata[this.v1 ? 9 : this.v2 ? 10 : 11];
  31849. }
  31850. }, {
  31851. key: "hasTypes",
  31852. value: function hasTypes() {
  31853. if (this.types() && this.types().length === 0) {
  31854. return false;
  31855. }
  31856. return !!this.types();
  31857. }
  31858. }, {
  31859. key: "type",
  31860. value: function type(_type2) {
  31861. if (this.hasTypes() && getType(this.types(), _type2)) {
  31862. return new Type(getType(this.types(), _type2), this);
  31863. }
  31864. }
  31865. }, {
  31866. key: "ext",
  31867. value: function ext() {
  31868. if (this.v1 || this.v2)
  31869. return DEFAULT_EXT_PREFIX;
  31870. return this.metadata[13] || DEFAULT_EXT_PREFIX;
  31871. }
  31872. }]);
  31873. return NumberingPlan2;
  31874. }();
  31875. var Format = /* @__PURE__ */ function() {
  31876. function Format2(format2, metadata2) {
  31877. _classCallCheck$7(this, Format2);
  31878. this._format = format2;
  31879. this.metadata = metadata2;
  31880. }
  31881. _createClass$7(Format2, [{
  31882. key: "pattern",
  31883. value: function pattern2() {
  31884. return this._format[0];
  31885. }
  31886. }, {
  31887. key: "format",
  31888. value: function format2() {
  31889. return this._format[1];
  31890. }
  31891. }, {
  31892. key: "leadingDigitsPatterns",
  31893. value: function leadingDigitsPatterns() {
  31894. return this._format[2] || [];
  31895. }
  31896. }, {
  31897. key: "nationalPrefixFormattingRule",
  31898. value: function nationalPrefixFormattingRule() {
  31899. return this._format[3] || this.metadata.nationalPrefixFormattingRule();
  31900. }
  31901. }, {
  31902. key: "nationalPrefixIsOptionalWhenFormattingInNationalFormat",
  31903. value: function nationalPrefixIsOptionalWhenFormattingInNationalFormat() {
  31904. return !!this._format[4] || this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat();
  31905. }
  31906. }, {
  31907. key: "nationalPrefixIsMandatoryWhenFormattingInNationalFormat",
  31908. value: function nationalPrefixIsMandatoryWhenFormattingInNationalFormat() {
  31909. return this.usesNationalPrefix() && !this.nationalPrefixIsOptionalWhenFormattingInNationalFormat();
  31910. }
  31911. // Checks whether national prefix formatting rule contains national prefix.
  31912. }, {
  31913. key: "usesNationalPrefix",
  31914. value: function usesNationalPrefix() {
  31915. return this.nationalPrefixFormattingRule() && // Check that national prefix formatting rule is not a "dummy" one.
  31916. !FIRST_GROUP_ONLY_PREFIX_PATTERN.test(this.nationalPrefixFormattingRule()) ? true : false;
  31917. }
  31918. }, {
  31919. key: "internationalFormat",
  31920. value: function internationalFormat() {
  31921. return this._format[5] || this.format();
  31922. }
  31923. }]);
  31924. return Format2;
  31925. }();
  31926. var FIRST_GROUP_ONLY_PREFIX_PATTERN = /^\(?\$1\)?$/;
  31927. var Type = /* @__PURE__ */ function() {
  31928. function Type2(type, metadata2) {
  31929. _classCallCheck$7(this, Type2);
  31930. this.type = type;
  31931. this.metadata = metadata2;
  31932. }
  31933. _createClass$7(Type2, [{
  31934. key: "pattern",
  31935. value: function pattern2() {
  31936. if (this.metadata.v1)
  31937. return this.type;
  31938. return this.type[0];
  31939. }
  31940. }, {
  31941. key: "possibleLengths",
  31942. value: function possibleLengths() {
  31943. if (this.metadata.v1)
  31944. return;
  31945. return this.type[1] || this.metadata.possibleLengths();
  31946. }
  31947. }]);
  31948. return Type2;
  31949. }();
  31950. function getType(types2, type) {
  31951. switch (type) {
  31952. case "FIXED_LINE":
  31953. return types2[0];
  31954. case "MOBILE":
  31955. return types2[1];
  31956. case "TOLL_FREE":
  31957. return types2[2];
  31958. case "PREMIUM_RATE":
  31959. return types2[3];
  31960. case "PERSONAL_NUMBER":
  31961. return types2[4];
  31962. case "VOICEMAIL":
  31963. return types2[5];
  31964. case "UAN":
  31965. return types2[6];
  31966. case "PAGER":
  31967. return types2[7];
  31968. case "VOIP":
  31969. return types2[8];
  31970. case "SHARED_COST":
  31971. return types2[9];
  31972. }
  31973. }
  31974. function validateMetadata(metadata2) {
  31975. if (!metadata2) {
  31976. throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");
  31977. }
  31978. if (!isObject$2(metadata2) || !isObject$2(metadata2.countries)) {
  31979. throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(isObject$2(metadata2) ? "an object of shape: { " + Object.keys(metadata2).join(", ") + " }" : "a " + typeOf(metadata2) + ": " + metadata2, "."));
  31980. }
  31981. }
  31982. var typeOf = function typeOf2(_2) {
  31983. return _typeof(_2);
  31984. };
  31985. function getCountryCallingCode(country, metadata2) {
  31986. metadata2 = new Metadata(metadata2);
  31987. if (metadata2.hasCountry(country)) {
  31988. return metadata2.country(country).countryCallingCode();
  31989. }
  31990. throw new Error("Unknown country: ".concat(country));
  31991. }
  31992. function isSupportedCountry(country, metadata2) {
  31993. return metadata2.countries.hasOwnProperty(country);
  31994. }
  31995. function setVersion(metadata2) {
  31996. var version = metadata2.version;
  31997. if (typeof version === "number") {
  31998. this.v1 = version === 1;
  31999. this.v2 = version === 2;
  32000. this.v3 = version === 3;
  32001. this.v4 = version === 4;
  32002. } else {
  32003. if (!version) {
  32004. this.v1 = true;
  32005. } else if (compare(version, V3) === -1) {
  32006. this.v2 = true;
  32007. } else if (compare(version, V4) === -1) {
  32008. this.v3 = true;
  32009. } else {
  32010. this.v4 = true;
  32011. }
  32012. }
  32013. }
  32014. var RFC3966_EXTN_PREFIX = ";ext=";
  32015. var getExtensionDigitsPattern = function getExtensionDigitsPattern2(maxLength) {
  32016. return "([".concat(VALID_DIGITS, "]{1,").concat(maxLength, "})");
  32017. };
  32018. function createExtensionPattern(purpose) {
  32019. var extLimitAfterExplicitLabel = "20";
  32020. var extLimitAfterLikelyLabel = "15";
  32021. var extLimitAfterAmbiguousChar = "9";
  32022. var extLimitWhenNotSure = "6";
  32023. var possibleSeparatorsBetweenNumberAndExtLabel = "[  \\t,]*";
  32024. var possibleCharsAfterExtLabel = "[:\\..]?[  \\t,-]*";
  32025. var optionalExtnSuffix = "#?";
  32026. var explicitExtLabels = "(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)";
  32027. var ambiguousExtLabels = "(?:[xx##~~]|int|int)";
  32028. var ambiguousSeparator = "[- ]+";
  32029. var possibleSeparatorsNumberExtLabelNoComma = "[  \\t]*";
  32030. var autoDiallingAndExtLabelsFound = "(?:,{2}|;)";
  32031. var rfcExtn = RFC3966_EXTN_PREFIX + getExtensionDigitsPattern(extLimitAfterExplicitLabel);
  32032. var explicitExtn = possibleSeparatorsBetweenNumberAndExtLabel + explicitExtLabels + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterExplicitLabel) + optionalExtnSuffix;
  32033. var ambiguousExtn = possibleSeparatorsBetweenNumberAndExtLabel + ambiguousExtLabels + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterAmbiguousChar) + optionalExtnSuffix;
  32034. var americanStyleExtnWithSuffix = ambiguousSeparator + getExtensionDigitsPattern(extLimitWhenNotSure) + "#";
  32035. var autoDiallingExtn = possibleSeparatorsNumberExtLabelNoComma + autoDiallingAndExtLabelsFound + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterLikelyLabel) + optionalExtnSuffix;
  32036. var onlyCommasExtn = possibleSeparatorsNumberExtLabelNoComma + "(?:,)+" + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterAmbiguousChar) + optionalExtnSuffix;
  32037. return rfcExtn + "|" + explicitExtn + "|" + ambiguousExtn + "|" + americanStyleExtnWithSuffix + "|" + autoDiallingExtn + "|" + onlyCommasExtn;
  32038. }
  32039. var MIN_LENGTH_PHONE_NUMBER_PATTERN = "[" + VALID_DIGITS + "]{" + MIN_LENGTH_FOR_NSN + "}";
  32040. var VALID_PHONE_NUMBER = "[" + PLUS_CHARS + "]{0,1}(?:[" + VALID_PUNCTUATION + "]*[" + VALID_DIGITS + "]){3,}[" + VALID_PUNCTUATION + VALID_DIGITS + "]*";
  32041. var VALID_PHONE_NUMBER_START_REG_EXP = new RegExp("^[" + PLUS_CHARS + "]{0,1}(?:[" + VALID_PUNCTUATION + "]*[" + VALID_DIGITS + "]){1,2}$", "i");
  32042. var VALID_PHONE_NUMBER_WITH_EXTENSION = VALID_PHONE_NUMBER + // Phone number extensions
  32043. "(?:" + createExtensionPattern() + ")?";
  32044. var VALID_PHONE_NUMBER_PATTERN = new RegExp(
  32045. // Either a short two-digit-only phone number
  32046. "^" + MIN_LENGTH_PHONE_NUMBER_PATTERN + "$|^" + VALID_PHONE_NUMBER_WITH_EXTENSION + "$",
  32047. "i"
  32048. );
  32049. function isViablePhoneNumber(number2) {
  32050. return number2.length >= MIN_LENGTH_FOR_NSN && VALID_PHONE_NUMBER_PATTERN.test(number2);
  32051. }
  32052. function isViablePhoneNumberStart(number2) {
  32053. return VALID_PHONE_NUMBER_START_REG_EXP.test(number2);
  32054. }
  32055. var EXTN_PATTERN = new RegExp("(?:" + createExtensionPattern() + ")$", "i");
  32056. function extractExtension(number2) {
  32057. var start = number2.search(EXTN_PATTERN);
  32058. if (start < 0) {
  32059. return {};
  32060. }
  32061. var numberWithoutExtension = number2.slice(0, start);
  32062. var matches = number2.match(EXTN_PATTERN);
  32063. var i2 = 1;
  32064. while (i2 < matches.length) {
  32065. if (matches[i2]) {
  32066. return {
  32067. number: numberWithoutExtension,
  32068. ext: matches[i2]
  32069. };
  32070. }
  32071. i2++;
  32072. }
  32073. }
  32074. function _createForOfIteratorHelperLoose$8(o2, allowArrayLike) {
  32075. var it2 = typeof Symbol !== "undefined" && o2[Symbol.iterator] || o2["@@iterator"];
  32076. if (it2)
  32077. return (it2 = it2.call(o2)).next.bind(it2);
  32078. if (Array.isArray(o2) || (it2 = _unsupportedIterableToArray$b(o2)) || allowArrayLike && o2 && typeof o2.length === "number") {
  32079. if (it2)
  32080. o2 = it2;
  32081. var i2 = 0;
  32082. return function() {
  32083. if (i2 >= o2.length)
  32084. return { done: true };
  32085. return { done: false, value: o2[i2++] };
  32086. };
  32087. }
  32088. throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  32089. }
  32090. function _unsupportedIterableToArray$b(o2, minLen) {
  32091. if (!o2)
  32092. return;
  32093. if (typeof o2 === "string")
  32094. return _arrayLikeToArray$b(o2, minLen);
  32095. var n2 = Object.prototype.toString.call(o2).slice(8, -1);
  32096. if (n2 === "Object" && o2.constructor)
  32097. n2 = o2.constructor.name;
  32098. if (n2 === "Map" || n2 === "Set")
  32099. return Array.from(o2);
  32100. if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2))
  32101. return _arrayLikeToArray$b(o2, minLen);
  32102. }
  32103. function _arrayLikeToArray$b(arr, len) {
  32104. if (len == null || len > arr.length)
  32105. len = arr.length;
  32106. for (var i2 = 0, arr2 = new Array(len); i2 < len; i2++) {
  32107. arr2[i2] = arr[i2];
  32108. }
  32109. return arr2;
  32110. }
  32111. var DIGITS = {
  32112. "0": "0",
  32113. "1": "1",
  32114. "2": "2",
  32115. "3": "3",
  32116. "4": "4",
  32117. "5": "5",
  32118. "6": "6",
  32119. "7": "7",
  32120. "8": "8",
  32121. "9": "9",
  32122. "0": "0",
  32123. // Fullwidth digit 0
  32124. "1": "1",
  32125. // Fullwidth digit 1
  32126. "2": "2",
  32127. // Fullwidth digit 2
  32128. "3": "3",
  32129. // Fullwidth digit 3
  32130. "4": "4",
  32131. // Fullwidth digit 4
  32132. "5": "5",
  32133. // Fullwidth digit 5
  32134. "6": "6",
  32135. // Fullwidth digit 6
  32136. "7": "7",
  32137. // Fullwidth digit 7
  32138. "8": "8",
  32139. // Fullwidth digit 8
  32140. "9": "9",
  32141. // Fullwidth digit 9
  32142. "٠": "0",
  32143. // Arabic-indic digit 0
  32144. "١": "1",
  32145. // Arabic-indic digit 1
  32146. "٢": "2",
  32147. // Arabic-indic digit 2
  32148. "٣": "3",
  32149. // Arabic-indic digit 3
  32150. "٤": "4",
  32151. // Arabic-indic digit 4
  32152. "٥": "5",
  32153. // Arabic-indic digit 5
  32154. "٦": "6",
  32155. // Arabic-indic digit 6
  32156. "٧": "7",
  32157. // Arabic-indic digit 7
  32158. "٨": "8",
  32159. // Arabic-indic digit 8
  32160. "٩": "9",
  32161. // Arabic-indic digit 9
  32162. "۰": "0",
  32163. // Eastern-Arabic digit 0
  32164. "۱": "1",
  32165. // Eastern-Arabic digit 1
  32166. "۲": "2",
  32167. // Eastern-Arabic digit 2
  32168. "۳": "3",
  32169. // Eastern-Arabic digit 3
  32170. "۴": "4",
  32171. // Eastern-Arabic digit 4
  32172. "۵": "5",
  32173. // Eastern-Arabic digit 5
  32174. "۶": "6",
  32175. // Eastern-Arabic digit 6
  32176. "۷": "7",
  32177. // Eastern-Arabic digit 7
  32178. "۸": "8",
  32179. // Eastern-Arabic digit 8
  32180. "۹": "9"
  32181. // Eastern-Arabic digit 9
  32182. };
  32183. function parseDigit(character) {
  32184. return DIGITS[character];
  32185. }
  32186. function parseDigits(string) {
  32187. var result2 = "";
  32188. for (var _iterator = _createForOfIteratorHelperLoose$8(string.split("")), _step; !(_step = _iterator()).done; ) {
  32189. var character = _step.value;
  32190. var digit = parseDigit(character);
  32191. if (digit) {
  32192. result2 += digit;
  32193. }
  32194. }
  32195. return result2;
  32196. }
  32197. function _createForOfIteratorHelperLoose$7(o2, allowArrayLike) {
  32198. var it2 = typeof Symbol !== "undefined" && o2[Symbol.iterator] || o2["@@iterator"];
  32199. if (it2)
  32200. return (it2 = it2.call(o2)).next.bind(it2);
  32201. if (Array.isArray(o2) || (it2 = _unsupportedIterableToArray$a(o2)) || allowArrayLike && o2 && typeof o2.length === "number") {
  32202. if (it2)
  32203. o2 = it2;
  32204. var i2 = 0;
  32205. return function() {
  32206. if (i2 >= o2.length)
  32207. return { done: true };
  32208. return { done: false, value: o2[i2++] };
  32209. };
  32210. }
  32211. throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  32212. }
  32213. function _unsupportedIterableToArray$a(o2, minLen) {
  32214. if (!o2)
  32215. return;
  32216. if (typeof o2 === "string")
  32217. return _arrayLikeToArray$a(o2, minLen);
  32218. var n2 = Object.prototype.toString.call(o2).slice(8, -1);
  32219. if (n2 === "Object" && o2.constructor)
  32220. n2 = o2.constructor.name;
  32221. if (n2 === "Map" || n2 === "Set")
  32222. return Array.from(o2);
  32223. if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2))
  32224. return _arrayLikeToArray$a(o2, minLen);
  32225. }
  32226. function _arrayLikeToArray$a(arr, len) {
  32227. if (len == null || len > arr.length)
  32228. len = arr.length;
  32229. for (var i2 = 0, arr2 = new Array(len); i2 < len; i2++) {
  32230. arr2[i2] = arr[i2];
  32231. }
  32232. return arr2;
  32233. }
  32234. function parseIncompletePhoneNumber(string) {
  32235. var result2 = "";
  32236. for (var _iterator = _createForOfIteratorHelperLoose$7(string.split("")), _step; !(_step = _iterator()).done; ) {
  32237. var character = _step.value;
  32238. result2 += parsePhoneNumberCharacter(character, result2) || "";
  32239. }
  32240. return result2;
  32241. }
  32242. function parsePhoneNumberCharacter(character, prevParsedCharacters, emitEvent) {
  32243. if (character === "+") {
  32244. if (prevParsedCharacters) {
  32245. if (typeof emitEvent === "function") {
  32246. emitEvent("end");
  32247. }
  32248. return;
  32249. }
  32250. return "+";
  32251. }
  32252. return parseDigit(character);
  32253. }
  32254. function _createForOfIteratorHelperLoose$6(o2, allowArrayLike) {
  32255. var it2 = typeof Symbol !== "undefined" && o2[Symbol.iterator] || o2["@@iterator"];
  32256. if (it2)
  32257. return (it2 = it2.call(o2)).next.bind(it2);
  32258. if (Array.isArray(o2) || (it2 = _unsupportedIterableToArray$9(o2)) || allowArrayLike && o2 && typeof o2.length === "number") {
  32259. if (it2)
  32260. o2 = it2;
  32261. var i2 = 0;
  32262. return function() {
  32263. if (i2 >= o2.length)
  32264. return { done: true };
  32265. return { done: false, value: o2[i2++] };
  32266. };
  32267. }
  32268. throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  32269. }
  32270. function _unsupportedIterableToArray$9(o2, minLen) {
  32271. if (!o2)
  32272. return;
  32273. if (typeof o2 === "string")
  32274. return _arrayLikeToArray$9(o2, minLen);
  32275. var n2 = Object.prototype.toString.call(o2).slice(8, -1);
  32276. if (n2 === "Object" && o2.constructor)
  32277. n2 = o2.constructor.name;
  32278. if (n2 === "Map" || n2 === "Set")
  32279. return Array.from(o2);
  32280. if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2))
  32281. return _arrayLikeToArray$9(o2, minLen);
  32282. }
  32283. function _arrayLikeToArray$9(arr, len) {
  32284. if (len == null || len > arr.length)
  32285. len = arr.length;
  32286. for (var i2 = 0, arr2 = new Array(len); i2 < len; i2++) {
  32287. arr2[i2] = arr[i2];
  32288. }
  32289. return arr2;
  32290. }
  32291. function mergeArrays(a2, b2) {
  32292. var merged = a2.slice();
  32293. for (var _iterator = _createForOfIteratorHelperLoose$6(b2), _step; !(_step = _iterator()).done; ) {
  32294. var element = _step.value;
  32295. if (a2.indexOf(element) < 0) {
  32296. merged.push(element);
  32297. }
  32298. }
  32299. return merged.sort(function(a3, b3) {
  32300. return a3 - b3;
  32301. });
  32302. }
  32303. function checkNumberLength(nationalNumber, metadata2) {
  32304. return checkNumberLengthForType(nationalNumber, void 0, metadata2);
  32305. }
  32306. function checkNumberLengthForType(nationalNumber, type, metadata2) {
  32307. var type_info = metadata2.type(type);
  32308. var possible_lengths = type_info && type_info.possibleLengths() || metadata2.possibleLengths();
  32309. if (!possible_lengths) {
  32310. return "IS_POSSIBLE";
  32311. }
  32312. if (type === "FIXED_LINE_OR_MOBILE") {
  32313. if (!metadata2.type("FIXED_LINE")) {
  32314. return checkNumberLengthForType(nationalNumber, "MOBILE", metadata2);
  32315. }
  32316. var mobile_type = metadata2.type("MOBILE");
  32317. if (mobile_type) {
  32318. possible_lengths = mergeArrays(possible_lengths, mobile_type.possibleLengths());
  32319. }
  32320. } else if (type && !type_info) {
  32321. return "INVALID_LENGTH";
  32322. }
  32323. var actual_length = nationalNumber.length;
  32324. var minimum_length = possible_lengths[0];
  32325. if (minimum_length === actual_length) {
  32326. return "IS_POSSIBLE";
  32327. }
  32328. if (minimum_length > actual_length) {
  32329. return "TOO_SHORT";
  32330. }
  32331. if (possible_lengths[possible_lengths.length - 1] < actual_length) {
  32332. return "TOO_LONG";
  32333. }
  32334. return possible_lengths.indexOf(actual_length, 1) >= 0 ? "IS_POSSIBLE" : "INVALID_LENGTH";
  32335. }
  32336. function isPossiblePhoneNumber(input, options2, metadata2) {
  32337. if (options2 === void 0) {
  32338. options2 = {};
  32339. }
  32340. metadata2 = new Metadata(metadata2);
  32341. if (options2.v2) {
  32342. if (!input.countryCallingCode) {
  32343. throw new Error("Invalid phone number object passed");
  32344. }
  32345. metadata2.selectNumberingPlan(input.countryCallingCode);
  32346. } else {
  32347. if (!input.phone) {
  32348. return false;
  32349. }
  32350. if (input.country) {
  32351. if (!metadata2.hasCountry(input.country)) {
  32352. throw new Error("Unknown country: ".concat(input.country));
  32353. }
  32354. metadata2.country(input.country);
  32355. } else {
  32356. if (!input.countryCallingCode) {
  32357. throw new Error("Invalid phone number object passed");
  32358. }
  32359. metadata2.selectNumberingPlan(input.countryCallingCode);
  32360. }
  32361. }
  32362. if (metadata2.possibleLengths()) {
  32363. return isPossibleNumber(input.phone || input.nationalNumber, metadata2);
  32364. } else {
  32365. if (input.countryCallingCode && metadata2.isNonGeographicCallingCode(input.countryCallingCode)) {
  32366. return true;
  32367. } else {
  32368. throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.');
  32369. }
  32370. }
  32371. }
  32372. function isPossibleNumber(nationalNumber, metadata2) {
  32373. switch (checkNumberLength(nationalNumber, metadata2)) {
  32374. case "IS_POSSIBLE":
  32375. return true;
  32376. default:
  32377. return false;
  32378. }
  32379. }
  32380. function matchesEntirely(text, regular_expression) {
  32381. text = text || "";
  32382. return new RegExp("^(?:" + regular_expression + ")$").test(text);
  32383. }
  32384. function _createForOfIteratorHelperLoose$5(o2, allowArrayLike) {
  32385. var it2 = typeof Symbol !== "undefined" && o2[Symbol.iterator] || o2["@@iterator"];
  32386. if (it2)
  32387. return (it2 = it2.call(o2)).next.bind(it2);
  32388. if (Array.isArray(o2) || (it2 = _unsupportedIterableToArray$8(o2)) || allowArrayLike && o2 && typeof o2.length === "number") {
  32389. if (it2)
  32390. o2 = it2;
  32391. var i2 = 0;
  32392. return function() {
  32393. if (i2 >= o2.length)
  32394. return { done: true };
  32395. return { done: false, value: o2[i2++] };
  32396. };
  32397. }
  32398. throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  32399. }
  32400. function _unsupportedIterableToArray$8(o2, minLen) {
  32401. if (!o2)
  32402. return;
  32403. if (typeof o2 === "string")
  32404. return _arrayLikeToArray$8(o2, minLen);
  32405. var n2 = Object.prototype.toString.call(o2).slice(8, -1);
  32406. if (n2 === "Object" && o2.constructor)
  32407. n2 = o2.constructor.name;
  32408. if (n2 === "Map" || n2 === "Set")
  32409. return Array.from(o2);
  32410. if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2))
  32411. return _arrayLikeToArray$8(o2, minLen);
  32412. }
  32413. function _arrayLikeToArray$8(arr, len) {
  32414. if (len == null || len > arr.length)
  32415. len = arr.length;
  32416. for (var i2 = 0, arr2 = new Array(len); i2 < len; i2++) {
  32417. arr2[i2] = arr[i2];
  32418. }
  32419. return arr2;
  32420. }
  32421. var NON_FIXED_LINE_PHONE_TYPES = ["MOBILE", "PREMIUM_RATE", "TOLL_FREE", "SHARED_COST", "VOIP", "PERSONAL_NUMBER", "PAGER", "UAN", "VOICEMAIL"];
  32422. function getNumberType(input, options2, metadata2) {
  32423. options2 = options2 || {};
  32424. if (!input.country && !input.countryCallingCode) {
  32425. return;
  32426. }
  32427. metadata2 = new Metadata(metadata2);
  32428. metadata2.selectNumberingPlan(input.country, input.countryCallingCode);
  32429. var nationalNumber = options2.v2 ? input.nationalNumber : input.phone;
  32430. if (!matchesEntirely(nationalNumber, metadata2.nationalNumberPattern())) {
  32431. return;
  32432. }
  32433. if (isNumberTypeEqualTo(nationalNumber, "FIXED_LINE", metadata2)) {
  32434. if (metadata2.type("MOBILE") && metadata2.type("MOBILE").pattern() === "") {
  32435. return "FIXED_LINE_OR_MOBILE";
  32436. }
  32437. if (!metadata2.type("MOBILE")) {
  32438. return "FIXED_LINE_OR_MOBILE";
  32439. }
  32440. if (isNumberTypeEqualTo(nationalNumber, "MOBILE", metadata2)) {
  32441. return "FIXED_LINE_OR_MOBILE";
  32442. }
  32443. return "FIXED_LINE";
  32444. }
  32445. for (var _iterator = _createForOfIteratorHelperLoose$5(NON_FIXED_LINE_PHONE_TYPES), _step; !(_step = _iterator()).done; ) {
  32446. var type = _step.value;
  32447. if (isNumberTypeEqualTo(nationalNumber, type, metadata2)) {
  32448. return type;
  32449. }
  32450. }
  32451. }
  32452. function isNumberTypeEqualTo(nationalNumber, type, metadata2) {
  32453. type = metadata2.type(type);
  32454. if (!type || !type.pattern()) {
  32455. return false;
  32456. }
  32457. if (type.possibleLengths() && type.possibleLengths().indexOf(nationalNumber.length) < 0) {
  32458. return false;
  32459. }
  32460. return matchesEntirely(nationalNumber, type.pattern());
  32461. }
  32462. function isValidNumber(input, options2, metadata2) {
  32463. options2 = options2 || {};
  32464. metadata2 = new Metadata(metadata2);
  32465. metadata2.selectNumberingPlan(input.country, input.countryCallingCode);
  32466. if (metadata2.hasTypes()) {
  32467. return getNumberType(input, options2, metadata2.metadata) !== void 0;
  32468. }
  32469. var nationalNumber = options2.v2 ? input.nationalNumber : input.phone;
  32470. return matchesEntirely(nationalNumber, metadata2.nationalNumberPattern());
  32471. }
  32472. function getPossibleCountriesForNumber(callingCode, nationalNumber, metadata2) {
  32473. var _metadata = new Metadata(metadata2);
  32474. var possibleCountries = _metadata.getCountryCodesForCallingCode(callingCode);
  32475. if (!possibleCountries) {
  32476. return [];
  32477. }
  32478. return possibleCountries.filter(function(country) {
  32479. return couldNationalNumberBelongToCountry(nationalNumber, country, metadata2);
  32480. });
  32481. }
  32482. function couldNationalNumberBelongToCountry(nationalNumber, country, metadata2) {
  32483. var _metadata = new Metadata(metadata2);
  32484. _metadata.selectNumberingPlan(country);
  32485. if (_metadata.numberingPlan.possibleLengths().indexOf(nationalNumber.length) >= 0) {
  32486. return true;
  32487. }
  32488. return false;
  32489. }
  32490. function applyInternationalSeparatorStyle(formattedNumber) {
  32491. return formattedNumber.replace(new RegExp("[".concat(VALID_PUNCTUATION, "]+"), "g"), " ").trim();
  32492. }
  32493. var FIRST_GROUP_PATTERN = /(\$\d)/;
  32494. function formatNationalNumberUsingFormat(number2, format2, _ref) {
  32495. var useInternationalFormat = _ref.useInternationalFormat, withNationalPrefix = _ref.withNationalPrefix;
  32496. _ref.carrierCode;
  32497. _ref.metadata;
  32498. var formattedNumber = number2.replace(new RegExp(format2.pattern()), useInternationalFormat ? format2.internationalFormat() : (
  32499. // This library doesn't use `domestic_carrier_code_formatting_rule`,
  32500. // because that one is only used when formatting phone numbers
  32501. // for dialing from a mobile phone, and this is not a dialing library.
  32502. // carrierCode && format.domesticCarrierCodeFormattingRule()
  32503. // // First, replace the $CC in the formatting rule with the desired carrier code.
  32504. // // Then, replace the $FG in the formatting rule with the first group
  32505. // // and the carrier code combined in the appropriate way.
  32506. // ? format.format().replace(FIRST_GROUP_PATTERN, format.domesticCarrierCodeFormattingRule().replace('$CC', carrierCode))
  32507. // : (
  32508. // withNationalPrefix && format.nationalPrefixFormattingRule()
  32509. // ? format.format().replace(FIRST_GROUP_PATTERN, format.nationalPrefixFormattingRule())
  32510. // : format.format()
  32511. // )
  32512. withNationalPrefix && format2.nationalPrefixFormattingRule() ? format2.format().replace(FIRST_GROUP_PATTERN, format2.nationalPrefixFormattingRule()) : format2.format()
  32513. ));
  32514. if (useInternationalFormat) {
  32515. return applyInternationalSeparatorStyle(formattedNumber);
  32516. }
  32517. return formattedNumber;
  32518. }
  32519. var SINGLE_IDD_PREFIX_REG_EXP = /^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;
  32520. function getIddPrefix(country, callingCode, metadata2) {
  32521. var countryMetadata = new Metadata(metadata2);
  32522. countryMetadata.selectNumberingPlan(country, callingCode);
  32523. if (countryMetadata.defaultIDDPrefix()) {
  32524. return countryMetadata.defaultIDDPrefix();
  32525. }
  32526. if (SINGLE_IDD_PREFIX_REG_EXP.test(countryMetadata.IDDPrefix())) {
  32527. return countryMetadata.IDDPrefix();
  32528. }
  32529. }
  32530. function formatRFC3966(_ref) {
  32531. var number2 = _ref.number, ext = _ref.ext;
  32532. if (!number2) {
  32533. return "";
  32534. }
  32535. if (number2[0] !== "+") {
  32536. throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');
  32537. }
  32538. return "tel:".concat(number2).concat(ext ? ";ext=" + ext : "");
  32539. }
  32540. function _createForOfIteratorHelperLoose$4(o2, allowArrayLike) {
  32541. var it2 = typeof Symbol !== "undefined" && o2[Symbol.iterator] || o2["@@iterator"];
  32542. if (it2)
  32543. return (it2 = it2.call(o2)).next.bind(it2);
  32544. if (Array.isArray(o2) || (it2 = _unsupportedIterableToArray$7(o2)) || allowArrayLike && o2 && typeof o2.length === "number") {
  32545. if (it2)
  32546. o2 = it2;
  32547. var i2 = 0;
  32548. return function() {
  32549. if (i2 >= o2.length)
  32550. return { done: true };
  32551. return { done: false, value: o2[i2++] };
  32552. };
  32553. }
  32554. throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  32555. }
  32556. function _unsupportedIterableToArray$7(o2, minLen) {
  32557. if (!o2)
  32558. return;
  32559. if (typeof o2 === "string")
  32560. return _arrayLikeToArray$7(o2, minLen);
  32561. var n2 = Object.prototype.toString.call(o2).slice(8, -1);
  32562. if (n2 === "Object" && o2.constructor)
  32563. n2 = o2.constructor.name;
  32564. if (n2 === "Map" || n2 === "Set")
  32565. return Array.from(o2);
  32566. if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2))
  32567. return _arrayLikeToArray$7(o2, minLen);
  32568. }
  32569. function _arrayLikeToArray$7(arr, len) {
  32570. if (len == null || len > arr.length)
  32571. len = arr.length;
  32572. for (var i2 = 0, arr2 = new Array(len); i2 < len; i2++) {
  32573. arr2[i2] = arr[i2];
  32574. }
  32575. return arr2;
  32576. }
  32577. function ownKeys$4(object2, enumerableOnly) {
  32578. var keys = Object.keys(object2);
  32579. if (Object.getOwnPropertySymbols) {
  32580. var symbols = Object.getOwnPropertySymbols(object2);
  32581. enumerableOnly && (symbols = symbols.filter(function(sym) {
  32582. return Object.getOwnPropertyDescriptor(object2, sym).enumerable;
  32583. })), keys.push.apply(keys, symbols);
  32584. }
  32585. return keys;
  32586. }
  32587. function _objectSpread$4(target) {
  32588. for (var i2 = 1; i2 < arguments.length; i2++) {
  32589. var source = null != arguments[i2] ? arguments[i2] : {};
  32590. i2 % 2 ? ownKeys$4(Object(source), true).forEach(function(key) {
  32591. _defineProperty$4(target, key, source[key]);
  32592. }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$4(Object(source)).forEach(function(key) {
  32593. Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
  32594. });
  32595. }
  32596. return target;
  32597. }
  32598. function _defineProperty$4(obj, key, value) {
  32599. if (key in obj) {
  32600. Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
  32601. } else {
  32602. obj[key] = value;
  32603. }
  32604. return obj;
  32605. }
  32606. var DEFAULT_OPTIONS = {
  32607. formatExtension: function formatExtension(formattedNumber, extension, metadata2) {
  32608. return "".concat(formattedNumber).concat(metadata2.ext()).concat(extension);
  32609. }
  32610. };
  32611. function formatNumber(input, format2, options2, metadata2) {
  32612. if (options2) {
  32613. options2 = _objectSpread$4(_objectSpread$4({}, DEFAULT_OPTIONS), options2);
  32614. } else {
  32615. options2 = DEFAULT_OPTIONS;
  32616. }
  32617. metadata2 = new Metadata(metadata2);
  32618. if (input.country && input.country !== "001") {
  32619. if (!metadata2.hasCountry(input.country)) {
  32620. throw new Error("Unknown country: ".concat(input.country));
  32621. }
  32622. metadata2.country(input.country);
  32623. } else if (input.countryCallingCode) {
  32624. metadata2.selectNumberingPlan(input.countryCallingCode);
  32625. } else
  32626. return input.phone || "";
  32627. var countryCallingCode = metadata2.countryCallingCode();
  32628. var nationalNumber = options2.v2 ? input.nationalNumber : input.phone;
  32629. var number2;
  32630. switch (format2) {
  32631. case "NATIONAL":
  32632. if (!nationalNumber) {
  32633. return "";
  32634. }
  32635. number2 = formatNationalNumber$1(nationalNumber, input.carrierCode, "NATIONAL", metadata2, options2);
  32636. return addExtension(number2, input.ext, metadata2, options2.formatExtension);
  32637. case "INTERNATIONAL":
  32638. if (!nationalNumber) {
  32639. return "+".concat(countryCallingCode);
  32640. }
  32641. number2 = formatNationalNumber$1(nationalNumber, null, "INTERNATIONAL", metadata2, options2);
  32642. number2 = "+".concat(countryCallingCode, " ").concat(number2);
  32643. return addExtension(number2, input.ext, metadata2, options2.formatExtension);
  32644. case "E.164":
  32645. return "+".concat(countryCallingCode).concat(nationalNumber);
  32646. case "RFC3966":
  32647. return formatRFC3966({
  32648. number: "+".concat(countryCallingCode).concat(nationalNumber),
  32649. ext: input.ext
  32650. });
  32651. case "IDD":
  32652. if (!options2.fromCountry) {
  32653. return;
  32654. }
  32655. var formattedNumber = formatIDD(nationalNumber, input.carrierCode, countryCallingCode, options2.fromCountry, metadata2);
  32656. return addExtension(formattedNumber, input.ext, metadata2, options2.formatExtension);
  32657. default:
  32658. throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(format2, '"'));
  32659. }
  32660. }
  32661. function formatNationalNumber$1(number2, carrierCode, formatAs, metadata2, options2) {
  32662. var format2 = chooseFormatForNumber(metadata2.formats(), number2);
  32663. if (!format2) {
  32664. return number2;
  32665. }
  32666. return formatNationalNumberUsingFormat(number2, format2, {
  32667. useInternationalFormat: formatAs === "INTERNATIONAL",
  32668. withNationalPrefix: format2.nationalPrefixIsOptionalWhenFormattingInNationalFormat() && options2 && options2.nationalPrefix === false ? false : true,
  32669. carrierCode,
  32670. metadata: metadata2
  32671. });
  32672. }
  32673. function chooseFormatForNumber(availableFormats, nationalNnumber) {
  32674. for (var _iterator = _createForOfIteratorHelperLoose$4(availableFormats), _step; !(_step = _iterator()).done; ) {
  32675. var format2 = _step.value;
  32676. if (format2.leadingDigitsPatterns().length > 0) {
  32677. var lastLeadingDigitsPattern = format2.leadingDigitsPatterns()[format2.leadingDigitsPatterns().length - 1];
  32678. if (nationalNnumber.search(lastLeadingDigitsPattern) !== 0) {
  32679. continue;
  32680. }
  32681. }
  32682. if (matchesEntirely(nationalNnumber, format2.pattern())) {
  32683. return format2;
  32684. }
  32685. }
  32686. }
  32687. function addExtension(formattedNumber, ext, metadata2, formatExtension) {
  32688. return ext ? formatExtension(formattedNumber, ext, metadata2) : formattedNumber;
  32689. }
  32690. function formatIDD(nationalNumber, carrierCode, countryCallingCode, fromCountry, metadata2) {
  32691. var fromCountryCallingCode = getCountryCallingCode(fromCountry, metadata2.metadata);
  32692. if (fromCountryCallingCode === countryCallingCode) {
  32693. var formattedNumber = formatNationalNumber$1(nationalNumber, carrierCode, "NATIONAL", metadata2);
  32694. if (countryCallingCode === "1") {
  32695. return countryCallingCode + " " + formattedNumber;
  32696. }
  32697. return formattedNumber;
  32698. }
  32699. var iddPrefix = getIddPrefix(fromCountry, void 0, metadata2.metadata);
  32700. if (iddPrefix) {
  32701. return "".concat(iddPrefix, " ").concat(countryCallingCode, " ").concat(formatNationalNumber$1(nationalNumber, null, "INTERNATIONAL", metadata2));
  32702. }
  32703. }
  32704. function ownKeys$3(object2, enumerableOnly) {
  32705. var keys = Object.keys(object2);
  32706. if (Object.getOwnPropertySymbols) {
  32707. var symbols = Object.getOwnPropertySymbols(object2);
  32708. enumerableOnly && (symbols = symbols.filter(function(sym) {
  32709. return Object.getOwnPropertyDescriptor(object2, sym).enumerable;
  32710. })), keys.push.apply(keys, symbols);
  32711. }
  32712. return keys;
  32713. }
  32714. function _objectSpread$3(target) {
  32715. for (var i2 = 1; i2 < arguments.length; i2++) {
  32716. var source = null != arguments[i2] ? arguments[i2] : {};
  32717. i2 % 2 ? ownKeys$3(Object(source), true).forEach(function(key) {
  32718. _defineProperty$3(target, key, source[key]);
  32719. }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$3(Object(source)).forEach(function(key) {
  32720. Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
  32721. });
  32722. }
  32723. return target;
  32724. }
  32725. function _defineProperty$3(obj, key, value) {
  32726. if (key in obj) {
  32727. Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
  32728. } else {
  32729. obj[key] = value;
  32730. }
  32731. return obj;
  32732. }
  32733. function _classCallCheck$6(instance, Constructor) {
  32734. if (!(instance instanceof Constructor)) {
  32735. throw new TypeError("Cannot call a class as a function");
  32736. }
  32737. }
  32738. function _defineProperties$6(target, props) {
  32739. for (var i2 = 0; i2 < props.length; i2++) {
  32740. var descriptor = props[i2];
  32741. descriptor.enumerable = descriptor.enumerable || false;
  32742. descriptor.configurable = true;
  32743. if ("value" in descriptor)
  32744. descriptor.writable = true;
  32745. Object.defineProperty(target, descriptor.key, descriptor);
  32746. }
  32747. }
  32748. function _createClass$6(Constructor, protoProps, staticProps) {
  32749. if (protoProps)
  32750. _defineProperties$6(Constructor.prototype, protoProps);
  32751. if (staticProps)
  32752. _defineProperties$6(Constructor, staticProps);
  32753. Object.defineProperty(Constructor, "prototype", { writable: false });
  32754. return Constructor;
  32755. }
  32756. var PhoneNumber = /* @__PURE__ */ function() {
  32757. function PhoneNumber2(countryOrCountryCallingCode, nationalNumber, metadata2) {
  32758. _classCallCheck$6(this, PhoneNumber2);
  32759. if (!countryOrCountryCallingCode) {
  32760. throw new TypeError("`country` or `countryCallingCode` not passed");
  32761. }
  32762. if (!nationalNumber) {
  32763. throw new TypeError("`nationalNumber` not passed");
  32764. }
  32765. if (!metadata2) {
  32766. throw new TypeError("`metadata` not passed");
  32767. }
  32768. var _getCountryAndCountry = getCountryAndCountryCallingCode(countryOrCountryCallingCode, metadata2), country = _getCountryAndCountry.country, countryCallingCode = _getCountryAndCountry.countryCallingCode;
  32769. this.country = country;
  32770. this.countryCallingCode = countryCallingCode;
  32771. this.nationalNumber = nationalNumber;
  32772. this.number = "+" + this.countryCallingCode + this.nationalNumber;
  32773. this.getMetadata = function() {
  32774. return metadata2;
  32775. };
  32776. }
  32777. _createClass$6(PhoneNumber2, [{
  32778. key: "setExt",
  32779. value: function setExt(ext) {
  32780. this.ext = ext;
  32781. }
  32782. }, {
  32783. key: "getPossibleCountries",
  32784. value: function getPossibleCountries() {
  32785. if (this.country) {
  32786. return [this.country];
  32787. }
  32788. return getPossibleCountriesForNumber(this.countryCallingCode, this.nationalNumber, this.getMetadata());
  32789. }
  32790. }, {
  32791. key: "isPossible",
  32792. value: function isPossible() {
  32793. return isPossiblePhoneNumber(this, {
  32794. v2: true
  32795. }, this.getMetadata());
  32796. }
  32797. }, {
  32798. key: "isValid",
  32799. value: function isValid() {
  32800. return isValidNumber(this, {
  32801. v2: true
  32802. }, this.getMetadata());
  32803. }
  32804. }, {
  32805. key: "isNonGeographic",
  32806. value: function isNonGeographic() {
  32807. var metadata2 = new Metadata(this.getMetadata());
  32808. return metadata2.isNonGeographicCallingCode(this.countryCallingCode);
  32809. }
  32810. }, {
  32811. key: "isEqual",
  32812. value: function isEqual(phoneNumber) {
  32813. return this.number === phoneNumber.number && this.ext === phoneNumber.ext;
  32814. }
  32815. // This function was originally meant to be an equivalent for `validatePhoneNumberLength()`,
  32816. // but later it was found out that it doesn't include the possible `TOO_SHORT` result
  32817. // returned from `parsePhoneNumberWithError()` in the original `validatePhoneNumberLength()`,
  32818. // so eventually I simply commented out this method from the `PhoneNumber` class
  32819. // and just left the `validatePhoneNumberLength()` function, even though that one would require
  32820. // and additional step to also validate the actual country / calling code of the phone number.
  32821. // validateLength() {
  32822. // const metadata = new Metadata(this.getMetadata())
  32823. // metadata.selectNumberingPlan(this.countryCallingCode)
  32824. // const result = checkNumberLength(this.nationalNumber, metadata)
  32825. // if (result !== 'IS_POSSIBLE') {
  32826. // return result
  32827. // }
  32828. // }
  32829. }, {
  32830. key: "getType",
  32831. value: function getType2() {
  32832. return getNumberType(this, {
  32833. v2: true
  32834. }, this.getMetadata());
  32835. }
  32836. }, {
  32837. key: "format",
  32838. value: function format2(_format, options2) {
  32839. return formatNumber(this, _format, options2 ? _objectSpread$3(_objectSpread$3({}, options2), {}, {
  32840. v2: true
  32841. }) : {
  32842. v2: true
  32843. }, this.getMetadata());
  32844. }
  32845. }, {
  32846. key: "formatNational",
  32847. value: function formatNational(options2) {
  32848. return this.format("NATIONAL", options2);
  32849. }
  32850. }, {
  32851. key: "formatInternational",
  32852. value: function formatInternational(options2) {
  32853. return this.format("INTERNATIONAL", options2);
  32854. }
  32855. }, {
  32856. key: "getURI",
  32857. value: function getURI(options2) {
  32858. return this.format("RFC3966", options2);
  32859. }
  32860. }]);
  32861. return PhoneNumber2;
  32862. }();
  32863. var isCountryCode = function isCountryCode2(value) {
  32864. return /^[A-Z]{2}$/.test(value);
  32865. };
  32866. function getCountryAndCountryCallingCode(countryOrCountryCallingCode, metadataJson) {
  32867. var country;
  32868. var countryCallingCode;
  32869. var metadata2 = new Metadata(metadataJson);
  32870. if (isCountryCode(countryOrCountryCallingCode)) {
  32871. country = countryOrCountryCallingCode;
  32872. metadata2.selectNumberingPlan(country);
  32873. countryCallingCode = metadata2.countryCallingCode();
  32874. } else {
  32875. countryCallingCode = countryOrCountryCallingCode;
  32876. }
  32877. return {
  32878. country,
  32879. countryCallingCode
  32880. };
  32881. }
  32882. var CAPTURING_DIGIT_PATTERN = new RegExp("([" + VALID_DIGITS + "])");
  32883. function stripIddPrefix(number2, country, callingCode, metadata2) {
  32884. if (!country) {
  32885. return;
  32886. }
  32887. var countryMetadata = new Metadata(metadata2);
  32888. countryMetadata.selectNumberingPlan(country, callingCode);
  32889. var IDDPrefixPattern = new RegExp(countryMetadata.IDDPrefix());
  32890. if (number2.search(IDDPrefixPattern) !== 0) {
  32891. return;
  32892. }
  32893. number2 = number2.slice(number2.match(IDDPrefixPattern)[0].length);
  32894. var matchedGroups = number2.match(CAPTURING_DIGIT_PATTERN);
  32895. if (matchedGroups && matchedGroups[1] != null && matchedGroups[1].length > 0) {
  32896. if (matchedGroups[1] === "0") {
  32897. return;
  32898. }
  32899. }
  32900. return number2;
  32901. }
  32902. function extractNationalNumberFromPossiblyIncompleteNumber(number2, metadata2) {
  32903. if (number2 && metadata2.numberingPlan.nationalPrefixForParsing()) {
  32904. var prefixPattern = new RegExp("^(?:" + metadata2.numberingPlan.nationalPrefixForParsing() + ")");
  32905. var prefixMatch = prefixPattern.exec(number2);
  32906. if (prefixMatch) {
  32907. var nationalNumber;
  32908. var carrierCode;
  32909. var capturedGroupsCount = prefixMatch.length - 1;
  32910. var hasCapturedGroups = capturedGroupsCount > 0 && prefixMatch[capturedGroupsCount];
  32911. if (metadata2.nationalPrefixTransformRule() && hasCapturedGroups) {
  32912. nationalNumber = number2.replace(prefixPattern, metadata2.nationalPrefixTransformRule());
  32913. if (capturedGroupsCount > 1) {
  32914. carrierCode = prefixMatch[1];
  32915. }
  32916. } else {
  32917. var prefixBeforeNationalNumber = prefixMatch[0];
  32918. nationalNumber = number2.slice(prefixBeforeNationalNumber.length);
  32919. if (hasCapturedGroups) {
  32920. carrierCode = prefixMatch[1];
  32921. }
  32922. }
  32923. var nationalPrefix;
  32924. if (hasCapturedGroups) {
  32925. var possiblePositionOfTheFirstCapturedGroup = number2.indexOf(prefixMatch[1]);
  32926. var possibleNationalPrefix = number2.slice(0, possiblePositionOfTheFirstCapturedGroup);
  32927. if (possibleNationalPrefix === metadata2.numberingPlan.nationalPrefix()) {
  32928. nationalPrefix = metadata2.numberingPlan.nationalPrefix();
  32929. }
  32930. } else {
  32931. nationalPrefix = prefixMatch[0];
  32932. }
  32933. return {
  32934. nationalNumber,
  32935. nationalPrefix,
  32936. carrierCode
  32937. };
  32938. }
  32939. }
  32940. return {
  32941. nationalNumber: number2
  32942. };
  32943. }
  32944. function extractNationalNumber(number2, metadata2) {
  32945. var _extractNationalNumbe = extractNationalNumberFromPossiblyIncompleteNumber(number2, metadata2), carrierCode = _extractNationalNumbe.carrierCode, nationalNumber = _extractNationalNumbe.nationalNumber;
  32946. if (nationalNumber !== number2) {
  32947. if (!shouldHaveExtractedNationalPrefix(number2, nationalNumber, metadata2)) {
  32948. return {
  32949. nationalNumber: number2
  32950. };
  32951. }
  32952. if (metadata2.possibleLengths()) {
  32953. if (!isPossibleIncompleteNationalNumber(nationalNumber, metadata2)) {
  32954. return {
  32955. nationalNumber: number2
  32956. };
  32957. }
  32958. }
  32959. }
  32960. return {
  32961. nationalNumber,
  32962. carrierCode
  32963. };
  32964. }
  32965. function shouldHaveExtractedNationalPrefix(nationalNumberBefore, nationalNumberAfter, metadata2) {
  32966. if (matchesEntirely(nationalNumberBefore, metadata2.nationalNumberPattern()) && !matchesEntirely(nationalNumberAfter, metadata2.nationalNumberPattern())) {
  32967. return false;
  32968. }
  32969. return true;
  32970. }
  32971. function isPossibleIncompleteNationalNumber(nationalNumber, metadata2) {
  32972. switch (checkNumberLength(nationalNumber, metadata2)) {
  32973. case "TOO_SHORT":
  32974. case "INVALID_LENGTH":
  32975. return false;
  32976. default:
  32977. return true;
  32978. }
  32979. }
  32980. function extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(number2, country, callingCode, metadata2) {
  32981. var countryCallingCode = country ? getCountryCallingCode(country, metadata2) : callingCode;
  32982. if (number2.indexOf(countryCallingCode) === 0) {
  32983. metadata2 = new Metadata(metadata2);
  32984. metadata2.selectNumberingPlan(country, callingCode);
  32985. var possibleShorterNumber = number2.slice(countryCallingCode.length);
  32986. var _extractNationalNumbe = extractNationalNumber(possibleShorterNumber, metadata2), possibleShorterNationalNumber = _extractNationalNumbe.nationalNumber;
  32987. var _extractNationalNumbe2 = extractNationalNumber(number2, metadata2), nationalNumber = _extractNationalNumbe2.nationalNumber;
  32988. if (!matchesEntirely(nationalNumber, metadata2.nationalNumberPattern()) && matchesEntirely(possibleShorterNationalNumber, metadata2.nationalNumberPattern()) || checkNumberLength(nationalNumber, metadata2) === "TOO_LONG") {
  32989. return {
  32990. countryCallingCode,
  32991. number: possibleShorterNumber
  32992. };
  32993. }
  32994. }
  32995. return {
  32996. number: number2
  32997. };
  32998. }
  32999. function extractCountryCallingCode(number2, country, callingCode, metadata2) {
  33000. if (!number2) {
  33001. return {};
  33002. }
  33003. var isNumberWithIddPrefix;
  33004. if (number2[0] !== "+") {
  33005. var numberWithoutIDD = stripIddPrefix(number2, country, callingCode, metadata2);
  33006. if (numberWithoutIDD && numberWithoutIDD !== number2) {
  33007. isNumberWithIddPrefix = true;
  33008. number2 = "+" + numberWithoutIDD;
  33009. } else {
  33010. if (country || callingCode) {
  33011. var _extractCountryCallin = extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(number2, country, callingCode, metadata2), countryCallingCode = _extractCountryCallin.countryCallingCode, shorterNumber = _extractCountryCallin.number;
  33012. if (countryCallingCode) {
  33013. return {
  33014. countryCallingCodeSource: "FROM_NUMBER_WITHOUT_PLUS_SIGN",
  33015. countryCallingCode,
  33016. number: shorterNumber
  33017. };
  33018. }
  33019. }
  33020. return {
  33021. // No need to set it to `UNSPECIFIED`. It can be just `undefined`.
  33022. // countryCallingCodeSource: 'UNSPECIFIED',
  33023. number: number2
  33024. };
  33025. }
  33026. }
  33027. if (number2[1] === "0") {
  33028. return {};
  33029. }
  33030. metadata2 = new Metadata(metadata2);
  33031. var i2 = 2;
  33032. while (i2 - 1 <= MAX_LENGTH_COUNTRY_CODE && i2 <= number2.length) {
  33033. var _countryCallingCode = number2.slice(1, i2);
  33034. if (metadata2.hasCallingCode(_countryCallingCode)) {
  33035. metadata2.selectNumberingPlan(_countryCallingCode);
  33036. return {
  33037. countryCallingCodeSource: isNumberWithIddPrefix ? "FROM_NUMBER_WITH_IDD" : "FROM_NUMBER_WITH_PLUS_SIGN",
  33038. countryCallingCode: _countryCallingCode,
  33039. number: number2.slice(i2)
  33040. };
  33041. }
  33042. i2++;
  33043. }
  33044. return {};
  33045. }
  33046. function _createForOfIteratorHelperLoose$3(o2, allowArrayLike) {
  33047. var it2 = typeof Symbol !== "undefined" && o2[Symbol.iterator] || o2["@@iterator"];
  33048. if (it2)
  33049. return (it2 = it2.call(o2)).next.bind(it2);
  33050. if (Array.isArray(o2) || (it2 = _unsupportedIterableToArray$6(o2)) || allowArrayLike && o2 && typeof o2.length === "number") {
  33051. if (it2)
  33052. o2 = it2;
  33053. var i2 = 0;
  33054. return function() {
  33055. if (i2 >= o2.length)
  33056. return { done: true };
  33057. return { done: false, value: o2[i2++] };
  33058. };
  33059. }
  33060. throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  33061. }
  33062. function _unsupportedIterableToArray$6(o2, minLen) {
  33063. if (!o2)
  33064. return;
  33065. if (typeof o2 === "string")
  33066. return _arrayLikeToArray$6(o2, minLen);
  33067. var n2 = Object.prototype.toString.call(o2).slice(8, -1);
  33068. if (n2 === "Object" && o2.constructor)
  33069. n2 = o2.constructor.name;
  33070. if (n2 === "Map" || n2 === "Set")
  33071. return Array.from(o2);
  33072. if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2))
  33073. return _arrayLikeToArray$6(o2, minLen);
  33074. }
  33075. function _arrayLikeToArray$6(arr, len) {
  33076. if (len == null || len > arr.length)
  33077. len = arr.length;
  33078. for (var i2 = 0, arr2 = new Array(len); i2 < len; i2++) {
  33079. arr2[i2] = arr[i2];
  33080. }
  33081. return arr2;
  33082. }
  33083. function getCountryByNationalNumber(nationalPhoneNumber, _ref) {
  33084. var countries = _ref.countries;
  33085. _ref.defaultCountry;
  33086. var metadata2 = _ref.metadata;
  33087. metadata2 = new Metadata(metadata2);
  33088. for (var _iterator = _createForOfIteratorHelperLoose$3(countries), _step; !(_step = _iterator()).done; ) {
  33089. var country = _step.value;
  33090. metadata2.country(country);
  33091. if (metadata2.leadingDigits()) {
  33092. if (nationalPhoneNumber && nationalPhoneNumber.search(metadata2.leadingDigits()) === 0) {
  33093. return country;
  33094. }
  33095. } else if (getNumberType({
  33096. phone: nationalPhoneNumber,
  33097. country
  33098. }, void 0, metadata2.metadata)) {
  33099. return country;
  33100. }
  33101. }
  33102. }
  33103. var USE_NON_GEOGRAPHIC_COUNTRY_CODE = false;
  33104. function getCountryByCallingCode(callingCode, _ref) {
  33105. var nationalPhoneNumber = _ref.nationalNumber, defaultCountry = _ref.defaultCountry, metadata2 = _ref.metadata;
  33106. if (USE_NON_GEOGRAPHIC_COUNTRY_CODE) {
  33107. if (metadata2.isNonGeographicCallingCode(callingCode)) {
  33108. return "001";
  33109. }
  33110. }
  33111. var possibleCountries = metadata2.getCountryCodesForCallingCode(callingCode);
  33112. if (!possibleCountries) {
  33113. return;
  33114. }
  33115. if (possibleCountries.length === 1) {
  33116. return possibleCountries[0];
  33117. }
  33118. return getCountryByNationalNumber(nationalPhoneNumber, {
  33119. countries: possibleCountries,
  33120. defaultCountry,
  33121. metadata: metadata2.metadata
  33122. });
  33123. }
  33124. var PLUS_SIGN = "+";
  33125. var RFC3966_VISUAL_SEPARATOR_ = "[\\-\\.\\(\\)]?";
  33126. var RFC3966_PHONE_DIGIT_ = "([" + VALID_DIGITS + "]|" + RFC3966_VISUAL_SEPARATOR_ + ")";
  33127. var RFC3966_GLOBAL_NUMBER_DIGITS_ = "^\\" + PLUS_SIGN + RFC3966_PHONE_DIGIT_ + "*[" + VALID_DIGITS + "]" + RFC3966_PHONE_DIGIT_ + "*$";
  33128. var RFC3966_GLOBAL_NUMBER_DIGITS_PATTERN_ = new RegExp(RFC3966_GLOBAL_NUMBER_DIGITS_, "g");
  33129. var ALPHANUM_ = VALID_DIGITS;
  33130. var RFC3966_DOMAINLABEL_ = "[" + ALPHANUM_ + "]+((\\-)*[" + ALPHANUM_ + "])*";
  33131. var VALID_ALPHA_ = "a-zA-Z";
  33132. var RFC3966_TOPLABEL_ = "[" + VALID_ALPHA_ + "]+((\\-)*[" + ALPHANUM_ + "])*";
  33133. var RFC3966_DOMAINNAME_ = "^(" + RFC3966_DOMAINLABEL_ + "\\.)*" + RFC3966_TOPLABEL_ + "\\.?$";
  33134. var RFC3966_DOMAINNAME_PATTERN_ = new RegExp(RFC3966_DOMAINNAME_, "g");
  33135. var RFC3966_PREFIX_ = "tel:";
  33136. var RFC3966_PHONE_CONTEXT_ = ";phone-context=";
  33137. var RFC3966_ISDN_SUBADDRESS_ = ";isub=";
  33138. function extractPhoneContext(numberToExtractFrom) {
  33139. var indexOfPhoneContext = numberToExtractFrom.indexOf(RFC3966_PHONE_CONTEXT_);
  33140. if (indexOfPhoneContext < 0) {
  33141. return null;
  33142. }
  33143. var phoneContextStart = indexOfPhoneContext + RFC3966_PHONE_CONTEXT_.length;
  33144. if (phoneContextStart >= numberToExtractFrom.length) {
  33145. return "";
  33146. }
  33147. var phoneContextEnd = numberToExtractFrom.indexOf(";", phoneContextStart);
  33148. if (phoneContextEnd >= 0) {
  33149. return numberToExtractFrom.substring(phoneContextStart, phoneContextEnd);
  33150. } else {
  33151. return numberToExtractFrom.substring(phoneContextStart);
  33152. }
  33153. }
  33154. function isPhoneContextValid(phoneContext) {
  33155. if (phoneContext === null) {
  33156. return true;
  33157. }
  33158. if (phoneContext.length === 0) {
  33159. return false;
  33160. }
  33161. return RFC3966_GLOBAL_NUMBER_DIGITS_PATTERN_.test(phoneContext) || RFC3966_DOMAINNAME_PATTERN_.test(phoneContext);
  33162. }
  33163. function extractFormattedPhoneNumberFromPossibleRfc3966NumberUri(numberToParse, _ref) {
  33164. var extractFormattedPhoneNumber2 = _ref.extractFormattedPhoneNumber;
  33165. var phoneContext = extractPhoneContext(numberToParse);
  33166. if (!isPhoneContextValid(phoneContext)) {
  33167. throw new ParseError("NOT_A_NUMBER");
  33168. }
  33169. var phoneNumberString;
  33170. if (phoneContext === null) {
  33171. phoneNumberString = extractFormattedPhoneNumber2(numberToParse) || "";
  33172. } else {
  33173. phoneNumberString = "";
  33174. if (phoneContext.charAt(0) === PLUS_SIGN) {
  33175. phoneNumberString += phoneContext;
  33176. }
  33177. var indexOfRfc3966Prefix = numberToParse.indexOf(RFC3966_PREFIX_);
  33178. var indexOfNationalNumber;
  33179. if (indexOfRfc3966Prefix >= 0) {
  33180. indexOfNationalNumber = indexOfRfc3966Prefix + RFC3966_PREFIX_.length;
  33181. } else {
  33182. indexOfNationalNumber = 0;
  33183. }
  33184. var indexOfPhoneContext = numberToParse.indexOf(RFC3966_PHONE_CONTEXT_);
  33185. phoneNumberString += numberToParse.substring(indexOfNationalNumber, indexOfPhoneContext);
  33186. }
  33187. var indexOfIsdn = phoneNumberString.indexOf(RFC3966_ISDN_SUBADDRESS_);
  33188. if (indexOfIsdn > 0) {
  33189. phoneNumberString = phoneNumberString.substring(0, indexOfIsdn);
  33190. }
  33191. if (phoneNumberString !== "") {
  33192. return phoneNumberString;
  33193. }
  33194. }
  33195. var MAX_INPUT_STRING_LENGTH = 250;
  33196. var PHONE_NUMBER_START_PATTERN = new RegExp("[" + PLUS_CHARS + VALID_DIGITS + "]");
  33197. var AFTER_PHONE_NUMBER_END_PATTERN = new RegExp("[^" + VALID_DIGITS + "#]+$");
  33198. function parse(text, options2, metadata2) {
  33199. options2 = options2 || {};
  33200. metadata2 = new Metadata(metadata2);
  33201. if (options2.defaultCountry && !metadata2.hasCountry(options2.defaultCountry)) {
  33202. if (options2.v2) {
  33203. throw new ParseError("INVALID_COUNTRY");
  33204. }
  33205. throw new Error("Unknown country: ".concat(options2.defaultCountry));
  33206. }
  33207. var _parseInput = parseInput(text, options2.v2, options2.extract), formattedPhoneNumber = _parseInput.number, ext = _parseInput.ext, error2 = _parseInput.error;
  33208. if (!formattedPhoneNumber) {
  33209. if (options2.v2) {
  33210. if (error2 === "TOO_SHORT") {
  33211. throw new ParseError("TOO_SHORT");
  33212. }
  33213. throw new ParseError("NOT_A_NUMBER");
  33214. }
  33215. return {};
  33216. }
  33217. var _parsePhoneNumber = parsePhoneNumber$4(formattedPhoneNumber, options2.defaultCountry, options2.defaultCallingCode, metadata2), country = _parsePhoneNumber.country, nationalNumber = _parsePhoneNumber.nationalNumber, countryCallingCode = _parsePhoneNumber.countryCallingCode, countryCallingCodeSource = _parsePhoneNumber.countryCallingCodeSource, carrierCode = _parsePhoneNumber.carrierCode;
  33218. if (!metadata2.hasSelectedNumberingPlan()) {
  33219. if (options2.v2) {
  33220. throw new ParseError("INVALID_COUNTRY");
  33221. }
  33222. return {};
  33223. }
  33224. if (!nationalNumber || nationalNumber.length < MIN_LENGTH_FOR_NSN) {
  33225. if (options2.v2) {
  33226. throw new ParseError("TOO_SHORT");
  33227. }
  33228. return {};
  33229. }
  33230. if (nationalNumber.length > MAX_LENGTH_FOR_NSN) {
  33231. if (options2.v2) {
  33232. throw new ParseError("TOO_LONG");
  33233. }
  33234. return {};
  33235. }
  33236. if (options2.v2) {
  33237. var phoneNumber = new PhoneNumber(countryCallingCode, nationalNumber, metadata2.metadata);
  33238. if (country) {
  33239. phoneNumber.country = country;
  33240. }
  33241. if (carrierCode) {
  33242. phoneNumber.carrierCode = carrierCode;
  33243. }
  33244. if (ext) {
  33245. phoneNumber.ext = ext;
  33246. }
  33247. phoneNumber.__countryCallingCodeSource = countryCallingCodeSource;
  33248. return phoneNumber;
  33249. }
  33250. var valid = (options2.extended ? metadata2.hasSelectedNumberingPlan() : country) ? matchesEntirely(nationalNumber, metadata2.nationalNumberPattern()) : false;
  33251. if (!options2.extended) {
  33252. return valid ? result(country, nationalNumber, ext) : {};
  33253. }
  33254. return {
  33255. country,
  33256. countryCallingCode,
  33257. carrierCode,
  33258. valid,
  33259. possible: valid ? true : options2.extended === true && metadata2.possibleLengths() && isPossibleNumber(nationalNumber, metadata2) ? true : false,
  33260. phone: nationalNumber,
  33261. ext
  33262. };
  33263. }
  33264. function _extractFormattedPhoneNumber(text, extract, throwOnError) {
  33265. if (!text) {
  33266. return;
  33267. }
  33268. if (text.length > MAX_INPUT_STRING_LENGTH) {
  33269. if (throwOnError) {
  33270. throw new ParseError("TOO_LONG");
  33271. }
  33272. return;
  33273. }
  33274. if (extract === false) {
  33275. return text;
  33276. }
  33277. var startsAt = text.search(PHONE_NUMBER_START_PATTERN);
  33278. if (startsAt < 0) {
  33279. return;
  33280. }
  33281. return text.slice(startsAt).replace(AFTER_PHONE_NUMBER_END_PATTERN, "");
  33282. }
  33283. function parseInput(text, v2, extract) {
  33284. var number2 = extractFormattedPhoneNumberFromPossibleRfc3966NumberUri(text, {
  33285. extractFormattedPhoneNumber: function extractFormattedPhoneNumber2(text2) {
  33286. return _extractFormattedPhoneNumber(text2, extract, v2);
  33287. }
  33288. });
  33289. if (!number2) {
  33290. return {};
  33291. }
  33292. if (!isViablePhoneNumber(number2)) {
  33293. if (isViablePhoneNumberStart(number2)) {
  33294. return {
  33295. error: "TOO_SHORT"
  33296. };
  33297. }
  33298. return {};
  33299. }
  33300. var withExtensionStripped = extractExtension(number2);
  33301. if (withExtensionStripped.ext) {
  33302. return withExtensionStripped;
  33303. }
  33304. return {
  33305. number: number2
  33306. };
  33307. }
  33308. function result(country, nationalNumber, ext) {
  33309. var result2 = {
  33310. country,
  33311. phone: nationalNumber
  33312. };
  33313. if (ext) {
  33314. result2.ext = ext;
  33315. }
  33316. return result2;
  33317. }
  33318. function parsePhoneNumber$4(formattedPhoneNumber, defaultCountry, defaultCallingCode, metadata2) {
  33319. var _extractCountryCallin = extractCountryCallingCode(parseIncompletePhoneNumber(formattedPhoneNumber), defaultCountry, defaultCallingCode, metadata2.metadata), countryCallingCodeSource = _extractCountryCallin.countryCallingCodeSource, countryCallingCode = _extractCountryCallin.countryCallingCode, number2 = _extractCountryCallin.number;
  33320. var country;
  33321. if (countryCallingCode) {
  33322. metadata2.selectNumberingPlan(countryCallingCode);
  33323. } else if (number2 && (defaultCountry || defaultCallingCode)) {
  33324. metadata2.selectNumberingPlan(defaultCountry, defaultCallingCode);
  33325. if (defaultCountry) {
  33326. country = defaultCountry;
  33327. }
  33328. countryCallingCode = defaultCallingCode || getCountryCallingCode(defaultCountry, metadata2.metadata);
  33329. } else
  33330. return {};
  33331. if (!number2) {
  33332. return {
  33333. countryCallingCodeSource,
  33334. countryCallingCode
  33335. };
  33336. }
  33337. var _extractNationalNumbe = extractNationalNumber(parseIncompletePhoneNumber(number2), metadata2), nationalNumber = _extractNationalNumbe.nationalNumber, carrierCode = _extractNationalNumbe.carrierCode;
  33338. var exactCountry = getCountryByCallingCode(countryCallingCode, {
  33339. nationalNumber,
  33340. defaultCountry,
  33341. metadata: metadata2
  33342. });
  33343. if (exactCountry) {
  33344. country = exactCountry;
  33345. if (exactCountry === "001")
  33346. ;
  33347. else {
  33348. metadata2.country(country);
  33349. }
  33350. }
  33351. return {
  33352. country,
  33353. countryCallingCode,
  33354. countryCallingCodeSource,
  33355. nationalNumber,
  33356. carrierCode
  33357. };
  33358. }
  33359. function ownKeys$2(object2, enumerableOnly) {
  33360. var keys = Object.keys(object2);
  33361. if (Object.getOwnPropertySymbols) {
  33362. var symbols = Object.getOwnPropertySymbols(object2);
  33363. enumerableOnly && (symbols = symbols.filter(function(sym) {
  33364. return Object.getOwnPropertyDescriptor(object2, sym).enumerable;
  33365. })), keys.push.apply(keys, symbols);
  33366. }
  33367. return keys;
  33368. }
  33369. function _objectSpread$2(target) {
  33370. for (var i2 = 1; i2 < arguments.length; i2++) {
  33371. var source = null != arguments[i2] ? arguments[i2] : {};
  33372. i2 % 2 ? ownKeys$2(Object(source), true).forEach(function(key) {
  33373. _defineProperty$2(target, key, source[key]);
  33374. }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$2(Object(source)).forEach(function(key) {
  33375. Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
  33376. });
  33377. }
  33378. return target;
  33379. }
  33380. function _defineProperty$2(obj, key, value) {
  33381. if (key in obj) {
  33382. Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
  33383. } else {
  33384. obj[key] = value;
  33385. }
  33386. return obj;
  33387. }
  33388. function parsePhoneNumberWithError(text, options2, metadata2) {
  33389. return parse(text, _objectSpread$2(_objectSpread$2({}, options2), {}, {
  33390. v2: true
  33391. }), metadata2);
  33392. }
  33393. function ownKeys$1(object2, enumerableOnly) {
  33394. var keys = Object.keys(object2);
  33395. if (Object.getOwnPropertySymbols) {
  33396. var symbols = Object.getOwnPropertySymbols(object2);
  33397. enumerableOnly && (symbols = symbols.filter(function(sym) {
  33398. return Object.getOwnPropertyDescriptor(object2, sym).enumerable;
  33399. })), keys.push.apply(keys, symbols);
  33400. }
  33401. return keys;
  33402. }
  33403. function _objectSpread$1(target) {
  33404. for (var i2 = 1; i2 < arguments.length; i2++) {
  33405. var source = null != arguments[i2] ? arguments[i2] : {};
  33406. i2 % 2 ? ownKeys$1(Object(source), true).forEach(function(key) {
  33407. _defineProperty$1(target, key, source[key]);
  33408. }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function(key) {
  33409. Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
  33410. });
  33411. }
  33412. return target;
  33413. }
  33414. function _defineProperty$1(obj, key, value) {
  33415. if (key in obj) {
  33416. Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
  33417. } else {
  33418. obj[key] = value;
  33419. }
  33420. return obj;
  33421. }
  33422. function _slicedToArray$2(arr, i2) {
  33423. return _arrayWithHoles$2(arr) || _iterableToArrayLimit$2(arr, i2) || _unsupportedIterableToArray$5(arr, i2) || _nonIterableRest$2();
  33424. }
  33425. function _nonIterableRest$2() {
  33426. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  33427. }
  33428. function _unsupportedIterableToArray$5(o2, minLen) {
  33429. if (!o2)
  33430. return;
  33431. if (typeof o2 === "string")
  33432. return _arrayLikeToArray$5(o2, minLen);
  33433. var n2 = Object.prototype.toString.call(o2).slice(8, -1);
  33434. if (n2 === "Object" && o2.constructor)
  33435. n2 = o2.constructor.name;
  33436. if (n2 === "Map" || n2 === "Set")
  33437. return Array.from(o2);
  33438. if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2))
  33439. return _arrayLikeToArray$5(o2, minLen);
  33440. }
  33441. function _arrayLikeToArray$5(arr, len) {
  33442. if (len == null || len > arr.length)
  33443. len = arr.length;
  33444. for (var i2 = 0, arr2 = new Array(len); i2 < len; i2++) {
  33445. arr2[i2] = arr[i2];
  33446. }
  33447. return arr2;
  33448. }
  33449. function _iterableToArrayLimit$2(arr, i2) {
  33450. var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
  33451. if (_i == null)
  33452. return;
  33453. var _arr = [];
  33454. var _n = true;
  33455. var _d = false;
  33456. var _s2, _e2;
  33457. try {
  33458. for (_i = _i.call(arr); !(_n = (_s2 = _i.next()).done); _n = true) {
  33459. _arr.push(_s2.value);
  33460. if (i2 && _arr.length === i2)
  33461. break;
  33462. }
  33463. } catch (err) {
  33464. _d = true;
  33465. _e2 = err;
  33466. } finally {
  33467. try {
  33468. if (!_n && _i["return"] != null)
  33469. _i["return"]();
  33470. } finally {
  33471. if (_d)
  33472. throw _e2;
  33473. }
  33474. }
  33475. return _arr;
  33476. }
  33477. function _arrayWithHoles$2(arr) {
  33478. if (Array.isArray(arr))
  33479. return arr;
  33480. }
  33481. function normalizeArguments(args) {
  33482. var _Array$prototype$slic = Array.prototype.slice.call(args), _Array$prototype$slic2 = _slicedToArray$2(_Array$prototype$slic, 4), arg_1 = _Array$prototype$slic2[0], arg_2 = _Array$prototype$slic2[1], arg_3 = _Array$prototype$slic2[2], arg_4 = _Array$prototype$slic2[3];
  33483. var text;
  33484. var options2;
  33485. var metadata2;
  33486. if (typeof arg_1 === "string") {
  33487. text = arg_1;
  33488. } else
  33489. throw new TypeError("A text for parsing must be a string.");
  33490. if (!arg_2 || typeof arg_2 === "string") {
  33491. if (arg_4) {
  33492. options2 = arg_3;
  33493. metadata2 = arg_4;
  33494. } else {
  33495. options2 = void 0;
  33496. metadata2 = arg_3;
  33497. }
  33498. if (arg_2) {
  33499. options2 = _objectSpread$1({
  33500. defaultCountry: arg_2
  33501. }, options2);
  33502. }
  33503. } else if (isObject$2(arg_2)) {
  33504. if (arg_3) {
  33505. options2 = arg_2;
  33506. metadata2 = arg_3;
  33507. } else {
  33508. metadata2 = arg_2;
  33509. }
  33510. } else
  33511. throw new Error("Invalid second argument: ".concat(arg_2));
  33512. return {
  33513. text,
  33514. options: options2,
  33515. metadata: metadata2
  33516. };
  33517. }
  33518. function ownKeys(object2, enumerableOnly) {
  33519. var keys = Object.keys(object2);
  33520. if (Object.getOwnPropertySymbols) {
  33521. var symbols = Object.getOwnPropertySymbols(object2);
  33522. enumerableOnly && (symbols = symbols.filter(function(sym) {
  33523. return Object.getOwnPropertyDescriptor(object2, sym).enumerable;
  33524. })), keys.push.apply(keys, symbols);
  33525. }
  33526. return keys;
  33527. }
  33528. function _objectSpread(target) {
  33529. for (var i2 = 1; i2 < arguments.length; i2++) {
  33530. var source = null != arguments[i2] ? arguments[i2] : {};
  33531. i2 % 2 ? ownKeys(Object(source), true).forEach(function(key) {
  33532. _defineProperty(target, key, source[key]);
  33533. }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
  33534. Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
  33535. });
  33536. }
  33537. return target;
  33538. }
  33539. function _defineProperty(obj, key, value) {
  33540. if (key in obj) {
  33541. Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
  33542. } else {
  33543. obj[key] = value;
  33544. }
  33545. return obj;
  33546. }
  33547. function parsePhoneNumber$3(text, options2, metadata2) {
  33548. if (options2 && options2.defaultCountry && !isSupportedCountry(options2.defaultCountry, metadata2)) {
  33549. options2 = _objectSpread(_objectSpread({}, options2), {}, {
  33550. defaultCountry: void 0
  33551. });
  33552. }
  33553. try {
  33554. return parsePhoneNumberWithError(text, options2, metadata2);
  33555. } catch (error2) {
  33556. if (error2 instanceof ParseError)
  33557. ;
  33558. else {
  33559. throw error2;
  33560. }
  33561. }
  33562. }
  33563. function parsePhoneNumber$2() {
  33564. var _normalizeArguments = normalizeArguments(arguments), text = _normalizeArguments.text, options2 = _normalizeArguments.options, metadata2 = _normalizeArguments.metadata;
  33565. return parsePhoneNumber$3(text, options2, metadata2);
  33566. }
  33567. function _classCallCheck$5(instance, Constructor) {
  33568. if (!(instance instanceof Constructor)) {
  33569. throw new TypeError("Cannot call a class as a function");
  33570. }
  33571. }
  33572. function _defineProperties$5(target, props) {
  33573. for (var i2 = 0; i2 < props.length; i2++) {
  33574. var descriptor = props[i2];
  33575. descriptor.enumerable = descriptor.enumerable || false;
  33576. descriptor.configurable = true;
  33577. if ("value" in descriptor)
  33578. descriptor.writable = true;
  33579. Object.defineProperty(target, descriptor.key, descriptor);
  33580. }
  33581. }
  33582. function _createClass$5(Constructor, protoProps, staticProps) {
  33583. if (protoProps)
  33584. _defineProperties$5(Constructor.prototype, protoProps);
  33585. if (staticProps)
  33586. _defineProperties$5(Constructor, staticProps);
  33587. Object.defineProperty(Constructor, "prototype", { writable: false });
  33588. return Constructor;
  33589. }
  33590. var AsYouTypeState = /* @__PURE__ */ function() {
  33591. function AsYouTypeState2(_ref) {
  33592. var onCountryChange = _ref.onCountryChange, onCallingCodeChange = _ref.onCallingCodeChange;
  33593. _classCallCheck$5(this, AsYouTypeState2);
  33594. this.onCountryChange = onCountryChange;
  33595. this.onCallingCodeChange = onCallingCodeChange;
  33596. }
  33597. _createClass$5(AsYouTypeState2, [{
  33598. key: "reset",
  33599. value: function reset(_ref2) {
  33600. var country = _ref2.country, callingCode = _ref2.callingCode;
  33601. this.international = false;
  33602. this.missingPlus = false;
  33603. this.IDDPrefix = void 0;
  33604. this.callingCode = void 0;
  33605. this.digits = "";
  33606. this.resetNationalSignificantNumber();
  33607. this.initCountryAndCallingCode(country, callingCode);
  33608. }
  33609. }, {
  33610. key: "resetNationalSignificantNumber",
  33611. value: function resetNationalSignificantNumber() {
  33612. this.nationalSignificantNumber = this.getNationalDigits();
  33613. this.nationalSignificantNumberMatchesInput = true;
  33614. this.nationalPrefix = void 0;
  33615. this.carrierCode = void 0;
  33616. this.complexPrefixBeforeNationalSignificantNumber = void 0;
  33617. }
  33618. }, {
  33619. key: "update",
  33620. value: function update(properties) {
  33621. for (var _i = 0, _Object$keys = Object.keys(properties); _i < _Object$keys.length; _i++) {
  33622. var key = _Object$keys[_i];
  33623. this[key] = properties[key];
  33624. }
  33625. }
  33626. }, {
  33627. key: "initCountryAndCallingCode",
  33628. value: function initCountryAndCallingCode(country, callingCode) {
  33629. this.setCountry(country);
  33630. this.setCallingCode(callingCode);
  33631. }
  33632. }, {
  33633. key: "setCountry",
  33634. value: function setCountry(country) {
  33635. this.country = country;
  33636. this.onCountryChange(country);
  33637. }
  33638. }, {
  33639. key: "setCallingCode",
  33640. value: function setCallingCode(callingCode) {
  33641. this.callingCode = callingCode;
  33642. this.onCallingCodeChange(callingCode, this.country);
  33643. }
  33644. }, {
  33645. key: "startInternationalNumber",
  33646. value: function startInternationalNumber(country, callingCode) {
  33647. this.international = true;
  33648. this.initCountryAndCallingCode(country, callingCode);
  33649. }
  33650. }, {
  33651. key: "appendDigits",
  33652. value: function appendDigits(nextDigits) {
  33653. this.digits += nextDigits;
  33654. }
  33655. }, {
  33656. key: "appendNationalSignificantNumberDigits",
  33657. value: function appendNationalSignificantNumberDigits(nextDigits) {
  33658. this.nationalSignificantNumber += nextDigits;
  33659. }
  33660. /**
  33661. * Returns the part of `this.digits` that corresponds to the national number.
  33662. * Basically, all digits that have been input by the user, except for the
  33663. * international prefix and the country calling code part
  33664. * (if the number is an international one).
  33665. * @return {string}
  33666. */
  33667. }, {
  33668. key: "getNationalDigits",
  33669. value: function getNationalDigits() {
  33670. if (this.international) {
  33671. return this.digits.slice((this.IDDPrefix ? this.IDDPrefix.length : 0) + (this.callingCode ? this.callingCode.length : 0));
  33672. }
  33673. return this.digits;
  33674. }
  33675. }, {
  33676. key: "getDigitsWithoutInternationalPrefix",
  33677. value: function getDigitsWithoutInternationalPrefix() {
  33678. if (this.international) {
  33679. if (this.IDDPrefix) {
  33680. return this.digits.slice(this.IDDPrefix.length);
  33681. }
  33682. }
  33683. return this.digits;
  33684. }
  33685. }]);
  33686. return AsYouTypeState2;
  33687. }();
  33688. function _createForOfIteratorHelperLoose$2(o2, allowArrayLike) {
  33689. var it2 = typeof Symbol !== "undefined" && o2[Symbol.iterator] || o2["@@iterator"];
  33690. if (it2)
  33691. return (it2 = it2.call(o2)).next.bind(it2);
  33692. if (Array.isArray(o2) || (it2 = _unsupportedIterableToArray$4(o2)) || allowArrayLike && o2 && typeof o2.length === "number") {
  33693. if (it2)
  33694. o2 = it2;
  33695. var i2 = 0;
  33696. return function() {
  33697. if (i2 >= o2.length)
  33698. return { done: true };
  33699. return { done: false, value: o2[i2++] };
  33700. };
  33701. }
  33702. throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  33703. }
  33704. function _unsupportedIterableToArray$4(o2, minLen) {
  33705. if (!o2)
  33706. return;
  33707. if (typeof o2 === "string")
  33708. return _arrayLikeToArray$4(o2, minLen);
  33709. var n2 = Object.prototype.toString.call(o2).slice(8, -1);
  33710. if (n2 === "Object" && o2.constructor)
  33711. n2 = o2.constructor.name;
  33712. if (n2 === "Map" || n2 === "Set")
  33713. return Array.from(o2);
  33714. if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2))
  33715. return _arrayLikeToArray$4(o2, minLen);
  33716. }
  33717. function _arrayLikeToArray$4(arr, len) {
  33718. if (len == null || len > arr.length)
  33719. len = arr.length;
  33720. for (var i2 = 0, arr2 = new Array(len); i2 < len; i2++) {
  33721. arr2[i2] = arr[i2];
  33722. }
  33723. return arr2;
  33724. }
  33725. var DIGIT_PLACEHOLDER = "x";
  33726. var DIGIT_PLACEHOLDER_MATCHER = new RegExp(DIGIT_PLACEHOLDER);
  33727. function repeat(string, times2) {
  33728. if (times2 < 1) {
  33729. return "";
  33730. }
  33731. var result2 = "";
  33732. while (times2 > 1) {
  33733. if (times2 & 1) {
  33734. result2 += string;
  33735. }
  33736. times2 >>= 1;
  33737. string += string;
  33738. }
  33739. return result2 + string;
  33740. }
  33741. function cutAndStripNonPairedParens(string, cutBeforeIndex) {
  33742. if (string[cutBeforeIndex] === ")") {
  33743. cutBeforeIndex++;
  33744. }
  33745. return stripNonPairedParens(string.slice(0, cutBeforeIndex));
  33746. }
  33747. function stripNonPairedParens(string) {
  33748. var dangling_braces = [];
  33749. var i2 = 0;
  33750. while (i2 < string.length) {
  33751. if (string[i2] === "(") {
  33752. dangling_braces.push(i2);
  33753. } else if (string[i2] === ")") {
  33754. dangling_braces.pop();
  33755. }
  33756. i2++;
  33757. }
  33758. var start = 0;
  33759. var cleared_string = "";
  33760. dangling_braces.push(string.length);
  33761. for (var _i = 0, _dangling_braces = dangling_braces; _i < _dangling_braces.length; _i++) {
  33762. var index2 = _dangling_braces[_i];
  33763. cleared_string += string.slice(start, index2);
  33764. start = index2 + 1;
  33765. }
  33766. return cleared_string;
  33767. }
  33768. function populateTemplateWithDigits(template, position, digits2) {
  33769. for (var _iterator2 = _createForOfIteratorHelperLoose$2(digits2.split("")), _step2; !(_step2 = _iterator2()).done; ) {
  33770. var digit = _step2.value;
  33771. if (template.slice(position + 1).search(DIGIT_PLACEHOLDER_MATCHER) < 0) {
  33772. return;
  33773. }
  33774. position = template.search(DIGIT_PLACEHOLDER_MATCHER);
  33775. template = template.replace(DIGIT_PLACEHOLDER_MATCHER, digit);
  33776. }
  33777. return [template, position];
  33778. }
  33779. function formatCompleteNumber(state, format2, _ref) {
  33780. var metadata2 = _ref.metadata, shouldTryNationalPrefixFormattingRule = _ref.shouldTryNationalPrefixFormattingRule, getSeparatorAfterNationalPrefix = _ref.getSeparatorAfterNationalPrefix;
  33781. var matcher = new RegExp("^(?:".concat(format2.pattern(), ")$"));
  33782. if (matcher.test(state.nationalSignificantNumber)) {
  33783. return formatNationalNumberWithAndWithoutNationalPrefixFormattingRule(state, format2, {
  33784. metadata: metadata2,
  33785. shouldTryNationalPrefixFormattingRule,
  33786. getSeparatorAfterNationalPrefix
  33787. });
  33788. }
  33789. }
  33790. function canFormatCompleteNumber(nationalSignificantNumber, metadata2) {
  33791. return checkNumberLength(nationalSignificantNumber, metadata2) === "IS_POSSIBLE";
  33792. }
  33793. function formatNationalNumberWithAndWithoutNationalPrefixFormattingRule(state, format2, _ref2) {
  33794. var metadata2 = _ref2.metadata, shouldTryNationalPrefixFormattingRule = _ref2.shouldTryNationalPrefixFormattingRule, getSeparatorAfterNationalPrefix = _ref2.getSeparatorAfterNationalPrefix;
  33795. state.nationalSignificantNumber;
  33796. state.international;
  33797. state.nationalPrefix;
  33798. state.carrierCode;
  33799. if (shouldTryNationalPrefixFormattingRule(format2)) {
  33800. var formattedNumber = formatNationalNumber(state, format2, {
  33801. useNationalPrefixFormattingRule: true,
  33802. getSeparatorAfterNationalPrefix,
  33803. metadata: metadata2
  33804. });
  33805. if (formattedNumber) {
  33806. return formattedNumber;
  33807. }
  33808. }
  33809. return formatNationalNumber(state, format2, {
  33810. useNationalPrefixFormattingRule: false,
  33811. getSeparatorAfterNationalPrefix,
  33812. metadata: metadata2
  33813. });
  33814. }
  33815. function formatNationalNumber(state, format2, _ref3) {
  33816. var metadata2 = _ref3.metadata, useNationalPrefixFormattingRule = _ref3.useNationalPrefixFormattingRule, getSeparatorAfterNationalPrefix = _ref3.getSeparatorAfterNationalPrefix;
  33817. var formattedNationalNumber = formatNationalNumberUsingFormat(state.nationalSignificantNumber, format2, {
  33818. carrierCode: state.carrierCode,
  33819. useInternationalFormat: state.international,
  33820. withNationalPrefix: useNationalPrefixFormattingRule,
  33821. metadata: metadata2
  33822. });
  33823. if (!useNationalPrefixFormattingRule) {
  33824. if (state.nationalPrefix) {
  33825. formattedNationalNumber = state.nationalPrefix + getSeparatorAfterNationalPrefix(format2) + formattedNationalNumber;
  33826. } else if (state.complexPrefixBeforeNationalSignificantNumber) {
  33827. formattedNationalNumber = state.complexPrefixBeforeNationalSignificantNumber + " " + formattedNationalNumber;
  33828. }
  33829. }
  33830. if (isValidFormattedNationalNumber(formattedNationalNumber, state)) {
  33831. return formattedNationalNumber;
  33832. }
  33833. }
  33834. function isValidFormattedNationalNumber(formattedNationalNumber, state) {
  33835. return parseDigits(formattedNationalNumber) === state.getNationalDigits();
  33836. }
  33837. function _classCallCheck$4(instance, Constructor) {
  33838. if (!(instance instanceof Constructor)) {
  33839. throw new TypeError("Cannot call a class as a function");
  33840. }
  33841. }
  33842. function _defineProperties$4(target, props) {
  33843. for (var i2 = 0; i2 < props.length; i2++) {
  33844. var descriptor = props[i2];
  33845. descriptor.enumerable = descriptor.enumerable || false;
  33846. descriptor.configurable = true;
  33847. if ("value" in descriptor)
  33848. descriptor.writable = true;
  33849. Object.defineProperty(target, descriptor.key, descriptor);
  33850. }
  33851. }
  33852. function _createClass$4(Constructor, protoProps, staticProps) {
  33853. if (protoProps)
  33854. _defineProperties$4(Constructor.prototype, protoProps);
  33855. if (staticProps)
  33856. _defineProperties$4(Constructor, staticProps);
  33857. Object.defineProperty(Constructor, "prototype", { writable: false });
  33858. return Constructor;
  33859. }
  33860. var PatternParser = /* @__PURE__ */ function() {
  33861. function PatternParser2() {
  33862. _classCallCheck$4(this, PatternParser2);
  33863. }
  33864. _createClass$4(PatternParser2, [{
  33865. key: "parse",
  33866. value: function parse2(pattern2) {
  33867. this.context = [{
  33868. or: true,
  33869. instructions: []
  33870. }];
  33871. this.parsePattern(pattern2);
  33872. if (this.context.length !== 1) {
  33873. throw new Error("Non-finalized contexts left when pattern parse ended");
  33874. }
  33875. var _this$context$ = this.context[0], branches = _this$context$.branches, instructions = _this$context$.instructions;
  33876. if (branches) {
  33877. return {
  33878. op: "|",
  33879. args: branches.concat([expandSingleElementArray(instructions)])
  33880. };
  33881. }
  33882. if (instructions.length === 0) {
  33883. throw new Error("Pattern is required");
  33884. }
  33885. if (instructions.length === 1) {
  33886. return instructions[0];
  33887. }
  33888. return instructions;
  33889. }
  33890. }, {
  33891. key: "startContext",
  33892. value: function startContext(context) {
  33893. this.context.push(context);
  33894. }
  33895. }, {
  33896. key: "endContext",
  33897. value: function endContext() {
  33898. this.context.pop();
  33899. }
  33900. }, {
  33901. key: "getContext",
  33902. value: function getContext() {
  33903. return this.context[this.context.length - 1];
  33904. }
  33905. }, {
  33906. key: "parsePattern",
  33907. value: function parsePattern(pattern2) {
  33908. if (!pattern2) {
  33909. throw new Error("Pattern is required");
  33910. }
  33911. var match = pattern2.match(OPERATOR);
  33912. if (!match) {
  33913. if (ILLEGAL_CHARACTER_REGEXP.test(pattern2)) {
  33914. throw new Error("Illegal characters found in a pattern: ".concat(pattern2));
  33915. }
  33916. this.getContext().instructions = this.getContext().instructions.concat(pattern2.split(""));
  33917. return;
  33918. }
  33919. var operator = match[1];
  33920. var before = pattern2.slice(0, match.index);
  33921. var rightPart = pattern2.slice(match.index + operator.length);
  33922. switch (operator) {
  33923. case "(?:":
  33924. if (before) {
  33925. this.parsePattern(before);
  33926. }
  33927. this.startContext({
  33928. or: true,
  33929. instructions: [],
  33930. branches: []
  33931. });
  33932. break;
  33933. case ")":
  33934. if (!this.getContext().or) {
  33935. throw new Error('")" operator must be preceded by "(?:" operator');
  33936. }
  33937. if (before) {
  33938. this.parsePattern(before);
  33939. }
  33940. if (this.getContext().instructions.length === 0) {
  33941. throw new Error('No instructions found after "|" operator in an "or" group');
  33942. }
  33943. var _this$getContext = this.getContext(), branches = _this$getContext.branches;
  33944. branches.push(expandSingleElementArray(this.getContext().instructions));
  33945. this.endContext();
  33946. this.getContext().instructions.push({
  33947. op: "|",
  33948. args: branches
  33949. });
  33950. break;
  33951. case "|":
  33952. if (!this.getContext().or) {
  33953. throw new Error('"|" operator can only be used inside "or" groups');
  33954. }
  33955. if (before) {
  33956. this.parsePattern(before);
  33957. }
  33958. if (!this.getContext().branches) {
  33959. if (this.context.length === 1) {
  33960. this.getContext().branches = [];
  33961. } else {
  33962. throw new Error('"branches" not found in an "or" group context');
  33963. }
  33964. }
  33965. this.getContext().branches.push(expandSingleElementArray(this.getContext().instructions));
  33966. this.getContext().instructions = [];
  33967. break;
  33968. case "[":
  33969. if (before) {
  33970. this.parsePattern(before);
  33971. }
  33972. this.startContext({
  33973. oneOfSet: true
  33974. });
  33975. break;
  33976. case "]":
  33977. if (!this.getContext().oneOfSet) {
  33978. throw new Error('"]" operator must be preceded by "[" operator');
  33979. }
  33980. this.endContext();
  33981. this.getContext().instructions.push({
  33982. op: "[]",
  33983. args: parseOneOfSet(before)
  33984. });
  33985. break;
  33986. default:
  33987. throw new Error("Unknown operator: ".concat(operator));
  33988. }
  33989. if (rightPart) {
  33990. this.parsePattern(rightPart);
  33991. }
  33992. }
  33993. }]);
  33994. return PatternParser2;
  33995. }();
  33996. function parseOneOfSet(pattern2) {
  33997. var values = [];
  33998. var i2 = 0;
  33999. while (i2 < pattern2.length) {
  34000. if (pattern2[i2] === "-") {
  34001. if (i2 === 0 || i2 === pattern2.length - 1) {
  34002. throw new Error("Couldn't parse a one-of set pattern: ".concat(pattern2));
  34003. }
  34004. var prevValue = pattern2[i2 - 1].charCodeAt(0) + 1;
  34005. var nextValue = pattern2[i2 + 1].charCodeAt(0) - 1;
  34006. var value = prevValue;
  34007. while (value <= nextValue) {
  34008. values.push(String.fromCharCode(value));
  34009. value++;
  34010. }
  34011. } else {
  34012. values.push(pattern2[i2]);
  34013. }
  34014. i2++;
  34015. }
  34016. return values;
  34017. }
  34018. var ILLEGAL_CHARACTER_REGEXP = /[\(\)\[\]\?\:\|]/;
  34019. var OPERATOR = new RegExp(
  34020. // any of:
  34021. "(\\||\\(\\?\\:|\\)|\\[|\\])"
  34022. );
  34023. function expandSingleElementArray(array2) {
  34024. if (array2.length === 1) {
  34025. return array2[0];
  34026. }
  34027. return array2;
  34028. }
  34029. function _createForOfIteratorHelperLoose$1(o2, allowArrayLike) {
  34030. var it2 = typeof Symbol !== "undefined" && o2[Symbol.iterator] || o2["@@iterator"];
  34031. if (it2)
  34032. return (it2 = it2.call(o2)).next.bind(it2);
  34033. if (Array.isArray(o2) || (it2 = _unsupportedIterableToArray$3(o2)) || allowArrayLike && o2 && typeof o2.length === "number") {
  34034. if (it2)
  34035. o2 = it2;
  34036. var i2 = 0;
  34037. return function() {
  34038. if (i2 >= o2.length)
  34039. return { done: true };
  34040. return { done: false, value: o2[i2++] };
  34041. };
  34042. }
  34043. throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  34044. }
  34045. function _unsupportedIterableToArray$3(o2, minLen) {
  34046. if (!o2)
  34047. return;
  34048. if (typeof o2 === "string")
  34049. return _arrayLikeToArray$3(o2, minLen);
  34050. var n2 = Object.prototype.toString.call(o2).slice(8, -1);
  34051. if (n2 === "Object" && o2.constructor)
  34052. n2 = o2.constructor.name;
  34053. if (n2 === "Map" || n2 === "Set")
  34054. return Array.from(o2);
  34055. if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2))
  34056. return _arrayLikeToArray$3(o2, minLen);
  34057. }
  34058. function _arrayLikeToArray$3(arr, len) {
  34059. if (len == null || len > arr.length)
  34060. len = arr.length;
  34061. for (var i2 = 0, arr2 = new Array(len); i2 < len; i2++) {
  34062. arr2[i2] = arr[i2];
  34063. }
  34064. return arr2;
  34065. }
  34066. function _classCallCheck$3(instance, Constructor) {
  34067. if (!(instance instanceof Constructor)) {
  34068. throw new TypeError("Cannot call a class as a function");
  34069. }
  34070. }
  34071. function _defineProperties$3(target, props) {
  34072. for (var i2 = 0; i2 < props.length; i2++) {
  34073. var descriptor = props[i2];
  34074. descriptor.enumerable = descriptor.enumerable || false;
  34075. descriptor.configurable = true;
  34076. if ("value" in descriptor)
  34077. descriptor.writable = true;
  34078. Object.defineProperty(target, descriptor.key, descriptor);
  34079. }
  34080. }
  34081. function _createClass$3(Constructor, protoProps, staticProps) {
  34082. if (protoProps)
  34083. _defineProperties$3(Constructor.prototype, protoProps);
  34084. if (staticProps)
  34085. _defineProperties$3(Constructor, staticProps);
  34086. Object.defineProperty(Constructor, "prototype", { writable: false });
  34087. return Constructor;
  34088. }
  34089. var PatternMatcher = /* @__PURE__ */ function() {
  34090. function PatternMatcher2(pattern2) {
  34091. _classCallCheck$3(this, PatternMatcher2);
  34092. this.matchTree = new PatternParser().parse(pattern2);
  34093. }
  34094. _createClass$3(PatternMatcher2, [{
  34095. key: "match",
  34096. value: function match(string) {
  34097. var _ref = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, allowOverflow = _ref.allowOverflow;
  34098. if (!string) {
  34099. throw new Error("String is required");
  34100. }
  34101. var result2 = _match(string.split(""), this.matchTree, true);
  34102. if (result2 && result2.match) {
  34103. delete result2.matchedChars;
  34104. }
  34105. if (result2 && result2.overflow) {
  34106. if (!allowOverflow) {
  34107. return;
  34108. }
  34109. }
  34110. return result2;
  34111. }
  34112. }]);
  34113. return PatternMatcher2;
  34114. }();
  34115. function _match(characters, tree, last) {
  34116. if (typeof tree === "string") {
  34117. var characterString = characters.join("");
  34118. if (tree.indexOf(characterString) === 0) {
  34119. if (characters.length === tree.length) {
  34120. return {
  34121. match: true,
  34122. matchedChars: characters
  34123. };
  34124. }
  34125. return {
  34126. partialMatch: true
  34127. // matchedChars: characters
  34128. };
  34129. }
  34130. if (characterString.indexOf(tree) === 0) {
  34131. if (last) {
  34132. if (characters.length > tree.length) {
  34133. return {
  34134. overflow: true
  34135. };
  34136. }
  34137. }
  34138. return {
  34139. match: true,
  34140. matchedChars: characters.slice(0, tree.length)
  34141. };
  34142. }
  34143. return;
  34144. }
  34145. if (Array.isArray(tree)) {
  34146. var restCharacters = characters.slice();
  34147. var i2 = 0;
  34148. while (i2 < tree.length) {
  34149. var subtree = tree[i2];
  34150. var result2 = _match(restCharacters, subtree, last && i2 === tree.length - 1);
  34151. if (!result2) {
  34152. return;
  34153. } else if (result2.overflow) {
  34154. return result2;
  34155. } else if (result2.match) {
  34156. restCharacters = restCharacters.slice(result2.matchedChars.length);
  34157. if (restCharacters.length === 0) {
  34158. if (i2 === tree.length - 1) {
  34159. return {
  34160. match: true,
  34161. matchedChars: characters
  34162. };
  34163. } else {
  34164. return {
  34165. partialMatch: true
  34166. // matchedChars: characters
  34167. };
  34168. }
  34169. }
  34170. } else {
  34171. if (result2.partialMatch) {
  34172. return {
  34173. partialMatch: true
  34174. // matchedChars: characters
  34175. };
  34176. } else {
  34177. throw new Error("Unsupported match result:\n".concat(JSON.stringify(result2, null, 2)));
  34178. }
  34179. }
  34180. i2++;
  34181. }
  34182. if (last) {
  34183. return {
  34184. overflow: true
  34185. };
  34186. }
  34187. return {
  34188. match: true,
  34189. matchedChars: characters.slice(0, characters.length - restCharacters.length)
  34190. };
  34191. }
  34192. switch (tree.op) {
  34193. case "|":
  34194. var partialMatch;
  34195. for (var _iterator = _createForOfIteratorHelperLoose$1(tree.args), _step; !(_step = _iterator()).done; ) {
  34196. var branch = _step.value;
  34197. var _result = _match(characters, branch, last);
  34198. if (_result) {
  34199. if (_result.overflow) {
  34200. return _result;
  34201. } else if (_result.match) {
  34202. return {
  34203. match: true,
  34204. matchedChars: _result.matchedChars
  34205. };
  34206. } else {
  34207. if (_result.partialMatch) {
  34208. partialMatch = true;
  34209. } else {
  34210. throw new Error("Unsupported match result:\n".concat(JSON.stringify(_result, null, 2)));
  34211. }
  34212. }
  34213. }
  34214. }
  34215. if (partialMatch) {
  34216. return {
  34217. partialMatch: true
  34218. // matchedChars: ...
  34219. };
  34220. }
  34221. return;
  34222. case "[]":
  34223. for (var _iterator2 = _createForOfIteratorHelperLoose$1(tree.args), _step2; !(_step2 = _iterator2()).done; ) {
  34224. var _char = _step2.value;
  34225. if (characters[0] === _char) {
  34226. if (characters.length === 1) {
  34227. return {
  34228. match: true,
  34229. matchedChars: characters
  34230. };
  34231. }
  34232. if (last) {
  34233. return {
  34234. overflow: true
  34235. };
  34236. }
  34237. return {
  34238. match: true,
  34239. matchedChars: [_char]
  34240. };
  34241. }
  34242. }
  34243. return;
  34244. default:
  34245. throw new Error("Unsupported instruction tree: ".concat(tree));
  34246. }
  34247. }
  34248. function _createForOfIteratorHelperLoose(o2, allowArrayLike) {
  34249. var it2 = typeof Symbol !== "undefined" && o2[Symbol.iterator] || o2["@@iterator"];
  34250. if (it2)
  34251. return (it2 = it2.call(o2)).next.bind(it2);
  34252. if (Array.isArray(o2) || (it2 = _unsupportedIterableToArray$2(o2)) || allowArrayLike && o2 && typeof o2.length === "number") {
  34253. if (it2)
  34254. o2 = it2;
  34255. var i2 = 0;
  34256. return function() {
  34257. if (i2 >= o2.length)
  34258. return { done: true };
  34259. return { done: false, value: o2[i2++] };
  34260. };
  34261. }
  34262. throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  34263. }
  34264. function _unsupportedIterableToArray$2(o2, minLen) {
  34265. if (!o2)
  34266. return;
  34267. if (typeof o2 === "string")
  34268. return _arrayLikeToArray$2(o2, minLen);
  34269. var n2 = Object.prototype.toString.call(o2).slice(8, -1);
  34270. if (n2 === "Object" && o2.constructor)
  34271. n2 = o2.constructor.name;
  34272. if (n2 === "Map" || n2 === "Set")
  34273. return Array.from(o2);
  34274. if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2))
  34275. return _arrayLikeToArray$2(o2, minLen);
  34276. }
  34277. function _arrayLikeToArray$2(arr, len) {
  34278. if (len == null || len > arr.length)
  34279. len = arr.length;
  34280. for (var i2 = 0, arr2 = new Array(len); i2 < len; i2++) {
  34281. arr2[i2] = arr[i2];
  34282. }
  34283. return arr2;
  34284. }
  34285. function _classCallCheck$2(instance, Constructor) {
  34286. if (!(instance instanceof Constructor)) {
  34287. throw new TypeError("Cannot call a class as a function");
  34288. }
  34289. }
  34290. function _defineProperties$2(target, props) {
  34291. for (var i2 = 0; i2 < props.length; i2++) {
  34292. var descriptor = props[i2];
  34293. descriptor.enumerable = descriptor.enumerable || false;
  34294. descriptor.configurable = true;
  34295. if ("value" in descriptor)
  34296. descriptor.writable = true;
  34297. Object.defineProperty(target, descriptor.key, descriptor);
  34298. }
  34299. }
  34300. function _createClass$2(Constructor, protoProps, staticProps) {
  34301. if (protoProps)
  34302. _defineProperties$2(Constructor.prototype, protoProps);
  34303. if (staticProps)
  34304. _defineProperties$2(Constructor, staticProps);
  34305. Object.defineProperty(Constructor, "prototype", { writable: false });
  34306. return Constructor;
  34307. }
  34308. var DUMMY_DIGIT = "9";
  34309. var LONGEST_NATIONAL_PHONE_NUMBER_LENGTH = 15;
  34310. var LONGEST_DUMMY_PHONE_NUMBER = repeat(DUMMY_DIGIT, LONGEST_NATIONAL_PHONE_NUMBER_LENGTH);
  34311. var NATIONAL_PREFIX_SEPARATORS_PATTERN = /[- ]/;
  34312. var CREATE_CHARACTER_CLASS_PATTERN = function() {
  34313. return /\[([^\[\]])*\]/g;
  34314. };
  34315. var CREATE_STANDALONE_DIGIT_PATTERN = function() {
  34316. return /\d(?=[^,}][^,}])/g;
  34317. };
  34318. var NON_ALTERING_FORMAT_REG_EXP = new RegExp("[" + VALID_PUNCTUATION + "]*\\$1[" + VALID_PUNCTUATION + "]*(\\$\\d[" + VALID_PUNCTUATION + "]*)*$");
  34319. var MIN_LEADING_DIGITS_LENGTH = 3;
  34320. var AsYouTypeFormatter = /* @__PURE__ */ function() {
  34321. function AsYouTypeFormatter2(_ref) {
  34322. _ref.state;
  34323. var metadata2 = _ref.metadata;
  34324. _classCallCheck$2(this, AsYouTypeFormatter2);
  34325. this.metadata = metadata2;
  34326. this.resetFormat();
  34327. }
  34328. _createClass$2(AsYouTypeFormatter2, [{
  34329. key: "resetFormat",
  34330. value: function resetFormat() {
  34331. this.chosenFormat = void 0;
  34332. this.template = void 0;
  34333. this.nationalNumberTemplate = void 0;
  34334. this.populatedNationalNumberTemplate = void 0;
  34335. this.populatedNationalNumberTemplatePosition = -1;
  34336. }
  34337. }, {
  34338. key: "reset",
  34339. value: function reset(numberingPlan, state) {
  34340. this.resetFormat();
  34341. if (numberingPlan) {
  34342. this.isNANP = numberingPlan.callingCode() === "1";
  34343. this.matchingFormats = numberingPlan.formats();
  34344. if (state.nationalSignificantNumber) {
  34345. this.narrowDownMatchingFormats(state);
  34346. }
  34347. } else {
  34348. this.isNANP = void 0;
  34349. this.matchingFormats = [];
  34350. }
  34351. }
  34352. /**
  34353. * Formats an updated phone number.
  34354. * @param {string} nextDigits — Additional phone number digits.
  34355. * @param {object} state — `AsYouType` state.
  34356. * @return {[string]} Returns undefined if the updated phone number can't be formatted using any of the available formats.
  34357. */
  34358. }, {
  34359. key: "format",
  34360. value: function format2(nextDigits, state) {
  34361. var _this = this;
  34362. if (canFormatCompleteNumber(state.nationalSignificantNumber, this.metadata)) {
  34363. for (var _iterator = _createForOfIteratorHelperLoose(this.matchingFormats), _step; !(_step = _iterator()).done; ) {
  34364. var format3 = _step.value;
  34365. var formattedCompleteNumber = formatCompleteNumber(state, format3, {
  34366. metadata: this.metadata,
  34367. shouldTryNationalPrefixFormattingRule: function shouldTryNationalPrefixFormattingRule(format4) {
  34368. return _this.shouldTryNationalPrefixFormattingRule(format4, {
  34369. international: state.international,
  34370. nationalPrefix: state.nationalPrefix
  34371. });
  34372. },
  34373. getSeparatorAfterNationalPrefix: function getSeparatorAfterNationalPrefix(format4) {
  34374. return _this.getSeparatorAfterNationalPrefix(format4);
  34375. }
  34376. });
  34377. if (formattedCompleteNumber) {
  34378. this.resetFormat();
  34379. this.chosenFormat = format3;
  34380. this.setNationalNumberTemplate(formattedCompleteNumber.replace(/\d/g, DIGIT_PLACEHOLDER), state);
  34381. this.populatedNationalNumberTemplate = formattedCompleteNumber;
  34382. this.populatedNationalNumberTemplatePosition = this.template.lastIndexOf(DIGIT_PLACEHOLDER);
  34383. return formattedCompleteNumber;
  34384. }
  34385. }
  34386. }
  34387. return this.formatNationalNumberWithNextDigits(nextDigits, state);
  34388. }
  34389. // Formats the next phone number digits.
  34390. }, {
  34391. key: "formatNationalNumberWithNextDigits",
  34392. value: function formatNationalNumberWithNextDigits(nextDigits, state) {
  34393. var previouslyChosenFormat = this.chosenFormat;
  34394. var newlyChosenFormat = this.chooseFormat(state);
  34395. if (newlyChosenFormat) {
  34396. if (newlyChosenFormat === previouslyChosenFormat) {
  34397. return this.formatNextNationalNumberDigits(nextDigits);
  34398. } else {
  34399. return this.formatNextNationalNumberDigits(state.getNationalDigits());
  34400. }
  34401. }
  34402. }
  34403. }, {
  34404. key: "narrowDownMatchingFormats",
  34405. value: function narrowDownMatchingFormats(_ref2) {
  34406. var _this2 = this;
  34407. var nationalSignificantNumber = _ref2.nationalSignificantNumber, nationalPrefix = _ref2.nationalPrefix, international = _ref2.international;
  34408. var leadingDigits = nationalSignificantNumber;
  34409. var leadingDigitsPatternIndex = leadingDigits.length - MIN_LEADING_DIGITS_LENGTH;
  34410. if (leadingDigitsPatternIndex < 0) {
  34411. leadingDigitsPatternIndex = 0;
  34412. }
  34413. this.matchingFormats = this.matchingFormats.filter(function(format2) {
  34414. return _this2.formatSuits(format2, international, nationalPrefix) && _this2.formatMatches(format2, leadingDigits, leadingDigitsPatternIndex);
  34415. });
  34416. if (this.chosenFormat && this.matchingFormats.indexOf(this.chosenFormat) === -1) {
  34417. this.resetFormat();
  34418. }
  34419. }
  34420. }, {
  34421. key: "formatSuits",
  34422. value: function formatSuits(format2, international, nationalPrefix) {
  34423. if (nationalPrefix && !format2.usesNationalPrefix() && // !format.domesticCarrierCodeFormattingRule() &&
  34424. !format2.nationalPrefixIsOptionalWhenFormattingInNationalFormat()) {
  34425. return false;
  34426. }
  34427. if (!international && !nationalPrefix && format2.nationalPrefixIsMandatoryWhenFormattingInNationalFormat()) {
  34428. return false;
  34429. }
  34430. return true;
  34431. }
  34432. }, {
  34433. key: "formatMatches",
  34434. value: function formatMatches(format2, leadingDigits, leadingDigitsPatternIndex) {
  34435. var leadingDigitsPatternsCount = format2.leadingDigitsPatterns().length;
  34436. if (leadingDigitsPatternsCount === 0) {
  34437. return true;
  34438. }
  34439. leadingDigitsPatternIndex = Math.min(leadingDigitsPatternIndex, leadingDigitsPatternsCount - 1);
  34440. var leadingDigitsPattern = format2.leadingDigitsPatterns()[leadingDigitsPatternIndex];
  34441. if (leadingDigits.length < MIN_LEADING_DIGITS_LENGTH) {
  34442. try {
  34443. return new PatternMatcher(leadingDigitsPattern).match(leadingDigits, {
  34444. allowOverflow: true
  34445. }) !== void 0;
  34446. } catch (error2) {
  34447. formatAppLog("error", "at node_modules/libphonenumber-js/es6/AsYouTypeFormatter.js:343", error2);
  34448. return true;
  34449. }
  34450. }
  34451. return new RegExp("^(".concat(leadingDigitsPattern, ")")).test(leadingDigits);
  34452. }
  34453. }, {
  34454. key: "getFormatFormat",
  34455. value: function getFormatFormat(format2, international) {
  34456. return international ? format2.internationalFormat() : format2.format();
  34457. }
  34458. }, {
  34459. key: "chooseFormat",
  34460. value: function chooseFormat(state) {
  34461. var _this3 = this;
  34462. var _loop = function _loop2() {
  34463. var format2 = _step2.value;
  34464. if (_this3.chosenFormat === format2) {
  34465. return "break";
  34466. }
  34467. if (!NON_ALTERING_FORMAT_REG_EXP.test(_this3.getFormatFormat(format2, state.international))) {
  34468. return "continue";
  34469. }
  34470. if (!_this3.createTemplateForFormat(format2, state)) {
  34471. _this3.matchingFormats = _this3.matchingFormats.filter(function(_2) {
  34472. return _2 !== format2;
  34473. });
  34474. return "continue";
  34475. }
  34476. _this3.chosenFormat = format2;
  34477. return "break";
  34478. };
  34479. for (var _iterator2 = _createForOfIteratorHelperLoose(this.matchingFormats.slice()), _step2; !(_step2 = _iterator2()).done; ) {
  34480. var _ret = _loop();
  34481. if (_ret === "break")
  34482. break;
  34483. if (_ret === "continue")
  34484. continue;
  34485. }
  34486. if (!this.chosenFormat) {
  34487. this.resetFormat();
  34488. }
  34489. return this.chosenFormat;
  34490. }
  34491. }, {
  34492. key: "createTemplateForFormat",
  34493. value: function createTemplateForFormat(format2, state) {
  34494. if (format2.pattern().indexOf("|") >= 0) {
  34495. return;
  34496. }
  34497. var template = this.getTemplateForFormat(format2, state);
  34498. if (template) {
  34499. this.setNationalNumberTemplate(template, state);
  34500. return true;
  34501. }
  34502. }
  34503. }, {
  34504. key: "getSeparatorAfterNationalPrefix",
  34505. value: function getSeparatorAfterNationalPrefix(format2) {
  34506. if (this.isNANP) {
  34507. return " ";
  34508. }
  34509. if (format2 && format2.nationalPrefixFormattingRule() && NATIONAL_PREFIX_SEPARATORS_PATTERN.test(format2.nationalPrefixFormattingRule())) {
  34510. return " ";
  34511. }
  34512. return "";
  34513. }
  34514. }, {
  34515. key: "getInternationalPrefixBeforeCountryCallingCode",
  34516. value: function getInternationalPrefixBeforeCountryCallingCode(_ref3, options2) {
  34517. var IDDPrefix = _ref3.IDDPrefix, missingPlus = _ref3.missingPlus;
  34518. if (IDDPrefix) {
  34519. return options2 && options2.spacing === false ? IDDPrefix : IDDPrefix + " ";
  34520. }
  34521. if (missingPlus) {
  34522. return "";
  34523. }
  34524. return "+";
  34525. }
  34526. }, {
  34527. key: "getTemplate",
  34528. value: function getTemplate(state) {
  34529. if (!this.template) {
  34530. return;
  34531. }
  34532. var index2 = -1;
  34533. var i2 = 0;
  34534. var internationalPrefix = state.international ? this.getInternationalPrefixBeforeCountryCallingCode(state, {
  34535. spacing: false
  34536. }) : "";
  34537. while (i2 < internationalPrefix.length + state.getDigitsWithoutInternationalPrefix().length) {
  34538. index2 = this.template.indexOf(DIGIT_PLACEHOLDER, index2 + 1);
  34539. i2++;
  34540. }
  34541. return cutAndStripNonPairedParens(this.template, index2 + 1);
  34542. }
  34543. }, {
  34544. key: "setNationalNumberTemplate",
  34545. value: function setNationalNumberTemplate(template, state) {
  34546. this.nationalNumberTemplate = template;
  34547. this.populatedNationalNumberTemplate = template;
  34548. this.populatedNationalNumberTemplatePosition = -1;
  34549. if (state.international) {
  34550. this.template = this.getInternationalPrefixBeforeCountryCallingCode(state).replace(/[\d\+]/g, DIGIT_PLACEHOLDER) + repeat(DIGIT_PLACEHOLDER, state.callingCode.length) + " " + template;
  34551. } else {
  34552. this.template = template;
  34553. }
  34554. }
  34555. /**
  34556. * Generates formatting template for a national phone number,
  34557. * optionally containing a national prefix, for a format.
  34558. * @param {Format} format
  34559. * @param {string} nationalPrefix
  34560. * @return {string}
  34561. */
  34562. }, {
  34563. key: "getTemplateForFormat",
  34564. value: function getTemplateForFormat(format2, _ref4) {
  34565. var nationalSignificantNumber = _ref4.nationalSignificantNumber, international = _ref4.international, nationalPrefix = _ref4.nationalPrefix, complexPrefixBeforeNationalSignificantNumber = _ref4.complexPrefixBeforeNationalSignificantNumber;
  34566. var pattern2 = format2.pattern();
  34567. {
  34568. pattern2 = pattern2.replace(CREATE_CHARACTER_CLASS_PATTERN(), "\\d").replace(CREATE_STANDALONE_DIGIT_PATTERN(), "\\d");
  34569. }
  34570. var digits2 = LONGEST_DUMMY_PHONE_NUMBER.match(pattern2)[0];
  34571. if (nationalSignificantNumber.length > digits2.length) {
  34572. return;
  34573. }
  34574. var strictPattern = new RegExp("^" + pattern2 + "$");
  34575. var nationalNumberDummyDigits = nationalSignificantNumber.replace(/\d/g, DUMMY_DIGIT);
  34576. if (strictPattern.test(nationalNumberDummyDigits)) {
  34577. digits2 = nationalNumberDummyDigits;
  34578. }
  34579. var numberFormat = this.getFormatFormat(format2, international);
  34580. var nationalPrefixIncludedInTemplate;
  34581. if (this.shouldTryNationalPrefixFormattingRule(format2, {
  34582. international,
  34583. nationalPrefix
  34584. })) {
  34585. var numberFormatWithNationalPrefix = numberFormat.replace(FIRST_GROUP_PATTERN, format2.nationalPrefixFormattingRule());
  34586. if (parseDigits(format2.nationalPrefixFormattingRule()) === (nationalPrefix || "") + parseDigits("$1")) {
  34587. numberFormat = numberFormatWithNationalPrefix;
  34588. nationalPrefixIncludedInTemplate = true;
  34589. if (nationalPrefix) {
  34590. var i2 = nationalPrefix.length;
  34591. while (i2 > 0) {
  34592. numberFormat = numberFormat.replace(/\d/, DIGIT_PLACEHOLDER);
  34593. i2--;
  34594. }
  34595. }
  34596. }
  34597. }
  34598. var template = digits2.replace(new RegExp(pattern2), numberFormat).replace(new RegExp(DUMMY_DIGIT, "g"), DIGIT_PLACEHOLDER);
  34599. if (!nationalPrefixIncludedInTemplate) {
  34600. if (complexPrefixBeforeNationalSignificantNumber) {
  34601. template = repeat(DIGIT_PLACEHOLDER, complexPrefixBeforeNationalSignificantNumber.length) + " " + template;
  34602. } else if (nationalPrefix) {
  34603. template = repeat(DIGIT_PLACEHOLDER, nationalPrefix.length) + this.getSeparatorAfterNationalPrefix(format2) + template;
  34604. }
  34605. }
  34606. if (international) {
  34607. template = applyInternationalSeparatorStyle(template);
  34608. }
  34609. return template;
  34610. }
  34611. }, {
  34612. key: "formatNextNationalNumberDigits",
  34613. value: function formatNextNationalNumberDigits(digits2) {
  34614. var result2 = populateTemplateWithDigits(this.populatedNationalNumberTemplate, this.populatedNationalNumberTemplatePosition, digits2);
  34615. if (!result2) {
  34616. this.resetFormat();
  34617. return;
  34618. }
  34619. this.populatedNationalNumberTemplate = result2[0];
  34620. this.populatedNationalNumberTemplatePosition = result2[1];
  34621. return cutAndStripNonPairedParens(this.populatedNationalNumberTemplate, this.populatedNationalNumberTemplatePosition + 1);
  34622. }
  34623. }, {
  34624. key: "shouldTryNationalPrefixFormattingRule",
  34625. value: function shouldTryNationalPrefixFormattingRule(format2, _ref5) {
  34626. var international = _ref5.international, nationalPrefix = _ref5.nationalPrefix;
  34627. if (format2.nationalPrefixFormattingRule()) {
  34628. var usesNationalPrefix = format2.usesNationalPrefix();
  34629. if (usesNationalPrefix && nationalPrefix || !usesNationalPrefix && !international) {
  34630. return true;
  34631. }
  34632. }
  34633. }
  34634. }]);
  34635. return AsYouTypeFormatter2;
  34636. }();
  34637. function _slicedToArray$1(arr, i2) {
  34638. return _arrayWithHoles$1(arr) || _iterableToArrayLimit$1(arr, i2) || _unsupportedIterableToArray$1(arr, i2) || _nonIterableRest$1();
  34639. }
  34640. function _nonIterableRest$1() {
  34641. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  34642. }
  34643. function _unsupportedIterableToArray$1(o2, minLen) {
  34644. if (!o2)
  34645. return;
  34646. if (typeof o2 === "string")
  34647. return _arrayLikeToArray$1(o2, minLen);
  34648. var n2 = Object.prototype.toString.call(o2).slice(8, -1);
  34649. if (n2 === "Object" && o2.constructor)
  34650. n2 = o2.constructor.name;
  34651. if (n2 === "Map" || n2 === "Set")
  34652. return Array.from(o2);
  34653. if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2))
  34654. return _arrayLikeToArray$1(o2, minLen);
  34655. }
  34656. function _arrayLikeToArray$1(arr, len) {
  34657. if (len == null || len > arr.length)
  34658. len = arr.length;
  34659. for (var i2 = 0, arr2 = new Array(len); i2 < len; i2++) {
  34660. arr2[i2] = arr[i2];
  34661. }
  34662. return arr2;
  34663. }
  34664. function _iterableToArrayLimit$1(arr, i2) {
  34665. var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
  34666. if (_i == null)
  34667. return;
  34668. var _arr = [];
  34669. var _n = true;
  34670. var _d = false;
  34671. var _s2, _e2;
  34672. try {
  34673. for (_i = _i.call(arr); !(_n = (_s2 = _i.next()).done); _n = true) {
  34674. _arr.push(_s2.value);
  34675. if (i2 && _arr.length === i2)
  34676. break;
  34677. }
  34678. } catch (err) {
  34679. _d = true;
  34680. _e2 = err;
  34681. } finally {
  34682. try {
  34683. if (!_n && _i["return"] != null)
  34684. _i["return"]();
  34685. } finally {
  34686. if (_d)
  34687. throw _e2;
  34688. }
  34689. }
  34690. return _arr;
  34691. }
  34692. function _arrayWithHoles$1(arr) {
  34693. if (Array.isArray(arr))
  34694. return arr;
  34695. }
  34696. function _classCallCheck$1(instance, Constructor) {
  34697. if (!(instance instanceof Constructor)) {
  34698. throw new TypeError("Cannot call a class as a function");
  34699. }
  34700. }
  34701. function _defineProperties$1(target, props) {
  34702. for (var i2 = 0; i2 < props.length; i2++) {
  34703. var descriptor = props[i2];
  34704. descriptor.enumerable = descriptor.enumerable || false;
  34705. descriptor.configurable = true;
  34706. if ("value" in descriptor)
  34707. descriptor.writable = true;
  34708. Object.defineProperty(target, descriptor.key, descriptor);
  34709. }
  34710. }
  34711. function _createClass$1(Constructor, protoProps, staticProps) {
  34712. if (protoProps)
  34713. _defineProperties$1(Constructor.prototype, protoProps);
  34714. if (staticProps)
  34715. _defineProperties$1(Constructor, staticProps);
  34716. Object.defineProperty(Constructor, "prototype", { writable: false });
  34717. return Constructor;
  34718. }
  34719. var VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART = "[" + VALID_PUNCTUATION + VALID_DIGITS + "]+";
  34720. var VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART_PATTERN = new RegExp("^" + VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART + "$", "i");
  34721. var VALID_FORMATTED_PHONE_NUMBER_PART = "(?:[" + PLUS_CHARS + "][" + VALID_PUNCTUATION + VALID_DIGITS + "]*|[" + VALID_PUNCTUATION + VALID_DIGITS + "]+)";
  34722. var AFTER_PHONE_NUMBER_DIGITS_END_PATTERN = new RegExp("[^" + VALID_PUNCTUATION + VALID_DIGITS + "]+.*$");
  34723. var COMPLEX_NATIONAL_PREFIX = /[^\d\[\]]/;
  34724. var AsYouTypeParser = /* @__PURE__ */ function() {
  34725. function AsYouTypeParser2(_ref) {
  34726. var defaultCountry = _ref.defaultCountry, defaultCallingCode = _ref.defaultCallingCode, metadata2 = _ref.metadata, onNationalSignificantNumberChange = _ref.onNationalSignificantNumberChange;
  34727. _classCallCheck$1(this, AsYouTypeParser2);
  34728. this.defaultCountry = defaultCountry;
  34729. this.defaultCallingCode = defaultCallingCode;
  34730. this.metadata = metadata2;
  34731. this.onNationalSignificantNumberChange = onNationalSignificantNumberChange;
  34732. }
  34733. _createClass$1(AsYouTypeParser2, [{
  34734. key: "input",
  34735. value: function input(text, state) {
  34736. var _extractFormattedDigi = extractFormattedDigitsAndPlus(text), _extractFormattedDigi2 = _slicedToArray$1(_extractFormattedDigi, 2), formattedDigits = _extractFormattedDigi2[0], hasPlus = _extractFormattedDigi2[1];
  34737. var digits2 = parseDigits(formattedDigits);
  34738. var justLeadingPlus;
  34739. if (hasPlus) {
  34740. if (!state.digits) {
  34741. state.startInternationalNumber();
  34742. if (!digits2) {
  34743. justLeadingPlus = true;
  34744. }
  34745. }
  34746. }
  34747. if (digits2) {
  34748. this.inputDigits(digits2, state);
  34749. }
  34750. return {
  34751. digits: digits2,
  34752. justLeadingPlus
  34753. };
  34754. }
  34755. /**
  34756. * Inputs "next" phone number digits.
  34757. * @param {string} digits
  34758. * @return {string} [formattedNumber] Formatted national phone number (if it can be formatted at this stage). Returning `undefined` means "don't format the national phone number at this stage".
  34759. */
  34760. }, {
  34761. key: "inputDigits",
  34762. value: function inputDigits(nextDigits, state) {
  34763. var digits2 = state.digits;
  34764. var hasReceivedThreeLeadingDigits = digits2.length < 3 && digits2.length + nextDigits.length >= 3;
  34765. state.appendDigits(nextDigits);
  34766. if (hasReceivedThreeLeadingDigits) {
  34767. this.extractIddPrefix(state);
  34768. }
  34769. if (this.isWaitingForCountryCallingCode(state)) {
  34770. if (!this.extractCountryCallingCode(state)) {
  34771. return;
  34772. }
  34773. } else {
  34774. state.appendNationalSignificantNumberDigits(nextDigits);
  34775. }
  34776. if (!state.international) {
  34777. if (!this.hasExtractedNationalSignificantNumber) {
  34778. this.extractNationalSignificantNumber(state.getNationalDigits(), function(stateUpdate) {
  34779. return state.update(stateUpdate);
  34780. });
  34781. }
  34782. }
  34783. }
  34784. }, {
  34785. key: "isWaitingForCountryCallingCode",
  34786. value: function isWaitingForCountryCallingCode(_ref2) {
  34787. var international = _ref2.international, callingCode = _ref2.callingCode;
  34788. return international && !callingCode;
  34789. }
  34790. // Extracts a country calling code from a number
  34791. // being entered in internatonal format.
  34792. }, {
  34793. key: "extractCountryCallingCode",
  34794. value: function extractCountryCallingCode$1(state) {
  34795. var _extractCountryCallin = extractCountryCallingCode("+" + state.getDigitsWithoutInternationalPrefix(), this.defaultCountry, this.defaultCallingCode, this.metadata.metadata), countryCallingCode = _extractCountryCallin.countryCallingCode, number2 = _extractCountryCallin.number;
  34796. if (countryCallingCode) {
  34797. state.setCallingCode(countryCallingCode);
  34798. state.update({
  34799. nationalSignificantNumber: number2
  34800. });
  34801. return true;
  34802. }
  34803. }
  34804. }, {
  34805. key: "reset",
  34806. value: function reset(numberingPlan) {
  34807. if (numberingPlan) {
  34808. this.hasSelectedNumberingPlan = true;
  34809. var nationalPrefixForParsing = numberingPlan._nationalPrefixForParsing();
  34810. this.couldPossiblyExtractAnotherNationalSignificantNumber = nationalPrefixForParsing && COMPLEX_NATIONAL_PREFIX.test(nationalPrefixForParsing);
  34811. } else {
  34812. this.hasSelectedNumberingPlan = void 0;
  34813. this.couldPossiblyExtractAnotherNationalSignificantNumber = void 0;
  34814. }
  34815. }
  34816. /**
  34817. * Extracts a national (significant) number from user input.
  34818. * Google's library is different in that it only applies `national_prefix_for_parsing`
  34819. * and doesn't apply `national_prefix_transform_rule` after that.
  34820. * https://github.com/google/libphonenumber/blob/a3d70b0487875475e6ad659af404943211d26456/java/libphonenumber/src/com/google/i18n/phonenumbers/AsYouTypeFormatter.java#L539
  34821. * @return {boolean} [extracted]
  34822. */
  34823. }, {
  34824. key: "extractNationalSignificantNumber",
  34825. value: function extractNationalSignificantNumber(nationalDigits, setState) {
  34826. if (!this.hasSelectedNumberingPlan) {
  34827. return;
  34828. }
  34829. var _extractNationalNumbe = extractNationalNumberFromPossiblyIncompleteNumber(nationalDigits, this.metadata), nationalPrefix = _extractNationalNumbe.nationalPrefix, nationalNumber = _extractNationalNumbe.nationalNumber, carrierCode = _extractNationalNumbe.carrierCode;
  34830. if (nationalNumber === nationalDigits) {
  34831. return;
  34832. }
  34833. this.onExtractedNationalNumber(nationalPrefix, carrierCode, nationalNumber, nationalDigits, setState);
  34834. return true;
  34835. }
  34836. /**
  34837. * In Google's code this function is called "attempt to extract longer NDD".
  34838. * "Some national prefixes are a substring of others", they say.
  34839. * @return {boolean} [result] — Returns `true` if extracting a national prefix produced different results from what they were.
  34840. */
  34841. }, {
  34842. key: "extractAnotherNationalSignificantNumber",
  34843. value: function extractAnotherNationalSignificantNumber(nationalDigits, prevNationalSignificantNumber, setState) {
  34844. if (!this.hasExtractedNationalSignificantNumber) {
  34845. return this.extractNationalSignificantNumber(nationalDigits, setState);
  34846. }
  34847. if (!this.couldPossiblyExtractAnotherNationalSignificantNumber) {
  34848. return;
  34849. }
  34850. var _extractNationalNumbe2 = extractNationalNumberFromPossiblyIncompleteNumber(nationalDigits, this.metadata), nationalPrefix = _extractNationalNumbe2.nationalPrefix, nationalNumber = _extractNationalNumbe2.nationalNumber, carrierCode = _extractNationalNumbe2.carrierCode;
  34851. if (nationalNumber === prevNationalSignificantNumber) {
  34852. return;
  34853. }
  34854. this.onExtractedNationalNumber(nationalPrefix, carrierCode, nationalNumber, nationalDigits, setState);
  34855. return true;
  34856. }
  34857. }, {
  34858. key: "onExtractedNationalNumber",
  34859. value: function onExtractedNationalNumber(nationalPrefix, carrierCode, nationalSignificantNumber, nationalDigits, setState) {
  34860. var complexPrefixBeforeNationalSignificantNumber;
  34861. var nationalSignificantNumberMatchesInput;
  34862. var nationalSignificantNumberIndex = nationalDigits.lastIndexOf(nationalSignificantNumber);
  34863. if (nationalSignificantNumberIndex >= 0 && nationalSignificantNumberIndex === nationalDigits.length - nationalSignificantNumber.length) {
  34864. nationalSignificantNumberMatchesInput = true;
  34865. var prefixBeforeNationalNumber = nationalDigits.slice(0, nationalSignificantNumberIndex);
  34866. if (prefixBeforeNationalNumber !== nationalPrefix) {
  34867. complexPrefixBeforeNationalSignificantNumber = prefixBeforeNationalNumber;
  34868. }
  34869. }
  34870. setState({
  34871. nationalPrefix,
  34872. carrierCode,
  34873. nationalSignificantNumber,
  34874. nationalSignificantNumberMatchesInput,
  34875. complexPrefixBeforeNationalSignificantNumber
  34876. });
  34877. this.hasExtractedNationalSignificantNumber = true;
  34878. this.onNationalSignificantNumberChange();
  34879. }
  34880. }, {
  34881. key: "reExtractNationalSignificantNumber",
  34882. value: function reExtractNationalSignificantNumber(state) {
  34883. if (this.extractAnotherNationalSignificantNumber(state.getNationalDigits(), state.nationalSignificantNumber, function(stateUpdate) {
  34884. return state.update(stateUpdate);
  34885. })) {
  34886. return true;
  34887. }
  34888. if (this.extractIddPrefix(state)) {
  34889. this.extractCallingCodeAndNationalSignificantNumber(state);
  34890. return true;
  34891. }
  34892. if (this.fixMissingPlus(state)) {
  34893. this.extractCallingCodeAndNationalSignificantNumber(state);
  34894. return true;
  34895. }
  34896. }
  34897. }, {
  34898. key: "extractIddPrefix",
  34899. value: function extractIddPrefix(state) {
  34900. var international = state.international, IDDPrefix = state.IDDPrefix, digits2 = state.digits;
  34901. state.nationalSignificantNumber;
  34902. if (international || IDDPrefix) {
  34903. return;
  34904. }
  34905. var numberWithoutIDD = stripIddPrefix(digits2, this.defaultCountry, this.defaultCallingCode, this.metadata.metadata);
  34906. if (numberWithoutIDD !== void 0 && numberWithoutIDD !== digits2) {
  34907. state.update({
  34908. IDDPrefix: digits2.slice(0, digits2.length - numberWithoutIDD.length)
  34909. });
  34910. this.startInternationalNumber(state, {
  34911. country: void 0,
  34912. callingCode: void 0
  34913. });
  34914. return true;
  34915. }
  34916. }
  34917. }, {
  34918. key: "fixMissingPlus",
  34919. value: function fixMissingPlus(state) {
  34920. if (!state.international) {
  34921. var _extractCountryCallin2 = extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(state.digits, this.defaultCountry, this.defaultCallingCode, this.metadata.metadata), newCallingCode = _extractCountryCallin2.countryCallingCode;
  34922. _extractCountryCallin2.number;
  34923. if (newCallingCode) {
  34924. state.update({
  34925. missingPlus: true
  34926. });
  34927. this.startInternationalNumber(state, {
  34928. country: state.country,
  34929. callingCode: newCallingCode
  34930. });
  34931. return true;
  34932. }
  34933. }
  34934. }
  34935. }, {
  34936. key: "startInternationalNumber",
  34937. value: function startInternationalNumber(state, _ref3) {
  34938. var country = _ref3.country, callingCode = _ref3.callingCode;
  34939. state.startInternationalNumber(country, callingCode);
  34940. if (state.nationalSignificantNumber) {
  34941. state.resetNationalSignificantNumber();
  34942. this.onNationalSignificantNumberChange();
  34943. this.hasExtractedNationalSignificantNumber = void 0;
  34944. }
  34945. }
  34946. }, {
  34947. key: "extractCallingCodeAndNationalSignificantNumber",
  34948. value: function extractCallingCodeAndNationalSignificantNumber(state) {
  34949. if (this.extractCountryCallingCode(state)) {
  34950. this.extractNationalSignificantNumber(state.getNationalDigits(), function(stateUpdate) {
  34951. return state.update(stateUpdate);
  34952. });
  34953. }
  34954. }
  34955. }]);
  34956. return AsYouTypeParser2;
  34957. }();
  34958. function extractFormattedPhoneNumber(text) {
  34959. var startsAt = text.search(VALID_FORMATTED_PHONE_NUMBER_PART);
  34960. if (startsAt < 0) {
  34961. return;
  34962. }
  34963. text = text.slice(startsAt);
  34964. var hasPlus;
  34965. if (text[0] === "+") {
  34966. hasPlus = true;
  34967. text = text.slice("+".length);
  34968. }
  34969. text = text.replace(AFTER_PHONE_NUMBER_DIGITS_END_PATTERN, "");
  34970. if (hasPlus) {
  34971. text = "+" + text;
  34972. }
  34973. return text;
  34974. }
  34975. function _extractFormattedDigitsAndPlus(text) {
  34976. var extractedNumber = extractFormattedPhoneNumber(text) || "";
  34977. if (extractedNumber[0] === "+") {
  34978. return [extractedNumber.slice("+".length), true];
  34979. }
  34980. return [extractedNumber];
  34981. }
  34982. function extractFormattedDigitsAndPlus(text) {
  34983. var _extractFormattedDigi3 = _extractFormattedDigitsAndPlus(text), _extractFormattedDigi4 = _slicedToArray$1(_extractFormattedDigi3, 2), formattedDigits = _extractFormattedDigi4[0], hasPlus = _extractFormattedDigi4[1];
  34984. if (!VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART_PATTERN.test(formattedDigits)) {
  34985. formattedDigits = "";
  34986. }
  34987. return [formattedDigits, hasPlus];
  34988. }
  34989. function _slicedToArray(arr, i2) {
  34990. return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i2) || _unsupportedIterableToArray(arr, i2) || _nonIterableRest();
  34991. }
  34992. function _nonIterableRest() {
  34993. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  34994. }
  34995. function _unsupportedIterableToArray(o2, minLen) {
  34996. if (!o2)
  34997. return;
  34998. if (typeof o2 === "string")
  34999. return _arrayLikeToArray(o2, minLen);
  35000. var n2 = Object.prototype.toString.call(o2).slice(8, -1);
  35001. if (n2 === "Object" && o2.constructor)
  35002. n2 = o2.constructor.name;
  35003. if (n2 === "Map" || n2 === "Set")
  35004. return Array.from(o2);
  35005. if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2))
  35006. return _arrayLikeToArray(o2, minLen);
  35007. }
  35008. function _arrayLikeToArray(arr, len) {
  35009. if (len == null || len > arr.length)
  35010. len = arr.length;
  35011. for (var i2 = 0, arr2 = new Array(len); i2 < len; i2++) {
  35012. arr2[i2] = arr[i2];
  35013. }
  35014. return arr2;
  35015. }
  35016. function _iterableToArrayLimit(arr, i2) {
  35017. var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
  35018. if (_i == null)
  35019. return;
  35020. var _arr = [];
  35021. var _n = true;
  35022. var _d = false;
  35023. var _s2, _e2;
  35024. try {
  35025. for (_i = _i.call(arr); !(_n = (_s2 = _i.next()).done); _n = true) {
  35026. _arr.push(_s2.value);
  35027. if (i2 && _arr.length === i2)
  35028. break;
  35029. }
  35030. } catch (err) {
  35031. _d = true;
  35032. _e2 = err;
  35033. } finally {
  35034. try {
  35035. if (!_n && _i["return"] != null)
  35036. _i["return"]();
  35037. } finally {
  35038. if (_d)
  35039. throw _e2;
  35040. }
  35041. }
  35042. return _arr;
  35043. }
  35044. function _arrayWithHoles(arr) {
  35045. if (Array.isArray(arr))
  35046. return arr;
  35047. }
  35048. function _classCallCheck(instance, Constructor) {
  35049. if (!(instance instanceof Constructor)) {
  35050. throw new TypeError("Cannot call a class as a function");
  35051. }
  35052. }
  35053. function _defineProperties(target, props) {
  35054. for (var i2 = 0; i2 < props.length; i2++) {
  35055. var descriptor = props[i2];
  35056. descriptor.enumerable = descriptor.enumerable || false;
  35057. descriptor.configurable = true;
  35058. if ("value" in descriptor)
  35059. descriptor.writable = true;
  35060. Object.defineProperty(target, descriptor.key, descriptor);
  35061. }
  35062. }
  35063. function _createClass(Constructor, protoProps, staticProps) {
  35064. if (protoProps)
  35065. _defineProperties(Constructor.prototype, protoProps);
  35066. if (staticProps)
  35067. _defineProperties(Constructor, staticProps);
  35068. Object.defineProperty(Constructor, "prototype", { writable: false });
  35069. return Constructor;
  35070. }
  35071. var AsYouType$1 = /* @__PURE__ */ function() {
  35072. function AsYouType2(optionsOrDefaultCountry, metadata2) {
  35073. _classCallCheck(this, AsYouType2);
  35074. this.metadata = new Metadata(metadata2);
  35075. var _this$getCountryAndCa = this.getCountryAndCallingCode(optionsOrDefaultCountry), _this$getCountryAndCa2 = _slicedToArray(_this$getCountryAndCa, 2), defaultCountry = _this$getCountryAndCa2[0], defaultCallingCode = _this$getCountryAndCa2[1];
  35076. this.defaultCountry = defaultCountry;
  35077. this.defaultCallingCode = defaultCallingCode;
  35078. this.reset();
  35079. }
  35080. _createClass(AsYouType2, [{
  35081. key: "getCountryAndCallingCode",
  35082. value: function getCountryAndCallingCode(optionsOrDefaultCountry) {
  35083. var defaultCountry;
  35084. var defaultCallingCode;
  35085. if (optionsOrDefaultCountry) {
  35086. if (isObject$2(optionsOrDefaultCountry)) {
  35087. defaultCountry = optionsOrDefaultCountry.defaultCountry;
  35088. defaultCallingCode = optionsOrDefaultCountry.defaultCallingCode;
  35089. } else {
  35090. defaultCountry = optionsOrDefaultCountry;
  35091. }
  35092. }
  35093. if (defaultCountry && !this.metadata.hasCountry(defaultCountry)) {
  35094. defaultCountry = void 0;
  35095. }
  35096. return [defaultCountry, defaultCallingCode];
  35097. }
  35098. /**
  35099. * Inputs "next" phone number characters.
  35100. * @param {string} text
  35101. * @return {string} Formatted phone number characters that have been input so far.
  35102. */
  35103. }, {
  35104. key: "input",
  35105. value: function input(text) {
  35106. var _this$parser$input = this.parser.input(text, this.state), digits2 = _this$parser$input.digits, justLeadingPlus = _this$parser$input.justLeadingPlus;
  35107. if (justLeadingPlus) {
  35108. this.formattedOutput = "+";
  35109. } else if (digits2) {
  35110. this.determineTheCountryIfNeeded();
  35111. if (this.state.nationalSignificantNumber) {
  35112. this.formatter.narrowDownMatchingFormats(this.state);
  35113. }
  35114. var formattedNationalNumber;
  35115. if (this.metadata.hasSelectedNumberingPlan()) {
  35116. formattedNationalNumber = this.formatter.format(digits2, this.state);
  35117. }
  35118. if (formattedNationalNumber === void 0) {
  35119. if (this.parser.reExtractNationalSignificantNumber(this.state)) {
  35120. this.determineTheCountryIfNeeded();
  35121. var nationalDigits = this.state.getNationalDigits();
  35122. if (nationalDigits) {
  35123. formattedNationalNumber = this.formatter.format(nationalDigits, this.state);
  35124. }
  35125. }
  35126. }
  35127. this.formattedOutput = formattedNationalNumber ? this.getFullNumber(formattedNationalNumber) : this.getNonFormattedNumber();
  35128. }
  35129. return this.formattedOutput;
  35130. }
  35131. }, {
  35132. key: "reset",
  35133. value: function reset() {
  35134. var _this = this;
  35135. this.state = new AsYouTypeState({
  35136. onCountryChange: function onCountryChange(country) {
  35137. _this.country = country;
  35138. },
  35139. onCallingCodeChange: function onCallingCodeChange(callingCode, country) {
  35140. _this.metadata.selectNumberingPlan(country, callingCode);
  35141. _this.formatter.reset(_this.metadata.numberingPlan, _this.state);
  35142. _this.parser.reset(_this.metadata.numberingPlan);
  35143. }
  35144. });
  35145. this.formatter = new AsYouTypeFormatter({
  35146. state: this.state,
  35147. metadata: this.metadata
  35148. });
  35149. this.parser = new AsYouTypeParser({
  35150. defaultCountry: this.defaultCountry,
  35151. defaultCallingCode: this.defaultCallingCode,
  35152. metadata: this.metadata,
  35153. state: this.state,
  35154. onNationalSignificantNumberChange: function onNationalSignificantNumberChange() {
  35155. _this.determineTheCountryIfNeeded();
  35156. _this.formatter.reset(_this.metadata.numberingPlan, _this.state);
  35157. }
  35158. });
  35159. this.state.reset({
  35160. country: this.defaultCountry,
  35161. callingCode: this.defaultCallingCode
  35162. });
  35163. this.formattedOutput = "";
  35164. return this;
  35165. }
  35166. /**
  35167. * Returns `true` if the phone number is being input in international format.
  35168. * In other words, returns `true` if and only if the parsed phone number starts with a `"+"`.
  35169. * @return {boolean}
  35170. */
  35171. }, {
  35172. key: "isInternational",
  35173. value: function isInternational() {
  35174. return this.state.international;
  35175. }
  35176. /**
  35177. * Returns the "calling code" part of the phone number when it's being input
  35178. * in an international format.
  35179. * If no valid calling code has been entered so far, returns `undefined`.
  35180. * @return {string} [callingCode]
  35181. */
  35182. }, {
  35183. key: "getCallingCode",
  35184. value: function getCallingCode() {
  35185. if (this.isInternational()) {
  35186. return this.state.callingCode;
  35187. }
  35188. }
  35189. // A legacy alias.
  35190. }, {
  35191. key: "getCountryCallingCode",
  35192. value: function getCountryCallingCode2() {
  35193. return this.getCallingCode();
  35194. }
  35195. /**
  35196. * Returns a two-letter country code of the phone number.
  35197. * Returns `undefined` for "non-geographic" phone numbering plans.
  35198. * Returns `undefined` if no phone number has been input yet.
  35199. * @return {string} [country]
  35200. */
  35201. }, {
  35202. key: "getCountry",
  35203. value: function getCountry() {
  35204. var digits2 = this.state.digits;
  35205. if (digits2) {
  35206. return this._getCountry();
  35207. }
  35208. }
  35209. /**
  35210. * Returns a two-letter country code of the phone number.
  35211. * Returns `undefined` for "non-geographic" phone numbering plans.
  35212. * @return {string} [country]
  35213. */
  35214. }, {
  35215. key: "_getCountry",
  35216. value: function _getCountry() {
  35217. var country = this.state.country;
  35218. return country;
  35219. }
  35220. }, {
  35221. key: "determineTheCountryIfNeeded",
  35222. value: function determineTheCountryIfNeeded() {
  35223. if (!this.state.country || this.isCountryCallingCodeAmbiguous()) {
  35224. this.determineTheCountry();
  35225. }
  35226. }
  35227. // Prepends `+CountryCode ` in case of an international phone number
  35228. }, {
  35229. key: "getFullNumber",
  35230. value: function getFullNumber(formattedNationalNumber) {
  35231. var _this2 = this;
  35232. if (this.isInternational()) {
  35233. var prefix = function prefix2(text) {
  35234. return _this2.formatter.getInternationalPrefixBeforeCountryCallingCode(_this2.state, {
  35235. spacing: text ? true : false
  35236. }) + text;
  35237. };
  35238. var callingCode = this.state.callingCode;
  35239. if (!callingCode) {
  35240. return prefix("".concat(this.state.getDigitsWithoutInternationalPrefix()));
  35241. }
  35242. if (!formattedNationalNumber) {
  35243. return prefix(callingCode);
  35244. }
  35245. return prefix("".concat(callingCode, " ").concat(formattedNationalNumber));
  35246. }
  35247. return formattedNationalNumber;
  35248. }
  35249. }, {
  35250. key: "getNonFormattedNationalNumberWithPrefix",
  35251. value: function getNonFormattedNationalNumberWithPrefix() {
  35252. var _this$state = this.state, nationalSignificantNumber = _this$state.nationalSignificantNumber, complexPrefixBeforeNationalSignificantNumber = _this$state.complexPrefixBeforeNationalSignificantNumber, nationalPrefix = _this$state.nationalPrefix;
  35253. var number2 = nationalSignificantNumber;
  35254. var prefix = complexPrefixBeforeNationalSignificantNumber || nationalPrefix;
  35255. if (prefix) {
  35256. number2 = prefix + number2;
  35257. }
  35258. return number2;
  35259. }
  35260. }, {
  35261. key: "getNonFormattedNumber",
  35262. value: function getNonFormattedNumber() {
  35263. var nationalSignificantNumberMatchesInput = this.state.nationalSignificantNumberMatchesInput;
  35264. return this.getFullNumber(nationalSignificantNumberMatchesInput ? this.getNonFormattedNationalNumberWithPrefix() : this.state.getNationalDigits());
  35265. }
  35266. }, {
  35267. key: "getNonFormattedTemplate",
  35268. value: function getNonFormattedTemplate() {
  35269. var number2 = this.getNonFormattedNumber();
  35270. if (number2) {
  35271. return number2.replace(/[\+\d]/g, DIGIT_PLACEHOLDER);
  35272. }
  35273. }
  35274. }, {
  35275. key: "isCountryCallingCodeAmbiguous",
  35276. value: function isCountryCallingCodeAmbiguous() {
  35277. var callingCode = this.state.callingCode;
  35278. var countryCodes = this.metadata.getCountryCodesForCallingCode(callingCode);
  35279. return countryCodes && countryCodes.length > 1;
  35280. }
  35281. // Determines the country of the phone number
  35282. // entered so far based on the country phone code
  35283. // and the national phone number.
  35284. }, {
  35285. key: "determineTheCountry",
  35286. value: function determineTheCountry() {
  35287. this.state.setCountry(getCountryByCallingCode(this.isInternational() ? this.state.callingCode : this.defaultCallingCode, {
  35288. nationalNumber: this.state.nationalSignificantNumber,
  35289. defaultCountry: this.defaultCountry,
  35290. metadata: this.metadata
  35291. }));
  35292. }
  35293. /**
  35294. * Returns a E.164 phone number value for the user's input.
  35295. *
  35296. * For example, for country `"US"` and input `"(222) 333-4444"`
  35297. * it will return `"+12223334444"`.
  35298. *
  35299. * For international phone number input, it will also auto-correct
  35300. * some minor errors such as using a national prefix when writing
  35301. * an international phone number. For example, if the user inputs
  35302. * `"+44 0 7400 000000"` then it will return an auto-corrected
  35303. * `"+447400000000"` phone number value.
  35304. *
  35305. * Will return `undefined` if no digits have been input,
  35306. * or when inputting a phone number in national format and no
  35307. * default country or default "country calling code" have been set.
  35308. *
  35309. * @return {string} [value]
  35310. */
  35311. }, {
  35312. key: "getNumberValue",
  35313. value: function getNumberValue() {
  35314. var _this$state2 = this.state, digits2 = _this$state2.digits, callingCode = _this$state2.callingCode, country = _this$state2.country, nationalSignificantNumber = _this$state2.nationalSignificantNumber;
  35315. if (!digits2) {
  35316. return;
  35317. }
  35318. if (this.isInternational()) {
  35319. if (callingCode) {
  35320. return "+" + callingCode + nationalSignificantNumber;
  35321. } else {
  35322. return "+" + digits2;
  35323. }
  35324. } else {
  35325. if (country || callingCode) {
  35326. var callingCode_ = country ? this.metadata.countryCallingCode() : callingCode;
  35327. return "+" + callingCode_ + nationalSignificantNumber;
  35328. }
  35329. }
  35330. }
  35331. /**
  35332. * Returns an instance of `PhoneNumber` class.
  35333. * Will return `undefined` if no national (significant) number
  35334. * digits have been entered so far, or if no `defaultCountry` has been
  35335. * set and the user enters a phone number not in international format.
  35336. */
  35337. }, {
  35338. key: "getNumber",
  35339. value: function getNumber() {
  35340. var _this$state3 = this.state, nationalSignificantNumber = _this$state3.nationalSignificantNumber, carrierCode = _this$state3.carrierCode, callingCode = _this$state3.callingCode;
  35341. var country = this._getCountry();
  35342. if (!nationalSignificantNumber) {
  35343. return;
  35344. }
  35345. if (!country && !callingCode) {
  35346. return;
  35347. }
  35348. if (country) {
  35349. if (country === this.defaultCountry) {
  35350. var metadata2 = new Metadata(this.metadata.metadata);
  35351. metadata2.selectNumberingPlan(country);
  35352. var _callingCode = metadata2.numberingPlan.callingCode();
  35353. var ambiguousCountries = this.metadata.getCountryCodesForCallingCode(_callingCode);
  35354. if (ambiguousCountries.length > 1) {
  35355. var exactCountry = getCountryByNationalNumber(nationalSignificantNumber, {
  35356. countries: ambiguousCountries,
  35357. defaultCountry: this.defaultCountry,
  35358. metadata: this.metadata.metadata
  35359. });
  35360. if (exactCountry) {
  35361. country = exactCountry;
  35362. }
  35363. }
  35364. }
  35365. }
  35366. var phoneNumber = new PhoneNumber(country || callingCode, nationalSignificantNumber, this.metadata.metadata);
  35367. if (carrierCode) {
  35368. phoneNumber.carrierCode = carrierCode;
  35369. }
  35370. return phoneNumber;
  35371. }
  35372. /**
  35373. * Returns `true` if the phone number is "possible".
  35374. * Is just a shortcut for `PhoneNumber.isPossible()`.
  35375. * @return {boolean}
  35376. */
  35377. }, {
  35378. key: "isPossible",
  35379. value: function isPossible() {
  35380. var phoneNumber = this.getNumber();
  35381. if (!phoneNumber) {
  35382. return false;
  35383. }
  35384. return phoneNumber.isPossible();
  35385. }
  35386. /**
  35387. * Returns `true` if the phone number is "valid".
  35388. * Is just a shortcut for `PhoneNumber.isValid()`.
  35389. * @return {boolean}
  35390. */
  35391. }, {
  35392. key: "isValid",
  35393. value: function isValid() {
  35394. var phoneNumber = this.getNumber();
  35395. if (!phoneNumber) {
  35396. return false;
  35397. }
  35398. return phoneNumber.isValid();
  35399. }
  35400. /**
  35401. * @deprecated
  35402. * This method is used in `react-phone-number-input/source/input-control.js`
  35403. * in versions before `3.0.16`.
  35404. */
  35405. }, {
  35406. key: "getNationalNumber",
  35407. value: function getNationalNumber() {
  35408. return this.state.nationalSignificantNumber;
  35409. }
  35410. /**
  35411. * Returns the phone number characters entered by the user.
  35412. * @return {string}
  35413. */
  35414. }, {
  35415. key: "getChars",
  35416. value: function getChars() {
  35417. return (this.state.international ? "+" : "") + this.state.digits;
  35418. }
  35419. /**
  35420. * Returns the template for the formatted phone number.
  35421. * @return {string}
  35422. */
  35423. }, {
  35424. key: "getTemplate",
  35425. value: function getTemplate() {
  35426. return this.formatter.getTemplate(this.state) || this.getNonFormattedTemplate() || "";
  35427. }
  35428. }]);
  35429. return AsYouType2;
  35430. }();
  35431. function parsePhoneNumber$1() {
  35432. return withMetadataArgument$1(parsePhoneNumber$2, arguments);
  35433. }
  35434. function AsYouType(country) {
  35435. return AsYouType$1.call(this, country, metadata$1);
  35436. }
  35437. AsYouType.prototype = Object.create(AsYouType$1.prototype, {});
  35438. AsYouType.prototype.constructor = AsYouType;
  35439. const metadata = { "version": 4, "country_calling_codes": { "1": ["US", "AG", "AI", "AS", "BB", "BM", "BS", "CA", "DM", "DO", "GD", "GU", "JM", "KN", "KY", "LC", "MP", "MS", "PR", "SX", "TC", "TT", "VC", "VG", "VI"], "7": ["RU", "KZ"], "20": ["EG"], "27": ["ZA"], "30": ["GR"], "31": ["NL"], "32": ["BE"], "33": ["FR"], "34": ["ES"], "36": ["HU"], "39": ["IT", "VA"], "40": ["RO"], "41": ["CH"], "43": ["AT"], "44": ["GB", "GG", "IM", "JE"], "45": ["DK"], "46": ["SE"], "47": ["NO", "SJ"], "48": ["PL"], "49": ["DE"], "51": ["PE"], "52": ["MX"], "53": ["CU"], "54": ["AR"], "55": ["BR"], "56": ["CL"], "57": ["CO"], "58": ["VE"], "60": ["MY"], "61": ["AU", "CC", "CX"], "62": ["ID"], "63": ["PH"], "64": ["NZ"], "65": ["SG"], "66": ["TH"], "81": ["JP"], "82": ["KR"], "84": ["VN"], "86": ["CN"], "90": ["TR"], "91": ["IN"], "92": ["PK"], "93": ["AF"], "94": ["LK"], "95": ["MM"], "98": ["IR"], "211": ["SS"], "212": ["MA", "EH"], "213": ["DZ"], "216": ["TN"], "218": ["LY"], "220": ["GM"], "221": ["SN"], "222": ["MR"], "223": ["ML"], "224": ["GN"], "225": ["CI"], "226": ["BF"], "227": ["NE"], "228": ["TG"], "229": ["BJ"], "230": ["MU"], "231": ["LR"], "232": ["SL"], "233": ["GH"], "234": ["NG"], "235": ["TD"], "236": ["CF"], "237": ["CM"], "238": ["CV"], "239": ["ST"], "240": ["GQ"], "241": ["GA"], "242": ["CG"], "243": ["CD"], "244": ["AO"], "245": ["GW"], "246": ["IO"], "247": ["AC"], "248": ["SC"], "249": ["SD"], "250": ["RW"], "251": ["ET"], "252": ["SO"], "253": ["DJ"], "254": ["KE"], "255": ["TZ"], "256": ["UG"], "257": ["BI"], "258": ["MZ"], "260": ["ZM"], "261": ["MG"], "262": ["RE", "YT"], "263": ["ZW"], "264": ["NA"], "265": ["MW"], "266": ["LS"], "267": ["BW"], "268": ["SZ"], "269": ["KM"], "290": ["SH", "TA"], "291": ["ER"], "297": ["AW"], "298": ["FO"], "299": ["GL"], "350": ["GI"], "351": ["PT"], "352": ["LU"], "353": ["IE"], "354": ["IS"], "355": ["AL"], "356": ["MT"], "357": ["CY"], "358": ["FI", "AX"], "359": ["BG"], "370": ["LT"], "371": ["LV"], "372": ["EE"], "373": ["MD"], "374": ["AM"], "375": ["BY"], "376": ["AD"], "377": ["MC"], "378": ["SM"], "380": ["UA"], "381": ["RS"], "382": ["ME"], "383": ["XK"], "385": ["HR"], "386": ["SI"], "387": ["BA"], "389": ["MK"], "420": ["CZ"], "421": ["SK"], "423": ["LI"], "500": ["FK"], "501": ["BZ"], "502": ["GT"], "503": ["SV"], "504": ["HN"], "505": ["NI"], "506": ["CR"], "507": ["PA"], "508": ["PM"], "509": ["HT"], "590": ["GP", "BL", "MF"], "591": ["BO"], "592": ["GY"], "593": ["EC"], "594": ["GF"], "595": ["PY"], "596": ["MQ"], "597": ["SR"], "598": ["UY"], "599": ["CW", "BQ"], "670": ["TL"], "672": ["NF"], "673": ["BN"], "674": ["NR"], "675": ["PG"], "676": ["TO"], "677": ["SB"], "678": ["VU"], "679": ["FJ"], "680": ["PW"], "681": ["WF"], "682": ["CK"], "683": ["NU"], "685": ["WS"], "686": ["KI"], "687": ["NC"], "688": ["TV"], "689": ["PF"], "690": ["TK"], "691": ["FM"], "692": ["MH"], "850": ["KP"], "852": ["HK"], "853": ["MO"], "855": ["KH"], "856": ["LA"], "880": ["BD"], "886": ["TW"], "960": ["MV"], "961": ["LB"], "962": ["JO"], "963": ["SY"], "964": ["IQ"], "965": ["KW"], "966": ["SA"], "967": ["YE"], "968": ["OM"], "970": ["PS"], "971": ["AE"], "972": ["IL"], "973": ["BH"], "974": ["QA"], "975": ["BT"], "976": ["MN"], "977": ["NP"], "992": ["TJ"], "993": ["TM"], "994": ["AZ"], "995": ["GE"], "996": ["KG"], "998": ["UZ"] }, "countries": { "AC": ["247", "00", "(?:[01589]\\d|[46])\\d{4}", [5, 6], 0, 0, 0, 0, 0, 0, 0, [0, ["4\\d{4}", [5]]]], "AD": ["376", "00", "(?:1|6\\d)\\d{7}|[135-9]\\d{5}", [6, 8, 9], [["(\\d{3})(\\d{3})", "$1 $2", ["[135-9]"]], ["(\\d{4})(\\d{4})", "$1 $2", ["1"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["6"]]], 0, 0, 0, 0, 0, 0, [0, ["690\\d{6}|[356]\\d{5}", [6, 9]]]], "AE": ["971", "00", "(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}", [5, 6, 7, 8, 9, 10, 11, 12], [["(\\d{3})(\\d{2,9})", "$1 $2", ["60|8"]], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["[236]|[479][2-8]"], "0$1"], ["(\\d{3})(\\d)(\\d{5})", "$1 $2 $3", ["[479]"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["5"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["5[024-68]\\d{7}", [9]]]], "AF": ["93", "00", "[2-7]\\d{8}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-7]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["7\\d{8}"]]], "AG": ["1", "011", "(?:268|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([457]\\d{6})$|1", "268$1", 0, "268", [0, ["268(?:464|7(?:1[3-9]|[28]\\d|3[0246]|64|7[0-689]))\\d{4}"]]], "AI": ["1", "011", "(?:264|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2457]\\d{6})$|1", "264$1", 0, "264", [0, ["264(?:235|4(?:69|76)|5(?:3[6-9]|8[1-4])|7(?:29|72))\\d{4}"]]], "AL": ["355", "00", "(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}", [6, 7, 8, 9], [["(\\d{3})(\\d{3,4})", "$1 $2", ["80|9"], "0$1"], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["4[2-6]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2358][2-5]|4"], "0$1"], ["(\\d{3})(\\d{5})", "$1 $2", ["[23578]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["6"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["6(?:[78][2-9]|9\\d)\\d{6}", [9]]]], "AM": ["374", "00", "(?:[1-489]\\d|55|60|77)\\d{6}", [8], [["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["[89]0"], "0 $1"], ["(\\d{3})(\\d{5})", "$1 $2", ["2|3[12]"], "(0$1)"], ["(\\d{2})(\\d{6})", "$1 $2", ["1|47"], "(0$1)"], ["(\\d{2})(\\d{6})", "$1 $2", ["[3-9]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:33|4[1349]|55|77|88|9[13-9])\\d{6}"]]], "AO": ["244", "00", "[29]\\d{8}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[29]"]]], 0, 0, 0, 0, 0, 0, [0, ["9[1-79]\\d{7}"]]], "AR": ["54", "00", "(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}", [10, 11], [["(\\d{4})(\\d{2})(\\d{4})", "$1 $2-$3", ["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])", "2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)", "2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]", "2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"], "0$1", 1], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2-$3", ["1"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1-$2-$3", ["[68]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2-$3", ["[23]"], "0$1", 1], ["(\\d)(\\d{4})(\\d{2})(\\d{4})", "$2 15-$3-$4", ["9(?:2[2-469]|3[3-578])", "9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))", "9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)", "9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]", "9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"], "0$1", 0, "$1 $2 $3-$4"], ["(\\d)(\\d{2})(\\d{4})(\\d{4})", "$2 15-$3-$4", ["91"], "0$1", 0, "$1 $2 $3-$4"], ["(\\d{3})(\\d{3})(\\d{5})", "$1-$2-$3", ["8"], "0$1"], ["(\\d)(\\d{3})(\\d{3})(\\d{4})", "$2 15-$3-$4", ["9"], "0$1", 0, "$1 $2 $3-$4"]], "0", 0, "0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?", "9$1", 0, 0, [0, ["93(?:7(?:1[15]|81)|8(?:21|4[16]|69|9[12]))[46]\\d{5}|9(?:2(?:657|9(?:54|66))|3(?:7(?:55|77)|865))[2-8]\\d{5}|9(?:2(?:2(?:2[59]|44|52)|3(?:26|44)|473|9(?:[07]2|2[26]|34|46))|3327)[45]\\d{5}|9(?:2(?:284|3(?:02|23)|920)|3(?:4(?:46|8[27]|92)|541|878))[2-7]\\d{5}|9(?:2(?:(?:26|62)2|320|477|9(?:42|83))|3(?:329|4(?:62|76|89)|564))[2-6]\\d{5}|(?:675\\d|9(?:11[1-8]\\d|2(?:2(?:0[45]|1[2-6]|3[3-6])|3(?:[06]4|7[45])|494|6(?:04|1[2-8]|[36][45]|4[3-6])|80[45]|9(?:[17][4-6]|[48][45]|9[3-6]))|3(?:364|4(?:1[2-8]|[25][4-6]|3[3-6]|84)|5(?:1[2-9]|[38][4-6])|6(?:2[45]|44)|7[069][45]|8(?:0[45]|[17][2-6]|3[4-6]|5[3-6]|8[3-68]))))\\d{6}|92(?:2(?:21|4[23]|6[145]|7[1-4]|8[356]|9[267])|3(?:16|3[13-8]|43|5[346-8]|9[3-5])|475|6(?:2[46]|4[78]|5[1568])|9(?:03|2[1457-9]|3[1356]|4[08]|[56][23]|82))4\\d{5}|9(?:2(?:2(?:57|81)|3(?:24|46|92)|9(?:01|23|64))|3(?:4(?:42|71)|5(?:25|37|4[347]|71)|7(?:18|35|5[17])))[3-6]\\d{5}|9(?:2(?:2(?:02|2[3467]|4[156]|5[45]|6[6-8]|91)|3(?:1[47]|25|[45][25]|96)|47[48]|625|932)|3(?:38[2578]|4(?:0[0-24-9]|3[78]|4[457]|58|6[03-9]|72|83|9[136-8])|5(?:2[124]|[368][23]|4[2689]|7[2-6])|7(?:16|2[15]|3[14]|4[13]|5[468]|7[2-5]|8[26])|8(?:2[5-7]|3[278]|4[3-5]|5[78]|6[1-378]|[78]7|94)))[4-6]\\d{5}"]]], "AS": ["1", "011", "(?:[58]\\d\\d|684|900)\\d{7}", [10], 0, "1", 0, "([267]\\d{6})$|1", "684$1", 0, "684", [0, ["684(?:2(?:48|5[2468]|7[26])|7(?:3[13]|70|82))\\d{4}"]]], "AT": ["43", "00", "1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}", [4, 5, 6, 7, 8, 9, 10, 11, 12, 13], [["(\\d)(\\d{3,12})", "$1 $2", ["1(?:11|[2-9])"], "0$1"], ["(\\d{3})(\\d{2})", "$1 $2", ["517"], "0$1"], ["(\\d{2})(\\d{3,5})", "$1 $2", ["5[079]"], "0$1"], ["(\\d{3})(\\d{3,10})", "$1 $2", ["(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:20|32|8)|[89]"], "0$1"], ["(\\d{4})(\\d{3,9})", "$1 $2", ["[2-467]|5[2-6]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["5"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4,7})", "$1 $2 $3", ["5"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["6(?:5[0-3579]|6[013-9]|[7-9]\\d)\\d{4,10}", [7, 8, 9, 10, 11, 12, 13]]]], "AU": ["61", "001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011", "1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}", [5, 6, 7, 8, 9, 10, 12], [["(\\d{2})(\\d{3,4})", "$1 $2", ["16"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2,4})", "$1 $2 $3", ["16"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["14|4"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["[2378]"], "(0$1)"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1(?:30|[89])"]]], "0", 0, "(183[12])|0", 0, 0, 0, [0, ["4(?:79[01]|83[0-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}", [9]]], "0011"], "AW": ["297", "00", "(?:[25-79]\\d\\d|800)\\d{4}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[25-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:290|5[69]\\d|6(?:[03]0|22|4[0-2]|[69]\\d)|7(?:[34]\\d|7[07])|9(?:6[45]|9[4-8]))\\d{4}"]]], "AX": ["358", "00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))", "2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}", [5, 6, 7, 8, 9, 10, 11, 12], 0, "0", 0, 0, 0, 0, "18", [0, ["4946\\d{2,6}|(?:4[0-8]|50)\\d{4,8}", [6, 7, 8, 9, 10]]], "00"], "AZ": ["994", "00", "365\\d{6}|(?:[124579]\\d|60|88)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["90"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["1[28]|2|365|46", "1[28]|2|365[45]|46", "1[28]|2|365(?:4|5[02])|46"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[13-9]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["36554\\d{4}|(?:[16]0|4[04]|5[015]|7[07]|99)\\d{7}"]]], "BA": ["387", "00", "6\\d{8}|(?:[35689]\\d|49|70)\\d{6}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["6[1-3]|[7-9]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2-$3", ["[3-5]|6[56]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["6"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["6040\\d{5}|6(?:03|[1-356]|44|7\\d)\\d{6}"]]], "BB": ["1", "011", "(?:246|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "246$1", 0, "246", [0, ["246(?:(?:2(?:[3568]\\d|4[0-57-9])|3(?:5[2-9]|6[0-6])|4(?:46|5\\d)|69[5-7]|8(?:[2-5]\\d|83))\\d|52(?:1[147]|20))\\d{3}"]]], "BD": ["880", "00", "[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}", [6, 7, 8, 9, 10], [["(\\d{2})(\\d{4,6})", "$1-$2", ["31[5-8]|[459]1"], "0$1"], ["(\\d{3})(\\d{3,7})", "$1-$2", ["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"], "0$1"], ["(\\d{4})(\\d{3,6})", "$1-$2", ["[13-9]|2[23]"], "0$1"], ["(\\d)(\\d{7,8})", "$1-$2", ["2"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:1[13-9]\\d|644)\\d{7}|(?:3[78]|44|66)[02-9]\\d{7}", [10]]]], "BE": ["32", "00", "4\\d{8}|[1-9]\\d{7}", [8, 9], [["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["(?:80|9)0"], "0$1"], ["(\\d)(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[239]|4[23]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[15-8]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["4"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["4[5-9]\\d{7}", [9]]]], "BF": ["226", "00", "[025-7]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[025-7]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:0[1-7]|5[0-8]|[67]\\d)\\d{6}"]]], "BG": ["359", "00", "00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}", [6, 7, 8, 9, 12], [["(\\d)(\\d)(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["2"], "0$1"], ["(\\d{3})(\\d{4})", "$1 $2", ["43[1-6]|70[1-9]"], "0$1"], ["(\\d)(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2,3})", "$1 $2 $3", ["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["(?:70|8)0"], "0$1"], ["(\\d{3})(\\d{3})(\\d{2})", "$1 $2 $3", ["43[1-7]|7"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[48]|9[08]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["9"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:43[07-9]|99[69]\\d)\\d{5}|(?:8[7-9]|98)\\d{7}", [8, 9]]]], "BH": ["973", "00", "[136-9]\\d{7}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[13679]|8[02-4679]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:3(?:[0-79]\\d|8[0-57-9])\\d|6(?:3(?:00|33|6[16])|441|6(?:3[03-9]|[69]\\d|7[0-689])))\\d{4}"]]], "BI": ["257", "00", "(?:[267]\\d|31)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2367]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:29|[67][125-9])\\d{6}"]]], "BJ": ["229", "00", "[24-689]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[24-689]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:4[0-8]|[56]\\d|9[013-9])\\d{6}"]]], "BL": ["590", "00", "590\\d{6}|(?:69|80|9\\d)\\d{7}", [9], 0, "0", 0, 0, 0, 0, 0, [0, ["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"]]], "BM": ["1", "011", "(?:441|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "441$1", 0, "441", [0, ["441(?:[2378]\\d|5[0-39]|9[02])\\d{5}"]]], "BN": ["673", "00", "[2-578]\\d{6}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-578]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:22[89]|[78]\\d\\d)\\d{4}"]]], "BO": ["591", "00(?:1\\d)?", "8001\\d{5}|(?:[2-467]\\d|50)\\d{6}", [8, 9], [["(\\d)(\\d{7})", "$1 $2", ["[235]|4[46]"]], ["(\\d{8})", "$1", ["[67]"]], ["(\\d{3})(\\d{2})(\\d{4})", "$1 $2 $3", ["8"]]], "0", 0, "0(1\\d)?", 0, 0, 0, [0, ["[67]\\d{7}", [8]]]], "BQ": ["599", "00", "(?:[34]1|7\\d)\\d{5}", [7], 0, 0, 0, 0, 0, 0, "[347]", [0, ["(?:31(?:8[14-8]|9[14578])|416[14-9]|7(?:0[01]|7[07]|8\\d|9[056])\\d)\\d{3}"]]], "BR": ["55", "00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)", "(?:[1-46-9]\\d\\d|5(?:[0-46-9]\\d|5[0-46-9]))\\d{8}|[1-9]\\d{9}|[3589]\\d{8}|[34]\\d{7}", [8, 9, 10, 11], [["(\\d{4})(\\d{4})", "$1-$2", ["300|4(?:0[02]|37)", "4(?:02|37)0|[34]00"]], ["(\\d{3})(\\d{2,3})(\\d{4})", "$1 $2 $3", ["(?:[358]|90)0"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2-$3", ["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"], "($1)"], ["(\\d{2})(\\d{5})(\\d{4})", "$1 $2-$3", ["[16][1-9]|[2-57-9]"], "($1)"]], "0", 0, "(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?", "$2", 0, 0, [0, ["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])(?:7|9\\d)\\d{7}", [10, 11]]]], "BS": ["1", "011", "(?:242|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([3-8]\\d{6})$|1", "242$1", 0, "242", [0, ["242(?:3(?:5[79]|7[56]|95)|4(?:[23][1-9]|4[1-35-9]|5[1-8]|6[2-8]|7\\d|81)|5(?:2[45]|3[35]|44|5[1-46-9]|65|77)|6[34]6|7(?:27|38)|8(?:0[1-9]|1[02-9]|2\\d|3[0-4]|[89]9))\\d{4}"]]], "BT": ["975", "00", "[17]\\d{7}|[2-8]\\d{6}", [7, 8], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-68]|7[246]"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["1[67]|7"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:1[67]|77)\\d{6}", [8]]]], "BW": ["267", "00", "(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}", [7, 8, 10], [["(\\d{2})(\\d{5})", "$1 $2", ["90"]], ["(\\d{3})(\\d{4})", "$1 $2", ["[24-6]|3[15-9]"]], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[37]"]], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["0"]], ["(\\d{3})(\\d{4})(\\d{3})", "$1 $2 $3", ["8"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:321|7[1-8]\\d)\\d{5}", [8]]]], "BY": ["375", "810", "(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}", [6, 7, 8, 9, 10, 11], [["(\\d{3})(\\d{3})", "$1 $2", ["800"], "8 $1"], ["(\\d{3})(\\d{2})(\\d{2,4})", "$1 $2 $3", ["800"], "8 $1"], ["(\\d{4})(\\d{2})(\\d{3})", "$1 $2-$3", ["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])", "1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"], "8 0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["1(?:[56]|7[467])|2[1-3]"], "8 0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["[1-4]"], "8 0$1"], ["(\\d{3})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["[89]"], "8 $1"]], "8", 0, "0|80?", 0, 0, 0, [0, ["(?:2(?:5[5-79]|9[1-9])|(?:33|44)\\d)\\d{6}", [9]]], "8~10"], "BZ": ["501", "00", "(?:0800\\d|[2-8])\\d{6}", [7, 11], [["(\\d{3})(\\d{4})", "$1-$2", ["[2-8]"]], ["(\\d)(\\d{3})(\\d{4})(\\d{3})", "$1-$2-$3-$4", ["0"]]], 0, 0, 0, 0, 0, 0, [0, ["6[0-35-7]\\d{5}", [7]]]], "CA": ["1", "011", "(?:[2-8]\\d|90)\\d{8}|3\\d{6}", [7, 10], 0, "1", 0, 0, 0, 0, 0, [0, ["(?:2(?:04|[23]6|[48]9|50|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|90[25])[2-9]\\d{6}", [10]]]], "CC": ["61", "001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011", "1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}", [6, 7, 8, 9, 10, 12], 0, "0", 0, "([59]\\d{7})$|0", "8$1", 0, 0, [0, ["4(?:79[01]|83[0-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}", [9]]], "0011"], "CD": ["243", "00", "(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}", [7, 8, 9, 10], [["(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["88"], "0$1"], ["(\\d{2})(\\d{5})", "$1 $2", ["[1-6]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[89]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["5"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["88\\d{5}|(?:8[0-69]|9[017-9])\\d{7}", [7, 9]]]], "CF": ["236", "00", "(?:[27]\\d{3}|8776)\\d{4}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[278]"]]], 0, 0, 0, 0, 0, 0, [0, ["7[024-7]\\d{6}"]]], "CG": ["242", "00", "222\\d{6}|(?:0\\d|80)\\d{7}", [9], [["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["8"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[02]"]]], 0, 0, 0, 0, 0, 0, [0, ["026(?:1[0-5]|6[6-9])\\d{4}|0(?:[14-6]\\d\\d|2(?:40|5[5-8]|6[07-9]))\\d{5}"]]], "CH": ["41", "00", "8\\d{11}|[2-9]\\d{8}", [9, 12], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8[047]|90"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-79]|81"], "0$1"], ["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:6[89]|7[235-9])\\d{7}", [9]]]], "CI": ["225", "00", "[02]\\d{9}", [10], [["(\\d{2})(\\d{2})(\\d)(\\d{5})", "$1 $2 $3 $4", ["2"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3 $4", ["0"]]], 0, 0, 0, 0, 0, 0, [0, ["0[157]\\d{8}"]]], "CK": ["682", "00", "[2-578]\\d{4}", [5], [["(\\d{2})(\\d{3})", "$1 $2", ["[2-578]"]]], 0, 0, 0, 0, 0, 0, [0, ["[578]\\d{4}"]]], "CL": ["56", "(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0", "12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}", [9, 10, 11], [["(\\d{5})(\\d{4})", "$1 $2", ["219", "2196"], "($1)"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["44"]], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["2[1-36]"], "($1)"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["9[2-9]"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[1-9])"], "($1)"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["60|8"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]], ["(\\d{3})(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["60"]]], 0, 0, 0, 0, 0, 0, [0, ["2(?:1982[0-6]|3314[05-9])\\d{3}|(?:2(?:1(?:160|962)|3(?:2\\d\\d|3(?:[03467]\\d|1[0-35-9]|2[1-9]|5[0-24-9]|8[0-3])|600)|646[59])|80[1-9]\\d\\d|9(?:3(?:[0-57-9]\\d\\d|6(?:0[02-9]|[1-9]\\d))|6(?:[0-8]\\d\\d|9(?:[02-79]\\d|1[05-9]))|7[1-9]\\d\\d|9(?:[03-9]\\d\\d|1(?:[0235-9]\\d|4[0-24-9])|2(?:[0-79]\\d|8[0-46-9]))))\\d{4}|(?:22|3[2-5]|[47][1-35]|5[1-3578]|6[13-57]|8[1-9]|9[2458])\\d{7}", [9]]]], "CM": ["237", "00", "[26]\\d{8}|88\\d{6,7}", [8, 9], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["88"]], ["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["[26]|88"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:24[23]|6(?:[25-9]\\d|40))\\d{6}", [9]]]], "CN": ["86", "00|1(?:[12]\\d|79)\\d\\d00", "(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}", [7, 8, 9, 10, 11, 12], [["(\\d{2})(\\d{5,6})", "$1 $2", ["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]", "(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1", "10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12", "10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123", "10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"], "0$1"], ["(\\d{3})(\\d{5,6})", "$1 $2", ["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]", "(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]", "85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])", "85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["(?:4|80)0"]], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["10|2(?:[02-57-9]|1[1-9])", "10|2(?:[02-57-9]|1[1-9])", "10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"], "0$1", 1], ["(\\d{3})(\\d{7,8})", "$1 $2", ["9"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["80"], "0$1", 1], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["[3-578]"], "0$1", 1], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["1[3-9]"]], ["(\\d{2})(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3 $4", ["[12]"], "0$1", 1]], "0", 0, "(1(?:[12]\\d|79)\\d\\d)|0", 0, 0, 0, [0, ["1740[0-5]\\d{6}|1(?:[38]\\d|4[57]|[59][0-35-9]|6[25-7]|7[0-35-8])\\d{8}", [11]]], "00"], "CO": ["57", "00(?:4(?:[14]4|56)|[579])", "(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}", [8, 10, 11], [["(\\d{4})(\\d{4})", "$1 $2", ["46"]], ["(\\d{3})(\\d{7})", "$1 $2", ["6|90"], "($1)"], ["(\\d{3})(\\d{7})", "$1 $2", ["3[0-357]|91"]], ["(\\d)(\\d{3})(\\d{7})", "$1-$2-$3", ["1"], "0$1", 0, "$1 $2 $3"]], "0", 0, "0([3579]|4(?:[14]4|56))?", 0, 0, 0, [0, ["333301[0-5]\\d{3}|3333(?:00|2[5-9]|[3-9]\\d)\\d{4}|(?:3(?:24[1-9]|3(?:00|3[0-24-9]))|9101)\\d{6}|3(?:0[0-5]|1\\d|2[0-3]|5[01]|70)\\d{7}", [10]]]], "CR": ["506", "00", "(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}", [8, 10], [["(\\d{4})(\\d{4})", "$1 $2", ["[2-7]|8[3-9]"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1-$2-$3", ["[89]"]]], 0, 0, "(19(?:0[0-2468]|1[09]|20|66|77|99))", 0, 0, 0, [0, ["(?:3005\\d|6500[01])\\d{3}|(?:5[07]|6[0-4]|7[0-3]|8[3-9])\\d{6}", [8]]]], "CU": ["53", "119", "(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}", [6, 7, 8, 10], [["(\\d{2})(\\d{4,6})", "$1 $2", ["2[1-4]|[34]"], "(0$1)"], ["(\\d)(\\d{6,7})", "$1 $2", ["7"], "(0$1)"], ["(\\d)(\\d{7})", "$1 $2", ["[56]"], "0$1"], ["(\\d{3})(\\d{7})", "$1 $2", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:5\\d|6[2-4])\\d{6}", [8]]]], "CV": ["238", "0", "(?:[2-59]\\d\\d|800)\\d{4}", [7], [["(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3", ["[2-589]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:36|5[1-389]|9\\d)\\d{5}"]]], "CW": ["599", "00", "(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}", [7, 8], [["(\\d{3})(\\d{4})", "$1 $2", ["[3467]"]], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["9[4-8]"]]], 0, 0, 0, 0, 0, "[69]", [0, ["953[01]\\d{4}|9(?:5[12467]|6[5-9])\\d{5}"]]], "CX": ["61", "001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011", "1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}", [6, 7, 8, 9, 10, 12], 0, "0", 0, "([59]\\d{7})$|0", "8$1", 0, 0, [0, ["4(?:79[01]|83[0-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}", [9]]], "0011"], "CY": ["357", "00", "(?:[279]\\d|[58]0)\\d{6}", [8], [["(\\d{2})(\\d{6})", "$1 $2", ["[257-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["9(?:10|[4-79]\\d)\\d{5}"]]], "CZ": ["420", "00", "(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}", [9, 10, 11, 12], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-8]|9[015-7]"]], ["(\\d{2})(\\d{3})(\\d{3})(\\d{2})", "$1 $2 $3 $4", ["96"]], ["(\\d{2})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["9"]], ["(\\d{3})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["9"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:60[1-8]\\d|7(?:0(?:[2-5]\\d|60)|19[01]|[2379]\\d\\d))\\d{5}", [9]]]], "DE": ["49", "00", "[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}", [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], [["(\\d{2})(\\d{3,13})", "$1 $2", ["3[02]|40|[68]9"], "0$1"], ["(\\d{3})(\\d{3,12})", "$1 $2", ["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1", "2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"], "0$1"], ["(\\d{4})(\\d{2,11})", "$1 $2", ["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]", "[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"], "0$1"], ["(\\d{3})(\\d{4})", "$1 $2", ["138"], "0$1"], ["(\\d{5})(\\d{2,10})", "$1 $2", ["3"], "0$1"], ["(\\d{3})(\\d{5,11})", "$1 $2", ["181"], "0$1"], ["(\\d{3})(\\d)(\\d{4,10})", "$1 $2 $3", ["1(?:3|80)|9"], "0$1"], ["(\\d{3})(\\d{7,8})", "$1 $2", ["1[67]"], "0$1"], ["(\\d{3})(\\d{7,12})", "$1 $2", ["8"], "0$1"], ["(\\d{5})(\\d{6})", "$1 $2", ["185", "1850", "18500"], "0$1"], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["7"], "0$1"], ["(\\d{4})(\\d{7})", "$1 $2", ["18[68]"], "0$1"], ["(\\d{4})(\\d{7})", "$1 $2", ["15[1279]"], "0$1"], ["(\\d{5})(\\d{6})", "$1 $2", ["15[03568]", "15(?:[0568]|31)"], "0$1"], ["(\\d{3})(\\d{8})", "$1 $2", ["18"], "0$1"], ["(\\d{3})(\\d{2})(\\d{7,8})", "$1 $2 $3", ["1(?:6[023]|7)"], "0$1"], ["(\\d{4})(\\d{2})(\\d{7})", "$1 $2 $3", ["15[279]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{8})", "$1 $2 $3", ["15"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["16[023]\\d{7,8}|1(?:5310|7[0-57-9]\\d)\\d{6}|1(?:5[0-25-9]|76)\\d{8}", [10, 11]]]], "DJ": ["253", "00", "(?:2\\d|77)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[27]"]]], 0, 0, 0, 0, 0, 0, [0, ["77\\d{6}"]]], "DK": ["45", "00", "[2-9]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:[2-7]\\d|8[126-9]|9[1-46-9])\\d{6}"]]], "DM": ["1", "011", "(?:[58]\\d\\d|767|900)\\d{7}", [10], 0, "1", 0, "([2-7]\\d{6})$|1", "767$1", 0, "767", [0, ["767(?:2(?:[2-4689]5|7[5-7])|31[5-7]|61[1-8]|70[1-6])\\d{4}"]]], "DO": ["1", "011", "(?:[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, 0, 0, 0, "8001|8[024]9", [0, ["8[024]9[2-9]\\d{6}"]]], "DZ": ["213", "00", "(?:[1-4]|[5-79]\\d|80)\\d{7}", [8, 9], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[1-4]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["9"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-8]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:5(?:4[0-29]|5\\d|6[0-3])|6(?:[569]\\d|7[0-6])|7[7-9]\\d)\\d{6}", [9]]]], "EC": ["593", "00", "1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}", [8, 9, 10, 11], [["(\\d)(\\d{3})(\\d{4})", "$1 $2-$3", ["[2-7]"], "(0$1)", 0, "$1-$2-$3"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["9"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["1"]]], "0", 0, 0, 0, 0, 0, [0, ["964[0-2]\\d{5}|9(?:39|[57][89]|6[0-36-9]|[89]\\d)\\d{6}", [9]]]], "EE": ["372", "00", "8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}", [7, 8, 10], [["(\\d{3})(\\d{4})", "$1 $2", ["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88", "[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]], ["(\\d{4})(\\d{3,4})", "$1 $2", ["[45]|8(?:00|[1-49])", "[45]|8(?:00[1-9]|[1-49])"]], ["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["7"]], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:5\\d{5}|8(?:1(?:0(?:0(?:00|[178]\\d)|[3-9]\\d\\d)|(?:1(?:0[2-6]|1\\d)|(?:2[0-59]|[3-79]\\d)\\d)\\d)|2(?:0(?:0(?:00|4\\d)|(?:19|[2-7]\\d)\\d)|(?:(?:[124-69]\\d|3[5-9])\\d|7(?:[0-79]\\d|8[13-9])|8(?:[2-6]\\d|7[01]))\\d)|[349]\\d{4}))\\d\\d|5(?:(?:[02]\\d|5[0-478])\\d|1(?:[0-8]\\d|95)|6(?:4[0-4]|5[1-589]))\\d{3}", [7, 8]]]], "EG": ["20", "00", "[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}", [8, 9, 10], [["(\\d)(\\d{7,8})", "$1 $2", ["[23]"], "0$1"], ["(\\d{2})(\\d{6,7})", "$1 $2", ["1[35]|[4-6]|8[2468]|9[235-7]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[89]"], "0$1"], ["(\\d{2})(\\d{8})", "$1 $2", ["1"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["1[0-25]\\d{8}", [10]]]], "EH": ["212", "00", "[5-8]\\d{8}", [9], 0, "0", 0, 0, 0, 0, "528[89]", [0, ["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-4]|5[01]|8[0-3]))\\d{6}"]]], "ER": ["291", "00", "[178]\\d{6}", [7], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[178]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:17[1-3]|7\\d\\d)\\d{4}"]]], "ES": ["34", "00", "[5-9]\\d{8}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[89]00"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:590[16]00\\d|9(?:6906(?:09|10)|7390\\d\\d))\\d\\d|(?:6\\d|7[1-48])\\d{7}"]]], "ET": ["251", "00", "(?:11|[2-579]\\d)\\d{7}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1-579]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["700[1-9]\\d{5}|(?:7(?:0[1-9]|1[0-8]|22|77|86|99)|9\\d\\d)\\d{6}"]]], "FI": ["358", "00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))", "[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}", [5, 6, 7, 8, 9, 10, 11, 12], [["(\\d{5})", "$1", ["20[2-59]"], "0$1"], ["(\\d{3})(\\d{3,7})", "$1 $2", ["(?:[1-3]0|[68])0|70[07-9]"], "0$1"], ["(\\d{2})(\\d{4,8})", "$1 $2", ["[14]|2[09]|50|7[135]"], "0$1"], ["(\\d{2})(\\d{6,10})", "$1 $2", ["7"], "0$1"], ["(\\d)(\\d{4,9})", "$1 $2", ["(?:1[49]|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"], "0$1"]], "0", 0, 0, 0, 0, "1[03-79]|[2-9]", [0, ["4946\\d{2,6}|(?:4[0-8]|50)\\d{4,8}", [6, 7, 8, 9, 10]]], "00"], "FJ": ["679", "0(?:0|52)", "45\\d{5}|(?:0800\\d|[235-9])\\d{6}", [7, 11], [["(\\d{3})(\\d{4})", "$1 $2", ["[235-9]|45"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["0"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:[279]\\d|45|5[01568]|8[034679])\\d{5}", [7]]], "00"], "FK": ["500", "00", "[2-7]\\d{4}", [5], 0, 0, 0, 0, 0, 0, 0, [0, ["[56]\\d{4}"]]], "FM": ["691", "00", "(?:[39]\\d\\d|820)\\d{4}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[389]"]]], 0, 0, 0, 0, 0, 0, [0, ["31(?:00[67]|208|309)\\d\\d|(?:3(?:[2357]0[1-9]|602|804|905)|(?:820|9[2-7]\\d)\\d)\\d{3}"]]], "FO": ["298", "00", "[2-9]\\d{5}", [6], [["(\\d{6})", "$1", ["[2-9]"]]], 0, 0, "(10(?:01|[12]0|88))", 0, 0, 0, [0, ["(?:[27][1-9]|5\\d|9[16])\\d{4}"]]], "FR": ["33", "00", "[1-9]\\d{8}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0 $1"], ["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["[1-79]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:6(?:[0-24-8]\\d|3[0-8]|9[589])|7[3-9]\\d)\\d{6}"]]], "GA": ["241", "00", "(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}", [7, 8], [["(\\d)(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-7]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["0"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["11|[67]"], "0$1"]], 0, 0, "0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})", "$1", 0, 0, [0, ["(?:(?:0[2-7]|7[467])\\d|6(?:0[0-4]|10|[256]\\d))\\d{5}|[2-7]\\d{6}"]]], "GB": ["44", "00", "[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}", [7, 9, 10], [["(\\d{3})(\\d{4})", "$1 $2", ["800", "8001", "80011", "800111", "8001111"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3", ["845", "8454", "84546", "845464"], "0$1"], ["(\\d{3})(\\d{6})", "$1 $2", ["800"], "0$1"], ["(\\d{5})(\\d{4,5})", "$1 $2", ["1(?:38|5[23]|69|76|94)", "1(?:(?:38|69)7|5(?:24|39)|768|946)", "1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"], "0$1"], ["(\\d{4})(\\d{5,6})", "$1 $2", ["1(?:[2-69][02-9]|[78])"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["[25]|7(?:0|6[02-9])", "[25]|7(?:0|6(?:[03-9]|2[356]))"], "0$1"], ["(\\d{4})(\\d{6})", "$1 $2", ["7"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1389]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}", [10]]], 0, " x"], "GD": ["1", "011", "(?:473|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "473$1", 0, "473", [0, ["473(?:4(?:0[2-79]|1[04-9]|2[0-5]|49|5[68])|5(?:2[01]|3[3-8])|901)\\d{4}"]]], "GE": ["995", "00", "(?:[3-57]\\d\\d|800)\\d{6}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["70"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["32"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[57]"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[348]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["5(?:(?:(?:0555|1(?:[17]77|555))[5-9]|757(?:7[7-9]|8[01]))\\d|22252[0-4])\\d\\d|5(?:0(?:0[17]0|505)|1(?:0[01]0|1(?:07|33|51))|2(?:0[02]0|2[25]2)|3(?:0[03]0|3[35]3)|(?:40[04]|900)0|5222)[0-4]\\d{3}|(?:5(?:0(?:0(?:0\\d|11|22|3[0-6]|44|5[05]|77|88|9[09])|111|22[02]|77\\d)|1(?:1(?:[03][01]|[124]\\d|5[2-6]|7[0-4])|4\\d\\d)|[23]555|4(?:4\\d\\d|555)|5(?:[0157-9]\\d\\d|200)|6[89]\\d\\d|7(?:[0147-9]\\d\\d|5(?:00|[57]5))|8(?:0(?:[018]\\d|2[0-4])|5(?:55|8[89])|8(?:55|88))|9(?:090|[1-35-9]\\d\\d))|790\\d\\d)\\d{4}"]]], "GF": ["594", "00", "[56]94\\d{6}|(?:80|9\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[56]|9[47]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[89]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["694(?:[0-249]\\d|3[0-8])\\d{4}"]]], "GG": ["44", "00", "(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?", [7, 9, 10], 0, "0", 0, "([25-9]\\d{5})$|0", "1481$1", 0, 0, [0, ["7(?:(?:781|839)\\d|911[17])\\d{5}", [10]]]], "GH": ["233", "00", "(?:[235]\\d{3}|800)\\d{5}", [8, 9], [["(\\d{3})(\\d{5})", "$1 $2", ["8"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[235]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:2(?:[0346-9]\\d|5[67])|5(?:[03-7]\\d|9[1-9]))\\d{6}", [9]]]], "GI": ["350", "00", "(?:[25]\\d|60)\\d{6}", [8], [["(\\d{3})(\\d{5})", "$1 $2", ["2"]]], 0, 0, 0, 0, 0, 0, [0, ["5251[0-4]\\d{3}|(?:5(?:[146-8]\\d\\d|250)|60(?:1[01]|6\\d))\\d{4}"]]], "GL": ["299", "00", "(?:19|[2-689]\\d|70)\\d{4}", [6], [["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["19|[2-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["[245]\\d{5}"]]], "GM": ["220", "00", "[2-9]\\d{6}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:[23679]\\d|4[015]|5[0-489])\\d{5}"]]], "GN": ["224", "00", "722\\d{6}|(?:3|6\\d)\\d{7}", [8, 9], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["3"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[67]"]]], 0, 0, 0, 0, 0, 0, [0, ["6[0-356]\\d{7}", [9]]]], "GP": ["590", "00", "590\\d{6}|(?:69|80|9\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[569]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"]]], "GQ": ["240", "00", "222\\d{6}|(?:3\\d|55|[89]0)\\d{7}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[235]"]], ["(\\d{3})(\\d{6})", "$1 $2", ["[89]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:222|55\\d)\\d{6}"]]], "GR": ["30", "00", "5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}", [10, 11, 12], [["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["21|7"]], ["(\\d{4})(\\d{6})", "$1 $2", ["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2689]"]], ["(\\d{3})(\\d{3,4})(\\d{5})", "$1 $2 $3", ["8"]]], 0, 0, 0, 0, 0, 0, [0, ["68[57-9]\\d{7}|(?:69|94)\\d{8}", [10]]]], "GT": ["502", "00", "80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}", [8, 11], [["(\\d{4})(\\d{4})", "$1 $2", ["[2-8]"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:[3-5]\\d\\d|80[0-4])\\d{5}", [8]]]], "GU": ["1", "011", "(?:[58]\\d\\d|671|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "671$1", 0, "671", [0, ["671(?:2\\d\\d|3(?:00|3[39]|4[349]|55|6[26])|4(?:00|56|7[1-9]|8[02-46-9])|5(?:55|6[2-5]|88)|6(?:3[2-578]|4[24-9]|5[34]|78|8[235-9])|7(?:[0479]7|2[0167]|3[45]|8[7-9])|8(?:[2-57-9]8|6[48])|9(?:2[29]|6[79]|7[1279]|8[7-9]|9[78]))\\d{4}"]]], "GW": ["245", "00", "[49]\\d{8}|4\\d{6}", [7, 9], [["(\\d{3})(\\d{4})", "$1 $2", ["40"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[49]"]]], 0, 0, 0, 0, 0, 0, [0, ["9(?:5\\d|6[569]|77)\\d{6}", [9]]]], "GY": ["592", "001", "(?:[2-8]\\d{3}|9008)\\d{3}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["510\\d{4}|(?:6\\d|7[0-5])\\d{5}"]]], "HK": ["852", "00(?:30|5[09]|[126-9]?)", "8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}", [5, 6, 7, 8, 9, 11], [["(\\d{3})(\\d{2,5})", "$1 $2", ["900", "9003"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"]], ["(\\d{3})(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["9"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:4(?:44[0-25-9]|6(?:1[0-7]|4[0-57-9]|6[0-4])|74[0-2])|5(?:73[0-6]|95[0-8])|6(?:26[013-8]|66[0-3])|70(?:7[1-8]|8[0-4])|84(?:4[0-2]|8[0-35-9])|9(?:29[013-9]|39[01]|59[0-4]|899))\\d{4}|(?:4(?:4[0-35-9]|6[02357-9]|7[05])|5(?:[1-59][0-46-9]|6[0-4689]|7[0-246-9])|6(?:0[1-9]|[13-59]\\d|[268][0-57-9]|7[0-79])|70[1-49]|84[0-39]|9(?:0[1-9]|1[02-9]|[2358][0-8]|[467]\\d))\\d{5}", [8]]], "00"], "HN": ["504", "00", "8\\d{10}|[237-9]\\d{7}", [8, 11], [["(\\d{4})(\\d{4})", "$1-$2", ["[237-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["[37-9]\\d{7}", [8]]]], "HR": ["385", "00", "(?:[24-69]\\d|3[0-79])\\d{7}|80\\d{5,7}|[1-79]\\d{7}|6\\d{5,6}", [6, 7, 8, 9], [["(\\d{2})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["6[01]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["8"], "0$1"], ["(\\d)(\\d{4})(\\d{3})", "$1 $2 $3", ["1"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["6|7[245]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["9"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2-57]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["9(?:(?:0[1-9]|[12589]\\d)\\d\\d|7(?:[0679]\\d\\d|5(?:[01]\\d|44|55|77|9[5-7])))\\d{4}|98\\d{6}", [8, 9]]]], "HT": ["509", "00", "(?:[2-489]\\d|55)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["[2-589]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:[34]\\d|55)\\d{6}"]]], "HU": ["36", "00", "[235-7]\\d{8}|[1-9]\\d{7}", [8, 9], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "(06 $1)"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"], "(06 $1)"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2-9]"], "06 $1"]], "06", 0, 0, 0, 0, 0, [0, ["(?:[257]0|3[01])\\d{7}", [9]]]], "ID": ["62", "00[89]", "00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}", [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["15"]], ["(\\d{2})(\\d{5,9})", "$1 $2", ["2[124]|[36]1"], "(0$1)"], ["(\\d{3})(\\d{5,7})", "$1 $2", ["800"], "0$1"], ["(\\d{3})(\\d{5,8})", "$1 $2", ["[2-79]"], "(0$1)"], ["(\\d{3})(\\d{3,4})(\\d{3})", "$1-$2-$3", ["8[1-35-9]"], "0$1"], ["(\\d{3})(\\d{6,8})", "$1 $2", ["1"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["804"], "0$1"], ["(\\d{3})(\\d)(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["80"], "0$1"], ["(\\d{3})(\\d{4})(\\d{4,5})", "$1-$2-$3", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["8[1-35-9]\\d{7,10}", [9, 10, 11, 12]]]], "IE": ["353", "00", "(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}", [7, 8, 9, 10], [["(\\d{2})(\\d{5})", "$1 $2", ["2[24-9]|47|58|6[237-9]|9[35-9]"], "(0$1)"], ["(\\d{3})(\\d{5})", "$1 $2", ["[45]0"], "(0$1)"], ["(\\d)(\\d{3,4})(\\d{4})", "$1 $2 $3", ["1"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2569]|4[1-69]|7[14]"], "(0$1)"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["70"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["81"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[78]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1"]], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["4"], "(0$1)"], ["(\\d{2})(\\d)(\\d{3})(\\d{4})", "$1 $2 $3 $4", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["8(?:22|[35-9]\\d)\\d{6}", [9]]]], "IL": ["972", "0(?:0|1[2-9])", "1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}", [7, 8, 9, 10, 11, 12], [["(\\d{4})(\\d{3})", "$1-$2", ["125"]], ["(\\d{4})(\\d{2})(\\d{2})", "$1-$2-$3", ["121"]], ["(\\d)(\\d{3})(\\d{4})", "$1-$2-$3", ["[2-489]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1-$2-$3", ["[57]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1-$2-$3", ["12"]], ["(\\d{4})(\\d{6})", "$1-$2", ["159"]], ["(\\d)(\\d{3})(\\d{3})(\\d{3})", "$1-$2-$3-$4", ["1[7-9]"]], ["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})", "$1-$2 $3-$4", ["15"]]], "0", 0, 0, 0, 0, 0, [0, ["55(?:410|57[0-289])\\d{4}|5(?:(?:[0-2][02-9]|[36]\\d|[49][2-9]|8[3-7])\\d|5(?:01|2\\d|3[0-3]|4[34]|5[0-25689]|6[6-8]|7[0-267]|8[7-9]|9[1-9]))\\d{5}", [9]]]], "IM": ["44", "00", "1624\\d{6}|(?:[3578]\\d|90)\\d{8}", [10], 0, "0", 0, "([25-8]\\d{5})$|0", "1624$1", 0, "74576|(?:16|7[56])24", [0, ["76245[06]\\d{4}|7(?:4576|[59]24\\d|624[0-4689])\\d{5}"]]], "IN": ["91", "00", "(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}", [8, 9, 10, 11, 12, 13], [["(\\d{8})", "$1", ["5(?:0|2[23]|3[03]|[67]1|88)", "5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)", "5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"], 0, 1], ["(\\d{4})(\\d{4,5})", "$1 $2", ["180", "1800"], 0, 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["140"], 0, 1], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["11|2[02]|33|4[04]|79[1-7]|80[2-46]", "11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])", "11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]", "1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]", "1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"], "0$1", 1], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807", "1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]", "1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"], "0$1", 1], ["(\\d{5})(\\d{5})", "$1 $2", ["[6-9]"], "0$1", 1], ["(\\d{4})(\\d{2,4})(\\d{4})", "$1 $2 $3", ["1(?:6|8[06])", "1(?:6|8[06]0)"], 0, 1], ["(\\d{4})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["18"], 0, 1]], "0", 0, 0, 0, 0, 0, [0, ["(?:61279|7(?:887[02-9]|9(?:313|79[07-9]))|8(?:079[04-9]|(?:84|91)7[02-8]))\\d{5}|(?:6(?:12|[2-47]1|5[17]|6[13]|80)[0189]|7(?:1(?:2[0189]|9[0-5])|2(?:[14][017-9]|8[0-59])|3(?:2[5-8]|[34][017-9]|9[016-9])|4(?:1[015-9]|[29][89]|39|8[389])|5(?:[15][017-9]|2[04-9]|9[7-9])|6(?:0[0-47]|1[0-257-9]|2[0-4]|3[19]|5[4589])|70[0289]|88[089]|97[02-8])|8(?:0(?:6[67]|7[02-8])|70[017-9]|84[01489]|91[0-289]))\\d{6}|(?:7(?:31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[0189]\\d|7[02-8])\\d{5}|(?:6(?:[09]\\d|1[04679]|2[03689]|3[05-9]|4[0489]|50|6[069]|7[07]|8[7-9])|7(?:0\\d|2[0235-79]|3[05-8]|40|5[0346-8]|6[6-9]|7[1-9]|8[0-79]|9[089])|8(?:0[01589]|1[0-57-9]|2[235-9]|3[03-57-9]|[45]\\d|6[02457-9]|7[1-69]|8[0-25-9]|9[02-9])|9\\d\\d)\\d{7}|(?:6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|8[124-6])\\d|7(?:[235689]\\d|4[0189]))|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-5])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]|881))[0189]\\d{5}", [10]]]], "IO": ["246", "00", "3\\d{6}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["3"]]], 0, 0, 0, 0, 0, 0, [0, ["38\\d{5}"]]], "IQ": ["964", "00", "(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}", [8, 9, 10], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2-6]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["7"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["7[3-9]\\d{8}", [10]]]], "IR": ["98", "00", "[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}", [4, 5, 6, 7, 10], [["(\\d{4,5})", "$1", ["96"], "0$1"], ["(\\d{2})(\\d{4,5})", "$1 $2", ["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["9"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["[1-8]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["9(?:(?:0(?:[0-35]\\d|4[4-6])|(?:[13]\\d|2[0-3])\\d)\\d|9(?:[0-46]\\d\\d|5[15]0|8(?:[12]\\d|88)|9(?:0[0-3]|[19]\\d|21|69|77|8[7-9])))\\d{5}", [10]]]], "IS": ["354", "00|1(?:0(?:01|[12]0)|100)", "(?:38\\d|[4-9])\\d{6}", [7, 9], [["(\\d{3})(\\d{4})", "$1 $2", ["[4-9]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["3"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:38[589]\\d\\d|6(?:1[1-8]|2[0-6]|3[026-9]|4[014679]|5[0159]|6[0-69]|70|8[06-8]|9\\d)|7(?:5[057]|[6-9]\\d)|8(?:2[0-59]|[3-69]\\d|8[238]))\\d{4}"]], "00"], "IT": ["39", "00", "0\\d{5,10}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?", [6, 7, 8, 9, 10, 11, 12], [["(\\d{2})(\\d{4,6})", "$1 $2", ["0[26]"]], ["(\\d{3})(\\d{3,6})", "$1 $2", ["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])", "0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]], ["(\\d{4})(\\d{2,6})", "$1 $2", ["0(?:[13-579][2-46-8]|8[236-8])"]], ["(\\d{4})(\\d{4})", "$1 $2", ["894"]], ["(\\d{2})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["0[26]|5"]], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["1(?:44|[679])|[378]|43"]], ["(\\d{3})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["0[13-57-9][0159]|14"]], ["(\\d{2})(\\d{4})(\\d{5})", "$1 $2 $3", ["0[26]"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["0"]], ["(\\d{3})(\\d{4})(\\d{4,5})", "$1 $2 $3", ["3"]]], 0, 0, 0, 0, 0, 0, [0, ["3[2-9]\\d{7,8}|(?:31|43)\\d{8}", [9, 10]]]], "JE": ["44", "00", "1534\\d{6}|(?:[3578]\\d|90)\\d{8}", [10], 0, "0", 0, "([0-24-8]\\d{5})$|0", "1534$1", 0, 0, [0, ["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"]]], "JM": ["1", "011", "(?:[58]\\d\\d|658|900)\\d{7}", [10], 0, "1", 0, 0, 0, 0, "658|876", [0, ["(?:658295|876(?:2(?:0[1-9]|[13-9]\\d|2[013-9])|[348]\\d\\d|5(?:0[1-9]|[1-9]\\d)|6(?:4[89]|6[67])|7(?:0[07]|7\\d|8[1-47-9]|9[0-36-9])|9(?:[01]9|9[0579])))\\d{4}"]]], "JO": ["962", "00", "(?:(?:[2689]|7\\d)\\d|32|53)\\d{6}", [8, 9], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["[2356]|87"], "(0$1)"], ["(\\d{3})(\\d{5,6})", "$1 $2", ["[89]"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["70"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["7"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["7(?:[78][0-25-9]|9\\d)\\d{6}", [9]]]], "JP": ["81", "010", "00[1-9]\\d{6,14}|[257-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}", [8, 9, 10, 11, 12, 13, 14, 15, 16, 17], [["(\\d{3})(\\d{3})(\\d{3})", "$1-$2-$3", ["(?:12|57|99)0"], "0$1"], ["(\\d{4})(\\d)(\\d{4})", "$1-$2-$3", ["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])", "1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]", "1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1-$2-$3", ["60"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1-$2-$3", ["[36]|4(?:2[09]|7[01])", "[36]|4(?:2(?:0|9[02-69])|7(?:0[019]|1))"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1-$2-$3", ["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])", "1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]", "1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{4})", "$1-$2-$3", ["[14]|[289][2-9]|5[3-9]|7[2-4679]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1-$2-$3", ["800"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1-$2-$3", ["[257-9]"], "0$1"]], "0", 0, "(000[259]\\d{6})$|(?:(?:003768)0?)|0", "$1", 0, 0, [0, ["[7-9]0[1-9]\\d{7}", [10]]]], "KE": ["254", "000", "(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}", [7, 8, 9, 10], [["(\\d{2})(\\d{5,7})", "$1 $2", ["[24-6]"], "0$1"], ["(\\d{3})(\\d{6})", "$1 $2", ["[17]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[89]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:1(?:0[0-8]|1[0-7]|2[014]|30)|7\\d\\d)\\d{6}", [9]]]], "KG": ["996", "00", "8\\d{9}|[235-9]\\d{8}", [9, 10], [["(\\d{4})(\\d{5})", "$1 $2", ["3(?:1[346]|[24-79])"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[235-79]|88"], "0$1"], ["(\\d{3})(\\d{3})(\\d)(\\d{2,3})", "$1 $2 $3 $4", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["312(?:58\\d|973)\\d{3}|(?:2(?:0[0-35]|2\\d)|5[0-24-7]\\d|600|7(?:[07]\\d|55)|88[08]|9(?:12|9[05-9]))\\d{6}", [9]]]], "KH": ["855", "00[14-9]", "1\\d{9}|[1-9]\\d{7,8}", [8, 9, 10], [["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[1-9]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1"]]], "0", 0, 0, 0, 0, 0, [0, ["(?:(?:1[28]|3[18]|9[67])\\d|6[016-9]|7(?:[07-9]|[16]\\d)|8(?:[013-79]|8\\d))\\d{6}|(?:1\\d|9[0-57-9])\\d{6}|(?:2[3-6]|3[2-6]|4[2-4]|[5-7][2-5])48\\d{5}", [8, 9]]]], "KI": ["686", "00", "(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}", [5, 8], 0, "0", 0, 0, 0, 0, 0, [0, ["(?:6200[01]|7(?:310[1-9]|5(?:02[03-9]|12[0-47-9]|22[0-7]|[34](?:0[1-9]|8[02-9])|50[1-9])))\\d{3}|(?:63\\d\\d|7(?:(?:[0146-9]\\d|2[0-689])\\d|3(?:[02-9]\\d|1[1-9])|5(?:[0-2][013-9]|[34][1-79]|5[1-9]|[6-9]\\d)))\\d{4}", [8]]]], "KM": ["269", "00", "[3478]\\d{6}", [7], [["(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3", ["[3478]"]]], 0, 0, 0, 0, 0, 0, [0, ["[34]\\d{6}"]]], "KN": ["1", "011", "(?:[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-7]\\d{6})$|1", "869$1", 0, "869", [0, ["869(?:48[89]|55[6-8]|66\\d|76[02-7])\\d{4}"]]], "KP": ["850", "00|99", "85\\d{6}|(?:19\\d|[2-7])\\d{7}", [8, 10], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"], "0$1"], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-7]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["19[1-3]\\d{7}", [10]]]], "KR": ["82", "00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))", "00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}", [5, 6, 8, 9, 10, 11, 12, 13, 14], [["(\\d{2})(\\d{3,4})", "$1-$2", ["(?:3[1-3]|[46][1-4]|5[1-5])1"], "0$1"], ["(\\d{4})(\\d{4})", "$1-$2", ["1"]], ["(\\d)(\\d{3,4})(\\d{4})", "$1-$2-$3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1-$2-$3", ["[36]0|8"], "0$1"], ["(\\d{2})(\\d{3,4})(\\d{4})", "$1-$2-$3", ["[1346]|5[1-5]"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1-$2-$3", ["[57]"], "0$1"], ["(\\d{2})(\\d{5})(\\d{4})", "$1-$2-$3", ["5"], "0$1"]], "0", 0, "0(8(?:[1-46-8]|5\\d\\d))?", 0, 0, 0, [0, ["1(?:05(?:[0-8]\\d|9[0-6])|22[13]\\d)\\d{4,5}|1(?:0[0-46-9]|[16-9]\\d|2[013-9])\\d{6,7}", [9, 10]]]], "KW": ["965", "00", "18\\d{5}|(?:[2569]\\d|41)\\d{6}", [7, 8], [["(\\d{4})(\\d{3,4})", "$1 $2", ["[169]|2(?:[235]|4[1-35-9])|52"]], ["(\\d{3})(\\d{5})", "$1 $2", ["[245]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:41\\d\\d|5(?:(?:[05]\\d|1[0-7]|6[56])\\d|2(?:22|5[25])|7(?:55|77)|88[58])|6(?:(?:0[034679]|5[015-9]|6\\d)\\d|1(?:00|11|6[16])|2[26]2|3[36]3|4[46]4|7(?:0[013-9]|[67]\\d)|8[68]8|9(?:[069]\\d|3[039]))|9(?:(?:[04679]\\d|8[057-9])\\d|1(?:1[01]|99)|2(?:00|2\\d)|3(?:00|3[03])|5(?:00|5\\d)))\\d{4}", [8]]]], "KY": ["1", "011", "(?:345|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "345$1", 0, "345", [0, ["345(?:32[1-9]|42[0-4]|5(?:1[67]|2[5-79]|4[6-9]|50|76)|649|82[56]|9(?:1[679]|2[2-9]|3[06-9]|90))\\d{4}"]]], "KZ": ["7", "810", "(?:33622|8\\d{8})\\d{5}|[78]\\d{9}", [10, 14], 0, "8", 0, 0, 0, 0, "33|7", [0, ["7(?:0[0-25-8]|47|6[0-4]|7[15-8]|85)\\d{7}", [10]]], "8~10"], "LA": ["856", "00", "[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}", [8, 9, 10], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["2[13]|3[14]|[4-8]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["30[0135-9]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["[23]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["208[78]\\d{6}|(?:20[23579]|30[24])\\d{7}", [10]]]], "LB": ["961", "00", "[27-9]\\d{7}|[13-9]\\d{6}", [7, 8], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[13-69]|7(?:[2-57]|62|8[0-7]|9[04-9])|8[02-9]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[27-9]"]]], "0", 0, 0, 0, 0, 0, [0, ["793(?:[01]\\d|2[0-4])\\d{3}|(?:(?:3|81)\\d|7(?:[01]\\d|6[013-9]|8[89]|9[12]))\\d{5}"]]], "LC": ["1", "011", "(?:[58]\\d\\d|758|900)\\d{7}", [10], 0, "1", 0, "([2-8]\\d{6})$|1", "758$1", 0, "758", [0, ["758(?:28[4-7]|384|4(?:6[01]|8[4-9])|5(?:1[89]|20|84)|7(?:1[2-9]|2\\d|3[0-3])|812)\\d{4}"]]], "LI": ["423", "00", "[68]\\d{8}|(?:[2378]\\d|90)\\d{5}", [7, 9], [["(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3", ["[2379]|8(?:0[09]|7)", "[2379]|8(?:0(?:02|9)|7)"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["69"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["6"]]], "0", 0, "(1001)|0", 0, 0, 0, [0, ["(?:6(?:(?:4[5-9]|5[0-469])\\d|6(?:[024-6]\\d|[17]0|3[7-9]))\\d|7(?:[37-9]\\d|42|56))\\d{4}"]]], "LK": ["94", "00", "[1-9]\\d{8}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["7"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[1-689]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["7(?:[0-25-8]\\d|4[0-4])\\d{6}"]]], "LR": ["231", "00", "(?:[245]\\d|33|77|88)\\d{7}|(?:2\\d|[4-6])\\d{6}", [7, 8, 9], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["4[67]|[56]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-578]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:(?:(?:22|33)0|555|(?:77|88)\\d)\\d|4(?:240|[67]))\\d{5}|[56]\\d{6}", [7, 9]]]], "LS": ["266", "00", "(?:[256]\\d\\d|800)\\d{5}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[2568]"]]], 0, 0, 0, 0, 0, 0, [0, ["[56]\\d{7}"]]], "LT": ["370", "00", "(?:[3469]\\d|52|[78]0)\\d{6}", [8], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["52[0-7]"], "(0-$1)", 1], ["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["[7-9]"], "0 $1", 1], ["(\\d{2})(\\d{6})", "$1 $2", ["37|4(?:[15]|6[1-8])"], "(0-$1)", 1], ["(\\d{3})(\\d{5})", "$1 $2", ["[3-6]"], "(0-$1)", 1]], "0", 0, "[08]", 0, 0, 0, [0, ["6\\d{7}"]]], "LU": ["352", "00", "35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}", [4, 5, 6, 7, 8, 9, 10, 11], [["(\\d{2})(\\d{3})", "$1 $2", ["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]], ["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]], ["(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["20[2-689]"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})", "$1 $2 $3 $4", ["2(?:[0367]|4[3-8])"]], ["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["80[01]|90[015]"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["20"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["6"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})", "$1 $2 $3 $4 $5", ["2(?:[0367]|4[3-8])"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})", "$1 $2 $3 $4", ["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]]], 0, 0, "(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)", 0, 0, 0, [0, ["6(?:[269][18]|5[1568]|7[189]|81)\\d{6}", [9]]]], "LV": ["371", "00", "(?:[268]\\d|90)\\d{6}", [8], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[269]|8[01]"]]], 0, 0, 0, 0, 0, 0, [0, ["23(?:23[0-57-9]|33[0238])\\d{3}|2(?:[0-24-9]\\d\\d|3(?:0[07]|[14-9]\\d|2[024-9]|3[0-24-9]))\\d{4}"]]], "LY": ["218", "00", "[2-9]\\d{8}", [9], [["(\\d{2})(\\d{7})", "$1-$2", ["[2-9]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["9[1-6]\\d{7}"]]], "MA": ["212", "00", "[5-8]\\d{8}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["5[45]"], "0$1"], ["(\\d{4})(\\d{5})", "$1-$2", ["5(?:2[2-46-9]|3[3-9]|9)|8(?:0[89]|92)"], "0$1"], ["(\\d{2})(\\d{7})", "$1-$2", ["8"], "0$1"], ["(\\d{3})(\\d{6})", "$1-$2", ["[5-7]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-4]|5[01]|8[0-3]))\\d{6}"]]], "MC": ["377", "00", "(?:[3489]|6\\d)\\d{7}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["4"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[389]"]], ["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["6"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["4(?:[469]\\d|5[1-9])\\d{5}|(?:3|6\\d)\\d{7}"]]], "MD": ["373", "00", "(?:[235-7]\\d|[89]0)\\d{6}", [8], [["(\\d{3})(\\d{5})", "$1 $2", ["[89]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["22|3"], "0$1"], ["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["[25-7]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["562\\d{5}|(?:6\\d|7[16-9])\\d{6}"]]], "ME": ["382", "00", "(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2-9]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["6(?:[07-9]\\d|3[024]|6[0-25])\\d{5}", [8]]]], "MF": ["590", "00", "590\\d{6}|(?:69|80|9\\d)\\d{7}", [9], 0, "0", 0, 0, 0, 0, 0, [0, ["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"]]], "MG": ["261", "00", "[23]\\d{8}", [9], [["(\\d{2})(\\d{2})(\\d{3})(\\d{2})", "$1 $2 $3 $4", ["[23]"], "0$1"]], "0", 0, "([24-9]\\d{6})$|0", "20$1", 0, 0, [0, ["3[2-47-9]\\d{7}"]]], "MH": ["692", "011", "329\\d{4}|(?:[256]\\d|45)\\d{5}", [7], [["(\\d{3})(\\d{4})", "$1-$2", ["[2-6]"]]], "1", 0, 0, 0, 0, 0, [0, ["(?:(?:23|54)5|329|45[35-8])\\d{4}"]]], "MK": ["389", "00", "[2-578]\\d{7}", [8], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["2|34[47]|4(?:[37]7|5[47]|64)"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[347]"], "0$1"], ["(\\d{3})(\\d)(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[58]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["7(?:3555|(?:474|9[019]7)7)\\d{3}|7(?:[0-25-8]\\d\\d|3(?:[1-48]\\d|6[01]|7[01578])|4(?:2\\d|60|7[01578])|9(?:[2-4]\\d|5[01]|7[015]))\\d{4}"]]], "ML": ["223", "00", "[24-9]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[24-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["2(?:0(?:01|79)|17\\d)\\d{4}|(?:5[01]|[679]\\d|8[2-49])\\d{6}"]]], "MM": ["95", "00", "1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}", [6, 7, 8, 9, 10], [["(\\d)(\\d{2})(\\d{3})", "$1 $2 $3", ["16|2"], "0$1"], ["(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"], "0$1"], ["(\\d)(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[12]|452|678|86", "[12]|452|6788|86"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[4-7]|8[1-35]"], "0$1"], ["(\\d)(\\d{3})(\\d{4,6})", "$1 $2 $3", ["9(?:2[0-4]|[35-9]|4[137-9])"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"], "0$1"], ["(\\d)(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["92"], "0$1"], ["(\\d)(\\d{5})(\\d{4})", "$1 $2 $3", ["9"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:17[01]|9(?:2(?:[0-4]|[56]\\d\\d)|(?:3(?:[0-36]|4\\d)|(?:6\\d|8[89]|9[4-8])\\d|7(?:3|40|[5-9]\\d))\\d|4(?:(?:[0245]\\d|[1379])\\d|88)|5[0-6])\\d)\\d{4}|9[69]1\\d{6}|9(?:[68]\\d|9[089])\\d{5}", [7, 8, 9, 10]]]], "MN": ["976", "001", "[12]\\d{7,9}|[5-9]\\d{7}", [8, 9, 10], [["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["[12]1"], "0$1"], ["(\\d{4})(\\d{4})", "$1 $2", ["[5-9]"]], ["(\\d{3})(\\d{5,6})", "$1 $2", ["[12]2[1-3]"], "0$1"], ["(\\d{4})(\\d{5,6})", "$1 $2", ["[12](?:27|3[2-8]|4[2-68]|5[1-4689])", "[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"], "0$1"], ["(\\d{5})(\\d{4,5})", "$1 $2", ["[12]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:83[01]|92[039])\\d{5}|(?:5[05]|6[069]|8[015689]|9[013-9])\\d{6}", [8]]]], "MO": ["853", "00", "0800\\d{3}|(?:28|[68]\\d)\\d{6}", [7, 8], [["(\\d{4})(\\d{3})", "$1 $2", ["0"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[268]"]]], 0, 0, 0, 0, 0, 0, [0, ["6800[0-79]\\d{3}|6(?:[235]\\d\\d|6(?:0[0-5]|[1-9]\\d)|8(?:0[1-9]|[14-8]\\d|2[5-9]|[39][0-4]))\\d{4}", [8]]]], "MP": ["1", "011", "[58]\\d{9}|(?:67|90)0\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "670$1", 0, "670", [0, ["670(?:2(?:3[3-7]|56|8[4-8])|32[1-38]|4(?:33|8[348])|5(?:32|55|88)|6(?:64|70|82)|78[3589]|8[3-9]8|989)\\d{4}"]]], "MQ": ["596", "00", "596\\d{6}|(?:69|[89]\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[569]|8(?:0[6-9]|[36])"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["69[67]\\d{6}"]]], "MR": ["222", "00", "(?:[2-4]\\d\\d|800)\\d{5}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-48]"]]], 0, 0, 0, 0, 0, 0, [0, ["[2-4][0-46-9]\\d{6}"]]], "MS": ["1", "011", "(?:[58]\\d\\d|664|900)\\d{7}", [10], 0, "1", 0, "([34]\\d{6})$|1", "664$1", 0, "664", [0, ["664(?:3(?:49|9[1-6])|49[2-6])\\d{4}"]]], "MT": ["356", "00", "3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[2357-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:7(?:210|[79]\\d\\d)|9(?:[29]\\d\\d|69[67]|8(?:1[1-3]|89|97)))\\d{4}"]]], "MU": ["230", "0(?:0|[24-7]0|3[03])", "(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}", [7, 8, 10], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-46]|8[013]"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[57]"]], ["(\\d{5})(\\d{5})", "$1 $2", ["8"]]], 0, 0, 0, 0, 0, 0, [0, ["5(?:4(?:2[1-389]|7[1-9])|87[15-8])\\d{4}|(?:5(?:2[5-9]|4[3-689]|[57]\\d|8[0-689]|9[0-8])|7(?:0[0-4]|3[013]))\\d{5}", [8]]], "020"], "MV": ["960", "0(?:0|19)", "(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}", [7, 10], [["(\\d{3})(\\d{4})", "$1-$2", ["[34679]"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[89]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:46[46]|[79]\\d\\d)\\d{4}", [7]]], "00"], "MW": ["265", "00", "(?:[1289]\\d|31|77)\\d{7}|1\\d{6}", [7, 9], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["1[2-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[137-9]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["111\\d{6}|(?:31|77|[89][89])\\d{7}", [9]]]], "MX": ["52", "0[09]", "[2-9]\\d{9}", [10], [["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["33|5[56]|81"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["657[12]\\d{6}|(?:2(?:2\\d|3[1-35-8]|4[13-9]|7[1-689]|8[1-578]|9[467])|3(?:1[1-79]|[2458][1-9]|3\\d|7[1-8]|9[1-5])|4(?:1[1-57-9]|[267][1-9]|3[1-8]|[45]\\d|8[1-35-9]|9[2-689])|5(?:[56]\\d|88|9[1-79])|6(?:1[2-68]|[2-4][1-9]|5[1-3689]|6[0-57-9]|7[1-7]|8[67]|9[4-8])|7(?:[1346][1-9]|[27]\\d|5[13-9]|8[1-69]|9[17])|8(?:1\\d|2[13-689]|3[1-6]|4[124-6]|6[1246-9]|7[0-378]|9[12479])|9(?:1[346-9]|2[1-4]|3[2-46-8]|5[1348]|[69]\\d|7[12]|8[1-8]))\\d{7}"]], "00"], "MY": ["60", "00", "1\\d{8,9}|(?:3\\d|[4-9])\\d{7}", [8, 9, 10], [["(\\d)(\\d{3})(\\d{4})", "$1-$2 $3", ["[4-79]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1-$2 $3", ["1(?:[02469]|[378][1-9]|53)|8", "1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1-$2 $3", ["3"], "0$1"], ["(\\d)(\\d{3})(\\d{2})(\\d{4})", "$1-$2-$3-$4", ["1(?:[367]|80)"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1-$2 $3", ["15"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1-$2 $3", ["1"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["1(?:1888[689]|4400|8(?:47|8[27])[0-4])\\d{4}|1(?:0(?:[23568]\\d|4[0-6]|7[016-9]|9[0-8])|1(?:[1-5]\\d\\d|6(?:0[5-9]|[1-9]\\d)|7(?:[0-4]\\d|5[0-7]))|(?:[269]\\d|[37][1-9]|4[235-9])\\d|5(?:31|9\\d\\d)|8(?:1[23]|[236]\\d|4[06]|5(?:46|[7-9])|7[016-9]|8[01]|9[0-8]))\\d{5}", [9, 10]]]], "MZ": ["258", "00", "(?:2|8\\d)\\d{7}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2|8[2-79]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"]]], 0, 0, 0, 0, 0, 0, [0, ["8[2-79]\\d{7}", [9]]]], "NA": ["264", "00", "[68]\\d{7,8}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["88"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["6"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["87"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:60|8[1245])\\d{7}", [9]]]], "NC": ["687", "00", "(?:050|[2-57-9]\\d\\d)\\d{3}", [6], [["(\\d{2})(\\d{2})(\\d{2})", "$1.$2.$3", ["[02-57-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:5[0-4]|[79]\\d|8[0-79])\\d{4}"]]], "NE": ["227", "00", "[027-9]\\d{7}", [8], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["08"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[089]|2[013]|7[0467]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:23|7[0467]|[89]\\d)\\d{6}"]]], "NF": ["672", "00", "[13]\\d{5}", [6], [["(\\d{2})(\\d{4})", "$1 $2", ["1[0-3]"]], ["(\\d)(\\d{5})", "$1 $2", ["[13]"]]], 0, 0, "([0-258]\\d{4})$", "3$1", 0, 0, [0, ["(?:14|3[58])\\d{4}"]]], "NG": ["234", "009", "38\\d{6}|[78]\\d{9,13}|(?:20|9\\d)\\d{8}", [8, 10, 11, 12, 13, 14], [["(\\d{2})(\\d{3})(\\d{2,3})", "$1 $2 $3", ["3"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[7-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["20[129]"], "0$1"], ["(\\d{4})(\\d{2})(\\d{4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{3})(\\d{4})(\\d{4,5})", "$1 $2 $3", ["[78]"], "0$1"], ["(\\d{3})(\\d{5})(\\d{5,6})", "$1 $2 $3", ["[78]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:702[0-24-9]|819[01])\\d{6}|(?:7(?:0[13-9]|[12]\\d)|8(?:0[1-9]|1[0-8])|9(?:0[1-9]|1[1-6]))\\d{7}", [10]]]], "NI": ["505", "00", "(?:1800|[25-8]\\d{3})\\d{4}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[125-8]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:5(?:5[0-7]|[78]\\d)|6(?:20|3[035]|4[045]|5[05]|77|8[1-9]|9[059])|(?:7[5-8]|8\\d)\\d)\\d{5}"]]], "NL": ["31", "00", "(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}", [5, 6, 7, 8, 9, 10, 11], [["(\\d{3})(\\d{4,7})", "$1 $2", ["[89]0"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["66"], "0$1"], ["(\\d)(\\d{8})", "$1 $2", ["6"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1-578]|91"], "0$1"], ["(\\d{3})(\\d{3})(\\d{5})", "$1 $2 $3", ["9"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:6[1-58]|970\\d)\\d{7}", [9, 11]]]], "NO": ["47", "00", "(?:0|[2-9]\\d{3})\\d{4}", [5, 8], [["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["8"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-79]"]]], 0, 0, 0, 0, 0, "[02-689]|7[0-8]", [0, ["(?:4[015-8]|9\\d)\\d{6}", [8]]]], "NP": ["977", "00", "(?:1\\d|9)\\d{9}|[1-9]\\d{7}", [8, 10, 11], [["(\\d)(\\d{7})", "$1-$2", ["1[2-6]"], "0$1"], ["(\\d{2})(\\d{6})", "$1-$2", ["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"], "0$1"], ["(\\d{3})(\\d{7})", "$1-$2", ["9"]]], "0", 0, 0, 0, 0, 0, [0, ["9(?:00|6[0-3]|7[024-6]|8[0-24-68])\\d{7}", [10]]]], "NR": ["674", "00", "(?:444|(?:55|8\\d)\\d|666)\\d{4}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[4-68]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:55[3-9]|666|8\\d\\d)\\d{4}"]]], "NU": ["683", "00", "(?:[4-7]|888\\d)\\d{3}", [4, 7], [["(\\d{3})(\\d{4})", "$1 $2", ["8"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:[56]|888[1-9])\\d{3}"]]], "NZ": ["64", "0(?:0|161)", "[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}", [5, 6, 7, 8, 9, 10], [["(\\d{2})(\\d{3,8})", "$1 $2", ["8[1-79]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["50[036-8]|8|90", "50(?:[0367]|88)|8|90"], "0$1"], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["24|[346]|7[2-57-9]|9[2-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2(?:10|74)|[589]"], "0$1"], ["(\\d{2})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["1|2[028]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,5})", "$1 $2 $3", ["2(?:[169]|7[0-35-9])|7"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["2(?:[0-27-9]\\d|6)\\d{6,7}|2(?:1\\d|75)\\d{5}", [8, 9, 10]]], "00"], "OM": ["968", "00", "(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}", [7, 8, 9], [["(\\d{3})(\\d{4,6})", "$1 $2", ["[58]"]], ["(\\d{2})(\\d{6})", "$1 $2", ["2"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[179]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:1505|90[1-9]\\d)\\d{4}|(?:7[126-9]|9[1-9])\\d{6}", [8]]]], "PA": ["507", "00", "(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}", [7, 8, 10, 11], [["(\\d{3})(\\d{4})", "$1-$2", ["[1-57-9]"]], ["(\\d{4})(\\d{4})", "$1-$2", ["[68]"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:1[16]1|21[89]|6\\d{3}|8(?:1[01]|7[23]))\\d{4}", [7, 8]]]], "PE": ["51", "00|19(?:1[124]|77|90)00", "(?:[14-8]|9\\d)\\d{7}", [8, 9], [["(\\d{3})(\\d{5})", "$1 $2", ["80"], "(0$1)"], ["(\\d)(\\d{7})", "$1 $2", ["1"], "(0$1)"], ["(\\d{2})(\\d{6})", "$1 $2", ["[4-8]"], "(0$1)"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["9"]]], "0", 0, 0, 0, 0, 0, [0, ["9\\d{8}", [9]]], "00", " Anexo "], "PF": ["689", "00", "4\\d{5}(?:\\d{2})?|8\\d{7,8}", [6, 8, 9], [["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["44"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["4|8[7-9]"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"]]], 0, 0, 0, 0, 0, 0, [0, ["8[7-9]\\d{6}", [8]]]], "PG": ["675", "00|140[1-3]", "(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}", [7, 8], [["(\\d{3})(\\d{4})", "$1 $2", ["18|[2-69]|85"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[78]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:7\\d|8[1-38])\\d{6}", [8]]], "00"], "PH": ["63", "00", "(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}", [6, 8, 9, 10, 11, 12, 13], [["(\\d)(\\d{5})", "$1 $2", ["2"], "(0$1)"], ["(\\d{4})(\\d{4,6})", "$1 $2", ["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2", "3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"], "(0$1)"], ["(\\d{5})(\\d{4})", "$1 $2", ["346|4(?:27|9[35])|883", "3469|4(?:279|9(?:30|56))|8834"], "(0$1)"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["2"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[3-7]|8[2-8]"], "(0$1)"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[89]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]], ["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})", "$1 $2 $3 $4", ["1"]]], "0", 0, 0, 0, 0, 0, [0, ["(?:8(?:1[37]|9[5-8])|9(?:0[5-9]|1[0-24-9]|[235-7]\\d|4[2-9]|8[135-9]|9[1-9]))\\d{7}", [10]]]], "PK": ["92", "00", "122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}", [8, 9, 10, 11, 12], [["(\\d{3})(\\d{3})(\\d{2,7})", "$1 $2 $3", ["[89]0"], "0$1"], ["(\\d{4})(\\d{5})", "$1 $2", ["1"]], ["(\\d{3})(\\d{6,7})", "$1 $2", ["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])", "9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"], "(0$1)"], ["(\\d{2})(\\d{7,8})", "$1 $2", ["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"], "(0$1)"], ["(\\d{5})(\\d{5})", "$1 $2", ["58"], "(0$1)"], ["(\\d{3})(\\d{7})", "$1 $2", ["3"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"], "(0$1)"], ["(\\d{3})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["[24-9]"], "(0$1)"]], "0", 0, 0, 0, 0, 0, [0, ["3(?:[0-247]\\d|3[0-79]|55|64)\\d{7}", [10]]]], "PL": ["48", "00", "(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}", [6, 7, 8, 9, 10], [["(\\d{5})", "$1", ["19"]], ["(\\d{3})(\\d{3})", "$1 $2", ["11|20|64"]], ["(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1", "(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]], ["(\\d{3})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["64"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["1[2-8]|[2-7]|8[1-79]|9[145]"]], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["8"]]], 0, 0, 0, 0, 0, 0, [0, ["21(?:1[013-5]|2\\d)\\d{5}|(?:45|5[0137]|6[069]|7[2389]|88)\\d{7}", [9]]]], "PM": ["508", "00", "[45]\\d{5}|(?:708|8\\d\\d)\\d{6}", [6, 9], [["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["[45]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["7"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:4[02-489]|5[02-9]|708[45][0-5])\\d{4}"]]], "PR": ["1", "011", "(?:[589]\\d\\d|787)\\d{7}", [10], 0, "1", 0, 0, 0, 0, "787|939", [0, ["(?:787|939)[2-9]\\d{6}"]]], "PS": ["970", "00", "[2489]2\\d{6}|(?:1\\d|5)\\d{8}", [8, 9, 10], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["[2489]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["5"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1"]]], "0", 0, 0, 0, 0, 0, [0, ["5[69]\\d{7}", [9]]]], "PT": ["351", "00", "1693\\d{5}|(?:[26-9]\\d|30)\\d{7}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["2[12]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["16|[236-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["6(?:[06]92(?:30|9\\d)|[35]92(?:[049]\\d|3[034]))\\d{3}|(?:(?:16|6[0356])93|9(?:[1-36]\\d\\d|480))\\d{5}"]]], "PW": ["680", "01[12]", "(?:[24-8]\\d\\d|345|900)\\d{4}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:(?:46|83)[0-5]|6[2-4689]0)\\d{4}|(?:45|77|88)\\d{5}"]]], "PY": ["595", "00", "59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}", [6, 7, 8, 9, 10, 11], [["(\\d{3})(\\d{3,6})", "$1 $2", ["[2-9]0"], "0$1"], ["(\\d{2})(\\d{5})", "$1 $2", ["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"], "(0$1)"], ["(\\d{3})(\\d{4,5})", "$1 $2", ["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["87"]], ["(\\d{3})(\\d{6})", "$1 $2", ["9(?:[5-79]|8[1-7])"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-8]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["9"]]], "0", 0, 0, 0, 0, 0, [0, ["9(?:51|6[129]|7[1-6]|8[1-7]|9[1-5])\\d{6}", [9]]]], "QA": ["974", "00", "800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}", [7, 8, 9, 11], [["(\\d{3})(\\d{4})", "$1 $2", ["2[16]|8"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[3-7]"]]], 0, 0, 0, 0, 0, 0, [0, ["[35-7]\\d{7}", [8]]]], "RE": ["262", "00", "(?:26|[689]\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2689]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["69(?:2\\d\\d|3(?:[06][0-6]|1[013]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))\\d{4}"]]], "RO": ["40", "00", "(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}", [6, 9], [["(\\d{3})(\\d{3})", "$1 $2", ["2[3-6]", "2[3-6]\\d9"], "0$1"], ["(\\d{2})(\\d{4})", "$1 $2", ["219|31"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[23]1"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[236-9]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:630|702)0\\d{5}|(?:6(?:00|2\\d)|7(?:0[013-9]|1[0-3]|[2-7]\\d|8[03-8]|9[0-39]))\\d{6}", [9]]], 0, " int "], "RS": ["381", "00", "38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}", [6, 7, 8, 9, 10, 11, 12], [["(\\d{3})(\\d{3,9})", "$1 $2", ["(?:2[389]|39)0|[7-9]"], "0$1"], ["(\\d{2})(\\d{5,10})", "$1 $2", ["[1-36]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["6(?:[0-689]|7\\d)\\d{6,7}", [8, 9, 10]]]], "RU": ["7", "810", "8\\d{13}|[347-9]\\d{9}", [10, 14], [["(\\d{4})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["7(?:1[0-8]|2[1-9])", "7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))", "7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"], "8 ($1)", 1], ["(\\d{5})(\\d)(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["7(?:1[0-68]|2[1-9])", "7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))", "7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"], "8 ($1)", 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["7"], "8 ($1)", 1], ["(\\d{3})(\\d{3})(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["[349]|8(?:[02-7]|1[1-8])"], "8 ($1)", 1], ["(\\d{4})(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["8"], "8 ($1)"]], "8", 0, 0, 0, 0, "3[04-689]|[489]", [0, ["9\\d{9}", [10]]], "8~10"], "RW": ["250", "00", "(?:06|[27]\\d\\d|[89]00)\\d{6}", [8, 9], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["0"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["2"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[7-9]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["7[237-9]\\d{7}", [9]]]], "SA": ["966", "00", "92\\d{7}|(?:[15]|8\\d)\\d{8}", [9, 10], [["(\\d{4})(\\d{5})", "$1 $2", ["9"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["5"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["81"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"]]], "0", 0, 0, 0, 0, 0, [0, ["579[01]\\d{5}|5(?:[013-689]\\d|7[0-8])\\d{6}", [9]]]], "SB": ["677", "0[01]", "[6-9]\\d{6}|[1-6]\\d{4}", [5, 7], [["(\\d{2})(\\d{5})", "$1 $2", ["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]], 0, 0, 0, 0, 0, 0, [0, ["48\\d{3}|(?:(?:6[89]|7[1-9]|8[4-9])\\d|9(?:1[2-9]|2[013-9]|3[0-2]|[46]\\d|5[0-46-9]|7[0-689]|8[0-79]|9[0-8]))\\d{4}"]]], "SC": ["248", "010|0[0-2]", "(?:[2489]\\d|64)\\d{5}", [7], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[246]|9[57]"]]], 0, 0, 0, 0, 0, 0, [0, ["2[125-8]\\d{5}"]], "00"], "SD": ["249", "00", "[19]\\d{8}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[19]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:1[0-2]|9[0-3569])\\d{7}"]]], "SE": ["46", "00", "(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}", [6, 7, 8, 9, 10, 12], [["(\\d{2})(\\d{2,3})(\\d{2})", "$1-$2 $3", ["20"], "0$1", 0, "$1 $2 $3"], ["(\\d{3})(\\d{4})", "$1-$2", ["9(?:00|39|44|9)"], "0$1", 0, "$1 $2"], ["(\\d{2})(\\d{3})(\\d{2})", "$1-$2 $3", ["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"], "0$1", 0, "$1 $2 $3"], ["(\\d)(\\d{2,3})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["8"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2,3})(\\d{2})", "$1-$2 $3", ["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"], "0$1", 0, "$1 $2 $3"], ["(\\d{3})(\\d{2,3})(\\d{3})", "$1-$2 $3", ["9(?:00|39|44)"], "0$1", 0, "$1 $2 $3"], ["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["10|7"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d)(\\d{3})(\\d{3})(\\d{2})", "$1-$2 $3 $4", ["8"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{3})", "$1-$2 $3 $4", ["9"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1-$2 $3 $4 $5", ["[26]"], "0$1", 0, "$1 $2 $3 $4 $5"]], "0", 0, 0, 0, 0, 0, [0, ["7[02369]\\d{7}", [9]]]], "SG": ["65", "0[0-3]\\d", "(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}", [8, 10, 11], [["(\\d{4})(\\d{4})", "$1 $2", ["[369]|8(?:0[1-9]|[1-9])"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"]], ["(\\d{4})(\\d{4})(\\d{3})", "$1 $2 $3", ["7"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]]], 0, 0, 0, 0, 0, 0, [0, ["8(?:09[0-689]|96[0-2])\\d{4}|(?:8(?:0[1-8]|[1-8]\\d|9[0-5])|9[0-8]\\d)\\d{5}", [8]]]], "SH": ["290", "00", "(?:[256]\\d|8)\\d{3}", [4, 5], 0, 0, 0, 0, 0, 0, "[256]", [0, ["[56]\\d{4}", [5]]]], "SI": ["386", "00|10(?:22|66|88|99)", "[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}", [5, 6, 7, 8], [["(\\d{2})(\\d{3,6})", "$1 $2", ["8[09]|9"], "0$1"], ["(\\d{3})(\\d{5})", "$1 $2", ["59|8"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[37][01]|4[0139]|51|6"], "0$1"], ["(\\d)(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[1-57]"], "(0$1)"]], "0", 0, 0, 0, 0, 0, [0, ["65(?:[178]\\d|5[56]|6[01])\\d{4}|(?:[37][01]|4[0139]|51|6[489])\\d{6}", [8]]], "00"], "SJ": ["47", "00", "0\\d{4}|(?:[489]\\d|79)\\d{6}", [5, 8], 0, 0, 0, 0, 0, 0, "79", [0, ["(?:4[015-8]|9\\d)\\d{6}", [8]]]], "SK": ["421", "00", "[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}", [6, 7, 9], [["(\\d)(\\d{2})(\\d{3,4})", "$1 $2 $3", ["21"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["[3-5][1-8]1", "[3-5][1-8]1[67]"], "0$1"], ["(\\d)(\\d{3})(\\d{3})(\\d{2})", "$1/$2 $3 $4", ["2"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[689]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1/$2 $3 $4", ["[3-5]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["909[1-9]\\d{5}|9(?:0[1-8]|1[0-24-9]|4[03-57-9]|5\\d)\\d{6}", [9]]]], "SL": ["232", "00", "(?:[237-9]\\d|66)\\d{6}", [8], [["(\\d{2})(\\d{6})", "$1 $2", ["[236-9]"], "(0$1)"]], "0", 0, 0, 0, 0, 0, [0, ["(?:25|3[0-5]|66|7[2-9]|8[08]|9[09])\\d{6}"]]], "SM": ["378", "00", "(?:0549|[5-7]\\d)\\d{6}", [8, 10], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-7]"]], ["(\\d{4})(\\d{6})", "$1 $2", ["0"]]], 0, 0, "([89]\\d{5})$", "0549$1", 0, 0, [0, ["6[16]\\d{6}", [8]]]], "SN": ["221", "00", "(?:[378]\\d|93)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"]], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[379]"]]], 0, 0, 0, 0, 0, 0, [0, ["7(?:(?:[06-8]\\d|[19]0|21)\\d|5(?:0[01]|[19]0|2[25]|[38]3|[4-7]\\d))\\d{5}"]]], "SO": ["252", "00", "[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}", [6, 7, 8, 9], [["(\\d{2})(\\d{4})", "$1 $2", ["8[125]"]], ["(\\d{6})", "$1", ["[134]"]], ["(\\d)(\\d{6})", "$1 $2", ["[15]|2[0-79]|3[0-46-8]|4[0-7]"]], ["(\\d)(\\d{7})", "$1 $2", ["(?:2|90)4|[67]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[348]|64|79|90"]], ["(\\d{2})(\\d{5,7})", "$1 $2", ["1|28|6[0-35-9]|77|9[2-9]"]]], "0", 0, 0, 0, 0, 0, [0, ["(?:(?:15|(?:3[59]|4[89]|6\\d|7[79]|8[08])\\d|9(?:0\\d|[2-9]))\\d|2(?:4\\d|8))\\d{5}|(?:[67]\\d\\d|904)\\d{5}", [7, 8, 9]]]], "SR": ["597", "00", "(?:[2-5]|68|[78]\\d)\\d{5}", [6, 7], [["(\\d{2})(\\d{2})(\\d{2})", "$1-$2-$3", ["56"]], ["(\\d{3})(\\d{3})", "$1-$2", ["[2-5]"]], ["(\\d{3})(\\d{4})", "$1-$2", ["[6-8]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:7[124-7]|8[124-9])\\d{5}", [7]]]], "SS": ["211", "00", "[19]\\d{8}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[19]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:12|9[1257-9])\\d{7}"]]], "ST": ["239", "00", "(?:22|9\\d)\\d{5}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[29]"]]], 0, 0, 0, 0, 0, 0, [0, ["900[5-9]\\d{3}|9(?:0[1-9]|[89]\\d)\\d{4}"]]], "SV": ["503", "00", "[267]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?", [7, 8, 11], [["(\\d{3})(\\d{4})", "$1 $2", ["[89]"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[267]"]], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["[89]"]]], 0, 0, 0, 0, 0, 0, [0, ["[67]\\d{7}", [8]]]], "SX": ["1", "011", "7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "(5\\d{6})$|1", "721$1", 0, "721", [0, ["7215(?:1[02]|2\\d|5[034679]|8[014-8])\\d{4}"]]], "SY": ["963", "00", "[1-39]\\d{8}|[1-5]\\d{7}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[1-5]"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["9"], "0$1", 1]], "0", 0, 0, 0, 0, 0, [0, ["9[1-689]\\d{7}", [9]]]], "SZ": ["268", "00", "0800\\d{4}|(?:[237]\\d|900)\\d{6}", [8, 9], [["(\\d{4})(\\d{4})", "$1 $2", ["[0237]"]], ["(\\d{5})(\\d{4})", "$1 $2", ["9"]]], 0, 0, 0, 0, 0, 0, [0, ["7[6-9]\\d{6}", [8]]]], "TA": ["290", "00", "8\\d{3}", [4], 0, 0, 0, 0, 0, 0, "8"], "TC": ["1", "011", "(?:[58]\\d\\d|649|900)\\d{7}", [10], 0, "1", 0, "([2-479]\\d{6})$|1", "649$1", 0, "649", [0, ["649(?:2(?:3[129]|4[1-79])|3\\d\\d|4[34][1-3])\\d{4}"]]], "TD": ["235", "00|16", "(?:22|[689]\\d|77)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[26-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:[69]\\d|77|8[56])\\d{6}"]], "00"], "TG": ["228", "00", "[279]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[279]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:7[019]|9[0-36-9])\\d{6}"]]], "TH": ["66", "00[1-9]", "(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}", [8, 9, 10, 13], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[13-9]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1"]]], "0", 0, 0, 0, 0, 0, [0, ["67(?:1[0-8]|2[4-7])\\d{5}|(?:14|6[1-6]|[89]\\d)\\d{7}", [9]]]], "TJ": ["992", "810", "[0-57-9]\\d{8}", [9], [["(\\d{6})(\\d)(\\d{2})", "$1 $2 $3", ["331", "3317"]], ["(\\d{3})(\\d{2})(\\d{4})", "$1 $2 $3", ["44[02-479]|[34]7"]], ["(\\d{4})(\\d)(\\d{4})", "$1 $2 $3", ["3(?:[1245]|3[12])"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[0-57-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:33[03-9]|4(?:1[18]|4[02-479])|81[1-9])\\d{6}|(?:[09]\\d|1[0178]|2[02]|[34]0|5[05]|7[01578]|8[078])\\d{7}"]], "8~10"], "TK": ["690", "00", "[2-47]\\d{3,6}", [4, 5, 6, 7], 0, 0, 0, 0, 0, 0, 0, [0, ["7[2-4]\\d{2,5}"]]], "TL": ["670", "00", "7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}", [7, 8], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-489]|70"]], ["(\\d{4})(\\d{4})", "$1 $2", ["7"]]], 0, 0, 0, 0, 0, 0, [0, ["7[2-8]\\d{6}", [8]]]], "TM": ["993", "810", "(?:[1-6]\\d|71)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["12"], "(8 $1)"], ["(\\d{3})(\\d)(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["[1-5]"], "(8 $1)"], ["(\\d{2})(\\d{6})", "$1 $2", ["[67]"], "8 $1"]], "8", 0, 0, 0, 0, 0, [0, ["(?:6\\d|71)\\d{6}"]], "8~10"], "TN": ["216", "00", "[2-57-9]\\d{7}", [8], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-57-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["3(?:001|[12]40)\\d{4}|(?:(?:[259]\\d|4[0-8])\\d|3(?:1[1-35]|6[0-4]|91))\\d{5}"]]], "TO": ["676", "00", "(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}", [5, 7], [["(\\d{2})(\\d{3})", "$1-$2", ["[2-4]|50|6[09]|7[0-24-69]|8[05]"]], ["(\\d{4})(\\d{3})", "$1 $2", ["0"]], ["(\\d{3})(\\d{4})", "$1 $2", ["[5-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:5(?:4[0-5]|5[4-6])|6(?:[09]\\d|3[02]|8[15-9])|(?:7\\d|8[46-9])\\d|999)\\d{4}", [7]]]], "TR": ["90", "00", "4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}", [7, 10, 12, 13], [["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["512|8[01589]|90"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["5(?:[0-59]|61)", "5(?:[0-59]|61[06])", "5(?:[0-59]|61[06]1)"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[24][1-8]|3[1-9]"], "(0$1)", 1], ["(\\d{3})(\\d{3})(\\d{6,7})", "$1 $2 $3", ["80"], "0$1", 1]], "0", 0, 0, 0, 0, 0, [0, ["561(?:011|61\\d)\\d{4}|5(?:0[15-7]|1[06]|24|[34]\\d|5[1-59]|9[46])\\d{7}", [10]]]], "TT": ["1", "011", "(?:[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-46-8]\\d{6})$|1", "868$1", 0, "868", [0, ["868(?:(?:2[5-9]|3\\d)\\d|4(?:3[0-6]|[6-9]\\d)|6(?:20|78|8\\d)|7(?:0[1-9]|1[02-9]|[2-9]\\d))\\d{4}"]]], "TV": ["688", "00", "(?:2|7\\d\\d|90)\\d{4}", [5, 6, 7], [["(\\d{2})(\\d{3})", "$1 $2", ["2"]], ["(\\d{2})(\\d{4})", "$1 $2", ["90"]], ["(\\d{2})(\\d{5})", "$1 $2", ["7"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:7[01]\\d|90)\\d{4}", [6, 7]]]], "TW": ["886", "0(?:0[25-79]|19)", "[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}", [7, 8, 9, 10, 11], [["(\\d{2})(\\d)(\\d{4})", "$1 $2 $3", ["202"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[258]0"], "0$1"], ["(\\d)(\\d{3,4})(\\d{4})", "$1 $2 $3", ["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]", "[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[49]"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4,5})", "$1 $2 $3", ["7"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:40001[0-2]|9[0-8]\\d{4})\\d{3}", [9]]], 0, "#"], "TZ": ["255", "00[056]", "(?:[25-8]\\d|41|90)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{4})", "$1 $2 $3", ["[89]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[24]"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["5"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[67]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:6[125-9]|7[13-9])\\d{7}"]]], "UA": ["380", "00", "[89]\\d{9}|[3-9]\\d{8}", [9, 10], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]", "6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"], "0$1"], ["(\\d{4})(\\d{5})", "$1 $2", ["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])", "3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[3-7]|89|9[1-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[89]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["790\\d{6}|(?:39|50|6[36-8]|7[1-357]|9[1-9])\\d{7}", [9]]], "0~0"], "UG": ["256", "00[057]", "800\\d{6}|(?:[29]0|[347]\\d)\\d{7}", [9], [["(\\d{4})(\\d{5})", "$1 $2", ["202", "2024"], "0$1"], ["(\\d{3})(\\d{6})", "$1 $2", ["[27-9]|4(?:6[45]|[7-9])"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["[34]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["72[48]0\\d{5}|7(?:[015-8]\\d|2[067]|36|4[0-6]|9[89])\\d{6}"]]], "US": ["1", "011", "[2-9]\\d{9}|3\\d{6}", [10], [["(\\d{3})(\\d{4})", "$1-$2", ["310"], 0, 1], ["(\\d{3})(\\d{3})(\\d{4})", "($1) $2-$3", ["[2-9]"], 0, 1, "$1-$2-$3"]], "1", 0, 0, 0, 0, 0, [0, ["(?:3052(?:0[0-8]|[1-9]\\d)|5056(?:[0-35-9]\\d|4[468])|7302[0-4]\\d)\\d{4}|(?:305[3-9]|472[24]|505[2-57-9]|7306|983[2-47-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-47-9]|1[02-9]|2[013569]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}"]]], "UY": ["598", "0(?:0|1[3-9]\\d)", "0004\\d{2,9}|[1249]\\d{7}|(?:[49]\\d|80)\\d{5}", [6, 7, 8, 9, 10, 11, 12, 13], [["(\\d{3})(\\d{3,4})", "$1 $2", ["0"]], ["(\\d{3})(\\d{4})", "$1 $2", ["[49]0|8"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["9"], "0$1"], ["(\\d{4})(\\d{4})", "$1 $2", ["[124]"]], ["(\\d{3})(\\d{3})(\\d{2,4})", "$1 $2 $3", ["0"]], ["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})", "$1 $2 $3 $4", ["0"]]], "0", 0, 0, 0, 0, 0, [0, ["9[1-9]\\d{6}", [8]]], "00", " int. "], "UZ": ["998", "00", "(?:20|33|[5-79]\\d|88)\\d{7}", [9], [["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[235-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:(?:[25]0|33|88|9[0-57-9])\\d{3}|6(?:1(?:2(?:2[01]|98)|35[0-4]|50\\d|61[23]|7(?:[01][017]|4\\d|55|9[5-9]))|2(?:(?:11|7\\d)\\d|2(?:[12]1|9[01379])|5(?:[126]\\d|3[0-4]))|5(?:19[01]|2(?:27|9[26])|(?:30|59|7\\d)\\d)|6(?:2(?:1[5-9]|2[0367]|38|41|52|60)|(?:3[79]|9[0-3])\\d|4(?:56|83)|7(?:[07]\\d|1[017]|3[07]|4[047]|5[057]|67|8[0178]|9[79]))|7(?:2(?:24|3[237]|4[5-9]|7[15-8])|5(?:7[12]|8[0589])|7(?:0\\d|[39][07])|9(?:0\\d|7[079])))|7(?:[07]\\d{3}|1(?:13[01]|6(?:0[47]|1[67]|66)|71[3-69]|98\\d)|2(?:2(?:2[79]|95)|3(?:2[5-9]|6[0-6])|57\\d|7(?:0\\d|1[17]|2[27]|3[37]|44|5[057]|66|88))|3(?:2(?:1[0-6]|21|3[469]|7[159])|(?:33|9[4-6])\\d|5(?:0[0-4]|5[579]|9\\d)|7(?:[0-3579]\\d|4[0467]|6[67]|8[078]))|4(?:2(?:29|5[0257]|6[0-7]|7[1-57])|5(?:1[0-4]|8\\d|9[5-9])|7(?:0\\d|1[024589]|2[0-27]|3[0137]|[46][07]|5[01]|7[5-9]|9[079])|9(?:7[015-9]|[89]\\d))|5(?:112|2(?:0\\d|2[29]|[49]4)|3[1568]\\d|52[6-9]|7(?:0[01578]|1[017]|[23]7|4[047]|[5-7]\\d|8[78]|9[079]))|9(?:22[128]|3(?:2[0-4]|7\\d)|57[02569]|7(?:2[05-9]|3[37]|4\\d|60|7[2579]|87|9[07]))))\\d{4}"]]], "VA": ["39", "00", "0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}", [6, 7, 8, 9, 10, 11, 12], 0, 0, 0, 0, 0, 0, "06698", [0, ["3[1-9]\\d{8}|3[2-9]\\d{7}", [9, 10]]]], "VC": ["1", "011", "(?:[58]\\d\\d|784|900)\\d{7}", [10], 0, "1", 0, "([2-7]\\d{6})$|1", "784$1", 0, "784", [0, ["784(?:4(?:3[0-5]|5[45]|89|9[0-8])|5(?:2[6-9]|3[0-4])|720)\\d{4}"]]], "VE": ["58", "00", "[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}", [10], [["(\\d{3})(\\d{7})", "$1-$2", ["[24-689]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["4(?:1[24-8]|2[46])\\d{7}"]]], "VG": ["1", "011", "(?:284|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-578]\\d{6})$|1", "284$1", 0, "284", [0, ["284(?:245|3(?:0[0-3]|4[0-7]|68|9[34])|4(?:4[0-6]|68|9[69])|5(?:4[0-7]|68|9[69]))\\d{4}"]]], "VI": ["1", "011", "[58]\\d{9}|(?:34|90)0\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "340$1", 0, "340", [0, ["340(?:2(?:0\\d|10|2[06-8]|4[49]|77)|3(?:32|44)|4(?:2[23]|44|7[34]|89)|5(?:1[34]|55)|6(?:2[56]|4[23]|77|9[023])|7(?:1[2-57-9]|2[57]|7\\d)|884|998)\\d{4}"]]], "VN": ["84", "00", "[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}", [7, 8, 9, 10], [["(\\d{2})(\\d{5})", "$1 $2", ["80"], "0$1", 1], ["(\\d{4})(\\d{4,6})", "$1 $2", ["1"], 0, 1], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["6"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[357-9]"], "0$1", 1], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["2[48]"], "0$1", 1], ["(\\d{3})(\\d{4})(\\d{3})", "$1 $2 $3", ["2"], "0$1", 1]], "0", 0, 0, 0, 0, 0, [0, ["(?:5(?:2[238]|59)|89[6-9]|99[013-9])\\d{6}|(?:3\\d|5[1689]|7[06-9]|8[1-8]|9[0-8])\\d{7}", [9]]]], "VU": ["678", "00", "[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}", [5, 7], [["(\\d{3})(\\d{4})", "$1 $2", ["[57-9]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:[58]\\d|7[013-7])\\d{5}", [7]]]], "WF": ["681", "00", "(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}", [6, 9], [["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["[47-9]"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:72|8[23])\\d{4}", [6]]]], "WS": ["685", "0", "(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}", [5, 6, 7, 10], [["(\\d{5})", "$1", ["[2-5]|6[1-9]"]], ["(\\d{3})(\\d{3,7})", "$1 $2", ["[68]"]], ["(\\d{2})(\\d{5})", "$1 $2", ["7"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:7[1-35-7]|8(?:[3-7]|9\\d{3}))\\d{5}", [7, 10]]]], "XK": ["383", "00", "2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}", [8, 9, 10, 11, 12], [["(\\d{3})(\\d{5})", "$1 $2", ["[89]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-4]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["2|39"], "0$1"], ["(\\d{2})(\\d{7,10})", "$1 $2", ["3"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["4[3-9]\\d{6}", [8]]]], "YE": ["967", "00", "(?:1|7\\d)\\d{7}|[1-7]\\d{6}", [7, 8, 9], [["(\\d)(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[1-6]|7(?:[24-6]|8[0-7])"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["7"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["7[01378]\\d{7}", [9]]]], "YT": ["262", "00", "(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}", [9], 0, "0", 0, 0, 0, 0, 0, [0, ["639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])\\d{4}"]]], "ZA": ["27", "00", "[1-79]\\d{8}|8\\d{4,9}", [5, 6, 7, 8, 9, 10], [["(\\d{2})(\\d{3,4})", "$1 $2", ["8[1-4]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2,3})", "$1 $2 $3", ["8[1-4]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["860"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:1(?:3492[0-25]|4495[0235]|549(?:20|5[01]))|4[34]492[01])\\d{3}|8[1-4]\\d{3,7}|(?:2[27]|47|54)4950\\d{3}|(?:1(?:049[2-4]|9[12]\\d\\d)|(?:6\\d\\d|7(?:[0-46-9]\\d|5[0-4]))\\d\\d|8(?:5\\d{3}|7(?:08[67]|158|28[5-9]|310)))\\d{4}|(?:1[6-8]|28|3[2-69]|4[025689]|5[36-8])4920\\d{3}|(?:12|[2-5]1)492\\d{4}", [5, 6, 7, 8, 9]]]], "ZM": ["260", "00", "800\\d{6}|(?:21|63|[79]\\d)\\d{7}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[28]"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["[79]"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["(?:7[5-79]|9[5-8])\\d{7}"]]], "ZW": ["263", "00", "2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}", [5, 6, 7, 8, 9, 10], [["(\\d{3})(\\d{3,5})", "$1 $2", ["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"], "0$1"], ["(\\d)(\\d{3})(\\d{2,4})", "$1 $2 $3", ["[49]"], "0$1"], ["(\\d{3})(\\d{4})", "$1 $2", ["80"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2", "2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["7"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)", "2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"], "0$1"], ["(\\d{4})(\\d{6})", "$1 $2", ["8"], "0$1"], ["(\\d{2})(\\d{3,5})", "$1 $2", ["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["29[013-9]|39|54"], "0$1"], ["(\\d{4})(\\d{3,5})", "$1 $2", ["(?:25|54)8", "258|5483"], "0$1"]], "0", 0, 0, 0, 0, 0, [0, ["7(?:[1278]\\d|3[1-9])\\d{6}", [9]]]] }, "nonGeographic": { "800": ["800", 0, "(?:00|[1-9]\\d)\\d{6}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["\\d"]]], 0, 0, 0, 0, 0, 0, [0, 0, ["(?:00|[1-9]\\d)\\d{6}"]]], "808": ["808", 0, "[1-9]\\d{7}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[1-9]"]]], 0, 0, 0, 0, 0, 0, [0, 0, 0, 0, 0, 0, 0, 0, 0, ["[1-9]\\d{7}"]]], "870": ["870", 0, "7\\d{11}|[35-7]\\d{8}", [9, 12], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[35-7]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"]]], "878": ["878", 0, "10\\d{10}", [12], [["(\\d{2})(\\d{5})(\\d{5})", "$1 $2 $3", ["1"]]], 0, 0, 0, 0, 0, 0, [0, 0, 0, 0, 0, 0, 0, 0, ["10\\d{10}"]]], "881": ["881", 0, "6\\d{9}|[0-36-9]\\d{8}", [9, 10], [["(\\d)(\\d{3})(\\d{5})", "$1 $2 $3", ["[0-37-9]"]], ["(\\d)(\\d{3})(\\d{5,6})", "$1 $2 $3", ["6"]]], 0, 0, 0, 0, 0, 0, [0, ["6\\d{9}|[0-36-9]\\d{8}"]]], "882": ["882", 0, "[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?", [7, 8, 9, 10, 11, 12], [["(\\d{2})(\\d{5})", "$1 $2", ["16|342"]], ["(\\d{2})(\\d{6})", "$1 $2", ["49"]], ["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["1[36]|9"]], ["(\\d{2})(\\d{4})(\\d{3})", "$1 $2 $3", ["3[23]"]], ["(\\d{2})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["16"]], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["10|23|3(?:[15]|4[57])|4|51"]], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["34"]], ["(\\d{2})(\\d{4,5})(\\d{5})", "$1 $2 $3", ["[1-35]"]]], 0, 0, 0, 0, 0, 0, [0, ["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}", [7, 8, 9, 10, 12]], 0, 0, 0, ["348[57]\\d{7}", [11]], 0, 0, ["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]], "883": ["883", 0, "(?:[1-4]\\d|51)\\d{6,10}", [8, 9, 10, 11, 12], [["(\\d{3})(\\d{3})(\\d{2,8})", "$1 $2 $3", ["[14]|2[24-689]|3[02-689]|51[24-9]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["510"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["21"]], ["(\\d{4})(\\d{4})(\\d{4})", "$1 $2 $3", ["51[13]"]], ["(\\d{3})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["[235]"]]], 0, 0, 0, 0, 0, 0, [0, 0, 0, 0, 0, 0, 0, 0, ["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]], "888": ["888", 0, "\\d{11}", [11], [["(\\d{3})(\\d{3})(\\d{5})", "$1 $2 $3"]], 0, 0, 0, 0, 0, 0, [0, 0, 0, 0, 0, 0, ["\\d{11}"]]], "979": ["979", 0, "[1359]\\d{8}", [9], [["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["[1359]"]]], 0, 0, 0, 0, 0, 0, [0, 0, 0, ["[1359]\\d{8}"]]] } };
  35440. function withMetadataArgument(func, _arguments) {
  35441. var args = Array.prototype.slice.call(_arguments);
  35442. args.push(metadata);
  35443. return func.apply(this, args);
  35444. }
  35445. function parsePhoneNumber() {
  35446. return withMetadataArgument(parsePhoneNumber$2, arguments);
  35447. }
  35448. const _imports_0$9 = "/static/icon/select-icon.png";
  35449. const _sfc_main$34 = {
  35450. __name: "phone-international-input",
  35451. props: {
  35452. verifyUsername: {
  35453. type: Boolean
  35454. }
  35455. },
  35456. emits: ["input"],
  35457. setup(__props, { expose: __expose, emit: __emit }) {
  35458. __expose();
  35459. const country = vue.ref(countryData);
  35460. const selectedCode = vue.ref("");
  35461. const selectedCountryCode = vue.ref("");
  35462. const selectedIndex = vue.ref(0);
  35463. const findIndexByCode = (code2) => {
  35464. return country.value.findIndex((item) => item.phone_code == code2);
  35465. };
  35466. const pickChange = (e2) => {
  35467. selectedIndex.value = e2.detail.value;
  35468. selectedCode.value = country.value[selectedIndex.value].phone_code;
  35469. selectedCountryCode.value = country.value[selectedIndex.value].country_code;
  35470. };
  35471. onLoad(() => {
  35472. const chinaIndex = findIndexByCode("86");
  35473. if (chinaIndex !== -1) {
  35474. selectedIndex.value = chinaIndex;
  35475. selectedCode.value = country.value[chinaIndex].phone_code;
  35476. selectedCountryCode.value = country.value[chinaIndex].country_code;
  35477. }
  35478. });
  35479. const props = __props;
  35480. const emits = __emit;
  35481. const verifyMobile = (e2) => {
  35482. const phone = e2;
  35483. if (phone == "") {
  35484. emits("input", phone, t$6("account.phone_number"));
  35485. } else {
  35486. try {
  35487. const phoneParseMobile = parsePhoneNumber(phone, selectedCountryCode.value);
  35488. if (phoneParseMobile.isValid()) {
  35489. emits("input", phone, "");
  35490. } else {
  35491. emits("input", phone, t$6("account.incorrect_phone_format"));
  35492. }
  35493. } catch (e3) {
  35494. }
  35495. }
  35496. };
  35497. const state = vue.reactive({
  35498. codeText: t$6("account.get_verification_code"),
  35499. model: {
  35500. mobile: ""
  35501. // 手机号
  35502. }
  35503. });
  35504. const __returned__ = { country, selectedCode, selectedCountryCode, selectedIndex, findIndexByCode, pickChange, props, emits, verifyMobile, state, ref: vue.ref, reactive: vue.reactive, unref: vue.unref, computed: vue.computed, get sheep() {
  35505. return sheep$1;
  35506. }, get getSmsCode() {
  35507. return getSmsCode;
  35508. }, get getSmsTimer() {
  35509. return getSmsTimer;
  35510. }, get onLoad() {
  35511. return onLoad;
  35512. }, get countryData() {
  35513. return countryData;
  35514. }, get parsePhoneNumberFromString() {
  35515. return parsePhoneNumber$1;
  35516. }, get AsYouType() {
  35517. return AsYouType;
  35518. }, get parseMobile() {
  35519. return parsePhoneNumber;
  35520. }, get t() {
  35521. return t$6;
  35522. } };
  35523. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  35524. return __returned__;
  35525. }
  35526. };
  35527. function _sfc_render$33(_ctx, _cache, $props, $setup, $data, $options) {
  35528. const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l);
  35529. return vue.openBlock(), vue.createElementBlock(
  35530. vue.Fragment,
  35531. null,
  35532. [
  35533. vue.createElementVNode("picker", {
  35534. mode: "selector",
  35535. range: $setup.country.map((item) => item.chinese_name + " +" + item.phone_code),
  35536. value: $setup.selectedIndex,
  35537. onChange: $setup.pickChange,
  35538. style: { "float": "left", "height": "100%", "width": "110rpx", "display": "flex", "align-items": "center" }
  35539. }, [
  35540. vue.createElementVNode("view", null, [
  35541. vue.createTextVNode(
  35542. "+" + vue.toDisplayString($setup.selectedCode) + " ",
  35543. 1
  35544. /* TEXT */
  35545. ),
  35546. vue.createElementVNode("image", {
  35547. src: _imports_0$9,
  35548. style: { "width": "20rpx", "height": "20rpx" }
  35549. })
  35550. ])
  35551. ], 40, ["range", "value"]),
  35552. vue.createVNode(_component_uni_easyinput, {
  35553. placeholder: $setup.t("account.phone_number"),
  35554. modelValue: $setup.state.model.mobile,
  35555. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.model.mobile = $event),
  35556. onInput: $setup.verifyMobile,
  35557. inputBorder: false,
  35558. type: "number",
  35559. style: { "float": "left", "width": "calc(100% - 110rpx)" }
  35560. }, {
  35561. right: vue.withCtx(() => [
  35562. vue.createElementVNode("button", {
  35563. class: vue.normalizeClass(["ss-reset-button code-btn code-btn-start", { "disabled": !$props.verifyUsername || $setup.selectedCode != 86 }]),
  35564. disabled: !$props.verifyUsername || $setup.selectedCode != 86,
  35565. onClick: _cache[0] || (_cache[0] = ($event) => $setup.getSmsCode("smsLogin", $setup.state.model.mobile))
  35566. }, vue.toDisplayString($setup.getSmsTimer("smsLogin")), 11, ["disabled"])
  35567. ]),
  35568. _: 1
  35569. /* STABLE */
  35570. }, 8, ["placeholder", "modelValue"])
  35571. ],
  35572. 64
  35573. /* STABLE_FRAGMENT */
  35574. );
  35575. }
  35576. const phoneInternationalInput = /* @__PURE__ */ _export_sfc(_sfc_main$34, [["render", _sfc_render$33], ["__scopeId", "data-v-5db53ad8"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-auth-modal/components/phone-international-input.vue"]]);
  35577. const _sfc_main$33 = {
  35578. __name: "sms-login",
  35579. props: {
  35580. agreeStatus: {
  35581. type: Boolean,
  35582. default: false
  35583. }
  35584. },
  35585. emits: ["onConfirm"],
  35586. setup(__props, { expose: __expose, emit: __emit }) {
  35587. __expose();
  35588. const mobileInput = (mobile2, mobileError) => {
  35589. state.model.mobile = mobile2;
  35590. state.mobileErrorMsg = mobileError;
  35591. };
  35592. const smsLoginRef = vue.ref(null);
  35593. const emits = __emit;
  35594. const props = __props;
  35595. const state = vue.reactive({
  35596. verifyUsername: true,
  35597. usernameErrorMsg: "",
  35598. isMobileEnd: false,
  35599. // 手机号输入完毕
  35600. codeText: t$6("account.get_verification_code"),
  35601. mobileErrorMsg: "",
  35602. model: {
  35603. username: "",
  35604. mobile: "",
  35605. // 手机号
  35606. code: ""
  35607. // 验证码
  35608. },
  35609. rules: {
  35610. username,
  35611. code,
  35612. mobile
  35613. }
  35614. });
  35615. let lastUsername = vue.ref("");
  35616. async function verifyUsername(e2) {
  35617. const username2 = e2.detail.value;
  35618. if (username2 == "" || username2 == lastUsername.value) {
  35619. return false;
  35620. }
  35621. lastUsername.value = username2;
  35622. const { data } = await AuthUtil.verifyUsername(username2);
  35623. if (data) {
  35624. state.usernameErrorMsg = t$6("account.enter_valid_username");
  35625. state.verifyUsername = data;
  35626. } else {
  35627. state.usernameErrorMsg = "";
  35628. state.verifyUsername = data;
  35629. }
  35630. }
  35631. async function smsLoginSubmit() {
  35632. const linkId = uni.getStorageSync("linkId");
  35633. if (linkId) {
  35634. state.model.linkId = linkId;
  35635. }
  35636. const validate = await vue.unref(smsLoginRef).validate().catch((error2) => {
  35637. formatAppLog("log", "at sheep/components/s-auth-modal/components/sms-login.vue:120", "error: ", error2);
  35638. });
  35639. if (!validate) {
  35640. return;
  35641. }
  35642. if (!props.agreeStatus) {
  35643. emits("onConfirm", true);
  35644. sheep$1.$helper.toast(t$6("account.please_agree"));
  35645. return;
  35646. }
  35647. const {
  35648. code: code2
  35649. } = await AuthUtil.smsLogin(state.model);
  35650. if (code2 === 0) {
  35651. closeAuthModal();
  35652. }
  35653. }
  35654. const __returned__ = { mobileInput, smsLoginRef, emits, props, state, get lastUsername() {
  35655. return lastUsername;
  35656. }, set lastUsername(v2) {
  35657. lastUsername = v2;
  35658. }, verifyUsername, smsLoginSubmit, ref: vue.ref, reactive: vue.reactive, unref: vue.unref, computed: vue.computed, get sheep() {
  35659. return sheep$1;
  35660. }, get code() {
  35661. return code;
  35662. }, get mobile() {
  35663. return mobile;
  35664. }, get username() {
  35665. return username;
  35666. }, get showAuthModal() {
  35667. return showAuthModal;
  35668. }, get closeAuthModal() {
  35669. return closeAuthModal;
  35670. }, get getSmsCode() {
  35671. return getSmsCode;
  35672. }, get getSmsTimer() {
  35673. return getSmsTimer;
  35674. }, get AuthUtil() {
  35675. return AuthUtil;
  35676. }, phoneInternationalInput, get t() {
  35677. return t$6;
  35678. } };
  35679. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  35680. return __returned__;
  35681. }
  35682. };
  35683. function _sfc_render$32(_ctx, _cache, $props, $setup, $data, $options) {
  35684. const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l);
  35685. const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9);
  35686. const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7);
  35687. return vue.openBlock(), vue.createElementBlock("view", null, [
  35688. vue.createCommentVNode(" 表单项 "),
  35689. vue.createVNode(_component_uni_forms, {
  35690. ref: "smsLoginRef",
  35691. modelValue: $setup.state.model,
  35692. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.model = $event),
  35693. rules: $setup.state.rules,
  35694. validateTrigger: "bind",
  35695. labelWidth: "160",
  35696. labelAlign: "center",
  35697. class: "loginUniForm"
  35698. }, {
  35699. default: vue.withCtx(() => [
  35700. vue.createVNode(_component_uni_forms_item, {
  35701. name: "username",
  35702. label: $setup.t("account.username"),
  35703. class: "loginUniFormItem",
  35704. "error-message": $setup.state.usernameErrorMsg
  35705. }, {
  35706. default: vue.withCtx(() => [
  35707. vue.createVNode(_component_uni_easyinput, {
  35708. placeholder: $setup.t("account.enter_username"),
  35709. modelValue: $setup.state.model.username,
  35710. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.state.model.username = $event),
  35711. inputBorder: false,
  35712. clearable: false,
  35713. onBlur: $setup.verifyUsername
  35714. }, {
  35715. right: vue.withCtx(() => [
  35716. $setup.state.verifyUsername ? (vue.openBlock(), vue.createElementBlock("view", {
  35717. key: 0,
  35718. class: "icon"
  35719. }, [
  35720. vue.createElementVNode("image", {
  35721. style: "",
  35722. src: $setup.sheep.$url.static("/static/images/shibai.png")
  35723. }, null, 8, ["src"])
  35724. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  35725. key: 1,
  35726. class: "icon"
  35727. }, [
  35728. vue.createElementVNode("image", {
  35729. src: $setup.sheep.$url.static("/static/images/chenggong.png")
  35730. }, null, 8, ["src"])
  35731. ]))
  35732. ]),
  35733. _: 1
  35734. /* STABLE */
  35735. }, 8, ["placeholder", "modelValue"])
  35736. ]),
  35737. _: 1
  35738. /* STABLE */
  35739. }, 8, ["label", "error-message"]),
  35740. vue.createVNode(_component_uni_forms_item, {
  35741. name: "mobile",
  35742. label: $setup.t("account.phone_number"),
  35743. class: "mobile loginUniFormItem ss-p-t-10",
  35744. "error-message": $setup.state.mobileErrorMsg
  35745. }, {
  35746. default: vue.withCtx(() => [
  35747. vue.createVNode($setup["phoneInternationalInput"], {
  35748. "verify-username": !$setup.state.verifyUsername,
  35749. onInput: $setup.mobileInput
  35750. }, null, 8, ["verify-username"])
  35751. ]),
  35752. _: 1
  35753. /* STABLE */
  35754. }, 8, ["label", "error-message"]),
  35755. vue.createVNode(_component_uni_forms_item, {
  35756. name: "code",
  35757. label: $setup.t("account.verification_code"),
  35758. class: "loginUniFormItem"
  35759. }, {
  35760. default: vue.withCtx(() => [
  35761. vue.createVNode(_component_uni_easyinput, {
  35762. placeholder: $setup.t("account.enter_verification_code"),
  35763. modelValue: $setup.state.model.code,
  35764. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.model.code = $event),
  35765. inputBorder: false,
  35766. type: "number",
  35767. maxlength: "4"
  35768. }, null, 8, ["placeholder", "modelValue"])
  35769. ]),
  35770. _: 1
  35771. /* STABLE */
  35772. }, 8, ["label"])
  35773. ]),
  35774. _: 1
  35775. /* STABLE */
  35776. }, 8, ["modelValue", "rules"]),
  35777. vue.createElementVNode("view", { style: { "display": "flex", "justify-content": "space-between", "margin-top": "20rpx" } }, [
  35778. vue.createCommentVNode(` <button class="ss-reset-button forgot-btn" @tap="showAuthModal('resetPassword')">\r
  35779. 忘记密码\r
  35780. </button> `),
  35781. vue.createElementVNode(
  35782. "button",
  35783. {
  35784. class: "ss-reset-button login-btn-start",
  35785. onClick: $setup.smsLoginSubmit
  35786. },
  35787. vue.toDisplayString($setup.t("account.login")),
  35788. 1
  35789. /* TEXT */
  35790. )
  35791. ])
  35792. ]);
  35793. }
  35794. const smsLogin = /* @__PURE__ */ _export_sfc(_sfc_main$33, [["render", _sfc_render$32], ["__scopeId", "data-v-7636e637"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-auth-modal/components/sms-login.vue"]]);
  35795. const _sfc_main$32 = {
  35796. __name: "register",
  35797. props: {
  35798. agreeStatus: {
  35799. type: Boolean,
  35800. default: false
  35801. }
  35802. },
  35803. emits: ["onConfirm"],
  35804. setup(__props, { expose: __expose, emit: __emit }) {
  35805. __expose();
  35806. const mobileInput = (mobile2, mobileError) => {
  35807. state.model.mobile = mobile2;
  35808. state.mobileErrorMsg = mobileError;
  35809. };
  35810. const state = vue.reactive({
  35811. verifyUsername: false,
  35812. // 校验用户名是否可用
  35813. codeText: "获取验证码",
  35814. mobileErrorMsg: "",
  35815. usernameErrorMsg: "",
  35816. model: {
  35817. username: "",
  35818. // 用户名
  35819. password: "",
  35820. // 密码
  35821. mobile: "",
  35822. // 手机号
  35823. code: ""
  35824. // 验证码
  35825. },
  35826. rules: {
  35827. username,
  35828. password,
  35829. code
  35830. }
  35831. });
  35832. const smsLoginRef = vue.ref(null);
  35833. const emits = __emit;
  35834. const props = __props;
  35835. let lastUsername = vue.ref("");
  35836. async function verifyUsername(e2) {
  35837. const username2 = e2.detail.value;
  35838. if (username2 == "" || username2 == lastUsername.value) {
  35839. return false;
  35840. }
  35841. lastUsername.value = username2;
  35842. const { data } = await AuthUtil.verifyUsername(username2);
  35843. if (data) {
  35844. state.usernameErrorMsg = "";
  35845. state.verifyUsername = data;
  35846. } else {
  35847. state.usernameErrorMsg = t$6("account.username_exists");
  35848. state.verifyUsername = data;
  35849. }
  35850. }
  35851. async function registerSubmit() {
  35852. formatAppLog("log", "at sheep/components/s-auth-modal/components/register.vue:117", state.model);
  35853. const validate = await vue.unref(smsLoginRef).validate().catch((error2) => {
  35854. formatAppLog("log", "at sheep/components/s-auth-modal/components/register.vue:122", "error: ", error2);
  35855. });
  35856. if (!validate) {
  35857. return;
  35858. }
  35859. if (!props.agreeStatus) {
  35860. emits("onConfirm", true);
  35861. sheep$1.$helper.toast(t$6("account.please_agree"));
  35862. return;
  35863. }
  35864. const {
  35865. code: code2
  35866. } = await AuthUtil.register(state.model);
  35867. if (code2 === 0) {
  35868. closeAuthModal();
  35869. }
  35870. }
  35871. const __returned__ = { mobileInput, state, smsLoginRef, emits, props, get lastUsername() {
  35872. return lastUsername;
  35873. }, set lastUsername(v2) {
  35874. lastUsername = v2;
  35875. }, verifyUsername, registerSubmit, ref: vue.ref, reactive: vue.reactive, unref: vue.unref, computed: vue.computed, get sheep() {
  35876. return sheep$1;
  35877. }, get code() {
  35878. return code;
  35879. }, get mobile() {
  35880. return mobile;
  35881. }, get username() {
  35882. return username;
  35883. }, get password() {
  35884. return password;
  35885. }, get showAuthModal() {
  35886. return showAuthModal;
  35887. }, get closeAuthModal() {
  35888. return closeAuthModal;
  35889. }, get getSmsCode() {
  35890. return getSmsCode;
  35891. }, get getSmsTimer() {
  35892. return getSmsTimer;
  35893. }, get AuthUtil() {
  35894. return AuthUtil;
  35895. }, phoneInternationalInput, get t() {
  35896. return t$6;
  35897. } };
  35898. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  35899. return __returned__;
  35900. }
  35901. };
  35902. function _sfc_render$31(_ctx, _cache, $props, $setup, $data, $options) {
  35903. const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l);
  35904. const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9);
  35905. const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7);
  35906. return vue.openBlock(), vue.createElementBlock("view", null, [
  35907. vue.createCommentVNode(" 表单项 "),
  35908. vue.createVNode(_component_uni_forms, {
  35909. ref: "smsLoginRef",
  35910. modelValue: $setup.state.model,
  35911. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.state.model = $event),
  35912. rules: $setup.state.rules,
  35913. validateTrigger: "bind",
  35914. labelWidth: "140",
  35915. labelAlign: "center",
  35916. class: "loginUniForm"
  35917. }, {
  35918. default: vue.withCtx(() => [
  35919. vue.createVNode(_component_uni_forms_item, {
  35920. name: "username",
  35921. label: $setup.t("account.username"),
  35922. class: "loginUniFormItem",
  35923. "error-message": $setup.state.usernameErrorMsg
  35924. }, {
  35925. default: vue.withCtx(() => [
  35926. vue.createVNode(_component_uni_easyinput, {
  35927. placeholder: $setup.t("account.enter_username"),
  35928. modelValue: $setup.state.model.username,
  35929. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.state.model.username = $event),
  35930. inputBorder: false,
  35931. clearable: false,
  35932. onBlur: $setup.verifyUsername
  35933. }, {
  35934. right: vue.withCtx(() => [
  35935. !$setup.state.verifyUsername ? (vue.openBlock(), vue.createElementBlock("view", {
  35936. key: 0,
  35937. class: "icon"
  35938. }, [
  35939. vue.createElementVNode("image", {
  35940. style: "",
  35941. src: $setup.sheep.$url.static("/static/images/shibai.png")
  35942. }, null, 8, ["src"])
  35943. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  35944. key: 1,
  35945. class: "icon"
  35946. }, [
  35947. vue.createElementVNode("image", {
  35948. src: $setup.sheep.$url.static("/static/images/chenggong.png")
  35949. }, null, 8, ["src"])
  35950. ]))
  35951. ]),
  35952. _: 1
  35953. /* STABLE */
  35954. }, 8, ["placeholder", "modelValue"])
  35955. ]),
  35956. _: 1
  35957. /* STABLE */
  35958. }, 8, ["label", "error-message"]),
  35959. vue.createVNode(_component_uni_forms_item, {
  35960. name: "password",
  35961. label: $setup.t("account.password"),
  35962. class: "loginUniFormItem"
  35963. }, {
  35964. default: vue.withCtx(() => [
  35965. vue.createVNode(_component_uni_easyinput, {
  35966. type: "password",
  35967. placeholder: $setup.t("account.enter_password"),
  35968. modelValue: $setup.state.model.password,
  35969. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.model.password = $event),
  35970. inputBorder: false
  35971. }, null, 8, ["placeholder", "modelValue"])
  35972. ]),
  35973. _: 1
  35974. /* STABLE */
  35975. }, 8, ["label"]),
  35976. vue.createVNode(_component_uni_forms_item, {
  35977. name: "mobile",
  35978. label: $setup.t("account.phone_number"),
  35979. class: "mobile loginUniFormItem ss-p-t-10",
  35980. "error-message": $setup.state.mobileErrorMsg
  35981. }, {
  35982. default: vue.withCtx(() => [
  35983. vue.createVNode($setup["phoneInternationalInput"], {
  35984. "verify-username": $setup.state.verifyUsername,
  35985. onInput: $setup.mobileInput
  35986. }, null, 8, ["verify-username"])
  35987. ]),
  35988. _: 1
  35989. /* STABLE */
  35990. }, 8, ["label", "error-message"]),
  35991. vue.createVNode(_component_uni_forms_item, {
  35992. name: "code",
  35993. label: $setup.t("account.verification_code"),
  35994. class: "loginUniFormItem"
  35995. }, {
  35996. default: vue.withCtx(() => [
  35997. vue.createVNode(_component_uni_easyinput, {
  35998. placeholder: $setup.t("account.enter_verification_code"),
  35999. modelValue: $setup.state.model.code,
  36000. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.model.code = $event),
  36001. inputBorder: false,
  36002. type: "number",
  36003. maxlength: "4"
  36004. }, null, 8, ["placeholder", "modelValue"])
  36005. ]),
  36006. _: 1
  36007. /* STABLE */
  36008. }, 8, ["label"])
  36009. ]),
  36010. _: 1
  36011. /* STABLE */
  36012. }, 8, ["modelValue", "rules"]),
  36013. vue.createElementVNode("view", { style: { "display": "flex", "justify-content": "space-between", "margin-top": "20rpx" } }, [
  36014. vue.createCommentVNode(` <button class="ss-reset-button forgot-btn" @tap="showAuthModal('resetPassword')">
  36015. 忘记密码
  36016. </button> `),
  36017. vue.createElementVNode(
  36018. "button",
  36019. {
  36020. class: "ss-reset-button login-btn-start",
  36021. onClick: $setup.registerSubmit
  36022. },
  36023. vue.toDisplayString($setup.t("account.register")),
  36024. 1
  36025. /* TEXT */
  36026. )
  36027. ])
  36028. ]);
  36029. }
  36030. const register = /* @__PURE__ */ _export_sfc(_sfc_main$32, [["render", _sfc_render$31], ["__scopeId", "data-v-5a48a10b"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-auth-modal/components/register.vue"]]);
  36031. const _sfc_main$31 = {
  36032. __name: "reset-password",
  36033. setup(__props, { expose: __expose }) {
  36034. __expose();
  36035. const resetPasswordRef = vue.ref(null);
  36036. const isLogin = vue.computed(() => sheep$1.$store("user").isLogin);
  36037. const state = vue.reactive({
  36038. isMobileEnd: false,
  36039. // 手机号输入完毕
  36040. model: {
  36041. mobile: "",
  36042. // 手机号
  36043. code: "",
  36044. // 验证码
  36045. password: ""
  36046. // 密码
  36047. },
  36048. rules: {
  36049. code,
  36050. mobile,
  36051. password
  36052. }
  36053. });
  36054. const resetPasswordSubmit = async () => {
  36055. const validate = await vue.unref(resetPasswordRef).validate().catch((error2) => {
  36056. formatAppLog("log", "at sheep/components/s-auth-modal/components/reset-password.vue:102", "error: ", error2);
  36057. });
  36058. if (!validate) {
  36059. return;
  36060. }
  36061. const { code: code2 } = await UserApi.resetUserPassword(state.model);
  36062. if (code2 !== 0) {
  36063. return;
  36064. }
  36065. showAuthModal("accountLogin");
  36066. };
  36067. const __returned__ = { resetPasswordRef, isLogin, state, resetPasswordSubmit, computed: vue.computed, ref: vue.ref, reactive: vue.reactive, unref: vue.unref, get sheep() {
  36068. return sheep$1;
  36069. }, get code() {
  36070. return code;
  36071. }, get mobile() {
  36072. return mobile;
  36073. }, get password() {
  36074. return password;
  36075. }, get showAuthModal() {
  36076. return showAuthModal;
  36077. }, get closeAuthModal() {
  36078. return closeAuthModal;
  36079. }, get getSmsCode() {
  36080. return getSmsCode;
  36081. }, get getSmsTimer() {
  36082. return getSmsTimer;
  36083. }, get UserApi() {
  36084. return UserApi;
  36085. } };
  36086. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  36087. return __returned__;
  36088. }
  36089. };
  36090. function _sfc_render$30(_ctx, _cache, $props, $setup, $data, $options) {
  36091. const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l);
  36092. const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9);
  36093. const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7);
  36094. return vue.openBlock(), vue.createElementBlock("view", null, [
  36095. vue.createCommentVNode(" 标题栏 "),
  36096. vue.createElementVNode("view", { class: "head-box ss-m-b-60" }, [
  36097. vue.createElementVNode("view", { class: "head-title ss-m-b-20" }, "重置密码"),
  36098. vue.createElementVNode("view", { class: "head-subtitle" }, "为了您的账号安全,设置密码前请先进行安全验证")
  36099. ]),
  36100. vue.createCommentVNode(" 表单项 "),
  36101. vue.createVNode(_component_uni_forms, {
  36102. ref: "resetPasswordRef",
  36103. modelValue: $setup.state.model,
  36104. "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.state.model = $event),
  36105. rules: $setup.state.rules,
  36106. validateTrigger: "bind",
  36107. labelWidth: "140",
  36108. labelAlign: "center"
  36109. }, {
  36110. default: vue.withCtx(() => [
  36111. vue.createVNode(_component_uni_forms_item, {
  36112. name: "mobile",
  36113. label: "手机号"
  36114. }, {
  36115. default: vue.withCtx(() => [
  36116. vue.createVNode(_component_uni_easyinput, {
  36117. placeholder: "请输入手机号",
  36118. modelValue: $setup.state.model.mobile,
  36119. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.model.mobile = $event),
  36120. type: "number",
  36121. inputBorder: false
  36122. }, {
  36123. right: vue.withCtx(() => [
  36124. vue.createElementVNode("button", {
  36125. class: vue.normalizeClass(["ss-reset-button code-btn code-btn-start", { "code-btn-end": $setup.state.isMobileEnd }]),
  36126. disabled: $setup.state.isMobileEnd,
  36127. onClick: _cache[0] || (_cache[0] = ($event) => $setup.getSmsCode("resetPassword", $setup.state.model.mobile))
  36128. }, vue.toDisplayString($setup.getSmsTimer("resetPassword")), 11, ["disabled"])
  36129. ]),
  36130. _: 1
  36131. /* STABLE */
  36132. }, 8, ["modelValue"])
  36133. ]),
  36134. _: 1
  36135. /* STABLE */
  36136. }),
  36137. vue.createVNode(_component_uni_forms_item, {
  36138. name: "code",
  36139. label: "验证码"
  36140. }, {
  36141. default: vue.withCtx(() => [
  36142. vue.createVNode(_component_uni_easyinput, {
  36143. placeholder: "请输入验证码",
  36144. modelValue: $setup.state.model.code,
  36145. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.model.code = $event),
  36146. type: "number",
  36147. maxlength: "4",
  36148. inputBorder: false
  36149. }, null, 8, ["modelValue"])
  36150. ]),
  36151. _: 1
  36152. /* STABLE */
  36153. }),
  36154. vue.createVNode(_component_uni_forms_item, {
  36155. name: "password",
  36156. label: "密码"
  36157. }, {
  36158. default: vue.withCtx(() => [
  36159. vue.createVNode(_component_uni_easyinput, {
  36160. type: "password",
  36161. placeholder: "请输入密码",
  36162. modelValue: $setup.state.model.password,
  36163. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.state.model.password = $event),
  36164. inputBorder: false
  36165. }, {
  36166. right: vue.withCtx(() => [
  36167. vue.createElementVNode("button", {
  36168. class: "ss-reset-button login-btn-start",
  36169. onClick: $setup.resetPasswordSubmit
  36170. }, " 确认 ")
  36171. ]),
  36172. _: 1
  36173. /* STABLE */
  36174. }, 8, ["modelValue"])
  36175. ]),
  36176. _: 1
  36177. /* STABLE */
  36178. })
  36179. ]),
  36180. _: 1
  36181. /* STABLE */
  36182. }, 8, ["modelValue", "rules"]),
  36183. !$setup.isLogin ? (vue.openBlock(), vue.createElementBlock("button", {
  36184. key: 0,
  36185. class: "ss-reset-button type-btn",
  36186. onClick: _cache[5] || (_cache[5] = ($event) => $setup.showAuthModal("accountLogin"))
  36187. }, " 返回登录 ")) : vue.createCommentVNode("v-if", true)
  36188. ]);
  36189. }
  36190. const resetPassword = /* @__PURE__ */ _export_sfc(_sfc_main$31, [["render", _sfc_render$30], ["__scopeId", "data-v-859b5179"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-auth-modal/components/reset-password.vue"]]);
  36191. const _sfc_main$30 = {
  36192. __name: "change-mobile",
  36193. setup(__props, { expose: __expose }) {
  36194. __expose();
  36195. const step = vue.ref(0);
  36196. const changeMobileRef = vue.ref(null);
  36197. const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo);
  36198. const state = vue.reactive({
  36199. isMobileEnd: false,
  36200. // 手机号输入完毕
  36201. model: {
  36202. oldMobile: "",
  36203. oldCode: "",
  36204. mobile: "",
  36205. // 手机号
  36206. code: ""
  36207. // 验证码
  36208. },
  36209. rules: {
  36210. code,
  36211. mobile
  36212. }
  36213. });
  36214. async function nextStep() {
  36215. const validate = await vue.unref(changeMobileRef).validate().catch((error2) => {
  36216. formatAppLog("log", "at sheep/components/s-auth-modal/components/change-mobile.vue:113", "error: ", error2);
  36217. });
  36218. if (!validate) {
  36219. return;
  36220. }
  36221. const {
  36222. code: code2,
  36223. data
  36224. } = await AuthUtil.validatePhone(state.model.oldMobile, state.model.oldCode, 2);
  36225. formatAppLog("log", "at sheep/components/s-auth-modal/components/change-mobile.vue:122", "下一步的请求校验", data);
  36226. if (data) {
  36227. step.value = 1;
  36228. }
  36229. }
  36230. async function changeMobileSubmit() {
  36231. const validate = await vue.unref(changeMobileRef).validate().catch((error2) => {
  36232. formatAppLog("log", "at sheep/components/s-auth-modal/components/change-mobile.vue:133", "error: ", error2);
  36233. });
  36234. if (!validate) {
  36235. return;
  36236. }
  36237. const {
  36238. code: code2
  36239. } = await UserApi.updateUserMobile({ "mobile": state.model.mobile, "code": state.model.code });
  36240. if (code2 !== 0) {
  36241. return;
  36242. }
  36243. uni.showToast({
  36244. icon: "success",
  36245. title: t$6("account.login_again")
  36246. });
  36247. setTimeout(function() {
  36248. sheep$1.$store("user").logout();
  36249. closeAuthModal();
  36250. sheep$1.$router.go("/pages/index/user");
  36251. }, 1e3);
  36252. }
  36253. async function getPhoneNumber(e2) {
  36254. if (e2.detail.errMsg !== "getPhoneNumber:ok") {
  36255. return;
  36256. }
  36257. const result2 = await sheep$1.$platform.useProvider().bindUserPhoneNumber(e2.detail);
  36258. if (result2) {
  36259. sheep$1.$store("user").getInfo();
  36260. closeAuthModal();
  36261. }
  36262. }
  36263. const __returned__ = { step, changeMobileRef, userInfo: userInfo2, state, nextStep, changeMobileSubmit, getPhoneNumber, computed: vue.computed, ref: vue.ref, reactive: vue.reactive, unref: vue.unref, get sheep() {
  36264. return sheep$1;
  36265. }, get code() {
  36266. return code;
  36267. }, get mobile() {
  36268. return mobile;
  36269. }, get closeAuthModal() {
  36270. return closeAuthModal;
  36271. }, get getSmsCode() {
  36272. return getSmsCode;
  36273. }, get getSmsTimer() {
  36274. return getSmsTimer;
  36275. }, get UserApi() {
  36276. return UserApi;
  36277. }, get AuthUtil() {
  36278. return AuthUtil;
  36279. }, get t() {
  36280. return t$6;
  36281. } };
  36282. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  36283. return __returned__;
  36284. }
  36285. };
  36286. function _sfc_render$2$(_ctx, _cache, $props, $setup, $data, $options) {
  36287. const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l);
  36288. const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9);
  36289. const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7);
  36290. return vue.openBlock(), vue.createElementBlock("view", null, [
  36291. vue.createCommentVNode(" 标题栏 "),
  36292. vue.createElementVNode("view", { class: "head-box ss-m-b-60" }, [
  36293. vue.createElementVNode(
  36294. "view",
  36295. { class: "head-title ss-m-b-20" },
  36296. vue.toDisplayString($setup.userInfo.mobile ? $setup.t("account.change_phone_number") : $setup.t("account.bind_phone_number")),
  36297. 1
  36298. /* TEXT */
  36299. ),
  36300. vue.createElementVNode(
  36301. "view",
  36302. { class: "head-subtitle" },
  36303. vue.toDisplayString($setup.t("account.security_notice")),
  36304. 1
  36305. /* TEXT */
  36306. )
  36307. ]),
  36308. vue.createCommentVNode(" 表单项 "),
  36309. !$setup.step ? (vue.openBlock(), vue.createBlock(_component_uni_forms, {
  36310. key: 0,
  36311. ref: "changeMobileRef",
  36312. modelValue: $setup.state.model,
  36313. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.state.model = $event),
  36314. rules: $setup.state.rules,
  36315. validateTrigger: "bind",
  36316. labelWidth: "140",
  36317. labelAlign: "center"
  36318. }, {
  36319. default: vue.withCtx(() => [
  36320. vue.createVNode(_component_uni_forms_item, {
  36321. name: "mobile",
  36322. label: $setup.t("account.old_phone_number")
  36323. }, {
  36324. default: vue.withCtx(() => [
  36325. vue.createVNode(_component_uni_easyinput, {
  36326. placeholder: $setup.t("account.enter_old_phone_number"),
  36327. modelValue: $setup.state.model.oldMobile,
  36328. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.model.oldMobile = $event),
  36329. inputBorder: false,
  36330. type: "number"
  36331. }, {
  36332. right: vue.withCtx(() => [
  36333. vue.createElementVNode("button", {
  36334. class: vue.normalizeClass(["ss-reset-button code-btn-start", { "code-btn-end": $setup.state.isMobileEnd }]),
  36335. disabled: $setup.state.isMobileEnd,
  36336. onClick: _cache[0] || (_cache[0] = ($event) => $setup.getSmsCode("changeMobileOld", $setup.state.model.oldMobile))
  36337. }, vue.toDisplayString($setup.getSmsTimer("changeMobileOld")), 11, ["disabled"])
  36338. ]),
  36339. _: 1
  36340. /* STABLE */
  36341. }, 8, ["placeholder", "modelValue"])
  36342. ]),
  36343. _: 1
  36344. /* STABLE */
  36345. }, 8, ["label"]),
  36346. vue.createVNode(_component_uni_forms_item, {
  36347. name: "code",
  36348. label: $setup.t("account.verification_code")
  36349. }, {
  36350. default: vue.withCtx(() => [
  36351. vue.createVNode(_component_uni_easyinput, {
  36352. placeholder: $setup.t("account.enter_verification_code"),
  36353. modelValue: $setup.state.model.oldCode,
  36354. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.model.oldCode = $event),
  36355. inputBorder: false,
  36356. type: "number",
  36357. maxlength: "4"
  36358. }, null, 8, ["placeholder", "modelValue"])
  36359. ]),
  36360. _: 1
  36361. /* STABLE */
  36362. }, 8, ["label"]),
  36363. vue.createElementVNode(
  36364. "button",
  36365. {
  36366. class: "ss-reset-button login-btn-start",
  36367. onClick: $setup.nextStep
  36368. },
  36369. vue.toDisplayString($setup.t("common.next")),
  36370. 1
  36371. /* TEXT */
  36372. )
  36373. ]),
  36374. _: 1
  36375. /* STABLE */
  36376. }, 8, ["modelValue", "rules"])) : (vue.openBlock(), vue.createBlock(_component_uni_forms, {
  36377. key: 1,
  36378. ref: "changeMobileRef",
  36379. modelValue: $setup.state.model,
  36380. "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $setup.state.model = $event),
  36381. rules: $setup.state.rules,
  36382. validateTrigger: "bind",
  36383. labelWidth: "140",
  36384. labelAlign: "center"
  36385. }, {
  36386. default: vue.withCtx(() => [
  36387. vue.createVNode(_component_uni_forms_item, {
  36388. name: "mobile",
  36389. label: $setup.t("account.new_phone_number")
  36390. }, {
  36391. default: vue.withCtx(() => [
  36392. vue.createVNode(_component_uni_easyinput, {
  36393. placeholder: $setup.t("account.enter_new_phone_number"),
  36394. modelValue: $setup.state.model.mobile,
  36395. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $setup.state.model.mobile = $event),
  36396. inputBorder: false,
  36397. type: "number"
  36398. }, {
  36399. right: vue.withCtx(() => [
  36400. vue.createElementVNode("button", {
  36401. class: vue.normalizeClass(["ss-reset-button code-btn-start", { "code-btn-end": $setup.state.isMobileEnd }]),
  36402. disabled: $setup.state.isMobileEnd,
  36403. onClick: _cache[4] || (_cache[4] = ($event) => $setup.getSmsCode("changeMobileNew", $setup.state.model.mobile))
  36404. }, vue.toDisplayString($setup.getSmsTimer("changeMobileNew")), 11, ["disabled"])
  36405. ]),
  36406. _: 1
  36407. /* STABLE */
  36408. }, 8, ["placeholder", "modelValue"])
  36409. ]),
  36410. _: 1
  36411. /* STABLE */
  36412. }, 8, ["label"]),
  36413. vue.createVNode(_component_uni_forms_item, {
  36414. name: "code",
  36415. label: $setup.t("account.verification_code")
  36416. }, {
  36417. default: vue.withCtx(() => [
  36418. vue.createVNode(_component_uni_easyinput, {
  36419. placeholder: $setup.t("account.enter_verification_code"),
  36420. modelValue: $setup.state.model.code,
  36421. "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $setup.state.model.code = $event),
  36422. inputBorder: false,
  36423. type: "number",
  36424. maxlength: "4"
  36425. }, null, 8, ["placeholder", "modelValue"])
  36426. ]),
  36427. _: 1
  36428. /* STABLE */
  36429. }, 8, ["label"]),
  36430. vue.createElementVNode(
  36431. "button",
  36432. {
  36433. class: "ss-reset-button login-btn-start",
  36434. onClick: $setup.changeMobileSubmit
  36435. },
  36436. vue.toDisplayString($setup.t("common.confirm")),
  36437. 1
  36438. /* TEXT */
  36439. )
  36440. ]),
  36441. _: 1
  36442. /* STABLE */
  36443. }, 8, ["modelValue", "rules"])),
  36444. vue.createCommentVNode(" 微信独有:读取手机号 "),
  36445. vue.createCommentVNode(` <button
  36446. v-if="'WechatMiniProgram' === sheep.$platform.name"
  36447. class="ss-reset-button type-btn"
  36448. open-type="getPhoneNumber"
  36449. @getphonenumber="getPhoneNumber"
  36450. >
  36451. 使用微信手机号
  36452. </button> `)
  36453. ]);
  36454. }
  36455. const changeMobile = /* @__PURE__ */ _export_sfc(_sfc_main$30, [["render", _sfc_render$2$], ["__scopeId", "data-v-146b49fd"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-auth-modal/components/change-mobile.vue"]]);
  36456. const _sfc_main$2$ = {
  36457. __name: "change-password",
  36458. setup(__props, { expose: __expose }) {
  36459. __expose();
  36460. const changePasswordRef = vue.ref(null);
  36461. const state = vue.reactive({
  36462. isMobileEnd: false,
  36463. // 手机号输入完毕
  36464. model: {
  36465. mobile: "",
  36466. // 手机号
  36467. code: "",
  36468. // 验证码
  36469. password: ""
  36470. // 密码
  36471. },
  36472. rules: {
  36473. code,
  36474. password
  36475. }
  36476. });
  36477. async function changePasswordSubmit() {
  36478. if (!/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]+\S{5,12}$/.test(state.model.password)) {
  36479. uni.showToast({
  36480. icon: "error",
  36481. title: t$6("account.password_requirements")
  36482. });
  36483. }
  36484. const validate = await vue.unref(changePasswordRef).validate().catch((error2) => {
  36485. formatAppLog("log", "at sheep/components/s-auth-modal/components/change-password.vue:90", "error: ", error2);
  36486. });
  36487. if (!validate) {
  36488. return;
  36489. }
  36490. const {
  36491. code: code2
  36492. } = await UserApi.updateUserPassword(state.model);
  36493. if (code2 !== 0) {
  36494. return;
  36495. }
  36496. uni.showToast({
  36497. icon: "success",
  36498. title: t$6("account.modification_successful")
  36499. });
  36500. setTimeout(function() {
  36501. closeAuthModal();
  36502. }, 1e3);
  36503. }
  36504. const __returned__ = { changePasswordRef, state, changePasswordSubmit, get sheep() {
  36505. return sheep$1;
  36506. }, ref: vue.ref, reactive: vue.reactive, unref: vue.unref, get code() {
  36507. return code;
  36508. }, get password() {
  36509. return password;
  36510. }, get closeAuthModal() {
  36511. return closeAuthModal;
  36512. }, get getSmsCode() {
  36513. return getSmsCode;
  36514. }, get getSmsTimer() {
  36515. return getSmsTimer;
  36516. }, get UserApi() {
  36517. return UserApi;
  36518. }, get t() {
  36519. return t$6;
  36520. } };
  36521. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  36522. return __returned__;
  36523. }
  36524. };
  36525. function _sfc_render$2_(_ctx, _cache, $props, $setup, $data, $options) {
  36526. const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l);
  36527. const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9);
  36528. const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7);
  36529. return vue.openBlock(), vue.createElementBlock("view", null, [
  36530. vue.createCommentVNode(" 标题栏 "),
  36531. vue.createElementVNode("view", { class: "head-box ss-m-b-60" }, [
  36532. vue.createElementVNode(
  36533. "view",
  36534. { class: "head-title ss-m-b-20" },
  36535. vue.toDisplayString($setup.t("account.change_password")),
  36536. 1
  36537. /* TEXT */
  36538. ),
  36539. vue.createCommentVNode(' <view class="head-subtitle">如密码丢失或未设置,请点击忘记密码重新设置</view> ')
  36540. ]),
  36541. vue.createCommentVNode(" 表单项 "),
  36542. vue.createVNode(_component_uni_forms, {
  36543. ref: "changePasswordRef",
  36544. modelValue: $setup.state.model,
  36545. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.state.model = $event),
  36546. rules: $setup.state.rules,
  36547. validateTrigger: "bind",
  36548. labelWidth: "140",
  36549. labelAlign: "center"
  36550. }, {
  36551. default: vue.withCtx(() => [
  36552. vue.createVNode(_component_uni_forms_item, {
  36553. name: "code",
  36554. label: $setup.t("account.verification_code")
  36555. }, {
  36556. default: vue.withCtx(() => [
  36557. vue.createVNode(_component_uni_easyinput, {
  36558. placeholder: $setup.t("account.enter_verification_code"),
  36559. modelValue: $setup.state.model.code,
  36560. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.model.code = $event),
  36561. type: "number",
  36562. maxlength: "4",
  36563. inputBorder: false
  36564. }, {
  36565. right: vue.withCtx(() => [
  36566. vue.createElementVNode("button", {
  36567. class: vue.normalizeClass(["ss-reset-button code-btn code-btn-start", { "code-btn-end": $setup.state.isMobileEnd }]),
  36568. disabled: $setup.state.isMobileEnd,
  36569. onClick: _cache[0] || (_cache[0] = ($event) => $setup.getSmsCode("changePassword"))
  36570. }, vue.toDisplayString($setup.getSmsTimer("changePassword")), 11, ["disabled"])
  36571. ]),
  36572. _: 1
  36573. /* STABLE */
  36574. }, 8, ["placeholder", "modelValue"])
  36575. ]),
  36576. _: 1
  36577. /* STABLE */
  36578. }, 8, ["label"]),
  36579. vue.createVNode(_component_uni_forms_item, {
  36580. name: "reNewPassword",
  36581. label: $setup.t("account.password")
  36582. }, {
  36583. default: vue.withCtx(() => [
  36584. vue.createVNode(_component_uni_easyinput, {
  36585. type: "password",
  36586. placeholder: $setup.t("account.enter_password"),
  36587. modelValue: $setup.state.model.password,
  36588. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.model.password = $event),
  36589. inputBorder: false
  36590. }, {
  36591. right: vue.withCtx(() => [
  36592. vue.createElementVNode(
  36593. "button",
  36594. {
  36595. class: "ss-reset-button login-btn-start",
  36596. onClick: $setup.changePasswordSubmit
  36597. },
  36598. vue.toDisplayString($setup.t("common.confirm")),
  36599. 1
  36600. /* TEXT */
  36601. )
  36602. ]),
  36603. _: 1
  36604. /* STABLE */
  36605. }, 8, ["placeholder", "modelValue"])
  36606. ]),
  36607. _: 1
  36608. /* STABLE */
  36609. }, 8, ["label"])
  36610. ]),
  36611. _: 1
  36612. /* STABLE */
  36613. }, 8, ["modelValue", "rules"]),
  36614. vue.createElementVNode(
  36615. "button",
  36616. {
  36617. class: "ss-reset-button type-btn",
  36618. onClick: _cache[4] || (_cache[4] = (...args) => $setup.closeAuthModal && $setup.closeAuthModal(...args))
  36619. },
  36620. vue.toDisplayString($setup.t("account.cancel_change")),
  36621. 1
  36622. /* TEXT */
  36623. )
  36624. ]);
  36625. }
  36626. const changePassword = /* @__PURE__ */ _export_sfc(_sfc_main$2$, [["render", _sfc_render$2_], ["__scopeId", "data-v-639aa0c2"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-auth-modal/components/change-password.vue"]]);
  36627. const _sfc_main$2_ = {
  36628. __name: "mp-authorization",
  36629. props: {
  36630. agreeStatus: {
  36631. type: Boolean,
  36632. default: false
  36633. }
  36634. },
  36635. setup(__props, { expose: __expose }) {
  36636. __expose();
  36637. const props = __props;
  36638. const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo);
  36639. const accountLoginRef = vue.ref(null);
  36640. const state = vue.reactive({
  36641. model: {
  36642. nickname: userInfo2.value.nickname,
  36643. avatar: userInfo2.value.avatar
  36644. },
  36645. rules: {},
  36646. disabledStyle: {
  36647. color: "#999",
  36648. disableColor: "#fff"
  36649. }
  36650. });
  36651. function onChooseAvatar(e2) {
  36652. const tempUrl = e2.detail.avatarUrl || "";
  36653. uploadAvatar(tempUrl);
  36654. }
  36655. async function uploadAvatar(tempUrl) {
  36656. if (!tempUrl) {
  36657. return;
  36658. }
  36659. let { data } = await FileApi.uploadFile(tempUrl);
  36660. state.model.avatar = data;
  36661. }
  36662. async function onConfirm() {
  36663. const { model } = state;
  36664. const { nickname, avatar } = model;
  36665. if (!nickname) {
  36666. sheep$1.$helper.toast(t$6("account.select_avatar"));
  36667. return;
  36668. }
  36669. if (!avatar) {
  36670. sheep$1.$helper.toast(t$6("account.enter_nickname"));
  36671. return;
  36672. }
  36673. const { code: code2 } = await UserApi.updateUser({
  36674. avatar: state.model.avatar,
  36675. nickname: state.model.nickname
  36676. });
  36677. if (code2 === 0) {
  36678. sheep$1.$helper.toast(t$6("account.authorization_successful"));
  36679. await sheep$1.$store("user").getInfo();
  36680. closeAuthModal();
  36681. }
  36682. }
  36683. const __returned__ = { props, userInfo: userInfo2, accountLoginRef, state, onChooseAvatar, uploadAvatar, onConfirm, computed: vue.computed, ref: vue.ref, reactive: vue.reactive, get sheep() {
  36684. return sheep$1;
  36685. }, get closeAuthModal() {
  36686. return closeAuthModal;
  36687. }, get FileApi() {
  36688. return FileApi;
  36689. }, get UserApi() {
  36690. return UserApi;
  36691. }, get t() {
  36692. return t$6;
  36693. } };
  36694. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  36695. return __returned__;
  36696. }
  36697. };
  36698. function _sfc_render$2Z(_ctx, _cache, $props, $setup, $data, $options) {
  36699. const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9);
  36700. const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l);
  36701. const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7);
  36702. return vue.openBlock(), vue.createElementBlock("view", null, [
  36703. vue.createCommentVNode(" 标题栏 "),
  36704. vue.createElementVNode("view", { class: "head-box ss-m-b-60 ss-flex-col" }, [
  36705. vue.createElementVNode("view", { class: "ss-flex ss-m-b-20" }, [
  36706. vue.createElementVNode(
  36707. "view",
  36708. { class: "head-title ss-m-r-40 head-title-animation" },
  36709. vue.toDisplayString($setup.t("account.authorization_info")),
  36710. 1
  36711. /* TEXT */
  36712. )
  36713. ]),
  36714. vue.createElementVNode(
  36715. "view",
  36716. { class: "head-subtitle" },
  36717. vue.toDisplayString($setup.t("account.complete_profile")),
  36718. 1
  36719. /* TEXT */
  36720. )
  36721. ]),
  36722. vue.createCommentVNode(" 表单项 "),
  36723. vue.createVNode(_component_uni_forms, {
  36724. ref: "accountLoginRef",
  36725. modelValue: $setup.state.model,
  36726. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.model = $event),
  36727. rules: $setup.state.rules,
  36728. validateTrigger: "bind",
  36729. labelWidth: "140",
  36730. labelAlign: "center"
  36731. }, {
  36732. default: vue.withCtx(() => [
  36733. vue.createCommentVNode(" 获取头像昵称:https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/userProfile.html "),
  36734. vue.createVNode(_component_uni_forms_item, {
  36735. name: "avatar",
  36736. label: $setup.t("account.avatar")
  36737. }, {
  36738. default: vue.withCtx(() => [
  36739. vue.createElementVNode(
  36740. "button",
  36741. {
  36742. class: "ss-reset-button avatar-btn",
  36743. "open-type": "chooseAvatar",
  36744. onChooseavatar: $setup.onChooseAvatar
  36745. },
  36746. [
  36747. vue.createElementVNode("image", {
  36748. class: "avatar-img",
  36749. src: $setup.sheep.$url.cdn($setup.state.model.avatar),
  36750. mode: "aspectFill",
  36751. onClick: _cache[0] || (_cache[0] = ($event) => $setup.sheep.$router.go("/pages/user/info"))
  36752. }, null, 8, ["src"]),
  36753. vue.createElementVNode("text", { class: "cicon-forward" })
  36754. ],
  36755. 32
  36756. /* NEED_HYDRATION */
  36757. )
  36758. ]),
  36759. _: 1
  36760. /* STABLE */
  36761. }, 8, ["label"]),
  36762. vue.createVNode(_component_uni_forms_item, {
  36763. name: "nickname",
  36764. label: $setup.t("account.nickname")
  36765. }, {
  36766. default: vue.withCtx(() => [
  36767. vue.createVNode(_component_uni_easyinput, {
  36768. type: "nickname",
  36769. placeholder: $setup.t("account.enter_nickname"),
  36770. modelValue: $setup.state.model.nickname,
  36771. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.model.nickname = $event),
  36772. inputBorder: false
  36773. }, null, 8, ["placeholder", "modelValue"])
  36774. ]),
  36775. _: 1
  36776. /* STABLE */
  36777. }, 8, ["label"]),
  36778. vue.createElementVNode("view", { class: "foot-box" }, [
  36779. vue.createElementVNode(
  36780. "button",
  36781. {
  36782. class: "ss-reset-button authorization-btn",
  36783. onClick: $setup.onConfirm
  36784. },
  36785. vue.toDisplayString($setup.t("account.confirm_authorization")),
  36786. 1
  36787. /* TEXT */
  36788. )
  36789. ])
  36790. ]),
  36791. _: 1
  36792. /* STABLE */
  36793. }, 8, ["modelValue", "rules"])
  36794. ]);
  36795. }
  36796. const mpAuthorization = /* @__PURE__ */ _export_sfc(_sfc_main$2_, [["render", _sfc_render$2Z], ["__scopeId", "data-v-bf1cb4c0"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-auth-modal/components/mp-authorization.vue"]]);
  36797. const _sfc_main$2Z = {
  36798. __name: "officialAccountFirstLogin",
  36799. emits: ["onConfirm"],
  36800. setup(__props, { expose: __expose, emit: __emit }) {
  36801. __expose();
  36802. const smsLoginRef = vue.ref(null);
  36803. const emits = __emit;
  36804. const state = vue.reactive({
  36805. isMobileEnd: false,
  36806. // 手机号输入完毕
  36807. codeText: "获取验证码",
  36808. model: {
  36809. mobile: "",
  36810. // 手机号
  36811. code: ""
  36812. // 验证码
  36813. },
  36814. rules: {
  36815. code,
  36816. mobile
  36817. }
  36818. });
  36819. async function OfficialEnterLogin() {
  36820. const validate = await vue.unref(smsLoginRef).validate().catch((error2) => {
  36821. formatAppLog("log", "at sheep/components/s-auth-modal/components/officialAccountFirstLogin.vue:85", "error: ", error2);
  36822. });
  36823. if (!validate) {
  36824. return;
  36825. }
  36826. const {
  36827. code: code2
  36828. } = await AuthUtil.smsLogin(state.model);
  36829. if (code2 === 0) {
  36830. closeAuthModal();
  36831. }
  36832. }
  36833. const __returned__ = { smsLoginRef, emits, state, OfficialEnterLogin, ref: vue.ref, reactive: vue.reactive, unref: vue.unref, computed: vue.computed, get sheep() {
  36834. return sheep$1;
  36835. }, get code() {
  36836. return code;
  36837. }, get mobile() {
  36838. return mobile;
  36839. }, get showAuthModal() {
  36840. return showAuthModal;
  36841. }, get closeAuthModal() {
  36842. return closeAuthModal;
  36843. }, get getSmsCode() {
  36844. return getSmsCode;
  36845. }, get getSmsTimer() {
  36846. return getSmsTimer;
  36847. }, get AuthUtil() {
  36848. return AuthUtil;
  36849. }, get t() {
  36850. return t$6;
  36851. } };
  36852. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  36853. return __returned__;
  36854. }
  36855. };
  36856. function _sfc_render$2Y(_ctx, _cache, $props, $setup, $data, $options) {
  36857. const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l);
  36858. const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9);
  36859. const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7);
  36860. return vue.openBlock(), vue.createElementBlock("view", null, [
  36861. vue.createElementVNode("view", { class: "head-box" }, [
  36862. vue.createElementVNode("view", { class: "ss-flex ss-m-b-20" }, [
  36863. vue.createElementVNode(
  36864. "view",
  36865. { class: "isActive head-title" },
  36866. vue.toDisplayString($setup.t("account.first_time_login")),
  36867. 1
  36868. /* TEXT */
  36869. )
  36870. ])
  36871. ]),
  36872. vue.createCommentVNode(" 表单项 "),
  36873. vue.createVNode(_component_uni_forms, {
  36874. ref: "smsLoginRef",
  36875. modelValue: $setup.state.model,
  36876. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.state.model = $event),
  36877. rules: $setup.state.rules,
  36878. validateTrigger: "bind",
  36879. labelWidth: "140",
  36880. labelAlign: "center",
  36881. class: "loginUniForm"
  36882. }, {
  36883. default: vue.withCtx(() => [
  36884. vue.createVNode(_component_uni_forms_item, {
  36885. name: "mobile",
  36886. label: $setup.t("account.phone_number"),
  36887. class: "loginUniFormItem"
  36888. }, {
  36889. default: vue.withCtx(() => [
  36890. vue.createVNode(_component_uni_easyinput, {
  36891. placeholder: $setup.t("account.enter_phone_number"),
  36892. modelValue: $setup.state.model.mobile,
  36893. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.model.mobile = $event),
  36894. inputBorder: false,
  36895. type: "number"
  36896. }, {
  36897. right: vue.withCtx(() => [
  36898. vue.createElementVNode("button", {
  36899. class: vue.normalizeClass(["ss-reset-button code-btn code-btn-start", { "code-btn-end": $setup.state.isMobileEnd }]),
  36900. disabled: $setup.state.isMobileEnd,
  36901. onClick: _cache[0] || (_cache[0] = ($event) => $setup.getSmsCode("smsLogin", $setup.state.model.mobile))
  36902. }, vue.toDisplayString($setup.getSmsTimer("smsLogin")), 11, ["disabled"])
  36903. ]),
  36904. _: 1
  36905. /* STABLE */
  36906. }, 8, ["placeholder", "modelValue"])
  36907. ]),
  36908. _: 1
  36909. /* STABLE */
  36910. }, 8, ["label"]),
  36911. vue.createVNode(_component_uni_forms_item, {
  36912. name: "code",
  36913. label: $setup.t("account.verification_code"),
  36914. class: "loginUniFormItem"
  36915. }, {
  36916. default: vue.withCtx(() => [
  36917. vue.createVNode(_component_uni_easyinput, {
  36918. placeholder: $setup.t("account.enter_verification_code"),
  36919. modelValue: $setup.state.model.code,
  36920. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.model.code = $event),
  36921. inputBorder: false,
  36922. type: "number",
  36923. maxlength: "4"
  36924. }, null, 8, ["placeholder", "modelValue"])
  36925. ]),
  36926. _: 1
  36927. /* STABLE */
  36928. }, 8, ["label"])
  36929. ]),
  36930. _: 1
  36931. /* STABLE */
  36932. }, 8, ["modelValue", "rules"]),
  36933. vue.createElementVNode("view", { style: { "display": "flex", "justify-content": "space-between", "margin-top": "20rpx" } }, [
  36934. vue.createElementVNode(
  36935. "button",
  36936. {
  36937. class: "ss-reset-button login-btn-start",
  36938. onClick: $setup.OfficialEnterLogin
  36939. },
  36940. vue.toDisplayString($setup.t("account.continue_login")),
  36941. 1
  36942. /* TEXT */
  36943. )
  36944. ])
  36945. ]);
  36946. }
  36947. const officialAccountFirstLogin = /* @__PURE__ */ _export_sfc(_sfc_main$2Z, [["render", _sfc_render$2Y], ["__scopeId", "data-v-4de4e8c0"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-auth-modal/components/officialAccountFirstLogin.vue"]]);
  36948. const _sfc_main$2Y = {
  36949. __name: "alipay-account",
  36950. props: {
  36951. agreeStatus: {
  36952. type: Boolean,
  36953. default: false
  36954. }
  36955. },
  36956. emits: ["onConfirm"],
  36957. setup(__props, { expose: __expose, emit: __emit }) {
  36958. __expose();
  36959. const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo);
  36960. const alipayAccountRef = vue.ref(null);
  36961. const emits = __emit;
  36962. const props = __props;
  36963. const state = vue.reactive({
  36964. model: {
  36965. alipayName: "",
  36966. // 名称
  36967. alipayAccount: ""
  36968. // 账号
  36969. },
  36970. rules: {
  36971. alipayAccount: alipayAccount$1
  36972. }
  36973. });
  36974. async function submit() {
  36975. if (!state.model.alipayName || !state.model.alipayAccount) {
  36976. return false;
  36977. }
  36978. const validate = await vue.unref(alipayAccountRef).validate().catch((error2) => {
  36979. formatAppLog("log", "at sheep/components/s-auth-modal/components/alipay-account.vue:87", "error: ", error2);
  36980. });
  36981. if (!validate)
  36982. return;
  36983. const {
  36984. code: code2
  36985. } = await UserApi.updateUserAlipayAccount({
  36986. alipayName: state.model.alipayName,
  36987. alipayAccount: state.model.alipayAccount
  36988. });
  36989. if (code2 === 0) {
  36990. uni.showToast({
  36991. icon: "success",
  36992. title: t$6("account.change_password")
  36993. });
  36994. closeAuthModal();
  36995. uni.$emit("alipayAccountChangeComplete");
  36996. }
  36997. }
  36998. onLoad(async (options2) => {
  36999. state.model.alipayName = userInfo2.value.alipayName;
  37000. state.model.alipayAccount = userInfo2.value.alipayAccount;
  37001. });
  37002. const __returned__ = { userInfo: userInfo2, alipayAccountRef, emits, props, state, submit, ref: vue.ref, reactive: vue.reactive, unref: vue.unref, computed: vue.computed, get sheep() {
  37003. return sheep$1;
  37004. }, get alipayAccount() {
  37005. return alipayAccount$1;
  37006. }, get showAuthModal() {
  37007. return showAuthModal;
  37008. }, get closeAuthModal() {
  37009. return closeAuthModal;
  37010. }, get AuthUtil() {
  37011. return AuthUtil;
  37012. }, get UserApi() {
  37013. return UserApi;
  37014. }, get onLoad() {
  37015. return onLoad;
  37016. }, get t() {
  37017. return t$6;
  37018. } };
  37019. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  37020. return __returned__;
  37021. }
  37022. };
  37023. function _sfc_render$2X(_ctx, _cache, $props, $setup, $data, $options) {
  37024. const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l);
  37025. const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9);
  37026. const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7);
  37027. return vue.openBlock(), vue.createElementBlock("view", null, [
  37028. vue.createCommentVNode(" 标题栏 "),
  37029. vue.createElementVNode("view", { class: "head-box ss-m-b-60" }, [
  37030. vue.createElementVNode(
  37031. "view",
  37032. { class: "head-title ss-m-b-20" },
  37033. vue.toDisplayString($setup.userInfo.alipayName && $setup.userInfo.alipayAccount ? $setup.t("account.change_alipay_account") : $setup.t("account.bind_alipay_account")),
  37034. 1
  37035. /* TEXT */
  37036. ),
  37037. vue.createElementVNode(
  37038. "view",
  37039. { class: "head-subtitle" },
  37040. vue.toDisplayString($setup.t("account.bind_realname_alipay")),
  37041. 1
  37042. /* TEXT */
  37043. )
  37044. ]),
  37045. vue.createCommentVNode(" 表单项 "),
  37046. vue.createVNode(_component_uni_forms, {
  37047. ref: "alipayAccountRef",
  37048. modelValue: $setup.state.model,
  37049. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.model = $event),
  37050. rules: $setup.state.rules,
  37051. validateTrigger: "bind",
  37052. labelWidth: "140",
  37053. labelAlign: "center",
  37054. class: "loginUniForm"
  37055. }, {
  37056. default: vue.withCtx(() => [
  37057. vue.createVNode(_component_uni_forms_item, {
  37058. label: $setup.t("account.name"),
  37059. class: "loginUniFormItem"
  37060. }, {
  37061. default: vue.withCtx(() => [
  37062. vue.createVNode(_component_uni_easyinput, {
  37063. placeholder: $setup.t("account.enter_name"),
  37064. modelValue: $setup.state.model.alipayName,
  37065. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.state.model.alipayName = $event),
  37066. inputBorder: false
  37067. }, null, 8, ["placeholder", "modelValue"])
  37068. ]),
  37069. _: 1
  37070. /* STABLE */
  37071. }, 8, ["label"]),
  37072. vue.createVNode(_component_uni_forms_item, {
  37073. name: "alipayAccount",
  37074. label: $setup.t("account.account"),
  37075. class: "loginUniFormItem"
  37076. }, {
  37077. default: vue.withCtx(() => [
  37078. vue.createVNode(_component_uni_easyinput, {
  37079. placeholder: $setup.t("account.enter_account"),
  37080. modelValue: $setup.state.model.alipayAccount,
  37081. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.model.alipayAccount = $event),
  37082. inputBorder: false
  37083. }, null, 8, ["placeholder", "modelValue"])
  37084. ]),
  37085. _: 1
  37086. /* STABLE */
  37087. }, 8, ["label"])
  37088. ]),
  37089. _: 1
  37090. /* STABLE */
  37091. }, 8, ["modelValue", "rules"]),
  37092. vue.createElementVNode("view", { style: { "display": "flex", "justify-content": "space-between", "margin-top": "20rpx" } }, [
  37093. vue.createCommentVNode(` <button class="ss-reset-button forgot-btn" @tap="showAuthModal('resetPassword')">
  37094. 忘记密码
  37095. </button> `),
  37096. vue.createElementVNode(
  37097. "button",
  37098. {
  37099. class: "ss-reset-button login-btn-start",
  37100. onClick: $setup.submit
  37101. },
  37102. vue.toDisplayString($setup.t("common.confirm")),
  37103. 1
  37104. /* TEXT */
  37105. )
  37106. ])
  37107. ]);
  37108. }
  37109. const alipayAccount = /* @__PURE__ */ _export_sfc(_sfc_main$2Y, [["render", _sfc_render$2X], ["__scopeId", "data-v-754d55b7"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-auth-modal/components/alipay-account.vue"]]);
  37110. const _sfc_main$2X = {
  37111. __name: "bank-account",
  37112. props: {
  37113. agreeStatus: {
  37114. type: Boolean,
  37115. default: false
  37116. }
  37117. },
  37118. emits: ["onConfirm"],
  37119. setup(__props, { expose: __expose, emit: __emit }) {
  37120. __expose();
  37121. const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo);
  37122. const alipayAccountRef = vue.ref(null);
  37123. const emits = __emit;
  37124. const props = __props;
  37125. const state = vue.reactive({
  37126. model: {
  37127. accountName: "",
  37128. // 开户名
  37129. bankName: "",
  37130. // 开户行
  37131. bankAccount: ""
  37132. //银行账号
  37133. },
  37134. rules: {
  37135. bankCode
  37136. }
  37137. });
  37138. async function submit() {
  37139. if (!state.model.accountName || !state.model.bankName || !state.model.bankAccount) {
  37140. return false;
  37141. }
  37142. const validate = await vue.unref(alipayAccountRef).validate().catch((error2) => {
  37143. formatAppLog("log", "at sheep/components/s-auth-modal/components/bank-account.vue:94", "error: ", error2);
  37144. });
  37145. if (!validate)
  37146. return;
  37147. const {
  37148. code: code2
  37149. } = await UserApi.updateUserBankAccount({
  37150. accountName: state.model.accountName,
  37151. bankName: state.model.bankName,
  37152. bankAccount: state.model.bankAccount
  37153. });
  37154. if (code2 === 0) {
  37155. uni.showToast({
  37156. icon: "success",
  37157. title: t$6("account.change_password")
  37158. });
  37159. closeAuthModal();
  37160. uni.$emit("bankAccountChangeComplete");
  37161. }
  37162. }
  37163. onLoad(async (options2) => {
  37164. state.model.accountName = userInfo2.value.accountName;
  37165. state.model.bankName = userInfo2.value.bankName;
  37166. state.model.bankAccount = userInfo2.value.bankAccount;
  37167. });
  37168. const __returned__ = { userInfo: userInfo2, alipayAccountRef, emits, props, state, submit, ref: vue.ref, reactive: vue.reactive, unref: vue.unref, computed: vue.computed, get sheep() {
  37169. return sheep$1;
  37170. }, get bankCode() {
  37171. return bankCode;
  37172. }, get showAuthModal() {
  37173. return showAuthModal;
  37174. }, get closeAuthModal() {
  37175. return closeAuthModal;
  37176. }, get AuthUtil() {
  37177. return AuthUtil;
  37178. }, get UserApi() {
  37179. return UserApi;
  37180. }, get onLoad() {
  37181. return onLoad;
  37182. }, get t() {
  37183. return t$6;
  37184. } };
  37185. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  37186. return __returned__;
  37187. }
  37188. };
  37189. function _sfc_render$2W(_ctx, _cache, $props, $setup, $data, $options) {
  37190. const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l);
  37191. const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9);
  37192. const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7);
  37193. return vue.openBlock(), vue.createElementBlock("view", null, [
  37194. vue.createCommentVNode(" 标题栏 "),
  37195. vue.createElementVNode("view", { class: "head-box ss-m-b-60" }, [
  37196. vue.createElementVNode(
  37197. "view",
  37198. { class: "head-title ss-m-b-20" },
  37199. vue.toDisplayString($setup.userInfo.bankName && $setup.userInfo.accountName && $setup.userInfo.bankAccount ? $setup.t("account.change_bank_card") : $setup.t("account.bind_bank_card")),
  37200. 1
  37201. /* TEXT */
  37202. ),
  37203. vue.createCommentVNode(' <view class="head-subtitle">请绑定已实名认证的支付宝开户行</view> ')
  37204. ]),
  37205. vue.createCommentVNode(" 表单项 "),
  37206. vue.createVNode(_component_uni_forms, {
  37207. ref: "alipayAccountRef",
  37208. modelValue: $setup.state.model,
  37209. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.state.model = $event),
  37210. rules: $setup.state.rules,
  37211. validateTrigger: "bind",
  37212. labelWidth: "160",
  37213. labelAlign: "left",
  37214. class: "loginUniForm"
  37215. }, {
  37216. default: vue.withCtx(() => [
  37217. vue.createVNode(_component_uni_forms_item, {
  37218. label: $setup.t("account.bank_branch"),
  37219. class: "loginUniFormItem"
  37220. }, {
  37221. default: vue.withCtx(() => [
  37222. vue.createVNode(_component_uni_easyinput, {
  37223. placeholder: $setup.t("account.bank_branch_example"),
  37224. modelValue: $setup.state.model.bankName,
  37225. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.state.model.bankName = $event),
  37226. inputBorder: false
  37227. }, null, 8, ["placeholder", "modelValue"])
  37228. ]),
  37229. _: 1
  37230. /* STABLE */
  37231. }, 8, ["label"]),
  37232. vue.createVNode(_component_uni_forms_item, {
  37233. label: $setup.t("account.account_holder"),
  37234. class: "loginUniFormItem"
  37235. }, {
  37236. default: vue.withCtx(() => [
  37237. vue.createVNode(_component_uni_easyinput, {
  37238. placeholder: $setup.t("account.account_holder_name"),
  37239. modelValue: $setup.state.model.accountName,
  37240. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.model.accountName = $event),
  37241. inputBorder: false
  37242. }, null, 8, ["placeholder", "modelValue"])
  37243. ]),
  37244. _: 1
  37245. /* STABLE */
  37246. }, 8, ["label"]),
  37247. vue.createVNode(_component_uni_forms_item, {
  37248. label: $setup.t("account.bank_account_number"),
  37249. name: "bankCode",
  37250. class: "loginUniFormItem"
  37251. }, {
  37252. default: vue.withCtx(() => [
  37253. vue.createVNode(_component_uni_easyinput, {
  37254. placeholder: $setup.t("account.bank_account_number"),
  37255. modelValue: $setup.state.model.bankAccount,
  37256. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.model.bankAccount = $event),
  37257. inputBorder: false
  37258. }, null, 8, ["placeholder", "modelValue"])
  37259. ]),
  37260. _: 1
  37261. /* STABLE */
  37262. }, 8, ["label"])
  37263. ]),
  37264. _: 1
  37265. /* STABLE */
  37266. }, 8, ["modelValue", "rules"]),
  37267. vue.createElementVNode("view", { style: { "display": "flex", "justify-content": "space-between", "margin-top": "20rpx" } }, [
  37268. vue.createCommentVNode(` <button class="ss-reset-button forgot-btn" @tap="showAuthModal('resetPassword')">
  37269. 忘记密码
  37270. </button> `),
  37271. vue.createElementVNode(
  37272. "button",
  37273. {
  37274. class: "ss-reset-button login-btn-start",
  37275. onClick: $setup.submit
  37276. },
  37277. vue.toDisplayString($setup.t("common.confirm")),
  37278. 1
  37279. /* TEXT */
  37280. )
  37281. ])
  37282. ]);
  37283. }
  37284. const bankAccount = /* @__PURE__ */ _export_sfc(_sfc_main$2X, [["render", _sfc_render$2W], ["__scopeId", "data-v-e0d6f1a0"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-auth-modal/components/bank-account.vue"]]);
  37285. const _sfc_main$2W = {
  37286. __name: "s-auth-modal",
  37287. setup(__props, { expose: __expose }) {
  37288. __expose();
  37289. const appInfo = vue.computed(() => sheep$1.$store("app").info);
  37290. const linkId = uni.getStorageSync("linkId");
  37291. const modalStore = sheep$1.$store("modal");
  37292. const authType = vue.computed(() => modalStore.auth);
  37293. const isActive = vue.computed(() => modalStore.isActive);
  37294. const state = vue.reactive({
  37295. protocol: false
  37296. });
  37297. const currentProtocol = vue.ref(false);
  37298. function onChange() {
  37299. state.protocol = !state.protocol;
  37300. }
  37301. function onProtocol(title) {
  37302. closeAuthModal();
  37303. sheep$1.$router.go("/pages/public/richtext", {
  37304. title
  37305. });
  37306. }
  37307. function onConfirm(e2) {
  37308. currentProtocol.value = e2;
  37309. setTimeout(() => {
  37310. currentProtocol.value = false;
  37311. }, 1e3);
  37312. }
  37313. const thirdLogin = async (provider2) => {
  37314. if (!state.protocol) {
  37315. currentProtocol.value = true;
  37316. setTimeout(() => {
  37317. currentProtocol.value = false;
  37318. }, 1e3);
  37319. sheep$1.$helper.toast(t$6("account.please_agree"));
  37320. return;
  37321. }
  37322. const loginRes = await sheep$1.$platform.useProvider(provider2).login();
  37323. if (loginRes) {
  37324. closeAuthModal();
  37325. }
  37326. };
  37327. const thirdRegister = async (provider2) => {
  37328. if (!state.protocol) {
  37329. currentProtocol.value = true;
  37330. setTimeout(() => {
  37331. currentProtocol.value = false;
  37332. }, 1e3);
  37333. sheep$1.$helper.toast(t$6("account.please_agree"));
  37334. return;
  37335. }
  37336. const loginRes = await sheep$1.$platform.useProvider(provider2).register();
  37337. if (loginRes) {
  37338. closeAuthModal();
  37339. }
  37340. };
  37341. const getPhoneNumber = async (e2) => {
  37342. if (e2.detail.errMsg !== "getPhoneNumber:ok") {
  37343. sheep$1.$helper.toast(t$6("account.quick_login_failed"));
  37344. return;
  37345. }
  37346. let result2 = await sheep$1.$platform.useProvider().mobileLogin(e2.detail);
  37347. if (result2) {
  37348. closeAuthModal();
  37349. }
  37350. };
  37351. const __returned__ = { appInfo, linkId, modalStore, authType, isActive, state, currentProtocol, onChange, onProtocol, onConfirm, thirdLogin, thirdRegister, getPhoneNumber, computed: vue.computed, reactive: vue.reactive, ref: vue.ref, get sheep() {
  37352. return sheep$1;
  37353. }, accountLogin, smsLogin, register, resetPassword, changeMobile, changePassword, mpAuthorization, get officialAccountFirstLogin() {
  37354. return officialAccountFirstLogin;
  37355. }, alipayAccount, bankAccount, get closeAuthModal() {
  37356. return closeAuthModal;
  37357. }, get showAuthModal() {
  37358. return showAuthModal;
  37359. }, get wx() {
  37360. return wx$1;
  37361. }, get t() {
  37362. return t$6;
  37363. } };
  37364. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  37365. return __returned__;
  37366. }
  37367. };
  37368. function _sfc_render$2V(_ctx, _cache, $props, $setup, $data, $options) {
  37369. const _component_su_popup = resolveEasycom(vue.resolveDynamicComponent("su-popup"), __easycom_4$3);
  37370. return vue.openBlock(), vue.createElementBlock(
  37371. vue.Fragment,
  37372. null,
  37373. [
  37374. vue.createCommentVNode(" 规格弹窗 "),
  37375. vue.createVNode(_component_su_popup, {
  37376. show: $setup.authType !== "",
  37377. round: "10",
  37378. showClose: true,
  37379. onClose: $setup.closeAuthModal
  37380. }, {
  37381. default: vue.withCtx(() => [
  37382. vue.createElementVNode("view", { class: "login-wrap" }, [
  37383. vue.createCommentVNode(" 标题栏 "),
  37384. ["smsLogin", "accountLogin", "register"].includes($setup.authType) ? (vue.openBlock(), vue.createElementBlock("view", {
  37385. key: 0,
  37386. class: "head-box"
  37387. }, [
  37388. vue.createElementVNode("view", { class: "ss-flex ss-m-b-20" }, [
  37389. vue.createElementVNode(
  37390. "view",
  37391. {
  37392. class: vue.normalizeClass([$setup.isActive == "accountLogin" ? `head-title ss-m-r-40 head-title-animation` : `head-title-active ss-m-r-40`]),
  37393. onClick: _cache[0] || (_cache[0] = ($event) => {
  37394. $setup.isActive = "accountLogin";
  37395. $setup.showAuthModal("accountLogin", "accountLogin");
  37396. })
  37397. },
  37398. vue.toDisplayString($setup.t("account.account_login")),
  37399. 3
  37400. /* TEXT, CLASS */
  37401. ),
  37402. vue.createElementVNode(
  37403. "view",
  37404. {
  37405. class: vue.normalizeClass([$setup.isActive == "smsLogin" ? `head-title head-title-line head-title-animation ss-m-r-40` : ` ss-m-r-40 head-title-active head-title-line`]),
  37406. onClick: _cache[1] || (_cache[1] = ($event) => {
  37407. $setup.isActive = "smsLogin";
  37408. $setup.showAuthModal("smsLogin", "smsLogin");
  37409. })
  37410. },
  37411. vue.toDisplayString($setup.t("account.sms_login")),
  37412. 3
  37413. /* TEXT, CLASS */
  37414. ),
  37415. vue.createElementVNode(
  37416. "view",
  37417. {
  37418. class: vue.normalizeClass([$setup.isActive == "register" ? `head-title head-title-line head-title-animation` : `head-title-active head-title-line`]),
  37419. onClick: _cache[2] || (_cache[2] = ($event) => {
  37420. $setup.isActive = "register";
  37421. $setup.showAuthModal("register", "register");
  37422. })
  37423. },
  37424. [
  37425. vue.createCommentVNode(' v-if="linkId" '),
  37426. vue.createTextVNode(
  37427. " " + vue.toDisplayString($setup.t("account.register")),
  37428. 1
  37429. /* TEXT */
  37430. )
  37431. ],
  37432. 2
  37433. /* CLASS */
  37434. )
  37435. ])
  37436. ])) : vue.createCommentVNode("v-if", true),
  37437. vue.createCommentVNode(" 用户协议的勾选 "),
  37438. ["smsLogin", "accountLogin", "register"].includes($setup.authType) ? (vue.openBlock(), vue.createElementBlock(
  37439. "view",
  37440. {
  37441. key: 1,
  37442. class: vue.normalizeClass(["agreement-box ss-flex ss-row-center", { shake: $setup.currentProtocol }])
  37443. },
  37444. [
  37445. vue.createElementVNode("label", {
  37446. class: "radio ss-flex ss-col-center",
  37447. onClick: $setup.onChange
  37448. }, [
  37449. vue.createElementVNode("radio", {
  37450. checked: $setup.state.protocol,
  37451. color: "var(--ui-BG-Main)",
  37452. style: { "transform": "scale(0.8)" },
  37453. onClick: vue.withModifiers($setup.onChange, ["stop"])
  37454. }, null, 8, ["checked"]),
  37455. vue.createElementVNode("view", { class: "agreement-text ss-flex ss-col-center ss-m-l-8" }, [
  37456. vue.createTextVNode(
  37457. vue.toDisplayString($setup.t("account.read_and_agree")) + " ",
  37458. 1
  37459. /* TEXT */
  37460. ),
  37461. vue.createElementVNode(
  37462. "view",
  37463. {
  37464. class: "tcp-text",
  37465. onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $setup.onProtocol("用户协议"), ["stop"]))
  37466. },
  37467. vue.toDisplayString($setup.t("account.user_agreement")),
  37468. 1
  37469. /* TEXT */
  37470. ),
  37471. vue.createElementVNode(
  37472. "view",
  37473. { class: "agreement-text" },
  37474. vue.toDisplayString($setup.t("account.and")),
  37475. 1
  37476. /* TEXT */
  37477. ),
  37478. vue.createElementVNode(
  37479. "view",
  37480. {
  37481. class: "tcp-text",
  37482. onClick: _cache[4] || (_cache[4] = vue.withModifiers(($event) => $setup.onProtocol("隐私协议"), ["stop"]))
  37483. },
  37484. vue.toDisplayString($setup.t("account.privacy_policy")),
  37485. 1
  37486. /* TEXT */
  37487. )
  37488. ])
  37489. ])
  37490. ],
  37491. 2
  37492. /* CLASS */
  37493. )) : vue.createCommentVNode("v-if", true),
  37494. vue.createCommentVNode(" 微信公众号授权登陆 在验证码登录 账号登录中显示"),
  37495. ["accountLogin", "smsLogin"].includes($setup.authType) ? (vue.openBlock(), vue.createElementBlock("view", {
  37496. key: 2,
  37497. class: "auto-login-box ss-flex ss-flex-col ss-row-center ss-col-center"
  37498. }, [
  37499. ["WechatOfficialAccount", "WechatMiniProgram", "App"].includes($setup.sheep.$platform.name) && $setup.sheep.$platform.isWechatInstalled ? (vue.openBlock(), vue.createElementBlock("view", {
  37500. key: 0,
  37501. class: "wx-login-btn",
  37502. onClick: _cache[5] || (_cache[5] = ($event) => $setup.thirdLogin("wechat"))
  37503. }, [
  37504. vue.createElementVNode("image", {
  37505. class: "auto-login-img",
  37506. src: $setup.sheep.$url.static("/static/images/wechat.png")
  37507. }, null, 8, ["src"]),
  37508. vue.createElementVNode(
  37509. "text",
  37510. null,
  37511. vue.toDisplayString($setup.t("account.wechat_authorization_login")),
  37512. 1
  37513. /* TEXT */
  37514. )
  37515. ])) : vue.createCommentVNode("v-if", true)
  37516. ])) : vue.createCommentVNode("v-if", true),
  37517. vue.createCommentVNode(" 微信公众号授权登陆 在账号注册中显示 "),
  37518. ["register"].includes($setup.authType) ? (vue.openBlock(), vue.createElementBlock("view", {
  37519. key: 3,
  37520. class: "auto-login-box ss-flex ss-flex-col ss-row-center ss-col-center"
  37521. }, [
  37522. ["WechatOfficialAccount", "WechatMiniProgram", "App"].includes($setup.sheep.$platform.name) && $setup.sheep.$platform.isWechatInstalled ? (vue.openBlock(), vue.createElementBlock("view", {
  37523. key: 0,
  37524. class: "wx-login-btn",
  37525. onClick: _cache[6] || (_cache[6] = ($event) => $setup.thirdRegister("wechat"))
  37526. }, [
  37527. vue.createElementVNode("image", {
  37528. class: "auto-login-img",
  37529. src: $setup.sheep.$url.static("/static/images/wechat.png")
  37530. }, null, 8, ["src"]),
  37531. vue.createElementVNode(
  37532. "text",
  37533. null,
  37534. vue.toDisplayString($setup.t("account.wechat_authorization_register")),
  37535. 1
  37536. /* TEXT */
  37537. )
  37538. ])) : vue.createCommentVNode("v-if", true)
  37539. ])) : vue.createCommentVNode("v-if", true),
  37540. vue.createCommentVNode(" 1. 微信公众号授权登录 第一次登陆时弹窗绑定手机号 accountLogin "),
  37541. $setup.authType === "officialAccountFirstLogin" ? (vue.openBlock(), vue.createBlock($setup["officialAccountFirstLogin"], {
  37542. key: 4,
  37543. agreeStatus: $setup.state.protocol,
  37544. onOnConfirm: $setup.onConfirm
  37545. }, null, 8, ["agreeStatus"])) : vue.createCommentVNode("v-if", true),
  37546. vue.createCommentVNode(" 1. 账号密码登录 accountLogin "),
  37547. $setup.authType === "accountLogin" ? (vue.openBlock(), vue.createBlock($setup["accountLogin"], {
  37548. key: 5,
  37549. agreeStatus: $setup.state.protocol,
  37550. onOnConfirm: $setup.onConfirm
  37551. }, null, 8, ["agreeStatus"])) : vue.createCommentVNode("v-if", true),
  37552. vue.createCommentVNode(" 2. 短信登录 smsLogin "),
  37553. $setup.authType === "smsLogin" ? (vue.openBlock(), vue.createBlock($setup["smsLogin"], {
  37554. key: 6,
  37555. agreeStatus: $setup.state.protocol,
  37556. onOnConfirm: $setup.onConfirm
  37557. }, null, 8, ["agreeStatus"])) : vue.createCommentVNode("v-if", true),
  37558. vue.createCommentVNode(" 注册 "),
  37559. $setup.authType === "register" ? (vue.openBlock(), vue.createBlock($setup["register"], {
  37560. key: 7,
  37561. agreeStatus: $setup.state.protocol,
  37562. onOnConfirm: $setup.onConfirm
  37563. }, null, 8, ["agreeStatus"])) : vue.createCommentVNode("v-if", true),
  37564. vue.createCommentVNode(" 3. 忘记密码 resetPassword"),
  37565. vue.createCommentVNode(` <reset-password v-if="authType === 'resetPassword'" /> `),
  37566. vue.createCommentVNode(" 4. 绑定手机号 changeMobile "),
  37567. $setup.authType === "changeMobile" ? (vue.openBlock(), vue.createBlock($setup["changeMobile"], { key: 8 })) : vue.createCommentVNode("v-if", true),
  37568. vue.createCommentVNode(" 5. 修改密码 changePassword"),
  37569. $setup.authType === "changePassword" ? (vue.openBlock(), vue.createBlock($setup["changePassword"], { key: 9 })) : vue.createCommentVNode("v-if", true),
  37570. vue.createCommentVNode(" 6. 微信小程序授权 "),
  37571. $setup.authType === "mpAuthorization" ? (vue.openBlock(), vue.createBlock($setup["mpAuthorization"], { key: 10 })) : vue.createCommentVNode("v-if", true),
  37572. vue.createCommentVNode(" 绑定支付宝账号 "),
  37573. $setup.authType === "alipayAccount" ? (vue.openBlock(), vue.createBlock($setup["alipayAccount"], { key: 11 })) : vue.createCommentVNode("v-if", true),
  37574. vue.createCommentVNode(" 绑定银行卡号 "),
  37575. $setup.authType === "bankAccount" ? (vue.openBlock(), vue.createBlock($setup["bankAccount"], { key: 12 })) : vue.createCommentVNode("v-if", true),
  37576. vue.createCommentVNode(" 7. 第三方登录 "),
  37577. vue.createCommentVNode(` <view v-if="['accountLogin', 'smsLogin'].includes(authType)" class="auto-login-box ss-flex ss-flex-col ss-row-center ss-col-center"> `),
  37578. vue.createCommentVNode(" 7.1 微信小程序的快捷登录 "),
  37579. vue.createCommentVNode(` <view v-if="sheep.$platform.name === 'WechatMiniProgram'" class="ss-flex register-box">\r
  37580. <view class="register-title">还没有账号?</view>\r
  37581. <button class="ss-reset-button login-btn" open-type="getPhoneNumber"\r
  37582. @getphonenumber="getPhoneNumber">\r
  37583. 快捷登录\r
  37584. </button>\r
  37585. <view class="circle" />\r
  37586. </view> `),
  37587. vue.createCommentVNode(" 7.2 微信的公众号、App、小程序的登录,基于 openid + code "),
  37588. vue.createCommentVNode(` <button\r
  37589. v-if="\r
  37590. ['WechatOfficialAccount', 'WechatMiniProgram', 'App'].includes(sheep.$platform.name) &&\r
  37591. sheep.$platform.isWechatInstalled\r
  37592. "\r
  37593. @tap="thirdLogin('wechat')"\r
  37594. class="ss-reset-button auto-login-btn"\r
  37595. >\r
  37596. <image\r
  37597. class="auto-login-img"\r
  37598. :src="sheep.$url.static('/static/images/wechat.png')"\r
  37599. />\r
  37600. </button> `),
  37601. vue.createCommentVNode(" 7.3 iOS 登录 TODO 非繁人:等后面搞 App 再弄 "),
  37602. vue.createCommentVNode(` <button v-if="sheep.$platform.os === 'ios' && sheep.$platform.name === 'App'" @tap="thirdLogin('apple')"\r
  37603. class="ss-reset-button auto-login-btn">\r
  37604. <image class="auto-login-img" :src="sheep.$url.static('/static/images/apple.png')" />\r
  37605. </button> `),
  37606. vue.createCommentVNode(" </view> "),
  37607. vue.createElementVNode("view", { class: "safe-box" })
  37608. ])
  37609. ]),
  37610. _: 1
  37611. /* STABLE */
  37612. }, 8, ["show", "onClose"])
  37613. ],
  37614. 2112
  37615. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  37616. );
  37617. }
  37618. const __easycom_7$1 = /* @__PURE__ */ _export_sfc(_sfc_main$2W, [["render", _sfc_render$2V], ["__scopeId", "data-v-21181321"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-auth-modal/s-auth-modal.vue"]]);
  37619. async function getImagePath$1(imagePath) {
  37620. return new Promise((resolve, reject) => {
  37621. const fullPath = window.location.origin + imagePath;
  37622. resolve(fullPath);
  37623. });
  37624. }
  37625. const user = async (poster) => {
  37626. const width = poster.width;
  37627. const userInfo2 = sheep$1.$store("user").userInfo;
  37628. return {
  37629. background: await getImagePath$1("/static/user-poster-bg.jpg"),
  37630. // background: window.location.origin + '/static/user-poster-bg.jpg',
  37631. list: [
  37632. {
  37633. name: "nickname",
  37634. type: "text",
  37635. val: userInfo2.nickname,
  37636. x: width / 2,
  37637. y: width * 0.4,
  37638. paintbrushProps: {
  37639. textAlign: "center",
  37640. fillStyle: "#333",
  37641. font: {
  37642. fontSize: 14,
  37643. fontFamily: "sans-serif"
  37644. }
  37645. }
  37646. },
  37647. {
  37648. name: "avatar",
  37649. type: "image",
  37650. val: poster.avatar,
  37651. x: width * 0.4,
  37652. y: width * 0.16,
  37653. width: width * 0.2,
  37654. height: width * 0.2,
  37655. d: width * 0.2
  37656. },
  37657. {
  37658. name: "qrcode",
  37659. type: "qrcode",
  37660. val: poster.shareInfo.link,
  37661. x: width * 0.35,
  37662. y: width * 0.74,
  37663. size: width * 0.3
  37664. }
  37665. ]
  37666. };
  37667. };
  37668. async function getImagePath(imagePath) {
  37669. return new Promise((resolve, reject) => {
  37670. const fullPath = window.location.origin + imagePath;
  37671. resolve(fullPath);
  37672. });
  37673. }
  37674. const goods = async (poster) => {
  37675. const width = poster.width;
  37676. const userInfo2 = sheep$1.$store("user").userInfo;
  37677. return {
  37678. background: await getImagePath("/static/goods-poster-bg.jpg"),
  37679. list: [
  37680. {
  37681. name: "nickname",
  37682. type: "text",
  37683. val: userInfo2.nickname,
  37684. x: width * 0.21,
  37685. y: width * 0.06,
  37686. paintbrushProps: {
  37687. fillStyle: "#333",
  37688. font: {
  37689. fontSize: 16,
  37690. fontFamily: "sans-serif"
  37691. }
  37692. }
  37693. },
  37694. {
  37695. name: "avatar",
  37696. type: "image",
  37697. val: poster.avatar,
  37698. x: width * 0.04,
  37699. y: width * 0.04,
  37700. width: width * 0.14,
  37701. height: width * 0.14,
  37702. d: width * 0.14
  37703. },
  37704. {
  37705. name: "goodsBg",
  37706. type: "rect",
  37707. x: width * 0.03,
  37708. y: width * 0.3,
  37709. width: width * 0.94,
  37710. height: width * 0.75,
  37711. r: 5
  37712. },
  37713. {
  37714. name: "goodsImage",
  37715. type: "image",
  37716. val: poster.shareInfo.poster.image,
  37717. x: width * 0.03,
  37718. y: width * 0.3,
  37719. width: width * 0.94,
  37720. height: width * 0.5,
  37721. r: 5
  37722. },
  37723. {
  37724. name: "goodsTitle",
  37725. type: "text",
  37726. val: poster.shareInfo.poster.title,
  37727. x: width * 0.05,
  37728. y: width * 0.83,
  37729. maxWidth: width * 0.91,
  37730. line: 5,
  37731. lineHeight: 10,
  37732. paintbrushProps: {
  37733. fillStyle: "#333",
  37734. font: {
  37735. fontSize: 16
  37736. }
  37737. }
  37738. },
  37739. {
  37740. name: "goodsIntroduction",
  37741. type: "text",
  37742. val: poster.shareInfo.poster.introduction,
  37743. x: width * 0.05,
  37744. y: width * 0.89,
  37745. maxWidth: width * 0.9,
  37746. height: width * 0.1,
  37747. line: 3,
  37748. lineHeight: 4,
  37749. paintbrushProps: {
  37750. fillStyle: "#333",
  37751. font: {
  37752. fontSize: 12,
  37753. fontFamily: "OPPOSANS"
  37754. }
  37755. }
  37756. },
  37757. {
  37758. name: "goodsOriginalPrice",
  37759. type: "text",
  37760. val: poster.shareInfo.poster.original_price > 0 ? "¥" + poster.shareInfo.poster.original_price : "",
  37761. x: width * 0.3,
  37762. y: width * 1.32,
  37763. paintbrushProps: {
  37764. fillStyle: "#999",
  37765. font: {
  37766. fontSize: 10,
  37767. fontFamily: "OPPOSANS"
  37768. }
  37769. },
  37770. textDecoration: {
  37771. line: "line-through",
  37772. style: "solide"
  37773. }
  37774. },
  37775. {
  37776. name: "qrcode",
  37777. type: "qrcode",
  37778. val: poster.shareInfo.link,
  37779. x: width * 0.75,
  37780. y: width * 1.07,
  37781. size: width * 0.2
  37782. }
  37783. ]
  37784. };
  37785. };
  37786. const groupon = (poster) => {
  37787. const width = poster.width;
  37788. const userInfo2 = sheep$1.$store("user").userInfo;
  37789. return {
  37790. background: formatImageUrlProtocol(sheep$1.$url.cdn(sheep$1.$store("app").platform.share.posterInfo.groupon_bg)),
  37791. list: [
  37792. {
  37793. name: "nickname",
  37794. type: "text",
  37795. val: userInfo2.nickname,
  37796. x: width * 0.22,
  37797. y: width * 0.06,
  37798. paintbrushProps: {
  37799. fillStyle: "#333",
  37800. font: {
  37801. fontSize: 16,
  37802. fontFamily: "sans-serif"
  37803. }
  37804. }
  37805. },
  37806. {
  37807. name: "avatar",
  37808. type: "image",
  37809. val: formatImageUrlProtocol(sheep$1.$url.cdn(userInfo2.avatar)),
  37810. x: width * 0.04,
  37811. y: width * 0.04,
  37812. width: width * 0.14,
  37813. height: width * 0.14,
  37814. d: width * 0.14
  37815. },
  37816. {
  37817. name: "goodsImage",
  37818. type: "image",
  37819. val: formatImageUrlProtocol(poster.shareInfo.poster.image),
  37820. x: width * 0.03,
  37821. y: width * 0.21,
  37822. width: width * 0.94,
  37823. height: width * 0.94,
  37824. r: 10
  37825. },
  37826. {
  37827. name: "goodsTitle",
  37828. type: "text",
  37829. val: poster.shareInfo.poster.title,
  37830. x: width * 0.04,
  37831. y: width * 1.18,
  37832. maxWidth: width * 0.91,
  37833. line: 2,
  37834. lineHeight: 5,
  37835. paintbrushProps: {
  37836. fillStyle: "#333",
  37837. font: {
  37838. fontSize: 14
  37839. }
  37840. }
  37841. },
  37842. {
  37843. name: "goodsPrice",
  37844. type: "text",
  37845. val: "¥" + poster.shareInfo.poster.price,
  37846. x: width * 0.04,
  37847. y: width * 1.3,
  37848. paintbrushProps: {
  37849. fillStyle: "#ff0000",
  37850. font: {
  37851. fontSize: 20,
  37852. fontFamily: "OPPOSANS"
  37853. }
  37854. }
  37855. },
  37856. {
  37857. name: "grouponNum",
  37858. type: "text",
  37859. val: "2人团",
  37860. x: width * 0.3,
  37861. y: width * 1.32,
  37862. paintbrushProps: {
  37863. fillStyle: "#ff0000",
  37864. font: {
  37865. fontSize: 10,
  37866. fontFamily: "OPPOSANS"
  37867. }
  37868. }
  37869. },
  37870. {
  37871. name: "qrcode",
  37872. type: "qrcode",
  37873. val: poster.shareInfo.link,
  37874. x: width * 0.75,
  37875. y: width * 1.3,
  37876. size: width * 0.2
  37877. }
  37878. ]
  37879. };
  37880. };
  37881. let locaImage = vue.ref("");
  37882. async function getFileURL(file) {
  37883. await FileApi.getFileIO(file).then((res) => {
  37884. locaImage.value = window.URL.createObjectURL(res);
  37885. });
  37886. }
  37887. async function getPosterData(options2) {
  37888. const userInfo2 = sheep$1.$store("user").userInfo;
  37889. let avatar = userInfo2.avatar;
  37890. switch (options2.shareInfo.poster.type) {
  37891. case "user":
  37892. await getFileURL(avatar);
  37893. options2.avatar = locaImage.value;
  37894. return user(options2);
  37895. case "goods":
  37896. await getFileURL(avatar);
  37897. options2.avatar = locaImage.value;
  37898. await getFileURL(options2.shareInfo.poster.image);
  37899. options2.shareInfo.poster.image = locaImage.value;
  37900. return goods(options2);
  37901. case "groupon":
  37902. return groupon(options2);
  37903. }
  37904. }
  37905. function formatImageUrlProtocol(url2) {
  37906. return url2;
  37907. }
  37908. async function useCanvas(options2, vm) {
  37909. const width = options2.width;
  37910. const qsc = new QSCanvas(
  37911. {
  37912. canvasId: options2.canvasId,
  37913. width: options2.width,
  37914. height: options2.height,
  37915. setCanvasWH: (canvas) => {
  37916. options2.height = canvas.height;
  37917. }
  37918. },
  37919. vm
  37920. );
  37921. let drawer = await getPosterData(options2);
  37922. const background = await qsc.drawImg({
  37923. type: "image",
  37924. val: drawer.background,
  37925. x: 0,
  37926. y: 0,
  37927. width,
  37928. mode: "widthFix",
  37929. zIndex: 0
  37930. });
  37931. await qsc.updateCanvasWH({
  37932. width: background.width,
  37933. height: background.bottom
  37934. });
  37935. let list = drawer.list;
  37936. for (let i2 = 0; i2 < list.length; i2++) {
  37937. let item = list[i2];
  37938. if (item.type === "text") {
  37939. formatAppLog("log", "at sheep/components/s-share-modal/canvas-poster/useCanvas.js:51", item);
  37940. await qsc.drawText(item);
  37941. }
  37942. if (item.type === "image") {
  37943. if (item.d) {
  37944. qsc.setCircle({
  37945. x: item.x,
  37946. y: item.y,
  37947. d: item.d,
  37948. clip: true
  37949. });
  37950. }
  37951. if (item.r) {
  37952. qsc.setRect({
  37953. x: item.x,
  37954. y: item.y,
  37955. height: item.height,
  37956. width: item.width,
  37957. r: item.r,
  37958. clip: true
  37959. });
  37960. }
  37961. try {
  37962. await qsc.drawImg(item);
  37963. } catch (error2) {
  37964. formatAppLog("log", "at sheep/components/s-share-modal/canvas-poster/useCanvas.js:78", error2);
  37965. }
  37966. qsc.restore();
  37967. }
  37968. if (item.type === "rect") {
  37969. if (item.r) {
  37970. qsc.setRect({
  37971. x: item.x,
  37972. y: item.y,
  37973. height: item.height,
  37974. width: item.width,
  37975. r: item.r,
  37976. clip: true
  37977. });
  37978. }
  37979. try {
  37980. await qsc.draw(item);
  37981. } catch (error2) {
  37982. formatAppLog("log", "at sheep/components/s-share-modal/canvas-poster/useCanvas.js:97", error2);
  37983. }
  37984. qsc.restore();
  37985. }
  37986. if (item.type === "qrcode") {
  37987. formatAppLog("log", "at sheep/components/s-share-modal/canvas-poster/useCanvas.js:104", item);
  37988. await qsc.drawQrCode(item);
  37989. }
  37990. }
  37991. await qsc.draw();
  37992. setTimeout(async () => {
  37993. options2.src = await qsc.toImage();
  37994. }, 100);
  37995. return options2;
  37996. }
  37997. const _sfc_main$2V = {
  37998. __name: "index",
  37999. props: {
  38000. show: {
  38001. type: Boolean,
  38002. default: false
  38003. },
  38004. shareInfo: {
  38005. type: Object,
  38006. default() {
  38007. }
  38008. }
  38009. },
  38010. emits: ["success", "close"],
  38011. setup(__props, { expose: __expose, emit: __emit }) {
  38012. const props = __props;
  38013. const poster = vue.reactive({
  38014. canvasId: "canvasId",
  38015. width: sheep$1.$platform.device.windowWidth * 0.9,
  38016. height: 600,
  38017. src: "",
  38018. imgData: ""
  38019. });
  38020. const emits = __emit;
  38021. const vm = vue.getCurrentInstance();
  38022. const onClosePoster2 = () => {
  38023. emits("close");
  38024. };
  38025. const onSavePoster = () => {
  38026. if (["WechatOfficialAccount", "H5"].includes(sheep$1.$platform.name)) {
  38027. sheep$1.$helper.toast(t$6("share.long_press_to_save"));
  38028. return;
  38029. }
  38030. uni.saveImageToPhotosAlbum({
  38031. filePath: poster.src,
  38032. success: (res) => {
  38033. onClosePoster2();
  38034. sheep$1.$helper.toast(t$6("share.save_success"));
  38035. },
  38036. fail: (err) => {
  38037. sheep$1.$helper.toast(t$6("share.save_failure"));
  38038. formatAppLog("log", "at sheep/components/s-share-modal/canvas-poster/index.vue:85", "图片保存失败:", err);
  38039. }
  38040. });
  38041. };
  38042. const imageUrl = vue.ref("");
  38043. async function getPoster(params) {
  38044. poster.src = "";
  38045. poster.shareInfo = props.shareInfo;
  38046. poster.canvasId = "canvasId-" + (/* @__PURE__ */ new Date()).getTime();
  38047. const canvas = await useCanvas(poster, vm);
  38048. return canvas;
  38049. }
  38050. __expose({
  38051. getPoster
  38052. });
  38053. const __returned__ = { props, poster, emits, vm, onClosePoster: onClosePoster2, onSavePoster, imageUrl, getPoster, reactive: vue.reactive, getCurrentInstance: vue.getCurrentInstance, ref: vue.ref, get sheep() {
  38054. return sheep$1;
  38055. }, get useCanvas() {
  38056. return useCanvas;
  38057. }, get t() {
  38058. return t$6;
  38059. } };
  38060. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  38061. return __returned__;
  38062. }
  38063. };
  38064. function _sfc_render$2U(_ctx, _cache, $props, $setup, $data, $options) {
  38065. const _component_su_popup = resolveEasycom(vue.resolveDynamicComponent("su-popup"), __easycom_4$3);
  38066. return vue.openBlock(), vue.createBlock(_component_su_popup, {
  38067. show: $props.show,
  38068. round: "10",
  38069. onClose: $setup.onClosePoster,
  38070. type: "center",
  38071. class: "popup-box"
  38072. }, {
  38073. default: vue.withCtx(() => [
  38074. vue.createElementVNode("view", { class: "ss-flex-col ss-col-center ss-row-center" }, [
  38075. vue.createCommentVNode(' <image class="poster-img" :src="imageUrl"/> '),
  38076. $setup.poster.src === "" ? (vue.openBlock(), vue.createElementBlock(
  38077. "view",
  38078. {
  38079. key: 0,
  38080. class: "poster-title ss-flex ss-row-center",
  38081. style: vue.normalizeStyle({
  38082. height: $setup.poster.height + "px",
  38083. width: $setup.poster.width + "px"
  38084. })
  38085. },
  38086. vue.toDisplayString($setup.t("share.poster_loading")),
  38087. 5
  38088. /* TEXT, STYLE */
  38089. )) : (vue.openBlock(), vue.createElementBlock("image", {
  38090. key: 1,
  38091. class: "poster-img",
  38092. src: $setup.poster.src,
  38093. style: vue.normalizeStyle({
  38094. height: $setup.poster.height + "px",
  38095. width: $setup.poster.width + "px"
  38096. }),
  38097. "show-menu-by-longpress": true
  38098. }, null, 12, ["src"])),
  38099. vue.createElementVNode("canvas", {
  38100. class: "hideCanvas",
  38101. "canvas-id": $setup.poster.canvasId,
  38102. id: $setup.poster.canvasId,
  38103. style: vue.normalizeStyle({
  38104. height: $setup.poster.height + "px",
  38105. width: $setup.poster.width + "px"
  38106. })
  38107. }, null, 12, ["canvas-id", "id"]),
  38108. $setup.poster.src !== "" ? (vue.openBlock(), vue.createElementBlock("view", {
  38109. key: 2,
  38110. class: "poster-btn-box ss-m-t-20 ss-flex ss-row-between ss-col-center"
  38111. }, [
  38112. vue.createElementVNode(
  38113. "button",
  38114. {
  38115. class: "cancel-btn ss-reset-button",
  38116. onClick: $setup.onClosePoster
  38117. },
  38118. vue.toDisplayString($setup.t("common.cancel")),
  38119. 1
  38120. /* TEXT */
  38121. ),
  38122. vue.createElementVNode("button", {
  38123. class: "save-btn ss-reset-button ui-BG-Main",
  38124. onClick: $setup.onSavePoster
  38125. }, [
  38126. vue.createTextVNode(
  38127. vue.toDisplayString($setup.t("share.long_press_to_save")) + " ",
  38128. 1
  38129. /* TEXT */
  38130. ),
  38131. vue.createCommentVNode(" {{\r\n ['wechatOfficialAccount', 'H5'].includes(sheep.$platform.name)\r\n ? '保存图片'\r\n : '长按图片保存'\r\n }} ")
  38132. ])
  38133. ])) : vue.createCommentVNode("v-if", true)
  38134. ])
  38135. ]),
  38136. _: 1
  38137. /* STABLE */
  38138. }, 8, ["show"]);
  38139. }
  38140. const canvasPoster = /* @__PURE__ */ _export_sfc(_sfc_main$2V, [["render", _sfc_render$2U], ["__scopeId", "data-v-199e8f1d"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-share-modal/canvas-poster/index.vue"]]);
  38141. const _sfc_main$2U = {
  38142. __name: "s-share-modal",
  38143. props: {
  38144. shareInfo: {
  38145. type: Object,
  38146. default() {
  38147. }
  38148. }
  38149. },
  38150. setup(__props, { expose: __expose }) {
  38151. __expose();
  38152. const show = vue.computed(() => sheep$1.$store("modal").share);
  38153. const shareConfig = vue.computed(() => sheep$1.$store("app").platform.share);
  38154. const SharePosterRef = vue.ref("");
  38155. const props = __props;
  38156. const state = vue.reactive({
  38157. showShareGuide: false,
  38158. // H5 的指引
  38159. showPosterModal: false
  38160. // 海报弹窗
  38161. });
  38162. let ShareInfo = vue.computed(() => {
  38163. return {
  38164. ...props.shareInfo
  38165. };
  38166. });
  38167. const onShareByPoster = () => {
  38168. const shareId = vue.computed(() => sheep$1.$store("modal").shareInfo.spuId);
  38169. closeShareModal();
  38170. if (!sheep$1.$store("user").isLogin) {
  38171. showAuthModal();
  38172. return;
  38173. }
  38174. if (shareId.value) {
  38175. ShareApi.getLinkId(3, shareId.value).then((res) => {
  38176. if (res.code !== 0) {
  38177. return;
  38178. }
  38179. ShareInfo.value.link = ShareInfo.value.link.replace("0", res.data.linkId);
  38180. ShareInfo.value.query = ShareInfo.value.query.replace("0", res.data.linkId);
  38181. });
  38182. }
  38183. vue.unref(SharePosterRef).getPoster();
  38184. state.showPosterModal = true;
  38185. };
  38186. const onShareByForward = () => {
  38187. closeShareModal();
  38188. uni.share({
  38189. provider: "weixin",
  38190. scene: "WXSceneSession",
  38191. type: 0,
  38192. href: props.shareInfo.link,
  38193. title: props.shareInfo.title,
  38194. summary: props.shareInfo.desc,
  38195. imageUrl: props.shareInfo.image,
  38196. success: (res) => {
  38197. formatAppLog("log", "at sheep/components/s-share-modal/s-share-modal.vue:127", "success:" + JSON.stringify(res));
  38198. },
  38199. fail: (err) => {
  38200. formatAppLog("log", "at sheep/components/s-share-modal/s-share-modal.vue:130", "fail:" + JSON.stringify(err));
  38201. }
  38202. });
  38203. };
  38204. const onShareByCopyLink = () => {
  38205. closeShareModal();
  38206. if (!sheep$1.$store("user").isLogin) {
  38207. showAuthModal();
  38208. return;
  38209. }
  38210. sheep$1.$helper.copyText(props.shareInfo.link);
  38211. };
  38212. function onCloseGuide() {
  38213. state.showShareGuide = false;
  38214. }
  38215. const __returned__ = { show, shareConfig, SharePosterRef, props, state, get ShareInfo() {
  38216. return ShareInfo;
  38217. }, set ShareInfo(v2) {
  38218. ShareInfo = v2;
  38219. }, onShareByPoster, onShareByForward, onShareByCopyLink, onCloseGuide, ref: vue.ref, unref: vue.unref, reactive: vue.reactive, computed: vue.computed, get onLoad() {
  38220. return onLoad;
  38221. }, get sheep() {
  38222. return sheep$1;
  38223. }, canvasPoster, get closeShareModal() {
  38224. return closeShareModal;
  38225. }, get showAuthModal() {
  38226. return showAuthModal;
  38227. }, get ShareApi() {
  38228. return ShareApi;
  38229. }, get t() {
  38230. return t$6;
  38231. } };
  38232. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  38233. return __returned__;
  38234. }
  38235. };
  38236. function _sfc_render$2T(_ctx, _cache, $props, $setup, $data, $options) {
  38237. const _component_su_popup = resolveEasycom(vue.resolveDynamicComponent("su-popup"), __easycom_4$3);
  38238. return vue.openBlock(), vue.createElementBlock("view", null, [
  38239. vue.createVNode(_component_su_popup, {
  38240. show: $setup.state.showShareGuide,
  38241. showClose: false,
  38242. onClose: $setup.onCloseGuide
  38243. }, null, 8, ["show"]),
  38244. $setup.state.showShareGuide ? (vue.openBlock(), vue.createElementBlock("view", {
  38245. key: 0,
  38246. class: "guide-wrap"
  38247. }, [
  38248. vue.createElementVNode("image", {
  38249. class: "guide-image",
  38250. src: $setup.sheep.$url.static("/static/images/share_guide.png")
  38251. }, null, 8, ["src"])
  38252. ])) : vue.createCommentVNode("v-if", true),
  38253. vue.createVNode(_component_su_popup, {
  38254. show: $setup.show,
  38255. round: "10",
  38256. showClose: false,
  38257. onClose: $setup.closeShareModal
  38258. }, {
  38259. default: vue.withCtx(() => [
  38260. vue.createCommentVNode(" 分享 tools "),
  38261. vue.createElementVNode("view", { class: "share-box" }, [
  38262. vue.createElementVNode("view", { class: "share-list-box ss-flex" }, [
  38263. vue.createCommentVNode(" 操作 ①:发送给微信好友 "),
  38264. $setup.shareConfig.methods.includes("forward") ? (vue.openBlock(), vue.createElementBlock("button", {
  38265. key: 0,
  38266. class: "share-item share-btn ss-flex-col ss-col-center",
  38267. "open-type": "share",
  38268. onClick: $setup.onShareByForward
  38269. }, [
  38270. vue.createElementVNode("image", {
  38271. class: "share-img",
  38272. src: $setup.sheep.$url.static("/static/images/share_wx.png"),
  38273. mode: ""
  38274. }, null, 8, ["src"]),
  38275. vue.createElementVNode(
  38276. "text",
  38277. { class: "share-title" },
  38278. vue.toDisplayString($setup.t("pop.wechat_friend")),
  38279. 1
  38280. /* TEXT */
  38281. )
  38282. ])) : vue.createCommentVNode("v-if", true),
  38283. vue.createCommentVNode(" 操作 ②:生成海报图片 "),
  38284. $setup.shareConfig.methods.includes("poster") ? (vue.openBlock(), vue.createElementBlock("button", {
  38285. key: 1,
  38286. class: "share-item share-btn ss-flex-col ss-col-center",
  38287. onClick: $setup.onShareByPoster
  38288. }, [
  38289. vue.createElementVNode("image", {
  38290. class: "share-img",
  38291. src: $setup.sheep.$url.static("/static/images/share_poster.png"),
  38292. mode: ""
  38293. }, null, 8, ["src"]),
  38294. vue.createElementVNode(
  38295. "text",
  38296. { class: "share-title" },
  38297. vue.toDisplayString($setup.t("pop.create_poster")),
  38298. 1
  38299. /* TEXT */
  38300. )
  38301. ])) : vue.createCommentVNode("v-if", true),
  38302. vue.createCommentVNode(" 操作 ③:生成链接 "),
  38303. vue.createCommentVNode(` <button v-if="shareConfig.methods.includes('link')"\r
  38304. class="share-item share-btn ss-flex-col ss-col-center" @tap="onShareByCopyLink">\r
  38305. <image class="share-img" :src="sheep.$url.static('/static/images/share_link.png')"\r
  38306. mode="" />\r
  38307. <text class="share-title">{{ t('pop.copy_link') }}</text>\r
  38308. </button> `)
  38309. ]),
  38310. vue.createElementVNode(
  38311. "view",
  38312. {
  38313. class: "share-foot ss-flex ss-row-center ss-col-center",
  38314. onClick: _cache[0] || (_cache[0] = (...args) => $setup.closeShareModal && $setup.closeShareModal(...args))
  38315. },
  38316. vue.toDisplayString($setup.t("common.cancel")),
  38317. 1
  38318. /* TEXT */
  38319. )
  38320. ])
  38321. ]),
  38322. _: 1
  38323. /* STABLE */
  38324. }, 8, ["show", "onClose"]),
  38325. vue.createCommentVNode(" 分享海报,对应操作 ② "),
  38326. vue.createVNode($setup["canvasPoster"], {
  38327. ref: "SharePosterRef",
  38328. show: $setup.state.showPosterModal,
  38329. shareInfo: $setup.ShareInfo,
  38330. onClose: _cache[1] || (_cache[1] = ($event) => $setup.state.showPosterModal = false)
  38331. }, null, 8, ["show", "shareInfo"])
  38332. ]);
  38333. }
  38334. const __easycom_8 = /* @__PURE__ */ _export_sfc(_sfc_main$2U, [["render", _sfc_render$2T], ["__scopeId", "data-v-a2a58660"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-share-modal/s-share-modal.vue"]]);
  38335. const _sfc_main$2T = {
  38336. __name: "s-menu-tools",
  38337. setup(__props, { expose: __expose }) {
  38338. __expose();
  38339. const show = vue.computed(() => sheep$1.$store("modal").menu);
  38340. const {
  38341. t: t2
  38342. } = useI18n();
  38343. function onClick(item) {
  38344. closeMenuTools();
  38345. if (item.url)
  38346. sheep$1.$router.go(item.url);
  38347. }
  38348. const list = [
  38349. {
  38350. url: "/pages/index/index",
  38351. icon: "/static/images/home.png",
  38352. title: t2("common.home")
  38353. },
  38354. {
  38355. url: "/pages/index/search",
  38356. icon: "/static/images/search.png",
  38357. title: t2("common.search")
  38358. },
  38359. {
  38360. url: "/pages/index/user",
  38361. icon: "/static/images/user.png",
  38362. title: t2("menu.personal_center")
  38363. },
  38364. {
  38365. url: "/pages/index/cart",
  38366. icon: "/static/images/cart.png",
  38367. title: t2("menu.shopping_cart")
  38368. },
  38369. {
  38370. url: "/pages/user/goods-log",
  38371. icon: "/static/images/browse.png",
  38372. title: t2("menu.browsing_history")
  38373. },
  38374. {
  38375. url: "/pages/user/goods-collect",
  38376. icon: "/static/images/collect.png",
  38377. title: t2("menu.my_favorites")
  38378. }
  38379. // {
  38380. // url: '/pages/chat/index',
  38381. // icon: '/static/images/service.png',
  38382. // title: t('menu.customer_service'),
  38383. // },
  38384. ];
  38385. const __returned__ = { show, t: t2, onClick, list, reactive: vue.reactive, computed: vue.computed, get sheep() {
  38386. return sheep$1;
  38387. }, get showMenuTools() {
  38388. return showMenuTools;
  38389. }, get closeMenuTools() {
  38390. return closeMenuTools;
  38391. }, get useI18n() {
  38392. return useI18n;
  38393. } };
  38394. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  38395. return __returned__;
  38396. }
  38397. };
  38398. function _sfc_render$2S(_ctx, _cache, $props, $setup, $data, $options) {
  38399. const _component_su_status_bar = resolveEasycom(vue.resolveDynamicComponent("su-status-bar"), __easycom_0$q);
  38400. const _component_su_popup = resolveEasycom(vue.resolveDynamicComponent("su-popup"), __easycom_4$3);
  38401. return vue.openBlock(), vue.createBlock(_component_su_popup, {
  38402. show: $setup.show,
  38403. type: "top",
  38404. round: "20",
  38405. backgroundColor: "#F0F0F0",
  38406. onClose: $setup.closeMenuTools
  38407. }, {
  38408. default: vue.withCtx(() => [
  38409. vue.createVNode(_component_su_status_bar),
  38410. vue.createElementVNode("view", { class: "tools-wrap ss-m-x-30 ss-m-b-16" }, [
  38411. vue.createElementVNode(
  38412. "view",
  38413. { class: "title ss-m-b-34 ss-p-t-20" },
  38414. vue.toDisplayString(_ctx.$t("menu.quick_menu")),
  38415. 1
  38416. /* TEXT */
  38417. ),
  38418. vue.createElementVNode("view", { class: "container-list ss-flex ss-flex-wrap" }, [
  38419. (vue.openBlock(), vue.createElementBlock(
  38420. vue.Fragment,
  38421. null,
  38422. vue.renderList($setup.list, (item) => {
  38423. return vue.createElementVNode("view", {
  38424. class: "list-item ss-m-b-24",
  38425. key: item.title
  38426. }, [
  38427. vue.createElementVNode("view", { class: "ss-flex-col ss-col-center" }, [
  38428. vue.createElementVNode("button", {
  38429. class: "ss-reset-button list-image ss-flex ss-row-center ss-col-center",
  38430. onClick: ($event) => $setup.onClick(item)
  38431. }, [
  38432. $setup.show ? (vue.openBlock(), vue.createElementBlock("image", {
  38433. key: 0,
  38434. src: $setup.sheep.$url.static(item.icon),
  38435. class: "list-icon"
  38436. }, null, 8, ["src"])) : vue.createCommentVNode("v-if", true)
  38437. ], 8, ["onClick"]),
  38438. vue.createElementVNode(
  38439. "view",
  38440. { class: "list-title ss-m-t-20" },
  38441. vue.toDisplayString(item.title),
  38442. 1
  38443. /* TEXT */
  38444. )
  38445. ])
  38446. ]);
  38447. }),
  38448. 64
  38449. /* STABLE_FRAGMENT */
  38450. ))
  38451. ])
  38452. ])
  38453. ]),
  38454. _: 1
  38455. /* STABLE */
  38456. }, 8, ["show", "onClose"]);
  38457. }
  38458. const __easycom_9$1 = /* @__PURE__ */ _export_sfc(_sfc_main$2T, [["render", _sfc_render$2S], ["__scopeId", "data-v-bbb37e35"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-menu-tools/s-menu-tools.vue"]]);
  38459. const _sfc_main$2S = {
  38460. __name: "s-layout",
  38461. props: {
  38462. title: {
  38463. type: String,
  38464. default: ""
  38465. },
  38466. navbar: {
  38467. type: String,
  38468. default: "normal"
  38469. },
  38470. opacityBgUi: {
  38471. type: String,
  38472. default: "bg-white"
  38473. },
  38474. color: {
  38475. type: String,
  38476. default: ""
  38477. },
  38478. tools: {
  38479. type: String,
  38480. default: "title"
  38481. },
  38482. keyword: {
  38483. type: String,
  38484. default: ""
  38485. },
  38486. navbarStyle: {
  38487. type: Object,
  38488. default: () => ({
  38489. mode: "",
  38490. type: "",
  38491. color: "",
  38492. src: "",
  38493. list: [],
  38494. alwaysShow: 0
  38495. })
  38496. },
  38497. bgStyle: {
  38498. type: Object,
  38499. default: () => ({
  38500. src: "",
  38501. color: "var(--ui-BG-1)"
  38502. })
  38503. },
  38504. tabbar: {
  38505. type: [String, Boolean],
  38506. default: ""
  38507. },
  38508. onShareAppMessage: {
  38509. type: [Boolean, Object],
  38510. default: true
  38511. },
  38512. leftWidth: {
  38513. type: [Number, String],
  38514. default: 100
  38515. },
  38516. rightWidth: {
  38517. type: [Number, String],
  38518. default: 100
  38519. },
  38520. defaultSearch: {
  38521. type: String,
  38522. default: ""
  38523. },
  38524. //展示返回按钮
  38525. showLeftButton: {
  38526. type: Boolean,
  38527. default: false
  38528. }
  38529. },
  38530. emits: ["search"],
  38531. setup(__props, { expose: __expose, emit: __emit }) {
  38532. __expose();
  38533. const props = __props;
  38534. const emits = __emit;
  38535. const sysStore = sheep$1.$store("sys");
  38536. const userStore = sheep$1.$store("user");
  38537. const appStore = sheep$1.$store("app");
  38538. const modalStore = sheep$1.$store("modal");
  38539. const sys2 = vue.computed(() => sysStore);
  38540. const navbarMode = vue.computed(() => {
  38541. if (props.navbar === "normal" || props.navbarStyle.mode === "normal") {
  38542. return "normal";
  38543. }
  38544. return "inner";
  38545. });
  38546. const bgMain = vue.computed(() => {
  38547. if (navbarMode.value === "inner") {
  38548. return {
  38549. background: `${props.bgStyle.backgroundColor} url(${sheep$1.$url.cdn(
  38550. props.bgStyle.backgroundImage
  38551. )}) no-repeat top center / 100% auto`
  38552. };
  38553. }
  38554. return {};
  38555. });
  38556. const bgBody = vue.computed(() => {
  38557. if (navbarMode.value === "normal") {
  38558. return {
  38559. background: `${props.bgStyle.backgroundColor} url(${sheep$1.$url.cdn(
  38560. props.bgStyle.backgroundImage
  38561. )}) no-repeat top center / 100% auto`
  38562. };
  38563. }
  38564. return {};
  38565. });
  38566. const shareInfo = vue.computed(() => {
  38567. if (props.onShareAppMessage === true) {
  38568. return sheep$1.$platform.share.getShareInfo();
  38569. } else {
  38570. if (!lodashExports.isEmpty(props.onShareAppMessage)) {
  38571. sheep$1.$platform.share.updateShareInfo(props.onShareAppMessage);
  38572. return props.onShareAppMessage;
  38573. }
  38574. }
  38575. return {};
  38576. });
  38577. onShow(() => {
  38578. if (!lodashExports.isEmpty(shareInfo.value)) {
  38579. sheep$1.$platform.share.updateShareInfo(shareInfo.value);
  38580. }
  38581. });
  38582. const __returned__ = { props, emits, sysStore, userStore, appStore, modalStore, sys: sys2, navbarMode, bgMain, bgBody, shareInfo, computed: vue.computed, reactive: vue.reactive, ref: vue.ref, get sheep() {
  38583. return sheep$1;
  38584. }, get isEmpty() {
  38585. return lodashExports.isEmpty;
  38586. }, get onShow() {
  38587. return onShow;
  38588. } };
  38589. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  38590. return __returned__;
  38591. }
  38592. };
  38593. function _sfc_render$2R(_ctx, _cache, $props, $setup, $data, $options) {
  38594. const _component_su_navbar = resolveEasycom(vue.resolveDynamicComponent("su-navbar"), __easycom_0$o);
  38595. const _component_s_custom_navbar = resolveEasycom(vue.resolveDynamicComponent("s-custom-navbar"), __easycom_1$a);
  38596. const _component_su_inner_navbar = resolveEasycom(vue.resolveDynamicComponent("su-inner-navbar"), __easycom_2$8);
  38597. const _component_s_tabbar = resolveEasycom(vue.resolveDynamicComponent("s-tabbar"), __easycom_3$7);
  38598. const _component_s_wallet_modal = resolveEasycom(vue.resolveDynamicComponent("s-wallet-modal"), __easycom_4$2);
  38599. const _component_s_signup_modal = resolveEasycom(vue.resolveDynamicComponent("s-signup-modal"), __easycom_5$2);
  38600. const _component_s_follow_modal = resolveEasycom(vue.resolveDynamicComponent("s-follow-modal"), __easycom_6$1);
  38601. const _component_s_auth_modal = resolveEasycom(vue.resolveDynamicComponent("s-auth-modal"), __easycom_7$1);
  38602. const _component_s_share_modal = resolveEasycom(vue.resolveDynamicComponent("s-share-modal"), __easycom_8);
  38603. const _component_s_menu_tools = resolveEasycom(vue.resolveDynamicComponent("s-menu-tools"), __easycom_9$1);
  38604. return vue.openBlock(), vue.createElementBlock(
  38605. "view",
  38606. {
  38607. class: vue.normalizeClass(["page-app", ["theme-" + $setup.sys.mode, "main-" + $setup.sys.theme, "font-" + $setup.sys.fontSize]])
  38608. },
  38609. [
  38610. vue.createElementVNode(
  38611. "view",
  38612. {
  38613. class: "page-main",
  38614. style: vue.normalizeStyle([$setup.bgMain])
  38615. },
  38616. [
  38617. vue.createCommentVNode(" 默认通用顶部导航栏 "),
  38618. $props.navbar === "normal" ? (vue.openBlock(), vue.createBlock(_component_su_navbar, {
  38619. key: 0,
  38620. title: $props.title,
  38621. statusBar: "",
  38622. color: $props.color,
  38623. tools: $props.tools,
  38624. opacityBgUi: $props.opacityBgUi,
  38625. onSearch: _cache[0] || (_cache[0] = (e2) => $setup.emits("search", e2)),
  38626. defaultSearch: $props.defaultSearch
  38627. }, null, 8, ["title", "color", "tools", "opacityBgUi", "defaultSearch"])) : $props.navbar === "custom" && $setup.navbarMode === "normal" ? (vue.openBlock(), vue.createElementBlock(
  38628. vue.Fragment,
  38629. { key: 1 },
  38630. [
  38631. vue.createCommentVNode(" 装修组件导航栏-普通 "),
  38632. vue.createVNode(_component_s_custom_navbar, {
  38633. data: $props.navbarStyle,
  38634. showLeftButton: $props.showLeftButton
  38635. }, null, 8, ["data", "showLeftButton"])
  38636. ],
  38637. 2112
  38638. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  38639. )) : vue.createCommentVNode("v-if", true),
  38640. vue.createElementVNode(
  38641. "view",
  38642. {
  38643. class: "page-body",
  38644. style: vue.normalizeStyle([$setup.bgBody])
  38645. },
  38646. [
  38647. vue.createCommentVNode(" 沉浸式头部 "),
  38648. $props.navbar === "inner" ? (vue.openBlock(), vue.createBlock(_component_su_inner_navbar, {
  38649. key: 0,
  38650. title: $props.title
  38651. }, null, 8, ["title"])) : vue.createCommentVNode("v-if", true),
  38652. $props.navbar === "inner" ? (vue.openBlock(), vue.createElementBlock(
  38653. "view",
  38654. {
  38655. key: 1,
  38656. style: vue.normalizeStyle([{ paddingTop: $setup.sheep.$platform.navbar + "px" }])
  38657. },
  38658. null,
  38659. 4
  38660. /* STYLE */
  38661. )) : vue.createCommentVNode("v-if", true),
  38662. vue.createCommentVNode(" 装修组件导航栏-沉浸式 "),
  38663. vue.createCommentVNode(` <s-custom-navbar v-if="navbar === 'custom' && navbarMode === 'inner'" :data="navbarStyle" :showLeftButton="showLeftButton" /> `),
  38664. vue.createCommentVNode(" 页面内容插槽 "),
  38665. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
  38666. vue.createCommentVNode(" 底部导航 "),
  38667. $props.tabbar !== "" ? (vue.openBlock(), vue.createBlock(_component_s_tabbar, {
  38668. key: 2,
  38669. path: $props.tabbar
  38670. }, null, 8, ["path"])) : vue.createCommentVNode("v-if", true)
  38671. ],
  38672. 4
  38673. /* STYLE */
  38674. )
  38675. ],
  38676. 4
  38677. /* STYLE */
  38678. ),
  38679. vue.createElementVNode("view", { class: "page-modal" }, [
  38680. vue.createCommentVNode(" 全局获得佣金提示弹窗 "),
  38681. vue.createVNode(_component_s_wallet_modal),
  38682. vue.createCommentVNode(" 全局自动签到弹窗 "),
  38683. vue.createVNode(_component_s_signup_modal),
  38684. vue.createCommentVNode(" 全局关注公众号弹窗 "),
  38685. vue.createVNode(_component_s_follow_modal),
  38686. vue.createCommentVNode(" 全局授权弹窗 "),
  38687. vue.createVNode(_component_s_auth_modal),
  38688. vue.createCommentVNode(" 全局分享弹窗 "),
  38689. vue.createVNode(_component_s_share_modal, { shareInfo: $setup.shareInfo }, null, 8, ["shareInfo"]),
  38690. vue.createCommentVNode(" 全局快捷入口 "),
  38691. vue.createVNode(_component_s_menu_tools)
  38692. ])
  38693. ],
  38694. 2
  38695. /* CLASS */
  38696. );
  38697. }
  38698. const __easycom_1$8 = /* @__PURE__ */ _export_sfc(_sfc_main$2S, [["render", _sfc_render$2R], ["__scopeId", "data-v-32d0115a"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-layout/s-layout.vue"]]);
  38699. const _sfc_main$2R = {
  38700. __name: "richtext",
  38701. props: {
  38702. title: {
  38703. defautls: "",
  38704. type: String
  38705. },
  38706. type: {
  38707. defautls: "",
  38708. type: String
  38709. }
  38710. },
  38711. setup(__props, { expose: __expose }) {
  38712. __expose();
  38713. const state = vue.reactive({
  38714. title: "",
  38715. content: ""
  38716. });
  38717. async function getRichTextContent(id, title) {
  38718. formatAppLog("log", "at pages/public/richtext.vue:24", id, title);
  38719. const { code: code2, data } = await ArticleApi.getArticle(id, title);
  38720. if (code2 !== 0) {
  38721. return;
  38722. }
  38723. state.content = data.content;
  38724. if (state.title !== data.title) {
  38725. state.title = data.title;
  38726. uni.setNavigationBarTitle({
  38727. title: state.title
  38728. });
  38729. }
  38730. }
  38731. const props = __props;
  38732. onLoad((options2) => {
  38733. if (options2.title || props.title) {
  38734. state.title = options2.title || props.title;
  38735. uni.setNavigationBarTitle({
  38736. title: state.title || props.title
  38737. });
  38738. }
  38739. getRichTextContent(options2.id, options2.title || props.title);
  38740. });
  38741. const __returned__ = { state, getRichTextContent, props, get onLoad() {
  38742. return onLoad;
  38743. }, reactive: vue.reactive, get ArticleApi() {
  38744. return ArticleApi;
  38745. } };
  38746. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  38747. return __returned__;
  38748. }
  38749. };
  38750. function _sfc_render$2Q(_ctx, _cache, $props, $setup, $data, $options) {
  38751. const _component_mp_html = resolveEasycom(vue.resolveDynamicComponent("mp-html"), __easycom_0$r);
  38752. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  38753. return $setup.state.title && !$props.type ? (vue.openBlock(), vue.createBlock(_component_s_layout, {
  38754. key: 0,
  38755. class: "set-wrap",
  38756. title: $setup.state.title,
  38757. bgStyle: { color: "#FFF" }
  38758. }, {
  38759. default: vue.withCtx(() => [
  38760. vue.createElementVNode("view", { class: "ss-p-30" }, [
  38761. vue.createVNode(_component_mp_html, {
  38762. class: "richtext",
  38763. content: $setup.state.content
  38764. }, null, 8, ["content"])
  38765. ])
  38766. ]),
  38767. _: 1
  38768. /* STABLE */
  38769. }, 8, ["title"])) : (vue.openBlock(), vue.createBlock(_component_mp_html, {
  38770. key: 1,
  38771. class: "richtext",
  38772. content: $setup.state.content
  38773. }, null, 8, ["content"]));
  38774. }
  38775. const PagesPublicRichtext = /* @__PURE__ */ _export_sfc(_sfc_main$2R, [["render", _sfc_render$2Q], ["__scopeId", "data-v-bc551482"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/public/richtext.vue"]]);
  38776. const _imports_0$8 = "/static/firstIndex/clcg.png";
  38777. const _imports_1$4 = "/static/firstIndex/pt.svg";
  38778. const _imports_2$2 = "/static/firstIndex/product.svg";
  38779. const _imports_3$1 = "/static/firstIndex/news.svg";
  38780. const _imports_4 = "/static/firstIndex/shop.svg";
  38781. const _imports_0$7 = "/static/firstIndex/youjiantou.png";
  38782. const _sfc_main$2Q = {
  38783. __name: "FirstIndex",
  38784. setup(__props, { expose: __expose }) {
  38785. __expose();
  38786. uni.hideTabBar();
  38787. const appInfo = vue.computed(() => sheep$1.$store("app").info);
  38788. const {
  38789. safeArea
  38790. } = sheep$1.$platform.device;
  38791. const pageHeight = vue.computed(() => safeArea.height - 45);
  38792. const tabbar = vue.ref({
  38793. "theme": "red",
  38794. "style": {
  38795. "bgType": "color",
  38796. "bgColor": "#323b4e",
  38797. "color": "#e6e6e5",
  38798. "activeColor": "#1fa380"
  38799. },
  38800. "items": [
  38801. {
  38802. "text": t$6("common.home"),
  38803. "url": "/pages/index/FirstIndex",
  38804. "iconUrl": sheep$1.$url.static("/static/firstIndex/index.svg"),
  38805. "activeIconUrl": sheep$1.$url.static("/static/firstIndex/index-active.svg")
  38806. },
  38807. {
  38808. "text": t$6("common.activities"),
  38809. "url": "/pages/index/FirstActivity",
  38810. "iconUrl": sheep$1.$url.static("/static/firstIndex/activity.svg"),
  38811. "activeIconUrl": sheep$1.$url.static("/static/firstIndex/activity-active.svg")
  38812. },
  38813. {
  38814. "text": t$6("common.videos"),
  38815. "url": "/pages/index/FirstVideo",
  38816. "iconUrl": sheep$1.$url.static("/static/firstIndex/video.svg"),
  38817. "activeIconUrl": sheep$1.$url.static("/static/firstIndex/video-active.svg")
  38818. },
  38819. {
  38820. "text": t$6("common.mall"),
  38821. "url": "/pages/index/index",
  38822. "iconUrl": sheep$1.$url.static("/static/firstIndex/shop.svg"),
  38823. "activeIconUrl": sheep$1.$url.static("/static/firstIndex/shop-active.svg")
  38824. }
  38825. ]
  38826. });
  38827. const lunbo = vue.ref({
  38828. "type": "default",
  38829. "indicator": "dot",
  38830. "autoplay": false,
  38831. "interval": 3,
  38832. "items": [],
  38833. "style": {
  38834. "bgType": "color",
  38835. "bgColor": "#fff",
  38836. "marginBottom": 8
  38837. }
  38838. });
  38839. const gonggao = vue.ref({
  38840. text: "",
  38841. title: ""
  38842. });
  38843. const state = vue.ref({
  38844. ptjj: {
  38845. title: ""
  38846. },
  38847. cyjs: {
  38848. title: ""
  38849. },
  38850. xwdt: {
  38851. title: "",
  38852. image: ""
  38853. }
  38854. });
  38855. onLoad(async () => {
  38856. const {
  38857. code: code2,
  38858. data
  38859. } = await ArticleApi.getHomeList();
  38860. formatAppLog("log", "at pages/index/FirstIndex.vue:160", data);
  38861. lunbo.value.items = data.slideshowArticleList.map((article) => ({
  38862. type: "img",
  38863. imgUrl: article.picUrl,
  38864. url: "/pages/public/richtext",
  38865. urlParams: {
  38866. title: article.title
  38867. },
  38868. videoUrl: "",
  38869. title: article.title
  38870. }));
  38871. gonggao.value.text = data.announcement.content;
  38872. gonggao.value.title = data.announcement.title;
  38873. state.value.ptjj.title = data.ptBriefIntroduction.title;
  38874. state.value.cyjs.title = data.industryIntroduction.title;
  38875. state.value.xwdt.title = data.dynamicNews.title;
  38876. state.value.xwdt.image = data.dynamicNews.picUrl;
  38877. });
  38878. const __returned__ = { appInfo, safeArea, pageHeight, tabbar, lunbo, gonggao, state, computed: vue.computed, ref: vue.ref, get onLoad() {
  38879. return onLoad;
  38880. }, get onPageScroll() {
  38881. return onPageScroll;
  38882. }, get onPullDownRefresh() {
  38883. return onPullDownRefresh;
  38884. }, get sheep() {
  38885. return sheep$1;
  38886. }, get $share() {
  38887. return $share;
  38888. }, get isAndroid() {
  38889. return isAndroid;
  38890. }, get getAndroidJiGuangId() {
  38891. return getAndroidJiGuangId;
  38892. }, get showWalletModal() {
  38893. return showWalletModal;
  38894. }, get colseWalletModal() {
  38895. return colseWalletModal;
  38896. }, get ArticleApi() {
  38897. return ArticleApi;
  38898. }, Richtext: PagesPublicRichtext, get t() {
  38899. return t$6;
  38900. } };
  38901. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  38902. return __returned__;
  38903. }
  38904. };
  38905. function _sfc_render$2P(_ctx, _cache, $props, $setup, $data, $options) {
  38906. const _component_s_image_banner = resolveEasycom(vue.resolveDynamicComponent("s-image-banner"), __easycom_8$1);
  38907. const _component_s_tabbar = resolveEasycom(vue.resolveDynamicComponent("s-tabbar"), __easycom_3$7);
  38908. return vue.openBlock(), vue.createElementBlock("view", {
  38909. class: "page-body",
  38910. style: { "background": "#111521" }
  38911. }, [
  38912. vue.createElementVNode("view", { class: "header" }, [
  38913. vue.createElementVNode("view", { class: "logo" }, [
  38914. vue.createElementVNode("image", {
  38915. class: "",
  38916. src: _imports_0$8,
  38917. mode: "aspectFit"
  38918. })
  38919. ]),
  38920. vue.createElementVNode("view", { class: "language" })
  38921. ]),
  38922. vue.createCommentVNode(" 轮播 "),
  38923. vue.createVNode(_component_s_image_banner, {
  38924. data: $setup.lunbo,
  38925. styles: _ctx.styles,
  38926. class: "lunbo",
  38927. height: "300"
  38928. }, null, 8, ["data", "styles"]),
  38929. vue.createCommentVNode(` @click="sheep.$router.go('/pages/public/richtext', {title:gonggao.title});" `),
  38930. vue.createElementVNode("view", { class: "gonggao" }, [
  38931. vue.createElementVNode("view", { class: "gonggao-item" }, " 使命:共建平台,共创价值,共享利益。 "),
  38932. vue.createElementVNode("view", { class: "gonggao-item" }, " 愿景:引领共享电商,三方共赢,推动创新。 "),
  38933. vue.createElementVNode("view", { class: "gonggao-item" }, " 价值观:产品为王、诚信透明、共创共享共赢 ")
  38934. ]),
  38935. vue.createElementVNode("view", { class: "nav" }, [
  38936. vue.createElementVNode("view", {
  38937. class: "card",
  38938. onClick: _cache[0] || (_cache[0] = ($event) => {
  38939. $setup.sheep.$router.go("/pages/public/richtext", { title: $setup.state.ptjj.title });
  38940. })
  38941. }, [
  38942. vue.createElementVNode("image", {
  38943. src: _imports_1$4,
  38944. mode: "aspectFit"
  38945. }),
  38946. vue.createTextVNode(
  38947. " " + vue.toDisplayString($setup.t("common.platform_intro")),
  38948. 1
  38949. /* TEXT */
  38950. )
  38951. ]),
  38952. vue.createElementVNode("view", {
  38953. class: "card",
  38954. onClick: _cache[1] || (_cache[1] = ($event) => {
  38955. $setup.sheep.$router.go("/pages/public/richtext", { title: $setup.state.cyjs.title });
  38956. })
  38957. }, [
  38958. vue.createElementVNode("image", {
  38959. src: _imports_2$2,
  38960. mode: "aspectFit"
  38961. }),
  38962. vue.createTextVNode(
  38963. " " + vue.toDisplayString($setup.t("common.industry_intro")),
  38964. 1
  38965. /* TEXT */
  38966. )
  38967. ]),
  38968. vue.createElementVNode("view", {
  38969. class: "card",
  38970. onClick: _cache[2] || (_cache[2] = ($event) => {
  38971. $setup.sheep.$router.go("/pages/index/FirstList", { categoryId: 11 });
  38972. })
  38973. }, [
  38974. vue.createElementVNode("image", {
  38975. src: _imports_3$1,
  38976. mode: "aspectFit"
  38977. }),
  38978. vue.createTextVNode(
  38979. " " + vue.toDisplayString($setup.t("common.latest_news")),
  38980. 1
  38981. /* TEXT */
  38982. )
  38983. ]),
  38984. vue.createElementVNode("view", {
  38985. class: "card",
  38986. onClick: _cache[3] || (_cache[3] = ($event) => $setup.sheep.$router.go("/pages/index/index"))
  38987. }, [
  38988. vue.createElementVNode("image", {
  38989. src: _imports_4,
  38990. mode: "aspectFit"
  38991. }),
  38992. vue.createTextVNode(
  38993. " " + vue.toDisplayString($setup.t("common.shared_mall")),
  38994. 1
  38995. /* TEXT */
  38996. )
  38997. ])
  38998. ]),
  38999. vue.createElementVNode(
  39000. "view",
  39001. {
  39002. class: "news",
  39003. style: vue.normalizeStyle([{ backgroundImage: `url(${$setup.state.xwdt.image})` }, { "background-size": "cover" }]),
  39004. onClick: _cache[5] || (_cache[5] = ($event) => {
  39005. $setup.sheep.$router.go("/pages/public/richtext", { title: $setup.state.xwdt.title });
  39006. })
  39007. },
  39008. [
  39009. vue.createElementVNode("view", { class: "news-bottom" }, [
  39010. vue.createElementVNode(
  39011. "text",
  39012. null,
  39013. vue.toDisplayString($setup.state.xwdt.title),
  39014. 1
  39015. /* TEXT */
  39016. ),
  39017. vue.createElementVNode("view", {
  39018. onClick: _cache[4] || (_cache[4] = ($event) => {
  39019. $setup.sheep.$router.go("/pages/index/FirstList", { categoryId: 6 });
  39020. })
  39021. }, [
  39022. vue.createElementVNode("image", {
  39023. src: _imports_0$7,
  39024. mode: "aspectFit"
  39025. })
  39026. ])
  39027. ])
  39028. ],
  39029. 4
  39030. /* STYLE */
  39031. ),
  39032. vue.createVNode(_component_s_tabbar, {
  39033. path: "/pages/index/FirstIndex",
  39034. tabbar: $setup.tabbar
  39035. }, null, 8, ["tabbar"])
  39036. ]);
  39037. }
  39038. const PagesIndexFirstIndex = /* @__PURE__ */ _export_sfc(_sfc_main$2Q, [["render", _sfc_render$2P], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/index/FirstIndex.vue"]]);
  39039. const _sfc_main$2P = {
  39040. __name: "s-empty",
  39041. props: {
  39042. // 图标
  39043. icon: {
  39044. type: String,
  39045. default: ""
  39046. },
  39047. // 描述
  39048. text: {
  39049. type: String,
  39050. default: ""
  39051. },
  39052. // 是否显示button
  39053. showAction: {
  39054. type: Boolean,
  39055. default: false
  39056. },
  39057. // button 文字
  39058. actionText: {
  39059. type: String,
  39060. default: ""
  39061. },
  39062. // 链接
  39063. actionUrl: {
  39064. type: String,
  39065. default: ""
  39066. },
  39067. // 间距
  39068. paddingTop: {
  39069. type: String,
  39070. default: "260"
  39071. },
  39072. //主题色
  39073. buttonColor: {
  39074. type: String,
  39075. default: "var(--ui-BG-Main)"
  39076. }
  39077. },
  39078. emits: ["clickAction"],
  39079. setup(__props, { expose: __expose, emit: __emit }) {
  39080. __expose();
  39081. vue.useCssVars((_ctx) => ({
  39082. "5cc178a8-buttonColor": __props.buttonColor
  39083. }));
  39084. const props = __props;
  39085. const emits = __emit;
  39086. function clickAction() {
  39087. if (props.actionUrl !== "") {
  39088. sheep$1.$router.go(props.actionUrl);
  39089. }
  39090. emits("clickAction");
  39091. }
  39092. const __returned__ = { props, emits, clickAction, get sheep() {
  39093. return sheep$1;
  39094. } };
  39095. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  39096. return __returned__;
  39097. }
  39098. };
  39099. function _sfc_render$2O(_ctx, _cache, $props, $setup, $data, $options) {
  39100. return vue.openBlock(), vue.createElementBlock(
  39101. "view",
  39102. {
  39103. class: "ss-flex-col ss-col-center ss-row-center empty-box",
  39104. style: vue.normalizeStyle([{ paddingTop: $props.paddingTop + "rpx" }])
  39105. },
  39106. [
  39107. vue.createElementVNode("view", { class: "" }, [
  39108. vue.createElementVNode("image", {
  39109. class: "empty-icon",
  39110. src: $props.icon,
  39111. mode: "widthFix"
  39112. }, null, 8, ["src"])
  39113. ]),
  39114. vue.createElementVNode("view", { class: "empty-text ss-m-t-28 ss-m-b-40" }, [
  39115. $props.text !== "" ? (vue.openBlock(), vue.createElementBlock(
  39116. "text",
  39117. { key: 0 },
  39118. vue.toDisplayString($props.text),
  39119. 1
  39120. /* TEXT */
  39121. )) : vue.createCommentVNode("v-if", true)
  39122. ]),
  39123. $props.showAction ? (vue.openBlock(), vue.createElementBlock(
  39124. "button",
  39125. {
  39126. key: 0,
  39127. class: "ss-reset-button empty-btn",
  39128. onClick: $setup.clickAction
  39129. },
  39130. vue.toDisplayString($props.actionText),
  39131. 1
  39132. /* TEXT */
  39133. )) : vue.createCommentVNode("v-if", true)
  39134. ],
  39135. 4
  39136. /* STYLE */
  39137. );
  39138. }
  39139. const __easycom_2$6 = /* @__PURE__ */ _export_sfc(_sfc_main$2P, [["render", _sfc_render$2O], ["__scopeId", "data-v-5cc178a8"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-empty/s-empty.vue"]]);
  39140. const en$1 = {
  39141. "uni-load-more.contentdown": "Pull up to show more",
  39142. "uni-load-more.contentrefresh": "loading...",
  39143. "uni-load-more.contentnomore": "No more data"
  39144. };
  39145. const zhHans$1 = {
  39146. "uni-load-more.contentdown": "上拉显示更多",
  39147. "uni-load-more.contentrefresh": "正在加载...",
  39148. "uni-load-more.contentnomore": "没有更多数据了"
  39149. };
  39150. const zhHant$1 = {
  39151. "uni-load-more.contentdown": "上拉顯示更多",
  39152. "uni-load-more.contentrefresh": "正在加載...",
  39153. "uni-load-more.contentnomore": "沒有更多數據了"
  39154. };
  39155. const messages$1 = {
  39156. en: en$1,
  39157. "zh-Hans": zhHans$1,
  39158. "zh-Hant": zhHant$1
  39159. };
  39160. let platform$3;
  39161. setTimeout(() => {
  39162. platform$3 = uni.getSystemInfoSync().platform;
  39163. }, 16);
  39164. const {
  39165. t: t$4
  39166. } = initVueI18n(messages$1);
  39167. const _sfc_main$2O = {
  39168. name: "UniLoadMore",
  39169. emits: ["clickLoadMore"],
  39170. props: {
  39171. status: {
  39172. // 上拉的状态:more-loading前;loading-loading中;noMore-没有更多了
  39173. type: String,
  39174. default: "more"
  39175. },
  39176. showIcon: {
  39177. type: Boolean,
  39178. default: true
  39179. },
  39180. iconType: {
  39181. type: String,
  39182. default: "auto"
  39183. },
  39184. iconSize: {
  39185. type: Number,
  39186. default: 24
  39187. },
  39188. color: {
  39189. type: String,
  39190. default: "#777777"
  39191. },
  39192. contentText: {
  39193. type: Object,
  39194. default() {
  39195. return {
  39196. contentdown: "",
  39197. contentrefresh: "",
  39198. contentnomore: ""
  39199. };
  39200. }
  39201. },
  39202. showText: {
  39203. type: Boolean,
  39204. default: true
  39205. }
  39206. },
  39207. data() {
  39208. return {
  39209. webviewHide: false,
  39210. platform: platform$3,
  39211. imgBase64: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzlBMzU3OTlEOUM0MTFFOUI0NTZDNERBQURBQzI4RkUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzlBMzU3OUFEOUM0MTFFOUI0NTZDNERBQURBQzI4RkUiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDOUEzNTc5N0Q5QzQxMUU5QjQ1NkM0REFBREFDMjhGRSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDOUEzNTc5OEQ5QzQxMUU5QjQ1NkM0REFBREFDMjhGRSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pt+ALSwAAA6CSURBVHja1FsLkFZVHb98LM+F5bHL8khA1iSeiyQBCRM+YGqKUnnJTDLGI0BGZlKDIU2MMglUiDApEZvSsZnQtBRJtKwQNKQMFYeRDR10WOLd8ljYXdh+v8v5fR3Od+797t1dnOnO/Ofce77z+J//+b/P+ZqtXbs2sJ9MJhNUV1cHJ06cCJo3bx7EPc2aNcvpy7pWrVoF+/fvDyoqKoI2bdoE9fX1F7TjN8a+EXBn/fkfvw942Tf+wYMHg9mzZwfjxo0LDhw4EPa1x2MbFw/fOGfPng1qa2tzcCkILsLDydq2bRsunpOTMM7TD/W/tZDZhPdeKD+yGxHhdu3aBV27dg3OnDlzMVANMheLAO3btw8KCwuDmpoaX5OxbgUIMEq7K8IcPnw4KCsrC/r37x8cP378/4cAXAB3vqSkJMuiDhTkw+XcuXNhOWbMmKBly5YhUT8xArhyFvP0BfwRsAuwxJZJsm/nzp2DTp06he/OU+cZ64K6o0ePBkOHDg2GDx8e6gEbJ5Q/NHNuAJQ1hgBeHUDlR7nVTkY8rQAvAi4z34vR/mPs1FoRsaCgIJThI0eOBC1atEiFGGV+5MiRoS45efJkqFjJFXV1dQuA012m2WcwTw98fy6CqBdsaiIO4CScrGPHjvk4odhavPquRtFWXEC25VgkREKOCh/qDSq+vn37htzD/mZTOmOc5U7zKzBPEedygWshcDyWvs30igAbU+6oyMgJBCFhwQE0fccxN60Ay9iebbjoDh06hMowjQxT4fXq1SskArmHZpkArvixp/kWzHdMeArExSJEaiXIjjRjRJ4DaAGWpibLzXN3Fm1vA5teBgh3j1Rv3bp1YgKwPdmf2p9zcyNYYgPKMfY0T5f5nNYdw158nJ8QawW4CLKwiOBSEgO/hok2eBydR+3dYH+PLxA5J8Vv0KBBwenTp0P2JWAx6+yFEBfs8lMY+y0SWMBNI9E4ThKi58VKTg3FQZS1RQF1cz27eC0QHMu+3E0SkUowjhVt5VdaWhp07949ZHv2Qd1EjDXM2cla1M0nl3GxAs3J9yREzyTdFVKVFOaE9qRA8GM0WebRuo9JGZKA7Mv2SeS/Z8+eoQ9BArMfFrLGo6jvxbhHbJZnKX2Rzz1O7QhJJ9Cs2ZMaWIyq/zhdeqPNfIoHd58clIQD+JSXl4dKlyIAuBdVXZwFVWKspSSoxE++h8x4k3uCnEhE4I5KwRiFWGOU0QWKiCYLbdoRMRKAu2kQ9vkfLU6dOhX06NEjlH+yMRZSinnuyWnYosVcji8CEA/6Cg2JF+IIUBqnGKUTCNwtwBN4f89RiK1R96DEgO2o0NDmtEdvVFdVVYV+P3UAPUEs6GFwV3PHmXkD4vh74iDFJysVI/MlaQhwKeBNTLYX5VuA8T4/gZxA4MRGFxDB6R7OmYPfyykGRJbyie+XnGYnQIC/coH9+vULiYrxrkL9ZA9+0ykaHIfEpM7ge8TiJ2CsHYwyMfafAF1yCGBHYIbCVDjDjKt7BeB51D+LgQa6OkG7IDYEEtvQ7lnXLKLtLdLuJBpE4gPUXcW2+PkZwOex+4cGDhwYDBkyRL7/HFcEwUGPo/8uWRUpYnfxGHco8HkewLHLyYmAawAPuIFZxhOpDfJQ8gbUv41yORAptMWBNr6oqMhWird5+u+iHmBb2nhjDV7HWBNQTgK8y11l5NetWzc5ULscAtSj7nbNI0skhWeUZCc0W4nyH/jO4Vz0u1IeYhbk4AiwM6tjxIWByHsoZ9qcIBPJd/y+DwPfBESOmCa/QF3WiZHucLlEDpNxcNhmheEOPgdQNx6/VZFQzFZ5TN08AHXQt2Ii3EdyFuUsPtTcGPhW5iMiCNELvz+Gdn9huG4HUJaW/w3g0wxV0XaG7arG2WeKiUWYM4Y7GO5ezshTARbbWGw/DvXkpp/ivVvE0JVoMxN4rpGzJMhE5Pl+xlATsDIqikP9F9D2z3h9nOksEUFhK+qO4rcPkoalMQ/HqJLIyb3F3JdjrCcw1yZ8joyJLR5gCo54etlag7qIoeNh1N1BRYj3DTFJ0elotxPlVzkGuYAmL0VSJVGAJA41c4Z6A3BzTLfn0HYwYKEI6CUAMzZEWvLsIcQOo1AmmyyM72nHJCfYsogflGV6jEk9vyQZXSuq6w4c16NsGcGZbwOPr+H1RkOk2LEzjNepxQkihHSCQ4ynAYNRx2zMKV92CQMWqj8J0BRE8EShxRFN6YrfCRhC0x3r/Zm4IbQCcmJoV0kMamllccR6FjHqUC5F2R/wS2dcymOlfAKOS4KmzQb5cpNC2MC7JhVn5wjXoJ44rYhLh8n0eXOCorJxa7POjbSlCGVczr34/RsAmrcvo9s+wGp3tzVhntxiXiJ4nvEYb4FJkf0O8HocAePmLvCxnL0AORraVekJk6TYjDabRVXfRE2lCN1h6ZQRN1+InUbsCpKwoBZHh0dODN9JBCUffItXxEavTQkUtnfTVAplCWL3JISz29h4NjotnuSsQKJCk8dF+kJR6RARjrqFVmfPnj3ZbK8cIJ0msd6jgHPGtfVTQ8VLmlvh4mct9sobRmPic0DyDQQnx/NlfYUgyz59+oScsH379pAwXABD32nTpoUHIToESeI5mnbE/UqDdyLcafEBf2MCqgC7NwxIbMREJQ0g4D4sfJwnD+AmRrII05cfMWJE+L1169bQr+fip06dGp4oJ83lmYd5wj/EmMa4TaHivo4EeCguYZBnkB5g2aWA69OIEnUHOaGysjIYMGBAMGnSpODYsWPZwCpFmm4lNq+4gSLQA7jcX8DwtjEyRC8wjabnXEx9kfWnTJkSJkAo90xpJVV+FmcVNeYAF5zWngS4C4O91MBxmAv8blLEpbjI5sz9MTdAhcgkCT1RO8mZkAjfiYpTEvStAS53Uw1vAiUGgZ3GpuQEYvoiBqlIan7kSDHnTwJQFNiPu0+5VxCVYhcZIjNrdXUDdp+Eq5AZ3Gkg8QAyVZRZIk4Tl4QAbF9cXJxNYZMAtAokgs4BrNxEpCtteXg7DDTMDKYNSuQdKsnJBek7HxewvxaosWxLYXtw+cJp18217wql4aKCfBNoEu0O5VU+PhctJ0YeXD4C6JQpyrlpSLTojpGGGN5YwNziChdIZLk4lvLcFJ9jMX3QdiImY9bmGQU+TRUL5CHITTRlgF8D9ouD1MfmLoEPl5xokIumZ2cfgMpHt47IW9N64Hsh7wQYYjyIugWuF5fCqYncXRd5vPMWyizzvhi/32+nvG0dZc9vR6fZOu0md5e+uC408FvKSIOZwXlGvxPv95izA2Vtvg1xKFWARI+vMX66HUhpQQb643uW1bSjuTWyw2SBvDrBvjFic1eGGlz5esq3ko9uSIlBRqPuFcCv8F4WIcN12nVaBd0SaYwI6PDDImR11JkqgHcPmQssjxIn6bUshygDFJUTxPMpHk+jfjPgupgdnYV2R/g7xSjtpah8RJBewhwf0gGK6XI92u4wXFEU40afJ4DN4h5LcAd+40HI3JgJecuT0c062W0i2hQJUTcxan3/CMW1PF2K6bbA+Daz4xRs1D3Br1Cm0OihKCqizW78/nXAF/G5TXrEcVzaNMH6CyMswqsAHqDyDLEyou8lwOXnKF8DjI6KjV3KzMBiXkDH8ij/H214J5A596ekrZ3F0zXlWeL7+P5eUrNo3/QwC15uxthuzidy7DzKRwEDaAViiDgKbTbz7CJnzo0bN7pIfIiid8SuPwn25o3QCmpnyjlZkyxPP8EomCJzrGb7GJMx7tNsq4MT2xMUYaiErZOluTzKsnz3gwCeCZyVRZJfYplNEokEjwrPtxlxjeYAk+F1F74VAzPxQRNYYdtpOUvWs8J1sGhBJMNsb7igN8plJs1eSmLIhLKE4rvaCX27gOhLpLOsIzJ7qn/i+wZzcvSOZ23/du8TZjwV8zHIXoP4R3ifBxiFz1dcVpa3aPntPE+c6TmIWE9EtcMmAcPdWAhYhAXxcLOQi9L1WhD1Sc8p1d2oL7XGiRKp8F4A2i8K/nfI+y/gsTDJ/YC/8+AD5Uh04KHiGl+cIFPnBDDrPMjwRGkLXyxO4VGbfQWnDH2v0bVWE3C9QOXlepbgjEfIJQI6XDG3z5ahD9cw2pS78ipB85wyScNTvsVzlzzhL8/jRrnmVjfFJK/m3m4nj9vbgQTguT8XZTjsm672R5uJKEaQmBI/c58gyus8ZDagLpEVSJBIyHp4jn++xqPV71OgQgJYEWOtZ/haxRtKmWOBu8xdBLftWltsY84zE6WIEy/eIOWL+BaayMx+KHtL7EAkqdNDLiEXmEMUHniedtJqg9HmZtfvt26vNi0BdG3Ft3g8ZOf7PAu59TxtzivLNIekyi+wD1i8CuUiD9FXAa8C+/xS3JPmZnomyc7H+fb4/Se0bk41Fel621r4cgVxbq91V4jVqwB7HTe2M7jgB+QWHavZkDRPmZcASoZEmBx6i75bGjPcMdL4/VKGFAGWZkGzPG0XAbdL9A81G5LOmUnC9hHKJeO7dcUMjblSl12867ElFTtaGl20xvvLGPdVz/8TVuU7y0x1PG7vtNg24oz9Uo/Z412++VFWI7Fcog9tu9Lm6gvRmIPv9x1xmQAu6RDkXtbOtlGEmpgD5Nvnyc0dcv0EE6cfdi1HmhMf9wDF3k3gtRvEedhxjpgfqPb9PU9iEJHnyOUA7bQUXh6kq/D7l2iTjWv7XOD530BDr8jIrus+srXjt4MzumJMHuTsBa63YKE1+RR5lBjEikCCnWKWiHdzOgKO+nRIBAF88za/IFmJ3eMZov4CYxGBabcpGL8EYx+SeMXJeRwHNsV/h+vdxeuhEpN3ZyNY78Gm2fknJxVGhyjixPiQvVkNzT1elD9Py/aTAL64Hb9vcYmC9zfdXdT/C1LeGbg4rnBaAihDFJH12W5ulfNCNe/xTsP3bp8ikzJs5BF+5PNfAQYAPaseTdsEcaYAAAAASUVORK5CYII="
  39212. };
  39213. },
  39214. computed: {
  39215. iconSnowWidth() {
  39216. return (Math.floor(this.iconSize / 24) || 1) * 2;
  39217. },
  39218. contentdownText() {
  39219. return this.contentText.contentdown || t$4("uni-load-more.contentdown");
  39220. },
  39221. contentrefreshText() {
  39222. return this.contentText.contentrefresh || t$4("uni-load-more.contentrefresh");
  39223. },
  39224. contentnomoreText() {
  39225. return this.contentText.contentnomore || t$4("uni-load-more.contentnomore");
  39226. }
  39227. },
  39228. mounted() {
  39229. var pages2 = getCurrentPages();
  39230. var page2 = pages2[pages2.length - 1];
  39231. var currentWebview = page2.$getAppWebview();
  39232. currentWebview.addEventListener("hide", () => {
  39233. this.webviewHide = true;
  39234. });
  39235. currentWebview.addEventListener("show", () => {
  39236. this.webviewHide = false;
  39237. });
  39238. },
  39239. methods: {
  39240. onClick() {
  39241. this.$emit("clickLoadMore", {
  39242. detail: {
  39243. status: this.status
  39244. }
  39245. });
  39246. }
  39247. }
  39248. };
  39249. function _sfc_render$2N(_ctx, _cache, $props, $setup, $data, $options) {
  39250. return vue.openBlock(), vue.createElementBlock("view", {
  39251. class: "uni-load-more",
  39252. onClick: _cache[0] || (_cache[0] = (...args) => $options.onClick && $options.onClick(...args))
  39253. }, [
  39254. !$data.webviewHide && ($props.iconType === "circle" || $props.iconType === "auto" && $data.platform === "android") && $props.status === "loading" && $props.showIcon ? (vue.openBlock(), vue.createElementBlock(
  39255. "view",
  39256. {
  39257. key: 0,
  39258. style: vue.normalizeStyle({ width: $props.iconSize + "px", height: $props.iconSize + "px" }),
  39259. class: "uni-load-more__img uni-load-more__img--android-MP"
  39260. },
  39261. [
  39262. vue.createElementVNode(
  39263. "view",
  39264. {
  39265. class: "uni-load-more__img-icon",
  39266. style: vue.normalizeStyle({ borderTopColor: $props.color, borderTopWidth: $props.iconSize / 12 })
  39267. },
  39268. null,
  39269. 4
  39270. /* STYLE */
  39271. ),
  39272. vue.createElementVNode(
  39273. "view",
  39274. {
  39275. class: "uni-load-more__img-icon",
  39276. style: vue.normalizeStyle({ borderTopColor: $props.color, borderTopWidth: $props.iconSize / 12 })
  39277. },
  39278. null,
  39279. 4
  39280. /* STYLE */
  39281. ),
  39282. vue.createElementVNode(
  39283. "view",
  39284. {
  39285. class: "uni-load-more__img-icon",
  39286. style: vue.normalizeStyle({ borderTopColor: $props.color, borderTopWidth: $props.iconSize / 12 })
  39287. },
  39288. null,
  39289. 4
  39290. /* STYLE */
  39291. )
  39292. ],
  39293. 4
  39294. /* STYLE */
  39295. )) : !$data.webviewHide && $props.status === "loading" && $props.showIcon ? (vue.openBlock(), vue.createElementBlock(
  39296. "view",
  39297. {
  39298. key: 1,
  39299. style: vue.normalizeStyle({ width: $props.iconSize + "px", height: $props.iconSize + "px" }),
  39300. class: "uni-load-more__img uni-load-more__img--ios-H5"
  39301. },
  39302. [
  39303. vue.createElementVNode("image", {
  39304. src: $data.imgBase64,
  39305. mode: "widthFix"
  39306. }, null, 8, ["src"])
  39307. ],
  39308. 4
  39309. /* STYLE */
  39310. )) : vue.createCommentVNode("v-if", true),
  39311. $props.showText ? (vue.openBlock(), vue.createElementBlock(
  39312. "text",
  39313. {
  39314. key: 2,
  39315. class: "uni-load-more__text",
  39316. style: vue.normalizeStyle({ color: $props.color })
  39317. },
  39318. vue.toDisplayString($props.status === "more" ? $options.contentdownText : $props.status === "loading" ? $options.contentrefreshText : $options.contentnomoreText),
  39319. 5
  39320. /* TEXT, STYLE */
  39321. )) : vue.createCommentVNode("v-if", true)
  39322. ]);
  39323. }
  39324. const __easycom_2$5 = /* @__PURE__ */ _export_sfc(_sfc_main$2O, [["render", _sfc_render$2N], ["__scopeId", "data-v-9245e42c"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue"]]);
  39325. const _sfc_main$2N = {
  39326. __name: "FirstList",
  39327. props: {
  39328. // 是否显示tabbar
  39329. tabbar: {
  39330. type: Boolean,
  39331. default: true
  39332. },
  39333. // 是否显示tabbar
  39334. categoryId: {
  39335. type: Number,
  39336. default: 0
  39337. },
  39338. type: {
  39339. type: String,
  39340. default: "articleCard"
  39341. }
  39342. },
  39343. setup(__props, { expose: __expose }) {
  39344. __expose();
  39345. uni.hideTabBar();
  39346. const appInfo = vue.computed(() => sheep$1.$store("app").info);
  39347. const {
  39348. safeArea
  39349. } = sheep$1.$platform.device;
  39350. const pageHeight = vue.computed(() => safeArea.height - 45);
  39351. const props = __props;
  39352. const tabbar = vue.ref({
  39353. "theme": "red",
  39354. "style": {
  39355. "bgType": "color",
  39356. "bgColor": "#323b4e",
  39357. "color": "#e6e6e5",
  39358. "activeColor": "#1fa380"
  39359. },
  39360. "items": [
  39361. {
  39362. "text": t$6("common.home"),
  39363. "url": "/pages/index/FirstIndex",
  39364. "iconUrl": sheep$1.$url.static("/static/firstIndex/index.svg"),
  39365. "activeIconUrl": sheep$1.$url.static("/static/firstIndex/index-active.svg")
  39366. },
  39367. {
  39368. "text": t$6("common.activities"),
  39369. "url": "/pages/index/FirstActivity",
  39370. "iconUrl": sheep$1.$url.static("/static/firstIndex/activity.svg"),
  39371. "activeIconUrl": sheep$1.$url.static("/static/firstIndex/activity-active.svg")
  39372. },
  39373. {
  39374. "text": t$6("common.videos"),
  39375. "url": "/pages/index/FirstVideo",
  39376. "iconUrl": sheep$1.$url.static("/static/firstIndex/video.svg"),
  39377. "activeIconUrl": sheep$1.$url.static("/static/firstIndex/video-active.svg")
  39378. },
  39379. {
  39380. "text": t$6("common.mall"),
  39381. "url": "/pages/index/index",
  39382. "iconUrl": sheep$1.$url.static("/static/firstIndex/shop.svg"),
  39383. "activeIconUrl": sheep$1.$url.static("/static/firstIndex/shop-active.svg")
  39384. }
  39385. ]
  39386. });
  39387. const state = vue.reactive({
  39388. categoryId: 0,
  39389. pagination: {
  39390. list: [],
  39391. current_page: 1,
  39392. total: 1,
  39393. last_page: 1
  39394. },
  39395. loadStatus: ""
  39396. });
  39397. async function getArticleList(page2 = 1, list_rows = 5) {
  39398. state.loadStatus = "loading";
  39399. let { code: code2, data } = await ArticleApi.getArticleByCategory({ pageNo: page2, pageSize: list_rows, categoryId: state.categoryId });
  39400. if (code2 !== 0) {
  39401. return;
  39402. }
  39403. let articleList = _$1.concat(state.pagination.list, data.list);
  39404. state.pagination.list = articleList;
  39405. state.pagination.total = data.total;
  39406. state.pagination.last_page = Math.ceil(data.total / 5);
  39407. if (state.pagination.current_page < state.pagination.last_page) {
  39408. state.loadStatus = "more";
  39409. } else {
  39410. state.loadStatus = "noMore";
  39411. }
  39412. }
  39413. function loadMore() {
  39414. if (state.loadStatus !== "noMore") {
  39415. state.pagination.current_page += 1;
  39416. getArticleList(state.pagination.current_page);
  39417. }
  39418. }
  39419. onLoad(async (option) => {
  39420. if (option && option.categoryId) {
  39421. state.categoryId = option.categoryId;
  39422. } else {
  39423. state.categoryId = props.categoryId;
  39424. }
  39425. await getArticleList();
  39426. });
  39427. onReachBottom(() => {
  39428. loadMore();
  39429. });
  39430. onPullDownRefresh(() => {
  39431. state.pagination.list = [];
  39432. state.pagination.current_page = 1;
  39433. state.pagination.total = 1;
  39434. state.pagination.last_page = 1;
  39435. getArticleList();
  39436. setTimeout(function() {
  39437. uni.stopPullDownRefresh();
  39438. }, 800);
  39439. });
  39440. const __returned__ = { appInfo, safeArea, pageHeight, props, tabbar, state, getArticleList, loadMore, computed: vue.computed, ref: vue.ref, reactive: vue.reactive, get onLoad() {
  39441. return onLoad;
  39442. }, get onShow() {
  39443. return onShow;
  39444. }, get onReachBottom() {
  39445. return onReachBottom;
  39446. }, get onPullDownRefresh() {
  39447. return onPullDownRefresh;
  39448. }, get sheep() {
  39449. return sheep$1;
  39450. }, get $share() {
  39451. return $share;
  39452. }, get _() {
  39453. return _$1;
  39454. }, get isAndroid() {
  39455. return isAndroid;
  39456. }, get getAndroidJiGuangId() {
  39457. return getAndroidJiGuangId;
  39458. }, get showWalletModal() {
  39459. return showWalletModal;
  39460. }, get colseWalletModal() {
  39461. return colseWalletModal;
  39462. }, get t() {
  39463. return t$6;
  39464. }, get ArticleApi() {
  39465. return ArticleApi;
  39466. } };
  39467. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  39468. return __returned__;
  39469. }
  39470. };
  39471. function _sfc_render$2M(_ctx, _cache, $props, $setup, $data, $options) {
  39472. const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6);
  39473. const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5);
  39474. const _component_s_tabbar = resolveEasycom(vue.resolveDynamicComponent("s-tabbar"), __easycom_3$7);
  39475. return vue.openBlock(), vue.createElementBlock("view", {
  39476. class: "page-body",
  39477. style: { "background": "#f6f6f6" }
  39478. }, [
  39479. vue.createCommentVNode(' <video src="https://jvod.300hu.com/vod/product/4c17d312-2039-4668-8460-fd71540fb465/f0db5965187f4178bb7ed745bbff143c.mp4?info=50793-1054733-h264-aac" controls="true"></video>\n <video src="http://192.168.3.158:80/static/firstIndex/f0db5965187f4178bb7ed745bbff143c.mp4"></video>\n <video control s src="https://zxpt.newfeifan.cn/admin-api/infra/file/23/get/03488f68d9c9269a3eac373ab5309d574ffdd67e6882ec8a2f86f9b4766c91e7.mp4"></video>'),
  39480. $setup.state.pagination.total === 0 ? (vue.openBlock(), vue.createBlock(_component_s_empty, {
  39481. key: 0,
  39482. icon: "/static/data-empty.png",
  39483. text: $setup.t("common.no_data")
  39484. }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true),
  39485. $setup.state.pagination.total > 0 && $props.type == "activityCard" ? (vue.openBlock(), vue.createElementBlock("view", { key: 1 }, [
  39486. (vue.openBlock(true), vue.createElementBlock(
  39487. vue.Fragment,
  39488. null,
  39489. vue.renderList($setup.state.pagination.list, (item) => {
  39490. return vue.openBlock(), vue.createElementBlock("view", {
  39491. class: "article ss-r-10",
  39492. onClick: ($event) => {
  39493. $setup.sheep.$router.go("/pages/public/richtext", { title: item.title });
  39494. }
  39495. }, [
  39496. vue.createElementVNode(
  39497. "view",
  39498. { class: "title" },
  39499. vue.toDisplayString(item.title),
  39500. 1
  39501. /* TEXT */
  39502. ),
  39503. vue.createElementVNode("view", { class: "content" }, [
  39504. item.picUrl.trim() ? (vue.openBlock(), vue.createElementBlock("view", {
  39505. key: 0,
  39506. class: "image"
  39507. }, [
  39508. vue.createElementVNode("image", {
  39509. src: item.picUrl,
  39510. mode: "aspectFit",
  39511. class: "image-content"
  39512. }, null, 8, ["src"])
  39513. ])) : vue.createCommentVNode("v-if", true),
  39514. vue.createElementVNode(
  39515. "view",
  39516. { class: "desc" },
  39517. vue.toDisplayString(item.introduction),
  39518. 1
  39519. /* TEXT */
  39520. )
  39521. ])
  39522. ], 8, ["onClick"]);
  39523. }),
  39524. 256
  39525. /* UNKEYED_FRAGMENT */
  39526. ))
  39527. ])) : vue.createCommentVNode("v-if", true),
  39528. $setup.state.pagination.total > 0 && $props.type == "articleCard" ? (vue.openBlock(), vue.createElementBlock("view", { key: 2 }, [
  39529. (vue.openBlock(true), vue.createElementBlock(
  39530. vue.Fragment,
  39531. null,
  39532. vue.renderList($setup.state.pagination.list, (item) => {
  39533. return vue.openBlock(), vue.createElementBlock("view", {
  39534. class: "activity ss-r-10",
  39535. style: vue.normalizeStyle({ backgroundImage: `url(${item.picUrl})` }),
  39536. onClick: ($event) => {
  39537. $setup.sheep.$router.go("/pages/public/richtext", { title: item.title });
  39538. }
  39539. }, [
  39540. vue.createElementVNode("view", { class: "activity-bottom" }, [
  39541. vue.createElementVNode(
  39542. "text",
  39543. null,
  39544. vue.toDisplayString(item.title),
  39545. 1
  39546. /* TEXT */
  39547. ),
  39548. vue.createElementVNode("view", { class: "" }, [
  39549. vue.createElementVNode("image", {
  39550. src: _imports_0$7,
  39551. mode: "aspectFit"
  39552. })
  39553. ])
  39554. ])
  39555. ], 12, ["onClick"]);
  39556. }),
  39557. 256
  39558. /* UNKEYED_FRAGMENT */
  39559. ))
  39560. ])) : vue.createCommentVNode("v-if", true),
  39561. $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, {
  39562. key: 3,
  39563. status: $setup.state.loadStatus,
  39564. "content-text": { contentdown: "上拉加载更多" },
  39565. onClick: _ctx.loadmore
  39566. }, null, 8, ["status", "onClick"])) : vue.createCommentVNode("v-if", true),
  39567. vue.createVNode(_component_s_tabbar, {
  39568. path: "/pages/index/FirstIndex",
  39569. tabbar: $setup.tabbar
  39570. }, null, 8, ["tabbar"])
  39571. ]);
  39572. }
  39573. const PagesIndexFirstList = /* @__PURE__ */ _export_sfc(_sfc_main$2N, [["render", _sfc_render$2M], ["__scopeId", "data-v-cb78936e"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/index/FirstList.vue"]]);
  39574. const _sfc_main$2M = {
  39575. __name: "FirstActivity",
  39576. setup(__props, { expose: __expose }) {
  39577. __expose();
  39578. uni.hideTabBar();
  39579. const tabbar = vue.ref({
  39580. "theme": "red",
  39581. "style": {
  39582. "bgType": "color",
  39583. "bgColor": "#323b4e",
  39584. "color": "#e6e6e5",
  39585. "activeColor": "#1fa380"
  39586. },
  39587. "items": [
  39588. {
  39589. "text": t$6("common.home"),
  39590. "url": "/pages/index/FirstIndex",
  39591. "iconUrl": sheep$1.$url.static("/static/firstIndex/index.svg"),
  39592. "activeIconUrl": sheep$1.$url.static("/static/firstIndex/index-active.svg")
  39593. },
  39594. {
  39595. "text": t$6("common.activities"),
  39596. "url": "/pages/index/FirstActivity",
  39597. "iconUrl": sheep$1.$url.static("/static/firstIndex/activity.svg"),
  39598. "activeIconUrl": sheep$1.$url.static("/static/firstIndex/activity-active.svg")
  39599. },
  39600. {
  39601. "text": t$6("common.videos"),
  39602. "url": "/pages/index/FirstVideo",
  39603. "iconUrl": sheep$1.$url.static("/static/firstIndex/video.svg"),
  39604. "activeIconUrl": sheep$1.$url.static("/static/firstIndex/video-active.svg")
  39605. },
  39606. {
  39607. "text": t$6("common.mall"),
  39608. "url": "/pages/index/index",
  39609. "iconUrl": sheep$1.$url.static("/static/firstIndex/shop.svg"),
  39610. "activeIconUrl": sheep$1.$url.static("/static/firstIndex/shop-active.svg")
  39611. }
  39612. ]
  39613. });
  39614. onReachBottom(() => {
  39615. });
  39616. onPullDownRefresh(() => {
  39617. setTimeout(function() {
  39618. uni.stopPullDownRefresh();
  39619. }, 800);
  39620. });
  39621. const __returned__ = { tabbar, computed: vue.computed, ref: vue.ref, reactive: vue.reactive, get onLoad() {
  39622. return onLoad;
  39623. }, get onShow() {
  39624. return onShow;
  39625. }, get onReachBottom() {
  39626. return onReachBottom;
  39627. }, get onPullDownRefresh() {
  39628. return onPullDownRefresh;
  39629. }, get sheep() {
  39630. return sheep$1;
  39631. }, get t() {
  39632. return t$6;
  39633. }, get ArticleApi() {
  39634. return ArticleApi;
  39635. }, FirstList: PagesIndexFirstList };
  39636. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  39637. return __returned__;
  39638. }
  39639. };
  39640. function _sfc_render$2L(_ctx, _cache, $props, $setup, $data, $options) {
  39641. const _component_s_tabbar = resolveEasycom(vue.resolveDynamicComponent("s-tabbar"), __easycom_3$7);
  39642. return vue.openBlock(), vue.createElementBlock("view", {
  39643. class: "page-body",
  39644. style: { "background": "#f6f6f6" }
  39645. }, [
  39646. vue.createVNode($setup["FirstList"], {
  39647. categoryId: 9,
  39648. type: "activityCard"
  39649. }),
  39650. vue.createVNode(_component_s_tabbar, {
  39651. path: "/pages/index/FirstActivity",
  39652. tabbar: $setup.tabbar
  39653. }, null, 8, ["tabbar"])
  39654. ]);
  39655. }
  39656. const PagesIndexFirstActivity = /* @__PURE__ */ _export_sfc(_sfc_main$2M, [["render", _sfc_render$2L], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/index/FirstActivity.vue"]]);
  39657. const _sfc_main$2L = {
  39658. __name: "FirstVideo",
  39659. setup(__props, { expose: __expose }) {
  39660. __expose();
  39661. uni.hideTabBar();
  39662. const tabbar = vue.ref({
  39663. "theme": "red",
  39664. "style": {
  39665. "bgType": "color",
  39666. "bgColor": "#323b4e",
  39667. "color": "#e6e6e5",
  39668. "activeColor": "#1fa380"
  39669. },
  39670. "items": [
  39671. {
  39672. "text": t$6("common.home"),
  39673. "url": "/pages/index/FirstIndex",
  39674. "iconUrl": sheep$1.$url.static("/static/firstIndex/index.svg"),
  39675. "activeIconUrl": sheep$1.$url.static("/static/firstIndex/index-active.svg")
  39676. },
  39677. {
  39678. "text": t$6("common.activities"),
  39679. "url": "/pages/index/FirstActivity",
  39680. "iconUrl": sheep$1.$url.static("/static/firstIndex/activity.svg"),
  39681. "activeIconUrl": sheep$1.$url.static("/static/firstIndex/activity-active.svg")
  39682. },
  39683. {
  39684. "text": t$6("common.videos"),
  39685. "url": "/pages/index/FirstVideo",
  39686. "iconUrl": sheep$1.$url.static("/static/firstIndex/video.svg"),
  39687. "activeIconUrl": sheep$1.$url.static("/static/firstIndex/video-active.svg")
  39688. },
  39689. {
  39690. "text": t$6("common.mall"),
  39691. "url": "/pages/index/index",
  39692. "iconUrl": sheep$1.$url.static("/static/firstIndex/shop.svg"),
  39693. "activeIconUrl": sheep$1.$url.static("/static/firstIndex/shop-active.svg")
  39694. }
  39695. ]
  39696. });
  39697. onReachBottom(() => {
  39698. });
  39699. onPullDownRefresh(() => {
  39700. setTimeout(function() {
  39701. uni.stopPullDownRefresh();
  39702. }, 800);
  39703. });
  39704. const __returned__ = { tabbar, computed: vue.computed, ref: vue.ref, reactive: vue.reactive, get onLoad() {
  39705. return onLoad;
  39706. }, get onShow() {
  39707. return onShow;
  39708. }, get onReachBottom() {
  39709. return onReachBottom;
  39710. }, get onPullDownRefresh() {
  39711. return onPullDownRefresh;
  39712. }, get sheep() {
  39713. return sheep$1;
  39714. }, get t() {
  39715. return t$6;
  39716. }, get ArticleApi() {
  39717. return ArticleApi;
  39718. }, FirstList: PagesIndexFirstList };
  39719. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  39720. return __returned__;
  39721. }
  39722. };
  39723. function _sfc_render$2K(_ctx, _cache, $props, $setup, $data, $options) {
  39724. const _component_s_tabbar = resolveEasycom(vue.resolveDynamicComponent("s-tabbar"), __easycom_3$7);
  39725. return vue.openBlock(), vue.createElementBlock("view", {
  39726. class: "page-body",
  39727. style: { "background": "#f6f6f6" }
  39728. }, [
  39729. vue.createVNode($setup["FirstList"], {
  39730. categoryId: 10,
  39731. type: "articleCard"
  39732. }),
  39733. vue.createVNode(_component_s_tabbar, {
  39734. path: "/pages/index/FirstVideo",
  39735. tabbar: $setup.tabbar
  39736. }, null, 8, ["tabbar"])
  39737. ]);
  39738. }
  39739. const PagesIndexFirstVideo = /* @__PURE__ */ _export_sfc(_sfc_main$2L, [["render", _sfc_render$2K], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/index/FirstVideo.vue"]]);
  39740. const _sfc_main$2K = {
  39741. name: "UniNoticeBar",
  39742. emits: ["click", "getmore", "close"],
  39743. props: {
  39744. text: {
  39745. type: String,
  39746. default: ""
  39747. },
  39748. moreText: {
  39749. type: String,
  39750. default: ""
  39751. },
  39752. backgroundColor: {
  39753. type: String,
  39754. default: ""
  39755. },
  39756. speed: {
  39757. // 默认1s滚动100px
  39758. type: Number,
  39759. default: 100
  39760. },
  39761. color: {
  39762. type: String,
  39763. default: "var(--ui-BG-Main)"
  39764. },
  39765. moreColor: {
  39766. type: String,
  39767. default: "#FF9A43"
  39768. },
  39769. single: {
  39770. // 是否单行
  39771. type: [Boolean, String],
  39772. default: false
  39773. },
  39774. scrollable: {
  39775. // 是否滚动,添加后控制单行效果取消
  39776. type: [Boolean, String],
  39777. default: false
  39778. },
  39779. showIcon: {
  39780. // 是否显示左侧icon
  39781. type: [Boolean, String],
  39782. default: false
  39783. },
  39784. showGetMore: {
  39785. // 是否显示右侧查看更多
  39786. type: [Boolean, String],
  39787. default: false
  39788. },
  39789. showClose: {
  39790. // 是否显示左侧关闭按钮
  39791. type: [Boolean, String],
  39792. default: false
  39793. }
  39794. },
  39795. data() {
  39796. const elId = `Uni_${Math.ceil(Math.random() * 1e6).toString(36)}`;
  39797. const elIdBox = `Uni_${Math.ceil(Math.random() * 1e6).toString(36)}`;
  39798. return {
  39799. textWidth: 0,
  39800. boxWidth: 0,
  39801. wrapWidth: "",
  39802. webviewHide: false,
  39803. elId,
  39804. elIdBox,
  39805. show: true,
  39806. animationDuration: "none",
  39807. animationPlayState: "paused",
  39808. animationDelay: "0s"
  39809. };
  39810. },
  39811. mounted() {
  39812. var pages2 = getCurrentPages();
  39813. var page2 = pages2[pages2.length - 1];
  39814. var currentWebview = page2.$getAppWebview();
  39815. currentWebview.addEventListener("hide", () => {
  39816. this.webviewHide = true;
  39817. });
  39818. currentWebview.addEventListener("show", () => {
  39819. this.webviewHide = false;
  39820. });
  39821. this.$nextTick(() => {
  39822. this.initSize();
  39823. });
  39824. },
  39825. methods: {
  39826. initSize() {
  39827. if (this.scrollable) {
  39828. let query = [];
  39829. let textQuery = new Promise((resolve, reject) => {
  39830. uni.createSelectorQuery().in(this).select(`#${this.elId}`).boundingClientRect().exec((ret) => {
  39831. this.textWidth = ret[0].width;
  39832. resolve();
  39833. });
  39834. });
  39835. let boxQuery = new Promise((resolve, reject) => {
  39836. uni.createSelectorQuery().in(this).select(`#${this.elIdBox}`).boundingClientRect().exec((ret) => {
  39837. this.boxWidth = ret[0].width;
  39838. resolve();
  39839. });
  39840. });
  39841. query.push(textQuery);
  39842. query.push(boxQuery);
  39843. Promise.all(query).then(() => {
  39844. this.animationDuration = `${this.textWidth / this.speed}s`;
  39845. this.animationDelay = `-${this.boxWidth / this.speed}s`;
  39846. setTimeout(() => {
  39847. this.animationPlayState = "running";
  39848. }, 1e3);
  39849. });
  39850. }
  39851. },
  39852. loopAnimation() {
  39853. },
  39854. clickMore() {
  39855. this.$emit("getmore");
  39856. },
  39857. close() {
  39858. this.show = false;
  39859. this.$emit("close");
  39860. },
  39861. onClick() {
  39862. this.$emit("click");
  39863. }
  39864. }
  39865. };
  39866. function _sfc_render$2J(_ctx, _cache, $props, $setup, $data, $options) {
  39867. const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$b);
  39868. return $data.show ? (vue.openBlock(), vue.createElementBlock(
  39869. "view",
  39870. {
  39871. key: 0,
  39872. class: "uni-noticebar",
  39873. style: vue.normalizeStyle({ backgroundColor: $props.backgroundColor }),
  39874. onClick: _cache[2] || (_cache[2] = (...args) => $options.onClick && $options.onClick(...args))
  39875. },
  39876. [
  39877. vue.renderSlot(_ctx.$slots, "icon", {}, () => [
  39878. $props.showIcon === true || $props.showIcon === "true" ? (vue.openBlock(), vue.createBlock(_component_uni_icons, {
  39879. key: 0,
  39880. class: "uni-noticebar-icon",
  39881. type: "sound",
  39882. color: $props.color,
  39883. size: "22"
  39884. }, null, 8, ["color"])) : vue.createCommentVNode("v-if", true)
  39885. ], true),
  39886. vue.createElementVNode(
  39887. "view",
  39888. {
  39889. ref: "textBox",
  39890. class: vue.normalizeClass(["uni-noticebar__content-wrapper", {
  39891. "uni-noticebar__content-wrapper--scrollable": $props.scrollable,
  39892. "uni-noticebar__content-wrapper--single": !$props.scrollable && ($props.single || $props.moreText)
  39893. }])
  39894. },
  39895. [
  39896. vue.createElementVNode("view", {
  39897. id: $data.elIdBox,
  39898. class: vue.normalizeClass(["uni-noticebar__content", {
  39899. "uni-noticebar__content--scrollable": $props.scrollable,
  39900. "uni-noticebar__content--single": !$props.scrollable && ($props.single || $props.moreText)
  39901. }])
  39902. }, [
  39903. vue.createElementVNode("text", {
  39904. id: $data.elId,
  39905. ref: "animationEle",
  39906. class: vue.normalizeClass(["uni-noticebar__content-text", {
  39907. "uni-noticebar__content-text--scrollable": $props.scrollable,
  39908. "uni-noticebar__content-text--single": !$props.scrollable && ($props.single || $props.showGetMore)
  39909. }]),
  39910. style: vue.normalizeStyle({
  39911. color: $props.color,
  39912. width: $data.wrapWidth + "px",
  39913. animationDuration: $data.animationDuration,
  39914. "-webkit-animationDuration": $data.animationDuration,
  39915. animationPlayState: $data.webviewHide ? "paused" : $data.animationPlayState,
  39916. "-webkit-animationPlayState": $data.webviewHide ? "paused" : $data.animationPlayState,
  39917. animationDelay: $data.animationDelay,
  39918. "-webkit-animationDelay": $data.animationDelay
  39919. })
  39920. }, vue.toDisplayString($props.text), 15, ["id"])
  39921. ], 10, ["id"])
  39922. ],
  39923. 2
  39924. /* CLASS */
  39925. ),
  39926. $props.showGetMore === true || $props.showGetMore === "true" ? (vue.openBlock(), vue.createElementBlock("view", {
  39927. key: 0,
  39928. class: "uni-noticebar__more uni-cursor-point",
  39929. onClick: _cache[0] || (_cache[0] = (...args) => $options.clickMore && $options.clickMore(...args))
  39930. }, [
  39931. $props.moreText.length > 0 ? (vue.openBlock(), vue.createElementBlock(
  39932. "text",
  39933. {
  39934. key: 0,
  39935. style: vue.normalizeStyle({ color: $props.moreColor }),
  39936. class: "uni-noticebar__more-text"
  39937. },
  39938. vue.toDisplayString($props.moreText),
  39939. 5
  39940. /* TEXT, STYLE */
  39941. )) : (vue.openBlock(), vue.createBlock(_component_uni_icons, {
  39942. key: 1,
  39943. type: "right",
  39944. color: $props.moreColor,
  39945. size: "16"
  39946. }, null, 8, ["color"]))
  39947. ])) : vue.createCommentVNode("v-if", true),
  39948. ($props.showClose === true || $props.showClose === "true") && ($props.showGetMore === false || $props.showGetMore === "false") ? (vue.openBlock(), vue.createElementBlock("view", {
  39949. key: 1,
  39950. class: "uni-noticebar-close uni-cursor-point"
  39951. }, [
  39952. vue.createElementVNode("view", {
  39953. onClick: _cache[1] || (_cache[1] = (...args) => $options.close && $options.close(...args))
  39954. }, [
  39955. vue.renderSlot(_ctx.$slots, "close", {}, () => [
  39956. vue.createVNode(_component_uni_icons, {
  39957. type: "closeempty",
  39958. color: $props.color,
  39959. size: "16"
  39960. }, null, 8, ["color"])
  39961. ], true)
  39962. ])
  39963. ])) : vue.createCommentVNode("v-if", true)
  39964. ],
  39965. 4
  39966. /* STYLE */
  39967. )) : vue.createCommentVNode("v-if", true);
  39968. }
  39969. const __easycom_0$k = /* @__PURE__ */ _export_sfc(_sfc_main$2K, [["render", _sfc_render$2J], ["__scopeId", "data-v-8eee8640"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/ui/su-notice-bar/su-notice-bar.vue"]]);
  39970. const _sfc_main$2J = {
  39971. __name: "s-notice-block",
  39972. props: {
  39973. data: {
  39974. type: Object,
  39975. default() {
  39976. }
  39977. }
  39978. },
  39979. setup(__props, { expose: __expose }) {
  39980. __expose();
  39981. const props = __props;
  39982. const __returned__ = { props, get sheep() {
  39983. return sheep$1;
  39984. } };
  39985. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  39986. return __returned__;
  39987. }
  39988. };
  39989. function _sfc_render$2I(_ctx, _cache, $props, $setup, $data, $options) {
  39990. const _component_su_notice_bar = resolveEasycom(vue.resolveDynamicComponent("su-notice-bar"), __easycom_0$k);
  39991. return vue.openBlock(), vue.createElementBlock("view", { class: "ss-flex ss-col-center notice-wrap" }, [
  39992. vue.createElementVNode("image", {
  39993. class: "icon-img",
  39994. src: $setup.sheep.$url.cdn($props.data.iconUrl),
  39995. mode: "heightFix"
  39996. }, null, 8, ["src"]),
  39997. vue.createCommentVNode(" todo:@owen 暂时只支持一个公告 "),
  39998. vue.createVNode(_component_su_notice_bar, {
  39999. style: { "flex": "1" },
  40000. showIcon: false,
  40001. scrollable: "",
  40002. single: "",
  40003. text: $props.data.contents[0].text,
  40004. speed: 50,
  40005. color: $props.data.textColor,
  40006. onClick: _cache[0] || (_cache[0] = ($event) => $setup.sheep.$router.go($props.data.contents[0].url))
  40007. }, null, 8, ["text", "color"])
  40008. ]);
  40009. }
  40010. const __easycom_1$7 = /* @__PURE__ */ _export_sfc(_sfc_main$2J, [["render", _sfc_render$2I], ["__scopeId", "data-v-587c9010"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-notice-block/s-notice-block.vue"]]);
  40011. const _sfc_main$2I = {
  40012. __name: "s-menu-button",
  40013. props: {
  40014. data: {
  40015. type: Object,
  40016. default() {
  40017. }
  40018. },
  40019. styles: {
  40020. type: Object,
  40021. default() {
  40022. }
  40023. },
  40024. circular: {
  40025. type: Boolean,
  40026. default: true
  40027. },
  40028. autoplay: {
  40029. type: Boolean,
  40030. default: false
  40031. },
  40032. interval: {
  40033. type: Number,
  40034. default: 5e3
  40035. },
  40036. duration: {
  40037. type: Number,
  40038. default: 500
  40039. },
  40040. ui: {
  40041. type: String,
  40042. default: ""
  40043. },
  40044. mode: {
  40045. //default
  40046. type: String,
  40047. default: "default"
  40048. },
  40049. dotStyle: {
  40050. type: String,
  40051. default: "long"
  40052. //default long tag
  40053. },
  40054. dotCur: {
  40055. type: String,
  40056. default: "ui-BG-Main"
  40057. },
  40058. bg: {
  40059. type: String,
  40060. default: "bg-none"
  40061. },
  40062. height: {
  40063. type: Number,
  40064. default: 300
  40065. },
  40066. // 是否有边框
  40067. hasBorder: {
  40068. type: Boolean,
  40069. default: true
  40070. },
  40071. // 边框颜色
  40072. borderColor: {
  40073. type: String,
  40074. default: "red"
  40075. },
  40076. background: {
  40077. type: String,
  40078. default: "blue"
  40079. },
  40080. hoverClass: {
  40081. type: String,
  40082. default: "ss-hover-class"
  40083. //'none'为没有hover效果
  40084. },
  40085. // 一排宫格数
  40086. col: {
  40087. type: [Number, String],
  40088. default: 3
  40089. },
  40090. iconSize: {
  40091. type: Number,
  40092. default: 80
  40093. },
  40094. color: {
  40095. type: String,
  40096. default: "#000"
  40097. }
  40098. },
  40099. setup(__props, { expose: __expose }) {
  40100. __expose();
  40101. const state = vue.reactive({
  40102. cur: 0
  40103. });
  40104. const props = __props;
  40105. const menuList = vue.computed(() => splitData(props.data.list, props.data.row * props.data.column));
  40106. const swiperHeight = vue.computed(() => props.data.row * (props.data.layout === "iconText" ? 200 : 180));
  40107. const windowWidth2 = sheep$1.$platform.device.windowWidth;
  40108. const swiperChange = (e2) => {
  40109. state.cur = e2.detail.current;
  40110. };
  40111. const splitData = (oArr = [], length = 1) => {
  40112. let arr = [];
  40113. let minArr = [];
  40114. oArr.forEach((c2) => {
  40115. if (minArr.length === length) {
  40116. minArr = [];
  40117. }
  40118. if (minArr.length === 0) {
  40119. arr.push(minArr);
  40120. }
  40121. minArr.push(c2);
  40122. });
  40123. return arr;
  40124. };
  40125. const __returned__ = { state, props, menuList, swiperHeight, windowWidth: windowWidth2, swiperChange, splitData, reactive: vue.reactive, computed: vue.computed, get sheep() {
  40126. return sheep$1;
  40127. } };
  40128. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  40129. return __returned__;
  40130. }
  40131. };
  40132. function _sfc_render$2H(_ctx, _cache, $props, $setup, $data, $options) {
  40133. return vue.openBlock(), vue.createElementBlock(
  40134. vue.Fragment,
  40135. null,
  40136. [
  40137. vue.createCommentVNode(" 包裹层 "),
  40138. vue.createElementVNode(
  40139. "view",
  40140. {
  40141. class: vue.normalizeClass(["ui-swiper", [$setup.props.mode, $setup.props.bg, $setup.props.ui]]),
  40142. style: vue.normalizeStyle([{ height: $setup.swiperHeight + ($setup.menuList.length > 1 ? 50 : 0) + "rpx" }])
  40143. },
  40144. [
  40145. vue.createCommentVNode(" 轮播 "),
  40146. vue.createElementVNode("swiper", {
  40147. circular: $setup.props.circular,
  40148. current: $setup.state.cur,
  40149. autoplay: $setup.props.autoplay,
  40150. interval: $setup.props.interval,
  40151. duration: $setup.props.duration,
  40152. style: vue.normalizeStyle([{ height: $setup.swiperHeight + "rpx" }]),
  40153. onChange: $setup.swiperChange
  40154. }, [
  40155. (vue.openBlock(true), vue.createElementBlock(
  40156. vue.Fragment,
  40157. null,
  40158. vue.renderList($setup.menuList, (arr, index2) => {
  40159. return vue.openBlock(), vue.createElementBlock(
  40160. "swiper-item",
  40161. {
  40162. key: index2,
  40163. class: vue.normalizeClass({ cur: $setup.state.cur == index2 })
  40164. },
  40165. [
  40166. vue.createCommentVNode(" 宫格 "),
  40167. vue.createElementVNode("view", { class: "grid-wrap" }, [
  40168. (vue.openBlock(true), vue.createElementBlock(
  40169. vue.Fragment,
  40170. null,
  40171. vue.renderList(arr, (item, index3) => {
  40172. return vue.openBlock(), vue.createElementBlock("view", {
  40173. key: index3,
  40174. class: "grid-item ss-flex ss-flex-col ss-col-center ss-row-center",
  40175. style: vue.normalizeStyle([{ width: `${100 * (1 / $props.data.column)}%`, height: "200rpx" }]),
  40176. "hover-class": "ss-hover-btn",
  40177. onClick: ($event) => $setup.sheep.$router.go(item.url)
  40178. }, [
  40179. vue.createElementVNode("view", { class: "menu-box ss-flex ss-flex-col ss-col-center ss-row-center" }, [
  40180. item.badge.show ? (vue.openBlock(), vue.createElementBlock(
  40181. "view",
  40182. {
  40183. key: 0,
  40184. class: "tag-box",
  40185. style: vue.normalizeStyle([{ background: item.badge.bgColor, color: item.badge.textColor }])
  40186. },
  40187. vue.toDisplayString(item.badge.text),
  40188. 5
  40189. /* TEXT, STYLE */
  40190. )) : vue.createCommentVNode("v-if", true),
  40191. item.iconUrl ? (vue.openBlock(), vue.createElementBlock("image", {
  40192. key: 1,
  40193. class: "menu-icon",
  40194. style: vue.normalizeStyle([
  40195. {
  40196. width: $setup.props.iconSize + "rpx",
  40197. height: $setup.props.iconSize + "rpx"
  40198. }
  40199. ]),
  40200. src: $setup.sheep.$url.cdn(item.iconUrl),
  40201. mode: "aspectFill"
  40202. }, null, 12, ["src"])) : vue.createCommentVNode("v-if", true),
  40203. $props.data.layout === "iconText" ? (vue.openBlock(), vue.createElementBlock(
  40204. "view",
  40205. {
  40206. key: 2,
  40207. class: "menu-title",
  40208. style: vue.normalizeStyle([{ color: item.titleColor }])
  40209. },
  40210. vue.toDisplayString(item.title),
  40211. 5
  40212. /* TEXT, STYLE */
  40213. )) : vue.createCommentVNode("v-if", true)
  40214. ])
  40215. ], 12, ["onClick"]);
  40216. }),
  40217. 128
  40218. /* KEYED_FRAGMENT */
  40219. ))
  40220. ])
  40221. ],
  40222. 2
  40223. /* CLASS */
  40224. );
  40225. }),
  40226. 128
  40227. /* KEYED_FRAGMENT */
  40228. ))
  40229. ], 44, ["circular", "current", "autoplay", "interval", "duration"]),
  40230. vue.createCommentVNode(" 指示点 "),
  40231. $setup.menuList.length > 1 ? (vue.openBlock(), vue.createElementBlock(
  40232. vue.Fragment,
  40233. { key: 0 },
  40234. [
  40235. $setup.props.dotStyle != "tag" ? (vue.openBlock(), vue.createElementBlock(
  40236. "view",
  40237. {
  40238. key: 0,
  40239. class: vue.normalizeClass(["ui-swiper-dot", $setup.props.dotStyle])
  40240. },
  40241. [
  40242. (vue.openBlock(true), vue.createElementBlock(
  40243. vue.Fragment,
  40244. null,
  40245. vue.renderList($setup.menuList.length, (item, index2) => {
  40246. return vue.openBlock(), vue.createElementBlock(
  40247. "view",
  40248. {
  40249. class: vue.normalizeClass(["line-box", [$setup.state.cur == index2 ? "cur" : "", $setup.props.dotCur]]),
  40250. key: index2
  40251. },
  40252. null,
  40253. 2
  40254. /* CLASS */
  40255. );
  40256. }),
  40257. 128
  40258. /* KEYED_FRAGMENT */
  40259. ))
  40260. ],
  40261. 2
  40262. /* CLASS */
  40263. )) : vue.createCommentVNode("v-if", true),
  40264. $setup.props.dotStyle == "tag" ? (vue.openBlock(), vue.createElementBlock(
  40265. "view",
  40266. {
  40267. key: 1,
  40268. class: vue.normalizeClass(["ui-swiper-dot", $setup.props.dotStyle])
  40269. },
  40270. [
  40271. vue.createElementVNode(
  40272. "view",
  40273. {
  40274. class: vue.normalizeClass(["ui-tag radius", [$setup.props.dotCur]]),
  40275. style: { "pointer-events": "none" }
  40276. },
  40277. [
  40278. vue.createElementVNode(
  40279. "view",
  40280. { style: { "transform": "scale(0.7)" } },
  40281. vue.toDisplayString($setup.state.cur + 1) + " / " + vue.toDisplayString($setup.menuList.length),
  40282. 1
  40283. /* TEXT */
  40284. )
  40285. ],
  40286. 2
  40287. /* CLASS */
  40288. )
  40289. ],
  40290. 2
  40291. /* CLASS */
  40292. )) : vue.createCommentVNode("v-if", true)
  40293. ],
  40294. 64
  40295. /* STABLE_FRAGMENT */
  40296. )) : vue.createCommentVNode("v-if", true)
  40297. ],
  40298. 6
  40299. /* CLASS, STYLE */
  40300. )
  40301. ],
  40302. 2112
  40303. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  40304. );
  40305. }
  40306. const __easycom_2$4 = /* @__PURE__ */ _export_sfc(_sfc_main$2I, [["render", _sfc_render$2H], ["__scopeId", "data-v-75f856ac"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-menu-button/s-menu-button.vue"]]);
  40307. const _sfc_main$2H = {
  40308. name: "UniBadge",
  40309. emits: ["click"],
  40310. props: {
  40311. type: {
  40312. type: String,
  40313. default: "error"
  40314. },
  40315. inverted: {
  40316. type: Boolean,
  40317. default: false
  40318. },
  40319. isDot: {
  40320. type: Boolean,
  40321. default: false
  40322. },
  40323. maxNum: {
  40324. type: Number,
  40325. default: 99
  40326. },
  40327. absolute: {
  40328. type: String,
  40329. default: ""
  40330. },
  40331. offset: {
  40332. type: Array,
  40333. default() {
  40334. return [0, 0];
  40335. }
  40336. },
  40337. text: {
  40338. type: [String, Number],
  40339. default: ""
  40340. },
  40341. size: {
  40342. type: String,
  40343. default: "small"
  40344. },
  40345. customStyle: {
  40346. type: Object,
  40347. default() {
  40348. return {};
  40349. }
  40350. }
  40351. },
  40352. data() {
  40353. return {};
  40354. },
  40355. computed: {
  40356. width() {
  40357. return String(this.text).length * 8 + 12;
  40358. },
  40359. classNames() {
  40360. const {
  40361. inverted,
  40362. type,
  40363. size,
  40364. absolute
  40365. } = this;
  40366. return [
  40367. inverted ? "uni-badge--" + type + "-inverted" : "",
  40368. "uni-badge--" + type,
  40369. "uni-badge--" + size,
  40370. absolute ? "uni-badge--absolute" : ""
  40371. ].join(" ");
  40372. },
  40373. positionStyle() {
  40374. if (!this.absolute)
  40375. return {};
  40376. let w2 = this.width / 2, h2 = 10;
  40377. if (this.isDot) {
  40378. w2 = 5;
  40379. h2 = 5;
  40380. }
  40381. const x = `${-w2 + this.offset[0]}px`;
  40382. const y2 = `${-h2 + this.offset[1]}px`;
  40383. const whiteList = {
  40384. rightTop: {
  40385. right: x,
  40386. top: y2
  40387. },
  40388. rightBottom: {
  40389. right: x,
  40390. bottom: y2
  40391. },
  40392. leftBottom: {
  40393. left: x,
  40394. bottom: y2
  40395. },
  40396. leftTop: {
  40397. left: x,
  40398. top: y2
  40399. }
  40400. };
  40401. const match = whiteList[this.absolute];
  40402. return match ? match : whiteList["rightTop"];
  40403. },
  40404. badgeWidth() {
  40405. return {
  40406. width: `${this.width}px`
  40407. };
  40408. },
  40409. dotStyle() {
  40410. if (!this.isDot)
  40411. return {};
  40412. return {
  40413. width: "10px",
  40414. height: "10px",
  40415. borderRadius: "10px"
  40416. };
  40417. },
  40418. displayValue() {
  40419. const {
  40420. isDot,
  40421. text,
  40422. maxNum
  40423. } = this;
  40424. return isDot ? "" : Number(text) > maxNum ? `${maxNum}+` : text;
  40425. }
  40426. },
  40427. methods: {
  40428. onClick() {
  40429. this.$emit("click");
  40430. }
  40431. }
  40432. };
  40433. function _sfc_render$2G(_ctx, _cache, $props, $setup, $data, $options) {
  40434. return vue.openBlock(), vue.createElementBlock("view", { class: "uni-badge--x" }, [
  40435. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
  40436. $props.text ? (vue.openBlock(), vue.createElementBlock(
  40437. "text",
  40438. {
  40439. key: 0,
  40440. class: vue.normalizeClass([$options.classNames, "uni-badge"]),
  40441. style: vue.normalizeStyle([$options.badgeWidth, $options.positionStyle, $props.customStyle, $options.dotStyle]),
  40442. onClick: _cache[0] || (_cache[0] = ($event) => $options.onClick())
  40443. },
  40444. vue.toDisplayString($options.displayValue),
  40445. 7
  40446. /* TEXT, CLASS, STYLE */
  40447. )) : vue.createCommentVNode("v-if", true)
  40448. ]);
  40449. }
  40450. const __easycom_0$j = /* @__PURE__ */ _export_sfc(_sfc_main$2H, [["render", _sfc_render$2G], ["__scopeId", "data-v-c97cb896"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-badge/components/uni-badge/uni-badge.vue"]]);
  40451. const _sfc_main$2G = {
  40452. name: "UniListItem",
  40453. emits: ["click", "switchChange"],
  40454. props: {
  40455. direction: {
  40456. type: String,
  40457. default: "row"
  40458. },
  40459. title: {
  40460. type: String,
  40461. default: ""
  40462. },
  40463. note: {
  40464. type: String,
  40465. default: ""
  40466. },
  40467. ellipsis: {
  40468. type: [Number, String],
  40469. default: 0
  40470. },
  40471. disabled: {
  40472. type: [Boolean, String],
  40473. default: false
  40474. },
  40475. clickable: {
  40476. type: Boolean,
  40477. default: false
  40478. },
  40479. showArrow: {
  40480. type: [Boolean, String],
  40481. default: false
  40482. },
  40483. link: {
  40484. type: [Boolean, String],
  40485. default: false
  40486. },
  40487. to: {
  40488. type: String,
  40489. default: ""
  40490. },
  40491. showBadge: {
  40492. type: [Boolean, String],
  40493. default: false
  40494. },
  40495. showSwitch: {
  40496. type: [Boolean, String],
  40497. default: false
  40498. },
  40499. switchChecked: {
  40500. type: [Boolean, String],
  40501. default: false
  40502. },
  40503. badgeText: {
  40504. type: String,
  40505. default: ""
  40506. },
  40507. badgeType: {
  40508. type: String,
  40509. default: "success"
  40510. },
  40511. badgeStyle: {
  40512. type: Object,
  40513. default() {
  40514. return {};
  40515. }
  40516. },
  40517. rightText: {
  40518. type: String,
  40519. default: ""
  40520. },
  40521. thumb: {
  40522. type: String,
  40523. default: ""
  40524. },
  40525. thumbSize: {
  40526. type: String,
  40527. default: "base"
  40528. },
  40529. showExtraIcon: {
  40530. type: [Boolean, String],
  40531. default: false
  40532. },
  40533. extraIcon: {
  40534. type: Object,
  40535. default() {
  40536. return {
  40537. type: "",
  40538. color: "#000000",
  40539. size: 20
  40540. };
  40541. }
  40542. },
  40543. border: {
  40544. type: Boolean,
  40545. default: true
  40546. }
  40547. },
  40548. // inject: ['list'],
  40549. data() {
  40550. return {
  40551. isFirstChild: false
  40552. };
  40553. },
  40554. mounted() {
  40555. this.list = this.getForm();
  40556. if (this.list) {
  40557. if (!this.list.firstChildAppend) {
  40558. this.list.firstChildAppend = true;
  40559. this.isFirstChild = true;
  40560. }
  40561. }
  40562. },
  40563. methods: {
  40564. /**
  40565. * 获取父元素实例
  40566. */
  40567. getForm(name2 = "uniList") {
  40568. let parent2 = this.$parent;
  40569. let parentName = parent2.$options.name;
  40570. while (parentName !== name2) {
  40571. parent2 = parent2.$parent;
  40572. if (!parent2)
  40573. return false;
  40574. parentName = parent2.$options.name;
  40575. }
  40576. return parent2;
  40577. },
  40578. onClick() {
  40579. if (this.to !== "") {
  40580. this.openPage();
  40581. return;
  40582. }
  40583. if (this.clickable || this.link) {
  40584. this.$emit("click", {
  40585. data: {}
  40586. });
  40587. }
  40588. },
  40589. onSwitchChange(e2) {
  40590. this.$emit("switchChange", e2.detail);
  40591. },
  40592. openPage() {
  40593. if (["navigateTo", "redirectTo", "reLaunch", "switchTab"].indexOf(this.link) !== -1) {
  40594. this.pageApi(this.link);
  40595. } else {
  40596. this.pageApi("navigateTo");
  40597. }
  40598. },
  40599. pageApi(api2) {
  40600. let callback = {
  40601. url: this.to,
  40602. success: (res) => {
  40603. this.$emit("click", {
  40604. data: res
  40605. });
  40606. },
  40607. fail: (err) => {
  40608. this.$emit("click", {
  40609. data: err
  40610. });
  40611. }
  40612. };
  40613. switch (api2) {
  40614. case "navigateTo":
  40615. uni.navigateTo(callback);
  40616. break;
  40617. case "redirectTo":
  40618. uni.redirectTo(callback);
  40619. break;
  40620. case "reLaunch":
  40621. uni.reLaunch(callback);
  40622. break;
  40623. case "switchTab":
  40624. uni.switchTab(callback);
  40625. break;
  40626. default:
  40627. uni.navigateTo(callback);
  40628. }
  40629. }
  40630. }
  40631. };
  40632. function _sfc_render$2F(_ctx, _cache, $props, $setup, $data, $options) {
  40633. const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$b);
  40634. const _component_uni_badge = resolveEasycom(vue.resolveDynamicComponent("uni-badge"), __easycom_0$j);
  40635. return vue.openBlock(), vue.createElementBlock("view", {
  40636. class: vue.normalizeClass([{ "uni-list-item--disabled": $props.disabled }, "uni-list-item"]),
  40637. "hover-class": !$props.clickable && !$props.link || $props.disabled || $props.showSwitch ? "" : "uni-list-item--hover",
  40638. onClick: _cache[1] || (_cache[1] = (...args) => $options.onClick && $options.onClick(...args))
  40639. }, [
  40640. !$data.isFirstChild ? (vue.openBlock(), vue.createElementBlock(
  40641. "view",
  40642. {
  40643. key: 0,
  40644. class: vue.normalizeClass(["border--left", { "uni-list--border": $props.border }])
  40645. },
  40646. null,
  40647. 2
  40648. /* CLASS */
  40649. )) : vue.createCommentVNode("v-if", true),
  40650. vue.createElementVNode(
  40651. "view",
  40652. {
  40653. class: vue.normalizeClass(["uni-list-item__container", { "container--right": $props.showArrow || $props.link, "flex--direction": $props.direction === "column" }])
  40654. },
  40655. [
  40656. vue.renderSlot(_ctx.$slots, "header", {}, () => [
  40657. vue.createElementVNode("view", { class: "uni-list-item__header" }, [
  40658. $props.thumb ? (vue.openBlock(), vue.createElementBlock("view", {
  40659. key: 0,
  40660. class: "uni-list-item__icon"
  40661. }, [
  40662. vue.createElementVNode("image", {
  40663. src: $props.thumb,
  40664. class: vue.normalizeClass(["uni-list-item__icon-img", ["uni-list--" + $props.thumbSize]])
  40665. }, null, 10, ["src"])
  40666. ])) : $props.showExtraIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  40667. key: 1,
  40668. class: "uni-list-item__icon"
  40669. }, [
  40670. vue.createVNode(_component_uni_icons, {
  40671. color: $props.extraIcon.color,
  40672. size: $props.extraIcon.size,
  40673. type: $props.extraIcon.type
  40674. }, null, 8, ["color", "size", "type"])
  40675. ])) : vue.createCommentVNode("v-if", true)
  40676. ])
  40677. ], true),
  40678. vue.renderSlot(_ctx.$slots, "body", {}, () => [
  40679. vue.createElementVNode(
  40680. "view",
  40681. {
  40682. class: vue.normalizeClass(["uni-list-item__content", { "uni-list-item__content--center": $props.thumb || $props.showExtraIcon || $props.showBadge || $props.showSwitch }])
  40683. },
  40684. [
  40685. $props.title ? (vue.openBlock(), vue.createElementBlock(
  40686. "text",
  40687. {
  40688. key: 0,
  40689. class: vue.normalizeClass(["uni-list-item__content-title", [$props.ellipsis !== 0 && $props.ellipsis <= 2 ? "uni-ellipsis-" + $props.ellipsis : ""]])
  40690. },
  40691. vue.toDisplayString($props.title),
  40692. 3
  40693. /* TEXT, CLASS */
  40694. )) : vue.createCommentVNode("v-if", true),
  40695. $props.note ? (vue.openBlock(), vue.createElementBlock(
  40696. "text",
  40697. {
  40698. key: 1,
  40699. class: "uni-list-item__content-note"
  40700. },
  40701. vue.toDisplayString($props.note),
  40702. 1
  40703. /* TEXT */
  40704. )) : vue.createCommentVNode("v-if", true)
  40705. ],
  40706. 2
  40707. /* CLASS */
  40708. )
  40709. ], true),
  40710. vue.renderSlot(_ctx.$slots, "footer", {}, () => [
  40711. $props.rightText || $props.showBadge || $props.showSwitch ? (vue.openBlock(), vue.createElementBlock(
  40712. "view",
  40713. {
  40714. key: 0,
  40715. class: vue.normalizeClass(["uni-list-item__extra", { "flex--justify": $props.direction === "column" }])
  40716. },
  40717. [
  40718. $props.rightText ? (vue.openBlock(), vue.createElementBlock(
  40719. "text",
  40720. {
  40721. key: 0,
  40722. class: "uni-list-item__extra-text"
  40723. },
  40724. vue.toDisplayString($props.rightText),
  40725. 1
  40726. /* TEXT */
  40727. )) : vue.createCommentVNode("v-if", true),
  40728. $props.showBadge ? (vue.openBlock(), vue.createBlock(_component_uni_badge, {
  40729. key: 1,
  40730. type: $props.badgeType,
  40731. text: $props.badgeText,
  40732. "custom-style": $props.badgeStyle
  40733. }, null, 8, ["type", "text", "custom-style"])) : vue.createCommentVNode("v-if", true),
  40734. $props.showSwitch ? (vue.openBlock(), vue.createElementBlock("switch", {
  40735. key: 2,
  40736. disabled: $props.disabled,
  40737. checked: $props.switchChecked,
  40738. onChange: _cache[0] || (_cache[0] = (...args) => $options.onSwitchChange && $options.onSwitchChange(...args))
  40739. }, null, 40, ["disabled", "checked"])) : vue.createCommentVNode("v-if", true)
  40740. ],
  40741. 2
  40742. /* CLASS */
  40743. )) : vue.createCommentVNode("v-if", true)
  40744. ], true)
  40745. ],
  40746. 2
  40747. /* CLASS */
  40748. ),
  40749. $props.showArrow || $props.link ? (vue.openBlock(), vue.createBlock(_component_uni_icons, {
  40750. key: 1,
  40751. size: 16,
  40752. class: "uni-icon-wrapper",
  40753. color: "#bbb",
  40754. type: "arrowright"
  40755. })) : vue.createCommentVNode("v-if", true)
  40756. ], 10, ["hover-class"]);
  40757. }
  40758. const __easycom_0$i = /* @__PURE__ */ _export_sfc(_sfc_main$2G, [["render", _sfc_render$2F], ["__scopeId", "data-v-c7524739"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-list/components/uni-list-item/uni-list-item.vue"]]);
  40759. const _sfc_main$2F = {
  40760. name: "uniList",
  40761. "mp-weixin": {
  40762. options: {
  40763. multipleSlots: false
  40764. }
  40765. },
  40766. props: {
  40767. enableBackToTop: {
  40768. type: [Boolean, String],
  40769. default: false
  40770. },
  40771. scrollY: {
  40772. type: [Boolean, String],
  40773. default: false
  40774. },
  40775. border: {
  40776. type: Boolean,
  40777. default: true
  40778. }
  40779. },
  40780. // provide() {
  40781. // return {
  40782. // list: this
  40783. // };
  40784. // },
  40785. created() {
  40786. this.firstChildAppend = false;
  40787. },
  40788. methods: {
  40789. loadMore(e2) {
  40790. this.$emit("scrolltolower");
  40791. }
  40792. }
  40793. };
  40794. function _sfc_render$2E(_ctx, _cache, $props, $setup, $data, $options) {
  40795. return vue.openBlock(), vue.createElementBlock("view", { class: "uni-list uni-border-top-bottom" }, [
  40796. $props.border ? (vue.openBlock(), vue.createElementBlock("view", {
  40797. key: 0,
  40798. class: "uni-list--border-top"
  40799. })) : vue.createCommentVNode("v-if", true),
  40800. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
  40801. $props.border ? (vue.openBlock(), vue.createElementBlock("view", {
  40802. key: 1,
  40803. class: "uni-list--border-bottom"
  40804. })) : vue.createCommentVNode("v-if", true)
  40805. ]);
  40806. }
  40807. const __easycom_1$6 = /* @__PURE__ */ _export_sfc(_sfc_main$2F, [["render", _sfc_render$2E], ["__scopeId", "data-v-c2f1266a"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-list/components/uni-list/uni-list.vue"]]);
  40808. const _sfc_main$2E = {
  40809. __name: "s-menu-list",
  40810. props: {
  40811. data: {
  40812. type: Object,
  40813. default: () => ({})
  40814. }
  40815. },
  40816. setup(__props, { expose: __expose }) {
  40817. __expose();
  40818. const props = __props;
  40819. const __returned__ = { props, get sheep() {
  40820. return sheep$1;
  40821. } };
  40822. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  40823. return __returned__;
  40824. }
  40825. };
  40826. function _sfc_render$2D(_ctx, _cache, $props, $setup, $data, $options) {
  40827. const _component_uni_list_item = resolveEasycom(vue.resolveDynamicComponent("uni-list-item"), __easycom_0$i);
  40828. const _component_uni_list = resolveEasycom(vue.resolveDynamicComponent("uni-list"), __easycom_1$6);
  40829. return vue.openBlock(), vue.createElementBlock("view", { class: "menu-list-wrap" }, [
  40830. vue.createVNode(_component_uni_list, { border: true }, {
  40831. default: vue.withCtx(() => [
  40832. (vue.openBlock(true), vue.createElementBlock(
  40833. vue.Fragment,
  40834. null,
  40835. vue.renderList($props.data.list, (item, index2) => {
  40836. return vue.openBlock(), vue.createBlock(_component_uni_list_item, {
  40837. key: index2,
  40838. showArrow: "",
  40839. clickable: "",
  40840. onClick: ($event) => $setup.sheep.$router.go(item.url)
  40841. }, {
  40842. header: vue.withCtx(() => [
  40843. vue.createElementVNode("view", { class: "ss-flex ss-col-center" }, [
  40844. item.iconUrl ? (vue.openBlock(), vue.createElementBlock("image", {
  40845. key: 0,
  40846. class: "list-icon",
  40847. src: $setup.sheep.$url.cdn(item.iconUrl),
  40848. mode: "aspectFit"
  40849. }, null, 8, ["src"])) : vue.createCommentVNode("v-if", true),
  40850. vue.createElementVNode(
  40851. "view",
  40852. {
  40853. class: "title-text ss-flex ss-row-center ss-col-center ss-m-l-20",
  40854. style: vue.normalizeStyle([{ color: item.titleColor }])
  40855. },
  40856. vue.toDisplayString(item.title),
  40857. 5
  40858. /* TEXT, STYLE */
  40859. )
  40860. ])
  40861. ]),
  40862. footer: vue.withCtx(() => [
  40863. vue.createElementVNode(
  40864. "view",
  40865. {
  40866. class: "notice-text ss-flex ss-row-center ss-col-center",
  40867. style: vue.normalizeStyle([{ color: item.subtitleColor }])
  40868. },
  40869. vue.toDisplayString(item.subtitle),
  40870. 5
  40871. /* TEXT, STYLE */
  40872. )
  40873. ]),
  40874. _: 2
  40875. /* DYNAMIC */
  40876. }, 1032, ["onClick"]);
  40877. }),
  40878. 128
  40879. /* KEYED_FRAGMENT */
  40880. ))
  40881. ]),
  40882. _: 1
  40883. /* STABLE */
  40884. })
  40885. ]);
  40886. }
  40887. const __easycom_3$6 = /* @__PURE__ */ _export_sfc(_sfc_main$2E, [["render", _sfc_render$2D], ["__scopeId", "data-v-6033b256"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-menu-list/s-menu-list.vue"]]);
  40888. const _sfc_main$2D = {
  40889. name: "UniGridItem",
  40890. inject: ["grid"],
  40891. props: {
  40892. index: {
  40893. type: Number,
  40894. default: 0
  40895. }
  40896. },
  40897. data() {
  40898. return {
  40899. column: 0,
  40900. showBorder: true,
  40901. square: true,
  40902. highlight: true,
  40903. left: 0,
  40904. top: 0,
  40905. openNum: 2,
  40906. width: 0,
  40907. borderColor: "#e5e5e5"
  40908. };
  40909. },
  40910. created() {
  40911. this.column = this.grid.column;
  40912. this.showBorder = this.grid.showBorder;
  40913. this.square = this.grid.square;
  40914. this.highlight = this.grid.highlight;
  40915. this.top = this.hor === 0 ? this.grid.hor : this.hor;
  40916. this.left = this.ver === 0 ? this.grid.ver : this.ver;
  40917. this.borderColor = this.grid.borderColor;
  40918. this.grid.children.push(this);
  40919. this.width = this.grid.width;
  40920. },
  40921. beforeDestroy() {
  40922. this.grid.children.forEach((item, index2) => {
  40923. if (item === this) {
  40924. this.grid.children.splice(index2, 1);
  40925. }
  40926. });
  40927. },
  40928. methods: {
  40929. _onClick() {
  40930. this.grid.change({
  40931. detail: {
  40932. index: this.index
  40933. }
  40934. });
  40935. }
  40936. }
  40937. };
  40938. function _sfc_render$2C(_ctx, _cache, $props, $setup, $data, $options) {
  40939. return vue.openBlock(), vue.createElementBlock(
  40940. "view",
  40941. {
  40942. style: vue.normalizeStyle("width:" + $data.width + ";" + ($data.square ? "height:" + $data.width : "")),
  40943. class: "uni-grid-item grid-item"
  40944. },
  40945. [
  40946. vue.createElementVNode(
  40947. "view",
  40948. {
  40949. class: vue.normalizeClass([{
  40950. "uni-grid-item--border": $data.showBorder,
  40951. "uni-grid-item--border-top": $data.showBorder && $props.index < $data.column,
  40952. "uni-highlight": $data.highlight
  40953. }, "uni-grid-item__box"]),
  40954. style: vue.normalizeStyle({
  40955. "border-right-color": $data.borderColor,
  40956. "border-bottom-color": $data.borderColor,
  40957. "border-top-color": $data.borderColor
  40958. }),
  40959. onClick: _cache[0] || (_cache[0] = (...args) => $options._onClick && $options._onClick(...args))
  40960. },
  40961. [
  40962. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  40963. ],
  40964. 6
  40965. /* CLASS, STYLE */
  40966. )
  40967. ],
  40968. 4
  40969. /* STYLE */
  40970. );
  40971. }
  40972. const __easycom_0$h = /* @__PURE__ */ _export_sfc(_sfc_main$2D, [["render", _sfc_render$2C], ["__scopeId", "data-v-7a807eb7"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-grid/components/uni-grid-item/uni-grid-item.vue"]]);
  40973. const _sfc_main$2C = {
  40974. name: "UniGrid",
  40975. emits: ["change"],
  40976. props: {
  40977. // 每列显示个数
  40978. column: {
  40979. type: Number,
  40980. default: 3
  40981. },
  40982. // 是否显示边框
  40983. showBorder: {
  40984. type: Boolean,
  40985. default: true
  40986. },
  40987. // 边框颜色
  40988. borderColor: {
  40989. type: String,
  40990. default: "#D2D2D2"
  40991. },
  40992. // 是否正方形显示,默认为 true
  40993. square: {
  40994. type: Boolean,
  40995. default: true
  40996. },
  40997. highlight: {
  40998. type: Boolean,
  40999. default: true
  41000. }
  41001. },
  41002. provide() {
  41003. return {
  41004. grid: this
  41005. };
  41006. },
  41007. data() {
  41008. const elId = `Uni_${Math.ceil(Math.random() * 1e6).toString(36)}`;
  41009. return {
  41010. elId,
  41011. width: 0
  41012. };
  41013. },
  41014. created() {
  41015. this.children = [];
  41016. },
  41017. mounted() {
  41018. this.$nextTick(() => {
  41019. this.init();
  41020. });
  41021. },
  41022. methods: {
  41023. init() {
  41024. setTimeout(() => {
  41025. this._getSize((width) => {
  41026. this.children.forEach((item, index2) => {
  41027. item.width = width;
  41028. });
  41029. });
  41030. }, 50);
  41031. },
  41032. change(e2) {
  41033. this.$emit("change", e2);
  41034. },
  41035. _getSize(fn) {
  41036. uni.createSelectorQuery().in(this).select(`#${this.elId}`).boundingClientRect().exec((ret) => {
  41037. this.width = parseInt((ret[0].width - 1) / this.column) + "px";
  41038. fn(this.width);
  41039. });
  41040. }
  41041. }
  41042. };
  41043. function _sfc_render$2B(_ctx, _cache, $props, $setup, $data, $options) {
  41044. return vue.openBlock(), vue.createElementBlock("view", { class: "uni-grid-wrap" }, [
  41045. vue.createElementVNode("view", {
  41046. id: $data.elId,
  41047. ref: "uni-grid",
  41048. class: vue.normalizeClass(["uni-grid", { "uni-grid--border": $props.showBorder }]),
  41049. style: vue.normalizeStyle({ "border-left-color": $props.borderColor })
  41050. }, [
  41051. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  41052. ], 14, ["id"])
  41053. ]);
  41054. }
  41055. const __easycom_1$5 = /* @__PURE__ */ _export_sfc(_sfc_main$2C, [["render", _sfc_render$2B], ["__scopeId", "data-v-07acefee"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-grid/components/uni-grid/uni-grid.vue"]]);
  41056. const _sfc_main$2B = {
  41057. __name: "s-menu-grid",
  41058. props: {
  41059. data: {
  41060. type: Object,
  41061. default() {
  41062. }
  41063. }
  41064. },
  41065. setup(__props, { expose: __expose }) {
  41066. __expose();
  41067. const props = __props;
  41068. const initData = vue.ref([]);
  41069. vue.watch(
  41070. () => props.data.list,
  41071. (newList) => {
  41072. if (Array.isArray(newList) && newList.length > 0) {
  41073. initData.value = newList.map((item) => ({
  41074. ...item,
  41075. isVisible: item.title === "商户入驻" ? false : item.isVisible !== void 0 ? item.isVisible : true
  41076. }));
  41077. } else {
  41078. initData.value = [];
  41079. }
  41080. },
  41081. { immediate: true }
  41082. );
  41083. vue.onMounted(() => {
  41084. try {
  41085. UserApi.getUserInfo().then((res) => {
  41086. const userInfo2 = res.data;
  41087. if (userInfo2 == null ? void 0 : userInfo2.agent) {
  41088. const targetIndex = initData.value.findIndex(
  41089. (item) => item.title === "商户入驻"
  41090. );
  41091. if (targetIndex !== -1) {
  41092. const updatedItem = {
  41093. ...initData.value[targetIndex],
  41094. isVisible: true
  41095. };
  41096. initData.value.splice(targetIndex, 1, updatedItem);
  41097. }
  41098. }
  41099. }).catch((error2) => {
  41100. formatAppLog("error", "at sheep/components/s-menu-grid/s-menu-grid.vue:92", "获取用户信息时发生错误:", error2);
  41101. });
  41102. } catch (error2) {
  41103. formatAppLog("log", "at sheep/components/s-menu-grid/s-menu-grid.vue:95", error2);
  41104. }
  41105. });
  41106. const __returned__ = { props, initData, get sheep() {
  41107. return sheep$1;
  41108. }, get UserApi() {
  41109. return UserApi;
  41110. }, ref: vue.ref, watch: vue.watch, onMounted: vue.onMounted };
  41111. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  41112. return __returned__;
  41113. }
  41114. };
  41115. function _sfc_render$2A(_ctx, _cache, $props, $setup, $data, $options) {
  41116. const _component_uni_grid_item = resolveEasycom(vue.resolveDynamicComponent("uni-grid-item"), __easycom_0$h);
  41117. const _component_uni_grid = resolveEasycom(vue.resolveDynamicComponent("uni-grid"), __easycom_1$5);
  41118. return $setup.initData && $setup.initData.length > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_grid, {
  41119. key: 0,
  41120. showBorder: Boolean($props.data.border),
  41121. column: $props.data.column
  41122. }, {
  41123. default: vue.withCtx(() => [
  41124. (vue.openBlock(true), vue.createElementBlock(
  41125. vue.Fragment,
  41126. null,
  41127. vue.renderList($setup.initData, (item, index2) => {
  41128. return vue.openBlock(), vue.createElementBlock(
  41129. vue.Fragment,
  41130. null,
  41131. [
  41132. item.isVisible ? (vue.openBlock(), vue.createBlock(_component_uni_grid_item, {
  41133. key: index2,
  41134. onClick: ($event) => $setup.sheep.$router.go(item.url)
  41135. }, {
  41136. default: vue.withCtx(() => [
  41137. vue.createElementVNode("view", { class: "grid-item-box ss-flex ss-flex-col ss-row-center ss-col-center" }, [
  41138. vue.createElementVNode("view", { class: "img-box" }, [
  41139. item.badge.show ? (vue.openBlock(), vue.createElementBlock(
  41140. "view",
  41141. {
  41142. key: 0,
  41143. class: "tag-box",
  41144. style: vue.normalizeStyle([{ background: item.badge.bgColor, color: item.badge.textColor }])
  41145. },
  41146. vue.toDisplayString(item.badge.text),
  41147. 5
  41148. /* TEXT, STYLE */
  41149. )) : vue.createCommentVNode("v-if", true),
  41150. vue.createElementVNode("image", {
  41151. class: "menu-image",
  41152. src: $setup.sheep.$url.cdn(item.iconUrl)
  41153. }, null, 8, ["src"])
  41154. ]),
  41155. vue.createElementVNode("view", { class: "title-box ss-flex ss-flex-col ss-row-center ss-col-center" }, [
  41156. vue.createElementVNode(
  41157. "view",
  41158. {
  41159. class: "grid-text",
  41160. style: vue.normalizeStyle([{ color: item.titleColor }])
  41161. },
  41162. vue.toDisplayString(item.title),
  41163. 5
  41164. /* TEXT, STYLE */
  41165. ),
  41166. vue.createElementVNode(
  41167. "view",
  41168. {
  41169. class: "grid-tip",
  41170. style: vue.normalizeStyle([{ color: item.subtitleColor }])
  41171. },
  41172. vue.toDisplayString(item.subtitle),
  41173. 5
  41174. /* TEXT, STYLE */
  41175. )
  41176. ])
  41177. ])
  41178. ]),
  41179. _: 2
  41180. /* DYNAMIC */
  41181. }, 1032, ["onClick"])) : vue.createCommentVNode("v-if", true)
  41182. ],
  41183. 64
  41184. /* STABLE_FRAGMENT */
  41185. );
  41186. }),
  41187. 256
  41188. /* UNKEYED_FRAGMENT */
  41189. ))
  41190. ]),
  41191. _: 1
  41192. /* STABLE */
  41193. }, 8, ["showBorder", "column"])) : vue.createCommentVNode("v-if", true);
  41194. }
  41195. const __easycom_4$1 = /* @__PURE__ */ _export_sfc(_sfc_main$2B, [["render", _sfc_render$2A], ["__scopeId", "data-v-1aac7574"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-menu-grid/s-menu-grid.vue"]]);
  41196. const _sfc_main$2A = {
  41197. __name: "s-popup-image",
  41198. props: {
  41199. data: {
  41200. type: Object,
  41201. default() {
  41202. }
  41203. }
  41204. },
  41205. setup(__props, { expose: __expose }) {
  41206. __expose();
  41207. const props = __props;
  41208. const modalStore = JSON.parse(uni.getStorageSync("modal-store") || "{}");
  41209. formatAppLog("log", "at sheep/components/s-popup-image/s-popup-image.vue:42", modalStore);
  41210. const advHistory = modalStore.advHistory || [];
  41211. const currentIndex = vue.ref(0);
  41212. const popupList = vue.computed(() => {
  41213. const list = props.data.list || [];
  41214. const newList = [];
  41215. if (list.length > 0) {
  41216. list.forEach((adv) => {
  41217. if (adv.showType === "once" && advHistory.includes(adv.imgUrl)) {
  41218. adv.isShow = false;
  41219. } else {
  41220. adv.isShow = true;
  41221. newList.push(adv);
  41222. }
  41223. saveAdvHistory(adv);
  41224. });
  41225. }
  41226. return newList;
  41227. });
  41228. function onPopup(path) {
  41229. sheep$1.$router.go(path);
  41230. }
  41231. function onClose(index2) {
  41232. currentIndex.value = index2 + 1;
  41233. popupList.value[index2].isShow = false;
  41234. }
  41235. const __returned__ = { props, modalStore, advHistory, currentIndex, popupList, onPopup, onClose, get sheep() {
  41236. return sheep$1;
  41237. }, computed: vue.computed, ref: vue.ref, get saveAdvHistory() {
  41238. return saveAdvHistory;
  41239. } };
  41240. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  41241. return __returned__;
  41242. }
  41243. };
  41244. function _sfc_render$2z(_ctx, _cache, $props, $setup, $data, $options) {
  41245. const _component_su_popup = resolveEasycom(vue.resolveDynamicComponent("su-popup"), __easycom_4$3);
  41246. return vue.openBlock(), vue.createElementBlock("view", null, [
  41247. (vue.openBlock(true), vue.createElementBlock(
  41248. vue.Fragment,
  41249. null,
  41250. vue.renderList($setup.popupList, (item, index2) => {
  41251. return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
  41252. index2 === $setup.currentIndex ? (vue.openBlock(), vue.createBlock(_component_su_popup, {
  41253. key: 0,
  41254. show: item.isShow,
  41255. type: "center",
  41256. backgroundColor: "none",
  41257. round: "0",
  41258. showClose: true,
  41259. isMaskClick: false,
  41260. onClose: ($event) => $setup.onClose(index2)
  41261. }, {
  41262. default: vue.withCtx(() => [
  41263. vue.createElementVNode("view", { class: "img-box" }, [
  41264. vue.createElementVNode("image", {
  41265. class: "modal-img",
  41266. src: $setup.sheep.$url.cdn(item.imgUrl),
  41267. mode: "widthFix",
  41268. onClick: vue.withModifiers(($event) => $setup.onPopup(item.url), ["stop"])
  41269. }, null, 8, ["src", "onClick"])
  41270. ])
  41271. ]),
  41272. _: 2
  41273. /* DYNAMIC */
  41274. }, 1032, ["show", "onClose"])) : vue.createCommentVNode("v-if", true)
  41275. ]);
  41276. }),
  41277. 128
  41278. /* KEYED_FRAGMENT */
  41279. ))
  41280. ]);
  41281. }
  41282. const __easycom_5$1 = /* @__PURE__ */ _export_sfc(_sfc_main$2A, [["render", _sfc_render$2z], ["__scopeId", "data-v-ef138843"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-popup-image/s-popup-image.vue"]]);
  41283. sheep$1.$platform.device;
  41284. let platform$2 = "other";
  41285. const _sfc_main$2z = {
  41286. name: "UniFab",
  41287. emits: ["fabClick", "trigger"],
  41288. props: {
  41289. pattern: {
  41290. type: Array,
  41291. default() {
  41292. return [];
  41293. }
  41294. },
  41295. horizontal: {
  41296. type: String,
  41297. default: "left"
  41298. },
  41299. vertical: {
  41300. type: String,
  41301. default: "bottom"
  41302. },
  41303. direction: {
  41304. type: String,
  41305. default: "horizontal"
  41306. },
  41307. content: {
  41308. type: Array,
  41309. default() {
  41310. return [];
  41311. }
  41312. },
  41313. show: {
  41314. type: Boolean,
  41315. default: false
  41316. },
  41317. popMenu: {
  41318. type: Boolean,
  41319. default: true
  41320. }
  41321. },
  41322. data() {
  41323. return {
  41324. fabShow: false,
  41325. isShow: false,
  41326. isAndroidNvue: platform$2 === "android",
  41327. styles: [
  41328. {
  41329. // color: '#3c3e49',
  41330. // selectedColor: '#007AFF',
  41331. // backgroundColor: '#fff',
  41332. // buttonColor: '#007AFF',
  41333. // iconColor: '#fff'
  41334. }
  41335. ]
  41336. };
  41337. },
  41338. computed: {
  41339. contentWidth(e2) {
  41340. return (this.content.length + 1) * 130 + "rpx";
  41341. },
  41342. contentWidthMin() {
  41343. return "100rpx";
  41344. },
  41345. // 动态计算宽度
  41346. boxWidth() {
  41347. return this.getPosition(3, "horizontal");
  41348. },
  41349. // 动态计算高度
  41350. boxHeight() {
  41351. return this.getPosition(3, "vertical");
  41352. },
  41353. // 计算左下位置
  41354. leftBottom() {
  41355. return this.getPosition(0, "left", "bottom");
  41356. },
  41357. // 计算右下位置
  41358. rightBottom() {
  41359. return this.getPosition(0, "right", "bottom");
  41360. },
  41361. // 计算左上位置
  41362. leftTop() {
  41363. return this.getPosition(0, "left", "top");
  41364. },
  41365. rightTop() {
  41366. return this.getPosition(0, "right", "top");
  41367. },
  41368. flexDirectionStart() {
  41369. return this.getPosition(1, "vertical", "top");
  41370. },
  41371. flexDirectionEnd() {
  41372. return this.getPosition(1, "vertical", "bottom");
  41373. },
  41374. horizontalLeft() {
  41375. return this.getPosition(2, "horizontal", "left");
  41376. },
  41377. horizontalRight() {
  41378. return this.getPosition(2, "horizontal", "right");
  41379. }
  41380. },
  41381. watch: {
  41382. // pattern: {
  41383. // handler(val, oldVal) {
  41384. // this.styles = Object.assign({}, this.styles, val)
  41385. // },
  41386. // deep: true
  41387. // }
  41388. },
  41389. created() {
  41390. this.isShow = this.show;
  41391. if (this.top === 0) {
  41392. this.fabShow = true;
  41393. }
  41394. },
  41395. methods: {
  41396. _onClick() {
  41397. this.$emit("fabClick");
  41398. if (!this.popMenu) {
  41399. return;
  41400. }
  41401. this.isShow = !this.isShow;
  41402. },
  41403. open() {
  41404. this.isShow = true;
  41405. },
  41406. close() {
  41407. this.isShow = false;
  41408. },
  41409. /**
  41410. * 按钮点击事件
  41411. */
  41412. _onItemClick(index2, item) {
  41413. this.$emit("trigger", {
  41414. index: index2,
  41415. item
  41416. });
  41417. },
  41418. /**
  41419. * 获取 位置信息
  41420. */
  41421. getPosition(types2, paramA, paramB) {
  41422. if (types2 === 0) {
  41423. return this.horizontal === paramA && this.vertical === paramB;
  41424. } else if (types2 === 1) {
  41425. return this.direction === paramA && this.vertical === paramB;
  41426. } else if (types2 === 2) {
  41427. return this.direction === paramA && this.horizontal === paramB;
  41428. } else {
  41429. return this.isShow && this.direction === paramA ? this.contentWidth : this.contentWidthMin;
  41430. }
  41431. }
  41432. }
  41433. };
  41434. function _sfc_render$2y(_ctx, _cache, $props, $setup, $data, $options) {
  41435. const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$b);
  41436. return vue.openBlock(), vue.createElementBlock("view", { class: "uni-cursor-point" }, [
  41437. $props.popMenu && ($options.leftBottom || $options.rightBottom || $options.leftTop || $options.rightTop) && $props.content.length > 0 ? (vue.openBlock(), vue.createElementBlock(
  41438. "view",
  41439. {
  41440. key: 0,
  41441. class: vue.normalizeClass([{
  41442. "uni-fab--leftBottom": $options.leftBottom,
  41443. "uni-fab--rightBottom": $options.rightBottom,
  41444. "uni-fab--leftTop": $options.leftTop,
  41445. "uni-fab--rightTop": $options.rightTop
  41446. }, "uni-fab"])
  41447. },
  41448. [
  41449. vue.createElementVNode(
  41450. "view",
  41451. {
  41452. class: vue.normalizeClass([{
  41453. "uni-fab__content--left": $props.horizontal === "left",
  41454. "uni-fab__content--right": $props.horizontal === "right",
  41455. "uni-fab__content--flexDirection": $props.direction === "vertical",
  41456. "uni-fab__content--flexDirectionStart": $options.flexDirectionStart,
  41457. "uni-fab__content--flexDirectionEnd": $options.flexDirectionEnd,
  41458. "uni-fab__content--other-platform": !$data.isAndroidNvue
  41459. }, "uni-fab__content"]),
  41460. style: vue.normalizeStyle({ width: $options.boxWidth, height: $options.boxHeight }),
  41461. elevation: "5"
  41462. },
  41463. [
  41464. $options.flexDirectionStart || $options.horizontalLeft ? (vue.openBlock(), vue.createElementBlock("view", {
  41465. key: 0,
  41466. class: "uni-fab__item uni-fab__item--first"
  41467. })) : vue.createCommentVNode("v-if", true),
  41468. (vue.openBlock(true), vue.createElementBlock(
  41469. vue.Fragment,
  41470. null,
  41471. vue.renderList($props.content, (item, index2) => {
  41472. return vue.openBlock(), vue.createElementBlock("view", {
  41473. key: index2,
  41474. class: vue.normalizeClass([{
  41475. "uni-fab__item--active": $data.isShow,
  41476. "horizontal-margin": $props.direction == "horizontal"
  41477. }, "uni-fab__item"]),
  41478. onClick: ($event) => $options._onItemClick(index2, item)
  41479. }, [
  41480. vue.createElementVNode("image", {
  41481. src: item.active ? item.selectedIconPath : item.iconPath,
  41482. class: "uni-fab__item-image",
  41483. mode: "aspectFit"
  41484. }, null, 8, ["src"]),
  41485. vue.createElementVNode(
  41486. "text",
  41487. {
  41488. class: vue.normalizeClass(["uni-fab__item-text", { "vertical-margin": $props.direction == "vertical" }]),
  41489. style: vue.normalizeStyle({ color: $props.pattern[index2].color })
  41490. },
  41491. vue.toDisplayString(item.text),
  41492. 7
  41493. /* TEXT, CLASS, STYLE */
  41494. )
  41495. ], 10, ["onClick"]);
  41496. }),
  41497. 128
  41498. /* KEYED_FRAGMENT */
  41499. )),
  41500. $options.flexDirectionEnd || $options.horizontalRight ? (vue.openBlock(), vue.createElementBlock("view", {
  41501. key: 1,
  41502. class: "uni-fab__item uni-fab__item--first"
  41503. })) : vue.createCommentVNode("v-if", true)
  41504. ],
  41505. 6
  41506. /* CLASS, STYLE */
  41507. )
  41508. ],
  41509. 2
  41510. /* CLASS */
  41511. )) : vue.createCommentVNode("v-if", true),
  41512. vue.createElementVNode(
  41513. "view",
  41514. {
  41515. class: vue.normalizeClass([{
  41516. "uni-fab__circle--leftBottom": $options.leftBottom,
  41517. "uni-fab__circle--rightBottom": $options.rightBottom,
  41518. "uni-fab__circle--leftTop": $options.leftTop,
  41519. "uni-fab__circle--rightTop": $options.rightTop,
  41520. "uni-fab__content--other-platform": !$data.isAndroidNvue
  41521. }, "uni-fab__circle uni-fab__plus"]),
  41522. style: vue.normalizeStyle({ "background-color": "var(--ui-BG-Main)" }),
  41523. onClick: _cache[0] || (_cache[0] = (...args) => $options._onClick && $options._onClick(...args))
  41524. },
  41525. [
  41526. vue.createVNode(_component_uni_icons, {
  41527. class: vue.normalizeClass(["fab-circle-icon", { "uni-fab__plus--active": $data.isShow && $props.content.length > 0 }]),
  41528. type: "plusempty",
  41529. color: "#fff",
  41530. size: "20"
  41531. }, null, 8, ["class"]),
  41532. vue.createCommentVNode(` <view class="fab-circle-v" :class="{'uni-fab__plus--active': isShow && content.length > 0}"></view>
  41533. <view class="fab-circle-h" :class="{'uni-fab__plus--active': isShow && content.length > 0}"></view> `)
  41534. ],
  41535. 6
  41536. /* CLASS, STYLE */
  41537. )
  41538. ]);
  41539. }
  41540. const __easycom_0$g = /* @__PURE__ */ _export_sfc(_sfc_main$2z, [["render", _sfc_render$2y], ["__scopeId", "data-v-85f34dfc"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-fab/components/uni-fab/uni-fab.vue"]]);
  41541. const _sfc_main$2y = {
  41542. __name: "s-float-menu",
  41543. props: {
  41544. data: {
  41545. type: Object,
  41546. default() {
  41547. }
  41548. }
  41549. },
  41550. setup(__props, { expose: __expose }) {
  41551. var _a2;
  41552. __expose();
  41553. const props = __props;
  41554. const state = vue.reactive({
  41555. // 可选样式配置项
  41556. pattern: [],
  41557. // 展开菜单内容配置项
  41558. content: [],
  41559. // 展开菜单显示方式:horizontal-水平显示,vertical-垂直显示
  41560. direction: ""
  41561. });
  41562. const fabRef = vue.ref(null);
  41563. state.direction = props.data.direction;
  41564. (_a2 = props.data) == null ? void 0 : _a2.list.forEach((item) => {
  41565. var _a3;
  41566. const text = ((_a3 = props.data) == null ? void 0 : _a3.showText) ? item.text : "";
  41567. state.content.push({ iconPath: sheep$1.$url.cdn(item.imgUrl), url: item.url, text });
  41568. state.pattern.push({ color: item.textColor });
  41569. });
  41570. function handleOpenLink(e2) {
  41571. sheep$1.$router.go(e2.item.url);
  41572. }
  41573. function handleCollapseFab() {
  41574. var _a3, _b2;
  41575. if ((_a3 = vue.unref(fabRef)) == null ? void 0 : _a3.isShow) {
  41576. (_b2 = vue.unref(fabRef)) == null ? void 0 : _b2.close();
  41577. }
  41578. }
  41579. onBackPress(() => {
  41580. var _a3, _b2;
  41581. if ((_a3 = vue.unref(fabRef)) == null ? void 0 : _a3.isShow) {
  41582. (_b2 = vue.unref(fabRef)) == null ? void 0 : _b2.close();
  41583. return true;
  41584. }
  41585. return false;
  41586. });
  41587. const __returned__ = { props, state, fabRef, handleOpenLink, handleCollapseFab, get sheep() {
  41588. return sheep$1;
  41589. }, reactive: vue.reactive, ref: vue.ref, unref: vue.unref, get onBackPress() {
  41590. return onBackPress;
  41591. } };
  41592. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  41593. return __returned__;
  41594. }
  41595. };
  41596. function _sfc_render$2x(_ctx, _cache, $props, $setup, $data, $options) {
  41597. var _a2;
  41598. const _component_uni_fab = resolveEasycom(vue.resolveDynamicComponent("uni-fab"), __easycom_0$g);
  41599. return vue.openBlock(), vue.createElementBlock(
  41600. vue.Fragment,
  41601. null,
  41602. [
  41603. vue.createCommentVNode(" 模态背景:展开时显示,点击后折叠 "),
  41604. ((_a2 = $setup.fabRef) == null ? void 0 : _a2.isShow) ? (vue.openBlock(), vue.createElementBlock("view", {
  41605. key: 0,
  41606. class: "modal-bg",
  41607. onClick: $setup.handleCollapseFab
  41608. })) : vue.createCommentVNode("v-if", true),
  41609. vue.createCommentVNode(" 悬浮按钮 "),
  41610. vue.createVNode(_component_uni_fab, {
  41611. ref: "fabRef",
  41612. horizontal: "right",
  41613. vertical: "bottom",
  41614. direction: $setup.state.direction,
  41615. pattern: $setup.state.pattern,
  41616. content: $setup.state.content,
  41617. onTrigger: $setup.handleOpenLink
  41618. }, null, 8, ["direction", "pattern", "content"])
  41619. ],
  41620. 64
  41621. /* STABLE_FRAGMENT */
  41622. );
  41623. }
  41624. const __easycom_6 = /* @__PURE__ */ _export_sfc(_sfc_main$2y, [["render", _sfc_render$2x], ["__scopeId", "data-v-4cc25f94"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-float-menu/s-float-menu.vue"]]);
  41625. const _sfc_main$2x = {
  41626. __name: "su-image",
  41627. props: {
  41628. src: {
  41629. type: String,
  41630. default: ""
  41631. },
  41632. errorSrc: {
  41633. type: String,
  41634. default: "/static/img/shop/empty_network.png"
  41635. },
  41636. mode: {
  41637. type: String,
  41638. default: "widthFix"
  41639. },
  41640. isPreview: {
  41641. type: Boolean,
  41642. default: false
  41643. },
  41644. previewList: {
  41645. type: Array,
  41646. default() {
  41647. return [];
  41648. }
  41649. },
  41650. current: {
  41651. type: Number,
  41652. default: -1
  41653. },
  41654. height: {
  41655. type: Number,
  41656. default: 0
  41657. },
  41658. width: {
  41659. type: Number,
  41660. default: 0
  41661. },
  41662. radius: {
  41663. type: Number,
  41664. default: 0
  41665. }
  41666. },
  41667. emits: ["load", "error"],
  41668. setup(__props, { expose: __expose, emit: __emit }) {
  41669. __expose();
  41670. const state = vue.reactive({
  41671. isError: false,
  41672. imgHeight: 600
  41673. });
  41674. const props = __props;
  41675. const emits = __emit;
  41676. const customStyle = vue.computed(() => {
  41677. return {
  41678. height: (props.height || state.imgHeight) + "rpx",
  41679. width: props.width ? props.width + "rpx" : "100%",
  41680. borderRadius: props.radius ? props.radius + "rpx" : ""
  41681. };
  41682. });
  41683. function onImgLoad(e2) {
  41684. if (props.height === 0) {
  41685. state.imgHeight = e2.detail.height / e2.detail.width * 750;
  41686. }
  41687. }
  41688. function onImgError(e2) {
  41689. state.isError = true;
  41690. emits("error", e2);
  41691. }
  41692. function onImgPreview() {
  41693. if (!props.isPreview)
  41694. return;
  41695. uni.previewImage({
  41696. urls: props.previewList.length < 1 ? [props.src] : props.previewList,
  41697. current: props.current,
  41698. longPressActions: {
  41699. itemList: ["发送给朋友", "保存图片", "收藏"],
  41700. success: function(data) {
  41701. formatAppLog("log", "at sheep/ui/su-image/su-image.vue:113", "选中了第" + (data.tapIndex + 1) + "个按钮,第" + (data.index + 1) + "张图片");
  41702. },
  41703. fail: function(err) {
  41704. formatAppLog("log", "at sheep/ui/su-image/su-image.vue:116", err.errMsg);
  41705. }
  41706. }
  41707. });
  41708. }
  41709. const __returned__ = { state, props, emits, customStyle, onImgLoad, onImgError, onImgPreview, reactive: vue.reactive, computed: vue.computed, get sheep() {
  41710. return sheep$1;
  41711. } };
  41712. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  41713. return __returned__;
  41714. }
  41715. };
  41716. function _sfc_render$2w(_ctx, _cache, $props, $setup, $data, $options) {
  41717. return !$setup.state.isError ? (vue.openBlock(), vue.createElementBlock("image", {
  41718. key: 0,
  41719. class: "su-img",
  41720. style: vue.normalizeStyle($setup.customStyle),
  41721. draggable: false,
  41722. mode: $props.mode,
  41723. src: $setup.sheep.$url.cdn($props.src),
  41724. onClick: $setup.onImgPreview,
  41725. onLoad: $setup.onImgLoad,
  41726. onError: $setup.onImgError
  41727. }, null, 44, ["mode", "src"])) : vue.createCommentVNode("v-if", true);
  41728. }
  41729. const __easycom_0$f = /* @__PURE__ */ _export_sfc(_sfc_main$2x, [["render", _sfc_render$2w], ["__scopeId", "data-v-ed9e576c"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/ui/su-image/su-image.vue"]]);
  41730. const _sfc_main$2w = {
  41731. __name: "s-image-block",
  41732. props: {
  41733. data: {
  41734. type: Object,
  41735. default: () => ({})
  41736. },
  41737. styles: {
  41738. type: Object,
  41739. default: () => ({})
  41740. }
  41741. },
  41742. setup(__props, { expose: __expose }) {
  41743. __expose();
  41744. const props = __props;
  41745. const __returned__ = { props, get sheep() {
  41746. return sheep$1;
  41747. } };
  41748. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  41749. return __returned__;
  41750. }
  41751. };
  41752. function _sfc_render$2v(_ctx, _cache, $props, $setup, $data, $options) {
  41753. const _component_su_image = resolveEasycom(vue.resolveDynamicComponent("su-image"), __easycom_0$f);
  41754. return vue.openBlock(), vue.createElementBlock("view", {
  41755. onClick: _cache[0] || (_cache[0] = ($event) => {
  41756. var _a2;
  41757. return $setup.sheep.$router.go((_a2 = $props.data) == null ? void 0 : _a2.url);
  41758. })
  41759. }, [
  41760. vue.createVNode(_component_su_image, {
  41761. src: $setup.sheep.$url.cdn($props.data.imgUrl),
  41762. mode: "widthFix"
  41763. }, null, 8, ["src"])
  41764. ]);
  41765. }
  41766. const __easycom_7 = /* @__PURE__ */ _export_sfc(_sfc_main$2w, [["render", _sfc_render$2v], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-image-block/s-image-block.vue"]]);
  41767. const _sfc_main$2v = {
  41768. __name: "s-title-block",
  41769. props: {
  41770. data: {
  41771. type: Object,
  41772. default() {
  41773. }
  41774. },
  41775. styles: {
  41776. type: Object,
  41777. default() {
  41778. }
  41779. }
  41780. },
  41781. setup(__props, { expose: __expose }) {
  41782. __expose();
  41783. const state = vue.reactive({
  41784. typeMap: {
  41785. left: "ss-row-left",
  41786. center: "ss-row-center"
  41787. }
  41788. });
  41789. const props = __props;
  41790. const elStyles = {
  41791. background: `url(${sheep$1.$url.cdn(props.data.bgImgUrl)}) no-repeat top center / 100% auto`,
  41792. fontSize: `${props.data.titleSize}px`,
  41793. fontWeight: `${props.data.titleWeight}px`
  41794. };
  41795. const titleStyles = {
  41796. color: props.data.titleColor,
  41797. fontSize: `${props.data.titleSize}px`,
  41798. textAlign: props.data.textAlign
  41799. };
  41800. const descStyles = {
  41801. color: props.data.descriptionColor,
  41802. textAlign: props.data.textAlign,
  41803. fontSize: `${props.data.descriptionSize}px`,
  41804. fontWeight: `${props.data.descriptionWeight}px`
  41805. };
  41806. const __returned__ = { state, props, elStyles, titleStyles, descStyles, reactive: vue.reactive, get sheep() {
  41807. return sheep$1;
  41808. } };
  41809. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  41810. return __returned__;
  41811. }
  41812. };
  41813. function _sfc_render$2u(_ctx, _cache, $props, $setup, $data, $options) {
  41814. var _a2;
  41815. return vue.openBlock(), vue.createElementBlock(
  41816. "view",
  41817. {
  41818. class: vue.normalizeClass(["ss-title-wrap ss-flex ss-col-center", [$setup.state.typeMap[$props.data.textAlign]]]),
  41819. style: vue.normalizeStyle([$setup.elStyles])
  41820. },
  41821. [
  41822. vue.createElementVNode("view", { class: "title-content" }, [
  41823. vue.createCommentVNode(" 主标题 "),
  41824. $props.data.title ? (vue.openBlock(), vue.createElementBlock(
  41825. "view",
  41826. {
  41827. key: 0,
  41828. class: "title-text",
  41829. style: vue.normalizeStyle([$setup.titleStyles])
  41830. },
  41831. vue.toDisplayString($props.data.title),
  41832. 5
  41833. /* TEXT, STYLE */
  41834. )) : vue.createCommentVNode("v-if", true),
  41835. vue.createCommentVNode(" 副标题 "),
  41836. $props.data.description ? (vue.openBlock(), vue.createElementBlock(
  41837. "view",
  41838. {
  41839. key: 1,
  41840. style: vue.normalizeStyle([$setup.descStyles]),
  41841. class: "sub-title-text"
  41842. },
  41843. vue.toDisplayString($props.data.description),
  41844. 5
  41845. /* TEXT, STYLE */
  41846. )) : vue.createCommentVNode("v-if", true)
  41847. ]),
  41848. vue.createCommentVNode(" 查看更多 "),
  41849. ((_a2 = $props.data.more) == null ? void 0 : _a2.show) ? (vue.openBlock(), vue.createElementBlock(
  41850. "view",
  41851. {
  41852. key: 0,
  41853. class: "more-box ss-flex ss-col-center",
  41854. onClick: _cache[0] || (_cache[0] = ($event) => $setup.sheep.$router.go($props.data.more.url)),
  41855. style: vue.normalizeStyle({ color: $props.data.descriptionColor })
  41856. },
  41857. [
  41858. $props.data.more.type !== "icon" ? (vue.openBlock(), vue.createElementBlock(
  41859. "view",
  41860. {
  41861. key: 0,
  41862. class: "more-text"
  41863. },
  41864. vue.toDisplayString($props.data.more.text),
  41865. 1
  41866. /* TEXT */
  41867. )) : vue.createCommentVNode("v-if", true),
  41868. $props.data.more.type !== "text" ? (vue.openBlock(), vue.createElementBlock("text", {
  41869. key: 1,
  41870. class: "_icon-forward"
  41871. })) : vue.createCommentVNode("v-if", true)
  41872. ],
  41873. 4
  41874. /* STYLE */
  41875. )) : vue.createCommentVNode("v-if", true)
  41876. ],
  41877. 6
  41878. /* CLASS, STYLE */
  41879. );
  41880. }
  41881. const __easycom_9 = /* @__PURE__ */ _export_sfc(_sfc_main$2v, [["render", _sfc_render$2u], ["__scopeId", "data-v-2879f4b7"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-title-block/s-title-block.vue"]]);
  41882. const _sfc_main$2u = {
  41883. __name: "s-image-cube",
  41884. props: {
  41885. data: {
  41886. type: Object,
  41887. default() {
  41888. }
  41889. },
  41890. styles: {
  41891. type: Object,
  41892. default() {
  41893. }
  41894. }
  41895. },
  41896. setup(__props, { expose: __expose }) {
  41897. __expose();
  41898. const props = __props;
  41899. const windowWidth2 = sheep$1.$platform.device.windowWidth;
  41900. const cell = vue.computed(() => {
  41901. return (windowWidth2 - ((props.styles.marginLeft || 0) + (props.styles.marginRight || 0) + (props.styles.padding || 0) * 2)) / 4;
  41902. });
  41903. const parseAdWrap = vue.computed(() => {
  41904. var _a2, _b2, _c, _d;
  41905. let heightArr = props.data.list.reduce(
  41906. (prev, cur) => prev.includes(cur.height + cur.top) ? prev : [...prev, cur.height + cur.top],
  41907. []
  41908. );
  41909. let heightMax = Math.max(...heightArr);
  41910. return {
  41911. height: heightMax * cell.value + "px",
  41912. width: windowWidth2 - (((_b2 = (_a2 = props.data) == null ? void 0 : _a2.style) == null ? void 0 : _b2.marginLeft) + ((_d = (_c = props.data) == null ? void 0 : _c.style) == null ? void 0 : _d.marginRight) + props.styles.padding * 2) * 2 + "px"
  41913. };
  41914. });
  41915. const parseImgStyle = (item) => {
  41916. let obj = {
  41917. width: item.width * cell.value - props.data.space + "px",
  41918. height: item.height * cell.value - props.data.space + "px",
  41919. left: item.left * cell.value + "px",
  41920. top: item.top * cell.value + "px",
  41921. "border-top-left-radius": props.data.borderRadiusTop + "px",
  41922. "border-top-right-radius": props.data.borderRadiusTop + "px",
  41923. "border-bottom-left-radius": props.data.borderRadiusBottom + "px",
  41924. "border-bottom-right-radius": props.data.borderRadiusBottom + "px"
  41925. };
  41926. return obj;
  41927. };
  41928. const __returned__ = { props, windowWidth: windowWidth2, cell, parseAdWrap, parseImgStyle, computed: vue.computed, inject: vue.inject, unref: vue.unref, get sheep() {
  41929. return sheep$1;
  41930. } };
  41931. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  41932. return __returned__;
  41933. }
  41934. };
  41935. function _sfc_render$2t(_ctx, _cache, $props, $setup, $data, $options) {
  41936. return vue.openBlock(), vue.createElementBlock(
  41937. "view",
  41938. {
  41939. class: "ss-cube-wrap",
  41940. style: vue.normalizeStyle([$setup.parseAdWrap])
  41941. },
  41942. [
  41943. (vue.openBlock(true), vue.createElementBlock(
  41944. vue.Fragment,
  41945. null,
  41946. vue.renderList($props.data.list, (item, index2) => {
  41947. return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
  41948. vue.createElementVNode("view", {
  41949. class: "cube-img-wrap",
  41950. style: vue.normalizeStyle([$setup.parseImgStyle(item), { margin: $props.data.space + "px" }]),
  41951. onClick: ($event) => $setup.sheep.$router.go(item.url)
  41952. }, [
  41953. vue.createElementVNode("image", {
  41954. class: "cube-img",
  41955. src: $setup.sheep.$url.cdn(item.imgUrl),
  41956. mode: "aspectFill"
  41957. }, null, 8, ["src"])
  41958. ], 12, ["onClick"])
  41959. ]);
  41960. }),
  41961. 128
  41962. /* KEYED_FRAGMENT */
  41963. ))
  41964. ],
  41965. 4
  41966. /* STYLE */
  41967. );
  41968. }
  41969. const __easycom_10 = /* @__PURE__ */ _export_sfc(_sfc_main$2u, [["render", _sfc_render$2t], ["__scopeId", "data-v-c67133d8"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-image-cube/s-image-cube.vue"]]);
  41970. const _sfc_main$2t = {
  41971. __name: "s-video-block",
  41972. props: {
  41973. data: {
  41974. type: Object,
  41975. default() {
  41976. }
  41977. },
  41978. styles: {
  41979. type: Object,
  41980. default() {
  41981. }
  41982. }
  41983. },
  41984. setup(__props, { expose: __expose }) {
  41985. __expose();
  41986. const props = __props;
  41987. const __returned__ = { props, get sheep() {
  41988. return sheep$1;
  41989. }, get guid() {
  41990. return guid;
  41991. } };
  41992. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  41993. return __returned__;
  41994. }
  41995. };
  41996. function _sfc_render$2s(_ctx, _cache, $props, $setup, $data, $options) {
  41997. const _component_su_video = resolveEasycom(vue.resolveDynamicComponent("su-video"), __easycom_0$t);
  41998. return vue.openBlock(), vue.createBlock(_component_su_video, {
  41999. class: "sss",
  42000. uid: $setup.guid(),
  42001. src: $setup.sheep.$url.cdn($props.data.videoUrl),
  42002. poster: $setup.sheep.$url.cdn($props.data.posterUrl),
  42003. height: $props.styles.height * 2,
  42004. autoplay: $props.data.autoplay
  42005. }, null, 8, ["uid", "src", "poster", "height", "autoplay"]);
  42006. }
  42007. const __easycom_11 = /* @__PURE__ */ _export_sfc(_sfc_main$2t, [["render", _sfc_render$2s], ["__scopeId", "data-v-33d06052"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-video-block/s-video-block.vue"]]);
  42008. const _sfc_main$2s = {
  42009. __name: "su-subline",
  42010. props: {
  42011. // 线条颜色
  42012. lineColor: {
  42013. type: String,
  42014. default: "#000"
  42015. },
  42016. // 线条样式:'dotted', 'solid', 'double', 'dashed'
  42017. borderType: {
  42018. type: String,
  42019. default: "dashed"
  42020. },
  42021. // 线条宽度
  42022. lineWidth: {
  42023. type: Number,
  42024. default: 1
  42025. },
  42026. // 高度
  42027. height: {
  42028. type: [Number, String],
  42029. default: "auto"
  42030. },
  42031. // 左右边距:none - 无边距,horizontal - 左右留边
  42032. paddingType: {
  42033. type: String,
  42034. default: "none"
  42035. }
  42036. },
  42037. setup(__props, { expose: __expose }) {
  42038. __expose();
  42039. const props = __props;
  42040. const elStyle = vue.computed(() => {
  42041. return {
  42042. "border-top-width": `${props.lineWidth}px`,
  42043. "border-top-color": props.lineColor,
  42044. "border-top-style": props.borderType,
  42045. margin: props.paddingType === "none" ? "0" : "0px 16px"
  42046. };
  42047. });
  42048. const __returned__ = { props, elStyle, computed: vue.computed };
  42049. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  42050. return __returned__;
  42051. }
  42052. };
  42053. function _sfc_render$2r(_ctx, _cache, $props, $setup, $data, $options) {
  42054. return vue.openBlock(), vue.createElementBlock(
  42055. "view",
  42056. {
  42057. class: "wrap",
  42058. style: vue.normalizeStyle({ height: `${$props.height}px` })
  42059. },
  42060. [
  42061. vue.createElementVNode(
  42062. "view",
  42063. {
  42064. class: "divider",
  42065. style: vue.normalizeStyle([$setup.elStyle])
  42066. },
  42067. null,
  42068. 4
  42069. /* STYLE */
  42070. )
  42071. ],
  42072. 4
  42073. /* STYLE */
  42074. );
  42075. }
  42076. const __easycom_0$e = /* @__PURE__ */ _export_sfc(_sfc_main$2s, [["render", _sfc_render$2r], ["__scopeId", "data-v-b2944841"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/ui/su-subline/su-subline.vue"]]);
  42077. const _sfc_main$2r = {
  42078. __name: "s-line-block",
  42079. props: {
  42080. data: {
  42081. type: Object,
  42082. default: {}
  42083. }
  42084. },
  42085. setup(__props, { expose: __expose }) {
  42086. __expose();
  42087. const props = __props;
  42088. const __returned__ = { props };
  42089. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  42090. return __returned__;
  42091. }
  42092. };
  42093. function _sfc_render$2q(_ctx, _cache, $props, $setup, $data, $options) {
  42094. const _component_su_subline = resolveEasycom(vue.resolveDynamicComponent("su-subline"), __easycom_0$e);
  42095. return vue.openBlock(), vue.createBlock(
  42096. _component_su_subline,
  42097. vue.normalizeProps(vue.guardReactiveProps($props.data)),
  42098. null,
  42099. 16
  42100. /* FULL_PROPS */
  42101. );
  42102. }
  42103. const __easycom_12 = /* @__PURE__ */ _export_sfc(_sfc_main$2r, [["render", _sfc_render$2q], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-line-block/s-line-block.vue"]]);
  42104. const _sfc_main$2q = {
  42105. __name: "s-hotzone-block",
  42106. props: {
  42107. data: {
  42108. type: Object,
  42109. default: () => ({})
  42110. },
  42111. styles: {
  42112. type: Object,
  42113. default: () => ({})
  42114. }
  42115. },
  42116. setup(__props, { expose: __expose }) {
  42117. __expose();
  42118. const props = __props;
  42119. const __returned__ = { props, get sheep() {
  42120. return sheep$1;
  42121. } };
  42122. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  42123. return __returned__;
  42124. }
  42125. };
  42126. function _sfc_render$2p(_ctx, _cache, $props, $setup, $data, $options) {
  42127. return vue.openBlock(), vue.createElementBlock("view", { class: "hotzone-wrap" }, [
  42128. vue.createElementVNode("image", {
  42129. src: $setup.sheep.$url.cdn($props.data.imgUrl),
  42130. style: { "width": "100%" },
  42131. mode: "widthFix"
  42132. }, null, 8, ["src"]),
  42133. (vue.openBlock(true), vue.createElementBlock(
  42134. vue.Fragment,
  42135. null,
  42136. vue.renderList($props.data.list, (item, index2) => {
  42137. return vue.openBlock(), vue.createElementBlock("view", {
  42138. class: "hotzone-box",
  42139. key: index2,
  42140. style: vue.normalizeStyle([
  42141. {
  42142. top: `${item.top}px`,
  42143. left: `${item.left}px`,
  42144. width: `${item.width}px`,
  42145. height: `${item.height}px`
  42146. }
  42147. ]),
  42148. onClick: vue.withModifiers(($event) => $setup.sheep.$router.go(item.url), ["stop"])
  42149. }, null, 12, ["onClick"]);
  42150. }),
  42151. 128
  42152. /* KEYED_FRAGMENT */
  42153. ))
  42154. ]);
  42155. }
  42156. const __easycom_13 = /* @__PURE__ */ _export_sfc(_sfc_main$2q, [["render", _sfc_render$2p], ["__scopeId", "data-v-3db3354a"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-hotzone-block/s-hotzone-block.vue"]]);
  42157. const _imports_0$6 = "/static/icon/points.png";
  42158. const _sfc_main$2p = {
  42159. __name: "s-goods-item",
  42160. props: {
  42161. img: {
  42162. type: String,
  42163. default: "https://img1.baidu.com/it/u=1601695551,235775011&fm=26&fmt=auto"
  42164. },
  42165. title: {
  42166. type: String,
  42167. default: ""
  42168. },
  42169. titleWidth: {
  42170. type: Number,
  42171. default: 0
  42172. },
  42173. skuText: {
  42174. type: [String, Array],
  42175. default: ""
  42176. },
  42177. price: {
  42178. type: [String, Number],
  42179. default: ""
  42180. },
  42181. priceColor: {
  42182. type: [String],
  42183. default: ""
  42184. },
  42185. num: {
  42186. type: [String, Number],
  42187. default: 0
  42188. },
  42189. score: {
  42190. type: [String, Number],
  42191. default: ""
  42192. },
  42193. radius: {
  42194. type: [String],
  42195. default: ""
  42196. },
  42197. marginBottom: {
  42198. type: [String],
  42199. default: ""
  42200. },
  42201. virtualPirce: {
  42202. type: [Boolean],
  42203. default: false
  42204. }
  42205. },
  42206. setup(__props, { expose: __expose }) {
  42207. __expose();
  42208. const props = __props;
  42209. const skuString = vue.computed(() => {
  42210. if (!props.skuText) {
  42211. return "";
  42212. }
  42213. if (typeof props.skuText === "object") {
  42214. return props.skuText.join(",");
  42215. }
  42216. return props.skuText;
  42217. });
  42218. const __returned__ = { props, skuString, get sheep() {
  42219. return sheep$1;
  42220. }, computed: vue.computed, get fen2yuan() {
  42221. return fen2yuan;
  42222. }, get fen2yuan6() {
  42223. return fen2yuan6;
  42224. } };
  42225. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  42226. return __returned__;
  42227. }
  42228. };
  42229. function _sfc_render$2o(_ctx, _cache, $props, $setup, $data, $options) {
  42230. return vue.openBlock(), vue.createElementBlock("view", null, [
  42231. vue.createElementVNode("view", null, [
  42232. vue.renderSlot(_ctx.$slots, "top", {}, void 0, true)
  42233. ]),
  42234. vue.createElementVNode(
  42235. "view",
  42236. {
  42237. class: "ss-order-card-warp ss-flex ss-col-stretch ss-row-between bg-white",
  42238. style: vue.normalizeStyle([{ borderRadius: $props.radius + "rpx", marginBottom: $props.marginBottom + "rpx" }])
  42239. },
  42240. [
  42241. vue.createElementVNode("view", { class: "img-box ss-m-r-24" }, [
  42242. vue.createElementVNode("image", {
  42243. class: "order-img",
  42244. src: $setup.sheep.$url.cdn($props.img),
  42245. mode: "aspectFill"
  42246. }, null, 8, ["src"])
  42247. ]),
  42248. vue.createElementVNode(
  42249. "view",
  42250. {
  42251. class: "box-right ss-flex-col ss-row-between",
  42252. style: vue.normalizeStyle([{ width: $props.titleWidth ? $props.titleWidth + "rpx" : "" }])
  42253. },
  42254. [
  42255. $props.title ? (vue.openBlock(), vue.createElementBlock(
  42256. "view",
  42257. {
  42258. key: 0,
  42259. class: "title-text ss-line-2"
  42260. },
  42261. vue.toDisplayString($props.title),
  42262. 1
  42263. /* TEXT */
  42264. )) : vue.createCommentVNode("v-if", true),
  42265. $setup.skuString ? (vue.openBlock(), vue.createElementBlock(
  42266. "view",
  42267. {
  42268. key: 1,
  42269. class: "spec-text ss-m-t-8 ss-m-b-12"
  42270. },
  42271. vue.toDisplayString($setup.skuString),
  42272. 1
  42273. /* TEXT */
  42274. )) : vue.createCommentVNode("v-if", true),
  42275. vue.createElementVNode("view", { class: "groupon-box" }, [
  42276. vue.renderSlot(_ctx.$slots, "groupon", {}, void 0, true)
  42277. ]),
  42278. vue.createElementVNode("view", { class: "ss-flex" }, [
  42279. vue.createElementVNode("view", { class: "ss-flex ss-col-center" }, [
  42280. vue.createCommentVNode(' v-if="price && Number(price) > 0" '),
  42281. vue.createElementVNode(
  42282. "view",
  42283. {
  42284. class: "price-text ss-flex ss-col-center",
  42285. style: vue.normalizeStyle([{ color: $props.priceColor }])
  42286. },
  42287. [
  42288. $props.virtualPirce ? (vue.openBlock(), vue.createElementBlock(
  42289. vue.Fragment,
  42290. { key: 0 },
  42291. [
  42292. vue.createElementVNode("image", {
  42293. src: _imports_0$6,
  42294. style: { "width": "30rpx", "height": "30rpx" }
  42295. }),
  42296. vue.createTextVNode(
  42297. " " + vue.toDisplayString($setup.fen2yuan6($props.price)),
  42298. 1
  42299. /* TEXT */
  42300. )
  42301. ],
  42302. 64
  42303. /* STABLE_FRAGMENT */
  42304. )) : (vue.openBlock(), vue.createElementBlock(
  42305. vue.Fragment,
  42306. { key: 1 },
  42307. [
  42308. vue.createTextVNode(
  42309. "¥" + vue.toDisplayString($setup.fen2yuan($props.price)),
  42310. 1
  42311. /* TEXT */
  42312. )
  42313. ],
  42314. 64
  42315. /* STABLE_FRAGMENT */
  42316. ))
  42317. ],
  42318. 4
  42319. /* STYLE */
  42320. ),
  42321. $props.num ? (vue.openBlock(), vue.createElementBlock(
  42322. "view",
  42323. {
  42324. key: 0,
  42325. class: "total-text ss-flex ss-col-center"
  42326. },
  42327. "x " + vue.toDisplayString($props.num),
  42328. 1
  42329. /* TEXT */
  42330. )) : vue.createCommentVNode("v-if", true),
  42331. vue.renderSlot(_ctx.$slots, "priceSuffix", {}, void 0, true)
  42332. ])
  42333. ]),
  42334. vue.createElementVNode("view", { class: "tool-box" }, [
  42335. vue.renderSlot(_ctx.$slots, "tool", {}, void 0, true)
  42336. ]),
  42337. vue.createElementVNode("view", null, [
  42338. vue.renderSlot(_ctx.$slots, "rightBottom", {}, void 0, true)
  42339. ])
  42340. ],
  42341. 4
  42342. /* STYLE */
  42343. )
  42344. ],
  42345. 4
  42346. /* STYLE */
  42347. )
  42348. ]);
  42349. }
  42350. const __easycom_3$5 = /* @__PURE__ */ _export_sfc(_sfc_main$2p, [["render", _sfc_render$2o], ["__scopeId", "data-v-8a2df41e"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-goods-item/s-goods-item.vue"]]);
  42351. const _sfc_main$2o = {
  42352. __name: "goods-collect",
  42353. setup(__props, { expose: __expose }) {
  42354. __expose();
  42355. vue.useCssVars((_ctx) => ({
  42356. "28ee79e9-sys_navBar": vue.unref(sys_navBar)
  42357. }));
  42358. const sys_navBar = sheep$1.$platform.navbar;
  42359. const state = vue.reactive({
  42360. pagination: {
  42361. list: [],
  42362. total: 0,
  42363. pageNo: 1,
  42364. pageSize: 6
  42365. },
  42366. loadStatus: "",
  42367. editMode: false,
  42368. selectedCollectList: [],
  42369. // 选中的 SPU 数组
  42370. selectAll: false
  42371. });
  42372. async function getData() {
  42373. state.loadStatus = "loading";
  42374. const { code: code2, data } = await FavoriteApi.getFavoritePage({
  42375. pageNo: state.pagination.pageNo,
  42376. pageSize: state.pagination.pageSize
  42377. });
  42378. if (code2 !== 0) {
  42379. return;
  42380. }
  42381. state.pagination.list = _$1.concat(state.pagination.list, data.list);
  42382. state.pagination.total = data.total;
  42383. state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore";
  42384. }
  42385. const onSelect = (spuId) => {
  42386. if (!state.selectedCollectList.includes(spuId)) {
  42387. state.selectedCollectList.push(spuId);
  42388. } else {
  42389. state.selectedCollectList.splice(state.selectedCollectList.indexOf(spuId), 1);
  42390. }
  42391. state.selectAll = state.selectedCollectList.length === state.pagination.list.length;
  42392. };
  42393. const onSelectAll = () => {
  42394. state.selectAll = !state.selectAll;
  42395. if (!state.selectAll) {
  42396. state.selectedCollectList = [];
  42397. } else {
  42398. state.selectedCollectList = state.pagination.list.map((item) => item.spuId);
  42399. }
  42400. };
  42401. async function onCancel() {
  42402. if (!state.selectedCollectList) {
  42403. return;
  42404. }
  42405. for (const spuId of state.selectedCollectList) {
  42406. await FavoriteApi.deleteFavorite(spuId);
  42407. }
  42408. state.editMode = false;
  42409. state.selectedCollectList = [];
  42410. state.selectAll = false;
  42411. resetPagination(state.pagination);
  42412. await getData();
  42413. }
  42414. function loadMore() {
  42415. if (state.loadStatus === "noMore") {
  42416. return;
  42417. }
  42418. state.pagination.pageNo++;
  42419. getData();
  42420. }
  42421. onReachBottom(() => {
  42422. loadMore();
  42423. });
  42424. onLoad(() => {
  42425. getData();
  42426. });
  42427. const __returned__ = { sys_navBar, state, getData, onSelect, onSelectAll, onCancel, loadMore, get sheep() {
  42428. return sheep$1;
  42429. }, reactive: vue.reactive, get onLoad() {
  42430. return onLoad;
  42431. }, get onReachBottom() {
  42432. return onReachBottom;
  42433. }, get _() {
  42434. return _$1;
  42435. }, get FavoriteApi() {
  42436. return FavoriteApi;
  42437. }, get resetPagination() {
  42438. return resetPagination;
  42439. } };
  42440. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  42441. return __returned__;
  42442. }
  42443. };
  42444. function _sfc_render$2n(_ctx, _cache, $props, $setup, $data, $options) {
  42445. const _component_s_goods_item = resolveEasycom(vue.resolveDynamicComponent("s-goods-item"), __easycom_3$5);
  42446. const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9);
  42447. const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5);
  42448. const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6);
  42449. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  42450. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  42451. title: _ctx.$t("common.favorite")
  42452. }, {
  42453. default: vue.withCtx(() => [
  42454. vue.createElementVNode("view", { class: "cart-box ss-flex ss-flex-col ss-row-between" }, [
  42455. vue.createCommentVNode(" 头部 "),
  42456. vue.createElementVNode("view", { class: "cart-header ss-flex ss-col-center ss-row-between ss-p-x-30" }, [
  42457. vue.createElementVNode("view", { class: "header-left ss-flex ss-col-center ss-font-26" }, [
  42458. vue.createElementVNode(
  42459. "text",
  42460. { class: "goods-number ui-TC-Main ss-flex" },
  42461. vue.toDisplayString(_ctx.$t("common.total_goods", { number: $setup.state.pagination.total })),
  42462. 1
  42463. /* TEXT */
  42464. )
  42465. ]),
  42466. vue.createElementVNode("view", { class: "header-right" }, [
  42467. $setup.state.editMode && $setup.state.pagination.total ? (vue.openBlock(), vue.createElementBlock(
  42468. "button",
  42469. {
  42470. key: 0,
  42471. class: "ss-reset-button",
  42472. onClick: _cache[0] || (_cache[0] = ($event) => $setup.state.editMode = false)
  42473. },
  42474. vue.toDisplayString(_ctx.$t("common.cancel")),
  42475. 1
  42476. /* TEXT */
  42477. )) : vue.createCommentVNode("v-if", true),
  42478. !$setup.state.editMode && $setup.state.pagination.total ? (vue.openBlock(), vue.createElementBlock(
  42479. "button",
  42480. {
  42481. key: 1,
  42482. class: "ss-reset-button ui-TC-Main",
  42483. onClick: _cache[1] || (_cache[1] = ($event) => $setup.state.editMode = true)
  42484. },
  42485. vue.toDisplayString(_ctx.$t("common.edit")),
  42486. 1
  42487. /* TEXT */
  42488. )) : vue.createCommentVNode("v-if", true)
  42489. ])
  42490. ]),
  42491. vue.createCommentVNode(" 内容 "),
  42492. vue.createElementVNode("view", { class: "cart-content" }, [
  42493. (vue.openBlock(true), vue.createElementBlock(
  42494. vue.Fragment,
  42495. null,
  42496. vue.renderList($setup.state.pagination.list, (item) => {
  42497. return vue.openBlock(), vue.createElementBlock("view", {
  42498. class: "goods-box ss-r-10",
  42499. key: item.id
  42500. }, [
  42501. vue.createElementVNode("view", { class: "ss-flex ss-col-center" }, [
  42502. $setup.state.editMode ? (vue.openBlock(), vue.createElementBlock("label", {
  42503. key: 0,
  42504. class: "check-box ss-flex ss-col-center ss-p-l-10",
  42505. onClick: ($event) => $setup.onSelect(item.spuId)
  42506. }, [
  42507. vue.createElementVNode("radio", {
  42508. checked: $setup.state.selectedCollectList.includes(item.spuId),
  42509. color: "var(--ui-BG-Main)",
  42510. style: { "transform": "scale(0.8)" },
  42511. onClick: vue.withModifiers(($event) => $setup.onSelect(item.spuId), ["stop"])
  42512. }, null, 8, ["checked", "onClick"])
  42513. ], 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  42514. vue.createVNode(_component_s_goods_item, {
  42515. title: item.spuName,
  42516. img: item.picUrl,
  42517. price: item.price,
  42518. priceColor: "#FF3000",
  42519. titleWidth: 400,
  42520. onClick: ($event) => $setup.sheep.$router.go("/pages/goods/index", {
  42521. id: item.spuId
  42522. })
  42523. }, null, 8, ["title", "img", "price", "onClick"])
  42524. ])
  42525. ]);
  42526. }),
  42527. 128
  42528. /* KEYED_FRAGMENT */
  42529. ))
  42530. ]),
  42531. vue.createCommentVNode(" 底部 "),
  42532. vue.withDirectives(vue.createVNode(
  42533. _component_su_fixed,
  42534. {
  42535. bottom: "",
  42536. val: 0,
  42537. placeholder: ""
  42538. },
  42539. {
  42540. default: vue.withCtx(() => [
  42541. vue.createElementVNode("view", { class: "cart-footer ss-flex ss-col-center ss-row-between ss-p-x-30 border-bottom" }, [
  42542. vue.createElementVNode("view", { class: "footer-left ss-flex ss-col-center" }, [
  42543. vue.createElementVNode("label", {
  42544. class: "check-box ss-flex ss-col-center ss-p-r-30",
  42545. onClick: $setup.onSelectAll
  42546. }, [
  42547. vue.createElementVNode("radio", {
  42548. checked: $setup.state.selectAll,
  42549. color: "var(--ui-BG-Main)",
  42550. style: { "transform": "scale(0.7)" },
  42551. onClick: vue.withModifiers($setup.onSelectAll, ["stop"])
  42552. }, null, 8, ["checked"]),
  42553. vue.createElementVNode(
  42554. "view",
  42555. null,
  42556. vue.toDisplayString(_ctx.$t("common.all")),
  42557. 1
  42558. /* TEXT */
  42559. )
  42560. ])
  42561. ]),
  42562. vue.createElementVNode("view", { class: "footer-right" }, [
  42563. vue.createElementVNode(
  42564. "button",
  42565. {
  42566. class: "ss-reset-button ui-BG-Main-Gradient pay-btn ss-font-28 ui-Shadow-Main",
  42567. onClick: $setup.onCancel
  42568. },
  42569. vue.toDisplayString(_ctx.$t("common.delete")),
  42570. 1
  42571. /* TEXT */
  42572. )
  42573. ])
  42574. ])
  42575. ]),
  42576. _: 1
  42577. /* STABLE */
  42578. },
  42579. 512
  42580. /* NEED_PATCH */
  42581. ), [
  42582. [vue.vShow, $setup.state.editMode]
  42583. ])
  42584. ]),
  42585. $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, {
  42586. key: 0,
  42587. status: $setup.state.loadStatus,
  42588. "content-text": {
  42589. contentdown: "上拉加载更多"
  42590. },
  42591. onClick: $setup.loadMore
  42592. }, null, 8, ["status"])) : vue.createCommentVNode("v-if", true),
  42593. $setup.state.pagination.total === 0 ? (vue.openBlock(), vue.createBlock(_component_s_empty, {
  42594. key: 1,
  42595. text: "暂无收藏",
  42596. icon: "/static/collect-empty.png"
  42597. })) : vue.createCommentVNode("v-if", true)
  42598. ]),
  42599. _: 1
  42600. /* STABLE */
  42601. }, 8, ["title"]);
  42602. }
  42603. const PagesUserGoodsCollect = /* @__PURE__ */ _export_sfc(_sfc_main$2o, [["render", _sfc_render$2n], ["__scopeId", "data-v-28ee79e9"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/goods-collect.vue"]]);
  42604. const _imports_1$3 = "/static/img/shop/tabbar/category2.png";
  42605. const _sfc_main$2n = {
  42606. __name: "s-goods-column",
  42607. props: {
  42608. goodsFields: {
  42609. type: [Array, Object],
  42610. default() {
  42611. return {
  42612. // 商品价格
  42613. price: {
  42614. show: true
  42615. },
  42616. // 库存
  42617. stock: {
  42618. show: true
  42619. },
  42620. // 商品名称
  42621. name: {
  42622. show: true
  42623. },
  42624. // 商品介绍
  42625. introduction: {
  42626. show: true
  42627. },
  42628. // 市场价
  42629. promotionFee: {
  42630. show: true
  42631. },
  42632. // 销量
  42633. salesCount: {
  42634. show: true
  42635. }
  42636. };
  42637. }
  42638. },
  42639. tagStyle: {
  42640. type: Object,
  42641. default: {}
  42642. },
  42643. data: {
  42644. type: Object,
  42645. default: {}
  42646. },
  42647. size: {
  42648. type: String,
  42649. default: "sl"
  42650. },
  42651. background: {
  42652. type: String,
  42653. default: ""
  42654. },
  42655. topRadius: {
  42656. type: Number,
  42657. default: 0
  42658. },
  42659. bottomRadius: {
  42660. type: Number,
  42661. default: 0
  42662. },
  42663. titleWidth: {
  42664. type: Number,
  42665. default: 0
  42666. },
  42667. titleColor: {
  42668. type: String,
  42669. default: "#333"
  42670. },
  42671. priceColor: {
  42672. type: String,
  42673. default: ""
  42674. },
  42675. originPriceColor: {
  42676. type: String,
  42677. default: "#C4C4C4"
  42678. },
  42679. priceUnit: {
  42680. type: String,
  42681. default: "¥"
  42682. },
  42683. subTitleColor: {
  42684. type: String,
  42685. default: "#999999"
  42686. },
  42687. subTitleBackground: {
  42688. type: String,
  42689. default: ""
  42690. },
  42691. buttonShow: {
  42692. type: Boolean,
  42693. default: true
  42694. },
  42695. seckillTag: {
  42696. type: Boolean,
  42697. default: false
  42698. },
  42699. grouponTag: {
  42700. type: Boolean,
  42701. default: false
  42702. }
  42703. },
  42704. emits: ["click", "getHeight"],
  42705. setup(__props, { expose: __expose, emit: __emit }) {
  42706. __expose();
  42707. const state = vue.reactive({});
  42708. const props = __props;
  42709. const elStyles = vue.computed(() => {
  42710. return {
  42711. background: props.background,
  42712. "border-top-left-radius": props.topRadius + "px",
  42713. "border-top-right-radius": props.topRadius + "px",
  42714. "border-bottom-left-radius": props.bottomRadius + "px",
  42715. "border-bottom-right-radius": props.bottomRadius + "px"
  42716. };
  42717. });
  42718. const salesAndStock = vue.computed(() => {
  42719. var _a2, _b2;
  42720. let text = [];
  42721. if ((_a2 = props.goodsFields.salesCount) == null ? void 0 : _a2.show) {
  42722. text.push(formatSales(props.data.sales_show_type, props.data.salesCount));
  42723. }
  42724. if ((_b2 = props.goodsFields.stock) == null ? void 0 : _b2.show) {
  42725. text.push(formatStock(props.data.stock_show_type, props.data.stock));
  42726. }
  42727. return text.join(" | ");
  42728. });
  42729. const emits = __emit;
  42730. const onClick = () => {
  42731. emits("click");
  42732. };
  42733. const {
  42734. proxy
  42735. } = vue.getCurrentInstance();
  42736. const elId = `sheep_${Math.ceil(Math.random() * 1e6).toString(36)}`;
  42737. function getGoodsPriceCardWH() {
  42738. if (props.size === "md") {
  42739. const view = uni.createSelectorQuery().in(proxy);
  42740. view.select(`#${elId}`).fields({
  42741. size: true,
  42742. scrollOffset: true
  42743. });
  42744. view.exec((data) => {
  42745. let totalHeight = 0;
  42746. const goodsPriceCard = data[0];
  42747. if (props.data.image_wh) {
  42748. totalHeight = goodsPriceCard.width / props.data.image_wh.w * props.data.image_wh.h + goodsPriceCard.height;
  42749. } else {
  42750. totalHeight = goodsPriceCard.width;
  42751. }
  42752. emits("getHeight", totalHeight);
  42753. });
  42754. }
  42755. }
  42756. vue.onMounted(() => {
  42757. vue.nextTick(() => {
  42758. getGoodsPriceCardWH();
  42759. });
  42760. });
  42761. const __returned__ = { state, props, elStyles, salesAndStock, emits, onClick, proxy, elId, getGoodsPriceCardWH, computed: vue.computed, reactive: vue.reactive, getCurrentInstance: vue.getCurrentInstance, onMounted: vue.onMounted, nextTick: vue.nextTick, get sheep() {
  42762. return sheep$1;
  42763. }, get fen2yuan() {
  42764. return fen2yuan;
  42765. }, get formatSales() {
  42766. return formatSales;
  42767. }, get fen2yuan6() {
  42768. return fen2yuan6;
  42769. }, get formatStock() {
  42770. return formatStock;
  42771. }, goodsCollectVue: PagesUserGoodsCollect, get isArray() {
  42772. return lodashExports.isArray;
  42773. } };
  42774. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  42775. return __returned__;
  42776. }
  42777. };
  42778. function _sfc_render$2m(_ctx, _cache, $props, $setup, $data, $options) {
  42779. var _a2, _b2, _c, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s2, _t2, _u, _v, _w, _x, _y, _z, _A;
  42780. return vue.openBlock(), vue.createElementBlock("view", { class: "ss-goods-wrap" }, [
  42781. vue.createCommentVNode(" xs卡片:横向紧凑型,一行放两个,图片左内容右边 "),
  42782. $props.size === "xs" ? (vue.openBlock(), vue.createElementBlock(
  42783. "view",
  42784. {
  42785. key: 0,
  42786. class: "xs-goods-card ss-flex ss-col-stretch",
  42787. style: vue.normalizeStyle([$setup.elStyles]),
  42788. onClick: $setup.onClick
  42789. },
  42790. [
  42791. $props.tagStyle.show ? (vue.openBlock(), vue.createElementBlock("view", {
  42792. key: 0,
  42793. class: "tag-icon-box"
  42794. }, [
  42795. vue.createElementVNode("image", {
  42796. class: "tag-icon",
  42797. src: $setup.sheep.$url.cdn($props.tagStyle.src || $props.tagStyle.imgUrl)
  42798. }, null, 8, ["src"])
  42799. ])) : vue.createCommentVNode("v-if", true),
  42800. vue.createElementVNode("image", {
  42801. class: "xs-img-box",
  42802. src: $setup.sheep.$url.cdn($props.data.image || $props.data.picUrl),
  42803. mode: "aspectFit"
  42804. }, null, 8, ["src"]),
  42805. ((_a2 = $props.goodsFields.title) == null ? void 0 : _a2.show) || ((_b2 = $props.goodsFields.name) == null ? void 0 : _b2.show) || ((_c = $props.goodsFields.price) == null ? void 0 : _c.show) ? (vue.openBlock(), vue.createElementBlock("view", {
  42806. key: 1,
  42807. class: "xs-goods-content ss-flex-col ss-row-around"
  42808. }, [
  42809. ((_d = $props.goodsFields.title) == null ? void 0 : _d.show) || ((_e2 = $props.goodsFields.name) == null ? void 0 : _e2.show) ? (vue.openBlock(), vue.createElementBlock(
  42810. "view",
  42811. {
  42812. key: 0,
  42813. class: "xs-goods-title ss-line-1",
  42814. style: vue.normalizeStyle([{ color: $props.titleColor, width: $props.titleWidth ? $props.titleWidth + "rpx" : "" }])
  42815. },
  42816. vue.toDisplayString($props.data.title || $props.data.name),
  42817. 5
  42818. /* TEXT, STYLE */
  42819. )) : vue.createCommentVNode("v-if", true),
  42820. ((_f = $props.goodsFields.price) == null ? void 0 : _f.show) ? (vue.openBlock(), vue.createElementBlock(
  42821. "view",
  42822. {
  42823. key: 1,
  42824. class: "xs-goods-price ss-flex",
  42825. style: vue.normalizeStyle([{ color: $props.goodsFields.price.color }])
  42826. },
  42827. [
  42828. $props.data.spuPayType == 2 ? (vue.openBlock(), vue.createElementBlock("image", {
  42829. key: 0,
  42830. src: _imports_0$6,
  42831. class: "ss-m-r-10",
  42832. style: { "width": "40rpx", "height": "40rpx" }
  42833. })) : (vue.openBlock(), vue.createElementBlock("text", { key: 1 }, "¥")),
  42834. $props.data.highPrecision ? (vue.openBlock(), vue.createElementBlock(
  42835. "text",
  42836. { key: 2 },
  42837. vue.toDisplayString($setup.isArray($props.data.highPrecisionPrice) ? $setup.fen2yuan6($props.data.highPrecisionPrice[0]) : $setup.fen2yuan6($props.data.highPrecisionPrice)),
  42838. 1
  42839. /* TEXT */
  42840. )) : (vue.openBlock(), vue.createElementBlock(
  42841. "text",
  42842. { key: 3 },
  42843. vue.toDisplayString($setup.isArray($props.data.price) ? $setup.fen2yuan($props.data.price[0]) : $setup.fen2yuan($props.data.price)),
  42844. 1
  42845. /* TEXT */
  42846. )),
  42847. vue.createCommentVNode(' <text class="price-unit ss-font-24">{{ priceUnit }}</text> ')
  42848. ],
  42849. 4
  42850. /* STYLE */
  42851. )) : vue.createCommentVNode("v-if", true),
  42852. vue.createElementVNode("view", null, [
  42853. $props.data.promotionFee >= 0 ? (vue.openBlock(), vue.createElementBlock(
  42854. "view",
  42855. {
  42856. key: 0,
  42857. class: "origin-price-text"
  42858. },
  42859. vue.toDisplayString(_ctx.$t("common.points")) + ":" + vue.toDisplayString($setup.fen2yuan($props.data.promotionFee)),
  42860. 1
  42861. /* TEXT */
  42862. )) : vue.createCommentVNode("v-if", true)
  42863. ])
  42864. ])) : vue.createCommentVNode("v-if", true)
  42865. ],
  42866. 4
  42867. /* STYLE */
  42868. )) : vue.createCommentVNode("v-if", true),
  42869. vue.createCommentVNode(" sm卡片:竖向紧凑,一行放三个,图上内容下 "),
  42870. $props.size === "sm" ? (vue.openBlock(), vue.createElementBlock(
  42871. "view",
  42872. {
  42873. key: 1,
  42874. class: "sm-goods-card ss-flex-col",
  42875. style: vue.normalizeStyle([$setup.elStyles]),
  42876. onClick: $setup.onClick
  42877. },
  42878. [
  42879. $props.tagStyle.show ? (vue.openBlock(), vue.createElementBlock("view", {
  42880. key: 0,
  42881. class: "tag-icon-box"
  42882. }, [
  42883. vue.createElementVNode("image", {
  42884. class: "tag-icon",
  42885. src: $setup.sheep.$url.cdn($props.tagStyle.src || $props.tagStyle.imgUrl)
  42886. }, null, 8, ["src"])
  42887. ])) : vue.createCommentVNode("v-if", true),
  42888. vue.createElementVNode("image", {
  42889. class: "sm-img-box",
  42890. src: $setup.sheep.$url.cdn($props.data.image || $props.data.picUrl),
  42891. mode: "aspectFill"
  42892. }, null, 8, ["src"]),
  42893. ((_g = $props.goodsFields.title) == null ? void 0 : _g.show) || ((_h = $props.goodsFields.name) == null ? void 0 : _h.show) || ((_i = $props.goodsFields.price) == null ? void 0 : _i.show) ? (vue.openBlock(), vue.createElementBlock(
  42894. "view",
  42895. {
  42896. key: 1,
  42897. class: "sm-goods-content",
  42898. style: vue.normalizeStyle([{ color: $props.titleColor, width: $props.titleWidth ? $props.titleWidth + "rpx" : "" }])
  42899. },
  42900. [
  42901. ((_j = $props.goodsFields.title) == null ? void 0 : _j.show) || ((_k = $props.goodsFields.name) == null ? void 0 : _k.show) ? (vue.openBlock(), vue.createElementBlock(
  42902. "view",
  42903. {
  42904. key: 0,
  42905. class: "sm-goods-title ss-line-1 ss-m-b-8"
  42906. },
  42907. vue.toDisplayString($props.data.title || $props.data.name),
  42908. 1
  42909. /* TEXT */
  42910. )) : vue.createCommentVNode("v-if", true),
  42911. ((_l = $props.goodsFields.price) == null ? void 0 : _l.show) ? (vue.openBlock(), vue.createElementBlock(
  42912. "view",
  42913. {
  42914. key: 1,
  42915. class: "sm-goods-price ss-flex",
  42916. style: vue.normalizeStyle([{ color: $props.goodsFields.price.color }])
  42917. },
  42918. [
  42919. $props.data.spuPayType == 2 ? (vue.openBlock(), vue.createElementBlock("image", {
  42920. key: 0,
  42921. src: _imports_0$6,
  42922. class: "ss-m-r-10",
  42923. style: { "width": "40rpx", "height": "40rpx" }
  42924. })) : (vue.openBlock(), vue.createElementBlock("text", { key: 1 }, "¥")),
  42925. vue.createCommentVNode(' <text class="price-unit ss-font-24">{{ priceUnit }}</text> '),
  42926. $props.data.highPrecision ? (vue.openBlock(), vue.createElementBlock(
  42927. "text",
  42928. { key: 2 },
  42929. vue.toDisplayString($setup.isArray($props.data.highPrecisionPrice) ? $setup.fen2yuan6($props.data.highPrecisionPrice[0]) : $setup.fen2yuan6($props.data.highPrecisionPrice)),
  42930. 1
  42931. /* TEXT */
  42932. )) : (vue.openBlock(), vue.createElementBlock(
  42933. "text",
  42934. { key: 3 },
  42935. vue.toDisplayString($setup.isArray($props.data.price) ? $setup.fen2yuan($props.data.price[0]) : $setup.fen2yuan($props.data.price)),
  42936. 1
  42937. /* TEXT */
  42938. ))
  42939. ],
  42940. 4
  42941. /* STYLE */
  42942. )) : vue.createCommentVNode("v-if", true),
  42943. $props.data.promotionFee >= 0 ? (vue.openBlock(), vue.createElementBlock(
  42944. "view",
  42945. {
  42946. key: 2,
  42947. class: "origin-price-text"
  42948. },
  42949. vue.toDisplayString(_ctx.$t("common.points")) + ":" + vue.toDisplayString($setup.fen2yuan($props.data.promotionFee)),
  42950. 1
  42951. /* TEXT */
  42952. )) : vue.createCommentVNode("v-if", true)
  42953. ],
  42954. 4
  42955. /* STYLE */
  42956. )) : vue.createCommentVNode("v-if", true)
  42957. ],
  42958. 4
  42959. /* STYLE */
  42960. )) : vue.createCommentVNode("v-if", true),
  42961. vue.createCommentVNode(" md卡片:竖向,一行放两个,图上内容下 "),
  42962. $props.size === "md" ? (vue.openBlock(), vue.createElementBlock(
  42963. "view",
  42964. {
  42965. key: 2,
  42966. class: "md-goods-card ss-flex-col",
  42967. style: vue.normalizeStyle([$setup.elStyles]),
  42968. onClick: $setup.onClick
  42969. },
  42970. [
  42971. $props.tagStyle.show ? (vue.openBlock(), vue.createElementBlock("view", {
  42972. key: 0,
  42973. class: "tag-icon-box"
  42974. }, [
  42975. vue.createElementVNode("image", {
  42976. class: "tag-icon",
  42977. src: $setup.sheep.$url.cdn($props.tagStyle.src || $props.tagStyle.imgUrl)
  42978. }, null, 8, ["src"])
  42979. ])) : vue.createCommentVNode("v-if", true),
  42980. vue.createElementVNode("image", {
  42981. class: "md-img-box",
  42982. src: $setup.sheep.$url.cdn($props.data.image || $props.data.picUrl),
  42983. mode: "widthFix"
  42984. }, null, 8, ["src"]),
  42985. vue.createElementVNode("view", {
  42986. class: "md-goods-content ss-flex-col ss-row-around ss-p-b-20 ss-p-t-20 ss-p-x-16",
  42987. id: $setup.elId
  42988. }, [
  42989. ((_m = $props.goodsFields.title) == null ? void 0 : _m.show) || ((_n = $props.goodsFields.name) == null ? void 0 : _n.show) ? (vue.openBlock(), vue.createElementBlock(
  42990. "view",
  42991. {
  42992. key: 0,
  42993. class: "md-goods-title ss-line-1",
  42994. style: vue.normalizeStyle([{ color: $props.titleColor, width: $props.titleWidth ? $props.titleWidth + "rpx" : "" }])
  42995. },
  42996. vue.toDisplayString($props.data.title || $props.data.name),
  42997. 5
  42998. /* TEXT, STYLE */
  42999. )) : vue.createCommentVNode("v-if", true),
  43000. ((_o = $props.goodsFields.subtitle) == null ? void 0 : _o.show) || ((_p = $props.goodsFields.introduction) == null ? void 0 : _p.show) ? (vue.openBlock(), vue.createElementBlock(
  43001. "view",
  43002. {
  43003. key: 1,
  43004. class: "md-goods-subtitle ss-m-t-16 ss-line-1",
  43005. style: vue.normalizeStyle([{ color: $props.subTitleColor, background: $props.subTitleBackground }])
  43006. },
  43007. vue.toDisplayString($props.data.subtitle || $props.data.introduction),
  43008. 5
  43009. /* TEXT, STYLE */
  43010. )) : vue.createCommentVNode("v-if", true),
  43011. vue.renderSlot(_ctx.$slots, "activity", {}, () => {
  43012. var _a3;
  43013. return [
  43014. ((_a3 = $props.data.promos) == null ? void 0 : _a3.length) ? (vue.openBlock(), vue.createElementBlock("view", {
  43015. key: 0,
  43016. class: "tag-box ss-flex-wrap ss-flex ss-col-center"
  43017. }, [
  43018. (vue.openBlock(true), vue.createElementBlock(
  43019. vue.Fragment,
  43020. null,
  43021. vue.renderList($props.data.promos, (item) => {
  43022. return vue.openBlock(), vue.createElementBlock(
  43023. "view",
  43024. {
  43025. class: "activity-tag ss-m-r-10 ss-m-t-16",
  43026. key: item.id
  43027. },
  43028. vue.toDisplayString(item.title),
  43029. 1
  43030. /* TEXT */
  43031. );
  43032. }),
  43033. 128
  43034. /* KEYED_FRAGMENT */
  43035. ))
  43036. ])) : vue.createCommentVNode("v-if", true)
  43037. ];
  43038. }, true),
  43039. vue.createElementVNode("view", { class: "ss-flex ss-col-center ss-m-t-16" }, [
  43040. ((_q = $props.goodsFields.price) == null ? void 0 : _q.show) ? (vue.openBlock(), vue.createElementBlock(
  43041. "view",
  43042. {
  43043. key: 0,
  43044. class: "md-goods-price ss-flex ss-m-r-10",
  43045. style: vue.normalizeStyle([{ color: $props.goodsFields.price.color }])
  43046. },
  43047. [
  43048. $props.data.spuPayType == 2 ? (vue.openBlock(), vue.createElementBlock("image", {
  43049. key: 0,
  43050. src: _imports_0$6,
  43051. class: "ss-m-r-10",
  43052. style: { "width": "40rpx", "height": "40rpx" }
  43053. })) : (vue.openBlock(), vue.createElementBlock("text", { key: 1 }, "¥")),
  43054. vue.createCommentVNode(' <text class="price-unit ss-font-24">{{ priceUnit }}</text> '),
  43055. $props.data.highPrecision ? (vue.openBlock(), vue.createElementBlock(
  43056. "text",
  43057. { key: 2 },
  43058. vue.toDisplayString($setup.isArray($props.data.highPrecisionPrice) ? $setup.fen2yuan6($props.data.highPrecisionPrice[0]) : $setup.fen2yuan6($props.data.highPrecisionPrice)),
  43059. 1
  43060. /* TEXT */
  43061. )) : (vue.openBlock(), vue.createElementBlock(
  43062. "text",
  43063. { key: 3 },
  43064. vue.toDisplayString($setup.isArray($props.data.price) ? $setup.fen2yuan($props.data.price[0]) : $setup.fen2yuan($props.data.price)),
  43065. 1
  43066. /* TEXT */
  43067. ))
  43068. ],
  43069. 4
  43070. /* STYLE */
  43071. )) : vue.createCommentVNode("v-if", true),
  43072. $props.data.promotionFee >= 0 ? (vue.openBlock(), vue.createElementBlock(
  43073. "view",
  43074. {
  43075. key: 1,
  43076. class: "origin-price-text"
  43077. },
  43078. vue.toDisplayString(_ctx.$t("common.points")) + ":" + vue.toDisplayString($setup.fen2yuan($props.data.promotionFee)),
  43079. 1
  43080. /* TEXT */
  43081. )) : vue.createCommentVNode("v-if", true)
  43082. ]),
  43083. vue.createElementVNode("view", { class: "ss-m-t-32 ss-flex ss-col-center ss-flex-wrap" }, [
  43084. vue.createElementVNode(
  43085. "view",
  43086. { class: "sales-text" },
  43087. vue.toDisplayString($setup.salesAndStock),
  43088. 1
  43089. /* TEXT */
  43090. )
  43091. ])
  43092. ]),
  43093. vue.renderSlot(_ctx.$slots, "cart", {}, () => [
  43094. vue.createElementVNode("view", { class: "cart-box ss-flex ss-col-center ss-row-center" }, [
  43095. vue.createElementVNode("image", {
  43096. class: "cart-icon",
  43097. src: _imports_1$3,
  43098. mode: ""
  43099. })
  43100. ])
  43101. ], true)
  43102. ],
  43103. 4
  43104. /* STYLE */
  43105. )) : vue.createCommentVNode("v-if", true),
  43106. vue.createCommentVNode(" lg卡片:横向型,一行放一个,图片左内容右边 "),
  43107. $props.size === "lg" ? (vue.openBlock(), vue.createElementBlock(
  43108. "view",
  43109. {
  43110. key: 3,
  43111. class: "lg-goods-card ss-flex ss-col-stretch",
  43112. style: vue.normalizeStyle([$setup.elStyles]),
  43113. onClick: $setup.onClick
  43114. },
  43115. [
  43116. $props.tagStyle.show ? (vue.openBlock(), vue.createElementBlock("view", {
  43117. key: 0,
  43118. class: "tag-icon-box"
  43119. }, [
  43120. vue.createElementVNode("image", {
  43121. class: "tag-icon",
  43122. src: $setup.sheep.$url.cdn($props.tagStyle.src || $props.tagStyle.imgUrl)
  43123. }, null, 8, ["src"])
  43124. ])) : vue.createCommentVNode("v-if", true),
  43125. $props.seckillTag ? (vue.openBlock(), vue.createElementBlock("view", {
  43126. key: 1,
  43127. class: "seckill-tag ss-flex ss-row-center"
  43128. }, " 秒杀 ")) : vue.createCommentVNode("v-if", true),
  43129. $props.grouponTag ? (vue.openBlock(), vue.createElementBlock("view", {
  43130. key: 2,
  43131. class: "groupon-tag ss-flex ss-row-center"
  43132. }, [
  43133. vue.createElementVNode("view", { class: "tag-icon" }, "拼团")
  43134. ])) : vue.createCommentVNode("v-if", true),
  43135. vue.createElementVNode("image", {
  43136. class: "lg-img-box",
  43137. src: $setup.sheep.$url.cdn($props.data.image || $props.data.picUrl),
  43138. mode: "aspectFill"
  43139. }, null, 8, ["src"]),
  43140. vue.createElementVNode("view", { class: "lg-goods-content ss-flex-1 ss-flex-col ss-row-between ss-p-b-10 ss-p-t-20" }, [
  43141. vue.createElementVNode("view", null, [
  43142. ((_r = $props.goodsFields.title) == null ? void 0 : _r.show) || ((_s2 = $props.goodsFields.name) == null ? void 0 : _s2.show) ? (vue.openBlock(), vue.createElementBlock(
  43143. "view",
  43144. {
  43145. key: 0,
  43146. class: "lg-goods-title ss-line-2",
  43147. style: vue.normalizeStyle([{ color: $props.titleColor }])
  43148. },
  43149. vue.toDisplayString($props.data.title || $props.data.name),
  43150. 5
  43151. /* TEXT, STYLE */
  43152. )) : vue.createCommentVNode("v-if", true),
  43153. ((_t2 = $props.goodsFields.subtitle) == null ? void 0 : _t2.show) || ((_u = $props.goodsFields.introduction) == null ? void 0 : _u.show) ? (vue.openBlock(), vue.createElementBlock(
  43154. "view",
  43155. {
  43156. key: 1,
  43157. class: "lg-goods-subtitle ss-m-t-10 ss-line-1",
  43158. style: vue.normalizeStyle([{ color: $props.subTitleColor, background: $props.subTitleBackground }])
  43159. },
  43160. vue.toDisplayString($props.data.subtitle || $props.data.introduction),
  43161. 5
  43162. /* TEXT, STYLE */
  43163. )) : vue.createCommentVNode("v-if", true)
  43164. ]),
  43165. vue.createElementVNode("view", null, [
  43166. vue.renderSlot(_ctx.$slots, "activity", {}, () => {
  43167. var _a3;
  43168. return [
  43169. ((_a3 = $props.data.promos) == null ? void 0 : _a3.length) ? (vue.openBlock(), vue.createElementBlock("view", {
  43170. key: 0,
  43171. class: "tag-box ss-flex ss-col-center"
  43172. }, [
  43173. (vue.openBlock(true), vue.createElementBlock(
  43174. vue.Fragment,
  43175. null,
  43176. vue.renderList($props.data.promos, (item) => {
  43177. return vue.openBlock(), vue.createElementBlock(
  43178. "view",
  43179. {
  43180. class: "activity-tag ss-m-r-10",
  43181. key: item.id
  43182. },
  43183. vue.toDisplayString(item.title),
  43184. 1
  43185. /* TEXT */
  43186. );
  43187. }),
  43188. 128
  43189. /* KEYED_FRAGMENT */
  43190. ))
  43191. ])) : vue.createCommentVNode("v-if", true)
  43192. ];
  43193. }, true),
  43194. vue.createElementVNode("view", { class: "ss-flex ss-col-bottom ss-m-b-10" }, [
  43195. ((_v = $props.goodsFields.price) == null ? void 0 : _v.show) ? (vue.openBlock(), vue.createElementBlock(
  43196. "view",
  43197. {
  43198. key: 0,
  43199. class: "lg-goods-price ss-m-r-12 ss-flex ss-col-bottom ss-flex",
  43200. style: vue.normalizeStyle([{ color: $props.goodsFields.price.color }])
  43201. },
  43202. [
  43203. $props.data.spuPayType == 2 ? (vue.openBlock(), vue.createElementBlock("image", {
  43204. key: 0,
  43205. src: _imports_0$6,
  43206. class: "ss-m-r-10",
  43207. style: { "width": "40rpx", "height": "40rpx" }
  43208. })) : (vue.openBlock(), vue.createElementBlock("text", { key: 1 }, "¥")),
  43209. vue.createCommentVNode(' <text class="ss-font-24">{{ priceUnit }}</text> '),
  43210. $props.data.highPrecision ? (vue.openBlock(), vue.createElementBlock(
  43211. "text",
  43212. { key: 2 },
  43213. vue.toDisplayString($setup.isArray($props.data.highPrecisionPrice) ? $setup.fen2yuan6($props.data.highPrecisionPrice[0]) : $setup.fen2yuan6($props.data.highPrecisionPrice)),
  43214. 1
  43215. /* TEXT */
  43216. )) : (vue.openBlock(), vue.createElementBlock(
  43217. "text",
  43218. { key: 3 },
  43219. vue.toDisplayString($setup.isArray($props.data.price) ? $setup.fen2yuan($props.data.price[0]) : $setup.fen2yuan($props.data.price)),
  43220. 1
  43221. /* TEXT */
  43222. ))
  43223. ],
  43224. 4
  43225. /* STYLE */
  43226. )) : vue.createCommentVNode("v-if", true)
  43227. ]),
  43228. vue.createElementVNode("view", { class: "ss-flex ss-col-bottom ss-m-b-10" }, [
  43229. $props.data.promotionFee >= 0 ? (vue.openBlock(), vue.createElementBlock(
  43230. "view",
  43231. {
  43232. key: 0,
  43233. class: "origin-price-text"
  43234. },
  43235. vue.toDisplayString(_ctx.$t("common.points")) + ":" + vue.toDisplayString($setup.fen2yuan($props.data.promotionFee)),
  43236. 1
  43237. /* TEXT */
  43238. )) : vue.createCommentVNode("v-if", true)
  43239. ]),
  43240. vue.createElementVNode("view", { class: "ss-m-t-8 ss-flex ss-col-center ss-flex-wrap" }, [
  43241. vue.createElementVNode(
  43242. "view",
  43243. { class: "sales-text" },
  43244. vue.toDisplayString($setup.salesAndStock),
  43245. 1
  43246. /* TEXT */
  43247. )
  43248. ])
  43249. ])
  43250. ]),
  43251. vue.renderSlot(_ctx.$slots, "cart", {}, () => [
  43252. $props.buttonShow ? (vue.openBlock(), vue.createElementBlock(
  43253. "view",
  43254. {
  43255. key: 0,
  43256. class: "buy-box ss-flex ss-col-center ss-row-center"
  43257. },
  43258. vue.toDisplayString(_ctx.$t("common.go_buy")),
  43259. 1
  43260. /* TEXT */
  43261. )) : vue.createCommentVNode("v-if", true)
  43262. ], true)
  43263. ],
  43264. 4
  43265. /* STYLE */
  43266. )) : vue.createCommentVNode("v-if", true),
  43267. vue.createCommentVNode(" sl卡片:竖向型,一行放一个,图片上内容下边 "),
  43268. $props.size === "sl" ? (vue.openBlock(), vue.createElementBlock(
  43269. "view",
  43270. {
  43271. key: 4,
  43272. class: "sl-goods-card ss-flex-col",
  43273. style: vue.normalizeStyle([$setup.elStyles]),
  43274. onClick: $setup.onClick
  43275. },
  43276. [
  43277. $props.tagStyle.show ? (vue.openBlock(), vue.createElementBlock("view", {
  43278. key: 0,
  43279. class: "tag-icon-box"
  43280. }, [
  43281. vue.createElementVNode("image", {
  43282. class: "tag-icon",
  43283. src: $setup.sheep.$url.cdn($props.tagStyle.src || $props.tagStyle.imgUrl)
  43284. }, null, 8, ["src"])
  43285. ])) : vue.createCommentVNode("v-if", true),
  43286. vue.createElementVNode("image", {
  43287. class: "sl-img-box",
  43288. src: $setup.sheep.$url.cdn($props.data.image || $props.data.picUrl),
  43289. mode: "aspectFill"
  43290. }, null, 8, ["src"]),
  43291. vue.createElementVNode("view", { class: "sl-goods-content" }, [
  43292. vue.createElementVNode("view", null, [
  43293. ((_w = $props.goodsFields.title) == null ? void 0 : _w.show) || ((_x = $props.goodsFields.name) == null ? void 0 : _x.show) ? (vue.openBlock(), vue.createElementBlock(
  43294. "view",
  43295. {
  43296. key: 0,
  43297. class: "sl-goods-title ss-line-1",
  43298. style: vue.normalizeStyle([{ color: $props.titleColor }])
  43299. },
  43300. vue.toDisplayString($props.data.title || $props.data.name),
  43301. 5
  43302. /* TEXT, STYLE */
  43303. )) : vue.createCommentVNode("v-if", true),
  43304. ((_y = $props.goodsFields.subtitle) == null ? void 0 : _y.show) || ((_z = $props.goodsFields.introduction) == null ? void 0 : _z.show) ? (vue.openBlock(), vue.createElementBlock(
  43305. "view",
  43306. {
  43307. key: 1,
  43308. class: "sl-goods-subtitle ss-m-t-16",
  43309. style: vue.normalizeStyle([{ color: $props.subTitleColor, background: $props.subTitleBackground }])
  43310. },
  43311. vue.toDisplayString($props.data.subtitle || $props.data.introduction),
  43312. 5
  43313. /* TEXT, STYLE */
  43314. )) : vue.createCommentVNode("v-if", true)
  43315. ]),
  43316. vue.createElementVNode("view", null, [
  43317. vue.renderSlot(_ctx.$slots, "activity", {}, () => {
  43318. var _a3;
  43319. return [
  43320. ((_a3 = $props.data.promos) == null ? void 0 : _a3.length) ? (vue.openBlock(), vue.createElementBlock("view", {
  43321. key: 0,
  43322. class: "tag-box ss-flex ss-col-center ss-flex-wrap"
  43323. }, [
  43324. (vue.openBlock(true), vue.createElementBlock(
  43325. vue.Fragment,
  43326. null,
  43327. vue.renderList($props.data.promos, (item) => {
  43328. return vue.openBlock(), vue.createElementBlock(
  43329. "view",
  43330. {
  43331. class: "activity-tag ss-m-r-10 ss-m-t-16",
  43332. key: item.id
  43333. },
  43334. vue.toDisplayString(item.title),
  43335. 1
  43336. /* TEXT */
  43337. );
  43338. }),
  43339. 128
  43340. /* KEYED_FRAGMENT */
  43341. ))
  43342. ])) : vue.createCommentVNode("v-if", true)
  43343. ];
  43344. }, true),
  43345. ((_A = $props.goodsFields.price) == null ? void 0 : _A.show) ? (vue.openBlock(), vue.createElementBlock("view", {
  43346. key: 0,
  43347. class: "ss-flex ss-col-bottom ss-flex ss-m-t-10"
  43348. }, [
  43349. vue.createElementVNode(
  43350. "view",
  43351. {
  43352. class: "sl-goods-price ss-m-r-12",
  43353. style: vue.normalizeStyle([{ color: $props.goodsFields.price.color }])
  43354. },
  43355. [
  43356. $props.data.spuPayType == 2 ? (vue.openBlock(), vue.createElementBlock("image", {
  43357. key: 0,
  43358. src: _imports_0$6,
  43359. class: "ss-m-r-10",
  43360. style: { "width": "40rpx", "height": "40rpx" }
  43361. })) : (vue.openBlock(), vue.createElementBlock("text", { key: 1 }, "¥")),
  43362. vue.createCommentVNode(' <text class="price-unit ss-font-24">{{ priceUnit }}</text> '),
  43363. vue.createTextVNode(
  43364. " " + vue.toDisplayString($setup.isArray($props.data.price) ? $setup.fen2yuan($props.data.price[0]) : $setup.fen2yuan($props.data.price)),
  43365. 1
  43366. /* TEXT */
  43367. )
  43368. ],
  43369. 4
  43370. /* STYLE */
  43371. ),
  43372. $props.data.promotionFee >= 0 ? (vue.openBlock(), vue.createElementBlock(
  43373. "view",
  43374. {
  43375. key: 0,
  43376. class: "origin-price-text"
  43377. },
  43378. vue.toDisplayString(_ctx.$t("common.points")) + ":" + vue.toDisplayString($setup.fen2yuan($props.data.promotionFee)),
  43379. 1
  43380. /* TEXT */
  43381. )) : vue.createCommentVNode("v-if", true)
  43382. ])) : vue.createCommentVNode("v-if", true),
  43383. vue.createElementVNode("view", { class: "ss-m-t-16 ss-flex ss-flex-wrap" }, [
  43384. vue.createElementVNode(
  43385. "view",
  43386. { class: "sales-text" },
  43387. vue.toDisplayString($setup.salesAndStock),
  43388. 1
  43389. /* TEXT */
  43390. )
  43391. ])
  43392. ])
  43393. ]),
  43394. vue.renderSlot(_ctx.$slots, "cart", {}, () => [
  43395. vue.createElementVNode(
  43396. "view",
  43397. { class: "buy-box ss-flex ss-col-center ss-row-center" },
  43398. vue.toDisplayString(_ctx.$t("common.go_buy")),
  43399. 1
  43400. /* TEXT */
  43401. )
  43402. ], true)
  43403. ],
  43404. 4
  43405. /* STYLE */
  43406. )) : vue.createCommentVNode("v-if", true)
  43407. ]);
  43408. }
  43409. const __easycom_1$4 = /* @__PURE__ */ _export_sfc(_sfc_main$2n, [["render", _sfc_render$2m], ["__scopeId", "data-v-1c3d9e07"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-goods-column/s-goods-column.vue"]]);
  43410. const _sfc_main$2m = {
  43411. __name: "s-goods-card",
  43412. props: {
  43413. data: {
  43414. type: Object,
  43415. default() {
  43416. }
  43417. },
  43418. styles: {
  43419. type: Object,
  43420. default() {
  43421. }
  43422. }
  43423. },
  43424. setup(__props, { expose: __expose }) {
  43425. __expose();
  43426. const LayoutTypeEnum = {
  43427. // 单列大图
  43428. ONE_COL_BIG_IMG: "oneColBigImg",
  43429. // 双列
  43430. TWO_COL: "twoCol",
  43431. // 单列小图
  43432. ONE_COL_SMALL_IMG: "oneColSmallImg"
  43433. };
  43434. const state = vue.reactive({
  43435. goodsList: [],
  43436. leftGoodsList: [],
  43437. rightGoodsList: []
  43438. });
  43439. const props = __props;
  43440. const { layoutType, btnBuy, spuIds } = props.data ?? {};
  43441. const { marginLeft, marginRight } = props.styles ?? {};
  43442. const buyStyle = vue.computed(() => {
  43443. if (btnBuy.type === "text") {
  43444. return {
  43445. background: `linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient))`
  43446. };
  43447. }
  43448. if (btnBuy.type === "img") {
  43449. return {
  43450. width: "54rpx",
  43451. height: "54rpx",
  43452. background: `url(${sheep$1.$url.cdn(btnBuy.imgUrl)}) no-repeat`,
  43453. backgroundSize: "100% 100%"
  43454. };
  43455. }
  43456. });
  43457. let count = 0;
  43458. let leftHeight = 0;
  43459. let rightHeight = 0;
  43460. function calculateGoodsColumn(height = 0, where = "left") {
  43461. if (!state.goodsList[count])
  43462. return;
  43463. if (where === "left")
  43464. leftHeight += height;
  43465. if (where === "right")
  43466. rightHeight += height;
  43467. if (leftHeight <= rightHeight) {
  43468. state.leftGoodsList.push(state.goodsList[count]);
  43469. } else {
  43470. state.rightGoodsList.push(state.goodsList[count]);
  43471. }
  43472. count++;
  43473. }
  43474. async function getGoodsListByIds(ids) {
  43475. const { data } = await SpuApi.getSpuListByIds(ids);
  43476. return data;
  43477. }
  43478. vue.onMounted(async () => {
  43479. state.goodsList = await getGoodsListByIds(spuIds.join(","));
  43480. if (layoutType === LayoutTypeEnum.TWO_COL) {
  43481. calculateGoodsColumn();
  43482. }
  43483. });
  43484. const __returned__ = { LayoutTypeEnum, state, props, layoutType, btnBuy, spuIds, marginLeft, marginRight, buyStyle, get count() {
  43485. return count;
  43486. }, set count(v2) {
  43487. count = v2;
  43488. }, get leftHeight() {
  43489. return leftHeight;
  43490. }, set leftHeight(v2) {
  43491. leftHeight = v2;
  43492. }, get rightHeight() {
  43493. return rightHeight;
  43494. }, set rightHeight(v2) {
  43495. rightHeight = v2;
  43496. }, calculateGoodsColumn, getGoodsListByIds, computed: vue.computed, reactive: vue.reactive, onMounted: vue.onMounted, get sheep() {
  43497. return sheep$1;
  43498. }, get SpuApi() {
  43499. return SpuApi;
  43500. } };
  43501. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  43502. return __returned__;
  43503. }
  43504. };
  43505. function _sfc_render$2l(_ctx, _cache, $props, $setup, $data, $options) {
  43506. const _component_s_goods_column = resolveEasycom(vue.resolveDynamicComponent("s-goods-column"), __easycom_1$4);
  43507. return vue.openBlock(), vue.createElementBlock(
  43508. vue.Fragment,
  43509. null,
  43510. [
  43511. vue.createCommentVNode(" 商品卡片 "),
  43512. vue.createElementVNode("view", null, [
  43513. vue.createCommentVNode(" 布局1. 单列大图(上图,下内容)"),
  43514. $setup.layoutType === $setup.LayoutTypeEnum.ONE_COL_BIG_IMG && $setup.state.goodsList.length ? (vue.openBlock(), vue.createElementBlock("view", {
  43515. key: 0,
  43516. class: "goods-sl-box"
  43517. }, [
  43518. (vue.openBlock(true), vue.createElementBlock(
  43519. vue.Fragment,
  43520. null,
  43521. vue.renderList($setup.state.goodsList, (item) => {
  43522. var _a2;
  43523. return vue.openBlock(), vue.createElementBlock(
  43524. "view",
  43525. {
  43526. class: "goods-box",
  43527. key: item.id,
  43528. style: vue.normalizeStyle([{ marginBottom: $props.data.space * 2 + "rpx" }])
  43529. },
  43530. [
  43531. vue.createVNode(_component_s_goods_column, {
  43532. class: "",
  43533. size: "sl",
  43534. goodsFields: $props.data.fields,
  43535. tagStyle: $props.data.badge,
  43536. data: item,
  43537. titleColor: (_a2 = $props.data.fields.name) == null ? void 0 : _a2.color,
  43538. subTitleColor: $props.data.fields.introduction.color,
  43539. topRadius: $props.data.borderRadiusTop,
  43540. bottomRadius: $props.data.borderRadiusBottom,
  43541. onClick: ($event) => $setup.sheep.$router.go("/pages/goods/index", { id: item.id })
  43542. }, {
  43543. cart: vue.withCtx(() => [
  43544. vue.createElementVNode(
  43545. "button",
  43546. {
  43547. class: "ss-reset-button cart-btn",
  43548. style: vue.normalizeStyle([$setup.buyStyle])
  43549. },
  43550. vue.toDisplayString($setup.btnBuy.type === "text" ? $setup.btnBuy.text : ""),
  43551. 5
  43552. /* TEXT, STYLE */
  43553. )
  43554. ]),
  43555. _: 2
  43556. /* DYNAMIC */
  43557. }, 1032, ["goodsFields", "tagStyle", "data", "titleColor", "subTitleColor", "topRadius", "bottomRadius", "onClick"])
  43558. ],
  43559. 4
  43560. /* STYLE */
  43561. );
  43562. }),
  43563. 128
  43564. /* KEYED_FRAGMENT */
  43565. ))
  43566. ])) : vue.createCommentVNode("v-if", true),
  43567. vue.createCommentVNode(" 布局2. 双列(每一列:上图,下内容)"),
  43568. $setup.layoutType === $setup.LayoutTypeEnum.TWO_COL && $setup.state.goodsList.length ? (vue.openBlock(), vue.createElementBlock("view", {
  43569. key: 1,
  43570. class: "goods-md-wrap ss-flex ss-flex-wrap ss-col-top"
  43571. }, [
  43572. vue.createElementVNode("view", { class: "goods-list-box" }, [
  43573. (vue.openBlock(true), vue.createElementBlock(
  43574. vue.Fragment,
  43575. null,
  43576. vue.renderList($setup.state.leftGoodsList, (item) => {
  43577. var _a2;
  43578. return vue.openBlock(), vue.createElementBlock(
  43579. "view",
  43580. {
  43581. class: "left-list",
  43582. style: vue.normalizeStyle([{ paddingRight: $props.data.space + "rpx", marginBottom: $props.data.space + "px" }]),
  43583. key: item.id
  43584. },
  43585. [
  43586. vue.createVNode(_component_s_goods_column, {
  43587. class: "goods-md-box",
  43588. size: "md",
  43589. goodsFields: $props.data.fields,
  43590. tagStyle: $props.data.badge,
  43591. data: item,
  43592. titleColor: (_a2 = $props.data.fields.name) == null ? void 0 : _a2.color,
  43593. subTitleColor: $props.data.fields.introduction.color,
  43594. topRadius: $props.data.borderRadiusTop,
  43595. bottomRadius: $props.data.borderRadiusBottom,
  43596. titleWidth: 330 - $setup.marginLeft - $setup.marginRight,
  43597. onClick: ($event) => $setup.sheep.$router.go("/pages/goods/index", { id: item.id }),
  43598. onGetHeight: _cache[0] || (_cache[0] = ($event) => $setup.calculateGoodsColumn($event, "left"))
  43599. }, {
  43600. cart: vue.withCtx(() => [
  43601. vue.createElementVNode(
  43602. "button",
  43603. {
  43604. class: "ss-reset-button cart-btn",
  43605. style: vue.normalizeStyle([$setup.buyStyle])
  43606. },
  43607. vue.toDisplayString($setup.btnBuy.type === "text" ? $setup.btnBuy.text : ""),
  43608. 5
  43609. /* TEXT, STYLE */
  43610. )
  43611. ]),
  43612. _: 2
  43613. /* DYNAMIC */
  43614. }, 1032, ["goodsFields", "tagStyle", "data", "titleColor", "subTitleColor", "topRadius", "bottomRadius", "titleWidth", "onClick"])
  43615. ],
  43616. 4
  43617. /* STYLE */
  43618. );
  43619. }),
  43620. 128
  43621. /* KEYED_FRAGMENT */
  43622. ))
  43623. ]),
  43624. vue.createElementVNode("view", { class: "goods-list-box" }, [
  43625. (vue.openBlock(true), vue.createElementBlock(
  43626. vue.Fragment,
  43627. null,
  43628. vue.renderList($setup.state.rightGoodsList, (item) => {
  43629. var _a2;
  43630. return vue.openBlock(), vue.createElementBlock(
  43631. "view",
  43632. {
  43633. class: "right-list",
  43634. style: vue.normalizeStyle([{ paddingLeft: $props.data.space + "rpx", marginBottom: $props.data.space + "px" }]),
  43635. key: item.id
  43636. },
  43637. [
  43638. vue.createVNode(_component_s_goods_column, {
  43639. class: "goods-md-box",
  43640. size: "md",
  43641. goodsFields: $props.data.fields,
  43642. tagStyle: $props.data.badge,
  43643. data: item,
  43644. titleColor: (_a2 = $props.data.fields.name) == null ? void 0 : _a2.color,
  43645. subTitleColor: $props.data.fields.introduction.color,
  43646. topRadius: $props.data.borderRadiusTop,
  43647. bottomRadius: $props.data.borderRadiusBottom,
  43648. titleWidth: 330 - $setup.marginLeft - $setup.marginRight,
  43649. onClick: ($event) => $setup.sheep.$router.go("/pages/goods/index", { id: item.id }),
  43650. onGetHeight: _cache[1] || (_cache[1] = ($event) => $setup.calculateGoodsColumn($event, "right"))
  43651. }, {
  43652. cart: vue.withCtx(() => [
  43653. vue.createElementVNode(
  43654. "button",
  43655. {
  43656. class: "ss-reset-button cart-btn",
  43657. style: vue.normalizeStyle([$setup.buyStyle])
  43658. },
  43659. vue.toDisplayString($setup.btnBuy.type === "text" ? $setup.btnBuy.text : ""),
  43660. 5
  43661. /* TEXT, STYLE */
  43662. )
  43663. ]),
  43664. _: 2
  43665. /* DYNAMIC */
  43666. }, 1032, ["goodsFields", "tagStyle", "data", "titleColor", "subTitleColor", "topRadius", "bottomRadius", "titleWidth", "onClick"])
  43667. ],
  43668. 4
  43669. /* STYLE */
  43670. );
  43671. }),
  43672. 128
  43673. /* KEYED_FRAGMENT */
  43674. ))
  43675. ])
  43676. ])) : vue.createCommentVNode("v-if", true),
  43677. vue.createCommentVNode(" 布局3. 单列小图(左图,右内容) "),
  43678. $setup.layoutType === $setup.LayoutTypeEnum.ONE_COL_SMALL_IMG && $setup.state.goodsList.length ? (vue.openBlock(), vue.createElementBlock("view", {
  43679. key: 2,
  43680. class: "goods-lg-box"
  43681. }, [
  43682. (vue.openBlock(true), vue.createElementBlock(
  43683. vue.Fragment,
  43684. null,
  43685. vue.renderList($setup.state.goodsList, (item) => {
  43686. var _a2;
  43687. return vue.openBlock(), vue.createElementBlock(
  43688. "view",
  43689. {
  43690. class: "goods-box",
  43691. style: vue.normalizeStyle([{ marginBottom: $props.data.space + "px" }]),
  43692. key: item.id
  43693. },
  43694. [
  43695. vue.createVNode(_component_s_goods_column, {
  43696. class: "goods-card",
  43697. size: "lg",
  43698. goodsFields: $props.data.fields,
  43699. data: item,
  43700. tagStyle: $props.data.badge,
  43701. titleColor: (_a2 = $props.data.fields.name) == null ? void 0 : _a2.color,
  43702. subTitleColor: $props.data.fields.introduction.color,
  43703. topRadius: $props.data.borderRadiusTop,
  43704. bottomRadius: $props.data.borderRadiusBottom,
  43705. onClick: ($event) => $setup.sheep.$router.go("/pages/goods/index", { id: item.id })
  43706. }, {
  43707. cart: vue.withCtx(() => [
  43708. vue.createElementVNode(
  43709. "button",
  43710. {
  43711. class: "ss-reset-button cart-btn",
  43712. style: vue.normalizeStyle([$setup.buyStyle])
  43713. },
  43714. vue.toDisplayString($setup.btnBuy.type === "text" ? $setup.btnBuy.text : ""),
  43715. 5
  43716. /* TEXT, STYLE */
  43717. )
  43718. ]),
  43719. _: 2
  43720. /* DYNAMIC */
  43721. }, 1032, ["goodsFields", "data", "tagStyle", "titleColor", "subTitleColor", "topRadius", "bottomRadius", "onClick"])
  43722. ],
  43723. 4
  43724. /* STYLE */
  43725. );
  43726. }),
  43727. 128
  43728. /* KEYED_FRAGMENT */
  43729. ))
  43730. ])) : vue.createCommentVNode("v-if", true)
  43731. ])
  43732. ],
  43733. 2112
  43734. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  43735. );
  43736. }
  43737. const __easycom_14 = /* @__PURE__ */ _export_sfc(_sfc_main$2m, [["render", _sfc_render$2l], ["__scopeId", "data-v-edfbd448"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-goods-card/s-goods-card.vue"]]);
  43738. const _sfc_main$2l = {
  43739. __name: "s-goods-shelves",
  43740. props: {
  43741. data: {
  43742. type: Object,
  43743. default() {
  43744. }
  43745. },
  43746. styles: {
  43747. type: Object,
  43748. default() {
  43749. }
  43750. }
  43751. },
  43752. setup(__props, { expose: __expose }) {
  43753. __expose();
  43754. const props = __props;
  43755. const { layoutType, spuIds } = props.data;
  43756. let { marginLeft, marginRight } = props.styles;
  43757. const goodsList = vue.ref([]);
  43758. vue.onMounted(async () => {
  43759. if (spuIds.length > 0) {
  43760. let { data } = await SpuApi.getSpuListByIds(spuIds.join(","));
  43761. goodsList.value = data;
  43762. }
  43763. });
  43764. const __returned__ = { props, layoutType, spuIds, get marginLeft() {
  43765. return marginLeft;
  43766. }, set marginLeft(v2) {
  43767. marginLeft = v2;
  43768. }, get marginRight() {
  43769. return marginRight;
  43770. }, set marginRight(v2) {
  43771. marginRight = v2;
  43772. }, goodsList, onMounted: vue.onMounted, ref: vue.ref, computed: vue.computed, get sheep() {
  43773. return sheep$1;
  43774. }, get SpuApi() {
  43775. return SpuApi;
  43776. } };
  43777. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  43778. return __returned__;
  43779. }
  43780. };
  43781. function _sfc_render$2k(_ctx, _cache, $props, $setup, $data, $options) {
  43782. const _component_s_goods_column = resolveEasycom(vue.resolveDynamicComponent("s-goods-column"), __easycom_1$4);
  43783. return vue.openBlock(), vue.createElementBlock("view", null, [
  43784. vue.createCommentVNode(" 布局1. 两列商品,图片左文案右 "),
  43785. $setup.layoutType === "twoCol" ? (vue.openBlock(), vue.createElementBlock(
  43786. "view",
  43787. {
  43788. key: 0,
  43789. class: "goods-xs-box ss-flex ss-flex-wrap",
  43790. style: vue.normalizeStyle([{ margin: "-" + $props.data.space + "rpx" }])
  43791. },
  43792. [
  43793. (vue.openBlock(true), vue.createElementBlock(
  43794. vue.Fragment,
  43795. null,
  43796. vue.renderList($setup.goodsList, (item) => {
  43797. var _a2;
  43798. return vue.openBlock(), vue.createElementBlock(
  43799. "view",
  43800. {
  43801. class: "goods-xs-list",
  43802. key: item.id,
  43803. style: vue.normalizeStyle([
  43804. {
  43805. padding: $props.data.space + "rpx"
  43806. }
  43807. ])
  43808. },
  43809. [
  43810. vue.createVNode(_component_s_goods_column, {
  43811. class: "goods-card",
  43812. size: "xs",
  43813. goodsFields: $props.data.fields,
  43814. tagStyle: $props.data.badge,
  43815. data: item,
  43816. titleColor: (_a2 = $props.data.fields.name) == null ? void 0 : _a2.color,
  43817. topRadius: $props.data.borderRadiusTop,
  43818. bottomRadius: $props.data.borderRadiusBottom,
  43819. titleWidth: (454 - $setup.marginRight * 2 - $props.data.space * 2 - $setup.marginLeft * 2) / 2,
  43820. onClick: ($event) => $setup.sheep.$router.go("/pages/goods/index", { id: item.id })
  43821. }, null, 8, ["goodsFields", "tagStyle", "data", "titleColor", "topRadius", "bottomRadius", "titleWidth", "onClick"])
  43822. ],
  43823. 4
  43824. /* STYLE */
  43825. );
  43826. }),
  43827. 128
  43828. /* KEYED_FRAGMENT */
  43829. ))
  43830. ],
  43831. 4
  43832. /* STYLE */
  43833. )) : vue.createCommentVNode("v-if", true),
  43834. vue.createCommentVNode(" 布局. 三列商品:图片上文案下 "),
  43835. $setup.layoutType === "threeCol" ? (vue.openBlock(), vue.createElementBlock(
  43836. "view",
  43837. {
  43838. key: 1,
  43839. class: "goods-sm-box ss-flex ss-flex-wrap",
  43840. style: vue.normalizeStyle([{ margin: "-" + $props.data.space + "rpx" }])
  43841. },
  43842. [
  43843. (vue.openBlock(true), vue.createElementBlock(
  43844. vue.Fragment,
  43845. null,
  43846. vue.renderList($setup.goodsList, (item) => {
  43847. var _a2;
  43848. return vue.openBlock(), vue.createElementBlock(
  43849. "view",
  43850. {
  43851. key: item.id,
  43852. class: "goods-card-box",
  43853. style: vue.normalizeStyle([
  43854. {
  43855. padding: $props.data.space + "rpx"
  43856. }
  43857. ])
  43858. },
  43859. [
  43860. vue.createVNode(_component_s_goods_column, {
  43861. class: "goods-card",
  43862. size: "sm",
  43863. goodsFields: $props.data.fields,
  43864. tagStyle: $props.data.badge,
  43865. data: item,
  43866. titleColor: (_a2 = $props.data.fields.name) == null ? void 0 : _a2.color,
  43867. topRadius: $props.data.borderRadiusTop,
  43868. bottomRadius: $props.data.borderRadiusBottom,
  43869. onClick: ($event) => $setup.sheep.$router.go("/pages/goods/index", { id: item.id })
  43870. }, null, 8, ["goodsFields", "tagStyle", "data", "titleColor", "topRadius", "bottomRadius", "onClick"])
  43871. ],
  43872. 4
  43873. /* STYLE */
  43874. );
  43875. }),
  43876. 128
  43877. /* KEYED_FRAGMENT */
  43878. ))
  43879. ],
  43880. 4
  43881. /* STYLE */
  43882. )) : vue.createCommentVNode("v-if", true),
  43883. vue.createCommentVNode(" 布局3. 一行商品,水平滑动 "),
  43884. $setup.layoutType === "horizSwiper" ? (vue.openBlock(), vue.createElementBlock("view", {
  43885. key: 2,
  43886. class: ""
  43887. }, [
  43888. vue.createElementVNode("scroll-view", {
  43889. class: "scroll-box goods-scroll-box",
  43890. "scroll-x": "",
  43891. "scroll-anchoring": ""
  43892. }, [
  43893. vue.createElementVNode("view", { class: "goods-box ss-flex" }, [
  43894. (vue.openBlock(true), vue.createElementBlock(
  43895. vue.Fragment,
  43896. null,
  43897. vue.renderList($setup.goodsList, (item) => {
  43898. var _a2;
  43899. return vue.openBlock(), vue.createElementBlock(
  43900. "view",
  43901. {
  43902. class: "goods-card-box",
  43903. key: item.id,
  43904. style: vue.normalizeStyle([{ marginRight: $props.data.space * 2 + "rpx" }])
  43905. },
  43906. [
  43907. vue.createVNode(_component_s_goods_column, {
  43908. class: "goods-card",
  43909. size: "sm",
  43910. goodsFields: $props.data.fields,
  43911. tagStyle: $props.data.badge,
  43912. data: item,
  43913. titleColor: (_a2 = $props.data.fields.name) == null ? void 0 : _a2.color,
  43914. titleWidth: (750 - $setup.marginRight * 2 - $props.data.space * 4 - $setup.marginLeft * 2) / 3,
  43915. onClick: ($event) => $setup.sheep.$router.go("/pages/goods/index", { id: item.id })
  43916. }, null, 8, ["goodsFields", "tagStyle", "data", "titleColor", "titleWidth", "onClick"])
  43917. ],
  43918. 4
  43919. /* STYLE */
  43920. );
  43921. }),
  43922. 128
  43923. /* KEYED_FRAGMENT */
  43924. ))
  43925. ])
  43926. ])
  43927. ])) : vue.createCommentVNode("v-if", true)
  43928. ]);
  43929. }
  43930. const __easycom_15 = /* @__PURE__ */ _export_sfc(_sfc_main$2l, [["render", _sfc_render$2k], ["__scopeId", "data-v-9630804b"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-goods-shelves/s-goods-shelves.vue"]]);
  43931. const _sfc_main$2k = {
  43932. __name: "s-groupon-block",
  43933. props: {
  43934. data: {
  43935. type: Object,
  43936. default() {
  43937. }
  43938. },
  43939. styles: {
  43940. type: Object,
  43941. default() {
  43942. }
  43943. }
  43944. },
  43945. setup(__props, { expose: __expose }) {
  43946. __expose();
  43947. const props = __props;
  43948. let { layoutType, tagStyle, btnBuy, space } = props.data;
  43949. let { marginLeft, marginRight } = props.styles;
  43950. const buyStyle = vue.computed(() => {
  43951. let btnBuy2 = props.data.btnBuy;
  43952. if ((btnBuy2 == null ? void 0 : btnBuy2.type) === "text") {
  43953. return {
  43954. background: `linear-gradient(to right, ${btnBuy2.bgBeginColor}, ${btnBuy2.bgEndColor})`
  43955. };
  43956. }
  43957. if ((btnBuy2 == null ? void 0 : btnBuy2.type) === "img") {
  43958. return {
  43959. width: "54rpx",
  43960. height: "54rpx",
  43961. background: `url(${sheep$1.$url.cdn(btnBuy2.imgUrl)}) no-repeat`,
  43962. backgroundSize: "100% 100%"
  43963. };
  43964. }
  43965. });
  43966. const productList = vue.ref([]);
  43967. vue.onMounted(async () => {
  43968. const { data: activity } = await CombinationApi.getCombinationActivity(props.data.activityId);
  43969. const { data: spu } = await SpuApi.getSpuDetail(activity.spuId);
  43970. productList.value = [spu];
  43971. });
  43972. const __returned__ = { props, get layoutType() {
  43973. return layoutType;
  43974. }, set layoutType(v2) {
  43975. layoutType = v2;
  43976. }, get tagStyle() {
  43977. return tagStyle;
  43978. }, set tagStyle(v2) {
  43979. tagStyle = v2;
  43980. }, get btnBuy() {
  43981. return btnBuy;
  43982. }, set btnBuy(v2) {
  43983. btnBuy = v2;
  43984. }, get space() {
  43985. return space;
  43986. }, set space(v2) {
  43987. space = v2;
  43988. }, get marginLeft() {
  43989. return marginLeft;
  43990. }, set marginLeft(v2) {
  43991. marginLeft = v2;
  43992. }, get marginRight() {
  43993. return marginRight;
  43994. }, set marginRight(v2) {
  43995. marginRight = v2;
  43996. }, buyStyle, productList, computed: vue.computed, onMounted: vue.onMounted, ref: vue.ref, get sheep() {
  43997. return sheep$1;
  43998. }, get SpuApi() {
  43999. return SpuApi;
  44000. }, get CombinationApi() {
  44001. return CombinationApi;
  44002. } };
  44003. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  44004. return __returned__;
  44005. }
  44006. };
  44007. function _sfc_render$2j(_ctx, _cache, $props, $setup, $data, $options) {
  44008. const _component_s_goods_column = resolveEasycom(vue.resolveDynamicComponent("s-goods-column"), __easycom_1$4);
  44009. return vue.openBlock(), vue.createElementBlock("view", null, [
  44010. $setup.layoutType === "threeCol" ? (vue.openBlock(), vue.createElementBlock(
  44011. "view",
  44012. {
  44013. key: 0,
  44014. class: "goods-sm-box ss-flex ss-flex-wrap",
  44015. style: vue.normalizeStyle([{ margin: "-" + $props.data.space + "rpx" }])
  44016. },
  44017. [
  44018. (vue.openBlock(true), vue.createElementBlock(
  44019. vue.Fragment,
  44020. null,
  44021. vue.renderList($setup.productList, (product) => {
  44022. var _a2;
  44023. return vue.openBlock(), vue.createElementBlock(
  44024. "view",
  44025. {
  44026. key: product.id,
  44027. class: "goods-card-box",
  44028. style: vue.normalizeStyle([
  44029. {
  44030. padding: $props.data.space + "rpx"
  44031. }
  44032. ])
  44033. },
  44034. [
  44035. vue.createVNode(_component_s_goods_column, {
  44036. class: "goods-card",
  44037. size: "sm",
  44038. goodsFields: $props.data.fields,
  44039. tagStyle: $setup.tagStyle,
  44040. data: product,
  44041. titleColor: (_a2 = $props.data.fields.name) == null ? void 0 : _a2.color,
  44042. topRadius: $props.data.borderRadiusTop,
  44043. bottomRadius: $props.data.borderRadiusBottom,
  44044. onClick: ($event) => $setup.sheep.$router.go("/pages/goods/groupon", {
  44045. id: product.id,
  44046. activity_id: $setup.props.data.activityId
  44047. })
  44048. }, null, 8, ["goodsFields", "tagStyle", "data", "titleColor", "topRadius", "bottomRadius", "onClick"])
  44049. ],
  44050. 4
  44051. /* STYLE */
  44052. );
  44053. }),
  44054. 128
  44055. /* KEYED_FRAGMENT */
  44056. ))
  44057. ],
  44058. 4
  44059. /* STYLE */
  44060. )) : vue.createCommentVNode("v-if", true),
  44061. vue.createCommentVNode(" 样式2 一行一个 图片左 文案右 "),
  44062. $setup.layoutType === "oneCol" ? (vue.openBlock(), vue.createElementBlock("view", {
  44063. key: 1,
  44064. class: "goods-box"
  44065. }, [
  44066. (vue.openBlock(true), vue.createElementBlock(
  44067. vue.Fragment,
  44068. null,
  44069. vue.renderList($setup.productList, (product, index2) => {
  44070. var _a2, _b2;
  44071. return vue.openBlock(), vue.createElementBlock(
  44072. "view",
  44073. {
  44074. class: "goods-list",
  44075. key: index2,
  44076. style: vue.normalizeStyle([{ marginBottom: $setup.space + "px" }])
  44077. },
  44078. [
  44079. vue.createVNode(_component_s_goods_column, {
  44080. class: "goods-card",
  44081. size: "lg",
  44082. goodsFields: $props.data.fields,
  44083. tagStyle: $setup.tagStyle,
  44084. data: product,
  44085. titleColor: (_a2 = $props.data.fields.name) == null ? void 0 : _a2.color,
  44086. subTitleColor: (_b2 = $props.data.fields.introduction) == null ? void 0 : _b2.color,
  44087. topRadius: $props.data.borderRadiusTop,
  44088. bottomRadius: $props.data.borderRadiusBottom,
  44089. onClick: ($event) => $setup.sheep.$router.go("/pages/goods/groupon", {
  44090. id: product.id,
  44091. activity_id: $setup.props.data.activityId
  44092. })
  44093. }, {
  44094. cart: vue.withCtx(() => {
  44095. var _a3;
  44096. return [
  44097. vue.createElementVNode(
  44098. "button",
  44099. {
  44100. class: "ss-reset-button cart-btn",
  44101. style: vue.normalizeStyle([$setup.buyStyle])
  44102. },
  44103. vue.toDisplayString(((_a3 = $setup.btnBuy) == null ? void 0 : _a3.type) === "text" ? $setup.btnBuy.text : ""),
  44104. 5
  44105. /* TEXT, STYLE */
  44106. )
  44107. ];
  44108. }),
  44109. _: 2
  44110. /* DYNAMIC */
  44111. }, 1032, ["goodsFields", "tagStyle", "data", "titleColor", "subTitleColor", "topRadius", "bottomRadius", "onClick"])
  44112. ],
  44113. 4
  44114. /* STYLE */
  44115. );
  44116. }),
  44117. 128
  44118. /* KEYED_FRAGMENT */
  44119. ))
  44120. ])) : vue.createCommentVNode("v-if", true)
  44121. ]);
  44122. }
  44123. const __easycom_16 = /* @__PURE__ */ _export_sfc(_sfc_main$2k, [["render", _sfc_render$2j], ["__scopeId", "data-v-17051e0b"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-groupon-block/s-groupon-block.vue"]]);
  44124. const _sfc_main$2j = {
  44125. __name: "s-seckill-block",
  44126. props: {
  44127. data: {
  44128. type: Object,
  44129. default() {
  44130. }
  44131. },
  44132. styles: {
  44133. type: Object,
  44134. default() {
  44135. }
  44136. }
  44137. },
  44138. setup(__props, { expose: __expose }) {
  44139. __expose();
  44140. const props = __props;
  44141. let { layoutType, tagStyle, btnBuy, space } = props.data;
  44142. let { marginLeft, marginRight } = props.styles;
  44143. const buyStyle = vue.computed(() => {
  44144. let btnBuy2 = props.data.btnBuy;
  44145. if ((btnBuy2 == null ? void 0 : btnBuy2.type) === "text") {
  44146. return {
  44147. background: `linear-gradient(to right, ${btnBuy2.bgBeginColor}, ${btnBuy2.bgEndColor})`
  44148. };
  44149. }
  44150. if ((btnBuy2 == null ? void 0 : btnBuy2.type) === "img") {
  44151. return {
  44152. width: "54rpx",
  44153. height: "54rpx",
  44154. background: `url(${sheep$1.$url.cdn(btnBuy2.imgUrl)}) no-repeat`,
  44155. backgroundSize: "100% 100%"
  44156. };
  44157. }
  44158. });
  44159. const productList = vue.ref([]);
  44160. vue.onMounted(async () => {
  44161. const { data: activity } = await SeckillApi.getSeckillActivity(props.data.activityId);
  44162. const { data: spu } = await SpuApi.getSpuDetail(activity.spuId);
  44163. productList.value = [spu];
  44164. });
  44165. const __returned__ = { props, get layoutType() {
  44166. return layoutType;
  44167. }, set layoutType(v2) {
  44168. layoutType = v2;
  44169. }, get tagStyle() {
  44170. return tagStyle;
  44171. }, set tagStyle(v2) {
  44172. tagStyle = v2;
  44173. }, get btnBuy() {
  44174. return btnBuy;
  44175. }, set btnBuy(v2) {
  44176. btnBuy = v2;
  44177. }, get space() {
  44178. return space;
  44179. }, set space(v2) {
  44180. space = v2;
  44181. }, get marginLeft() {
  44182. return marginLeft;
  44183. }, set marginLeft(v2) {
  44184. marginLeft = v2;
  44185. }, get marginRight() {
  44186. return marginRight;
  44187. }, set marginRight(v2) {
  44188. marginRight = v2;
  44189. }, buyStyle, productList, computed: vue.computed, onMounted: vue.onMounted, ref: vue.ref, get sheep() {
  44190. return sheep$1;
  44191. }, get SeckillApi() {
  44192. return SeckillApi;
  44193. }, get SpuApi() {
  44194. return SpuApi;
  44195. } };
  44196. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  44197. return __returned__;
  44198. }
  44199. };
  44200. function _sfc_render$2i(_ctx, _cache, $props, $setup, $data, $options) {
  44201. const _component_s_goods_column = resolveEasycom(vue.resolveDynamicComponent("s-goods-column"), __easycom_1$4);
  44202. return vue.openBlock(), vue.createElementBlock("view", null, [
  44203. vue.createCommentVNode(" 样式一:三列 - 上图下文 "),
  44204. $setup.layoutType === "threeCol" ? (vue.openBlock(), vue.createElementBlock(
  44205. "view",
  44206. {
  44207. key: 0,
  44208. class: "goods-sm-box ss-flex ss-flex-wrap",
  44209. style: vue.normalizeStyle([{ margin: "-" + $props.data.space + "rpx" }])
  44210. },
  44211. [
  44212. (vue.openBlock(true), vue.createElementBlock(
  44213. vue.Fragment,
  44214. null,
  44215. vue.renderList($setup.productList, (product) => {
  44216. var _a2;
  44217. return vue.openBlock(), vue.createElementBlock(
  44218. "view",
  44219. {
  44220. key: product.id,
  44221. class: "goods-card-box",
  44222. style: vue.normalizeStyle([
  44223. {
  44224. padding: $props.data.space + "rpx"
  44225. }
  44226. ])
  44227. },
  44228. [
  44229. vue.createVNode(_component_s_goods_column, {
  44230. class: "goods-card",
  44231. size: "sm",
  44232. goodsFields: $props.data.fields,
  44233. tagStyle: $setup.tagStyle,
  44234. data: product,
  44235. titleColor: (_a2 = $props.data.fields.name) == null ? void 0 : _a2.color,
  44236. topRadius: $props.data.borderRadiusTop,
  44237. bottomRadius: $props.data.borderRadiusBottom,
  44238. onClick: _cache[0] || (_cache[0] = ($event) => $setup.sheep.$router.go("/pages/goods/seckill", {
  44239. id: $setup.props.data.activityId
  44240. }))
  44241. }, null, 8, ["goodsFields", "tagStyle", "data", "titleColor", "topRadius", "bottomRadius"])
  44242. ],
  44243. 4
  44244. /* STYLE */
  44245. );
  44246. }),
  44247. 128
  44248. /* KEYED_FRAGMENT */
  44249. ))
  44250. ],
  44251. 4
  44252. /* STYLE */
  44253. )) : vue.createCommentVNode("v-if", true),
  44254. vue.createCommentVNode(" 样式二:一列 - 左图右文 "),
  44255. $setup.layoutType === "oneCol" ? (vue.openBlock(), vue.createElementBlock("view", {
  44256. key: 1,
  44257. class: "goods-box"
  44258. }, [
  44259. (vue.openBlock(true), vue.createElementBlock(
  44260. vue.Fragment,
  44261. null,
  44262. vue.renderList($setup.productList, (product, index2) => {
  44263. var _a2, _b2;
  44264. return vue.openBlock(), vue.createElementBlock(
  44265. "view",
  44266. {
  44267. class: "goods-list",
  44268. key: index2,
  44269. style: vue.normalizeStyle([{ marginBottom: $setup.space + "px" }])
  44270. },
  44271. [
  44272. vue.createVNode(_component_s_goods_column, {
  44273. class: "goods-card",
  44274. size: "lg",
  44275. goodsFields: $props.data.fields,
  44276. tagStyle: $setup.tagStyle,
  44277. data: product,
  44278. titleColor: (_a2 = $props.data.fields.name) == null ? void 0 : _a2.color,
  44279. subTitleColor: (_b2 = $props.data.fields.introduction) == null ? void 0 : _b2.color,
  44280. topRadius: $props.data.borderRadiusTop,
  44281. bottomRadius: $props.data.borderRadiusBottom,
  44282. onClick: _cache[1] || (_cache[1] = ($event) => $setup.sheep.$router.go("/pages/goods/seckill", {
  44283. id: $setup.props.data.activityId
  44284. }))
  44285. }, {
  44286. cart: vue.withCtx(() => {
  44287. var _a3;
  44288. return [
  44289. vue.createElementVNode(
  44290. "button",
  44291. {
  44292. class: "ss-reset-button cart-btn",
  44293. style: vue.normalizeStyle([$setup.buyStyle])
  44294. },
  44295. vue.toDisplayString(((_a3 = $setup.btnBuy) == null ? void 0 : _a3.type) === "text" ? $setup.btnBuy.text : ""),
  44296. 5
  44297. /* TEXT, STYLE */
  44298. )
  44299. ];
  44300. }),
  44301. _: 2
  44302. /* DYNAMIC */
  44303. }, 1032, ["goodsFields", "tagStyle", "data", "titleColor", "subTitleColor", "topRadius", "bottomRadius"])
  44304. ],
  44305. 4
  44306. /* STYLE */
  44307. );
  44308. }),
  44309. 128
  44310. /* KEYED_FRAGMENT */
  44311. ))
  44312. ])) : vue.createCommentVNode("v-if", true)
  44313. ]);
  44314. }
  44315. const __easycom_17 = /* @__PURE__ */ _export_sfc(_sfc_main$2j, [["render", _sfc_render$2i], ["__scopeId", "data-v-073abe37"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-seckill-block/s-seckill-block.vue"]]);
  44316. const _sfc_main$2i = {
  44317. __name: "s-live-card",
  44318. props: {
  44319. goodsFields: {
  44320. type: [Array, Object],
  44321. default() {
  44322. return {};
  44323. }
  44324. },
  44325. tagStyle: {
  44326. type: Object,
  44327. default: {}
  44328. },
  44329. data: {
  44330. type: Object,
  44331. default: {}
  44332. },
  44333. size: {
  44334. type: String,
  44335. default: "sl"
  44336. },
  44337. background: {
  44338. type: String,
  44339. default: ""
  44340. },
  44341. topRadius: {
  44342. type: Number,
  44343. default: 0
  44344. },
  44345. bottomRadius: {
  44346. type: Number,
  44347. default: 0
  44348. },
  44349. titleColor: {
  44350. type: String,
  44351. default: "#333"
  44352. },
  44353. subTitleColor: {
  44354. type: String,
  44355. default: "#999999"
  44356. }
  44357. },
  44358. emits: ["click", "getHeight"],
  44359. setup(__props, { expose: __expose, emit: __emit }) {
  44360. __expose();
  44361. const props = __props;
  44362. const elStyles = vue.computed(() => {
  44363. return {
  44364. background: props.background,
  44365. "border-top-left-radius": props.topRadius + "px",
  44366. "border-top-right-radius": props.topRadius + "px",
  44367. "border-bottom-left-radius": props.bottomRadius + "px",
  44368. "border-bottom-right-radius": props.bottomRadius + "px"
  44369. };
  44370. });
  44371. const state = vue.reactive({
  44372. liveStatus: {
  44373. 101: {
  44374. img: sheep$1.$url.static("/static/images/living.png"),
  44375. title: "直播中"
  44376. },
  44377. 102: {
  44378. img: sheep$1.$url.static("/static/images/start.png"),
  44379. title: "未开始"
  44380. },
  44381. 103: {
  44382. img: sheep$1.$url.static("/static/images/ended.png"),
  44383. title: "已结束"
  44384. }
  44385. }
  44386. });
  44387. const emits = __emit;
  44388. const onClick = () => {
  44389. emits("click");
  44390. };
  44391. const __returned__ = { props, elStyles, state, emits, onClick, computed: vue.computed, reactive: vue.reactive, get sheep() {
  44392. return sheep$1;
  44393. } };
  44394. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  44395. return __returned__;
  44396. }
  44397. };
  44398. function _sfc_render$2h(_ctx, _cache, $props, $setup, $data, $options) {
  44399. return vue.openBlock(), vue.createElementBlock("view", null, [
  44400. vue.createCommentVNode(" md卡片:竖向,一行放两个,图上内容下 "),
  44401. $props.size === "md" ? (vue.openBlock(), vue.createElementBlock(
  44402. "view",
  44403. {
  44404. key: 0,
  44405. class: "md-goods-card ss-flex-col",
  44406. style: vue.normalizeStyle([$setup.elStyles]),
  44407. onClick: $setup.onClick
  44408. },
  44409. [
  44410. vue.createElementVNode("view", { class: "icon-box ss-flex" }, [
  44411. vue.createElementVNode("image", {
  44412. class: "icon",
  44413. src: $setup.state.liveStatus[$props.data.status].img
  44414. }, null, 8, ["src"]),
  44415. vue.createElementVNode(
  44416. "view",
  44417. { class: "title ss-m-l-16" },
  44418. vue.toDisplayString($setup.state.liveStatus[$props.data.status].title),
  44419. 1
  44420. /* TEXT */
  44421. )
  44422. ]),
  44423. vue.createElementVNode("image", {
  44424. class: "md-img-box",
  44425. src: $setup.sheep.$url.cdn($props.data.feeds_img),
  44426. referrerpolicy: "no-referrer"
  44427. }, null, 8, ["src"]),
  44428. vue.createElementVNode("view", { class: "md-goods-content" }, [
  44429. vue.createElementVNode(
  44430. "view",
  44431. {
  44432. class: "md-goods-title ss-line-1",
  44433. style: vue.normalizeStyle([{ color: $props.titleColor }])
  44434. },
  44435. vue.toDisplayString($props.data.name),
  44436. 5
  44437. /* TEXT, STYLE */
  44438. ),
  44439. vue.createElementVNode(
  44440. "view",
  44441. {
  44442. class: "md-goods-subtitle ss-m-t-14 ss-line-1",
  44443. style: vue.normalizeStyle([{ color: $props.subTitleColor }])
  44444. },
  44445. " 主播:" + vue.toDisplayString($props.data.anchor_name),
  44446. 5
  44447. /* TEXT, STYLE */
  44448. )
  44449. ])
  44450. ],
  44451. 4
  44452. /* STYLE */
  44453. )) : vue.createCommentVNode("v-if", true),
  44454. vue.createCommentVNode(" sl卡片:竖向型,一行放一个,图片上内容下边 "),
  44455. $props.size === "sl" ? (vue.openBlock(), vue.createElementBlock(
  44456. "view",
  44457. {
  44458. key: 1,
  44459. class: "sl-goods-card ss-flex-col",
  44460. style: vue.normalizeStyle([$setup.elStyles]),
  44461. onClick: $setup.onClick
  44462. },
  44463. [
  44464. vue.createElementVNode("view", { class: "icon-box ss-flex" }, [
  44465. vue.createElementVNode("image", {
  44466. class: "icon",
  44467. src: $setup.state.liveStatus[$props.data.status].img
  44468. }, null, 8, ["src"]),
  44469. vue.createElementVNode(
  44470. "view",
  44471. { class: "title ss-m-l-16" },
  44472. vue.toDisplayString($setup.state.liveStatus[$props.data.status].title),
  44473. 1
  44474. /* TEXT */
  44475. )
  44476. ]),
  44477. vue.createElementVNode("image", {
  44478. class: "sl-img-box",
  44479. src: $setup.sheep.$url.cdn($props.data.feeds_img),
  44480. referrerpolicy: "no-referrer"
  44481. }, null, 8, ["src"]),
  44482. vue.createElementVNode("view", { class: "sl-goods-content" }, [
  44483. vue.createElementVNode(
  44484. "view",
  44485. {
  44486. class: "sl-goods-title ss-line-1",
  44487. style: vue.normalizeStyle([{ color: $props.titleColor }])
  44488. },
  44489. vue.toDisplayString($props.data.name),
  44490. 5
  44491. /* TEXT, STYLE */
  44492. ),
  44493. vue.createElementVNode(
  44494. "view",
  44495. {
  44496. class: "sl-goods-subtitle ss-m-t-14 ss-line-1",
  44497. style: vue.normalizeStyle([{ color: $props.subTitleColor }])
  44498. },
  44499. " 主播:" + vue.toDisplayString($props.data.anchor_name),
  44500. 5
  44501. /* TEXT, STYLE */
  44502. )
  44503. ])
  44504. ],
  44505. 4
  44506. /* STYLE */
  44507. )) : vue.createCommentVNode("v-if", true)
  44508. ]);
  44509. }
  44510. const __easycom_0$d = /* @__PURE__ */ _export_sfc(_sfc_main$2i, [["render", _sfc_render$2h], ["__scopeId", "data-v-e059c327"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-live-card/s-live-card.vue"]]);
  44511. const _sfc_main$2h = {
  44512. __name: "s-live-block",
  44513. props: {
  44514. data: {
  44515. type: Object,
  44516. default() {
  44517. }
  44518. },
  44519. styles: {
  44520. type: Object,
  44521. default() {
  44522. }
  44523. }
  44524. },
  44525. setup(__props, { expose: __expose }) {
  44526. __expose();
  44527. const state = vue.reactive({
  44528. liveList: [],
  44529. mpLink: ""
  44530. });
  44531. const props = __props;
  44532. const { mode, goodsFields, mpliveIds } = props.data ?? {};
  44533. const { marginLeft, marginRight } = props.styles ?? {};
  44534. async function getLiveListByIds(ids) {
  44535. const { data } = await sheep$1.$api.app.mplive.getRoomList(ids);
  44536. return data;
  44537. }
  44538. function goRoom(id) {
  44539. uni.showModal({
  44540. title: "提示",
  44541. confirmText: "允许",
  44542. content: "将打开小程序访问",
  44543. success: async function(res) {
  44544. if (res.confirm) {
  44545. getMpLink();
  44546. }
  44547. }
  44548. });
  44549. }
  44550. function goMpLink() {
  44551. plus.runtime.openURL(state.mpLink);
  44552. }
  44553. async function getMpLink() {
  44554. if (state.mpLink === "") {
  44555. const { error: error2, data } = await sheep$1.$api.app.mplive.getMpLink();
  44556. if (error2 === 0) {
  44557. state.mpLink = data;
  44558. }
  44559. }
  44560. goMpLink();
  44561. }
  44562. vue.onMounted(async () => {
  44563. state.liveList = await getLiveListByIds(mpliveIds);
  44564. });
  44565. const __returned__ = { state, props, mode, goodsFields, mpliveIds, marginLeft, marginRight, getLiveListByIds, goRoom, goMpLink, getMpLink, reactive: vue.reactive, onMounted: vue.onMounted, get sheep() {
  44566. return sheep$1;
  44567. } };
  44568. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  44569. return __returned__;
  44570. }
  44571. };
  44572. function _sfc_render$2g(_ctx, _cache, $props, $setup, $data, $options) {
  44573. const _component_s_live_card = resolveEasycom(vue.resolveDynamicComponent("s-live-card"), __easycom_0$d);
  44574. return vue.openBlock(), vue.createElementBlock("view", null, [
  44575. $setup.mode === 2 && $setup.state.liveList.length ? (vue.openBlock(), vue.createElementBlock(
  44576. "view",
  44577. {
  44578. key: 0,
  44579. class: "goods-md-wrap ss-flex ss-flex-wrap ss-col-top",
  44580. style: vue.normalizeStyle([{ margin: "-" + $props.data.space + "rpx" }])
  44581. },
  44582. [
  44583. (vue.openBlock(true), vue.createElementBlock(
  44584. vue.Fragment,
  44585. null,
  44586. vue.renderList($setup.state.liveList, (item) => {
  44587. var _a2, _b2;
  44588. return vue.openBlock(), vue.createElementBlock(
  44589. "view",
  44590. {
  44591. style: vue.normalizeStyle([
  44592. {
  44593. padding: $props.data.space + "rpx"
  44594. }
  44595. ]),
  44596. class: "goods-list-box",
  44597. key: item.id
  44598. },
  44599. [
  44600. vue.createVNode(_component_s_live_card, {
  44601. class: "goods-md-box",
  44602. size: "md",
  44603. goodsFields: $setup.goodsFields,
  44604. data: item,
  44605. titleColor: (_a2 = $setup.goodsFields.name) == null ? void 0 : _a2.color,
  44606. subTitleColor: (_b2 = $setup.goodsFields.anchor_name) == null ? void 0 : _b2.color,
  44607. topRadius: $props.data.borderRadiusTop,
  44608. bottomRadius: $props.data.borderRadiusBottom,
  44609. onClick: ($event) => $setup.goRoom(item.roomid)
  44610. }, null, 8, ["goodsFields", "data", "titleColor", "subTitleColor", "topRadius", "bottomRadius", "onClick"])
  44611. ],
  44612. 4
  44613. /* STYLE */
  44614. );
  44615. }),
  44616. 128
  44617. /* KEYED_FRAGMENT */
  44618. ))
  44619. ],
  44620. 4
  44621. /* STYLE */
  44622. )) : vue.createCommentVNode("v-if", true),
  44623. $setup.mode === 1 && $setup.state.liveList.length ? (vue.openBlock(), vue.createElementBlock("view", {
  44624. key: 1,
  44625. class: "goods-lg-box"
  44626. }, [
  44627. (vue.openBlock(true), vue.createElementBlock(
  44628. vue.Fragment,
  44629. null,
  44630. vue.renderList($setup.state.liveList, (item) => {
  44631. var _a2;
  44632. return vue.openBlock(), vue.createElementBlock(
  44633. "view",
  44634. {
  44635. class: "goods-box",
  44636. style: vue.normalizeStyle([{ marginBottom: $props.data.space + "px" }]),
  44637. key: item.id
  44638. },
  44639. [
  44640. vue.createVNode(_component_s_live_card, {
  44641. class: "goods-card",
  44642. size: "sl",
  44643. goodsFields: $setup.goodsFields,
  44644. data: item,
  44645. titleColor: (_a2 = $setup.goodsFields.name) == null ? void 0 : _a2.color,
  44646. subTitleColor: $setup.goodsFields.anchor_name.color,
  44647. topRadius: $props.data.borderRadiusTop,
  44648. bottomRadius: $props.data.borderRadiusBottom,
  44649. onClick: ($event) => $setup.goRoom(item.roomid)
  44650. }, null, 8, ["goodsFields", "data", "titleColor", "subTitleColor", "topRadius", "bottomRadius", "onClick"])
  44651. ],
  44652. 4
  44653. /* STYLE */
  44654. );
  44655. }),
  44656. 128
  44657. /* KEYED_FRAGMENT */
  44658. ))
  44659. ])) : vue.createCommentVNode("v-if", true)
  44660. ]);
  44661. }
  44662. const __easycom_18 = /* @__PURE__ */ _export_sfc(_sfc_main$2h, [["render", _sfc_render$2g], ["__scopeId", "data-v-74052372"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-live-block/s-live-block.vue"]]);
  44663. const _sfc_main$2g = {
  44664. __name: "su-coupon",
  44665. props: {
  44666. size: {
  44667. type: String,
  44668. default: "lg"
  44669. },
  44670. textColor: {
  44671. type: String,
  44672. default: "#FF6000"
  44673. },
  44674. background: {
  44675. type: String,
  44676. default: "#FFC19C"
  44677. },
  44678. btnBg: {
  44679. type: String,
  44680. default: "#fff"
  44681. },
  44682. btnTextColor: {
  44683. type: String,
  44684. default: "#FF6000"
  44685. },
  44686. state: {
  44687. type: Number,
  44688. default: 0
  44689. },
  44690. couponId: {
  44691. type: Number,
  44692. default: 0
  44693. },
  44694. title: {
  44695. type: String,
  44696. default: "这是优惠券"
  44697. },
  44698. value: {
  44699. type: [Number, String],
  44700. default: 50
  44701. },
  44702. sellBy: {
  44703. type: String,
  44704. default: "2019.11.25至2019.12.25"
  44705. },
  44706. surplus: {
  44707. type: [Number, String],
  44708. default: 0
  44709. },
  44710. type: {
  44711. type: String,
  44712. default: ""
  44713. }
  44714. },
  44715. setup(__props, { expose: __expose }) {
  44716. __expose();
  44717. vue.useCssVars((_ctx) => ({
  44718. "34099896-textColor": __props.textColor,
  44719. "34099896-btnTextColor": __props.btnTextColor,
  44720. "34099896-btnBg": __props.btnBg
  44721. }));
  44722. const state = vue.reactive({
  44723. stateMap: {
  44724. 0: "立即领取",
  44725. 1: "去使用"
  44726. }
  44727. });
  44728. const props = __props;
  44729. const cardStyle = vue.computed(() => {
  44730. return {
  44731. background: props.background
  44732. };
  44733. });
  44734. const __returned__ = { state, props, cardStyle, computed: vue.computed, reactive: vue.reactive, get sheep() {
  44735. return sheep$1;
  44736. } };
  44737. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  44738. return __returned__;
  44739. }
  44740. };
  44741. function _sfc_render$2f(_ctx, _cache, $props, $setup, $data, $options) {
  44742. return vue.openBlock(), vue.createElementBlock("view", { class: "ui-coupon-wrap" }, [
  44743. vue.createCommentVNode(" xs: 一行三个,竖向 "),
  44744. $setup.props.size === "xs" ? (vue.openBlock(), vue.createElementBlock(
  44745. "view",
  44746. {
  44747. key: 0,
  44748. class: "xs-coupon-card ss-flex ss-flex-col ss-row-between",
  44749. style: vue.normalizeStyle([$setup.cardStyle]),
  44750. onClick: _cache[0] || (_cache[0] = ($event) => $setup.sheep.$router.go("/pages/coupon/detail", {
  44751. id: $props.couponId
  44752. }))
  44753. },
  44754. [
  44755. vue.createElementVNode("view", { class: "ss-flex ss-flex-col ss-row-center ss-col-center" }, [
  44756. vue.createElementVNode("view", { class: "face-value-box ss-flex ss-col-bottom ss-m-t-50 ss-m-b-28" }, [
  44757. vue.createElementVNode(
  44758. "view",
  44759. { class: "value-text ss-m-r-4" },
  44760. vue.toDisplayString($props.type === "reduce" ? $props.value : Number($props.value)),
  44761. 1
  44762. /* TEXT */
  44763. ),
  44764. vue.createElementVNode(
  44765. "view",
  44766. { class: "value-unit" },
  44767. vue.toDisplayString($props.type === "reduce" ? "元" : "折"),
  44768. 1
  44769. /* TEXT */
  44770. )
  44771. ]),
  44772. vue.createElementVNode(
  44773. "view",
  44774. { class: "title-text" },
  44775. vue.toDisplayString($setup.props.title),
  44776. 1
  44777. /* TEXT */
  44778. )
  44779. ]),
  44780. vue.createElementVNode("view", { class: "card-bottom ss-m-b-30 ss-flex ss-row-center" }, [
  44781. vue.renderSlot(_ctx.$slots, "btn", {}, () => [
  44782. vue.createElementVNode(
  44783. "button",
  44784. { class: "ss-reset-button card-btn" },
  44785. vue.toDisplayString($setup.state.stateMap[$setup.props.state]),
  44786. 1
  44787. /* TEXT */
  44788. )
  44789. ], true)
  44790. ])
  44791. ],
  44792. 4
  44793. /* STYLE */
  44794. )) : vue.createCommentVNode("v-if", true),
  44795. vue.createCommentVNode(" md: 一行两个,横向 "),
  44796. $setup.props.size === "md" ? (vue.openBlock(), vue.createElementBlock(
  44797. "view",
  44798. {
  44799. key: 1,
  44800. class: "md-coupon-card ss-flex ss-row-between",
  44801. style: vue.normalizeStyle([$setup.cardStyle]),
  44802. onClick: _cache[1] || (_cache[1] = ($event) => $setup.sheep.$router.go("/pages/coupon/detail", {
  44803. id: $props.couponId
  44804. }))
  44805. },
  44806. [
  44807. vue.createElementVNode("view", { class: "card-left ss-flex ss-flex-col ss-row-between ss-col-top ss-m-l-40" }, [
  44808. vue.createElementVNode("view", { class: "face-value-box ss-flex ss-col-bottom ss-m-t-28" }, [
  44809. vue.createElementVNode(
  44810. "view",
  44811. { class: "value-text ss-m-r-4" },
  44812. vue.toDisplayString($props.type === "reduce" ? $props.value : Number($props.value)),
  44813. 1
  44814. /* TEXT */
  44815. ),
  44816. vue.createElementVNode(
  44817. "view",
  44818. { class: "value-unit" },
  44819. vue.toDisplayString($props.type === "reduce" ? "元" : "折"),
  44820. 1
  44821. /* TEXT */
  44822. )
  44823. ]),
  44824. vue.createElementVNode("view", { class: "ss-m-b-28" }, [
  44825. vue.createElementVNode(
  44826. "view",
  44827. { class: "title-text ss-m-b-10" },
  44828. vue.toDisplayString($setup.props.title),
  44829. 1
  44830. /* TEXT */
  44831. ),
  44832. $setup.props.surplus ? (vue.openBlock(), vue.createElementBlock(
  44833. "view",
  44834. {
  44835. key: 0,
  44836. class: "surplus-text"
  44837. },
  44838. "仅剩:" + vue.toDisplayString($setup.props.surplus) + "张",
  44839. 1
  44840. /* TEXT */
  44841. )) : vue.createCommentVNode("v-if", true)
  44842. ])
  44843. ]),
  44844. vue.createElementVNode("view", { class: "card-right ss-flex ss-row-center" }, [
  44845. vue.renderSlot(_ctx.$slots, "btn", {}, () => [
  44846. vue.createElementVNode("button", { class: "ss-reset-button card-btn ss-flex ss-row-center ss-col-center" }, [
  44847. vue.createElementVNode(
  44848. "view",
  44849. { class: "btn-text" },
  44850. vue.toDisplayString($setup.state.stateMap[$setup.props.state]),
  44851. 1
  44852. /* TEXT */
  44853. )
  44854. ])
  44855. ], true)
  44856. ])
  44857. ],
  44858. 4
  44859. /* STYLE */
  44860. )) : vue.createCommentVNode("v-if", true),
  44861. vue.createCommentVNode(" lg: 一行一个,横向 "),
  44862. $setup.props.size === "lg" ? (vue.openBlock(), vue.createElementBlock(
  44863. "view",
  44864. {
  44865. key: 2,
  44866. class: "lg-coupon-card ss-flex ss-row-between",
  44867. style: vue.normalizeStyle([$setup.cardStyle]),
  44868. onClick: _cache[2] || (_cache[2] = ($event) => $setup.sheep.$router.go("/pages/coupon/detail", {
  44869. id: $props.couponId
  44870. }))
  44871. },
  44872. [
  44873. vue.createElementVNode("view", { class: "card-left ss-flex ss-flex-col ss-row-between ss-col-top ss-m-l-40" }, [
  44874. vue.createElementVNode("view", { class: "face-value-box ss-flex ss-col-bottom ss-m-t-28" }, [
  44875. vue.createElementVNode(
  44876. "view",
  44877. { class: "value-text ss-m-r-4" },
  44878. vue.toDisplayString($props.type === "reduce" ? $props.value : Number($props.value)),
  44879. 1
  44880. /* TEXT */
  44881. ),
  44882. vue.createElementVNode(
  44883. "view",
  44884. { class: "value-unit" },
  44885. vue.toDisplayString($props.type === "reduce" ? "元" : "折"),
  44886. 1
  44887. /* TEXT */
  44888. )
  44889. ]),
  44890. vue.createElementVNode("view", { class: "ss-m-b-20" }, [
  44891. vue.createElementVNode(
  44892. "view",
  44893. { class: "title-text ss-m-b-10" },
  44894. vue.toDisplayString($setup.props.title),
  44895. 1
  44896. /* TEXT */
  44897. ),
  44898. vue.createElementVNode(
  44899. "view",
  44900. { class: "sellby-text" },
  44901. "有效期:" + vue.toDisplayString($setup.props.sellBy),
  44902. 1
  44903. /* TEXT */
  44904. )
  44905. ])
  44906. ]),
  44907. vue.createElementVNode("view", { class: "card-right ss-flex ss-flex-col ss-col-center ss-row-center" }, [
  44908. vue.renderSlot(_ctx.$slots, "btn", {}, () => [
  44909. vue.createElementVNode(
  44910. "button",
  44911. { class: "ss-reset-button card-btn ss-flex ss-row-center ss-col-center" },
  44912. vue.toDisplayString($setup.state.stateMap[$setup.props.state]),
  44913. 1
  44914. /* TEXT */
  44915. )
  44916. ], true),
  44917. $setup.props.surplus ? (vue.openBlock(), vue.createElementBlock(
  44918. "view",
  44919. {
  44920. key: 0,
  44921. class: "surplus-text ss-m-t-24"
  44922. },
  44923. "仅剩:" + vue.toDisplayString($setup.props.surplus) + "张",
  44924. 1
  44925. /* TEXT */
  44926. )) : vue.createCommentVNode("v-if", true)
  44927. ])
  44928. ],
  44929. 4
  44930. /* STYLE */
  44931. )) : vue.createCommentVNode("v-if", true)
  44932. ]);
  44933. }
  44934. const __easycom_0$c = /* @__PURE__ */ _export_sfc(_sfc_main$2g, [["render", _sfc_render$2f], ["__scopeId", "data-v-34099896"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/ui/su-coupon/su-coupon.vue"]]);
  44935. const PromotionDiscountTypeEnum = {
  44936. PRICE: {
  44937. type: 1,
  44938. name: "满减"
  44939. },
  44940. PERCENT: {
  44941. type: 2,
  44942. name: "折扣"
  44943. }
  44944. };
  44945. const CouponTemplateValidityTypeEnum = {
  44946. DATE: {
  44947. type: 1,
  44948. name: "固定日期可用"
  44949. },
  44950. TERM: {
  44951. type: 2,
  44952. name: "领取之后可用"
  44953. }
  44954. };
  44955. const TimeStatusEnum = {
  44956. WAIT_START: "即将开始",
  44957. STARTED: "进行中",
  44958. END: "已结束"
  44959. };
  44960. const getTimeStatusEnum = (startTime, endTime) => {
  44961. const now2 = dayjs();
  44962. if (now2.isBefore(startTime)) {
  44963. return TimeStatusEnum.WAIT_START;
  44964. } else if (now2.isAfter(endTime)) {
  44965. return TimeStatusEnum.END;
  44966. } else {
  44967. return TimeStatusEnum.STARTED;
  44968. }
  44969. };
  44970. const _sfc_main$2f = {
  44971. __name: "s-coupon-block",
  44972. props: {
  44973. data: {
  44974. type: Object,
  44975. default: () => ({})
  44976. },
  44977. styles: {
  44978. type: Object,
  44979. default: () => ({})
  44980. }
  44981. },
  44982. setup(__props, { expose: __expose }) {
  44983. __expose();
  44984. const props = __props;
  44985. const { columns, button } = props.data;
  44986. const SIZE_LIST = ["lg", "md", "xs"];
  44987. const couponBg = {
  44988. background: `url(${sheep$1.$url.cdn(props.data.bgImg)}) no-repeat top center / 100% 100%`
  44989. };
  44990. const btnStyles = {
  44991. background: button.bgColor,
  44992. color: button.color
  44993. };
  44994. const formatCouponDiscountType = (coupon) => {
  44995. if (coupon.discountType === PromotionDiscountTypeEnum.PRICE.type) {
  44996. return "reduce";
  44997. }
  44998. if (coupon.discountType === PromotionDiscountTypeEnum.PERCENT.type) {
  44999. return "percent";
  45000. }
  45001. return `未知【${coupon.discountType}】`;
  45002. };
  45003. const formatCouponDiscountValue = (coupon) => {
  45004. if (coupon.discountType === PromotionDiscountTypeEnum.PRICE.type) {
  45005. return floatToFixed2(coupon.discountPrice);
  45006. }
  45007. if (coupon.discountType === PromotionDiscountTypeEnum.PERCENT.type) {
  45008. return coupon.discountPercent;
  45009. }
  45010. return `未知【${coupon.discountType}】`;
  45011. };
  45012. const formatValidityType = (row) => {
  45013. if (row.validityType === CouponTemplateValidityTypeEnum.DATE.type) {
  45014. return `${formatDate(row.validStartTime)} 至 ${formatDate(row.validEndTime)}`;
  45015. }
  45016. if (row.validityType === CouponTemplateValidityTypeEnum.TERM.type) {
  45017. return `领取后第 ${row.fixedStartTerm} - ${row.fixedEndTerm} 天内可用`;
  45018. }
  45019. return "未知【" + row.validityType + "】";
  45020. };
  45021. const couponList = vue.ref([]);
  45022. async function onGetCoupon(id) {
  45023. const { error: error2, msg } = await CouponApi.takeCoupon(id);
  45024. if (error2 === 0) {
  45025. uni.showToast({
  45026. title: msg,
  45027. icon: "none"
  45028. });
  45029. return;
  45030. }
  45031. await getCouponTemplateList();
  45032. }
  45033. const getCouponTemplateList = async () => {
  45034. const { data } = await CouponApi.getCouponTemplateListByIds(props.data.couponIds.join(","));
  45035. couponList.value = data;
  45036. };
  45037. vue.onMounted(() => {
  45038. getCouponTemplateList();
  45039. });
  45040. const __returned__ = { props, columns, button, SIZE_LIST, couponBg, btnStyles, formatCouponDiscountType, formatCouponDiscountValue, formatValidityType, couponList, onGetCoupon, getCouponTemplateList, get sheep() {
  45041. return sheep$1;
  45042. }, get CouponApi() {
  45043. return CouponApi;
  45044. }, ref: vue.ref, onMounted: vue.onMounted, get CouponTemplateValidityTypeEnum() {
  45045. return CouponTemplateValidityTypeEnum;
  45046. }, get PromotionDiscountTypeEnum() {
  45047. return PromotionDiscountTypeEnum;
  45048. }, get floatToFixed2() {
  45049. return floatToFixed2;
  45050. }, get formatDate() {
  45051. return formatDate;
  45052. } };
  45053. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  45054. return __returned__;
  45055. }
  45056. };
  45057. function _sfc_render$2e(_ctx, _cache, $props, $setup, $data, $options) {
  45058. const _component_su_coupon = resolveEasycom(vue.resolveDynamicComponent("su-coupon"), __easycom_0$c);
  45059. return vue.openBlock(), vue.createElementBlock("scroll-view", {
  45060. class: "scroll-box",
  45061. "scroll-x": "",
  45062. "scroll-anchoring": ""
  45063. }, [
  45064. vue.createElementVNode("view", { class: "coupon-box ss-flex" }, [
  45065. (vue.openBlock(true), vue.createElementBlock(
  45066. vue.Fragment,
  45067. null,
  45068. vue.renderList($setup.couponList, (item, index2) => {
  45069. return vue.openBlock(), vue.createElementBlock(
  45070. "view",
  45071. {
  45072. class: "coupon-item",
  45073. style: vue.normalizeStyle([$setup.couponBg, { marginLeft: `${$props.data.space}px` }]),
  45074. key: index2
  45075. },
  45076. [
  45077. vue.createVNode(_component_su_coupon, {
  45078. size: $setup.SIZE_LIST[$setup.columns - 1],
  45079. textColor: $props.data.textColor,
  45080. background: "",
  45081. couponId: item.id,
  45082. title: item.name,
  45083. type: $setup.formatCouponDiscountType(item),
  45084. value: $setup.formatCouponDiscountValue(item),
  45085. sellBy: $setup.formatValidityType(item)
  45086. }, {
  45087. btn: vue.withCtx(() => [
  45088. vue.createCommentVNode(" 两列时,领取按钮坚排 "),
  45089. $setup.columns === 2 ? (vue.openBlock(), vue.createElementBlock("button", {
  45090. key: 0,
  45091. onClick: vue.withModifiers(($event) => $setup.onGetCoupon(item.id), ["stop"]),
  45092. class: "ss-reset-button card-btn vertical",
  45093. style: vue.normalizeStyle([$setup.btnStyles])
  45094. }, [
  45095. vue.createElementVNode("view", { class: "btn-text" }, "立即领取")
  45096. ], 12, ["onClick"])) : (vue.openBlock(), vue.createElementBlock("button", {
  45097. key: 1,
  45098. class: "ss-reset-button card-btn",
  45099. style: vue.normalizeStyle([$setup.btnStyles]),
  45100. onClick: vue.withModifiers(($event) => $setup.onGetCoupon(item.id), ["stop"])
  45101. }, " 立即领取 ", 12, ["onClick"]))
  45102. ]),
  45103. _: 2
  45104. /* DYNAMIC */
  45105. }, 1032, ["size", "textColor", "couponId", "title", "type", "value", "sellBy"])
  45106. ],
  45107. 4
  45108. /* STYLE */
  45109. );
  45110. }),
  45111. 128
  45112. /* KEYED_FRAGMENT */
  45113. ))
  45114. ])
  45115. ]);
  45116. }
  45117. const __easycom_19 = /* @__PURE__ */ _export_sfc(_sfc_main$2f, [["render", _sfc_render$2e], ["__scopeId", "data-v-6b61b8da"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-coupon-block/s-coupon-block.vue"]]);
  45118. const _sfc_main$2e = {
  45119. __name: "s-richtext-block",
  45120. props: {
  45121. data: {
  45122. type: Object,
  45123. default: {}
  45124. },
  45125. styles: {
  45126. type: Object,
  45127. default() {
  45128. }
  45129. }
  45130. },
  45131. setup(__props, { expose: __expose }) {
  45132. __expose();
  45133. const props = __props;
  45134. const state = vue.reactive({
  45135. content: ""
  45136. });
  45137. vue.onMounted(async () => {
  45138. const { data } = await ArticleApi.getArticle(props.data.id);
  45139. state.content = data.content;
  45140. });
  45141. const __returned__ = { props, state, reactive: vue.reactive, onMounted: vue.onMounted, get ArticleApi() {
  45142. return ArticleApi;
  45143. } };
  45144. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  45145. return __returned__;
  45146. }
  45147. };
  45148. function _sfc_render$2d(_ctx, _cache, $props, $setup, $data, $options) {
  45149. const _component_mp_html = resolveEasycom(vue.resolveDynamicComponent("mp-html"), __easycom_0$r);
  45150. return vue.openBlock(), vue.createElementBlock(
  45151. "view",
  45152. {
  45153. style: vue.normalizeStyle([
  45154. {
  45155. marginLeft: $props.styles.marginLeft + "px",
  45156. marginRight: $props.styles.marginRight + "px",
  45157. marginBottom: $props.styles.marginBottom + "px",
  45158. marginTop: $props.styles.marginTop + "px",
  45159. padding: $props.styles.padding + "px"
  45160. }
  45161. ])
  45162. },
  45163. [
  45164. vue.createVNode(_component_mp_html, {
  45165. class: "richtext",
  45166. content: $setup.state.content
  45167. }, null, 8, ["content"])
  45168. ],
  45169. 4
  45170. /* STYLE */
  45171. );
  45172. }
  45173. const __easycom_20 = /* @__PURE__ */ _export_sfc(_sfc_main$2e, [["render", _sfc_render$2d], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-richtext-block/s-richtext-block.vue"]]);
  45174. const _imports_0$5 = "/static/icon/setting.png";
  45175. const _sfc_main$2d = {
  45176. __name: "s-user-card",
  45177. props: {
  45178. background: {
  45179. type: String,
  45180. default: ""
  45181. },
  45182. // 头像
  45183. avatar: {
  45184. type: String,
  45185. default: ""
  45186. },
  45187. nickname: {
  45188. type: String,
  45189. default: () => {
  45190. const {
  45191. t: t2
  45192. } = useI18n();
  45193. return t2("user.please_login");
  45194. }
  45195. },
  45196. username: {
  45197. type: String,
  45198. default: () => {
  45199. const {
  45200. t: t2
  45201. } = useI18n();
  45202. return t2("common.none");
  45203. }
  45204. },
  45205. vip: {
  45206. type: [String, Number],
  45207. default: "1"
  45208. },
  45209. collectNum: {
  45210. type: [String, Number],
  45211. default: "1"
  45212. },
  45213. likeNum: {
  45214. type: [String, Number],
  45215. default: "1"
  45216. }
  45217. },
  45218. setup(__props, { expose: __expose }) {
  45219. __expose();
  45220. const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo);
  45221. const isLogin = vue.computed(() => sheep$1.$store("user").isLogin);
  45222. const props = __props;
  45223. function onBind() {
  45224. showAuthModal("changeMobile");
  45225. }
  45226. const __returned__ = { userInfo: userInfo2, isLogin, props, onBind, computed: vue.computed, reactive: vue.reactive, get sheep() {
  45227. return sheep$1;
  45228. }, get showShareModal() {
  45229. return showShareModal;
  45230. }, get showAuthModal() {
  45231. return showAuthModal;
  45232. }, get useI18n() {
  45233. return useI18n;
  45234. } };
  45235. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  45236. return __returned__;
  45237. }
  45238. };
  45239. function _sfc_render$2c(_ctx, _cache, $props, $setup, $data, $options) {
  45240. var _a2, _b2;
  45241. return vue.openBlock(), vue.createElementBlock("view", { class: "ss-user-info-wrap ss-p-t-50" }, [
  45242. vue.createElementVNode("view", { class: "ss-flex ss-col-center ss-row-between ss-m-b-20" }, [
  45243. vue.createElementVNode("view", { class: "left-box ss-flex ss-col-center ss-m-l-36" }, [
  45244. vue.createElementVNode("view", { class: "avatar-box ss-m-r-24" }, [
  45245. vue.createElementVNode("image", {
  45246. class: "avatar-img",
  45247. src: $setup.isLogin ? $setup.sheep.$url.cdn($setup.userInfo.avatar) : $setup.sheep.$url.static("/static/images/default_avatar.png"),
  45248. mode: "aspectFill",
  45249. onClick: _cache[0] || (_cache[0] = ($event) => $setup.sheep.$router.go("/pages/user/info"))
  45250. }, null, 8, ["src"])
  45251. ]),
  45252. vue.createElementVNode("view", null, [
  45253. vue.createElementVNode("view", { class: "nickname-box ss-flex ss-col-center" }, [
  45254. vue.createElementVNode(
  45255. "view",
  45256. { class: "nick-name ss-m-r-20" },
  45257. vue.toDisplayString(((_a2 = $setup.userInfo) == null ? void 0 : _a2.username) || $props.username),
  45258. 1
  45259. /* TEXT */
  45260. )
  45261. ]),
  45262. vue.createElementVNode(
  45263. "view",
  45264. { class: "user-name ss-m-t-5" },
  45265. vue.toDisplayString(_ctx.$t("user.nickname")) + ":" + vue.toDisplayString(((_b2 = $setup.userInfo) == null ? void 0 : _b2.nickname) || $props.nickname),
  45266. 1
  45267. /* TEXT */
  45268. )
  45269. ])
  45270. ]),
  45271. vue.createElementVNode("view", { class: "right-box ss-m-r-30" }, [
  45272. vue.createCommentVNode(` <button class="ss-reset-button" style="margin-right: 20rpx;"
  45273. @tap="showAuthModal('officialAccountFirstLogin')">
  45274. <text class="cicon-service-o"></text>
  45275. </button> `),
  45276. vue.createElementVNode("button", {
  45277. class: "ss-reset-button",
  45278. onClick: _cache[1] || (_cache[1] = ($event) => $setup.sheep.$router.go("/pages/user/setting"))
  45279. }, [
  45280. vue.createElementVNode("image", {
  45281. src: _imports_0$5,
  45282. class: "audioPaly",
  45283. style: { "width": "40rpx", "height": "40rpx" }
  45284. })
  45285. ])
  45286. ])
  45287. ]),
  45288. vue.createCommentVNode(" 提示绑定手机号 先隐藏 yudao 需要再修改 "),
  45289. vue.createCommentVNode(' <view class="bind-mobile-box ss-flex ss-row-between ss-col-center" v-if="isLogin && !userInfo.mobile">\n <view class="ss-flex">\n <text class="cicon-mobile-o" />\n <view class="mobile-title ss-m-l-20"> 点击绑定手机号确保账户安全 </view>\n </view>\n <button class="ss-reset-button bind-btn" @tap="onBind">去绑定</button>\n </view> ')
  45290. ]);
  45291. }
  45292. const __easycom_21 = /* @__PURE__ */ _export_sfc(_sfc_main$2d, [["render", _sfc_render$2c], ["__scopeId", "data-v-e8581682"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-user-card/s-user-card.vue"]]);
  45293. const _sfc_main$2c = {
  45294. __name: "s-order-card",
  45295. setup(__props, { expose: __expose }) {
  45296. __expose();
  45297. const {
  45298. t: t2
  45299. } = useI18n();
  45300. const orderMap = [
  45301. {
  45302. title: t2("order.pending_payment"),
  45303. value: "1",
  45304. icon: "/static/images/no_pay.png",
  45305. path: "/pages/order/list",
  45306. type: "unpaid",
  45307. count: "unpaidCount"
  45308. },
  45309. {
  45310. title: t2("order.pending_shipment"),
  45311. value: "2",
  45312. icon: "/static/images/change_order.png",
  45313. path: "/pages/order/list",
  45314. type: "undelivered",
  45315. count: "undeliveredCount"
  45316. },
  45317. {
  45318. title: t2("order.pending_receipt"),
  45319. value: "3",
  45320. icon: "/static/images/no_take.png",
  45321. path: "/pages/order/list",
  45322. type: "noget",
  45323. count: "deliveredCount"
  45324. },
  45325. {
  45326. title: t2("order.pending_review"),
  45327. value: "4",
  45328. icon: "/static/images/no_comment.png",
  45329. path: "/pages/order/list",
  45330. type: "nocomment",
  45331. count: "uncommentedCount"
  45332. },
  45333. {
  45334. title: t2("order.all_orders"),
  45335. value: "0",
  45336. icon: "/static/images/all_order.png",
  45337. path: "/pages/order/list"
  45338. }
  45339. ];
  45340. const numData = vue.computed(() => sheep$1.$store("user").numData);
  45341. const __returned__ = { t: t2, orderMap, numData, get sheep() {
  45342. return sheep$1;
  45343. }, computed: vue.computed, get useI18n() {
  45344. return useI18n;
  45345. } };
  45346. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  45347. return __returned__;
  45348. }
  45349. };
  45350. function _sfc_render$2b(_ctx, _cache, $props, $setup, $data, $options) {
  45351. const _component_uni_badge = resolveEasycom(vue.resolveDynamicComponent("uni-badge"), __easycom_0$j);
  45352. return vue.openBlock(), vue.createElementBlock("view", { class: "ss-order-menu-wrap ss-flex ss-col-center" }, [
  45353. (vue.openBlock(), vue.createElementBlock(
  45354. vue.Fragment,
  45355. null,
  45356. vue.renderList($setup.orderMap, (item) => {
  45357. return vue.createElementVNode("view", {
  45358. class: "menu-item ss-flex-1 ss-flex-col ss-row-center ss-col-center",
  45359. key: item.title,
  45360. onClick: ($event) => $setup.sheep.$router.go(item.path, { type: item.value })
  45361. }, [
  45362. vue.createVNode(_component_uni_badge, {
  45363. class: "uni-badge-left-margin",
  45364. text: $setup.numData.orderCount[item.count],
  45365. absolute: "rightTop",
  45366. size: "small"
  45367. }, {
  45368. default: vue.withCtx(() => [
  45369. vue.createElementVNode("image", {
  45370. class: "item-icon",
  45371. src: $setup.sheep.$url.static(item.icon),
  45372. mode: "aspectFit"
  45373. }, null, 8, ["src"])
  45374. ]),
  45375. _: 2
  45376. /* DYNAMIC */
  45377. }, 1032, ["text"]),
  45378. vue.createElementVNode(
  45379. "view",
  45380. { class: "menu-title ss-m-t-28" },
  45381. vue.toDisplayString(item.title),
  45382. 1
  45383. /* TEXT */
  45384. )
  45385. ], 8, ["onClick"]);
  45386. }),
  45387. 64
  45388. /* STABLE_FRAGMENT */
  45389. ))
  45390. ]);
  45391. }
  45392. const __easycom_22 = /* @__PURE__ */ _export_sfc(_sfc_main$2c, [["render", _sfc_render$2b], ["__scopeId", "data-v-85ba17ee"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-order-card/s-order-card.vue"]]);
  45393. const _sfc_main$2b = {
  45394. __name: "s-wallet-card",
  45395. setup(__props, { expose: __expose }) {
  45396. __expose();
  45397. const state = vue.reactive({
  45398. showProtocol: false,
  45399. navIndex: 0
  45400. });
  45401. const userWallet = vue.computed(() => sheep$1.$store("user").userWallet);
  45402. const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo);
  45403. const numData = vue.computed(() => sheep$1.$store("user").numData);
  45404. const progressWidth = vue.computed(() => {
  45405. if (!userWallet.value.socialStatusPoint && !userWallet.value.socialStatusPoint) {
  45406. return "0%";
  45407. }
  45408. const progress = userWallet.value.socialStatusPoint / (userWallet.value.socialStatusPoint + userWallet.value.socialUpNeed) * 100 + "%";
  45409. return progress;
  45410. });
  45411. function onProtocol(title) {
  45412. sheep$1.$router.go("/pages/public/richtext", {
  45413. title
  45414. });
  45415. }
  45416. const close = () => {
  45417. state.showProtocol = false;
  45418. };
  45419. function checkIndex(index2) {
  45420. state.navIndex = index2;
  45421. }
  45422. const __returned__ = { state, userWallet, userInfo: userInfo2, numData, progressWidth, onProtocol, close, checkIndex, computed: vue.computed, reactive: vue.reactive, get sheep() {
  45423. return sheep$1;
  45424. }, get fen2yuan() {
  45425. return fen2yuan;
  45426. }, get points2point() {
  45427. return points2point;
  45428. }, Richtext: PagesPublicRichtext };
  45429. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  45430. return __returned__;
  45431. }
  45432. };
  45433. function _sfc_render$2a(_ctx, _cache, $props, $setup, $data, $options) {
  45434. const _component_su_popup = resolveEasycom(vue.resolveDynamicComponent("su-popup"), __easycom_4$3);
  45435. return vue.openBlock(), vue.createElementBlock("view", null, [
  45436. vue.createElementVNode("view", {
  45437. class: "progress-box",
  45438. onClick: _cache[0] || (_cache[0] = ($event) => $setup.state.showProtocol = true)
  45439. }, [
  45440. vue.createElementVNode("view", { class: "progress-container" }, [
  45441. vue.createElementVNode(
  45442. "view",
  45443. {
  45444. class: "progress-bar",
  45445. style: vue.normalizeStyle({ width: $setup.progressWidth })
  45446. },
  45447. null,
  45448. 4
  45449. /* STYLE */
  45450. ),
  45451. vue.createElementVNode(
  45452. "view",
  45453. { class: "progress-text" },
  45454. vue.toDisplayString($setup.userWallet.socialStatusLevel || _ctx.$t("common.no_level")),
  45455. 1
  45456. /* TEXT */
  45457. )
  45458. ])
  45459. ]),
  45460. vue.createCommentVNode(` <view class="ss-wallet-menu-wrap ss-flex ss-col-center">
  45461. <view class="menu-item ss-flex-1 ss-flex-col ss-col-center">
  45462. <view class="value-box ">
  45463. <view class="value-text ">看点</view>
  45464. </view>
  45465. <view class="menu-title ss-m-t-15">*888</view>
  45466. <view class="menu-title ss-m-t-15">看广告做任务得收益</view>
  45467. </view>
  45468. <view class="menu-item ss-flex-1 ss-flex-col ss-col-center"
  45469. @tap="sheep.$router.go('/pages/user/wallet/score')">
  45470. <view class="value-box ">
  45471. <view class="value-text">佣金</view>
  45472. </view>
  45473. <view class="menu-title ss-m-t-15">#{{ userInfo.point || 0 }}</view>
  45474. <view class="menu-title ss-m-t-15">=数字人民币:7263</view>
  45475. 注释 <view class="menu-title ss-m-t-15">=NFR(数字资产):87263</view>
  45476. <view class="menu-mini-title ss-m-t-15">[按32小时市场均值实时换算]</view>
  45477. </view>
  45478. <view class="menu-item ss-flex-1 ss-flex-col ss-col-center"
  45479. @tap="sheep.$router.go('/pages/user/wallet/team')">
  45480. <view class="value-box ">
  45481. <view class="value-text">团队</view>
  45482. </view>
  45483. <view class="menu-title ss-m-t-15">88人</view>
  45484. <view class="menu-title ss-m-t-15">直推人今日贡献#92</view>
  45485. <view class="menu-title ss-m-t-15">直推人总贡献值#7692</view>
  45486. </view>
  45487. <view class="menu-item ss-flex-col ss-col-center menu-wallet">
  45488. <view class="value-box ">
  45489. <view class="value-text">NFR</view>
  45490. </view>
  45491. <view class="menu-title ss-m-t-15">8734枚</view>
  45492. <view class="menu-title ss-m-t-15">历史转换数量</view>
  45493. <view class="menu-title ss-m-t-15">点击跳转查看行情</view>
  45494. </view>
  45495. </view> `),
  45496. vue.createElementVNode("view", { class: "ss-wallet-menu-wrap ss-flex ss-col-center" }, [
  45497. vue.createElementVNode("view", {
  45498. class: "menu-item ss-flex-1 ss-flex-col ss-col-center ss-row-center",
  45499. onClick: _cache[1] || (_cache[1] = ($event) => $setup.sheep.$router.go("/pages/user/wallet/score"))
  45500. }, [
  45501. vue.createElementVNode("view", { class: "value-box" }, [
  45502. vue.createElementVNode(
  45503. "view",
  45504. { class: "value-text" },
  45505. vue.toDisplayString(_ctx.$t("wallet.wallet")),
  45506. 1
  45507. /* TEXT */
  45508. )
  45509. ]),
  45510. vue.createElementVNode(
  45511. "view",
  45512. { class: "menu-title ss-m-t-15 text-center" },
  45513. vue.toDisplayString(_ctx.$t("wallet.commission")) + ":" + vue.toDisplayString($setup.points2point($setup.userWallet.integralDO.currentQuota)),
  45514. 1
  45515. /* TEXT */
  45516. ),
  45517. vue.createElementVNode(
  45518. "view",
  45519. { class: "menu-title ss-m-t-15 text-center" },
  45520. vue.toDisplayString(_ctx.$t("wallet.consumption_points")) + ":" + vue.toDisplayString($setup.points2point($setup.userWallet.integralDO.consumptionPoints)),
  45521. 1
  45522. /* TEXT */
  45523. ),
  45524. vue.createCommentVNode(' <view class="menu-title ss-m-t-15">待确权:{{ points2point(userWallet.integralDO.freezeQuota) }}</view> ')
  45525. ]),
  45526. vue.createElementVNode("view", {
  45527. class: "menu-item ss-flex-1 ss-flex-col ss-col-center ss-row-center",
  45528. onClick: _cache[2] || (_cache[2] = ($event) => $setup.sheep.$router.go("/pages/user/wallet/team"))
  45529. }, [
  45530. vue.createElementVNode("view", { class: "value-box" }, [
  45531. vue.createElementVNode(
  45532. "view",
  45533. { class: "value-text" },
  45534. vue.toDisplayString(_ctx.$t("wallet.team")),
  45535. 1
  45536. /* TEXT */
  45537. )
  45538. ]),
  45539. vue.createElementVNode(
  45540. "view",
  45541. { class: "menu-title ss-m-t-15" },
  45542. vue.toDisplayString($setup.userWallet.descNo + " " + _ctx.$t("wallet.people")),
  45543. 1
  45544. /* TEXT */
  45545. )
  45546. ])
  45547. ]),
  45548. vue.createCommentVNode(" 佣金确权 "),
  45549. vue.createVNode(_component_su_popup, {
  45550. show: $setup.state.showProtocol,
  45551. type: "center",
  45552. round: "10",
  45553. isMaskClick: false,
  45554. showClose: "",
  45555. onClose: $setup.close
  45556. }, {
  45557. default: vue.withCtx(() => [
  45558. vue.createElementVNode("view", { class: "head-nav" }, [
  45559. vue.createElementVNode(
  45560. "view",
  45561. {
  45562. class: vue.normalizeClass([$setup.state.navIndex == 0 ? "activite" : "", "ss-m-l-20"]),
  45563. onClick: _cache[3] || (_cache[3] = ($event) => $setup.checkIndex(0))
  45564. },
  45565. vue.toDisplayString(_ctx.$t("wallet.generation_rules")),
  45566. 3
  45567. /* TEXT, CLASS */
  45568. ),
  45569. vue.createElementVNode(
  45570. "view",
  45571. {
  45572. class: vue.normalizeClass([$setup.state.navIndex == 1 ? "activite" : "", "ss-m-l-20"]),
  45573. onClick: _cache[4] || (_cache[4] = ($event) => $setup.checkIndex(1))
  45574. },
  45575. vue.toDisplayString(_ctx.$t("wallet.benefits")),
  45576. 3
  45577. /* TEXT, CLASS */
  45578. )
  45579. ]),
  45580. vue.createElementVNode("scroll-view", {
  45581. class: "scroll-view_H",
  45582. "scroll-y": "true"
  45583. }, [
  45584. $setup.state.navIndex == 0 ? (vue.openBlock(), vue.createBlock($setup["Richtext"], {
  45585. key: 0,
  45586. title: "身价产生规则",
  45587. type: "tab"
  45588. })) : vue.createCommentVNode("v-if", true),
  45589. $setup.state.navIndex == 1 ? (vue.openBlock(), vue.createBlock($setup["Richtext"], {
  45590. key: 1,
  45591. title: "身价权益",
  45592. type: "tab"
  45593. })) : vue.createCommentVNode("v-if", true)
  45594. ])
  45595. ]),
  45596. _: 1
  45597. /* STABLE */
  45598. }, 8, ["show"])
  45599. ]);
  45600. }
  45601. const __easycom_23 = /* @__PURE__ */ _export_sfc(_sfc_main$2b, [["render", _sfc_render$2a], ["__scopeId", "data-v-0aa1f5b2"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-wallet-card/s-wallet-card.vue"]]);
  45602. const _sfc_main$2a = {
  45603. __name: "s-coupon-card",
  45604. props: {
  45605. list: {
  45606. type: Array,
  45607. default() {
  45608. return [
  45609. {
  45610. title: "已领取",
  45611. value: "0",
  45612. icon: "/static/images/nouse_coupon.png",
  45613. path: "/pages/coupon/list",
  45614. type: "geted"
  45615. },
  45616. {
  45617. title: "已使用",
  45618. value: "0",
  45619. icon: "/static/images/useend_coupon.png",
  45620. path: "/pages/coupon/list",
  45621. type: "used"
  45622. },
  45623. {
  45624. title: "已失效",
  45625. value: "0",
  45626. icon: "/static/images/out_coupon.png",
  45627. path: "/pages/coupon/list",
  45628. type: "expired"
  45629. },
  45630. {
  45631. title: "领券中心",
  45632. value: "0",
  45633. icon: "/static/images/all_coupon.png",
  45634. path: "/pages/coupon/list",
  45635. type: "all"
  45636. }
  45637. ];
  45638. }
  45639. }
  45640. },
  45641. setup(__props, { expose: __expose }) {
  45642. __expose();
  45643. const props = __props;
  45644. const __returned__ = { props, get sheep() {
  45645. return sheep$1;
  45646. } };
  45647. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  45648. return __returned__;
  45649. }
  45650. };
  45651. function _sfc_render$29(_ctx, _cache, $props, $setup, $data, $options) {
  45652. return vue.openBlock(), vue.createElementBlock("view", { class: "ss-coupon-menu-wrap ss-flex ss-col-center" }, [
  45653. (vue.openBlock(true), vue.createElementBlock(
  45654. vue.Fragment,
  45655. null,
  45656. vue.renderList($setup.props.list, (item) => {
  45657. return vue.openBlock(), vue.createElementBlock("view", {
  45658. class: vue.normalizeClass(["menu-item ss-flex-col ss-row-center ss-col-center", item.type === "all" ? "menu-wallet" : "ss-flex-1"]),
  45659. key: item.title,
  45660. onClick: ($event) => $setup.sheep.$router.go(item.path, { type: item.type })
  45661. }, [
  45662. vue.createElementVNode("image", {
  45663. class: "item-icon",
  45664. src: $setup.sheep.$url.static(item.icon),
  45665. mode: "aspectFit"
  45666. }, null, 8, ["src"]),
  45667. vue.createElementVNode(
  45668. "view",
  45669. { class: "menu-title ss-m-t-28" },
  45670. vue.toDisplayString(item.title),
  45671. 1
  45672. /* TEXT */
  45673. )
  45674. ], 10, ["onClick"]);
  45675. }),
  45676. 128
  45677. /* KEYED_FRAGMENT */
  45678. ))
  45679. ]);
  45680. }
  45681. const __easycom_24 = /* @__PURE__ */ _export_sfc(_sfc_main$2a, [["render", _sfc_render$29], ["__scopeId", "data-v-245dca84"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-coupon-card/s-coupon-card.vue"]]);
  45682. const _sfc_main$29 = {
  45683. __name: "s-block-item",
  45684. props: {
  45685. type: {
  45686. type: String,
  45687. default: ""
  45688. },
  45689. data: {
  45690. type: Object,
  45691. default() {
  45692. }
  45693. },
  45694. styles: {
  45695. type: Object,
  45696. default() {
  45697. }
  45698. }
  45699. },
  45700. setup(__props, { expose: __expose }) {
  45701. __expose();
  45702. const props = __props;
  45703. function onSearch() {
  45704. }
  45705. const __returned__ = { props, onSearch };
  45706. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  45707. return __returned__;
  45708. }
  45709. };
  45710. function _sfc_render$28(_ctx, _cache, $props, $setup, $data, $options) {
  45711. const _component_s_search_block = resolveEasycom(vue.resolveDynamicComponent("s-search-block"), __easycom_0$n);
  45712. const _component_s_notice_block = resolveEasycom(vue.resolveDynamicComponent("s-notice-block"), __easycom_1$7);
  45713. const _component_s_menu_button = resolveEasycom(vue.resolveDynamicComponent("s-menu-button"), __easycom_2$4);
  45714. const _component_s_menu_list = resolveEasycom(vue.resolveDynamicComponent("s-menu-list"), __easycom_3$6);
  45715. const _component_s_menu_grid = resolveEasycom(vue.resolveDynamicComponent("s-menu-grid"), __easycom_4$1);
  45716. const _component_s_popup_image = resolveEasycom(vue.resolveDynamicComponent("s-popup-image"), __easycom_5$1);
  45717. const _component_s_float_menu = resolveEasycom(vue.resolveDynamicComponent("s-float-menu"), __easycom_6);
  45718. const _component_s_image_block = resolveEasycom(vue.resolveDynamicComponent("s-image-block"), __easycom_7);
  45719. const _component_s_image_banner = resolveEasycom(vue.resolveDynamicComponent("s-image-banner"), __easycom_8$1);
  45720. const _component_s_title_block = resolveEasycom(vue.resolveDynamicComponent("s-title-block"), __easycom_9);
  45721. const _component_s_image_cube = resolveEasycom(vue.resolveDynamicComponent("s-image-cube"), __easycom_10);
  45722. const _component_s_video_block = resolveEasycom(vue.resolveDynamicComponent("s-video-block"), __easycom_11);
  45723. const _component_s_line_block = resolveEasycom(vue.resolveDynamicComponent("s-line-block"), __easycom_12);
  45724. const _component_s_hotzone_block = resolveEasycom(vue.resolveDynamicComponent("s-hotzone-block"), __easycom_13);
  45725. const _component_s_goods_card = resolveEasycom(vue.resolveDynamicComponent("s-goods-card"), __easycom_14);
  45726. const _component_s_goods_shelves = resolveEasycom(vue.resolveDynamicComponent("s-goods-shelves"), __easycom_15);
  45727. const _component_s_groupon_block = resolveEasycom(vue.resolveDynamicComponent("s-groupon-block"), __easycom_16);
  45728. const _component_s_seckill_block = resolveEasycom(vue.resolveDynamicComponent("s-seckill-block"), __easycom_17);
  45729. const _component_s_live_block = resolveEasycom(vue.resolveDynamicComponent("s-live-block"), __easycom_18);
  45730. const _component_s_coupon_block = resolveEasycom(vue.resolveDynamicComponent("s-coupon-block"), __easycom_19);
  45731. const _component_s_richtext_block = resolveEasycom(vue.resolveDynamicComponent("s-richtext-block"), __easycom_20);
  45732. const _component_s_user_card = resolveEasycom(vue.resolveDynamicComponent("s-user-card"), __easycom_21);
  45733. const _component_s_order_card = resolveEasycom(vue.resolveDynamicComponent("s-order-card"), __easycom_22);
  45734. const _component_s_wallet_card = resolveEasycom(vue.resolveDynamicComponent("s-wallet-card"), __easycom_23);
  45735. const _component_s_coupon_card = resolveEasycom(vue.resolveDynamicComponent("s-coupon-card"), __easycom_24);
  45736. return vue.openBlock(), vue.createElementBlock("view", null, [
  45737. vue.createCommentVNode(" 基础组件:搜索框 "),
  45738. $props.type === "SearchBar" ? (vue.openBlock(), vue.createBlock(_component_s_search_block, {
  45739. key: 0,
  45740. data: $props.data,
  45741. styles: $props.styles,
  45742. navbar: false
  45743. }, null, 8, ["data", "styles"])) : vue.createCommentVNode("v-if", true),
  45744. vue.createCommentVNode(" 基础组件:公告栏 "),
  45745. $props.type === "NoticeBar" ? (vue.openBlock(), vue.createBlock(_component_s_notice_block, {
  45746. key: 1,
  45747. data: $props.data
  45748. }, null, 8, ["data"])) : vue.createCommentVNode("v-if", true),
  45749. vue.createCommentVNode(" 基础组件:菜单导航 "),
  45750. $props.type === "MenuSwiper" ? (vue.openBlock(), vue.createBlock(_component_s_menu_button, {
  45751. key: 2,
  45752. data: $props.data,
  45753. styles: $props.styles
  45754. }, null, 8, ["data", "styles"])) : vue.createCommentVNode("v-if", true),
  45755. vue.createCommentVNode(" 基础组件:列表导航 "),
  45756. $props.type === "MenuList" ? (vue.openBlock(), vue.createBlock(_component_s_menu_list, {
  45757. key: 3,
  45758. data: $props.data
  45759. }, null, 8, ["data"])) : vue.createCommentVNode("v-if", true),
  45760. vue.createCommentVNode(" 基础组件:宫格导航 "),
  45761. $props.type === "MenuGrid" ? (vue.openBlock(), vue.createBlock(_component_s_menu_grid, {
  45762. key: 4,
  45763. data: $props.data
  45764. }, null, 8, ["data"])) : vue.createCommentVNode("v-if", true),
  45765. vue.createCommentVNode(" 基础组件:弹窗广告 "),
  45766. $props.type === "Popover" ? (vue.openBlock(), vue.createBlock(_component_s_popup_image, {
  45767. key: 5,
  45768. data: $props.data
  45769. }, null, 8, ["data"])) : vue.createCommentVNode("v-if", true),
  45770. vue.createCommentVNode(" 基础组件:悬浮按钮 "),
  45771. $props.type === "FloatingActionButton" ? (vue.openBlock(), vue.createBlock(_component_s_float_menu, {
  45772. key: 6,
  45773. data: $props.data
  45774. }, null, 8, ["data"])) : vue.createCommentVNode("v-if", true),
  45775. vue.createCommentVNode(" 图文组件:图片展示 "),
  45776. $props.type === "ImageBar" ? (vue.openBlock(), vue.createBlock(_component_s_image_block, {
  45777. key: 7,
  45778. data: $props.data,
  45779. styles: $props.styles
  45780. }, null, 8, ["data", "styles"])) : vue.createCommentVNode("v-if", true),
  45781. vue.createCommentVNode(" 图文组件:图片轮播 "),
  45782. $props.type === "Carousel" ? (vue.openBlock(), vue.createBlock(_component_s_image_banner, {
  45783. key: 8,
  45784. data: $props.data,
  45785. styles: $props.styles
  45786. }, null, 8, ["data", "styles"])) : vue.createCommentVNode("v-if", true),
  45787. vue.createCommentVNode(" 基础组件:标题栏 "),
  45788. $props.type === "TitleBar" ? (vue.openBlock(), vue.createBlock(_component_s_title_block, {
  45789. key: 9,
  45790. data: $props.data,
  45791. styles: $props.styles
  45792. }, null, 8, ["data", "styles"])) : vue.createCommentVNode("v-if", true),
  45793. vue.createCommentVNode(" 图文组件:广告魔方 "),
  45794. $props.type === "MagicCube" ? (vue.openBlock(), vue.createBlock(_component_s_image_cube, {
  45795. key: 10,
  45796. data: $props.data,
  45797. styles: $props.styles
  45798. }, null, 8, ["data", "styles"])) : vue.createCommentVNode("v-if", true),
  45799. vue.createCommentVNode(" 图文组件:视频播放 "),
  45800. $props.type === "VideoPlayer" ? (vue.openBlock(), vue.createBlock(_component_s_video_block, {
  45801. key: 11,
  45802. data: $props.data,
  45803. styles: $props.styles
  45804. }, null, 8, ["data", "styles"])) : vue.createCommentVNode("v-if", true),
  45805. vue.createCommentVNode(" 基础组件:分割线 "),
  45806. $props.type === "Divider" ? (vue.openBlock(), vue.createBlock(_component_s_line_block, {
  45807. key: 12,
  45808. data: $props.data
  45809. }, null, 8, ["data"])) : vue.createCommentVNode("v-if", true),
  45810. vue.createCommentVNode(" 图文组件:热区 "),
  45811. $props.type === "HotZone" ? (vue.openBlock(), vue.createBlock(_component_s_hotzone_block, {
  45812. key: 13,
  45813. data: $props.data,
  45814. styles: $props.styles
  45815. }, null, 8, ["data", "styles"])) : vue.createCommentVNode("v-if", true),
  45816. vue.createCommentVNode(" 商品组件:商品卡片 "),
  45817. $props.type === "ProductCard" ? (vue.openBlock(), vue.createBlock(_component_s_goods_card, {
  45818. key: 14,
  45819. data: $props.data,
  45820. styles: $props.styles
  45821. }, null, 8, ["data", "styles"])) : vue.createCommentVNode("v-if", true),
  45822. vue.createCommentVNode(" 商品组件:商品栏 "),
  45823. $props.type === "ProductList" ? (vue.openBlock(), vue.createBlock(_component_s_goods_shelves, {
  45824. key: 15,
  45825. data: $props.data,
  45826. styles: $props.styles
  45827. }, null, 8, ["data", "styles"])) : vue.createCommentVNode("v-if", true),
  45828. vue.createCommentVNode(" 营销组件:拼团 "),
  45829. $props.type === "PromotionCombination" ? (vue.openBlock(), vue.createBlock(_component_s_groupon_block, {
  45830. key: 16,
  45831. data: $props.data,
  45832. styles: $props.styles
  45833. }, null, 8, ["data", "styles"])) : vue.createCommentVNode("v-if", true),
  45834. vue.createCommentVNode(" 营销组件:秒杀 "),
  45835. $props.type === "PromotionSeckill" ? (vue.openBlock(), vue.createBlock(_component_s_seckill_block, {
  45836. key: 17,
  45837. data: $props.data,
  45838. styles: $props.styles
  45839. }, null, 8, ["data", "styles"])) : vue.createCommentVNode("v-if", true),
  45840. vue.createCommentVNode(" 营销组件:小程序直播(暂时没有这个功能) "),
  45841. $props.type === "MpLive" ? (vue.openBlock(), vue.createBlock(_component_s_live_block, {
  45842. key: 18,
  45843. data: $props.data,
  45844. styles: $props.styles
  45845. }, null, 8, ["data", "styles"])) : vue.createCommentVNode("v-if", true),
  45846. vue.createCommentVNode(" 营销组件:优惠券 "),
  45847. $props.type === "CouponCard" ? (vue.openBlock(), vue.createBlock(_component_s_coupon_block, {
  45848. key: 19,
  45849. data: $props.data,
  45850. styles: $props.styles
  45851. }, null, 8, ["data", "styles"])) : vue.createCommentVNode("v-if", true),
  45852. vue.createCommentVNode(" 营销组件:文章 "),
  45853. $props.type === "PromotionArticle" ? (vue.openBlock(), vue.createBlock(_component_s_richtext_block, {
  45854. key: 20,
  45855. data: $props.data,
  45856. styles: $props.styles
  45857. }, null, 8, ["data", "styles"])) : vue.createCommentVNode("v-if", true),
  45858. vue.createCommentVNode(" 用户组件:用户卡片 "),
  45859. $props.type === "UserCard" ? (vue.openBlock(), vue.createBlock(_component_s_user_card, { key: 21 })) : vue.createCommentVNode("v-if", true),
  45860. vue.createCommentVNode(" 用户组件:用户订单 "),
  45861. $props.type === "UserOrder" ? (vue.openBlock(), vue.createBlock(_component_s_order_card, {
  45862. key: 22,
  45863. data: $props.data
  45864. }, null, 8, ["data"])) : vue.createCommentVNode("v-if", true),
  45865. vue.createCommentVNode(" 用户组件:用户资产 "),
  45866. $props.type === "UserWallet" ? (vue.openBlock(), vue.createBlock(_component_s_wallet_card, { key: 23 })) : vue.createCommentVNode("v-if", true),
  45867. vue.createCommentVNode(" 用户组件:用户卡券 "),
  45868. $props.type === "UserCoupon" ? (vue.openBlock(), vue.createBlock(_component_s_coupon_card, { key: 24 })) : vue.createCommentVNode("v-if", true)
  45869. ]);
  45870. }
  45871. const __easycom_1$3 = /* @__PURE__ */ _export_sfc(_sfc_main$29, [["render", _sfc_render$28], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-block-item/s-block-item.vue"]]);
  45872. const _sfc_main$28 = {
  45873. __name: "s-block",
  45874. props: {
  45875. styles: {
  45876. type: Object,
  45877. default() {
  45878. }
  45879. }
  45880. },
  45881. setup(__props, { expose: __expose }) {
  45882. __expose();
  45883. const props = __props;
  45884. const elBackground = vue.computed(() => {
  45885. if (props.styles) {
  45886. if (props.styles.bgType === "color")
  45887. return { background: props.styles.bgColor };
  45888. if (props.styles.bgType === "img")
  45889. return {
  45890. background: `url(${sheep$1.$url.cdn(
  45891. props.styles.bgImage
  45892. )}) no-repeat top center / 100% auto`
  45893. };
  45894. }
  45895. });
  45896. const elStyles = vue.computed(() => {
  45897. if (props.styles) {
  45898. return {
  45899. marginTop: `${props.styles.marginTop || 0}px`,
  45900. marginBottom: `${props.styles.marginBottom || 0}px`,
  45901. marginLeft: `${props.styles.marginLeft || 0}px`,
  45902. marginRight: `${props.styles.marginRight || 0}px`,
  45903. paddingTop: `${props.styles.paddingTop || 0}px`,
  45904. paddingRight: `${props.styles.paddingRight || 0}px`,
  45905. paddingBottom: `${props.styles.paddingBottom || 0}px`,
  45906. paddingLeft: `${props.styles.paddingLeft || 0}px`,
  45907. borderTopLeftRadius: `${props.styles.borderTopLeftRadius || 0}px`,
  45908. borderTopRightRadius: `${props.styles.borderTopRightRadius || 0}px`,
  45909. borderBottomRightRadius: `${props.styles.borderBottomRightRadius || 0}px`,
  45910. borderBottomLeftRadius: `${props.styles.borderBottomLeftRadius || 0}px`,
  45911. overflow: "hidden"
  45912. };
  45913. }
  45914. });
  45915. const __returned__ = { props, elBackground, elStyles, computed: vue.computed, provide: vue.provide, unref: vue.unref, get sheep() {
  45916. return sheep$1;
  45917. } };
  45918. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  45919. return __returned__;
  45920. }
  45921. };
  45922. function _sfc_render$27(_ctx, _cache, $props, $setup, $data, $options) {
  45923. return vue.openBlock(), vue.createElementBlock(
  45924. "view",
  45925. {
  45926. style: vue.normalizeStyle([$setup.elStyles, $setup.elBackground])
  45927. },
  45928. [
  45929. vue.renderSlot(_ctx.$slots, "default")
  45930. ],
  45931. 4
  45932. /* STYLE */
  45933. );
  45934. }
  45935. const __easycom_2$3 = /* @__PURE__ */ _export_sfc(_sfc_main$28, [["render", _sfc_render$27], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-block/s-block.vue"]]);
  45936. const _sfc_main$27 = {
  45937. __name: "index",
  45938. setup(__props, { expose: __expose }) {
  45939. __expose();
  45940. uni.hideTabBar();
  45941. const template = vue.computed(() => {
  45942. var _a2;
  45943. return (_a2 = sheep$1.$store("app").template) == null ? void 0 : _a2.home;
  45944. });
  45945. onLoad((options2) => {
  45946. if (options2.templateId) {
  45947. sheep$1.$store("app").init(options2.templateId);
  45948. }
  45949. if (options2.spm) {
  45950. $share.decryptSpm(options2.spm);
  45951. }
  45952. if (options2.page) {
  45953. sheep$1.$router.go(decodeURIComponent(options2.page));
  45954. }
  45955. if (options2.points !== void 0 || options2.scoialStatus !== void 0) {
  45956. showWalletModal({ points: options2.points, socialStatus: options2.socialStatus });
  45957. }
  45958. });
  45959. onPullDownRefresh(() => {
  45960. sheep$1.$store("app").init();
  45961. setTimeout(function() {
  45962. uni.stopPullDownRefresh();
  45963. }, 800);
  45964. });
  45965. onPageScroll(() => {
  45966. });
  45967. const __returned__ = { template, computed: vue.computed, get onLoad() {
  45968. return onLoad;
  45969. }, get onPageScroll() {
  45970. return onPageScroll;
  45971. }, get onPullDownRefresh() {
  45972. return onPullDownRefresh;
  45973. }, get sheep() {
  45974. return sheep$1;
  45975. }, get $share() {
  45976. return $share;
  45977. }, get isAndroid() {
  45978. return isAndroid;
  45979. }, get getAndroidJiGuangId() {
  45980. return getAndroidJiGuangId;
  45981. }, get showWalletModal() {
  45982. return showWalletModal;
  45983. }, get colseWalletModal() {
  45984. return colseWalletModal;
  45985. } };
  45986. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  45987. return __returned__;
  45988. }
  45989. };
  45990. function _sfc_render$26(_ctx, _cache, $props, $setup, $data, $options) {
  45991. var _a2;
  45992. const _component_s_block_item = resolveEasycom(vue.resolveDynamicComponent("s-block-item"), __easycom_1$3);
  45993. const _component_s_block = resolveEasycom(vue.resolveDynamicComponent("s-block"), __easycom_2$3);
  45994. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  45995. return $setup.template ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [
  45996. vue.createVNode(_component_s_layout, {
  45997. title: _ctx.$t("common.home"),
  45998. navbar: "custom",
  45999. tabbar: "/pages/index/index",
  46000. bgStyle: $setup.template.page,
  46001. navbarStyle: (_a2 = $setup.template.style) == null ? void 0 : _a2.navbar,
  46002. onShareAppMessage: ""
  46003. }, {
  46004. default: vue.withCtx(() => [
  46005. (vue.openBlock(true), vue.createElementBlock(
  46006. vue.Fragment,
  46007. null,
  46008. vue.renderList($setup.template.components, (item, index2) => {
  46009. return vue.openBlock(), vue.createBlock(_component_s_block, {
  46010. key: index2,
  46011. styles: item.property.style
  46012. }, {
  46013. default: vue.withCtx(() => [
  46014. vue.createVNode(_component_s_block_item, {
  46015. type: item.id,
  46016. data: item.property,
  46017. styles: item.property.style
  46018. }, null, 8, ["type", "data", "styles"])
  46019. ]),
  46020. _: 2
  46021. /* DYNAMIC */
  46022. }, 1032, ["styles"]);
  46023. }),
  46024. 128
  46025. /* KEYED_FRAGMENT */
  46026. ))
  46027. ]),
  46028. _: 1
  46029. /* STABLE */
  46030. }, 8, ["title", "bgStyle", "navbarStyle"])
  46031. ])) : vue.createCommentVNode("v-if", true);
  46032. }
  46033. const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$27, [["render", _sfc_render$26], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/index/index.vue"]]);
  46034. const _sfc_main$26 = {
  46035. __name: "user",
  46036. setup(__props, { expose: __expose }) {
  46037. __expose();
  46038. uni.hideTabBar();
  46039. const template = vue.computed(() => sheep$1.$store("app").template.user);
  46040. const isLogin = vue.computed(() => sheep$1.$store("user").isLogin);
  46041. onShow(() => {
  46042. sheep$1.$store("user").updateUserData();
  46043. });
  46044. onPullDownRefresh(() => {
  46045. sheep$1.$store("user").updateUserData();
  46046. setTimeout(function() {
  46047. uni.stopPullDownRefresh();
  46048. }, 800);
  46049. });
  46050. onPageScroll(() => {
  46051. });
  46052. onLoad((options2) => {
  46053. if (options2.linkId) {
  46054. uni.setStorageSync("linkId", options2.linkId);
  46055. if (!isLogin.value) {
  46056. showAuthModal("register", "register");
  46057. }
  46058. }
  46059. });
  46060. const __returned__ = { template, isLogin, computed: vue.computed, get onShow() {
  46061. return onShow;
  46062. }, get onPageScroll() {
  46063. return onPageScroll;
  46064. }, get onPullDownRefresh() {
  46065. return onPullDownRefresh;
  46066. }, get onLoad() {
  46067. return onLoad;
  46068. }, get sheep() {
  46069. return sheep$1;
  46070. }, get closeShareModal() {
  46071. return closeShareModal;
  46072. }, get showAuthModal() {
  46073. return showAuthModal;
  46074. } };
  46075. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  46076. return __returned__;
  46077. }
  46078. };
  46079. function _sfc_render$25(_ctx, _cache, $props, $setup, $data, $options) {
  46080. var _a2;
  46081. const _component_s_block_item = resolveEasycom(vue.resolveDynamicComponent("s-block-item"), __easycom_1$3);
  46082. const _component_s_block = resolveEasycom(vue.resolveDynamicComponent("s-block"), __easycom_2$3);
  46083. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  46084. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  46085. title: "我的",
  46086. tabbar: "/pages/index/user",
  46087. navbar: "custom",
  46088. bgStyle: $setup.template.page,
  46089. navbarStyle: (_a2 = $setup.template.style) == null ? void 0 : _a2.navbar,
  46090. onShareAppMessage: ""
  46091. }, {
  46092. default: vue.withCtx(() => [
  46093. (vue.openBlock(true), vue.createElementBlock(
  46094. vue.Fragment,
  46095. null,
  46096. vue.renderList($setup.template.components, (item, index2) => {
  46097. return vue.openBlock(), vue.createBlock(_component_s_block, {
  46098. key: index2,
  46099. styles: item.property.style
  46100. }, {
  46101. default: vue.withCtx(() => [
  46102. vue.createVNode(_component_s_block_item, {
  46103. type: item.id,
  46104. data: item.property,
  46105. styles: item.property.style
  46106. }, null, 8, ["type", "data", "styles"])
  46107. ]),
  46108. _: 2
  46109. /* DYNAMIC */
  46110. }, 1032, ["styles"]);
  46111. }),
  46112. 128
  46113. /* KEYED_FRAGMENT */
  46114. ))
  46115. ]),
  46116. _: 1
  46117. /* STABLE */
  46118. }, 8, ["bgStyle", "navbarStyle"]);
  46119. }
  46120. const PagesIndexUser = /* @__PURE__ */ _export_sfc(_sfc_main$26, [["render", _sfc_render$25], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/index/user.vue"]]);
  46121. const _sfc_main$25 = {
  46122. __name: "second-one",
  46123. props: {
  46124. data: {
  46125. type: Object,
  46126. default: () => ({})
  46127. },
  46128. activeMenu: [Number, String]
  46129. },
  46130. setup(__props, { expose: __expose }) {
  46131. __expose();
  46132. const props = __props;
  46133. const __returned__ = { props, get sheep() {
  46134. return sheep$1;
  46135. } };
  46136. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  46137. return __returned__;
  46138. }
  46139. };
  46140. function _sfc_render$24(_ctx, _cache, $props, $setup, $data, $options) {
  46141. return vue.openBlock(), vue.createElementBlock("view", null, [
  46142. vue.createCommentVNode(" 一级分类的名字 "),
  46143. vue.createElementVNode("view", { class: "title-box ss-flex ss-col-center ss-row-center ss-p-b-30" }, [
  46144. vue.createElementVNode("view", { class: "title-line-left" }),
  46145. vue.createElementVNode(
  46146. "view",
  46147. { class: "title-text ss-p-x-20" },
  46148. vue.toDisplayString($setup.props.data[$props.activeMenu].name),
  46149. 1
  46150. /* TEXT */
  46151. ),
  46152. vue.createElementVNode("view", { class: "title-line-right" })
  46153. ]),
  46154. vue.createCommentVNode(" 二级分类的名字 "),
  46155. vue.createElementVNode("view", { class: "goods-item-box ss-flex ss-flex-wrap ss-p-b-20" }, [
  46156. (vue.openBlock(true), vue.createElementBlock(
  46157. vue.Fragment,
  46158. null,
  46159. vue.renderList($setup.props.data[$props.activeMenu].children, (item) => {
  46160. return vue.openBlock(), vue.createElementBlock("view", {
  46161. class: "goods-item",
  46162. key: item.id,
  46163. onClick: ($event) => $setup.sheep.$router.go("/pages/goods/list", {
  46164. categoryId: item.id
  46165. })
  46166. }, [
  46167. vue.createElementVNode("image", {
  46168. class: "goods-img",
  46169. src: item.picUrl,
  46170. mode: "aspectFill"
  46171. }, null, 8, ["src"]),
  46172. vue.createElementVNode("view", { class: "ss-p-10" }, [
  46173. vue.createElementVNode(
  46174. "view",
  46175. { class: "goods-title ss-line-1" },
  46176. vue.toDisplayString(item.name),
  46177. 1
  46178. /* TEXT */
  46179. )
  46180. ])
  46181. ], 8, ["onClick"]);
  46182. }),
  46183. 128
  46184. /* KEYED_FRAGMENT */
  46185. ))
  46186. ])
  46187. ]);
  46188. }
  46189. const secondOne = /* @__PURE__ */ _export_sfc(_sfc_main$25, [["render", _sfc_render$24], ["__scopeId", "data-v-c7b30c59"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/index/components/second-one.vue"]]);
  46190. const _sfc_main$24 = {
  46191. __name: "first-one",
  46192. props: {
  46193. pagination: Object
  46194. },
  46195. setup(__props, { expose: __expose }) {
  46196. __expose();
  46197. const props = __props;
  46198. const __returned__ = { props, get sheep() {
  46199. return sheep$1;
  46200. } };
  46201. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  46202. return __returned__;
  46203. }
  46204. };
  46205. function _sfc_render$23(_ctx, _cache, $props, $setup, $data, $options) {
  46206. const _component_s_goods_column = resolveEasycom(vue.resolveDynamicComponent("s-goods-column"), __easycom_1$4);
  46207. return vue.openBlock(), vue.createElementBlock("view", { class: "ss-flex-col" }, [
  46208. (vue.openBlock(true), vue.createElementBlock(
  46209. vue.Fragment,
  46210. null,
  46211. vue.renderList($props.pagination.list, (item) => {
  46212. return vue.openBlock(), vue.createElementBlock("view", {
  46213. class: "goods-box",
  46214. key: item.id
  46215. }, [
  46216. vue.createVNode(_component_s_goods_column, {
  46217. size: "sl",
  46218. data: item,
  46219. onClick: ($event) => $setup.sheep.$router.go("/pages/goods/index", { id: item.id })
  46220. }, null, 8, ["data", "onClick"])
  46221. ]);
  46222. }),
  46223. 128
  46224. /* KEYED_FRAGMENT */
  46225. ))
  46226. ]);
  46227. }
  46228. const firstOne = /* @__PURE__ */ _export_sfc(_sfc_main$24, [["render", _sfc_render$23], ["__scopeId", "data-v-f8bc43e1"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/index/components/first-one.vue"]]);
  46229. const _sfc_main$23 = {
  46230. __name: "first-two",
  46231. props: {
  46232. pagination: Object
  46233. },
  46234. setup(__props, { expose: __expose }) {
  46235. __expose();
  46236. const props = __props;
  46237. const __returned__ = { props, get sheep() {
  46238. return sheep$1;
  46239. }, get fen2yuan() {
  46240. return fen2yuan;
  46241. } };
  46242. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  46243. return __returned__;
  46244. }
  46245. };
  46246. function _sfc_render$22(_ctx, _cache, $props, $setup, $data, $options) {
  46247. var _a2;
  46248. return vue.openBlock(), vue.createElementBlock("view", null, [
  46249. vue.createElementVNode("view", { class: "ss-flex flex-wrap" }, [
  46250. (vue.openBlock(true), vue.createElementBlock(
  46251. vue.Fragment,
  46252. null,
  46253. vue.renderList((_a2 = $props.pagination) == null ? void 0 : _a2.list, (item) => {
  46254. return vue.openBlock(), vue.createElementBlock("view", {
  46255. class: "goods-box",
  46256. key: item.id
  46257. }, [
  46258. vue.createElementVNode("view", {
  46259. onClick: ($event) => $setup.sheep.$router.go("/pages/goods/index", { id: item.id })
  46260. }, [
  46261. vue.createElementVNode("view", { class: "goods-img" }, [
  46262. vue.createElementVNode("image", {
  46263. class: "goods-img",
  46264. src: item.picUrl,
  46265. mode: "aspectFit"
  46266. }, null, 8, ["src"])
  46267. ]),
  46268. vue.createElementVNode("view", { class: "goods-content" }, [
  46269. vue.createElementVNode(
  46270. "view",
  46271. { class: "goods-title ss-line-1 ss-m-b-28" },
  46272. vue.toDisplayString(item.title),
  46273. 1
  46274. /* TEXT */
  46275. ),
  46276. vue.createElementVNode(
  46277. "view",
  46278. { class: "goods-price" },
  46279. "¥" + vue.toDisplayString($setup.fen2yuan(item.price)),
  46280. 1
  46281. /* TEXT */
  46282. )
  46283. ])
  46284. ], 8, ["onClick"])
  46285. ]);
  46286. }),
  46287. 128
  46288. /* KEYED_FRAGMENT */
  46289. ))
  46290. ])
  46291. ]);
  46292. }
  46293. const firstTwo = /* @__PURE__ */ _export_sfc(_sfc_main$23, [["render", _sfc_render$22], ["__scopeId", "data-v-80c21380"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/index/components/first-two.vue"]]);
  46294. const _sfc_main$22 = {
  46295. __name: "category",
  46296. setup(__props, { expose: __expose }) {
  46297. __expose();
  46298. const state = vue.reactive({
  46299. style: "second_one",
  46300. // first_one(一级 - 样式一), first_two(二级 - 样式二), second_one(二级)
  46301. categoryList: [],
  46302. // 商品分类树
  46303. activeMenu: 0,
  46304. // 选中的一级菜单,在 categoryList 的下标
  46305. pagination: {
  46306. // 商品分页
  46307. list: [],
  46308. // 商品列表
  46309. total: [],
  46310. // 商品总数
  46311. pageNo: 1,
  46312. pageSize: 6
  46313. },
  46314. loadStatus: ""
  46315. });
  46316. const {
  46317. safeArea
  46318. } = sheep$1.$platform.device;
  46319. const pageHeight = vue.computed(() => safeArea.height - 44 - 50);
  46320. async function getList() {
  46321. const {
  46322. code: code2,
  46323. data
  46324. } = await CategoryApi.getCategoryList();
  46325. if (code2 !== 0) {
  46326. return;
  46327. }
  46328. state.categoryList = handleTree(data);
  46329. }
  46330. const onMenu = (val) => {
  46331. state.activeMenu = val;
  46332. if (state.style === "first_one" || state.style === "first_two") {
  46333. state.pagination.pageNo = 1;
  46334. state.pagination.list = [];
  46335. state.pagination.total = 0;
  46336. getGoodsList();
  46337. }
  46338. };
  46339. async function getGoodsList() {
  46340. state.loadStatus = "loading";
  46341. const res = await SpuApi.getSpuPage({
  46342. categoryId: state.categoryList[state.activeMenu].id,
  46343. pageNo: state.pagination.pageNo,
  46344. pageSize: state.pagination.pageSize
  46345. });
  46346. if (res.code !== 0) {
  46347. return;
  46348. }
  46349. state.pagination.list = _$1.concat(state.pagination.list, res.data.list);
  46350. state.pagination.total = res.data.total;
  46351. state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore";
  46352. }
  46353. function loadMore() {
  46354. if (state.loadStatus === "noMore") {
  46355. return;
  46356. }
  46357. state.pagination.pageNo++;
  46358. getGoodsList();
  46359. }
  46360. onLoad(async () => {
  46361. await getList();
  46362. if (state.style === "first_one" || state.style === "first_two") {
  46363. onMenu(0);
  46364. }
  46365. });
  46366. onReachBottom(() => {
  46367. loadMore();
  46368. });
  46369. const __returned__ = { state, safeArea, pageHeight, getList, onMenu, getGoodsList, loadMore, secondOne, firstOne, firstTwo, get sheep() {
  46370. return sheep$1;
  46371. }, get CategoryApi() {
  46372. return CategoryApi;
  46373. }, get SpuApi() {
  46374. return SpuApi;
  46375. }, get onLoad() {
  46376. return onLoad;
  46377. }, get onReachBottom() {
  46378. return onReachBottom;
  46379. }, computed: vue.computed, reactive: vue.reactive, get _() {
  46380. return _$1;
  46381. }, get handleTree() {
  46382. return handleTree;
  46383. } };
  46384. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  46385. return __returned__;
  46386. }
  46387. };
  46388. function _sfc_render$21(_ctx, _cache, $props, $setup, $data, $options) {
  46389. const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5);
  46390. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  46391. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  46392. title: _ctx.$t("common.category"),
  46393. tabbar: "/pages/index/category",
  46394. bgStyle: { color: "#fff" }
  46395. }, {
  46396. default: vue.withCtx(() => {
  46397. var _a2;
  46398. return [
  46399. vue.createElementVNode("view", { class: "s-category" }, [
  46400. vue.createElementVNode(
  46401. "view",
  46402. {
  46403. class: "three-level-wrap ss-flex ss-col-top",
  46404. style: vue.normalizeStyle([{ height: $setup.pageHeight + "px" }])
  46405. },
  46406. [
  46407. vue.createCommentVNode(" 商品分类(左) "),
  46408. vue.createElementVNode(
  46409. "scroll-view",
  46410. {
  46411. class: "side-menu-wrap",
  46412. "scroll-y": "",
  46413. style: vue.normalizeStyle([{ height: $setup.pageHeight + "px" }])
  46414. },
  46415. [
  46416. (vue.openBlock(true), vue.createElementBlock(
  46417. vue.Fragment,
  46418. null,
  46419. vue.renderList($setup.state.categoryList, (item, index2) => {
  46420. return vue.openBlock(), vue.createElementBlock("view", {
  46421. class: vue.normalizeClass(["menu-item ss-flex", [{ "menu-item-active": index2 === $setup.state.activeMenu }]]),
  46422. key: item.id,
  46423. onClick: ($event) => $setup.onMenu(index2)
  46424. }, [
  46425. vue.createElementVNode(
  46426. "view",
  46427. { class: "menu-title ss-line-1" },
  46428. vue.toDisplayString(item.name),
  46429. 1
  46430. /* TEXT */
  46431. )
  46432. ], 10, ["onClick"]);
  46433. }),
  46434. 128
  46435. /* KEYED_FRAGMENT */
  46436. ))
  46437. ],
  46438. 4
  46439. /* STYLE */
  46440. ),
  46441. vue.createCommentVNode(" 商品分类(右) "),
  46442. ((_a2 = $setup.state.categoryList) == null ? void 0 : _a2.length) ? (vue.openBlock(), vue.createElementBlock(
  46443. "scroll-view",
  46444. {
  46445. key: 0,
  46446. class: "goods-list-box",
  46447. "scroll-y": "",
  46448. style: vue.normalizeStyle([{ height: $setup.pageHeight + "px" }])
  46449. },
  46450. [
  46451. $setup.state.categoryList[$setup.state.activeMenu].picUrl ? (vue.openBlock(), vue.createElementBlock("image", {
  46452. key: 0,
  46453. class: "banner-img",
  46454. src: $setup.sheep.$url.cdn($setup.state.categoryList[$setup.state.activeMenu].picUrl),
  46455. mode: "widthFix"
  46456. }, null, 8, ["src"])) : vue.createCommentVNode("v-if", true),
  46457. $setup.state.style === "first_one" ? (vue.openBlock(), vue.createBlock($setup["firstOne"], {
  46458. key: 1,
  46459. pagination: $setup.state.pagination
  46460. }, null, 8, ["pagination"])) : vue.createCommentVNode("v-if", true),
  46461. $setup.state.style === "first_two" ? (vue.openBlock(), vue.createBlock($setup["firstTwo"], {
  46462. key: 2,
  46463. pagination: $setup.state.pagination
  46464. }, null, 8, ["pagination"])) : vue.createCommentVNode("v-if", true),
  46465. $setup.state.style === "second_one" ? (vue.openBlock(), vue.createBlock($setup["secondOne"], {
  46466. key: 3,
  46467. data: $setup.state.categoryList,
  46468. activeMenu: $setup.state.activeMenu
  46469. }, null, 8, ["data", "activeMenu"])) : vue.createCommentVNode("v-if", true),
  46470. ($setup.state.style === "first_one" || $setup.state.style === "first_two") && $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, {
  46471. key: 4,
  46472. status: $setup.state.loadStatus,
  46473. "content-text": {
  46474. contentdown: "点击查看更多"
  46475. },
  46476. onClick: $setup.loadMore
  46477. }, null, 8, ["status"])) : vue.createCommentVNode("v-if", true)
  46478. ],
  46479. 4
  46480. /* STYLE */
  46481. )) : vue.createCommentVNode("v-if", true)
  46482. ],
  46483. 4
  46484. /* STYLE */
  46485. )
  46486. ])
  46487. ];
  46488. }),
  46489. _: 1
  46490. /* STABLE */
  46491. }, 8, ["title"]);
  46492. }
  46493. const PagesIndexCategory = /* @__PURE__ */ _export_sfc(_sfc_main$22, [["render", _sfc_render$21], ["__scopeId", "data-v-1031f1cf"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/index/category.vue"]]);
  46494. const _sfc_main$21 = {
  46495. name: "UniNumberBox",
  46496. emits: ["change", "input", "update:modelValue", "blur", "focus"],
  46497. props: {
  46498. value: {
  46499. type: [Number, String],
  46500. default: 1
  46501. },
  46502. modelValue: {
  46503. type: [Number, String],
  46504. default: 1
  46505. },
  46506. min: {
  46507. type: Number,
  46508. default: 0
  46509. },
  46510. max: {
  46511. type: Number,
  46512. default: 100
  46513. },
  46514. step: {
  46515. type: Number,
  46516. default: 1
  46517. },
  46518. background: {
  46519. type: String,
  46520. default: "#f5f5f5"
  46521. },
  46522. color: {
  46523. type: String,
  46524. default: "#333"
  46525. },
  46526. disabled: {
  46527. type: Boolean,
  46528. default: false
  46529. },
  46530. activity: {
  46531. type: String,
  46532. default: "none"
  46533. }
  46534. },
  46535. data() {
  46536. return {
  46537. inputValue: 0
  46538. };
  46539. },
  46540. watch: {
  46541. value(val) {
  46542. this.inputValue = +val;
  46543. },
  46544. modelValue(val) {
  46545. this.inputValue = +val;
  46546. }
  46547. },
  46548. created() {
  46549. if (this.value === 1) {
  46550. this.inputValue = +this.modelValue;
  46551. }
  46552. if (this.modelValue === 1) {
  46553. this.inputValue = +this.value;
  46554. }
  46555. },
  46556. methods: {
  46557. _calcValue(type) {
  46558. if (this.disabled) {
  46559. return;
  46560. }
  46561. const scale = this._getDecimalScale();
  46562. let value = this.inputValue * scale;
  46563. let step = this.step * scale;
  46564. if (type === "minus") {
  46565. value -= step;
  46566. if (value < this.min * scale) {
  46567. return;
  46568. }
  46569. if (value > this.max * scale) {
  46570. value = this.max * scale;
  46571. }
  46572. }
  46573. if (type === "plus") {
  46574. value += step;
  46575. if (value > this.max * scale) {
  46576. return;
  46577. }
  46578. if (value < this.min * scale) {
  46579. value = this.min * scale;
  46580. }
  46581. }
  46582. this.inputValue = (value / scale).toFixed(String(scale).length - 1);
  46583. this.$emit("change", +this.inputValue);
  46584. this.$emit("input", +this.inputValue);
  46585. this.$emit("update:modelValue", +this.inputValue);
  46586. },
  46587. _getDecimalScale() {
  46588. let scale = 1;
  46589. if (~~this.step !== this.step) {
  46590. scale = Math.pow(10, String(this.step).split(".")[1].length);
  46591. }
  46592. return scale;
  46593. },
  46594. _onBlur(event) {
  46595. this.$emit("blur", event);
  46596. let value = event.detail.value;
  46597. if (!value) {
  46598. return;
  46599. }
  46600. value = +value;
  46601. if (value > this.max) {
  46602. value = this.max;
  46603. } else if (value < this.min) {
  46604. value = this.min;
  46605. }
  46606. const scale = this._getDecimalScale();
  46607. this.inputValue = value.toFixed(String(scale).length - 1);
  46608. this.$emit("change", +this.inputValue);
  46609. this.$emit("input", +this.inputValue);
  46610. },
  46611. _onFocus(event) {
  46612. this.$emit("focus", event);
  46613. }
  46614. }
  46615. };
  46616. function _sfc_render$20(_ctx, _cache, $props, $setup, $data, $options) {
  46617. return vue.openBlock(), vue.createElementBlock("view", { class: "uni-numbox" }, [
  46618. vue.createCommentVNode(` <view @click="_calcValue('minus')" class="uni-numbox__minus uni-numbox-btns" :style="{ background }"> `),
  46619. vue.createCommentVNode(` <text class="uni-numbox--text" :class="{ 'uni-numbox--disabled': inputValue <= min || disabled }"
  46620. :style="{ color }">
  46621. -
  46622. </text> `),
  46623. vue.createElementVNode(
  46624. "text",
  46625. {
  46626. class: vue.normalizeClass(["cicon-move-round", {
  46627. "uni-numbox--disabled": $data.inputValue <= $props.min || $props.disabled,
  46628. "groupon-btn": $props.activity === "groupon",
  46629. "seckill-btn": $props.activity === "seckill"
  46630. }]),
  46631. onClick: _cache[0] || (_cache[0] = ($event) => $options._calcValue("minus"))
  46632. },
  46633. null,
  46634. 2
  46635. /* CLASS */
  46636. ),
  46637. vue.createCommentVNode(" </view> "),
  46638. vue.withDirectives(vue.createElementVNode("input", {
  46639. disabled: $props.disabled,
  46640. onFocus: _cache[1] || (_cache[1] = (...args) => $options._onFocus && $options._onFocus(...args)),
  46641. onBlur: _cache[2] || (_cache[2] = (...args) => $options._onBlur && $options._onBlur(...args)),
  46642. class: "uni-numbox__value",
  46643. type: "number",
  46644. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.inputValue = $event),
  46645. style: vue.normalizeStyle({ color: $props.color })
  46646. }, null, 44, ["disabled"]), [
  46647. [vue.vModelText, $data.inputValue]
  46648. ]),
  46649. vue.createCommentVNode(` <view @click="_calcValue('plus')" class="uni-numbox__plus uni-numbox-btns">
  46650. <text class="uni-numbox--text" :class="{ 'uni-numbox--disabled': inputValue >= max || disabled }">+</text>
  46651. </view> `),
  46652. vue.createElementVNode(
  46653. "text",
  46654. {
  46655. class: vue.normalizeClass(["cicon-add-round", {
  46656. "uni-numbox--disabled": $data.inputValue >= $props.max || $props.disabled,
  46657. "groupon-btn": $props.activity === "groupon",
  46658. "seckill-btn": $props.activity === "seckill"
  46659. }]),
  46660. onClick: _cache[4] || (_cache[4] = ($event) => $options._calcValue("plus"))
  46661. },
  46662. null,
  46663. 2
  46664. /* CLASS */
  46665. )
  46666. ]);
  46667. }
  46668. const __easycom_0$b = /* @__PURE__ */ _export_sfc(_sfc_main$21, [["render", _sfc_render$20], ["__scopeId", "data-v-5212235c"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/ui/su-number-box/su-number-box.vue"]]);
  46669. const _sfc_main$20 = {
  46670. __name: "cart",
  46671. setup(__props, { expose: __expose }) {
  46672. __expose();
  46673. vue.useCssVars((_ctx) => ({
  46674. "c30a4c2b-sys_navBar": vue.unref(sys_navBar)
  46675. }));
  46676. const sys_navBar = sheep$1.$platform.navbar;
  46677. const cart2 = sheep$1.$store("cart");
  46678. const state = vue.reactive({
  46679. editMode: false,
  46680. list: vue.computed(() => cart2.list),
  46681. shopList: vue.computed(() => cart2.shopNameMap),
  46682. skuList: vue.computed(() => cart2.shopSkuMap),
  46683. selectedList: [],
  46684. selectedIds: vue.computed(() => cart2.selectedIds),
  46685. isAllSelected: vue.computed(() => cart2.isAllSelected),
  46686. totalPriceSelected: vue.computed(() => cart2.totalPriceSelected)
  46687. });
  46688. const processedValidList = vue.computed(() => {
  46689. const groups = {};
  46690. state.list.forEach((item) => {
  46691. const shopId = Object.keys(state.skuList).find((key) => state.skuList[key].includes(item.sku.id));
  46692. const shopName = state.shopList[shopId] || "未知店铺";
  46693. if (!groups[shopName]) {
  46694. groups[shopName] = [];
  46695. }
  46696. groups[shopName].push(item);
  46697. });
  46698. return groups;
  46699. });
  46700. function onSelectSingle(id) {
  46701. formatAppLog("log", "at pages/index/cart.vue:129", "单选");
  46702. cart2.selectSingle(id);
  46703. }
  46704. function onSelectAll() {
  46705. cart2.selectAll(!state.isAllSelected);
  46706. }
  46707. function onConfirm() {
  46708. let items = [];
  46709. let goods_list = [];
  46710. state.selectedList = state.list.filter((item) => state.selectedIds.includes(item.id));
  46711. state.selectedList.map((item) => {
  46712. items.push({
  46713. skuId: item.sku.id,
  46714. count: item.count,
  46715. cartId: item.id
  46716. });
  46717. goods_list.push({
  46718. // goods_id: item.goods_id,
  46719. goods_id: item.spu.id,
  46720. // goods_num: item.goods_num,
  46721. goods_num: item.count
  46722. // 商品价格id真没有
  46723. // goods_sku_price_id: item.goods_sku_price_id,
  46724. });
  46725. });
  46726. if (goods_list.length === 0) {
  46727. sheep$1.$helper.toast("请选择商品");
  46728. return;
  46729. }
  46730. sheep$1.$router.go("/pages/order/confirm", {
  46731. data: JSON.stringify({
  46732. // order_type: 'goods',
  46733. // goods_list,
  46734. items,
  46735. // from: 'cart',
  46736. pointStatus: false,
  46737. // 从购物车这里提交订单的 一定是实体商品和用人民币买的 所以可以直接写死
  46738. deliveryType: 1,
  46739. spuPayType: 1,
  46740. spuType: 1
  46741. })
  46742. });
  46743. }
  46744. function onNumberChange(e2, cartItem) {
  46745. if (e2 === 0) {
  46746. cart2.delete(cartItem.id);
  46747. return;
  46748. }
  46749. if (cartItem.goods_num === e2)
  46750. return;
  46751. cartItem.goods_num = e2;
  46752. cart2.update({
  46753. goods_id: cartItem.id,
  46754. goods_num: e2,
  46755. goods_sku_price_id: cartItem.goods_sku_price_id
  46756. });
  46757. }
  46758. async function onDelete() {
  46759. cart2.delete(state.selectedIds);
  46760. }
  46761. const __returned__ = { sys_navBar, cart: cart2, state, processedValidList, onSelectSingle, onSelectAll, onConfirm, onNumberChange, onDelete, get sheep() {
  46762. return sheep$1;
  46763. }, computed: vue.computed, reactive: vue.reactive, unref: vue.unref, get fen2yuan() {
  46764. return fen2yuan;
  46765. } };
  46766. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  46767. return __returned__;
  46768. }
  46769. };
  46770. function _sfc_render$1$(_ctx, _cache, $props, $setup, $data, $options) {
  46771. const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6);
  46772. const _component_su_number_box = resolveEasycom(vue.resolveDynamicComponent("su-number-box"), __easycom_0$b);
  46773. const _component_s_goods_item = resolveEasycom(vue.resolveDynamicComponent("s-goods-item"), __easycom_3$5);
  46774. const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9);
  46775. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  46776. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  46777. title: _ctx.$t("common.cart"),
  46778. tabbar: "/pages/index/cart",
  46779. bgStyle: { color: "#fff" }
  46780. }, {
  46781. default: vue.withCtx(() => [
  46782. $setup.state.list.length === 0 ? (vue.openBlock(), vue.createBlock(_component_s_empty, {
  46783. key: 0,
  46784. text: _ctx.$t("common.empty_cart"),
  46785. icon: "/static/cart-empty.png"
  46786. }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true),
  46787. vue.createCommentVNode(" 头部 "),
  46788. $setup.state.list.length ? (vue.openBlock(), vue.createElementBlock("view", {
  46789. key: 1,
  46790. class: "cart-box ss-flex ss-flex-col ss-row-between"
  46791. }, [
  46792. vue.createElementVNode("view", { class: "cart-header ss-flex ss-col-center ss-row-between ss-p-x-30" }, [
  46793. vue.createElementVNode("view", { class: "header-left ss-flex ss-col-center ss-font-26" }, [
  46794. vue.createElementVNode(
  46795. "text",
  46796. { class: "goods-number ui-TC-Main ss-flex" },
  46797. vue.toDisplayString(_ctx.$t("common.total_goods", { number: $setup.state.list.length })),
  46798. 1
  46799. /* TEXT */
  46800. )
  46801. ]),
  46802. vue.createElementVNode("view", { class: "header-right" }, [
  46803. $setup.state.editMode ? (vue.openBlock(), vue.createElementBlock(
  46804. "button",
  46805. {
  46806. key: 0,
  46807. class: "ss-reset-button",
  46808. onClick: _cache[0] || (_cache[0] = ($event) => $setup.state.editMode = false)
  46809. },
  46810. vue.toDisplayString(_ctx.$t("common.cancel")),
  46811. 1
  46812. /* TEXT */
  46813. )) : (vue.openBlock(), vue.createElementBlock(
  46814. "button",
  46815. {
  46816. key: 1,
  46817. class: "ss-reset-button ui-TC-Main",
  46818. onClick: _cache[1] || (_cache[1] = ($event) => $setup.state.editMode = true)
  46819. },
  46820. vue.toDisplayString(_ctx.$t("common.edit")),
  46821. 1
  46822. /* TEXT */
  46823. ))
  46824. ])
  46825. ]),
  46826. vue.createElementVNode("view", { class: "ss-m-t-70" }),
  46827. vue.createCommentVNode(" 内容 "),
  46828. (vue.openBlock(true), vue.createElementBlock(
  46829. vue.Fragment,
  46830. null,
  46831. vue.renderList($setup.processedValidList, (shopItems, shopName, index2) => {
  46832. return vue.openBlock(), vue.createElementBlock("view", {
  46833. class: "cart-content ss-flex-1 ss-p-x-30",
  46834. key: shopName
  46835. }, [
  46836. vue.createElementVNode("view", { class: "ss-m-b-14 bg-white goods-box" }, [
  46837. vue.createElementVNode("view", { class: "title-text ss-p-x-10 ss-p-t-20 ss-flex ss-col-center" }, [
  46838. vue.createCommentVNode(' <label class="check-box ss-flex ss-col-center" @tap="onSelectSingle()">\n <radio color="var(--ui-BG-Main)" style="transform: scale(0.8)" />\n </label> '),
  46839. vue.createElementVNode(
  46840. "text",
  46841. { class: "ss-m-l-10" },
  46842. vue.toDisplayString(shopName),
  46843. 1
  46844. /* TEXT */
  46845. )
  46846. ]),
  46847. vue.createCommentVNode(" 注意这里v-for的对象是shopItems "),
  46848. (vue.openBlock(true), vue.createElementBlock(
  46849. vue.Fragment,
  46850. null,
  46851. vue.renderList(shopItems, (product, productIndex) => {
  46852. return vue.openBlock(), vue.createElementBlock("view", {
  46853. class: "ss-r-10",
  46854. key: product.id
  46855. }, [
  46856. vue.createElementVNode("view", { class: "ss-flex ss-col-center" }, [
  46857. vue.createElementVNode("label", {
  46858. class: "check-box ss-flex ss-col-center ss-p-l-10",
  46859. onClick: ($event) => $setup.onSelectSingle(product.id)
  46860. }, [
  46861. vue.createElementVNode("radio", {
  46862. checked: $setup.state.selectedIds.includes(product.id),
  46863. color: "var(--ui-BG-Main)",
  46864. style: { "transform": "scale(0.8)" },
  46865. onClick: vue.withModifiers(($event) => $setup.onSelectSingle(product.id), ["stop"])
  46866. }, null, 8, ["checked", "onClick"])
  46867. ], 8, ["onClick"]),
  46868. vue.createVNode(_component_s_goods_item, {
  46869. title: product.spu.name,
  46870. img: product.spu.picUrl || product.goods.image,
  46871. price: product.sku.price,
  46872. skuText: product.sku.properties.length > 1 ? product.sku.properties.reduce((items2, items) => items2.valueName + " " + items.valueName) : product.sku.properties[0].valueName,
  46873. priceColor: "#FF3000",
  46874. titleWidth: 400
  46875. }, vue.createSlots({
  46876. _: 2
  46877. /* DYNAMIC */
  46878. }, [
  46879. !$setup.state.editMode ? {
  46880. name: "tool",
  46881. fn: vue.withCtx(() => [
  46882. vue.createVNode(_component_su_number_box, {
  46883. min: 0,
  46884. max: product.sku.stock,
  46885. step: 1,
  46886. modelValue: product.count,
  46887. "onUpdate:modelValue": ($event) => product.count = $event,
  46888. onChange: ($event) => $setup.onNumberChange($event, product)
  46889. }, null, 8, ["max", "modelValue", "onUpdate:modelValue", "onChange"])
  46890. ]),
  46891. key: "0"
  46892. } : void 0
  46893. ]), 1032, ["title", "img", "price", "skuText"])
  46894. ])
  46895. ]);
  46896. }),
  46897. 128
  46898. /* KEYED_FRAGMENT */
  46899. ))
  46900. ])
  46901. ]);
  46902. }),
  46903. 128
  46904. /* KEYED_FRAGMENT */
  46905. )),
  46906. vue.createCommentVNode(" 底部 "),
  46907. $setup.state.list.length > 0 ? (vue.openBlock(), vue.createBlock(_component_su_fixed, {
  46908. key: 0,
  46909. bottom: "",
  46910. val: 48,
  46911. placeholder: "",
  46912. isInset: false
  46913. }, {
  46914. default: vue.withCtx(() => {
  46915. var _a2;
  46916. return [
  46917. vue.createElementVNode("view", { class: "cart-footer ss-flex ss-col-center ss-row-between ss-p-x-30 border-bottom" }, [
  46918. vue.createElementVNode("view", { class: "footer-left ss-flex ss-col-center" }, [
  46919. vue.createElementVNode("label", {
  46920. class: "check-box ss-flex ss-col-center ss-p-r-30",
  46921. onClick: $setup.onSelectAll
  46922. }, [
  46923. vue.createElementVNode("radio", {
  46924. checked: $setup.state.isAllSelected,
  46925. color: "var(--ui-BG-Main)",
  46926. style: { "transform": "scale(0.8)" },
  46927. onClick: vue.withModifiers($setup.onSelectAll, ["stop"])
  46928. }, null, 8, ["checked"]),
  46929. vue.createElementVNode(
  46930. "view",
  46931. { class: "ss-m-l-8" },
  46932. vue.toDisplayString(_ctx.$t("common.all")),
  46933. 1
  46934. /* TEXT */
  46935. )
  46936. ]),
  46937. vue.createElementVNode(
  46938. "text",
  46939. null,
  46940. vue.toDisplayString(_ctx.$t("common.total")) + ":",
  46941. 1
  46942. /* TEXT */
  46943. ),
  46944. vue.createElementVNode(
  46945. "view",
  46946. { class: "text-price price-text" },
  46947. vue.toDisplayString($setup.fen2yuan($setup.state.totalPriceSelected)),
  46948. 1
  46949. /* TEXT */
  46950. )
  46951. ]),
  46952. vue.createElementVNode("view", { class: "footer-right" }, [
  46953. $setup.state.editMode ? (vue.openBlock(), vue.createElementBlock(
  46954. "button",
  46955. {
  46956. key: 0,
  46957. class: "ss-reset-button ui-BG-Main-Gradient pay-btn ui-Shadow-Main",
  46958. onClick: $setup.onDelete
  46959. },
  46960. vue.toDisplayString(_ctx.$t("common.delete")),
  46961. 1
  46962. /* TEXT */
  46963. )) : (vue.openBlock(), vue.createElementBlock(
  46964. "button",
  46965. {
  46966. key: 1,
  46967. class: "ss-reset-button ui-BG-Main-Gradient pay-btn ui-Shadow-Main",
  46968. onClick: $setup.onConfirm
  46969. },
  46970. vue.toDisplayString(_ctx.$t("common.checkout")) + " " + vue.toDisplayString(((_a2 = $setup.state.selectedIds) == null ? void 0 : _a2.length) ? `(${$setup.state.selectedIds.length})` : ""),
  46971. 1
  46972. /* TEXT */
  46973. ))
  46974. ])
  46975. ])
  46976. ];
  46977. }),
  46978. _: 1
  46979. /* STABLE */
  46980. })) : vue.createCommentVNode("v-if", true)
  46981. ])) : vue.createCommentVNode("v-if", true)
  46982. ]),
  46983. _: 1
  46984. /* STABLE */
  46985. }, 8, ["title"]);
  46986. }
  46987. const PagesIndexCart = /* @__PURE__ */ _export_sfc(_sfc_main$20, [["render", _sfc_render$1$], ["__scopeId", "data-v-c30a4c2b"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/index/cart.vue"]]);
  46988. const _sfc_main$1$ = {
  46989. __name: "login",
  46990. setup(__props, { expose: __expose }) {
  46991. __expose();
  46992. const mobileInput = (mobile2, mobileError) => {
  46993. state.model.mobile = mobile2;
  46994. state.mobileErrorMsg = mobileError;
  46995. };
  46996. const state = vue.reactive({
  46997. verifyUsername: false,
  46998. usernameErrorMsg: "",
  46999. mobileErrorMsg: "",
  47000. openid: "",
  47001. socialUsers: [],
  47002. registerReqVO: {
  47003. type: 31,
  47004. code: "",
  47005. state: "",
  47006. username: ""
  47007. },
  47008. isMobileEnd: false,
  47009. // 手机号输入完毕
  47010. codeText: "获取验证码",
  47011. model: {
  47012. mobile: "",
  47013. // 手机号
  47014. code: "",
  47015. // 验证码
  47016. scene: 1
  47017. },
  47018. rules: {
  47019. code,
  47020. mobile
  47021. }
  47022. });
  47023. const isPopup = vue.ref(false);
  47024. const selectSocialUsers = vue.ref(false);
  47025. function updateIsPopup() {
  47026. isPopup.value = true;
  47027. }
  47028. function updateSocialUsers(openid, socialUsers) {
  47029. selectSocialUsers.value = true;
  47030. state.openid = openid;
  47031. state.socialUsers = socialUsers;
  47032. formatAppLog("log", "at pages/index/login.vue:138", "updateSocialUsers条用了,这时state.socialUsers是", state.socialUsers);
  47033. }
  47034. function locationReplace(url2) {
  47035. if (history.replaceState) {
  47036. history.replaceState(null, document.title, url2);
  47037. history.go(0);
  47038. } else {
  47039. location.replace(url2);
  47040. }
  47041. }
  47042. async function selectUser(username2) {
  47043. formatAppLog("log", "at pages/index/login.vue:150", username2);
  47044. const {
  47045. code: code2
  47046. } = await AuthUtil.selectUsernameLogin({
  47047. openId: state.openid,
  47048. username: username2
  47049. });
  47050. if (code2 === 0) {
  47051. let returnUrl = uni.getStorageSync("returnUrl");
  47052. if (returnUrl) {
  47053. formatAppLog("log", "at pages/index/login.vue:163", returnUrl);
  47054. uni.removeStorage("returnUrl");
  47055. locationReplace(returnUrl);
  47056. } else {
  47057. uni.switchTab({
  47058. url: "/"
  47059. });
  47060. }
  47061. }
  47062. }
  47063. let lastUsername = vue.ref("");
  47064. async function verifyUsername(e2) {
  47065. const username2 = e2.detail.value;
  47066. if (username2 == "" || username2 == lastUsername.value) {
  47067. return false;
  47068. }
  47069. lastUsername.value = username2;
  47070. const {
  47071. data
  47072. } = await AuthUtil.verifyUsername(username2);
  47073. formatAppLog("log", "at pages/index/login.vue:186", data);
  47074. if (data) {
  47075. state.usernameErrorMsg = "";
  47076. state.verifyUsername = data;
  47077. } else {
  47078. state.usernameErrorMsg = t$6("account.username_exists");
  47079. state.verifyUsername = data;
  47080. }
  47081. }
  47082. async function officialRegister() {
  47083. const linkId = uni.getStorageSync("linkId");
  47084. state.registerReqVO.linkId = linkId;
  47085. const {
  47086. code: code2
  47087. } = await AuthUtil.OfficialEnterLogin(state.model, state.registerReqVO);
  47088. if (code2 === 0) {
  47089. closeAuthModal();
  47090. let returnUrl = uni.getStorageSync("returnUrl");
  47091. if (returnUrl) {
  47092. uni.removeStorage("returnUrl");
  47093. locationReplace(returnUrl);
  47094. } else {
  47095. uni.switchTab({
  47096. url: "/"
  47097. });
  47098. }
  47099. }
  47100. }
  47101. vue.onBeforeMount(async () => {
  47102. const options2 = {};
  47103. new URLSearchParams(location.search).forEach((value, key) => {
  47104. options2[key] = value;
  47105. });
  47106. state.registerReqVO.code = options2.code;
  47107. state.registerReqVO.state = options2.state;
  47108. });
  47109. onLoad(async (options2) => {
  47110. });
  47111. const __returned__ = { mobileInput, state, isPopup, selectSocialUsers, updateIsPopup, updateSocialUsers, locationReplace, selectUser, get lastUsername() {
  47112. return lastUsername;
  47113. }, set lastUsername(v2) {
  47114. lastUsername = v2;
  47115. }, verifyUsername, officialRegister, ref: vue.ref, reactive: vue.reactive, unref: vue.unref, computed: vue.computed, onBeforeMount: vue.onBeforeMount, get sheep() {
  47116. return sheep$1;
  47117. }, get onLoad() {
  47118. return onLoad;
  47119. }, get showAuthModal() {
  47120. return showAuthModal;
  47121. }, get closeAuthModal() {
  47122. return closeAuthModal;
  47123. }, get getSmsCode() {
  47124. return getSmsCode;
  47125. }, get getSmsTimer() {
  47126. return getSmsTimer;
  47127. }, get code() {
  47128. return code;
  47129. }, get mobile() {
  47130. return mobile;
  47131. }, get AuthUtil() {
  47132. return AuthUtil;
  47133. }, phoneInternationalInput, get t() {
  47134. return t$6;
  47135. } };
  47136. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  47137. return __returned__;
  47138. }
  47139. };
  47140. function _sfc_render$1_(_ctx, _cache, $props, $setup, $data, $options) {
  47141. const _component_su_popup = resolveEasycom(vue.resolveDynamicComponent("su-popup"), __easycom_4$3);
  47142. const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l);
  47143. const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9);
  47144. const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7);
  47145. return vue.openBlock(), vue.createElementBlock(
  47146. vue.Fragment,
  47147. null,
  47148. [
  47149. vue.createElementVNode("view"),
  47150. vue.createVNode(_component_su_popup, {
  47151. show: $setup.selectSocialUsers,
  47152. type: "center",
  47153. round: "10",
  47154. isMaskClick: false
  47155. }, {
  47156. default: vue.withCtx(() => [
  47157. vue.createElementVNode("view", { class: "head-nav" }, [
  47158. vue.createElementVNode("view", { class: "head-box" }, [
  47159. vue.createElementVNode("view", { class: "ss-flex ss-m-b-20" }, [
  47160. vue.createElementVNode(
  47161. "view",
  47162. { class: "isActive head-title" },
  47163. vue.toDisplayString($setup.t("account.select_account_login")),
  47164. 1
  47165. /* TEXT */
  47166. )
  47167. ])
  47168. ])
  47169. ]),
  47170. vue.createElementVNode("view", null, [
  47171. vue.createElementVNode("scroll-view", {
  47172. class: "side-menu-wrap",
  47173. "scroll-y": "",
  47174. style: { "height": "600rpx" }
  47175. }, [
  47176. (vue.openBlock(true), vue.createElementBlock(
  47177. vue.Fragment,
  47178. null,
  47179. vue.renderList($setup.state.socialUsers, (user2) => {
  47180. return vue.openBlock(), vue.createElementBlock("view", {
  47181. key: user2.username,
  47182. class: "ss-flex",
  47183. style: { "padding": "20rpx", "margin": "0 auto", "width": "520rpx" },
  47184. onClick: ($event) => $setup.selectUser(user2.username)
  47185. }, [
  47186. vue.createElementVNode("image", {
  47187. src: user2.avatar,
  47188. style: { "width": "100rpx", "height": "100rpx", "border-radius": "50%", "margin-right": "20rpx" }
  47189. }, null, 8, ["src"]),
  47190. vue.createElementVNode(
  47191. "view",
  47192. null,
  47193. vue.toDisplayString(user2.username),
  47194. 1
  47195. /* TEXT */
  47196. )
  47197. ], 8, ["onClick"]);
  47198. }),
  47199. 128
  47200. /* KEYED_FRAGMENT */
  47201. )),
  47202. !$setup.state.socialUsers.length ? (vue.openBlock(), vue.createElementBlock(
  47203. "view",
  47204. {
  47205. key: 0,
  47206. style: { "padding": "20rpx", "width": "520rpx", "text-align": "center", "margin-top": "100rpx" }
  47207. },
  47208. vue.toDisplayString($setup.t("account.wechat_no_bind")),
  47209. 1
  47210. /* TEXT */
  47211. )) : vue.createCommentVNode("v-if", true)
  47212. ])
  47213. ])
  47214. ]),
  47215. _: 1
  47216. /* STABLE */
  47217. }, 8, ["show"]),
  47218. vue.createVNode(_component_su_popup, {
  47219. show: $setup.isPopup,
  47220. round: "10",
  47221. isMaskClick: false
  47222. }, {
  47223. default: vue.withCtx(() => [
  47224. vue.createElementVNode("view", null, [
  47225. vue.createElementVNode("view", { class: "head-box" }, [
  47226. vue.createElementVNode("view", { class: "ss-flex ss-m-b-20" }, [
  47227. vue.createElementVNode(
  47228. "view",
  47229. { class: "isActive head-title" },
  47230. vue.toDisplayString($setup.t("account.wechat_register")),
  47231. 1
  47232. /* TEXT */
  47233. )
  47234. ])
  47235. ]),
  47236. vue.createCommentVNode(" 表单项 "),
  47237. vue.createVNode(_component_uni_forms, {
  47238. modelValue: $setup.state.model,
  47239. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.model = $event),
  47240. rules: $setup.state.rules,
  47241. validateTrigger: "bind",
  47242. labelWidth: "140",
  47243. labelAlign: "center",
  47244. class: "loginUniForm"
  47245. }, {
  47246. default: vue.withCtx(() => [
  47247. vue.createVNode(_component_uni_forms_item, {
  47248. name: "username",
  47249. label: $setup.t("account.username"),
  47250. class: "loginUniFormItem",
  47251. "error-message": $setup.state.usernameErrorMsg
  47252. }, {
  47253. default: vue.withCtx(() => [
  47254. vue.createVNode(_component_uni_easyinput, {
  47255. placeholder: $setup.t("account.enter_username"),
  47256. modelValue: $setup.state.registerReqVO.username,
  47257. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.state.registerReqVO.username = $event),
  47258. inputBorder: false,
  47259. clearable: false,
  47260. onBlur: $setup.verifyUsername
  47261. }, {
  47262. right: vue.withCtx(() => [
  47263. !$setup.state.verifyUsername ? (vue.openBlock(), vue.createElementBlock("view", {
  47264. key: 0,
  47265. class: "icon"
  47266. }, [
  47267. vue.createElementVNode("image", {
  47268. style: "",
  47269. src: $setup.sheep.$url.static("/static/images/shibai.png")
  47270. }, null, 8, ["src"])
  47271. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  47272. key: 1,
  47273. class: "icon"
  47274. }, [
  47275. vue.createElementVNode("image", {
  47276. src: $setup.sheep.$url.static("/static/images/chenggong.png")
  47277. }, null, 8, ["src"])
  47278. ]))
  47279. ]),
  47280. _: 1
  47281. /* STABLE */
  47282. }, 8, ["placeholder", "modelValue"])
  47283. ]),
  47284. _: 1
  47285. /* STABLE */
  47286. }, 8, ["label", "error-message"]),
  47287. vue.createVNode(_component_uni_forms_item, {
  47288. name: "mobile",
  47289. label: $setup.t("account.phone_number"),
  47290. class: "mobile loginUniFormItem ss-p-t-10",
  47291. "error-message": $setup.state.mobileErrorMsg
  47292. }, {
  47293. default: vue.withCtx(() => [
  47294. vue.createVNode($setup["phoneInternationalInput"], {
  47295. "verify-username": $setup.state.verifyUsername,
  47296. onInput: $setup.mobileInput
  47297. }, null, 8, ["verify-username"])
  47298. ]),
  47299. _: 1
  47300. /* STABLE */
  47301. }, 8, ["label", "error-message"]),
  47302. vue.createVNode(_component_uni_forms_item, {
  47303. name: "code",
  47304. label: $setup.t("account.verification_code"),
  47305. class: "loginUniFormItem"
  47306. }, {
  47307. default: vue.withCtx(() => [
  47308. vue.createVNode(_component_uni_easyinput, {
  47309. placeholder: $setup.t("account.enter_verification_code"),
  47310. modelValue: $setup.state.model.code,
  47311. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.model.code = $event),
  47312. inputBorder: false,
  47313. type: "number",
  47314. maxlength: "4"
  47315. }, null, 8, ["placeholder", "modelValue"])
  47316. ]),
  47317. _: 1
  47318. /* STABLE */
  47319. }, 8, ["label"])
  47320. ]),
  47321. _: 1
  47322. /* STABLE */
  47323. }, 8, ["modelValue", "rules"]),
  47324. vue.createElementVNode("view", { style: { "display": "flex", "justify-content": "space-between", "padding": "40rpx", "padding-bottom": "40rpx" } }, [
  47325. vue.createElementVNode(
  47326. "button",
  47327. {
  47328. class: "ss-reset-button login-btn-start",
  47329. onClick: $setup.officialRegister
  47330. },
  47331. vue.toDisplayString($setup.t("account.register")),
  47332. 1
  47333. /* TEXT */
  47334. )
  47335. ])
  47336. ])
  47337. ]),
  47338. _: 1
  47339. /* STABLE */
  47340. }, 8, ["show"])
  47341. ],
  47342. 64
  47343. /* STABLE_FRAGMENT */
  47344. );
  47345. }
  47346. const PagesIndexLogin = /* @__PURE__ */ _export_sfc(_sfc_main$1$, [["render", _sfc_render$1_], ["__scopeId", "data-v-fa14255b"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/index/login.vue"]]);
  47347. const _sfc_main$1_ = {
  47348. __name: "search",
  47349. setup(__props, { expose: __expose }) {
  47350. __expose();
  47351. const state = vue.reactive({
  47352. historyList: []
  47353. });
  47354. function onSearch(keyword) {
  47355. if (!keyword) {
  47356. return;
  47357. }
  47358. saveSearchHistory(keyword);
  47359. sheep$1.$router.go("/pages/goods/list", { keyword });
  47360. }
  47361. function saveSearchHistory(keyword) {
  47362. if (state.historyList.includes(keyword)) {
  47363. state.historyList.splice(state.historyList.indexOf(keyword), 1);
  47364. }
  47365. state.historyList.unshift(keyword);
  47366. if (state.historyList.length >= 10) {
  47367. state.historyList.length = 10;
  47368. }
  47369. uni.setStorageSync("searchHistory", state.historyList);
  47370. }
  47371. function onDelete() {
  47372. uni.showModal({
  47373. title: "提示",
  47374. content: "确认清除搜索历史吗?",
  47375. success: function(res) {
  47376. if (res.confirm) {
  47377. state.historyTag = [];
  47378. uni.removeStorageSync("searchHistory");
  47379. }
  47380. }
  47381. });
  47382. }
  47383. onLoad(() => {
  47384. state.historyList = uni.getStorageSync("searchHistory") || [];
  47385. });
  47386. const __returned__ = { state, onSearch, saveSearchHistory, onDelete, reactive: vue.reactive, get sheep() {
  47387. return sheep$1;
  47388. }, get onLoad() {
  47389. return onLoad;
  47390. } };
  47391. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  47392. return __returned__;
  47393. }
  47394. };
  47395. function _sfc_render$1Z(_ctx, _cache, $props, $setup, $data, $options) {
  47396. const _component_uni_search_bar = resolveEasycom(vue.resolveDynamicComponent("uni-search-bar"), __easycom_0$p);
  47397. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  47398. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  47399. class: "set-wrap",
  47400. title: "搜索",
  47401. bgStyle: { color: "#FFF" }
  47402. }, {
  47403. default: vue.withCtx(() => [
  47404. vue.createElementVNode("view", { class: "ss-p-x-24" }, [
  47405. vue.createElementVNode("view", { class: "ss-flex ss-col-center" }, [
  47406. vue.createVNode(_component_uni_search_bar, {
  47407. class: "ss-flex-1",
  47408. radius: "33",
  47409. placeholder: "请输入关键字",
  47410. cancelButton: "none",
  47411. focus: true,
  47412. onConfirm: _cache[0] || (_cache[0] = ($event) => $setup.onSearch($event.value))
  47413. })
  47414. ]),
  47415. vue.createElementVNode("view", { class: "ss-flex ss-row-between ss-col-center" }, [
  47416. vue.createElementVNode("view", { class: "serach-history" }, "搜索历史"),
  47417. vue.createElementVNode("button", {
  47418. class: "clean-history ss-reset-button",
  47419. onClick: $setup.onDelete
  47420. }, " 清除搜索历史 ")
  47421. ]),
  47422. vue.createElementVNode("view", { class: "ss-flex ss-col-center ss-row-left ss-flex-wrap" }, [
  47423. (vue.openBlock(true), vue.createElementBlock(
  47424. vue.Fragment,
  47425. null,
  47426. vue.renderList($setup.state.historyList, (item, index2) => {
  47427. return vue.openBlock(), vue.createElementBlock("button", {
  47428. class: "history-btn ss-reset-button",
  47429. onClick: ($event) => $setup.onSearch(item),
  47430. key: index2
  47431. }, vue.toDisplayString(item), 9, ["onClick"]);
  47432. }),
  47433. 128
  47434. /* KEYED_FRAGMENT */
  47435. ))
  47436. ])
  47437. ])
  47438. ]),
  47439. _: 1
  47440. /* STABLE */
  47441. });
  47442. }
  47443. const PagesIndexSearch = /* @__PURE__ */ _export_sfc(_sfc_main$1_, [["render", _sfc_render$1Z], ["__scopeId", "data-v-5aac7367"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/index/search.vue"]]);
  47444. const _sfc_main$1Z = {
  47445. __name: "page",
  47446. setup(__props, { expose: __expose }) {
  47447. __expose();
  47448. const state = vue.reactive({
  47449. name: "",
  47450. components: [],
  47451. navigationBar: {},
  47452. page: {}
  47453. });
  47454. onLoad(async (options2) => {
  47455. var _a2, _b2, _c;
  47456. let id = options2.id;
  47457. const { code: code2, data } = await DiyApi.getDiyPage(id);
  47458. if (code2 === 0) {
  47459. state.name = data.name;
  47460. state.components = (_a2 = data.property) == null ? void 0 : _a2.components;
  47461. state.navigationBar = (_b2 = data.property) == null ? void 0 : _b2.navigationBar;
  47462. state.page = (_c = data.property) == null ? void 0 : _c.page;
  47463. }
  47464. });
  47465. onPageScroll(() => {
  47466. });
  47467. const __returned__ = { state, reactive: vue.reactive, get onLoad() {
  47468. return onLoad;
  47469. }, get onPageScroll() {
  47470. return onPageScroll;
  47471. }, get DiyApi() {
  47472. return DiyApi;
  47473. } };
  47474. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  47475. return __returned__;
  47476. }
  47477. };
  47478. function _sfc_render$1Y(_ctx, _cache, $props, $setup, $data, $options) {
  47479. const _component_s_block_item = resolveEasycom(vue.resolveDynamicComponent("s-block-item"), __easycom_1$3);
  47480. const _component_s_block = resolveEasycom(vue.resolveDynamicComponent("s-block"), __easycom_2$3);
  47481. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  47482. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  47483. title: $setup.state.name,
  47484. navbar: "custom",
  47485. bgStyle: $setup.state.page,
  47486. navbarStyle: $setup.state.navigationBar,
  47487. onShareAppMessage: "",
  47488. showLeftButton: ""
  47489. }, {
  47490. default: vue.withCtx(() => [
  47491. (vue.openBlock(true), vue.createElementBlock(
  47492. vue.Fragment,
  47493. null,
  47494. vue.renderList($setup.state.components, (item, index2) => {
  47495. return vue.openBlock(), vue.createBlock(_component_s_block, {
  47496. key: index2,
  47497. styles: item.property.style
  47498. }, {
  47499. default: vue.withCtx(() => [
  47500. vue.createVNode(_component_s_block_item, {
  47501. type: item.id,
  47502. data: item.property,
  47503. styles: item.property.style
  47504. }, null, 8, ["type", "data", "styles"])
  47505. ]),
  47506. _: 2
  47507. /* DYNAMIC */
  47508. }, 1032, ["styles"]);
  47509. }),
  47510. 128
  47511. /* KEYED_FRAGMENT */
  47512. ))
  47513. ]),
  47514. _: 1
  47515. /* STABLE */
  47516. }, 8, ["title", "bgStyle", "navbarStyle"]);
  47517. }
  47518. const PagesIndexPage = /* @__PURE__ */ _export_sfc(_sfc_main$1Z, [["render", _sfc_render$1Y], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/index/page.vue"]]);
  47519. const _sfc_main$1Y = {
  47520. __name: "s-select-sku",
  47521. props: {
  47522. goodsInfo: {
  47523. type: Object,
  47524. default() {
  47525. }
  47526. },
  47527. show: {
  47528. type: Boolean,
  47529. default: false
  47530. }
  47531. },
  47532. emits: ["change", "addCart", "buy", "close"],
  47533. setup(__props, { expose: __expose, emit: __emit }) {
  47534. __expose();
  47535. const emits = __emit;
  47536. const props = __props;
  47537. const userWallet = vue.computed(() => sheep$1.$store("user").userWallet);
  47538. const state = vue.reactive({
  47539. selectedSku: {},
  47540. // 选中的 SKU
  47541. currentPropertyArray: []
  47542. // 当前选中的属性,实际是个 Map。key 是 property 编号,value 是 value 编号
  47543. });
  47544. const propertyList = convertProductPropertyList(props.goodsInfo.skus);
  47545. const skuList = vue.computed(() => {
  47546. let skuPrices = props.goodsInfo.skus;
  47547. for (let price of skuPrices) {
  47548. price.value_id_array = price.properties.map((item) => item.valueId);
  47549. }
  47550. return skuPrices;
  47551. });
  47552. function calcNums() {
  47553. if (props.goodsInfo.highPrecision) {
  47554. state.selectedSku.goods_num = parseInt(state.selectedSku.use_points / (state.selectedSku.highPrecisionPrice / 100));
  47555. } else {
  47556. state.selectedSku.goods_num = parseInt(state.selectedSku.use_points / fen2yuan(state.selectedSku.price));
  47557. }
  47558. }
  47559. async function useAllPonints() {
  47560. const { code: code2, data } = await PayWalletApi.getDuserInfo();
  47561. const userCanUsePoints = parseFloat(points2point(data.integralDO.currentQuota));
  47562. formatAppLog("log", "at sheep/components/s-select-sku/s-select-sku.vue:169", userCanUsePoints);
  47563. state.selectedSku.use_points = parseInt(userCanUsePoints);
  47564. calcNums();
  47565. }
  47566. function inputPoints(e2) {
  47567. const points = e2.detail.value;
  47568. formatAppLog("log", "at sheep/components/s-select-sku/s-select-sku.vue:175", typeof points);
  47569. if (points == "") {
  47570. return false;
  47571. }
  47572. const userCanUsePoints = parseFloat(points2point(userWallet.value.integralDO.currentQuota));
  47573. calcNums();
  47574. vue.nextTick(() => {
  47575. state.selectedSku.use_points = parseInt(points);
  47576. calcNums();
  47577. });
  47578. if (points <= 0) {
  47579. sheep$1.$helper.toast(t$6("selectSku.min_points_required"));
  47580. if (userCanUsePoints >= 1) {
  47581. vue.nextTick(() => {
  47582. state.selectedSku.use_points = 1;
  47583. calcNums();
  47584. });
  47585. } else {
  47586. vue.nextTick(() => {
  47587. state.selectedSku.use_points = 0;
  47588. calcNums();
  47589. });
  47590. }
  47591. }
  47592. if (points > userCanUsePoints) {
  47593. sheep$1.$helper.toast(t$6("selectSku.insufficient_points"));
  47594. vue.nextTick(() => {
  47595. state.selectedSku.use_points = parseInt(userCanUsePoints);
  47596. calcNums();
  47597. });
  47598. }
  47599. }
  47600. vue.watch(
  47601. () => state.selectedSku,
  47602. (newVal) => {
  47603. emits("change", newVal);
  47604. },
  47605. {
  47606. immediate: true,
  47607. // 立即执行
  47608. deep: true
  47609. // 深度监听
  47610. }
  47611. );
  47612. function onNumberChange(e2) {
  47613. if (e2 === 0)
  47614. return;
  47615. if (state.selectedSku.goods_num === e2)
  47616. return;
  47617. state.selectedSku.goods_num = e2;
  47618. }
  47619. function onAddCart() {
  47620. if (state.selectedSku.id <= 0) {
  47621. sheep$1.$helper.toast(t$6("selectSku.select_specification"));
  47622. return;
  47623. }
  47624. if (state.selectedSku.stock <= 0) {
  47625. sheep$1.$helper.toast(t$6("selectSku.insufficient_stock"));
  47626. return;
  47627. }
  47628. emits("addCart", state.selectedSku);
  47629. }
  47630. async function onBuy() {
  47631. if (props.goodsInfo.spuPayType == 2) {
  47632. const { code: code2, data } = await PayWalletApi.getDuserInfo();
  47633. const userCanUsePoints = parseFloat(points2point(data.integralDO.currentQuota));
  47634. if (userCanUsePoints < state.selectedSku.use_points) {
  47635. sheep$1.$helper.toast(t$6("selectSku.min_points_required"));
  47636. return false;
  47637. }
  47638. if (state.selectedSku.goods_num < 1 || !state.selectedSku.use_points) {
  47639. sheep$1.$helper.toast(t$6("selectSku.amount_less_than_min"));
  47640. return;
  47641. }
  47642. if (state.selectedSku.goods_num > state.selectedSku.stock) {
  47643. state.selectedSku.use_points = (state.selectedSku.stock * fen2yuan(state.selectedSku.price)).toFixed(2);
  47644. state.selectedSku.goods_num = state.selectedSku.stock;
  47645. }
  47646. }
  47647. if (state.selectedSku.id <= 0) {
  47648. sheep$1.$helper.toast(t$6("selectSku.select_specification"));
  47649. return;
  47650. }
  47651. if (state.selectedSku.stock <= 0) {
  47652. sheep$1.$helper.toast(t$6("selectSku.insufficient_stock"));
  47653. return;
  47654. }
  47655. emits("buy", state.selectedSku);
  47656. state.selectedSku.use_points = 0;
  47657. }
  47658. function changeDisabled(isChecked = false, propertyId = 0, valueId = 0) {
  47659. let newSkus = [];
  47660. if (isChecked) {
  47661. for (let price of skuList.value) {
  47662. if (price.stock <= 0) {
  47663. continue;
  47664. }
  47665. if (price.value_id_array.indexOf(valueId) >= 0) {
  47666. newSkus.push(price);
  47667. }
  47668. }
  47669. } else {
  47670. newSkus = getCanUseSkuList();
  47671. }
  47672. let noChooseValueIds = [];
  47673. for (let price of newSkus) {
  47674. noChooseValueIds = noChooseValueIds.concat(price.value_id_array);
  47675. }
  47676. noChooseValueIds = Array.from(new Set(noChooseValueIds));
  47677. if (isChecked) {
  47678. let index2 = noChooseValueIds.indexOf(valueId);
  47679. noChooseValueIds.splice(index2, 1);
  47680. } else {
  47681. state.currentPropertyArray.forEach((currentPropertyId) => {
  47682. if (currentPropertyId.toString() !== "") {
  47683. return;
  47684. }
  47685. let index2 = noChooseValueIds.indexOf(currentPropertyId);
  47686. if (index2 >= 0) {
  47687. noChooseValueIds.splice(index2, 1);
  47688. }
  47689. });
  47690. }
  47691. let choosePropertyIds = [];
  47692. if (!isChecked) {
  47693. state.currentPropertyArray.forEach((currentPropertyId, currentValueId) => {
  47694. if (currentPropertyId !== "") {
  47695. choosePropertyIds.push(currentValueId);
  47696. }
  47697. });
  47698. } else {
  47699. choosePropertyIds = [propertyId];
  47700. }
  47701. for (let propertyIndex in propertyList) {
  47702. if (choosePropertyIds.indexOf(propertyList[propertyIndex]["id"]) >= 0) {
  47703. continue;
  47704. }
  47705. for (let valueIndex in propertyList[propertyIndex]["values"]) {
  47706. propertyList[propertyIndex]["values"][valueIndex]["disabled"] = noChooseValueIds.indexOf(
  47707. propertyList[propertyIndex]["values"][valueIndex]["id"]
  47708. ) < 0;
  47709. }
  47710. }
  47711. }
  47712. function getCanUseSkuList() {
  47713. let newSkus = [];
  47714. for (let sku of skuList.value) {
  47715. if (sku.stock <= 0) {
  47716. continue;
  47717. }
  47718. let isOk = true;
  47719. state.currentPropertyArray.forEach((propertyId) => {
  47720. if (propertyId.toString() !== "" && sku.value_id_array.indexOf(propertyId) < 0) {
  47721. isOk = false;
  47722. }
  47723. });
  47724. if (isOk) {
  47725. newSkus.push(sku);
  47726. }
  47727. }
  47728. return newSkus;
  47729. }
  47730. function onSelectSku(propertyId, valueId) {
  47731. state.selectedSku.use_points = 0;
  47732. let isChecked = true;
  47733. if (state.currentPropertyArray[propertyId] !== void 0 && state.currentPropertyArray[propertyId] === valueId) {
  47734. isChecked = false;
  47735. state.currentPropertyArray.splice(propertyId, 1, "");
  47736. } else {
  47737. state.currentPropertyArray[propertyId] = valueId;
  47738. }
  47739. let choosePropertyId = [];
  47740. state.currentPropertyArray.forEach((currentPropertyId) => {
  47741. if (currentPropertyId !== "") {
  47742. choosePropertyId.push(currentPropertyId);
  47743. }
  47744. });
  47745. let newSkuList = getCanUseSkuList();
  47746. if (choosePropertyId.length === propertyList.length && newSkuList.length) {
  47747. newSkuList[0].goods_num = state.selectedSku.goods_num || 1;
  47748. state.selectedSku = newSkuList[0];
  47749. } else {
  47750. state.selectedSku = {};
  47751. }
  47752. changeDisabled(isChecked, propertyId, valueId);
  47753. }
  47754. changeDisabled(false);
  47755. vue.onMounted(() => {
  47756. if (propertyList.length == 1 && propertyList[0].values.length == 1) {
  47757. onSelectSku(0, 0);
  47758. }
  47759. });
  47760. const __returned__ = { emits, props, userWallet, state, propertyList, skuList, calcNums, useAllPonints, inputPoints, onNumberChange, onAddCart, onBuy, changeDisabled, getCanUseSkuList, onSelectSku, computed: vue.computed, reactive: vue.reactive, watch: vue.watch, onMounted: vue.onMounted, nextTick: vue.nextTick, get sheep() {
  47761. return sheep$1;
  47762. }, get formatStock() {
  47763. return formatStock;
  47764. }, get convertProductPropertyList() {
  47765. return convertProductPropertyList;
  47766. }, get fen2yuan() {
  47767. return fen2yuan;
  47768. }, get points2point() {
  47769. return points2point;
  47770. }, get fen2yuan6() {
  47771. return fen2yuan6;
  47772. }, get PayWalletApi() {
  47773. return PayWalletApi;
  47774. }, get t() {
  47775. return t$6;
  47776. } };
  47777. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  47778. return __returned__;
  47779. }
  47780. };
  47781. function _sfc_render$1X(_ctx, _cache, $props, $setup, $data, $options) {
  47782. const _component_su_number_box = resolveEasycom(vue.resolveDynamicComponent("su-number-box"), __easycom_0$b);
  47783. const _component_su_popup = resolveEasycom(vue.resolveDynamicComponent("su-popup"), __easycom_4$3);
  47784. return vue.openBlock(), vue.createElementBlock(
  47785. vue.Fragment,
  47786. null,
  47787. [
  47788. vue.createCommentVNode(" 规格弹窗 "),
  47789. vue.createVNode(_component_su_popup, {
  47790. show: $props.show,
  47791. round: "10",
  47792. onClose: _cache[4] || (_cache[4] = ($event) => $setup.emits("close"))
  47793. }, {
  47794. default: vue.withCtx(() => [
  47795. vue.createCommentVNode(" SKU 信息 "),
  47796. vue.createCommentVNode(" {{state.selectedSku}} "),
  47797. vue.createCommentVNode(" {{goodsInfo}} "),
  47798. vue.createElementVNode("view", { class: "ss-modal-box bg-white ss-flex-col" }, [
  47799. vue.createElementVNode("view", { class: "modal-header ss-flex ss-col-center" }, [
  47800. vue.createElementVNode("view", { class: "header-left ss-m-r-30" }, [
  47801. vue.createElementVNode("image", {
  47802. class: "sku-image",
  47803. src: $setup.state.selectedSku.picUrl || $props.goodsInfo.picUrl,
  47804. mode: "aspectFill"
  47805. }, null, 8, ["src"])
  47806. ]),
  47807. vue.createElementVNode("view", { class: "header-right ss-flex-col ss-row-between ss-flex-1" }, [
  47808. vue.createElementVNode(
  47809. "view",
  47810. { class: "goods-title ss-line-2" },
  47811. vue.toDisplayString($props.goodsInfo.name),
  47812. 1
  47813. /* TEXT */
  47814. ),
  47815. vue.createElementVNode("view", { class: "header-right-bottom ss-flex ss-col-center ss-row-between" }, [
  47816. vue.createElementVNode("view", { class: "ss-flex" }, [
  47817. vue.createElementVNode("view", { class: "price-text" }, [
  47818. $props.goodsInfo.spuPayType == 2 ? (vue.openBlock(), vue.createElementBlock("image", {
  47819. key: 0,
  47820. src: _imports_0$6,
  47821. style: { "width": "30rpx", "height": "30rpx" }
  47822. })) : vue.createCommentVNode("v-if", true),
  47823. $props.goodsInfo.highPrecision ? (vue.openBlock(), vue.createElementBlock(
  47824. "text",
  47825. { key: 1 },
  47826. vue.toDisplayString($setup.fen2yuan6($setup.state.selectedSku.highPrecisionPrice || $props.goodsInfo.highPrecisionPrice)),
  47827. 1
  47828. /* TEXT */
  47829. )) : (vue.openBlock(), vue.createElementBlock(
  47830. "text",
  47831. { key: 2 },
  47832. vue.toDisplayString($setup.fen2yuan($setup.state.selectedSku.price || $props.goodsInfo.price)),
  47833. 1
  47834. /* TEXT */
  47835. )),
  47836. vue.createCommentVNode(" {{ fen2yuan(state.selectedSku.price || goodsInfo.price) }} ")
  47837. ]),
  47838. $setup.state.selectedSku.promotionFee >= 0 || $props.goodsInfo.promotionFee >= 0 ? (vue.openBlock(), vue.createElementBlock(
  47839. "view",
  47840. {
  47841. key: 0,
  47842. class: "origin-price-text ss-m-l-10"
  47843. },
  47844. vue.toDisplayString(_ctx.$t("common.points")) + ":" + vue.toDisplayString($setup.fen2yuan(
  47845. $setup.state.selectedSku.promotionFee || $props.goodsInfo.promotionFee
  47846. )),
  47847. 1
  47848. /* TEXT */
  47849. )) : vue.createCommentVNode("v-if", true)
  47850. ]),
  47851. vue.createElementVNode(
  47852. "view",
  47853. { class: "stock-text ss-m-l-20" },
  47854. vue.toDisplayString($setup.formatStock("exact", $setup.state.selectedSku.stock || $props.goodsInfo.stock)),
  47855. 1
  47856. /* TEXT */
  47857. )
  47858. ])
  47859. ])
  47860. ]),
  47861. vue.createCommentVNode(" 属性选择 "),
  47862. vue.createElementVNode("view", { class: "modal-content ss-flex-1" }, [
  47863. vue.createElementVNode(
  47864. "scroll-view",
  47865. {
  47866. "scroll-y": "true",
  47867. class: "modal-content-scroll",
  47868. onTouchmove: _cache[3] || (_cache[3] = vue.withModifiers(() => {
  47869. }, ["stop"]))
  47870. },
  47871. [
  47872. (vue.openBlock(true), vue.createElementBlock(
  47873. vue.Fragment,
  47874. null,
  47875. vue.renderList($setup.propertyList, (property) => {
  47876. return vue.openBlock(), vue.createElementBlock("view", {
  47877. class: "sku-item ss-m-b-20",
  47878. key: property.id
  47879. }, [
  47880. vue.createElementVNode(
  47881. "view",
  47882. { class: "label-text ss-m-b-20" },
  47883. vue.toDisplayString(property.name),
  47884. 1
  47885. /* TEXT */
  47886. ),
  47887. vue.createElementVNode("view", { class: "ss-flex ss-col-center ss-flex-wrap" }, [
  47888. (vue.openBlock(true), vue.createElementBlock(
  47889. vue.Fragment,
  47890. null,
  47891. vue.renderList(property.values, (value) => {
  47892. return vue.openBlock(), vue.createElementBlock("button", {
  47893. class: vue.normalizeClass(["ss-reset-button spec-btn", [
  47894. {
  47895. "ui-BG-Main-Gradient": $setup.state.currentPropertyArray[property.id] === value.id
  47896. },
  47897. {
  47898. "disabled-btn": value.disabled === true
  47899. }
  47900. ]]),
  47901. key: value.id,
  47902. disabled: value.disabled === true,
  47903. onClick: ($event) => $setup.onSelectSku(property.id, value.id)
  47904. }, vue.toDisplayString(value.name), 11, ["disabled", "onClick"]);
  47905. }),
  47906. 128
  47907. /* KEYED_FRAGMENT */
  47908. ))
  47909. ])
  47910. ]);
  47911. }),
  47912. 128
  47913. /* KEYED_FRAGMENT */
  47914. )),
  47915. $props.goodsInfo.spuPayType == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  47916. key: 0,
  47917. class: "buy-num-box ss-flex ss-col-center ss-row-between ss-m-b-40"
  47918. }, [
  47919. vue.createElementVNode(
  47920. "view",
  47921. { class: "label-text" },
  47922. vue.toDisplayString(_ctx.$t("selectSku.purchase_amount")) + " " + vue.toDisplayString(_ctx.$t("selectSku.available_points", { points: $setup.points2point($setup.userWallet.integralDO.currentQuota) })),
  47923. 1
  47924. /* TEXT */
  47925. ),
  47926. vue.createElementVNode("view", { class: "ss-flex ss-col-center" }, [
  47927. vue.createElementVNode(
  47928. "button",
  47929. {
  47930. class: "ss-reset-button all-btn",
  47931. onClick: $setup.useAllPonints
  47932. },
  47933. vue.toDisplayString(_ctx.$t("commmon.all")),
  47934. 1
  47935. /* TEXT */
  47936. ),
  47937. $props.goodsInfo.spuPayType == 2 ? (vue.openBlock(), vue.createElementBlock("image", {
  47938. key: 0,
  47939. src: _imports_0$6,
  47940. style: { "width": "30rpx", "height": "30rpx" }
  47941. })) : vue.createCommentVNode("v-if", true),
  47942. vue.withDirectives(vue.createElementVNode("input", {
  47943. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.state.selectedSku.use_points = $event),
  47944. class: "uni-input input-points",
  47945. style: { "width": "100rpx", "text-align": "center" },
  47946. type: "number",
  47947. placeholder: "0",
  47948. onInput: $setup.inputPoints,
  47949. disabled: !$setup.state.selectedSku.id
  47950. }, null, 40, ["disabled"]), [
  47951. [vue.vModelText, $setup.state.selectedSku.use_points]
  47952. ])
  47953. ])
  47954. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  47955. key: 1,
  47956. class: "buy-num-box ss-flex ss-col-center ss-row-between ss-m-b-40"
  47957. }, [
  47958. vue.createElementVNode(
  47959. "view",
  47960. { class: "label-text" },
  47961. vue.toDisplayString(_ctx.$t("selectSku.purchase_quantity")),
  47962. 1
  47963. /* TEXT */
  47964. ),
  47965. vue.createVNode(_component_su_number_box, {
  47966. min: 1,
  47967. max: $setup.state.selectedSku.stock,
  47968. step: 1,
  47969. modelValue: $setup.state.selectedSku.goods_num,
  47970. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.selectedSku.goods_num = $event),
  47971. onChange: _cache[2] || (_cache[2] = ($event) => $setup.onNumberChange($event))
  47972. }, null, 8, ["max", "modelValue"])
  47973. ]))
  47974. ],
  47975. 32
  47976. /* NEED_HYDRATION */
  47977. )
  47978. ]),
  47979. vue.createCommentVNode(" 操作区 "),
  47980. vue.createElementVNode("view", { class: "modal-footer border-top" }, [
  47981. $props.goodsInfo.spuType && $props.goodsInfo.spuPayType == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  47982. key: 0,
  47983. class: "buy-box ss-flex ss-col-center ss-flex ss-col-center ss-row-center"
  47984. }, [
  47985. vue.createElementVNode(
  47986. "button",
  47987. {
  47988. class: "ss-reset-button add-btn ui-Shadow-Main",
  47989. onClick: $setup.onAddCart
  47990. },
  47991. vue.toDisplayString(_ctx.$t("common.add_to_cart")),
  47992. 1
  47993. /* TEXT */
  47994. ),
  47995. vue.createElementVNode(
  47996. "button",
  47997. {
  47998. class: "ss-reset-button buy-btn ui-Shadow-Main",
  47999. onClick: $setup.onBuy
  48000. },
  48001. vue.toDisplayString(_ctx.$t("common.buy_now")),
  48002. 1
  48003. /* TEXT */
  48004. )
  48005. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  48006. key: 1,
  48007. class: "buy-box ss-flex ss-col-center ss-p-r-20"
  48008. }, [
  48009. vue.createElementVNode("button", {
  48010. class: "ss-reset-button disabled-btn one-buy-btn ui-Shadow-Main",
  48011. onClick: $setup.onBuy
  48012. }, [
  48013. $props.goodsInfo.spuPayType != 1 && !$props.goodsInfo.spuType ? (vue.openBlock(), vue.createElementBlock(
  48014. vue.Fragment,
  48015. { key: 0 },
  48016. [
  48017. vue.createTextVNode(
  48018. vue.toDisplayString(_ctx.$t("common.redeem_now")),
  48019. 1
  48020. /* TEXT */
  48021. )
  48022. ],
  48023. 64
  48024. /* STABLE_FRAGMENT */
  48025. )) : !$props.goodsInfo.spuType ? (vue.openBlock(), vue.createElementBlock(
  48026. vue.Fragment,
  48027. { key: 1 },
  48028. [
  48029. vue.createTextVNode(
  48030. vue.toDisplayString(_ctx.$t("common.buy_now")),
  48031. 1
  48032. /* TEXT */
  48033. )
  48034. ],
  48035. 64
  48036. /* STABLE_FRAGMENT */
  48037. )) : (vue.openBlock(), vue.createElementBlock(
  48038. vue.Fragment,
  48039. { key: 2 },
  48040. [
  48041. vue.createTextVNode(
  48042. vue.toDisplayString(_ctx.$t("common.redeem_now")),
  48043. 1
  48044. /* TEXT */
  48045. )
  48046. ],
  48047. 64
  48048. /* STABLE_FRAGMENT */
  48049. ))
  48050. ])
  48051. ]))
  48052. ])
  48053. ])
  48054. ]),
  48055. _: 1
  48056. /* STABLE */
  48057. }, 8, ["show"])
  48058. ],
  48059. 2112
  48060. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  48061. );
  48062. }
  48063. const __easycom_2$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1Y, [["render", _sfc_render$1X], ["__scopeId", "data-v-a43d1e2a"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-select-sku/s-select-sku.vue"]]);
  48064. const _sfc_main$1X = {
  48065. __name: "detail-navbar",
  48066. props: {
  48067. modelValue: {
  48068. type: Object,
  48069. default() {
  48070. }
  48071. },
  48072. collectIcon: {
  48073. type: Boolean,
  48074. default: true
  48075. },
  48076. shareIcon: {
  48077. type: Boolean,
  48078. default: true
  48079. }
  48080. },
  48081. emits: ["clickLeft"],
  48082. setup(__props, { expose: __expose, emit: __emit }) {
  48083. __expose();
  48084. const isLogin = vue.computed(() => sheep$1.$store("user").isLogin);
  48085. const sys_statusBar = sheep$1.$platform.device.statusBarHeight;
  48086. const sys_navBar = sheep$1.$platform.navbar;
  48087. const capsuleStyle = {
  48088. width: sheep$1.$platform.capsule.width + "px",
  48089. height: sheep$1.$platform.capsule.height + "px"
  48090. };
  48091. const state = vue.reactive({
  48092. tabOpacityVal: 0,
  48093. curTab: "goods",
  48094. tabList: [
  48095. {
  48096. label: t$6("common.product"),
  48097. value: "goods",
  48098. to: "detail-swiper-selector"
  48099. },
  48100. {
  48101. label: t$6("common.review"),
  48102. value: "comment",
  48103. to: "detail-comment-selector"
  48104. },
  48105. {
  48106. label: t$6("common.detail"),
  48107. value: "detail",
  48108. to: "detail-content-selector"
  48109. }
  48110. ]
  48111. });
  48112. const props = __props;
  48113. const emits = __emit;
  48114. const hasHistory2 = sheep$1.$router.hasHistory();
  48115. function onClickLeft() {
  48116. if (hasHistory2) {
  48117. sheep$1.$router.back();
  48118. } else {
  48119. sheep$1.$router.go("/pages/index/index");
  48120. }
  48121. emits("clickLeft");
  48122. }
  48123. function onClickRight() {
  48124. showMenuTools();
  48125. }
  48126. let commentCard = {
  48127. top: 0,
  48128. bottom: 0
  48129. };
  48130. function getCommentCardNode() {
  48131. return new Promise((res, rej) => {
  48132. uni.createSelectorQuery().select(".detail-comment-selector").boundingClientRect((data) => {
  48133. if (data) {
  48134. commentCard.top = data.top;
  48135. commentCard.bottom = data.top + data.height;
  48136. res(data);
  48137. } else {
  48138. res(null);
  48139. }
  48140. }).exec();
  48141. });
  48142. }
  48143. function onTab(tab) {
  48144. let scrollTop = 0;
  48145. if (tab.value === "comment") {
  48146. scrollTop = commentCard.top - sys_navBar + 1;
  48147. } else if (tab.value === "detail") {
  48148. scrollTop = commentCard.bottom - sys_navBar + 1;
  48149. }
  48150. uni.pageScrollTo({
  48151. scrollTop,
  48152. duration: 200
  48153. });
  48154. }
  48155. async function onFavorite() {
  48156. if (!isLogin.value) {
  48157. showAuthModal();
  48158. return;
  48159. }
  48160. if (props.modelValue.favorite) {
  48161. const {
  48162. code: code2
  48163. } = await FavoriteApi.deleteFavorite(props.modelValue.id);
  48164. if (code2 !== 0) {
  48165. return;
  48166. }
  48167. sheep$1.$helper.toast(t$6("common.unfavorite"));
  48168. props.modelValue.favorite = false;
  48169. } else {
  48170. const {
  48171. code: code2
  48172. } = await FavoriteApi.createFavorite(props.modelValue.id);
  48173. await FavoriteApi.createCollectBefore(props.modelValue.id);
  48174. if (code2 !== 0) {
  48175. return;
  48176. }
  48177. sheep$1.$helper.toast(t$6("common.favorite_success"));
  48178. props.modelValue.favorite = true;
  48179. }
  48180. }
  48181. onPageScroll((e2) => {
  48182. state.tabOpacityVal = e2.scrollTop > sheep$1.$platform.navbar ? 1 : e2.scrollTop * 0.01;
  48183. if (commentCard.top === 0) {
  48184. throttle$1(() => {
  48185. getCommentCardNode();
  48186. }, 50);
  48187. }
  48188. if (e2.scrollTop < commentCard.top - sys_navBar) {
  48189. state.curTab = "goods";
  48190. } else if (e2.scrollTop >= commentCard.top - sys_navBar && e2.scrollTop <= commentCard.bottom - sys_navBar) {
  48191. state.curTab = "comment";
  48192. } else {
  48193. state.curTab = "detail";
  48194. }
  48195. });
  48196. const __returned__ = { isLogin, sys_statusBar, sys_navBar, capsuleStyle, state, props, emits, hasHistory: hasHistory2, onClickLeft, onClickRight, get commentCard() {
  48197. return commentCard;
  48198. }, set commentCard(v2) {
  48199. commentCard = v2;
  48200. }, getCommentCardNode, onTab, onFavorite, reactive: vue.reactive, computed: vue.computed, get onPageScroll() {
  48201. return onPageScroll;
  48202. }, get sheep() {
  48203. return sheep$1;
  48204. }, get throttle() {
  48205. return throttle$1;
  48206. }, get showMenuTools() {
  48207. return showMenuTools;
  48208. }, get closeMenuTools() {
  48209. return closeMenuTools;
  48210. }, get showShareModal() {
  48211. return showShareModal;
  48212. }, get t() {
  48213. return t$6;
  48214. }, get showAuthModal() {
  48215. return showAuthModal;
  48216. }, get FavoriteApi() {
  48217. return FavoriteApi;
  48218. } };
  48219. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  48220. return __returned__;
  48221. }
  48222. };
  48223. function _sfc_render$1W(_ctx, _cache, $props, $setup, $data, $options) {
  48224. const _component_su_status_bar = resolveEasycom(vue.resolveDynamicComponent("su-status-bar"), __easycom_0$q);
  48225. const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9);
  48226. return vue.openBlock(), vue.createBlock(_component_su_fixed, {
  48227. alway: "",
  48228. bgStyles: { background: "#fff" },
  48229. val: 0,
  48230. noNav: "",
  48231. opacity: "",
  48232. placeholder: false
  48233. }, {
  48234. default: vue.withCtx(() => [
  48235. vue.createVNode(_component_su_status_bar),
  48236. vue.createElementVNode(
  48237. "view",
  48238. {
  48239. class: "ui-bar ss-flex ss-col-center ss-row-between ss-p-x-20",
  48240. style: vue.normalizeStyle([{ height: $setup.sys_navBar - $setup.sys_statusBar + "px" }])
  48241. },
  48242. [
  48243. vue.createCommentVNode(" 左 "),
  48244. vue.createElementVNode("view", { class: "icon-box ss-flex" }, [
  48245. vue.createElementVNode("view", {
  48246. class: "icon-button icon-button-left ss-flex ss-row-center",
  48247. onClick: $setup.onClickLeft
  48248. }, [
  48249. $setup.hasHistory ? (vue.openBlock(), vue.createElementBlock("text", {
  48250. key: 0,
  48251. class: "sicon-back"
  48252. })) : (vue.openBlock(), vue.createElementBlock("text", {
  48253. key: 1,
  48254. class: "sicon-home"
  48255. }))
  48256. ]),
  48257. vue.createElementVNode("view", { class: "line" }),
  48258. vue.createElementVNode("view", {
  48259. class: "icon-button icon-button-right ss-flex ss-row-center",
  48260. onClick: $setup.onClickRight
  48261. }, [
  48262. vue.createElementVNode("text", { class: "sicon-more" })
  48263. ])
  48264. ]),
  48265. vue.createCommentVNode(" 中 "),
  48266. vue.createElementVNode(
  48267. "view",
  48268. {
  48269. class: "detail-tab-card ss-flex-1",
  48270. style: vue.normalizeStyle([{ opacity: $setup.state.tabOpacityVal }])
  48271. },
  48272. [
  48273. vue.createElementVNode("view", { class: "tab-box ss-flex ss-col-center ss-row-around" }, [
  48274. (vue.openBlock(true), vue.createElementBlock(
  48275. vue.Fragment,
  48276. null,
  48277. vue.renderList($setup.state.tabList, (item) => {
  48278. return vue.openBlock(), vue.createElementBlock("view", {
  48279. class: "tab-item ss-flex-1 ss-flex ss-row-center ss-col-center",
  48280. key: item.value,
  48281. onClick: ($event) => $setup.onTab(item)
  48282. }, [
  48283. vue.createElementVNode(
  48284. "view",
  48285. {
  48286. class: vue.normalizeClass(["tab-title", $setup.state.curTab === item.value ? "cur-tab-title" : ""])
  48287. },
  48288. vue.toDisplayString(item.label),
  48289. 3
  48290. /* TEXT, CLASS */
  48291. ),
  48292. vue.withDirectives(vue.createElementVNode(
  48293. "view",
  48294. { class: "tab-line" },
  48295. null,
  48296. 512
  48297. /* NEED_PATCH */
  48298. ), [
  48299. [vue.vShow, $setup.state.curTab === item.value]
  48300. ])
  48301. ], 8, ["onClick"]);
  48302. }),
  48303. 128
  48304. /* KEYED_FRAGMENT */
  48305. ))
  48306. ])
  48307. ],
  48308. 4
  48309. /* STYLE */
  48310. ),
  48311. vue.createCommentVNode(" 右 "),
  48312. vue.createElementVNode(
  48313. "view",
  48314. {
  48315. class: "ui-tabbar-box",
  48316. style: vue.normalizeStyle([{ opacity: $setup.state.tabOpacityVal }])
  48317. },
  48318. [
  48319. vue.createElementVNode("view", { class: "ui-tabbar ss-flex ss-col-center ss-row-between" }, [
  48320. vue.createElementVNode("view", { class: "ss-flex ss-col-center ss-row-between" }, [
  48321. $props.collectIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  48322. key: 0,
  48323. class: "detail-tabbar-item ss-flex ss-flex-col ss-row-center ss-col-center",
  48324. onClick: $setup.onFavorite
  48325. }, [
  48326. $props.modelValue.favorite ? (vue.openBlock(), vue.createElementBlock(
  48327. vue.Fragment,
  48328. { key: 0 },
  48329. [
  48330. vue.createElementVNode("image", {
  48331. class: "item-icon",
  48332. src: $setup.sheep.$url.static("/static/images/collect_1.gif"),
  48333. mode: "aspectFit"
  48334. }, null, 8, ["src"]),
  48335. vue.createCommentVNode(' <view class="item-title">已收藏</view> ')
  48336. ],
  48337. 64
  48338. /* STABLE_FRAGMENT */
  48339. )) : (vue.openBlock(), vue.createElementBlock(
  48340. vue.Fragment,
  48341. { key: 1 },
  48342. [
  48343. vue.createElementVNode("image", {
  48344. class: "item-icon",
  48345. src: $setup.sheep.$url.static("/static/images/collect_0.png"),
  48346. mode: "aspectFit"
  48347. }, null, 8, ["src"]),
  48348. vue.createCommentVNode(' <view class="item-title">收藏</view> ')
  48349. ],
  48350. 64
  48351. /* STABLE_FRAGMENT */
  48352. ))
  48353. ])) : vue.createCommentVNode("v-if", true),
  48354. $props.shareIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  48355. key: 1,
  48356. class: "detail-tabbar-item ss-flex ss-flex-col ss-row-center ss-col-center",
  48357. onClick: _cache[0] || (_cache[0] = ($event) => $setup.showShareModal($props.modelValue.id))
  48358. }, [
  48359. vue.createElementVNode("image", {
  48360. class: "item-icon",
  48361. src: $setup.sheep.$url.static("/static/images/share.png"),
  48362. mode: "aspectFit"
  48363. }, null, 8, ["src"]),
  48364. vue.createCommentVNode(' <view class="item-title">分享</view> ')
  48365. ])) : vue.createCommentVNode("v-if", true)
  48366. ])
  48367. ])
  48368. ],
  48369. 4
  48370. /* STYLE */
  48371. )
  48372. ],
  48373. 4
  48374. /* STYLE */
  48375. )
  48376. ]),
  48377. _: 1
  48378. /* STABLE */
  48379. });
  48380. }
  48381. const detailNavbar = /* @__PURE__ */ _export_sfc(_sfc_main$1X, [["render", _sfc_render$1W], ["__scopeId", "data-v-3e9ea950"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/goods/components/detail/detail-navbar.vue"]]);
  48382. const _sfc_main$1W = {
  48383. __name: "detail-cell",
  48384. props: {
  48385. label: {
  48386. type: String,
  48387. default: ""
  48388. },
  48389. value: {
  48390. type: String,
  48391. default: ""
  48392. }
  48393. },
  48394. emits: ["click"],
  48395. setup(__props, { expose: __expose, emit: __emit }) {
  48396. __expose();
  48397. const props = __props;
  48398. const emits = __emit;
  48399. const onClick = () => {
  48400. emits("click");
  48401. };
  48402. const __returned__ = { props, emits, onClick };
  48403. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  48404. return __returned__;
  48405. }
  48406. };
  48407. function _sfc_render$1V(_ctx, _cache, $props, $setup, $data, $options) {
  48408. return vue.openBlock(), vue.createElementBlock("view", {
  48409. class: "detail-cell-wrap ss-flex ss-col-center ss-row-between",
  48410. onClick: $setup.onClick
  48411. }, [
  48412. vue.createElementVNode(
  48413. "view",
  48414. { class: "label-text" },
  48415. vue.toDisplayString($props.label),
  48416. 1
  48417. /* TEXT */
  48418. ),
  48419. vue.createElementVNode(
  48420. "view",
  48421. { class: "cell-content ss-line-1 ss-flex-1" },
  48422. vue.toDisplayString($props.value),
  48423. 1
  48424. /* TEXT */
  48425. ),
  48426. vue.createElementVNode("button", { class: "ss-reset-button" }, [
  48427. vue.createElementVNode("text", { class: "_icon-forward right-forwrad-icon" })
  48428. ])
  48429. ]);
  48430. }
  48431. const detailCell = /* @__PURE__ */ _export_sfc(_sfc_main$1W, [["render", _sfc_render$1V], ["__scopeId", "data-v-4e5c0150"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/goods/components/detail/detail-cell.vue"]]);
  48432. const _sfc_main$1V = {
  48433. __name: "detail-cell-sku",
  48434. props: {
  48435. modelValue: {
  48436. type: Array,
  48437. default() {
  48438. return [];
  48439. }
  48440. },
  48441. sku: {
  48442. type: Object
  48443. }
  48444. },
  48445. setup(__props, { expose: __expose }) {
  48446. __expose();
  48447. const props = __props;
  48448. const value = vue.computed(() => {
  48449. var _a2;
  48450. if (!((_a2 = props.sku) == null ? void 0 : _a2.id)) {
  48451. return t$6("common.select_product_specification");
  48452. }
  48453. let str = "";
  48454. props.sku.properties.forEach((property) => {
  48455. if (property.valueName === property.propertyName) {
  48456. str += property.propertyName;
  48457. } else {
  48458. str += property.propertyName + ":" + property.valueName + " ";
  48459. }
  48460. });
  48461. return str;
  48462. });
  48463. const __returned__ = { props, value, computed: vue.computed, detailCell, get t() {
  48464. return t$6;
  48465. } };
  48466. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  48467. return __returned__;
  48468. }
  48469. };
  48470. function _sfc_render$1U(_ctx, _cache, $props, $setup, $data, $options) {
  48471. return vue.openBlock(), vue.createElementBlock(
  48472. vue.Fragment,
  48473. null,
  48474. [
  48475. vue.createCommentVNode(" SKU 选择的提示框 "),
  48476. vue.createVNode($setup["detailCell"], {
  48477. label: _ctx.$t("common.select"),
  48478. value: $setup.value
  48479. }, null, 8, ["label", "value"])
  48480. ],
  48481. 2112
  48482. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  48483. );
  48484. }
  48485. const detailCellSku = /* @__PURE__ */ _export_sfc(_sfc_main$1V, [["render", _sfc_render$1U], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/goods/components/detail/detail-cell-sku.vue"]]);
  48486. const _imports_0$4 = "/static/icon/index.png";
  48487. const _imports_1$2 = "/static/icon/shop.png";
  48488. const _imports_2$1 = "/static/icon/cart.png";
  48489. const _sfc_main$1U = {
  48490. __name: "detail-tabbar",
  48491. props: {
  48492. modelValue: {
  48493. type: Object,
  48494. default() {
  48495. }
  48496. },
  48497. bg: {
  48498. type: String,
  48499. default: "bg-white"
  48500. },
  48501. bgStyles: {
  48502. type: Object,
  48503. default() {
  48504. }
  48505. },
  48506. ui: {
  48507. type: String,
  48508. default: ""
  48509. },
  48510. noFixed: {
  48511. type: Boolean,
  48512. default: false
  48513. },
  48514. topRadius: {
  48515. type: Number,
  48516. default: 0
  48517. },
  48518. collectIcon: {
  48519. type: Boolean,
  48520. default: true
  48521. },
  48522. serviceIcon: {
  48523. type: Boolean,
  48524. default: true
  48525. },
  48526. shareIcon: {
  48527. type: Boolean,
  48528. default: true
  48529. }
  48530. },
  48531. setup(__props, { expose: __expose }) {
  48532. __expose();
  48533. const state = vue.reactive({});
  48534. const props = __props;
  48535. const onShopIndex = () => {
  48536. sheep$1.$router.go("/pages/shop/index", {
  48537. shopId: props.modelValue.shopId,
  48538. shopName: props.modelValue.shopName,
  48539. merchantId: props.modelValue.merchantId
  48540. });
  48541. };
  48542. const onChat = () => {
  48543. sheep$1.$router.go("/pages/chat/index", {
  48544. id: props.modelValue.id
  48545. });
  48546. };
  48547. const onIndex = () => {
  48548. sheep$1.$router.go("/pages/index/index");
  48549. };
  48550. const __returned__ = { state, props, onShopIndex, onChat, onIndex, reactive: vue.reactive, get sheep() {
  48551. return sheep$1;
  48552. }, get showShareModal() {
  48553. return showShareModal;
  48554. }, get FavoriteApi() {
  48555. return FavoriteApi;
  48556. } };
  48557. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  48558. return __returned__;
  48559. }
  48560. };
  48561. function _sfc_render$1T(_ctx, _cache, $props, $setup, $data, $options) {
  48562. const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9);
  48563. return vue.openBlock(), vue.createBlock(_component_su_fixed, {
  48564. bottom: "",
  48565. placeholder: "",
  48566. bg: "bg-white"
  48567. }, {
  48568. default: vue.withCtx(() => [
  48569. vue.createElementVNode("view", { class: "ui-tabbar-box" }, [
  48570. vue.createElementVNode("view", { class: "ui-tabbar ss-flex ss-col-center ss-row-between" }, [
  48571. $props.serviceIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  48572. key: 0,
  48573. class: "detail-tabbar-item ss-flex ss-flex-col ss-row-center ss-col-center",
  48574. onClick: $setup.onIndex
  48575. }, [
  48576. vue.createElementVNode("image", {
  48577. class: "item-icon",
  48578. src: _imports_0$4,
  48579. mode: "aspectFit"
  48580. }),
  48581. vue.createElementVNode(
  48582. "view",
  48583. { class: "item-title" },
  48584. vue.toDisplayString(_ctx.$t("common.home")),
  48585. 1
  48586. /* TEXT */
  48587. )
  48588. ])) : vue.createCommentVNode("v-if", true),
  48589. $props.serviceIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  48590. key: 1,
  48591. class: "detail-tabbar-item ss-flex ss-flex-col ss-row-center ss-col-center",
  48592. onClick: $setup.onShopIndex
  48593. }, [
  48594. vue.createElementVNode("image", {
  48595. class: "item-icon",
  48596. src: _imports_1$2,
  48597. mode: "aspectFit"
  48598. }),
  48599. vue.createElementVNode(
  48600. "view",
  48601. { class: "item-title" },
  48602. vue.toDisplayString(_ctx.$t("title.shop_home")),
  48603. 1
  48604. /* TEXT */
  48605. )
  48606. ])) : vue.createCommentVNode("v-if", true),
  48607. vue.createCommentVNode(' <view v-if="serviceIcon" class="detail-tabbar-item ss-flex ss-flex-col ss-row-center ss-col-center"\n @tap="onChat">\n <image class="item-icon" src="@/static/icon/service.png"\n mode="aspectFit" />\n <view class="item-title">客服</view>\n </view> '),
  48608. $props.shareIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  48609. key: 2,
  48610. class: "detail-tabbar-item ss-flex ss-flex-col ss-row-center ss-col-center",
  48611. onClick: _cache[0] || (_cache[0] = ($event) => {
  48612. $setup.sheep.$router.go("/pages/index/cart");
  48613. })
  48614. }, [
  48615. vue.createElementVNode("image", {
  48616. class: "item-icon",
  48617. src: _imports_2$1,
  48618. mode: "aspectFit"
  48619. }),
  48620. vue.createElementVNode(
  48621. "view",
  48622. { class: "item-title" },
  48623. vue.toDisplayString(_ctx.$t("common.cart")),
  48624. 1
  48625. /* TEXT */
  48626. )
  48627. ])) : vue.createCommentVNode("v-if", true),
  48628. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  48629. ])
  48630. ])
  48631. ]),
  48632. _: 3
  48633. /* FORWARDED */
  48634. });
  48635. }
  48636. const detailTabbar = /* @__PURE__ */ _export_sfc(_sfc_main$1U, [["render", _sfc_render$1T], ["__scopeId", "data-v-4c75f2f1"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/goods/components/detail/detail-tabbar.vue"]]);
  48637. const _sfc_main$1T = {
  48638. __name: "detail-skeleton",
  48639. setup(__props, { expose: __expose }) {
  48640. __expose();
  48641. const sys2 = vue.computed(() => sheep$1.$store("sys"));
  48642. const __returned__ = { sys: sys2, computed: vue.computed, get sheep() {
  48643. return sheep$1;
  48644. } };
  48645. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  48646. return __returned__;
  48647. }
  48648. };
  48649. function _sfc_render$1S(_ctx, _cache, $props, $setup, $data, $options) {
  48650. const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9);
  48651. return vue.openBlock(), vue.createElementBlock(
  48652. "view",
  48653. {
  48654. class: vue.normalizeClass(["skeleton-wrap", ["theme-" + $setup.sys.mode, "main-" + $setup.sys.theme, "font-" + $setup.sys.fontSize]])
  48655. },
  48656. [
  48657. vue.createElementVNode("view", { class: "skeleton-banner" }),
  48658. vue.createElementVNode("view", { class: "container-box" }, [
  48659. vue.createElementVNode("view", { class: "container-box-strip title ss-m-b-58" }),
  48660. vue.createElementVNode("view", { class: "container-box-strip ss-m-b-20" }),
  48661. vue.createElementVNode("view", { class: "container-box-strip ss-m-b-20" }),
  48662. vue.createElementVNode("view", { class: "container-box-strip w-364" })
  48663. ]),
  48664. vue.createElementVNode("view", { class: "container-box" }, [
  48665. vue.createElementVNode("view", { class: "ss-flex ss-row-between ss-m-b-34" }, [
  48666. vue.createElementVNode("view", { class: "container-box-strip w-380" }),
  48667. vue.createElementVNode("view", { class: "circle" })
  48668. ]),
  48669. vue.createElementVNode("view", { class: "ss-flex ss-row-between ss-m-b-34" }, [
  48670. vue.createElementVNode("view", { class: "container-box-strip w-556" }),
  48671. vue.createElementVNode("view", { class: "circle" })
  48672. ]),
  48673. vue.createElementVNode("view", { class: "ss-flex ss-row-between" }, [
  48674. vue.createElementVNode("view", { class: "container-box-strip w-556" }),
  48675. vue.createElementVNode("view", { class: "circle" })
  48676. ])
  48677. ]),
  48678. vue.createElementVNode("view", { class: "container-box" }, [
  48679. vue.createElementVNode("view", { class: "container-box-strip w-198 ss-m-b-42" }),
  48680. vue.createElementVNode("view", { class: "ss-flex" }, [
  48681. vue.createElementVNode("view", { class: "circle ss-m-r-12" }),
  48682. vue.createElementVNode("view", { class: "container-box-strip w-252" })
  48683. ])
  48684. ]),
  48685. vue.createVNode(_component_su_fixed, {
  48686. bottom: "",
  48687. placeholder: "",
  48688. bg: "bg-white"
  48689. }, {
  48690. default: vue.withCtx(() => [
  48691. vue.createElementVNode("view", { class: "ui-tabbar-box" }, [
  48692. vue.createElementVNode("view", { class: "foot ss-flex ss-col-center" }, [
  48693. vue.createElementVNode("view", { class: "ss-m-r-54 ss-m-l-32" }, [
  48694. vue.createElementVNode("view", { class: "rec ss-m-b-8" }),
  48695. vue.createElementVNode("view", { class: "oval" })
  48696. ]),
  48697. vue.createElementVNode("view", { class: "ss-m-r-54" }, [
  48698. vue.createElementVNode("view", { class: "rec ss-m-b-8" }),
  48699. vue.createElementVNode("view", { class: "oval" })
  48700. ]),
  48701. vue.createElementVNode("view", { class: "ss-m-r-50" }, [
  48702. vue.createElementVNode("view", { class: "rec ss-m-b-8" }),
  48703. vue.createElementVNode("view", { class: "oval" })
  48704. ]),
  48705. vue.createElementVNode("button", { class: "ss-reset-button add-btn ui-Shadow-Main" }),
  48706. vue.createElementVNode("button", { class: "ss-reset-button buy-btn ui-Shadow-Main" })
  48707. ])
  48708. ])
  48709. ]),
  48710. _: 1
  48711. /* STABLE */
  48712. })
  48713. ],
  48714. 2
  48715. /* CLASS */
  48716. );
  48717. }
  48718. const detailSkeleton = /* @__PURE__ */ _export_sfc(_sfc_main$1T, [["render", _sfc_render$1S], ["__scopeId", "data-v-929a32c8"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/goods/components/detail/detail-skeleton.vue"]]);
  48719. const _sfc_main$1S = {
  48720. name: "UniRate",
  48721. props: {
  48722. isFill: {
  48723. // 星星的类型,是否镂空
  48724. type: [Boolean, String],
  48725. default: true
  48726. },
  48727. color: {
  48728. // 星星未选中的颜色
  48729. type: String,
  48730. default: "#ececec"
  48731. },
  48732. activeColor: {
  48733. // 星星选中状态颜色
  48734. type: String,
  48735. default: "#ffca3e"
  48736. },
  48737. disabledColor: {
  48738. // 星星禁用状态颜色
  48739. type: String,
  48740. default: "#c0c0c0"
  48741. },
  48742. size: {
  48743. // 星星的大小
  48744. type: [Number, String],
  48745. default: 24
  48746. },
  48747. value: {
  48748. // 当前评分
  48749. type: [Number, String],
  48750. default: 0
  48751. },
  48752. modelValue: {
  48753. // 当前评分
  48754. type: [Number, String],
  48755. default: 0
  48756. },
  48757. max: {
  48758. // 最大评分
  48759. type: [Number, String],
  48760. default: 5
  48761. },
  48762. margin: {
  48763. // 星星的间距
  48764. type: [Number, String],
  48765. default: 0
  48766. },
  48767. disabled: {
  48768. // 是否可点击
  48769. type: [Boolean, String],
  48770. default: false
  48771. },
  48772. readonly: {
  48773. // 是否只读
  48774. type: [Boolean, String],
  48775. default: false
  48776. },
  48777. allowHalf: {
  48778. // 是否显示半星
  48779. type: [Boolean, String],
  48780. default: false
  48781. },
  48782. touchable: {
  48783. // 是否支持滑动手势
  48784. type: [Boolean, String],
  48785. default: true
  48786. }
  48787. },
  48788. data() {
  48789. return {
  48790. valueSync: "",
  48791. userMouseFristMove: true,
  48792. userRated: false,
  48793. userLastRate: 1
  48794. };
  48795. },
  48796. watch: {
  48797. value(newVal) {
  48798. this.valueSync = Number(newVal);
  48799. },
  48800. modelValue(newVal) {
  48801. this.valueSync = Number(newVal);
  48802. }
  48803. },
  48804. computed: {
  48805. stars() {
  48806. const value = this.valueSync ? this.valueSync : 0;
  48807. const starList = [];
  48808. const floorValue = Math.floor(value);
  48809. const ceilValue = Math.ceil(value);
  48810. for (let i2 = 0; i2 < this.max; i2++) {
  48811. if (floorValue > i2) {
  48812. starList.push({
  48813. activeWitch: "100%"
  48814. });
  48815. } else if (ceilValue - 1 === i2) {
  48816. starList.push({
  48817. activeWitch: (value - floorValue) * 100 + "%"
  48818. });
  48819. } else {
  48820. starList.push({
  48821. activeWitch: "0"
  48822. });
  48823. }
  48824. }
  48825. return starList;
  48826. },
  48827. marginNumber() {
  48828. return Number(this.margin);
  48829. }
  48830. },
  48831. created() {
  48832. this.valueSync = Number(this.value || this.modelValue);
  48833. this._rateBoxLeft = 0;
  48834. this._oldValue = null;
  48835. },
  48836. mounted() {
  48837. setTimeout(() => {
  48838. this._getSize();
  48839. }, 100);
  48840. },
  48841. methods: {
  48842. touchstart(e2) {
  48843. if (this.readonly || this.disabled)
  48844. return;
  48845. const {
  48846. clientX,
  48847. screenX
  48848. } = e2.changedTouches[0];
  48849. this._getRateCount(clientX || screenX);
  48850. },
  48851. touchmove(e2) {
  48852. if (this.readonly || this.disabled || !this.touchable)
  48853. return;
  48854. const {
  48855. clientX,
  48856. screenX
  48857. } = e2.changedTouches[0];
  48858. this._getRateCount(clientX || screenX);
  48859. },
  48860. /**
  48861. * 兼容 PC @tian
  48862. */
  48863. mousedown(e2) {
  48864. },
  48865. mousemove(e2) {
  48866. },
  48867. mouseleave(e2) {
  48868. },
  48869. /**
  48870. * 获取星星个数
  48871. */
  48872. _getRateCount(clientX) {
  48873. this._getSize();
  48874. const size = Number(this.size);
  48875. if (isNaN(size)) {
  48876. return new Error("size 属性只能设置为数字");
  48877. }
  48878. const rateMoveRange = clientX - this._rateBoxLeft;
  48879. let index2 = parseInt(rateMoveRange / (size + this.marginNumber));
  48880. index2 = index2 < 0 ? 0 : index2;
  48881. index2 = index2 > this.max ? this.max : index2;
  48882. const range2 = parseInt(rateMoveRange - (size + this.marginNumber) * index2);
  48883. let value = 0;
  48884. if (this._oldValue === index2 && !this.PC)
  48885. return;
  48886. this._oldValue = index2;
  48887. if (this.allowHalf) {
  48888. if (range2 > size / 2) {
  48889. value = index2 + 1;
  48890. } else {
  48891. value = index2 + 0.5;
  48892. }
  48893. } else {
  48894. value = index2 + 1;
  48895. }
  48896. value = Math.max(0.5, Math.min(value, this.max));
  48897. this.valueSync = value;
  48898. this._onChange();
  48899. },
  48900. /**
  48901. * 触发动态修改
  48902. */
  48903. _onChange() {
  48904. this.$emit("input", this.valueSync);
  48905. this.$emit("update:modelValue", this.valueSync);
  48906. this.$emit("change", {
  48907. value: this.valueSync
  48908. });
  48909. },
  48910. /**
  48911. * 获取星星距离屏幕左侧距离
  48912. */
  48913. _getSize() {
  48914. uni.createSelectorQuery().in(this).select(".uni-rate").boundingClientRect().exec((ret) => {
  48915. if (ret) {
  48916. this._rateBoxLeft = ret[0].left;
  48917. }
  48918. });
  48919. }
  48920. }
  48921. };
  48922. function _sfc_render$1R(_ctx, _cache, $props, $setup, $data, $options) {
  48923. const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$b);
  48924. return vue.openBlock(), vue.createElementBlock("view", null, [
  48925. vue.createElementVNode(
  48926. "view",
  48927. {
  48928. ref: "uni-rate",
  48929. class: "uni-rate"
  48930. },
  48931. [
  48932. (vue.openBlock(true), vue.createElementBlock(
  48933. vue.Fragment,
  48934. null,
  48935. vue.renderList($options.stars, (star, index2) => {
  48936. return vue.openBlock(), vue.createElementBlock(
  48937. "view",
  48938. {
  48939. class: vue.normalizeClass(["uni-rate__icon", { "uni-cursor-not-allowed": $props.disabled }]),
  48940. style: vue.normalizeStyle({ "margin-right": $options.marginNumber + "px" }),
  48941. key: index2,
  48942. onTouchstart: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.touchstart && $options.touchstart(...args), ["stop"])),
  48943. onTouchmove: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.touchmove && $options.touchmove(...args), ["stop"])),
  48944. onMousedown: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.mousedown && $options.mousedown(...args), ["stop"])),
  48945. onMousemove: _cache[3] || (_cache[3] = vue.withModifiers((...args) => $options.mousemove && $options.mousemove(...args), ["stop"])),
  48946. onMouseleave: _cache[4] || (_cache[4] = (...args) => $options.mouseleave && $options.mouseleave(...args))
  48947. },
  48948. [
  48949. vue.createVNode(_component_uni_icons, {
  48950. color: $props.color,
  48951. size: $props.size,
  48952. type: $props.isFill ? "star-filled" : "star"
  48953. }, null, 8, ["color", "size", "type"]),
  48954. vue.createElementVNode(
  48955. "view",
  48956. {
  48957. style: vue.normalizeStyle({ width: star.activeWitch }),
  48958. class: "uni-rate__icon-on"
  48959. },
  48960. [
  48961. vue.createVNode(_component_uni_icons, {
  48962. color: $props.disabled ? $props.disabledColor : $props.activeColor,
  48963. size: $props.size,
  48964. type: "star-filled"
  48965. }, null, 8, ["color", "size"])
  48966. ],
  48967. 4
  48968. /* STYLE */
  48969. )
  48970. ],
  48971. 38
  48972. /* CLASS, STYLE, NEED_HYDRATION */
  48973. );
  48974. }),
  48975. 128
  48976. /* KEYED_FRAGMENT */
  48977. ))
  48978. ],
  48979. 512
  48980. /* NEED_PATCH */
  48981. )
  48982. ]);
  48983. }
  48984. const __easycom_1$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1S, [["render", _sfc_render$1R], ["__scopeId", "data-v-5c8fbdf3"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-rate/components/uni-rate/uni-rate.vue"]]);
  48985. const _sfc_main$1R = {
  48986. __name: "comment-item",
  48987. props: {
  48988. item: {
  48989. type: Object,
  48990. default() {
  48991. }
  48992. }
  48993. },
  48994. setup(__props, { expose: __expose }) {
  48995. __expose();
  48996. const props = __props;
  48997. const __returned__ = { props };
  48998. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  48999. return __returned__;
  49000. }
  49001. };
  49002. function _sfc_render$1Q(_ctx, _cache, $props, $setup, $data, $options) {
  49003. var _a2;
  49004. const _component_uni_rate = resolveEasycom(vue.resolveDynamicComponent("uni-rate"), __easycom_1$2);
  49005. const _component_su_image = resolveEasycom(vue.resolveDynamicComponent("su-image"), __easycom_0$f);
  49006. return vue.openBlock(), vue.createElementBlock("view", null, [
  49007. vue.createCommentVNode(" 用户评论 "),
  49008. vue.createElementVNode("view", { class: "user ss-flex ss-m-b-14" }, [
  49009. vue.createElementVNode("view", { class: "ss-m-r-20 ss-flex" }, [
  49010. vue.createElementVNode("image", {
  49011. class: "avatar",
  49012. src: $props.item.userAvatar
  49013. }, null, 8, ["src"])
  49014. ]),
  49015. vue.createElementVNode(
  49016. "view",
  49017. { class: "nickname ss-m-r-20" },
  49018. vue.toDisplayString($props.item.userNickname),
  49019. 1
  49020. /* TEXT */
  49021. ),
  49022. vue.createElementVNode("view", { class: "" }, [
  49023. vue.createVNode(_component_uni_rate, {
  49024. readonly: true,
  49025. modelValue: $props.item.scores,
  49026. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $props.item.scores = $event),
  49027. size: "18"
  49028. }, null, 8, ["modelValue"])
  49029. ])
  49030. ]),
  49031. vue.createElementVNode(
  49032. "view",
  49033. { class: "content" },
  49034. vue.toDisplayString($props.item.content),
  49035. 1
  49036. /* TEXT */
  49037. ),
  49038. ((_a2 = $props.item.picUrls) == null ? void 0 : _a2.length) ? (vue.openBlock(), vue.createElementBlock("view", {
  49039. key: 0,
  49040. class: "ss-m-t-24"
  49041. }, [
  49042. vue.createElementVNode("scroll-view", {
  49043. class: "scroll-box",
  49044. "scroll-x": "",
  49045. "scroll-anchoring": ""
  49046. }, [
  49047. vue.createElementVNode("view", { class: "ss-flex" }, [
  49048. (vue.openBlock(true), vue.createElementBlock(
  49049. vue.Fragment,
  49050. null,
  49051. vue.renderList($props.item.picUrls, (picUrl, index2) => {
  49052. return vue.openBlock(), vue.createElementBlock("view", {
  49053. key: picUrl,
  49054. class: "ss-m-r-10"
  49055. }, [
  49056. vue.createVNode(_component_su_image, {
  49057. class: "content-img",
  49058. isPreview: "",
  49059. previewList: $props.item.picUrls,
  49060. current: index2,
  49061. src: picUrl,
  49062. height: 120,
  49063. width: 120,
  49064. mode: "aspectFill"
  49065. }, null, 8, ["previewList", "current", "src"])
  49066. ]);
  49067. }),
  49068. 128
  49069. /* KEYED_FRAGMENT */
  49070. ))
  49071. ])
  49072. ])
  49073. ])) : vue.createCommentVNode("v-if", true),
  49074. vue.createCommentVNode(" 商家回复 "),
  49075. $props.item.replyTime ? (vue.openBlock(), vue.createElementBlock("view", {
  49076. key: 1,
  49077. class: "ss-m-t-20 reply-box"
  49078. }, [
  49079. vue.createElementVNode("view", { class: "reply-title" }, "商家回复:"),
  49080. vue.createElementVNode(
  49081. "view",
  49082. { class: "reply-content" },
  49083. vue.toDisplayString($props.item.replyContent),
  49084. 1
  49085. /* TEXT */
  49086. )
  49087. ])) : vue.createCommentVNode("v-if", true)
  49088. ]);
  49089. }
  49090. const commentItem = /* @__PURE__ */ _export_sfc(_sfc_main$1R, [["render", _sfc_render$1Q], ["__scopeId", "data-v-5629fc5e"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/goods/components/detail/comment-item.vue"]]);
  49091. const _sfc_main$1Q = {
  49092. __name: "detail-comment-card",
  49093. props: {
  49094. goodsId: {
  49095. type: [Number, String],
  49096. default: 0
  49097. }
  49098. },
  49099. setup(__props, { expose: __expose }) {
  49100. __expose();
  49101. const props = __props;
  49102. const state = vue.reactive({
  49103. commentList: [],
  49104. // 评论列表,只展示最近的 3 条
  49105. total: 0
  49106. // 总评论数
  49107. });
  49108. async function getComment(id) {
  49109. const { data } = await CommentApi.getCommentPage(id, 1, 3, 0);
  49110. state.commentList = data.list;
  49111. state.total = data.total;
  49112. }
  49113. vue.onBeforeMount(() => {
  49114. getComment(props.goodsId);
  49115. });
  49116. const __returned__ = { props, state, getComment, reactive: vue.reactive, onBeforeMount: vue.onBeforeMount, get sheep() {
  49117. return sheep$1;
  49118. }, get CommentApi() {
  49119. return CommentApi;
  49120. }, commentItem, get t() {
  49121. return t$6;
  49122. } };
  49123. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  49124. return __returned__;
  49125. }
  49126. };
  49127. function _sfc_render$1P(_ctx, _cache, $props, $setup, $data, $options) {
  49128. const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6);
  49129. return vue.openBlock(), vue.createElementBlock("view", { class: "detail-comment-card bg-white" }, [
  49130. vue.createElementVNode("view", { class: "card-header ss-flex ss-col-center ss-row-between ss-p-b-30" }, [
  49131. vue.createElementVNode("view", { class: "ss-flex ss-col-center" }, [
  49132. vue.createElementVNode("view", { class: "line" }),
  49133. vue.createElementVNode(
  49134. "view",
  49135. { class: "title ss-m-l-20 ss-m-r-10" },
  49136. vue.toDisplayString(_ctx.$t("common.review")),
  49137. 1
  49138. /* TEXT */
  49139. ),
  49140. vue.createElementVNode(
  49141. "view",
  49142. { class: "des" },
  49143. "(" + vue.toDisplayString($setup.state.total) + ")",
  49144. 1
  49145. /* TEXT */
  49146. )
  49147. ]),
  49148. $setup.state.commentList.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  49149. key: 0,
  49150. class: "ss-flex ss-col-center",
  49151. onClick: _cache[0] || (_cache[0] = ($event) => $setup.sheep.$router.go("/pages/goods/comment/list", { id: $props.goodsId }))
  49152. }, [
  49153. vue.createElementVNode(
  49154. "button",
  49155. { class: "ss-reset-button more-btn" },
  49156. vue.toDisplayString(_ctx.$t("common.view_all")),
  49157. 1
  49158. /* TEXT */
  49159. ),
  49160. vue.createElementVNode("text", { class: "cicon-forward" })
  49161. ])) : vue.createCommentVNode("v-if", true)
  49162. ]),
  49163. vue.createCommentVNode(" 评论列表 "),
  49164. vue.createElementVNode("view", { class: "card-content" }, [
  49165. (vue.openBlock(true), vue.createElementBlock(
  49166. vue.Fragment,
  49167. null,
  49168. vue.renderList($setup.state.commentList, (item) => {
  49169. return vue.openBlock(), vue.createElementBlock("view", {
  49170. class: "comment-box ss-p-y-30",
  49171. key: item.id
  49172. }, [
  49173. vue.createVNode($setup["commentItem"], { item }, null, 8, ["item"])
  49174. ]);
  49175. }),
  49176. 128
  49177. /* KEYED_FRAGMENT */
  49178. )),
  49179. $setup.state.commentList.length === 0 ? (vue.openBlock(), vue.createBlock(_component_s_empty, {
  49180. key: 0,
  49181. paddingTop: "0",
  49182. icon: "/static/comment-empty.png",
  49183. text: $setup.t("common.awaiting_your_first_review")
  49184. }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true)
  49185. ])
  49186. ]);
  49187. }
  49188. const detailCommentCard = /* @__PURE__ */ _export_sfc(_sfc_main$1Q, [["render", _sfc_render$1P], ["__scopeId", "data-v-489ea6d9"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/goods/components/detail/detail-comment-card.vue"]]);
  49189. const _sfc_main$1P = {
  49190. __name: "detail-content-card",
  49191. props: {
  49192. content: {
  49193. type: String,
  49194. default: ""
  49195. }
  49196. },
  49197. setup(__props, { expose: __expose }) {
  49198. __expose();
  49199. const { safeAreaInsets } = sheep$1.$platform.device;
  49200. const props = __props;
  49201. const __returned__ = { safeAreaInsets, props, get sheep() {
  49202. return sheep$1;
  49203. } };
  49204. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  49205. return __returned__;
  49206. }
  49207. };
  49208. function _sfc_render$1O(_ctx, _cache, $props, $setup, $data, $options) {
  49209. const _component_mp_html = resolveEasycom(vue.resolveDynamicComponent("mp-html"), __easycom_0$r);
  49210. return vue.openBlock(), vue.createElementBlock("view", { class: "detail-content-card bg-white ss-m-x-20 ss-p-t-20" }, [
  49211. vue.createElementVNode("view", { class: "card-header ss-flex ss-col-center ss-m-b-30 ss-m-l-20" }, [
  49212. vue.createElementVNode("view", { class: "line" }),
  49213. vue.createElementVNode(
  49214. "view",
  49215. { class: "title ss-m-l-20 ss-m-r-20" },
  49216. vue.toDisplayString(_ctx.$t("common.detail")),
  49217. 1
  49218. /* TEXT */
  49219. )
  49220. ]),
  49221. vue.createElementVNode("view", { class: "card-content" }, [
  49222. vue.createVNode(_component_mp_html, { content: $props.content }, null, 8, ["content"])
  49223. ])
  49224. ]);
  49225. }
  49226. const detailContentCard = /* @__PURE__ */ _export_sfc(_sfc_main$1P, [["render", _sfc_render$1O], ["__scopeId", "data-v-cebfed36"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/goods/components/detail/detail-content-card.vue"]]);
  49227. const _sfc_main$1O = {
  49228. __name: "detail-activity-tip",
  49229. props: {
  49230. activityList: {
  49231. type: Array,
  49232. default() {
  49233. return [];
  49234. }
  49235. }
  49236. },
  49237. setup(__props, { expose: __expose }) {
  49238. __expose();
  49239. vue.useCssVars((_ctx) => ({
  49240. "8e741228-seckillBg": vue.unref(seckillBg),
  49241. "8e741228-grouponBg": vue.unref(grouponBg)
  49242. }));
  49243. const seckillBg = sheep$1.$url.css("/static/images/seckill-tip-bg.png");
  49244. const grouponBg = sheep$1.$url.css("/static/images/groupon-tip-bg.png");
  49245. const props = __props;
  49246. function onActivity(activity) {
  49247. const type = activity.type;
  49248. const typePath = type === 1 ? "seckill" : type === 2 ? "TODO 拼团" : "groupon";
  49249. sheep$1.$router.go(`/pages/goods/${typePath}`, {
  49250. id: activity.id
  49251. });
  49252. }
  49253. const __returned__ = { seckillBg, grouponBg, props, onActivity, get sheep() {
  49254. return sheep$1;
  49255. } };
  49256. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  49257. return __returned__;
  49258. }
  49259. };
  49260. function _sfc_render$1N(_ctx, _cache, $props, $setup, $data, $options) {
  49261. const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9);
  49262. return vue.openBlock(), vue.createBlock(_component_su_fixed, {
  49263. bottom: "",
  49264. placeholder: "",
  49265. val: 44
  49266. }, {
  49267. default: vue.withCtx(() => [
  49268. vue.createElementVNode("view", null, [
  49269. (vue.openBlock(true), vue.createElementBlock(
  49270. vue.Fragment,
  49271. null,
  49272. vue.renderList($setup.props.activityList, (activity) => {
  49273. return vue.openBlock(), vue.createElementBlock("view", {
  49274. key: activity.id
  49275. }, [
  49276. vue.createCommentVNode(" TODO 非繁人:拼团 "),
  49277. vue.createElementVNode(
  49278. "view",
  49279. {
  49280. class: vue.normalizeClass(["activity-box ss-p-x-38 ss-flex ss-row-between ss-col-center", activity.type === 1 ? "seckill-box" : "groupon-box"])
  49281. },
  49282. [
  49283. vue.createElementVNode("view", { class: "activity-title ss-flex" }, [
  49284. vue.createElementVNode("view", { class: "ss-m-r-16" }, [
  49285. activity.type === 1 ? (vue.openBlock(), vue.createElementBlock("image", {
  49286. key: 0,
  49287. src: $setup.sheep.$url.static("/static/images/seckill-icon.png"),
  49288. class: "activity-icon"
  49289. }, null, 8, ["src"])) : activity.type === 3 ? (vue.openBlock(), vue.createElementBlock(
  49290. vue.Fragment,
  49291. { key: 1 },
  49292. [
  49293. vue.createCommentVNode(" TODO 非繁人:拼团 "),
  49294. vue.createElementVNode("image", {
  49295. src: $setup.sheep.$url.static("/static/images/groupon-icon.png"),
  49296. class: "activity-icon"
  49297. }, null, 8, ["src"])
  49298. ],
  49299. 2112
  49300. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  49301. )) : vue.createCommentVNode("v-if", true)
  49302. ]),
  49303. vue.createElementVNode(
  49304. "view",
  49305. null,
  49306. "该商品正在参与" + vue.toDisplayString(activity.name) + "活动",
  49307. 1
  49308. /* TEXT */
  49309. )
  49310. ]),
  49311. vue.createElementVNode("button", {
  49312. class: "ss-reset-button activity-go",
  49313. onClick: ($event) => $setup.onActivity(activity)
  49314. }, " GO ", 8, ["onClick"])
  49315. ],
  49316. 2
  49317. /* CLASS */
  49318. )
  49319. ]);
  49320. }),
  49321. 128
  49322. /* KEYED_FRAGMENT */
  49323. ))
  49324. ])
  49325. ]),
  49326. _: 1
  49327. /* STABLE */
  49328. });
  49329. }
  49330. const detailActivityTip = /* @__PURE__ */ _export_sfc(_sfc_main$1O, [["render", _sfc_render$1N], ["__scopeId", "data-v-8e741228"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/goods/components/detail/detail-activity-tip.vue"]]);
  49331. const _sfc_main$1N = {
  49332. __name: "index",
  49333. setup(__props, { expose: __expose }) {
  49334. __expose();
  49335. onPageScroll(() => {
  49336. });
  49337. const state = vue.reactive({
  49338. goodsId: 0,
  49339. skeletonLoading: true,
  49340. // SPU 加载中
  49341. goodsInfo: {},
  49342. // SPU 信息
  49343. showSelectSku: false,
  49344. // 是否展示 SKU 选择弹窗
  49345. selectedSku: {},
  49346. // 选中的 SKU
  49347. showModel: false,
  49348. // 是否展示 Coupon 优惠劵的弹窗
  49349. couponInfo: [],
  49350. // 可领取的 Coupon 优惠劵的列表
  49351. showActivityModel: false,
  49352. // 【满减送/限时折扣】是否展示 Activity 营销活动的弹窗
  49353. activityInfo: [],
  49354. // 【满减送/限时折扣】可参与的 Activity 营销活动的列表
  49355. activityList: [],
  49356. // 【秒杀/拼团/砍价】可参与的 Activity 营销活动的列表
  49357. linkId: 0
  49358. // 分享时的id
  49359. });
  49360. function onSkuChange(e2) {
  49361. state.selectedSku = e2;
  49362. }
  49363. function onAddCart(e2) {
  49364. if (!e2.id) {
  49365. sheep$1.$helper.toast(t$6("common.select_product_options"));
  49366. return;
  49367. }
  49368. if (!isLogin.value) {
  49369. showAuthModal();
  49370. return;
  49371. }
  49372. sheep$1.$store("cart").add(e2);
  49373. }
  49374. function onBuy(e2) {
  49375. if (!state.selectedSku.id) {
  49376. sheep$1.$helper.toast(t$6("common.select_product_options"));
  49377. return;
  49378. }
  49379. sheep$1.$router.go("/pages/order/confirm", {
  49380. data: JSON.stringify({
  49381. items: [{
  49382. skuId: e2.id,
  49383. count: e2.goods_num
  49384. }],
  49385. spuType: state.goodsInfo.spuType,
  49386. spuPayType: state.goodsInfo.spuPayType,
  49387. highPrecision: state.goodsInfo.highPrecision,
  49388. // TODO 芋艿:后续清理掉这 2 参数
  49389. deliveryType: 1,
  49390. pointStatus: false
  49391. })
  49392. });
  49393. }
  49394. function onActivity() {
  49395. state.showActivityModel = true;
  49396. }
  49397. async function onGet(id) {
  49398. const {
  49399. code: code2
  49400. } = await CouponApi.takeCoupon(id);
  49401. if (code2 !== 0) {
  49402. return;
  49403. }
  49404. uni.showToast({
  49405. title: "领取成功"
  49406. });
  49407. setTimeout(() => {
  49408. getCoupon();
  49409. }, 1e3);
  49410. }
  49411. const shareInfo = vue.computed(() => {
  49412. if (lodashExports.isEmpty(state.goodsInfo))
  49413. return {};
  49414. return sheep$1.$platform.share.getShareInfo({
  49415. title: state.goodsInfo.name,
  49416. image: sheep$1.$url.cdn(state.goodsInfo.image),
  49417. desc: state.goodsInfo.subtitle,
  49418. params: {
  49419. page: "2"
  49420. // query: state.linkId,
  49421. }
  49422. }, {
  49423. type: "goods",
  49424. // 商品海报
  49425. title: state.goodsInfo.name,
  49426. // 商品标题
  49427. introduction: state.goodsInfo.introduction,
  49428. // image: sheep.$url.cdn(state.goodsInfo.image), // 商品主图
  49429. image: sheep$1.$url.cdn(state.goodsInfo.picUrl),
  49430. // 商品主图
  49431. price: fen2yuan(state.goodsInfo.price),
  49432. // 商品价格
  49433. original_price: fen2yuan(state.goodsInfo.maretPrice)
  49434. // 商品原价
  49435. });
  49436. });
  49437. async function getCoupon() {
  49438. const {
  49439. code: code2,
  49440. data
  49441. } = await CouponApi.getCouponTemplateList(state.goodsId, 2, 10);
  49442. if (code2 === 0) {
  49443. state.couponInfo = data;
  49444. }
  49445. }
  49446. async function getSpuDetail(id) {
  49447. SpuApi.getSpuDetail(id).then((res) => {
  49448. if (res.code !== 0 || !res.data) {
  49449. state.goodsInfo = null;
  49450. return;
  49451. }
  49452. state.skeletonLoading = false;
  49453. state.goodsInfo = res.data;
  49454. if (!isLogin.value) {
  49455. return;
  49456. }
  49457. FavoriteApi.isFavoriteExists(state.goodsId, "goods").then((res2) => {
  49458. if (res2.code !== 0) {
  49459. return;
  49460. }
  49461. state.goodsInfo.favorite = res2.data;
  49462. });
  49463. });
  49464. }
  49465. async function getLink() {
  49466. ShareApi.getLinkId(3, state.goodsId).then((res) => {
  49467. if (res.code !== 0) {
  49468. return;
  49469. }
  49470. state.linkId = res.data.linkId;
  49471. });
  49472. }
  49473. const isLogin = vue.computed(() => sheep$1.$store("user").isLogin);
  49474. vue.watch(() => isLogin.value, (newVal) => {
  49475. if (newVal) {
  49476. getSpuDetail(state.goodsId);
  49477. }
  49478. });
  49479. onLoad((options2) => {
  49480. if (!options2.id && !options2.linkId) {
  49481. state.goodsInfo = null;
  49482. return;
  49483. }
  49484. state.goodsId = options2.id || 0;
  49485. if (!options2.id && options2.linkId) {
  49486. formatAppLog("log", "at pages/goods/index.vue:325", "如果只是没有spuId有linkId的话 要去linkId对应的spuId");
  49487. const linkId = options2.linkId.toString();
  49488. ShareApi.getObjectIdByLinkId(linkId).then((res) => {
  49489. if (res.code !== 0) {
  49490. return;
  49491. }
  49492. state.goodsId = res.data;
  49493. getSpuDetail(state.goodsId);
  49494. getLink();
  49495. });
  49496. uni.setStorageSync("linkId", options2.linkId);
  49497. } else {
  49498. getSpuDetail(state.goodsId);
  49499. }
  49500. ActivityApi.getActivityListBySpuId(state.goodsId).then((res) => {
  49501. if (res.code !== 0) {
  49502. return;
  49503. }
  49504. res.data.forEach((activity) => {
  49505. if ([1, 2, 3].includes(activity.type)) {
  49506. state.activityList.push(activity);
  49507. } else if (activity.type === 5) {
  49508. state.activityInfo.push(activity);
  49509. } else
  49510. ;
  49511. });
  49512. });
  49513. });
  49514. const __returned__ = { state, onSkuChange, onAddCart, onBuy, onActivity, onGet, shareInfo, getCoupon, getSpuDetail, getLink, isLogin, reactive: vue.reactive, computed: vue.computed, provide: vue.provide, watchEffect: vue.watchEffect, watch: vue.watch, get onLoad() {
  49515. return onLoad;
  49516. }, get onPageScroll() {
  49517. return onPageScroll;
  49518. }, get sheep() {
  49519. return sheep$1;
  49520. }, get CouponApi() {
  49521. return CouponApi;
  49522. }, get ActivityApi() {
  49523. return ActivityApi;
  49524. }, get FavoriteApi() {
  49525. return FavoriteApi;
  49526. }, get formatSales() {
  49527. return formatSales;
  49528. }, get formatGoodsSwiper() {
  49529. return formatGoodsSwiper;
  49530. }, get fen2yuan() {
  49531. return fen2yuan;
  49532. }, get fen2yuan6() {
  49533. return fen2yuan6;
  49534. }, detailNavbar, detailCellSku, detailTabbar, detailSkeleton, detailCommentCard, detailContentCard, detailActivityTip, get isEmpty() {
  49535. return lodashExports.isEmpty;
  49536. }, get SpuApi() {
  49537. return SpuApi;
  49538. }, get ShareApi() {
  49539. return ShareApi;
  49540. }, get showAuthModal() {
  49541. return showAuthModal;
  49542. }, get t() {
  49543. return t$6;
  49544. } };
  49545. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  49546. return __returned__;
  49547. }
  49548. };
  49549. function _sfc_render$1M(_ctx, _cache, $props, $setup, $data, $options) {
  49550. const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6);
  49551. const _component_su_swiper = resolveEasycom(vue.resolveDynamicComponent("su-swiper"), __easycom_1$d);
  49552. const _component_s_select_sku = resolveEasycom(vue.resolveDynamicComponent("s-select-sku"), __easycom_2$2);
  49553. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  49554. return vue.openBlock(), vue.createElementBlock("view", null, [
  49555. vue.createVNode(_component_s_layout, {
  49556. onShareAppMessage: $setup.shareInfo,
  49557. navbar: "goods"
  49558. }, {
  49559. default: vue.withCtx(() => [
  49560. vue.createCommentVNode(" 标题栏 "),
  49561. vue.createVNode($setup["detailNavbar"], {
  49562. modelValue: $setup.state.goodsInfo,
  49563. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.state.goodsInfo = $event)
  49564. }, null, 8, ["modelValue"]),
  49565. vue.createCommentVNode(" 骨架屏 "),
  49566. $setup.state.skeletonLoading ? (vue.openBlock(), vue.createBlock($setup["detailSkeleton"], { key: 0 })) : $setup.state.goodsInfo === null ? (vue.openBlock(), vue.createElementBlock(
  49567. vue.Fragment,
  49568. { key: 1 },
  49569. [
  49570. vue.createCommentVNode(" 下架/售罄提醒 "),
  49571. vue.createVNode(_component_s_empty, {
  49572. text: "商品不存在或已下架",
  49573. icon: "/static/soldout-empty.png",
  49574. showAction: "",
  49575. actionText: "再逛逛",
  49576. actionUrl: "/pages/goods/list"
  49577. })
  49578. ],
  49579. 2112
  49580. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  49581. )) : (vue.openBlock(), vue.createElementBlock(
  49582. vue.Fragment,
  49583. { key: 2 },
  49584. [
  49585. vue.createElementVNode("view", { class: "detail-swiper-selector" }, [
  49586. vue.createCommentVNode(" 商品轮播图 "),
  49587. vue.createVNode(_component_su_swiper, {
  49588. class: "ss-m-b-14",
  49589. isPreview: "",
  49590. list: $setup.formatGoodsSwiper($setup.state.goodsInfo.sliderPicUrls),
  49591. otStyle: "tag",
  49592. imageMode: "widthFix",
  49593. dotCur: "bg-mask-40",
  49594. seizeHeight: 750
  49595. }, null, 8, ["list"]),
  49596. vue.createCommentVNode(" 价格+标题 "),
  49597. vue.createElementVNode("view", { class: "title-card detail-card ss-p-y-40 ss-p-x-20" }, [
  49598. vue.createElementVNode("view", { class: "ss-flex ss-row-between ss-col-center ss-m-b-26" }, [
  49599. vue.createElementVNode("view", { class: "price-box ss-flex ss-col-center" }, [
  49600. vue.createElementVNode("view", { class: "price-text ss-m-r-16 ss-flex ss-col-center" }, [
  49601. $setup.state.goodsInfo.spuPayType == 2 ? (vue.openBlock(), vue.createElementBlock("image", {
  49602. key: 0,
  49603. src: _imports_0$6,
  49604. class: "ss-m-r-10",
  49605. style: { "width": "40rpx", "height": "40rpx" }
  49606. })) : (vue.openBlock(), vue.createElementBlock("text", { key: 1 }, "¥")),
  49607. $setup.state.goodsInfo.highPrecision ? (vue.openBlock(), vue.createElementBlock(
  49608. "text",
  49609. { key: 2 },
  49610. vue.toDisplayString($setup.fen2yuan6($setup.state.selectedSku.highPrecisionPrice || $setup.state.goodsInfo.highPrecisionPrice)),
  49611. 1
  49612. /* TEXT */
  49613. )) : (vue.openBlock(), vue.createElementBlock(
  49614. "text",
  49615. { key: 3 },
  49616. vue.toDisplayString($setup.fen2yuan($setup.state.selectedSku.price || $setup.state.goodsInfo.price)),
  49617. 1
  49618. /* TEXT */
  49619. ))
  49620. ]),
  49621. $setup.state.goodsInfo.promotionFee >= 0 ? (vue.openBlock(), vue.createElementBlock(
  49622. "view",
  49623. {
  49624. key: 0,
  49625. class: "origin-price-text"
  49626. },
  49627. vue.toDisplayString(_ctx.$t("common.points")) + ":" + vue.toDisplayString($setup.fen2yuan($setup.state.selectedSku.promotionFee || $setup.state.goodsInfo.promotionFee)),
  49628. 1
  49629. /* TEXT */
  49630. )) : vue.createCommentVNode("v-if", true)
  49631. ]),
  49632. vue.createElementVNode(
  49633. "view",
  49634. { class: "sales-text" },
  49635. vue.toDisplayString($setup.formatSales("exact", $setup.state.goodsInfo.salesCount)),
  49636. 1
  49637. /* TEXT */
  49638. )
  49639. ]),
  49640. vue.createElementVNode("view", { class: "discounts-box ss-flex ss-row-between ss-m-b-28" }, [
  49641. vue.createCommentVNode(" 满减送/限时折扣活动的提示 "),
  49642. vue.createElementVNode("div", { class: "tag-content" }, [
  49643. vue.createElementVNode("view", { class: "tag-box ss-flex" }, [
  49644. (vue.openBlock(true), vue.createElementBlock(
  49645. vue.Fragment,
  49646. null,
  49647. vue.renderList($setup.state.activityInfo, (promos) => {
  49648. return vue.openBlock(), vue.createElementBlock(
  49649. "view",
  49650. {
  49651. class: "tag ss-m-r-10",
  49652. key: promos.id,
  49653. onClick: $setup.onActivity
  49654. },
  49655. vue.toDisplayString(promos.name),
  49656. 1
  49657. /* TEXT */
  49658. );
  49659. }),
  49660. 128
  49661. /* KEYED_FRAGMENT */
  49662. ))
  49663. ])
  49664. ]),
  49665. vue.createCommentVNode(" 优惠劵 "),
  49666. $setup.state.couponInfo.length ? (vue.openBlock(), vue.createElementBlock("view", {
  49667. key: 0,
  49668. class: "get-coupon-box ss-flex ss-col-center ss-m-l-20",
  49669. onClick: _cache[1] || (_cache[1] = ($event) => $setup.state.showModel = true)
  49670. }, [
  49671. vue.createElementVNode("view", { class: "discounts-title ss-m-r-8" }, "领券"),
  49672. vue.createElementVNode("text", { class: "cicon-forward" })
  49673. ])) : vue.createCommentVNode("v-if", true)
  49674. ]),
  49675. vue.createElementVNode(
  49676. "view",
  49677. { class: "title-text ss-line-2 ss-m-b-6" },
  49678. vue.toDisplayString($setup.state.goodsInfo.name),
  49679. 1
  49680. /* TEXT */
  49681. ),
  49682. vue.createElementVNode(
  49683. "view",
  49684. { class: "subtitle-text ss-line-1" },
  49685. vue.toDisplayString($setup.state.goodsInfo.introduction),
  49686. 1
  49687. /* TEXT */
  49688. )
  49689. ]),
  49690. vue.createCommentVNode(" 功能卡片 "),
  49691. vue.createElementVNode("view", { class: "detail-cell-card detail-card ss-flex-col" }, [
  49692. vue.createVNode($setup["detailCellSku"], {
  49693. modelValue: $setup.state.selectedSku.goods_sku_text,
  49694. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.selectedSku.goods_sku_text = $event),
  49695. sku: $setup.state.selectedSku,
  49696. onClick: _cache[3] || (_cache[3] = ($event) => $setup.state.showSelectSku = true)
  49697. }, null, 8, ["modelValue", "sku"])
  49698. ]),
  49699. vue.createCommentVNode(" 规格与数量弹框 "),
  49700. vue.createVNode(_component_s_select_sku, {
  49701. goodsInfo: $setup.state.goodsInfo,
  49702. show: $setup.state.showSelectSku,
  49703. onAddCart: $setup.onAddCart,
  49704. onBuy: $setup.onBuy,
  49705. onChange: $setup.onSkuChange,
  49706. onClose: _cache[4] || (_cache[4] = ($event) => $setup.state.showSelectSku = false)
  49707. }, null, 8, ["goodsInfo", "show"])
  49708. ]),
  49709. vue.createCommentVNode(" 评价 "),
  49710. vue.createVNode($setup["detailCommentCard"], {
  49711. class: "detail-comment-selector",
  49712. goodsId: $setup.state.goodsId
  49713. }, null, 8, ["goodsId"]),
  49714. vue.createCommentVNode(" 详情 "),
  49715. vue.createVNode($setup["detailContentCard"], {
  49716. class: "detail-content-selector",
  49717. content: $setup.state.goodsInfo.description
  49718. }, null, 8, ["content"]),
  49719. vue.createCommentVNode(" 活动跳转:拼团/秒杀/砍价活动 "),
  49720. vue.createCommentVNode(' <detail-activity-tip v-if="state.activityList.length > 0" :activity-list="state.activityList" /> '),
  49721. vue.createCommentVNode(" 详情 tabbar "),
  49722. vue.createVNode($setup["detailTabbar"], {
  49723. modelValue: $setup.state.goodsInfo,
  49724. "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $setup.state.goodsInfo = $event)
  49725. }, {
  49726. default: vue.withCtx(() => [
  49727. vue.createCommentVNode(" {{state.goodsInfo.spuType }} {{state.goodsInfo.spuPayType }} "),
  49728. vue.createCommentVNode(" 如果有库存并且不是积分商品和虚拟商品 可以加入购物车和购买 "),
  49729. $setup.state.goodsInfo.stock > 0 && $setup.state.goodsInfo.spuType && $setup.state.goodsInfo.spuPayType == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  49730. key: 0,
  49731. class: "buy-box ss-flex ss-col-center ss-p-r-20"
  49732. }, [
  49733. vue.createElementVNode(
  49734. "button",
  49735. {
  49736. class: "ss-reset-button add-btn ui-Shadow-Main",
  49737. onClick: _cache[5] || (_cache[5] = ($event) => $setup.state.showSelectSku = true)
  49738. },
  49739. vue.toDisplayString(_ctx.$t("common.add_to_cart")),
  49740. 1
  49741. /* TEXT */
  49742. ),
  49743. vue.createElementVNode(
  49744. "button",
  49745. {
  49746. class: "ss-reset-button buy-btn ui-Shadow-Main",
  49747. onClick: _cache[6] || (_cache[6] = ($event) => $setup.state.showSelectSku = true)
  49748. },
  49749. vue.toDisplayString(_ctx.$t("common.buy_now")),
  49750. 1
  49751. /* TEXT */
  49752. )
  49753. ])) : $setup.state.goodsInfo.stock > 0 && $setup.state.goodsInfo.spuPayType != 1 || !$setup.state.goodsInfo.spuType ? (vue.openBlock(), vue.createElementBlock("view", {
  49754. key: 1,
  49755. class: "buy-box ss-flex ss-col-center ss-p-r-20"
  49756. }, [
  49757. vue.createElementVNode("button", {
  49758. class: "ss-reset-button disabled-btn buy-btn ui-Shadow-Main",
  49759. onClick: _cache[7] || (_cache[7] = ($event) => $setup.state.showSelectSku = true)
  49760. }, [
  49761. $setup.state.goodsInfo.spuPayType != 1 && !$setup.state.goodsInfo.spuType ? (vue.openBlock(), vue.createElementBlock(
  49762. vue.Fragment,
  49763. { key: 0 },
  49764. [
  49765. vue.createTextVNode(
  49766. vue.toDisplayString(_ctx.$t("common.redeem_now")),
  49767. 1
  49768. /* TEXT */
  49769. )
  49770. ],
  49771. 64
  49772. /* STABLE_FRAGMENT */
  49773. )) : !$setup.state.goodsInfo.spuType ? (vue.openBlock(), vue.createElementBlock(
  49774. vue.Fragment,
  49775. { key: 1 },
  49776. [
  49777. vue.createTextVNode(
  49778. vue.toDisplayString(_ctx.$t("common.buy_now")),
  49779. 1
  49780. /* TEXT */
  49781. )
  49782. ],
  49783. 64
  49784. /* STABLE_FRAGMENT */
  49785. )) : (vue.openBlock(), vue.createElementBlock(
  49786. vue.Fragment,
  49787. { key: 2 },
  49788. [
  49789. vue.createTextVNode(
  49790. vue.toDisplayString(_ctx.$t("common.redeem_now")),
  49791. 1
  49792. /* TEXT */
  49793. )
  49794. ],
  49795. 64
  49796. /* STABLE_FRAGMENT */
  49797. ))
  49798. ])
  49799. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  49800. key: 2,
  49801. class: "buy-box ss-flex ss-col-center ss-p-r-20"
  49802. }, [
  49803. vue.createElementVNode(
  49804. "button",
  49805. {
  49806. class: "ss-reset-button disabled-btn",
  49807. disabled: "",
  49808. style: { "background": "#999999" }
  49809. },
  49810. vue.toDisplayString(_ctx.$t("common.sold_out")),
  49811. 1
  49812. /* TEXT */
  49813. )
  49814. ]))
  49815. ]),
  49816. _: 1
  49817. /* STABLE */
  49818. }, 8, ["modelValue"]),
  49819. vue.createCommentVNode(" 优惠劵弹窗 "),
  49820. vue.createCommentVNode(' <s-coupon-get v-model="state.couponInfo" :show="state.showModel" @close="state.showModel = false"\n @get="onGet" /> '),
  49821. vue.createCommentVNode(" 满减送/限时折扣活动弹窗 "),
  49822. vue.createCommentVNode(' <s-activity-pop v-model="state.activityInfo" :show="state.showActivityModel"\n @close="state.showActivityModel = false" /> ')
  49823. ],
  49824. 64
  49825. /* STABLE_FRAGMENT */
  49826. ))
  49827. ]),
  49828. _: 1
  49829. /* STABLE */
  49830. }, 8, ["onShareAppMessage"])
  49831. ]);
  49832. }
  49833. const PagesGoodsIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1N, [["render", _sfc_render$1M], ["__scopeId", "data-v-24a31e85"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/goods/index.vue"]]);
  49834. const _sfc_main$1M = {
  49835. __name: "s-select-groupon-sku",
  49836. props: {
  49837. show: {
  49838. type: Boolean,
  49839. default: false
  49840. },
  49841. goodsInfo: {
  49842. type: Object,
  49843. default() {
  49844. }
  49845. },
  49846. grouponAction: {
  49847. type: String,
  49848. default: "create"
  49849. },
  49850. grouponNum: {
  49851. type: [Number, String],
  49852. default: 0
  49853. }
  49854. },
  49855. emits: ["change", "addCart", "buy", "close", "ladder"],
  49856. setup(__props, { expose: __expose, emit: __emit }) {
  49857. __expose();
  49858. vue.useCssVars((_ctx) => ({
  49859. "f77ace9d-headerBg": vue.unref(headerBg)
  49860. }));
  49861. const headerBg = sheep$1.$url.css("/static/images/groupon-btn-long.png");
  49862. const emits = __emit;
  49863. const props = __props;
  49864. const state = vue.reactive({
  49865. selectedSku: {},
  49866. // 选中的 SKU
  49867. currentPropertyArray: [],
  49868. // 当前选中的属性,实际是个 Map。key 是 property 编号,value 是 value 编号
  49869. grouponNum: props.grouponNum
  49870. });
  49871. const propertyList = convertProductPropertyList(props.goodsInfo.skus);
  49872. const skuList = vue.computed(() => {
  49873. let skuPrices = props.goodsInfo.skus;
  49874. for (let price of skuPrices) {
  49875. price.value_id_array = price.properties.map((item) => item.valueId);
  49876. }
  49877. return skuPrices;
  49878. });
  49879. vue.watch(
  49880. () => state.selectedSku,
  49881. (newVal) => {
  49882. emits("change", newVal);
  49883. },
  49884. {
  49885. immediate: true,
  49886. // 立即执行
  49887. deep: true
  49888. // 深度监听
  49889. }
  49890. );
  49891. function onNumberChange(e2) {
  49892. if (e2 === 0)
  49893. return;
  49894. if (state.selectedSku.count === e2)
  49895. return;
  49896. state.selectedSku.count = e2;
  49897. }
  49898. function onBuy() {
  49899. if (!state.selectedSku.id || state.selectedSku.id <= 0) {
  49900. sheep$1.$helper.toast("请选择规格");
  49901. return;
  49902. }
  49903. if (state.selectedSku.stock <= 0) {
  49904. sheep$1.$helper.toast("库存不足");
  49905. return;
  49906. }
  49907. emits("buy", state.selectedSku);
  49908. }
  49909. function changeDisabled(isChecked = false, propertyId = 0, valueId = 0) {
  49910. let newSkus = [];
  49911. if (isChecked) {
  49912. for (let price of skuList.value) {
  49913. if (price.stock <= 0) {
  49914. continue;
  49915. }
  49916. if (price.value_id_array.indexOf(valueId) >= 0) {
  49917. newSkus.push(price);
  49918. }
  49919. }
  49920. } else {
  49921. newSkus = getCanUseSkuList();
  49922. }
  49923. let noChooseValueIds = [];
  49924. for (let price of newSkus) {
  49925. noChooseValueIds = noChooseValueIds.concat(price.value_id_array);
  49926. }
  49927. noChooseValueIds = Array.from(new Set(noChooseValueIds));
  49928. if (isChecked) {
  49929. let index2 = noChooseValueIds.indexOf(valueId);
  49930. noChooseValueIds.splice(index2, 1);
  49931. } else {
  49932. state.currentPropertyArray.forEach((currentPropertyId) => {
  49933. if (currentPropertyId.toString() !== "") {
  49934. return;
  49935. }
  49936. let index2 = noChooseValueIds.indexOf(currentPropertyId);
  49937. if (index2 >= 0) {
  49938. noChooseValueIds.splice(index2, 1);
  49939. }
  49940. });
  49941. }
  49942. let choosePropertyIds = [];
  49943. if (!isChecked) {
  49944. state.currentPropertyArray.forEach((currentPropertyId, currentValueId) => {
  49945. if (currentPropertyId !== "") {
  49946. choosePropertyIds.push(currentValueId);
  49947. }
  49948. });
  49949. } else {
  49950. choosePropertyIds = [propertyId];
  49951. }
  49952. for (let propertyIndex in propertyList) {
  49953. if (choosePropertyIds.indexOf(propertyList[propertyIndex]["id"]) >= 0) {
  49954. continue;
  49955. }
  49956. for (let valueIndex in propertyList[propertyIndex]["values"]) {
  49957. propertyList[propertyIndex]["values"][valueIndex]["disabled"] = noChooseValueIds.indexOf(propertyList[propertyIndex]["values"][valueIndex]["id"]) < 0;
  49958. }
  49959. }
  49960. }
  49961. function getCanUseSkuList() {
  49962. let newSkus = [];
  49963. for (let sku of skuList.value) {
  49964. if (sku.stock <= 0) {
  49965. continue;
  49966. }
  49967. let isOk = true;
  49968. state.currentPropertyArray.forEach((propertyId) => {
  49969. if (propertyId.toString() !== "" && sku.value_id_array.indexOf(propertyId) < 0) {
  49970. isOk = false;
  49971. }
  49972. });
  49973. if (isOk) {
  49974. newSkus.push(sku);
  49975. }
  49976. }
  49977. return newSkus;
  49978. }
  49979. function onSelectSku(propertyId, valueId) {
  49980. let isChecked = true;
  49981. if (state.currentPropertyArray[propertyId] !== void 0 && state.currentPropertyArray[propertyId] === valueId) {
  49982. isChecked = false;
  49983. state.currentPropertyArray.splice(propertyId, 1, "");
  49984. } else {
  49985. state.currentPropertyArray[propertyId] = valueId;
  49986. }
  49987. let choosePropertyId = [];
  49988. state.currentPropertyArray.forEach((currentPropertyId) => {
  49989. if (currentPropertyId !== "") {
  49990. choosePropertyId.push(currentPropertyId);
  49991. }
  49992. });
  49993. let newSkuList = getCanUseSkuList();
  49994. if (choosePropertyId.length === propertyList.length && newSkuList.length) {
  49995. newSkuList[0].count = state.selectedSku.count || 1;
  49996. state.selectedSku = newSkuList[0];
  49997. } else {
  49998. state.selectedSku = {};
  49999. }
  50000. changeDisabled(isChecked, propertyId, valueId);
  50001. }
  50002. changeDisabled(false);
  50003. const __returned__ = { headerBg, emits, props, state, propertyList, skuList, onNumberChange, onBuy, changeDisabled, getCanUseSkuList, onSelectSku, computed: vue.computed, reactive: vue.reactive, watch: vue.watch, get sheep() {
  50004. return sheep$1;
  50005. }, get convertProductPropertyList() {
  50006. return convertProductPropertyList;
  50007. }, get fen2yuan() {
  50008. return fen2yuan;
  50009. } };
  50010. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  50011. return __returned__;
  50012. }
  50013. };
  50014. function _sfc_render$1L(_ctx, _cache, $props, $setup, $data, $options) {
  50015. const _component_su_number_box = resolveEasycom(vue.resolveDynamicComponent("su-number-box"), __easycom_0$b);
  50016. const _component_su_popup = resolveEasycom(vue.resolveDynamicComponent("su-popup"), __easycom_4$3);
  50017. return vue.openBlock(), vue.createElementBlock(
  50018. vue.Fragment,
  50019. null,
  50020. [
  50021. vue.createCommentVNode(" 拼团商品规格弹窗 "),
  50022. vue.createVNode(_component_su_popup, {
  50023. show: $props.show,
  50024. round: "10",
  50025. onClose: _cache[2] || (_cache[2] = ($event) => $setup.emits("close"))
  50026. }, {
  50027. default: vue.withCtx(() => [
  50028. vue.createCommentVNode(" SKU 信息 "),
  50029. vue.createElementVNode("view", { class: "ss-modal-box bg-white ss-flex-col" }, [
  50030. vue.createElementVNode("view", { class: "modal-header ss-flex ss-col-center" }, [
  50031. vue.createElementVNode("view", { class: "header-left ss-m-r-30" }, [
  50032. vue.createElementVNode("image", {
  50033. class: "sku-image",
  50034. src: $setup.sheep.$url.cdn($setup.state.selectedSku.picUrl || $props.goodsInfo.picUrl),
  50035. mode: "aspectFill"
  50036. }, null, 8, ["src"])
  50037. ]),
  50038. vue.createElementVNode("view", { class: "header-right ss-flex-col ss-row-between ss-flex-1" }, [
  50039. vue.createElementVNode("view", { class: "goods-title ss-line-2" }, [
  50040. vue.createElementVNode("view", { class: "tig ss-flex ss-col-center" }, [
  50041. vue.createElementVNode("view", { class: "tig-icon ss-flex ss-col-center ss-row-center" }, [
  50042. vue.createElementVNode("view", { class: "groupon-tag" }, [
  50043. vue.createElementVNode("image", {
  50044. src: $setup.sheep.$url.static("/static/images/groupon-tag-white.png")
  50045. }, null, 8, ["src"])
  50046. ])
  50047. ]),
  50048. vue.createElementVNode("view", { class: "tig-title" }, "拼团价")
  50049. ]),
  50050. vue.createElementVNode(
  50051. "view",
  50052. { class: "info-title" },
  50053. vue.toDisplayString($props.goodsInfo.name),
  50054. 1
  50055. /* TEXT */
  50056. )
  50057. ]),
  50058. vue.createElementVNode("view", { class: "header-right-bottom ss-flex ss-col-center ss-row-between" }, [
  50059. vue.createElementVNode(
  50060. "view",
  50061. { class: "price-text" },
  50062. vue.toDisplayString($setup.fen2yuan($props.goodsInfo.price)),
  50063. 1
  50064. /* TEXT */
  50065. ),
  50066. vue.createElementVNode(
  50067. "view",
  50068. { class: "stock-text ss-m-l-20" },
  50069. " 库存" + vue.toDisplayString($setup.state.selectedSku.stock || $props.goodsInfo.stock) + "件 ",
  50070. 1
  50071. /* TEXT */
  50072. )
  50073. ])
  50074. ])
  50075. ]),
  50076. vue.createElementVNode("view", { class: "modal-content ss-flex-1" }, [
  50077. vue.createElementVNode("scroll-view", {
  50078. "scroll-y": "true",
  50079. class: "modal-content-scroll"
  50080. }, [
  50081. (vue.openBlock(true), vue.createElementBlock(
  50082. vue.Fragment,
  50083. null,
  50084. vue.renderList($setup.propertyList, (property) => {
  50085. return vue.openBlock(), vue.createElementBlock("view", {
  50086. class: "sku-item ss-m-b-20",
  50087. key: property.id
  50088. }, [
  50089. vue.createElementVNode(
  50090. "view",
  50091. { class: "label-text ss-m-b-20" },
  50092. vue.toDisplayString(property.name),
  50093. 1
  50094. /* TEXT */
  50095. ),
  50096. vue.createElementVNode("view", { class: "ss-flex ss-col-center ss-flex-wrap" }, [
  50097. (vue.openBlock(true), vue.createElementBlock(
  50098. vue.Fragment,
  50099. null,
  50100. vue.renderList(property.values, (value) => {
  50101. return vue.openBlock(), vue.createElementBlock("button", {
  50102. class: vue.normalizeClass(["ss-reset-button spec-btn", [
  50103. {
  50104. "checked-btn": $setup.state.currentPropertyArray[property.id] === value.id
  50105. },
  50106. {
  50107. "disabled-btn": value.disabled === true
  50108. }
  50109. ]]),
  50110. key: value.id,
  50111. disabled: value.disabled === true,
  50112. onClick: ($event) => $setup.onSelectSku(property.id, value.id)
  50113. }, vue.toDisplayString(value.name), 11, ["disabled", "onClick"]);
  50114. }),
  50115. 128
  50116. /* KEYED_FRAGMENT */
  50117. ))
  50118. ])
  50119. ]);
  50120. }),
  50121. 128
  50122. /* KEYED_FRAGMENT */
  50123. )),
  50124. vue.createElementVNode("view", { class: "buy-num-box ss-flex ss-col-center ss-row-between" }, [
  50125. vue.createElementVNode("view", { class: "label-text" }, "购买数量"),
  50126. vue.createVNode(_component_su_number_box, {
  50127. min: 1,
  50128. max: $setup.state.selectedSku.stock,
  50129. step: 1,
  50130. modelValue: $setup.state.selectedSku.count,
  50131. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.state.selectedSku.count = $event),
  50132. onChange: _cache[1] || (_cache[1] = ($event) => $setup.onNumberChange($event)),
  50133. activity: "groupon"
  50134. }, null, 8, ["max", "modelValue"])
  50135. ])
  50136. ])
  50137. ]),
  50138. vue.createCommentVNode(" 操作区 "),
  50139. vue.createElementVNode("view", { class: "modal-footer ss-p-y-20" }, [
  50140. vue.createElementVNode("view", { class: "buy-box ss-flex ss-col-center ss-flex ss-col-center ss-row-center" }, [
  50141. vue.createElementVNode("view", { class: "ss-flex" }, [
  50142. vue.createElementVNode("button", { class: "ss-reset-button origin-price-btn ss-flex-col" }, [
  50143. vue.createElementVNode(
  50144. "view",
  50145. { class: "btn-title" },
  50146. vue.toDisplayString($props.grouponNum + "人团"),
  50147. 1
  50148. /* TEXT */
  50149. )
  50150. ]),
  50151. vue.createElementVNode("button", {
  50152. class: "ss-reset-button btn-tox ss-flex-col",
  50153. onClick: $setup.onBuy
  50154. }, [
  50155. vue.createElementVNode(
  50156. "view",
  50157. { class: "btn-price" },
  50158. vue.toDisplayString($setup.fen2yuan($props.goodsInfo.price)),
  50159. 1
  50160. /* TEXT */
  50161. ),
  50162. $props.grouponAction === "create" ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, "立即开团")) : $props.grouponAction === "join" ? (vue.openBlock(), vue.createElementBlock("view", { key: 1 }, "参与拼团")) : vue.createCommentVNode("v-if", true)
  50163. ])
  50164. ])
  50165. ])
  50166. ])
  50167. ])
  50168. ]),
  50169. _: 1
  50170. /* STABLE */
  50171. }, 8, ["show"])
  50172. ],
  50173. 2112
  50174. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  50175. );
  50176. }
  50177. const __easycom_1$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1M, [["render", _sfc_render$1L], ["__scopeId", "data-v-f77ace9d"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-select-groupon-sku/s-select-groupon-sku.vue"]]);
  50178. const _sfc_main$1L = {
  50179. __name: "groupon-card-list",
  50180. props: {
  50181. modelValue: {
  50182. type: Object,
  50183. default() {
  50184. }
  50185. }
  50186. },
  50187. emits: ["join"],
  50188. setup(__props, { expose: __expose, emit: __emit }) {
  50189. __expose();
  50190. const props = __props;
  50191. const state = vue.reactive({
  50192. list: []
  50193. });
  50194. const emits = __emit;
  50195. function onJoinGroupon(record) {
  50196. emits("join", record);
  50197. }
  50198. function endTime(time2) {
  50199. const durationTime = useDurationTime(time2);
  50200. if (durationTime.ms <= 0) {
  50201. return "该团已解散";
  50202. }
  50203. let timeText = "剩余 ";
  50204. timeText += `${durationTime.h}时`;
  50205. timeText += `${durationTime.m}分`;
  50206. timeText += `${durationTime.s}秒`;
  50207. return timeText;
  50208. }
  50209. vue.onMounted(async () => {
  50210. const { data } = await CombinationApi.getHeadCombinationRecordList(props.modelValue.id, 0, 10);
  50211. state.list = data;
  50212. });
  50213. const __returned__ = { props, state, emits, onJoinGroupon, endTime, onMounted: vue.onMounted, reactive: vue.reactive, get sheep() {
  50214. return sheep$1;
  50215. }, get useDurationTime() {
  50216. return useDurationTime;
  50217. }, get CombinationApi() {
  50218. return CombinationApi;
  50219. } };
  50220. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  50221. return __returned__;
  50222. }
  50223. };
  50224. function _sfc_render$1K(_ctx, _cache, $props, $setup, $data, $options) {
  50225. return $setup.state.list.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  50226. key: 0,
  50227. class: "groupon-list detail-card ss-p-x-20"
  50228. }, [
  50229. vue.createElementVNode("view", { class: "join-activity ss-flex ss-row-between ss-m-t-30" }, [
  50230. vue.createCommentVNode(" todo: 接口缺少总数 "),
  50231. vue.createElementVNode(
  50232. "view",
  50233. { class: "" },
  50234. "已有" + vue.toDisplayString($setup.state.list.length) + "人参与活动",
  50235. 1
  50236. /* TEXT */
  50237. ),
  50238. vue.createElementVNode("text", { class: "cicon-forward" })
  50239. ]),
  50240. (vue.openBlock(true), vue.createElementBlock(
  50241. vue.Fragment,
  50242. null,
  50243. vue.renderList($setup.state.list, (record, index2) => {
  50244. return vue.openBlock(), vue.createElementBlock("view", {
  50245. onClick: ($event) => $setup.sheep.$router.go("/pages/activity/groupon/detail", { id: record.id }),
  50246. key: index2,
  50247. class: "ss-m-t-40 ss-flex ss-row-between border-bottom ss-p-b-30"
  50248. }, [
  50249. vue.createElementVNode("view", { class: "ss-flex ss-col-center" }, [
  50250. vue.createElementVNode("image", {
  50251. src: $setup.sheep.$url.cdn(record.avatar),
  50252. class: "user-avatar"
  50253. }, null, 8, ["src"]),
  50254. vue.createElementVNode(
  50255. "view",
  50256. { class: "user-nickname ss-m-l-20 ss-line-1" },
  50257. vue.toDisplayString(record.nickname),
  50258. 1
  50259. /* TEXT */
  50260. )
  50261. ]),
  50262. vue.createElementVNode("view", { class: "ss-flex ss-col-center" }, [
  50263. vue.createElementVNode("view", { class: "ss-flex-col ss-col-bottom ss-m-r-20" }, [
  50264. vue.createElementVNode("view", { class: "title ss-flex ss-m-b-14" }, [
  50265. vue.createTextVNode(" 还差 "),
  50266. vue.createElementVNode(
  50267. "view",
  50268. { class: "num" },
  50269. vue.toDisplayString(record.userSize - record.userCount) + "人",
  50270. 1
  50271. /* TEXT */
  50272. ),
  50273. vue.createTextVNode(" 成团 ")
  50274. ]),
  50275. vue.createElementVNode(
  50276. "view",
  50277. { class: "end-time" },
  50278. vue.toDisplayString($setup.endTime(record.expireTime)),
  50279. 1
  50280. /* TEXT */
  50281. )
  50282. ]),
  50283. vue.createElementVNode("view", { class: "" }, [
  50284. vue.createElementVNode("button", {
  50285. class: "ss-reset-button go-btn",
  50286. onClick: vue.withModifiers(($event) => $setup.onJoinGroupon(record), ["stop"])
  50287. }, " 去参团 ", 8, ["onClick"])
  50288. ])
  50289. ])
  50290. ], 8, ["onClick"]);
  50291. }),
  50292. 128
  50293. /* KEYED_FRAGMENT */
  50294. ))
  50295. ])) : vue.createCommentVNode("v-if", true);
  50296. }
  50297. const grouponCardList = /* @__PURE__ */ _export_sfc(_sfc_main$1L, [["render", _sfc_render$1K], ["__scopeId", "data-v-2bb0fe2d"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/goods/components/groupon/groupon-card-list.vue"]]);
  50298. const _sfc_main$1K = {
  50299. __name: "groupon",
  50300. setup(__props, { expose: __expose }) {
  50301. __expose();
  50302. vue.useCssVars((_ctx) => ({
  50303. "efe71281-headerBg": vue.unref(headerBg),
  50304. "efe71281-btnBg": vue.unref(btnBg),
  50305. "efe71281-disabledBtnBg": vue.unref(disabledBtnBg),
  50306. "efe71281-grouponBg": vue.unref(grouponBg)
  50307. }));
  50308. const headerBg = sheep$1.$url.css("/static/images/groupon-bg.png");
  50309. const btnBg = sheep$1.$url.css("/static/images/groupon-btn.png");
  50310. const disabledBtnBg = sheep$1.$url.css(
  50311. "/static/images/activity-btn-disabled.png"
  50312. );
  50313. const grouponBg = sheep$1.$url.css("/static/images/groupon-tip-bg.png");
  50314. onPageScroll(() => {
  50315. });
  50316. const state = vue.reactive({
  50317. skeletonLoading: true,
  50318. // 骨架屏
  50319. goodsId: 0,
  50320. // 商品ID
  50321. goodsInfo: {},
  50322. // 商品信息
  50323. goodsSwiper: [],
  50324. // 商品轮播图
  50325. showSelectSku: false,
  50326. // 显示规格弹框
  50327. selectedSkuPrice: {},
  50328. // 选中的规格价格
  50329. activity: {},
  50330. // 团购活动
  50331. grouponId: 0,
  50332. // 团购ID
  50333. grouponNum: 0,
  50334. // 团购人数
  50335. grouponAction: "create",
  50336. // 团购操作
  50337. combinationHeadId: null
  50338. // 拼团团长编号
  50339. });
  50340. const endTime = vue.computed(() => {
  50341. return useDurationTime(state.activity.endTime);
  50342. });
  50343. function onSkuChange(e2) {
  50344. state.selectedSkuPrice = e2;
  50345. }
  50346. function onSkuClose() {
  50347. state.showSelectSku = false;
  50348. }
  50349. function onCreateGroupon() {
  50350. state.grouponAction = "create";
  50351. state.grouponId = 0;
  50352. state.showSelectSku = true;
  50353. }
  50354. function onJoinGroupon(record) {
  50355. state.grouponAction = "join";
  50356. state.grouponId = record.activityId;
  50357. state.combinationHeadId = record.id;
  50358. state.grouponNum = record.userSize;
  50359. state.showSelectSku = true;
  50360. }
  50361. function onBuy(sku) {
  50362. sheep$1.$router.go("/pages/order/confirm", {
  50363. data: JSON.stringify({
  50364. order_type: "goods",
  50365. combinationActivityId: state.activity.id,
  50366. combinationHeadId: state.combinationHeadId,
  50367. items: [
  50368. {
  50369. skuId: sku.id,
  50370. count: sku.count
  50371. }
  50372. ]
  50373. })
  50374. });
  50375. }
  50376. const shareInfo = vue.computed(() => {
  50377. if (lodashExports.isEmpty(state.activity))
  50378. return {};
  50379. return sheep$1.$platform.share.getShareInfo(
  50380. {
  50381. title: state.activity.name,
  50382. image: sheep$1.$url.cdn(state.goodsInfo.picUrl),
  50383. params: {
  50384. page: "3",
  50385. query: state.activity.id
  50386. }
  50387. },
  50388. {
  50389. type: "goods",
  50390. // 商品海报
  50391. title: state.activity.name,
  50392. // 商品标题
  50393. image: sheep$1.$url.cdn(state.goodsInfo.picUrl),
  50394. // 商品主图
  50395. price: fen2yuan(state.goodsInfo.price),
  50396. // 商品价格
  50397. marketPrice: fen2yuan(state.goodsInfo.marketPrice)
  50398. // 商品原价
  50399. }
  50400. );
  50401. });
  50402. onLoad(async (options2) => {
  50403. if (!options2.id) {
  50404. state.goodsInfo = null;
  50405. return;
  50406. }
  50407. state.grouponId = options2.id;
  50408. const { code: code2, data: activity } = await CombinationApi.getCombinationActivity(state.grouponId);
  50409. state.activity = activity;
  50410. const { data: spu } = await SpuApi.getSpuDetail(activity.spuId);
  50411. state.goodsId = spu.id;
  50412. activity.products.forEach((product) => {
  50413. spu.price = Math.min(spu.price, product.combinationPrice);
  50414. });
  50415. state.skeletonLoading = false;
  50416. if (code2 === 0) {
  50417. state.goodsInfo = spu;
  50418. state.grouponNum = activity.userSize;
  50419. state.goodsSwiper = formatGoodsSwiper(state.goodsInfo.sliderPicUrls);
  50420. } else {
  50421. state.goodsInfo = null;
  50422. }
  50423. });
  50424. const __returned__ = { headerBg, btnBg, disabledBtnBg, grouponBg, state, endTime, onSkuChange, onSkuClose, onCreateGroupon, onJoinGroupon, onBuy, shareInfo, reactive: vue.reactive, computed: vue.computed, get onLoad() {
  50425. return onLoad;
  50426. }, get onPageScroll() {
  50427. return onPageScroll;
  50428. }, get sheep() {
  50429. return sheep$1;
  50430. }, get isEmpty() {
  50431. return lodashExports.isEmpty;
  50432. }, detailNavbar, detailCellSku, detailTabbar, detailSkeleton, detailCommentCard, detailContentCard, grouponCardList, get useDurationTime() {
  50433. return useDurationTime;
  50434. }, get formatGoodsSwiper() {
  50435. return formatGoodsSwiper;
  50436. }, get fen2yuan() {
  50437. return fen2yuan;
  50438. }, get CombinationApi() {
  50439. return CombinationApi;
  50440. }, get SpuApi() {
  50441. return SpuApi;
  50442. } };
  50443. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  50444. return __returned__;
  50445. }
  50446. };
  50447. function _sfc_render$1J(_ctx, _cache, $props, $setup, $data, $options) {
  50448. const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6);
  50449. const _component_su_swiper = resolveEasycom(vue.resolveDynamicComponent("su-swiper"), __easycom_1$d);
  50450. const _component_s_select_groupon_sku = resolveEasycom(vue.resolveDynamicComponent("s-select-groupon-sku"), __easycom_1$1);
  50451. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  50452. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  50453. onShareAppMessage: $setup.shareInfo,
  50454. navbar: "goods"
  50455. }, {
  50456. default: vue.withCtx(() => [
  50457. vue.createCommentVNode(" 标题栏 "),
  50458. vue.createVNode($setup["detailNavbar"]),
  50459. vue.createCommentVNode(" 骨架屏 "),
  50460. $setup.state.skeletonLoading ? (vue.openBlock(), vue.createBlock($setup["detailSkeleton"], { key: 0 })) : $setup.state.goodsInfo === null || $setup.state.activity.status !== 0 || $setup.state.activity.endTime < (/* @__PURE__ */ new Date()).getTime() ? (vue.openBlock(), vue.createElementBlock(
  50461. vue.Fragment,
  50462. { key: 1 },
  50463. [
  50464. vue.createCommentVNode(" 下架/售罄提醒 "),
  50465. vue.createVNode(_component_s_empty, {
  50466. text: "活动不存在或已结束",
  50467. icon: "/static/soldout-empty.png",
  50468. showAction: "",
  50469. actionText: "返回上一页",
  50470. onClickAction: _cache[0] || (_cache[0] = ($event) => $setup.sheep.$router.back())
  50471. })
  50472. ],
  50473. 2112
  50474. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  50475. )) : (vue.openBlock(), vue.createElementBlock(
  50476. vue.Fragment,
  50477. { key: 2 },
  50478. [
  50479. vue.createElementVNode("view", { class: "detail-swiper-selector" }, [
  50480. vue.createCommentVNode(" 商品图轮播 "),
  50481. vue.createVNode(_component_su_swiper, {
  50482. class: "ss-m-b-14",
  50483. isPreview: "",
  50484. list: $setup.state.goodsSwiper,
  50485. dotStyle: "tag",
  50486. imageMode: "widthFix",
  50487. dotCur: "bg-mask-40",
  50488. seizeHeight: 750
  50489. }, null, 8, ["list"]),
  50490. vue.createCommentVNode(" 价格+标题 "),
  50491. vue.createElementVNode("view", { class: "title-card detail-card ss-m-y-14 ss-m-x-20 ss-p-x-20 ss-p-y-34" }, [
  50492. vue.createElementVNode("view", { class: "ss-flex ss-row-between ss-m-b-60" }, [
  50493. vue.createElementVNode("view", null, [
  50494. vue.createElementVNode("view", { class: "price-box ss-flex ss-col-bottom ss-m-b-18" }, [
  50495. vue.createElementVNode(
  50496. "view",
  50497. { class: "price-text ss-m-r-16" },
  50498. vue.toDisplayString($setup.fen2yuan($setup.state.activity.price || $setup.state.goodsInfo.price)),
  50499. 1
  50500. /* TEXT */
  50501. ),
  50502. vue.createElementVNode("view", { class: "tig ss-flex ss-col-center" }, [
  50503. vue.createElementVNode("view", { class: "tig-icon ss-flex ss-col-center ss-row-center" }, [
  50504. vue.createElementVNode("view", { class: "groupon-tag" }, [
  50505. vue.createElementVNode("image", {
  50506. src: $setup.sheep.$url.static("/static/images/groupon-tag.png")
  50507. }, null, 8, ["src"])
  50508. ])
  50509. ]),
  50510. vue.createElementVNode("view", { class: "tig-title" }, "拼团价")
  50511. ])
  50512. ]),
  50513. vue.createElementVNode("view", { class: "ss-flex ss-row-between" }, [
  50514. $setup.state.goodsInfo.price ? (vue.openBlock(), vue.createElementBlock("view", {
  50515. key: 0,
  50516. class: "origin-price ss-flex ss-col-center"
  50517. }, [
  50518. vue.createTextVNode(" 单买价: "),
  50519. vue.createElementVNode(
  50520. "view",
  50521. { class: "origin-price-text" },
  50522. vue.toDisplayString($setup.fen2yuan($setup.state.goodsInfo.price)),
  50523. 1
  50524. /* TEXT */
  50525. )
  50526. ])) : vue.createCommentVNode("v-if", true)
  50527. ])
  50528. ]),
  50529. $setup.endTime.ms > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  50530. key: 0,
  50531. class: "countdown-box"
  50532. }, [
  50533. vue.createElementVNode("view", { class: "countdown-title ss-m-b-20" }, "距结束仅剩"),
  50534. vue.createElementVNode("view", { class: "ss-flex countdown-time" }, [
  50535. vue.createElementVNode(
  50536. "view",
  50537. { class: "ss-flex countdown-h" },
  50538. vue.toDisplayString($setup.endTime.h),
  50539. 1
  50540. /* TEXT */
  50541. ),
  50542. vue.createElementVNode("view", { class: "ss-m-x-4" }, ":"),
  50543. vue.createElementVNode(
  50544. "view",
  50545. { class: "countdown-num ss-flex ss-row-center" },
  50546. vue.toDisplayString($setup.endTime.m),
  50547. 1
  50548. /* TEXT */
  50549. ),
  50550. vue.createElementVNode("view", { class: "ss-m-x-4" }, ":"),
  50551. vue.createElementVNode(
  50552. "view",
  50553. { class: "countdown-num ss-flex ss-row-center" },
  50554. vue.toDisplayString($setup.endTime.s),
  50555. 1
  50556. /* TEXT */
  50557. )
  50558. ])
  50559. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  50560. key: 1,
  50561. class: "countdown-title"
  50562. }, " 活动已结束 "))
  50563. ]),
  50564. vue.createElementVNode(
  50565. "view",
  50566. { class: "title-text ss-line-2 ss-m-b-6" },
  50567. vue.toDisplayString($setup.state.goodsInfo.name),
  50568. 1
  50569. /* TEXT */
  50570. ),
  50571. vue.createElementVNode(
  50572. "view",
  50573. { class: "subtitle-text ss-line-1" },
  50574. vue.toDisplayString($setup.state.goodsInfo.introduction),
  50575. 1
  50576. /* TEXT */
  50577. )
  50578. ]),
  50579. vue.createCommentVNode(" 功能卡片 "),
  50580. vue.createElementVNode("view", { class: "detail-cell-card detail-card ss-flex-col" }, [
  50581. vue.createCommentVNode(" 规格 "),
  50582. vue.createVNode($setup["detailCellSku"], {
  50583. sku: $setup.state.selectedSkuPrice,
  50584. onClick: _cache[1] || (_cache[1] = ($event) => $setup.state.showSelectSku = true)
  50585. }, null, 8, ["sku"])
  50586. ]),
  50587. vue.createCommentVNode(" 参团列表 "),
  50588. vue.createVNode($setup["grouponCardList"], {
  50589. modelValue: $setup.state.activity,
  50590. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.activity = $event),
  50591. onJoin: $setup.onJoinGroupon
  50592. }, null, 8, ["modelValue"]),
  50593. vue.createCommentVNode(" 规格与数量弹框 "),
  50594. vue.createVNode(_component_s_select_groupon_sku, {
  50595. show: $setup.state.showSelectSku,
  50596. goodsInfo: $setup.state.goodsInfo,
  50597. grouponAction: $setup.state.grouponAction,
  50598. grouponNum: $setup.state.grouponNum,
  50599. onBuy: $setup.onBuy,
  50600. onChange: $setup.onSkuChange,
  50601. onClose: $setup.onSkuClose
  50602. }, null, 8, ["show", "goodsInfo", "grouponAction", "grouponNum"])
  50603. ]),
  50604. vue.createCommentVNode(" 评价 "),
  50605. vue.createVNode($setup["detailCommentCard"], {
  50606. class: "detail-comment-selector",
  50607. goodsId: $setup.state.goodsId
  50608. }, null, 8, ["goodsId"]),
  50609. vue.createCommentVNode(" 详情 "),
  50610. vue.createVNode($setup["detailContentCard"], {
  50611. class: "detail-content-selector",
  50612. content: $setup.state.goodsInfo.description
  50613. }, null, 8, ["content"]),
  50614. vue.createCommentVNode(" 商品tabbar "),
  50615. vue.createCommentVNode(" TODO: 已售罄、预热 判断 设计"),
  50616. vue.createVNode($setup["detailTabbar"], {
  50617. modelValue: $setup.state.goodsInfo,
  50618. "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.state.goodsInfo = $event)
  50619. }, {
  50620. default: vue.withCtx(() => [
  50621. vue.createElementVNode("view", { class: "buy-box ss-flex ss-col-center ss-p-r-20" }, [
  50622. vue.createElementVNode("button", {
  50623. class: "ss-reset-button origin-price-btn ss-flex-col",
  50624. onClick: _cache[3] || (_cache[3] = ($event) => $setup.sheep.$router.go("/pages/goods/index", { id: $setup.state.goodsInfo.id }))
  50625. }, [
  50626. vue.createElementVNode(
  50627. "view",
  50628. { class: "btn-price" },
  50629. vue.toDisplayString($setup.fen2yuan($setup.state.goodsInfo.marketPrice)),
  50630. 1
  50631. /* TEXT */
  50632. ),
  50633. vue.createElementVNode("view", null, "原价购买")
  50634. ]),
  50635. vue.createElementVNode("button", {
  50636. class: vue.normalizeClass([
  50637. "ss-reset-button btn-tox ss-flex-col",
  50638. $setup.state.activity.status === 0 && $setup.state.goodsInfo.stock !== 0 ? "check-btn-box" : "disabled-btn-box"
  50639. ]),
  50640. onClick: $setup.onCreateGroupon,
  50641. disabled: $setup.state.goodsInfo.stock === 0 || $setup.state.activity.status !== 0
  50642. }, [
  50643. vue.createElementVNode(
  50644. "view",
  50645. { class: "btn-price" },
  50646. vue.toDisplayString($setup.fen2yuan($setup.state.activity.price || $setup.state.goodsInfo.price)),
  50647. 1
  50648. /* TEXT */
  50649. ),
  50650. $setup.state.activity.startTime > (/* @__PURE__ */ new Date()).getTime() ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, "未开始")) : $setup.state.activity.endTime <= (/* @__PURE__ */ new Date()).getTime() ? (vue.openBlock(), vue.createElementBlock("view", { key: 1 }, "已结束")) : (vue.openBlock(), vue.createElementBlock("view", { key: 2 }, [
  50651. $setup.state.goodsInfo.stock === 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, "已售罄")) : (vue.openBlock(), vue.createElementBlock("view", { key: 1 }, "立即开团"))
  50652. ]))
  50653. ], 10, ["disabled"])
  50654. ])
  50655. ]),
  50656. _: 1
  50657. /* STABLE */
  50658. }, 8, ["modelValue"])
  50659. ],
  50660. 64
  50661. /* STABLE_FRAGMENT */
  50662. ))
  50663. ]),
  50664. _: 1
  50665. /* STABLE */
  50666. }, 8, ["onShareAppMessage"]);
  50667. }
  50668. const PagesGoodsGroupon = /* @__PURE__ */ _export_sfc(_sfc_main$1K, [["render", _sfc_render$1J], ["__scopeId", "data-v-efe71281"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/goods/groupon.vue"]]);
  50669. const _sfc_main$1J = {
  50670. __name: "s-select-seckill-sku",
  50671. props: {
  50672. modelValue: {
  50673. type: Object,
  50674. default() {
  50675. }
  50676. },
  50677. show: {
  50678. type: Boolean,
  50679. default: false
  50680. },
  50681. // 单次限购数量
  50682. singleLimitCount: {
  50683. type: Number,
  50684. default: 1
  50685. }
  50686. },
  50687. emits: ["change", "addCart", "buy", "close"],
  50688. setup(__props, { expose: __expose, emit: __emit }) {
  50689. __expose();
  50690. const emits = __emit;
  50691. const props = __props;
  50692. const state = vue.reactive({
  50693. goodsInfo: vue.computed(() => props.modelValue),
  50694. selectedSku: {},
  50695. currentPropertyArray: []
  50696. });
  50697. const propertyList = convertProductPropertyList(state.goodsInfo.skus);
  50698. const skuList = vue.computed(() => {
  50699. let skuPrices = state.goodsInfo.skus;
  50700. for (let price of skuPrices) {
  50701. price.value_id_array = price.properties.map((item) => item.valueId);
  50702. }
  50703. return skuPrices;
  50704. });
  50705. if (!state.goodsInfo.is_sku) {
  50706. state.selectedSku = state.goodsInfo.skus[0];
  50707. }
  50708. vue.watch(
  50709. () => state.selectedSku,
  50710. (newVal) => {
  50711. emits("change", newVal);
  50712. },
  50713. {
  50714. immediate: true,
  50715. // 立即执行
  50716. deep: true
  50717. // 深度监听
  50718. }
  50719. );
  50720. const onBuy = () => {
  50721. if (state.selectedSku.id) {
  50722. if (state.selectedSku.stock <= 0) {
  50723. sheep$1.$helper.toast("库存不足");
  50724. } else {
  50725. emits("buy", state.selectedSku);
  50726. }
  50727. } else {
  50728. sheep$1.$helper.toast("请选择规格");
  50729. }
  50730. };
  50731. function onBuyCountChange(buyCount) {
  50732. if (buyCount > 0 && state.selectedSku.count !== buyCount) {
  50733. state.selectedSku.count = buyCount;
  50734. }
  50735. }
  50736. const changeDisabled = (isChecked = false, propertyId = 0, valueId = 0) => {
  50737. let newSkus = [];
  50738. if (isChecked) {
  50739. for (let price of skuList.value) {
  50740. if (price.stock <= 0) {
  50741. continue;
  50742. }
  50743. if (price.value_id_array.indexOf(valueId) >= 0) {
  50744. newSkus.push(price);
  50745. }
  50746. }
  50747. } else {
  50748. newSkus = getCanUseSkuList();
  50749. }
  50750. let noChooseValueIds = [];
  50751. for (let price of newSkus) {
  50752. noChooseValueIds = noChooseValueIds.concat(price.value_id_array);
  50753. }
  50754. noChooseValueIds = Array.from(new Set(noChooseValueIds));
  50755. if (isChecked) {
  50756. let index2 = noChooseValueIds.indexOf(valueId);
  50757. noChooseValueIds.splice(index2, 1);
  50758. } else {
  50759. state.currentPropertyArray.forEach((currentPropertyId) => {
  50760. if (currentPropertyId.toString() !== "") {
  50761. return;
  50762. }
  50763. let index2 = noChooseValueIds.indexOf(currentPropertyId);
  50764. if (index2 >= 0) {
  50765. noChooseValueIds.splice(index2, 1);
  50766. }
  50767. });
  50768. }
  50769. let choosePropertyIds = [];
  50770. if (!isChecked) {
  50771. state.currentPropertyArray.forEach((currentPropertyId, currentValueId) => {
  50772. if (currentPropertyId !== "") {
  50773. choosePropertyIds.push(currentValueId);
  50774. }
  50775. });
  50776. } else {
  50777. choosePropertyIds = [propertyId];
  50778. }
  50779. for (let propertyIndex in propertyList) {
  50780. if (choosePropertyIds.indexOf(propertyList[propertyIndex]["id"]) >= 0) {
  50781. continue;
  50782. }
  50783. for (let valueIndex in propertyList[propertyIndex]["values"]) {
  50784. propertyList[propertyIndex]["values"][valueIndex]["disabled"] = noChooseValueIds.indexOf(propertyList[propertyIndex]["values"][valueIndex]["id"]) < 0;
  50785. }
  50786. }
  50787. };
  50788. const getCanUseSkuList = () => {
  50789. let newSkus = [];
  50790. for (let sku of skuList.value) {
  50791. if (sku.stock <= 0) {
  50792. continue;
  50793. }
  50794. let isOk = true;
  50795. state.currentPropertyArray.forEach((propertyId) => {
  50796. if (propertyId.toString() !== "" && sku.value_id_array.indexOf(propertyId) < 0) {
  50797. isOk = false;
  50798. }
  50799. });
  50800. if (isOk) {
  50801. newSkus.push(sku);
  50802. }
  50803. }
  50804. return newSkus;
  50805. };
  50806. const onSelectSku = (propertyId, valueId) => {
  50807. let isChecked = true;
  50808. if (state.currentPropertyArray[propertyId] !== void 0 && state.currentPropertyArray[propertyId] === valueId) {
  50809. isChecked = false;
  50810. state.currentPropertyArray.splice(propertyId, 1, "");
  50811. } else {
  50812. state.currentPropertyArray[propertyId] = valueId;
  50813. }
  50814. let choosePropertyId = [];
  50815. state.currentPropertyArray.forEach((currentPropertyId) => {
  50816. if (currentPropertyId !== "") {
  50817. choosePropertyId.push(currentPropertyId);
  50818. }
  50819. });
  50820. let newSkuList = getCanUseSkuList();
  50821. if (choosePropertyId.length === propertyList.length && newSkuList.length) {
  50822. newSkuList[0].count = state.selectedSku.count || 1;
  50823. state.selectedSku = newSkuList[0];
  50824. } else {
  50825. state.selectedSku = {};
  50826. }
  50827. changeDisabled(isChecked, propertyId, valueId);
  50828. };
  50829. changeDisabled(false);
  50830. const __returned__ = { emits, props, state, propertyList, skuList, onBuy, onBuyCountChange, changeDisabled, getCanUseSkuList, onSelectSku, computed: vue.computed, reactive: vue.reactive, watch: vue.watch, get sheep() {
  50831. return sheep$1;
  50832. }, get convertProductPropertyList() {
  50833. return convertProductPropertyList;
  50834. }, get fen2yuan() {
  50835. return fen2yuan;
  50836. }, get min() {
  50837. return lodashExports.min;
  50838. } };
  50839. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  50840. return __returned__;
  50841. }
  50842. };
  50843. function _sfc_render$1I(_ctx, _cache, $props, $setup, $data, $options) {
  50844. const _component_su_number_box = resolveEasycom(vue.resolveDynamicComponent("su-number-box"), __easycom_0$b);
  50845. const _component_su_popup = resolveEasycom(vue.resolveDynamicComponent("su-popup"), __easycom_4$3);
  50846. return vue.openBlock(), vue.createElementBlock(
  50847. vue.Fragment,
  50848. null,
  50849. [
  50850. vue.createCommentVNode(" 规格弹窗 "),
  50851. vue.createVNode(_component_su_popup, {
  50852. show: $props.show,
  50853. round: "10",
  50854. onClose: _cache[2] || (_cache[2] = ($event) => $setup.emits("close"))
  50855. }, {
  50856. default: vue.withCtx(() => [
  50857. vue.createCommentVNode(" SKU 信息 "),
  50858. vue.createElementVNode("view", { class: "ss-modal-box bg-white ss-flex-col" }, [
  50859. vue.createElementVNode("view", { class: "modal-header ss-flex ss-col-center" }, [
  50860. vue.createCommentVNode(" 规格图 "),
  50861. vue.createElementVNode("view", { class: "header-left ss-m-r-30" }, [
  50862. vue.createElementVNode("image", {
  50863. class: "sku-image",
  50864. src: $setup.sheep.$url.cdn($setup.state.selectedSku.picUrl || $setup.state.goodsInfo.picUrl),
  50865. mode: "aspectFill"
  50866. }, null, 8, ["src"])
  50867. ]),
  50868. vue.createElementVNode("view", { class: "header-right ss-flex-col ss-row-between ss-flex-1" }, [
  50869. vue.createCommentVNode(" 名称 "),
  50870. vue.createElementVNode(
  50871. "view",
  50872. { class: "goods-title ss-line-2" },
  50873. vue.toDisplayString($setup.state.goodsInfo.name),
  50874. 1
  50875. /* TEXT */
  50876. ),
  50877. vue.createElementVNode("view", { class: "header-right-bottom ss-flex ss-col-center ss-row-between" }, [
  50878. vue.createCommentVNode(" 价格 "),
  50879. vue.createElementVNode(
  50880. "view",
  50881. { class: "price-text" },
  50882. vue.toDisplayString($setup.fen2yuan($setup.state.selectedSku.price || $setup.state.goodsInfo.price)),
  50883. 1
  50884. /* TEXT */
  50885. ),
  50886. vue.createCommentVNode(" 秒杀价格标签 "),
  50887. vue.createElementVNode("view", { class: "tig ss-flex ss-col-center" }, [
  50888. vue.createElementVNode("view", { class: "tig-icon ss-flex ss-col-center ss-row-center" }, [
  50889. vue.createElementVNode("text", { class: "cicon-alarm" })
  50890. ]),
  50891. vue.createElementVNode("view", { class: "tig-title" }, "秒杀价")
  50892. ]),
  50893. vue.createCommentVNode(" 库存 "),
  50894. vue.createElementVNode(
  50895. "view",
  50896. { class: "stock-text ss-m-l-20" },
  50897. " 库存" + vue.toDisplayString($setup.state.selectedSku.stock || $setup.state.goodsInfo.stock) + "件 ",
  50898. 1
  50899. /* TEXT */
  50900. )
  50901. ])
  50902. ])
  50903. ]),
  50904. vue.createElementVNode("view", { class: "modal-content ss-flex-1" }, [
  50905. vue.createElementVNode("scroll-view", {
  50906. "scroll-y": "true",
  50907. class: "modal-content-scroll"
  50908. }, [
  50909. (vue.openBlock(true), vue.createElementBlock(
  50910. vue.Fragment,
  50911. null,
  50912. vue.renderList($setup.propertyList, (property) => {
  50913. return vue.openBlock(), vue.createElementBlock("view", {
  50914. class: "sku-item ss-m-b-20",
  50915. key: property.id
  50916. }, [
  50917. vue.createElementVNode(
  50918. "view",
  50919. { class: "label-text ss-m-b-20" },
  50920. vue.toDisplayString(property.name),
  50921. 1
  50922. /* TEXT */
  50923. ),
  50924. vue.createElementVNode("view", { class: "ss-flex ss-col-center ss-flex-wrap" }, [
  50925. (vue.openBlock(true), vue.createElementBlock(
  50926. vue.Fragment,
  50927. null,
  50928. vue.renderList(property.values, (value) => {
  50929. return vue.openBlock(), vue.createElementBlock("button", {
  50930. class: vue.normalizeClass(["ss-reset-button spec-btn", [
  50931. {
  50932. "checked-btn": $setup.state.currentPropertyArray[property.id] === value.id
  50933. },
  50934. {
  50935. "disabled-btn": value.disabled === true
  50936. }
  50937. ]]),
  50938. key: value.id,
  50939. disabled: value.disabled === true,
  50940. onClick: ($event) => $setup.onSelectSku(property.id, value.id)
  50941. }, vue.toDisplayString(value.name), 11, ["disabled", "onClick"]);
  50942. }),
  50943. 128
  50944. /* KEYED_FRAGMENT */
  50945. ))
  50946. ])
  50947. ]);
  50948. }),
  50949. 128
  50950. /* KEYED_FRAGMENT */
  50951. )),
  50952. vue.createElementVNode("view", { class: "buy-num-box ss-flex ss-col-center ss-row-between" }, [
  50953. vue.createElementVNode("view", { class: "label-text" }, "购买数量"),
  50954. vue.createVNode(_component_su_number_box, {
  50955. min: 1,
  50956. max: $setup.min([$props.singleLimitCount, $setup.state.selectedSku.stock]),
  50957. step: 1,
  50958. modelValue: $setup.state.selectedSku.count,
  50959. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.state.selectedSku.count = $event),
  50960. onChange: _cache[1] || (_cache[1] = ($event) => $setup.onBuyCountChange($event)),
  50961. activity: "seckill"
  50962. }, null, 8, ["max", "modelValue"])
  50963. ])
  50964. ])
  50965. ]),
  50966. vue.createElementVNode("view", { class: "modal-footer" }, [
  50967. vue.createElementVNode("view", { class: "buy-box ss-flex ss-col-center ss-flex ss-col-center ss-row-center" }, [
  50968. vue.createElementVNode("button", {
  50969. class: "ss-reset-button buy-btn",
  50970. onClick: $setup.onBuy
  50971. }, "确认")
  50972. ])
  50973. ])
  50974. ])
  50975. ]),
  50976. _: 1
  50977. /* STABLE */
  50978. }, 8, ["show"])
  50979. ],
  50980. 2112
  50981. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  50982. );
  50983. }
  50984. const __easycom_2$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1J, [["render", _sfc_render$1I], ["__scopeId", "data-v-e3bc621c"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-select-seckill-sku/s-select-seckill-sku.vue"]]);
  50985. const _sfc_main$1I = {
  50986. __name: "detail-progress",
  50987. props: {
  50988. percent: {
  50989. type: Number,
  50990. default: 0
  50991. }
  50992. },
  50993. setup(__props, { expose: __expose }) {
  50994. __expose();
  50995. const props = __props;
  50996. const __returned__ = { props };
  50997. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  50998. return __returned__;
  50999. }
  51000. };
  51001. function _sfc_render$1H(_ctx, _cache, $props, $setup, $data, $options) {
  51002. return vue.openBlock(), vue.createElementBlock("view", { class: "ss-flex ss-col-center" }, [
  51003. vue.createElementVNode(
  51004. "view",
  51005. { class: "progress-title ss-m-r-10" },
  51006. " 已抢" + vue.toDisplayString($props.percent) + "% ",
  51007. 1
  51008. /* TEXT */
  51009. ),
  51010. vue.createElementVNode("view", { class: "progress-box ss-flex ss-col-center" }, [
  51011. vue.createElementVNode(
  51012. "view",
  51013. {
  51014. class: "progerss-active",
  51015. style: vue.normalizeStyle({ width: $props.percent < 10 ? "10%" : $props.percent + "%" })
  51016. },
  51017. null,
  51018. 4
  51019. /* STYLE */
  51020. )
  51021. ])
  51022. ]);
  51023. }
  51024. const detailProgress = /* @__PURE__ */ _export_sfc(_sfc_main$1I, [["render", _sfc_render$1H], ["__scopeId", "data-v-af274eda"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/goods/components/detail/detail-progress.vue"]]);
  51025. const _sfc_main$1H = {
  51026. __name: "seckill",
  51027. setup(__props, { expose: __expose }) {
  51028. __expose();
  51029. vue.useCssVars((_ctx) => ({
  51030. "960ccb8e-headerBg": vue.unref(headerBg),
  51031. "960ccb8e-btnBg": vue.unref(btnBg),
  51032. "960ccb8e-disabledBtnBg": vue.unref(disabledBtnBg),
  51033. "960ccb8e-seckillBg": vue.unref(seckillBg),
  51034. "960ccb8e-grouponBg": vue.unref(grouponBg)
  51035. }));
  51036. const headerBg = sheep$1.$url.css("/static/img/shop/goods/seckill-bg.png");
  51037. const btnBg = sheep$1.$url.css("/static/img/shop/goods/seckill-btn.png");
  51038. const disabledBtnBg = sheep$1.$url.css(
  51039. "/static/img/shop/goods/activity-btn-disabled.png"
  51040. );
  51041. const seckillBg = sheep$1.$url.css("/static/img/shop/goods/seckill-tip-bg.png");
  51042. const grouponBg = sheep$1.$url.css("/static/img/shop/goods/groupon-tip-bg.png");
  51043. onPageScroll(() => {
  51044. });
  51045. const state = vue.reactive({
  51046. skeletonLoading: true,
  51047. goodsInfo: {},
  51048. showSelectSku: false,
  51049. goodsSwiper: [],
  51050. selectedSku: {},
  51051. showModel: false,
  51052. total: 0,
  51053. percent: 0,
  51054. price: ""
  51055. });
  51056. const endTime = vue.computed(() => {
  51057. return useDurationTime(activity.value.endTime);
  51058. });
  51059. function onSkuChange(e2) {
  51060. state.selectedSku = e2;
  51061. }
  51062. function onBuy(sku) {
  51063. sheep$1.$router.go("/pages/order/confirm", {
  51064. data: JSON.stringify({
  51065. order_type: "goods",
  51066. buy_type: "seckill",
  51067. seckillActivityId: activity.value.id,
  51068. items: [
  51069. {
  51070. skuId: sku.id,
  51071. count: sku.count
  51072. }
  51073. ]
  51074. })
  51075. });
  51076. }
  51077. const shareInfo = vue.computed(() => {
  51078. if (lodashExports.isEmpty(activity))
  51079. return {};
  51080. return sheep$1.$platform.share.getShareInfo(
  51081. {
  51082. title: activity.value.name,
  51083. image: sheep$1.$url.cdn(state.goodsInfo.picUrl),
  51084. params: {
  51085. page: "4",
  51086. query: activity.value.id
  51087. }
  51088. },
  51089. {
  51090. type: "goods",
  51091. // 商品海报
  51092. title: activity.value.name,
  51093. // 商品标题
  51094. image: sheep$1.$url.cdn(state.goodsInfo.picUrl),
  51095. // 商品主图
  51096. price: state.goodsInfo.price,
  51097. // 商品价格
  51098. marketPrice: state.goodsInfo.marketPrice
  51099. // 商品原价
  51100. }
  51101. );
  51102. });
  51103. const activity = vue.ref();
  51104. const timeStatusEnum = vue.ref("");
  51105. const getActivity = async (id) => {
  51106. const { data } = await SeckillApi.getSeckillActivity(id);
  51107. activity.value = data;
  51108. timeStatusEnum.value = getTimeStatusEnum(activity.startTime, activity.endTime);
  51109. await getSpu(data.spuId);
  51110. };
  51111. const getSpu = async (id) => {
  51112. const { data } = await SpuApi.getSpuDetail(id);
  51113. data.activity_type = "seckill";
  51114. state.goodsInfo = data;
  51115. state.goodsSwiper = formatGoodsSwiper(state.goodsInfo.sliderPicUrls);
  51116. state.goodsInfo.price = lodashExports.min([state.goodsInfo.price, ...activity.value.products.map((spu) => spu.seckillPrice)]);
  51117. data.skus.forEach((sku) => {
  51118. const product = activity.value.products.find((product2) => product2.skuId === sku.id);
  51119. if (product) {
  51120. sku.price = product.seckillPrice;
  51121. sku.stock = Math.min(sku.stock, product.stock);
  51122. } else {
  51123. sku.stock = 0;
  51124. }
  51125. if (activity.value.totalLimitCount > 0 && activity.value.singleLimitCount > 0) {
  51126. sku.limitCount = Math.min(activity.value.totalLimitCount, activity.value.singleLimitCount);
  51127. } else if (activity.value.totalLimitCount > 0) {
  51128. sku.limitCount = activity.value.totalLimitCount;
  51129. } else if (activity.value.singleLimitCount > 0) {
  51130. sku.limitCount = activity.value.singleLimitCount;
  51131. }
  51132. });
  51133. state.skeletonLoading = false;
  51134. };
  51135. onLoad((options2) => {
  51136. if (!options2.id) {
  51137. state.goodsInfo = null;
  51138. return;
  51139. }
  51140. getActivity(options2.id);
  51141. });
  51142. const __returned__ = { headerBg, btnBg, disabledBtnBg, seckillBg, grouponBg, state, endTime, onSkuChange, onBuy, shareInfo, activity, timeStatusEnum, getActivity, getSpu, reactive: vue.reactive, computed: vue.computed, ref: vue.ref, get onLoad() {
  51143. return onLoad;
  51144. }, get onPageScroll() {
  51145. return onPageScroll;
  51146. }, get sheep() {
  51147. return sheep$1;
  51148. }, get isEmpty() {
  51149. return lodashExports.isEmpty;
  51150. }, get min() {
  51151. return lodashExports.min;
  51152. }, get useDurationTime() {
  51153. return useDurationTime;
  51154. }, get formatGoodsSwiper() {
  51155. return formatGoodsSwiper;
  51156. }, get fen2yuan() {
  51157. return fen2yuan;
  51158. }, detailNavbar, detailCellSku, detailTabbar, detailSkeleton, detailCommentCard, detailContentCard, detailProgress, get SeckillApi() {
  51159. return SeckillApi;
  51160. }, get SpuApi() {
  51161. return SpuApi;
  51162. }, get getTimeStatusEnum() {
  51163. return getTimeStatusEnum;
  51164. }, get TimeStatusEnum() {
  51165. return TimeStatusEnum;
  51166. } };
  51167. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  51168. return __returned__;
  51169. }
  51170. };
  51171. function _sfc_render$1G(_ctx, _cache, $props, $setup, $data, $options) {
  51172. const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6);
  51173. const _component_su_swiper = resolveEasycom(vue.resolveDynamicComponent("su-swiper"), __easycom_1$d);
  51174. const _component_s_select_seckill_sku = resolveEasycom(vue.resolveDynamicComponent("s-select-seckill-sku"), __easycom_2$1);
  51175. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  51176. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  51177. onShareAppMessage: $setup.shareInfo,
  51178. navbar: "goods"
  51179. }, {
  51180. default: vue.withCtx(() => {
  51181. var _a2;
  51182. return [
  51183. vue.createCommentVNode(" 标题栏 "),
  51184. vue.createVNode($setup["detailNavbar"]),
  51185. vue.createCommentVNode(" 骨架屏 "),
  51186. $setup.state.skeletonLoading ? (vue.openBlock(), vue.createBlock($setup["detailSkeleton"], { key: 0 })) : $setup.state.goodsInfo === null || $setup.state.goodsInfo.activity_type !== "seckill" ? (vue.openBlock(), vue.createElementBlock(
  51187. vue.Fragment,
  51188. { key: 1 },
  51189. [
  51190. vue.createCommentVNode(" 下架/售罄提醒 "),
  51191. vue.createVNode(_component_s_empty, {
  51192. text: "活动不存在或已结束",
  51193. icon: "/static/soldout-empty.png",
  51194. showAction: "",
  51195. actionText: "再逛逛",
  51196. actionUrl: "/pages/goods/list"
  51197. })
  51198. ],
  51199. 2112
  51200. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  51201. )) : (vue.openBlock(), vue.createElementBlock(
  51202. vue.Fragment,
  51203. { key: 2 },
  51204. [
  51205. vue.createElementVNode("view", { class: "detail-swiper-selector" }, [
  51206. vue.createCommentVNode(" 商品图轮播 "),
  51207. vue.createVNode(_component_su_swiper, {
  51208. class: "ss-m-b-14",
  51209. isPreview: "",
  51210. list: $setup.state.goodsSwiper,
  51211. dotStyle: "tag",
  51212. imageMode: "widthFix",
  51213. dotCur: "bg-mask-40",
  51214. seizeHeight: 750
  51215. }, null, 8, ["list"]),
  51216. vue.createCommentVNode(" 价格+标题 "),
  51217. vue.createElementVNode("view", { class: "title-card ss-m-y-14 ss-m-x-20 ss-p-x-20 ss-p-y-34" }, [
  51218. vue.createElementVNode("view", { class: "price-box ss-flex ss-row-between ss-m-b-18" }, [
  51219. vue.createElementVNode("view", { class: "ss-flex" }, [
  51220. vue.createElementVNode(
  51221. "view",
  51222. { class: "price-text ss-m-r-16" },
  51223. vue.toDisplayString($setup.fen2yuan($setup.state.selectedSku.price || $setup.state.goodsInfo.price)),
  51224. 1
  51225. /* TEXT */
  51226. ),
  51227. vue.createElementVNode("view", { class: "tig ss-flex ss-col-center" }, [
  51228. vue.createElementVNode("view", { class: "tig-icon ss-flex ss-col-center ss-row-center" }, [
  51229. vue.createElementVNode("text", { class: "cicon-alarm" })
  51230. ]),
  51231. vue.createElementVNode("view", { class: "tig-title" }, "秒杀价")
  51232. ])
  51233. ]),
  51234. $setup.endTime.ms > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  51235. key: 0,
  51236. class: "countdown-box"
  51237. }, [
  51238. vue.createElementVNode("view", { class: "countdown-title ss-m-b-20" }, "距结束仅剩"),
  51239. vue.createElementVNode("view", { class: "ss-flex countdown-time" }, [
  51240. vue.createElementVNode(
  51241. "view",
  51242. { class: "ss-flex countdown-h" },
  51243. vue.toDisplayString($setup.endTime.h),
  51244. 1
  51245. /* TEXT */
  51246. ),
  51247. vue.createElementVNode("view", { class: "ss-m-x-4" }, ":"),
  51248. vue.createElementVNode(
  51249. "view",
  51250. { class: "countdown-num ss-flex ss-row-center" },
  51251. vue.toDisplayString($setup.endTime.m),
  51252. 1
  51253. /* TEXT */
  51254. ),
  51255. vue.createElementVNode("view", { class: "ss-m-x-4" }, ":"),
  51256. vue.createElementVNode(
  51257. "view",
  51258. { class: "countdown-num ss-flex ss-row-center" },
  51259. vue.toDisplayString($setup.endTime.s),
  51260. 1
  51261. /* TEXT */
  51262. )
  51263. ])
  51264. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  51265. key: 1,
  51266. class: "countdown-title"
  51267. }, " 活动已结束 "))
  51268. ]),
  51269. vue.createElementVNode("view", { class: "ss-flex ss-row-between ss-m-b-60" }, [
  51270. $setup.state.goodsInfo.marketPrice ? (vue.openBlock(), vue.createElementBlock("view", {
  51271. key: 0,
  51272. class: "origin-price ss-flex ss-col-center"
  51273. }, [
  51274. vue.createTextVNode(" 原价 "),
  51275. vue.createElementVNode(
  51276. "view",
  51277. { class: "origin-price-text" },
  51278. vue.toDisplayString($setup.fen2yuan($setup.state.selectedSku.marketPrice || $setup.state.goodsInfo.marketPrice)),
  51279. 1
  51280. /* TEXT */
  51281. )
  51282. ])) : vue.createCommentVNode("v-if", true),
  51283. vue.createVNode($setup["detailProgress"], {
  51284. percent: $setup.state.percent
  51285. }, null, 8, ["percent"])
  51286. ]),
  51287. vue.createElementVNode(
  51288. "view",
  51289. { class: "title-text ss-line-2 ss-m-b-6" },
  51290. vue.toDisplayString((_a2 = $setup.state.goodsInfo) == null ? void 0 : _a2.name),
  51291. 1
  51292. /* TEXT */
  51293. ),
  51294. vue.createElementVNode(
  51295. "view",
  51296. { class: "subtitle-text ss-line-1" },
  51297. vue.toDisplayString($setup.state.goodsInfo.introduction),
  51298. 1
  51299. /* TEXT */
  51300. )
  51301. ]),
  51302. vue.createCommentVNode(" 功能卡片 "),
  51303. vue.createElementVNode("view", { class: "detail-cell-card detail-card ss-flex-col" }, [
  51304. vue.createVNode($setup["detailCellSku"], {
  51305. sku: $setup.state.selectedSku,
  51306. onClick: _cache[0] || (_cache[0] = ($event) => $setup.state.showSelectSku = true)
  51307. }, null, 8, ["sku"])
  51308. ]),
  51309. vue.createCommentVNode(" 规格与数量弹框 "),
  51310. vue.createVNode(_component_s_select_seckill_sku, {
  51311. modelValue: $setup.state.goodsInfo,
  51312. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.goodsInfo = $event),
  51313. show: $setup.state.showSelectSku,
  51314. "single-limit-count": $setup.activity.singleLimitCount,
  51315. onBuy: $setup.onBuy,
  51316. onChange: $setup.onSkuChange,
  51317. onClose: _cache[2] || (_cache[2] = ($event) => $setup.state.showSelectSku = false)
  51318. }, null, 8, ["modelValue", "show", "single-limit-count"])
  51319. ]),
  51320. vue.createCommentVNode(" 评价 "),
  51321. vue.createVNode($setup["detailCommentCard"], {
  51322. class: "detail-comment-selector",
  51323. goodsId: $setup.state.goodsInfo.id
  51324. }, null, 8, ["goodsId"]),
  51325. vue.createCommentVNode(" 详情 "),
  51326. vue.createVNode($setup["detailContentCard"], {
  51327. class: "detail-content-selector",
  51328. content: $setup.state.goodsInfo.description
  51329. }, null, 8, ["content"]),
  51330. vue.createCommentVNode(" 详情tabbar "),
  51331. vue.createVNode($setup["detailTabbar"], {
  51332. modelValue: $setup.state.goodsInfo,
  51333. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $setup.state.goodsInfo = $event)
  51334. }, {
  51335. default: vue.withCtx(() => [
  51336. vue.createCommentVNode(" TODO: 缺货中 已售罄 判断 设计"),
  51337. vue.createElementVNode("view", { class: "buy-box ss-flex ss-col-center ss-p-r-20" }, [
  51338. $setup.state.goodsInfo.marketPrice ? (vue.openBlock(), vue.createElementBlock("button", {
  51339. key: 0,
  51340. class: "ss-reset-button origin-price-btn ss-flex-col",
  51341. onClick: _cache[3] || (_cache[3] = ($event) => $setup.sheep.$router.go("/pages/goods/index", { id: $setup.state.goodsInfo.id }))
  51342. }, [
  51343. vue.createElementVNode("view", null, [
  51344. vue.createElementVNode(
  51345. "view",
  51346. { class: "btn-price" },
  51347. vue.toDisplayString($setup.fen2yuan($setup.state.goodsInfo.marketPrice)),
  51348. 1
  51349. /* TEXT */
  51350. ),
  51351. vue.createElementVNode("view", null, "原价购买")
  51352. ])
  51353. ])) : (vue.openBlock(), vue.createElementBlock("button", {
  51354. key: 1,
  51355. class: "ss-reset-button origin-price-btn ss-flex-col"
  51356. }, [
  51357. vue.createElementVNode(
  51358. "view",
  51359. {
  51360. class: vue.normalizeClass(["no-original", $setup.state.goodsInfo.stock === 0 || $setup.timeStatusEnum !== $setup.TimeStatusEnum.STARTED ? "" : ""])
  51361. },
  51362. " 秒杀价 ",
  51363. 2
  51364. /* CLASS */
  51365. )
  51366. ])),
  51367. vue.createElementVNode("button", {
  51368. class: vue.normalizeClass([
  51369. "ss-reset-button btn-box ss-flex-col",
  51370. $setup.timeStatusEnum === $setup.TimeStatusEnum.STARTED && $setup.state.goodsInfo.stock != 0 ? "check-btn-box" : "disabled-btn-box"
  51371. ]),
  51372. onClick: _cache[4] || (_cache[4] = ($event) => $setup.state.showSelectSku = true),
  51373. disabled: $setup.state.goodsInfo.stock === 0 || $setup.timeStatusEnum !== $setup.TimeStatusEnum.STARTED
  51374. }, [
  51375. vue.createElementVNode(
  51376. "view",
  51377. { class: "btn-price" },
  51378. vue.toDisplayString($setup.fen2yuan($setup.state.goodsInfo.price)),
  51379. 1
  51380. /* TEXT */
  51381. ),
  51382. $setup.timeStatusEnum === $setup.TimeStatusEnum.STARTED ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [
  51383. $setup.state.goodsInfo.stock === 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, "已售罄")) : (vue.openBlock(), vue.createElementBlock("view", { key: 1 }, "立即秒杀"))
  51384. ])) : (vue.openBlock(), vue.createElementBlock(
  51385. "view",
  51386. { key: 1 },
  51387. vue.toDisplayString($setup.timeStatusEnum),
  51388. 1
  51389. /* TEXT */
  51390. ))
  51391. ], 10, ["disabled"])
  51392. ])
  51393. ]),
  51394. _: 1
  51395. /* STABLE */
  51396. }, 8, ["modelValue"])
  51397. ],
  51398. 64
  51399. /* STABLE_FRAGMENT */
  51400. ))
  51401. ];
  51402. }),
  51403. _: 1
  51404. /* STABLE */
  51405. }, 8, ["onShareAppMessage"]);
  51406. }
  51407. const PagesGoodsSeckill = /* @__PURE__ */ _export_sfc(_sfc_main$1H, [["render", _sfc_render$1G], ["__scopeId", "data-v-960ccb8e"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/goods/seckill.vue"]]);
  51408. const _sfc_main$1G = {
  51409. name: "su-tabs",
  51410. data() {
  51411. return {
  51412. addStyle,
  51413. addUnit,
  51414. firstTime: true,
  51415. scrollLeft: 0,
  51416. scrollViewWidth: 0,
  51417. lineOffsetLeft: 0,
  51418. tabsRect: {
  51419. left: 0
  51420. },
  51421. innerCurrent: 0,
  51422. moving: false
  51423. };
  51424. },
  51425. props: {
  51426. // 滑块的移动过渡时间,单位ms
  51427. duration: {
  51428. type: Number,
  51429. default: 300
  51430. },
  51431. // tabs标签数组
  51432. list: {
  51433. type: Array,
  51434. default: []
  51435. },
  51436. badge: {
  51437. type: Boolean,
  51438. default: false
  51439. },
  51440. // 滑块颜色
  51441. lineColor: {
  51442. type: String,
  51443. default: ""
  51444. },
  51445. // 菜单选择中时的样式
  51446. activeStyle: {
  51447. type: [String, Object],
  51448. default() {
  51449. return {
  51450. color: "#303133"
  51451. };
  51452. }
  51453. },
  51454. // 菜单非选中时的样式
  51455. inactiveStyle: {
  51456. type: [String, Object],
  51457. default() {
  51458. return {
  51459. color: "#606266"
  51460. };
  51461. }
  51462. },
  51463. // 滑块长度
  51464. lineWidth: {
  51465. type: [String, Number],
  51466. default: 20
  51467. },
  51468. // 滑块高度
  51469. lineHeight: {
  51470. type: [String, Number],
  51471. default: 3
  51472. },
  51473. // 滑块背景显示大小,当滑块背景设置为图片时使用
  51474. lineBgSize: {
  51475. type: String,
  51476. default: "cover"
  51477. },
  51478. // 菜单item的样式
  51479. itemStyle: {
  51480. type: [String, Object],
  51481. default() {
  51482. return {
  51483. height: "44px"
  51484. };
  51485. }
  51486. },
  51487. // 菜单是否可滚动
  51488. scrollable: {
  51489. type: Boolean,
  51490. default: true
  51491. },
  51492. // 当前选中标签的索引
  51493. current: {
  51494. type: [Number, String],
  51495. default: 0
  51496. },
  51497. // 默认读取的键名
  51498. keyName: {
  51499. type: String,
  51500. default: "name"
  51501. }
  51502. },
  51503. watch: {
  51504. current: {
  51505. immediate: true,
  51506. handler(newValue, oldValue) {
  51507. if (newValue !== this.innerCurrent) {
  51508. this.innerCurrent = newValue;
  51509. this.$nextTick(() => {
  51510. this.resize();
  51511. });
  51512. }
  51513. }
  51514. },
  51515. // list变化时,重新渲染list各项信息
  51516. list() {
  51517. this.$nextTick(() => {
  51518. this.resize();
  51519. });
  51520. }
  51521. },
  51522. computed: {
  51523. textStyle() {
  51524. return (index2) => {
  51525. const style = {};
  51526. const customeStyle = index2 === this.innerCurrent ? addStyle(this.activeStyle) : addStyle(this.inactiveStyle);
  51527. if (this.list[index2].disabled) {
  51528. style.color = "#c8c9cc";
  51529. }
  51530. return deepMerge(customeStyle, style);
  51531. };
  51532. }
  51533. },
  51534. async mounted() {
  51535. this.init();
  51536. },
  51537. methods: {
  51538. $uGetRect(selector, all) {
  51539. return new Promise((resolve) => {
  51540. uni.createSelectorQuery().in(this)[all ? "selectAll" : "select"](selector).boundingClientRect((rect) => {
  51541. if (all && Array.isArray(rect) && rect.length) {
  51542. resolve(rect);
  51543. }
  51544. if (!all && rect) {
  51545. resolve(rect);
  51546. }
  51547. }).exec();
  51548. });
  51549. },
  51550. setLineLeft() {
  51551. const tabItem = this.list[this.innerCurrent];
  51552. if (!tabItem) {
  51553. return;
  51554. }
  51555. let lineOffsetLeft = this.list.slice(0, this.innerCurrent).reduce((total, curr) => total + curr.rect.width, 0);
  51556. const lineWidth = getPx(this.lineWidth);
  51557. this.lineOffsetLeft = lineOffsetLeft + (tabItem.rect.width - lineWidth) / 2;
  51558. if (this.firstTime) {
  51559. setTimeout(() => {
  51560. this.firstTime = false;
  51561. }, 10);
  51562. }
  51563. },
  51564. // nvue下设置滑块的位置
  51565. animation(x, duration2 = 0) {
  51566. },
  51567. // 点击某一个标签
  51568. clickHandler(item, index2) {
  51569. this.$emit("click", {
  51570. ...item,
  51571. index: index2
  51572. });
  51573. if (item.disabled)
  51574. return;
  51575. this.innerCurrent = index2;
  51576. this.resize();
  51577. this.$emit("change", {
  51578. ...item,
  51579. index: index2
  51580. });
  51581. },
  51582. init() {
  51583. sleep().then(() => {
  51584. this.resize();
  51585. });
  51586. },
  51587. setScrollLeft() {
  51588. const tabRect = this.list[this.innerCurrent];
  51589. const offsetLeft = this.list.slice(0, this.innerCurrent).reduce((total, curr) => {
  51590. return total + curr.rect.width;
  51591. }, 0);
  51592. const windowWidth2 = sys$1().windowWidth;
  51593. let scrollLeft = offsetLeft - (this.tabsRect.width - tabRect.rect.width) / 2 - (windowWidth2 - this.tabsRect.right) / 2 + this.tabsRect.left / 2;
  51594. scrollLeft = Math.min(scrollLeft, this.scrollViewWidth - this.tabsRect.width);
  51595. this.scrollLeft = Math.max(0, scrollLeft);
  51596. },
  51597. // 获取所有标签的尺寸
  51598. resize() {
  51599. if (this.list.length === 0) {
  51600. return;
  51601. }
  51602. Promise.all([this.getTabsRect(), this.getAllItemRect()]).then(
  51603. ([tabsRect, itemRect = []]) => {
  51604. this.tabsRect = tabsRect;
  51605. this.scrollViewWidth = 0;
  51606. itemRect.map((item, index2) => {
  51607. this.scrollViewWidth += item.width;
  51608. this.list[index2].rect = item;
  51609. });
  51610. this.setLineLeft();
  51611. this.setScrollLeft();
  51612. }
  51613. );
  51614. },
  51615. // 获取导航菜单的尺寸
  51616. getTabsRect() {
  51617. return new Promise((resolve) => {
  51618. this.queryRect("u-tabs__wrapper__scroll-view").then((size) => resolve(size));
  51619. });
  51620. },
  51621. // 获取所有标签的尺寸
  51622. getAllItemRect() {
  51623. return new Promise((resolve) => {
  51624. const promiseAllArr = this.list.map(
  51625. (item, index2) => this.queryRect(`u-tabs__wrapper__nav__item-${index2}`, true)
  51626. );
  51627. Promise.all(promiseAllArr).then((sizes) => resolve(sizes));
  51628. });
  51629. },
  51630. // 获取各个标签的尺寸
  51631. queryRect(el, item) {
  51632. return new Promise((resolve) => {
  51633. this.$uGetRect(`.${el}`).then((size) => {
  51634. resolve(size);
  51635. });
  51636. });
  51637. }
  51638. }
  51639. };
  51640. function _sfc_render$1F(_ctx, _cache, $props, $setup, $data, $options) {
  51641. const _component_uni_badge = resolveEasycom(vue.resolveDynamicComponent("uni-badge"), __easycom_0$j);
  51642. return vue.openBlock(), vue.createElementBlock("view", { class: "u-tabs" }, [
  51643. vue.createElementVNode("view", { class: "u-tabs__wrapper" }, [
  51644. vue.renderSlot(_ctx.$slots, "left", {}, void 0, true),
  51645. vue.createElementVNode("view", { class: "u-tabs__wrapper__scroll-view-wrapper" }, [
  51646. vue.createElementVNode("scroll-view", {
  51647. "scroll-x": $props.scrollable,
  51648. "scroll-left": $data.scrollLeft,
  51649. "scroll-with-animation": "",
  51650. "enable-flex": "",
  51651. class: "u-tabs__wrapper__scroll-view white-space",
  51652. "show-scrollbar": false,
  51653. ref: "u-tabs__wrapper__scroll-view"
  51654. }, [
  51655. vue.createElementVNode(
  51656. "view",
  51657. {
  51658. class: "u-tabs__wrapper__nav",
  51659. ref: "u-tabs__wrapper__nav"
  51660. },
  51661. [
  51662. (vue.openBlock(true), vue.createElementBlock(
  51663. vue.Fragment,
  51664. null,
  51665. vue.renderList($props.list, (item, index2) => {
  51666. return vue.openBlock(), vue.createElementBlock("view", {
  51667. class: vue.normalizeClass(["u-tabs__wrapper__nav__item", [
  51668. `u-tabs__wrapper__nav__item-${index2}`,
  51669. item.disabled && "u-tabs__wrapper__nav__item--disabled"
  51670. ]]),
  51671. key: index2,
  51672. onClick: ($event) => $options.clickHandler(item, index2),
  51673. ref_for: true,
  51674. ref: `u-tabs__wrapper__nav__item-${index2}`,
  51675. style: vue.normalizeStyle([$data.addStyle($props.itemStyle), { flex: $props.scrollable ? "" : 1 }])
  51676. }, [
  51677. $props.badge && item.isShow ? (vue.openBlock(), vue.createBlock(_component_uni_badge, {
  51678. key: 0,
  51679. class: "uni-badge-left-margin",
  51680. text: item.num,
  51681. absolute: "rightTop",
  51682. size: "small"
  51683. }, {
  51684. default: vue.withCtx(() => [
  51685. vue.createElementVNode(
  51686. "text",
  51687. {
  51688. class: vue.normalizeClass([[item.disabled && "u-tabs__wrapper__nav__item__text--disabled"], "u-tabs__wrapper__nav__item__text"]),
  51689. style: vue.normalizeStyle([$options.textStyle(index2)])
  51690. },
  51691. vue.toDisplayString(item[$props.keyName]),
  51692. 7
  51693. /* TEXT, CLASS, STYLE */
  51694. )
  51695. ]),
  51696. _: 2
  51697. /* DYNAMIC */
  51698. }, 1032, ["text"])) : (vue.openBlock(), vue.createElementBlock(
  51699. "text",
  51700. {
  51701. key: 1,
  51702. class: vue.normalizeClass([[item.disabled && "u-tabs__wrapper__nav__item__text--disabled"], "u-tabs__wrapper__nav__item__text"]),
  51703. style: vue.normalizeStyle([$options.textStyle(index2)])
  51704. },
  51705. vue.toDisplayString(item[$props.keyName]),
  51706. 7
  51707. /* TEXT, CLASS, STYLE */
  51708. ))
  51709. ], 14, ["onClick"]);
  51710. }),
  51711. 128
  51712. /* KEYED_FRAGMENT */
  51713. )),
  51714. vue.createElementVNode(
  51715. "view",
  51716. {
  51717. class: "u-tabs__wrapper__nav__line",
  51718. ref: "u-tabs__wrapper__nav__line",
  51719. style: vue.normalizeStyle([
  51720. {
  51721. width: $data.addUnit($props.lineWidth),
  51722. transform: `translate(${$data.lineOffsetLeft}px)`,
  51723. transitionDuration: `${$data.firstTime ? 0 : $props.duration}ms`,
  51724. height: $data.addUnit($props.lineHeight),
  51725. background: $props.lineColor ? $props.lineColor : "var(--ui-BG-Main)",
  51726. backgroundSize: $props.lineBgSize
  51727. }
  51728. ])
  51729. },
  51730. null,
  51731. 4
  51732. /* STYLE */
  51733. )
  51734. ],
  51735. 512
  51736. /* NEED_PATCH */
  51737. )
  51738. ], 8, ["scroll-x", "scroll-left"])
  51739. ]),
  51740. vue.renderSlot(_ctx.$slots, "right", {}, void 0, true)
  51741. ])
  51742. ]);
  51743. }
  51744. const __easycom_0$a = /* @__PURE__ */ _export_sfc(_sfc_main$1G, [["render", _sfc_render$1F], ["__scopeId", "data-v-035e7744"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/ui/su-tabs/su-tabs.vue"]]);
  51745. const _sfc_main$1F = {
  51746. name: "su-sticky",
  51747. props: {
  51748. // 吸顶容器到顶部某个距离的时候,进行吸顶,在H5平台,NavigationBar为44px
  51749. offsetTop: {
  51750. type: [String, Number],
  51751. default: 0
  51752. },
  51753. // 自定义导航栏的高度
  51754. customNavHeight: {
  51755. type: [String, Number],
  51756. default: sheep$1.$platform.navbar
  51757. },
  51758. // 是否开启吸顶功能
  51759. stickyToTop: {
  51760. type: Boolean,
  51761. default: false
  51762. },
  51763. // 吸顶区域的背景颜色
  51764. bgColor: {
  51765. type: String,
  51766. default: "transparent"
  51767. },
  51768. // z-index值
  51769. zIndex: {
  51770. type: [String, Number],
  51771. default: ""
  51772. },
  51773. // 列表中的索引值
  51774. index: {
  51775. type: [String, Number],
  51776. default: ""
  51777. },
  51778. customStyle: {
  51779. type: [Object, String],
  51780. default: () => ({})
  51781. }
  51782. },
  51783. data() {
  51784. return {
  51785. cssSticky: false,
  51786. // 是否使用css的sticky实现
  51787. stickyTop: 0,
  51788. // 吸顶的top值,因为可能受自定义导航栏影响,最终的吸顶值非offsetTop值
  51789. elId: guid(),
  51790. left: 0,
  51791. // js模式时,吸顶的内容因为处于postition: fixed模式,为了和原来保持一致的样式,需要记录并重新设置它的left,height,width属性
  51792. width: "auto",
  51793. height: "auto",
  51794. fixed: false
  51795. // js模式时,是否处于吸顶模式
  51796. };
  51797. },
  51798. computed: {
  51799. style() {
  51800. const style = {};
  51801. if (!this.stickyToTop) {
  51802. if (this.cssSticky) {
  51803. style.position = "sticky";
  51804. style.zIndex = this.uZindex;
  51805. style.top = addUnit(this.stickyTop);
  51806. } else {
  51807. style.height = this.fixed ? this.height + "px" : "auto";
  51808. }
  51809. } else {
  51810. style.position = "static";
  51811. }
  51812. style.backgroundColor = this.bgColor;
  51813. return deepMerge(addStyle(this.customStyle), style);
  51814. },
  51815. // 吸顶内容的样式
  51816. stickyContent() {
  51817. const style = {};
  51818. if (!this.cssSticky) {
  51819. style.position = this.fixed ? "fixed" : "static";
  51820. style.top = this.stickyTop + "px";
  51821. style.left = this.left + "px";
  51822. style.width = this.width == "auto" ? "auto" : this.width + "px";
  51823. style.zIndex = this.uZindex;
  51824. }
  51825. return style;
  51826. },
  51827. uZindex() {
  51828. return this.zIndex ? this.zIndex : 970;
  51829. }
  51830. },
  51831. mounted() {
  51832. this.init();
  51833. },
  51834. methods: {
  51835. init() {
  51836. this.getStickyTop();
  51837. this.checkSupportCssSticky();
  51838. if (!this.cssSticky) {
  51839. !this.stickyToTop && this.initObserveContent();
  51840. }
  51841. },
  51842. $uGetRect(selector, all) {
  51843. return new Promise((resolve) => {
  51844. uni.createSelectorQuery().in(this)[all ? "selectAll" : "select"](selector).boundingClientRect((rect) => {
  51845. if (all && Array.isArray(rect) && rect.length) {
  51846. resolve(rect);
  51847. }
  51848. if (!all && rect) {
  51849. resolve(rect);
  51850. }
  51851. }).exec();
  51852. });
  51853. },
  51854. initObserveContent() {
  51855. this.$uGetRect("#" + this.elId).then((res) => {
  51856. this.height = res.height;
  51857. this.left = res.left;
  51858. this.width = res.width;
  51859. this.$nextTick(() => {
  51860. this.observeContent();
  51861. });
  51862. });
  51863. },
  51864. observeContent() {
  51865. this.disconnectObserver("contentObserver");
  51866. const contentObserver = uni.createIntersectionObserver({
  51867. // 检测的区间范围
  51868. thresholds: [0.95, 0.98, 1]
  51869. });
  51870. contentObserver.relativeToViewport({
  51871. top: -this.stickyTop
  51872. });
  51873. contentObserver.observe(`#${this.elId}`, (res) => {
  51874. this.setFixed(res.boundingClientRect.top);
  51875. });
  51876. this.contentObserver = contentObserver;
  51877. },
  51878. setFixed(top) {
  51879. const fixed = top <= this.stickyTop;
  51880. this.fixed = fixed;
  51881. },
  51882. disconnectObserver(observerName) {
  51883. const observer = this[observerName];
  51884. observer && observer.disconnect();
  51885. },
  51886. getStickyTop() {
  51887. this.stickyTop = getPx(this.offsetTop) + getPx(this.customNavHeight);
  51888. },
  51889. async checkSupportCssSticky() {
  51890. if (os$2() === "android" && Number(sys$1().system) > 8) {
  51891. this.cssSticky = true;
  51892. }
  51893. this.cssSticky = await this.checkComputedStyle();
  51894. if (os$2() === "ios") {
  51895. this.cssSticky = true;
  51896. }
  51897. },
  51898. // 在APP和微信小程序上,通过uni.createSelectorQuery可以判断是否支持css sticky
  51899. checkComputedStyle() {
  51900. return new Promise((resolve) => {
  51901. uni.createSelectorQuery().in(this).select(".u-sticky").fields({
  51902. computedStyle: ["position"]
  51903. }).exec((e2) => {
  51904. resolve("sticky" === e2[0].position);
  51905. });
  51906. });
  51907. },
  51908. // H5通过创建元素的形式嗅探是否支持css sticky
  51909. // 判断浏览器是否支持sticky属性
  51910. checkCssStickyForH5() {
  51911. }
  51912. },
  51913. beforeDestroy() {
  51914. this.disconnectObserver("contentObserver");
  51915. }
  51916. };
  51917. function _sfc_render$1E(_ctx, _cache, $props, $setup, $data, $options) {
  51918. return vue.openBlock(), vue.createElementBlock("view", {
  51919. class: "u-sticky",
  51920. id: $data.elId,
  51921. style: vue.normalizeStyle([$options.style])
  51922. }, [
  51923. vue.createElementVNode(
  51924. "view",
  51925. {
  51926. style: vue.normalizeStyle([$options.stickyContent]),
  51927. class: "u-sticky__content"
  51928. },
  51929. [
  51930. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  51931. ],
  51932. 4
  51933. /* STYLE */
  51934. )
  51935. ], 12, ["id"]);
  51936. }
  51937. const __easycom_0$9 = /* @__PURE__ */ _export_sfc(_sfc_main$1F, [["render", _sfc_render$1E], ["__scopeId", "data-v-453bc176"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/ui/su-sticky/su-sticky.vue"]]);
  51938. const _sfc_main$1E = {
  51939. __name: "list",
  51940. emits: ["close", "change"],
  51941. setup(__props, { expose: __expose, emit: __emit }) {
  51942. __expose();
  51943. const sys_navBar = sheep$1.$platform.navbar;
  51944. const emits = __emit;
  51945. const state = vue.reactive({
  51946. pagination: {
  51947. list: [],
  51948. total: 0,
  51949. pageNo: 1,
  51950. pageSize: 6
  51951. },
  51952. currentSort: void 0,
  51953. currentOrder: void 0,
  51954. currentTab: 0,
  51955. // 当前选中的 tab
  51956. curFilter: 0,
  51957. // 当前选中的 list 筛选项
  51958. showFilter: false,
  51959. iconStatus: false,
  51960. // true - 单列布局;false - 双列布局
  51961. keyword: "",
  51962. categoryId: 0,
  51963. tabList: [
  51964. {
  51965. name: t$6("common.recommended"),
  51966. list: [
  51967. {
  51968. label: t$6("common.recommended")
  51969. },
  51970. {
  51971. label: t$6("common.price_asc"),
  51972. sort: "price",
  51973. order: true
  51974. },
  51975. {
  51976. label: t$6("common.price_desc"),
  51977. sort: "price",
  51978. order: false
  51979. }
  51980. ]
  51981. },
  51982. {
  51983. name: t$6("common.sales"),
  51984. sort: "salesCount",
  51985. order: false
  51986. },
  51987. {
  51988. name: t$6("common.newest"),
  51989. value: "createTime",
  51990. order: false
  51991. }
  51992. ],
  51993. loadStatus: "",
  51994. leftGoodsList: [],
  51995. // 双列布局 - 左侧商品
  51996. rightGoodsList: []
  51997. // 双列布局 - 右侧商品
  51998. });
  51999. let count = 0;
  52000. let leftHeight = 0;
  52001. let rightHeight = 0;
  52002. function mountMasonry(height = 0, where = "left") {
  52003. if (!state.pagination.list[count]) {
  52004. return;
  52005. }
  52006. if (where === "left") {
  52007. leftHeight += height;
  52008. } else {
  52009. rightHeight += height;
  52010. }
  52011. if (leftHeight <= rightHeight) {
  52012. state.leftGoodsList.push(state.pagination.list[count]);
  52013. } else {
  52014. state.rightGoodsList.push(state.pagination.list[count]);
  52015. }
  52016. count++;
  52017. }
  52018. function emptyList() {
  52019. resetPagination(state.pagination);
  52020. state.leftGoodsList = [];
  52021. state.rightGoodsList = [];
  52022. count = 0;
  52023. leftHeight = 0;
  52024. rightHeight = 0;
  52025. }
  52026. function onSearch(e2) {
  52027. state.keyword = e2;
  52028. emptyList();
  52029. getList(state.currentSort, state.currentOrder);
  52030. }
  52031. function onTabsChange(e2) {
  52032. if (state.tabList[e2.index].list) {
  52033. state.currentTab = e2.index;
  52034. state.showFilter = !state.showFilter;
  52035. return;
  52036. }
  52037. state.showFilter = false;
  52038. if (e2.index === state.currentTab) {
  52039. return;
  52040. }
  52041. state.currentTab = e2.index;
  52042. state.currentSort = e2.sort;
  52043. state.currentOrder = e2.order;
  52044. emptyList();
  52045. getList(e2.sort, e2.order);
  52046. }
  52047. const onFilterItem = (val) => {
  52048. if (state.currentSort === state.tabList[0].list[val].sort && state.currentOrder === state.tabList[0].list[val].order) {
  52049. state.showFilter = false;
  52050. return;
  52051. }
  52052. state.showFilter = false;
  52053. state.curFilter = val;
  52054. state.tabList[0].name = state.tabList[0].list[val].label;
  52055. state.currentSort = state.tabList[0].list[val].sort;
  52056. state.currentOrder = state.tabList[0].list[val].order;
  52057. emptyList();
  52058. getList();
  52059. };
  52060. async function getList() {
  52061. state.loadStatus = "loading";
  52062. const { code: code2, data } = await SpuApi.getSpuPage({
  52063. pageNo: state.pagination.pageNo,
  52064. pageSize: state.pagination.pageSize,
  52065. sortField: state.currentSort,
  52066. sortAsc: state.currentOrder,
  52067. categoryId: state.categoryId,
  52068. keyword: state.keyword
  52069. });
  52070. if (code2 !== 0) {
  52071. return;
  52072. }
  52073. state.pagination.list = _$1.concat(state.pagination.list, data.list);
  52074. state.pagination.total = data.total;
  52075. state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore";
  52076. mountMasonry();
  52077. }
  52078. function loadMore() {
  52079. if (state.loadStatus === "noMore") {
  52080. return;
  52081. }
  52082. state.pagination.pageNo++;
  52083. getList(state.currentSort, state.currentOrder);
  52084. }
  52085. onLoad((options2) => {
  52086. state.categoryId = options2.categoryId;
  52087. state.keyword = options2.keyword;
  52088. getList(state.currentSort, state.currentOrder);
  52089. });
  52090. onReachBottom(() => {
  52091. loadMore();
  52092. });
  52093. const __returned__ = { sys_navBar, emits, state, get count() {
  52094. return count;
  52095. }, set count(v2) {
  52096. count = v2;
  52097. }, get leftHeight() {
  52098. return leftHeight;
  52099. }, set leftHeight(v2) {
  52100. leftHeight = v2;
  52101. }, get rightHeight() {
  52102. return rightHeight;
  52103. }, set rightHeight(v2) {
  52104. rightHeight = v2;
  52105. }, mountMasonry, emptyList, onSearch, onTabsChange, onFilterItem, getList, loadMore, reactive: vue.reactive, get onLoad() {
  52106. return onLoad;
  52107. }, get onReachBottom() {
  52108. return onReachBottom;
  52109. }, get sheep() {
  52110. return sheep$1;
  52111. }, get _() {
  52112. return _$1;
  52113. }, get resetPagination() {
  52114. return resetPagination;
  52115. }, get SpuApi() {
  52116. return SpuApi;
  52117. }, get t() {
  52118. return t$6;
  52119. } };
  52120. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  52121. return __returned__;
  52122. }
  52123. };
  52124. function _sfc_render$1D(_ctx, _cache, $props, $setup, $data, $options) {
  52125. const _component_su_tabs = resolveEasycom(vue.resolveDynamicComponent("su-tabs"), __easycom_0$a);
  52126. const _component_su_sticky = resolveEasycom(vue.resolveDynamicComponent("su-sticky"), __easycom_0$9);
  52127. const _component_su_popup = resolveEasycom(vue.resolveDynamicComponent("su-popup"), __easycom_4$3);
  52128. const _component_s_goods_column = resolveEasycom(vue.resolveDynamicComponent("s-goods-column"), __easycom_1$4);
  52129. const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5);
  52130. const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6);
  52131. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  52132. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  52133. navbar: "normal",
  52134. leftWidth: 0,
  52135. rightWidth: 0,
  52136. tools: "search",
  52137. defaultSearch: $setup.state.keyword,
  52138. onSearch: $setup.onSearch
  52139. }, {
  52140. default: vue.withCtx(() => [
  52141. vue.createCommentVNode(" 筛选 "),
  52142. vue.createVNode(_component_su_sticky, { bgColor: "#fff" }, {
  52143. default: vue.withCtx(() => [
  52144. vue.createElementVNode("view", { class: "ss-flex" }, [
  52145. vue.createElementVNode("view", { class: "ss-flex-1" }, [
  52146. vue.createVNode(_component_su_tabs, {
  52147. list: $setup.state.tabList,
  52148. scrollable: false,
  52149. onChange: $setup.onTabsChange,
  52150. current: $setup.state.currentTab
  52151. }, null, 8, ["list", "current"])
  52152. ]),
  52153. vue.createElementVNode("view", {
  52154. class: "list-icon",
  52155. onClick: _cache[0] || (_cache[0] = ($event) => $setup.state.iconStatus = !$setup.state.iconStatus)
  52156. }, [
  52157. $setup.state.iconStatus ? (vue.openBlock(), vue.createElementBlock("text", {
  52158. key: 0,
  52159. class: "sicon-goods-list"
  52160. })) : (vue.openBlock(), vue.createElementBlock("text", {
  52161. key: 1,
  52162. class: "sicon-goods-card"
  52163. }))
  52164. ])
  52165. ])
  52166. ]),
  52167. _: 1
  52168. /* STABLE */
  52169. }),
  52170. vue.createCommentVNode(" 弹窗 "),
  52171. vue.createVNode(_component_su_popup, {
  52172. show: $setup.state.showFilter,
  52173. type: "top",
  52174. round: "10",
  52175. space: $setup.sys_navBar + 38,
  52176. backgroundColor: "#F6F6F6",
  52177. zIndex: 10,
  52178. onClose: _cache[1] || (_cache[1] = ($event) => $setup.state.showFilter = false)
  52179. }, {
  52180. default: vue.withCtx(() => [
  52181. vue.createElementVNode("view", { class: "filter-list-box" }, [
  52182. (vue.openBlock(true), vue.createElementBlock(
  52183. vue.Fragment,
  52184. null,
  52185. vue.renderList($setup.state.tabList[$setup.state.currentTab].list, (item, index2) => {
  52186. return vue.openBlock(), vue.createElementBlock("view", {
  52187. class: vue.normalizeClass(["filter-item", [{ "filter-item-active": index2 === $setup.state.curFilter }]]),
  52188. key: item.value,
  52189. onClick: ($event) => $setup.onFilterItem(index2)
  52190. }, vue.toDisplayString(item.label), 11, ["onClick"]);
  52191. }),
  52192. 128
  52193. /* KEYED_FRAGMENT */
  52194. ))
  52195. ])
  52196. ]),
  52197. _: 1
  52198. /* STABLE */
  52199. }, 8, ["show", "space"]),
  52200. vue.createCommentVNode(" 情况一:单列布局 "),
  52201. $setup.state.iconStatus && $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  52202. key: 0,
  52203. class: "goods-list ss-m-t-20"
  52204. }, [
  52205. (vue.openBlock(true), vue.createElementBlock(
  52206. vue.Fragment,
  52207. null,
  52208. vue.renderList($setup.state.pagination.list, (item) => {
  52209. return vue.openBlock(), vue.createElementBlock("view", {
  52210. class: "ss-p-l-20 ss-p-r-20 ss-m-b-20",
  52211. key: item.id
  52212. }, [
  52213. vue.createVNode(_component_s_goods_column, {
  52214. class: "",
  52215. size: "lg",
  52216. data: item,
  52217. topRadius: 10,
  52218. bottomRadius: 10,
  52219. onClick: ($event) => $setup.sheep.$router.go("/pages/goods/index", { id: item.id })
  52220. }, null, 8, ["data", "onClick"])
  52221. ]);
  52222. }),
  52223. 128
  52224. /* KEYED_FRAGMENT */
  52225. ))
  52226. ])) : vue.createCommentVNode("v-if", true),
  52227. vue.createCommentVNode(" 情况二:双列布局 "),
  52228. !$setup.state.iconStatus && $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  52229. key: 1,
  52230. class: "ss-flex ss-flex-wrap ss-p-x-20 ss-m-t-20 ss-col-top"
  52231. }, [
  52232. vue.createElementVNode("view", { class: "goods-list-box" }, [
  52233. (vue.openBlock(true), vue.createElementBlock(
  52234. vue.Fragment,
  52235. null,
  52236. vue.renderList($setup.state.leftGoodsList, (item) => {
  52237. return vue.openBlock(), vue.createElementBlock("view", {
  52238. class: "left-list",
  52239. key: item.id
  52240. }, [
  52241. vue.createVNode(_component_s_goods_column, {
  52242. class: "goods-md-box",
  52243. size: "md",
  52244. data: item,
  52245. topRadius: 10,
  52246. bottomRadius: 10,
  52247. onClick: ($event) => $setup.sheep.$router.go("/pages/goods/index", { id: item.id }),
  52248. onGetHeight: _cache[2] || (_cache[2] = ($event) => $setup.mountMasonry($event, "left"))
  52249. }, {
  52250. cart: vue.withCtx(() => [
  52251. vue.createElementVNode("button", { class: "ss-reset-button cart-btn" })
  52252. ]),
  52253. _: 2
  52254. /* DYNAMIC */
  52255. }, 1032, ["data", "onClick"])
  52256. ]);
  52257. }),
  52258. 128
  52259. /* KEYED_FRAGMENT */
  52260. ))
  52261. ]),
  52262. vue.createElementVNode("view", { class: "goods-list-box" }, [
  52263. (vue.openBlock(true), vue.createElementBlock(
  52264. vue.Fragment,
  52265. null,
  52266. vue.renderList($setup.state.rightGoodsList, (item) => {
  52267. return vue.openBlock(), vue.createElementBlock("view", {
  52268. class: "right-list",
  52269. key: item.id
  52270. }, [
  52271. vue.createVNode(_component_s_goods_column, {
  52272. class: "goods-md-box",
  52273. size: "md",
  52274. topRadius: 10,
  52275. bottomRadius: 10,
  52276. data: item,
  52277. onClick: ($event) => $setup.sheep.$router.go("/pages/goods/index", { id: item.id }),
  52278. onGetHeight: _cache[3] || (_cache[3] = ($event) => $setup.mountMasonry($event, "right"))
  52279. }, {
  52280. cart: vue.withCtx(() => [
  52281. vue.createElementVNode("button", { class: "ss-reset-button cart-btn" })
  52282. ]),
  52283. _: 2
  52284. /* DYNAMIC */
  52285. }, 1032, ["data", "onClick"])
  52286. ]);
  52287. }),
  52288. 128
  52289. /* KEYED_FRAGMENT */
  52290. ))
  52291. ])
  52292. ])) : vue.createCommentVNode("v-if", true),
  52293. $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, {
  52294. key: 2,
  52295. status: $setup.state.loadStatus,
  52296. "content-text": {
  52297. contentdown: "上拉加载更多"
  52298. },
  52299. onClick: $setup.loadMore
  52300. }, null, 8, ["status"])) : vue.createCommentVNode("v-if", true),
  52301. $setup.state.pagination.total === 0 ? (vue.openBlock(), vue.createBlock(_component_s_empty, {
  52302. key: 3,
  52303. icon: "/static/soldout-empty.png",
  52304. text: "暂无商品"
  52305. })) : vue.createCommentVNode("v-if", true)
  52306. ]),
  52307. _: 1
  52308. /* STABLE */
  52309. }, 8, ["defaultSearch"]);
  52310. }
  52311. const PagesGoodsList = /* @__PURE__ */ _export_sfc(_sfc_main$1E, [["render", _sfc_render$1D], ["__scopeId", "data-v-7f2f18c6"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/goods/list.vue"]]);
  52312. const easycom = {
  52313. autoscan: true,
  52314. custom: {
  52315. "^s-(.*)": "@/sheep/components/s-$1/s-$1.vue",
  52316. "^su-(.*)": "@/sheep/ui/su-$1/su-$1.vue"
  52317. }
  52318. };
  52319. const pages = [
  52320. {
  52321. path: "pages/index/FirstIndex",
  52322. aliasPath: "/",
  52323. style: {
  52324. navigationBarTitleText: "%title.home%",
  52325. enablePullDownRefresh: true
  52326. },
  52327. meta: {
  52328. auth: false,
  52329. sync: true,
  52330. title: "首页",
  52331. group: "商城"
  52332. }
  52333. },
  52334. {
  52335. path: "pages/index/FirstActivity",
  52336. style: {
  52337. navigationBarTitleText: "%title.home%",
  52338. enablePullDownRefresh: true
  52339. },
  52340. meta: {
  52341. auth: false,
  52342. sync: true,
  52343. title: "活动",
  52344. group: "商城"
  52345. }
  52346. },
  52347. {
  52348. path: "pages/index/FirstVideo",
  52349. style: {
  52350. navigationBarTitleText: "%title.home%",
  52351. enablePullDownRefresh: true
  52352. },
  52353. meta: {
  52354. auth: false,
  52355. sync: true,
  52356. title: "视频",
  52357. group: "商城"
  52358. }
  52359. },
  52360. {
  52361. path: "pages/index/FirstList",
  52362. style: {
  52363. navigationBarTitleText: "%title.home%",
  52364. enablePullDownRefresh: true
  52365. },
  52366. meta: {
  52367. auth: false,
  52368. sync: true,
  52369. title: "列表",
  52370. group: "商城"
  52371. }
  52372. },
  52373. {
  52374. path: "pages/index/index",
  52375. style: {
  52376. navigationBarTitleText: "%title.home%",
  52377. enablePullDownRefresh: true
  52378. },
  52379. meta: {
  52380. auth: false,
  52381. sync: true,
  52382. title: "首页",
  52383. group: "商城"
  52384. }
  52385. },
  52386. {
  52387. path: "pages/index/user",
  52388. style: {
  52389. navigationBarTitleText: "%title.usercenter%",
  52390. enablePullDownRefresh: true
  52391. },
  52392. meta: {
  52393. sync: true,
  52394. title: "个人中心",
  52395. group: "商城"
  52396. }
  52397. },
  52398. {
  52399. path: "pages/index/category",
  52400. style: {
  52401. navigationBarTitleText: "商品分类"
  52402. },
  52403. meta: {
  52404. sync: true,
  52405. title: "商品分类",
  52406. group: "商城"
  52407. }
  52408. },
  52409. {
  52410. path: "pages/index/cart",
  52411. style: {
  52412. navigationBarTitleText: "购物车"
  52413. },
  52414. meta: {
  52415. sync: true,
  52416. title: "购物车",
  52417. group: "商城"
  52418. }
  52419. },
  52420. {
  52421. path: "pages/index/login"
  52422. },
  52423. {
  52424. path: "pages/index/search",
  52425. style: {
  52426. navigationBarTitleText: "搜索"
  52427. },
  52428. meta: {
  52429. sync: true,
  52430. title: "搜索",
  52431. group: "商城"
  52432. }
  52433. },
  52434. {
  52435. path: "pages/index/page",
  52436. style: {
  52437. navigationBarTitleText: ""
  52438. },
  52439. meta: {
  52440. auth: false,
  52441. sync: true,
  52442. title: "自定义页面",
  52443. group: "商城"
  52444. }
  52445. }
  52446. ];
  52447. const subPackages = [
  52448. {
  52449. root: "pages/goods",
  52450. pages: [
  52451. {
  52452. path: "index",
  52453. style: {
  52454. navigationBarTitleText: "商品详情"
  52455. },
  52456. meta: {
  52457. sync: true,
  52458. title: "普通商品",
  52459. group: "商品"
  52460. }
  52461. },
  52462. {
  52463. path: "groupon",
  52464. style: {
  52465. navigationBarTitleText: "拼团商品"
  52466. },
  52467. meta: {
  52468. sync: true,
  52469. title: "拼团商品",
  52470. group: "商品"
  52471. }
  52472. },
  52473. {
  52474. path: "seckill",
  52475. style: {
  52476. navigationBarTitleText: "秒杀商品"
  52477. },
  52478. meta: {
  52479. sync: true,
  52480. title: "秒杀商品",
  52481. group: "商品"
  52482. }
  52483. },
  52484. {
  52485. path: "list",
  52486. style: {
  52487. navigationBarTitleText: "商品列表"
  52488. },
  52489. meta: {
  52490. sync: true,
  52491. title: "商品列表",
  52492. group: "商品"
  52493. }
  52494. },
  52495. {
  52496. path: "comment/add",
  52497. style: {
  52498. navigationBarTitleText: "评价商品"
  52499. },
  52500. meta: {
  52501. auth: true
  52502. }
  52503. },
  52504. {
  52505. path: "comment/list",
  52506. style: {
  52507. navigationBarTitleText: "商品评价"
  52508. }
  52509. }
  52510. ]
  52511. },
  52512. {
  52513. root: "pages/order",
  52514. pages: [
  52515. {
  52516. path: "detail",
  52517. style: {
  52518. navigationBarTitleText: "订单详情"
  52519. },
  52520. meta: {
  52521. auth: true,
  52522. title: "订单详情"
  52523. }
  52524. },
  52525. {
  52526. path: "confirm",
  52527. style: {
  52528. navigationBarTitleText: "确认订单"
  52529. },
  52530. meta: {
  52531. auth: true,
  52532. title: "确认订单"
  52533. }
  52534. },
  52535. {
  52536. path: "list",
  52537. style: {
  52538. navigationBarTitleText: "我的订单",
  52539. enablePullDownRefresh: true
  52540. },
  52541. meta: {
  52542. auth: true,
  52543. sync: true,
  52544. title: "用户订单",
  52545. group: "订单中心"
  52546. }
  52547. },
  52548. {
  52549. path: "aftersale/apply",
  52550. style: {
  52551. navigationBarTitleText: "申请售后"
  52552. },
  52553. meta: {
  52554. auth: true,
  52555. title: "申请售后"
  52556. }
  52557. },
  52558. {
  52559. path: "aftersale/return-delivery",
  52560. style: {
  52561. navigationBarTitleText: "退货物流"
  52562. },
  52563. meta: {
  52564. auth: true,
  52565. title: "退货物流"
  52566. }
  52567. },
  52568. {
  52569. path: "aftersale/list",
  52570. style: {
  52571. navigationBarTitleText: "售后列表"
  52572. },
  52573. meta: {
  52574. auth: true,
  52575. sync: true,
  52576. title: "售后订单",
  52577. group: "订单中心"
  52578. }
  52579. },
  52580. {
  52581. path: "aftersale/detail",
  52582. style: {
  52583. navigationBarTitleText: "售后详情"
  52584. },
  52585. meta: {
  52586. auth: true,
  52587. title: "售后详情"
  52588. }
  52589. },
  52590. {
  52591. path: "aftersale/log",
  52592. style: {
  52593. navigationBarTitleText: "售后进度"
  52594. },
  52595. meta: {
  52596. auth: true,
  52597. title: "售后进度"
  52598. }
  52599. },
  52600. {
  52601. path: "express/log",
  52602. style: {
  52603. navigationBarTitleText: "物流轨迹"
  52604. },
  52605. meta: {
  52606. auth: true,
  52607. title: "物流轨迹"
  52608. }
  52609. },
  52610. {
  52611. path: "otherlist",
  52612. style: {
  52613. navigationBarTitleText: "",
  52614. enablePullDownRefresh: false
  52615. }
  52616. }
  52617. ]
  52618. },
  52619. {
  52620. root: "pages/user",
  52621. pages: [
  52622. {
  52623. path: "info",
  52624. style: {
  52625. navigationBarTitleText: "%title.userinfo%"
  52626. },
  52627. meta: {
  52628. auth: true,
  52629. sync: true,
  52630. title: "用户信息",
  52631. group: "用户中心"
  52632. }
  52633. },
  52634. {
  52635. path: "setting",
  52636. style: {
  52637. navigationBarTitleText: "%title.settings%"
  52638. },
  52639. meta: {
  52640. auth: true,
  52641. sync: true,
  52642. title: "用户设置",
  52643. group: "用户中心"
  52644. }
  52645. },
  52646. {
  52647. path: "qrcode-share",
  52648. style: {
  52649. navigationBarTitleText: "我的二维码/分享页"
  52650. },
  52651. meta: {
  52652. auth: true,
  52653. sync: true,
  52654. title: "我的二维码/分享页",
  52655. group: "用户中心"
  52656. }
  52657. },
  52658. {
  52659. path: "goods-collect",
  52660. style: {
  52661. navigationBarTitleText: "我的收藏"
  52662. },
  52663. meta: {
  52664. auth: true,
  52665. sync: true,
  52666. title: "商品收藏",
  52667. group: "用户中心"
  52668. }
  52669. },
  52670. {
  52671. path: "goods-log",
  52672. style: {
  52673. navigationBarTitleText: "我的足迹"
  52674. },
  52675. meta: {
  52676. auth: true,
  52677. sync: true,
  52678. title: "浏览记录",
  52679. group: "用户中心"
  52680. }
  52681. },
  52682. {
  52683. path: "address/list",
  52684. style: {
  52685. navigationBarTitleText: "实体商品收货地址"
  52686. },
  52687. meta: {
  52688. auth: true,
  52689. sync: true,
  52690. title: "地址管理",
  52691. group: "用户中心"
  52692. }
  52693. },
  52694. {
  52695. path: "dummyAddress/list",
  52696. style: {
  52697. navigationBarTitleText: "虚拟商品收货地址"
  52698. },
  52699. meta: {
  52700. auth: true,
  52701. sync: true,
  52702. title: "虚拟商品收货地址",
  52703. group: "用户中心"
  52704. }
  52705. },
  52706. {
  52707. path: "invoice/edit",
  52708. style: {
  52709. navigationBarTitleText: "发票抬头编辑"
  52710. },
  52711. meta: {
  52712. auth: true,
  52713. title: "发票抬头"
  52714. }
  52715. },
  52716. {
  52717. path: "invoice/list",
  52718. style: {
  52719. navigationBarTitleText: "发票抬头管理"
  52720. },
  52721. meta: {
  52722. auth: true,
  52723. sync: true,
  52724. title: "发票抬头管理",
  52725. group: "用户中心"
  52726. }
  52727. },
  52728. {
  52729. path: "address/edit",
  52730. style: {
  52731. navigationBarTitleText: "编辑地址"
  52732. },
  52733. meta: {
  52734. auth: true,
  52735. title: "编辑地址"
  52736. }
  52737. },
  52738. {
  52739. path: "dummyAddress/edit",
  52740. style: {
  52741. navigationBarTitleText: "编辑地址"
  52742. },
  52743. meta: {
  52744. auth: true,
  52745. title: "编辑地址"
  52746. }
  52747. },
  52748. {
  52749. path: "wallet/money",
  52750. style: {
  52751. navigationBarTitleText: "我的余额"
  52752. },
  52753. meta: {
  52754. auth: true,
  52755. sync: true,
  52756. title: "用户余额",
  52757. group: "用户中心"
  52758. }
  52759. },
  52760. {
  52761. path: "wallet/score",
  52762. style: {
  52763. navigationBarTitleText: "钱包"
  52764. },
  52765. meta: {
  52766. auth: true,
  52767. sync: true,
  52768. title: "钱包",
  52769. group: "用户中心"
  52770. }
  52771. },
  52772. {
  52773. path: "wallet/consumptionLog",
  52774. style: {
  52775. navigationBarTitleText: "消费分来源"
  52776. },
  52777. meta: {
  52778. auth: true,
  52779. sync: true,
  52780. title: "消费分来源",
  52781. group: "用户中心"
  52782. }
  52783. },
  52784. {
  52785. path: "wallet/topupConsumptionPoints",
  52786. style: {
  52787. navigationBarTitleText: "消费分充值"
  52788. },
  52789. meta: {
  52790. auth: true,
  52791. sync: true,
  52792. title: "消费分充值",
  52793. group: "用户中心"
  52794. }
  52795. },
  52796. {
  52797. path: "wallet/consumptionTransfersLog",
  52798. style: {
  52799. navigationBarTitleText: "消费分转账"
  52800. },
  52801. meta: {
  52802. auth: true,
  52803. sync: true,
  52804. title: "消费分转账",
  52805. group: "用户中心"
  52806. }
  52807. },
  52808. {
  52809. path: "wallet/consumptionTransfers",
  52810. style: {
  52811. navigationBarTitleText: "消费分转让"
  52812. },
  52813. meta: {
  52814. auth: true,
  52815. sync: true,
  52816. title: "消费分转让",
  52817. group: "用户中心"
  52818. }
  52819. },
  52820. {
  52821. path: "wallet/scoreToConsumption",
  52822. style: {
  52823. navigationBarTitleText: "佣金转消费分"
  52824. },
  52825. meta: {
  52826. auth: true,
  52827. sync: true,
  52828. title: "佣金转消费分",
  52829. group: "用户中心"
  52830. }
  52831. },
  52832. {
  52833. path: "wallet/withdraw",
  52834. style: {
  52835. navigationBarTitleText: "提现"
  52836. },
  52837. meta: {
  52838. auth: true,
  52839. sync: true,
  52840. title: "提现",
  52841. group: "提现"
  52842. }
  52843. },
  52844. {
  52845. path: "wallet/withdrawalLog",
  52846. style: {
  52847. navigationBarTitleText: "提现记录"
  52848. },
  52849. meta: {
  52850. auth: true,
  52851. sync: true,
  52852. title: "提现记录",
  52853. group: "提现记录"
  52854. }
  52855. },
  52856. {
  52857. path: "wallet/scoreToMoney",
  52858. style: {
  52859. navigationBarTitleText: "佣金兑换"
  52860. },
  52861. meta: {
  52862. auth: true,
  52863. sync: true,
  52864. title: "佣金兑换",
  52865. group: "用户中心"
  52866. }
  52867. },
  52868. {
  52869. path: "wallet/ScoreLog"
  52870. },
  52871. {
  52872. path: "wallet/maxScoreLog"
  52873. },
  52874. {
  52875. path: "wallet/team",
  52876. style: {
  52877. navigationBarTitleText: "团队"
  52878. },
  52879. meta: {
  52880. auth: true,
  52881. sync: true,
  52882. title: "团队",
  52883. group: "用户中心"
  52884. }
  52885. }
  52886. ]
  52887. },
  52888. {
  52889. root: "pages/commission",
  52890. pages: [
  52891. {
  52892. path: "index",
  52893. style: {
  52894. navigationBarTitleText: "分销"
  52895. },
  52896. meta: {
  52897. auth: true,
  52898. sync: true,
  52899. title: "分销中心",
  52900. group: "分销商城"
  52901. }
  52902. },
  52903. {
  52904. path: "wallet",
  52905. style: {
  52906. navigationBarTitleText: "我的佣金"
  52907. },
  52908. meta: {
  52909. auth: true,
  52910. sync: true,
  52911. title: "用户佣金",
  52912. group: "分销中心"
  52913. }
  52914. },
  52915. {
  52916. path: "goods",
  52917. style: {
  52918. navigationBarTitleText: "推广商品"
  52919. },
  52920. meta: {
  52921. auth: true,
  52922. sync: true,
  52923. title: "推广商品",
  52924. group: "分销商城"
  52925. }
  52926. },
  52927. {
  52928. path: "order",
  52929. style: {
  52930. navigationBarTitleText: "分销订单"
  52931. },
  52932. meta: {
  52933. auth: true,
  52934. sync: true,
  52935. title: "分销订单",
  52936. group: "分销商城"
  52937. }
  52938. },
  52939. {
  52940. path: "team",
  52941. style: {
  52942. navigationBarTitleText: "我的团队"
  52943. },
  52944. meta: {
  52945. auth: true,
  52946. sync: true,
  52947. title: "我的团队",
  52948. group: "分销商城"
  52949. }
  52950. },
  52951. {
  52952. path: "promoter",
  52953. style: {
  52954. navigationBarTitleText: "推广人排行榜"
  52955. },
  52956. meta: {
  52957. auth: true,
  52958. sync: true,
  52959. title: "推广人排行榜",
  52960. group: "分销商城"
  52961. }
  52962. },
  52963. {
  52964. path: "commission-ranking",
  52965. style: {
  52966. navigationBarTitleText: "佣金排行榜"
  52967. },
  52968. meta: {
  52969. auth: true,
  52970. sync: true,
  52971. title: "佣金排行榜",
  52972. group: "分销商城"
  52973. }
  52974. },
  52975. {
  52976. path: "withdraw",
  52977. style: {
  52978. navigationBarTitleText: "申请提现"
  52979. },
  52980. meta: {
  52981. auth: true,
  52982. sync: true,
  52983. title: "申请提现",
  52984. group: "分销商城"
  52985. }
  52986. }
  52987. ]
  52988. },
  52989. {
  52990. root: "pages/app",
  52991. pages: [
  52992. {
  52993. path: "sign",
  52994. style: {
  52995. navigationBarTitleText: "签到中心"
  52996. },
  52997. meta: {
  52998. auth: true,
  52999. sync: true,
  53000. title: "签到中心",
  53001. group: "应用"
  53002. }
  53003. }
  53004. ]
  53005. },
  53006. {
  53007. root: "pages/shop",
  53008. pages: [
  53009. {
  53010. path: "index",
  53011. style: {
  53012. navigationBarTitleText: "店铺首页"
  53013. },
  53014. meta: {
  53015. auth: true,
  53016. sync: true,
  53017. title: "店铺首页",
  53018. group: "应用"
  53019. }
  53020. },
  53021. {
  53022. path: "category",
  53023. style: {
  53024. navigationBarTitleText: "店铺分类"
  53025. },
  53026. meta: {
  53027. auth: true,
  53028. sync: true,
  53029. title: "店铺分类",
  53030. group: "应用"
  53031. }
  53032. },
  53033. {
  53034. path: "allproduct",
  53035. style: {
  53036. navigationBarTitleText: "所有商品"
  53037. },
  53038. meta: {
  53039. auth: true,
  53040. sync: true,
  53041. title: "所有商品",
  53042. group: "应用"
  53043. }
  53044. }
  53045. ]
  53046. },
  53047. {
  53048. root: "pages/public",
  53049. pages: [
  53050. {
  53051. path: "setting",
  53052. style: {
  53053. navigationBarTitleText: "系统设置"
  53054. },
  53055. meta: {
  53056. sync: true,
  53057. title: "系统设置",
  53058. group: "通用"
  53059. }
  53060. },
  53061. {
  53062. path: "richtext",
  53063. style: {
  53064. navigationBarTitleText: "富文本"
  53065. },
  53066. meta: {
  53067. sync: true,
  53068. title: "富文本",
  53069. group: "通用"
  53070. }
  53071. },
  53072. {
  53073. path: "faq",
  53074. style: {
  53075. navigationBarTitleText: "常见问题"
  53076. },
  53077. meta: {
  53078. sync: true,
  53079. title: "常见问题",
  53080. group: "通用"
  53081. }
  53082. },
  53083. {
  53084. path: "error",
  53085. style: {
  53086. navigationBarTitleText: "错误页面"
  53087. }
  53088. },
  53089. {
  53090. path: "webview",
  53091. style: {
  53092. navigationBarTitleText: ""
  53093. }
  53094. },
  53095. {
  53096. path: "merchant",
  53097. style: {
  53098. navigationBarTitleText: "",
  53099. enablePullDownRefresh: false
  53100. }
  53101. },
  53102. {
  53103. path: "merchantApplyList",
  53104. style: {
  53105. navigationBarTitleText: "",
  53106. enablePullDownRefresh: false
  53107. }
  53108. }
  53109. ]
  53110. },
  53111. {
  53112. root: "pages/coupon",
  53113. pages: [
  53114. {
  53115. path: "list",
  53116. style: {
  53117. navigationBarTitleText: "领券中心"
  53118. },
  53119. meta: {
  53120. sync: true,
  53121. title: "领券中心",
  53122. group: "优惠券"
  53123. }
  53124. },
  53125. {
  53126. path: "detail",
  53127. style: {
  53128. navigationBarTitleText: "优惠券"
  53129. },
  53130. meta: {
  53131. auth: false,
  53132. sync: true,
  53133. title: "优惠券详情",
  53134. group: "优惠券"
  53135. }
  53136. }
  53137. ]
  53138. },
  53139. {
  53140. root: "pages/chat",
  53141. pages: [
  53142. {
  53143. path: "index",
  53144. style: {
  53145. navigationBarTitleText: "客服"
  53146. },
  53147. meta: {
  53148. auth: true,
  53149. sync: true,
  53150. title: "客服",
  53151. group: "客服"
  53152. }
  53153. },
  53154. {
  53155. path: "speechtotext",
  53156. style: {
  53157. navigationBarTitleText: "语音转文字",
  53158. enablePullDownRefresh: false
  53159. },
  53160. meta: {
  53161. auth: true,
  53162. sync: true,
  53163. title: "语音转文字",
  53164. group: "语音转文字"
  53165. }
  53166. }
  53167. ]
  53168. },
  53169. {
  53170. root: "pages/pay",
  53171. pages: [
  53172. {
  53173. path: "index",
  53174. style: {
  53175. navigationBarTitleText: "收银台"
  53176. }
  53177. },
  53178. {
  53179. path: "result",
  53180. style: {
  53181. navigationBarTitleText: "富友支付结果"
  53182. }
  53183. },
  53184. {
  53185. path: "resultYuan",
  53186. style: {
  53187. navigationBarTitleText: "支付结果"
  53188. }
  53189. },
  53190. {
  53191. path: "recharge",
  53192. style: {
  53193. navigationBarTitleText: "充值余额"
  53194. },
  53195. meta: {
  53196. auth: true,
  53197. sync: true,
  53198. title: "充值余额",
  53199. group: "支付"
  53200. }
  53201. },
  53202. {
  53203. path: "recharge-log",
  53204. style: {
  53205. navigationBarTitleText: "充值记录"
  53206. },
  53207. meta: {
  53208. auth: true,
  53209. sync: true,
  53210. title: "充值记录",
  53211. group: "支付"
  53212. }
  53213. }
  53214. ]
  53215. },
  53216. {
  53217. root: "pages/activity",
  53218. pages: [
  53219. {
  53220. path: "groupon/detail",
  53221. style: {
  53222. navigationBarTitleText: "拼团详情"
  53223. }
  53224. },
  53225. {
  53226. path: "groupon/order",
  53227. style: {
  53228. navigationBarTitleText: "我的拼团",
  53229. enablePullDownRefresh: true
  53230. },
  53231. meta: {
  53232. auth: true,
  53233. sync: true,
  53234. title: "拼团订单",
  53235. group: "营销活动"
  53236. }
  53237. },
  53238. {
  53239. path: "index",
  53240. style: {
  53241. navigationBarTitleText: "营销商品"
  53242. },
  53243. meta: {
  53244. sync: true,
  53245. title: "营销商品",
  53246. group: "营销活动"
  53247. }
  53248. },
  53249. {
  53250. path: "groupon/list",
  53251. style: {
  53252. navigationBarTitleText: "拼团活动"
  53253. },
  53254. meta: {
  53255. sync: true,
  53256. title: "拼团活动",
  53257. group: "营销活动"
  53258. }
  53259. },
  53260. {
  53261. path: "seckill/list",
  53262. style: {
  53263. navigationBarTitleText: "秒杀活动"
  53264. },
  53265. meta: {
  53266. sync: true,
  53267. title: "秒杀活动",
  53268. group: "营销活动"
  53269. }
  53270. },
  53271. {
  53272. path: "bargain/list",
  53273. style: {
  53274. navigationBarTitleText: "砍价列表"
  53275. },
  53276. meta: {
  53277. sync: true,
  53278. title: "砍价列表",
  53279. group: "营销活动"
  53280. }
  53281. },
  53282. {
  53283. path: "bargain/detail",
  53284. style: {
  53285. navigationBarTitleText: "砍价详情"
  53286. },
  53287. meta: {
  53288. sync: true,
  53289. title: "砍价详情",
  53290. group: "营销活动"
  53291. }
  53292. }
  53293. ]
  53294. }
  53295. ];
  53296. const globalStyle = {
  53297. navigationBarTextStyle: "black",
  53298. navigationBarTitleText: "常来此购",
  53299. navigationBarBackgroundColor: "#FFFFFF",
  53300. backgroundColor: "#FFFFFF",
  53301. navigationStyle: "custom"
  53302. };
  53303. const tabBar = {
  53304. list: [
  53305. {
  53306. pagePath: "pages/index/index"
  53307. },
  53308. {
  53309. pagePath: "pages/index/cart"
  53310. },
  53311. {
  53312. pagePath: "pages/index/user"
  53313. }
  53314. ]
  53315. };
  53316. const condition = {
  53317. current: 0,
  53318. list: [
  53319. {
  53320. name: "",
  53321. path: "",
  53322. query: ""
  53323. }
  53324. ]
  53325. };
  53326. const usingComponents = {
  53327. richtext: "@/pages/public/richtext"
  53328. };
  53329. const e = {
  53330. easycom,
  53331. pages,
  53332. subPackages,
  53333. globalStyle,
  53334. tabBar,
  53335. condition,
  53336. usingComponents
  53337. };
  53338. var define_process_env_UNI_SECURE_NETWORK_CONFIG_default = [];
  53339. function t$3(e2) {
  53340. return e2 && e2.__esModule && Object.prototype.hasOwnProperty.call(e2, "default") ? e2.default : e2;
  53341. }
  53342. function n(e2, t2, n2) {
  53343. return e2(n2 = { path: t2, exports: {}, require: function(e3, t3) {
  53344. return function() {
  53345. throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
  53346. }(null == t3 && n2.path);
  53347. } }, n2.exports), n2.exports;
  53348. }
  53349. var s = n(function(e2, t2) {
  53350. var n2;
  53351. e2.exports = (n2 = n2 || function(e3, t3) {
  53352. var n3 = Object.create || /* @__PURE__ */ function() {
  53353. function e4() {
  53354. }
  53355. return function(t4) {
  53356. var n4;
  53357. return e4.prototype = t4, n4 = new e4(), e4.prototype = null, n4;
  53358. };
  53359. }(), s2 = {}, r2 = s2.lib = {}, i2 = r2.Base = { extend: function(e4) {
  53360. var t4 = n3(this);
  53361. return e4 && t4.mixIn(e4), t4.hasOwnProperty("init") && this.init !== t4.init || (t4.init = function() {
  53362. t4.$super.init.apply(this, arguments);
  53363. }), t4.init.prototype = t4, t4.$super = this, t4;
  53364. }, create: function() {
  53365. var e4 = this.extend();
  53366. return e4.init.apply(e4, arguments), e4;
  53367. }, init: function() {
  53368. }, mixIn: function(e4) {
  53369. for (var t4 in e4)
  53370. e4.hasOwnProperty(t4) && (this[t4] = e4[t4]);
  53371. e4.hasOwnProperty("toString") && (this.toString = e4.toString);
  53372. }, clone: function() {
  53373. return this.init.prototype.extend(this);
  53374. } }, o2 = r2.WordArray = i2.extend({ init: function(e4, n4) {
  53375. e4 = this.words = e4 || [], this.sigBytes = n4 != t3 ? n4 : 4 * e4.length;
  53376. }, toString: function(e4) {
  53377. return (e4 || c2).stringify(this);
  53378. }, concat: function(e4) {
  53379. var t4 = this.words, n4 = e4.words, s3 = this.sigBytes, r3 = e4.sigBytes;
  53380. if (this.clamp(), s3 % 4)
  53381. for (var i3 = 0; i3 < r3; i3++) {
  53382. var o3 = n4[i3 >>> 2] >>> 24 - i3 % 4 * 8 & 255;
  53383. t4[s3 + i3 >>> 2] |= o3 << 24 - (s3 + i3) % 4 * 8;
  53384. }
  53385. else
  53386. for (i3 = 0; i3 < r3; i3 += 4)
  53387. t4[s3 + i3 >>> 2] = n4[i3 >>> 2];
  53388. return this.sigBytes += r3, this;
  53389. }, clamp: function() {
  53390. var t4 = this.words, n4 = this.sigBytes;
  53391. t4[n4 >>> 2] &= 4294967295 << 32 - n4 % 4 * 8, t4.length = e3.ceil(n4 / 4);
  53392. }, clone: function() {
  53393. var e4 = i2.clone.call(this);
  53394. return e4.words = this.words.slice(0), e4;
  53395. }, random: function(t4) {
  53396. for (var n4, s3 = [], r3 = function(t5) {
  53397. t5 = t5;
  53398. var n5 = 987654321, s4 = 4294967295;
  53399. return function() {
  53400. var r4 = ((n5 = 36969 * (65535 & n5) + (n5 >> 16) & s4) << 16) + (t5 = 18e3 * (65535 & t5) + (t5 >> 16) & s4) & s4;
  53401. return r4 /= 4294967296, (r4 += 0.5) * (e3.random() > 0.5 ? 1 : -1);
  53402. };
  53403. }, i3 = 0; i3 < t4; i3 += 4) {
  53404. var a3 = r3(4294967296 * (n4 || e3.random()));
  53405. n4 = 987654071 * a3(), s3.push(4294967296 * a3() | 0);
  53406. }
  53407. return new o2.init(s3, t4);
  53408. } }), a2 = s2.enc = {}, c2 = a2.Hex = { stringify: function(e4) {
  53409. for (var t4 = e4.words, n4 = e4.sigBytes, s3 = [], r3 = 0; r3 < n4; r3++) {
  53410. var i3 = t4[r3 >>> 2] >>> 24 - r3 % 4 * 8 & 255;
  53411. s3.push((i3 >>> 4).toString(16)), s3.push((15 & i3).toString(16));
  53412. }
  53413. return s3.join("");
  53414. }, parse: function(e4) {
  53415. for (var t4 = e4.length, n4 = [], s3 = 0; s3 < t4; s3 += 2)
  53416. n4[s3 >>> 3] |= parseInt(e4.substr(s3, 2), 16) << 24 - s3 % 8 * 4;
  53417. return new o2.init(n4, t4 / 2);
  53418. } }, u2 = a2.Latin1 = { stringify: function(e4) {
  53419. for (var t4 = e4.words, n4 = e4.sigBytes, s3 = [], r3 = 0; r3 < n4; r3++) {
  53420. var i3 = t4[r3 >>> 2] >>> 24 - r3 % 4 * 8 & 255;
  53421. s3.push(String.fromCharCode(i3));
  53422. }
  53423. return s3.join("");
  53424. }, parse: function(e4) {
  53425. for (var t4 = e4.length, n4 = [], s3 = 0; s3 < t4; s3++)
  53426. n4[s3 >>> 2] |= (255 & e4.charCodeAt(s3)) << 24 - s3 % 4 * 8;
  53427. return new o2.init(n4, t4);
  53428. } }, l2 = a2.Utf8 = { stringify: function(e4) {
  53429. try {
  53430. return decodeURIComponent(escape(u2.stringify(e4)));
  53431. } catch (e5) {
  53432. throw new Error("Malformed UTF-8 data");
  53433. }
  53434. }, parse: function(e4) {
  53435. return u2.parse(unescape(encodeURIComponent(e4)));
  53436. } }, h2 = r2.BufferedBlockAlgorithm = i2.extend({ reset: function() {
  53437. this._data = new o2.init(), this._nDataBytes = 0;
  53438. }, _append: function(e4) {
  53439. "string" == typeof e4 && (e4 = l2.parse(e4)), this._data.concat(e4), this._nDataBytes += e4.sigBytes;
  53440. }, _process: function(t4) {
  53441. var n4 = this._data, s3 = n4.words, r3 = n4.sigBytes, i3 = this.blockSize, a3 = r3 / (4 * i3), c3 = (a3 = t4 ? e3.ceil(a3) : e3.max((0 | a3) - this._minBufferSize, 0)) * i3, u3 = e3.min(4 * c3, r3);
  53442. if (c3) {
  53443. for (var l3 = 0; l3 < c3; l3 += i3)
  53444. this._doProcessBlock(s3, l3);
  53445. var h3 = s3.splice(0, c3);
  53446. n4.sigBytes -= u3;
  53447. }
  53448. return new o2.init(h3, u3);
  53449. }, clone: function() {
  53450. var e4 = i2.clone.call(this);
  53451. return e4._data = this._data.clone(), e4;
  53452. }, _minBufferSize: 0 });
  53453. r2.Hasher = h2.extend({ cfg: i2.extend(), init: function(e4) {
  53454. this.cfg = this.cfg.extend(e4), this.reset();
  53455. }, reset: function() {
  53456. h2.reset.call(this), this._doReset();
  53457. }, update: function(e4) {
  53458. return this._append(e4), this._process(), this;
  53459. }, finalize: function(e4) {
  53460. return e4 && this._append(e4), this._doFinalize();
  53461. }, blockSize: 16, _createHelper: function(e4) {
  53462. return function(t4, n4) {
  53463. return new e4.init(n4).finalize(t4);
  53464. };
  53465. }, _createHmacHelper: function(e4) {
  53466. return function(t4, n4) {
  53467. return new d2.HMAC.init(e4, n4).finalize(t4);
  53468. };
  53469. } });
  53470. var d2 = s2.algo = {};
  53471. return s2;
  53472. }(Math), n2);
  53473. }), r = s, i = (n(function(e2, t2) {
  53474. var n2;
  53475. e2.exports = (n2 = r, function(e3) {
  53476. var t3 = n2, s2 = t3.lib, r2 = s2.WordArray, i2 = s2.Hasher, o2 = t3.algo, a2 = [];
  53477. !function() {
  53478. for (var t4 = 0; t4 < 64; t4++)
  53479. a2[t4] = 4294967296 * e3.abs(e3.sin(t4 + 1)) | 0;
  53480. }();
  53481. var c2 = o2.MD5 = i2.extend({ _doReset: function() {
  53482. this._hash = new r2.init([1732584193, 4023233417, 2562383102, 271733878]);
  53483. }, _doProcessBlock: function(e4, t4) {
  53484. for (var n3 = 0; n3 < 16; n3++) {
  53485. var s3 = t4 + n3, r3 = e4[s3];
  53486. e4[s3] = 16711935 & (r3 << 8 | r3 >>> 24) | 4278255360 & (r3 << 24 | r3 >>> 8);
  53487. }
  53488. var i3 = this._hash.words, o3 = e4[t4 + 0], c3 = e4[t4 + 1], p2 = e4[t4 + 2], f2 = e4[t4 + 3], g2 = e4[t4 + 4], m2 = e4[t4 + 5], y2 = e4[t4 + 6], _2 = e4[t4 + 7], w2 = e4[t4 + 8], v2 = e4[t4 + 9], I2 = e4[t4 + 10], S2 = e4[t4 + 11], b2 = e4[t4 + 12], k2 = e4[t4 + 13], A2 = e4[t4 + 14], C2 = e4[t4 + 15], P2 = i3[0], T2 = i3[1], x2 = i3[2], O2 = i3[3];
  53489. P2 = u2(P2, T2, x2, O2, o3, 7, a2[0]), O2 = u2(O2, P2, T2, x2, c3, 12, a2[1]), x2 = u2(x2, O2, P2, T2, p2, 17, a2[2]), T2 = u2(T2, x2, O2, P2, f2, 22, a2[3]), P2 = u2(P2, T2, x2, O2, g2, 7, a2[4]), O2 = u2(O2, P2, T2, x2, m2, 12, a2[5]), x2 = u2(x2, O2, P2, T2, y2, 17, a2[6]), T2 = u2(T2, x2, O2, P2, _2, 22, a2[7]), P2 = u2(P2, T2, x2, O2, w2, 7, a2[8]), O2 = u2(O2, P2, T2, x2, v2, 12, a2[9]), x2 = u2(x2, O2, P2, T2, I2, 17, a2[10]), T2 = u2(T2, x2, O2, P2, S2, 22, a2[11]), P2 = u2(P2, T2, x2, O2, b2, 7, a2[12]), O2 = u2(O2, P2, T2, x2, k2, 12, a2[13]), x2 = u2(x2, O2, P2, T2, A2, 17, a2[14]), P2 = l2(P2, T2 = u2(T2, x2, O2, P2, C2, 22, a2[15]), x2, O2, c3, 5, a2[16]), O2 = l2(O2, P2, T2, x2, y2, 9, a2[17]), x2 = l2(x2, O2, P2, T2, S2, 14, a2[18]), T2 = l2(T2, x2, O2, P2, o3, 20, a2[19]), P2 = l2(P2, T2, x2, O2, m2, 5, a2[20]), O2 = l2(O2, P2, T2, x2, I2, 9, a2[21]), x2 = l2(x2, O2, P2, T2, C2, 14, a2[22]), T2 = l2(T2, x2, O2, P2, g2, 20, a2[23]), P2 = l2(P2, T2, x2, O2, v2, 5, a2[24]), O2 = l2(O2, P2, T2, x2, A2, 9, a2[25]), x2 = l2(x2, O2, P2, T2, f2, 14, a2[26]), T2 = l2(T2, x2, O2, P2, w2, 20, a2[27]), P2 = l2(P2, T2, x2, O2, k2, 5, a2[28]), O2 = l2(O2, P2, T2, x2, p2, 9, a2[29]), x2 = l2(x2, O2, P2, T2, _2, 14, a2[30]), P2 = h2(P2, T2 = l2(T2, x2, O2, P2, b2, 20, a2[31]), x2, O2, m2, 4, a2[32]), O2 = h2(O2, P2, T2, x2, w2, 11, a2[33]), x2 = h2(x2, O2, P2, T2, S2, 16, a2[34]), T2 = h2(T2, x2, O2, P2, A2, 23, a2[35]), P2 = h2(P2, T2, x2, O2, c3, 4, a2[36]), O2 = h2(O2, P2, T2, x2, g2, 11, a2[37]), x2 = h2(x2, O2, P2, T2, _2, 16, a2[38]), T2 = h2(T2, x2, O2, P2, I2, 23, a2[39]), P2 = h2(P2, T2, x2, O2, k2, 4, a2[40]), O2 = h2(O2, P2, T2, x2, o3, 11, a2[41]), x2 = h2(x2, O2, P2, T2, f2, 16, a2[42]), T2 = h2(T2, x2, O2, P2, y2, 23, a2[43]), P2 = h2(P2, T2, x2, O2, v2, 4, a2[44]), O2 = h2(O2, P2, T2, x2, b2, 11, a2[45]), x2 = h2(x2, O2, P2, T2, C2, 16, a2[46]), P2 = d2(P2, T2 = h2(T2, x2, O2, P2, p2, 23, a2[47]), x2, O2, o3, 6, a2[48]), O2 = d2(O2, P2, T2, x2, _2, 10, a2[49]), x2 = d2(x2, O2, P2, T2, A2, 15, a2[50]), T2 = d2(T2, x2, O2, P2, m2, 21, a2[51]), P2 = d2(P2, T2, x2, O2, b2, 6, a2[52]), O2 = d2(O2, P2, T2, x2, f2, 10, a2[53]), x2 = d2(x2, O2, P2, T2, I2, 15, a2[54]), T2 = d2(T2, x2, O2, P2, c3, 21, a2[55]), P2 = d2(P2, T2, x2, O2, w2, 6, a2[56]), O2 = d2(O2, P2, T2, x2, C2, 10, a2[57]), x2 = d2(x2, O2, P2, T2, y2, 15, a2[58]), T2 = d2(T2, x2, O2, P2, k2, 21, a2[59]), P2 = d2(P2, T2, x2, O2, g2, 6, a2[60]), O2 = d2(O2, P2, T2, x2, S2, 10, a2[61]), x2 = d2(x2, O2, P2, T2, p2, 15, a2[62]), T2 = d2(T2, x2, O2, P2, v2, 21, a2[63]), i3[0] = i3[0] + P2 | 0, i3[1] = i3[1] + T2 | 0, i3[2] = i3[2] + x2 | 0, i3[3] = i3[3] + O2 | 0;
  53490. }, _doFinalize: function() {
  53491. var t4 = this._data, n3 = t4.words, s3 = 8 * this._nDataBytes, r3 = 8 * t4.sigBytes;
  53492. n3[r3 >>> 5] |= 128 << 24 - r3 % 32;
  53493. var i3 = e3.floor(s3 / 4294967296), o3 = s3;
  53494. n3[15 + (r3 + 64 >>> 9 << 4)] = 16711935 & (i3 << 8 | i3 >>> 24) | 4278255360 & (i3 << 24 | i3 >>> 8), n3[14 + (r3 + 64 >>> 9 << 4)] = 16711935 & (o3 << 8 | o3 >>> 24) | 4278255360 & (o3 << 24 | o3 >>> 8), t4.sigBytes = 4 * (n3.length + 1), this._process();
  53495. for (var a3 = this._hash, c3 = a3.words, u3 = 0; u3 < 4; u3++) {
  53496. var l3 = c3[u3];
  53497. c3[u3] = 16711935 & (l3 << 8 | l3 >>> 24) | 4278255360 & (l3 << 24 | l3 >>> 8);
  53498. }
  53499. return a3;
  53500. }, clone: function() {
  53501. var e4 = i2.clone.call(this);
  53502. return e4._hash = this._hash.clone(), e4;
  53503. } });
  53504. function u2(e4, t4, n3, s3, r3, i3, o3) {
  53505. var a3 = e4 + (t4 & n3 | ~t4 & s3) + r3 + o3;
  53506. return (a3 << i3 | a3 >>> 32 - i3) + t4;
  53507. }
  53508. function l2(e4, t4, n3, s3, r3, i3, o3) {
  53509. var a3 = e4 + (t4 & s3 | n3 & ~s3) + r3 + o3;
  53510. return (a3 << i3 | a3 >>> 32 - i3) + t4;
  53511. }
  53512. function h2(e4, t4, n3, s3, r3, i3, o3) {
  53513. var a3 = e4 + (t4 ^ n3 ^ s3) + r3 + o3;
  53514. return (a3 << i3 | a3 >>> 32 - i3) + t4;
  53515. }
  53516. function d2(e4, t4, n3, s3, r3, i3, o3) {
  53517. var a3 = e4 + (n3 ^ (t4 | ~s3)) + r3 + o3;
  53518. return (a3 << i3 | a3 >>> 32 - i3) + t4;
  53519. }
  53520. t3.MD5 = i2._createHelper(c2), t3.HmacMD5 = i2._createHmacHelper(c2);
  53521. }(Math), n2.MD5);
  53522. }), n(function(e2, t2) {
  53523. var n2;
  53524. e2.exports = (n2 = r, void function() {
  53525. var e3 = n2, t3 = e3.lib.Base, s2 = e3.enc.Utf8;
  53526. e3.algo.HMAC = t3.extend({ init: function(e4, t4) {
  53527. e4 = this._hasher = new e4.init(), "string" == typeof t4 && (t4 = s2.parse(t4));
  53528. var n3 = e4.blockSize, r2 = 4 * n3;
  53529. t4.sigBytes > r2 && (t4 = e4.finalize(t4)), t4.clamp();
  53530. for (var i2 = this._oKey = t4.clone(), o2 = this._iKey = t4.clone(), a2 = i2.words, c2 = o2.words, u2 = 0; u2 < n3; u2++)
  53531. a2[u2] ^= 1549556828, c2[u2] ^= 909522486;
  53532. i2.sigBytes = o2.sigBytes = r2, this.reset();
  53533. }, reset: function() {
  53534. var e4 = this._hasher;
  53535. e4.reset(), e4.update(this._iKey);
  53536. }, update: function(e4) {
  53537. return this._hasher.update(e4), this;
  53538. }, finalize: function(e4) {
  53539. var t4 = this._hasher, n3 = t4.finalize(e4);
  53540. return t4.reset(), t4.finalize(this._oKey.clone().concat(n3));
  53541. } });
  53542. }());
  53543. }), n(function(e2, t2) {
  53544. e2.exports = r.HmacMD5;
  53545. })), o = n(function(e2, t2) {
  53546. e2.exports = r.enc.Utf8;
  53547. }), a = n(function(e2, t2) {
  53548. var n2;
  53549. e2.exports = (n2 = r, function() {
  53550. var e3 = n2, t3 = e3.lib.WordArray;
  53551. function s2(e4, n3, s3) {
  53552. for (var r2 = [], i2 = 0, o2 = 0; o2 < n3; o2++)
  53553. if (o2 % 4) {
  53554. var a2 = s3[e4.charCodeAt(o2 - 1)] << o2 % 4 * 2, c2 = s3[e4.charCodeAt(o2)] >>> 6 - o2 % 4 * 2;
  53555. r2[i2 >>> 2] |= (a2 | c2) << 24 - i2 % 4 * 8, i2++;
  53556. }
  53557. return t3.create(r2, i2);
  53558. }
  53559. e3.enc.Base64 = { stringify: function(e4) {
  53560. var t4 = e4.words, n3 = e4.sigBytes, s3 = this._map;
  53561. e4.clamp();
  53562. for (var r2 = [], i2 = 0; i2 < n3; i2 += 3)
  53563. for (var o2 = (t4[i2 >>> 2] >>> 24 - i2 % 4 * 8 & 255) << 16 | (t4[i2 + 1 >>> 2] >>> 24 - (i2 + 1) % 4 * 8 & 255) << 8 | t4[i2 + 2 >>> 2] >>> 24 - (i2 + 2) % 4 * 8 & 255, a2 = 0; a2 < 4 && i2 + 0.75 * a2 < n3; a2++)
  53564. r2.push(s3.charAt(o2 >>> 6 * (3 - a2) & 63));
  53565. var c2 = s3.charAt(64);
  53566. if (c2)
  53567. for (; r2.length % 4; )
  53568. r2.push(c2);
  53569. return r2.join("");
  53570. }, parse: function(e4) {
  53571. var t4 = e4.length, n3 = this._map, r2 = this._reverseMap;
  53572. if (!r2) {
  53573. r2 = this._reverseMap = [];
  53574. for (var i2 = 0; i2 < n3.length; i2++)
  53575. r2[n3.charCodeAt(i2)] = i2;
  53576. }
  53577. var o2 = n3.charAt(64);
  53578. if (o2) {
  53579. var a2 = e4.indexOf(o2);
  53580. -1 !== a2 && (t4 = a2);
  53581. }
  53582. return s2(e4, t4, r2);
  53583. }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" };
  53584. }(), n2.enc.Base64);
  53585. });
  53586. const c = "FUNCTION", u = "OBJECT", l = "CLIENT_DB", h = "pending", d = "fulfilled", p = "rejected";
  53587. function f(e2) {
  53588. return Object.prototype.toString.call(e2).slice(8, -1).toLowerCase();
  53589. }
  53590. function g(e2) {
  53591. return "object" === f(e2);
  53592. }
  53593. function m(e2) {
  53594. return "function" == typeof e2;
  53595. }
  53596. function y(e2) {
  53597. return function() {
  53598. try {
  53599. return e2.apply(e2, arguments);
  53600. } catch (e3) {
  53601. console.error(e3);
  53602. }
  53603. };
  53604. }
  53605. const _ = "REJECTED", w = "NOT_PENDING";
  53606. class v {
  53607. constructor({ createPromise: e2, retryRule: t2 = _ } = {}) {
  53608. this.createPromise = e2, this.status = null, this.promise = null, this.retryRule = t2;
  53609. }
  53610. get needRetry() {
  53611. if (!this.status)
  53612. return true;
  53613. switch (this.retryRule) {
  53614. case _:
  53615. return this.status === p;
  53616. case w:
  53617. return this.status !== h;
  53618. }
  53619. }
  53620. exec() {
  53621. return this.needRetry ? (this.status = h, this.promise = this.createPromise().then((e2) => (this.status = d, Promise.resolve(e2)), (e2) => (this.status = p, Promise.reject(e2))), this.promise) : this.promise;
  53622. }
  53623. }
  53624. function I(e2) {
  53625. return e2 && "string" == typeof e2 ? JSON.parse(e2) : e2;
  53626. }
  53627. const S = true, b = "app", A = I(define_process_env_UNI_SECURE_NETWORK_CONFIG_default), C = b, P = I(""), T = I("[]") || [];
  53628. let O = "";
  53629. try {
  53630. O = "__UNI__7806143";
  53631. } catch (e2) {
  53632. }
  53633. let E = {};
  53634. function L(e2, t2 = {}) {
  53635. var n2, s2;
  53636. return n2 = E, s2 = e2, Object.prototype.hasOwnProperty.call(n2, s2) || (E[e2] = t2), E[e2];
  53637. }
  53638. E = uni._globalUniCloudObj ? uni._globalUniCloudObj : uni._globalUniCloudObj = {};
  53639. const R = ["invoke", "success", "fail", "complete"], U = L("_globalUniCloudInterceptor");
  53640. function N(e2, t2) {
  53641. U[e2] || (U[e2] = {}), g(t2) && Object.keys(t2).forEach((n2) => {
  53642. R.indexOf(n2) > -1 && function(e3, t3, n3) {
  53643. let s2 = U[e3][t3];
  53644. s2 || (s2 = U[e3][t3] = []), -1 === s2.indexOf(n3) && m(n3) && s2.push(n3);
  53645. }(e2, n2, t2[n2]);
  53646. });
  53647. }
  53648. function D(e2, t2) {
  53649. U[e2] || (U[e2] = {}), g(t2) ? Object.keys(t2).forEach((n2) => {
  53650. R.indexOf(n2) > -1 && function(e3, t3, n3) {
  53651. const s2 = U[e3][t3];
  53652. if (!s2)
  53653. return;
  53654. const r2 = s2.indexOf(n3);
  53655. r2 > -1 && s2.splice(r2, 1);
  53656. }(e2, n2, t2[n2]);
  53657. }) : delete U[e2];
  53658. }
  53659. function M(e2, t2) {
  53660. return e2 && 0 !== e2.length ? e2.reduce((e3, n2) => e3.then(() => n2(t2)), Promise.resolve()) : Promise.resolve();
  53661. }
  53662. function q(e2, t2) {
  53663. return U[e2] && U[e2][t2] || [];
  53664. }
  53665. function F(e2) {
  53666. N("callObject", e2);
  53667. }
  53668. const K = L("_globalUniCloudListener"), j = "response", $ = "needLogin", B = "refreshToken", W = "clientdb", H = "cloudfunction", J = "cloudobject";
  53669. function z(e2) {
  53670. return K[e2] || (K[e2] = []), K[e2];
  53671. }
  53672. function V(e2, t2) {
  53673. const n2 = z(e2);
  53674. n2.includes(t2) || n2.push(t2);
  53675. }
  53676. function G(e2, t2) {
  53677. const n2 = z(e2), s2 = n2.indexOf(t2);
  53678. -1 !== s2 && n2.splice(s2, 1);
  53679. }
  53680. function Y(e2, t2) {
  53681. const n2 = z(e2);
  53682. for (let e3 = 0; e3 < n2.length; e3++) {
  53683. (0, n2[e3])(t2);
  53684. }
  53685. }
  53686. let Q, X = false;
  53687. function Z() {
  53688. return Q || (Q = new Promise((e2) => {
  53689. X && e2(), function t2() {
  53690. if ("function" == typeof getCurrentPages) {
  53691. const t3 = getCurrentPages();
  53692. t3 && t3[0] && (X = true, e2());
  53693. }
  53694. X || setTimeout(() => {
  53695. t2();
  53696. }, 30);
  53697. }();
  53698. }), Q);
  53699. }
  53700. function ee(e2) {
  53701. const t2 = {};
  53702. for (const n2 in e2) {
  53703. const s2 = e2[n2];
  53704. m(s2) && (t2[n2] = y(s2));
  53705. }
  53706. return t2;
  53707. }
  53708. class te extends Error {
  53709. constructor(e2) {
  53710. super(e2.message), this.errMsg = e2.message || e2.errMsg || "unknown system error", this.code = this.errCode = e2.code || e2.errCode || "SYSTEM_ERROR", this.errSubject = this.subject = e2.subject || e2.errSubject, this.cause = e2.cause, this.requestId = e2.requestId;
  53711. }
  53712. toJson(e2 = 0) {
  53713. if (!(e2 >= 10))
  53714. return e2++, { errCode: this.errCode, errMsg: this.errMsg, errSubject: this.errSubject, cause: this.cause && this.cause.toJson ? this.cause.toJson(e2) : this.cause };
  53715. }
  53716. }
  53717. var ne = { request: (e2) => uni.request(e2), uploadFile: (e2) => uni.uploadFile(e2), setStorageSync: (e2, t2) => uni.setStorageSync(e2, t2), getStorageSync: (e2) => uni.getStorageSync(e2), removeStorageSync: (e2) => uni.removeStorageSync(e2), clearStorageSync: () => uni.clearStorageSync(), connectSocket: (e2) => uni.connectSocket(e2) };
  53718. function se(e2) {
  53719. return e2 && se(e2.__v_raw) || e2;
  53720. }
  53721. function re() {
  53722. return { token: ne.getStorageSync("uni_id_token") || ne.getStorageSync("uniIdToken"), tokenExpired: ne.getStorageSync("uni_id_token_expired") };
  53723. }
  53724. function ie({ token: e2, tokenExpired: t2 } = {}) {
  53725. e2 && ne.setStorageSync("uni_id_token", e2), t2 && ne.setStorageSync("uni_id_token_expired", t2);
  53726. }
  53727. let oe, ae;
  53728. function ce() {
  53729. return oe || (oe = uni.getSystemInfoSync()), oe;
  53730. }
  53731. function ue() {
  53732. let e2, t2;
  53733. try {
  53734. if (uni.getLaunchOptionsSync) {
  53735. if (uni.getLaunchOptionsSync.toString().indexOf("not yet implemented") > -1)
  53736. return;
  53737. const { scene: n2, channel: s2 } = uni.getLaunchOptionsSync();
  53738. e2 = s2, t2 = n2;
  53739. }
  53740. } catch (e3) {
  53741. }
  53742. return { channel: e2, scene: t2 };
  53743. }
  53744. let le = {};
  53745. function he() {
  53746. const e2 = uni.getLocale && uni.getLocale() || "en";
  53747. if (ae)
  53748. return { ...le, ...ae, locale: e2, LOCALE: e2 };
  53749. const t2 = ce(), { deviceId: n2, osName: s2, uniPlatform: r2, appId: i2 } = t2, o2 = ["appId", "appLanguage", "appName", "appVersion", "appVersionCode", "appWgtVersion", "browserName", "browserVersion", "deviceBrand", "deviceId", "deviceModel", "deviceType", "osName", "osVersion", "romName", "romVersion", "ua", "hostName", "hostVersion", "uniPlatform", "uniRuntimeVersion", "uniRuntimeVersionCode", "uniCompilerVersion", "uniCompilerVersionCode"];
  53750. for (const e3 in t2)
  53751. Object.hasOwnProperty.call(t2, e3) && -1 === o2.indexOf(e3) && delete t2[e3];
  53752. return ae = { PLATFORM: r2, OS: s2, APPID: i2, DEVICEID: n2, ...ue(), ...t2 }, { ...le, ...ae, locale: e2, LOCALE: e2 };
  53753. }
  53754. var de = { sign: function(e2, t2) {
  53755. let n2 = "";
  53756. return Object.keys(e2).sort().forEach(function(t3) {
  53757. e2[t3] && (n2 = n2 + "&" + t3 + "=" + e2[t3]);
  53758. }), n2 = n2.slice(1), i(n2, t2).toString();
  53759. }, wrappedRequest: function(e2, t2) {
  53760. return new Promise((n2, s2) => {
  53761. t2(Object.assign(e2, { complete(e3) {
  53762. e3 || (e3 = {});
  53763. const t3 = e3.data && e3.data.header && e3.data.header["x-serverless-request-id"] || e3.header && e3.header["request-id"];
  53764. if (!e3.statusCode || e3.statusCode >= 400) {
  53765. const n3 = e3.data && e3.data.error && e3.data.error.code || "SYS_ERR", r3 = e3.data && e3.data.error && e3.data.error.message || e3.errMsg || "request:fail";
  53766. return s2(new te({ code: n3, message: r3, requestId: t3 }));
  53767. }
  53768. const r2 = e3.data;
  53769. if (r2.error)
  53770. return s2(new te({ code: r2.error.code, message: r2.error.message, requestId: t3 }));
  53771. r2.result = r2.data, r2.requestId = t3, delete r2.data, n2(r2);
  53772. } }));
  53773. });
  53774. }, toBase64: function(e2) {
  53775. return a.stringify(o.parse(e2));
  53776. } };
  53777. var pe = class {
  53778. constructor(e2) {
  53779. ["spaceId", "clientSecret"].forEach((t2) => {
  53780. if (!Object.prototype.hasOwnProperty.call(e2, t2))
  53781. throw new Error(`${t2} required`);
  53782. }), this.config = Object.assign({}, { endpoint: 0 === e2.spaceId.indexOf("mp-") ? "https://api.next.bspapp.com" : "https://api.bspapp.com" }, e2), this.config.provider = "aliyun", this.config.requestUrl = this.config.endpoint + "/client", this.config.envType = this.config.envType || "public", this.config.accessTokenKey = "access_token_" + this.config.spaceId, this.adapter = ne, this._getAccessTokenPromiseHub = new v({ createPromise: () => this.requestAuth(this.setupRequest({ method: "serverless.auth.user.anonymousAuthorize", params: "{}" }, "auth")).then((e3) => {
  53783. if (!e3.result || !e3.result.accessToken)
  53784. throw new te({ code: "AUTH_FAILED", message: "获取accessToken失败" });
  53785. this.setAccessToken(e3.result.accessToken);
  53786. }), retryRule: w });
  53787. }
  53788. get hasAccessToken() {
  53789. return !!this.accessToken;
  53790. }
  53791. setAccessToken(e2) {
  53792. this.accessToken = e2;
  53793. }
  53794. requestWrapped(e2) {
  53795. return de.wrappedRequest(e2, this.adapter.request);
  53796. }
  53797. requestAuth(e2) {
  53798. return this.requestWrapped(e2);
  53799. }
  53800. request(e2, t2) {
  53801. return Promise.resolve().then(() => this.hasAccessToken ? t2 ? this.requestWrapped(e2) : this.requestWrapped(e2).catch((t3) => new Promise((e3, n2) => {
  53802. !t3 || "GATEWAY_INVALID_TOKEN" !== t3.code && "InvalidParameter.InvalidToken" !== t3.code ? n2(t3) : e3();
  53803. }).then(() => this.getAccessToken()).then(() => {
  53804. const t4 = this.rebuildRequest(e2);
  53805. return this.request(t4, true);
  53806. })) : this.getAccessToken().then(() => {
  53807. const t3 = this.rebuildRequest(e2);
  53808. return this.request(t3, true);
  53809. }));
  53810. }
  53811. rebuildRequest(e2) {
  53812. const t2 = Object.assign({}, e2);
  53813. return t2.data.token = this.accessToken, t2.header["x-basement-token"] = this.accessToken, t2.header["x-serverless-sign"] = de.sign(t2.data, this.config.clientSecret), t2;
  53814. }
  53815. setupRequest(e2, t2) {
  53816. const n2 = Object.assign({}, e2, { spaceId: this.config.spaceId, timestamp: Date.now() }), s2 = { "Content-Type": "application/json" };
  53817. return "auth" !== t2 && (n2.token = this.accessToken, s2["x-basement-token"] = this.accessToken), s2["x-serverless-sign"] = de.sign(n2, this.config.clientSecret), { url: this.config.requestUrl, method: "POST", data: n2, dataType: "json", header: s2 };
  53818. }
  53819. getAccessToken() {
  53820. return this._getAccessTokenPromiseHub.exec();
  53821. }
  53822. async authorize() {
  53823. await this.getAccessToken();
  53824. }
  53825. callFunction(e2) {
  53826. const t2 = { method: "serverless.function.runtime.invoke", params: JSON.stringify({ functionTarget: e2.name, functionArgs: e2.data || {} }) };
  53827. return this.request({ ...this.setupRequest(t2), timeout: e2.timeout });
  53828. }
  53829. getOSSUploadOptionsFromPath(e2) {
  53830. const t2 = { method: "serverless.file.resource.generateProximalSign", params: JSON.stringify(e2) };
  53831. return this.request(this.setupRequest(t2));
  53832. }
  53833. uploadFileToOSS({ url: e2, formData: t2, name: n2, filePath: s2, fileType: r2, onUploadProgress: i2 }) {
  53834. return new Promise((o2, a2) => {
  53835. const c2 = this.adapter.uploadFile({ url: e2, formData: t2, name: n2, filePath: s2, fileType: r2, header: { "X-OSS-server-side-encrpytion": "AES256" }, success(e3) {
  53836. e3 && e3.statusCode < 400 ? o2(e3) : a2(new te({ code: "UPLOAD_FAILED", message: "文件上传失败" }));
  53837. }, fail(e3) {
  53838. a2(new te({ code: e3.code || "UPLOAD_FAILED", message: e3.message || e3.errMsg || "文件上传失败" }));
  53839. } });
  53840. "function" == typeof i2 && c2 && "function" == typeof c2.onProgressUpdate && c2.onProgressUpdate((e3) => {
  53841. i2({ loaded: e3.totalBytesSent, total: e3.totalBytesExpectedToSend });
  53842. });
  53843. });
  53844. }
  53845. reportOSSUpload(e2) {
  53846. const t2 = { method: "serverless.file.resource.report", params: JSON.stringify(e2) };
  53847. return this.request(this.setupRequest(t2));
  53848. }
  53849. async uploadFile({ filePath: e2, cloudPath: t2, fileType: n2 = "image", cloudPathAsRealPath: s2 = false, onUploadProgress: r2, config: i2 }) {
  53850. if ("string" !== f(t2))
  53851. throw new te({ code: "INVALID_PARAM", message: "cloudPath必须为字符串类型" });
  53852. if (!(t2 = t2.trim()))
  53853. throw new te({ code: "INVALID_PARAM", message: "cloudPath不可为空" });
  53854. if (/:\/\//.test(t2))
  53855. throw new te({ code: "INVALID_PARAM", message: "cloudPath不合法" });
  53856. const o2 = i2 && i2.envType || this.config.envType;
  53857. if (s2 && ("/" !== t2[0] && (t2 = "/" + t2), t2.indexOf("\\") > -1))
  53858. throw new te({ code: "INVALID_PARAM", message: "使用cloudPath作为路径时,cloudPath不可包含“\\”" });
  53859. const a2 = (await this.getOSSUploadOptionsFromPath({ env: o2, filename: s2 ? t2.split("/").pop() : t2, fileId: s2 ? t2 : void 0 })).result, c2 = "https://" + a2.cdnDomain + "/" + a2.ossPath, { securityToken: u2, accessKeyId: l2, signature: h2, host: d2, ossPath: p2, id: g2, policy: m2, ossCallbackUrl: y2 } = a2, _2 = { "Cache-Control": "max-age=2592000", "Content-Disposition": "attachment", OSSAccessKeyId: l2, Signature: h2, host: d2, id: g2, key: p2, policy: m2, success_action_status: 200 };
  53860. if (u2 && (_2["x-oss-security-token"] = u2), y2) {
  53861. const e3 = JSON.stringify({ callbackUrl: y2, callbackBody: JSON.stringify({ fileId: g2, spaceId: this.config.spaceId }), callbackBodyType: "application/json" });
  53862. _2.callback = de.toBase64(e3);
  53863. }
  53864. const w2 = { url: "https://" + a2.host, formData: _2, fileName: "file", name: "file", filePath: e2, fileType: n2 };
  53865. if (await this.uploadFileToOSS(Object.assign({}, w2, { onUploadProgress: r2 })), y2)
  53866. return { success: true, filePath: e2, fileID: c2 };
  53867. if ((await this.reportOSSUpload({ id: g2 })).success)
  53868. return { success: true, filePath: e2, fileID: c2 };
  53869. throw new te({ code: "UPLOAD_FAILED", message: "文件上传失败" });
  53870. }
  53871. getTempFileURL({ fileList: e2 } = {}) {
  53872. return new Promise((t2, n2) => {
  53873. Array.isArray(e2) && 0 !== e2.length || n2(new te({ code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" })), t2({ fileList: e2.map((e3) => ({ fileID: e3, tempFileURL: e3 })) });
  53874. });
  53875. }
  53876. async getFileInfo({ fileList: e2 } = {}) {
  53877. if (!Array.isArray(e2) || 0 === e2.length)
  53878. throw new te({ code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" });
  53879. const t2 = { method: "serverless.file.resource.info", params: JSON.stringify({ id: e2.map((e3) => e3.split("?")[0]).join(",") }) };
  53880. return { fileList: (await this.request(this.setupRequest(t2))).result };
  53881. }
  53882. };
  53883. var fe = { init(e2) {
  53884. const t2 = new pe(e2), n2 = { signInAnonymously: function() {
  53885. return t2.authorize();
  53886. }, getLoginState: function() {
  53887. return Promise.resolve(false);
  53888. } };
  53889. return t2.auth = function() {
  53890. return n2;
  53891. }, t2.customAuth = t2.auth, t2;
  53892. } };
  53893. const ge = "undefined" != typeof location && "http:" === location.protocol ? "http:" : "https:";
  53894. var me;
  53895. !function(e2) {
  53896. e2.local = "local", e2.none = "none", e2.session = "session";
  53897. }(me || (me = {}));
  53898. var ye = function() {
  53899. }, _e = n(function(e2, t2) {
  53900. var n2;
  53901. e2.exports = (n2 = r, function(e3) {
  53902. var t3 = n2, s2 = t3.lib, r2 = s2.WordArray, i2 = s2.Hasher, o2 = t3.algo, a2 = [], c2 = [];
  53903. !function() {
  53904. function t4(t5) {
  53905. for (var n4 = e3.sqrt(t5), s4 = 2; s4 <= n4; s4++)
  53906. if (!(t5 % s4))
  53907. return false;
  53908. return true;
  53909. }
  53910. function n3(e4) {
  53911. return 4294967296 * (e4 - (0 | e4)) | 0;
  53912. }
  53913. for (var s3 = 2, r3 = 0; r3 < 64; )
  53914. t4(s3) && (r3 < 8 && (a2[r3] = n3(e3.pow(s3, 0.5))), c2[r3] = n3(e3.pow(s3, 1 / 3)), r3++), s3++;
  53915. }();
  53916. var u2 = [], l2 = o2.SHA256 = i2.extend({ _doReset: function() {
  53917. this._hash = new r2.init(a2.slice(0));
  53918. }, _doProcessBlock: function(e4, t4) {
  53919. for (var n3 = this._hash.words, s3 = n3[0], r3 = n3[1], i3 = n3[2], o3 = n3[3], a3 = n3[4], l3 = n3[5], h2 = n3[6], d2 = n3[7], p2 = 0; p2 < 64; p2++) {
  53920. if (p2 < 16)
  53921. u2[p2] = 0 | e4[t4 + p2];
  53922. else {
  53923. var f2 = u2[p2 - 15], g2 = (f2 << 25 | f2 >>> 7) ^ (f2 << 14 | f2 >>> 18) ^ f2 >>> 3, m2 = u2[p2 - 2], y2 = (m2 << 15 | m2 >>> 17) ^ (m2 << 13 | m2 >>> 19) ^ m2 >>> 10;
  53924. u2[p2] = g2 + u2[p2 - 7] + y2 + u2[p2 - 16];
  53925. }
  53926. var _2 = s3 & r3 ^ s3 & i3 ^ r3 & i3, w2 = (s3 << 30 | s3 >>> 2) ^ (s3 << 19 | s3 >>> 13) ^ (s3 << 10 | s3 >>> 22), v2 = d2 + ((a3 << 26 | a3 >>> 6) ^ (a3 << 21 | a3 >>> 11) ^ (a3 << 7 | a3 >>> 25)) + (a3 & l3 ^ ~a3 & h2) + c2[p2] + u2[p2];
  53927. d2 = h2, h2 = l3, l3 = a3, a3 = o3 + v2 | 0, o3 = i3, i3 = r3, r3 = s3, s3 = v2 + (w2 + _2) | 0;
  53928. }
  53929. n3[0] = n3[0] + s3 | 0, n3[1] = n3[1] + r3 | 0, n3[2] = n3[2] + i3 | 0, n3[3] = n3[3] + o3 | 0, n3[4] = n3[4] + a3 | 0, n3[5] = n3[5] + l3 | 0, n3[6] = n3[6] + h2 | 0, n3[7] = n3[7] + d2 | 0;
  53930. }, _doFinalize: function() {
  53931. var t4 = this._data, n3 = t4.words, s3 = 8 * this._nDataBytes, r3 = 8 * t4.sigBytes;
  53932. return n3[r3 >>> 5] |= 128 << 24 - r3 % 32, n3[14 + (r3 + 64 >>> 9 << 4)] = e3.floor(s3 / 4294967296), n3[15 + (r3 + 64 >>> 9 << 4)] = s3, t4.sigBytes = 4 * n3.length, this._process(), this._hash;
  53933. }, clone: function() {
  53934. var e4 = i2.clone.call(this);
  53935. return e4._hash = this._hash.clone(), e4;
  53936. } });
  53937. t3.SHA256 = i2._createHelper(l2), t3.HmacSHA256 = i2._createHmacHelper(l2);
  53938. }(Math), n2.SHA256);
  53939. }), we = _e, ve = n(function(e2, t2) {
  53940. e2.exports = r.HmacSHA256;
  53941. });
  53942. const Ie = () => {
  53943. let e2;
  53944. if (!Promise) {
  53945. e2 = () => {
  53946. }, e2.promise = {};
  53947. const t3 = () => {
  53948. throw new te({ message: 'Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.' });
  53949. };
  53950. return Object.defineProperty(e2.promise, "then", { get: t3 }), Object.defineProperty(e2.promise, "catch", { get: t3 }), e2;
  53951. }
  53952. const t2 = new Promise((t3, n2) => {
  53953. e2 = (e3, s2) => e3 ? n2(e3) : t3(s2);
  53954. });
  53955. return e2.promise = t2, e2;
  53956. };
  53957. function Se(e2) {
  53958. return void 0 === e2;
  53959. }
  53960. function be(e2) {
  53961. return "[object Null]" === Object.prototype.toString.call(e2);
  53962. }
  53963. var ke;
  53964. function Ae(e2) {
  53965. const t2 = (n2 = e2, "[object Array]" === Object.prototype.toString.call(n2) ? e2 : [e2]);
  53966. var n2;
  53967. for (const e3 of t2) {
  53968. const { isMatch: t3, genAdapter: n3, runtime: s2 } = e3;
  53969. if (t3())
  53970. return { adapter: n3(), runtime: s2 };
  53971. }
  53972. }
  53973. !function(e2) {
  53974. e2.WEB = "web", e2.WX_MP = "wx_mp";
  53975. }(ke || (ke = {}));
  53976. const Ce = { adapter: null, runtime: void 0 }, Pe = ["anonymousUuidKey"];
  53977. class Te extends ye {
  53978. constructor() {
  53979. super(), Ce.adapter.root.tcbObject || (Ce.adapter.root.tcbObject = {});
  53980. }
  53981. setItem(e2, t2) {
  53982. Ce.adapter.root.tcbObject[e2] = t2;
  53983. }
  53984. getItem(e2) {
  53985. return Ce.adapter.root.tcbObject[e2];
  53986. }
  53987. removeItem(e2) {
  53988. delete Ce.adapter.root.tcbObject[e2];
  53989. }
  53990. clear() {
  53991. delete Ce.adapter.root.tcbObject;
  53992. }
  53993. }
  53994. function xe(e2, t2) {
  53995. switch (e2) {
  53996. case "local":
  53997. return t2.localStorage || new Te();
  53998. case "none":
  53999. return new Te();
  54000. default:
  54001. return t2.sessionStorage || new Te();
  54002. }
  54003. }
  54004. class Oe {
  54005. constructor(e2) {
  54006. if (!this._storage) {
  54007. this._persistence = Ce.adapter.primaryStorage || e2.persistence, this._storage = xe(this._persistence, Ce.adapter);
  54008. const t2 = `access_token_${e2.env}`, n2 = `access_token_expire_${e2.env}`, s2 = `refresh_token_${e2.env}`, r2 = `anonymous_uuid_${e2.env}`, i2 = `login_type_${e2.env}`, o2 = `user_info_${e2.env}`;
  54009. this.keys = { accessTokenKey: t2, accessTokenExpireKey: n2, refreshTokenKey: s2, anonymousUuidKey: r2, loginTypeKey: i2, userInfoKey: o2 };
  54010. }
  54011. }
  54012. updatePersistence(e2) {
  54013. if (e2 === this._persistence)
  54014. return;
  54015. const t2 = "local" === this._persistence;
  54016. this._persistence = e2;
  54017. const n2 = xe(e2, Ce.adapter);
  54018. for (const e3 in this.keys) {
  54019. const s2 = this.keys[e3];
  54020. if (t2 && Pe.includes(e3))
  54021. continue;
  54022. const r2 = this._storage.getItem(s2);
  54023. Se(r2) || be(r2) || (n2.setItem(s2, r2), this._storage.removeItem(s2));
  54024. }
  54025. this._storage = n2;
  54026. }
  54027. setStore(e2, t2, n2) {
  54028. if (!this._storage)
  54029. return;
  54030. const s2 = { version: n2 || "localCachev1", content: t2 }, r2 = JSON.stringify(s2);
  54031. try {
  54032. this._storage.setItem(e2, r2);
  54033. } catch (e3) {
  54034. throw e3;
  54035. }
  54036. }
  54037. getStore(e2, t2) {
  54038. try {
  54039. if (!this._storage)
  54040. return;
  54041. } catch (e3) {
  54042. return "";
  54043. }
  54044. t2 = t2 || "localCachev1";
  54045. const n2 = this._storage.getItem(e2);
  54046. if (!n2)
  54047. return "";
  54048. if (n2.indexOf(t2) >= 0) {
  54049. return JSON.parse(n2).content;
  54050. }
  54051. return "";
  54052. }
  54053. removeStore(e2) {
  54054. this._storage.removeItem(e2);
  54055. }
  54056. }
  54057. const Ee = {}, Le = {};
  54058. function Re(e2) {
  54059. return Ee[e2];
  54060. }
  54061. class Ue {
  54062. constructor(e2, t2) {
  54063. this.data = t2 || null, this.name = e2;
  54064. }
  54065. }
  54066. class Ne extends Ue {
  54067. constructor(e2, t2) {
  54068. super("error", { error: e2, data: t2 }), this.error = e2;
  54069. }
  54070. }
  54071. const De = new class {
  54072. constructor() {
  54073. this._listeners = {};
  54074. }
  54075. on(e2, t2) {
  54076. return function(e3, t3, n2) {
  54077. n2[e3] = n2[e3] || [], n2[e3].push(t3);
  54078. }(e2, t2, this._listeners), this;
  54079. }
  54080. off(e2, t2) {
  54081. return function(e3, t3, n2) {
  54082. if (n2 && n2[e3]) {
  54083. const s2 = n2[e3].indexOf(t3);
  54084. -1 !== s2 && n2[e3].splice(s2, 1);
  54085. }
  54086. }(e2, t2, this._listeners), this;
  54087. }
  54088. fire(e2, t2) {
  54089. if (e2 instanceof Ne)
  54090. return console.error(e2.error), this;
  54091. const n2 = "string" == typeof e2 ? new Ue(e2, t2 || {}) : e2;
  54092. const s2 = n2.name;
  54093. if (this._listens(s2)) {
  54094. n2.target = this;
  54095. const e3 = this._listeners[s2] ? [...this._listeners[s2]] : [];
  54096. for (const t3 of e3)
  54097. t3.call(this, n2);
  54098. }
  54099. return this;
  54100. }
  54101. _listens(e2) {
  54102. return this._listeners[e2] && this._listeners[e2].length > 0;
  54103. }
  54104. }();
  54105. function Me(e2, t2) {
  54106. De.on(e2, t2);
  54107. }
  54108. function qe(e2, t2 = {}) {
  54109. De.fire(e2, t2);
  54110. }
  54111. function Fe(e2, t2) {
  54112. De.off(e2, t2);
  54113. }
  54114. const Ke = "loginStateChanged", je = "loginStateExpire", $e = "loginTypeChanged", Be = "anonymousConverted", We = "refreshAccessToken";
  54115. var He;
  54116. !function(e2) {
  54117. e2.ANONYMOUS = "ANONYMOUS", e2.WECHAT = "WECHAT", e2.WECHAT_PUBLIC = "WECHAT-PUBLIC", e2.WECHAT_OPEN = "WECHAT-OPEN", e2.CUSTOM = "CUSTOM", e2.EMAIL = "EMAIL", e2.USERNAME = "USERNAME", e2.NULL = "NULL";
  54118. }(He || (He = {}));
  54119. const Je = ["auth.getJwt", "auth.logout", "auth.signInWithTicket", "auth.signInAnonymously", "auth.signIn", "auth.fetchAccessTokenWithRefreshToken", "auth.signUpWithEmailAndPassword", "auth.activateEndUserMail", "auth.sendPasswordResetEmail", "auth.resetPasswordWithToken", "auth.isUsernameRegistered"], ze = { "X-SDK-Version": "1.3.5" };
  54120. function Ve(e2, t2, n2) {
  54121. const s2 = e2[t2];
  54122. e2[t2] = function(t3) {
  54123. const r2 = {}, i2 = {};
  54124. n2.forEach((n3) => {
  54125. const { data: s3, headers: o3 } = n3.call(e2, t3);
  54126. Object.assign(r2, s3), Object.assign(i2, o3);
  54127. });
  54128. const o2 = t3.data;
  54129. return o2 && (() => {
  54130. var e3;
  54131. if (e3 = o2, "[object FormData]" !== Object.prototype.toString.call(e3))
  54132. t3.data = { ...o2, ...r2 };
  54133. else
  54134. for (const e4 in r2)
  54135. o2.append(e4, r2[e4]);
  54136. })(), t3.headers = { ...t3.headers || {}, ...i2 }, s2.call(e2, t3);
  54137. };
  54138. }
  54139. function Ge() {
  54140. const e2 = Math.random().toString(16).slice(2);
  54141. return { data: { seqId: e2 }, headers: { ...ze, "x-seqid": e2 } };
  54142. }
  54143. class Ye {
  54144. constructor(e2 = {}) {
  54145. var t2;
  54146. this.config = e2, this._reqClass = new Ce.adapter.reqClass({ timeout: this.config.timeout, timeoutMsg: `请求在${this.config.timeout / 1e3}s内未完成,已中断`, restrictedMethods: ["post"] }), this._cache = Re(this.config.env), this._localCache = (t2 = this.config.env, Le[t2]), Ve(this._reqClass, "post", [Ge]), Ve(this._reqClass, "upload", [Ge]), Ve(this._reqClass, "download", [Ge]);
  54147. }
  54148. async post(e2) {
  54149. return await this._reqClass.post(e2);
  54150. }
  54151. async upload(e2) {
  54152. return await this._reqClass.upload(e2);
  54153. }
  54154. async download(e2) {
  54155. return await this._reqClass.download(e2);
  54156. }
  54157. async refreshAccessToken() {
  54158. let e2, t2;
  54159. this._refreshAccessTokenPromise || (this._refreshAccessTokenPromise = this._refreshAccessToken());
  54160. try {
  54161. e2 = await this._refreshAccessTokenPromise;
  54162. } catch (e3) {
  54163. t2 = e3;
  54164. }
  54165. if (this._refreshAccessTokenPromise = null, this._shouldRefreshAccessTokenHook = null, t2)
  54166. throw t2;
  54167. return e2;
  54168. }
  54169. async _refreshAccessToken() {
  54170. const { accessTokenKey: e2, accessTokenExpireKey: t2, refreshTokenKey: n2, loginTypeKey: s2, anonymousUuidKey: r2 } = this._cache.keys;
  54171. this._cache.removeStore(e2), this._cache.removeStore(t2);
  54172. let i2 = this._cache.getStore(n2);
  54173. if (!i2)
  54174. throw new te({ message: "未登录CloudBase" });
  54175. const o2 = { refresh_token: i2 }, a2 = await this.request("auth.fetchAccessTokenWithRefreshToken", o2);
  54176. if (a2.data.code) {
  54177. const { code: e3 } = a2.data;
  54178. if ("SIGN_PARAM_INVALID" === e3 || "REFRESH_TOKEN_EXPIRED" === e3 || "INVALID_REFRESH_TOKEN" === e3) {
  54179. if (this._cache.getStore(s2) === He.ANONYMOUS && "INVALID_REFRESH_TOKEN" === e3) {
  54180. const e4 = this._cache.getStore(r2), t3 = this._cache.getStore(n2), s3 = await this.send("auth.signInAnonymously", { anonymous_uuid: e4, refresh_token: t3 });
  54181. return this.setRefreshToken(s3.refresh_token), this._refreshAccessToken();
  54182. }
  54183. qe(je), this._cache.removeStore(n2);
  54184. }
  54185. throw new te({ code: a2.data.code, message: `刷新access token失败:${a2.data.code}` });
  54186. }
  54187. if (a2.data.access_token)
  54188. return qe(We), this._cache.setStore(e2, a2.data.access_token), this._cache.setStore(t2, a2.data.access_token_expire + Date.now()), { accessToken: a2.data.access_token, accessTokenExpire: a2.data.access_token_expire };
  54189. a2.data.refresh_token && (this._cache.removeStore(n2), this._cache.setStore(n2, a2.data.refresh_token), this._refreshAccessToken());
  54190. }
  54191. async getAccessToken() {
  54192. const { accessTokenKey: e2, accessTokenExpireKey: t2, refreshTokenKey: n2 } = this._cache.keys;
  54193. if (!this._cache.getStore(n2))
  54194. throw new te({ message: "refresh token不存在,登录状态异常" });
  54195. let s2 = this._cache.getStore(e2), r2 = this._cache.getStore(t2), i2 = true;
  54196. return this._shouldRefreshAccessTokenHook && !await this._shouldRefreshAccessTokenHook(s2, r2) && (i2 = false), (!s2 || !r2 || r2 < Date.now()) && i2 ? this.refreshAccessToken() : { accessToken: s2, accessTokenExpire: r2 };
  54197. }
  54198. async request(e2, t2, n2) {
  54199. const s2 = `x-tcb-trace_${this.config.env}`;
  54200. let r2 = "application/x-www-form-urlencoded";
  54201. const i2 = { action: e2, env: this.config.env, dataVersion: "2019-08-16", ...t2 };
  54202. if (-1 === Je.indexOf(e2)) {
  54203. const { refreshTokenKey: e3 } = this._cache.keys;
  54204. this._cache.getStore(e3) && (i2.access_token = (await this.getAccessToken()).accessToken);
  54205. }
  54206. let o2;
  54207. if ("storage.uploadFile" === e2) {
  54208. o2 = new FormData();
  54209. for (let e3 in o2)
  54210. o2.hasOwnProperty(e3) && void 0 !== o2[e3] && o2.append(e3, i2[e3]);
  54211. r2 = "multipart/form-data";
  54212. } else {
  54213. r2 = "application/json", o2 = {};
  54214. for (let e3 in i2)
  54215. void 0 !== i2[e3] && (o2[e3] = i2[e3]);
  54216. }
  54217. let a2 = { headers: { "content-type": r2 } };
  54218. n2 && n2.timeout && (a2.timeout = n2.timeout), n2 && n2.onUploadProgress && (a2.onUploadProgress = n2.onUploadProgress);
  54219. const c2 = this._localCache.getStore(s2);
  54220. c2 && (a2.headers["X-TCB-Trace"] = c2);
  54221. const { parse: u2, inQuery: l2, search: h2 } = t2;
  54222. let d2 = { env: this.config.env };
  54223. u2 && (d2.parse = true), l2 && (d2 = { ...l2, ...d2 });
  54224. let p2 = function(e3, t3, n3 = {}) {
  54225. const s3 = /\?/.test(t3);
  54226. let r3 = "";
  54227. for (let e4 in n3)
  54228. "" === r3 ? !s3 && (t3 += "?") : r3 += "&", r3 += `${e4}=${encodeURIComponent(n3[e4])}`;
  54229. return /^http(s)?\:\/\//.test(t3 += r3) ? t3 : `${e3}${t3}`;
  54230. }(ge, "//tcb-api.tencentcloudapi.com/web", d2);
  54231. h2 && (p2 += h2);
  54232. const f2 = await this.post({ url: p2, data: o2, ...a2 }), g2 = f2.header && f2.header["x-tcb-trace"];
  54233. if (g2 && this._localCache.setStore(s2, g2), 200 !== Number(f2.status) && 200 !== Number(f2.statusCode) || !f2.data)
  54234. throw new te({ code: "NETWORK_ERROR", message: "network request error" });
  54235. return f2;
  54236. }
  54237. async send(e2, t2 = {}, n2 = {}) {
  54238. const s2 = await this.request(e2, t2, { ...n2, onUploadProgress: t2.onUploadProgress });
  54239. if ("ACCESS_TOKEN_EXPIRED" === s2.data.code && -1 === Je.indexOf(e2)) {
  54240. await this.refreshAccessToken();
  54241. const s3 = await this.request(e2, t2, { ...n2, onUploadProgress: t2.onUploadProgress });
  54242. if (s3.data.code)
  54243. throw new te({ code: s3.data.code, message: s3.data.message });
  54244. return s3.data;
  54245. }
  54246. if (s2.data.code)
  54247. throw new te({ code: s2.data.code, message: s2.data.message });
  54248. return s2.data;
  54249. }
  54250. setRefreshToken(e2) {
  54251. const { accessTokenKey: t2, accessTokenExpireKey: n2, refreshTokenKey: s2 } = this._cache.keys;
  54252. this._cache.removeStore(t2), this._cache.removeStore(n2), this._cache.setStore(s2, e2);
  54253. }
  54254. }
  54255. const Qe = {};
  54256. function Xe(e2) {
  54257. return Qe[e2];
  54258. }
  54259. class Ze {
  54260. constructor(e2) {
  54261. this.config = e2, this._cache = Re(e2.env), this._request = Xe(e2.env);
  54262. }
  54263. setRefreshToken(e2) {
  54264. const { accessTokenKey: t2, accessTokenExpireKey: n2, refreshTokenKey: s2 } = this._cache.keys;
  54265. this._cache.removeStore(t2), this._cache.removeStore(n2), this._cache.setStore(s2, e2);
  54266. }
  54267. setAccessToken(e2, t2) {
  54268. const { accessTokenKey: n2, accessTokenExpireKey: s2 } = this._cache.keys;
  54269. this._cache.setStore(n2, e2), this._cache.setStore(s2, t2);
  54270. }
  54271. async refreshUserInfo() {
  54272. const { data: e2 } = await this._request.send("auth.getUserInfo", {});
  54273. return this.setLocalUserInfo(e2), e2;
  54274. }
  54275. setLocalUserInfo(e2) {
  54276. const { userInfoKey: t2 } = this._cache.keys;
  54277. this._cache.setStore(t2, e2);
  54278. }
  54279. }
  54280. class et {
  54281. constructor(e2) {
  54282. if (!e2)
  54283. throw new te({ code: "PARAM_ERROR", message: "envId is not defined" });
  54284. this._envId = e2, this._cache = Re(this._envId), this._request = Xe(this._envId), this.setUserInfo();
  54285. }
  54286. linkWithTicket(e2) {
  54287. if ("string" != typeof e2)
  54288. throw new te({ code: "PARAM_ERROR", message: "ticket must be string" });
  54289. return this._request.send("auth.linkWithTicket", { ticket: e2 });
  54290. }
  54291. linkWithRedirect(e2) {
  54292. e2.signInWithRedirect();
  54293. }
  54294. updatePassword(e2, t2) {
  54295. return this._request.send("auth.updatePassword", { oldPassword: t2, newPassword: e2 });
  54296. }
  54297. updateEmail(e2) {
  54298. return this._request.send("auth.updateEmail", { newEmail: e2 });
  54299. }
  54300. updateUsername(e2) {
  54301. if ("string" != typeof e2)
  54302. throw new te({ code: "PARAM_ERROR", message: "username must be a string" });
  54303. return this._request.send("auth.updateUsername", { username: e2 });
  54304. }
  54305. async getLinkedUidList() {
  54306. const { data: e2 } = await this._request.send("auth.getLinkedUidList", {});
  54307. let t2 = false;
  54308. const { users: n2 } = e2;
  54309. return n2.forEach((e3) => {
  54310. e3.wxOpenId && e3.wxPublicId && (t2 = true);
  54311. }), { users: n2, hasPrimaryUid: t2 };
  54312. }
  54313. setPrimaryUid(e2) {
  54314. return this._request.send("auth.setPrimaryUid", { uid: e2 });
  54315. }
  54316. unlink(e2) {
  54317. return this._request.send("auth.unlink", { platform: e2 });
  54318. }
  54319. async update(e2) {
  54320. const { nickName: t2, gender: n2, avatarUrl: s2, province: r2, country: i2, city: o2 } = e2, { data: a2 } = await this._request.send("auth.updateUserInfo", { nickName: t2, gender: n2, avatarUrl: s2, province: r2, country: i2, city: o2 });
  54321. this.setLocalUserInfo(a2);
  54322. }
  54323. async refresh() {
  54324. const { data: e2 } = await this._request.send("auth.getUserInfo", {});
  54325. return this.setLocalUserInfo(e2), e2;
  54326. }
  54327. setUserInfo() {
  54328. const { userInfoKey: e2 } = this._cache.keys, t2 = this._cache.getStore(e2);
  54329. ["uid", "loginType", "openid", "wxOpenId", "wxPublicId", "unionId", "qqMiniOpenId", "email", "hasPassword", "customUserId", "nickName", "gender", "avatarUrl"].forEach((e3) => {
  54330. this[e3] = t2[e3];
  54331. }), this.location = { country: t2.country, province: t2.province, city: t2.city };
  54332. }
  54333. setLocalUserInfo(e2) {
  54334. const { userInfoKey: t2 } = this._cache.keys;
  54335. this._cache.setStore(t2, e2), this.setUserInfo();
  54336. }
  54337. }
  54338. let tt$1 = class tt {
  54339. constructor(e2) {
  54340. if (!e2)
  54341. throw new te({ code: "PARAM_ERROR", message: "envId is not defined" });
  54342. this._cache = Re(e2);
  54343. const { refreshTokenKey: t2, accessTokenKey: n2, accessTokenExpireKey: s2 } = this._cache.keys, r2 = this._cache.getStore(t2), i2 = this._cache.getStore(n2), o2 = this._cache.getStore(s2);
  54344. this.credential = { refreshToken: r2, accessToken: i2, accessTokenExpire: o2 }, this.user = new et(e2);
  54345. }
  54346. get isAnonymousAuth() {
  54347. return this.loginType === He.ANONYMOUS;
  54348. }
  54349. get isCustomAuth() {
  54350. return this.loginType === He.CUSTOM;
  54351. }
  54352. get isWeixinAuth() {
  54353. return this.loginType === He.WECHAT || this.loginType === He.WECHAT_OPEN || this.loginType === He.WECHAT_PUBLIC;
  54354. }
  54355. get loginType() {
  54356. return this._cache.getStore(this._cache.keys.loginTypeKey);
  54357. }
  54358. };
  54359. class nt extends Ze {
  54360. async signIn() {
  54361. this._cache.updatePersistence("local");
  54362. const { anonymousUuidKey: e2, refreshTokenKey: t2 } = this._cache.keys, n2 = this._cache.getStore(e2) || void 0, s2 = this._cache.getStore(t2) || void 0, r2 = await this._request.send("auth.signInAnonymously", { anonymous_uuid: n2, refresh_token: s2 });
  54363. if (r2.uuid && r2.refresh_token) {
  54364. this._setAnonymousUUID(r2.uuid), this.setRefreshToken(r2.refresh_token), await this._request.refreshAccessToken(), qe(Ke), qe($e, { env: this.config.env, loginType: He.ANONYMOUS, persistence: "local" });
  54365. const e3 = new tt$1(this.config.env);
  54366. return await e3.user.refresh(), e3;
  54367. }
  54368. throw new te({ message: "匿名登录失败" });
  54369. }
  54370. async linkAndRetrieveDataWithTicket(e2) {
  54371. const { anonymousUuidKey: t2, refreshTokenKey: n2 } = this._cache.keys, s2 = this._cache.getStore(t2), r2 = this._cache.getStore(n2), i2 = await this._request.send("auth.linkAndRetrieveDataWithTicket", { anonymous_uuid: s2, refresh_token: r2, ticket: e2 });
  54372. if (i2.refresh_token)
  54373. return this._clearAnonymousUUID(), this.setRefreshToken(i2.refresh_token), await this._request.refreshAccessToken(), qe(Be, { env: this.config.env }), qe($e, { loginType: He.CUSTOM, persistence: "local" }), { credential: { refreshToken: i2.refresh_token } };
  54374. throw new te({ message: "匿名转化失败" });
  54375. }
  54376. _setAnonymousUUID(e2) {
  54377. const { anonymousUuidKey: t2, loginTypeKey: n2 } = this._cache.keys;
  54378. this._cache.removeStore(t2), this._cache.setStore(t2, e2), this._cache.setStore(n2, He.ANONYMOUS);
  54379. }
  54380. _clearAnonymousUUID() {
  54381. this._cache.removeStore(this._cache.keys.anonymousUuidKey);
  54382. }
  54383. }
  54384. class st extends Ze {
  54385. async signIn(e2) {
  54386. if ("string" != typeof e2)
  54387. throw new te({ code: "PARAM_ERROR", message: "ticket must be a string" });
  54388. const { refreshTokenKey: t2 } = this._cache.keys, n2 = await this._request.send("auth.signInWithTicket", { ticket: e2, refresh_token: this._cache.getStore(t2) || "" });
  54389. if (n2.refresh_token)
  54390. return this.setRefreshToken(n2.refresh_token), await this._request.refreshAccessToken(), qe(Ke), qe($e, { env: this.config.env, loginType: He.CUSTOM, persistence: this.config.persistence }), await this.refreshUserInfo(), new tt$1(this.config.env);
  54391. throw new te({ message: "自定义登录失败" });
  54392. }
  54393. }
  54394. class rt extends Ze {
  54395. async signIn(e2, t2) {
  54396. if ("string" != typeof e2)
  54397. throw new te({ code: "PARAM_ERROR", message: "email must be a string" });
  54398. const { refreshTokenKey: n2 } = this._cache.keys, s2 = await this._request.send("auth.signIn", { loginType: "EMAIL", email: e2, password: t2, refresh_token: this._cache.getStore(n2) || "" }), { refresh_token: r2, access_token: i2, access_token_expire: o2 } = s2;
  54399. if (r2)
  54400. return this.setRefreshToken(r2), i2 && o2 ? this.setAccessToken(i2, o2) : await this._request.refreshAccessToken(), await this.refreshUserInfo(), qe(Ke), qe($e, { env: this.config.env, loginType: He.EMAIL, persistence: this.config.persistence }), new tt$1(this.config.env);
  54401. throw s2.code ? new te({ code: s2.code, message: `邮箱登录失败: ${s2.message}` }) : new te({ message: "邮箱登录失败" });
  54402. }
  54403. async activate(e2) {
  54404. return this._request.send("auth.activateEndUserMail", { token: e2 });
  54405. }
  54406. async resetPasswordWithToken(e2, t2) {
  54407. return this._request.send("auth.resetPasswordWithToken", { token: e2, newPassword: t2 });
  54408. }
  54409. }
  54410. class it extends Ze {
  54411. async signIn(e2, t2) {
  54412. if ("string" != typeof e2)
  54413. throw new te({ code: "PARAM_ERROR", message: "username must be a string" });
  54414. "string" != typeof t2 && (t2 = "", console.warn("password is empty"));
  54415. const { refreshTokenKey: n2 } = this._cache.keys, s2 = await this._request.send("auth.signIn", { loginType: He.USERNAME, username: e2, password: t2, refresh_token: this._cache.getStore(n2) || "" }), { refresh_token: r2, access_token_expire: i2, access_token: o2 } = s2;
  54416. if (r2)
  54417. return this.setRefreshToken(r2), o2 && i2 ? this.setAccessToken(o2, i2) : await this._request.refreshAccessToken(), await this.refreshUserInfo(), qe(Ke), qe($e, { env: this.config.env, loginType: He.USERNAME, persistence: this.config.persistence }), new tt$1(this.config.env);
  54418. throw s2.code ? new te({ code: s2.code, message: `用户名密码登录失败: ${s2.message}` }) : new te({ message: "用户名密码登录失败" });
  54419. }
  54420. }
  54421. class ot {
  54422. constructor(e2) {
  54423. this.config = e2, this._cache = Re(e2.env), this._request = Xe(e2.env), this._onAnonymousConverted = this._onAnonymousConverted.bind(this), this._onLoginTypeChanged = this._onLoginTypeChanged.bind(this), Me($e, this._onLoginTypeChanged);
  54424. }
  54425. get currentUser() {
  54426. const e2 = this.hasLoginState();
  54427. return e2 && e2.user || null;
  54428. }
  54429. get loginType() {
  54430. return this._cache.getStore(this._cache.keys.loginTypeKey);
  54431. }
  54432. anonymousAuthProvider() {
  54433. return new nt(this.config);
  54434. }
  54435. customAuthProvider() {
  54436. return new st(this.config);
  54437. }
  54438. emailAuthProvider() {
  54439. return new rt(this.config);
  54440. }
  54441. usernameAuthProvider() {
  54442. return new it(this.config);
  54443. }
  54444. async signInAnonymously() {
  54445. return new nt(this.config).signIn();
  54446. }
  54447. async signInWithEmailAndPassword(e2, t2) {
  54448. return new rt(this.config).signIn(e2, t2);
  54449. }
  54450. signInWithUsernameAndPassword(e2, t2) {
  54451. return new it(this.config).signIn(e2, t2);
  54452. }
  54453. async linkAndRetrieveDataWithTicket(e2) {
  54454. this._anonymousAuthProvider || (this._anonymousAuthProvider = new nt(this.config)), Me(Be, this._onAnonymousConverted);
  54455. return await this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(e2);
  54456. }
  54457. async signOut() {
  54458. if (this.loginType === He.ANONYMOUS)
  54459. throw new te({ message: "匿名用户不支持登出操作" });
  54460. const { refreshTokenKey: e2, accessTokenKey: t2, accessTokenExpireKey: n2 } = this._cache.keys, s2 = this._cache.getStore(e2);
  54461. if (!s2)
  54462. return;
  54463. const r2 = await this._request.send("auth.logout", { refresh_token: s2 });
  54464. return this._cache.removeStore(e2), this._cache.removeStore(t2), this._cache.removeStore(n2), qe(Ke), qe($e, { env: this.config.env, loginType: He.NULL, persistence: this.config.persistence }), r2;
  54465. }
  54466. async signUpWithEmailAndPassword(e2, t2) {
  54467. return this._request.send("auth.signUpWithEmailAndPassword", { email: e2, password: t2 });
  54468. }
  54469. async sendPasswordResetEmail(e2) {
  54470. return this._request.send("auth.sendPasswordResetEmail", { email: e2 });
  54471. }
  54472. onLoginStateChanged(e2) {
  54473. Me(Ke, () => {
  54474. const t3 = this.hasLoginState();
  54475. e2.call(this, t3);
  54476. });
  54477. const t2 = this.hasLoginState();
  54478. e2.call(this, t2);
  54479. }
  54480. onLoginStateExpired(e2) {
  54481. Me(je, e2.bind(this));
  54482. }
  54483. onAccessTokenRefreshed(e2) {
  54484. Me(We, e2.bind(this));
  54485. }
  54486. onAnonymousConverted(e2) {
  54487. Me(Be, e2.bind(this));
  54488. }
  54489. onLoginTypeChanged(e2) {
  54490. Me($e, () => {
  54491. const t2 = this.hasLoginState();
  54492. e2.call(this, t2);
  54493. });
  54494. }
  54495. async getAccessToken() {
  54496. return { accessToken: (await this._request.getAccessToken()).accessToken, env: this.config.env };
  54497. }
  54498. hasLoginState() {
  54499. const { refreshTokenKey: e2 } = this._cache.keys;
  54500. return this._cache.getStore(e2) ? new tt$1(this.config.env) : null;
  54501. }
  54502. async isUsernameRegistered(e2) {
  54503. if ("string" != typeof e2)
  54504. throw new te({ code: "PARAM_ERROR", message: "username must be a string" });
  54505. const { data: t2 } = await this._request.send("auth.isUsernameRegistered", { username: e2 });
  54506. return t2 && t2.isRegistered;
  54507. }
  54508. getLoginState() {
  54509. return Promise.resolve(this.hasLoginState());
  54510. }
  54511. async signInWithTicket(e2) {
  54512. return new st(this.config).signIn(e2);
  54513. }
  54514. shouldRefreshAccessToken(e2) {
  54515. this._request._shouldRefreshAccessTokenHook = e2.bind(this);
  54516. }
  54517. getUserInfo() {
  54518. return this._request.send("auth.getUserInfo", {}).then((e2) => e2.code ? e2 : { ...e2.data, requestId: e2.seqId });
  54519. }
  54520. getAuthHeader() {
  54521. const { refreshTokenKey: e2, accessTokenKey: t2 } = this._cache.keys, n2 = this._cache.getStore(e2);
  54522. return { "x-cloudbase-credentials": this._cache.getStore(t2) + "/@@/" + n2 };
  54523. }
  54524. _onAnonymousConverted(e2) {
  54525. const { env: t2 } = e2.data;
  54526. t2 === this.config.env && this._cache.updatePersistence(this.config.persistence);
  54527. }
  54528. _onLoginTypeChanged(e2) {
  54529. const { loginType: t2, persistence: n2, env: s2 } = e2.data;
  54530. s2 === this.config.env && (this._cache.updatePersistence(n2), this._cache.setStore(this._cache.keys.loginTypeKey, t2));
  54531. }
  54532. }
  54533. const at = function(e2, t2) {
  54534. t2 = t2 || Ie();
  54535. const n2 = Xe(this.config.env), { cloudPath: s2, filePath: r2, onUploadProgress: i2, fileType: o2 = "image" } = e2;
  54536. return n2.send("storage.getUploadMetadata", { path: s2 }).then((e3) => {
  54537. const { data: { url: a2, authorization: c2, token: u2, fileId: l2, cosFileId: h2 }, requestId: d2 } = e3, p2 = { key: s2, signature: c2, "x-cos-meta-fileid": h2, success_action_status: "201", "x-cos-security-token": u2 };
  54538. n2.upload({ url: a2, data: p2, file: r2, name: s2, fileType: o2, onUploadProgress: i2 }).then((e4) => {
  54539. 201 === e4.statusCode ? t2(null, { fileID: l2, requestId: d2 }) : t2(new te({ code: "STORAGE_REQUEST_FAIL", message: `STORAGE_REQUEST_FAIL: ${e4.data}` }));
  54540. }).catch((e4) => {
  54541. t2(e4);
  54542. });
  54543. }).catch((e3) => {
  54544. t2(e3);
  54545. }), t2.promise;
  54546. }, ct = function(e2, t2) {
  54547. t2 = t2 || Ie();
  54548. const n2 = Xe(this.config.env), { cloudPath: s2 } = e2;
  54549. return n2.send("storage.getUploadMetadata", { path: s2 }).then((e3) => {
  54550. t2(null, e3);
  54551. }).catch((e3) => {
  54552. t2(e3);
  54553. }), t2.promise;
  54554. }, ut = function({ fileList: e2 }, t2) {
  54555. if (t2 = t2 || Ie(), !e2 || !Array.isArray(e2))
  54556. return { code: "INVALID_PARAM", message: "fileList必须是非空的数组" };
  54557. for (let t3 of e2)
  54558. if (!t3 || "string" != typeof t3)
  54559. return { code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" };
  54560. const n2 = { fileid_list: e2 };
  54561. return Xe(this.config.env).send("storage.batchDeleteFile", n2).then((e3) => {
  54562. e3.code ? t2(null, e3) : t2(null, { fileList: e3.data.delete_list, requestId: e3.requestId });
  54563. }).catch((e3) => {
  54564. t2(e3);
  54565. }), t2.promise;
  54566. }, lt = function({ fileList: e2 }, t2) {
  54567. t2 = t2 || Ie(), e2 && Array.isArray(e2) || t2(null, { code: "INVALID_PARAM", message: "fileList必须是非空的数组" });
  54568. let n2 = [];
  54569. for (let s3 of e2)
  54570. "object" == typeof s3 ? (s3.hasOwnProperty("fileID") && s3.hasOwnProperty("maxAge") || t2(null, { code: "INVALID_PARAM", message: "fileList的元素必须是包含fileID和maxAge的对象" }), n2.push({ fileid: s3.fileID, max_age: s3.maxAge })) : "string" == typeof s3 ? n2.push({ fileid: s3 }) : t2(null, { code: "INVALID_PARAM", message: "fileList的元素必须是字符串" });
  54571. const s2 = { file_list: n2 };
  54572. return Xe(this.config.env).send("storage.batchGetDownloadUrl", s2).then((e3) => {
  54573. e3.code ? t2(null, e3) : t2(null, { fileList: e3.data.download_list, requestId: e3.requestId });
  54574. }).catch((e3) => {
  54575. t2(e3);
  54576. }), t2.promise;
  54577. }, ht = async function({ fileID: e2 }, t2) {
  54578. const n2 = (await lt.call(this, { fileList: [{ fileID: e2, maxAge: 600 }] })).fileList[0];
  54579. if ("SUCCESS" !== n2.code)
  54580. return t2 ? t2(n2) : new Promise((e3) => {
  54581. e3(n2);
  54582. });
  54583. const s2 = Xe(this.config.env);
  54584. let r2 = n2.download_url;
  54585. if (r2 = encodeURI(r2), !t2)
  54586. return s2.download({ url: r2 });
  54587. t2(await s2.download({ url: r2 }));
  54588. }, dt = function({ name: e2, data: t2, query: n2, parse: s2, search: r2, timeout: i2 }, o2) {
  54589. const a2 = o2 || Ie();
  54590. let c2;
  54591. try {
  54592. c2 = t2 ? JSON.stringify(t2) : "";
  54593. } catch (e3) {
  54594. return Promise.reject(e3);
  54595. }
  54596. if (!e2)
  54597. return Promise.reject(new te({ code: "PARAM_ERROR", message: "函数名不能为空" }));
  54598. const u2 = { inQuery: n2, parse: s2, search: r2, function_name: e2, request_data: c2 };
  54599. return Xe(this.config.env).send("functions.invokeFunction", u2, { timeout: i2 }).then((e3) => {
  54600. if (e3.code)
  54601. a2(null, e3);
  54602. else {
  54603. let t3 = e3.data.response_data;
  54604. if (s2)
  54605. a2(null, { result: t3, requestId: e3.requestId });
  54606. else
  54607. try {
  54608. t3 = JSON.parse(e3.data.response_data), a2(null, { result: t3, requestId: e3.requestId });
  54609. } catch (e4) {
  54610. a2(new te({ message: "response data must be json" }));
  54611. }
  54612. }
  54613. return a2.promise;
  54614. }).catch((e3) => {
  54615. a2(e3);
  54616. }), a2.promise;
  54617. }, pt = { timeout: 15e3, persistence: "session" }, ft = {};
  54618. class gt {
  54619. constructor(e2) {
  54620. this.config = e2 || this.config, this.authObj = void 0;
  54621. }
  54622. init(e2) {
  54623. switch (Ce.adapter || (this.requestClient = new Ce.adapter.reqClass({ timeout: e2.timeout || 5e3, timeoutMsg: `请求在${(e2.timeout || 5e3) / 1e3}s内未完成,已中断` })), this.config = { ...pt, ...e2 }, true) {
  54624. case this.config.timeout > 6e5:
  54625. console.warn("timeout大于可配置上限[10分钟],已重置为上限数值"), this.config.timeout = 6e5;
  54626. break;
  54627. case this.config.timeout < 100:
  54628. console.warn("timeout小于可配置下限[100ms],已重置为下限数值"), this.config.timeout = 100;
  54629. }
  54630. return new gt(this.config);
  54631. }
  54632. auth({ persistence: e2 } = {}) {
  54633. if (this.authObj)
  54634. return this.authObj;
  54635. const t2 = e2 || Ce.adapter.primaryStorage || pt.persistence;
  54636. var n2;
  54637. return t2 !== this.config.persistence && (this.config.persistence = t2), function(e3) {
  54638. const { env: t3 } = e3;
  54639. Ee[t3] = new Oe(e3), Le[t3] = new Oe({ ...e3, persistence: "local" });
  54640. }(this.config), n2 = this.config, Qe[n2.env] = new Ye(n2), this.authObj = new ot(this.config), this.authObj;
  54641. }
  54642. on(e2, t2) {
  54643. return Me.apply(this, [e2, t2]);
  54644. }
  54645. off(e2, t2) {
  54646. return Fe.apply(this, [e2, t2]);
  54647. }
  54648. callFunction(e2, t2) {
  54649. return dt.apply(this, [e2, t2]);
  54650. }
  54651. deleteFile(e2, t2) {
  54652. return ut.apply(this, [e2, t2]);
  54653. }
  54654. getTempFileURL(e2, t2) {
  54655. return lt.apply(this, [e2, t2]);
  54656. }
  54657. downloadFile(e2, t2) {
  54658. return ht.apply(this, [e2, t2]);
  54659. }
  54660. uploadFile(e2, t2) {
  54661. return at.apply(this, [e2, t2]);
  54662. }
  54663. getUploadMetadata(e2, t2) {
  54664. return ct.apply(this, [e2, t2]);
  54665. }
  54666. registerExtension(e2) {
  54667. ft[e2.name] = e2;
  54668. }
  54669. async invokeExtension(e2, t2) {
  54670. const n2 = ft[e2];
  54671. if (!n2)
  54672. throw new te({ message: `扩展${e2} 必须先注册` });
  54673. return await n2.invoke(t2, this);
  54674. }
  54675. useAdapters(e2) {
  54676. const { adapter: t2, runtime: n2 } = Ae(e2) || {};
  54677. t2 && (Ce.adapter = t2), n2 && (Ce.runtime = n2);
  54678. }
  54679. }
  54680. var mt = new gt();
  54681. function yt(e2, t2, n2) {
  54682. void 0 === n2 && (n2 = {});
  54683. var s2 = /\?/.test(t2), r2 = "";
  54684. for (var i2 in n2)
  54685. "" === r2 ? !s2 && (t2 += "?") : r2 += "&", r2 += i2 + "=" + encodeURIComponent(n2[i2]);
  54686. return /^http(s)?:\/\//.test(t2 += r2) ? t2 : "" + e2 + t2;
  54687. }
  54688. class _t {
  54689. post(e2) {
  54690. const { url: t2, data: n2, headers: s2, timeout: r2 } = e2;
  54691. return new Promise((e3, i2) => {
  54692. ne.request({ url: yt("https:", t2), data: n2, method: "POST", header: s2, timeout: r2, success(t3) {
  54693. e3(t3);
  54694. }, fail(e4) {
  54695. i2(e4);
  54696. } });
  54697. });
  54698. }
  54699. upload(e2) {
  54700. return new Promise((t2, n2) => {
  54701. const { url: s2, file: r2, data: i2, headers: o2, fileType: a2 } = e2, c2 = ne.uploadFile({ url: yt("https:", s2), name: "file", formData: Object.assign({}, i2), filePath: r2, fileType: a2, header: o2, success(e3) {
  54702. const n3 = { statusCode: e3.statusCode, data: e3.data || {} };
  54703. 200 === e3.statusCode && i2.success_action_status && (n3.statusCode = parseInt(i2.success_action_status, 10)), t2(n3);
  54704. }, fail(e3) {
  54705. n2(new Error(e3.errMsg || "uploadFile:fail"));
  54706. } });
  54707. "function" == typeof e2.onUploadProgress && c2 && "function" == typeof c2.onProgressUpdate && c2.onProgressUpdate((t3) => {
  54708. e2.onUploadProgress({ loaded: t3.totalBytesSent, total: t3.totalBytesExpectedToSend });
  54709. });
  54710. });
  54711. }
  54712. }
  54713. const wt = { setItem(e2, t2) {
  54714. ne.setStorageSync(e2, t2);
  54715. }, getItem: (e2) => ne.getStorageSync(e2), removeItem(e2) {
  54716. ne.removeStorageSync(e2);
  54717. }, clear() {
  54718. ne.clearStorageSync();
  54719. } };
  54720. var vt = { genAdapter: function() {
  54721. return { root: {}, reqClass: _t, localStorage: wt, primaryStorage: "local" };
  54722. }, isMatch: function() {
  54723. return true;
  54724. }, runtime: "uni_app" };
  54725. mt.useAdapters(vt);
  54726. const It = mt, St = It.init;
  54727. It.init = function(e2) {
  54728. e2.env = e2.spaceId;
  54729. const t2 = St.call(this, e2);
  54730. t2.config.provider = "tencent", t2.config.spaceId = e2.spaceId;
  54731. const n2 = t2.auth;
  54732. return t2.auth = function(e3) {
  54733. const t3 = n2.call(this, e3);
  54734. return ["linkAndRetrieveDataWithTicket", "signInAnonymously", "signOut", "getAccessToken", "getLoginState", "signInWithTicket", "getUserInfo"].forEach((e4) => {
  54735. var n3;
  54736. t3[e4] = (n3 = t3[e4], function(e5) {
  54737. e5 = e5 || {};
  54738. const { success: t4, fail: s2, complete: r2 } = ee(e5);
  54739. if (!(t4 || s2 || r2))
  54740. return n3.call(this, e5);
  54741. n3.call(this, e5).then((e6) => {
  54742. t4 && t4(e6), r2 && r2(e6);
  54743. }, (e6) => {
  54744. s2 && s2(e6), r2 && r2(e6);
  54745. });
  54746. }).bind(t3);
  54747. }), t3;
  54748. }, t2.customAuth = t2.auth, t2;
  54749. };
  54750. var bt = It;
  54751. async function kt(e2, t2) {
  54752. const n2 = `http://${e2}:${t2}/system/ping`;
  54753. try {
  54754. const e3 = await (s2 = { url: n2, timeout: 500 }, new Promise((e4, t3) => {
  54755. ne.request({ ...s2, success(t4) {
  54756. e4(t4);
  54757. }, fail(e5) {
  54758. t3(e5);
  54759. } });
  54760. }));
  54761. return !(!e3.data || 0 !== e3.data.code);
  54762. } catch (e3) {
  54763. return false;
  54764. }
  54765. var s2;
  54766. }
  54767. async function At(e2, t2) {
  54768. let n2;
  54769. for (let s2 = 0; s2 < e2.length; s2++) {
  54770. const r2 = e2[s2];
  54771. if (await kt(r2, t2)) {
  54772. n2 = r2;
  54773. break;
  54774. }
  54775. }
  54776. return { address: n2, port: t2 };
  54777. }
  54778. const Ct = { "serverless.file.resource.generateProximalSign": "storage/generate-proximal-sign", "serverless.file.resource.report": "storage/report", "serverless.file.resource.delete": "storage/delete", "serverless.file.resource.getTempFileURL": "storage/get-temp-file-url" };
  54779. var Pt = class {
  54780. constructor(e2) {
  54781. if (["spaceId", "clientSecret"].forEach((t2) => {
  54782. if (!Object.prototype.hasOwnProperty.call(e2, t2))
  54783. throw new Error(`${t2} required`);
  54784. }), !e2.endpoint)
  54785. throw new Error("集群空间未配置ApiEndpoint,配置后需要重新关联服务空间后生效");
  54786. this.config = Object.assign({}, e2), this.config.provider = "dcloud", this.config.requestUrl = this.config.endpoint + "/client", this.config.envType = this.config.envType || "public", this.adapter = ne;
  54787. }
  54788. async request(e2, t2 = true) {
  54789. const n2 = t2;
  54790. return e2 = n2 ? await this.setupLocalRequest(e2) : this.setupRequest(e2), Promise.resolve().then(() => n2 ? this.requestLocal(e2) : de.wrappedRequest(e2, this.adapter.request));
  54791. }
  54792. requestLocal(e2) {
  54793. return new Promise((t2, n2) => {
  54794. this.adapter.request(Object.assign(e2, { complete(e3) {
  54795. if (e3 || (e3 = {}), !e3.statusCode || e3.statusCode >= 400) {
  54796. const t3 = e3.data && e3.data.code || "SYS_ERR", s2 = e3.data && e3.data.message || "request:fail";
  54797. return n2(new te({ code: t3, message: s2 }));
  54798. }
  54799. t2({ success: true, result: e3.data });
  54800. } }));
  54801. });
  54802. }
  54803. setupRequest(e2) {
  54804. const t2 = Object.assign({}, e2, { spaceId: this.config.spaceId, timestamp: Date.now() }), n2 = { "Content-Type": "application/json" };
  54805. n2["x-serverless-sign"] = de.sign(t2, this.config.clientSecret);
  54806. const s2 = he();
  54807. n2["x-client-info"] = encodeURIComponent(JSON.stringify(s2));
  54808. const { token: r2 } = re();
  54809. return n2["x-client-token"] = r2, { url: this.config.requestUrl, method: "POST", data: t2, dataType: "json", header: JSON.parse(JSON.stringify(n2)) };
  54810. }
  54811. async setupLocalRequest(e2) {
  54812. const t2 = he(), { token: n2 } = re(), s2 = Object.assign({}, e2, { spaceId: this.config.spaceId, timestamp: Date.now(), clientInfo: t2, token: n2 }), { address: r2, servePort: i2 } = this.__dev__ && this.__dev__.debugInfo || {}, { address: o2 } = await At(r2, i2);
  54813. return { url: `http://${o2}:${i2}/${Ct[e2.method]}`, method: "POST", data: s2, dataType: "json", header: JSON.parse(JSON.stringify({ "Content-Type": "application/json" })) };
  54814. }
  54815. callFunction(e2) {
  54816. const t2 = { method: "serverless.function.runtime.invoke", params: JSON.stringify({ functionTarget: e2.name, functionArgs: e2.data || {} }) };
  54817. return this.request(t2, false);
  54818. }
  54819. getUploadFileOptions(e2) {
  54820. const t2 = { method: "serverless.file.resource.generateProximalSign", params: JSON.stringify(e2) };
  54821. return this.request(t2);
  54822. }
  54823. reportUploadFile(e2) {
  54824. const t2 = { method: "serverless.file.resource.report", params: JSON.stringify(e2) };
  54825. return this.request(t2);
  54826. }
  54827. uploadFile({ filePath: e2, cloudPath: t2, fileType: n2 = "image", onUploadProgress: s2 }) {
  54828. if (!t2)
  54829. throw new te({ code: "CLOUDPATH_REQUIRED", message: "cloudPath不可为空" });
  54830. let r2;
  54831. return this.getUploadFileOptions({ cloudPath: t2 }).then((t3) => {
  54832. const { url: i2, formData: o2, name: a2 } = t3.result;
  54833. return r2 = t3.result.fileUrl, new Promise((t4, r3) => {
  54834. const c2 = this.adapter.uploadFile({ url: i2, formData: o2, name: a2, filePath: e2, fileType: n2, success(e3) {
  54835. e3 && e3.statusCode < 400 ? t4(e3) : r3(new te({ code: "UPLOAD_FAILED", message: "文件上传失败" }));
  54836. }, fail(e3) {
  54837. r3(new te({ code: e3.code || "UPLOAD_FAILED", message: e3.message || e3.errMsg || "文件上传失败" }));
  54838. } });
  54839. "function" == typeof s2 && c2 && "function" == typeof c2.onProgressUpdate && c2.onProgressUpdate((e3) => {
  54840. s2({ loaded: e3.totalBytesSent, total: e3.totalBytesExpectedToSend });
  54841. });
  54842. });
  54843. }).then(() => this.reportUploadFile({ cloudPath: t2 })).then((t3) => new Promise((n3, s3) => {
  54844. t3.success ? n3({ success: true, filePath: e2, fileID: r2 }) : s3(new te({ code: "UPLOAD_FAILED", message: "文件上传失败" }));
  54845. }));
  54846. }
  54847. deleteFile({ fileList: e2 }) {
  54848. const t2 = { method: "serverless.file.resource.delete", params: JSON.stringify({ fileList: e2 }) };
  54849. return this.request(t2).then((e3) => {
  54850. if (e3.success)
  54851. return e3.result;
  54852. throw new te({ code: "DELETE_FILE_FAILED", message: "删除文件失败" });
  54853. });
  54854. }
  54855. getTempFileURL({ fileList: e2, maxAge: t2 } = {}) {
  54856. if (!Array.isArray(e2) || 0 === e2.length)
  54857. throw new te({ code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" });
  54858. const n2 = { method: "serverless.file.resource.getTempFileURL", params: JSON.stringify({ fileList: e2, maxAge: t2 }) };
  54859. return this.request(n2).then((e3) => {
  54860. if (e3.success)
  54861. return { fileList: e3.result.fileList.map((e4) => ({ fileID: e4.fileID, tempFileURL: e4.tempFileURL })) };
  54862. throw new te({ code: "GET_TEMP_FILE_URL_FAILED", message: "获取临时文件链接失败" });
  54863. });
  54864. }
  54865. };
  54866. var Tt = { init(e2) {
  54867. const t2 = new Pt(e2), n2 = { signInAnonymously: function() {
  54868. return Promise.resolve();
  54869. }, getLoginState: function() {
  54870. return Promise.resolve(false);
  54871. } };
  54872. return t2.auth = function() {
  54873. return n2;
  54874. }, t2.customAuth = t2.auth, t2;
  54875. } }, xt = n(function(e2, t2) {
  54876. e2.exports = r.enc.Hex;
  54877. });
  54878. function Ot() {
  54879. return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e2) {
  54880. var t2 = 16 * Math.random() | 0;
  54881. return ("x" === e2 ? t2 : 3 & t2 | 8).toString(16);
  54882. });
  54883. }
  54884. function Et(e2 = "", t2 = {}) {
  54885. const { data: n2, functionName: s2, method: r2, headers: i2, signHeaderKeys: o2 = [], config: a2 } = t2, c2 = Date.now(), u2 = Ot(), l2 = Object.assign({}, i2, { "x-from-app-id": a2.spaceAppId, "x-from-env-id": a2.spaceId, "x-to-env-id": a2.spaceId, "x-from-instance-id": c2, "x-from-function-name": s2, "x-client-timestamp": c2, "x-alipay-source": "client", "x-request-id": u2, "x-alipay-callid": u2, "x-trace-id": u2 }), h2 = ["x-from-app-id", "x-from-env-id", "x-to-env-id", "x-from-instance-id", "x-from-function-name", "x-client-timestamp"].concat(o2), [d2 = "", p2 = ""] = e2.split("?") || [], f2 = function(e3) {
  54886. const t3 = e3.signedHeaders.join(";"), n3 = e3.signedHeaders.map((t4) => `${t4.toLowerCase()}:${e3.headers[t4]}
  54887. `).join(""), s3 = we(e3.body).toString(xt), r3 = `${e3.method.toUpperCase()}
  54888. ${e3.path}
  54889. ${e3.query}
  54890. ${n3}
  54891. ${t3}
  54892. ${s3}
  54893. `, i3 = we(r3).toString(xt), o3 = `HMAC-SHA256
  54894. ${e3.timestamp}
  54895. ${i3}
  54896. `, a3 = ve(o3, e3.secretKey).toString(xt);
  54897. return `HMAC-SHA256 Credential=${e3.secretId}, SignedHeaders=${t3}, Signature=${a3}`;
  54898. }({ path: d2, query: p2, method: r2, headers: l2, timestamp: c2, body: JSON.stringify(n2), secretId: a2.accessKey, secretKey: a2.secretKey, signedHeaders: h2.sort() });
  54899. return { url: `${a2.endpoint}${e2}`, headers: Object.assign({}, l2, { Authorization: f2 }) };
  54900. }
  54901. function Lt({ url: e2, data: t2, method: n2 = "POST", headers: s2 = {}, timeout: r2 }) {
  54902. return new Promise((i2, o2) => {
  54903. ne.request({ url: e2, method: n2, data: "object" == typeof t2 ? JSON.stringify(t2) : t2, header: s2, dataType: "json", timeout: r2, complete: (e3 = {}) => {
  54904. const t3 = s2["x-trace-id"] || "";
  54905. if (!e3.statusCode || e3.statusCode >= 400) {
  54906. const { message: n3, errMsg: s3, trace_id: r3 } = e3.data || {};
  54907. return o2(new te({ code: "SYS_ERR", message: n3 || s3 || "request:fail", requestId: r3 || t3 }));
  54908. }
  54909. i2({ status: e3.statusCode, data: e3.data, headers: e3.header, requestId: t3 });
  54910. } });
  54911. });
  54912. }
  54913. function Rt(e2, t2) {
  54914. const { path: n2, data: s2, method: r2 = "GET" } = e2, { url: i2, headers: o2 } = Et(n2, { functionName: "", data: s2, method: r2, headers: { "x-alipay-cloud-mode": "oss", "x-data-api-type": "oss", "x-expire-timestamp": Date.now() + 6e4 }, signHeaderKeys: ["x-data-api-type", "x-expire-timestamp"], config: t2 });
  54915. return Lt({ url: i2, data: s2, method: r2, headers: o2 }).then((e3) => {
  54916. const t3 = e3.data || {};
  54917. if (!t3.success)
  54918. throw new te({ code: e3.errCode, message: e3.errMsg, requestId: e3.requestId });
  54919. return t3.data || {};
  54920. }).catch((e3) => {
  54921. throw new te({ code: e3.errCode, message: e3.errMsg, requestId: e3.requestId });
  54922. });
  54923. }
  54924. function Ut(e2 = "") {
  54925. const t2 = e2.trim().replace(/^cloud:\/\//, ""), n2 = t2.indexOf("/");
  54926. if (n2 <= 0)
  54927. throw new te({ code: "INVALID_PARAM", message: "fileID不合法" });
  54928. const s2 = t2.substring(0, n2), r2 = t2.substring(n2 + 1);
  54929. return s2 !== this.config.spaceId && console.warn("file ".concat(e2, " does not belong to env ").concat(this.config.spaceId)), r2;
  54930. }
  54931. function Nt(e2 = "") {
  54932. return "cloud://".concat(this.config.spaceId, "/").concat(e2.replace(/^\/+/, ""));
  54933. }
  54934. class Dt {
  54935. constructor(e2) {
  54936. this.config = e2;
  54937. }
  54938. signedURL(e2, t2 = {}) {
  54939. const n2 = `/ws/function/${e2}`, s2 = this.config.wsEndpoint.replace(/^ws(s)?:\/\//, ""), r2 = Object.assign({}, t2, { accessKeyId: this.config.accessKey, signatureNonce: Ot(), timestamp: "" + Date.now() }), i2 = [n2, ["accessKeyId", "authorization", "signatureNonce", "timestamp"].sort().map(function(e3) {
  54940. return r2[e3] ? "".concat(e3, "=").concat(r2[e3]) : null;
  54941. }).filter(Boolean).join("&"), `host:${s2}`].join("\n"), o2 = ["HMAC-SHA256", we(i2).toString(xt)].join("\n"), a2 = ve(o2, this.config.secretKey).toString(xt), c2 = Object.keys(r2).map((e3) => `${e3}=${encodeURIComponent(r2[e3])}`).join("&");
  54942. return `${this.config.wsEndpoint}${n2}?${c2}&signature=${a2}`;
  54943. }
  54944. }
  54945. var Mt = class {
  54946. constructor(e2) {
  54947. if (["spaceId", "spaceAppId", "accessKey", "secretKey"].forEach((t2) => {
  54948. if (!Object.prototype.hasOwnProperty.call(e2, t2))
  54949. throw new Error(`${t2} required`);
  54950. }), e2.endpoint) {
  54951. if ("string" != typeof e2.endpoint)
  54952. throw new Error("endpoint must be string");
  54953. if (!/^https:\/\//.test(e2.endpoint))
  54954. throw new Error("endpoint must start with https://");
  54955. e2.endpoint = e2.endpoint.replace(/\/$/, "");
  54956. }
  54957. this.config = Object.assign({}, e2, { endpoint: e2.endpoint || `https://${e2.spaceId}.api-hz.cloudbasefunction.cn`, wsEndpoint: e2.wsEndpoint || `wss://${e2.spaceId}.api-hz.cloudbasefunction.cn` }), this._websocket = new Dt(this.config);
  54958. }
  54959. callFunction(e2) {
  54960. return function(e3, t2) {
  54961. const { name: n2, data: s2, async: r2 = false, timeout: i2 } = e3, o2 = "POST", a2 = { "x-to-function-name": n2 };
  54962. r2 && (a2["x-function-invoke-type"] = "async");
  54963. const { url: c2, headers: u2 } = Et("/functions/invokeFunction", { functionName: n2, data: s2, method: o2, headers: a2, signHeaderKeys: ["x-to-function-name"], config: t2 });
  54964. return Lt({ url: c2, data: s2, method: o2, headers: u2, timeout: i2 }).then((e4) => {
  54965. let t3 = 0;
  54966. if (r2) {
  54967. const n3 = e4.data || {};
  54968. t3 = "200" === n3.errCode ? 0 : n3.errCode, e4.data = n3.data || {}, e4.errMsg = n3.errMsg;
  54969. }
  54970. if (0 !== t3)
  54971. throw new te({ code: t3, message: e4.errMsg, requestId: e4.requestId });
  54972. return { errCode: t3, success: 0 === t3, requestId: e4.requestId, result: e4.data };
  54973. }).catch((e4) => {
  54974. throw new te({ code: e4.errCode, message: e4.errMsg, requestId: e4.requestId });
  54975. });
  54976. }(e2, this.config);
  54977. }
  54978. uploadFileToOSS({ url: e2, filePath: t2, fileType: n2, formData: s2, onUploadProgress: r2 }) {
  54979. return new Promise((i2, o2) => {
  54980. const a2 = ne.uploadFile({ url: e2, filePath: t2, fileType: n2, formData: s2, name: "file", success(e3) {
  54981. e3 && e3.statusCode < 400 ? i2(e3) : o2(new te({ code: "UPLOAD_FAILED", message: "文件上传失败" }));
  54982. }, fail(e3) {
  54983. o2(new te({ code: e3.code || "UPLOAD_FAILED", message: e3.message || e3.errMsg || "文件上传失败" }));
  54984. } });
  54985. "function" == typeof r2 && a2 && "function" == typeof a2.onProgressUpdate && a2.onProgressUpdate((e3) => {
  54986. r2({ loaded: e3.totalBytesSent, total: e3.totalBytesExpectedToSend });
  54987. });
  54988. });
  54989. }
  54990. async uploadFile({ filePath: e2, cloudPath: t2 = "", fileType: n2 = "image", onUploadProgress: s2 }) {
  54991. if ("string" !== f(t2))
  54992. throw new te({ code: "INVALID_PARAM", message: "cloudPath必须为字符串类型" });
  54993. if (!(t2 = t2.trim()))
  54994. throw new te({ code: "INVALID_PARAM", message: "cloudPath不可为空" });
  54995. if (/:\/\//.test(t2))
  54996. throw new te({ code: "INVALID_PARAM", message: "cloudPath不合法" });
  54997. const r2 = await Rt({ path: "/".concat(t2.replace(/^\//, ""), "?post_url") }, this.config), { file_id: i2, upload_url: o2, form_data: a2 } = r2, c2 = a2 && a2.reduce((e3, t3) => (e3[t3.key] = t3.value, e3), {});
  54998. return this.uploadFileToOSS({ url: o2, filePath: e2, fileType: n2, formData: c2, onUploadProgress: s2 }).then(() => ({ fileID: i2 }));
  54999. }
  55000. async getTempFileURL({ fileList: e2 }) {
  55001. return new Promise((t2, n2) => {
  55002. (!e2 || e2.length < 0) && n2(new te({ errCode: "INVALID_PARAM", errMsg: "fileList不能为空数组" })), e2.length > 50 && n2(new te({ errCode: "INVALID_PARAM", errMsg: "fileList数组长度不能超过50" }));
  55003. const s2 = [];
  55004. for (const t3 of e2) {
  55005. "string" !== f(t3) && n2(new te({ errCode: "INVALID_PARAM", errMsg: "fileList的元素必须是非空的字符串" }));
  55006. const e3 = Ut.call(this, t3);
  55007. s2.push({ file_id: e3, expire: 600 });
  55008. }
  55009. Rt({ path: "/?download_url", data: { file_list: s2 }, method: "POST" }, this.config).then((e3) => {
  55010. const { file_list: n3 = [] } = e3;
  55011. t2({ fileList: n3.map((e4) => ({ fileID: Nt.call(this, e4.file_id), tempFileURL: e4.download_url })) });
  55012. }).catch((e3) => n2(e3));
  55013. });
  55014. }
  55015. async connectWebSocket(e2) {
  55016. const { name: t2, query: n2 } = e2;
  55017. return ne.connectSocket({ url: this._websocket.signedURL(t2, n2), complete: () => {
  55018. } });
  55019. }
  55020. };
  55021. var qt = { init: (e2) => {
  55022. e2.provider = "alipay";
  55023. const t2 = new Mt(e2);
  55024. return t2.auth = function() {
  55025. return { signInAnonymously: function() {
  55026. return Promise.resolve();
  55027. }, getLoginState: function() {
  55028. return Promise.resolve(true);
  55029. } };
  55030. }, t2;
  55031. } };
  55032. function Ft({ data: e2 }) {
  55033. let t2;
  55034. t2 = he();
  55035. const n2 = JSON.parse(JSON.stringify(e2 || {}));
  55036. if (Object.assign(n2, { clientInfo: t2 }), !n2.uniIdToken) {
  55037. const { token: e3 } = re();
  55038. e3 && (n2.uniIdToken = e3);
  55039. }
  55040. return n2;
  55041. }
  55042. async function Kt(e2 = {}) {
  55043. await this.__dev__.initLocalNetwork();
  55044. const { localAddress: t2, localPort: n2 } = this.__dev__, s2 = { aliyun: "aliyun", tencent: "tcb", alipay: "alipay", dcloud: "dcloud" }[this.config.provider], r2 = this.config.spaceId, i2 = `http://${t2}:${n2}/system/check-function`, o2 = `http://${t2}:${n2}/cloudfunctions/${e2.name}`;
  55045. return new Promise((t3, n3) => {
  55046. ne.request({ method: "POST", url: i2, data: { name: e2.name, platform: C, provider: s2, spaceId: r2 }, timeout: 3e3, success(e3) {
  55047. t3(e3);
  55048. }, fail() {
  55049. t3({ data: { code: "NETWORK_ERROR", message: "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下,自动切换为已部署的云函数。" } });
  55050. } });
  55051. }).then(({ data: e3 } = {}) => {
  55052. const { code: t3, message: n3 } = e3 || {};
  55053. return { code: 0 === t3 ? 0 : t3 || "SYS_ERR", message: n3 || "SYS_ERR" };
  55054. }).then(({ code: t3, message: n3 }) => {
  55055. if (0 !== t3) {
  55056. switch (t3) {
  55057. case "MODULE_ENCRYPTED":
  55058. console.error(`此云函数(${e2.name})依赖加密公共模块不可本地调试,自动切换为云端已部署的云函数`);
  55059. break;
  55060. case "FUNCTION_ENCRYPTED":
  55061. console.error(`此云函数(${e2.name})已加密不可本地调试,自动切换为云端已部署的云函数`);
  55062. break;
  55063. case "ACTION_ENCRYPTED":
  55064. console.error(n3 || "需要访问加密的uni-clientDB-action,自动切换为云端环境");
  55065. break;
  55066. case "NETWORK_ERROR":
  55067. console.error(n3 || "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下");
  55068. break;
  55069. case "SWITCH_TO_CLOUD":
  55070. break;
  55071. default: {
  55072. const e3 = `检测本地调试服务出现错误:${n3},请检查网络环境或重启客户端再试`;
  55073. throw console.error(e3), new Error(e3);
  55074. }
  55075. }
  55076. return this._callCloudFunction(e2);
  55077. }
  55078. return new Promise((t4, n4) => {
  55079. const r3 = Ft.call(this, { data: e2.data });
  55080. ne.request({ method: "POST", url: o2, data: { provider: s2, platform: C, param: r3 }, timeout: e2.timeout, success: ({ statusCode: e3, data: s3 } = {}) => !e3 || e3 >= 400 ? n4(new te({ code: s3.code || "SYS_ERR", message: s3.message || "request:fail" })) : t4({ result: s3 }), fail(e3) {
  55081. n4(new te({ code: e3.code || e3.errCode || "SYS_ERR", message: e3.message || e3.errMsg || "request:fail" }));
  55082. } });
  55083. });
  55084. });
  55085. }
  55086. const jt = [{ rule: /fc_function_not_found|FUNCTION_NOT_FOUND/, content: ",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间", mode: "append" }];
  55087. var $t = /[\\^$.*+?()[\]{}|]/g, Bt = RegExp($t.source);
  55088. function Wt(e2, t2, n2) {
  55089. return e2.replace(new RegExp((s2 = t2) && Bt.test(s2) ? s2.replace($t, "\\$&") : s2, "g"), n2);
  55090. var s2;
  55091. }
  55092. const Jt = "request", zt = "response", Vt = "both";
  55093. const En = { code: 2e4, message: "System error" }, Ln = { code: 20101, message: "Invalid client" };
  55094. function Nn(e2) {
  55095. const { errSubject: t2, subject: n2, errCode: s2, errMsg: r2, code: i2, message: o2, cause: a2 } = e2 || {};
  55096. return new te({ subject: t2 || n2 || "uni-secure-network", code: s2 || i2 || En.code, message: r2 || o2, cause: a2 });
  55097. }
  55098. let Mn;
  55099. function $n({ secretType: e2 } = {}) {
  55100. return e2 === Jt || e2 === zt || e2 === Vt;
  55101. }
  55102. function Bn({ name: e2, data: t2 = {} } = {}) {
  55103. return "DCloud-clientDB" === e2 && "encryption" === t2.redirectTo && "getAppClientKey" === t2.action;
  55104. }
  55105. function Wn({ provider: e2, spaceId: t2, functionName: n2 } = {}) {
  55106. const { appId: s2, uniPlatform: r2, osName: i2 } = ce();
  55107. let o2 = r2;
  55108. "app" === r2 && (o2 = i2);
  55109. const a2 = function({ provider: e3, spaceId: t3 } = {}) {
  55110. const n3 = A;
  55111. if (!n3)
  55112. return {};
  55113. e3 = /* @__PURE__ */ function(e4) {
  55114. return "tencent" === e4 ? "tcb" : e4;
  55115. }(e3);
  55116. const s3 = n3.find((n4) => n4.provider === e3 && n4.spaceId === t3);
  55117. return s3 && s3.config;
  55118. }({ provider: e2, spaceId: t2 });
  55119. if (!a2 || !a2.accessControl || !a2.accessControl.enable)
  55120. return false;
  55121. const c2 = a2.accessControl.function || {}, u2 = Object.keys(c2);
  55122. if (0 === u2.length)
  55123. return true;
  55124. const l2 = function(e3, t3) {
  55125. let n3, s3, r3;
  55126. for (let i3 = 0; i3 < e3.length; i3++) {
  55127. const o3 = e3[i3];
  55128. o3 !== t3 ? "*" !== o3 ? o3.split(",").map((e4) => e4.trim()).indexOf(t3) > -1 && (s3 = o3) : r3 = o3 : n3 = o3;
  55129. }
  55130. return n3 || s3 || r3;
  55131. }(u2, n2);
  55132. if (!l2)
  55133. return false;
  55134. if ((c2[l2] || []).find((e3 = {}) => e3.appId === s2 && (e3.platform || "").toLowerCase() === o2.toLowerCase()))
  55135. return true;
  55136. throw console.error(`此应用[appId: ${s2}, platform: ${o2}]不在云端配置的允许访问的应用列表内,参考:https://uniapp.dcloud.net.cn/uniCloud/secure-network.html#verify-client`), Nn(Ln);
  55137. }
  55138. function Hn({ functionName: e2, result: t2, logPvd: n2 }) {
  55139. if (this.__dev__.debugLog && t2 && t2.requestId) {
  55140. const s2 = JSON.stringify({ spaceId: this.config.spaceId, functionName: e2, requestId: t2.requestId });
  55141. console.log(`[${n2}-request]${s2}[/${n2}-request]`);
  55142. }
  55143. }
  55144. function Jn(e2) {
  55145. const t2 = e2.callFunction, n2 = function(n3) {
  55146. const s2 = n3.name;
  55147. n3.data = Ft.call(e2, { data: n3.data });
  55148. const r2 = { aliyun: "aliyun", tencent: "tcb", tcb: "tcb", alipay: "alipay", dcloud: "dcloud" }[this.config.provider], i2 = $n(n3), o2 = Bn(n3), a2 = i2 || o2;
  55149. return t2.call(this, n3).then((e3) => (e3.errCode = 0, !a2 && Hn.call(this, { functionName: s2, result: e3, logPvd: r2 }), Promise.resolve(e3)), (e3) => (!a2 && Hn.call(this, { functionName: s2, result: e3, logPvd: r2 }), e3 && e3.message && (e3.message = function({ message: e4 = "", extraInfo: t3 = {}, formatter: n4 = [] } = {}) {
  55150. for (let s3 = 0; s3 < n4.length; s3++) {
  55151. const { rule: r3, content: i3, mode: o3 } = n4[s3], a3 = e4.match(r3);
  55152. if (!a3)
  55153. continue;
  55154. let c2 = i3;
  55155. for (let e5 = 1; e5 < a3.length; e5++)
  55156. c2 = Wt(c2, `{$${e5}}`, a3[e5]);
  55157. for (const e5 in t3)
  55158. c2 = Wt(c2, `{${e5}}`, t3[e5]);
  55159. return "replace" === o3 ? c2 : e4 + c2;
  55160. }
  55161. return e4;
  55162. }({ message: `[${n3.name}]: ${e3.message}`, formatter: jt, extraInfo: { functionName: s2 } })), Promise.reject(e3)));
  55163. };
  55164. e2.callFunction = function(t3) {
  55165. const { provider: s2, spaceId: r2 } = e2.config, i2 = t3.name;
  55166. let o2, a2;
  55167. if (t3.data = t3.data || {}, e2.__dev__.debugInfo && !e2.__dev__.debugInfo.forceRemote && T ? (e2._callCloudFunction || (e2._callCloudFunction = n2, e2._callLocalFunction = Kt), o2 = Kt) : o2 = n2, o2 = o2.bind(e2), Bn(t3))
  55168. a2 = n2.call(e2, t3);
  55169. else if ($n(t3)) {
  55170. a2 = new Mn({ secretType: t3.secretType, uniCloudIns: e2 }).wrapEncryptDataCallFunction(n2.bind(e2))(t3);
  55171. } else if (Wn({ provider: s2, spaceId: r2, functionName: i2 })) {
  55172. a2 = new Mn({ secretType: t3.secretType, uniCloudIns: e2 }).wrapVerifyClientCallFunction(n2.bind(e2))(t3);
  55173. } else
  55174. a2 = o2(t3);
  55175. return Object.defineProperty(a2, "result", { get: () => (console.warn("当前返回结果为Promise类型,不可直接访问其result属性,详情请参考:https://uniapp.dcloud.net.cn/uniCloud/faq?id=promise"), {}) }), a2.then((e3) => ("undefined" != typeof UTSJSONObject && (e3.result = new UTSJSONObject(e3.result)), e3));
  55176. };
  55177. }
  55178. Mn = class {
  55179. constructor() {
  55180. throw Nn({ message: `Platform ${C} is not enabled, please check whether secure network module is enabled in your manifest.json` });
  55181. }
  55182. };
  55183. const zn = Symbol("CLIENT_DB_INTERNAL");
  55184. function Vn(e2, t2) {
  55185. return e2.then = "DoNotReturnProxyWithAFunctionNamedThen", e2._internalType = zn, e2.inspect = null, e2.__v_raw = void 0, new Proxy(e2, { get(e3, n2, s2) {
  55186. if ("_uniClient" === n2)
  55187. return null;
  55188. if ("symbol" == typeof n2)
  55189. return e3[n2];
  55190. if (n2 in e3 || "string" != typeof n2) {
  55191. const t3 = e3[n2];
  55192. return "function" == typeof t3 ? t3.bind(e3) : t3;
  55193. }
  55194. return t2.get(e3, n2, s2);
  55195. } });
  55196. }
  55197. function Gn(e2) {
  55198. return { on: (t2, n2) => {
  55199. e2[t2] = e2[t2] || [], e2[t2].indexOf(n2) > -1 || e2[t2].push(n2);
  55200. }, off: (t2, n2) => {
  55201. e2[t2] = e2[t2] || [];
  55202. const s2 = e2[t2].indexOf(n2);
  55203. -1 !== s2 && e2[t2].splice(s2, 1);
  55204. } };
  55205. }
  55206. const Yn = ["db.Geo", "db.command", "command.aggregate"];
  55207. function Qn(e2, t2) {
  55208. return Yn.indexOf(`${e2}.${t2}`) > -1;
  55209. }
  55210. function Xn(e2) {
  55211. switch (f(e2 = se(e2))) {
  55212. case "array":
  55213. return e2.map((e3) => Xn(e3));
  55214. case "object":
  55215. return e2._internalType === zn || Object.keys(e2).forEach((t2) => {
  55216. e2[t2] = Xn(e2[t2]);
  55217. }), e2;
  55218. case "regexp":
  55219. return { $regexp: { source: e2.source, flags: e2.flags } };
  55220. case "date":
  55221. return { $date: e2.toISOString() };
  55222. default:
  55223. return e2;
  55224. }
  55225. }
  55226. function Zn(e2) {
  55227. return e2 && e2.content && e2.content.$method;
  55228. }
  55229. class es {
  55230. constructor(e2, t2, n2) {
  55231. this.content = e2, this.prevStage = t2 || null, this.udb = null, this._database = n2;
  55232. }
  55233. toJSON() {
  55234. let e2 = this;
  55235. const t2 = [e2.content];
  55236. for (; e2.prevStage; )
  55237. e2 = e2.prevStage, t2.push(e2.content);
  55238. return { $db: t2.reverse().map((e3) => ({ $method: e3.$method, $param: Xn(e3.$param) })) };
  55239. }
  55240. toString() {
  55241. return JSON.stringify(this.toJSON());
  55242. }
  55243. getAction() {
  55244. const e2 = this.toJSON().$db.find((e3) => "action" === e3.$method);
  55245. return e2 && e2.$param && e2.$param[0];
  55246. }
  55247. getCommand() {
  55248. return { $db: this.toJSON().$db.filter((e2) => "action" !== e2.$method) };
  55249. }
  55250. get isAggregate() {
  55251. let e2 = this;
  55252. for (; e2; ) {
  55253. const t2 = Zn(e2), n2 = Zn(e2.prevStage);
  55254. if ("aggregate" === t2 && "collection" === n2 || "pipeline" === t2)
  55255. return true;
  55256. e2 = e2.prevStage;
  55257. }
  55258. return false;
  55259. }
  55260. get isCommand() {
  55261. let e2 = this;
  55262. for (; e2; ) {
  55263. if ("command" === Zn(e2))
  55264. return true;
  55265. e2 = e2.prevStage;
  55266. }
  55267. return false;
  55268. }
  55269. get isAggregateCommand() {
  55270. let e2 = this;
  55271. for (; e2; ) {
  55272. const t2 = Zn(e2), n2 = Zn(e2.prevStage);
  55273. if ("aggregate" === t2 && "command" === n2)
  55274. return true;
  55275. e2 = e2.prevStage;
  55276. }
  55277. return false;
  55278. }
  55279. getNextStageFn(e2) {
  55280. const t2 = this;
  55281. return function() {
  55282. return ts({ $method: e2, $param: Xn(Array.from(arguments)) }, t2, t2._database);
  55283. };
  55284. }
  55285. get count() {
  55286. return this.isAggregate ? this.getNextStageFn("count") : function() {
  55287. return this._send("count", Array.from(arguments));
  55288. };
  55289. }
  55290. get remove() {
  55291. return this.isCommand ? this.getNextStageFn("remove") : function() {
  55292. return this._send("remove", Array.from(arguments));
  55293. };
  55294. }
  55295. get() {
  55296. return this._send("get", Array.from(arguments));
  55297. }
  55298. get add() {
  55299. return this.isCommand ? this.getNextStageFn("add") : function() {
  55300. return this._send("add", Array.from(arguments));
  55301. };
  55302. }
  55303. update() {
  55304. return this._send("update", Array.from(arguments));
  55305. }
  55306. end() {
  55307. return this._send("end", Array.from(arguments));
  55308. }
  55309. get set() {
  55310. return this.isCommand ? this.getNextStageFn("set") : function() {
  55311. throw new Error("JQL禁止使用set方法");
  55312. };
  55313. }
  55314. _send(e2, t2) {
  55315. const n2 = this.getAction(), s2 = this.getCommand();
  55316. if (s2.$db.push({ $method: e2, $param: Xn(t2) }), S) {
  55317. const e3 = s2.$db.find((e4) => "collection" === e4.$method), t3 = e3 && e3.$param;
  55318. t3 && 1 === t3.length && "string" == typeof e3.$param[0] && e3.$param[0].indexOf(",") > -1 && console.warn("检测到使用JQL语法联表查询时,未使用getTemp先过滤主表数据,在主表数据量大的情况下可能会查询缓慢。\n- 如何优化请参考此文档:https://uniapp.dcloud.net.cn/uniCloud/jql?id=lookup-with-temp \n- 如果主表数据量很小请忽略此信息,项目发行时不会出现此提示。");
  55319. }
  55320. return this._database._callCloudFunction({ action: n2, command: s2 });
  55321. }
  55322. }
  55323. function ts(e2, t2, n2) {
  55324. return Vn(new es(e2, t2, n2), { get(e3, t3) {
  55325. let s2 = "db";
  55326. return e3 && e3.content && (s2 = e3.content.$method), Qn(s2, t3) ? ts({ $method: t3 }, e3, n2) : function() {
  55327. return ts({ $method: t3, $param: Xn(Array.from(arguments)) }, e3, n2);
  55328. };
  55329. } });
  55330. }
  55331. function ns({ path: e2, method: t2 }) {
  55332. return class {
  55333. constructor() {
  55334. this.param = Array.from(arguments);
  55335. }
  55336. toJSON() {
  55337. return { $newDb: [...e2.map((e3) => ({ $method: e3 })), { $method: t2, $param: this.param }] };
  55338. }
  55339. toString() {
  55340. return JSON.stringify(this.toJSON());
  55341. }
  55342. };
  55343. }
  55344. function ss(e2, t2 = {}) {
  55345. return Vn(new e2(t2), { get: (e3, t3) => Qn("db", t3) ? ts({ $method: t3 }, null, e3) : function() {
  55346. return ts({ $method: t3, $param: Xn(Array.from(arguments)) }, null, e3);
  55347. } });
  55348. }
  55349. class rs extends class {
  55350. constructor({ uniClient: e2 = {}, isJQL: t2 = false } = {}) {
  55351. this._uniClient = e2, this._authCallBacks = {}, this._dbCallBacks = {}, e2._isDefault && (this._dbCallBacks = L("_globalUniCloudDatabaseCallback")), t2 || (this.auth = Gn(this._authCallBacks)), this._isJQL = t2, Object.assign(this, Gn(this._dbCallBacks)), this.env = Vn({}, { get: (e3, t3) => ({ $env: t3 }) }), this.Geo = Vn({}, { get: (e3, t3) => ns({ path: ["Geo"], method: t3 }) }), this.serverDate = ns({ path: [], method: "serverDate" }), this.RegExp = ns({ path: [], method: "RegExp" });
  55352. }
  55353. getCloudEnv(e2) {
  55354. if ("string" != typeof e2 || !e2.trim())
  55355. throw new Error("getCloudEnv参数错误");
  55356. return { $env: e2.replace("$cloudEnv_", "") };
  55357. }
  55358. _callback(e2, t2) {
  55359. const n2 = this._dbCallBacks;
  55360. n2[e2] && n2[e2].forEach((e3) => {
  55361. e3(...t2);
  55362. });
  55363. }
  55364. _callbackAuth(e2, t2) {
  55365. const n2 = this._authCallBacks;
  55366. n2[e2] && n2[e2].forEach((e3) => {
  55367. e3(...t2);
  55368. });
  55369. }
  55370. multiSend() {
  55371. const e2 = Array.from(arguments), t2 = e2.map((e3) => {
  55372. const t3 = e3.getAction(), n2 = e3.getCommand();
  55373. if ("getTemp" !== n2.$db[n2.$db.length - 1].$method)
  55374. throw new Error("multiSend只支持子命令内使用getTemp");
  55375. return { action: t3, command: n2 };
  55376. });
  55377. return this._callCloudFunction({ multiCommand: t2, queryList: e2 });
  55378. }
  55379. } {
  55380. _parseResult(e2) {
  55381. return this._isJQL ? e2.result : e2;
  55382. }
  55383. _callCloudFunction({ action: e2, command: t2, multiCommand: n2, queryList: s2 }) {
  55384. function r2(e3, t3) {
  55385. if (n2 && s2)
  55386. for (let n3 = 0; n3 < s2.length; n3++) {
  55387. const r3 = s2[n3];
  55388. r3.udb && "function" == typeof r3.udb.setResult && (t3 ? r3.udb.setResult(t3) : r3.udb.setResult(e3.result.dataList[n3]));
  55389. }
  55390. }
  55391. const i2 = this, o2 = this._isJQL ? "databaseForJQL" : "database";
  55392. function a2(e3) {
  55393. return i2._callback("error", [e3]), M(q(o2, "fail"), e3).then(() => M(q(o2, "complete"), e3)).then(() => (r2(null, e3), Y(j, { type: W, content: e3 }), Promise.reject(e3)));
  55394. }
  55395. const c2 = M(q(o2, "invoke")), u2 = this._uniClient;
  55396. return c2.then(() => u2.callFunction({ name: "DCloud-clientDB", type: l, data: { action: e2, command: t2, multiCommand: n2 } })).then((e3) => {
  55397. const { code: t3, message: n3, token: s3, tokenExpired: c3, systemInfo: u3 = [] } = e3.result;
  55398. if (u3)
  55399. for (let e4 = 0; e4 < u3.length; e4++) {
  55400. const { level: t4, message: n4, detail: s4 } = u3[e4], r3 = console["warn" === t4 ? "error" : t4] || console.log;
  55401. let i3 = "[System Info]" + n4;
  55402. s4 && (i3 = `${i3}
  55403. 详细信息:${s4}`), r3(i3);
  55404. }
  55405. if (t3) {
  55406. return a2(new te({ code: t3, message: n3, requestId: e3.requestId }));
  55407. }
  55408. e3.result.errCode = e3.result.errCode || e3.result.code, e3.result.errMsg = e3.result.errMsg || e3.result.message, s3 && c3 && (ie({ token: s3, tokenExpired: c3 }), this._callbackAuth("refreshToken", [{ token: s3, tokenExpired: c3 }]), this._callback("refreshToken", [{ token: s3, tokenExpired: c3 }]), Y(B, { token: s3, tokenExpired: c3 }));
  55409. const l2 = [{ prop: "affectedDocs", tips: "affectedDocs不再推荐使用,请使用inserted/deleted/updated/data.length替代" }, { prop: "code", tips: "code不再推荐使用,请使用errCode替代" }, { prop: "message", tips: "message不再推荐使用,请使用errMsg替代" }];
  55410. for (let t4 = 0; t4 < l2.length; t4++) {
  55411. const { prop: n4, tips: s4 } = l2[t4];
  55412. if (n4 in e3.result) {
  55413. const t5 = e3.result[n4];
  55414. Object.defineProperty(e3.result, n4, { get: () => (console.warn(s4), t5) });
  55415. }
  55416. }
  55417. return function(e4) {
  55418. return M(q(o2, "success"), e4).then(() => M(q(o2, "complete"), e4)).then(() => {
  55419. r2(e4, null);
  55420. const t4 = i2._parseResult(e4);
  55421. return Y(j, { type: W, content: t4 }), Promise.resolve(t4);
  55422. });
  55423. }(e3);
  55424. }, (e3) => {
  55425. /fc_function_not_found|FUNCTION_NOT_FOUND/g.test(e3.message) && console.warn("clientDB未初始化,请在web控制台保存一次schema以开启clientDB");
  55426. return a2(new te({ code: e3.code || "SYSTEM_ERROR", message: e3.message, requestId: e3.requestId }));
  55427. });
  55428. }
  55429. }
  55430. const is = "token无效,跳转登录页面", os = "token过期,跳转登录页面", as = { TOKEN_INVALID_TOKEN_EXPIRED: os, TOKEN_INVALID_INVALID_CLIENTID: is, TOKEN_INVALID: is, TOKEN_INVALID_WRONG_TOKEN: is, TOKEN_INVALID_ANONYMOUS_USER: is }, cs = { "uni-id-token-expired": os, "uni-id-check-token-failed": is, "uni-id-token-not-exist": is, "uni-id-check-device-feature-failed": is };
  55431. function us(e2, t2) {
  55432. let n2 = "";
  55433. return n2 = e2 ? `${e2}/${t2}` : t2, n2.replace(/^\//, "");
  55434. }
  55435. function ls(e2 = [], t2 = "") {
  55436. const n2 = [], s2 = [];
  55437. return e2.forEach((e3) => {
  55438. true === e3.needLogin ? n2.push(us(t2, e3.path)) : false === e3.needLogin && s2.push(us(t2, e3.path));
  55439. }), { needLoginPage: n2, notNeedLoginPage: s2 };
  55440. }
  55441. function hs(e2) {
  55442. return e2.split("?")[0].replace(/^\//, "");
  55443. }
  55444. function ds() {
  55445. return function(e2) {
  55446. let t2 = e2 && e2.$page && e2.$page.fullPath || "";
  55447. return t2 ? ("/" !== t2.charAt(0) && (t2 = "/" + t2), t2) : t2;
  55448. }(function() {
  55449. const e2 = getCurrentPages();
  55450. return e2[e2.length - 1];
  55451. }());
  55452. }
  55453. function ps() {
  55454. return hs(ds());
  55455. }
  55456. function fs(e2 = "", t2 = {}) {
  55457. if (!e2)
  55458. return false;
  55459. if (!(t2 && t2.list && t2.list.length))
  55460. return false;
  55461. const n2 = t2.list, s2 = hs(e2);
  55462. return n2.some((e3) => e3.pagePath === s2);
  55463. }
  55464. const gs = !!e.uniIdRouter;
  55465. const { loginPage: ms, routerNeedLogin: ys, resToLogin: _s, needLoginPage: ws, notNeedLoginPage: vs, loginPageInTabBar: Is } = function({ pages: t2 = [], subPackages: n2 = [], uniIdRouter: s2 = {}, tabBar: r2 = {} } = e) {
  55466. const { loginPage: i2, needLogin: o2 = [], resToLogin: a2 = true } = s2, { needLoginPage: c2, notNeedLoginPage: u2 } = ls(t2), { needLoginPage: l2, notNeedLoginPage: h2 } = function(e2 = []) {
  55467. const t3 = [], n3 = [];
  55468. return e2.forEach((e3) => {
  55469. const { root: s3, pages: r3 = [] } = e3, { needLoginPage: i3, notNeedLoginPage: o3 } = ls(r3, s3);
  55470. t3.push(...i3), n3.push(...o3);
  55471. }), { needLoginPage: t3, notNeedLoginPage: n3 };
  55472. }(n2);
  55473. return { loginPage: i2, routerNeedLogin: o2, resToLogin: a2, needLoginPage: [...c2, ...l2], notNeedLoginPage: [...u2, ...h2], loginPageInTabBar: fs(i2, r2) };
  55474. }();
  55475. if (ws.indexOf(ms) > -1)
  55476. throw new Error(`Login page [${ms}] should not be "needLogin", please check your pages.json`);
  55477. function Ss(e2) {
  55478. const t2 = ps();
  55479. if ("/" === e2.charAt(0))
  55480. return e2;
  55481. const [n2, s2] = e2.split("?"), r2 = n2.replace(/^\//, "").split("/"), i2 = t2.split("/");
  55482. i2.pop();
  55483. for (let e3 = 0; e3 < r2.length; e3++) {
  55484. const t3 = r2[e3];
  55485. ".." === t3 ? i2.pop() : "." !== t3 && i2.push(t3);
  55486. }
  55487. return "" === i2[0] && i2.shift(), "/" + i2.join("/") + (s2 ? "?" + s2 : "");
  55488. }
  55489. function bs(e2) {
  55490. const t2 = hs(Ss(e2));
  55491. return !(vs.indexOf(t2) > -1) && (ws.indexOf(t2) > -1 || ys.some((t3) => function(e3, t4) {
  55492. return new RegExp(t4).test(e3);
  55493. }(e2, t3)));
  55494. }
  55495. function ks({ redirect: e2 }) {
  55496. const t2 = hs(e2), n2 = hs(ms);
  55497. return ps() !== n2 && t2 !== n2;
  55498. }
  55499. function As({ api: e2, redirect: t2 } = {}) {
  55500. if (!t2 || !ks({ redirect: t2 }))
  55501. return;
  55502. const n2 = function(e3, t3) {
  55503. return "/" !== e3.charAt(0) && (e3 = "/" + e3), t3 ? e3.indexOf("?") > -1 ? e3 + `&uniIdRedirectUrl=${encodeURIComponent(t3)}` : e3 + `?uniIdRedirectUrl=${encodeURIComponent(t3)}` : e3;
  55504. }(ms, t2);
  55505. Is ? "navigateTo" !== e2 && "redirectTo" !== e2 || (e2 = "switchTab") : "switchTab" === e2 && (e2 = "navigateTo");
  55506. const s2 = { navigateTo: uni.navigateTo, redirectTo: uni.redirectTo, switchTab: uni.switchTab, reLaunch: uni.reLaunch };
  55507. setTimeout(() => {
  55508. s2[e2]({ url: n2 });
  55509. }, 0);
  55510. }
  55511. function Cs({ url: e2 } = {}) {
  55512. const t2 = { abortLoginPageJump: false, autoToLoginPage: false }, n2 = function() {
  55513. const { token: e3, tokenExpired: t3 } = re();
  55514. let n3;
  55515. if (e3) {
  55516. if (t3 < Date.now()) {
  55517. const e4 = "uni-id-token-expired";
  55518. n3 = { errCode: e4, errMsg: cs[e4] };
  55519. }
  55520. } else {
  55521. const e4 = "uni-id-check-token-failed";
  55522. n3 = { errCode: e4, errMsg: cs[e4] };
  55523. }
  55524. return n3;
  55525. }();
  55526. if (bs(e2) && n2) {
  55527. n2.uniIdRedirectUrl = e2;
  55528. if (z($).length > 0)
  55529. return setTimeout(() => {
  55530. Y($, n2);
  55531. }, 0), t2.abortLoginPageJump = true, t2;
  55532. t2.autoToLoginPage = true;
  55533. }
  55534. return t2;
  55535. }
  55536. function Ps() {
  55537. !function() {
  55538. const e3 = ds(), { abortLoginPageJump: t2, autoToLoginPage: n2 } = Cs({ url: e3 });
  55539. t2 || n2 && As({ api: "redirectTo", redirect: e3 });
  55540. }();
  55541. const e2 = ["navigateTo", "redirectTo", "reLaunch", "switchTab"];
  55542. for (let t2 = 0; t2 < e2.length; t2++) {
  55543. const n2 = e2[t2];
  55544. uni.addInterceptor(n2, { invoke(e3) {
  55545. const { abortLoginPageJump: t3, autoToLoginPage: s2 } = Cs({ url: e3.url });
  55546. return t3 ? e3 : s2 ? (As({ api: n2, redirect: Ss(e3.url) }), false) : e3;
  55547. } });
  55548. }
  55549. }
  55550. function Ts() {
  55551. this.onResponse((e2) => {
  55552. const { type: t2, content: n2 } = e2;
  55553. let s2 = false;
  55554. switch (t2) {
  55555. case "cloudobject":
  55556. s2 = function(e3) {
  55557. if ("object" != typeof e3)
  55558. return false;
  55559. const { errCode: t3 } = e3 || {};
  55560. return t3 in cs;
  55561. }(n2);
  55562. break;
  55563. case "clientdb":
  55564. s2 = function(e3) {
  55565. if ("object" != typeof e3)
  55566. return false;
  55567. const { errCode: t3 } = e3 || {};
  55568. return t3 in as;
  55569. }(n2);
  55570. }
  55571. s2 && function(e3 = {}) {
  55572. const t3 = z($);
  55573. Z().then(() => {
  55574. const n3 = ds();
  55575. if (n3 && ks({ redirect: n3 }))
  55576. return t3.length > 0 ? Y($, Object.assign({ uniIdRedirectUrl: n3 }, e3)) : void (ms && As({ api: "navigateTo", redirect: n3 }));
  55577. });
  55578. }(n2);
  55579. });
  55580. }
  55581. function xs(e2) {
  55582. !function(e3) {
  55583. e3.onResponse = function(e4) {
  55584. V(j, e4);
  55585. }, e3.offResponse = function(e4) {
  55586. G(j, e4);
  55587. };
  55588. }(e2), function(e3) {
  55589. e3.onNeedLogin = function(e4) {
  55590. V($, e4);
  55591. }, e3.offNeedLogin = function(e4) {
  55592. G($, e4);
  55593. }, gs && (L("_globalUniCloudStatus").needLoginInit || (L("_globalUniCloudStatus").needLoginInit = true, Z().then(() => {
  55594. Ps.call(e3);
  55595. }), _s && Ts.call(e3)));
  55596. }(e2), function(e3) {
  55597. e3.onRefreshToken = function(e4) {
  55598. V(B, e4);
  55599. }, e3.offRefreshToken = function(e4) {
  55600. G(B, e4);
  55601. };
  55602. }(e2);
  55603. }
  55604. let Os;
  55605. const Es = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", Ls = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  55606. function Rs() {
  55607. const e2 = re().token || "", t2 = e2.split(".");
  55608. if (!e2 || 3 !== t2.length)
  55609. return { uid: null, role: [], permission: [], tokenExpired: 0 };
  55610. let n2;
  55611. try {
  55612. n2 = JSON.parse((s2 = t2[1], decodeURIComponent(Os(s2).split("").map(function(e3) {
  55613. return "%" + ("00" + e3.charCodeAt(0).toString(16)).slice(-2);
  55614. }).join(""))));
  55615. } catch (e3) {
  55616. throw new Error("获取当前用户信息出错,详细错误信息为:" + e3.message);
  55617. }
  55618. var s2;
  55619. return n2.tokenExpired = 1e3 * n2.exp, delete n2.exp, delete n2.iat, n2;
  55620. }
  55621. Os = "function" != typeof atob ? function(e2) {
  55622. if (e2 = String(e2).replace(/[\t\n\f\r ]+/g, ""), !Ls.test(e2))
  55623. throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  55624. var t2;
  55625. e2 += "==".slice(2 - (3 & e2.length));
  55626. for (var n2, s2, r2 = "", i2 = 0; i2 < e2.length; )
  55627. t2 = Es.indexOf(e2.charAt(i2++)) << 18 | Es.indexOf(e2.charAt(i2++)) << 12 | (n2 = Es.indexOf(e2.charAt(i2++))) << 6 | (s2 = Es.indexOf(e2.charAt(i2++))), r2 += 64 === n2 ? String.fromCharCode(t2 >> 16 & 255) : 64 === s2 ? String.fromCharCode(t2 >> 16 & 255, t2 >> 8 & 255) : String.fromCharCode(t2 >> 16 & 255, t2 >> 8 & 255, 255 & t2);
  55628. return r2;
  55629. } : atob;
  55630. var Us = n(function(e2, t2) {
  55631. Object.defineProperty(t2, "__esModule", { value: true });
  55632. const n2 = "chooseAndUploadFile:ok", s2 = "chooseAndUploadFile:fail";
  55633. function r2(e3, t3) {
  55634. return e3.tempFiles.forEach((e4, n3) => {
  55635. e4.name || (e4.name = e4.path.substring(e4.path.lastIndexOf("/") + 1)), t3 && (e4.fileType = t3), e4.cloudPath = Date.now() + "_" + n3 + e4.name.substring(e4.name.lastIndexOf("."));
  55636. }), e3.tempFilePaths || (e3.tempFilePaths = e3.tempFiles.map((e4) => e4.path)), e3;
  55637. }
  55638. function i2(e3, t3, { onChooseFile: s3, onUploadProgress: r3 }) {
  55639. return t3.then((e4) => {
  55640. if (s3) {
  55641. const t4 = s3(e4);
  55642. if (void 0 !== t4)
  55643. return Promise.resolve(t4).then((t5) => void 0 === t5 ? e4 : t5);
  55644. }
  55645. return e4;
  55646. }).then((t4) => false === t4 ? { errMsg: n2, tempFilePaths: [], tempFiles: [] } : function(e4, t5, s4 = 5, r4) {
  55647. (t5 = Object.assign({}, t5)).errMsg = n2;
  55648. const i3 = t5.tempFiles, o2 = i3.length;
  55649. let a2 = 0;
  55650. return new Promise((n3) => {
  55651. for (; a2 < s4; )
  55652. c2();
  55653. function c2() {
  55654. const s5 = a2++;
  55655. if (s5 >= o2)
  55656. return void (!i3.find((e5) => !e5.url && !e5.errMsg) && n3(t5));
  55657. const u2 = i3[s5];
  55658. e4.uploadFile({ provider: u2.provider, filePath: u2.path, cloudPath: u2.cloudPath, fileType: u2.fileType, cloudPathAsRealPath: u2.cloudPathAsRealPath, onUploadProgress(e5) {
  55659. e5.index = s5, e5.tempFile = u2, e5.tempFilePath = u2.path, r4 && r4(e5);
  55660. } }).then((e5) => {
  55661. u2.url = e5.fileID, s5 < o2 && c2();
  55662. }).catch((e5) => {
  55663. u2.errMsg = e5.errMsg || e5.message, s5 < o2 && c2();
  55664. });
  55665. }
  55666. });
  55667. }(e3, t4, 5, r3));
  55668. }
  55669. t2.initChooseAndUploadFile = function(e3) {
  55670. return function(t3 = { type: "all" }) {
  55671. return "image" === t3.type ? i2(e3, function(e4) {
  55672. const { count: t4, sizeType: n3, sourceType: i3 = ["album", "camera"], extension: o2 } = e4;
  55673. return new Promise((e5, a2) => {
  55674. uni.chooseImage({ count: t4, sizeType: n3, sourceType: i3, extension: o2, success(t5) {
  55675. e5(r2(t5, "image"));
  55676. }, fail(e6) {
  55677. a2({ errMsg: e6.errMsg.replace("chooseImage:fail", s2) });
  55678. } });
  55679. });
  55680. }(t3), t3) : "video" === t3.type ? i2(e3, function(e4) {
  55681. const { camera: t4, compressed: n3, maxDuration: i3, sourceType: o2 = ["album", "camera"], extension: a2 } = e4;
  55682. return new Promise((e5, c2) => {
  55683. uni.chooseVideo({ camera: t4, compressed: n3, maxDuration: i3, sourceType: o2, extension: a2, success(t5) {
  55684. const { tempFilePath: n4, duration: s3, size: i4, height: o3, width: a3 } = t5;
  55685. e5(r2({ errMsg: "chooseVideo:ok", tempFilePaths: [n4], tempFiles: [{ name: t5.tempFile && t5.tempFile.name || "", path: n4, size: i4, type: t5.tempFile && t5.tempFile.type || "", width: a3, height: o3, duration: s3, fileType: "video", cloudPath: "" }] }, "video"));
  55686. }, fail(e6) {
  55687. c2({ errMsg: e6.errMsg.replace("chooseVideo:fail", s2) });
  55688. } });
  55689. });
  55690. }(t3), t3) : i2(e3, function(e4) {
  55691. const { count: t4, extension: n3 } = e4;
  55692. return new Promise((e5, i3) => {
  55693. let o2 = uni.chooseFile;
  55694. if ("undefined" != typeof wx && "function" == typeof wx.chooseMessageFile && (o2 = wx.chooseMessageFile), "function" != typeof o2)
  55695. return i3({ errMsg: s2 + " 请指定 type 类型,该平台仅支持选择 image 或 video。" });
  55696. o2({ type: "all", count: t4, extension: n3, success(t5) {
  55697. e5(r2(t5));
  55698. }, fail(e6) {
  55699. i3({ errMsg: e6.errMsg.replace("chooseFile:fail", s2) });
  55700. } });
  55701. });
  55702. }(t3), t3);
  55703. };
  55704. };
  55705. }), Ns = t$3(Us);
  55706. const Ds = "manual";
  55707. function Ms(e2) {
  55708. return { props: { localdata: { type: Array, default: () => [] }, options: { type: [Object, Array], default: () => ({}) }, spaceInfo: { type: Object, default: () => ({}) }, collection: { type: [String, Array], default: "" }, action: { type: String, default: "" }, field: { type: String, default: "" }, orderby: { type: String, default: "" }, where: { type: [String, Object], default: "" }, pageData: { type: String, default: "add" }, pageCurrent: { type: Number, default: 1 }, pageSize: { type: Number, default: 20 }, getcount: { type: [Boolean, String], default: false }, gettree: { type: [Boolean, String], default: false }, gettreepath: { type: [Boolean, String], default: false }, startwith: { type: String, default: "" }, limitlevel: { type: Number, default: 10 }, groupby: { type: String, default: "" }, groupField: { type: String, default: "" }, distinct: { type: [Boolean, String], default: false }, foreignKey: { type: String, default: "" }, loadtime: { type: String, default: "auto" }, manual: { type: Boolean, default: false } }, data: () => ({ mixinDatacomLoading: false, mixinDatacomHasMore: false, mixinDatacomResData: [], mixinDatacomErrorMessage: "", mixinDatacomPage: {}, mixinDatacomError: null }), created() {
  55709. this.mixinDatacomPage = { current: this.pageCurrent, size: this.pageSize, count: 0 }, this.$watch(() => {
  55710. var e3 = [];
  55711. return ["pageCurrent", "pageSize", "localdata", "collection", "action", "field", "orderby", "where", "getont", "getcount", "gettree", "groupby", "groupField", "distinct"].forEach((t2) => {
  55712. e3.push(this[t2]);
  55713. }), e3;
  55714. }, (e3, t2) => {
  55715. if (this.loadtime === Ds)
  55716. return;
  55717. let n2 = false;
  55718. const s2 = [];
  55719. for (let r2 = 2; r2 < e3.length; r2++)
  55720. e3[r2] !== t2[r2] && (s2.push(e3[r2]), n2 = true);
  55721. e3[0] !== t2[0] && (this.mixinDatacomPage.current = this.pageCurrent), this.mixinDatacomPage.size = this.pageSize, this.onMixinDatacomPropsChange(n2, s2);
  55722. });
  55723. }, methods: { onMixinDatacomPropsChange(e3, t2) {
  55724. }, mixinDatacomEasyGet({ getone: e3 = false, success: t2, fail: n2 } = {}) {
  55725. this.mixinDatacomLoading || (this.mixinDatacomLoading = true, this.mixinDatacomErrorMessage = "", this.mixinDatacomError = null, this.mixinDatacomGet().then((n3) => {
  55726. this.mixinDatacomLoading = false;
  55727. const { data: s2, count: r2 } = n3.result;
  55728. this.getcount && (this.mixinDatacomPage.count = r2), this.mixinDatacomHasMore = s2.length < this.pageSize;
  55729. const i2 = e3 ? s2.length ? s2[0] : void 0 : s2;
  55730. this.mixinDatacomResData = i2, t2 && t2(i2);
  55731. }).catch((e4) => {
  55732. this.mixinDatacomLoading = false, this.mixinDatacomErrorMessage = e4, this.mixinDatacomError = e4, n2 && n2(e4);
  55733. }));
  55734. }, mixinDatacomGet(t2 = {}) {
  55735. let n2;
  55736. t2 = t2 || {}, n2 = "undefined" != typeof __uniX && __uniX ? e2.databaseForJQL(this.spaceInfo) : e2.database(this.spaceInfo);
  55737. const s2 = t2.action || this.action;
  55738. s2 && (n2 = n2.action(s2));
  55739. const r2 = t2.collection || this.collection;
  55740. n2 = Array.isArray(r2) ? n2.collection(...r2) : n2.collection(r2);
  55741. const i2 = t2.where || this.where;
  55742. i2 && Object.keys(i2).length && (n2 = n2.where(i2));
  55743. const o2 = t2.field || this.field;
  55744. o2 && (n2 = n2.field(o2));
  55745. const a2 = t2.foreignKey || this.foreignKey;
  55746. a2 && (n2 = n2.foreignKey(a2));
  55747. const c2 = t2.groupby || this.groupby;
  55748. c2 && (n2 = n2.groupBy(c2));
  55749. const u2 = t2.groupField || this.groupField;
  55750. u2 && (n2 = n2.groupField(u2));
  55751. true === (void 0 !== t2.distinct ? t2.distinct : this.distinct) && (n2 = n2.distinct());
  55752. const l2 = t2.orderby || this.orderby;
  55753. l2 && (n2 = n2.orderBy(l2));
  55754. const h2 = void 0 !== t2.pageCurrent ? t2.pageCurrent : this.mixinDatacomPage.current, d2 = void 0 !== t2.pageSize ? t2.pageSize : this.mixinDatacomPage.size, p2 = void 0 !== t2.getcount ? t2.getcount : this.getcount, f2 = void 0 !== t2.gettree ? t2.gettree : this.gettree, g2 = void 0 !== t2.gettreepath ? t2.gettreepath : this.gettreepath, m2 = { getCount: p2 }, y2 = { limitLevel: void 0 !== t2.limitlevel ? t2.limitlevel : this.limitlevel, startWith: void 0 !== t2.startwith ? t2.startwith : this.startwith };
  55755. return f2 && (m2.getTree = y2), g2 && (m2.getTreePath = y2), n2 = n2.skip(d2 * (h2 - 1)).limit(d2).get(m2), n2;
  55756. } } };
  55757. }
  55758. function qs(e2) {
  55759. return function(t2, n2 = {}) {
  55760. n2 = function(e3, t3 = {}) {
  55761. return e3.customUI = t3.customUI || e3.customUI, e3.parseSystemError = t3.parseSystemError || e3.parseSystemError, Object.assign(e3.loadingOptions, t3.loadingOptions), Object.assign(e3.errorOptions, t3.errorOptions), "object" == typeof t3.secretMethods && (e3.secretMethods = t3.secretMethods), e3;
  55762. }({ customUI: false, loadingOptions: { title: "加载中...", mask: true }, errorOptions: { type: "modal", retry: false } }, n2);
  55763. const { customUI: s2, loadingOptions: r2, errorOptions: i2, parseSystemError: o2 } = n2, a2 = !s2;
  55764. return new Proxy({}, { get(s3, c2) {
  55765. switch (c2) {
  55766. case "toString":
  55767. return "[object UniCloudObject]";
  55768. case "toJSON":
  55769. return {};
  55770. }
  55771. return function({ fn: e3, interceptorName: t3, getCallbackArgs: n3 } = {}) {
  55772. return async function(...s4) {
  55773. const r3 = n3 ? n3({ params: s4 }) : {};
  55774. let i3, o3;
  55775. try {
  55776. return await M(q(t3, "invoke"), { ...r3 }), i3 = await e3(...s4), await M(q(t3, "success"), { ...r3, result: i3 }), i3;
  55777. } catch (e4) {
  55778. throw o3 = e4, await M(q(t3, "fail"), { ...r3, error: o3 }), o3;
  55779. } finally {
  55780. await M(q(t3, "complete"), o3 ? { ...r3, error: o3 } : { ...r3, result: i3 });
  55781. }
  55782. };
  55783. }({ fn: async function s4(...l2) {
  55784. let h2;
  55785. a2 && uni.showLoading({ title: r2.title, mask: r2.mask });
  55786. const d2 = { name: t2, type: u, data: { method: c2, params: l2 } };
  55787. "object" == typeof n2.secretMethods && function(e3, t3) {
  55788. const n3 = t3.data.method, s5 = e3.secretMethods || {}, r3 = s5[n3] || s5["*"];
  55789. r3 && (t3.secretType = r3);
  55790. }(n2, d2);
  55791. let p2 = false;
  55792. try {
  55793. h2 = await e2.callFunction(d2);
  55794. } catch (e3) {
  55795. p2 = true, h2 = { result: new te(e3) };
  55796. }
  55797. const { errSubject: f2, errCode: g2, errMsg: m2, newToken: y2 } = h2.result || {};
  55798. if (a2 && uni.hideLoading(), y2 && y2.token && y2.tokenExpired && (ie(y2), Y(B, { ...y2 })), g2) {
  55799. let e3 = m2;
  55800. if (p2 && o2) {
  55801. e3 = (await o2({ objectName: t2, methodName: c2, params: l2, errSubject: f2, errCode: g2, errMsg: m2 })).errMsg || m2;
  55802. }
  55803. if (a2)
  55804. if ("toast" === i2.type)
  55805. uni.showToast({ title: e3, icon: "none" });
  55806. else {
  55807. if ("modal" !== i2.type)
  55808. throw new Error(`Invalid errorOptions.type: ${i2.type}`);
  55809. {
  55810. const { confirm: t3 } = await async function({ title: e4, content: t4, showCancel: n4, cancelText: s5, confirmText: r3 } = {}) {
  55811. return new Promise((i3, o3) => {
  55812. uni.showModal({ title: e4, content: t4, showCancel: n4, cancelText: s5, confirmText: r3, success(e5) {
  55813. i3(e5);
  55814. }, fail() {
  55815. i3({ confirm: false, cancel: true });
  55816. } });
  55817. });
  55818. }({ title: "提示", content: e3, showCancel: i2.retry, cancelText: "取消", confirmText: i2.retry ? "重试" : "确定" });
  55819. if (i2.retry && t3)
  55820. return s4(...l2);
  55821. }
  55822. }
  55823. const n3 = new te({ subject: f2, code: g2, message: m2, requestId: h2.requestId });
  55824. throw n3.detail = h2.result, Y(j, { type: J, content: n3 }), n3;
  55825. }
  55826. return Y(j, { type: J, content: h2.result }), h2.result;
  55827. }, interceptorName: "callObject", getCallbackArgs: function({ params: e3 } = {}) {
  55828. return { objectName: t2, methodName: c2, params: e3 };
  55829. } });
  55830. } });
  55831. };
  55832. }
  55833. function Fs(e2) {
  55834. return L("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", e2.config.spaceId));
  55835. }
  55836. async function Ks({ openid: e2, callLoginByWeixin: t2 = false } = {}) {
  55837. Fs(this);
  55838. throw new Error(`[SecureNetwork] API \`initSecureNetworkByWeixin\` is not supported on platform \`${C}\``);
  55839. }
  55840. async function js(e2) {
  55841. const t2 = Fs(this);
  55842. return t2.initPromise || (t2.initPromise = Ks.call(this, e2).then((e3) => e3).catch((e3) => {
  55843. throw delete t2.initPromise, e3;
  55844. })), t2.initPromise;
  55845. }
  55846. function $s(e2) {
  55847. return function({ openid: t2, callLoginByWeixin: n2 = false } = {}) {
  55848. return js.call(e2, { openid: t2, callLoginByWeixin: n2 });
  55849. };
  55850. }
  55851. function Bs(e2) {
  55852. !function(e3) {
  55853. le = e3;
  55854. }(e2);
  55855. }
  55856. function Ws(e2) {
  55857. const t2 = { getSystemInfo: uni.getSystemInfo, getPushClientId: uni.getPushClientId };
  55858. return function(n2) {
  55859. return new Promise((s2, r2) => {
  55860. t2[e2]({ ...n2, success(e3) {
  55861. s2(e3);
  55862. }, fail(e3) {
  55863. r2(e3);
  55864. } });
  55865. });
  55866. };
  55867. }
  55868. class Hs extends class {
  55869. constructor() {
  55870. this._callback = {};
  55871. }
  55872. addListener(e2, t2) {
  55873. this._callback[e2] || (this._callback[e2] = []), this._callback[e2].push(t2);
  55874. }
  55875. on(e2, t2) {
  55876. return this.addListener(e2, t2);
  55877. }
  55878. removeListener(e2, t2) {
  55879. if (!t2)
  55880. throw new Error('The "listener" argument must be of type function. Received undefined');
  55881. const n2 = this._callback[e2];
  55882. if (!n2)
  55883. return;
  55884. const s2 = function(e3, t3) {
  55885. for (let n3 = e3.length - 1; n3 >= 0; n3--)
  55886. if (e3[n3] === t3)
  55887. return n3;
  55888. return -1;
  55889. }(n2, t2);
  55890. n2.splice(s2, 1);
  55891. }
  55892. off(e2, t2) {
  55893. return this.removeListener(e2, t2);
  55894. }
  55895. removeAllListener(e2) {
  55896. delete this._callback[e2];
  55897. }
  55898. emit(e2, ...t2) {
  55899. const n2 = this._callback[e2];
  55900. if (n2)
  55901. for (let e3 = 0; e3 < n2.length; e3++)
  55902. n2[e3](...t2);
  55903. }
  55904. } {
  55905. constructor() {
  55906. super(), this._uniPushMessageCallback = this._receivePushMessage.bind(this), this._currentMessageId = -1, this._payloadQueue = [];
  55907. }
  55908. init() {
  55909. return Promise.all([Ws("getSystemInfo")(), Ws("getPushClientId")()]).then(([{ appId: e2 } = {}, { cid: t2 } = {}] = []) => {
  55910. if (!e2)
  55911. throw new Error("Invalid appId, please check the manifest.json file");
  55912. if (!t2)
  55913. throw new Error("Invalid push client id");
  55914. this._appId = e2, this._pushClientId = t2, this._seqId = Date.now() + "-" + Math.floor(9e5 * Math.random() + 1e5), this.emit("open"), this._initMessageListener();
  55915. }, (e2) => {
  55916. throw this.emit("error", e2), this.close(), e2;
  55917. });
  55918. }
  55919. async open() {
  55920. return this.init();
  55921. }
  55922. _isUniCloudSSE(e2) {
  55923. if ("receive" !== e2.type)
  55924. return false;
  55925. const t2 = e2 && e2.data && e2.data.payload;
  55926. return !(!t2 || "UNI_CLOUD_SSE" !== t2.channel || t2.seqId !== this._seqId);
  55927. }
  55928. _receivePushMessage(e2) {
  55929. if (!this._isUniCloudSSE(e2))
  55930. return;
  55931. const t2 = e2 && e2.data && e2.data.payload, { action: n2, messageId: s2, message: r2 } = t2;
  55932. this._payloadQueue.push({ action: n2, messageId: s2, message: r2 }), this._consumMessage();
  55933. }
  55934. _consumMessage() {
  55935. for (; ; ) {
  55936. const e2 = this._payloadQueue.find((e3) => e3.messageId === this._currentMessageId + 1);
  55937. if (!e2)
  55938. break;
  55939. this._currentMessageId++, this._parseMessagePayload(e2);
  55940. }
  55941. }
  55942. _parseMessagePayload(e2) {
  55943. const { action: t2, messageId: n2, message: s2 } = e2;
  55944. "end" === t2 ? this._end({ messageId: n2, message: s2 }) : "message" === t2 && this._appendMessage({ messageId: n2, message: s2 });
  55945. }
  55946. _appendMessage({ messageId: e2, message: t2 } = {}) {
  55947. this.emit("message", t2);
  55948. }
  55949. _end({ messageId: e2, message: t2 } = {}) {
  55950. this.emit("end", t2), this.close();
  55951. }
  55952. _initMessageListener() {
  55953. uni.onPushMessage(this._uniPushMessageCallback);
  55954. }
  55955. _destroy() {
  55956. uni.offPushMessage(this._uniPushMessageCallback);
  55957. }
  55958. toJSON() {
  55959. return { appId: this._appId, pushClientId: this._pushClientId, seqId: this._seqId };
  55960. }
  55961. close() {
  55962. this._destroy(), this.emit("close");
  55963. }
  55964. }
  55965. async function Js(e2) {
  55966. {
  55967. const { osName: e3, osVersion: t3 } = ce();
  55968. "ios" === e3 && function(e4) {
  55969. if (!e4 || "string" != typeof e4)
  55970. return 0;
  55971. const t4 = e4.match(/^(\d+)./);
  55972. return t4 && t4[1] ? parseInt(t4[1]) : 0;
  55973. }(t3) >= 14 && console.warn("iOS 14及以上版本连接uniCloud本地调试服务需要允许客户端查找并连接到本地网络上的设备(仅开发期间需要,发行后不需要)");
  55974. }
  55975. const t2 = e2.__dev__;
  55976. if (!t2.debugInfo)
  55977. return;
  55978. const { address: n2, servePort: s2 } = t2.debugInfo, { address: r2 } = await At(n2, s2);
  55979. if (r2)
  55980. return t2.localAddress = r2, void (t2.localPort = s2);
  55981. const i2 = console["error"];
  55982. let o2 = "";
  55983. if ("remote" === t2.debugInfo.initialLaunchType ? (t2.debugInfo.forceRemote = true, o2 = "当前客户端和HBuilderX不在同一局域网下(或其他网络原因无法连接HBuilderX),uniCloud本地调试服务不对当前客户端生效。\n- 如果不使用uniCloud本地调试服务,请直接忽略此信息。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。") : o2 = "无法连接uniCloud本地调试服务,请检查当前客户端是否与主机在同一局域网下。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。", o2 += "\n- 如果在HBuilderX开启的状态下切换过网络环境,请重启HBuilderX后再试\n- 检查系统防火墙是否拦截了HBuilderX自带的nodejs\n- 检查是否错误的使用拦截器修改uni.request方法的参数", 0 === C.indexOf("mp-") && (o2 += "\n- 小程序中如何使用uniCloud,请参考:https://uniapp.dcloud.net.cn/uniCloud/publish.html#useinmp"), !t2.debugInfo.forceRemote)
  55984. throw new Error(o2);
  55985. i2(o2);
  55986. }
  55987. function zs(e2) {
  55988. e2._initPromiseHub || (e2._initPromiseHub = new v({ createPromise: function() {
  55989. let t2 = Promise.resolve();
  55990. var n2;
  55991. n2 = 1, t2 = new Promise((e3) => {
  55992. setTimeout(() => {
  55993. e3();
  55994. }, n2);
  55995. });
  55996. const s2 = e2.auth();
  55997. return t2.then(() => s2.getLoginState()).then((e3) => e3 ? Promise.resolve() : s2.signInAnonymously());
  55998. } }));
  55999. }
  56000. const Vs = { tcb: bt, tencent: bt, aliyun: fe, private: Tt, dcloud: Tt, alipay: qt };
  56001. let Gs = new class {
  56002. init(e2) {
  56003. let t2 = {};
  56004. const n2 = Vs[e2.provider];
  56005. if (!n2)
  56006. throw new Error("未提供正确的provider参数");
  56007. t2 = n2.init(e2), function(e3) {
  56008. const t3 = {};
  56009. e3.__dev__ = t3, t3.debugLog = "app" === C;
  56010. const n3 = P;
  56011. n3 && !n3.code && (t3.debugInfo = n3);
  56012. const s2 = new v({ createPromise: function() {
  56013. return Js(e3);
  56014. } });
  56015. t3.initLocalNetwork = function() {
  56016. return s2.exec();
  56017. };
  56018. }(t2), zs(t2), Jn(t2), function(e3) {
  56019. const t3 = e3.uploadFile;
  56020. e3.uploadFile = function(e4) {
  56021. return t3.call(this, e4);
  56022. };
  56023. }(t2), function(e3) {
  56024. e3.database = function(t3) {
  56025. if (t3 && Object.keys(t3).length > 0)
  56026. return e3.init(t3).database();
  56027. if (this._database)
  56028. return this._database;
  56029. const n3 = ss(rs, { uniClient: e3 });
  56030. return this._database = n3, n3;
  56031. }, e3.databaseForJQL = function(t3) {
  56032. if (t3 && Object.keys(t3).length > 0)
  56033. return e3.init(t3).databaseForJQL();
  56034. if (this._databaseForJQL)
  56035. return this._databaseForJQL;
  56036. const n3 = ss(rs, { uniClient: e3, isJQL: true });
  56037. return this._databaseForJQL = n3, n3;
  56038. };
  56039. }(t2), function(e3) {
  56040. e3.getCurrentUserInfo = Rs, e3.chooseAndUploadFile = Ns.initChooseAndUploadFile(e3), Object.assign(e3, { get mixinDatacom() {
  56041. return Ms(e3);
  56042. } }), e3.SSEChannel = Hs, e3.initSecureNetworkByWeixin = $s(e3), e3.setCustomClientInfo = Bs, e3.importObject = qs(e3);
  56043. }(t2);
  56044. return ["callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "chooseAndUploadFile"].forEach((e3) => {
  56045. if (!t2[e3])
  56046. return;
  56047. const n3 = t2[e3];
  56048. t2[e3] = function() {
  56049. return n3.apply(t2, Array.from(arguments));
  56050. }, t2[e3] = (/* @__PURE__ */ function(e4, t3) {
  56051. return function(n4) {
  56052. let s2 = false;
  56053. if ("callFunction" === t3) {
  56054. const e5 = n4 && n4.type || c;
  56055. s2 = e5 !== c;
  56056. }
  56057. const r2 = "callFunction" === t3 && !s2, i2 = this._initPromiseHub.exec();
  56058. n4 = n4 || {};
  56059. const { success: o2, fail: a2, complete: u2 } = ee(n4), l2 = i2.then(() => s2 ? Promise.resolve() : M(q(t3, "invoke"), n4)).then(() => e4.call(this, n4)).then((e5) => s2 ? Promise.resolve(e5) : M(q(t3, "success"), e5).then(() => M(q(t3, "complete"), e5)).then(() => (r2 && Y(j, { type: H, content: e5 }), Promise.resolve(e5))), (e5) => s2 ? Promise.reject(e5) : M(q(t3, "fail"), e5).then(() => M(q(t3, "complete"), e5)).then(() => (Y(j, { type: H, content: e5 }), Promise.reject(e5))));
  56060. if (!(o2 || a2 || u2))
  56061. return l2;
  56062. l2.then((e5) => {
  56063. o2 && o2(e5), u2 && u2(e5), r2 && Y(j, { type: H, content: e5 });
  56064. }, (e5) => {
  56065. a2 && a2(e5), u2 && u2(e5), r2 && Y(j, { type: H, content: e5 });
  56066. });
  56067. };
  56068. }(t2[e3], e3)).bind(t2);
  56069. }), t2.init = this.init, t2;
  56070. }
  56071. }();
  56072. (() => {
  56073. const e2 = T;
  56074. let t2 = {};
  56075. if (e2 && 1 === e2.length)
  56076. t2 = e2[0], Gs = Gs.init(t2), Gs._isDefault = true;
  56077. else {
  56078. const t3 = ["auth", "callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "database", "getCurrentUSerInfo", "importObject"];
  56079. let n2;
  56080. n2 = e2 && e2.length > 0 ? "应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间" : "应用未关联服务空间,请在uniCloud目录右键关联服务空间", t3.forEach((e3) => {
  56081. Gs[e3] = function() {
  56082. return console.error(n2), Promise.reject(new te({ code: "SYS_ERR", message: n2 }));
  56083. };
  56084. });
  56085. }
  56086. Object.assign(Gs, { get mixinDatacom() {
  56087. return Ms(Gs);
  56088. } }), xs(Gs), Gs.addInterceptor = N, Gs.removeInterceptor = D, Gs.interceptObject = F;
  56089. })();
  56090. var Ys = Gs;
  56091. const ERR_MSG_OK = "chooseAndUploadFile:ok";
  56092. const ERR_MSG_FAIL = "chooseAndUploadFile:fail";
  56093. function chooseImage(opts) {
  56094. const {
  56095. count,
  56096. sizeType = ["original", "compressed"],
  56097. sourceType = ["album", "camera"],
  56098. extension
  56099. } = opts;
  56100. return new Promise((resolve, reject) => {
  56101. uni.chooseImage({
  56102. count,
  56103. sizeType,
  56104. sourceType,
  56105. extension,
  56106. success(res) {
  56107. resolve(normalizeChooseAndUploadFileRes(res, "image"));
  56108. },
  56109. fail(res) {
  56110. reject({
  56111. errMsg: res.errMsg.replace("chooseImage:fail", ERR_MSG_FAIL)
  56112. });
  56113. }
  56114. });
  56115. });
  56116. }
  56117. function chooseVideo(opts) {
  56118. const { camera, compressed, maxDuration, sourceType = ["album", "camera"], extension } = opts;
  56119. return new Promise((resolve, reject) => {
  56120. uni.chooseVideo({
  56121. camera,
  56122. compressed,
  56123. maxDuration,
  56124. sourceType,
  56125. extension,
  56126. success(res) {
  56127. const { tempFilePath, duration: duration2, size, height, width } = res;
  56128. resolve(
  56129. normalizeChooseAndUploadFileRes(
  56130. {
  56131. errMsg: "chooseVideo:ok",
  56132. tempFilePaths: [tempFilePath],
  56133. tempFiles: [
  56134. {
  56135. name: res.tempFile && res.tempFile.name || "",
  56136. path: tempFilePath,
  56137. size,
  56138. type: res.tempFile && res.tempFile.type || "",
  56139. width,
  56140. height,
  56141. duration: duration2,
  56142. fileType: "video",
  56143. cloudPath: ""
  56144. }
  56145. ]
  56146. },
  56147. "video"
  56148. )
  56149. );
  56150. },
  56151. fail(res) {
  56152. reject({
  56153. errMsg: res.errMsg.replace("chooseVideo:fail", ERR_MSG_FAIL)
  56154. });
  56155. }
  56156. });
  56157. });
  56158. }
  56159. function chooseAll(opts) {
  56160. const { count, extension } = opts;
  56161. return new Promise((resolve, reject) => {
  56162. let chooseFile = uni.chooseFile;
  56163. if (typeof wx !== "undefined" && typeof wx.chooseMessageFile === "function") {
  56164. chooseFile = wx.chooseMessageFile;
  56165. }
  56166. if (typeof chooseFile !== "function") {
  56167. return reject({
  56168. errMsg: ERR_MSG_FAIL + " 请指定 type 类型,该平台仅支持选择 image 或 video。"
  56169. });
  56170. }
  56171. chooseFile({
  56172. type: "all",
  56173. count,
  56174. extension,
  56175. success(res) {
  56176. resolve(normalizeChooseAndUploadFileRes(res));
  56177. },
  56178. fail(res) {
  56179. reject({
  56180. errMsg: res.errMsg.replace("chooseFile:fail", ERR_MSG_FAIL)
  56181. });
  56182. }
  56183. });
  56184. });
  56185. }
  56186. function normalizeChooseAndUploadFileRes(res, fileType) {
  56187. res.tempFiles.forEach((item, index2) => {
  56188. if (!item.name) {
  56189. item.name = item.path.substring(item.path.lastIndexOf("/") + 1);
  56190. }
  56191. if (fileType) {
  56192. item.fileType = fileType;
  56193. }
  56194. item.cloudPath = Date.now() + "_" + index2 + item.name.substring(item.name.lastIndexOf("."));
  56195. });
  56196. if (!res.tempFilePaths) {
  56197. res.tempFilePaths = res.tempFiles.map((file) => file.path);
  56198. }
  56199. return res;
  56200. }
  56201. function uploadCloudFiles(files2, max = 5, onUploadProgress) {
  56202. files2 = JSON.parse(JSON.stringify(files2));
  56203. const len = files2.length;
  56204. let count = 0;
  56205. let self2 = this;
  56206. return new Promise((resolve) => {
  56207. while (count < max) {
  56208. next();
  56209. }
  56210. function next() {
  56211. let cur = count++;
  56212. if (cur >= len) {
  56213. !files2.find((item) => !item.url && !item.errMsg) && resolve(files2);
  56214. return;
  56215. }
  56216. const fileItem = files2[cur];
  56217. const index2 = self2.files.findIndex((v2) => v2.uuid === fileItem.uuid);
  56218. fileItem.url = "";
  56219. delete fileItem.errMsg;
  56220. Ys.uploadFile({
  56221. filePath: fileItem.path,
  56222. cloudPath: fileItem.cloudPath,
  56223. fileType: fileItem.fileType,
  56224. onUploadProgress: (res) => {
  56225. res.index = index2;
  56226. onUploadProgress && onUploadProgress(res);
  56227. }
  56228. }).then((res) => {
  56229. fileItem.url = res.fileID;
  56230. fileItem.index = index2;
  56231. if (cur < len) {
  56232. next();
  56233. }
  56234. }).catch((res) => {
  56235. fileItem.errMsg = res.errMsg || res.message;
  56236. fileItem.index = index2;
  56237. if (cur < len) {
  56238. next();
  56239. }
  56240. });
  56241. }
  56242. });
  56243. }
  56244. function uploadFiles(choosePromise, { onChooseFile, onUploadProgress }) {
  56245. return choosePromise.then((res) => {
  56246. if (onChooseFile) {
  56247. const customChooseRes = onChooseFile(res);
  56248. if (typeof customChooseRes !== "undefined") {
  56249. return Promise.resolve(customChooseRes).then(
  56250. (chooseRes) => typeof chooseRes === "undefined" ? res : chooseRes
  56251. );
  56252. }
  56253. }
  56254. return res;
  56255. }).then((res) => {
  56256. if (res === false) {
  56257. return {
  56258. errMsg: ERR_MSG_OK,
  56259. tempFilePaths: [],
  56260. tempFiles: []
  56261. };
  56262. }
  56263. return res;
  56264. }).then(async (files2) => {
  56265. for (let file of files2.tempFiles) {
  56266. const { data } = await FileApi.uploadFile(file.path);
  56267. file.url = data;
  56268. }
  56269. return files2;
  56270. });
  56271. }
  56272. function chooseAndUploadFile(opts = {
  56273. type: "all"
  56274. }) {
  56275. if (opts.type === "image") {
  56276. return uploadFiles(chooseImage(opts), opts);
  56277. } else if (opts.type === "video") {
  56278. return uploadFiles(chooseVideo(opts), opts);
  56279. }
  56280. return uploadFiles(chooseAll(opts), opts);
  56281. }
  56282. const get_file_ext = (name2) => {
  56283. const last_len = name2.lastIndexOf(".");
  56284. const len = name2.length;
  56285. return {
  56286. name: name2.substring(0, last_len),
  56287. ext: name2.substring(last_len + 1, len)
  56288. };
  56289. };
  56290. const get_extname = (fileExtname) => {
  56291. if (!Array.isArray(fileExtname)) {
  56292. let extname = fileExtname.replace(/(\[|\])/g, "");
  56293. return extname.split(",");
  56294. } else {
  56295. return fileExtname;
  56296. }
  56297. };
  56298. const get_files_and_is_max = (res, _extname) => {
  56299. let filePaths = [];
  56300. let files2 = [];
  56301. if (!_extname || _extname.length === 0) {
  56302. return {
  56303. filePaths,
  56304. files: files2
  56305. };
  56306. }
  56307. res.tempFiles.forEach((v2) => {
  56308. let fileFullName = get_file_ext(v2.name);
  56309. const extname = fileFullName.ext.toLowerCase();
  56310. if (_extname.indexOf(extname) !== -1) {
  56311. files2.push(v2);
  56312. filePaths.push(v2.path);
  56313. }
  56314. });
  56315. if (files2.length !== res.tempFiles.length) {
  56316. uni.showToast({
  56317. title: `当前选择了${res.tempFiles.length}个文件 ,${res.tempFiles.length - files2.length} 个文件格式不正确`,
  56318. icon: "none",
  56319. duration: 5e3
  56320. });
  56321. }
  56322. return {
  56323. filePaths,
  56324. files: files2
  56325. };
  56326. };
  56327. const get_file_info = (filepath) => {
  56328. return new Promise((resolve, reject) => {
  56329. uni.getImageInfo({
  56330. src: filepath,
  56331. success(res) {
  56332. resolve(res);
  56333. },
  56334. fail(err) {
  56335. reject(err);
  56336. }
  56337. });
  56338. });
  56339. };
  56340. const get_file_data = async (files2, type = "image") => {
  56341. let fileFullName = get_file_ext(files2.name);
  56342. const extname = fileFullName.ext.toLowerCase();
  56343. let filedata = {
  56344. name: files2.name,
  56345. uuid: files2.uuid,
  56346. extname: extname || "",
  56347. cloudPath: files2.cloudPath,
  56348. fileType: files2.fileType,
  56349. url: files2.path || files2.path,
  56350. size: files2.size,
  56351. //单位是字节
  56352. image: {},
  56353. path: files2.path,
  56354. video: {}
  56355. };
  56356. if (type === "image") {
  56357. const imageinfo = await get_file_info(files2.path);
  56358. delete filedata.video;
  56359. filedata.image.width = imageinfo.width;
  56360. filedata.image.height = imageinfo.height;
  56361. filedata.image.location = imageinfo.path;
  56362. } else {
  56363. delete filedata.image;
  56364. }
  56365. return filedata;
  56366. };
  56367. const _sfc_main$1D = {
  56368. name: "uploadImage",
  56369. emits: ["uploadFiles", "choose", "delFile"],
  56370. props: {
  56371. filesList: {
  56372. type: [Array, String],
  56373. default() {
  56374. return [];
  56375. }
  56376. },
  56377. disabled: {
  56378. type: Boolean,
  56379. default: false
  56380. },
  56381. disablePreview: {
  56382. type: Boolean,
  56383. default: false
  56384. },
  56385. limit: {
  56386. type: [Number, String],
  56387. default: 9
  56388. },
  56389. imageStyles: {
  56390. type: Object,
  56391. default() {
  56392. return {
  56393. width: "auto",
  56394. height: "auto",
  56395. border: {}
  56396. };
  56397. }
  56398. },
  56399. delIcon: {
  56400. type: Boolean,
  56401. default: true
  56402. },
  56403. readonly: {
  56404. type: Boolean,
  56405. default: false
  56406. }
  56407. },
  56408. computed: {
  56409. list() {
  56410. if (typeof this.filesList === "string") {
  56411. if (this.filesList) {
  56412. return [this.filesList];
  56413. } else {
  56414. return [];
  56415. }
  56416. }
  56417. return this.filesList;
  56418. },
  56419. styles() {
  56420. let styles = {
  56421. width: "auto",
  56422. height: "auto",
  56423. border: {}
  56424. };
  56425. return Object.assign(styles, this.imageStyles);
  56426. },
  56427. boxStyle() {
  56428. const { width = "auto", height = "auto" } = this.styles;
  56429. let obj = {};
  56430. if (height === "auto") {
  56431. if (width !== "auto") {
  56432. obj.height = this.value2px(width);
  56433. obj["padding-top"] = 0;
  56434. } else {
  56435. obj.height = 0;
  56436. }
  56437. } else {
  56438. obj.height = this.value2px(height);
  56439. obj["padding-top"] = 0;
  56440. }
  56441. if (width === "auto") {
  56442. if (height !== "auto") {
  56443. obj.width = this.value2px(height);
  56444. } else {
  56445. obj.width = "33.3%";
  56446. }
  56447. } else {
  56448. obj.width = this.value2px(width);
  56449. }
  56450. let classles = "";
  56451. for (let i2 in obj) {
  56452. classles += `${i2}:${obj[i2]};`;
  56453. }
  56454. return classles;
  56455. },
  56456. borderStyle() {
  56457. let { border } = this.styles;
  56458. let obj = {};
  56459. const widthDefaultValue = 1;
  56460. const radiusDefaultValue = 3;
  56461. if (typeof border === "boolean") {
  56462. obj.border = border ? "1px #eee solid" : "none";
  56463. } else {
  56464. let width = border && border.width || widthDefaultValue;
  56465. width = this.value2px(width);
  56466. let radius = border && border.radius || radiusDefaultValue;
  56467. radius = this.value2px(radius);
  56468. obj = {
  56469. "border-width": width,
  56470. "border-style": border && border.style || "solid",
  56471. "border-color": border && border.color || "#eee",
  56472. "border-radius": radius
  56473. };
  56474. }
  56475. let classles = "";
  56476. for (let i2 in obj) {
  56477. classles += `${i2}:${obj[i2]};`;
  56478. }
  56479. return classles;
  56480. }
  56481. },
  56482. methods: {
  56483. getImageUrl(url2) {
  56484. if ("blob:http:" === url2.substr(0, 10)) {
  56485. return url2;
  56486. } else {
  56487. return sheep$1.$url.cdn(url2);
  56488. }
  56489. },
  56490. uploadFiles(item, index2) {
  56491. this.$emit("uploadFiles", item);
  56492. },
  56493. choose() {
  56494. this.$emit("choose");
  56495. },
  56496. delFile(index2) {
  56497. this.$emit("delFile", index2);
  56498. },
  56499. previewImage(img, index2) {
  56500. let urls = [];
  56501. if (Number(this.limit) === 1 && this.disablePreview && !this.disabled) {
  56502. this.$emit("choose");
  56503. }
  56504. if (this.disablePreview)
  56505. return;
  56506. this.list.forEach((i2) => {
  56507. urls.push(this.getImageUrl(i2));
  56508. });
  56509. uni.previewImage({
  56510. urls,
  56511. current: index2
  56512. });
  56513. },
  56514. value2px(value) {
  56515. if (typeof value === "number") {
  56516. value += "px";
  56517. } else {
  56518. if (value.indexOf("%") === -1) {
  56519. value = value.indexOf("px") !== -1 ? value : value + "px";
  56520. }
  56521. }
  56522. return value;
  56523. }
  56524. }
  56525. };
  56526. function _sfc_render$1C(_ctx, _cache, $props, $setup, $data, $options) {
  56527. return vue.openBlock(), vue.createElementBlock("view", { class: "uni-file-picker__container" }, [
  56528. (vue.openBlock(true), vue.createElementBlock(
  56529. vue.Fragment,
  56530. null,
  56531. vue.renderList($options.list, (url2, index2) => {
  56532. return vue.openBlock(), vue.createElementBlock(
  56533. "view",
  56534. {
  56535. class: "file-picker__box",
  56536. key: index2,
  56537. style: vue.normalizeStyle($options.boxStyle)
  56538. },
  56539. [
  56540. vue.createElementVNode(
  56541. "view",
  56542. {
  56543. class: "file-picker__box-content",
  56544. style: vue.normalizeStyle($options.borderStyle)
  56545. },
  56546. [
  56547. vue.createElementVNode("image", {
  56548. class: "file-image",
  56549. src: $options.getImageUrl(url2),
  56550. mode: "aspectFill",
  56551. onClick: vue.withModifiers(($event) => $options.previewImage(url2, index2), ["stop"])
  56552. }, null, 8, ["src", "onClick"]),
  56553. $props.delIcon && !$props.readonly ? (vue.openBlock(), vue.createElementBlock("view", {
  56554. key: 0,
  56555. class: "icon-del-box",
  56556. onClick: vue.withModifiers(($event) => $options.delFile(index2), ["stop"])
  56557. }, [
  56558. vue.createElementVNode("view", { class: "icon-del" }),
  56559. vue.createElementVNode("view", { class: "icon-del rotate" })
  56560. ], 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  56561. vue.createCommentVNode(' <view v-if="item.errMsg" class="file-picker__mask" @click.stop="uploadFiles(item, index)">\n 点击重试\n </view> ')
  56562. ],
  56563. 4
  56564. /* STYLE */
  56565. )
  56566. ],
  56567. 4
  56568. /* STYLE */
  56569. );
  56570. }),
  56571. 128
  56572. /* KEYED_FRAGMENT */
  56573. )),
  56574. $options.list.length < $props.limit && !$props.readonly ? (vue.openBlock(), vue.createElementBlock(
  56575. "view",
  56576. {
  56577. key: 0,
  56578. class: "file-picker__box",
  56579. style: vue.normalizeStyle($options.boxStyle)
  56580. },
  56581. [
  56582. vue.createElementVNode(
  56583. "view",
  56584. {
  56585. class: "file-picker__box-content is-add",
  56586. style: vue.normalizeStyle($options.borderStyle),
  56587. onClick: _cache[0] || (_cache[0] = (...args) => $options.choose && $options.choose(...args))
  56588. },
  56589. [
  56590. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  56591. vue.createElementVNode("view", { class: "icon-add" }),
  56592. vue.createElementVNode("view", { class: "icon-add rotate" })
  56593. ], true)
  56594. ],
  56595. 4
  56596. /* STYLE */
  56597. )
  56598. ],
  56599. 4
  56600. /* STYLE */
  56601. )) : vue.createCommentVNode("v-if", true)
  56602. ]);
  56603. }
  56604. const uploadImage = /* @__PURE__ */ _export_sfc(_sfc_main$1D, [["render", _sfc_render$1C], ["__scopeId", "data-v-6bf78572"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-uploader/upload-image.vue"]]);
  56605. const _sfc_main$1C = {
  56606. name: "uploadFile",
  56607. emits: ["uploadFiles", "choose", "delFile"],
  56608. props: {
  56609. filesList: {
  56610. type: Array,
  56611. default() {
  56612. return [];
  56613. }
  56614. },
  56615. delIcon: {
  56616. type: Boolean,
  56617. default: true
  56618. },
  56619. limit: {
  56620. type: [Number, String],
  56621. default: 9
  56622. },
  56623. showType: {
  56624. type: String,
  56625. default: ""
  56626. },
  56627. listStyles: {
  56628. type: Object,
  56629. default() {
  56630. return {
  56631. // 是否显示边框
  56632. border: true,
  56633. // 是否显示分隔线
  56634. dividline: true,
  56635. // 线条样式
  56636. borderStyle: {}
  56637. };
  56638. }
  56639. },
  56640. readonly: {
  56641. type: Boolean,
  56642. default: false
  56643. }
  56644. },
  56645. computed: {
  56646. list() {
  56647. let files2 = [];
  56648. this.filesList.forEach((v2) => {
  56649. files2.push(v2);
  56650. });
  56651. return files2;
  56652. },
  56653. styles() {
  56654. let styles = {
  56655. border: true,
  56656. dividline: true,
  56657. "border-style": {}
  56658. };
  56659. return Object.assign(styles, this.listStyles);
  56660. },
  56661. borderStyle() {
  56662. let { borderStyle, border } = this.styles;
  56663. let obj = {};
  56664. if (!border) {
  56665. obj.border = "none";
  56666. } else {
  56667. let width = borderStyle && borderStyle.width || 1;
  56668. width = this.value2px(width);
  56669. let radius = borderStyle && borderStyle.radius || 5;
  56670. radius = this.value2px(radius);
  56671. obj = {
  56672. "border-width": width,
  56673. "border-style": borderStyle && borderStyle.style || "solid",
  56674. "border-color": borderStyle && borderStyle.color || "#eee",
  56675. "border-radius": radius
  56676. };
  56677. }
  56678. let classles = "";
  56679. for (let i2 in obj) {
  56680. classles += `${i2}:${obj[i2]};`;
  56681. }
  56682. return classles;
  56683. },
  56684. borderLineStyle() {
  56685. let obj = {};
  56686. let { borderStyle } = this.styles;
  56687. if (borderStyle && borderStyle.color) {
  56688. obj["border-color"] = borderStyle.color;
  56689. }
  56690. if (borderStyle && borderStyle.width) {
  56691. let width = borderStyle && borderStyle.width || 1;
  56692. let style = borderStyle && borderStyle.style || 0;
  56693. if (typeof width === "number") {
  56694. width += "px";
  56695. } else {
  56696. width = width.indexOf("px") ? width : width + "px";
  56697. }
  56698. obj["border-width"] = width;
  56699. if (typeof style === "number") {
  56700. style += "px";
  56701. } else {
  56702. style = style.indexOf("px") ? style : style + "px";
  56703. }
  56704. obj["border-top-style"] = style;
  56705. }
  56706. let classles = "";
  56707. for (let i2 in obj) {
  56708. classles += `${i2}:${obj[i2]};`;
  56709. }
  56710. return classles;
  56711. }
  56712. },
  56713. methods: {
  56714. uploadFiles(item, index2) {
  56715. this.$emit("uploadFiles", {
  56716. item,
  56717. index: index2
  56718. });
  56719. },
  56720. choose() {
  56721. this.$emit("choose");
  56722. },
  56723. delFile(index2) {
  56724. this.$emit("delFile", index2);
  56725. },
  56726. value2px(value) {
  56727. if (typeof value === "number") {
  56728. value += "px";
  56729. } else {
  56730. value = value.indexOf("px") !== -1 ? value : value + "px";
  56731. }
  56732. return value;
  56733. }
  56734. }
  56735. };
  56736. function _sfc_render$1B(_ctx, _cache, $props, $setup, $data, $options) {
  56737. return vue.openBlock(), vue.createElementBlock("view", { class: "uni-file-picker__files" }, [
  56738. !$props.readonly ? (vue.openBlock(), vue.createElementBlock("view", {
  56739. key: 0,
  56740. class: "files-button",
  56741. onClick: _cache[0] || (_cache[0] = (...args) => $options.choose && $options.choose(...args))
  56742. }, [
  56743. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  56744. ])) : vue.createCommentVNode("v-if", true),
  56745. vue.createCommentVNode(` :class="{'is-text-box':showType === 'list'}" `),
  56746. $options.list.length > 0 ? (vue.openBlock(), vue.createElementBlock(
  56747. "view",
  56748. {
  56749. key: 1,
  56750. class: "uni-file-picker__lists is-text-box",
  56751. style: vue.normalizeStyle($options.borderStyle)
  56752. },
  56753. [
  56754. vue.createCommentVNode(" ,'is-list-card':showType === 'list-card' "),
  56755. (vue.openBlock(true), vue.createElementBlock(
  56756. vue.Fragment,
  56757. null,
  56758. vue.renderList($options.list, (item, index2) => {
  56759. return vue.openBlock(), vue.createElementBlock(
  56760. "view",
  56761. {
  56762. class: vue.normalizeClass(["uni-file-picker__lists-box", {
  56763. "files-border": index2 !== 0 && $options.styles.dividline
  56764. }]),
  56765. key: index2,
  56766. style: vue.normalizeStyle(index2 !== 0 && $options.styles.dividline && $options.borderLineStyle)
  56767. },
  56768. [
  56769. vue.createElementVNode("view", { class: "uni-file-picker__item" }, [
  56770. vue.createCommentVNode(` :class="{'is-text-image':showType === 'list'}" `),
  56771. vue.createCommentVNode(' <view class="files__image is-text-image">\n <image class="header-image" :src="item.logo" mode="aspectFit"></image>\n </view> '),
  56772. vue.createElementVNode(
  56773. "view",
  56774. { class: "files__name" },
  56775. vue.toDisplayString(item.name),
  56776. 1
  56777. /* TEXT */
  56778. ),
  56779. $props.delIcon && !$props.readonly ? (vue.openBlock(), vue.createElementBlock("view", {
  56780. key: 0,
  56781. class: "icon-del-box icon-files",
  56782. onClick: ($event) => $options.delFile(index2)
  56783. }, [
  56784. vue.createElementVNode("view", { class: "icon-del icon-files" }),
  56785. vue.createElementVNode("view", { class: "icon-del rotate" })
  56786. ], 8, ["onClick"])) : vue.createCommentVNode("v-if", true)
  56787. ]),
  56788. item.progress && item.progress !== 100 || item.progress === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  56789. key: 0,
  56790. class: "file-picker__progress"
  56791. }, [
  56792. vue.createElementVNode("progress", {
  56793. class: "file-picker__progress-item",
  56794. percent: item.progress === -1 ? 0 : item.progress,
  56795. "stroke-width": "4",
  56796. backgroundColor: item.errMsg ? "#ff5a5f" : "#EBEBEB"
  56797. }, null, 8, ["percent", "backgroundColor"])
  56798. ])) : vue.createCommentVNode("v-if", true),
  56799. item.status === "error" ? (vue.openBlock(), vue.createElementBlock("view", {
  56800. key: 1,
  56801. class: "file-picker__mask",
  56802. onClick: vue.withModifiers(($event) => $options.uploadFiles(item, index2), ["stop"])
  56803. }, " 点击重试 ", 8, ["onClick"])) : vue.createCommentVNode("v-if", true)
  56804. ],
  56805. 6
  56806. /* CLASS, STYLE */
  56807. );
  56808. }),
  56809. 128
  56810. /* KEYED_FRAGMENT */
  56811. ))
  56812. ],
  56813. 4
  56814. /* STYLE */
  56815. )) : vue.createCommentVNode("v-if", true)
  56816. ]);
  56817. }
  56818. const uploadFile = /* @__PURE__ */ _export_sfc(_sfc_main$1C, [["render", _sfc_render$1B], ["__scopeId", "data-v-1daeb5aa"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-uploader/upload-file.vue"]]);
  56819. const _sfc_main$1B = {
  56820. name: "sUploader",
  56821. components: {
  56822. uploadImage,
  56823. uploadFile
  56824. },
  56825. options: {
  56826. virtualHost: true
  56827. },
  56828. emits: ["select", "success", "fail", "progress", "delete", "update:modelValue", "update:url"],
  56829. props: {
  56830. modelValue: {
  56831. type: [Array, Object],
  56832. default() {
  56833. return [];
  56834. }
  56835. },
  56836. url: {
  56837. type: [Array, String],
  56838. default() {
  56839. return [];
  56840. }
  56841. },
  56842. disabled: {
  56843. type: Boolean,
  56844. default: false
  56845. },
  56846. disablePreview: {
  56847. type: Boolean,
  56848. default: false
  56849. },
  56850. delIcon: {
  56851. type: Boolean,
  56852. default: true
  56853. },
  56854. // 自动上传
  56855. autoUpload: {
  56856. type: Boolean,
  56857. default: true
  56858. },
  56859. // 最大选择个数 ,h5只能限制单选或是多选
  56860. limit: {
  56861. type: [Number, String],
  56862. default: 9
  56863. },
  56864. // 列表样式 grid | list | list-card
  56865. mode: {
  56866. type: String,
  56867. default: "grid"
  56868. },
  56869. // 选择文件类型 image/video/all
  56870. fileMediatype: {
  56871. type: String,
  56872. default: "image"
  56873. },
  56874. // 文件类型筛选
  56875. fileExtname: {
  56876. type: [Array, String],
  56877. default() {
  56878. return [];
  56879. }
  56880. },
  56881. title: {
  56882. type: String,
  56883. default: ""
  56884. },
  56885. listStyles: {
  56886. type: Object,
  56887. default() {
  56888. return {
  56889. // 是否显示边框
  56890. border: true,
  56891. // 是否显示分隔线
  56892. dividline: true,
  56893. // 线条样式
  56894. borderStyle: {}
  56895. };
  56896. }
  56897. },
  56898. imageStyles: {
  56899. type: Object,
  56900. default() {
  56901. return {
  56902. width: "auto",
  56903. height: "auto"
  56904. };
  56905. }
  56906. },
  56907. readonly: {
  56908. type: Boolean,
  56909. default: false
  56910. },
  56911. sizeType: {
  56912. type: Array,
  56913. default() {
  56914. return ["original", "compressed"];
  56915. }
  56916. },
  56917. driver: {
  56918. type: String,
  56919. default: "local"
  56920. // local=本地 | oss | unicloud
  56921. },
  56922. subtitle: {
  56923. type: String,
  56924. default: ""
  56925. }
  56926. },
  56927. data() {
  56928. return {
  56929. files: [],
  56930. localValue: [],
  56931. imgsrc: sheep$1.$url.static("/static/images/add.png")
  56932. };
  56933. },
  56934. watch: {
  56935. modelValue: {
  56936. handler(newVal, oldVal) {
  56937. this.setValue(newVal, oldVal);
  56938. },
  56939. immediate: true
  56940. },
  56941. url: {
  56942. handler(newUrl) {
  56943. this.updateFilesFromUrl(newUrl);
  56944. },
  56945. immediate: true
  56946. }
  56947. },
  56948. computed: {
  56949. returnType() {
  56950. if (this.limit > 1) {
  56951. return "array";
  56952. }
  56953. return "object";
  56954. },
  56955. filesList() {
  56956. let files2 = [];
  56957. this.files.forEach((v2) => {
  56958. files2.push(v2);
  56959. });
  56960. return files2;
  56961. },
  56962. showType() {
  56963. if (this.fileMediatype === "image") {
  56964. return this.mode;
  56965. }
  56966. return "list";
  56967. },
  56968. limitLength() {
  56969. if (this.returnType === "object") {
  56970. return 1;
  56971. }
  56972. if (!this.limit) {
  56973. return 1;
  56974. }
  56975. if (this.limit >= 9) {
  56976. return 9;
  56977. }
  56978. return this.limit;
  56979. }
  56980. },
  56981. created() {
  56982. if (this.driver === "local") {
  56983. Ys.chooseAndUploadFile = chooseAndUploadFile;
  56984. }
  56985. this.form = this.getForm("uniForms");
  56986. this.formItem = this.getForm("uniFormsItem");
  56987. if (this.form && this.formItem) {
  56988. if (this.formItem.name) {
  56989. this.rename = this.formItem.name;
  56990. this.form.inputChildrens.push(this);
  56991. }
  56992. }
  56993. },
  56994. methods: {
  56995. updateFilesFromUrl(newUrl) {
  56996. if (Array.isArray(newUrl)) {
  56997. this.files = newUrl.map((url2) => ({
  56998. url: url2,
  56999. status: "success"
  57000. }));
  57001. } else {
  57002. this.files = newUrl ? [{ url: newUrl, status: "success" }] : [];
  57003. }
  57004. },
  57005. /**
  57006. * 公开用户使用,清空文件
  57007. * @param {Object} index
  57008. */
  57009. clearFiles(index2) {
  57010. if (index2 !== 0 && !index2) {
  57011. this.files = [];
  57012. this.$nextTick(() => {
  57013. this.setEmit();
  57014. });
  57015. } else {
  57016. this.files.splice(index2, 1);
  57017. }
  57018. this.$nextTick(() => {
  57019. this.setEmit();
  57020. });
  57021. },
  57022. /**
  57023. * 公开用户使用,继续上传
  57024. */
  57025. upload() {
  57026. let files2 = [];
  57027. this.files.forEach((v2, index2) => {
  57028. if (v2.status === "ready" || v2.status === "error") {
  57029. files2.push(Object.assign({}, v2));
  57030. }
  57031. });
  57032. return this.uploadFiles(files2);
  57033. },
  57034. async setValue(newVal, oldVal) {
  57035. const newData = async (v2) => {
  57036. const reg = /cloud:\/\/([\w.]+\/?)\S*/;
  57037. let url2 = "";
  57038. if (v2.fileID) {
  57039. url2 = v2.fileID;
  57040. } else {
  57041. url2 = v2.url;
  57042. }
  57043. if (reg.test(url2)) {
  57044. v2.fileID = url2;
  57045. v2.url = await this.getTempFileURL(url2);
  57046. }
  57047. if (v2.url)
  57048. v2.path = v2.url;
  57049. return v2;
  57050. };
  57051. if (this.returnType === "object") {
  57052. if (newVal) {
  57053. await newData(newVal);
  57054. } else {
  57055. newVal = {};
  57056. }
  57057. } else {
  57058. if (!newVal)
  57059. newVal = [];
  57060. for (let i2 = 0; i2 < newVal.length; i2++) {
  57061. let v2 = newVal[i2];
  57062. await newData(v2);
  57063. }
  57064. }
  57065. this.localValue = newVal;
  57066. if (this.form && this.formItem && !this.is_reset) {
  57067. this.is_reset = false;
  57068. this.formItem.setValue(this.localValue);
  57069. }
  57070. let filesData = Object.keys(newVal).length > 0 ? newVal : [];
  57071. this.files = [].concat(filesData);
  57072. this.updateFilesFromUrl(this.url);
  57073. },
  57074. /**
  57075. * 选择文件
  57076. */
  57077. choose() {
  57078. if (this.disabled)
  57079. return;
  57080. if (this.files.length >= Number(this.limitLength) && this.showType !== "grid" && this.returnType === "array") {
  57081. uni.showToast({
  57082. title: `您最多选择 ${this.limitLength} 个文件`,
  57083. icon: "none"
  57084. });
  57085. return;
  57086. }
  57087. this.chooseFiles();
  57088. },
  57089. /**
  57090. * 选择文件并上传
  57091. */
  57092. chooseFiles() {
  57093. const _extname = get_extname(this.fileExtname);
  57094. Ys.chooseAndUploadFile({
  57095. type: this.fileMediatype,
  57096. compressed: false,
  57097. sizeType: this.sizeType,
  57098. // TODO 如果为空,video 有问题
  57099. extension: _extname.length > 0 ? _extname : void 0,
  57100. count: this.limitLength - this.files.length,
  57101. //默认9
  57102. onChooseFile: this.chooseFileCallback,
  57103. onUploadProgress: (progressEvent) => {
  57104. this.setProgress(progressEvent, progressEvent.index);
  57105. }
  57106. }).then((result2) => {
  57107. this.setSuccessAndError(result2.tempFiles);
  57108. }).catch((err) => {
  57109. formatAppLog("log", "at sheep/components/s-uploader/s-uploader.vue:392", "选择失败", err);
  57110. });
  57111. },
  57112. /**
  57113. * 选择文件回调
  57114. * @param {Object} res
  57115. */
  57116. async chooseFileCallback(res) {
  57117. const _extname = get_extname(this.fileExtname);
  57118. const is_one = Number(this.limitLength) === 1 && this.disablePreview && !this.disabled || this.returnType === "object";
  57119. if (is_one) {
  57120. this.files = [];
  57121. }
  57122. let { filePaths, files: files2 } = get_files_and_is_max(res, _extname);
  57123. if (!(_extname && _extname.length > 0)) {
  57124. filePaths = res.tempFilePaths;
  57125. files2 = res.tempFiles;
  57126. }
  57127. let currentData = [];
  57128. for (let i2 = 0; i2 < files2.length; i2++) {
  57129. if (this.limitLength - this.files.length <= 0)
  57130. break;
  57131. files2[i2].uuid = Date.now();
  57132. let filedata = await get_file_data(files2[i2], this.fileMediatype);
  57133. filedata.progress = 0;
  57134. filedata.status = "ready";
  57135. this.files.push(filedata);
  57136. currentData.push({
  57137. ...filedata,
  57138. file: files2[i2]
  57139. });
  57140. }
  57141. this.$emit("select", {
  57142. tempFiles: currentData,
  57143. tempFilePaths: filePaths
  57144. });
  57145. res.tempFiles = files2;
  57146. if (!this.autoUpload) {
  57147. res.tempFiles = [];
  57148. }
  57149. },
  57150. /**
  57151. * 批传
  57152. * @param {Object} e
  57153. */
  57154. uploadFiles(files2) {
  57155. files2 = [].concat(files2);
  57156. return uploadCloudFiles.call(this, files2, 5, (res) => {
  57157. this.setProgress(res, res.index, true);
  57158. }).then((result2) => {
  57159. this.setSuccessAndError(result2);
  57160. return result2;
  57161. }).catch((err) => {
  57162. formatAppLog("log", "at sheep/components/s-uploader/s-uploader.vue:455", err);
  57163. });
  57164. },
  57165. /**
  57166. * 成功或失败
  57167. */
  57168. async setSuccessAndError(res, fn) {
  57169. let successData = [];
  57170. let errorData = [];
  57171. let tempFilePath = [];
  57172. let errorTempFilePath = [];
  57173. for (let i2 = 0; i2 < res.length; i2++) {
  57174. const item = res[i2];
  57175. const index2 = item.uuid ? this.files.findIndex((p2) => p2.uuid === item.uuid) : item.index;
  57176. if (index2 === -1 || !this.files)
  57177. break;
  57178. if (item.errMsg === "request:fail") {
  57179. this.files[index2].url = item.path;
  57180. this.files[index2].status = "error";
  57181. this.files[index2].errMsg = item.errMsg;
  57182. errorData.push(this.files[index2]);
  57183. errorTempFilePath.push(this.files[index2].url);
  57184. } else {
  57185. this.files[index2].errMsg = "";
  57186. this.files[index2].fileID = item.url;
  57187. const reg = /cloud:\/\/([\w.]+\/?)\S*/;
  57188. if (reg.test(item.url)) {
  57189. this.files[index2].url = await this.getTempFileURL(item.url);
  57190. } else {
  57191. this.files[index2].url = item.url;
  57192. }
  57193. this.files[index2].status = "success";
  57194. this.files[index2].progress += 1;
  57195. successData.push(this.files[index2]);
  57196. tempFilePath.push(this.files[index2].fileID);
  57197. }
  57198. }
  57199. if (successData.length > 0) {
  57200. this.setEmit();
  57201. this.$emit("success", {
  57202. tempFiles: this.backObject(successData),
  57203. tempFilePaths: tempFilePath
  57204. });
  57205. }
  57206. if (errorData.length > 0) {
  57207. this.$emit("fail", {
  57208. tempFiles: this.backObject(errorData),
  57209. tempFilePaths: errorTempFilePath
  57210. });
  57211. }
  57212. },
  57213. /**
  57214. * 获取进度
  57215. * @param {Object} progressEvent
  57216. * @param {Object} index
  57217. * @param {Object} type
  57218. */
  57219. setProgress(progressEvent, index2, type) {
  57220. this.files.length;
  57221. const percentCompleted = Math.round(progressEvent.loaded * 100 / progressEvent.total);
  57222. let idx = index2;
  57223. if (!type) {
  57224. idx = this.files.findIndex((p2) => p2.uuid === progressEvent.tempFile.uuid);
  57225. }
  57226. if (idx === -1 || !this.files[idx])
  57227. return;
  57228. this.files[idx].progress = percentCompleted - 1;
  57229. this.$emit("progress", {
  57230. index: idx,
  57231. progress: parseInt(percentCompleted),
  57232. tempFile: this.files[idx]
  57233. });
  57234. },
  57235. /**
  57236. * 删除文件
  57237. * @param {Object} index
  57238. */
  57239. delFile(index2) {
  57240. formatAppLog("log", "at sheep/components/s-uploader/s-uploader.vue:543", this.files);
  57241. this.$emit("delete", {
  57242. tempFile: this.files[index2],
  57243. tempFilePath: this.files[index2].url
  57244. });
  57245. this.files.splice(index2, 1);
  57246. this.$nextTick(() => {
  57247. this.setEmit();
  57248. });
  57249. },
  57250. /**
  57251. * 获取文件名和后缀
  57252. * @param {Object} name
  57253. */
  57254. getFileExt(name2) {
  57255. const last_len = name2.lastIndexOf(".");
  57256. const len = name2.length;
  57257. return {
  57258. name: name2.substring(0, last_len),
  57259. ext: name2.substring(last_len + 1, len)
  57260. };
  57261. },
  57262. /**
  57263. * 处理返回事件
  57264. */
  57265. setEmit() {
  57266. let data = [];
  57267. let updateUrl = [];
  57268. if (this.returnType === "object") {
  57269. data = this.backObject(this.files)[0];
  57270. this.localValue = data ? data : null;
  57271. updateUrl = data ? data.url : "";
  57272. } else {
  57273. data = this.backObject(this.files);
  57274. if (!this.localValue) {
  57275. this.localValue = [];
  57276. }
  57277. this.localValue = [...data];
  57278. if (this.localValue.length > 0) {
  57279. this.localValue.forEach((item) => {
  57280. updateUrl.push(item.url);
  57281. });
  57282. }
  57283. }
  57284. this.$emit("update:modelValue", this.localValue);
  57285. this.$emit("update:url", updateUrl);
  57286. },
  57287. /**
  57288. * 处理返回参数
  57289. * @param {Object} files
  57290. */
  57291. backObject(files2) {
  57292. let newFilesData = [];
  57293. files2.forEach((v2) => {
  57294. newFilesData.push({
  57295. extname: v2.extname,
  57296. fileType: v2.fileType,
  57297. image: v2.image,
  57298. name: v2.name,
  57299. path: v2.path,
  57300. size: v2.size,
  57301. fileID: v2.fileID,
  57302. url: v2.url
  57303. });
  57304. });
  57305. return newFilesData;
  57306. },
  57307. async getTempFileURL(fileList) {
  57308. fileList = {
  57309. fileList: [].concat(fileList)
  57310. };
  57311. const urls = await Ys.getTempFileURL(fileList);
  57312. return urls.fileList[0].tempFileURL || "";
  57313. },
  57314. /**
  57315. * 获取父元素实例
  57316. */
  57317. getForm(name2 = "uniForms") {
  57318. let parent2 = this.$parent;
  57319. let parentName = parent2.$options.name;
  57320. while (parentName !== name2) {
  57321. parent2 = parent2.$parent;
  57322. if (!parent2)
  57323. return false;
  57324. parentName = parent2.$options.name;
  57325. }
  57326. return parent2;
  57327. }
  57328. }
  57329. };
  57330. function _sfc_render$1A(_ctx, _cache, $props, $setup, $data, $options) {
  57331. const _component_upload_image = vue.resolveComponent("upload-image");
  57332. const _component_upload_file = vue.resolveComponent("upload-file");
  57333. return vue.openBlock(), vue.createElementBlock("view", { class: "uni-file-picker" }, [
  57334. $props.title ? (vue.openBlock(), vue.createElementBlock("view", {
  57335. key: 0,
  57336. class: "uni-file-picker__header"
  57337. }, [
  57338. vue.createElementVNode(
  57339. "text",
  57340. { class: "file-title" },
  57341. vue.toDisplayString($props.title),
  57342. 1
  57343. /* TEXT */
  57344. ),
  57345. vue.createElementVNode(
  57346. "text",
  57347. { class: "file-count" },
  57348. vue.toDisplayString($options.filesList.length) + "/" + vue.toDisplayString($options.limitLength),
  57349. 1
  57350. /* TEXT */
  57351. )
  57352. ])) : vue.createCommentVNode("v-if", true),
  57353. $props.subtitle ? (vue.openBlock(), vue.createElementBlock("view", {
  57354. key: 1,
  57355. class: "file-subtitle"
  57356. }, [
  57357. vue.createElementVNode(
  57358. "view",
  57359. null,
  57360. vue.toDisplayString($props.subtitle),
  57361. 1
  57362. /* TEXT */
  57363. )
  57364. ])) : vue.createCommentVNode("v-if", true),
  57365. $props.fileMediatype === "image" && $options.showType === "grid" ? (vue.openBlock(), vue.createBlock(_component_upload_image, {
  57366. key: 2,
  57367. readonly: $props.readonly,
  57368. "image-styles": $props.imageStyles,
  57369. "files-list": $props.url,
  57370. limit: $options.limitLength,
  57371. disablePreview: $props.disablePreview,
  57372. delIcon: $props.delIcon,
  57373. onUploadFiles: $options.uploadFiles,
  57374. onChoose: $options.choose,
  57375. onDelFile: $options.delFile
  57376. }, {
  57377. default: vue.withCtx(() => [
  57378. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  57379. vue.createElementVNode("view", { class: "is-add" }, [
  57380. vue.createElementVNode("image", {
  57381. src: $data.imgsrc,
  57382. class: "add-icon"
  57383. }, null, 8, ["src"])
  57384. ])
  57385. ], true)
  57386. ]),
  57387. _: 3
  57388. /* FORWARDED */
  57389. }, 8, ["readonly", "image-styles", "files-list", "limit", "disablePreview", "delIcon", "onUploadFiles", "onChoose", "onDelFile"])) : vue.createCommentVNode("v-if", true),
  57390. $props.fileMediatype !== "image" || $options.showType !== "grid" ? (vue.openBlock(), vue.createBlock(_component_upload_file, {
  57391. key: 3,
  57392. readonly: $props.readonly,
  57393. "list-styles": $props.listStyles,
  57394. "files-list": $options.filesList,
  57395. showType: $options.showType,
  57396. delIcon: $props.delIcon,
  57397. onUploadFiles: $options.uploadFiles,
  57398. onChoose: $options.choose,
  57399. onDelFile: $options.delFile
  57400. }, {
  57401. default: vue.withCtx(() => [
  57402. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  57403. vue.createElementVNode("button", {
  57404. type: "primary",
  57405. size: "mini"
  57406. }, "选择文件")
  57407. ], true)
  57408. ]),
  57409. _: 3
  57410. /* FORWARDED */
  57411. }, 8, ["readonly", "list-styles", "files-list", "showType", "delIcon", "onUploadFiles", "onChoose", "onDelFile"])) : vue.createCommentVNode("v-if", true)
  57412. ]);
  57413. }
  57414. const __easycom_3$4 = /* @__PURE__ */ _export_sfc(_sfc_main$1B, [["render", _sfc_render$1A], ["__scopeId", "data-v-82f430bc"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-uploader/s-uploader.vue"]]);
  57415. const _sfc_main$1A = {
  57416. __name: "add",
  57417. setup(__props, { expose: __expose }) {
  57418. __expose();
  57419. const state = vue.reactive({
  57420. orderInfo: {},
  57421. commentList: [],
  57422. id: null
  57423. });
  57424. async function onSubmit() {
  57425. uni.showModal({
  57426. title: t$6("setting.prompt"),
  57427. content: t$6("order.confirm_post_review"),
  57428. success: async function(res) {
  57429. if (!res.confirm) {
  57430. return;
  57431. }
  57432. for (const comment of state.commentList) {
  57433. await OrderApi.createOrderItemComment(comment);
  57434. }
  57435. sheep$1.$router.back();
  57436. }
  57437. });
  57438. }
  57439. onLoad(async (options2) => {
  57440. if (!options2.id) {
  57441. sheep$1.$helper.toast(t$6("order.missing_order_info"));
  57442. return;
  57443. }
  57444. state.id = options2.id;
  57445. const {
  57446. code: code2,
  57447. data
  57448. } = await OrderApi.getOrder(state.id);
  57449. if (code2 !== 0) {
  57450. sheep$1.$helper.toast(t$6("order.no_reviews_pending"));
  57451. return;
  57452. }
  57453. data.items.forEach((item) => {
  57454. state.commentList.push({
  57455. anonymous: false,
  57456. orderItemId: item.id,
  57457. descriptionScores: 5,
  57458. benefitScores: 5,
  57459. content: "",
  57460. picUrls: []
  57461. });
  57462. });
  57463. state.orderInfo = data;
  57464. });
  57465. const __returned__ = { state, onSubmit, get sheep() {
  57466. return sheep$1;
  57467. }, get onLoad() {
  57468. return onLoad;
  57469. }, reactive: vue.reactive, get OrderApi() {
  57470. return OrderApi;
  57471. }, get t() {
  57472. return t$6;
  57473. } };
  57474. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  57475. return __returned__;
  57476. }
  57477. };
  57478. function _sfc_render$1z(_ctx, _cache, $props, $setup, $data, $options) {
  57479. const _component_s_goods_item = resolveEasycom(vue.resolveDynamicComponent("s-goods-item"), __easycom_3$5);
  57480. const _component_uni_rate = resolveEasycom(vue.resolveDynamicComponent("uni-rate"), __easycom_1$2);
  57481. const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l);
  57482. const _component_s_uploader = resolveEasycom(vue.resolveDynamicComponent("s-uploader"), __easycom_3$4);
  57483. const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9);
  57484. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  57485. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  57486. title: $setup.t("order.review_order")
  57487. }, {
  57488. default: vue.withCtx(() => [
  57489. vue.createElementVNode("view", null, [
  57490. (vue.openBlock(true), vue.createElementBlock(
  57491. vue.Fragment,
  57492. null,
  57493. vue.renderList($setup.state.orderInfo.items, (item, index2) => {
  57494. return vue.openBlock(), vue.createElementBlock("view", {
  57495. key: item.id
  57496. }, [
  57497. vue.createElementVNode("view", null, [
  57498. vue.createElementVNode("view", { class: "commont-from-wrap" }, [
  57499. vue.createCommentVNode(" 评价商品 "),
  57500. vue.createVNode(_component_s_goods_item, {
  57501. img: item.picUrl,
  57502. title: item.spuName,
  57503. skuText: item.properties.map((property) => property.valueName).join(" "),
  57504. price: item.payPrice,
  57505. num: item.count
  57506. }, null, 8, ["img", "title", "skuText", "price", "num"])
  57507. ]),
  57508. vue.createElementVNode("view", { class: "form-item" }, [
  57509. vue.createCommentVNode(" 评分 "),
  57510. vue.createElementVNode("view", { class: "star-box ss-flex ss-col-center" }, [
  57511. vue.createElementVNode(
  57512. "view",
  57513. { class: "star-title ss-m-r-40" },
  57514. vue.toDisplayString($setup.t("order.product_quality")),
  57515. 1
  57516. /* TEXT */
  57517. ),
  57518. vue.createVNode(_component_uni_rate, {
  57519. modelValue: $setup.state.commentList[index2].descriptionScores,
  57520. "onUpdate:modelValue": ($event) => $setup.state.commentList[index2].descriptionScores = $event
  57521. }, null, 8, ["modelValue", "onUpdate:modelValue"])
  57522. ]),
  57523. vue.createElementVNode("view", { class: "star-box ss-flex ss-col-center" }, [
  57524. vue.createElementVNode(
  57525. "view",
  57526. { class: "star-title ss-m-r-40" },
  57527. vue.toDisplayString($setup.t("order.service_attitude")),
  57528. 1
  57529. /* TEXT */
  57530. ),
  57531. vue.createVNode(_component_uni_rate, {
  57532. modelValue: $setup.state.commentList[index2].benefitScores,
  57533. "onUpdate:modelValue": ($event) => $setup.state.commentList[index2].benefitScores = $event
  57534. }, null, 8, ["modelValue", "onUpdate:modelValue"])
  57535. ]),
  57536. vue.createCommentVNode(" 评价 "),
  57537. vue.createElementVNode("view", { class: "area-box" }, [
  57538. vue.createVNode(_component_uni_easyinput, {
  57539. inputBorder: false,
  57540. type: "textarea",
  57541. maxlength: "120",
  57542. autoHeight: "",
  57543. modelValue: $setup.state.commentList[index2].content,
  57544. "onUpdate:modelValue": ($event) => $setup.state.commentList[index2].content = $event,
  57545. placeholder: $setup.t("order.meet_expectations")
  57546. }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"]),
  57547. vue.createCommentVNode(" TODO 非繁人:文件上传 "),
  57548. vue.createElementVNode("view", { class: "img-box" }, [
  57549. vue.createVNode(_component_s_uploader, {
  57550. url: $setup.state.commentList[index2].picUrls,
  57551. "onUpdate:url": ($event) => $setup.state.commentList[index2].picUrls = $event,
  57552. fileMediatype: "image",
  57553. limit: "9",
  57554. mode: "grid",
  57555. imageStyles: { width: "168rpx", height: "168rpx" }
  57556. }, null, 8, ["url", "onUpdate:url"])
  57557. ])
  57558. ])
  57559. ])
  57560. ])
  57561. ]);
  57562. }),
  57563. 128
  57564. /* KEYED_FRAGMENT */
  57565. ))
  57566. ]),
  57567. vue.createCommentVNode(" TODO 非繁人:是否匿名 "),
  57568. vue.createVNode(_component_su_fixed, {
  57569. bottom: "",
  57570. placeholder: ""
  57571. }, {
  57572. default: vue.withCtx(() => [
  57573. vue.createElementVNode("view", { class: "foot_box ss-flex ss-row-center ss-col-center" }, [
  57574. vue.createElementVNode(
  57575. "button",
  57576. {
  57577. class: "ss-reset-button post-btn ui-BG-Main-Gradient ui-Shadow-Main",
  57578. onClick: $setup.onSubmit
  57579. },
  57580. vue.toDisplayString($setup.t("common.post")),
  57581. 1
  57582. /* TEXT */
  57583. )
  57584. ])
  57585. ]),
  57586. _: 1
  57587. /* STABLE */
  57588. })
  57589. ]),
  57590. _: 1
  57591. /* STABLE */
  57592. }, 8, ["title"]);
  57593. }
  57594. const PagesGoodsCommentAdd = /* @__PURE__ */ _export_sfc(_sfc_main$1A, [["render", _sfc_render$1z], ["__scopeId", "data-v-c66153cb"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/goods/comment/add.vue"]]);
  57595. const _sfc_main$1z = {
  57596. __name: "list",
  57597. setup(__props, { expose: __expose }) {
  57598. __expose();
  57599. const state = vue.reactive({
  57600. id: 0,
  57601. // 商品 SPU 编号
  57602. type: [
  57603. { type: 0, name: t$6("common.all") },
  57604. { type: 1, name: t$6("review.positive") },
  57605. { type: 2, name: t$6("review.neutral") },
  57606. { type: 3, name: t$6("review.negative") }
  57607. ],
  57608. currentTab: 0,
  57609. // 选中的 TAB
  57610. loadStatus: "",
  57611. pagination: {
  57612. list: [],
  57613. total: 0,
  57614. pageNo: 1,
  57615. pageSize: 10
  57616. }
  57617. });
  57618. function onTabsChange(e2) {
  57619. state.currentTab = e2.index;
  57620. state.pagination.pageNo = 1;
  57621. state.pagination.list = [];
  57622. state.pagination.total = 0;
  57623. getList();
  57624. }
  57625. async function getList() {
  57626. state.loadStatus = "loading";
  57627. let res = await CommentApi.getCommentPage(
  57628. state.id,
  57629. state.pagination.pageNo,
  57630. state.pagination.pageSize,
  57631. state.type[state.currentTab].type
  57632. );
  57633. if (res.code !== 0) {
  57634. return;
  57635. }
  57636. formatAppLog("log", "at pages/goods/comment/list.vue:77", res);
  57637. state.pagination.list = _$1.concat(state.pagination.list, res.data.list);
  57638. state.pagination.total = res.data.total;
  57639. state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore";
  57640. }
  57641. function loadMore() {
  57642. if (state.loadStatus === "noMore") {
  57643. return;
  57644. }
  57645. state.pagination.pageNo++;
  57646. getList();
  57647. }
  57648. onLoad((options2) => {
  57649. state.id = options2.id;
  57650. getList();
  57651. });
  57652. onReachBottom(() => {
  57653. loadMore();
  57654. });
  57655. const __returned__ = { state, onTabsChange, getList, loadMore, get CommentApi() {
  57656. return CommentApi;
  57657. }, get onLoad() {
  57658. return onLoad;
  57659. }, get onReachBottom() {
  57660. return onReachBottom;
  57661. }, reactive: vue.reactive, get _() {
  57662. return _$1;
  57663. }, commentItem, get t() {
  57664. return t$6;
  57665. } };
  57666. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  57667. return __returned__;
  57668. }
  57669. };
  57670. function _sfc_render$1y(_ctx, _cache, $props, $setup, $data, $options) {
  57671. const _component_su_tabs = resolveEasycom(vue.resolveDynamicComponent("su-tabs"), __easycom_0$a);
  57672. const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6);
  57673. const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5);
  57674. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  57675. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  57676. title: _ctx.$t("review.all_reviews")
  57677. }, {
  57678. default: vue.withCtx(() => [
  57679. vue.createVNode(_component_su_tabs, {
  57680. list: $setup.state.type,
  57681. scrollable: false,
  57682. onChange: $setup.onTabsChange,
  57683. current: $setup.state.currentTab
  57684. }, null, 8, ["list", "current"]),
  57685. vue.createCommentVNode(" 评论列表 "),
  57686. vue.createElementVNode("view", { class: "ss-m-t-20" }, [
  57687. (vue.openBlock(true), vue.createElementBlock(
  57688. vue.Fragment,
  57689. null,
  57690. vue.renderList($setup.state.pagination.list, (item) => {
  57691. return vue.openBlock(), vue.createElementBlock("view", {
  57692. class: "list-item",
  57693. key: item
  57694. }, [
  57695. vue.createVNode($setup["commentItem"], { item }, null, 8, ["item"])
  57696. ]);
  57697. }),
  57698. 128
  57699. /* KEYED_FRAGMENT */
  57700. ))
  57701. ]),
  57702. $setup.state.pagination.total === 0 ? (vue.openBlock(), vue.createBlock(_component_s_empty, {
  57703. key: 0,
  57704. text: "暂无数据",
  57705. icon: "/static/data-empty.png"
  57706. })) : vue.createCommentVNode("v-if", true),
  57707. vue.createCommentVNode(" 下拉 "),
  57708. $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, {
  57709. key: 1,
  57710. status: $setup.state.loadStatus,
  57711. "content-text": {
  57712. contentdown: "上拉加载更多"
  57713. },
  57714. onClick: $setup.loadMore
  57715. }, null, 8, ["status"])) : vue.createCommentVNode("v-if", true)
  57716. ]),
  57717. _: 1
  57718. /* STABLE */
  57719. }, 8, ["title"]);
  57720. }
  57721. const PagesGoodsCommentList = /* @__PURE__ */ _export_sfc(_sfc_main$1z, [["render", _sfc_render$1y], ["__scopeId", "data-v-0df9e865"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/goods/comment/list.vue"]]);
  57722. const _sfc_main$1y = {
  57723. __name: "detail",
  57724. setup(__props, { expose: __expose }) {
  57725. __expose();
  57726. vue.useCssVars((_ctx) => ({
  57727. "6b23c96c-headerBg": vue.unref(headerBg)
  57728. }));
  57729. const userInfo2 = sheep$1.$store("user").userInfo;
  57730. const statusBarHeight = sheep$1.$platform.device.statusBarHeight * 2;
  57731. const headerBg = sheep$1.$url.css("/static/images/order_bg.png");
  57732. const state = vue.reactive({
  57733. orderInfo: {},
  57734. merchantTradeNo: "",
  57735. // 商户订单号
  57736. comeinType: ""
  57737. // 进入订单详情的来源类型
  57738. });
  57739. const onCopy = () => {
  57740. sheep$1.$helper.copyText(state.orderInfo.no);
  57741. };
  57742. function onPay(id) {
  57743. sheep$1.$router.go("/pages/pay/index", {
  57744. id,
  57745. openType: 2,
  57746. type: 1
  57747. });
  57748. }
  57749. function onGoodsDetail(id) {
  57750. sheep$1.$router.go("/pages/goods/index", {
  57751. id
  57752. });
  57753. }
  57754. async function onCancel(orderId) {
  57755. uni.showModal({
  57756. title: t$6("setting.prompt"),
  57757. content: t$6("order.confirm_cancel_order"),
  57758. success: async function(res) {
  57759. if (!res.confirm) {
  57760. return;
  57761. }
  57762. const {
  57763. code: code2
  57764. } = await OrderApi.cancelOrder(orderId);
  57765. if (code2 === 0) {
  57766. await getOrderDetail(orderId);
  57767. }
  57768. }
  57769. });
  57770. }
  57771. async function onExpress(id) {
  57772. sheep$1.$router.go("/pages/order/express/log", {
  57773. id
  57774. });
  57775. }
  57776. async function onConfirm(orderId, ignore = false) {
  57777. let isOpenBusinessView = true;
  57778. uni.showModal({
  57779. title: t$6("setting.prompt"),
  57780. content: t$6("order.confirm_receipt_question"),
  57781. success: async function(res) {
  57782. if (res.confirm) {
  57783. if (sheep$1.$platform.name === "WechatMiniProgram" && !lodashExports.isEmpty(state.orderInfo.wechat_extra_data) && isOpenBusinessView && !ignore) {
  57784. mpConfirm(orderId);
  57785. return;
  57786. }
  57787. const {
  57788. code: code2
  57789. } = await OrderApi.receiveOrder(orderId);
  57790. if (code2 === 0) {
  57791. await getOrderDetail(orderId);
  57792. }
  57793. }
  57794. }
  57795. });
  57796. }
  57797. function onComment(id) {
  57798. sheep$1.$router.go("/pages/goods/comment/add", {
  57799. id
  57800. });
  57801. }
  57802. function onApply(id) {
  57803. uni.showModal({
  57804. title: t$6("setting.prompt"),
  57805. content: t$6("order.confirm_cancel_request"),
  57806. success: async function(res) {
  57807. if (!res.confirm) {
  57808. return;
  57809. }
  57810. const {
  57811. code: code2
  57812. } = await AfterSaleApi.cancelAfterSale(id);
  57813. if (code2 === 0) {
  57814. await getOrderDetail(id);
  57815. }
  57816. }
  57817. });
  57818. }
  57819. async function getOrderDetail(id) {
  57820. let res;
  57821. if (state.comeinType === "wechat") {
  57822. res = await OrderApi.getOrder(id, {
  57823. merchant_trade_no: state.merchantTradeNo
  57824. });
  57825. } else {
  57826. res = await OrderApi.getOrder(id);
  57827. }
  57828. if (res.code === 0) {
  57829. state.orderInfo = res.data;
  57830. handleOrderButtons(state.orderInfo);
  57831. } else {
  57832. sheep$1.$router.back();
  57833. }
  57834. }
  57835. const isLogin = vue.computed(() => sheep$1.$store("user").isLogin);
  57836. vue.watch(
  57837. () => isLogin.value,
  57838. (newVal) => {
  57839. if (newVal) {
  57840. window.location.reload();
  57841. }
  57842. },
  57843. {
  57844. deep: true
  57845. // 深度监听
  57846. }
  57847. );
  57848. onLoad(async (options2) => {
  57849. if (!isLogin.value) {
  57850. showAuthModal();
  57851. sheep$1.$helper.toast(t$6("order.not_logged_in", { user: options2.username }), 3e3);
  57852. } else {
  57853. if (options2.username) {
  57854. formatAppLog("log", "at pages/order/detail.vue:434", JSON.parse(uni.getStorageSync("user-store")).userInfo.username);
  57855. if (options2.username != JSON.parse(uni.getStorageSync("user-store")).userInfo.username) {
  57856. sheep$1.$helper.toast(t$6("order.account_switch_needed", { user1: JSON.parse(uni.getStorageSync("user-store")).userInfo.username, user2: options2.username }), 3e3);
  57857. }
  57858. }
  57859. }
  57860. let id = 0;
  57861. if (options2.id) {
  57862. id = options2.id;
  57863. }
  57864. state.comeinType = options2.comein_type;
  57865. if (state.comeinType === "wechat") {
  57866. state.merchantTradeNo = options2.merchant_trade_no;
  57867. }
  57868. await getOrderDetail(id);
  57869. });
  57870. const __returned__ = { userInfo: userInfo2, statusBarHeight, headerBg, state, onCopy, onPay, onGoodsDetail, onCancel, onExpress, onConfirm, onComment, onApply, getOrderDetail, isLogin, get sheep() {
  57871. return sheep$1;
  57872. }, get onLoad() {
  57873. return onLoad;
  57874. }, reactive: vue.reactive, computed: vue.computed, watch: vue.watch, get isEmpty() {
  57875. return lodashExports.isEmpty;
  57876. }, get fen2yuan() {
  57877. return fen2yuan;
  57878. }, get formatOrderStatus() {
  57879. return formatOrderStatus;
  57880. }, get formatOrderStatusDescription() {
  57881. return formatOrderStatusDescription;
  57882. }, get handleOrderButtons() {
  57883. return handleOrderButtons;
  57884. }, get points2point() {
  57885. return points2point;
  57886. }, get OrderApi() {
  57887. return OrderApi;
  57888. }, get AfterSaleApi() {
  57889. return AfterSaleApi;
  57890. }, get showAuthModal() {
  57891. return showAuthModal;
  57892. }, get t() {
  57893. return t$6;
  57894. } };
  57895. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  57896. return __returned__;
  57897. }
  57898. };
  57899. function _sfc_render$1x(_ctx, _cache, $props, $setup, $data, $options) {
  57900. const _component_s_goods_item = resolveEasycom(vue.resolveDynamicComponent("s-goods-item"), __easycom_3$5);
  57901. const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9);
  57902. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  57903. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  57904. title: $setup.t("order.order_details"),
  57905. class: "index-wrap",
  57906. navbar: "inner"
  57907. }, {
  57908. default: vue.withCtx(() => {
  57909. var _a2;
  57910. return [
  57911. vue.createCommentVNode(" 订单状态 TODO "),
  57912. vue.createElementVNode(
  57913. "view",
  57914. {
  57915. class: "state-box ss-flex-col ss-col-center ss-row-right",
  57916. style: vue.normalizeStyle([
  57917. {
  57918. marginTop: "-" + Number($setup.statusBarHeight + 88) + "rpx",
  57919. paddingTop: Number($setup.statusBarHeight + 88) + "rpx"
  57920. }
  57921. ])
  57922. },
  57923. [
  57924. vue.createElementVNode("view", { class: "ss-flex ss-m-t-32 ss-m-b-20" }, [
  57925. $setup.state.orderInfo.status_code == "unpaid" || $setup.state.orderInfo.status === 10 || // 待发货
  57926. $setup.state.orderInfo.status_code == "nocomment" ? (vue.openBlock(), vue.createElementBlock("image", {
  57927. key: 0,
  57928. class: "state-img",
  57929. src: $setup.sheep.$url.static("/static/images/order_loading.png")
  57930. }, null, 8, ["src"])) : vue.createCommentVNode("v-if", true),
  57931. $setup.state.orderInfo.status_code == "completed" || $setup.state.orderInfo.status_code == "refund_agree" ? (vue.openBlock(), vue.createElementBlock("image", {
  57932. key: 1,
  57933. class: "state-img",
  57934. src: $setup.sheep.$url.static("/static/images/order_success.png")
  57935. }, null, 8, ["src"])) : vue.createCommentVNode("v-if", true),
  57936. $setup.state.orderInfo.status_code == "cancel" || $setup.state.orderInfo.status_code == "closed" ? (vue.openBlock(), vue.createElementBlock("image", {
  57937. key: 2,
  57938. class: "state-img",
  57939. src: $setup.sheep.$url.static("/static/images/order_close.png")
  57940. }, null, 8, ["src"])) : vue.createCommentVNode("v-if", true),
  57941. $setup.state.orderInfo.status_code == "noget" ? (vue.openBlock(), vue.createElementBlock("image", {
  57942. key: 3,
  57943. class: "state-img",
  57944. src: $setup.sheep.$url.static("/static/images/order_express.png")
  57945. }, null, 8, ["src"])) : vue.createCommentVNode("v-if", true),
  57946. vue.createElementVNode(
  57947. "view",
  57948. { class: "ss-font-30" },
  57949. vue.toDisplayString($setup.formatOrderStatus($setup.state.orderInfo)),
  57950. 1
  57951. /* TEXT */
  57952. )
  57953. ]),
  57954. vue.createElementVNode(
  57955. "view",
  57956. { class: "ss-font-26 ss-m-x-20 ss-m-b-70" },
  57957. vue.toDisplayString($setup.formatOrderStatusDescription($setup.state.orderInfo)),
  57958. 1
  57959. /* TEXT */
  57960. )
  57961. ],
  57962. 4
  57963. /* STYLE */
  57964. ),
  57965. vue.createCommentVNode(" 收货地址 "),
  57966. $setup.state.orderInfo.receiverAreaId > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  57967. key: 0,
  57968. class: "order-address-box"
  57969. }, [
  57970. vue.createElementVNode("view", { class: "ss-flex ss-col-center" }, [
  57971. vue.createElementVNode(
  57972. "text",
  57973. { class: "address-username" },
  57974. vue.toDisplayString($setup.state.orderInfo.receiverName),
  57975. 1
  57976. /* TEXT */
  57977. ),
  57978. vue.createElementVNode(
  57979. "text",
  57980. { class: "address-phone" },
  57981. vue.toDisplayString($setup.state.orderInfo.receiverMobile),
  57982. 1
  57983. /* TEXT */
  57984. )
  57985. ]),
  57986. vue.createElementVNode(
  57987. "view",
  57988. { class: "address-detail" },
  57989. vue.toDisplayString($setup.state.orderInfo.receiverAreaName) + " " + vue.toDisplayString($setup.state.orderInfo.receiverDetailAddress),
  57990. 1
  57991. /* TEXT */
  57992. )
  57993. ])) : vue.createCommentVNode("v-if", true),
  57994. vue.createElementVNode(
  57995. "view",
  57996. {
  57997. class: "detail-goods",
  57998. style: vue.normalizeStyle([{ marginTop: $setup.state.orderInfo.receiverAreaId > 0 ? "0" : "-40rpx" }])
  57999. },
  58000. [
  58001. vue.createCommentVNode(" 订单信息 TODO 非繁人: "),
  58002. (vue.openBlock(true), vue.createElementBlock(
  58003. vue.Fragment,
  58004. null,
  58005. vue.renderList($setup.state.orderInfo.items, (item) => {
  58006. return vue.openBlock(), vue.createElementBlock("view", {
  58007. class: "order-list",
  58008. key: item.goods_id
  58009. }, [
  58010. vue.createElementVNode("view", { class: "order-card" }, [
  58011. vue.createVNode(_component_s_goods_item, {
  58012. onClick: ($event) => $setup.onGoodsDetail(item.spuId),
  58013. img: item.picUrl,
  58014. title: item.spuName,
  58015. skuText: item.properties.map((property) => property.valueName).join(" "),
  58016. price: item.spuPayType === 2 ? item.highPrecisionPrice : item.price,
  58017. num: item.count,
  58018. virtualPirce: item.spuPayType === 2
  58019. }, {
  58020. tool: vue.withCtx(() => [
  58021. vue.createElementVNode("view", { class: "ss-flex" }, [
  58022. [30].includes($setup.state.orderInfo.status) && item.afterSaleStatus === 0 ? (vue.openBlock(), vue.createElementBlock("button", {
  58023. key: 0,
  58024. class: "ss-reset-button apply-btn",
  58025. onClick: vue.withModifiers(($event) => $setup.sheep.$router.go("/pages/order/aftersale/apply", {
  58026. orderId: $setup.state.orderInfo.id,
  58027. itemId: item.id
  58028. }), ["stop"])
  58029. }, vue.toDisplayString($setup.t("order.apply_for_service")), 9, ["onClick"])) : vue.createCommentVNode("v-if", true),
  58030. item.afterSaleStatus === 10 ? (vue.openBlock(), vue.createElementBlock("button", {
  58031. key: 1,
  58032. class: "ss-reset-button apply-btn",
  58033. onClick: vue.withModifiers(($event) => $setup.sheep.$router.go("/pages/order/aftersale/detail", {
  58034. id: item.afterSaleId
  58035. }), ["stop"])
  58036. }, vue.toDisplayString($setup.t("order.refund_in_progress")), 9, ["onClick"])) : vue.createCommentVNode("v-if", true),
  58037. item.afterSaleStatus === 20 ? (vue.openBlock(), vue.createElementBlock("button", {
  58038. key: 2,
  58039. class: "ss-reset-button apply-btn",
  58040. onClick: vue.withModifiers(($event) => $setup.sheep.$router.go("/pages/order/aftersale/detail", {
  58041. id: item.afterSaleId
  58042. }), ["stop"])
  58043. }, vue.toDisplayString($setup.t("order.refund_successful")), 9, ["onClick"])) : vue.createCommentVNode("v-if", true)
  58044. ])
  58045. ]),
  58046. priceSuffix: vue.withCtx(() => [
  58047. item.status_text ? (vue.openBlock(), vue.createElementBlock(
  58048. "button",
  58049. {
  58050. key: 0,
  58051. class: "ss-reset-button tag-btn"
  58052. },
  58053. vue.toDisplayString(item.status_text),
  58054. 1
  58055. /* TEXT */
  58056. )) : vue.createCommentVNode("v-if", true)
  58057. ]),
  58058. _: 2
  58059. /* DYNAMIC */
  58060. }, 1032, ["onClick", "img", "title", "skuText", "price", "num", "virtualPirce"])
  58061. ])
  58062. ]);
  58063. }),
  58064. 128
  58065. /* KEYED_FRAGMENT */
  58066. ))
  58067. ],
  58068. 4
  58069. /* STYLE */
  58070. ),
  58071. vue.createCommentVNode(" 订单信息 "),
  58072. vue.createElementVNode("view", { class: "notice-box" }, [
  58073. vue.createElementVNode("view", { class: "notice-box__content" }, [
  58074. vue.createElementVNode("view", { class: "notice-item--center" }, [
  58075. vue.createElementVNode("view", { class: "ss-flex ss-flex-1" }, [
  58076. vue.createElementVNode(
  58077. "text",
  58078. { class: "title" },
  58079. vue.toDisplayString($setup.t("order.order_number")) + ":",
  58080. 1
  58081. /* TEXT */
  58082. ),
  58083. vue.createElementVNode(
  58084. "text",
  58085. { class: "detail" },
  58086. vue.toDisplayString($setup.state.orderInfo.no),
  58087. 1
  58088. /* TEXT */
  58089. )
  58090. ]),
  58091. vue.createElementVNode(
  58092. "button",
  58093. {
  58094. class: "ss-reset-button copy-btn",
  58095. onClick: $setup.onCopy
  58096. },
  58097. vue.toDisplayString($setup.t("order.copy")),
  58098. 1
  58099. /* TEXT */
  58100. )
  58101. ]),
  58102. vue.createElementVNode("view", { class: "notice-item" }, [
  58103. vue.createElementVNode(
  58104. "text",
  58105. { class: "title" },
  58106. vue.toDisplayString($setup.t("order.customer_message")) + ":",
  58107. 1
  58108. /* TEXT */
  58109. ),
  58110. vue.createElementVNode(
  58111. "text",
  58112. { class: "detail" },
  58113. vue.toDisplayString($setup.state.orderInfo.userRemark || $setup.t("common.none")),
  58114. 1
  58115. /* TEXT */
  58116. )
  58117. ]),
  58118. vue.createElementVNode("view", { class: "notice-item" }, [
  58119. vue.createElementVNode(
  58120. "text",
  58121. { class: "title" },
  58122. vue.toDisplayString($setup.t("order.order_time")) + ":",
  58123. 1
  58124. /* TEXT */
  58125. ),
  58126. vue.createElementVNode(
  58127. "text",
  58128. { class: "detail" },
  58129. vue.toDisplayString($setup.sheep.$helper.timeFormat($setup.state.orderInfo.createTime, "yyyy-mm-dd hh:MM:ss")),
  58130. 1
  58131. /* TEXT */
  58132. )
  58133. ]),
  58134. $setup.state.orderInfo.payTime ? (vue.openBlock(), vue.createElementBlock("view", {
  58135. key: 0,
  58136. class: "notice-item"
  58137. }, [
  58138. vue.createElementVNode(
  58139. "text",
  58140. { class: "title" },
  58141. vue.toDisplayString($setup.t("order.payment_time")) + ":",
  58142. 1
  58143. /* TEXT */
  58144. ),
  58145. vue.createElementVNode(
  58146. "text",
  58147. { class: "detail" },
  58148. vue.toDisplayString($setup.sheep.$helper.timeFormat($setup.state.orderInfo.payTime, "yyyy-mm-dd hh:MM:ss")),
  58149. 1
  58150. /* TEXT */
  58151. )
  58152. ])) : vue.createCommentVNode("v-if", true),
  58153. vue.createElementVNode("view", { class: "notice-item" }, [
  58154. vue.createElementVNode(
  58155. "text",
  58156. { class: "title" },
  58157. vue.toDisplayString($setup.t("order.payment_method")) + ":",
  58158. 1
  58159. /* TEXT */
  58160. ),
  58161. vue.createElementVNode(
  58162. "text",
  58163. { class: "detail" },
  58164. vue.toDisplayString($setup.state.orderInfo.payChannelName || "-"),
  58165. 1
  58166. /* TEXT */
  58167. )
  58168. ])
  58169. ])
  58170. ]),
  58171. vue.createCommentVNode(" 价格信息 "),
  58172. vue.createElementVNode("view", { class: "order-price-box" }, [
  58173. vue.createElementVNode("view", { class: "notice-item ss-flex ss-row-between" }, [
  58174. vue.createElementVNode(
  58175. "text",
  58176. { class: "title" },
  58177. vue.toDisplayString($setup.t("order.total_amount")),
  58178. 1
  58179. /* TEXT */
  58180. ),
  58181. vue.createElementVNode("view", { class: "ss-flex" }, [
  58182. vue.createElementVNode(
  58183. "text",
  58184. { class: "detail" },
  58185. "¥" + vue.toDisplayString($setup.fen2yuan($setup.state.orderInfo.totalPrice)),
  58186. 1
  58187. /* TEXT */
  58188. )
  58189. ])
  58190. ]),
  58191. vue.createElementVNode("view", { class: "notice-item ss-flex ss-row-between" }, [
  58192. vue.createElementVNode(
  58193. "text",
  58194. { class: "title" },
  58195. vue.toDisplayString($setup.t("order.shipping_fee")),
  58196. 1
  58197. /* TEXT */
  58198. ),
  58199. vue.createElementVNode(
  58200. "text",
  58201. { class: "detail" },
  58202. "¥" + vue.toDisplayString($setup.fen2yuan($setup.state.orderInfo.deliveryPrice)),
  58203. 1
  58204. /* TEXT */
  58205. )
  58206. ]),
  58207. $setup.state.orderInfo.payIntegral > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  58208. key: 0,
  58209. class: "notice-item ss-flex ss-row-between"
  58210. }, [
  58211. vue.createElementVNode(
  58212. "text",
  58213. { class: "title" },
  58214. vue.toDisplayString($setup.t("order.use_commission")),
  58215. 1
  58216. /* TEXT */
  58217. ),
  58218. vue.createElementVNode(
  58219. "text",
  58220. { class: "detail" },
  58221. vue.toDisplayString($setup.points2point($setup.state.orderInfo.payIntegral)),
  58222. 1
  58223. /* TEXT */
  58224. )
  58225. ])) : vue.createCommentVNode("v-if", true),
  58226. $setup.state.orderInfo.payConsumptionPoints > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  58227. key: 1,
  58228. class: "notice-item ss-flex ss-row-between"
  58229. }, [
  58230. vue.createElementVNode(
  58231. "text",
  58232. { class: "title" },
  58233. vue.toDisplayString($setup.t("order.use_points")),
  58234. 1
  58235. /* TEXT */
  58236. ),
  58237. vue.createElementVNode(
  58238. "text",
  58239. { class: "detail" },
  58240. vue.toDisplayString($setup.points2point($setup.state.orderInfo.payConsumptionPoints)),
  58241. 1
  58242. /* TEXT */
  58243. )
  58244. ])) : vue.createCommentVNode("v-if", true),
  58245. vue.createCommentVNode(" TODO 非繁人:优惠劵抵扣、佣金抵扣 "),
  58246. $setup.state.orderInfo.discountPrice > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  58247. key: 2,
  58248. class: "notice-item ss-flex ss-row-between"
  58249. }, [
  58250. vue.createElementVNode(
  58251. "text",
  58252. { class: "title" },
  58253. vue.toDisplayString($setup.t("order.discount_amount")),
  58254. 1
  58255. /* TEXT */
  58256. ),
  58257. vue.createElementVNode(
  58258. "text",
  58259. { class: "detail" },
  58260. "¥" + vue.toDisplayString($setup.fen2yuan($setup.state.orderInfo.discountPrice)),
  58261. 1
  58262. /* TEXT */
  58263. )
  58264. ])) : vue.createCommentVNode("v-if", true),
  58265. vue.createElementVNode("view", { class: "notice-item all-rpice-item ss-flex ss-m-t-20" }, [
  58266. vue.createElementVNode(
  58267. "text",
  58268. { class: "title" },
  58269. vue.toDisplayString($setup.state.orderInfo.payStatus ? $setup.t("order.paid") : $setup.t("order.amount_due")),
  58270. 1
  58271. /* TEXT */
  58272. ),
  58273. vue.createElementVNode(
  58274. "text",
  58275. { class: "detail all-price" },
  58276. "¥" + vue.toDisplayString($setup.fen2yuan($setup.state.orderInfo.payPrice)),
  58277. 1
  58278. /* TEXT */
  58279. )
  58280. ]),
  58281. $setup.state.orderInfo.refundPrice > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  58282. key: 3,
  58283. class: "notice-item all-rpice-item ss-flex ss-m-t-20"
  58284. }, [
  58285. vue.createElementVNode(
  58286. "text",
  58287. { class: "title" },
  58288. vue.toDisplayString($setup.t("order.refunded")),
  58289. 1
  58290. /* TEXT */
  58291. ),
  58292. vue.createElementVNode(
  58293. "text",
  58294. { class: "detail all-price" },
  58295. "¥" + vue.toDisplayString($setup.fen2yuan($setup.state.orderInfo.refundPrice)),
  58296. 1
  58297. /* TEXT */
  58298. )
  58299. ])) : vue.createCommentVNode("v-if", true)
  58300. ]),
  58301. vue.createCommentVNode(" 底部按钮 "),
  58302. vue.createCommentVNode(" TODO: 查看物流、等待成团、评价完后返回页面没刷新页面 "),
  58303. ((_a2 = $setup.state.orderInfo.buttons) == null ? void 0 : _a2.length) ? (vue.openBlock(), vue.createBlock(_component_su_fixed, {
  58304. key: 1,
  58305. bottom: "",
  58306. placeholder: "",
  58307. bg: "bg-white"
  58308. }, {
  58309. default: vue.withCtx(() => {
  58310. var _a3, _b2, _c, _d, _e2, _f, _g, _h;
  58311. return [
  58312. vue.createElementVNode("view", { class: "footer-box ss-flex ss-col-center ss-row-right" }, [
  58313. vue.createCommentVNode(" {{state.orderInfo.buttons}} "),
  58314. ((_a3 = $setup.state.orderInfo.buttons) == null ? void 0 : _a3.includes("cancel")) ? (vue.openBlock(), vue.createElementBlock(
  58315. "button",
  58316. {
  58317. key: 0,
  58318. class: "ss-reset-button cancel-btn",
  58319. onClick: _cache[0] || (_cache[0] = ($event) => $setup.onCancel($setup.state.orderInfo.id))
  58320. },
  58321. vue.toDisplayString($setup.t("order.cancel_order")),
  58322. 1
  58323. /* TEXT */
  58324. )) : vue.createCommentVNode("v-if", true),
  58325. ((_b2 = $setup.state.orderInfo.buttons) == null ? void 0 : _b2.includes("pay")) ? (vue.openBlock(), vue.createElementBlock(
  58326. "button",
  58327. {
  58328. key: 1,
  58329. class: "ss-reset-button pay-btn ui-BG-Main-Gradient",
  58330. onClick: _cache[1] || (_cache[1] = ($event) => $setup.onPay($setup.state.orderInfo.payOrderId))
  58331. },
  58332. vue.toDisplayString($setup.t("order.continue_payment")),
  58333. 1
  58334. /* TEXT */
  58335. )) : vue.createCommentVNode("v-if", true),
  58336. vue.createCommentVNode(" TODO 非繁人:拼团接入 "),
  58337. vue.createCommentVNode(` <button class="ss-reset-button cancel-btn" v-if="state.orderInfo.buttons?.includes('combination')" @tap="
  58338. sheep.$router.go('/pages/activity/groupon/detail', {
  58339. id: state.orderInfo.ext.groupon_id,
  58340. })
  58341. ">
  58342. 拼团详情
  58343. </button> `),
  58344. vue.createCommentVNode(" 商家发货&&用户不售后就能看到物流 "),
  58345. ((_c = $setup.state.orderInfo.buttons) == null ? void 0 : _c.includes("express")) && !((_d = $setup.state.orderInfo.items[0]) == null ? void 0 : _d.refundStatus) ? (vue.openBlock(), vue.createElementBlock(
  58346. "button",
  58347. {
  58348. key: 2,
  58349. class: "ss-reset-button cancel-btn",
  58350. onClick: _cache[2] || (_cache[2] = ($event) => $setup.onExpress($setup.state.orderInfo.id))
  58351. },
  58352. vue.toDisplayString($setup.t("order.view_logistics")),
  58353. 1
  58354. /* TEXT */
  58355. )) : vue.createCommentVNode("v-if", true),
  58356. ((_e2 = $setup.state.orderInfo.buttons) == null ? void 0 : _e2.includes("confirm")) ? (vue.openBlock(), vue.createElementBlock(
  58357. "button",
  58358. {
  58359. key: 3,
  58360. class: "ss-reset-button cancel-btn",
  58361. onClick: _cache[3] || (_cache[3] = ($event) => $setup.onConfirm($setup.state.orderInfo.id))
  58362. },
  58363. vue.toDisplayString($setup.t("order.confirm_receipt")),
  58364. 1
  58365. /* TEXT */
  58366. )) : vue.createCommentVNode("v-if", true),
  58367. ((_f = $setup.state.orderInfo.buttons) == null ? void 0 : _f.includes("comment")) ? (vue.openBlock(), vue.createElementBlock(
  58368. "button",
  58369. {
  58370. key: 4,
  58371. class: "ss-reset-button cancel-btn",
  58372. onClick: _cache[4] || (_cache[4] = ($event) => $setup.onComment($setup.state.orderInfo.id))
  58373. },
  58374. vue.toDisplayString($setup.t("order.review_order")),
  58375. 1
  58376. /* TEXT */
  58377. )) : vue.createCommentVNode("v-if", true),
  58378. vue.createCommentVNode(" 售后用户退货 "),
  58379. ((_g = $setup.state.orderInfo.buttons) == null ? void 0 : _g.includes("aftersaleCancel")) ? (vue.openBlock(), vue.createElementBlock(
  58380. "button",
  58381. {
  58382. key: 5,
  58383. class: "ss-reset-button cancel-btn",
  58384. onClick: _cache[5] || (_cache[5] = ($event) => $setup.onApply($setup.state.orderInfo.items[0].afterSaleId))
  58385. },
  58386. vue.toDisplayString($setup.t("order.cancel_request")),
  58387. 1
  58388. /* TEXT */
  58389. )) : vue.createCommentVNode("v-if", true),
  58390. ((_h = $setup.state.orderInfo.buttons) == null ? void 0 : _h.includes("aftersaleDelivery")) ? (vue.openBlock(), vue.createElementBlock(
  58391. "button",
  58392. {
  58393. key: 6,
  58394. class: "ss-reset-button cancel-btn",
  58395. onClick: _cache[6] || (_cache[6] = ($event) => $setup.sheep.$router.go("/pages/order/aftersale/return-delivery", { id: $setup.state.orderInfo.items[0].afterSaleId }))
  58396. },
  58397. vue.toDisplayString($setup.t("order.fill_return")),
  58398. 1
  58399. /* TEXT */
  58400. )) : vue.createCommentVNode("v-if", true)
  58401. ])
  58402. ];
  58403. }),
  58404. _: 1
  58405. /* STABLE */
  58406. })) : vue.createCommentVNode("v-if", true)
  58407. ];
  58408. }),
  58409. _: 1
  58410. /* STABLE */
  58411. }, 8, ["title"]);
  58412. }
  58413. const PagesOrderDetail = /* @__PURE__ */ _export_sfc(_sfc_main$1y, [["render", _sfc_render$1x], ["__scopeId", "data-v-6b23c96c"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/order/detail.vue"]]);
  58414. const _sfc_main$1x = {
  58415. name: "UniTag",
  58416. emits: ["click"],
  58417. props: {
  58418. type: {
  58419. // 标签类型default、primary、success、warning、error、royal
  58420. type: String,
  58421. default: "default"
  58422. },
  58423. size: {
  58424. // 标签大小 normal, small
  58425. type: String,
  58426. default: "normal"
  58427. },
  58428. // 标签内容
  58429. text: {
  58430. type: String,
  58431. default: ""
  58432. },
  58433. disabled: {
  58434. // 是否为禁用状态
  58435. type: [Boolean, String],
  58436. default: false
  58437. },
  58438. inverted: {
  58439. // 是否为空心
  58440. type: [Boolean, String],
  58441. default: false
  58442. },
  58443. circle: {
  58444. // 是否为圆角样式
  58445. type: [Boolean, String],
  58446. default: false
  58447. },
  58448. mark: {
  58449. // 是否为标记样式
  58450. type: [Boolean, String],
  58451. default: false
  58452. },
  58453. customStyle: {
  58454. type: String,
  58455. default: ""
  58456. }
  58457. },
  58458. computed: {
  58459. classes() {
  58460. const {
  58461. type,
  58462. disabled,
  58463. inverted,
  58464. circle,
  58465. mark: mark2,
  58466. size,
  58467. isTrue
  58468. } = this;
  58469. const classArr = [
  58470. "uni-tag--" + type,
  58471. "uni-tag--" + size,
  58472. isTrue(disabled) ? "uni-tag--disabled" : "",
  58473. isTrue(inverted) ? "uni-tag--" + type + "--inverted" : "",
  58474. isTrue(circle) ? "uni-tag--circle" : "",
  58475. isTrue(mark2) ? "uni-tag--mark" : "",
  58476. // type === 'default' ? 'uni-tag--default' : 'uni-tag-text',
  58477. isTrue(inverted) ? "uni-tag--inverted uni-tag-text--" + type : "",
  58478. size === "small" ? "uni-tag-text--small" : ""
  58479. ];
  58480. return classArr.join(" ");
  58481. }
  58482. },
  58483. methods: {
  58484. isTrue(value) {
  58485. return value === true || value === "true";
  58486. },
  58487. onClick() {
  58488. if (this.isTrue(this.disabled))
  58489. return;
  58490. this.$emit("click");
  58491. }
  58492. }
  58493. };
  58494. function _sfc_render$1w(_ctx, _cache, $props, $setup, $data, $options) {
  58495. return $props.text ? (vue.openBlock(), vue.createElementBlock(
  58496. "text",
  58497. {
  58498. key: 0,
  58499. class: vue.normalizeClass(["uni-tag", $options.classes]),
  58500. style: vue.normalizeStyle($props.customStyle),
  58501. onClick: _cache[0] || (_cache[0] = (...args) => $options.onClick && $options.onClick(...args))
  58502. },
  58503. vue.toDisplayString($props.text),
  58504. 7
  58505. /* TEXT, CLASS, STYLE */
  58506. )) : vue.createCommentVNode("v-if", true);
  58507. }
  58508. const __easycom_0$8 = /* @__PURE__ */ _export_sfc(_sfc_main$1x, [["render", _sfc_render$1w], ["__scopeId", "data-v-1f94d070"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-tag/components/uni-tag/uni-tag.vue"]]);
  58509. const _sfc_main$1w = {
  58510. __name: "s-address-item",
  58511. props: {
  58512. item: {
  58513. type: Object,
  58514. default() {
  58515. }
  58516. },
  58517. hasBorderBottom: {
  58518. type: Boolean,
  58519. defult: true
  58520. },
  58521. spuType: {
  58522. type: Number
  58523. }
  58524. },
  58525. setup(__props, { expose: __expose }) {
  58526. __expose();
  58527. const props = __props;
  58528. const onEdit = () => {
  58529. if (props.spuType == 0) {
  58530. sheep$1.$router.go("/pages/user/dummyAddress/edit", {
  58531. id: props.item.id
  58532. });
  58533. } else {
  58534. sheep$1.$router.go("/pages/user/address/edit", {
  58535. id: props.item.id
  58536. });
  58537. }
  58538. };
  58539. const __returned__ = { props, onEdit, get sheep() {
  58540. return sheep$1;
  58541. }, get isEmpty() {
  58542. return lodashExports.isEmpty;
  58543. } };
  58544. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  58545. return __returned__;
  58546. }
  58547. };
  58548. function _sfc_render$1v(_ctx, _cache, $props, $setup, $data, $options) {
  58549. const _component_uni_tag = resolveEasycom(vue.resolveDynamicComponent("uni-tag"), __easycom_0$8);
  58550. return vue.openBlock(), vue.createElementBlock(
  58551. "view",
  58552. {
  58553. class: vue.normalizeClass(["address-item ss-flex ss-row-between ss-col-center", [{ "border-bottom": $setup.props.hasBorderBottom }]])
  58554. },
  58555. [
  58556. !$setup.isEmpty($setup.props.item) ? (vue.openBlock(), vue.createElementBlock("view", {
  58557. key: 0,
  58558. class: "item-left"
  58559. }, [
  58560. vue.createElementVNode("view", { class: "area-text ss-flex ss-col-center" }, [
  58561. $setup.props.item.defaultStatus ? (vue.openBlock(), vue.createBlock(_component_uni_tag, {
  58562. key: 0,
  58563. class: "ss-m-r-10",
  58564. size: "small",
  58565. "custom-style": "background-color: var(--ui-BG-Main); border-color: var(--ui-BG-Main); color: #fff;",
  58566. text: _ctx.$t("common.default")
  58567. }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true),
  58568. vue.createTextVNode(
  58569. " " + vue.toDisplayString($setup.props.item.areaName),
  58570. 1
  58571. /* TEXT */
  58572. )
  58573. ]),
  58574. vue.createElementVNode(
  58575. "view",
  58576. { class: "address-text" },
  58577. vue.toDisplayString($setup.props.item.detailAddress),
  58578. 1
  58579. /* TEXT */
  58580. ),
  58581. vue.createElementVNode(
  58582. "view",
  58583. { class: "person-text" },
  58584. vue.toDisplayString($setup.props.item.name) + " " + vue.toDisplayString($setup.props.item.mobile),
  58585. 1
  58586. /* TEXT */
  58587. )
  58588. ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1 }, [
  58589. vue.createElementVNode(
  58590. "view",
  58591. { class: "address-text ss-m-b-10" },
  58592. vue.toDisplayString(_ctx.$t("address.select_shipping_address")),
  58593. 1
  58594. /* TEXT */
  58595. )
  58596. ])),
  58597. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  58598. vue.createElementVNode("button", {
  58599. class: "ss-reset-button edit-btn",
  58600. onClick: vue.withModifiers($setup.onEdit, ["stop"])
  58601. }, [
  58602. vue.createElementVNode("view", { class: "edit-icon ss-flex ss-row-center ss-col-center" }, [
  58603. vue.createElementVNode("image", {
  58604. src: $setup.sheep.$url.static("/static/images/edit.png")
  58605. }, null, 8, ["src"])
  58606. ])
  58607. ])
  58608. ], true)
  58609. ],
  58610. 2
  58611. /* CLASS */
  58612. );
  58613. }
  58614. const __easycom_0$7 = /* @__PURE__ */ _export_sfc(_sfc_main$1w, [["render", _sfc_render$1v], ["__scopeId", "data-v-bb7deb2b"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-address-item/s-address-item.vue"]]);
  58615. const _sfc_main$1v = {
  58616. __name: "s-points-pop",
  58617. props: {
  58618. modelValue: {
  58619. type: Object,
  58620. default() {
  58621. }
  58622. },
  58623. show: {
  58624. type: Boolean,
  58625. default: false
  58626. },
  58627. currentMemberPoints: {
  58628. type: Number,
  58629. default: 0
  58630. },
  58631. currentTotalPrice: {
  58632. type: Number,
  58633. default: 0
  58634. },
  58635. currentDeliveryPrice: {
  58636. type: Number,
  58637. default: 0
  58638. }
  58639. },
  58640. emits: ["confirm", "close"],
  58641. setup(__props, { expose: __expose, emit: __emit }) {
  58642. __expose();
  58643. const props = __props;
  58644. const emits = __emit;
  58645. const state = vue.reactive({
  58646. points: 0,
  58647. disabled: false
  58648. });
  58649. const currentOrderMemberPoints = vue.computed(() => {
  58650. return parseFloat(props.currentMemberPoints);
  58651. });
  58652. const currentOrderTotalPrice = vue.computed(() => {
  58653. return parseFloat(props.currentTotalPrice);
  58654. });
  58655. const currentOrderDeliveryPrice = vue.computed(() => {
  58656. return parseFloat(props.currentDeliveryPrice);
  58657. });
  58658. const canUesPoint = vue.computed(() => {
  58659. if (!currentOrderTotalPrice.value)
  58660. return currentOrderTotalPrice.value;
  58661. return (currentOrderTotalPrice.value - currentOrderDeliveryPrice.value).toFixed(2);
  58662. });
  58663. vue.watchEffect(() => {
  58664. const strPoints = state.points.toString();
  58665. const [integerPart, decimalPart] = strPoints.split(".");
  58666. if (decimalPart) {
  58667. const points = parseFloat(`${integerPart}.${decimalPart.slice(0, 2)}`);
  58668. vue.nextTick(() => {
  58669. state.points = points;
  58670. });
  58671. }
  58672. if (state.points > currentOrderMemberPoints.value) {
  58673. vue.nextTick(() => {
  58674. state.points = currentOrderMemberPoints.value;
  58675. });
  58676. }
  58677. if (state.points > canUesPoint.value) {
  58678. vue.nextTick(() => {
  58679. state.points = canUesPoint.value;
  58680. });
  58681. }
  58682. if (canUesPoint.value == 0 || canUesPoint.value < 0) {
  58683. state.disabled = true;
  58684. }
  58685. if (canUesPoint.value > 0) {
  58686. state.disabled = false;
  58687. }
  58688. });
  58689. const onConfirm = () => {
  58690. if (state.points === "") {
  58691. state.points = 0;
  58692. }
  58693. emits("confirm", state.points);
  58694. };
  58695. const __returned__ = { props, emits, state, currentOrderMemberPoints, currentOrderTotalPrice, currentOrderDeliveryPrice, canUesPoint, onConfirm, computed: vue.computed, reactive: vue.reactive, ref: vue.ref, watch: vue.watch, nextTick: vue.nextTick, watchEffect: vue.watchEffect };
  58696. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  58697. return __returned__;
  58698. }
  58699. };
  58700. function _sfc_render$1u(_ctx, _cache, $props, $setup, $data, $options) {
  58701. const _component_su_popup = resolveEasycom(vue.resolveDynamicComponent("su-popup"), __easycom_4$3);
  58702. return vue.openBlock(), vue.createBlock(_component_su_popup, {
  58703. show: $props.show,
  58704. type: "bottom",
  58705. round: "10",
  58706. onClose: _cache[2] || (_cache[2] = ($event) => $setup.emits("close")),
  58707. showClose: "",
  58708. backgroundColor: "#ffffff"
  58709. }, {
  58710. default: vue.withCtx(() => [
  58711. vue.createElementVNode(
  58712. "view",
  58713. { class: "title ss-m-t-16 ss-m-l-20 ss-flex" },
  58714. vue.toDisplayString(_ctx.$t("pop.Commission.usingCommission")),
  58715. 1
  58716. /* TEXT */
  58717. ),
  58718. vue.createElementVNode("view", { class: "model-box ss-p-x-30" }, [
  58719. vue.withDirectives(vue.createElementVNode("input", {
  58720. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.state.points = $event),
  58721. class: "uni-input input-points ss-m-b-10",
  58722. type: "number",
  58723. placeholder: "请输入抵扣佣金",
  58724. oninput: "this.value=this.value.replace(/\\D/g);",
  58725. disabled: $setup.state.disabled
  58726. }, null, 8, ["disabled"]), [
  58727. [
  58728. vue.vModelText,
  58729. $setup.state.points,
  58730. void 0,
  58731. { number: true }
  58732. ]
  58733. ])
  58734. ]),
  58735. vue.createElementVNode("view", { class: "modal-footer text-center" }, [
  58736. vue.createElementVNode("view", { class: "subtitle text-disabled" }, [
  58737. vue.createTextVNode(
  58738. vue.toDisplayString(_ctx.$t("pop.Commission.availableCommission")) + ":",
  58739. 1
  58740. /* TEXT */
  58741. ),
  58742. vue.createElementVNode(
  58743. "text",
  58744. { class: "text-red" },
  58745. vue.toDisplayString($props.currentMemberPoints),
  58746. 1
  58747. /* TEXT */
  58748. )
  58749. ]),
  58750. vue.createElementVNode("view", { class: "subtitle text-disabled" }, [
  58751. vue.createTextVNode(
  58752. vue.toDisplayString(_ctx.$t("pop.Commission.currentOrderTotalPrice")),
  58753. 1
  58754. /* TEXT */
  58755. ),
  58756. vue.createElementVNode(
  58757. "text",
  58758. { class: "text-red" },
  58759. "¥" + vue.toDisplayString($setup.currentOrderTotalPrice),
  58760. 1
  58761. /* TEXT */
  58762. ),
  58763. vue.createTextVNode(
  58764. vue.toDisplayString(_ctx.$t("pop.Commission.canUseMaxCommission")),
  58765. 1
  58766. /* TEXT */
  58767. ),
  58768. vue.createElementVNode(
  58769. "text",
  58770. { class: "text-red" },
  58771. vue.toDisplayString($setup.canUesPoint),
  58772. 1
  58773. /* TEXT */
  58774. ),
  58775. vue.createTextVNode(
  58776. vue.toDisplayString(_ctx.$t("pop.Commission.commission")),
  58777. 1
  58778. /* TEXT */
  58779. )
  58780. ]),
  58781. vue.createElementVNode("view", { class: "ss-flex ss-m-y-20 ss-col-center" }, [
  58782. vue.createElementVNode(
  58783. "button",
  58784. {
  58785. class: "confirm-btn ss-reset-button",
  58786. onClick: _cache[1] || (_cache[1] = ($event) => {
  58787. $setup.state.points = 0;
  58788. $setup.emits("confirm", $setup.state.points);
  58789. })
  58790. },
  58791. vue.toDisplayString(_ctx.$t("pop.cancel")),
  58792. 1
  58793. /* TEXT */
  58794. ),
  58795. vue.createElementVNode(
  58796. "button",
  58797. {
  58798. class: "confirm-btn ss-reset-button",
  58799. onClick: $setup.onConfirm
  58800. },
  58801. vue.toDisplayString(_ctx.$t("pop.confirm")),
  58802. 1
  58803. /* TEXT */
  58804. )
  58805. ])
  58806. ])
  58807. ]),
  58808. _: 1
  58809. /* STABLE */
  58810. }, 8, ["show"]);
  58811. }
  58812. const __easycom_3$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1v, [["render", _sfc_render$1u], ["__scopeId", "data-v-8dbeaa2a"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-points-pop/s-points-pop.vue"]]);
  58813. const _sfc_main$1u = {
  58814. __name: "s-consumptionPoints-pop",
  58815. props: {
  58816. modelValue: {
  58817. // 优惠劵列表
  58818. type: Object,
  58819. default() {
  58820. }
  58821. },
  58822. show: {
  58823. type: Boolean,
  58824. default: false
  58825. },
  58826. currentMemberConsumptionPoints: {
  58827. type: Number,
  58828. default: 0
  58829. },
  58830. currentTotalPrice: {
  58831. type: Number,
  58832. default: 0
  58833. },
  58834. currentDeliveryPrice: {
  58835. type: Number,
  58836. default: 0
  58837. }
  58838. },
  58839. emits: ["confirm", "close"],
  58840. setup(__props, { expose: __expose, emit: __emit }) {
  58841. __expose();
  58842. const props = __props;
  58843. const emits = __emit;
  58844. const state = vue.reactive({
  58845. points: 0,
  58846. disabled: false
  58847. });
  58848. const currentOrderMemberPoints = vue.computed(() => {
  58849. return parseFloat(props.currentMemberConsumptionPoints);
  58850. });
  58851. const currentOrderTotalPrice = vue.computed(() => {
  58852. return parseFloat(props.currentTotalPrice);
  58853. });
  58854. const currentOrderDeliveryPrice = vue.computed(() => {
  58855. return parseFloat(props.currentDeliveryPrice);
  58856. });
  58857. const canUesPoint = vue.computed(() => {
  58858. if (!currentOrderTotalPrice.value)
  58859. return currentOrderTotalPrice.value;
  58860. return (currentOrderTotalPrice.value - currentOrderDeliveryPrice.value).toFixed(2);
  58861. });
  58862. vue.watchEffect(() => {
  58863. const strPoints = state.points.toString();
  58864. const [integerPart, decimalPart] = strPoints.split(".");
  58865. if (decimalPart) {
  58866. const points = parseFloat(`${integerPart}.${decimalPart.slice(0, 2)}`);
  58867. vue.nextTick(() => {
  58868. state.points = points;
  58869. });
  58870. }
  58871. if (state.points > currentOrderMemberPoints.value) {
  58872. vue.nextTick(() => {
  58873. state.points = currentOrderMemberPoints.value;
  58874. });
  58875. }
  58876. if (state.points > canUesPoint.value) {
  58877. vue.nextTick(() => {
  58878. state.points = canUesPoint.value;
  58879. });
  58880. }
  58881. if (canUesPoint.value == 0 || canUesPoint.value < 0) {
  58882. state.disabled = true;
  58883. }
  58884. if (canUesPoint.value > 0) {
  58885. state.disabled = false;
  58886. }
  58887. });
  58888. const onConfirm = () => {
  58889. if (state.points === "") {
  58890. state.points = 0;
  58891. }
  58892. emits("confirm", state.points);
  58893. };
  58894. const __returned__ = { props, emits, state, currentOrderMemberPoints, currentOrderTotalPrice, currentOrderDeliveryPrice, canUesPoint, onConfirm, computed: vue.computed, reactive: vue.reactive, ref: vue.ref, watch: vue.watch, nextTick: vue.nextTick, watchEffect: vue.watchEffect };
  58895. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  58896. return __returned__;
  58897. }
  58898. };
  58899. function _sfc_render$1t(_ctx, _cache, $props, $setup, $data, $options) {
  58900. const _component_su_popup = resolveEasycom(vue.resolveDynamicComponent("su-popup"), __easycom_4$3);
  58901. return vue.openBlock(), vue.createBlock(_component_su_popup, {
  58902. show: $props.show,
  58903. type: "bottom",
  58904. round: "10",
  58905. onClose: _cache[2] || (_cache[2] = ($event) => $setup.emits("close")),
  58906. showClose: "",
  58907. backgroundColor: "#ffffff"
  58908. }, {
  58909. default: vue.withCtx(() => [
  58910. vue.createElementVNode(
  58911. "view",
  58912. { class: "title ss-m-t-16 ss-m-l-20 ss-flex" },
  58913. vue.toDisplayString(_ctx.$t("pop.ConsumptionPoints.usingPoints")),
  58914. 1
  58915. /* TEXT */
  58916. ),
  58917. vue.createElementVNode("view", { class: "model-box ss-p-x-30" }, [
  58918. vue.withDirectives(vue.createElementVNode("input", {
  58919. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.state.points = $event),
  58920. class: "uni-input input-points ss-m-b-10",
  58921. type: "number",
  58922. placeholder: "请输入抵扣消费分",
  58923. oninput: "this.value=this.value.replace(/\\D/g);",
  58924. disabled: $setup.state.disabled
  58925. }, null, 8, ["disabled"]), [
  58926. [
  58927. vue.vModelText,
  58928. $setup.state.points,
  58929. void 0,
  58930. { number: true }
  58931. ]
  58932. ])
  58933. ]),
  58934. vue.createElementVNode("view", { class: "modal-footer text-center" }, [
  58935. vue.createElementVNode("view", { class: "subtitle text-disabled" }, [
  58936. vue.createTextVNode(
  58937. vue.toDisplayString(_ctx.$t("pop.ConsumptionPoints.availablePoints")) + ":",
  58938. 1
  58939. /* TEXT */
  58940. ),
  58941. vue.createElementVNode(
  58942. "text",
  58943. { class: "text-red" },
  58944. vue.toDisplayString($props.currentMemberConsumptionPoints),
  58945. 1
  58946. /* TEXT */
  58947. )
  58948. ]),
  58949. vue.createElementVNode("view", { class: "subtitle text-disabled" }, [
  58950. vue.createTextVNode(
  58951. vue.toDisplayString(_ctx.$t("pop.ConsumptionPoints.currentOrderTotalPrice")),
  58952. 1
  58953. /* TEXT */
  58954. ),
  58955. vue.createElementVNode(
  58956. "text",
  58957. { class: "text-red" },
  58958. "¥" + vue.toDisplayString($setup.currentOrderTotalPrice),
  58959. 1
  58960. /* TEXT */
  58961. ),
  58962. vue.createTextVNode(
  58963. vue.toDisplayString(_ctx.$t("pop.ConsumptionPoints.canUseMaxPoints")),
  58964. 1
  58965. /* TEXT */
  58966. ),
  58967. vue.createElementVNode(
  58968. "text",
  58969. { class: "text-red" },
  58970. vue.toDisplayString($setup.canUesPoint),
  58971. 1
  58972. /* TEXT */
  58973. ),
  58974. vue.createTextVNode(
  58975. vue.toDisplayString(_ctx.$t("pop.ConsumptionPoints.points")),
  58976. 1
  58977. /* TEXT */
  58978. )
  58979. ]),
  58980. vue.createElementVNode("view", { class: "ss-flex ss-m-y-20 ss-col-center" }, [
  58981. vue.createElementVNode(
  58982. "button",
  58983. {
  58984. class: "confirm-btn ss-reset-button",
  58985. onClick: _cache[1] || (_cache[1] = ($event) => {
  58986. $setup.state.points = 0;
  58987. $setup.emits("confirm", $setup.state.points);
  58988. })
  58989. },
  58990. vue.toDisplayString(_ctx.$t("pop.cancel")),
  58991. 1
  58992. /* TEXT */
  58993. ),
  58994. vue.createElementVNode(
  58995. "button",
  58996. {
  58997. class: "confirm-btn ss-reset-button",
  58998. onClick: $setup.onConfirm
  58999. },
  59000. vue.toDisplayString(_ctx.$t("pop.confirm")),
  59001. 1
  59002. /* TEXT */
  59003. )
  59004. ])
  59005. ])
  59006. ]),
  59007. _: 1
  59008. /* STABLE */
  59009. }, 8, ["show"]);
  59010. }
  59011. const __easycom_4 = /* @__PURE__ */ _export_sfc(_sfc_main$1u, [["render", _sfc_render$1t], ["__scopeId", "data-v-062685a8"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-consumptionPoints-pop/s-consumptionPoints-pop.vue"]]);
  59012. const _sfc_main$1t = {
  59013. __name: "confirm",
  59014. setup(__props, { expose: __expose }) {
  59015. __expose();
  59016. const state = vue.reactive({
  59017. orderPayload: {},
  59018. orderInfo: {
  59019. items: [],
  59020. // 商品项列表
  59021. price: {}
  59022. // 价格信息
  59023. },
  59024. addressInfo: {},
  59025. // 选择的收货地址
  59026. showPoints: false,
  59027. // 是否佣金抵扣
  59028. showConsumptionPoints: false,
  59029. // 是否消费分抵扣
  59030. couponInfo: [],
  59031. // 优惠劵列表
  59032. showDiscount: false,
  59033. // 是否展示营销活动
  59034. currentMemberPoints: 0,
  59035. //用户当前可用佣金
  59036. currentMemberConsumptionPoints: 0,
  59037. //用户当前可用消费分
  59038. usedPoint: 0,
  59039. //用户使用的佣金
  59040. usedConsumptionPoints: 0,
  59041. //用户使用的消费分
  59042. currentTotalPrice: 0,
  59043. //当前的整个订单的总价格
  59044. currentDeliveryPrice: 0
  59045. // 当前订单的总运费
  59046. });
  59047. const shopsByNames = vue.computed(() => {
  59048. const shops = {};
  59049. try {
  59050. Object.keys(state.orderInfo.shopRespVOMap).forEach((shopId) => {
  59051. const shopName = state.orderInfo.shopNameMap[shopId];
  59052. if (shopName) {
  59053. shops[shopName] = state.orderInfo.shopRespVOMap[shopId];
  59054. shops[shopName].remark = "";
  59055. shops[shopName].shopId = shopId;
  59056. }
  59057. });
  59058. } catch (e2) {
  59059. }
  59060. return shops;
  59061. });
  59062. const totalItemCount = vue.computed(() => {
  59063. let totalCount = 0;
  59064. Object.values(shopsByNames.value).forEach((shop) => {
  59065. shop.items.forEach((item) => {
  59066. totalCount += item.count;
  59067. });
  59068. });
  59069. return totalCount;
  59070. });
  59071. function onSelectAddress() {
  59072. uni.$once("SELECT_ADDRESS", (e2) => {
  59073. changeConsignee(e2.addressInfo);
  59074. });
  59075. if (state.orderPayload.spuType) {
  59076. sheep$1.$router.go("/pages/user/address/list");
  59077. } else {
  59078. sheep$1.$router.go("/pages/user/dummyAddress/list");
  59079. }
  59080. }
  59081. async function changeConsignee(addressInfo = {}) {
  59082. if (!lodashExports.isEmpty(addressInfo)) {
  59083. state.addressInfo = addressInfo;
  59084. }
  59085. await getOrderInfo();
  59086. }
  59087. async function onInputPoints(points) {
  59088. if (points == void 0) {
  59089. points = 0;
  59090. }
  59091. const payprice = state.currentTotalPrice;
  59092. formatAppLog("log", "at pages/order/confirm.vue:330", points, payprice);
  59093. state.usedPoint = points;
  59094. state.usedConsumptionPoints = 0;
  59095. state.showPoints = false;
  59096. }
  59097. function onInputConsumptionPoints(points) {
  59098. if (points == void 0) {
  59099. points = 0;
  59100. }
  59101. state.currentTotalPrice;
  59102. state.usedConsumptionPoints = points;
  59103. state.usedPoint = 0;
  59104. state.showConsumptionPoints = false;
  59105. }
  59106. function onConfirm() {
  59107. if (!state.addressInfo.id) {
  59108. sheep$1.$helper.toast(t$6("confirm.select_shipping_address"));
  59109. return;
  59110. }
  59111. if (parseFloat(state.usedPoint) && parseFloat(state.usedPoint) > parseFloat(state.currentMemberPoints)) {
  59112. sheep$1.$helper.toast(t$6("confirm.insufficient_commission"));
  59113. return;
  59114. }
  59115. if (parseFloat(state.usedConsumptionPoints) && parseFloat(state.usedConsumptionPoints) > parseFloat(state.currentMemberConsumptionPoints)) {
  59116. sheep$1.$helper.toast(t$6("confirm.insufficient_consumption_points"));
  59117. return;
  59118. }
  59119. if (parseFloat(state.usedPoint) && parseFloat(state.usedConsumptionPoints)) {
  59120. sheep$1.$helper.toast(t$6("confirm.commission_points_no_mix"));
  59121. return;
  59122. }
  59123. submitOrder();
  59124. }
  59125. function customRound(number2, decimals) {
  59126. let factor = Math.pow(10, decimals);
  59127. let tempNumber = Math.floor(number2 * factor) / factor;
  59128. return tempNumber.toFixed(decimals);
  59129. }
  59130. async function submitOrder() {
  59131. const shops = shopsByNames.value;
  59132. const shopRemarks = {};
  59133. Object.keys(shops).forEach((shopName) => {
  59134. const shop = shops[shopName];
  59135. shopRemarks[shop.shopId] = shop.remark;
  59136. });
  59137. const usedPoint = state.orderPayload.highPrecision ? customRound(state.orderInfo.price.virtualPayPrice / 100, 2) : state.usedPoint;
  59138. const {
  59139. code: code2,
  59140. data
  59141. } = await OrderApi.createOrder({
  59142. items: state.orderPayload.items,
  59143. couponId: state.orderPayload.couponId,
  59144. addressId: state.addressInfo.id,
  59145. deliveryType: state.orderPayload.spuType == 1 ? 1 : 3,
  59146. // TODO 非繁人:需要支持【门店自提】
  59147. pointStatus: false,
  59148. // TODO 非繁人:需要支持【佣金选择】
  59149. combinationActivityId: state.orderPayload.combinationActivityId,
  59150. combinationHeadId: state.orderPayload.combinationHeadId,
  59151. seckillActivityId: state.orderPayload.seckillActivityId,
  59152. payIntegral: usedPoint,
  59153. payConsumptionPoints: state.usedConsumptionPoints,
  59154. shopRemarks
  59155. });
  59156. if (code2 !== 0) {
  59157. return;
  59158. }
  59159. if (state.orderPayload.items[0].cartId > 0) {
  59160. sheep$1.$store("cart").getList();
  59161. }
  59162. sheep$1.$router.redirect("/pages/pay/index", {
  59163. id: data.payOrderId,
  59164. type: 1
  59165. });
  59166. }
  59167. async function getOrderInfo() {
  59168. const shops = shopsByNames.value;
  59169. let shopRemarks = {};
  59170. if (Object.keys(shops).length !== 0) {
  59171. Object.keys(shops).forEach((shopName) => {
  59172. const shop = shops[shopName];
  59173. shopRemarks[shopName] = shop.remark;
  59174. });
  59175. }
  59176. const {
  59177. data,
  59178. code: code2
  59179. } = await OrderApi.settlementOrder({
  59180. items: state.orderPayload.items,
  59181. couponId: state.orderPayload.couponId,
  59182. addressId: state.addressInfo.id,
  59183. deliveryType: state.orderPayload.spuType == 1 ? 1 : 3,
  59184. // TODO 非繁人:需要支持【门店自提】
  59185. pointStatus: false,
  59186. // TODO 非繁人:需要支持【佣金选择】
  59187. combinationActivityId: state.orderPayload.combinationActivityId,
  59188. combinationHeadId: state.orderPayload.combinationHeadId,
  59189. seckillActivityId: state.orderPayload.seckillActivityId,
  59190. usedPoint: state.usedPoint,
  59191. addressType: state.orderPayload.spuType == 1 ? 1 : 2
  59192. //如果是虚拟产品
  59193. });
  59194. if (code2 !== 0) {
  59195. return;
  59196. }
  59197. state.orderInfo = data;
  59198. if (Object.keys(shopRemarks).length !== 0) {
  59199. Object.keys(shopRemarks).forEach((shopName) => {
  59200. shopsByNames.value[shopName].remark = shopRemarks[shopName];
  59201. });
  59202. }
  59203. if (state.orderInfo.address) {
  59204. state.addressInfo = state.orderInfo.address;
  59205. }
  59206. state.currentMemberPoints = state.orderInfo.currentQuota > 0 ? points2point(state.orderInfo.currentQuota) : 0;
  59207. state.currentMemberConsumptionPoints = state.orderInfo.consumePoints > 0 ? points2point(state.orderInfo.consumePoints) : 0;
  59208. state.currentTotalPrice = fen2yuan(state.orderInfo.price.payPrice);
  59209. state.currentDeliveryPrice = fen2yuan(state.orderInfo.price.deliveryPrice);
  59210. if (state.orderPayload.spuPayType == 2) {
  59211. state.usedPoint = state.currentTotalPrice - 0.01;
  59212. }
  59213. }
  59214. onLoad(async (options2) => {
  59215. if (!options2.data) {
  59216. sheep$1.$helper.toast("参数不正确,请检查!");
  59217. return;
  59218. }
  59219. state.orderPayload = JSON.parse(options2.data);
  59220. await getOrderInfo();
  59221. });
  59222. const __returned__ = { state, shopsByNames, totalItemCount, onSelectAddress, changeConsignee, onInputPoints, onInputConsumptionPoints, onConfirm, customRound, submitOrder, getOrderInfo, reactive: vue.reactive, computed: vue.computed, get onLoad() {
  59223. return onLoad;
  59224. }, get sheep() {
  59225. return sheep$1;
  59226. }, get isEmpty() {
  59227. return lodashExports.isEmpty;
  59228. }, get OrderApi() {
  59229. return OrderApi;
  59230. }, get CouponApi() {
  59231. return CouponApi;
  59232. }, get fen2yuan() {
  59233. return fen2yuan;
  59234. }, get points2point() {
  59235. return points2point;
  59236. }, get fen2yuan6() {
  59237. return fen2yuan6;
  59238. }, get t() {
  59239. return t$6;
  59240. } };
  59241. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  59242. return __returned__;
  59243. }
  59244. };
  59245. function _sfc_render$1s(_ctx, _cache, $props, $setup, $data, $options) {
  59246. const _component_s_address_item = resolveEasycom(vue.resolveDynamicComponent("s-address-item"), __easycom_0$7);
  59247. const _component_s_goods_item = resolveEasycom(vue.resolveDynamicComponent("s-goods-item"), __easycom_3$5);
  59248. const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l);
  59249. const _component_s_points_pop = resolveEasycom(vue.resolveDynamicComponent("s-points-pop"), __easycom_3$3);
  59250. const _component_s_consumptionPoints_pop = resolveEasycom(vue.resolveDynamicComponent("s-consumptionPoints-pop"), __easycom_4);
  59251. const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9);
  59252. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  59253. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  59254. title: $setup.t("confirm.confirm_order")
  59255. }, {
  59256. default: vue.withCtx(() => [
  59257. vue.createCommentVNode(' TODO:这个判断先删除 v-if="state.orderInfo.need_address === 1" '),
  59258. vue.createElementVNode("view", {
  59259. class: "bg-white address-box ss-m-b-14 ss-r-b-10",
  59260. onClick: $setup.onSelectAddress
  59261. }, [
  59262. vue.createVNode(_component_s_address_item, {
  59263. item: $setup.state.addressInfo,
  59264. spuType: $setup.state.orderPayload.spuType,
  59265. hasBorderBottom: false
  59266. }, {
  59267. default: vue.withCtx(() => [
  59268. vue.createElementVNode("view", { class: "ss-rest-button" }, [
  59269. vue.createElementVNode("text", { class: "_icon-forward" })
  59270. ])
  59271. ]),
  59272. _: 1
  59273. /* STABLE */
  59274. }, 8, ["item", "spuType"])
  59275. ]),
  59276. vue.createCommentVNode(" 商品信息 "),
  59277. vue.createCommentVNode(" {{shopsByNames}} "),
  59278. (vue.openBlock(true), vue.createElementBlock(
  59279. vue.Fragment,
  59280. null,
  59281. vue.renderList($setup.shopsByNames, (items, name2) => {
  59282. return vue.openBlock(), vue.createElementBlock("view", {
  59283. class: "order-card-box ss-m-b-14",
  59284. key: name2
  59285. }, [
  59286. vue.createElementVNode(
  59287. "view",
  59288. { class: "title-text ss-p-x-20 ss-p-t-20" },
  59289. vue.toDisplayString(name2),
  59290. 1
  59291. /* TEXT */
  59292. ),
  59293. (vue.openBlock(true), vue.createElementBlock(
  59294. vue.Fragment,
  59295. null,
  59296. vue.renderList(items.items, (item) => {
  59297. var _a2;
  59298. return vue.openBlock(), vue.createBlock(_component_s_goods_item, {
  59299. key: item == null ? void 0 : item.skuId,
  59300. img: item == null ? void 0 : item.picUrl,
  59301. title: item == null ? void 0 : item.spuName,
  59302. skuText: (_a2 = item == null ? void 0 : item.properties) == null ? void 0 : _a2.map((property) => property.valueName).join(" "),
  59303. price: item.highPrecisionPrice ? item == null ? void 0 : item.highPrecisionPrice : item == null ? void 0 : item.price,
  59304. num: item == null ? void 0 : item.count,
  59305. virtualPirce: item.highPrecisionPrice ? true : false
  59306. }, null, 8, ["img", "title", "skuText", "price", "num", "virtualPirce"]);
  59307. }),
  59308. 128
  59309. /* KEYED_FRAGMENT */
  59310. )),
  59311. vue.createElementVNode("view", { class: "order-item ss-flex ss-col-center ss-row-between ss-p-x-20 bg-white ss-r-10" }, [
  59312. vue.createElementVNode(
  59313. "view",
  59314. { class: "item-title" },
  59315. vue.toDisplayString($setup.t("confirm.shipping_fee")),
  59316. 1
  59317. /* TEXT */
  59318. ),
  59319. vue.createElementVNode(
  59320. "view",
  59321. { class: "ss-flex ss-col-center" },
  59322. vue.toDisplayString(items.price.deliveryPrice ? "¥" + $setup.fen2yuan(items.price.deliveryPrice) : $setup.t("confirm.free_shipping")),
  59323. 1
  59324. /* TEXT */
  59325. )
  59326. ]),
  59327. vue.createCommentVNode(" 暂不做开发票 "),
  59328. vue.createCommentVNode(` <view class="order-item ss-flex ss-col-center ss-row-between ss-p-x-20 bg-white ss-r-10">
  59329. <view class="item-title">开具发票</view>
  59330. <view class="ss-flex ss-col-center">
  59331. <text class="item-value" :class="state.couponInfo.length > 0 ? 'text-red' : 'text-disabled'">
  59332. {{
  59333. state.couponInfo.length > 0 ? state.couponInfo.length + ' 张可用' : '不开具发票'
  59334. }}
  59335. </text>
  59336. <text class="_icon-forward item-icon" />
  59337. </view>
  59338. </view> `),
  59339. vue.createElementVNode("view", { class: "order-item ss-flex ss-col-center ss-row-between ss-p-x-20 bg-white ss-r-10" }, [
  59340. vue.createElementVNode(
  59341. "view",
  59342. { class: "item-title" },
  59343. vue.toDisplayString($setup.t("confirm.order_note")),
  59344. 1
  59345. /* TEXT */
  59346. ),
  59347. vue.createElementVNode("view", { class: "ss-flex ss-col-center" }, [
  59348. vue.createVNode(_component_uni_easyinput, {
  59349. maxlength: "20",
  59350. placeholder: $setup.t("confirm.communication_advice"),
  59351. modelValue: items.remark,
  59352. "onUpdate:modelValue": ($event) => items.remark = $event,
  59353. inputBorder: false,
  59354. clearable: false
  59355. }, null, 8, ["placeholder", "modelValue", "onUpdate:modelValue"])
  59356. ])
  59357. ]),
  59358. $setup.state.orderPayload.spuType == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  59359. key: 0,
  59360. class: "order-item ss-flex ss-col-center ss-row-between ss-p-x-20 bg-white ss-r-10"
  59361. }, [
  59362. vue.createElementVNode(
  59363. "view",
  59364. { class: "item-title" },
  59365. vue.toDisplayString($setup.t("confirm.quantity")),
  59366. 1
  59367. /* TEXT */
  59368. ),
  59369. vue.createElementVNode(
  59370. "view",
  59371. { class: "ss-flex ss-col-center" },
  59372. vue.toDisplayString($setup.totalItemCount),
  59373. 1
  59374. /* TEXT */
  59375. )
  59376. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  59377. key: 1,
  59378. class: "order-item ss-flex ss-col-center ss-row-between ss-p-x-20 bg-white ss-r-10"
  59379. }, [
  59380. vue.createElementVNode(
  59381. "view",
  59382. { class: "item-title" },
  59383. vue.toDisplayString($setup.t("common.total")),
  59384. 1
  59385. /* TEXT */
  59386. ),
  59387. vue.createElementVNode("view", { class: "ss-flex ss-col-center" }, [
  59388. $setup.state.orderPayload.spuPayType == 2 ? (vue.openBlock(), vue.createElementBlock("image", {
  59389. key: 0,
  59390. src: _imports_0$6,
  59391. style: { "width": "30rpx", "height": "30rpx" }
  59392. })) : (vue.openBlock(), vue.createElementBlock("text", { key: 1 }, "¥")),
  59393. vue.createTextVNode(
  59394. " " + vue.toDisplayString($setup.fen2yuan(items.price.payPrice)),
  59395. 1
  59396. /* TEXT */
  59397. )
  59398. ])
  59399. ]))
  59400. ]);
  59401. }),
  59402. 128
  59403. /* KEYED_FRAGMENT */
  59404. )),
  59405. vue.createCommentVNode(" 价格信息 "),
  59406. vue.createElementVNode("view", { class: "bg-white total-card-box ss-p-20 ss-m-b-14 ss-r-10" }, [
  59407. vue.createElementVNode(
  59408. "view",
  59409. { class: "title-text" },
  59410. vue.toDisplayString($setup.t("confirm.price_details")),
  59411. 1
  59412. /* TEXT */
  59413. ),
  59414. vue.createElementVNode("view", { class: "total-box-content border-bottom" }, [
  59415. vue.createElementVNode("view", { class: "order-item ss-flex ss-col-center ss-row-between" }, [
  59416. vue.createElementVNode(
  59417. "view",
  59418. { class: "item-title" },
  59419. vue.toDisplayString($setup.t("confirm.total_price")) + " " + vue.toDisplayString($setup.t("confirm.total_items", { count: $setup.totalItemCount })),
  59420. 1
  59421. /* TEXT */
  59422. ),
  59423. vue.createElementVNode("view", { class: "ss-flex ss-col-center" }, [
  59424. vue.createElementVNode("text", { class: "item-value ss-m-r-24" }, [
  59425. $setup.state.orderPayload.spuPayType == 2 ? (vue.openBlock(), vue.createElementBlock("image", {
  59426. key: 0,
  59427. src: _imports_0$6,
  59428. style: { "width": "30rpx", "height": "30rpx" }
  59429. })) : (vue.openBlock(), vue.createElementBlock("text", { key: 1 }, "¥")),
  59430. $setup.state.orderPayload.highPrecision ? (vue.openBlock(), vue.createElementBlock(
  59431. "text",
  59432. { key: 2 },
  59433. vue.toDisplayString($setup.fen2yuan6($setup.state.orderInfo.price.virtualTotalPrice)),
  59434. 1
  59435. /* TEXT */
  59436. )) : (vue.openBlock(), vue.createElementBlock(
  59437. "text",
  59438. { key: 3 },
  59439. vue.toDisplayString($setup.fen2yuan($setup.state.orderInfo.price.totalPrice)),
  59440. 1
  59441. /* TEXT */
  59442. ))
  59443. ])
  59444. ])
  59445. ]),
  59446. vue.createCommentVNode(" TODO 非繁人:接入佣金 "),
  59447. vue.createElementVNode("view", { class: "order-item ss-flex ss-col-center ss-row-between" }, [
  59448. vue.createElementVNode(
  59449. "view",
  59450. { class: "item-title" },
  59451. vue.toDisplayString($setup.t("confirm.shipping_fee")),
  59452. 1
  59453. /* TEXT */
  59454. ),
  59455. vue.createElementVNode("view", { class: "ss-flex ss-col-center" }, [
  59456. vue.createElementVNode("text", { class: "item-value ss-m-r-24" }, [
  59457. $setup.state.orderPayload.spuPayType == 2 ? (vue.openBlock(), vue.createElementBlock("image", {
  59458. key: 0,
  59459. src: _imports_0$6,
  59460. style: { "width": "30rpx", "height": "30rpx" }
  59461. })) : (vue.openBlock(), vue.createElementBlock("text", { key: 1 }, "¥")),
  59462. vue.createTextVNode(
  59463. " " + vue.toDisplayString($setup.fen2yuan($setup.state.orderInfo.price.deliveryPrice)),
  59464. 1
  59465. /* TEXT */
  59466. )
  59467. ])
  59468. ])
  59469. ]),
  59470. $setup.state.orderPayload.spuPayType != 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  59471. key: 0,
  59472. class: "order-item ss-flex ss-col-center ss-row-between"
  59473. }, [
  59474. vue.createElementVNode(
  59475. "view",
  59476. { class: "item-title" },
  59477. vue.toDisplayString($setup.t("confirm.commission_deduction")),
  59478. 1
  59479. /* TEXT */
  59480. ),
  59481. vue.createElementVNode("view", {
  59482. class: "ss-flex ss-col-center",
  59483. onClick: _cache[0] || (_cache[0] = ($event) => $setup.state.showPoints = true)
  59484. }, [
  59485. vue.createCommentVNode(' <text class="item-value text-red">\n \n </text> '),
  59486. vue.createElementVNode(
  59487. "text",
  59488. {
  59489. class: vue.normalizeClass(["item-value", $setup.state.usedPoint > 0 ? "text-red" : "text-disabled"])
  59490. },
  59491. vue.toDisplayString($setup.state.usedPoint > 0 ? $setup.t("confirm.deduction", { count: $setup.state.usedPoint }) : $setup.t("confirm.no_commission")),
  59492. 3
  59493. /* TEXT, CLASS */
  59494. ),
  59495. vue.createElementVNode("text", { class: "_icon-forward item-icon" })
  59496. ])
  59497. ])) : vue.createCommentVNode("v-if", true),
  59498. $setup.state.orderPayload.spuPayType != 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  59499. key: 1,
  59500. class: "order-item ss-flex ss-col-center ss-row-between"
  59501. }, [
  59502. vue.createElementVNode(
  59503. "view",
  59504. { class: "item-title" },
  59505. vue.toDisplayString($setup.t("confirm.consumption_point_deduction")),
  59506. 1
  59507. /* TEXT */
  59508. ),
  59509. vue.createElementVNode("view", {
  59510. class: "ss-flex ss-col-center",
  59511. onClick: _cache[1] || (_cache[1] = ($event) => $setup.state.showConsumptionPoints = true)
  59512. }, [
  59513. vue.createCommentVNode(' <text class="item-value text-red">\n </text> '),
  59514. vue.createElementVNode(
  59515. "text",
  59516. {
  59517. class: vue.normalizeClass(["item-value", $setup.state.usedConsumptionPoints > 0 ? "text-red" : "text-disabled"])
  59518. },
  59519. vue.toDisplayString($setup.state.usedConsumptionPoints > 0 ? $setup.t("confirm.deduction", { count: $setup.state.usedConsumptionPoints }) : $setup.t("confirm.no_consumption_points")),
  59520. 3
  59521. /* TEXT, CLASS */
  59522. ),
  59523. vue.createElementVNode("text", { class: "_icon-forward item-icon" })
  59524. ])
  59525. ])) : vue.createCommentVNode("v-if", true),
  59526. vue.createCommentVNode(" 优惠劵:只有 type = 0 普通订单(非拼团、秒杀、砍价),才可以使用优惠劵 "),
  59527. vue.createCommentVNode(" 暂时隐藏优惠卷 "),
  59528. vue.createCommentVNode(` <view
  59529. class="order-item ss-flex ss-col-center ss-row-between"
  59530. v-if="state.orderInfo.type === 0"
  59531. >
  59532. <view class="item-title">优惠券</view>
  59533. <view class="ss-flex ss-col-center" @tap="state.showCoupon = true">
  59534. <text class="item-value text-red" v-if="state.orderPayload.couponId > 0">
  59535. -¥{{ fen2yuan(state.orderInfo.price.couponPrice) }}
  59536. </text>
  59537. <text
  59538. class="item-value"
  59539. :class="state.couponInfo.length > 0 ? 'text-red' : 'text-disabled'"
  59540. v-else
  59541. >
  59542. {{
  59543. state.couponInfo.length > 0 ? state.couponInfo.length + ' 张可用' : '暂无可用优惠券'
  59544. }}
  59545. </text>
  59546. <text class="_icon-forward item-icon" />
  59547. </view>
  59548. </view> `),
  59549. vue.createCommentVNode(' <view\n class="order-item ss-flex ss-col-center ss-row-between"\n v-if="state.orderInfo.price.discountPrice > 0"\n >\n <view class="item-title">活动优惠</view>\n <view class="ss-flex ss-col-center">\n @tap="state.showDiscount = true" TODO 非繁人:后续要把优惠信息打进去 \n <text class="item-value text-red">\n -¥{{ fen2yuan(state.orderInfo.price.discountPrice) }}\n </text>\n <text class="_icon-forward item-icon" />\n </view>\n </view> ')
  59550. ]),
  59551. vue.createElementVNode("view", { class: "total-box-footer ss-font-28 ss-flex ss-row-right ss-col-center ss-m-r-28" }, [
  59552. vue.createElementVNode(
  59553. "view",
  59554. { class: "total-num ss-m-r-20" },
  59555. vue.toDisplayString($setup.t("confirm.total_items_count", { count: $setup.totalItemCount })),
  59556. 1
  59557. /* TEXT */
  59558. ),
  59559. vue.createElementVNode(
  59560. "view",
  59561. null,
  59562. vue.toDisplayString($setup.t("common.total")) + ":",
  59563. 1
  59564. /* TEXT */
  59565. ),
  59566. vue.createElementVNode("view", { class: "total-num text-red ss-flex" }, [
  59567. $setup.state.orderPayload.spuPayType == 2 ? (vue.openBlock(), vue.createElementBlock("image", {
  59568. key: 0,
  59569. src: _imports_0$6,
  59570. class: "ss-m-r-10",
  59571. style: { "width": "30rpx", "height": "30rpx" }
  59572. })) : (vue.openBlock(), vue.createElementBlock("text", { key: 1 }, "¥")),
  59573. $setup.state.orderPayload.highPrecision ? (vue.openBlock(), vue.createElementBlock(
  59574. "text",
  59575. { key: 2 },
  59576. vue.toDisplayString($setup.fen2yuan6($setup.state.orderInfo.price.virtualTotalPrice)),
  59577. 1
  59578. /* TEXT */
  59579. )) : $setup.state.orderPayload.spuPayType == 2 ? (vue.openBlock(), vue.createElementBlock(
  59580. "text",
  59581. { key: 3 },
  59582. vue.toDisplayString($setup.fen2yuan($setup.state.orderInfo.price.payPrice) - 0.01),
  59583. 1
  59584. /* TEXT */
  59585. )) : (vue.openBlock(), vue.createElementBlock(
  59586. "text",
  59587. { key: 4 },
  59588. vue.toDisplayString($setup.fen2yuan($setup.state.orderInfo.price.payPrice)),
  59589. 1
  59590. /* TEXT */
  59591. ))
  59592. ])
  59593. ])
  59594. ]),
  59595. vue.createCommentVNode(" 佣金"),
  59596. vue.createVNode(_component_s_points_pop, {
  59597. modelValue: $setup.state.couponInfo,
  59598. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.couponInfo = $event),
  59599. currentMemberPoints: $setup.state.currentMemberPoints,
  59600. currentTotalPrice: $setup.state.currentTotalPrice,
  59601. currentDeliveryPrice: $setup.state.currentDeliveryPrice,
  59602. show: $setup.state.showPoints,
  59603. onConfirm: $setup.onInputPoints,
  59604. onClose: _cache[3] || (_cache[3] = ($event) => $setup.state.showPoints = false)
  59605. }, null, 8, ["modelValue", "currentMemberPoints", "currentTotalPrice", "currentDeliveryPrice", "show"]),
  59606. vue.createCommentVNode(" 消费分 "),
  59607. vue.createVNode(_component_s_consumptionPoints_pop, {
  59608. modelValue: $setup.state.couponInfo,
  59609. "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.state.couponInfo = $event),
  59610. currentMemberConsumptionPoints: $setup.state.currentMemberConsumptionPoints,
  59611. currentTotalPrice: $setup.state.currentTotalPrice,
  59612. currentDeliveryPrice: $setup.state.currentDeliveryPrice,
  59613. show: $setup.state.showConsumptionPoints,
  59614. onConfirm: $setup.onInputConsumptionPoints,
  59615. onClose: _cache[5] || (_cache[5] = ($event) => $setup.state.showConsumptionPoints = false)
  59616. }, null, 8, ["modelValue", "currentMemberConsumptionPoints", "currentTotalPrice", "currentDeliveryPrice", "show"]),
  59617. vue.createCommentVNode(" 满额折扣弹框 TODO 非繁人:后续要把优惠信息打进去 "),
  59618. vue.createCommentVNode(' <s-discount-list\n v-model="state.orderInfo"\n :show="state.showDiscount"\n @close="state.showDiscount = false"\n /> '),
  59619. vue.createCommentVNode(" 底部 "),
  59620. vue.createVNode(_component_su_fixed, {
  59621. bottom: "",
  59622. opacity: false,
  59623. bg: "bg-white",
  59624. placeholder: "",
  59625. noFixed: false,
  59626. index: 200
  59627. }, {
  59628. default: vue.withCtx(() => [
  59629. vue.createElementVNode("view", { class: "footer-box border-top ss-flex ss-row-between ss-p-x-20 ss-col-center" }, [
  59630. vue.createElementVNode("view", { class: "total-box-footer ss-flex ss-col-center" }, [
  59631. $setup.state.orderPayload.highPrecision ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [
  59632. $setup.state.orderPayload.spuPayType == 2 ? (vue.openBlock(), vue.createElementBlock("image", {
  59633. key: 0,
  59634. src: _imports_0$6,
  59635. style: { "width": "30rpx", "height": "30rpx" }
  59636. })) : vue.createCommentVNode("v-if", true),
  59637. vue.createTextVNode(
  59638. " " + vue.toDisplayString($setup.fen2yuan6($setup.state.orderInfo.price.virtualPayPrice) - 0.01) + " ¥0.01 ",
  59639. 1
  59640. /* TEXT */
  59641. )
  59642. ])) : $setup.state.orderPayload.spuPayType == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  59643. key: 1,
  59644. class: "total-num ss-font-30 text-red"
  59645. }, [
  59646. $setup.state.orderPayload.spuPayType == 2 ? (vue.openBlock(), vue.createElementBlock("image", {
  59647. key: 0,
  59648. src: _imports_0$6,
  59649. style: { "width": "30rpx", "height": "30rpx" }
  59650. })) : vue.createCommentVNode("v-if", true),
  59651. vue.createTextVNode(
  59652. " " + vue.toDisplayString($setup.state.usedPoint) + " ¥0.01 ",
  59653. 1
  59654. /* TEXT */
  59655. )
  59656. ])) : (vue.openBlock(), vue.createElementBlock(
  59657. "view",
  59658. {
  59659. key: 2,
  59660. class: "total-num ss-font-30 text-red"
  59661. },
  59662. " ¥" + vue.toDisplayString($setup.fen2yuan($setup.state.orderInfo.price.payPrice - 100 * $setup.state.usedPoint - 100 * $setup.state.usedConsumptionPoints)),
  59663. 1
  59664. /* TEXT */
  59665. ))
  59666. ]),
  59667. vue.createElementVNode(
  59668. "button",
  59669. {
  59670. class: "ss-reset-button ui-BG-Main-Gradient ss-r-40 submit-btn ui-Shadow-Main",
  59671. onClick: $setup.onConfirm
  59672. },
  59673. vue.toDisplayString($setup.t("confirm.submit_order")),
  59674. 1
  59675. /* TEXT */
  59676. )
  59677. ])
  59678. ]),
  59679. _: 1
  59680. /* STABLE */
  59681. })
  59682. ]),
  59683. _: 1
  59684. /* STABLE */
  59685. }, 8, ["title"]);
  59686. }
  59687. const PagesOrderConfirm = /* @__PURE__ */ _export_sfc(_sfc_main$1t, [["render", _sfc_render$1s], ["__scopeId", "data-v-324e7894"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/order/confirm.vue"]]);
  59688. const _sfc_main$1s = {
  59689. __name: "list",
  59690. setup(__props, { expose: __expose }) {
  59691. __expose();
  59692. const pagination = {
  59693. list: [],
  59694. current_page: 1,
  59695. total: 1,
  59696. last_page: 1
  59697. };
  59698. const state = vue.reactive({
  59699. currentTab: 0,
  59700. // 选中的 tabMaps 下标
  59701. pagination: {
  59702. list: [],
  59703. current_page: 1,
  59704. total: 1,
  59705. last_page: 1
  59706. },
  59707. loadStatus: ""
  59708. });
  59709. const tabMaps = vue.reactive([
  59710. {
  59711. name: t$6("order.all_orders"),
  59712. num: 0,
  59713. isShow: false
  59714. },
  59715. {
  59716. name: t$6("order.pending_payment"),
  59717. value: 0,
  59718. num: 0,
  59719. isShow: true
  59720. },
  59721. {
  59722. name: t$6("order.pending_shipment"),
  59723. value: 10,
  59724. num: 0,
  59725. isShow: true
  59726. },
  59727. {
  59728. name: t$6("order.pending_receipt"),
  59729. value: 20,
  59730. num: 0,
  59731. isShow: true
  59732. },
  59733. {
  59734. name: t$6("order.pending_review"),
  59735. value: 30,
  59736. num: 0,
  59737. isShow: true
  59738. }
  59739. ]);
  59740. function onTabsChange(e2) {
  59741. if (state.currentTab === e2.index) {
  59742. return;
  59743. }
  59744. state.pagination.list = [];
  59745. state.pagination.current_page = 1;
  59746. state.pagination.total = 1;
  59747. state.pagination.last_page = 1;
  59748. state.currentTab = e2.index;
  59749. getOrderList();
  59750. }
  59751. function onOrderDetail(id) {
  59752. sheep$1.$router.go("/pages/order/detail", {
  59753. id
  59754. });
  59755. }
  59756. function onOrderGroupon(order2) {
  59757. sheep$1.$router.go("/pages/activity/groupon/detail", {
  59758. id: order2.ext.groupon_id
  59759. });
  59760. }
  59761. function onPay(id) {
  59762. sheep$1.$router.go("/pages/pay/index", {
  59763. id,
  59764. type: 1,
  59765. openType: 2
  59766. });
  59767. }
  59768. function onComment(id) {
  59769. sheep$1.$router.go("/pages/goods/comment/add", {
  59770. id
  59771. });
  59772. }
  59773. async function onConfirm(order2, ignore = false) {
  59774. let isOpenBusinessView = true;
  59775. uni.showModal({
  59776. title: t$6("setting.prompt"),
  59777. content: t$6("order.confirm_receipt_question"),
  59778. success: async function(res) {
  59779. if (res.confirm) {
  59780. if (sheep$1.$platform.name === "WechatMiniProgram" && !lodashExports.isEmpty(order2.wechat_extra_data) && isOpenBusinessView && !ignore) {
  59781. mpConfirm(order2);
  59782. return;
  59783. }
  59784. const {
  59785. code: code2
  59786. } = await OrderApi.receiveOrder(order2.id);
  59787. if (code2 === 0) {
  59788. state.pagination = pagination;
  59789. await getOrderList();
  59790. }
  59791. }
  59792. }
  59793. });
  59794. }
  59795. async function onExpress(id) {
  59796. sheep$1.$router.go("/pages/order/express/log", {
  59797. id
  59798. });
  59799. }
  59800. async function onCancel(orderId) {
  59801. uni.showModal({
  59802. title: t$6("setting.prompt"),
  59803. content: t$6("order.confirm_cancel_order"),
  59804. success: async function(res) {
  59805. if (!res.confirm) {
  59806. return;
  59807. }
  59808. const {
  59809. code: code2
  59810. } = await OrderApi.cancelOrder(orderId);
  59811. if (code2 === 0) {
  59812. let index2 = state.pagination.list.findIndex((order2) => order2.id === orderId);
  59813. const orderInfo = state.pagination.list[index2];
  59814. orderInfo.status = 40;
  59815. handleOrderButtons(orderInfo);
  59816. state.pagination = pagination;
  59817. await getOrderList();
  59818. }
  59819. }
  59820. });
  59821. }
  59822. function onDelete(orderId) {
  59823. uni.showModal({
  59824. title: t$6("setting.prompt"),
  59825. content: t$6("order.confirm_delete_order"),
  59826. success: async function(res) {
  59827. if (res.confirm) {
  59828. const {
  59829. code: code2
  59830. } = await OrderApi.deleteOrder(orderId);
  59831. if (code2 === 0) {
  59832. let index2 = state.pagination.list.findIndex((order2) => order2.id === orderId);
  59833. state.pagination.list.splice(index2, 1);
  59834. await getOrderList();
  59835. }
  59836. }
  59837. }
  59838. });
  59839. }
  59840. async function getOrderCount() {
  59841. let { data } = await OrderApi.getOrderCount();
  59842. tabMaps[0].num = data.allCount;
  59843. tabMaps[1].num = data.unpaidCount;
  59844. tabMaps[2].num = data.undeliveredCount;
  59845. tabMaps[3].num = data.deliveredCount;
  59846. tabMaps[4].num = data.uncommentedCount;
  59847. }
  59848. async function getOrderList(page2 = 1, list_rows = 5) {
  59849. state.loadStatus = "loading";
  59850. let {
  59851. code: code2,
  59852. data
  59853. } = await OrderApi.getOrderPage({
  59854. pageNo: page2,
  59855. pageSize: list_rows,
  59856. status: tabMaps[state.currentTab].value,
  59857. commentStatus: tabMaps[state.currentTab].value === 30 ? false : null
  59858. });
  59859. getOrderCount();
  59860. if (code2 !== 0) {
  59861. return;
  59862. }
  59863. let orderList = _$1.concat(state.pagination.list, data.list);
  59864. data.list.forEach((order2) => handleOrderButtons(order2));
  59865. state.pagination.list = orderList;
  59866. state.pagination.total = data.total;
  59867. state.pagination.last_page = Math.ceil(data.total / 5);
  59868. if (state.pagination.current_page < state.pagination.last_page) {
  59869. state.loadStatus = "more";
  59870. } else {
  59871. state.loadStatus = "noMore";
  59872. }
  59873. }
  59874. onLoad(async (options2) => {
  59875. if (options2.points !== void 0 || options2.scoialStatus !== void 0) {
  59876. showWalletModal({ points: options2.points, socialStatus: options2.socialStatus });
  59877. }
  59878. if (options2.type) {
  59879. state.currentTab = options2.type;
  59880. }
  59881. await getOrderList();
  59882. });
  59883. onShow(async () => {
  59884. if (state.loadStatus == "loading") {
  59885. return;
  59886. }
  59887. state.pagination.list = [];
  59888. state.pagination.current_page = 1;
  59889. state.pagination.total = 1;
  59890. state.pagination.last_page = 1;
  59891. await getOrderList();
  59892. });
  59893. function loadMore() {
  59894. if (state.loadStatus !== "noMore") {
  59895. state.pagination.current_page += 1;
  59896. getOrderList(state.pagination.current_page);
  59897. }
  59898. }
  59899. onReachBottom(() => {
  59900. loadMore();
  59901. });
  59902. onPullDownRefresh(() => {
  59903. state.pagination.list = [];
  59904. state.pagination.current_page = 1;
  59905. state.pagination.total = 1;
  59906. state.pagination.last_page = 1;
  59907. getOrderList();
  59908. setTimeout(function() {
  59909. uni.stopPullDownRefresh();
  59910. }, 800);
  59911. });
  59912. const __returned__ = { pagination, state, tabMaps, onTabsChange, onOrderDetail, onOrderGroupon, onPay, onComment, onConfirm, onExpress, onCancel, onDelete, getOrderCount, getOrderList, loadMore, reactive: vue.reactive, computed: vue.computed, watchEffect: vue.watchEffect, get onLoad() {
  59913. return onLoad;
  59914. }, get onShow() {
  59915. return onShow;
  59916. }, get onReachBottom() {
  59917. return onReachBottom;
  59918. }, get onPullDownRefresh() {
  59919. return onPullDownRefresh;
  59920. }, get fen2yuan() {
  59921. return fen2yuan;
  59922. }, get formatOrderColor() {
  59923. return formatOrderColor;
  59924. }, get formatOrderStatus() {
  59925. return formatOrderStatus;
  59926. }, get handleOrderButtons() {
  59927. return handleOrderButtons;
  59928. }, get sheep() {
  59929. return sheep$1;
  59930. }, get _() {
  59931. return _$1;
  59932. }, get isEmpty() {
  59933. return lodashExports.isEmpty;
  59934. }, get OrderApi() {
  59935. return OrderApi;
  59936. }, get showWalletModal() {
  59937. return showWalletModal;
  59938. }, get colseWalletModal() {
  59939. return colseWalletModal;
  59940. }, get t() {
  59941. return t$6;
  59942. } };
  59943. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  59944. return __returned__;
  59945. }
  59946. };
  59947. function _sfc_render$1r(_ctx, _cache, $props, $setup, $data, $options) {
  59948. const _component_su_tabs = resolveEasycom(vue.resolveDynamicComponent("su-tabs"), __easycom_0$a);
  59949. const _component_su_sticky = resolveEasycom(vue.resolveDynamicComponent("su-sticky"), __easycom_0$9);
  59950. const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6);
  59951. const _component_s_goods_item = resolveEasycom(vue.resolveDynamicComponent("s-goods-item"), __easycom_3$5);
  59952. const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5);
  59953. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  59954. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  59955. title: $setup.t("order.my_orders")
  59956. }, {
  59957. default: vue.withCtx(() => [
  59958. vue.createVNode(_component_su_sticky, { bgColor: "#fff" }, {
  59959. default: vue.withCtx(() => [
  59960. vue.createVNode(_component_su_tabs, {
  59961. list: $setup.tabMaps,
  59962. scrollable: false,
  59963. onChange: $setup.onTabsChange,
  59964. current: $setup.state.currentTab,
  59965. badge: true
  59966. }, null, 8, ["list", "current"])
  59967. ]),
  59968. _: 1
  59969. /* STABLE */
  59970. }),
  59971. $setup.state.pagination.total === 0 ? (vue.openBlock(), vue.createBlock(_component_s_empty, {
  59972. key: 0,
  59973. icon: "/static/order-empty.png",
  59974. text: $setup.t("order.no_orders")
  59975. }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true),
  59976. $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1 }, [
  59977. (vue.openBlock(true), vue.createElementBlock(
  59978. vue.Fragment,
  59979. null,
  59980. vue.renderList($setup.state.pagination.list, (order2, index2) => {
  59981. return vue.openBlock(), vue.createElementBlock("view", {
  59982. class: "bg-white order-list-card-box ss-r-10 ss-m-t-14 ss-m-20",
  59983. key: order2.id,
  59984. onClick: ($event) => $setup.onOrderDetail(order2.id)
  59985. }, [
  59986. vue.createElementVNode("view", { class: "order-card-header ss-flex ss-col-center ss-row-between ss-p-x-20" }, [
  59987. vue.createElementVNode(
  59988. "view",
  59989. { class: "order-no" },
  59990. vue.toDisplayString($setup.t("order.order_number")) + ":" + vue.toDisplayString(order2.no),
  59991. 1
  59992. /* TEXT */
  59993. ),
  59994. vue.createElementVNode(
  59995. "view",
  59996. {
  59997. class: vue.normalizeClass(["order-state ss-font-26", $setup.formatOrderColor(order2)])
  59998. },
  59999. vue.toDisplayString($setup.formatOrderStatus(order2)),
  60000. 3
  60001. /* TEXT, CLASS */
  60002. )
  60003. ]),
  60004. vue.createCommentVNode(" {{order.deliveryType}} "),
  60005. (vue.openBlock(true), vue.createElementBlock(
  60006. vue.Fragment,
  60007. null,
  60008. vue.renderList(order2.items, (item) => {
  60009. return vue.openBlock(), vue.createElementBlock("view", {
  60010. class: "border-bottom",
  60011. key: item.id
  60012. }, [
  60013. vue.createVNode(_component_s_goods_item, {
  60014. img: item.picUrl,
  60015. title: item.spuName,
  60016. skuText: item.properties.map((property) => property.valueName).join(" "),
  60017. price: item.spuPayType === 2 ? item.highPrecisionPrice : item.price,
  60018. num: item.count,
  60019. virtualPirce: item.spuPayType === 2
  60020. }, null, 8, ["img", "title", "skuText", "price", "num", "virtualPirce"])
  60021. ]);
  60022. }),
  60023. 128
  60024. /* KEYED_FRAGMENT */
  60025. )),
  60026. vue.createElementVNode("view", { class: "pay-box ss-m-t-30 ss-flex ss-row-right ss-p-r-20" }, [
  60027. vue.createElementVNode("view", { class: "ss-flex ss-col-center" }, [
  60028. vue.createElementVNode(
  60029. "view",
  60030. { class: "discounts-title pay-color" },
  60031. vue.toDisplayString($setup.t("order.total_items", { count: order2.productCount })) + " ,",
  60032. 1
  60033. /* TEXT */
  60034. ),
  60035. vue.createElementVNode(
  60036. "view",
  60037. { class: "discounts-money pay-color" },
  60038. vue.toDisplayString($setup.t("order.total_amount")) + ":¥" + vue.toDisplayString($setup.fen2yuan(order2.payPrice)),
  60039. 1
  60040. /* TEXT */
  60041. )
  60042. ])
  60043. ]),
  60044. vue.createElementVNode(
  60045. "view",
  60046. {
  60047. class: vue.normalizeClass(["order-card-footer ss-flex ss-col-center ss-p-x-20", order2.buttons.length > 3 ? "ss-row-between" : "ss-row-right"])
  60048. },
  60049. [
  60050. vue.createElementVNode("view", { class: "ss-flex ss-col-center" }, [
  60051. order2.buttons.includes("combination") ? (vue.openBlock(), vue.createElementBlock("button", {
  60052. key: 0,
  60053. class: "tool-btn ss-reset-button",
  60054. onClick: vue.withModifiers(($event) => $setup.onOrderGroupon(order2), ["stop"])
  60055. }, vue.toDisplayString($setup.t("order.group_details")), 9, ["onClick"])) : vue.createCommentVNode("v-if", true),
  60056. order2.buttons.length === 0 ? (vue.openBlock(), vue.createElementBlock("button", {
  60057. key: 1,
  60058. class: "tool-btn ss-reset-button",
  60059. onClick: vue.withModifiers(($event) => $setup.onOrderDetail(order2.id), ["stop"])
  60060. }, vue.toDisplayString($setup.t("order.view_details")), 9, ["onClick"])) : vue.createCommentVNode("v-if", true),
  60061. order2.buttons.includes("express") ? (vue.openBlock(), vue.createElementBlock("button", {
  60062. key: 2,
  60063. class: "tool-btn ss-reset-button",
  60064. onClick: vue.withModifiers(($event) => $setup.onExpress(order2.id), ["stop"])
  60065. }, vue.toDisplayString($setup.t("order.view_logistics")), 9, ["onClick"])) : vue.createCommentVNode("v-if", true),
  60066. order2.buttons.includes("confirm") ? (vue.openBlock(), vue.createElementBlock("button", {
  60067. key: 3,
  60068. class: "tool-btn ss-reset-button",
  60069. onClick: vue.withModifiers(($event) => $setup.onConfirm(order2), ["stop"])
  60070. }, vue.toDisplayString($setup.t("order.confirm_receipt")), 9, ["onClick"])) : vue.createCommentVNode("v-if", true),
  60071. order2.buttons.includes("cancel") ? (vue.openBlock(), vue.createElementBlock("button", {
  60072. key: 4,
  60073. class: "tool-btn ss-reset-button",
  60074. onClick: vue.withModifiers(($event) => $setup.onCancel(order2.id), ["stop"])
  60075. }, vue.toDisplayString($setup.t("order.cancel_order")), 9, ["onClick"])) : vue.createCommentVNode("v-if", true),
  60076. order2.buttons.includes("comment") ? (vue.openBlock(), vue.createElementBlock("button", {
  60077. key: 5,
  60078. class: "tool-btn ss-reset-button",
  60079. onClick: vue.withModifiers(($event) => $setup.onComment(order2.id), ["stop"])
  60080. }, vue.toDisplayString($setup.t("order.review_order")), 9, ["onClick"])) : vue.createCommentVNode("v-if", true),
  60081. order2.buttons.includes("delete") ? (vue.openBlock(), vue.createElementBlock("button", {
  60082. key: 6,
  60083. class: "delete-btn ss-reset-button",
  60084. onClick: vue.withModifiers(($event) => $setup.onDelete(order2.id), ["stop"])
  60085. }, vue.toDisplayString($setup.t("order.delete_order")), 9, ["onClick"])) : vue.createCommentVNode("v-if", true),
  60086. order2.buttons.includes("pay") ? (vue.openBlock(), vue.createElementBlock("button", {
  60087. key: 7,
  60088. class: "tool-btn ss-reset-button ui-BG-Main-Gradient",
  60089. onClick: vue.withModifiers(($event) => $setup.onPay(order2.payOrderId), ["stop"])
  60090. }, vue.toDisplayString($setup.t("order.continue_payment")), 9, ["onClick"])) : vue.createCommentVNode("v-if", true)
  60091. ])
  60092. ],
  60093. 2
  60094. /* CLASS */
  60095. )
  60096. ], 8, ["onClick"]);
  60097. }),
  60098. 128
  60099. /* KEYED_FRAGMENT */
  60100. ))
  60101. ])) : vue.createCommentVNode("v-if", true),
  60102. vue.createCommentVNode(" 加载更多 "),
  60103. $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, {
  60104. key: 2,
  60105. status: $setup.state.loadStatus,
  60106. "content-text": {
  60107. contentdown: "上拉加载更多"
  60108. },
  60109. onClick: _ctx.loadmore
  60110. }, null, 8, ["status", "onClick"])) : vue.createCommentVNode("v-if", true)
  60111. ]),
  60112. _: 1
  60113. /* STABLE */
  60114. }, 8, ["title"]);
  60115. }
  60116. const PagesOrderList = /* @__PURE__ */ _export_sfc(_sfc_main$1s, [["render", _sfc_render$1r], ["__scopeId", "data-v-456ecf67"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/order/list.vue"]]);
  60117. const _sfc_main$1r = {
  60118. __name: "apply",
  60119. setup(__props, { expose: __expose }) {
  60120. __expose();
  60121. const form = vue.ref(null);
  60122. const state = vue.reactive({
  60123. orderId: 0,
  60124. // 订单编号
  60125. itemId: 0,
  60126. // 订单项编号
  60127. order: {},
  60128. // 订单
  60129. item: {},
  60130. // 订单项
  60131. config: {},
  60132. // 交易配置
  60133. // 售后类型
  60134. wayList: [
  60135. // {
  60136. // text: t('order.refund_only')
  60137. // value: '10',
  60138. // },
  60139. {
  60140. text: t$6("order.refund_and_return"),
  60141. value: "20"
  60142. }
  60143. ],
  60144. reasonList: [],
  60145. // 可选的申请原因数组
  60146. showModal: false,
  60147. // 是否显示申请原因弹窗
  60148. currentValue: ""
  60149. // 当前选择的售后原因
  60150. });
  60151. const formData = vue.reactive({
  60152. way: "",
  60153. applyReason: "",
  60154. applyDescription: "",
  60155. applyPicUrls: []
  60156. });
  60157. const rules2 = vue.reactive({});
  60158. async function submit() {
  60159. if (formData.way == "") {
  60160. uni.showToast({
  60161. title: t$6("order.select_after_sales_type"),
  60162. icon: "error",
  60163. duration: 1e3
  60164. });
  60165. return false;
  60166. }
  60167. if (state.currentValue == "") {
  60168. uni.showToast({
  60169. title: t$6("order.reason_for_application"),
  60170. icon: "error",
  60171. duration: 1e3
  60172. });
  60173. return false;
  60174. }
  60175. if (formData.applyDescription == "") {
  60176. uni.showToast({
  60177. title: t$6("order.please_fill_in_description"),
  60178. icon: "error",
  60179. duration: 1e3
  60180. });
  60181. return false;
  60182. }
  60183. let data = {
  60184. orderItemId: state.itemId,
  60185. refundPrice: state.item.payPrice,
  60186. ...formData
  60187. };
  60188. const { code: code2 } = await AfterSaleApi.createAfterSale(data);
  60189. if (code2 === 0) {
  60190. uni.showToast({
  60191. title: t$6("wallet.application_successful")
  60192. });
  60193. sheep$1.$router.go("/pages/order/aftersale/list");
  60194. }
  60195. }
  60196. function onRefundChange(e2) {
  60197. formData.way = e2.detail.value;
  60198. state.reasonList = formData.way === "10" ? state.config.afterSaleRefundReasons || [] : state.config.afterSaleReturnReasons || [];
  60199. formData.applyReason = "";
  60200. state.currentValue = "";
  60201. }
  60202. function onChange(e2) {
  60203. state.currentValue = e2.detail.value;
  60204. }
  60205. function onReason() {
  60206. formData.applyReason = state.currentValue;
  60207. state.showModal = false;
  60208. }
  60209. onLoad(async (options2) => {
  60210. if (!options2.orderId || !options2.itemId) {
  60211. sheep$1.$helper.toast(`缺少订单信息,请检查`);
  60212. return;
  60213. }
  60214. state.orderId = options2.orderId;
  60215. state.itemId = parseInt(options2.itemId);
  60216. const { code: code2, data } = await OrderApi.getOrder(state.orderId);
  60217. if (code2 !== 0) {
  60218. return;
  60219. }
  60220. state.order = data;
  60221. state.item = data.items.find((item) => item.id === state.itemId) || {};
  60222. if (state.order.status === 10) {
  60223. state.wayList.splice(1, 1);
  60224. }
  60225. state.config = (await TradeConfigApi.getTradeConfig()).data;
  60226. formData.way = "20";
  60227. formData.type = "20";
  60228. state.reasonList = state.config.afterSaleReturnReasons || [];
  60229. });
  60230. const __returned__ = { form, state, formData, rules: rules2, submit, onRefundChange, onChange, onReason, get sheep() {
  60231. return sheep$1;
  60232. }, get onLoad() {
  60233. return onLoad;
  60234. }, reactive: vue.reactive, ref: vue.ref, get OrderApi() {
  60235. return OrderApi;
  60236. }, get TradeConfigApi() {
  60237. return TradeConfigApi;
  60238. }, get fen2yuan() {
  60239. return fen2yuan;
  60240. }, get AfterSaleApi() {
  60241. return AfterSaleApi;
  60242. }, get t() {
  60243. return t$6;
  60244. } };
  60245. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  60246. return __returned__;
  60247. }
  60248. };
  60249. function _sfc_render$1q(_ctx, _cache, $props, $setup, $data, $options) {
  60250. const _component_s_goods_item = resolveEasycom(vue.resolveDynamicComponent("s-goods-item"), __easycom_3$5);
  60251. const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l);
  60252. const _component_s_uploader = resolveEasycom(vue.resolveDynamicComponent("s-uploader"), __easycom_3$4);
  60253. const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7);
  60254. const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9);
  60255. const _component_su_popup = resolveEasycom(vue.resolveDynamicComponent("su-popup"), __easycom_4$3);
  60256. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  60257. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  60258. title: $setup.t("order.apply_for_after_sales")
  60259. }, {
  60260. default: vue.withCtx(() => {
  60261. var _a2;
  60262. return [
  60263. vue.createCommentVNode(" 售后商品 "),
  60264. vue.createElementVNode("view", { class: "goods-box" }, [
  60265. vue.createVNode(_component_s_goods_item, {
  60266. img: $setup.state.item.picUrl,
  60267. title: $setup.state.item.spuName,
  60268. skuText: (_a2 = $setup.state.item.properties) == null ? void 0 : _a2.map((property) => property.valueName).join(" "),
  60269. price: $setup.state.item.price,
  60270. num: $setup.state.item.count
  60271. }, null, 8, ["img", "title", "skuText", "price", "num"])
  60272. ]),
  60273. vue.createVNode(_component_uni_forms, {
  60274. ref: "form",
  60275. modelValue: $setup.formData,
  60276. "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.formData = $event),
  60277. rules: $setup.rules,
  60278. "label-position": "top"
  60279. }, {
  60280. default: vue.withCtx(() => [
  60281. vue.createCommentVNode(" 售后类型 "),
  60282. vue.createElementVNode("view", { class: "refund-item" }, [
  60283. vue.createElementVNode(
  60284. "view",
  60285. { class: "item-title ss-m-b-20" },
  60286. vue.toDisplayString($setup.t("order.after_sales_type")),
  60287. 1
  60288. /* TEXT */
  60289. ),
  60290. vue.createElementVNode("view", { class: "ss-flex-col" }, [
  60291. vue.createElementVNode(
  60292. "radio-group",
  60293. { onChange: $setup.onRefundChange },
  60294. [
  60295. (vue.openBlock(true), vue.createElementBlock(
  60296. vue.Fragment,
  60297. null,
  60298. vue.renderList($setup.state.wayList, (item, index2) => {
  60299. return vue.openBlock(), vue.createElementBlock("label", {
  60300. class: "ss-flex ss-col-center ss-p-y-10",
  60301. key: index2
  60302. }, [
  60303. vue.createElementVNode("radio", {
  60304. checked: $setup.formData.type === item.value,
  60305. color: "var(--ui-BG-Main)",
  60306. style: { "transform": "scale(0.8)" },
  60307. value: item.value
  60308. }, null, 8, ["checked", "value"]),
  60309. vue.createElementVNode(
  60310. "view",
  60311. { class: "item-value ss-m-l-8" },
  60312. vue.toDisplayString(item.text),
  60313. 1
  60314. /* TEXT */
  60315. )
  60316. ]);
  60317. }),
  60318. 128
  60319. /* KEYED_FRAGMENT */
  60320. ))
  60321. ],
  60322. 32
  60323. /* NEED_HYDRATION */
  60324. )
  60325. ])
  60326. ]),
  60327. vue.createCommentVNode(" 退款金额 "),
  60328. vue.createElementVNode("view", {
  60329. class: "refund-item ss-flex ss-col-center ss-row-between",
  60330. onClick: _cache[0] || (_cache[0] = ($event) => $setup.state.showModal = true)
  60331. }, [
  60332. vue.createElementVNode(
  60333. "text",
  60334. { class: "item-title" },
  60335. vue.toDisplayString($setup.t("order.refund_amount")),
  60336. 1
  60337. /* TEXT */
  60338. ),
  60339. vue.createElementVNode("view", { class: "ss-flex refund-cause ss-col-center" }, [
  60340. vue.createElementVNode(
  60341. "text",
  60342. { class: "ss-m-r-20" },
  60343. "¥" + vue.toDisplayString($setup.fen2yuan($setup.state.item.payPrice)),
  60344. 1
  60345. /* TEXT */
  60346. )
  60347. ])
  60348. ]),
  60349. vue.createCommentVNode(" 申请原因 "),
  60350. vue.createElementVNode("view", {
  60351. class: "refund-item ss-flex ss-col-center ss-row-between",
  60352. onClick: _cache[1] || (_cache[1] = ($event) => $setup.state.showModal = true)
  60353. }, [
  60354. vue.createElementVNode(
  60355. "text",
  60356. { class: "item-title" },
  60357. vue.toDisplayString($setup.t("order.application_reason")),
  60358. 1
  60359. /* TEXT */
  60360. ),
  60361. vue.createElementVNode("view", { class: "ss-flex refund-cause ss-col-center" }, [
  60362. $setup.formData.applyReason ? (vue.openBlock(), vue.createElementBlock(
  60363. "text",
  60364. {
  60365. key: 0,
  60366. class: "ss-m-r-20"
  60367. },
  60368. vue.toDisplayString($setup.formData.applyReason),
  60369. 1
  60370. /* TEXT */
  60371. )) : (vue.openBlock(), vue.createElementBlock(
  60372. "text",
  60373. {
  60374. key: 1,
  60375. class: "ss-m-r-20"
  60376. },
  60377. vue.toDisplayString($setup.t("order.select_reason_for_application")),
  60378. 1
  60379. /* TEXT */
  60380. )),
  60381. vue.createElementVNode("text", {
  60382. class: "cicon-forward",
  60383. style: { "height": "28rpx" }
  60384. })
  60385. ])
  60386. ]),
  60387. vue.createCommentVNode(" 留言 "),
  60388. vue.createElementVNode("view", { class: "refund-item" }, [
  60389. vue.createElementVNode(
  60390. "view",
  60391. { class: "item-title ss-m-b-20" },
  60392. vue.toDisplayString($setup.t("order.related_description")),
  60393. 1
  60394. /* TEXT */
  60395. ),
  60396. vue.createElementVNode("view", { class: "describe-box" }, [
  60397. vue.createVNode(_component_uni_easyinput, {
  60398. inputBorder: false,
  60399. class: "describe-content",
  60400. type: "textarea",
  60401. maxlength: "120",
  60402. autoHeight: "",
  60403. modelValue: $setup.formData.applyDescription,
  60404. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.formData.applyDescription = $event),
  60405. placeholder: $setup.t("order.customer_prompt")
  60406. }, null, 8, ["modelValue", "placeholder"]),
  60407. vue.createCommentVNode(" TODO 非繁人:上传的测试 "),
  60408. vue.createElementVNode("view", { class: "upload-img" }, [
  60409. vue.createVNode(_component_s_uploader, {
  60410. url: $setup.formData.applyPicUrls,
  60411. "onUpdate:url": _cache[3] || (_cache[3] = ($event) => $setup.formData.applyPicUrls = $event),
  60412. fileMediatype: "image",
  60413. limit: "9",
  60414. mode: "grid",
  60415. imageStyles: { width: "168rpx", height: "168rpx" }
  60416. }, null, 8, ["url"])
  60417. ])
  60418. ])
  60419. ])
  60420. ]),
  60421. _: 1
  60422. /* STABLE */
  60423. }, 8, ["modelValue", "rules"]),
  60424. vue.createCommentVNode(" 底部按钮 "),
  60425. vue.createVNode(_component_su_fixed, {
  60426. bottom: "",
  60427. placeholder: ""
  60428. }, {
  60429. default: vue.withCtx(() => [
  60430. vue.createElementVNode("view", { class: "foot-wrap" }, [
  60431. vue.createElementVNode("view", { class: "foot_box ss-flex ss-col-center ss-row-between ss-p-x-30" }, [
  60432. vue.createCommentVNode(` <button class="ss-reset-button contcat-btn" @tap="sheep.$router.go('/pages/chat/index')">
  60433. 联系客服
  60434. </button> `),
  60435. vue.createElementVNode(
  60436. "button",
  60437. {
  60438. class: "ss-reset-button ui-BG-Main-Gradient sub-btn",
  60439. onClick: $setup.submit
  60440. },
  60441. vue.toDisplayString($setup.t("common.submit")),
  60442. 1
  60443. /* TEXT */
  60444. )
  60445. ])
  60446. ])
  60447. ]),
  60448. _: 1
  60449. /* STABLE */
  60450. }),
  60451. vue.createCommentVNode(" 申请原因弹窗 "),
  60452. vue.createVNode(_component_su_popup, {
  60453. show: $setup.state.showModal,
  60454. round: "10",
  60455. showClose: true,
  60456. onClose: _cache[5] || (_cache[5] = ($event) => $setup.state.showModal = false)
  60457. }, {
  60458. default: vue.withCtx(() => [
  60459. vue.createElementVNode("view", { class: "modal-box page_box" }, [
  60460. vue.createElementVNode(
  60461. "view",
  60462. { class: "modal-head item-title head_box ss-flex ss-row-center ss-col-center" },
  60463. vue.toDisplayString($setup.t("order.application_reason")),
  60464. 1
  60465. /* TEXT */
  60466. ),
  60467. vue.createElementVNode("view", { class: "modal-content content_box" }, [
  60468. vue.createElementVNode(
  60469. "radio-group",
  60470. { onChange: $setup.onChange },
  60471. [
  60472. (vue.openBlock(true), vue.createElementBlock(
  60473. vue.Fragment,
  60474. null,
  60475. vue.renderList($setup.state.reasonList, (item) => {
  60476. return vue.openBlock(), vue.createElementBlock("label", {
  60477. class: "radio ss-flex ss-col-center",
  60478. key: item
  60479. }, [
  60480. vue.createElementVNode(
  60481. "view",
  60482. { class: "ss-flex-1 ss-p-20" },
  60483. vue.toDisplayString(item),
  60484. 1
  60485. /* TEXT */
  60486. ),
  60487. vue.createElementVNode("radio", {
  60488. value: item,
  60489. color: "var(--ui-BG-Main)",
  60490. checked: item === $setup.state.currentValue
  60491. }, null, 8, ["value", "checked"])
  60492. ]);
  60493. }),
  60494. 128
  60495. /* KEYED_FRAGMENT */
  60496. ))
  60497. ],
  60498. 32
  60499. /* NEED_HYDRATION */
  60500. )
  60501. ]),
  60502. vue.createElementVNode("view", { class: "modal-foot foot_box ss-flex ss-row-center ss-col-center" }, [
  60503. vue.createElementVNode(
  60504. "button",
  60505. {
  60506. class: "ss-reset-button close-btn ui-BG-Main-Gradient",
  60507. onClick: $setup.onReason
  60508. },
  60509. vue.toDisplayString($setup.t("common.confirm")),
  60510. 1
  60511. /* TEXT */
  60512. )
  60513. ])
  60514. ])
  60515. ]),
  60516. _: 1
  60517. /* STABLE */
  60518. }, 8, ["show"])
  60519. ];
  60520. }),
  60521. _: 1
  60522. /* STABLE */
  60523. }, 8, ["title"]);
  60524. }
  60525. const PagesOrderAftersaleApply = /* @__PURE__ */ _export_sfc(_sfc_main$1r, [["render", _sfc_render$1q], ["__scopeId", "data-v-5be4d0ee"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/order/aftersale/apply.vue"]]);
  60526. const _sfc_main$1q = {
  60527. __name: "return-delivery",
  60528. setup(__props, { expose: __expose }) {
  60529. __expose();
  60530. const state = vue.reactive({
  60531. id: 0,
  60532. // 售后编号
  60533. expressIndex: 0,
  60534. // 选中的 expresses 下标
  60535. expresses: []
  60536. // 可选的快递列表
  60537. });
  60538. function bindPickerChange(e2) {
  60539. state.expressIndex = e2.detail.value;
  60540. }
  60541. async function subRefund(e2) {
  60542. if (!state.expresses[state.expressIndex].id) {
  60543. sheep$1.$helper.toast(`请选择物流公司`);
  60544. return false;
  60545. }
  60546. if (!e2.detail.value.logisticsNo) {
  60547. sheep$1.$helper.toast(`请填写物流单号`);
  60548. return false;
  60549. }
  60550. let data = {
  60551. id: state.id,
  60552. logisticsId: state.expresses[state.expressIndex].id,
  60553. logisticsNo: e2.detail.value.logisticsNo
  60554. };
  60555. const {
  60556. code: code2
  60557. } = await AfterSaleApi.deliveryAfterSale(data);
  60558. if (code2 !== 0) {
  60559. return;
  60560. }
  60561. uni.showToast({
  60562. title: "填写退货成功"
  60563. });
  60564. sheep$1.$router.go("/pages/order/aftersale/detail", {
  60565. id: state.id
  60566. });
  60567. }
  60568. async function getExpressList() {
  60569. const {
  60570. code: code2,
  60571. data
  60572. } = await DeliveryApi.getDeliveryExpressList();
  60573. if (code2 !== 0) {
  60574. return;
  60575. }
  60576. state.expresses = data;
  60577. state.expresses.unshift({
  60578. "id": 0,
  60579. "name": "请选择"
  60580. });
  60581. }
  60582. onLoad((options2) => {
  60583. if (!options2.id) {
  60584. sheep$1.$helper.toast(`缺少订单信息,请检查`);
  60585. return;
  60586. }
  60587. state.id = options2.id;
  60588. getExpressList();
  60589. });
  60590. const __returned__ = { state, bindPickerChange, subRefund, getExpressList, get onLoad() {
  60591. return onLoad;
  60592. }, reactive: vue.reactive, get sheep() {
  60593. return sheep$1;
  60594. }, get AfterSaleApi() {
  60595. return AfterSaleApi;
  60596. }, get DeliveryApi() {
  60597. return DeliveryApi;
  60598. } };
  60599. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  60600. return __returned__;
  60601. }
  60602. };
  60603. function _sfc_render$1p(_ctx, _cache, $props, $setup, $data, $options) {
  60604. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  60605. return vue.openBlock(), vue.createBlock(_component_s_layout, { title: "退货物流" }, {
  60606. default: vue.withCtx(() => {
  60607. var _a2;
  60608. return [
  60609. vue.createElementVNode("view", null, [
  60610. vue.createElementVNode(
  60611. "form",
  60612. {
  60613. onSubmit: $setup.subRefund,
  60614. "report-submit": "true"
  60615. },
  60616. [
  60617. vue.createElementVNode("view", { class: "apply-return" }, [
  60618. vue.createElementVNode("view", { class: "list borRadius14" }, [
  60619. vue.createElementVNode("view", {
  60620. class: "item acea-row row-between-wrapper",
  60621. style: { "display": "flex", "align-items": "center" }
  60622. }, [
  60623. vue.createElementVNode("view", null, "物流公司"),
  60624. vue.createElementVNode("picker", {
  60625. mode: "selector",
  60626. class: "num",
  60627. onChange: $setup.bindPickerChange,
  60628. value: $setup.state.expressIndex,
  60629. range: $setup.state.expresses,
  60630. "range-key": "name"
  60631. }, [
  60632. vue.createElementVNode("view", {
  60633. class: "picker acea-row row-between-wrapper",
  60634. style: { "display": "flex", "align-items": "center" }
  60635. }, [
  60636. vue.createElementVNode(
  60637. "view",
  60638. { class: "reason" },
  60639. vue.toDisplayString((_a2 = $setup.state.expresses[$setup.state.expressIndex]) == null ? void 0 : _a2.name),
  60640. 1
  60641. /* TEXT */
  60642. ),
  60643. vue.createCommentVNode(" TODO 非繁人:这里样式有问题,少了 > 按钮 "),
  60644. vue.createElementVNode("image", {
  60645. src: _imports_0$9,
  60646. class: "select-icon"
  60647. })
  60648. ])
  60649. ], 40, ["value", "range"])
  60650. ]),
  60651. vue.createElementVNode("view", {
  60652. class: "item textarea acea-row row-between",
  60653. style: { "display": "flex", "align-items": "center" }
  60654. }, [
  60655. vue.createElementVNode("view", null, "物流单号"),
  60656. vue.createElementVNode("input", {
  60657. placeholder: "请填写物流单号",
  60658. class: "num",
  60659. name: "logisticsNo",
  60660. "placeholder-class": "placeholder"
  60661. })
  60662. ]),
  60663. vue.createElementVNode("button", {
  60664. class: "returnBnt bg-color ss-reset-button ui-BG-Main-Gradient sub-btn",
  60665. "form-type": "submit",
  60666. style: { "background": "linear-gradient(90deg,var(--ui-BG-Main),var(--ui-BG-Main-gradient))!important" }
  60667. }, "提交")
  60668. ])
  60669. ])
  60670. ],
  60671. 32
  60672. /* NEED_HYDRATION */
  60673. )
  60674. ])
  60675. ];
  60676. }),
  60677. _: 1
  60678. /* STABLE */
  60679. });
  60680. }
  60681. const PagesOrderAftersaleReturnDelivery = /* @__PURE__ */ _export_sfc(_sfc_main$1q, [["render", _sfc_render$1p], ["__scopeId", "data-v-e2252b3c"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/order/aftersale/return-delivery.vue"]]);
  60682. const _sfc_main$1p = {
  60683. __name: "list",
  60684. setup(__props, { expose: __expose }) {
  60685. __expose();
  60686. const paginationNull = {
  60687. list: [],
  60688. total: 0,
  60689. pageNo: 1,
  60690. pageSize: 10
  60691. };
  60692. const state = vue.reactive({
  60693. currentTab: 0,
  60694. showApply: false,
  60695. pagination: {
  60696. list: [],
  60697. total: 0,
  60698. pageNo: 1,
  60699. pageSize: 10
  60700. },
  60701. loadStatus: ""
  60702. });
  60703. const tabMaps = [
  60704. {
  60705. name: t$6("common.all"),
  60706. value: "all"
  60707. }
  60708. // {
  60709. // name: '申请中',
  60710. // value: 'nooper',
  60711. // },
  60712. // {
  60713. // name: '处理中',
  60714. // value: 'ing',
  60715. // },
  60716. // {
  60717. // name: '已完成',
  60718. // value: 'completed',
  60719. // },
  60720. // {
  60721. // name: '已拒绝',
  60722. // value: 'refuse',
  60723. // },
  60724. ];
  60725. function onTabsChange(e2) {
  60726. state.pagination = paginationNull;
  60727. state.currentTab = e2.index;
  60728. getOrderList();
  60729. }
  60730. async function getOrderList() {
  60731. state.loadStatus = "loading";
  60732. let { data, code: code2 } = await AfterSaleApi.getAfterSalePage({
  60733. // type: tabMaps[state.currentTab].value,
  60734. pageNo: state.pagination.pageNo,
  60735. pageSize: state.pagination.pageSize
  60736. });
  60737. if (code2 !== 0) {
  60738. return;
  60739. }
  60740. data.list.forEach((order2) => handleAfterSaleButtons(order2));
  60741. state.pagination.list = _$1.concat(state.pagination.list, data.list);
  60742. state.pagination.total = data.total;
  60743. state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore";
  60744. }
  60745. function onApply(orderId) {
  60746. uni.showModal({
  60747. title: t$6("setting.prompt"),
  60748. content: t$6("order.confirm_cancel_request"),
  60749. success: async function(res) {
  60750. if (!res.confirm) {
  60751. return;
  60752. }
  60753. const { code: code2 } = await AfterSaleApi.cancelAfterSale(orderId);
  60754. if (code2 === 0) {
  60755. state.pagination = paginationNull;
  60756. await getOrderList();
  60757. }
  60758. }
  60759. });
  60760. }
  60761. onLoad(async (options2) => {
  60762. if (options2.type) {
  60763. state.currentTab = options2.type;
  60764. }
  60765. await getOrderList();
  60766. });
  60767. function loadMore() {
  60768. if (state.loadStatus === "noMore") {
  60769. return;
  60770. }
  60771. state.pagination.pageNo++;
  60772. getOrderList();
  60773. }
  60774. onReachBottom(() => {
  60775. loadMore();
  60776. });
  60777. const __returned__ = { paginationNull, state, tabMaps, onTabsChange, getOrderList, onApply, loadMore, get sheep() {
  60778. return sheep$1;
  60779. }, get onLoad() {
  60780. return onLoad;
  60781. }, get onReachBottom() {
  60782. return onReachBottom;
  60783. }, reactive: vue.reactive, get _() {
  60784. return _$1;
  60785. }, get formatAfterSaleStatus() {
  60786. return formatAfterSaleStatus;
  60787. }, get formatAfterSaleStatusDescription() {
  60788. return formatAfterSaleStatusDescription;
  60789. }, get handleAfterSaleButtons() {
  60790. return handleAfterSaleButtons;
  60791. }, get AfterSaleApi() {
  60792. return AfterSaleApi;
  60793. }, get t() {
  60794. return t$6;
  60795. } };
  60796. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  60797. return __returned__;
  60798. }
  60799. };
  60800. function _sfc_render$1o(_ctx, _cache, $props, $setup, $data, $options) {
  60801. const _component_su_tabs = resolveEasycom(vue.resolveDynamicComponent("su-tabs"), __easycom_0$a);
  60802. const _component_su_sticky = resolveEasycom(vue.resolveDynamicComponent("su-sticky"), __easycom_0$9);
  60803. const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6);
  60804. const _component_s_goods_item = resolveEasycom(vue.resolveDynamicComponent("s-goods-item"), __easycom_3$5);
  60805. const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5);
  60806. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  60807. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  60808. title: $setup.t("order.after_sales_list")
  60809. }, {
  60810. default: vue.withCtx(() => [
  60811. vue.createCommentVNode(" tab "),
  60812. vue.createVNode(_component_su_sticky, { bgColor: "#fff" }, {
  60813. default: vue.withCtx(() => [
  60814. vue.createVNode(_component_su_tabs, {
  60815. list: $setup.tabMaps,
  60816. scrollable: false,
  60817. onChange: $setup.onTabsChange,
  60818. current: $setup.state.currentTab
  60819. }, null, 8, ["current"])
  60820. ]),
  60821. _: 1
  60822. /* STABLE */
  60823. }),
  60824. $setup.state.pagination.total === 0 ? (vue.openBlock(), vue.createBlock(_component_s_empty, {
  60825. key: 0,
  60826. icon: "/static/data-empty.png",
  60827. text: $setup.t("common.no_data")
  60828. }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true),
  60829. vue.createCommentVNode(" 列表 "),
  60830. $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1 }, [
  60831. (vue.openBlock(true), vue.createElementBlock(
  60832. vue.Fragment,
  60833. null,
  60834. vue.renderList($setup.state.pagination.list, (order2) => {
  60835. return vue.openBlock(), vue.createElementBlock("view", {
  60836. class: "list-box ss-m-y-20",
  60837. key: order2.id,
  60838. onClick: ($event) => $setup.sheep.$router.go("/pages/order/aftersale/detail", { id: order2.id })
  60839. }, [
  60840. vue.createElementVNode("view", { class: "order-head ss-flex ss-col-center ss-row-between" }, [
  60841. vue.createElementVNode(
  60842. "text",
  60843. { class: "no" },
  60844. vue.toDisplayString($setup.t("order.service_order_number")) + ":" + vue.toDisplayString(order2.no),
  60845. 1
  60846. /* TEXT */
  60847. ),
  60848. vue.createElementVNode(
  60849. "text",
  60850. { class: "state" },
  60851. vue.toDisplayString($setup.formatAfterSaleStatus(order2)),
  60852. 1
  60853. /* TEXT */
  60854. )
  60855. ]),
  60856. vue.createVNode(_component_s_goods_item, {
  60857. img: order2.picUrl,
  60858. title: order2.spuName,
  60859. skuText: order2.properties.map((property) => property.valueName).join(" "),
  60860. price: order2.refundPrice
  60861. }, null, 8, ["img", "title", "skuText", "price"]),
  60862. vue.createElementVNode("view", { class: "apply-box ss-flex ss-col-center ss-row-between border-bottom ss-p-x-20" }, [
  60863. vue.createElementVNode("view", { class: "ss-flex ss-col-center" }, [
  60864. vue.createElementVNode(
  60865. "view",
  60866. { class: "title ss-m-r-20" },
  60867. vue.toDisplayString(order2.way === 10 ? $setup.t("order.refund_only") : $setup.t("order.refund_and_return")),
  60868. 1
  60869. /* TEXT */
  60870. ),
  60871. vue.createElementVNode(
  60872. "view",
  60873. { class: "value" },
  60874. vue.toDisplayString($setup.formatAfterSaleStatusDescription(order2)),
  60875. 1
  60876. /* TEXT */
  60877. )
  60878. ]),
  60879. vue.createElementVNode("text", { class: "_icon-forward" })
  60880. ]),
  60881. vue.createElementVNode("view", { class: "tool-btn-box ss-flex ss-col-center ss-row-right ss-p-r-20" }, [
  60882. vue.createCommentVNode(" TODO 功能缺失:填写退货信息 "),
  60883. vue.createElementVNode("view", null, [
  60884. (order2 == null ? void 0 : order2.buttons.includes("cancel")) ? (vue.openBlock(), vue.createElementBlock("button", {
  60885. key: 0,
  60886. class: "ss-reset-button tool-btn",
  60887. onClick: vue.withModifiers(($event) => $setup.onApply(order2.id), ["stop"])
  60888. }, vue.toDisplayString($setup.t("order.cancel_request")), 9, ["onClick"])) : vue.createCommentVNode("v-if", true)
  60889. ])
  60890. ])
  60891. ], 8, ["onClick"]);
  60892. }),
  60893. 128
  60894. /* KEYED_FRAGMENT */
  60895. ))
  60896. ])) : vue.createCommentVNode("v-if", true),
  60897. $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, {
  60898. key: 2,
  60899. status: $setup.state.loadStatus,
  60900. "content-text": {
  60901. contentdown: "上拉加载更多"
  60902. },
  60903. onClick: $setup.loadMore
  60904. }, null, 8, ["status"])) : vue.createCommentVNode("v-if", true)
  60905. ]),
  60906. _: 1
  60907. /* STABLE */
  60908. }, 8, ["title"]);
  60909. }
  60910. const PagesOrderAftersaleList = /* @__PURE__ */ _export_sfc(_sfc_main$1p, [["render", _sfc_render$1o], ["__scopeId", "data-v-c5e81116"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/order/aftersale/list.vue"]]);
  60911. const _sfc_main$1o = {
  60912. __name: "detail",
  60913. setup(__props, { expose: __expose }) {
  60914. __expose();
  60915. vue.useCssVars((_ctx) => ({
  60916. "915d84ff-headerBg": vue.unref(headerBg)
  60917. }));
  60918. const userInfo2 = sheep$1.$store("user").userInfo;
  60919. const statusBarHeight = sheep$1.$platform.device.statusBarHeight * 2;
  60920. const headerBg = sheep$1.$url.css("/static/img/shop/order/order_bg.png");
  60921. const state = vue.reactive({
  60922. id: 0,
  60923. // 售后编号
  60924. info: {},
  60925. // 收货信息
  60926. loading: false,
  60927. active: 0,
  60928. // 在 list 的激活位置
  60929. list: [{
  60930. title: t$6("order.submit_application")
  60931. }, {
  60932. title: t$6("order.processing")
  60933. }, {
  60934. title: t$6("order.completed")
  60935. }]
  60936. // 时间轴
  60937. });
  60938. function onApply(id) {
  60939. uni.showModal({
  60940. title: t$6("setting.prompt"),
  60941. content: t$6("order.confirm_cancel_request"),
  60942. success: async function(res) {
  60943. if (!res.confirm) {
  60944. return;
  60945. }
  60946. const {
  60947. code: code2
  60948. } = await AfterSaleApi.cancelAfterSale(id);
  60949. if (code2 === 0) {
  60950. await getDetail(id);
  60951. }
  60952. }
  60953. });
  60954. }
  60955. const onCopy = () => {
  60956. sheep$1.$helper.copyText(state.info.no);
  60957. };
  60958. async function getDetail(id) {
  60959. state.loading = true;
  60960. const {
  60961. code: code2,
  60962. data
  60963. } = await AfterSaleApi.getAfterSale(id);
  60964. if (code2 !== 0) {
  60965. state.info = null;
  60966. return;
  60967. }
  60968. state.info = data;
  60969. handleAfterSaleButtons(state.info);
  60970. if ([10].includes(state.info.status)) {
  60971. state.active = 0;
  60972. } else if ([20, 30, 40].includes(state.info.status)) {
  60973. state.active = 1;
  60974. } else if ([50].includes(state.info.status)) {
  60975. state.active = 2;
  60976. } else if ([61, 62, 63].includes(state.info.status)) {
  60977. state.active = 2;
  60978. }
  60979. }
  60980. const isLogin = vue.computed(() => sheep$1.$store("user").isLogin);
  60981. vue.watch(
  60982. () => isLogin.value,
  60983. (newVal) => {
  60984. if (newVal) {
  60985. window.location.reload();
  60986. }
  60987. }
  60988. );
  60989. onLoad((options2) => {
  60990. if (!isLogin.value) {
  60991. showAuthModal();
  60992. sheep$1.$helper.toast(t$6("order.not_logged_in", { user: options2.username }), 3e3);
  60993. } else {
  60994. if (options2.username) {
  60995. formatAppLog("log", "at pages/order/aftersale/detail.vue:236", JSON.parse(uni.getStorageSync("user-store")).userInfo.username);
  60996. if (options2.username != JSON.parse(uni.getStorageSync("user-store")).userInfo.username) {
  60997. sheep$1.$helper.toast(t$6("order.account_switch_needed", { user1: JSON.parse(uni.getStorageSync("user-store")).userInfo.username, user2: options2.username }), 3e3);
  60998. }
  60999. }
  61000. }
  61001. if (!options2.id) {
  61002. sheep$1.$helper.toast(t$6("order.missing_order_info"));
  61003. return;
  61004. }
  61005. state.id = options2.id;
  61006. getDetail(options2.id);
  61007. });
  61008. const __returned__ = { userInfo: userInfo2, statusBarHeight, headerBg, state, onApply, onCopy, getDetail, isLogin, get sheep() {
  61009. return sheep$1;
  61010. }, get onLoad() {
  61011. return onLoad;
  61012. }, reactive: vue.reactive, computed: vue.computed, watch: vue.watch, get isEmpty() {
  61013. return lodashExports.isEmpty;
  61014. }, get showAuthModal() {
  61015. return showAuthModal;
  61016. }, get fen2yuan() {
  61017. return fen2yuan;
  61018. }, get points2point() {
  61019. return points2point;
  61020. }, get formatAfterSaleStatusDescription() {
  61021. return formatAfterSaleStatusDescription;
  61022. }, get handleAfterSaleButtons() {
  61023. return handleAfterSaleButtons;
  61024. }, get AfterSaleApi() {
  61025. return AfterSaleApi;
  61026. }, get t() {
  61027. return t$6;
  61028. } };
  61029. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  61030. return __returned__;
  61031. }
  61032. };
  61033. function _sfc_render$1n(_ctx, _cache, $props, $setup, $data, $options) {
  61034. const _component_s_goods_item = resolveEasycom(vue.resolveDynamicComponent("s-goods-item"), __easycom_3$5);
  61035. const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6);
  61036. const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9);
  61037. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  61038. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  61039. title: $setup.t("order.after_sales_details"),
  61040. navbar: !$setup.isEmpty($setup.state.info) && $setup.state.loading ? "inner" : "normal"
  61041. }, {
  61042. default: vue.withCtx(() => [
  61043. !$setup.isEmpty($setup.state.info) && $setup.state.loading ? (vue.openBlock(), vue.createElementBlock("view", {
  61044. key: 0,
  61045. class: "content_box"
  61046. }, [
  61047. vue.createCommentVNode(" 步骤条 "),
  61048. vue.createElementVNode(
  61049. "view",
  61050. {
  61051. class: "steps-box ss-flex",
  61052. style: vue.normalizeStyle([
  61053. {
  61054. marginTop: "-" + Number($setup.statusBarHeight + 88) + "rpx",
  61055. paddingTop: Number($setup.statusBarHeight + 88) + "rpx"
  61056. }
  61057. ])
  61058. },
  61059. [
  61060. vue.createElementVNode("view", { class: "ss-flex" }, [
  61061. (vue.openBlock(true), vue.createElementBlock(
  61062. vue.Fragment,
  61063. null,
  61064. vue.renderList($setup.state.list, (item, index2) => {
  61065. return vue.openBlock(), vue.createElementBlock("view", {
  61066. class: "steps-item",
  61067. key: index2
  61068. }, [
  61069. vue.createElementVNode("view", { class: "ss-flex" }, [
  61070. $setup.state.list.length - 1 === index2 && [61, 62, 63].includes($setup.state.info.status) ? (vue.openBlock(), vue.createElementBlock("text", {
  61071. key: 0,
  61072. class: "sicon-circleclose"
  61073. })) : (vue.openBlock(), vue.createElementBlock(
  61074. "text",
  61075. {
  61076. key: 1,
  61077. class: vue.normalizeClass(["sicon-circlecheck", $setup.state.active >= index2 ? "activity-color" : "info-color"])
  61078. },
  61079. null,
  61080. 2
  61081. /* CLASS */
  61082. )),
  61083. $setup.state.list.length - 1 !== index2 ? (vue.openBlock(), vue.createElementBlock(
  61084. "view",
  61085. {
  61086. key: 2,
  61087. class: vue.normalizeClass(["line", $setup.state.active >= index2 ? "activity-bg" : "info-bg"])
  61088. },
  61089. null,
  61090. 2
  61091. /* CLASS */
  61092. )) : vue.createCommentVNode("v-if", true)
  61093. ]),
  61094. vue.createElementVNode(
  61095. "view",
  61096. {
  61097. class: vue.normalizeClass(["steps-item-title", $setup.state.active >= index2 ? "activity-color" : "info-color"])
  61098. },
  61099. vue.toDisplayString(item.title),
  61100. 3
  61101. /* TEXT, CLASS */
  61102. )
  61103. ]);
  61104. }),
  61105. 128
  61106. /* KEYED_FRAGMENT */
  61107. ))
  61108. ])
  61109. ],
  61110. 4
  61111. /* STYLE */
  61112. ),
  61113. vue.createCommentVNode(" 服务状态 "),
  61114. vue.createElementVNode("view", {
  61115. class: "status-box ss-flex ss-col-center ss-row-between ss-m-x-20",
  61116. onClick: _cache[0] || (_cache[0] = ($event) => $setup.sheep.$router.go("/pages/order/aftersale/log", { id: $setup.state.id }))
  61117. }, [
  61118. vue.createElementVNode("view", { class: "" }, [
  61119. vue.createElementVNode(
  61120. "view",
  61121. { class: "status-text" },
  61122. vue.toDisplayString($setup.formatAfterSaleStatusDescription($setup.state.info)),
  61123. 1
  61124. /* TEXT */
  61125. ),
  61126. vue.createElementVNode(
  61127. "view",
  61128. { class: "status-time" },
  61129. vue.toDisplayString($setup.sheep.$helper.timeFormat($setup.state.info.updateTime, "yyyy-mm-dd hh:MM:ss")),
  61130. 1
  61131. /* TEXT */
  61132. )
  61133. ]),
  61134. vue.createElementVNode("text", {
  61135. class: "ss-iconfont _icon-forward",
  61136. style: { "color": "#666" }
  61137. })
  61138. ]),
  61139. vue.createCommentVNode(" 退款金额 "),
  61140. vue.createElementVNode("view", { class: "aftersale-content ss-m-y-20" }, [
  61141. vue.createElementVNode("view", { class: "aftersale-item ss-flex ss-col-center" }, [
  61142. vue.createElementVNode(
  61143. "view",
  61144. { class: "item-title" },
  61145. vue.toDisplayString($setup.t("order.total_refund")) + ":",
  61146. 1
  61147. /* TEXT */
  61148. ),
  61149. vue.createElementVNode(
  61150. "view",
  61151. { class: "item-content" },
  61152. " ¥" + vue.toDisplayString($setup.fen2yuan($setup.state.info.refundPriceTotal)),
  61153. 1
  61154. /* TEXT */
  61155. )
  61156. ]),
  61157. vue.createElementVNode("view", { class: "aftersale-item ss-flex ss-col-center" }, [
  61158. vue.createElementVNode(
  61159. "view",
  61160. { class: "item-title" },
  61161. vue.toDisplayString($setup.t("order.refund_amount")) + ":",
  61162. 1
  61163. /* TEXT */
  61164. ),
  61165. vue.createElementVNode(
  61166. "view",
  61167. { class: "item-content" },
  61168. "¥" + vue.toDisplayString($setup.fen2yuan($setup.state.info.refundPrice)),
  61169. 1
  61170. /* TEXT */
  61171. )
  61172. ]),
  61173. vue.createElementVNode("view", { class: "aftersale-item ss-flex ss-col-center" }, [
  61174. vue.createElementVNode(
  61175. "view",
  61176. { class: "item-title" },
  61177. vue.toDisplayString($setup.t("order.refund_commission")) + ":",
  61178. 1
  61179. /* TEXT */
  61180. ),
  61181. vue.createElementVNode(
  61182. "view",
  61183. { class: "item-content" },
  61184. "¥" + vue.toDisplayString($setup.points2point($setup.state.info.refundIntegral)),
  61185. 1
  61186. /* TEXT */
  61187. )
  61188. ]),
  61189. vue.createElementVNode("view", { class: "aftersale-item ss-flex ss-col-center" }, [
  61190. vue.createElementVNode(
  61191. "view",
  61192. { class: "item-title" },
  61193. vue.toDisplayString($setup.t("order.refund_points")) + ":",
  61194. 1
  61195. /* TEXT */
  61196. ),
  61197. vue.createElementVNode(
  61198. "view",
  61199. { class: "item-content" },
  61200. "¥" + vue.toDisplayString($setup.points2point($setup.state.info.refundConsumptionPoints)),
  61201. 1
  61202. /* TEXT */
  61203. )
  61204. ])
  61205. ]),
  61206. vue.createCommentVNode(" 服务商品 "),
  61207. vue.createElementVNode("view", { class: "order-shop" }, [
  61208. vue.createVNode(_component_s_goods_item, {
  61209. price: $setup.state.info.refundPriceTotal,
  61210. img: $setup.state.info.picUrl,
  61211. title: $setup.state.info.spuName,
  61212. titleWidth: 480,
  61213. skuText: $setup.state.info.properties.map((property) => property.valueName).join(" "),
  61214. num: $setup.state.info.count
  61215. }, null, 8, ["price", "img", "title", "skuText", "num"])
  61216. ]),
  61217. vue.createCommentVNode(" 服务内容 "),
  61218. vue.createElementVNode("view", { class: "aftersale-content" }, [
  61219. vue.createElementVNode("view", { class: "aftersale-item ss-flex ss-col-center" }, [
  61220. vue.createElementVNode(
  61221. "view",
  61222. { class: "item-title" },
  61223. vue.toDisplayString($setup.t("order.service_order_number")) + ":",
  61224. 1
  61225. /* TEXT */
  61226. ),
  61227. vue.createElementVNode(
  61228. "view",
  61229. { class: "item-content ss-m-r-16" },
  61230. vue.toDisplayString($setup.state.info.no),
  61231. 1
  61232. /* TEXT */
  61233. ),
  61234. vue.createElementVNode(
  61235. "button",
  61236. {
  61237. class: "ss-reset-button copy-btn",
  61238. onClick: $setup.onCopy
  61239. },
  61240. vue.toDisplayString($setup.t("order.copy")),
  61241. 1
  61242. /* TEXT */
  61243. )
  61244. ]),
  61245. vue.createElementVNode("view", { class: "aftersale-item ss-flex ss-col-center" }, [
  61246. vue.createElementVNode(
  61247. "view",
  61248. { class: "item-title" },
  61249. vue.toDisplayString($setup.t("order.application_time")) + ":",
  61250. 1
  61251. /* TEXT */
  61252. ),
  61253. vue.createElementVNode(
  61254. "view",
  61255. { class: "item-content" },
  61256. vue.toDisplayString($setup.sheep.$helper.timeFormat($setup.state.info.createTime, "yyyy-mm-dd hh:MM:ss")),
  61257. 1
  61258. /* TEXT */
  61259. )
  61260. ]),
  61261. vue.createElementVNode("view", { class: "aftersale-item ss-flex ss-col-center" }, [
  61262. vue.createElementVNode(
  61263. "view",
  61264. { class: "item-title" },
  61265. vue.toDisplayString($setup.t("order.after_sales_type")) + ":",
  61266. 1
  61267. /* TEXT */
  61268. ),
  61269. vue.createElementVNode(
  61270. "view",
  61271. { class: "item-content" },
  61272. vue.toDisplayString($setup.state.info.way === 10 ? $setup.t("order.refund_only") : $setup.t("order.refund_and_return")),
  61273. 1
  61274. /* TEXT */
  61275. )
  61276. ]),
  61277. vue.createElementVNode("view", { class: "aftersale-item ss-flex ss-col-center" }, [
  61278. vue.createElementVNode(
  61279. "view",
  61280. { class: "item-title" },
  61281. vue.toDisplayString($setup.t("order.application_reason")) + ":",
  61282. 1
  61283. /* TEXT */
  61284. ),
  61285. vue.createElementVNode(
  61286. "view",
  61287. { class: "item-content" },
  61288. vue.toDisplayString($setup.state.info.applyReason),
  61289. 1
  61290. /* TEXT */
  61291. )
  61292. ]),
  61293. vue.createElementVNode("view", { class: "aftersale-item ss-flex ss-col-center" }, [
  61294. vue.createElementVNode(
  61295. "view",
  61296. { class: "item-title" },
  61297. vue.toDisplayString($setup.t("order.related_description")) + ":",
  61298. 1
  61299. /* TEXT */
  61300. ),
  61301. vue.createElementVNode(
  61302. "view",
  61303. { class: "item-content" },
  61304. vue.toDisplayString($setup.state.info.applyDescription),
  61305. 1
  61306. /* TEXT */
  61307. )
  61308. ])
  61309. ])
  61310. ])) : vue.createCommentVNode("v-if", true),
  61311. vue.createCommentVNode(" 操作区 "),
  61312. $setup.isEmpty($setup.state.info) && $setup.state.loading ? (vue.openBlock(), vue.createBlock(_component_s_empty, {
  61313. key: 1,
  61314. icon: "/static/order-empty.png",
  61315. text: $setup.t("order.no_after_sales_details")
  61316. }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true),
  61317. !$setup.isEmpty($setup.state.info) ? (vue.openBlock(), vue.createBlock(_component_su_fixed, {
  61318. key: 2,
  61319. bottom: "",
  61320. placeholder: "",
  61321. bg: "bg-white"
  61322. }, {
  61323. default: vue.withCtx(() => {
  61324. var _a2, _b2;
  61325. return [
  61326. vue.createElementVNode("view", { class: "foot_box" }, [
  61327. ((_a2 = $setup.state.info.buttons) == null ? void 0 : _a2.includes("cancel")) ? (vue.openBlock(), vue.createElementBlock(
  61328. "button",
  61329. {
  61330. key: 0,
  61331. class: "ss-reset-button btn",
  61332. onClick: _cache[1] || (_cache[1] = ($event) => $setup.onApply($setup.state.info.id))
  61333. },
  61334. vue.toDisplayString($setup.t("order.cancel_request")),
  61335. 1
  61336. /* TEXT */
  61337. )) : vue.createCommentVNode("v-if", true),
  61338. ((_b2 = $setup.state.info.buttons) == null ? void 0 : _b2.includes("delivery")) ? (vue.openBlock(), vue.createElementBlock(
  61339. "button",
  61340. {
  61341. key: 1,
  61342. class: "ss-reset-button btn",
  61343. onClick: _cache[2] || (_cache[2] = ($event) => $setup.sheep.$router.go("/pages/order/aftersale/return-delivery", { id: $setup.state.info.id }))
  61344. },
  61345. vue.toDisplayString($setup.t("order.fill_return")),
  61346. 1
  61347. /* TEXT */
  61348. )) : vue.createCommentVNode("v-if", true),
  61349. vue.createCommentVNode(` <button class="ss-reset-button contcat-btn btn" @tap="sheep.$router.go('/pages/chat/index')">
  61350. 联系客服
  61351. </button> `)
  61352. ])
  61353. ];
  61354. }),
  61355. _: 1
  61356. /* STABLE */
  61357. })) : vue.createCommentVNode("v-if", true)
  61358. ]),
  61359. _: 1
  61360. /* STABLE */
  61361. }, 8, ["title", "navbar"]);
  61362. }
  61363. const PagesOrderAftersaleDetail = /* @__PURE__ */ _export_sfc(_sfc_main$1o, [["render", _sfc_render$1n], ["__scopeId", "data-v-915d84ff"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/order/aftersale/detail.vue"]]);
  61364. const _sfc_main$1n = {
  61365. __name: "log-item",
  61366. props: {
  61367. item: {
  61368. type: Object,
  61369. // 当前日志
  61370. default() {
  61371. }
  61372. },
  61373. index: {
  61374. type: Number,
  61375. // item 在 data 的下标
  61376. default: 0
  61377. },
  61378. data: {
  61379. type: Object,
  61380. // 日志列表
  61381. default() {
  61382. }
  61383. }
  61384. },
  61385. setup(__props, { expose: __expose }) {
  61386. __expose();
  61387. const props = __props;
  61388. const __returned__ = { props, get sheep() {
  61389. return sheep$1;
  61390. } };
  61391. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  61392. return __returned__;
  61393. }
  61394. };
  61395. function _sfc_render$1m(_ctx, _cache, $props, $setup, $data, $options) {
  61396. return vue.openBlock(), vue.createElementBlock("view", { class: "log-item ss-flex" }, [
  61397. vue.createElementVNode("view", { class: "log-icon ss-flex-col ss-col-center ss-m-r-20" }, [
  61398. vue.createElementVNode(
  61399. "text",
  61400. {
  61401. class: vue.normalizeClass(["cicon-title", $props.index === 0 ? "activity-color" : ""])
  61402. },
  61403. null,
  61404. 2
  61405. /* CLASS */
  61406. ),
  61407. $props.data.length - 1 !== $props.index ? (vue.openBlock(), vue.createElementBlock("view", {
  61408. key: 0,
  61409. class: "line"
  61410. })) : vue.createCommentVNode("v-if", true)
  61411. ]),
  61412. vue.createElementVNode("view", null, [
  61413. vue.createElementVNode(
  61414. "view",
  61415. { class: "text" },
  61416. vue.toDisplayString($props.item.content),
  61417. 1
  61418. /* TEXT */
  61419. ),
  61420. vue.createElementVNode(
  61421. "view",
  61422. { class: "date" },
  61423. vue.toDisplayString($setup.sheep.$helper.timeFormat($props.item.createTime, "yyyy-mm-dd hh:MM:ss")),
  61424. 1
  61425. /* TEXT */
  61426. )
  61427. ])
  61428. ]);
  61429. }
  61430. const logItem = /* @__PURE__ */ _export_sfc(_sfc_main$1n, [["render", _sfc_render$1m], ["__scopeId", "data-v-3a1a95e5"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/order/aftersale/log-item.vue"]]);
  61431. const _sfc_main$1m = {
  61432. __name: "log",
  61433. setup(__props, { expose: __expose }) {
  61434. __expose();
  61435. const state = vue.reactive({
  61436. list: []
  61437. });
  61438. async function getDetail(id) {
  61439. const { data } = await AfterSaleApi.getAfterSaleLogList(id);
  61440. state.list = data;
  61441. }
  61442. onLoad((options2) => {
  61443. state.aftersaleId = options2.id;
  61444. getDetail(options2.id);
  61445. });
  61446. const __returned__ = { state, getDetail, get onLoad() {
  61447. return onLoad;
  61448. }, reactive: vue.reactive, logItem, get AfterSaleApi() {
  61449. return AfterSaleApi;
  61450. } };
  61451. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  61452. return __returned__;
  61453. }
  61454. };
  61455. function _sfc_render$1l(_ctx, _cache, $props, $setup, $data, $options) {
  61456. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  61457. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  61458. title: _ctx.$t("order.after_sales_progress")
  61459. }, {
  61460. default: vue.withCtx(() => [
  61461. vue.createElementVNode("view", { class: "log-box" }, [
  61462. (vue.openBlock(true), vue.createElementBlock(
  61463. vue.Fragment,
  61464. null,
  61465. vue.renderList($setup.state.list, (item, index2) => {
  61466. return vue.openBlock(), vue.createElementBlock("view", {
  61467. key: item.id
  61468. }, [
  61469. vue.createVNode($setup["logItem"], {
  61470. item,
  61471. index: index2,
  61472. data: $setup.state.list
  61473. }, null, 8, ["item", "index", "data"])
  61474. ]);
  61475. }),
  61476. 128
  61477. /* KEYED_FRAGMENT */
  61478. ))
  61479. ])
  61480. ]),
  61481. _: 1
  61482. /* STABLE */
  61483. }, 8, ["title"]);
  61484. }
  61485. const PagesOrderAftersaleLog = /* @__PURE__ */ _export_sfc(_sfc_main$1m, [["render", _sfc_render$1l], ["__scopeId", "data-v-2fedae8f"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/order/aftersale/log.vue"]]);
  61486. const _sfc_main$1l = {
  61487. name: "UniSwiperDot",
  61488. emits: ["clickItem"],
  61489. props: {
  61490. info: {
  61491. type: Array,
  61492. default() {
  61493. return [];
  61494. }
  61495. },
  61496. current: {
  61497. type: Number,
  61498. default: 0
  61499. },
  61500. dotsStyles: {
  61501. type: Object,
  61502. default() {
  61503. return {};
  61504. }
  61505. },
  61506. // 类型 :default(默认) indexes long nav
  61507. mode: {
  61508. type: String,
  61509. default: "default"
  61510. },
  61511. // 只在 nav 模式下生效,变量名称
  61512. field: {
  61513. type: String,
  61514. default: ""
  61515. }
  61516. },
  61517. data() {
  61518. return {
  61519. dots: {
  61520. width: 6,
  61521. height: 6,
  61522. bottom: 10,
  61523. color: "#fff",
  61524. backgroundColor: "rgba(0, 0, 0, .3)",
  61525. border: "1px rgba(0, 0, 0, .3) solid",
  61526. selectedBackgroundColor: "#333",
  61527. selectedBorder: "1px rgba(0, 0, 0, .9) solid"
  61528. }
  61529. };
  61530. },
  61531. watch: {
  61532. dotsStyles(newVal) {
  61533. this.dots = Object.assign(this.dots, this.dotsStyles);
  61534. },
  61535. mode(newVal) {
  61536. if (newVal === "indexes") {
  61537. this.dots.width = 14;
  61538. this.dots.height = 14;
  61539. } else {
  61540. this.dots.width = 6;
  61541. this.dots.height = 6;
  61542. }
  61543. }
  61544. },
  61545. created() {
  61546. if (this.mode === "indexes") {
  61547. this.dots.width = 12;
  61548. this.dots.height = 12;
  61549. }
  61550. this.dots = Object.assign(this.dots, this.dotsStyles);
  61551. },
  61552. methods: {
  61553. clickItem(index2) {
  61554. this.$emit("clickItem", index2);
  61555. }
  61556. }
  61557. };
  61558. function _sfc_render$1k(_ctx, _cache, $props, $setup, $data, $options) {
  61559. return vue.openBlock(), vue.createElementBlock("view", { class: "uni-swiper__warp" }, [
  61560. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
  61561. $props.mode === "default" ? (vue.openBlock(), vue.createElementBlock(
  61562. "view",
  61563. {
  61564. style: vue.normalizeStyle({ "bottom": $data.dots.bottom + "px" }),
  61565. class: "uni-swiper__dots-box",
  61566. key: "default"
  61567. },
  61568. [
  61569. (vue.openBlock(true), vue.createElementBlock(
  61570. vue.Fragment,
  61571. null,
  61572. vue.renderList($props.info, (item, index2) => {
  61573. return vue.openBlock(), vue.createElementBlock("view", {
  61574. onClick: ($event) => $options.clickItem(index2),
  61575. style: vue.normalizeStyle({
  61576. "width": (index2 === $props.current ? $data.dots.width * 2 : $data.dots.width) + "px",
  61577. "height": $data.dots.width / 2 + "px",
  61578. "background-color": index2 !== $props.current ? $data.dots.backgroundColor : $data.dots.selectedBackgroundColor,
  61579. "border-radius": "0px"
  61580. }),
  61581. key: index2,
  61582. class: "uni-swiper__dots-item uni-swiper__dots-bar"
  61583. }, null, 12, ["onClick"]);
  61584. }),
  61585. 128
  61586. /* KEYED_FRAGMENT */
  61587. ))
  61588. ],
  61589. 4
  61590. /* STYLE */
  61591. )) : vue.createCommentVNode("v-if", true),
  61592. $props.mode === "dot" ? (vue.openBlock(), vue.createElementBlock(
  61593. "view",
  61594. {
  61595. style: vue.normalizeStyle({ "bottom": $data.dots.bottom + "px" }),
  61596. class: "uni-swiper__dots-box",
  61597. key: "dot"
  61598. },
  61599. [
  61600. (vue.openBlock(true), vue.createElementBlock(
  61601. vue.Fragment,
  61602. null,
  61603. vue.renderList($props.info, (item, index2) => {
  61604. return vue.openBlock(), vue.createElementBlock("view", {
  61605. onClick: ($event) => $options.clickItem(index2),
  61606. style: vue.normalizeStyle({
  61607. "width": $data.dots.width + "px",
  61608. "height": $data.dots.height + "px",
  61609. "background-color": index2 !== $props.current ? $data.dots.backgroundColor : $data.dots.selectedBackgroundColor,
  61610. "border": index2 !== $props.current ? $data.dots.border : $data.dots.selectedBorder
  61611. }),
  61612. key: index2,
  61613. class: "uni-swiper__dots-item"
  61614. }, null, 12, ["onClick"]);
  61615. }),
  61616. 128
  61617. /* KEYED_FRAGMENT */
  61618. ))
  61619. ],
  61620. 4
  61621. /* STYLE */
  61622. )) : vue.createCommentVNode("v-if", true),
  61623. $props.mode === "round" ? (vue.openBlock(), vue.createElementBlock(
  61624. "view",
  61625. {
  61626. style: vue.normalizeStyle({ "bottom": $data.dots.bottom + "px" }),
  61627. class: "uni-swiper__dots-box",
  61628. key: "round"
  61629. },
  61630. [
  61631. (vue.openBlock(true), vue.createElementBlock(
  61632. vue.Fragment,
  61633. null,
  61634. vue.renderList($props.info, (item, index2) => {
  61635. return vue.openBlock(), vue.createElementBlock("view", {
  61636. onClick: ($event) => $options.clickItem(index2),
  61637. class: vue.normalizeClass([[index2 === $props.current && "uni-swiper__dots-long"], "uni-swiper__dots-item"]),
  61638. style: vue.normalizeStyle({
  61639. "width": (index2 === $props.current ? $data.dots.width * 3 : $data.dots.width) + "px",
  61640. "height": $data.dots.height + "px",
  61641. "background-color": index2 !== $props.current ? $data.dots.backgroundColor : $data.dots.selectedBackgroundColor,
  61642. "border": index2 !== $props.current ? $data.dots.border : $data.dots.selectedBorder
  61643. }),
  61644. key: index2
  61645. }, null, 14, ["onClick"]);
  61646. }),
  61647. 128
  61648. /* KEYED_FRAGMENT */
  61649. ))
  61650. ],
  61651. 4
  61652. /* STYLE */
  61653. )) : vue.createCommentVNode("v-if", true),
  61654. $props.mode === "nav" ? (vue.openBlock(), vue.createElementBlock(
  61655. "view",
  61656. {
  61657. key: "nav",
  61658. style: vue.normalizeStyle({ "background-color": $props.dotsStyles.backgroundColor, "bottom": "0" }),
  61659. class: "uni-swiper__dots-box uni-swiper__dots-nav"
  61660. },
  61661. [
  61662. vue.createElementVNode(
  61663. "text",
  61664. {
  61665. style: vue.normalizeStyle({ "color": $props.dotsStyles.color }),
  61666. class: "uni-swiper__dots-nav-item"
  61667. },
  61668. vue.toDisplayString($props.current + 1 + "/" + $props.info.length + " " + $props.info[$props.current][$props.field]),
  61669. 5
  61670. /* TEXT, STYLE */
  61671. )
  61672. ],
  61673. 4
  61674. /* STYLE */
  61675. )) : vue.createCommentVNode("v-if", true),
  61676. $props.mode === "indexes" ? (vue.openBlock(), vue.createElementBlock(
  61677. "view",
  61678. {
  61679. key: "indexes",
  61680. style: vue.normalizeStyle({ "bottom": $data.dots.bottom + "px" }),
  61681. class: "uni-swiper__dots-box"
  61682. },
  61683. [
  61684. (vue.openBlock(true), vue.createElementBlock(
  61685. vue.Fragment,
  61686. null,
  61687. vue.renderList($props.info, (item, index2) => {
  61688. return vue.openBlock(), vue.createElementBlock("view", {
  61689. onClick: ($event) => $options.clickItem(index2),
  61690. style: vue.normalizeStyle({
  61691. "width": $data.dots.width + "px",
  61692. "height": $data.dots.height + "px",
  61693. "color": index2 === $props.current ? $data.dots.selectedColor : $data.dots.color,
  61694. "background-color": index2 !== $props.current ? $data.dots.backgroundColor : $data.dots.selectedBackgroundColor,
  61695. "border": index2 !== $props.current ? $data.dots.border : $data.dots.selectedBorder
  61696. }),
  61697. key: index2,
  61698. class: "uni-swiper__dots-item uni-swiper__dots-indexes"
  61699. }, [
  61700. vue.createElementVNode(
  61701. "text",
  61702. { class: "uni-swiper__dots-indexes-text" },
  61703. vue.toDisplayString(index2 + 1),
  61704. 1
  61705. /* TEXT */
  61706. )
  61707. ], 12, ["onClick"]);
  61708. }),
  61709. 128
  61710. /* KEYED_FRAGMENT */
  61711. ))
  61712. ],
  61713. 4
  61714. /* STYLE */
  61715. )) : vue.createCommentVNode("v-if", true)
  61716. ]);
  61717. }
  61718. const __easycom_0$6 = /* @__PURE__ */ _export_sfc(_sfc_main$1l, [["render", _sfc_render$1k], ["__scopeId", "data-v-0667e3db"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-swiper-dot/components/uni-swiper-dot/uni-swiper-dot.vue"]]);
  61719. const _sfc_main$1k = {
  61720. __name: "log",
  61721. setup(__props, { expose: __expose }) {
  61722. __expose();
  61723. const state = vue.reactive({
  61724. info: [],
  61725. tracks: []
  61726. });
  61727. const goodsImages = vue.computed(() => {
  61728. let array2 = [];
  61729. if (state.info.items) {
  61730. state.info.items.forEach((item) => {
  61731. array2.push({
  61732. image: item.picUrl
  61733. });
  61734. });
  61735. }
  61736. return array2;
  61737. });
  61738. async function getExpressDetail(id) {
  61739. const {
  61740. data
  61741. } = await OrderApi.getOrderExpressTrackList(id);
  61742. state.tracks = data;
  61743. }
  61744. async function getOrderDetail(id) {
  61745. const {
  61746. data
  61747. } = await OrderApi.getOrder(id);
  61748. state.info = data;
  61749. }
  61750. onLoad((options2) => {
  61751. getExpressDetail(options2.id);
  61752. getOrderDetail(options2.id);
  61753. });
  61754. const __returned__ = { state, goodsImages, getExpressDetail, getOrderDetail, get sheep() {
  61755. return sheep$1;
  61756. }, get onLoad() {
  61757. return onLoad;
  61758. }, computed: vue.computed, reactive: vue.reactive, get OrderApi() {
  61759. return OrderApi;
  61760. } };
  61761. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  61762. return __returned__;
  61763. }
  61764. };
  61765. function _sfc_render$1j(_ctx, _cache, $props, $setup, $data, $options) {
  61766. const _component_uni_swiper_dot = resolveEasycom(vue.resolveDynamicComponent("uni-swiper-dot"), __easycom_0$6);
  61767. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  61768. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  61769. title: _ctx.$t("order.logistics_tracking")
  61770. }, {
  61771. default: vue.withCtx(() => [
  61772. vue.createElementVNode("view", { class: "log-wrap" }, [
  61773. vue.createCommentVNode(" 商品信息 "),
  61774. $setup.goodsImages.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  61775. key: 0,
  61776. class: "log-card ss-flex ss-m-20 ss-r-10"
  61777. }, [
  61778. vue.createVNode(_component_uni_swiper_dot, {
  61779. info: $setup.goodsImages,
  61780. current: $setup.state.current,
  61781. mode: "round"
  61782. }, {
  61783. default: vue.withCtx(() => [
  61784. vue.createElementVNode("swiper", { class: "swiper-box" }, [
  61785. (vue.openBlock(true), vue.createElementBlock(
  61786. vue.Fragment,
  61787. null,
  61788. vue.renderList($setup.goodsImages, (item, index2) => {
  61789. return vue.openBlock(), vue.createElementBlock("swiper-item", { key: index2 }, [
  61790. vue.createElementVNode("view", {
  61791. class: "image-container",
  61792. style: { "width": "100%", "height": "100%" }
  61793. }, [
  61794. vue.createElementVNode("view", { style: { "width": "100%", "height": "106rpx", "padding-top": "15%" } }, [
  61795. vue.createElementVNode("image", {
  61796. class: "log-card-img",
  61797. mode: "aspectFill",
  61798. src: $setup.sheep.$url.static(item.image),
  61799. style: { "width": "100%", "height": "100%", "object-fit": "cover" }
  61800. }, null, 8, ["src"])
  61801. ])
  61802. ])
  61803. ]);
  61804. }),
  61805. 128
  61806. /* KEYED_FRAGMENT */
  61807. ))
  61808. ])
  61809. ]),
  61810. _: 1
  61811. /* STABLE */
  61812. }, 8, ["info", "current"]),
  61813. vue.createElementVNode("view", { class: "log-card-msg" }, [
  61814. vue.createCommentVNode(" TODO 非繁人:优化点:展示状态 "),
  61815. vue.createCommentVNode(' <view class="ss-flex ss-m-b-8">'),
  61816. vue.createCommentVNode(" <view>物流状态:</view>"),
  61817. vue.createCommentVNode(' <view class="warning-color">{{ state.info.status_text }}</view>'),
  61818. vue.createCommentVNode(" </view>"),
  61819. vue.createElementVNode(
  61820. "view",
  61821. { class: "ss-m-b-16 TrackingNumber" },
  61822. vue.toDisplayString(_ctx.$t("order.tracking_number") + ":" + $setup.state.info.logisticsNo),
  61823. 1
  61824. /* TEXT */
  61825. ),
  61826. vue.createElementVNode(
  61827. "view",
  61828. { class: "ss-m-b-16" },
  61829. vue.toDisplayString(_ctx.$t("order.courier_company") + ":" + $setup.state.info.logisticsName),
  61830. 1
  61831. /* TEXT */
  61832. ),
  61833. vue.createElementVNode(
  61834. "view",
  61835. null,
  61836. vue.toDisplayString(_ctx.$t("order.shipping_time") + ":" + $setup.sheep.$helper.timeFormat($setup.state.info.deliveryTime, "yyyy-mm-dd hh:MM")),
  61837. 1
  61838. /* TEXT */
  61839. )
  61840. ])
  61841. ])) : vue.createCommentVNode("v-if", true),
  61842. vue.createCommentVNode(" 物流轨迹 "),
  61843. vue.createElementVNode("view", { class: "log-content ss-m-20 ss-r-10" }, [
  61844. (vue.openBlock(true), vue.createElementBlock(
  61845. vue.Fragment,
  61846. null,
  61847. vue.renderList($setup.state.tracks, (item, index2) => {
  61848. return vue.openBlock(), vue.createElementBlock("view", {
  61849. class: "log-content-box ss-flex",
  61850. key: item.title
  61851. }, [
  61852. vue.createElementVNode("view", { class: "log-icon ss-flex-col ss-col-center ss-m-r-20" }, [
  61853. vue.createElementVNode("text", { class: "cicon-title" }),
  61854. $setup.state.tracks.length - 1 !== index2 ? (vue.openBlock(), vue.createElementBlock("view", {
  61855. key: 0,
  61856. class: "line"
  61857. })) : vue.createCommentVNode("v-if", true)
  61858. ]),
  61859. vue.createElementVNode("view", { class: "log-content-msg" }, [
  61860. vue.createCommentVNode(" TODO 非繁人:优化点:展示状态 "),
  61861. vue.createCommentVNode(' <view class="log-msg-title ss-m-b-20">'),
  61862. vue.createCommentVNode(" {{ item.status_text }}"),
  61863. vue.createCommentVNode(" </view>"),
  61864. vue.createElementVNode(
  61865. "view",
  61866. { class: "log-msg-desc ss-m-b-16" },
  61867. vue.toDisplayString(item.content),
  61868. 1
  61869. /* TEXT */
  61870. ),
  61871. vue.createElementVNode(
  61872. "view",
  61873. { class: "log-msg-date ss-m-b-40" },
  61874. vue.toDisplayString($setup.sheep.$helper.timeFormat(item.time, "yyyy-mm-dd hh:MM:ss")),
  61875. 1
  61876. /* TEXT */
  61877. )
  61878. ])
  61879. ]);
  61880. }),
  61881. 128
  61882. /* KEYED_FRAGMENT */
  61883. ))
  61884. ])
  61885. ])
  61886. ]),
  61887. _: 1
  61888. /* STABLE */
  61889. }, 8, ["title"]);
  61890. }
  61891. const PagesOrderExpressLog = /* @__PURE__ */ _export_sfc(_sfc_main$1k, [["render", _sfc_render$1j], ["__scopeId", "data-v-d9d25552"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/order/express/log.vue"]]);
  61892. const _sfc_main$1j = {
  61893. __name: "otherlist",
  61894. setup(__props, { expose: __expose }) {
  61895. __expose();
  61896. const tradeManaged = vue.computed(() => sheep$1.$store("app").has_wechat_trade_managed);
  61897. const pagination = {
  61898. data: [],
  61899. current_page: 1,
  61900. total: 1,
  61901. last_page: 1
  61902. };
  61903. const state = vue.reactive({
  61904. currentTab: 0,
  61905. pagination: {
  61906. data: [],
  61907. current_page: 1,
  61908. total: 1,
  61909. last_page: 1
  61910. },
  61911. loadStatus: "",
  61912. deleteOrderId: 0,
  61913. error: 0
  61914. });
  61915. const tabMaps = [
  61916. {
  61917. name: "全部",
  61918. value: "all"
  61919. },
  61920. {
  61921. name: "待付款",
  61922. value: "unpaid"
  61923. },
  61924. {
  61925. name: "待发货",
  61926. value: "nosend"
  61927. },
  61928. {
  61929. name: "待收货",
  61930. value: "noget"
  61931. },
  61932. {
  61933. name: "待评价",
  61934. value: "nocomment"
  61935. }
  61936. ];
  61937. function onTabsChange(e2) {
  61938. if (state.currentTab === e2.index)
  61939. return;
  61940. state.pagination = pagination;
  61941. state.currentTab = e2.index;
  61942. getOrderList();
  61943. }
  61944. function onOrderDetail(orderSN) {
  61945. sheep$1.$router.go("/pages/order/detail", {
  61946. orderSN
  61947. });
  61948. }
  61949. function onOrderGroupon(order2) {
  61950. sheep$1.$router.go("/pages/activity/groupon/detail", {
  61951. id: order2.ext.groupon_id
  61952. });
  61953. }
  61954. function onOrderInvoice(invoiceId) {
  61955. sheep$1.$router.go("/pages/order/invoice", {
  61956. invoiceId
  61957. });
  61958. }
  61959. function onPay(orderSN) {
  61960. sheep$1.$router.go("/pages/pay/index", {
  61961. orderSN
  61962. });
  61963. }
  61964. function onComment(orderSN) {
  61965. sheep$1.$router.go("/pages/goods/comment/add", {
  61966. orderSN
  61967. });
  61968. }
  61969. async function onConfirm(order2, ignore = false) {
  61970. if (sheep$1.$platform.name === "WechatMiniProgram" && !lodashExports.isEmpty(order2.wechat_extra_data) && tradeManaged.value === 1 && !ignore) {
  61971. mpConfirm(order2);
  61972. return;
  61973. }
  61974. const { error: error2 } = await sheep$1.$api.order.confirm(order2.id);
  61975. if (error2 === 0) {
  61976. state.pagination = pagination;
  61977. getOrderList();
  61978. }
  61979. }
  61980. async function onExpress(orderId) {
  61981. sheep$1.$router.go("/pages/order/express/list", {
  61982. orderId
  61983. });
  61984. }
  61985. async function onCancel(orderId) {
  61986. uni.showModal({
  61987. title: "提示",
  61988. content: "确定要取消订单吗?",
  61989. success: async function(res) {
  61990. if (res.confirm) {
  61991. const { error: error2, data } = await sheep$1.$api.order.cancel(orderId);
  61992. if (error2 === 0) {
  61993. let index2 = state.pagination.data.findIndex((order2) => order2.id === orderId);
  61994. state.pagination.data[index2] = data;
  61995. }
  61996. }
  61997. }
  61998. });
  61999. }
  62000. function onDelete(orderId) {
  62001. uni.showModal({
  62002. title: "提示",
  62003. content: "确定要删除订单吗?",
  62004. success: async function(res) {
  62005. if (res.confirm) {
  62006. const { error: error2, data } = await sheep$1.$api.order.delete(orderId);
  62007. if (error2 === 0) {
  62008. let index2 = state.pagination.data.findIndex((order2) => order2.id === orderId);
  62009. state.pagination.data.splice(index2, 1);
  62010. }
  62011. }
  62012. }
  62013. });
  62014. }
  62015. async function onRefund(orderId) {
  62016. uni.showModal({
  62017. title: "提示",
  62018. content: "确定要申请退款吗?",
  62019. success: async function(res) {
  62020. if (res.confirm) {
  62021. const { error: error2, data } = await sheep$1.$api.order.applyRefund(orderId);
  62022. if (error2 === 0) {
  62023. let index2 = state.pagination.data.findIndex((order2) => order2.id === orderId);
  62024. state.pagination.data[index2] = data;
  62025. }
  62026. }
  62027. }
  62028. });
  62029. }
  62030. async function getOrderList(page2 = 1, list_rows = 5) {
  62031. state.loadStatus = "loading";
  62032. let res = await sheep$1.$api.order.list({
  62033. type: tabMaps[state.currentTab].value,
  62034. list_rows,
  62035. page: page2
  62036. });
  62037. state.error = res.error;
  62038. if (res.error === 0) {
  62039. let orderList = _$1.concat(state.pagination.data, res.data.data);
  62040. state.pagination = {
  62041. ...res.data,
  62042. data: orderList
  62043. };
  62044. if (state.pagination.current_page < state.pagination.last_page) {
  62045. state.loadStatus = "more";
  62046. } else {
  62047. state.loadStatus = "noMore";
  62048. }
  62049. }
  62050. }
  62051. onLoad(async (options2) => {
  62052. if (options2.type) {
  62053. state.currentTab = options2.type;
  62054. }
  62055. getOrderList();
  62056. });
  62057. function loadmore() {
  62058. if (state.loadStatus !== "noMore") {
  62059. getOrderList(state.pagination.current_page + 1);
  62060. }
  62061. }
  62062. onReachBottom(() => {
  62063. loadmore();
  62064. });
  62065. onPullDownRefresh(() => {
  62066. state.pagination = pagination;
  62067. getOrderList();
  62068. setTimeout(function() {
  62069. uni.stopPullDownRefresh();
  62070. }, 800);
  62071. });
  62072. const __returned__ = { tradeManaged, pagination, state, tabMaps, onTabsChange, onOrderDetail, onOrderGroupon, onOrderInvoice, onPay, onComment, onConfirm, onExpress, onCancel, onDelete, onRefund, getOrderList, loadmore, computed: vue.computed, reactive: vue.reactive, get onLoad() {
  62073. return onLoad;
  62074. }, get onReachBottom() {
  62075. return onReachBottom;
  62076. }, get onPullDownRefresh() {
  62077. return onPullDownRefresh;
  62078. }, get formatOrderColor() {
  62079. return formatOrderColor;
  62080. }, get sheep() {
  62081. return sheep$1;
  62082. }, get _() {
  62083. return _$1;
  62084. }, get isEmpty() {
  62085. return lodashExports.isEmpty;
  62086. } };
  62087. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  62088. return __returned__;
  62089. }
  62090. };
  62091. function _sfc_render$1i(_ctx, _cache, $props, $setup, $data, $options) {
  62092. const _component_su_tabs = resolveEasycom(vue.resolveDynamicComponent("su-tabs"), __easycom_0$a);
  62093. const _component_su_sticky = resolveEasycom(vue.resolveDynamicComponent("su-sticky"), __easycom_0$9);
  62094. const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6);
  62095. const _component_s_goods_item = resolveEasycom(vue.resolveDynamicComponent("s-goods-item"), __easycom_3$5);
  62096. const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5);
  62097. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  62098. return vue.openBlock(), vue.createBlock(_component_s_layout, { title: "我的订单" }, {
  62099. default: vue.withCtx(() => [
  62100. vue.createVNode(_component_su_sticky, { bgColor: "#fff" }, {
  62101. default: vue.withCtx(() => [
  62102. vue.createVNode(_component_su_tabs, {
  62103. list: $setup.tabMaps,
  62104. scrollable: false,
  62105. onChange: $setup.onTabsChange,
  62106. current: $setup.state.currentTab
  62107. }, null, 8, ["current"])
  62108. ]),
  62109. _: 1
  62110. /* STABLE */
  62111. }),
  62112. $setup.state.pagination.total === 0 ? (vue.openBlock(), vue.createBlock(_component_s_empty, {
  62113. key: 0,
  62114. icon: "/static/order-empty.png",
  62115. text: "暂无订单"
  62116. })) : vue.createCommentVNode("v-if", true),
  62117. $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1 }, [
  62118. (vue.openBlock(true), vue.createElementBlock(
  62119. vue.Fragment,
  62120. null,
  62121. vue.renderList($setup.state.pagination.data, (order2) => {
  62122. return vue.openBlock(), vue.createElementBlock("view", {
  62123. class: "bg-white order-list-card-box ss-r-10 ss-m-t-14 ss-m-20",
  62124. key: order2.id,
  62125. onClick: ($event) => $setup.onOrderDetail(order2.order_sn)
  62126. }, [
  62127. vue.createElementVNode("view", { class: "order-card-header ss-flex ss-col-center ss-row-between ss-p-x-20" }, [
  62128. vue.createElementVNode(
  62129. "view",
  62130. { class: "order-no" },
  62131. "订单号:" + vue.toDisplayString(order2.order_sn),
  62132. 1
  62133. /* TEXT */
  62134. ),
  62135. vue.createElementVNode(
  62136. "view",
  62137. {
  62138. class: vue.normalizeClass(["order-state ss-font-26", $setup.formatOrderColor(order2.status_code)])
  62139. },
  62140. vue.toDisplayString(order2.status_text),
  62141. 3
  62142. /* TEXT, CLASS */
  62143. )
  62144. ]),
  62145. (vue.openBlock(true), vue.createElementBlock(
  62146. vue.Fragment,
  62147. null,
  62148. vue.renderList(order2.items, (item) => {
  62149. return vue.openBlock(), vue.createElementBlock("view", {
  62150. class: "border-bottom",
  62151. key: item.id
  62152. }, [
  62153. vue.createVNode(_component_s_goods_item, {
  62154. img: item.goods_image,
  62155. title: item.goods_title,
  62156. skuText: item.goods_sku_text,
  62157. price: item.goods_price,
  62158. score: order2.score_amount,
  62159. num: item.goods_num
  62160. }, {
  62161. tool: vue.withCtx(() => [
  62162. vue.createElementVNode("view", { class: "ss-flex" }, [
  62163. item.btns.includes("aftersale") ? (vue.openBlock(), vue.createElementBlock("button", {
  62164. key: 0,
  62165. class: "ss-reset-button apply-btn",
  62166. onClick: vue.withModifiers(($event) => $setup.sheep.$router.go("/pages/order/aftersale/apply", {
  62167. item: JSON.stringify(item)
  62168. }), ["stop"])
  62169. }, " 申请售后 ", 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  62170. item.btns.includes("re_aftersale") ? (vue.openBlock(), vue.createElementBlock("button", {
  62171. key: 1,
  62172. class: "ss-reset-button apply-btn",
  62173. onClick: vue.withModifiers(($event) => $setup.sheep.$router.go("/pages/order/aftersale/apply", {
  62174. item: JSON.stringify(item)
  62175. }), ["stop"])
  62176. }, " 重新售后 ", 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  62177. item.btns.includes("aftersale_info") ? (vue.openBlock(), vue.createElementBlock("button", {
  62178. key: 2,
  62179. class: "ss-reset-button apply-btn",
  62180. onClick: vue.withModifiers(($event) => $setup.sheep.$router.go("/pages/order/aftersale/detail", {
  62181. id: item.ext.aftersale_id
  62182. }), ["stop"])
  62183. }, " 售后详情 ", 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  62184. item.btns.includes("buy_again") ? (vue.openBlock(), vue.createElementBlock("button", {
  62185. key: 3,
  62186. class: "ss-reset-button apply-btn",
  62187. onClick: vue.withModifiers(($event) => $setup.sheep.$router.go("/pages/goods/index", {
  62188. id: item.goods_id
  62189. }), ["stop"])
  62190. }, " 再次购买 ", 8, ["onClick"])) : vue.createCommentVNode("v-if", true)
  62191. ])
  62192. ]),
  62193. _: 2
  62194. /* DYNAMIC */
  62195. }, 1032, ["img", "title", "skuText", "price", "score", "num"])
  62196. ]);
  62197. }),
  62198. 128
  62199. /* KEYED_FRAGMENT */
  62200. )),
  62201. vue.createElementVNode("view", { class: "pay-box ss-m-t-30 ss-flex ss-row-right ss-p-r-20" }, [
  62202. order2.total_discount_fee > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  62203. key: 0,
  62204. class: "ss-flex ss-col-center ss-m-r-8"
  62205. }, [
  62206. vue.createElementVNode("view", { class: "discounts-title" }, "优惠:¥"),
  62207. vue.createElementVNode(
  62208. "view",
  62209. { class: "discounts-money" },
  62210. vue.toDisplayString(order2.total_discount_fee),
  62211. 1
  62212. /* TEXT */
  62213. )
  62214. ])) : vue.createCommentVNode("v-if", true),
  62215. vue.createElementVNode("view", { class: "ss-flex ss-col-center ss-m-r-8" }, [
  62216. vue.createElementVNode("view", { class: "discounts-title" }, "运费:¥"),
  62217. vue.createElementVNode(
  62218. "view",
  62219. { class: "discounts-money" },
  62220. vue.toDisplayString(order2.dispatch_amount),
  62221. 1
  62222. /* TEXT */
  62223. )
  62224. ]),
  62225. vue.createElementVNode("view", { class: "ss-flex ss-col-center" }, [
  62226. vue.createElementVNode("view", { class: "discounts-title pay-color" }, "总金额:"),
  62227. vue.createElementVNode(
  62228. "view",
  62229. { class: "discounts-money pay-color" },
  62230. "¥" + vue.toDisplayString(order2.order_amount),
  62231. 1
  62232. /* TEXT */
  62233. ),
  62234. order2.score_amount ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, "+")) : vue.createCommentVNode("v-if", true),
  62235. order2.score_amount ? (vue.openBlock(), vue.createElementBlock("view", {
  62236. key: 1,
  62237. class: "discounts-money pay-color ss-flex ss-col-center"
  62238. }, [
  62239. vue.createElementVNode("image", {
  62240. src: $setup.sheep.$url.static("/static/images/score1.svg"),
  62241. class: "score-img"
  62242. }, null, 8, ["src"]),
  62243. vue.createElementVNode(
  62244. "view",
  62245. null,
  62246. vue.toDisplayString(order2.score_amount),
  62247. 1
  62248. /* TEXT */
  62249. )
  62250. ])) : vue.createCommentVNode("v-if", true)
  62251. ])
  62252. ]),
  62253. vue.createElementVNode(
  62254. "view",
  62255. {
  62256. class: vue.normalizeClass(["order-card-footer ss-flex ss-col-center ss-p-x-20", order2.btns.length > 3 ? "ss-row-between" : "ss-row-right"])
  62257. },
  62258. [
  62259. vue.createCommentVNode(' <su-popover>\n <button class="more-btn ss-reset-button" @click.stop>更多</button>\n <template #content>\n <view class="more-item-box">\n <view class="more-item ss-flex ss-col-center ss-reset-button">\n <view class="item-title">删除订单</view>\n </view>\n <view class="more-item ss-flex ss-col-center ss-reset-button">\n <view class="item-title">查看发票</view>\n </view>\n <view class="more-item ss-flex ss-col-center ss-reset-button">\n <view class="item-title">评价晒单</view>\n </view>\n </view>\n </template>\n </su-popover> '),
  62260. vue.createElementVNode("view", { class: "ss-flex ss-col-center" }, [
  62261. order2.btns.includes("groupon") ? (vue.openBlock(), vue.createElementBlock("button", {
  62262. key: 0,
  62263. class: "tool-btn ss-reset-button",
  62264. onClick: vue.withModifiers(($event) => $setup.onOrderGroupon(order2), ["stop"])
  62265. }, vue.toDisplayString(order2.status_code === "groupon_ing" ? "邀请拼团" : "拼团详情"), 9, ["onClick"])) : vue.createCommentVNode("v-if", true),
  62266. order2.btns.includes("invoice") ? (vue.openBlock(), vue.createElementBlock("button", {
  62267. key: 1,
  62268. class: "tool-btn ss-reset-button",
  62269. onClick: vue.withModifiers(($event) => {
  62270. var _a2;
  62271. return $setup.onOrderInvoice((_a2 = order2.invoice) == null ? void 0 : _a2.id);
  62272. }, ["stop"])
  62273. }, " 查看发票 ", 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  62274. order2.btns.length === 0 ? (vue.openBlock(), vue.createElementBlock("button", {
  62275. key: 2,
  62276. class: "tool-btn ss-reset-button",
  62277. onClick: vue.withModifiers(($event) => $setup.onOrderDetail(order2.order_sn), ["stop"])
  62278. }, " 查看详情 ", 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  62279. order2.btns.includes("confirm") ? (vue.openBlock(), vue.createElementBlock("button", {
  62280. key: 3,
  62281. class: "tool-btn ss-reset-button",
  62282. onClick: vue.withModifiers(($event) => $setup.onConfirm(order2), ["stop"])
  62283. }, " 确认收货 ", 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  62284. order2.btns.includes("express") ? (vue.openBlock(), vue.createElementBlock("button", {
  62285. key: 4,
  62286. class: "tool-btn ss-reset-button",
  62287. onClick: vue.withModifiers(($event) => $setup.onExpress(order2.id), ["stop"])
  62288. }, " 查看物流 ", 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  62289. order2.btns.includes("apply_refund") ? (vue.openBlock(), vue.createElementBlock("button", {
  62290. key: 5,
  62291. class: "tool-btn ss-reset-button",
  62292. onClick: vue.withModifiers(($event) => $setup.onRefund(order2.id), ["stop"])
  62293. }, " 申请退款 ", 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  62294. order2.btns.includes("re_apply_refund") ? (vue.openBlock(), vue.createElementBlock("button", {
  62295. key: 6,
  62296. class: "tool-btn ss-reset-button",
  62297. onClick: vue.withModifiers(($event) => $setup.onRefund(order2.id), ["stop"])
  62298. }, " 重新退款 ", 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  62299. order2.btns.includes("cancel") ? (vue.openBlock(), vue.createElementBlock("button", {
  62300. key: 7,
  62301. class: "tool-btn ss-reset-button",
  62302. onClick: vue.withModifiers(($event) => $setup.onCancel(order2.id), ["stop"])
  62303. }, " 取消订单 ", 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  62304. order2.btns.includes("comment") ? (vue.openBlock(), vue.createElementBlock("button", {
  62305. key: 8,
  62306. class: "tool-btn ss-reset-button",
  62307. onClick: vue.withModifiers(($event) => $setup.onComment(order2.order_sn), ["stop"])
  62308. }, " 评价晒单 ", 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  62309. order2.btns.includes("delete") ? (vue.openBlock(), vue.createElementBlock("button", {
  62310. key: 9,
  62311. class: "delete-btn ss-reset-button",
  62312. onClick: vue.withModifiers(($event) => $setup.onDelete(order2.id), ["stop"])
  62313. }, " 删除订单 ", 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  62314. order2.btns.includes("pay") ? (vue.openBlock(), vue.createElementBlock("button", {
  62315. key: 10,
  62316. class: "tool-btn ss-reset-button ui-BG-Main-Gradient",
  62317. onClick: vue.withModifiers(($event) => $setup.onPay(order2.order_sn), ["stop"])
  62318. }, " 继续支付 ", 8, ["onClick"])) : vue.createCommentVNode("v-if", true)
  62319. ])
  62320. ],
  62321. 2
  62322. /* CLASS */
  62323. )
  62324. ], 8, ["onClick"]);
  62325. }),
  62326. 128
  62327. /* KEYED_FRAGMENT */
  62328. ))
  62329. ])) : vue.createCommentVNode("v-if", true),
  62330. vue.createCommentVNode(" 加载更多 "),
  62331. $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, {
  62332. key: 2,
  62333. status: $setup.state.loadStatus,
  62334. "content-text": {
  62335. contentdown: "上拉加载更多"
  62336. },
  62337. onClick: $setup.loadmore
  62338. }, null, 8, ["status"])) : vue.createCommentVNode("v-if", true)
  62339. ]),
  62340. _: 1
  62341. /* STABLE */
  62342. });
  62343. }
  62344. const PagesOrderOtherlist = /* @__PURE__ */ _export_sfc(_sfc_main$1j, [["render", _sfc_render$1i], ["__scopeId", "data-v-ad14ec43"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/order/otherlist.vue"]]);
  62345. const _sfc_main$1i = {
  62346. __name: "su-radio",
  62347. props: {
  62348. customStyle: {
  62349. type: Object,
  62350. default: () => ({})
  62351. },
  62352. ui: {
  62353. type: String,
  62354. default: "check"
  62355. //check line
  62356. },
  62357. modelValue: {
  62358. type: [String, Number, Boolean],
  62359. default: false
  62360. },
  62361. disabled: {
  62362. type: Boolean,
  62363. default: false
  62364. },
  62365. bg: {
  62366. type: String,
  62367. default: "ui-BG-Main"
  62368. },
  62369. unbg: {
  62370. type: String,
  62371. default: "borderss"
  62372. },
  62373. src: {
  62374. type: String,
  62375. default: ""
  62376. },
  62377. label: {
  62378. type: String,
  62379. default: ""
  62380. },
  62381. labelStyle: {
  62382. type: Object,
  62383. default: () => ({})
  62384. },
  62385. none: {
  62386. type: Boolean,
  62387. default: false
  62388. }
  62389. },
  62390. emits: ["change", "update:modelValue"],
  62391. setup(__props, { expose: __expose, emit: __emit }) {
  62392. __expose();
  62393. const vm = vue.getCurrentInstance();
  62394. const state = vue.reactive({
  62395. currentValue: false
  62396. });
  62397. const emits = __emit;
  62398. const props = __props;
  62399. vue.watchPostEffect(() => {
  62400. state.currentValue = props.modelValue;
  62401. emits("update:modelValue", state.currentValue);
  62402. });
  62403. const isChecked = vue.computed(() => state.currentValue);
  62404. const onRaido = () => {
  62405. if (props.disabled)
  62406. return;
  62407. state.currentValue = !state.currentValue;
  62408. emits("update:modelValue", state.currentValue);
  62409. emits("change", {
  62410. label: props.label,
  62411. value: state.currentValue
  62412. });
  62413. };
  62414. const __returned__ = { vm, state, emits, props, isChecked, onRaido, computed: vue.computed, reactive: vue.reactive, watchPostEffect: vue.watchPostEffect, getCurrentInstance: vue.getCurrentInstance };
  62415. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  62416. return __returned__;
  62417. }
  62418. };
  62419. function _sfc_render$1h(_ctx, _cache, $props, $setup, $data, $options) {
  62420. return vue.openBlock(), vue.createElementBlock(
  62421. "view",
  62422. {
  62423. class: vue.normalizeClass(["ui-radio ss-flex ss-col-center", [{ disabled: $props.disabled }, { img: $props.src }, $props.ui]]),
  62424. onClick: $setup.onRaido,
  62425. style: vue.normalizeStyle([$props.customStyle])
  62426. },
  62427. [
  62428. vue.renderSlot(_ctx.$slots, "leftLabel", {}, void 0, true),
  62429. !$props.none ? (vue.openBlock(), vue.createElementBlock(
  62430. "view",
  62431. {
  62432. key: 0,
  62433. class: vue.normalizeClass(["ui-radio-input", [$setup.isChecked ? "cur " + $props.bg : $props.unbg, $props.src ? "radius" : "round"]])
  62434. },
  62435. null,
  62436. 2
  62437. /* CLASS */
  62438. )) : vue.createCommentVNode("v-if", true),
  62439. $props.src ? (vue.openBlock(), vue.createElementBlock("image", {
  62440. key: 1,
  62441. class: "ui-radio-img radius",
  62442. src: $props.src,
  62443. mode: "aspectFill"
  62444. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("view", {
  62445. key: 2,
  62446. class: "ui-radio-content"
  62447. }, [
  62448. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  62449. vue.createElementVNode(
  62450. "view",
  62451. {
  62452. class: "ui-label-text",
  62453. style: vue.normalizeStyle([$props.labelStyle])
  62454. },
  62455. vue.toDisplayString($props.label),
  62456. 5
  62457. /* TEXT, STYLE */
  62458. )
  62459. ], true)
  62460. ])),
  62461. $props.ui.includes("card") ? (vue.openBlock(), vue.createElementBlock(
  62462. "view",
  62463. {
  62464. key: 3,
  62465. class: vue.normalizeClass(["ui-radio-bg round", [$setup.isChecked ? "cur " + $props.bg : ""]])
  62466. },
  62467. null,
  62468. 2
  62469. /* CLASS */
  62470. )) : vue.createCommentVNode("v-if", true)
  62471. ],
  62472. 6
  62473. /* CLASS, STYLE */
  62474. );
  62475. }
  62476. const __easycom_3$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1i, [["render", _sfc_render$1h], ["__scopeId", "data-v-c395529d"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/ui/su-radio/su-radio.vue"]]);
  62477. const placeholderStyle$2 = "color:#BBBBBB;font-size:28rpx;line-height:normal";
  62478. const _sfc_main$1h = {
  62479. __name: "info",
  62480. setup(__props, { expose: __expose }) {
  62481. __expose();
  62482. const { t: t2 } = useI18n();
  62483. const state = vue.reactive({
  62484. verifyUsername: true,
  62485. usernameErrorMsg: "",
  62486. model: {},
  62487. // 个人信息
  62488. rules: {},
  62489. thirdInfo: {}
  62490. // 社交用户的信息
  62491. });
  62492. const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo);
  62493. const sexRadioMap = [
  62494. {
  62495. name: t2("user.male"),
  62496. value: "1"
  62497. },
  62498. {
  62499. name: t2("user.female"),
  62500. value: "2"
  62501. }
  62502. ];
  62503. function onChangeGender(e2) {
  62504. state.model.sex = e2.detail.value;
  62505. }
  62506. const onChangeMobile = () => {
  62507. showAuthModal("changeMobile");
  62508. };
  62509. function onChooseAvatar(e2) {
  62510. const tempUrl = e2.detail.avatarUrl || "";
  62511. uploadAvatar(tempUrl);
  62512. }
  62513. function onChangeAvatar() {
  62514. uni.chooseImage({
  62515. success: async (chooseImageRes) => {
  62516. const tempUrl = chooseImageRes.tempFilePaths[0];
  62517. await uploadAvatar(tempUrl);
  62518. }
  62519. });
  62520. }
  62521. async function uploadAvatar(tempUrl) {
  62522. if (!tempUrl) {
  62523. return;
  62524. }
  62525. const compressedImage = await compressImage(tempUrl);
  62526. let {
  62527. data
  62528. } = await FileApi.uploadFile(compressedImage);
  62529. state.model.avatar = data;
  62530. }
  62531. function compressImage(imagePath, scale = 0.5) {
  62532. return new Promise((resolve, reject) => {
  62533. const canvas = document.createElement("canvas");
  62534. const ctx = canvas.getContext("2d");
  62535. const img = new Image();
  62536. img.src = imagePath;
  62537. img.onload = () => {
  62538. const originalWidth = img.width;
  62539. const originalHeight = img.height;
  62540. const newWidth = originalWidth * scale;
  62541. const newHeight = originalHeight * scale;
  62542. canvas.width = newWidth;
  62543. canvas.height = newHeight;
  62544. ctx.drawImage(img, 0, 0, newWidth, newHeight);
  62545. const compressedImage = canvas.toDataURL("image/jpeg", 0.7);
  62546. resolve(compressedImage);
  62547. };
  62548. img.onerror = (err) => {
  62549. reject(err);
  62550. };
  62551. });
  62552. }
  62553. function onSetPassword() {
  62554. showAuthModal("changePassword");
  62555. }
  62556. async function bindThirdOauth() {
  62557. let result2 = await sheep$1.$platform.useProvider("wechat").bind();
  62558. if (result2) {
  62559. await getUserInfo();
  62560. }
  62561. }
  62562. function unBindThirdOauth() {
  62563. uni.showModal({
  62564. title: t2("rules.unbind_reminder"),
  62565. content: t2("rules.unbind_warning"),
  62566. cancelText: t2("common.cancel"),
  62567. confirmText: t2("common.confirm"),
  62568. success: async function(res) {
  62569. if (!res.confirm) {
  62570. return;
  62571. }
  62572. const result2 = await sheep$1.$platform.useProvider("wechat").unbind(state.thirdInfo.openid);
  62573. if (result2) {
  62574. await getUserInfo();
  62575. }
  62576. }
  62577. });
  62578. }
  62579. let lastUsername = vue.ref("");
  62580. async function verifyUsername(e2) {
  62581. const username2 = e2.detail.value;
  62582. if (username2 == "" || username2 == lastUsername.value) {
  62583. return false;
  62584. } else if (username2 === state.username) {
  62585. state.usernameErrorMsg = "";
  62586. state.verifyUsername = true;
  62587. return false;
  62588. }
  62589. lastUsername.value = username2;
  62590. const {
  62591. data
  62592. } = await AuthUtil.verifyUsername(username2);
  62593. if (!data) {
  62594. state.usernameErrorMsg = t2("rules.username_taken");
  62595. state.verifyUsername = data;
  62596. } else {
  62597. state.usernameErrorMsg = "";
  62598. state.verifyUsername = data;
  62599. }
  62600. }
  62601. async function onSubmit() {
  62602. const {
  62603. code: code2
  62604. } = await UserApi.updateUser({
  62605. avatar: state.model.avatar,
  62606. nickname: state.model.nickname,
  62607. username: state.model.username,
  62608. sex: state.model.sex
  62609. });
  62610. if (code2 === 0 && state.model.username !== state.username) {
  62611. uni.showToast({
  62612. icon: "success",
  62613. title: t2("rules.modify_success")
  62614. });
  62615. setTimeout(function() {
  62616. sheep$1.$store("user").logout();
  62617. closeAuthModal();
  62618. sheep$1.$router.go("/pages/index/user");
  62619. }, 1e3);
  62620. }
  62621. if (code2 === 0) {
  62622. await getUserInfo();
  62623. }
  62624. }
  62625. const getUserInfo = async () => {
  62626. const userInfo3 = await sheep$1.$store("user").getInfo();
  62627. state.model = lodashExports.clone(userInfo3);
  62628. state.username = userInfo3.username;
  62629. if (sheep$1.$platform.name !== "H5") {
  62630. let result2 = await sheep$1.$platform.useProvider("wechat").getInfo();
  62631. state.thirdInfo = result2 || {};
  62632. }
  62633. };
  62634. onShow(async () => {
  62635. await getUserInfo();
  62636. });
  62637. onLoad(async (options2) => {
  62638. getUserInfo();
  62639. });
  62640. const __returned__ = { t: t2, state, userInfo: userInfo2, placeholderStyle: placeholderStyle$2, sexRadioMap, onChangeGender, onChangeMobile, onChooseAvatar, onChangeAvatar, uploadAvatar, compressImage, onSetPassword, bindThirdOauth, unBindThirdOauth, get lastUsername() {
  62641. return lastUsername;
  62642. }, set lastUsername(v2) {
  62643. lastUsername = v2;
  62644. }, verifyUsername, onSubmit, getUserInfo, computed: vue.computed, reactive: vue.reactive, onBeforeMount: vue.onBeforeMount, ref: vue.ref, get sheep() {
  62645. return sheep$1;
  62646. }, get clone() {
  62647. return lodashExports.clone;
  62648. }, get onLoad() {
  62649. return onLoad;
  62650. }, get onShow() {
  62651. return onShow;
  62652. }, get showAuthModal() {
  62653. return showAuthModal;
  62654. }, get FileApi() {
  62655. return FileApi;
  62656. }, get UserApi() {
  62657. return UserApi;
  62658. }, get AuthUtil() {
  62659. return AuthUtil;
  62660. }, get closeAuthModal() {
  62661. return closeAuthModal;
  62662. }, get useI18n() {
  62663. return useI18n;
  62664. } };
  62665. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  62666. return __returned__;
  62667. }
  62668. };
  62669. function _sfc_render$1g(_ctx, _cache, $props, $setup, $data, $options) {
  62670. const _component_su_image = resolveEasycom(vue.resolveDynamicComponent("su-image"), __easycom_0$f);
  62671. const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l);
  62672. const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9);
  62673. const _component_su_radio = resolveEasycom(vue.resolveDynamicComponent("su-radio"), __easycom_3$2);
  62674. const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7);
  62675. const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9);
  62676. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  62677. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  62678. title: _ctx.$t("user.user_info"),
  62679. class: "set-userinfo-wrap"
  62680. }, {
  62681. default: vue.withCtx(() => [
  62682. vue.createVNode(_component_uni_forms, {
  62683. model: $setup.state.model,
  62684. rules: $setup.state.rules,
  62685. labelPosition: "left",
  62686. border: "",
  62687. class: "form-box",
  62688. labelWidth: "160"
  62689. }, {
  62690. default: vue.withCtx(() => {
  62691. var _a2;
  62692. return [
  62693. vue.createCommentVNode(" 头像 "),
  62694. vue.createElementVNode("view", { class: "ss-flex ss-row-center ss-col-center ss-p-t-60 ss-p-b-0 bg-white" }, [
  62695. vue.createElementVNode("view", { class: "header-box-content" }, [
  62696. vue.createVNode(_component_su_image, {
  62697. class: "content-img",
  62698. isPreview: "",
  62699. current: 0,
  62700. src: (_a2 = $setup.state.model) == null ? void 0 : _a2.avatar,
  62701. height: 160,
  62702. width: 160,
  62703. radius: 80,
  62704. mode: "scaleToFill"
  62705. }, null, 8, ["src"]),
  62706. vue.createElementVNode("view", { class: "avatar-action" }, [
  62707. vue.createElementVNode(
  62708. "button",
  62709. {
  62710. class: "ss-reset-button avatar-action-btn",
  62711. onClick: $setup.onChangeAvatar
  62712. },
  62713. vue.toDisplayString(_ctx.$t("user.change")),
  62714. 1
  62715. /* TEXT */
  62716. )
  62717. ])
  62718. ])
  62719. ]),
  62720. vue.createElementVNode("view", { class: "bg-white ss-p-x-30" }, [
  62721. vue.createVNode(_component_uni_forms_item, {
  62722. name: "username",
  62723. label: _ctx.$t("user.username"),
  62724. "error-message": $setup.state.usernameErrorMsg
  62725. }, {
  62726. default: vue.withCtx(() => [
  62727. vue.createVNode(_component_uni_easyinput, {
  62728. modelValue: $setup.state.model.username,
  62729. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.state.model.username = $event),
  62730. placeholder: _ctx.$t("rules.username"),
  62731. inputBorder: false,
  62732. placeholderStyle: $setup.placeholderStyle,
  62733. onBlur: $setup.verifyUsername,
  62734. clearable: false
  62735. }, {
  62736. right: vue.withCtx(() => [
  62737. !$setup.state.verifyUsername ? (vue.openBlock(), vue.createElementBlock("view", {
  62738. key: 0,
  62739. class: "icon"
  62740. }, [
  62741. vue.createElementVNode("image", {
  62742. style: "",
  62743. src: $setup.sheep.$url.static("/static/images/shibai.png")
  62744. }, null, 8, ["src"])
  62745. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  62746. key: 1,
  62747. class: "icon"
  62748. }, [
  62749. vue.createElementVNode("image", {
  62750. src: $setup.sheep.$url.static("/static/images/chenggong.png")
  62751. }, null, 8, ["src"])
  62752. ]))
  62753. ]),
  62754. _: 1
  62755. /* STABLE */
  62756. }, 8, ["modelValue", "placeholder"])
  62757. ]),
  62758. _: 1
  62759. /* STABLE */
  62760. }, 8, ["label", "error-message"]),
  62761. vue.createVNode(_component_uni_forms_item, {
  62762. name: "nickname",
  62763. label: _ctx.$t("user.nickname")
  62764. }, {
  62765. default: vue.withCtx(() => [
  62766. vue.createVNode(_component_uni_easyinput, {
  62767. modelValue: $setup.state.model.nickname,
  62768. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.model.nickname = $event),
  62769. type: "nickname",
  62770. placeholder: $setup.t("rules.nickname"),
  62771. inputBorder: false,
  62772. placeholderStyle: $setup.placeholderStyle,
  62773. clearable: false
  62774. }, null, 8, ["modelValue", "placeholder"])
  62775. ]),
  62776. _: 1
  62777. /* STABLE */
  62778. }, 8, ["label"]),
  62779. vue.createVNode(_component_uni_forms_item, {
  62780. name: "sex",
  62781. label: _ctx.$t("user.sex")
  62782. }, {
  62783. default: vue.withCtx(() => [
  62784. vue.createElementVNode("view", { class: "ss-flex ss-col-center ss-h-100" }, [
  62785. vue.createElementVNode(
  62786. "radio-group",
  62787. {
  62788. onChange: $setup.onChangeGender,
  62789. class: "ss-flex ss-col-center"
  62790. },
  62791. [
  62792. (vue.openBlock(), vue.createElementBlock(
  62793. vue.Fragment,
  62794. null,
  62795. vue.renderList($setup.sexRadioMap, (item) => {
  62796. var _a3;
  62797. return vue.createElementVNode("label", {
  62798. class: "radio",
  62799. key: item.value
  62800. }, [
  62801. vue.createElementVNode("view", { class: "ss-flex ss-col-center ss-m-r-32" }, [
  62802. vue.createElementVNode("radio", {
  62803. value: item.value,
  62804. color: "var(--ui-BG-Main)",
  62805. style: { "transform": "scale(0.8)" },
  62806. checked: parseInt(item.value) === ((_a3 = $setup.state.model) == null ? void 0 : _a3.sex)
  62807. }, null, 8, ["value", "checked"]),
  62808. vue.createElementVNode(
  62809. "view",
  62810. { class: "gender-name" },
  62811. vue.toDisplayString(item.name),
  62812. 1
  62813. /* TEXT */
  62814. )
  62815. ])
  62816. ]);
  62817. }),
  62818. 64
  62819. /* STABLE_FRAGMENT */
  62820. ))
  62821. ],
  62822. 32
  62823. /* NEED_HYDRATION */
  62824. )
  62825. ])
  62826. ]),
  62827. _: 1
  62828. /* STABLE */
  62829. }, 8, ["label"]),
  62830. vue.createVNode(_component_uni_forms_item, {
  62831. name: "mobile",
  62832. label: _ctx.$t("user.phone"),
  62833. onClick: $setup.onChangeMobile
  62834. }, {
  62835. default: vue.withCtx(() => [
  62836. vue.createVNode(_component_uni_easyinput, {
  62837. modelValue: $setup.userInfo.mobile,
  62838. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.userInfo.mobile = $event),
  62839. placeholder: $setup.t("user.bind_phone"),
  62840. inputBorder: false,
  62841. disabled: "",
  62842. styles: { disableColor: "#fff" },
  62843. placeholderStyle: $setup.placeholderStyle,
  62844. clearable: false
  62845. }, {
  62846. right: vue.withCtx(() => {
  62847. var _a3;
  62848. return [
  62849. vue.createElementVNode("view", { class: "ss-flex ss-col-center" }, [
  62850. ((_a3 = $setup.userInfo.verification) == null ? void 0 : _a3.mobile) ? (vue.openBlock(), vue.createBlock(_component_su_radio, {
  62851. key: 0,
  62852. modelValue: true
  62853. })) : (vue.openBlock(), vue.createElementBlock("button", {
  62854. key: 1,
  62855. class: "ss-reset-button ss-flex ss-col-center ss-row-center"
  62856. }, [
  62857. vue.createElementVNode("text", {
  62858. class: "_icon-forward",
  62859. style: { "color": "#bbbbbb", "font-size": "26rpx" }
  62860. })
  62861. ]))
  62862. ])
  62863. ];
  62864. }),
  62865. _: 1
  62866. /* STABLE */
  62867. }, 8, ["modelValue", "placeholder"])
  62868. ]),
  62869. _: 1
  62870. /* STABLE */
  62871. }, 8, ["label"]),
  62872. vue.createVNode(_component_uni_forms_item, {
  62873. name: "password",
  62874. label: _ctx.$t("user.password"),
  62875. onClick: $setup.onSetPassword
  62876. }, {
  62877. default: vue.withCtx(() => [
  62878. vue.createVNode(_component_uni_easyinput, {
  62879. modelValue: $setup.userInfo.password,
  62880. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.userInfo.password = $event),
  62881. placeholder: _ctx.$t("rules.click_change_password"),
  62882. inputBorder: false,
  62883. styles: { disableColor: "#fff" },
  62884. disabled: "",
  62885. placeholderStyle: "color:#BBBBBB;font-size:28rpx;line-height:normal",
  62886. clearable: false
  62887. }, {
  62888. right: vue.withCtx(() => {
  62889. var _a3;
  62890. return [
  62891. vue.createElementVNode("view", { class: "ss-flex ss-col-center" }, [
  62892. ((_a3 = $setup.userInfo.verification) == null ? void 0 : _a3.password) ? (vue.openBlock(), vue.createBlock(_component_su_radio, {
  62893. key: 0,
  62894. class: "ss-flex",
  62895. modelValue: true
  62896. })) : (vue.openBlock(), vue.createElementBlock("button", {
  62897. key: 1,
  62898. class: "ss-reset-button ss-flex ss-col-center ss-row-center"
  62899. }, [
  62900. vue.createElementVNode("text", {
  62901. class: "_icon-forward",
  62902. style: { "color": "#bbbbbb", "font-size": "26rpx" }
  62903. })
  62904. ]))
  62905. ])
  62906. ];
  62907. }),
  62908. _: 1
  62909. /* STABLE */
  62910. }, 8, ["modelValue", "placeholder"])
  62911. ]),
  62912. _: 1
  62913. /* STABLE */
  62914. }, 8, ["label"])
  62915. ])
  62916. ];
  62917. }),
  62918. _: 1
  62919. /* STABLE */
  62920. }, 8, ["model", "rules"]),
  62921. vue.createVNode(_component_su_fixed, {
  62922. bottom: "",
  62923. placeholder: "",
  62924. bg: "none"
  62925. }, {
  62926. default: vue.withCtx(() => [
  62927. vue.createElementVNode("view", { class: "footer-box ss-p-20" }, [
  62928. vue.createElementVNode(
  62929. "button",
  62930. {
  62931. class: "ss-rest-button logout-btn",
  62932. onClick: $setup.onSubmit
  62933. },
  62934. vue.toDisplayString(_ctx.$t("common.save")),
  62935. 1
  62936. /* TEXT */
  62937. )
  62938. ])
  62939. ]),
  62940. _: 1
  62941. /* STABLE */
  62942. })
  62943. ]),
  62944. _: 1
  62945. /* STABLE */
  62946. }, 8, ["title"]);
  62947. }
  62948. const PagesUserInfo = /* @__PURE__ */ _export_sfc(_sfc_main$1h, [["render", _sfc_render$1g], ["__scopeId", "data-v-aab93774"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/info.vue"]]);
  62949. const avatarWidth = 45;
  62950. const _sfc_main$1g = {
  62951. name: "UniListChat",
  62952. emits: ["click"],
  62953. props: {
  62954. title: {
  62955. type: String,
  62956. default: ""
  62957. },
  62958. note: {
  62959. type: String,
  62960. default: ""
  62961. },
  62962. clickable: {
  62963. type: Boolean,
  62964. default: false
  62965. },
  62966. link: {
  62967. type: [Boolean, String],
  62968. default: false
  62969. },
  62970. to: {
  62971. type: String,
  62972. default: ""
  62973. },
  62974. badgeText: {
  62975. type: [String, Number],
  62976. default: ""
  62977. },
  62978. badgePositon: {
  62979. type: String,
  62980. default: "right"
  62981. },
  62982. time: {
  62983. type: String,
  62984. default: ""
  62985. },
  62986. avatarCircle: {
  62987. type: Boolean,
  62988. default: false
  62989. },
  62990. avatar: {
  62991. type: String,
  62992. default: ""
  62993. },
  62994. avatarList: {
  62995. type: Array,
  62996. default() {
  62997. return [];
  62998. }
  62999. }
  63000. },
  63001. // inject: ['list'],
  63002. computed: {
  63003. isSingle() {
  63004. if (this.badgeText === "dot") {
  63005. return "uni-badge--dot";
  63006. } else {
  63007. const badgeText = this.badgeText.toString();
  63008. if (badgeText.length > 1) {
  63009. return "uni-badge--complex";
  63010. } else {
  63011. return "uni-badge--single";
  63012. }
  63013. }
  63014. },
  63015. computedAvatar() {
  63016. if (this.avatarList.length > 4) {
  63017. this.imageWidth = avatarWidth * 0.31;
  63018. return "avatarItem--3";
  63019. } else if (this.avatarList.length > 1) {
  63020. this.imageWidth = avatarWidth * 0.47;
  63021. return "avatarItem--2";
  63022. } else {
  63023. this.imageWidth = avatarWidth;
  63024. return "avatarItem--1";
  63025. }
  63026. }
  63027. },
  63028. data() {
  63029. return {
  63030. isFirstChild: false,
  63031. border: true,
  63032. // avatarList: 3,
  63033. imageWidth: 50
  63034. };
  63035. },
  63036. mounted() {
  63037. this.list = this.getForm();
  63038. if (this.list) {
  63039. if (!this.list.firstChildAppend) {
  63040. this.list.firstChildAppend = true;
  63041. this.isFirstChild = true;
  63042. }
  63043. this.border = this.list.border;
  63044. }
  63045. },
  63046. methods: {
  63047. /**
  63048. * 获取父元素实例
  63049. */
  63050. getForm(name2 = "uniList") {
  63051. let parent2 = this.$parent;
  63052. let parentName = parent2.$options.name;
  63053. while (parentName !== name2) {
  63054. parent2 = parent2.$parent;
  63055. if (!parent2)
  63056. return false;
  63057. parentName = parent2.$options.name;
  63058. }
  63059. return parent2;
  63060. },
  63061. onClick() {
  63062. if (this.to !== "") {
  63063. this.openPage();
  63064. return;
  63065. }
  63066. if (this.clickable || this.link) {
  63067. this.$emit("click", {
  63068. data: {}
  63069. });
  63070. }
  63071. },
  63072. openPage() {
  63073. if (["navigateTo", "redirectTo", "reLaunch", "switchTab"].indexOf(this.link) !== -1) {
  63074. this.pageApi(this.link);
  63075. } else {
  63076. this.pageApi("navigateTo");
  63077. }
  63078. },
  63079. pageApi(api2) {
  63080. uni[api2]({
  63081. url: this.to,
  63082. success: (res) => {
  63083. this.$emit("click", {
  63084. data: res
  63085. });
  63086. },
  63087. fail: (err) => {
  63088. this.$emit("click", {
  63089. data: err
  63090. });
  63091. formatAppLog("error", "at uni_modules/uni-list/components/uni-list-chat/uni-list-chat.vue:212", err.errMsg);
  63092. }
  63093. });
  63094. }
  63095. }
  63096. };
  63097. function _sfc_render$1f(_ctx, _cache, $props, $setup, $data, $options) {
  63098. return vue.openBlock(), vue.createElementBlock("view", {
  63099. "hover-class": !$props.clickable && !$props.link ? "" : "uni-list-chat--hover",
  63100. class: "uni-list-chat",
  63101. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.onClick && $options.onClick(...args), ["stop"]))
  63102. }, [
  63103. vue.createElementVNode(
  63104. "view",
  63105. {
  63106. class: vue.normalizeClass({ "uni-list--border": $data.border, "uni-list-chat--first": $data.isFirstChild })
  63107. },
  63108. null,
  63109. 2
  63110. /* CLASS */
  63111. ),
  63112. vue.createElementVNode("view", { class: "uni-list-chat__container" }, [
  63113. vue.createElementVNode("view", { class: "uni-list-chat__header-warp" }, [
  63114. $props.avatarCircle || $props.avatarList.length === 0 ? (vue.openBlock(), vue.createElementBlock(
  63115. "view",
  63116. {
  63117. key: 0,
  63118. class: vue.normalizeClass(["uni-list-chat__header", { "header--circle": $props.avatarCircle }])
  63119. },
  63120. [
  63121. vue.createElementVNode("image", {
  63122. class: vue.normalizeClass(["uni-list-chat__header-image", { "header--circle": $props.avatarCircle }]),
  63123. src: $props.avatar,
  63124. mode: "aspectFill"
  63125. }, null, 10, ["src"])
  63126. ],
  63127. 2
  63128. /* CLASS */
  63129. )) : (vue.openBlock(), vue.createElementBlock(
  63130. vue.Fragment,
  63131. { key: 1 },
  63132. [
  63133. vue.createCommentVNode(" 头像组 "),
  63134. vue.createElementVNode("view", { class: "uni-list-chat__header" }, [
  63135. (vue.openBlock(true), vue.createElementBlock(
  63136. vue.Fragment,
  63137. null,
  63138. vue.renderList($props.avatarList, (item, index2) => {
  63139. return vue.openBlock(), vue.createElementBlock(
  63140. "view",
  63141. {
  63142. key: index2,
  63143. class: vue.normalizeClass(["uni-list-chat__header-box", $options.computedAvatar]),
  63144. style: vue.normalizeStyle({ width: $data.imageWidth + "px", height: $data.imageWidth + "px" })
  63145. },
  63146. [
  63147. vue.createElementVNode("image", {
  63148. class: "uni-list-chat__header-image",
  63149. style: vue.normalizeStyle({ width: $data.imageWidth + "px", height: $data.imageWidth + "px" }),
  63150. src: item.url,
  63151. mode: "aspectFill"
  63152. }, null, 12, ["src"])
  63153. ],
  63154. 6
  63155. /* CLASS, STYLE */
  63156. );
  63157. }),
  63158. 128
  63159. /* KEYED_FRAGMENT */
  63160. ))
  63161. ])
  63162. ],
  63163. 2112
  63164. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  63165. ))
  63166. ]),
  63167. $props.badgeText && $props.badgePositon === "left" ? (vue.openBlock(), vue.createElementBlock(
  63168. "view",
  63169. {
  63170. key: 0,
  63171. class: vue.normalizeClass(["uni-list-chat__badge uni-list-chat__badge-pos", [$options.isSingle]])
  63172. },
  63173. [
  63174. vue.createElementVNode(
  63175. "text",
  63176. { class: "uni-list-chat__badge-text" },
  63177. vue.toDisplayString($props.badgeText === "dot" ? "" : $props.badgeText),
  63178. 1
  63179. /* TEXT */
  63180. )
  63181. ],
  63182. 2
  63183. /* CLASS */
  63184. )) : vue.createCommentVNode("v-if", true),
  63185. vue.createElementVNode("view", { class: "uni-list-chat__content" }, [
  63186. vue.createElementVNode("view", { class: "uni-list-chat__content-main" }, [
  63187. vue.createElementVNode(
  63188. "text",
  63189. { class: "uni-list-chat__content-title uni-ellipsis" },
  63190. vue.toDisplayString($props.title),
  63191. 1
  63192. /* TEXT */
  63193. ),
  63194. vue.createElementVNode(
  63195. "text",
  63196. { class: "uni-list-chat__content-note uni-ellipsis" },
  63197. vue.toDisplayString($props.note),
  63198. 1
  63199. /* TEXT */
  63200. )
  63201. ]),
  63202. vue.createElementVNode("view", { class: "uni-list-chat__content-extra" }, [
  63203. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  63204. vue.createElementVNode(
  63205. "text",
  63206. { class: "uni-list-chat__content-extra-text" },
  63207. vue.toDisplayString($props.time),
  63208. 1
  63209. /* TEXT */
  63210. ),
  63211. $props.badgeText && $props.badgePositon === "right" ? (vue.openBlock(), vue.createElementBlock(
  63212. "view",
  63213. {
  63214. key: 0,
  63215. class: vue.normalizeClass(["uni-list-chat__badge", [$options.isSingle, $props.badgePositon === "right" ? "uni-list-chat--right" : ""]])
  63216. },
  63217. [
  63218. vue.createElementVNode(
  63219. "text",
  63220. { class: "uni-list-chat__badge-text" },
  63221. vue.toDisplayString($props.badgeText === "dot" ? "" : $props.badgeText),
  63222. 1
  63223. /* TEXT */
  63224. )
  63225. ],
  63226. 2
  63227. /* CLASS */
  63228. )) : vue.createCommentVNode("v-if", true)
  63229. ], true)
  63230. ])
  63231. ])
  63232. ])
  63233. ], 8, ["hover-class"]);
  63234. }
  63235. const __easycom_0$5 = /* @__PURE__ */ _export_sfc(_sfc_main$1g, [["render", _sfc_render$1f], ["__scopeId", "data-v-20df4ef0"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-list/components/uni-list-chat/uni-list-chat.vue"]]);
  63236. const placeholderStyle$1 = "color:#BBBBBB;font-size:28rpx;line-height:normal";
  63237. const _sfc_main$1f = {
  63238. __name: "setting",
  63239. setup(__props, { expose: __expose }) {
  63240. __expose();
  63241. const isLogin = vue.computed(() => sheep$1.$store("user").isLogin);
  63242. const { t: t2 } = useI18n();
  63243. const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo);
  63244. const userWallet = vue.computed(() => sheep$1.$store("user").userWallet);
  63245. const alipayAccount2 = vue.computed(() => {
  63246. let account2 = userInfo2.value.alipayAccount;
  63247. if (!account2) {
  63248. return false;
  63249. }
  63250. if (/^\d{11}$/.test(account2)) {
  63251. return `${account2.substring(0, 3)}****${account2.substring(7)}`;
  63252. } else if (/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(account2)) {
  63253. const atIndex = account2.indexOf("@");
  63254. if (atIndex <= 3) {
  63255. return account2;
  63256. }
  63257. const username2 = account2.substring(0, Math.ceil(atIndex / 2));
  63258. const domain = account2.substring(atIndex);
  63259. return `${username2}***${domain}`;
  63260. }
  63261. });
  63262. const bankAccount2 = vue.computed(() => {
  63263. let account2 = userInfo2.value.bankAccount;
  63264. if (!account2) {
  63265. return false;
  63266. }
  63267. if (account2.length === 8) {
  63268. return account2.substring(0, 2) + "********" + account2.substr(-2);
  63269. } else {
  63270. return account2.substring(0, 4) + "******" + account2.substr(-4);
  63271. }
  63272. });
  63273. const onChangeAlipayAccount = () => {
  63274. showAuthModal("alipayAccount");
  63275. };
  63276. const onChangeBankAccount = () => {
  63277. showAuthModal("bankAccount");
  63278. };
  63279. const state = vue.reactive({
  63280. model: {},
  63281. // 个人信息
  63282. rules: {},
  63283. thirdInfo: {}
  63284. // 社交用户的信息
  63285. });
  63286. async function bindThirdOauth() {
  63287. let result2 = await sheep$1.$platform.useProvider("wechat").bind();
  63288. if (result2) {
  63289. await getUserInfo();
  63290. }
  63291. }
  63292. function unBindThirdOauth() {
  63293. uni.showModal({
  63294. title: t2("user.unbind_reminder"),
  63295. content: t2("rules.unbind_warning"),
  63296. cancelText: t2("common.cancel"),
  63297. confirmText: t2("common.confirm"),
  63298. success: async function(res) {
  63299. if (!res.confirm) {
  63300. return;
  63301. }
  63302. const result2 = await sheep$1.$platform.useProvider("wechat").unbind(state.thirdInfo.openid);
  63303. if (result2) {
  63304. await getUserInfo();
  63305. }
  63306. }
  63307. });
  63308. }
  63309. async function onSubmit() {
  63310. const { code: code2 } = await UserApi.updateUser({
  63311. avatar: state.model.avatar,
  63312. nickname: state.model.nickname,
  63313. sex: state.model.sex
  63314. });
  63315. if (code2 === 0) {
  63316. await getUserInfo();
  63317. }
  63318. }
  63319. const getUserInfo = async () => {
  63320. const userInfo3 = await sheep$1.$store("user").getInfo();
  63321. state.model = lodashExports.clone(userInfo3);
  63322. if (sheep$1.$platform.name !== "H5") {
  63323. const result2 = await sheep$1.$platform.useProvider("wechat").getInfo();
  63324. state.thirdInfo = result2 || {};
  63325. }
  63326. };
  63327. function onLogout() {
  63328. uni.showModal({
  63329. title: t2("setting.prompt"),
  63330. content: t2("setting.confirm_logout"),
  63331. cancelText: t2("common.cancel"),
  63332. confirmText: t2("common.confirm"),
  63333. success: async function(res) {
  63334. if (!res.confirm) {
  63335. return;
  63336. }
  63337. const {
  63338. code: code2
  63339. } = await AuthUtil.logout();
  63340. if (code2 !== 0) {
  63341. return;
  63342. }
  63343. sheep$1.$store("user").logout();
  63344. uni.removeStorageSync("linkId");
  63345. sheep$1.$router.go("/pages/index/user");
  63346. }
  63347. });
  63348. }
  63349. async function goBackEnd(type) {
  63350. const {
  63351. code: code2,
  63352. data
  63353. } = await AuthUtil.getConsumerRedirectUrl();
  63354. if (code2 === 0) {
  63355. window.location.href = data;
  63356. }
  63357. }
  63358. const currentLang = vue.computed(() => {
  63359. return uni.getStorageSync("userLanguage");
  63360. });
  63361. const changeLanguage = async () => {
  63362. formatAppLog("log", "at pages/user/setting.vue:363", currentLang.value);
  63363. if (currentLang.value === "en") {
  63364. await UserApi.updateUser({ language: "zh-Hans" });
  63365. setLanguage("zh-Hans");
  63366. } else {
  63367. await UserApi.updateUser({ language: "en" });
  63368. setLanguage("en");
  63369. }
  63370. };
  63371. vue.onBeforeMount(() => {
  63372. getUserInfo();
  63373. });
  63374. onLoad(() => {
  63375. uni.$on("alipayAccountChangeComplete", getUserInfo);
  63376. uni.$on("bankAccountChangeComplete", getUserInfo);
  63377. });
  63378. const __returned__ = { isLogin, t: t2, userInfo: userInfo2, userWallet, alipayAccount: alipayAccount2, bankAccount: bankAccount2, onChangeAlipayAccount, onChangeBankAccount, state, placeholderStyle: placeholderStyle$1, bindThirdOauth, unBindThirdOauth, onSubmit, getUserInfo, onLogout, goBackEnd, currentLang, changeLanguage, computed: vue.computed, reactive: vue.reactive, onBeforeMount: vue.onBeforeMount, get sheep() {
  63379. return sheep$1;
  63380. }, get clone() {
  63381. return lodashExports.clone;
  63382. }, get showAuthModal() {
  63383. return showAuthModal;
  63384. }, get showShareModal() {
  63385. return showShareModal;
  63386. }, get FileApi() {
  63387. return FileApi;
  63388. }, get UserApi() {
  63389. return UserApi;
  63390. }, get AuthUtil() {
  63391. return AuthUtil;
  63392. }, get isBetaUser() {
  63393. return isBetaUser;
  63394. }, get onLoad() {
  63395. return onLoad;
  63396. }, get setLanguage() {
  63397. return setLanguage;
  63398. }, get useI18n() {
  63399. return useI18n;
  63400. } };
  63401. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  63402. return __returned__;
  63403. }
  63404. };
  63405. function _sfc_render$1e(_ctx, _cache, $props, $setup, $data, $options) {
  63406. const _component_uni_list_chat = resolveEasycom(vue.resolveDynamicComponent("uni-list-chat"), __easycom_0$5);
  63407. const _component_uni_list_item = resolveEasycom(vue.resolveDynamicComponent("uni-list-item"), __easycom_0$i);
  63408. const _component_su_image = resolveEasycom(vue.resolveDynamicComponent("su-image"), __easycom_0$f);
  63409. const _component_uni_list = resolveEasycom(vue.resolveDynamicComponent("uni-list"), __easycom_1$6);
  63410. const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7);
  63411. const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9);
  63412. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  63413. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  63414. title: _ctx.$t("setting.set"),
  63415. class: "set-userinfo-wrap"
  63416. }, {
  63417. default: vue.withCtx(() => [
  63418. vue.createVNode(_component_uni_forms, {
  63419. model: $setup.state.model,
  63420. rules: $setup.state.rules,
  63421. labelPosition: "left",
  63422. border: "",
  63423. class: "form-box"
  63424. }, {
  63425. default: vue.withCtx(() => [
  63426. vue.createElementVNode("view", { class: "bg-white" }, [
  63427. vue.createVNode(_component_uni_list, {
  63428. border: false,
  63429. class: ""
  63430. }, {
  63431. default: vue.withCtx(() => {
  63432. var _a2, _b2;
  63433. return [
  63434. vue.createVNode(_component_uni_list_chat, {
  63435. clickable: "",
  63436. "avatar-circle": true,
  63437. title: (_a2 = $setup.state.model) == null ? void 0 : _a2.nickname,
  63438. avatar: (_b2 = $setup.state.model) == null ? void 0 : _b2.avatar,
  63439. note: _ctx.$t("setting.signature"),
  63440. onClick: _cache[0] || (_cache[0] = ($event) => $setup.sheep.$router.go("/pages/user/info"))
  63441. }, {
  63442. default: vue.withCtx(() => [
  63443. vue.createElementVNode("view", { class: "chat-custom-right" }, [
  63444. vue.createElementVNode("text", {
  63445. class: "_icon-forward",
  63446. style: { "color": "#bbbbbb", "font-size": "32rpx" }
  63447. })
  63448. ])
  63449. ]),
  63450. _: 1
  63451. /* STABLE */
  63452. }, 8, ["title", "avatar", "note"]),
  63453. vue.createVNode(_component_uni_list_item, {
  63454. clickable: "",
  63455. onClick: _cache[1] || (_cache[1] = ($event) => $setup.sheep.$router.go("/pages/user/address/list")),
  63456. title: _ctx.$t("setting.physical_address_management"),
  63457. showArrow: "",
  63458. border: false
  63459. }, null, 8, ["title"]),
  63460. vue.createVNode(_component_uni_list_item, {
  63461. clickable: "",
  63462. onClick: _cache[2] || (_cache[2] = ($event) => $setup.sheep.$router.go("/pages/user/dummyAddress/list")),
  63463. title: _ctx.$t("setting.virtual_address_management"),
  63464. showArrow: "",
  63465. border: false
  63466. }, null, 8, ["title"]),
  63467. vue.createVNode(_component_uni_list_item, {
  63468. title: "支付宝账号",
  63469. showArrow: "",
  63470. clickable: "",
  63471. border: false,
  63472. onClick: $setup.onChangeAlipayAccount
  63473. }, {
  63474. body: vue.withCtx(() => [
  63475. vue.createElementVNode(
  63476. "p",
  63477. { style: { "width": "100%" } },
  63478. vue.toDisplayString(_ctx.$t("setting.alipay_account")) + "  " + vue.toDisplayString($setup.alipayAccount ? $setup.alipayAccount : "未绑定"),
  63479. 1
  63480. /* TEXT */
  63481. )
  63482. ]),
  63483. _: 1
  63484. /* STABLE */
  63485. }),
  63486. vue.createVNode(_component_uni_list_item, {
  63487. title: "银行卡",
  63488. showArrow: "",
  63489. clickable: "",
  63490. border: false,
  63491. onClick: $setup.onChangeBankAccount
  63492. }, {
  63493. body: vue.withCtx(() => [
  63494. vue.createElementVNode(
  63495. "p",
  63496. { style: { "width": "100%" } },
  63497. vue.toDisplayString(_ctx.$t("setting.bank_card")) + "  " + vue.toDisplayString($setup.bankAccount ? $setup.bankAccount : "未绑定"),
  63498. 1
  63499. /* TEXT */
  63500. )
  63501. ]),
  63502. _: 1
  63503. /* STABLE */
  63504. }),
  63505. vue.createCommentVNode(` <uni-list-item
  63506. clickable
  63507. @tap="sheep.$router.go('/pages/user/invoice/list')"
  63508. title="发票抬头管理"
  63509. showArrow
  63510. :border="false"
  63511. /> `),
  63512. vue.createCommentVNode(` <uni-list-item
  63513. :clickable="!userInfo.mobile"
  63514. @tap="sheep.$router.go('/pages/user/address/list')"
  63515. title="实名认证"
  63516. showArrow
  63517. :border="false"
  63518. >
  63519. <template v-slot:body>
  63520. <p style="width: 100%"
  63521. >实名认证&nbsp;&nbsp; 未认证
  63522. </p>
  63523. </template>
  63524. </uni-list-item> `),
  63525. $setup.userWallet.isPtSystemUser ? (vue.openBlock(), vue.createBlock(_component_uni_list_item, {
  63526. key: 0,
  63527. clickable: true,
  63528. onClick: _cache[3] || (_cache[3] = ($event) => $setup.goBackEnd("pt")),
  63529. title: "进入平台",
  63530. showArrow: "",
  63531. border: false
  63532. }, {
  63533. body: vue.withCtx(() => [
  63534. vue.createElementVNode(
  63535. "p",
  63536. { style: { "width": "100%" } },
  63537. vue.toDisplayString(_ctx.$t("setting.enter_platform")),
  63538. 1
  63539. /* TEXT */
  63540. )
  63541. ]),
  63542. _: 1
  63543. /* STABLE */
  63544. })) : vue.createCommentVNode("v-if", true),
  63545. $setup.userWallet.isShSystemUser ? (vue.openBlock(), vue.createBlock(_component_uni_list_item, {
  63546. key: 1,
  63547. clickable: true,
  63548. onClick: _cache[4] || (_cache[4] = ($event) => $setup.goBackEnd("sh")),
  63549. title: "进入商家后台",
  63550. showArrow: "",
  63551. border: false
  63552. }, {
  63553. body: vue.withCtx(() => [
  63554. vue.createElementVNode(
  63555. "p",
  63556. { style: { "width": "100%" } },
  63557. vue.toDisplayString(_ctx.$t("setting.enter_merchant_backend")),
  63558. 1
  63559. /* TEXT */
  63560. )
  63561. ]),
  63562. _: 1
  63563. /* STABLE */
  63564. })) : vue.createCommentVNode("v-if", true),
  63565. $setup.isBetaUser() ? (vue.openBlock(), vue.createBlock(_component_uni_list_item, {
  63566. key: 2,
  63567. clickable: true,
  63568. onClick: _cache[5] || (_cache[5] = ($event) => $setup.changeLanguage()),
  63569. title: "切换语言",
  63570. showArrow: "",
  63571. border: false
  63572. }, {
  63573. body: vue.withCtx(() => [
  63574. vue.createElementVNode(
  63575. "p",
  63576. { style: { "width": "100%" } },
  63577. vue.toDisplayString($setup.currentLang === "en" ? "Switch to Chinese" : "切换为英文"),
  63578. 1
  63579. /* TEXT */
  63580. )
  63581. ]),
  63582. _: 1
  63583. /* STABLE */
  63584. })) : vue.createCommentVNode("v-if", true),
  63585. vue.createVNode(_component_uni_list_item, {
  63586. title: "我的二维码",
  63587. clickable: "",
  63588. onClick: _cache[6] || (_cache[6] = ($event) => $setup.sheep.$router.go("/pages/user/qrcode-share")),
  63589. border: false
  63590. }, {
  63591. body: vue.withCtx(() => {
  63592. var _a3;
  63593. return [
  63594. vue.createElementVNode("p", { style: { "width": "100%", "display": "flex", "align-items": "center" } }, [
  63595. vue.createTextVNode(
  63596. vue.toDisplayString(_ctx.$t("setting.enter_merchant_backend")) + "      ",
  63597. 1
  63598. /* TEXT */
  63599. ),
  63600. vue.createVNode(_component_su_image, {
  63601. class: "content-img",
  63602. style: { "border": "1px solid #f4f4f4" },
  63603. current: 0,
  63604. src: (_a3 = $setup.state.model) == null ? void 0 : _a3.avatar,
  63605. height: 100,
  63606. width: 100,
  63607. radius: 0,
  63608. mode: "scaleToFill"
  63609. }, null, 8, ["src"])
  63610. ])
  63611. ];
  63612. }),
  63613. _: 1
  63614. /* STABLE */
  63615. })
  63616. ];
  63617. }),
  63618. _: 1
  63619. /* STABLE */
  63620. })
  63621. ])
  63622. ]),
  63623. _: 1
  63624. /* STABLE */
  63625. }, 8, ["model", "rules"]),
  63626. vue.createCommentVNode(" 当前社交平台的绑定关系,只处理 wechat 微信场景 "),
  63627. $setup.sheep.$platform.name !== "H5" ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [
  63628. vue.createElementVNode(
  63629. "view",
  63630. { class: "title-box ss-p-l-30" },
  63631. vue.toDisplayString(_ctx.$t("setting.third_party_account_binding")),
  63632. 1
  63633. /* TEXT */
  63634. ),
  63635. vue.createElementVNode("view", { class: "account-list ss-flex ss-row-between" }, [
  63636. "WechatOfficialAccount" === $setup.sheep.$platform.name ? (vue.openBlock(), vue.createElementBlock("view", {
  63637. key: 0,
  63638. class: "ss-flex ss-col-center"
  63639. }, [
  63640. vue.createElementVNode("image", {
  63641. class: "list-img",
  63642. src: $setup.sheep.$url.static("/static/images/WechatOfficialAccount.png")
  63643. }, null, 8, ["src"]),
  63644. vue.createElementVNode(
  63645. "text",
  63646. { class: "list-name" },
  63647. vue.toDisplayString(_ctx.$t("setting.wechat_public_account")),
  63648. 1
  63649. /* TEXT */
  63650. )
  63651. ])) : vue.createCommentVNode("v-if", true),
  63652. "WechatMiniProgram" === $setup.sheep.$platform.name ? (vue.openBlock(), vue.createElementBlock("view", {
  63653. key: 1,
  63654. class: "ss-flex ss-col-center"
  63655. }, [
  63656. vue.createElementVNode("image", {
  63657. class: "list-img",
  63658. src: $setup.sheep.$url.static("/static/images/WechatMiniProgram.png")
  63659. }, null, 8, ["src"]),
  63660. vue.createElementVNode(
  63661. "text",
  63662. { class: "list-name" },
  63663. vue.toDisplayString(_ctx.$t("setting.wechat_mini_program")),
  63664. 1
  63665. /* TEXT */
  63666. )
  63667. ])) : vue.createCommentVNode("v-if", true),
  63668. "App" === $setup.sheep.$platform.name ? (vue.openBlock(), vue.createElementBlock("view", {
  63669. key: 2,
  63670. class: "ss-flex ss-col-center"
  63671. }, [
  63672. vue.createElementVNode("image", {
  63673. class: "list-img",
  63674. src: $setup.sheep.$url.static("/static/images/wechat.png")
  63675. }, null, 8, ["src"]),
  63676. vue.createElementVNode(
  63677. "text",
  63678. { class: "list-name" },
  63679. vue.toDisplayString(_ctx.$t("setting.wechat_open_platform")),
  63680. 1
  63681. /* TEXT */
  63682. )
  63683. ])) : vue.createCommentVNode("v-if", true),
  63684. vue.createElementVNode("view", { class: "ss-flex ss-col-center" }, [
  63685. $setup.state.thirdInfo ? (vue.openBlock(), vue.createElementBlock("view", {
  63686. key: 0,
  63687. class: "info ss-flex ss-col-center"
  63688. }, [
  63689. vue.createElementVNode("image", {
  63690. class: "avatar ss-m-r-20",
  63691. src: $setup.sheep.$url.cdn($setup.state.thirdInfo.avatar)
  63692. }, null, 8, ["src"]),
  63693. vue.createElementVNode(
  63694. "text",
  63695. { class: "name" },
  63696. vue.toDisplayString($setup.state.thirdInfo.nickname),
  63697. 1
  63698. /* TEXT */
  63699. )
  63700. ])) : vue.createCommentVNode("v-if", true),
  63701. vue.createElementVNode("view", { class: "bind-box ss-m-l-20" }, [
  63702. $setup.state.thirdInfo.openid ? (vue.openBlock(), vue.createElementBlock(
  63703. "button",
  63704. {
  63705. key: 0,
  63706. class: "ss-reset-button relieve-btn",
  63707. onClick: $setup.unBindThirdOauth
  63708. },
  63709. vue.toDisplayString(_ctx.$t("setting.unbind")),
  63710. 1
  63711. /* TEXT */
  63712. )) : (vue.openBlock(), vue.createElementBlock(
  63713. "button",
  63714. {
  63715. key: 1,
  63716. class: "ss-reset-button bind-btn",
  63717. onClick: $setup.bindThirdOauth
  63718. },
  63719. vue.toDisplayString(_ctx.$t("setting.bind")),
  63720. 1
  63721. /* TEXT */
  63722. ))
  63723. ])
  63724. ])
  63725. ])
  63726. ])) : vue.createCommentVNode("v-if", true),
  63727. vue.createVNode(_component_su_fixed, {
  63728. bottom: "",
  63729. placeholder: ""
  63730. }, {
  63731. default: vue.withCtx(() => [
  63732. vue.createElementVNode("view", { class: "ss-p-x-20 ss-p-b-40" }, [
  63733. $setup.isLogin ? (vue.openBlock(), vue.createElementBlock(
  63734. "button",
  63735. {
  63736. key: 0,
  63737. class: "loginout-btn ss-reset-button",
  63738. onClick: $setup.onLogout
  63739. },
  63740. vue.toDisplayString(_ctx.$t("user.log_out")),
  63741. 1
  63742. /* TEXT */
  63743. )) : vue.createCommentVNode("v-if", true)
  63744. ])
  63745. ]),
  63746. _: 1
  63747. /* STABLE */
  63748. }),
  63749. vue.createCommentVNode(' <su-fixed bottom placeholder bg="none">\n <view class="footer-box ss-p-20">\n <button class="ss-rest-button logout-btn ui-Shadow-Main" @tap="onSubmit">保存</button>\n </view>\n </su-fixed> ')
  63750. ]),
  63751. _: 1
  63752. /* STABLE */
  63753. }, 8, ["title"]);
  63754. }
  63755. const PagesUserSetting = /* @__PURE__ */ _export_sfc(_sfc_main$1f, [["render", _sfc_render$1e], ["__scopeId", "data-v-806b15dc"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/setting.vue"]]);
  63756. const _sfc_main$1e = {
  63757. __name: "qrcode-share",
  63758. setup(__props, { expose: __expose }) {
  63759. __expose();
  63760. const state = vue.reactive({
  63761. linkId: 0
  63762. });
  63763. const poster = vue.reactive({
  63764. canvasId: "canvasId",
  63765. width: sheep$1.$platform.device.windowWidth * 0.9,
  63766. height: 600,
  63767. src: ""
  63768. });
  63769. const vm = vue.getCurrentInstance();
  63770. async function getPoster(params) {
  63771. poster.src = "";
  63772. poster.shareInfo = {
  63773. "title": "",
  63774. "desc": "",
  63775. "image": "",
  63776. "path": "",
  63777. "link": "https://zxgz.newfeifan.cn/#/pages/index/user?linkId=" + state.linkId,
  63778. "poster": {
  63779. "type": "user"
  63780. }
  63781. };
  63782. poster.canvasId = "canvasId-" + (/* @__PURE__ */ new Date()).getTime();
  63783. const canvas = await useCanvas(poster, vm);
  63784. return canvas;
  63785. }
  63786. async function getLink() {
  63787. ShareApi.getLinkId(1).then((res) => {
  63788. if (res.code !== 0) {
  63789. return;
  63790. }
  63791. state.linkId = res.data.linkId;
  63792. getPoster();
  63793. });
  63794. }
  63795. const onSavePoster = () => {
  63796. if (["WechatOfficialAccount", "H5"].includes(sheep$1.$platform.name)) {
  63797. sheep$1.$helper.toast(t$6("share.long_press_to_save"));
  63798. return;
  63799. }
  63800. uni.saveImageToPhotosAlbum({
  63801. filePath: poster.src,
  63802. success: (res) => {
  63803. onClosePoster();
  63804. sheep$1.$helper.toast(t$6("share.save_success"));
  63805. },
  63806. fail: (err) => {
  63807. sheep$1.$helper.toast(t$6("share.save_failure"));
  63808. formatAppLog("log", "at pages/user/qrcode-share.vue:106", "图片保存失败:", err);
  63809. }
  63810. });
  63811. };
  63812. onLoad(async () => {
  63813. await getLink();
  63814. });
  63815. const __returned__ = { state, poster, vm, getPoster, getLink, onSavePoster, computed: vue.computed, reactive: vue.reactive, onBeforeMount: vue.onBeforeMount, getCurrentInstance: vue.getCurrentInstance, get onLoad() {
  63816. return onLoad;
  63817. }, get sheep() {
  63818. return sheep$1;
  63819. }, get useCanvas() {
  63820. return useCanvas;
  63821. }, get showAuthModal() {
  63822. return showAuthModal;
  63823. }, get showShareModal() {
  63824. return showShareModal;
  63825. }, get ShareApi() {
  63826. return ShareApi;
  63827. }, get t() {
  63828. return t$6;
  63829. } };
  63830. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  63831. return __returned__;
  63832. }
  63833. };
  63834. function _sfc_render$1d(_ctx, _cache, $props, $setup, $data, $options) {
  63835. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  63836. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  63837. title: $setup.t("share.share"),
  63838. class: "set-userinfo-wrap"
  63839. }, {
  63840. default: vue.withCtx(() => [
  63841. vue.createElementVNode("view", { class: "ss-flex-col ss-col-center ss-row-center" }, [
  63842. $setup.poster.src === "" ? (vue.openBlock(), vue.createElementBlock(
  63843. "view",
  63844. {
  63845. key: 0,
  63846. class: "poster-title ss-flex ss-row-center",
  63847. style: vue.normalizeStyle({
  63848. height: $setup.poster.height + "px",
  63849. width: $setup.poster.width + "px"
  63850. })
  63851. },
  63852. vue.toDisplayString($setup.t("share.poster_loading")),
  63853. 5
  63854. /* TEXT, STYLE */
  63855. )) : (vue.openBlock(), vue.createElementBlock("image", {
  63856. key: 1,
  63857. class: "poster-img ss-m-20",
  63858. src: $setup.poster.src,
  63859. style: vue.normalizeStyle({
  63860. height: $setup.poster.height + "px",
  63861. width: $setup.poster.width + "px"
  63862. }),
  63863. "show-menu-by-longpress": true
  63864. }, null, 12, ["src"])),
  63865. vue.createElementVNode("canvas", {
  63866. class: "hideCanvas",
  63867. "canvas-id": $setup.poster.canvasId,
  63868. id: $setup.poster.canvasId,
  63869. style: vue.normalizeStyle({
  63870. height: $setup.poster.height + "px",
  63871. width: $setup.poster.width + "px"
  63872. })
  63873. }, null, 12, ["canvas-id", "id"])
  63874. ]),
  63875. vue.createElementVNode("view", { class: "modal-footer ss-flex ss-p-x-20" }, [
  63876. vue.createElementVNode(
  63877. "button",
  63878. {
  63879. class: "confirm-btn",
  63880. onClick: $setup.onSavePoster
  63881. },
  63882. vue.toDisplayString(["wechatOfficialAccount", "H5"].includes($setup.sheep.$platform.name) ? $setup.t("share.long_press_to_save") : $setup.t("share.long_press_to_save")),
  63883. 1
  63884. /* TEXT */
  63885. ),
  63886. vue.createCommentVNode(' <button class="confirm-btn" @tap="showShareModal">分享</button> ')
  63887. ])
  63888. ]),
  63889. _: 1
  63890. /* STABLE */
  63891. }, 8, ["title"]);
  63892. }
  63893. const PagesUserQrcodeShare = /* @__PURE__ */ _export_sfc(_sfc_main$1e, [["render", _sfc_render$1d], ["__scopeId", "data-v-845d3787"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/qrcode-share.vue"]]);
  63894. function isArray$1(value) {
  63895. if (typeof Array.isArray === "function") {
  63896. return Array.isArray(value);
  63897. } else {
  63898. return Object.prototype.toString.call(value) === "[object Array]";
  63899. }
  63900. }
  63901. function isObject$1(value) {
  63902. return Object.prototype.toString.call(value) === "[object Object]";
  63903. }
  63904. function cloneDeep(obj) {
  63905. const d2 = isArray$1(obj) ? obj : {};
  63906. if (isObject$1(obj)) {
  63907. for (const key in obj) {
  63908. if (obj[key]) {
  63909. if (obj[key] && typeof obj[key] === "object") {
  63910. d2[key] = cloneDeep(obj[key]);
  63911. } else {
  63912. d2[key] = obj[key];
  63913. }
  63914. }
  63915. }
  63916. }
  63917. return d2;
  63918. }
  63919. const _sfc_main$1d = {
  63920. __name: "goods-log",
  63921. setup(__props, { expose: __expose }) {
  63922. __expose();
  63923. vue.useCssVars((_ctx) => ({
  63924. "e113b195-sys_navBar": vue.unref(sys_navBar)
  63925. }));
  63926. const sys_navBar = sheep$1.$platform.navbar;
  63927. const pagination = {
  63928. list: [],
  63929. pageNo: 1,
  63930. total: 1,
  63931. pageSize: 10
  63932. };
  63933. const state = vue.reactive({
  63934. pagination: cloneDeep(pagination),
  63935. loadStatus: "",
  63936. editMode: false,
  63937. selectedSpuIdList: [],
  63938. selectAll: false
  63939. });
  63940. async function getList() {
  63941. state.loadStatus = "loading";
  63942. const { code: code2, data } = await SpuHistoryApi.getBrowseHistoryPage({
  63943. pageNo: state.pagination.pageNo,
  63944. pageSize: state.pagination.pageSize
  63945. });
  63946. if (code2 !== 0) {
  63947. return;
  63948. }
  63949. state.pagination.list = _$1.concat(state.pagination.list, data.list);
  63950. state.pagination.total = data.total;
  63951. state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore";
  63952. }
  63953. const onSelect = (id) => {
  63954. if (!state.selectedSpuIdList.includes(id)) {
  63955. state.selectedSpuIdList.push(id);
  63956. } else {
  63957. state.selectedSpuIdList.splice(state.selectedSpuIdList.indexOf(id), 1);
  63958. }
  63959. state.selectAll = state.selectedSpuIdList.length === state.pagination.list.length;
  63960. };
  63961. const onSelectAll = () => {
  63962. state.selectAll = !state.selectAll;
  63963. if (!state.selectAll) {
  63964. state.selectedSpuIdList = [];
  63965. } else {
  63966. state.pagination.list.forEach((item) => {
  63967. if (state.selectedSpuIdList.includes(item.spuId)) {
  63968. state.selectedSpuIdList.splice(state.selectedSpuIdList.indexOf(item.spuId), 1);
  63969. }
  63970. state.selectedSpuIdList.push(item.spuId);
  63971. });
  63972. }
  63973. };
  63974. async function onDelete() {
  63975. if (state.selectedSpuIdList.length <= 0) {
  63976. return;
  63977. }
  63978. const { code: code2 } = await SpuHistoryApi.deleteBrowseHistory(state.selectedSpuIdList);
  63979. if (code2 === 0) {
  63980. reload();
  63981. }
  63982. }
  63983. async function onClean() {
  63984. const { code: code2 } = await SpuHistoryApi.cleanBrowseHistory();
  63985. if (code2 === 0) {
  63986. reload();
  63987. }
  63988. }
  63989. function reload() {
  63990. state.editMode = false;
  63991. state.selectedSpuIdList = [];
  63992. state.selectAll = false;
  63993. state.pagination = pagination;
  63994. getList();
  63995. }
  63996. function loadMore() {
  63997. if (state.loadStatus !== "noMore") {
  63998. state.pagination.pageNo += 1;
  63999. getList();
  64000. }
  64001. }
  64002. onReachBottom(() => {
  64003. loadMore();
  64004. });
  64005. onLoad(() => {
  64006. getList();
  64007. });
  64008. const __returned__ = { sys_navBar, pagination, state, getList, onSelect, onSelectAll, onDelete, onClean, reload, loadMore, get sheep() {
  64009. return sheep$1;
  64010. }, reactive: vue.reactive, get onLoad() {
  64011. return onLoad;
  64012. }, get onReachBottom() {
  64013. return onReachBottom;
  64014. }, get _() {
  64015. return _$1;
  64016. }, get SpuHistoryApi() {
  64017. return SpuHistoryApi;
  64018. }, get cloneDeep() {
  64019. return cloneDeep;
  64020. } };
  64021. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  64022. return __returned__;
  64023. }
  64024. };
  64025. function _sfc_render$1c(_ctx, _cache, $props, $setup, $data, $options) {
  64026. const _component_s_goods_item = resolveEasycom(vue.resolveDynamicComponent("s-goods-item"), __easycom_3$5);
  64027. const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9);
  64028. const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5);
  64029. const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6);
  64030. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  64031. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  64032. title: _ctx.$t("common.delete_footprint"),
  64033. bgStyle: { color: "#f2f2f2" }
  64034. }, {
  64035. default: vue.withCtx(() => [
  64036. vue.createElementVNode("view", { class: "cart-box ss-flex ss-flex-col ss-row-between" }, [
  64037. vue.createCommentVNode(" 头部 "),
  64038. vue.createElementVNode("view", { class: "cart-header ss-flex ss-col-center ss-row-between ss-p-x-30" }, [
  64039. vue.createElementVNode("view", { class: "header-left ss-flex ss-col-center ss-font-26" }, [
  64040. vue.createCommentVNode(" 共 "),
  64041. vue.createElementVNode("text", { class: "goods-number ui-TC-Main ss-flex" }, [
  64042. vue.createCommentVNode(" {{ state.pagination.total }} "),
  64043. vue.createTextVNode(
  64044. " " + vue.toDisplayString(_ctx.$t("common.total_goods", { number: $setup.state.pagination.total })),
  64045. 1
  64046. /* TEXT */
  64047. )
  64048. ]),
  64049. vue.createCommentVNode(" 件商品 ")
  64050. ]),
  64051. vue.createElementVNode("view", { class: "header-right" }, [
  64052. $setup.state.editMode && $setup.state.pagination.total ? (vue.openBlock(), vue.createElementBlock(
  64053. "button",
  64054. {
  64055. key: 0,
  64056. class: "ss-reset-button",
  64057. onClick: _cache[0] || (_cache[0] = ($event) => $setup.state.editMode = false)
  64058. },
  64059. vue.toDisplayString(_ctx.$t("common.cancel")),
  64060. 1
  64061. /* TEXT */
  64062. )) : vue.createCommentVNode("v-if", true),
  64063. !$setup.state.editMode && $setup.state.pagination.total ? (vue.openBlock(), vue.createElementBlock(
  64064. "button",
  64065. {
  64066. key: 1,
  64067. class: "ss-reset-button ui-TC-Main",
  64068. onClick: _cache[1] || (_cache[1] = ($event) => $setup.state.editMode = true)
  64069. },
  64070. vue.toDisplayString(_ctx.$t("common.edit")),
  64071. 1
  64072. /* TEXT */
  64073. )) : vue.createCommentVNode("v-if", true)
  64074. ])
  64075. ]),
  64076. vue.createCommentVNode(" 内容 "),
  64077. vue.createElementVNode("view", { class: "cart-content" }, [
  64078. (vue.openBlock(true), vue.createElementBlock(
  64079. vue.Fragment,
  64080. null,
  64081. vue.renderList($setup.state.pagination.list, (item) => {
  64082. return vue.openBlock(), vue.createElementBlock("view", {
  64083. class: "goods-box ss-r-10 ss-m-b-14",
  64084. key: item.id
  64085. }, [
  64086. vue.createElementVNode("view", { class: "ss-flex ss-col-center" }, [
  64087. $setup.state.editMode ? (vue.openBlock(), vue.createElementBlock("label", {
  64088. key: 0,
  64089. class: "check-box ss-flex ss-col-center ss-p-l-10",
  64090. onClick: ($event) => $setup.onSelect(item.spuId)
  64091. }, [
  64092. vue.createElementVNode("radio", {
  64093. checked: $setup.state.selectedSpuIdList.includes(item.spuId),
  64094. color: "var(--ui-BG-Main)",
  64095. style: { "transform": "scale(0.8)" },
  64096. onClick: vue.withModifiers(($event) => $setup.onSelect(item.spuId), ["stop"])
  64097. }, null, 8, ["checked", "onClick"])
  64098. ], 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
  64099. vue.createVNode(_component_s_goods_item, {
  64100. title: item.spuName,
  64101. img: item.picUrl,
  64102. price: item.price,
  64103. skuText: item.introduction,
  64104. priceColor: "#FF3000",
  64105. titleWidth: 400,
  64106. onClick: ($event) => $setup.sheep.$router.go("/pages/goods/index", {
  64107. id: item.spuId
  64108. })
  64109. }, null, 8, ["title", "img", "price", "skuText", "onClick"])
  64110. ])
  64111. ]);
  64112. }),
  64113. 128
  64114. /* KEYED_FRAGMENT */
  64115. ))
  64116. ]),
  64117. vue.createCommentVNode(" 底部 "),
  64118. vue.withDirectives(vue.createVNode(
  64119. _component_su_fixed,
  64120. {
  64121. bottom: "",
  64122. val: 0,
  64123. placeholder: ""
  64124. },
  64125. {
  64126. default: vue.withCtx(() => [
  64127. vue.createElementVNode("view", { class: "cart-footer ss-flex ss-col-center ss-row-between ss-p-x-30 border-bottom" }, [
  64128. vue.createElementVNode("view", { class: "footer-left ss-flex ss-col-center" }, [
  64129. vue.createElementVNode("label", {
  64130. class: "check-box ss-flex ss-col-center ss-p-r-30",
  64131. onClick: $setup.onSelectAll
  64132. }, [
  64133. vue.createElementVNode("radio", {
  64134. checked: $setup.state.selectAll,
  64135. color: "var(--ui-BG-Main)",
  64136. style: { "transform": "scale(0.7)" },
  64137. onClick: vue.withModifiers($setup.onSelectAll, ["stop"])
  64138. }, null, 8, ["checked"]),
  64139. vue.createElementVNode(
  64140. "view",
  64141. null,
  64142. vue.toDisplayString(_ctx.$t("common.select_all")),
  64143. 1
  64144. /* TEXT */
  64145. )
  64146. ])
  64147. ]),
  64148. vue.createElementVNode("view", { class: "footer-right ss-flex" }, [
  64149. vue.createElementVNode(
  64150. "button",
  64151. {
  64152. class: vue.normalizeClass([
  64153. "ss-reset-button pay-btn ss-font-28 ",
  64154. {
  64155. "ui-BG-Main-Gradient": $setup.state.selectedSpuIdList.length > 0,
  64156. "ui-Shadow-Main": $setup.state.selectedSpuIdList.length > 0
  64157. }
  64158. ]),
  64159. onClick: $setup.onDelete
  64160. },
  64161. vue.toDisplayString(_ctx.$t("common.delete_footprint")),
  64162. 3
  64163. /* TEXT, CLASS */
  64164. ),
  64165. vue.createElementVNode(
  64166. "button",
  64167. {
  64168. class: "ss-reset-button ui-BG-Main-Gradient pay-btn ss-font-28 ui-Shadow-Main ml-2",
  64169. onClick: $setup.onClean
  64170. },
  64171. vue.toDisplayString(_ctx.$t("common.clear")),
  64172. 1
  64173. /* TEXT */
  64174. )
  64175. ])
  64176. ])
  64177. ]),
  64178. _: 1
  64179. /* STABLE */
  64180. },
  64181. 512
  64182. /* NEED_PATCH */
  64183. ), [
  64184. [vue.vShow, $setup.state.editMode]
  64185. ])
  64186. ]),
  64187. $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, {
  64188. key: 0,
  64189. status: $setup.state.loadStatus,
  64190. "content-text": {
  64191. contentdown: "上拉加载更多"
  64192. },
  64193. onClick: $setup.loadMore
  64194. }, null, 8, ["status"])) : vue.createCommentVNode("v-if", true),
  64195. $setup.state.pagination.total === 0 ? (vue.openBlock(), vue.createBlock(_component_s_empty, {
  64196. key: 1,
  64197. text: "暂无浏览记录",
  64198. icon: "/static/collect-empty.png"
  64199. })) : vue.createCommentVNode("v-if", true)
  64200. ]),
  64201. _: 1
  64202. /* STABLE */
  64203. }, 8, ["title"]);
  64204. }
  64205. const PagesUserGoodsLog = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["render", _sfc_render$1c], ["__scopeId", "data-v-e113b195"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/goods-log.vue"]]);
  64206. const _sfc_main$1c = {
  64207. __name: "list",
  64208. setup(__props, { expose: __expose }) {
  64209. __expose();
  64210. const state = vue.reactive({
  64211. list: [],
  64212. // 地址列表
  64213. loading: true
  64214. });
  64215. const onSelect = (addressInfo) => {
  64216. uni.$emit("SELECT_ADDRESS", {
  64217. addressInfo
  64218. });
  64219. sheep$1.$router.back();
  64220. };
  64221. function importWechatAddress() {
  64222. }
  64223. onShow(async () => {
  64224. state.list = (await AddressApi.getAddressList()).data;
  64225. state.loading = false;
  64226. });
  64227. vue.onBeforeMount(() => {
  64228. if (!!uni.getStorageSync("areaData")) {
  64229. return;
  64230. }
  64231. AreaApi.getAreaTree().then((res) => {
  64232. if (res.code === 0) {
  64233. uni.setStorageSync("areaData", res.data);
  64234. }
  64235. });
  64236. });
  64237. const __returned__ = { state, onSelect, importWechatAddress, reactive: vue.reactive, onBeforeMount: vue.onBeforeMount, get onShow() {
  64238. return onShow;
  64239. }, get sheep() {
  64240. return sheep$1;
  64241. }, get isEmpty() {
  64242. return lodashExports.isEmpty;
  64243. }, get AreaApi() {
  64244. return AreaApi;
  64245. }, get AddressApi() {
  64246. return AddressApi;
  64247. }, get $helper() {
  64248. return $helper;
  64249. }, get t() {
  64250. return t$6;
  64251. } };
  64252. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  64253. return __returned__;
  64254. }
  64255. };
  64256. function _sfc_render$1b(_ctx, _cache, $props, $setup, $data, $options) {
  64257. const _component_s_address_item = resolveEasycom(vue.resolveDynamicComponent("s-address-item"), __easycom_0$7);
  64258. const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9);
  64259. const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6);
  64260. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  64261. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  64262. title: $setup.t("address.shipping_address"),
  64263. bgStyle: { color: "#FFF" }
  64264. }, {
  64265. default: vue.withCtx(() => [
  64266. $setup.state.list.length ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [
  64267. (vue.openBlock(true), vue.createElementBlock(
  64268. vue.Fragment,
  64269. null,
  64270. vue.renderList($setup.state.list, (item) => {
  64271. return vue.openBlock(), vue.createBlock(_component_s_address_item, {
  64272. hasBorderBottom: "",
  64273. key: item.id,
  64274. item,
  64275. onClick: ($event) => $setup.onSelect(item)
  64276. }, null, 8, ["item", "onClick"]);
  64277. }),
  64278. 128
  64279. /* KEYED_FRAGMENT */
  64280. ))
  64281. ])) : vue.createCommentVNode("v-if", true),
  64282. vue.createVNode(_component_su_fixed, {
  64283. bottom: "",
  64284. placeholder: ""
  64285. }, {
  64286. default: vue.withCtx(() => [
  64287. vue.createElementVNode("view", { class: "footer-box ss-flex ss-row-between ss-p-20" }, [
  64288. vue.createCommentVNode(" 微信小程序和微信H5 "),
  64289. ["WechatMiniProgram", "WechatOfficialAccount"].includes($setup.sheep.$platform.name) ? (vue.openBlock(), vue.createElementBlock("button", {
  64290. key: 0,
  64291. onClick: $setup.importWechatAddress,
  64292. class: "border ss-reset-button sync-wxaddress ss-m-20 ss-flex ss-row-center ss-col-center"
  64293. }, [
  64294. vue.createElementVNode("text", {
  64295. class: "cicon-weixin ss-p-r-10",
  64296. style: { "color": "#09bb07", "font-size": "40rpx" }
  64297. }),
  64298. vue.createTextVNode(
  64299. " " + vue.toDisplayString($setup.t("address.import_wechat_address")),
  64300. 1
  64301. /* TEXT */
  64302. )
  64303. ])) : vue.createCommentVNode("v-if", true),
  64304. vue.createElementVNode(
  64305. "button",
  64306. {
  64307. class: "add-btn ss-reset-button ui-Shadow-Main",
  64308. onClick: _cache[0] || (_cache[0] = ($event) => $setup.sheep.$router.go("/pages/user/address/edit"))
  64309. },
  64310. vue.toDisplayString($setup.t("address.add_new_shipping_address")),
  64311. 1
  64312. /* TEXT */
  64313. )
  64314. ])
  64315. ]),
  64316. _: 1
  64317. /* STABLE */
  64318. }),
  64319. $setup.state.list.length === 0 && !$setup.state.loading ? (vue.openBlock(), vue.createBlock(_component_s_empty, {
  64320. key: 1,
  64321. text: $setup.t("no_shipping_address"),
  64322. icon: "/static/data-empty.png"
  64323. }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true)
  64324. ]),
  64325. _: 1
  64326. /* STABLE */
  64327. }, 8, ["title"]);
  64328. }
  64329. const PagesUserAddressList = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["render", _sfc_render$1b], ["__scopeId", "data-v-5a5957ad"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/address/list.vue"]]);
  64330. const _sfc_main$1b = {
  64331. __name: "list",
  64332. setup(__props, { expose: __expose }) {
  64333. __expose();
  64334. const state = vue.reactive({
  64335. list: [],
  64336. // 地址列表
  64337. loading: true
  64338. });
  64339. const onSelect = (addressInfo) => {
  64340. uni.$emit("SELECT_ADDRESS", {
  64341. addressInfo
  64342. });
  64343. sheep$1.$router.back();
  64344. };
  64345. function importWechatAddress() {
  64346. }
  64347. onShow(async () => {
  64348. state.list = (await AddressApi.getAddressList(2)).data;
  64349. state.loading = false;
  64350. });
  64351. vue.onBeforeMount(() => {
  64352. if (!!uni.getStorageSync("areaData")) {
  64353. return;
  64354. }
  64355. AreaApi.getAreaTree().then((res) => {
  64356. if (res.code === 0) {
  64357. uni.setStorageSync("areaData", res.data);
  64358. }
  64359. });
  64360. });
  64361. const __returned__ = { state, onSelect, importWechatAddress, reactive: vue.reactive, onBeforeMount: vue.onBeforeMount, get onShow() {
  64362. return onShow;
  64363. }, get sheep() {
  64364. return sheep$1;
  64365. }, get isEmpty() {
  64366. return lodashExports.isEmpty;
  64367. }, get AreaApi() {
  64368. return AreaApi;
  64369. }, get AddressApi() {
  64370. return AddressApi;
  64371. }, get $helper() {
  64372. return $helper;
  64373. }, get t() {
  64374. return t$6;
  64375. } };
  64376. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  64377. return __returned__;
  64378. }
  64379. };
  64380. function _sfc_render$1a(_ctx, _cache, $props, $setup, $data, $options) {
  64381. const _component_s_address_item = resolveEasycom(vue.resolveDynamicComponent("s-address-item"), __easycom_0$7);
  64382. const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9);
  64383. const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6);
  64384. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  64385. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  64386. title: $setup.t("address.virtual_goods_address"),
  64387. bgStyle: { color: "#FFF" }
  64388. }, {
  64389. default: vue.withCtx(() => [
  64390. $setup.state.list.length ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [
  64391. (vue.openBlock(true), vue.createElementBlock(
  64392. vue.Fragment,
  64393. null,
  64394. vue.renderList($setup.state.list, (item) => {
  64395. return vue.openBlock(), vue.createBlock(_component_s_address_item, {
  64396. spuType: "0",
  64397. hasBorderBottom: "",
  64398. key: item.id,
  64399. item,
  64400. onClick: ($event) => $setup.onSelect(item)
  64401. }, null, 8, ["item", "onClick"]);
  64402. }),
  64403. 128
  64404. /* KEYED_FRAGMENT */
  64405. ))
  64406. ])) : vue.createCommentVNode("v-if", true),
  64407. vue.createVNode(_component_su_fixed, {
  64408. bottom: "",
  64409. placeholder: ""
  64410. }, {
  64411. default: vue.withCtx(() => [
  64412. vue.createElementVNode("view", { class: "footer-box ss-flex ss-row-between ss-p-20" }, [
  64413. vue.createCommentVNode(" 微信小程序和微信H5 "),
  64414. vue.createElementVNode(
  64415. "button",
  64416. {
  64417. class: "add-btn ss-reset-button ui-Shadow-Main",
  64418. onClick: _cache[0] || (_cache[0] = ($event) => $setup.sheep.$router.go("/pages/user/dummyAddress/edit"))
  64419. },
  64420. vue.toDisplayString($setup.t("address.add_new_shipping_address")),
  64421. 1
  64422. /* TEXT */
  64423. )
  64424. ])
  64425. ]),
  64426. _: 1
  64427. /* STABLE */
  64428. }),
  64429. $setup.state.list.length === 0 && !$setup.state.loading ? (vue.openBlock(), vue.createBlock(_component_s_empty, {
  64430. key: 1,
  64431. text: $setup.t("address.no_shipping_address"),
  64432. icon: "/static/data-empty.png"
  64433. }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true)
  64434. ]),
  64435. _: 1
  64436. /* STABLE */
  64437. }, 8, ["title"]);
  64438. }
  64439. const PagesUserDummyAddressList = /* @__PURE__ */ _export_sfc(_sfc_main$1b, [["render", _sfc_render$1a], ["__scopeId", "data-v-d0cb4d27"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/dummyAddress/list.vue"]]);
  64440. const _sfc_main$1a = {
  64441. __name: "edit",
  64442. setup(__props, { expose: __expose }) {
  64443. __expose();
  64444. const invoiceFormRef = vue.ref(null);
  64445. const currentProtocol = vue.ref(false);
  64446. const state = vue.reactive({
  64447. showRegion: false,
  64448. model: {
  64449. invoiceType: 1,
  64450. invoiceTitleType: 1,
  64451. invoiceTitle: "",
  64452. taxIDNumber: ""
  64453. },
  64454. rules: {},
  64455. protocol: false
  64456. });
  64457. function onChange() {
  64458. state.protocol = !state.protocol;
  64459. }
  64460. function onProtocol(title) {
  64461. sheep$1.$router.go("/pages/public/richtext", {
  64462. title
  64463. });
  64464. }
  64465. const rules2 = {
  64466. invoiceType: {
  64467. rules: [{
  64468. required: true,
  64469. errorMessage: "请选择发票类型"
  64470. }]
  64471. },
  64472. invoiceTitleType: {
  64473. rules: [{
  64474. required: true,
  64475. errorMessage: "请选择抬头类型"
  64476. }]
  64477. },
  64478. invoiceTitle: {
  64479. rules: [{
  64480. required: true,
  64481. errorMessage: "请输入发票抬头"
  64482. }]
  64483. },
  64484. taxIDNumber: {
  64485. rules: [{
  64486. required: true,
  64487. errorMessage: "请输入单位税号"
  64488. }]
  64489. }
  64490. };
  64491. const invoiceType = (e2) => {
  64492. state.model.invoiceType = e2.detail.value;
  64493. state.model.invoiceTitleType = 1;
  64494. };
  64495. const invoiceTitleType = (e2) => {
  64496. state.model.invoiceTitleType = e2.detail.value;
  64497. };
  64498. const onSave = async () => {
  64499. const validate = await vue.unref(invoiceFormRef).validate().catch((error2) => {
  64500. formatAppLog("log", "at pages/user/invoice/edit.vue:207", "error: ", error2);
  64501. });
  64502. if (!validate) {
  64503. return;
  64504. }
  64505. if (!state.protocol) {
  64506. currentProtocol.value = true;
  64507. setTimeout(function() {
  64508. currentProtocol.value = false;
  64509. }, 500);
  64510. return;
  64511. }
  64512. const formData = {
  64513. ...state.model
  64514. };
  64515. const {
  64516. code: code2
  64517. } = state.model.id > 0 ? await AddressApi.updateAddress(formData) : await AddressApi.createAddress(formData);
  64518. if (code2 === 0) {
  64519. sheep$1.$router.back();
  64520. }
  64521. };
  64522. const onDelete = () => {
  64523. uni.showModal({
  64524. title: "提示",
  64525. content: "确认删除此收货地址吗?",
  64526. success: async function(res) {
  64527. if (!res.confirm) {
  64528. return;
  64529. }
  64530. const {
  64531. code: code2
  64532. } = await AddressApi.deleteAddress(state.model.id);
  64533. if (code2 === 0) {
  64534. sheep$1.$router.back();
  64535. }
  64536. }
  64537. });
  64538. };
  64539. onLoad(async (options2) => {
  64540. });
  64541. const __returned__ = { invoiceFormRef, currentProtocol, state, onChange, onProtocol, rules: rules2, invoiceType, invoiceTitleType, onSave, onDelete, ref: vue.ref, reactive: vue.reactive, unref: vue.unref, get sheep() {
  64542. return sheep$1;
  64543. }, get onLoad() {
  64544. return onLoad;
  64545. }, get _() {
  64546. return _$1;
  64547. }, get mobile() {
  64548. return mobile;
  64549. }, get AreaApi() {
  64550. return AreaApi;
  64551. }, get AddressApi() {
  64552. return AddressApi;
  64553. }, get $helper() {
  64554. return $helper;
  64555. } };
  64556. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  64557. return __returned__;
  64558. }
  64559. };
  64560. function _sfc_render$19(_ctx, _cache, $props, $setup, $data, $options) {
  64561. const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9);
  64562. const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l);
  64563. const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7);
  64564. const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9);
  64565. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  64566. return vue.openBlock(), vue.createElementBlock(
  64567. vue.Fragment,
  64568. null,
  64569. [
  64570. vue.createCommentVNode(" {{ru}} "),
  64571. vue.createVNode(_component_s_layout, {
  64572. title: $setup.state.model.id ? "编辑发票抬头" : "新增发票抬头"
  64573. }, {
  64574. default: vue.withCtx(() => [
  64575. vue.createVNode(_component_uni_forms, {
  64576. ref: "invoiceFormRef",
  64577. modelValue: $setup.state.model,
  64578. "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => $setup.state.model = $event),
  64579. rules: $setup.rules,
  64580. validateTrigger: "bind",
  64581. labelWidth: "160",
  64582. labelAlign: "left",
  64583. border: "",
  64584. labelStyle: { fontWeight: "bold" }
  64585. }, {
  64586. default: vue.withCtx(() => [
  64587. vue.createElementVNode("view", { class: "bg-white form-box ss-p-x-30" }, [
  64588. vue.createVNode(_component_uni_forms_item, {
  64589. name: "invoiceType",
  64590. label: "发票类型"
  64591. }, {
  64592. default: vue.withCtx(() => [
  64593. vue.createElementVNode(
  64594. "radio-group",
  64595. { onChange: $setup.invoiceType },
  64596. [
  64597. vue.createElementVNode("radio", {
  64598. value: "1",
  64599. checked: $setup.state.model.invoiceType == 1,
  64600. color: "var(--ui-BG-Main)",
  64601. class: "radio ss-m-r-30",
  64602. style: { "transform": "scale(0.9)" }
  64603. }, "纸质普票 ", 8, ["checked"]),
  64604. vue.createElementVNode("radio", {
  64605. value: "2",
  64606. checked: $setup.state.model.invoiceType == 2,
  64607. color: "var(--ui-BG-Main)",
  64608. class: "radio",
  64609. style: { "transform": "scale(0.9)" }
  64610. }, "专用发票", 8, ["checked"])
  64611. ],
  64612. 32
  64613. /* NEED_HYDRATION */
  64614. )
  64615. ]),
  64616. _: 1
  64617. /* STABLE */
  64618. }),
  64619. vue.createCommentVNode(" 当为专用发票时,不用选择抬头类型 "),
  64620. $setup.state.model.invoiceType == 1 ? (vue.openBlock(), vue.createBlock(_component_uni_forms_item, {
  64621. key: 0,
  64622. name: "invoiceTitleType",
  64623. label: "抬头类型",
  64624. class: "form-item"
  64625. }, {
  64626. default: vue.withCtx(() => [
  64627. vue.createElementVNode(
  64628. "radio-group",
  64629. {
  64630. class: "uni-flex uni-row radio-group",
  64631. onChange: $setup.invoiceTitleType
  64632. },
  64633. [
  64634. vue.createElementVNode("radio", {
  64635. value: "1",
  64636. checked: $setup.state.model.invoiceTitleType == 1,
  64637. color: "var(--ui-BG-Main)",
  64638. class: "radio ss-m-r-30",
  64639. style: { "transform": "scale(0.9)" }
  64640. }, "个人 ", 8, ["checked"]),
  64641. vue.createElementVNode("radio", {
  64642. value: "2",
  64643. checked: $setup.state.model.invoiceTitleType == 2,
  64644. color: "var(--ui-BG-Main)",
  64645. style: { "transform": "scale(0.9)" },
  64646. class: "radio"
  64647. }, "单位", 8, ["checked"])
  64648. ],
  64649. 32
  64650. /* NEED_HYDRATION */
  64651. )
  64652. ]),
  64653. _: 1
  64654. /* STABLE */
  64655. })) : vue.createCommentVNode("v-if", true),
  64656. vue.createVNode(_component_uni_forms_item, {
  64657. name: "invoiceTitle",
  64658. label: "发票抬头",
  64659. class: "form-item"
  64660. }, {
  64661. default: vue.withCtx(() => [
  64662. vue.createVNode(_component_uni_easyinput, {
  64663. modelValue: $setup.state.model.invoiceTitle,
  64664. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.state.model.invoiceTitle = $event),
  64665. placeholder: "请输入发票抬头",
  64666. inputBorder: false,
  64667. placeholderStyle: "color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal"
  64668. }, null, 8, ["modelValue"])
  64669. ]),
  64670. _: 1
  64671. /* STABLE */
  64672. }),
  64673. $setup.state.model.invoiceTitleType == 2 ? (vue.openBlock(), vue.createElementBlock(
  64674. vue.Fragment,
  64675. { key: 1 },
  64676. [
  64677. vue.createVNode(_component_uni_forms_item, {
  64678. name: "taxIDNumber",
  64679. label: "单位税号",
  64680. class: "form-item"
  64681. }, {
  64682. default: vue.withCtx(() => [
  64683. vue.createVNode(_component_uni_easyinput, {
  64684. modelValue: $setup.state.model.taxIDNumber,
  64685. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.model.taxIDNumber = $event),
  64686. type: "number",
  64687. placeholder: "请输入单位税号",
  64688. inputBorder: false,
  64689. placeholderStyle: "color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal"
  64690. }, null, 8, ["modelValue"])
  64691. ]),
  64692. _: 1
  64693. /* STABLE */
  64694. }),
  64695. vue.createVNode(_component_uni_forms_item, {
  64696. name: "invoiceTitle",
  64697. label: "注册地址",
  64698. class: "form-item"
  64699. }, {
  64700. default: vue.withCtx(() => [
  64701. vue.createVNode(_component_uni_easyinput, {
  64702. modelValue: $setup.state.model.invoiceTitle,
  64703. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.model.invoiceTitle = $event),
  64704. type: "number",
  64705. placeholder: "选填",
  64706. inputBorder: false,
  64707. placeholderStyle: "color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal"
  64708. }, null, 8, ["modelValue"])
  64709. ]),
  64710. _: 1
  64711. /* STABLE */
  64712. }),
  64713. vue.createVNode(_component_uni_forms_item, {
  64714. name: "invoiceTitle",
  64715. label: "注册电话",
  64716. class: "form-item"
  64717. }, {
  64718. default: vue.withCtx(() => [
  64719. vue.createVNode(_component_uni_easyinput, {
  64720. modelValue: $setup.state.model.invoiceTitle,
  64721. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.state.model.invoiceTitle = $event),
  64722. type: "number",
  64723. placeholder: "选填",
  64724. inputBorder: false,
  64725. placeholderStyle: "color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal"
  64726. }, null, 8, ["modelValue"])
  64727. ]),
  64728. _: 1
  64729. /* STABLE */
  64730. }),
  64731. vue.createVNode(_component_uni_forms_item, {
  64732. name: "invoiceTitle",
  64733. label: "开户银行",
  64734. class: "form-item"
  64735. }, {
  64736. default: vue.withCtx(() => [
  64737. vue.createVNode(_component_uni_easyinput, {
  64738. modelValue: $setup.state.model.invoiceTitle,
  64739. "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.state.model.invoiceTitle = $event),
  64740. type: "number",
  64741. placeholder: "选填",
  64742. inputBorder: false,
  64743. placeholderStyle: "color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal"
  64744. }, null, 8, ["modelValue"])
  64745. ]),
  64746. _: 1
  64747. /* STABLE */
  64748. }),
  64749. vue.createVNode(_component_uni_forms_item, {
  64750. name: "invoiceTitle",
  64751. label: "银行账号",
  64752. class: "form-item"
  64753. }, {
  64754. default: vue.withCtx(() => [
  64755. vue.createVNode(_component_uni_easyinput, {
  64756. modelValue: $setup.state.model.invoiceTitle,
  64757. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $setup.state.model.invoiceTitle = $event),
  64758. type: "number",
  64759. placeholder: "选填",
  64760. inputBorder: false,
  64761. placeholderStyle: "color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal"
  64762. }, null, 8, ["modelValue"])
  64763. ]),
  64764. _: 1
  64765. /* STABLE */
  64766. })
  64767. ],
  64768. 64
  64769. /* STABLE_FRAGMENT */
  64770. )) : vue.createCommentVNode("v-if", true),
  64771. $setup.state.model.invoiceType == 2 ? (vue.openBlock(), vue.createElementBlock(
  64772. vue.Fragment,
  64773. { key: 2 },
  64774. [
  64775. vue.createVNode(_component_uni_forms_item, {
  64776. name: "taxIDNumber",
  64777. label: "单位税号",
  64778. class: "form-item"
  64779. }, {
  64780. default: vue.withCtx(() => [
  64781. vue.createVNode(_component_uni_easyinput, {
  64782. modelValue: $setup.state.model.taxIDNumber,
  64783. "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $setup.state.model.taxIDNumber = $event),
  64784. type: "number",
  64785. placeholder: "请输入单位税号",
  64786. inputBorder: false,
  64787. placeholderStyle: "color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal"
  64788. }, null, 8, ["modelValue"])
  64789. ]),
  64790. _: 1
  64791. /* STABLE */
  64792. }),
  64793. vue.createVNode(_component_uni_forms_item, {
  64794. name: "invoiceTitle",
  64795. label: "注册地址",
  64796. class: "form-item"
  64797. }, {
  64798. default: vue.withCtx(() => [
  64799. vue.createVNode(_component_uni_easyinput, {
  64800. modelValue: $setup.state.model.invoiceTitle,
  64801. "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $setup.state.model.invoiceTitle = $event),
  64802. type: "number",
  64803. placeholder: "必填",
  64804. inputBorder: false,
  64805. placeholderStyle: "color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal"
  64806. }, null, 8, ["modelValue"])
  64807. ]),
  64808. _: 1
  64809. /* STABLE */
  64810. }),
  64811. vue.createVNode(_component_uni_forms_item, {
  64812. name: "invoiceTitle",
  64813. label: "注册电话",
  64814. class: "form-item"
  64815. }, {
  64816. default: vue.withCtx(() => [
  64817. vue.createVNode(_component_uni_easyinput, {
  64818. modelValue: $setup.state.model.invoiceTitle,
  64819. "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $setup.state.model.invoiceTitle = $event),
  64820. type: "number",
  64821. placeholder: "必填",
  64822. inputBorder: false,
  64823. placeholderStyle: "color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal"
  64824. }, null, 8, ["modelValue"])
  64825. ]),
  64826. _: 1
  64827. /* STABLE */
  64828. }),
  64829. vue.createVNode(_component_uni_forms_item, {
  64830. name: "invoiceTitle",
  64831. label: "开户银行",
  64832. class: "form-item"
  64833. }, {
  64834. default: vue.withCtx(() => [
  64835. vue.createVNode(_component_uni_easyinput, {
  64836. modelValue: $setup.state.model.invoiceTitle,
  64837. "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $setup.state.model.invoiceTitle = $event),
  64838. type: "number",
  64839. placeholder: "必填",
  64840. inputBorder: false,
  64841. placeholderStyle: "color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal"
  64842. }, null, 8, ["modelValue"])
  64843. ]),
  64844. _: 1
  64845. /* STABLE */
  64846. }),
  64847. vue.createVNode(_component_uni_forms_item, {
  64848. name: "invoiceTitle",
  64849. label: "银行账号",
  64850. class: "form-item"
  64851. }, {
  64852. default: vue.withCtx(() => [
  64853. vue.createVNode(_component_uni_easyinput, {
  64854. modelValue: $setup.state.model.invoiceTitle,
  64855. "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => $setup.state.model.invoiceTitle = $event),
  64856. type: "number",
  64857. placeholder: "必填",
  64858. inputBorder: false,
  64859. placeholderStyle: "color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal"
  64860. }, null, 8, ["modelValue"])
  64861. ]),
  64862. _: 1
  64863. /* STABLE */
  64864. })
  64865. ],
  64866. 64
  64867. /* STABLE_FRAGMENT */
  64868. )) : vue.createCommentVNode("v-if", true)
  64869. ]),
  64870. $setup.state.model.invoiceType == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  64871. key: 0,
  64872. class: "ss-m-y-20 bg-white ss-p-x-30 ss-flex ss-row-between ss-col-center default-box"
  64873. }, [
  64874. vue.createElementVNode(
  64875. "view",
  64876. {
  64877. class: vue.normalizeClass(["default-box-title", { shake: $setup.currentProtocol }])
  64878. },
  64879. [
  64880. vue.createElementVNode("label", {
  64881. class: "radio ss-flex ss-col-center",
  64882. onClick: $setup.onChange
  64883. }, [
  64884. vue.createElementVNode("radio", {
  64885. checked: $setup.state.protocol,
  64886. color: "var(--ui-BG-Main)",
  64887. style: { "transform": "scale(0.8)" },
  64888. onClick: vue.withModifiers($setup.onChange, ["stop"])
  64889. }, null, 8, ["checked"]),
  64890. vue.createElementVNode("view", { class: "agreement-text ss-flex ss-col-center ss-m-l-8" }, [
  64891. vue.createTextVNode(" 我已阅读并同意 "),
  64892. vue.createElementVNode("view", {
  64893. class: "tcp-text",
  64894. onClick: _cache[11] || (_cache[11] = vue.withModifiers(($event) => $setup.onProtocol("专用发票抬头确认书"), ["stop"]))
  64895. }, " 《专用发票抬头确认书》 ")
  64896. ])
  64897. ])
  64898. ],
  64899. 2
  64900. /* CLASS */
  64901. )
  64902. ])) : vue.createCommentVNode("v-if", true)
  64903. ]),
  64904. _: 1
  64905. /* STABLE */
  64906. }, 8, ["modelValue"]),
  64907. vue.createVNode(_component_su_fixed, {
  64908. bottom: "",
  64909. opacity: false,
  64910. bg: "",
  64911. placeholder: "",
  64912. noFixed: false,
  64913. index: 10
  64914. }, {
  64915. default: vue.withCtx(() => [
  64916. vue.createElementVNode("view", { class: "footer-box ss-flex-col ss-row-between ss-p-20" }, [
  64917. vue.createElementVNode("view", { class: "ss-m-b-20" }, [
  64918. vue.createElementVNode("button", {
  64919. class: "ss-reset-button save-btn ui-Shadow-Main",
  64920. onClick: $setup.onSave
  64921. }, "保存")
  64922. ]),
  64923. $setup.state.model.id ? (vue.openBlock(), vue.createElementBlock("button", {
  64924. key: 0,
  64925. class: "ss-reset-button cancel-btn",
  64926. onClick: $setup.onDelete
  64927. }, " 删除 ")) : vue.createCommentVNode("v-if", true)
  64928. ])
  64929. ]),
  64930. _: 1
  64931. /* STABLE */
  64932. })
  64933. ]),
  64934. _: 1
  64935. /* STABLE */
  64936. }, 8, ["title"])
  64937. ],
  64938. 2112
  64939. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  64940. );
  64941. }
  64942. const PagesUserInvoiceEdit = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["render", _sfc_render$19], ["__scopeId", "data-v-1891008f"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/invoice/edit.vue"]]);
  64943. const _sfc_main$19 = {
  64944. __name: "list",
  64945. setup(__props, { expose: __expose }) {
  64946. __expose();
  64947. const state = vue.reactive({
  64948. list: [],
  64949. // 地址列表
  64950. loading: true
  64951. });
  64952. const onSelect = (addressInfo) => {
  64953. uni.$emit("SELECT_ADDRESS", {
  64954. addressInfo
  64955. });
  64956. sheep$1.$router.back();
  64957. };
  64958. function importWechatAddress() {
  64959. }
  64960. onShow(async () => {
  64961. state.list = (await AddressApi.getAddressList()).data;
  64962. state.loading = false;
  64963. });
  64964. vue.onBeforeMount(() => {
  64965. if (!!uni.getStorageSync("areaData")) {
  64966. return;
  64967. }
  64968. AreaApi.getAreaTree().then((res) => {
  64969. if (res.code === 0) {
  64970. uni.setStorageSync("areaData", res.data);
  64971. }
  64972. });
  64973. });
  64974. const __returned__ = { state, onSelect, importWechatAddress, reactive: vue.reactive, onBeforeMount: vue.onBeforeMount, get onShow() {
  64975. return onShow;
  64976. }, get sheep() {
  64977. return sheep$1;
  64978. }, get isEmpty() {
  64979. return lodashExports.isEmpty;
  64980. }, get AreaApi() {
  64981. return AreaApi;
  64982. }, get AddressApi() {
  64983. return AddressApi;
  64984. }, get $helper() {
  64985. return $helper;
  64986. } };
  64987. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  64988. return __returned__;
  64989. }
  64990. };
  64991. function _sfc_render$18(_ctx, _cache, $props, $setup, $data, $options) {
  64992. const _component_s_address_item = resolveEasycom(vue.resolveDynamicComponent("s-address-item"), __easycom_0$7);
  64993. const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9);
  64994. const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6);
  64995. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  64996. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  64997. title: "发票抬头管理",
  64998. bgStyle: { color: "#FFF" }
  64999. }, {
  65000. default: vue.withCtx(() => [
  65001. $setup.state.list.length ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [
  65002. (vue.openBlock(true), vue.createElementBlock(
  65003. vue.Fragment,
  65004. null,
  65005. vue.renderList($setup.state.list, (item) => {
  65006. return vue.openBlock(), vue.createBlock(_component_s_address_item, {
  65007. hasBorderBottom: "",
  65008. key: item.id,
  65009. item,
  65010. onClick: ($event) => $setup.onSelect(item)
  65011. }, null, 8, ["item", "onClick"]);
  65012. }),
  65013. 128
  65014. /* KEYED_FRAGMENT */
  65015. ))
  65016. ])) : vue.createCommentVNode("v-if", true),
  65017. vue.createVNode(_component_su_fixed, {
  65018. bottom: "",
  65019. placeholder: ""
  65020. }, {
  65021. default: vue.withCtx(() => [
  65022. vue.createElementVNode("view", { class: "footer-box ss-flex ss-row-between ss-p-20" }, [
  65023. vue.createCommentVNode(" 微信小程序和微信H5 "),
  65024. vue.createCommentVNode(` <button v-if="['WechatMiniProgram', 'WechatOfficialAccount'].includes(sheep.$platform.name)"
  65025. @tap="importWechatAddress"
  65026. class="border ss-reset-button sync-wxaddress ss-m-20 ss-flex ss-row-center ss-col-center">
  65027. <text class="cicon-weixin ss-p-r-10" style="color: #09bb07; font-size: 40rpx"></text>
  65028. 导入微信地址
  65029. </button> `),
  65030. vue.createElementVNode("button", {
  65031. class: "add-btn ss-reset-button ui-Shadow-Main",
  65032. onClick: _cache[0] || (_cache[0] = ($event) => $setup.sheep.$router.go("/pages/user/invoice/edit"))
  65033. }, " 新增发票抬头 ")
  65034. ])
  65035. ]),
  65036. _: 1
  65037. /* STABLE */
  65038. }),
  65039. $setup.state.list.length === 0 && !$setup.state.loading ? (vue.openBlock(), vue.createBlock(_component_s_empty, {
  65040. key: 1,
  65041. text: "暂无发票抬头",
  65042. icon: "/static/data-empty.png"
  65043. })) : vue.createCommentVNode("v-if", true)
  65044. ]),
  65045. _: 1
  65046. /* STABLE */
  65047. });
  65048. }
  65049. const PagesUserInvoiceList = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["render", _sfc_render$18], ["__scopeId", "data-v-17d2e25a"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/invoice/list.vue"]]);
  65050. const __default__ = {
  65051. name: "UiSwitch"
  65052. };
  65053. const _sfc_main$18 = /* @__PURE__ */ Object.assign(__default__, {
  65054. props: {
  65055. modelValue: {
  65056. type: [Boolean, Number],
  65057. default: false
  65058. },
  65059. ui: {
  65060. type: String,
  65061. default: ""
  65062. },
  65063. bg: {
  65064. type: String,
  65065. default: "ui-BG-Main"
  65066. },
  65067. text: {
  65068. type: String,
  65069. default: ""
  65070. },
  65071. size: {
  65072. type: String,
  65073. default: "sm"
  65074. },
  65075. disabled: {
  65076. type: Boolean,
  65077. default: false
  65078. }
  65079. },
  65080. emits: ["update:modelValue"],
  65081. setup(__props, { expose: __expose, emit: __emit }) {
  65082. __expose();
  65083. const props = __props;
  65084. const emits = __emit;
  65085. const change = () => {
  65086. emits("update:modelValue", !props.modelValue);
  65087. };
  65088. const __returned__ = { props, emits, change };
  65089. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  65090. return __returned__;
  65091. }
  65092. });
  65093. function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) {
  65094. return vue.openBlock(), vue.createElementBlock(
  65095. "view",
  65096. {
  65097. class: vue.normalizeClass(["ui-switch", [{ disabled: $setup.props.disabled }, $setup.props.ui]])
  65098. },
  65099. [
  65100. vue.createElementVNode("view", {
  65101. class: "ui-switch-wrapper",
  65102. onClick: $setup.change
  65103. }, [
  65104. vue.createElementVNode(
  65105. "view",
  65106. {
  65107. class: vue.normalizeClass(["ui-switch-input", [
  65108. { "ui-switch-input-checked": $setup.props.modelValue },
  65109. $setup.props.modelValue ? $setup.props.bg : "",
  65110. $setup.props.text,
  65111. $setup.props.size
  65112. ]])
  65113. },
  65114. null,
  65115. 2
  65116. /* CLASS */
  65117. )
  65118. ])
  65119. ],
  65120. 2
  65121. /* CLASS */
  65122. );
  65123. }
  65124. const __easycom_2 = /* @__PURE__ */ _export_sfc(_sfc_main$18, [["render", _sfc_render$17], ["__scopeId", "data-v-8eb57d65"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/ui/su-switch/su-switch.vue"]]);
  65125. const _sfc_main$17 = {
  65126. name: "SuToolbar",
  65127. props: {
  65128. // 是否展示工具条
  65129. show: {
  65130. type: Boolean,
  65131. default: true
  65132. },
  65133. // 取消按钮的文字
  65134. cancelText: {
  65135. type: String,
  65136. default: "取消"
  65137. },
  65138. // 确认按钮的文字
  65139. confirmText: {
  65140. type: String,
  65141. default: "确认"
  65142. },
  65143. // 取消按钮的颜色
  65144. cancelColor: {
  65145. type: String,
  65146. default: "#909193"
  65147. },
  65148. // 确认按钮的颜色
  65149. confirmColor: {
  65150. type: String,
  65151. default: "#3c9cff"
  65152. },
  65153. // 标题文字
  65154. title: {
  65155. type: String,
  65156. default: ""
  65157. }
  65158. },
  65159. methods: {
  65160. // 点击取消按钮
  65161. cancel() {
  65162. this.$emit("cancel");
  65163. },
  65164. // 点击确定按钮
  65165. confirm() {
  65166. this.$emit("confirm");
  65167. },
  65168. // 阻止事件冒泡
  65169. preventEvent(e2) {
  65170. e2 && typeof e2.stopPropagation === "function" && e2.stopPropagation();
  65171. },
  65172. // 空操作
  65173. noop(e2) {
  65174. this.preventEvent(e2);
  65175. }
  65176. }
  65177. };
  65178. function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) {
  65179. return $props.show ? (vue.openBlock(), vue.createElementBlock(
  65180. "view",
  65181. {
  65182. key: 0,
  65183. class: "u-toolbar",
  65184. onTouchmove: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.noop && $options.noop(...args), ["stop", "prevent"]))
  65185. },
  65186. [
  65187. vue.createElementVNode("view", {
  65188. class: "u-toolbar__cancel__wrapper",
  65189. "hover-class": "u-hover-class"
  65190. }, [
  65191. vue.createElementVNode(
  65192. "text",
  65193. {
  65194. class: "u-toolbar__wrapper__cancel",
  65195. onClick: _cache[0] || (_cache[0] = (...args) => $options.cancel && $options.cancel(...args)),
  65196. style: vue.normalizeStyle({
  65197. color: $props.cancelColor
  65198. })
  65199. },
  65200. vue.toDisplayString($props.cancelText),
  65201. 5
  65202. /* TEXT, STYLE */
  65203. )
  65204. ]),
  65205. $props.title ? (vue.openBlock(), vue.createElementBlock(
  65206. "text",
  65207. {
  65208. key: 0,
  65209. class: "u-toolbar__title u-line-1"
  65210. },
  65211. vue.toDisplayString($props.title),
  65212. 1
  65213. /* TEXT */
  65214. )) : vue.createCommentVNode("v-if", true),
  65215. vue.createElementVNode("view", {
  65216. class: "u-toolbar__confirm__wrapper",
  65217. "hover-class": "u-hover-class"
  65218. }, [
  65219. vue.createElementVNode(
  65220. "text",
  65221. {
  65222. class: "u-toolbar__wrapper__confirm",
  65223. onClick: _cache[1] || (_cache[1] = (...args) => $options.confirm && $options.confirm(...args)),
  65224. style: vue.normalizeStyle({
  65225. color: $props.confirmColor
  65226. })
  65227. },
  65228. vue.toDisplayString($props.confirmText),
  65229. 5
  65230. /* TEXT, STYLE */
  65231. )
  65232. ])
  65233. ],
  65234. 32
  65235. /* NEED_HYDRATION */
  65236. )) : vue.createCommentVNode("v-if", true);
  65237. }
  65238. const __easycom_0$4 = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["render", _sfc_render$16], ["__scopeId", "data-v-2c641e39"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/ui/su-toolbar/su-toolbar.vue"]]);
  65239. const _sfc_main$16 = {
  65240. __name: "su-region-picker",
  65241. props: {
  65242. show: {
  65243. type: Boolean,
  65244. default: false
  65245. },
  65246. // "取消"按钮的颜色
  65247. cancelColor: {
  65248. type: String,
  65249. default: "#6666"
  65250. },
  65251. // "确定"按钮的颜色
  65252. confirmColor: {
  65253. type: String,
  65254. default: "var(--ui-BG-Main)"
  65255. },
  65256. // 取消按钮的文字
  65257. cancelText: {
  65258. type: String,
  65259. default: t$6("common.cancel")
  65260. },
  65261. // 确认按钮的文字
  65262. confirmText: {
  65263. type: String,
  65264. default: t$6("common.confirm")
  65265. }
  65266. },
  65267. emits: ["confirm", "cancel", "change"],
  65268. setup(__props, { expose: __expose, emit: __emit }) {
  65269. __expose();
  65270. const props = __props;
  65271. const areaData = uni.getStorageSync("areaData");
  65272. const getSizeByNameLength = (name2) => {
  65273. let length = name2.length;
  65274. if (length <= 7)
  65275. return "";
  65276. if (length < 9) {
  65277. return "font-size:28rpx";
  65278. } else {
  65279. return "font-size: 24rpx";
  65280. }
  65281. };
  65282. const state = vue.reactive({
  65283. currentIndex: [0, 0, 0],
  65284. moving: false
  65285. // 列是否还在滑动中,微信小程序如果在滑动中就点确定,结果可能不准确
  65286. });
  65287. const emits = __emit;
  65288. const provinceList = areaData;
  65289. const cityList = vue.computed(() => {
  65290. return areaData[state.currentIndex[0]].children;
  65291. });
  65292. const districtList = vue.computed(() => {
  65293. var _a2;
  65294. return (_a2 = cityList.value[state.currentIndex[1]]) == null ? void 0 : _a2.children;
  65295. });
  65296. const pickstart = () => {
  65297. };
  65298. const pickend = () => {
  65299. };
  65300. const init = () => {
  65301. };
  65302. const onCancel = () => {
  65303. emits("cancel");
  65304. };
  65305. const change = (e2) => {
  65306. if (state.currentIndex[0] === e2.detail.value[0] && state.currentIndex[1] === e2.detail.value[1]) {
  65307. state.currentIndex[2] = e2.detail.value[2];
  65308. return;
  65309. } else {
  65310. if (state.currentIndex[0] !== e2.detail.value[0]) {
  65311. e2.detail.value[1] = 0;
  65312. }
  65313. e2.detail.value[2] = 0;
  65314. state.currentIndex = e2.detail.value;
  65315. }
  65316. emits("change", state.currentIndex);
  65317. };
  65318. const onConfirm = (event = null) => {
  65319. let index2 = state.currentIndex;
  65320. let province = provinceList[index2[0]];
  65321. let city = cityList.value[index2[1]];
  65322. let district = districtList.value[index2[2]];
  65323. let result2 = {
  65324. province_name: province.name,
  65325. province_id: province.id,
  65326. city_name: city.name,
  65327. city_id: city.id,
  65328. district_name: district.name,
  65329. district_id: district.id
  65330. };
  65331. if (event)
  65332. emits(event, result2);
  65333. };
  65334. const __returned__ = { props, areaData, getSizeByNameLength, state, emits, provinceList, cityList, districtList, pickstart, pickend, init, onCancel, change, onConfirm, computed: vue.computed, reactive: vue.reactive, get t() {
  65335. return t$6;
  65336. } };
  65337. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  65338. return __returned__;
  65339. }
  65340. };
  65341. function _sfc_render$15(_ctx, _cache, $props, $setup, $data, $options) {
  65342. const _component_su_toolbar = resolveEasycom(vue.resolveDynamicComponent("su-toolbar"), __easycom_0$4);
  65343. const _component_su_popup = resolveEasycom(vue.resolveDynamicComponent("su-popup"), __easycom_4$3);
  65344. return vue.openBlock(), vue.createBlock(_component_su_popup, {
  65345. show: $props.show,
  65346. onClose: $setup.onCancel,
  65347. round: "20"
  65348. }, {
  65349. default: vue.withCtx(() => [
  65350. vue.createElementVNode("view", { class: "ui-region-picker" }, [
  65351. vue.createVNode(_component_su_toolbar, {
  65352. cancelColor: $props.cancelColor,
  65353. confirmColor: $props.confirmColor,
  65354. cancelText: $props.cancelText,
  65355. confirmText: $props.confirmText,
  65356. title: $setup.t("common.select_area"),
  65357. onCancel: $setup.onCancel,
  65358. onConfirm: _cache[0] || (_cache[0] = ($event) => $setup.onConfirm("confirm"))
  65359. }, null, 8, ["cancelColor", "confirmColor", "cancelText", "confirmText", "title"]),
  65360. vue.createElementVNode("view", { class: "ui-picker-body" }, [
  65361. vue.createElementVNode("picker-view", {
  65362. value: $setup.state.currentIndex,
  65363. onChange: $setup.change,
  65364. class: "ui-picker-view",
  65365. onPickstart: $setup.pickstart,
  65366. onPickend: $setup.pickend
  65367. }, [
  65368. vue.createElementVNode("picker-view-column", null, [
  65369. (vue.openBlock(true), vue.createElementBlock(
  65370. vue.Fragment,
  65371. null,
  65372. vue.renderList($setup.provinceList, (province) => {
  65373. return vue.openBlock(), vue.createElementBlock("view", {
  65374. class: "ui-column-item",
  65375. key: province.id
  65376. }, [
  65377. vue.createElementVNode(
  65378. "view",
  65379. {
  65380. style: vue.normalizeStyle($setup.getSizeByNameLength(province.name))
  65381. },
  65382. vue.toDisplayString(province.name),
  65383. 5
  65384. /* TEXT, STYLE */
  65385. )
  65386. ]);
  65387. }),
  65388. 128
  65389. /* KEYED_FRAGMENT */
  65390. ))
  65391. ]),
  65392. vue.createElementVNode("picker-view-column", null, [
  65393. (vue.openBlock(true), vue.createElementBlock(
  65394. vue.Fragment,
  65395. null,
  65396. vue.renderList($setup.cityList, (city) => {
  65397. return vue.openBlock(), vue.createElementBlock("view", {
  65398. class: "ui-column-item",
  65399. key: city.id
  65400. }, [
  65401. vue.createElementVNode(
  65402. "view",
  65403. {
  65404. style: vue.normalizeStyle($setup.getSizeByNameLength(city.name))
  65405. },
  65406. vue.toDisplayString(city.name),
  65407. 5
  65408. /* TEXT, STYLE */
  65409. )
  65410. ]);
  65411. }),
  65412. 128
  65413. /* KEYED_FRAGMENT */
  65414. ))
  65415. ]),
  65416. vue.createElementVNode("picker-view-column", null, [
  65417. (vue.openBlock(true), vue.createElementBlock(
  65418. vue.Fragment,
  65419. null,
  65420. vue.renderList($setup.districtList, (district) => {
  65421. return vue.openBlock(), vue.createElementBlock("view", {
  65422. class: "ui-column-item",
  65423. key: district.id
  65424. }, [
  65425. vue.createElementVNode(
  65426. "view",
  65427. {
  65428. style: vue.normalizeStyle($setup.getSizeByNameLength(district.name))
  65429. },
  65430. vue.toDisplayString(district.name),
  65431. 5
  65432. /* TEXT, STYLE */
  65433. )
  65434. ]);
  65435. }),
  65436. 128
  65437. /* KEYED_FRAGMENT */
  65438. ))
  65439. ])
  65440. ], 40, ["value"])
  65441. ])
  65442. ])
  65443. ]),
  65444. _: 1
  65445. /* STABLE */
  65446. }, 8, ["show"]);
  65447. }
  65448. const __easycom_5 = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["render", _sfc_render$15], ["__scopeId", "data-v-124df58f"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/ui/su-region-picker/su-region-picker.vue"]]);
  65449. const _sfc_main$15 = {
  65450. __name: "edit",
  65451. setup(__props, { expose: __expose }) {
  65452. __expose();
  65453. const addressFormRef = vue.ref(null);
  65454. const state = vue.reactive({
  65455. showRegion: false,
  65456. model: {
  65457. name: "",
  65458. mobile: "",
  65459. detailAddress: "",
  65460. defaultStatus: false,
  65461. areaName: ""
  65462. },
  65463. rules: {}
  65464. });
  65465. const rules2 = {
  65466. name: {
  65467. rules: [{
  65468. required: true,
  65469. errorMessage: t$6("address.enter_recipient_name")
  65470. }]
  65471. },
  65472. mobile,
  65473. detailAddress: {
  65474. rules: [{
  65475. required: true,
  65476. errorMessage: t$6("address.enter_detailed_address")
  65477. }]
  65478. },
  65479. areaName: {
  65480. rules: [{
  65481. required: true,
  65482. errorMessage: t$6("address.select_province_city_district")
  65483. }]
  65484. }
  65485. };
  65486. const onRegionConfirm = (e2) => {
  65487. state.model.areaName = `${e2.province_name} ${e2.city_name} ${e2.district_name}`;
  65488. state.model.areaId = e2.district_id;
  65489. state.showRegion = false;
  65490. };
  65491. const getAreaData = () => {
  65492. if (_$1.isEmpty(uni.getStorageSync("areaData"))) {
  65493. AreaApi.getAreaTree().then((res) => {
  65494. if (res.code === 0) {
  65495. uni.setStorageSync("areaData", res.data);
  65496. }
  65497. });
  65498. }
  65499. };
  65500. const onSave = async () => {
  65501. formatAppLog("log", "at pages/user/address/edit.vue:128", state);
  65502. const validate = await vue.unref(addressFormRef).validate().catch((error2) => {
  65503. formatAppLog("log", "at pages/user/address/edit.vue:133", "error: ", error2);
  65504. });
  65505. if (!validate) {
  65506. return;
  65507. }
  65508. const formData = {
  65509. ...state.model
  65510. };
  65511. const {
  65512. code: code2
  65513. } = state.model.id > 0 ? await AddressApi.updateAddress(formData) : await AddressApi.createAddress(formData);
  65514. if (code2 === 0) {
  65515. sheep$1.$router.back();
  65516. }
  65517. };
  65518. const onDelete = () => {
  65519. uni.showModal({
  65520. title: t$6("setting.prompt"),
  65521. content: t$6("address.confirm_delete_address"),
  65522. success: async function(res) {
  65523. if (!res.confirm) {
  65524. return;
  65525. }
  65526. const {
  65527. code: code2
  65528. } = await AddressApi.deleteAddress(state.model.id);
  65529. if (code2 === 0) {
  65530. sheep$1.$router.back();
  65531. }
  65532. }
  65533. });
  65534. };
  65535. onLoad(async (options2) => {
  65536. getAreaData();
  65537. if (options2.id) {
  65538. let {
  65539. code: code2,
  65540. data
  65541. } = await AddressApi.getAddress(options2.id);
  65542. if (code2 !== 0) {
  65543. return;
  65544. }
  65545. state.model = data;
  65546. }
  65547. if (options2.data) {
  65548. let data = JSON.parse(options2.data);
  65549. const areaData = uni.getStorageSync("areaData");
  65550. let provinceArr = areaData.filter((item) => item.name == data.province_name);
  65551. data.province_id = provinceArr[0].id;
  65552. let provinceArr2 = provinceArr[0].children.filter((item) => item.name == data.city_name);
  65553. data.city_id = provinceArr2[0].id;
  65554. let provinceArr3 = provinceArr2[0].children.filter((item) => item.name == data.district_name);
  65555. data.district_id = provinceArr3[0].id;
  65556. state.model = {
  65557. name: data.consignee,
  65558. mobile: data.mobile,
  65559. detailAddress: data.address,
  65560. defaultStatus: data.is_default,
  65561. areaName: data.province_name + " " + data.city_name + " " + data.district_name,
  65562. areaId: data.district_id
  65563. };
  65564. }
  65565. });
  65566. const __returned__ = { addressFormRef, state, rules: rules2, onRegionConfirm, getAreaData, onSave, onDelete, ref: vue.ref, reactive: vue.reactive, unref: vue.unref, get sheep() {
  65567. return sheep$1;
  65568. }, get onLoad() {
  65569. return onLoad;
  65570. }, get _() {
  65571. return _$1;
  65572. }, get mobile() {
  65573. return mobile;
  65574. }, get AreaApi() {
  65575. return AreaApi;
  65576. }, get AddressApi() {
  65577. return AddressApi;
  65578. }, get $helper() {
  65579. return $helper;
  65580. }, get t() {
  65581. return t$6;
  65582. } };
  65583. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  65584. return __returned__;
  65585. }
  65586. };
  65587. function _sfc_render$14(_ctx, _cache, $props, $setup, $data, $options) {
  65588. const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l);
  65589. const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9);
  65590. const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$b);
  65591. const _component_su_switch = resolveEasycom(vue.resolveDynamicComponent("su-switch"), __easycom_2);
  65592. const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7);
  65593. const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9);
  65594. const _component_su_region_picker = resolveEasycom(vue.resolveDynamicComponent("su-region-picker"), __easycom_5);
  65595. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  65596. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  65597. title: $setup.state.model.id ? $setup.t("address.edit_address") : $setup.t("address.add_address")
  65598. }, {
  65599. default: vue.withCtx(() => [
  65600. vue.createVNode(_component_uni_forms, {
  65601. ref: "addressFormRef",
  65602. modelValue: $setup.state.model,
  65603. "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $setup.state.model = $event),
  65604. rules: $setup.rules,
  65605. validateTrigger: "bind",
  65606. labelWidth: "160",
  65607. labelAlign: "left",
  65608. border: "",
  65609. labelStyle: { fontWeight: "bold" }
  65610. }, {
  65611. default: vue.withCtx(() => [
  65612. vue.createElementVNode("view", { class: "bg-white form-box ss-p-x-30" }, [
  65613. vue.createVNode(_component_uni_forms_item, {
  65614. name: "name",
  65615. label: $setup.t("address.recipient"),
  65616. class: "form-item"
  65617. }, {
  65618. default: vue.withCtx(() => [
  65619. vue.createVNode(_component_uni_easyinput, {
  65620. modelValue: $setup.state.model.name,
  65621. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.state.model.name = $event),
  65622. placeholder: $setup.t("address.enter_recipient_name"),
  65623. inputBorder: false,
  65624. placeholderStyle: "color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal",
  65625. maxlength: 10
  65626. }, null, 8, ["modelValue", "placeholder"])
  65627. ]),
  65628. _: 1
  65629. /* STABLE */
  65630. }, 8, ["label"]),
  65631. vue.createVNode(_component_uni_forms_item, {
  65632. name: "mobile",
  65633. label: $setup.t("account.phone_number"),
  65634. class: "form-item"
  65635. }, {
  65636. default: vue.withCtx(() => [
  65637. vue.createVNode(_component_uni_easyinput, {
  65638. modelValue: $setup.state.model.mobile,
  65639. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.model.mobile = $event),
  65640. type: "number",
  65641. placeholder: $setup.t("account.enter_phone_number"),
  65642. inputBorder: false,
  65643. placeholderStyle: "color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal"
  65644. }, null, 8, ["modelValue", "placeholder"])
  65645. ]),
  65646. _: 1
  65647. /* STABLE */
  65648. }, 8, ["label"]),
  65649. vue.createVNode(_component_uni_forms_item, {
  65650. name: "areaName",
  65651. label: $setup.t("address.province_city_district"),
  65652. onClick: _cache[3] || (_cache[3] = ($event) => $setup.state.showRegion = true),
  65653. class: "form-item"
  65654. }, {
  65655. default: vue.withCtx(() => [
  65656. vue.createVNode(_component_uni_easyinput, {
  65657. modelValue: $setup.state.model.areaName,
  65658. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.model.areaName = $event),
  65659. disabled: "",
  65660. inputBorder: false,
  65661. styles: { disableColor: "#fff", color: "#333" },
  65662. placeholderStyle: "color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal",
  65663. placeholder: $setup.t("address.select_province_city_district")
  65664. }, {
  65665. right: vue.withCtx(() => [
  65666. vue.createVNode(_component_uni_icons, { type: "right" })
  65667. ]),
  65668. _: 1
  65669. /* STABLE */
  65670. }, 8, ["modelValue", "placeholder"])
  65671. ]),
  65672. _: 1
  65673. /* STABLE */
  65674. }, 8, ["label"]),
  65675. vue.createVNode(_component_uni_forms_item, {
  65676. name: "detailAddress",
  65677. label: $setup.t("address.detailed_address"),
  65678. formItemStyle: { alignItems: "flex-start" },
  65679. labelStyle: { lineHeight: "5em" },
  65680. class: "textarea-item"
  65681. }, {
  65682. default: vue.withCtx(() => [
  65683. vue.createVNode(_component_uni_easyinput, {
  65684. inputBorder: false,
  65685. type: "textarea",
  65686. modelValue: $setup.state.model.detailAddress,
  65687. "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.state.model.detailAddress = $event),
  65688. placeholderStyle: "color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal",
  65689. placeholder: $setup.t("address.enter_detailed_address"),
  65690. clearable: ""
  65691. }, null, 8, ["modelValue", "placeholder"])
  65692. ]),
  65693. _: 1
  65694. /* STABLE */
  65695. }, 8, ["label"])
  65696. ]),
  65697. vue.createElementVNode("view", { class: "ss-m-y-20 bg-white ss-p-x-30 ss-flex ss-row-between ss-col-center default-box" }, [
  65698. vue.createElementVNode(
  65699. "view",
  65700. { class: "default-box-title" },
  65701. vue.toDisplayString($setup.t("address.set_as_default_address")),
  65702. 1
  65703. /* TEXT */
  65704. ),
  65705. vue.createVNode(_component_su_switch, {
  65706. style: { "transform": "scale(0.8)" },
  65707. modelValue: $setup.state.model.defaultStatus,
  65708. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $setup.state.model.defaultStatus = $event)
  65709. }, null, 8, ["modelValue"])
  65710. ])
  65711. ]),
  65712. _: 1
  65713. /* STABLE */
  65714. }, 8, ["modelValue"]),
  65715. vue.createVNode(_component_su_fixed, {
  65716. bottom: "",
  65717. opacity: false,
  65718. bg: "",
  65719. placeholder: "",
  65720. noFixed: false,
  65721. index: 10
  65722. }, {
  65723. default: vue.withCtx(() => [
  65724. vue.createElementVNode("view", { class: "footer-box ss-flex-col ss-row-between ss-p-20" }, [
  65725. vue.createElementVNode("view", { class: "ss-m-b-20" }, [
  65726. vue.createElementVNode(
  65727. "button",
  65728. {
  65729. class: "ss-reset-button save-btn ui-Shadow-Main",
  65730. onClick: $setup.onSave
  65731. },
  65732. vue.toDisplayString($setup.t("common.save")),
  65733. 1
  65734. /* TEXT */
  65735. )
  65736. ]),
  65737. $setup.state.model.id ? (vue.openBlock(), vue.createElementBlock(
  65738. "button",
  65739. {
  65740. key: 0,
  65741. class: "ss-reset-button cancel-btn",
  65742. onClick: $setup.onDelete
  65743. },
  65744. vue.toDisplayString($setup.t("common.delete")),
  65745. 1
  65746. /* TEXT */
  65747. )) : vue.createCommentVNode("v-if", true)
  65748. ])
  65749. ]),
  65750. _: 1
  65751. /* STABLE */
  65752. }),
  65753. vue.createCommentVNode(" 省市区弹窗 "),
  65754. vue.createVNode(_component_su_region_picker, {
  65755. show: $setup.state.showRegion,
  65756. onCancel: _cache[7] || (_cache[7] = ($event) => $setup.state.showRegion = false),
  65757. onConfirm: $setup.onRegionConfirm
  65758. }, null, 8, ["show"])
  65759. ]),
  65760. _: 1
  65761. /* STABLE */
  65762. }, 8, ["title"]);
  65763. }
  65764. const PagesUserAddressEdit = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["render", _sfc_render$14], ["__scopeId", "data-v-e04c42e1"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/address/edit.vue"]]);
  65765. const _sfc_main$14 = {
  65766. __name: "edit",
  65767. setup(__props, { expose: __expose }) {
  65768. __expose();
  65769. const addressFormRef = vue.ref(null);
  65770. const state = vue.reactive({
  65771. showRegion: false,
  65772. model: {
  65773. name: "",
  65774. mobile: "",
  65775. detailAddress: "",
  65776. defaultStatus: false,
  65777. areaName: "",
  65778. addressType: 2
  65779. },
  65780. rules: {}
  65781. });
  65782. const rules2 = {
  65783. name: {
  65784. rules: [{
  65785. required: true,
  65786. errorMessage: t$6("address.enter_recipient_name")
  65787. }]
  65788. },
  65789. mobile,
  65790. detailAddress: {
  65791. rules: [{
  65792. required: true,
  65793. errorMessage: t$6("address.enter_detailed_address")
  65794. }]
  65795. }
  65796. };
  65797. const onRegionConfirm = (e2) => {
  65798. state.model.areaName = `${e2.province_name} ${e2.city_name} ${e2.district_name}`;
  65799. state.model.areaId = e2.district_id;
  65800. state.showRegion = false;
  65801. };
  65802. const getAreaData = () => {
  65803. if (_$1.isEmpty(uni.getStorageSync("areaData"))) {
  65804. AreaApi.getAreaTree().then((res) => {
  65805. if (res.code === 0) {
  65806. uni.setStorageSync("areaData", res.data);
  65807. }
  65808. });
  65809. }
  65810. };
  65811. const onSave = async () => {
  65812. formatAppLog("log", "at pages/user/dummyAddress/edit.vue:116", state);
  65813. const validate = await vue.unref(addressFormRef).validate().catch((error2) => {
  65814. formatAppLog("log", "at pages/user/dummyAddress/edit.vue:121", "error: ", error2);
  65815. });
  65816. if (!validate) {
  65817. return;
  65818. }
  65819. const formData = {
  65820. ...state.model
  65821. };
  65822. const {
  65823. code: code2
  65824. } = state.model.id > 0 ? await AddressApi.updateAddress(formData) : await AddressApi.createAddress(formData);
  65825. if (code2 === 0) {
  65826. sheep$1.$router.back();
  65827. }
  65828. };
  65829. const onDelete = () => {
  65830. uni.showModal({
  65831. title: t$6("setting.prompt"),
  65832. content: t$6("address.confirm_delete_address"),
  65833. success: async function(res) {
  65834. if (!res.confirm) {
  65835. return;
  65836. }
  65837. const {
  65838. code: code2
  65839. } = await AddressApi.deleteAddress(state.model.id, 2);
  65840. if (code2 === 0) {
  65841. sheep$1.$router.back();
  65842. }
  65843. }
  65844. });
  65845. };
  65846. onLoad(async (options2) => {
  65847. getAreaData();
  65848. if (options2.id) {
  65849. let {
  65850. code: code2,
  65851. data
  65852. } = await AddressApi.getAddress(options2.id, 2);
  65853. if (code2 !== 0) {
  65854. return;
  65855. }
  65856. state.model = data;
  65857. }
  65858. if (options2.data) {
  65859. let data = JSON.parse(options2.data);
  65860. const areaData = uni.getStorageSync("areaData");
  65861. let provinceArr = areaData.filter((item) => item.name == data.province_name);
  65862. data.province_id = provinceArr[0].id;
  65863. let provinceArr2 = provinceArr[0].children.filter((item) => item.name == data.city_name);
  65864. data.city_id = provinceArr2[0].id;
  65865. let provinceArr3 = provinceArr2[0].children.filter((item) => item.name == data.district_name);
  65866. data.district_id = provinceArr3[0].id;
  65867. state.model = {
  65868. name: data.consignee,
  65869. mobile: data.mobile,
  65870. detailAddress: data.address,
  65871. defaultStatus: data.is_default,
  65872. areaName: data.province_name + " " + data.city_name + " " + data.district_name,
  65873. areaId: data.district_id
  65874. };
  65875. }
  65876. });
  65877. const __returned__ = { addressFormRef, state, rules: rules2, onRegionConfirm, getAreaData, onSave, onDelete, ref: vue.ref, reactive: vue.reactive, unref: vue.unref, get sheep() {
  65878. return sheep$1;
  65879. }, get onLoad() {
  65880. return onLoad;
  65881. }, get _() {
  65882. return _$1;
  65883. }, get mobile() {
  65884. return mobile;
  65885. }, get AreaApi() {
  65886. return AreaApi;
  65887. }, get AddressApi() {
  65888. return AddressApi;
  65889. }, get $helper() {
  65890. return $helper;
  65891. }, get t() {
  65892. return t$6;
  65893. } };
  65894. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  65895. return __returned__;
  65896. }
  65897. };
  65898. function _sfc_render$13(_ctx, _cache, $props, $setup, $data, $options) {
  65899. const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l);
  65900. const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9);
  65901. const _component_su_switch = resolveEasycom(vue.resolveDynamicComponent("su-switch"), __easycom_2);
  65902. const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7);
  65903. const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9);
  65904. const _component_su_region_picker = resolveEasycom(vue.resolveDynamicComponent("su-region-picker"), __easycom_5);
  65905. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  65906. return vue.openBlock(), vue.createElementBlock(
  65907. vue.Fragment,
  65908. null,
  65909. [
  65910. vue.createCommentVNode(" {{ru}} "),
  65911. vue.createVNode(_component_s_layout, {
  65912. title: $setup.state.model.id ? $setup.t("address.edit_virtual_address") : $setup.t("address.add_virtual_address")
  65913. }, {
  65914. default: vue.withCtx(() => [
  65915. vue.createVNode(_component_uni_forms, {
  65916. ref: "addressFormRef",
  65917. modelValue: $setup.state.model,
  65918. "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.state.model = $event),
  65919. rules: $setup.rules,
  65920. validateTrigger: "bind",
  65921. labelWidth: "160",
  65922. labelAlign: "left",
  65923. border: "",
  65924. labelStyle: { fontWeight: "bold" }
  65925. }, {
  65926. default: vue.withCtx(() => [
  65927. vue.createElementVNode("view", { class: "bg-white form-box ss-p-x-30" }, [
  65928. vue.createVNode(_component_uni_forms_item, {
  65929. name: "name",
  65930. label: $setup.t("address.recipient"),
  65931. class: "form-item"
  65932. }, {
  65933. default: vue.withCtx(() => [
  65934. vue.createVNode(_component_uni_easyinput, {
  65935. modelValue: $setup.state.model.name,
  65936. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.state.model.name = $event),
  65937. placeholder: $setup.t("address.enter_recipient_name"),
  65938. inputBorder: false,
  65939. placeholderStyle: "color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal",
  65940. maxlength: 10
  65941. }, null, 8, ["modelValue", "placeholder"])
  65942. ]),
  65943. _: 1
  65944. /* STABLE */
  65945. }, 8, ["label"]),
  65946. vue.createVNode(_component_uni_forms_item, {
  65947. name: "mobile",
  65948. label: $setup.t("account.phone_number"),
  65949. class: "form-item"
  65950. }, {
  65951. default: vue.withCtx(() => [
  65952. vue.createVNode(_component_uni_easyinput, {
  65953. modelValue: $setup.state.model.mobile,
  65954. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.model.mobile = $event),
  65955. type: "number",
  65956. placeholder: $setup.t("account.enter_phone_number"),
  65957. inputBorder: false,
  65958. placeholderStyle: "color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal"
  65959. }, null, 8, ["modelValue", "placeholder"])
  65960. ]),
  65961. _: 1
  65962. /* STABLE */
  65963. }, 8, ["label"]),
  65964. vue.createVNode(_component_uni_forms_item, {
  65965. name: "detailAddress",
  65966. label: $setup.t("address.detailed_address"),
  65967. formItemStyle: { alignItems: "flex-start" },
  65968. labelStyle: { lineHeight: "5em" },
  65969. class: "textarea-item"
  65970. }, {
  65971. default: vue.withCtx(() => [
  65972. vue.createVNode(_component_uni_easyinput, {
  65973. inputBorder: false,
  65974. type: "textarea",
  65975. modelValue: $setup.state.model.detailAddress,
  65976. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.model.detailAddress = $event),
  65977. placeholderStyle: "color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal",
  65978. placeholder: $setup.t("address.enter_detailed_address"),
  65979. clearable: ""
  65980. }, null, 8, ["modelValue", "placeholder"])
  65981. ]),
  65982. _: 1
  65983. /* STABLE */
  65984. }, 8, ["label"])
  65985. ]),
  65986. vue.createElementVNode("view", { class: "ss-m-y-20 bg-white ss-p-x-30 ss-flex ss-row-between ss-col-center default-box" }, [
  65987. vue.createElementVNode(
  65988. "view",
  65989. { class: "default-box-title" },
  65990. vue.toDisplayString($setup.t("address.set_as_default_virtual_address")),
  65991. 1
  65992. /* TEXT */
  65993. ),
  65994. vue.createVNode(_component_su_switch, {
  65995. style: { "transform": "scale(0.8)" },
  65996. modelValue: $setup.state.model.defaultStatus,
  65997. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.state.model.defaultStatus = $event)
  65998. }, null, 8, ["modelValue"])
  65999. ])
  66000. ]),
  66001. _: 1
  66002. /* STABLE */
  66003. }, 8, ["modelValue"]),
  66004. vue.createVNode(_component_su_fixed, {
  66005. bottom: "",
  66006. opacity: false,
  66007. bg: "",
  66008. placeholder: "",
  66009. noFixed: false,
  66010. index: 10
  66011. }, {
  66012. default: vue.withCtx(() => [
  66013. vue.createElementVNode("view", { class: "footer-box ss-flex-col ss-row-between ss-p-20" }, [
  66014. vue.createElementVNode("view", { class: "ss-m-b-20" }, [
  66015. vue.createElementVNode(
  66016. "button",
  66017. {
  66018. class: "ss-reset-button save-btn ui-Shadow-Main",
  66019. onClick: $setup.onSave
  66020. },
  66021. vue.toDisplayString($setup.t("common.save")),
  66022. 1
  66023. /* TEXT */
  66024. )
  66025. ]),
  66026. $setup.state.model.id ? (vue.openBlock(), vue.createElementBlock(
  66027. "button",
  66028. {
  66029. key: 0,
  66030. class: "ss-reset-button cancel-btn",
  66031. onClick: $setup.onDelete
  66032. },
  66033. vue.toDisplayString($setup.t("common.delete")),
  66034. 1
  66035. /* TEXT */
  66036. )) : vue.createCommentVNode("v-if", true)
  66037. ])
  66038. ]),
  66039. _: 1
  66040. /* STABLE */
  66041. }),
  66042. vue.createCommentVNode(" 省市区弹窗 "),
  66043. vue.createVNode(_component_su_region_picker, {
  66044. show: $setup.state.showRegion,
  66045. onCancel: _cache[5] || (_cache[5] = ($event) => $setup.state.showRegion = false),
  66046. onConfirm: $setup.onRegionConfirm
  66047. }, null, 8, ["show"])
  66048. ]),
  66049. _: 1
  66050. /* STABLE */
  66051. }, 8, ["title"])
  66052. ],
  66053. 2112
  66054. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  66055. );
  66056. }
  66057. const PagesUserDummyAddressEdit = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["render", _sfc_render$13], ["__scopeId", "data-v-bc658567"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/dummyAddress/edit.vue"]]);
  66058. class Calendar {
  66059. constructor({
  66060. date: date2,
  66061. selected,
  66062. startDate,
  66063. endDate,
  66064. range: range2
  66065. // multipleStatus
  66066. } = {}) {
  66067. this.date = this.getDate(/* @__PURE__ */ new Date());
  66068. this.selected = selected || [];
  66069. this.startDate = startDate;
  66070. this.endDate = endDate;
  66071. this.range = range2;
  66072. this.cleanMultipleStatus();
  66073. this.weeks = {};
  66074. this.lastHover = false;
  66075. }
  66076. /**
  66077. * 设置日期
  66078. * @param {Object} date
  66079. */
  66080. setDate(date2) {
  66081. this.selectDate = this.getDate(date2);
  66082. this._getWeek(this.selectDate.fullDate);
  66083. }
  66084. /**
  66085. * 清理多选状态
  66086. */
  66087. cleanMultipleStatus() {
  66088. this.multipleStatus = {
  66089. before: "",
  66090. after: "",
  66091. data: []
  66092. };
  66093. }
  66094. /**
  66095. * 重置开始日期
  66096. */
  66097. resetSatrtDate(startDate) {
  66098. this.startDate = startDate;
  66099. }
  66100. /**
  66101. * 重置结束日期
  66102. */
  66103. resetEndDate(endDate) {
  66104. this.endDate = endDate;
  66105. }
  66106. /**
  66107. * 获取任意时间
  66108. */
  66109. getDate(date2, AddDayCount = 0, str = "day") {
  66110. if (!date2) {
  66111. date2 = /* @__PURE__ */ new Date();
  66112. }
  66113. if (typeof date2 !== "object") {
  66114. date2 = date2.replace(/-/g, "/");
  66115. }
  66116. const dd = new Date(date2);
  66117. switch (str) {
  66118. case "day":
  66119. dd.setDate(dd.getDate() + AddDayCount);
  66120. break;
  66121. case "month":
  66122. if (dd.getDate() === 31) {
  66123. dd.setDate(dd.getDate() + AddDayCount);
  66124. } else {
  66125. dd.setMonth(dd.getMonth() + AddDayCount);
  66126. }
  66127. break;
  66128. case "year":
  66129. dd.setFullYear(dd.getFullYear() + AddDayCount);
  66130. break;
  66131. }
  66132. const y2 = dd.getFullYear();
  66133. const m2 = dd.getMonth() + 1 < 10 ? "0" + (dd.getMonth() + 1) : dd.getMonth() + 1;
  66134. const d2 = dd.getDate() < 10 ? "0" + dd.getDate() : dd.getDate();
  66135. return {
  66136. fullDate: y2 + "-" + m2 + "-" + d2,
  66137. year: y2,
  66138. month: m2,
  66139. date: d2,
  66140. day: dd.getDay()
  66141. };
  66142. }
  66143. /**
  66144. * 获取上月剩余天数
  66145. */
  66146. _getLastMonthDays(firstDay, full) {
  66147. let dateArr = [];
  66148. for (let i2 = firstDay; i2 > 0; i2--) {
  66149. const beforeDate = new Date(full.year, full.month - 1, -i2 + 1).getDate();
  66150. dateArr.push({
  66151. date: beforeDate,
  66152. month: full.month - 1,
  66153. disable: true
  66154. });
  66155. }
  66156. return dateArr;
  66157. }
  66158. /**
  66159. * 获取本月天数
  66160. */
  66161. _currentMonthDys(dateData, full) {
  66162. let dateArr = [];
  66163. let fullDate = this.date.fullDate;
  66164. for (let i2 = 1; i2 <= dateData; i2++) {
  66165. let nowDate = full.year + "-" + (full.month < 10 ? full.month : full.month) + "-" + (i2 < 10 ? "0" + i2 : i2);
  66166. let isDay = fullDate === nowDate;
  66167. let info = this.selected && this.selected.find((item) => {
  66168. if (this.dateEqual(nowDate, item.date)) {
  66169. return item;
  66170. }
  66171. });
  66172. let disableBefore = true;
  66173. let disableAfter = true;
  66174. if (this.startDate) {
  66175. disableBefore = this.dateCompare(this.startDate, nowDate);
  66176. }
  66177. if (this.endDate) {
  66178. disableAfter = this.dateCompare(nowDate, this.endDate);
  66179. }
  66180. let multiples = this.multipleStatus.data;
  66181. let checked = false;
  66182. let multiplesStatus = -1;
  66183. if (this.range) {
  66184. if (multiples) {
  66185. multiplesStatus = multiples.findIndex((item) => {
  66186. return this.dateEqual(item, nowDate);
  66187. });
  66188. }
  66189. if (multiplesStatus !== -1) {
  66190. checked = true;
  66191. }
  66192. }
  66193. let data = {
  66194. fullDate: nowDate,
  66195. year: full.year,
  66196. date: i2,
  66197. multiple: this.range ? checked : false,
  66198. beforeMultiple: this.isLogicBefore(nowDate, this.multipleStatus.before, this.multipleStatus.after),
  66199. afterMultiple: this.isLogicAfter(nowDate, this.multipleStatus.before, this.multipleStatus.after),
  66200. month: full.month,
  66201. disable: !(disableBefore && disableAfter),
  66202. isDay,
  66203. userChecked: false
  66204. };
  66205. if (info) {
  66206. data.extraInfo = info;
  66207. }
  66208. dateArr.push(data);
  66209. }
  66210. return dateArr;
  66211. }
  66212. /**
  66213. * 获取下月天数
  66214. */
  66215. _getNextMonthDays(surplus, full) {
  66216. let dateArr = [];
  66217. for (let i2 = 1; i2 < surplus + 1; i2++) {
  66218. dateArr.push({
  66219. date: i2,
  66220. month: Number(full.month) + 1,
  66221. disable: true
  66222. });
  66223. }
  66224. return dateArr;
  66225. }
  66226. /**
  66227. * 获取当前日期详情
  66228. * @param {Object} date
  66229. */
  66230. getInfo(date2) {
  66231. if (!date2) {
  66232. date2 = /* @__PURE__ */ new Date();
  66233. }
  66234. const dateInfo = this.canlender.find((item) => item.fullDate === this.getDate(date2).fullDate);
  66235. return dateInfo;
  66236. }
  66237. /**
  66238. * 比较时间大小
  66239. */
  66240. dateCompare(startDate, endDate) {
  66241. startDate = new Date(startDate.replace("-", "/").replace("-", "/"));
  66242. endDate = new Date(endDate.replace("-", "/").replace("-", "/"));
  66243. if (startDate <= endDate) {
  66244. return true;
  66245. } else {
  66246. return false;
  66247. }
  66248. }
  66249. /**
  66250. * 比较时间是否相等
  66251. */
  66252. dateEqual(before, after) {
  66253. before = new Date(before.replace("-", "/").replace("-", "/"));
  66254. after = new Date(after.replace("-", "/").replace("-", "/"));
  66255. if (before.getTime() - after.getTime() === 0) {
  66256. return true;
  66257. } else {
  66258. return false;
  66259. }
  66260. }
  66261. /**
  66262. * 比较真实起始日期
  66263. */
  66264. isLogicBefore(currentDay, before, after) {
  66265. let logicBefore = before;
  66266. if (before && after) {
  66267. logicBefore = this.dateCompare(before, after) ? before : after;
  66268. }
  66269. return this.dateEqual(logicBefore, currentDay);
  66270. }
  66271. isLogicAfter(currentDay, before, after) {
  66272. let logicAfter = after;
  66273. if (before && after) {
  66274. logicAfter = this.dateCompare(before, after) ? after : before;
  66275. }
  66276. return this.dateEqual(logicAfter, currentDay);
  66277. }
  66278. /**
  66279. * 获取日期范围内所有日期
  66280. * @param {Object} begin
  66281. * @param {Object} end
  66282. */
  66283. geDateAll(begin, end) {
  66284. var arr = [];
  66285. var ab = begin.split("-");
  66286. var ae2 = end.split("-");
  66287. var db = /* @__PURE__ */ new Date();
  66288. db.setFullYear(ab[0], ab[1] - 1, ab[2]);
  66289. var de2 = /* @__PURE__ */ new Date();
  66290. de2.setFullYear(ae2[0], ae2[1] - 1, ae2[2]);
  66291. var unixDb = db.getTime() - 24 * 60 * 60 * 1e3;
  66292. var unixDe = de2.getTime() - 24 * 60 * 60 * 1e3;
  66293. for (var k = unixDb; k <= unixDe; ) {
  66294. k = k + 24 * 60 * 60 * 1e3;
  66295. arr.push(this.getDate(new Date(parseInt(k))).fullDate);
  66296. }
  66297. return arr;
  66298. }
  66299. /**
  66300. * 获取多选状态
  66301. */
  66302. setMultiple(fullDate) {
  66303. let {
  66304. before,
  66305. after
  66306. } = this.multipleStatus;
  66307. if (!this.range)
  66308. return;
  66309. if (before && after) {
  66310. if (!this.lastHover) {
  66311. this.lastHover = true;
  66312. return;
  66313. }
  66314. this.multipleStatus.before = fullDate;
  66315. this.multipleStatus.after = "";
  66316. this.multipleStatus.data = [];
  66317. this.multipleStatus.fulldate = "";
  66318. this.lastHover = false;
  66319. } else {
  66320. if (!before) {
  66321. this.multipleStatus.before = fullDate;
  66322. this.lastHover = false;
  66323. } else {
  66324. this.multipleStatus.after = fullDate;
  66325. if (this.dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
  66326. this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after);
  66327. } else {
  66328. this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before);
  66329. }
  66330. this.lastHover = true;
  66331. }
  66332. }
  66333. this._getWeek(fullDate);
  66334. }
  66335. /**
  66336. * 鼠标 hover 更新多选状态
  66337. */
  66338. setHoverMultiple(fullDate) {
  66339. let {
  66340. before,
  66341. after
  66342. } = this.multipleStatus;
  66343. if (!this.range)
  66344. return;
  66345. if (this.lastHover)
  66346. return;
  66347. if (!before) {
  66348. this.multipleStatus.before = fullDate;
  66349. } else {
  66350. this.multipleStatus.after = fullDate;
  66351. if (this.dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
  66352. this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after);
  66353. } else {
  66354. this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before);
  66355. }
  66356. }
  66357. this._getWeek(fullDate);
  66358. }
  66359. /**
  66360. * 更新默认值多选状态
  66361. */
  66362. setDefaultMultiple(before, after) {
  66363. this.multipleStatus.before = before;
  66364. this.multipleStatus.after = after;
  66365. if (before && after) {
  66366. if (this.dateCompare(before, after)) {
  66367. this.multipleStatus.data = this.geDateAll(before, after);
  66368. this._getWeek(after);
  66369. } else {
  66370. this.multipleStatus.data = this.geDateAll(after, before);
  66371. this._getWeek(before);
  66372. }
  66373. }
  66374. }
  66375. /**
  66376. * 获取每周数据
  66377. * @param {Object} dateData
  66378. */
  66379. _getWeek(dateData) {
  66380. const {
  66381. fullDate,
  66382. year,
  66383. month,
  66384. date: date2,
  66385. day
  66386. } = this.getDate(dateData);
  66387. let firstDay = new Date(year, month - 1, 1).getDay();
  66388. let currentDay = new Date(year, month, 0).getDate();
  66389. let dates = {
  66390. lastMonthDays: this._getLastMonthDays(firstDay, this.getDate(dateData)),
  66391. // 上个月末尾几天
  66392. currentMonthDys: this._currentMonthDys(currentDay, this.getDate(dateData)),
  66393. // 本月天数
  66394. nextMonthDays: [],
  66395. // 下个月开始几天
  66396. weeks: []
  66397. };
  66398. let canlender = [];
  66399. const surplus = 42 - (dates.lastMonthDays.length + dates.currentMonthDys.length);
  66400. dates.nextMonthDays = this._getNextMonthDays(surplus, this.getDate(dateData));
  66401. canlender = canlender.concat(dates.lastMonthDays, dates.currentMonthDys, dates.nextMonthDays);
  66402. let weeks = {};
  66403. for (let i2 = 0; i2 < canlender.length; i2++) {
  66404. if (i2 % 7 === 0) {
  66405. weeks[parseInt(i2 / 7)] = new Array(7);
  66406. }
  66407. weeks[parseInt(i2 / 7)][i2 % 7] = canlender[i2];
  66408. }
  66409. this.canlender = canlender;
  66410. this.weeks = weeks;
  66411. }
  66412. //静态方法
  66413. // static init(date) {
  66414. // if (!this.instance) {
  66415. // this.instance = new Calendar(date);
  66416. // }
  66417. // return this.instance;
  66418. // }
  66419. }
  66420. const _sfc_main$13 = {
  66421. props: {
  66422. weeks: {
  66423. type: Object,
  66424. default() {
  66425. return {};
  66426. }
  66427. },
  66428. calendar: {
  66429. type: Object,
  66430. default: () => {
  66431. return {};
  66432. }
  66433. },
  66434. selected: {
  66435. type: Array,
  66436. default: () => {
  66437. return [];
  66438. }
  66439. },
  66440. lunar: {
  66441. type: Boolean,
  66442. default: false
  66443. },
  66444. checkHover: {
  66445. type: Boolean,
  66446. default: false
  66447. }
  66448. },
  66449. methods: {
  66450. choiceDate(weeks) {
  66451. this.$emit("change", weeks);
  66452. },
  66453. handleMousemove(weeks) {
  66454. this.$emit("handleMouse", weeks);
  66455. }
  66456. }
  66457. };
  66458. function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
  66459. return vue.openBlock(), vue.createElementBlock(
  66460. "view",
  66461. {
  66462. class: vue.normalizeClass(["uni-calendar-item__weeks-box", {
  66463. "uni-calendar-item--disable": $props.weeks.disable,
  66464. "uni-calendar-item--before-checked-x": $props.weeks.beforeMultiple,
  66465. "uni-calendar-item--multiple": $props.weeks.multiple,
  66466. "uni-calendar-item--after-checked-x": $props.weeks.afterMultiple
  66467. }]),
  66468. onClick: _cache[0] || (_cache[0] = ($event) => $options.choiceDate($props.weeks)),
  66469. onMouseenter: _cache[1] || (_cache[1] = ($event) => $options.handleMousemove($props.weeks))
  66470. },
  66471. [
  66472. vue.createElementVNode(
  66473. "view",
  66474. {
  66475. class: vue.normalizeClass(["uni-calendar-item__weeks-box-item", {
  66476. "uni-calendar-item--checked": $props.calendar.fullDate === $props.weeks.fullDate && ($props.calendar.userChecked || !$props.checkHover),
  66477. "uni-calendar-item--checked-range-text": $props.checkHover,
  66478. "uni-calendar-item--before-checked": $props.weeks.beforeMultiple,
  66479. "uni-calendar-item--multiple": $props.weeks.multiple,
  66480. "uni-calendar-item--after-checked": $props.weeks.afterMultiple,
  66481. "uni-calendar-item--disable": $props.weeks.disable
  66482. }])
  66483. },
  66484. [
  66485. $props.selected && $props.weeks.extraInfo ? (vue.openBlock(), vue.createElementBlock("text", {
  66486. key: 0,
  66487. class: "uni-calendar-item__weeks-box-circle"
  66488. })) : vue.createCommentVNode("v-if", true),
  66489. vue.createElementVNode(
  66490. "text",
  66491. { class: "uni-calendar-item__weeks-box-text uni-calendar-item__weeks-box-text-disable uni-calendar-item--checked-text" },
  66492. vue.toDisplayString($props.weeks.date),
  66493. 1
  66494. /* TEXT */
  66495. )
  66496. ],
  66497. 2
  66498. /* CLASS */
  66499. ),
  66500. vue.createElementVNode(
  66501. "view",
  66502. {
  66503. class: vue.normalizeClass({ "uni-calendar-item--isDay": $props.weeks.isDay })
  66504. },
  66505. null,
  66506. 2
  66507. /* CLASS */
  66508. )
  66509. ],
  66510. 34
  66511. /* CLASS, NEED_HYDRATION */
  66512. );
  66513. }
  66514. const calendarItem = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["render", _sfc_render$12], ["__scopeId", "data-v-3c762a01"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue"]]);
  66515. const en = {
  66516. "uni-datetime-picker.selectDate": "select date",
  66517. "uni-datetime-picker.selectTime": "select time",
  66518. "uni-datetime-picker.selectDateTime": "select datetime",
  66519. "uni-datetime-picker.startDate": "start date",
  66520. "uni-datetime-picker.endDate": "end date",
  66521. "uni-datetime-picker.startTime": "start time",
  66522. "uni-datetime-picker.endTime": "end time",
  66523. "uni-datetime-picker.ok": "ok",
  66524. "uni-datetime-picker.clear": "clear",
  66525. "uni-datetime-picker.cancel": "cancel",
  66526. "uni-calender.MON": "MON",
  66527. "uni-calender.TUE": "TUE",
  66528. "uni-calender.WED": "WED",
  66529. "uni-calender.THU": "THU",
  66530. "uni-calender.FRI": "FRI",
  66531. "uni-calender.SAT": "SAT",
  66532. "uni-calender.SUN": "SUN"
  66533. };
  66534. const zhHans = {
  66535. "uni-datetime-picker.selectDate": "选择日期",
  66536. "uni-datetime-picker.selectTime": "选择时间",
  66537. "uni-datetime-picker.selectDateTime": "选择日期时间",
  66538. "uni-datetime-picker.startDate": "开始日期",
  66539. "uni-datetime-picker.endDate": "结束日期",
  66540. "uni-datetime-picker.startTime": "开始时间",
  66541. "uni-datetime-picker.endTime": "结束时间",
  66542. "uni-datetime-picker.ok": "确定",
  66543. "uni-datetime-picker.clear": "清除",
  66544. "uni-datetime-picker.cancel": "取消",
  66545. "uni-calender.SUN": "日",
  66546. "uni-calender.MON": "一",
  66547. "uni-calender.TUE": "二",
  66548. "uni-calender.WED": "三",
  66549. "uni-calender.THU": "四",
  66550. "uni-calender.FRI": "五",
  66551. "uni-calender.SAT": "六"
  66552. };
  66553. const zhHant = {
  66554. "uni-datetime-picker.selectDate": "選擇日期",
  66555. "uni-datetime-picker.selectTime": "選擇時間",
  66556. "uni-datetime-picker.selectDateTime": "選擇日期時間",
  66557. "uni-datetime-picker.startDate": "開始日期",
  66558. "uni-datetime-picker.endDate": "結束日期",
  66559. "uni-datetime-picker.startTime": "開始时间",
  66560. "uni-datetime-picker.endTime": "結束时间",
  66561. "uni-datetime-picker.ok": "確定",
  66562. "uni-datetime-picker.clear": "清除",
  66563. "uni-datetime-picker.cancel": "取消",
  66564. "uni-calender.SUN": "日",
  66565. "uni-calender.MON": "一",
  66566. "uni-calender.TUE": "二",
  66567. "uni-calender.WED": "三",
  66568. "uni-calender.THU": "四",
  66569. "uni-calender.FRI": "五",
  66570. "uni-calender.SAT": "六"
  66571. };
  66572. const messages = {
  66573. en,
  66574. "zh-Hans": zhHans,
  66575. "zh-Hant": zhHant
  66576. };
  66577. const { t: t$2 } = initVueI18n(messages);
  66578. const _sfc_main$12 = {
  66579. name: "UniDatetimePicker",
  66580. components: {},
  66581. data() {
  66582. return {
  66583. indicatorStyle: `height: 50px;`,
  66584. visible: false,
  66585. fixNvueBug: {},
  66586. dateShow: true,
  66587. timeShow: true,
  66588. title: "日期和时间",
  66589. // 输入框当前时间
  66590. time: "",
  66591. // 当前的年月日时分秒
  66592. year: 1920,
  66593. month: 0,
  66594. day: 0,
  66595. hour: 0,
  66596. minute: 0,
  66597. second: 0,
  66598. // 起始时间
  66599. startYear: 1920,
  66600. startMonth: 1,
  66601. startDay: 1,
  66602. startHour: 0,
  66603. startMinute: 0,
  66604. startSecond: 0,
  66605. // 结束时间
  66606. endYear: 2120,
  66607. endMonth: 12,
  66608. endDay: 31,
  66609. endHour: 23,
  66610. endMinute: 59,
  66611. endSecond: 59
  66612. };
  66613. },
  66614. props: {
  66615. type: {
  66616. type: String,
  66617. default: "datetime"
  66618. },
  66619. value: {
  66620. type: [String, Number],
  66621. default: ""
  66622. },
  66623. modelValue: {
  66624. type: [String, Number],
  66625. default: ""
  66626. },
  66627. start: {
  66628. type: [Number, String],
  66629. default: ""
  66630. },
  66631. end: {
  66632. type: [Number, String],
  66633. default: ""
  66634. },
  66635. returnType: {
  66636. type: String,
  66637. default: "string"
  66638. },
  66639. disabled: {
  66640. type: [Boolean, String],
  66641. default: false
  66642. },
  66643. border: {
  66644. type: [Boolean, String],
  66645. default: true
  66646. },
  66647. hideSecond: {
  66648. type: [Boolean, String],
  66649. default: false
  66650. }
  66651. },
  66652. watch: {
  66653. value: {
  66654. handler(newVal, oldVal) {
  66655. if (newVal) {
  66656. this.parseValue(this.fixIosDateFormat(newVal));
  66657. this.initTime(false);
  66658. } else {
  66659. this.time = "";
  66660. this.parseValue(Date.now());
  66661. }
  66662. },
  66663. immediate: true
  66664. },
  66665. type: {
  66666. handler(newValue) {
  66667. if (newValue === "date") {
  66668. this.dateShow = true;
  66669. this.timeShow = false;
  66670. this.title = "日期";
  66671. } else if (newValue === "time") {
  66672. this.dateShow = false;
  66673. this.timeShow = true;
  66674. this.title = "时间";
  66675. } else {
  66676. this.dateShow = true;
  66677. this.timeShow = true;
  66678. this.title = "日期和时间";
  66679. }
  66680. },
  66681. immediate: true
  66682. },
  66683. start: {
  66684. handler(newVal) {
  66685. this.parseDatetimeRange(this.fixIosDateFormat(newVal), "start");
  66686. },
  66687. immediate: true
  66688. },
  66689. end: {
  66690. handler(newVal) {
  66691. this.parseDatetimeRange(this.fixIosDateFormat(newVal), "end");
  66692. },
  66693. immediate: true
  66694. },
  66695. // 月、日、时、分、秒可选范围变化后,检查当前值是否在范围内,不在则当前值重置为可选范围第一项
  66696. months(newVal) {
  66697. this.checkValue("month", this.month, newVal);
  66698. },
  66699. days(newVal) {
  66700. this.checkValue("day", this.day, newVal);
  66701. },
  66702. hours(newVal) {
  66703. this.checkValue("hour", this.hour, newVal);
  66704. },
  66705. minutes(newVal) {
  66706. this.checkValue("minute", this.minute, newVal);
  66707. },
  66708. seconds(newVal) {
  66709. this.checkValue("second", this.second, newVal);
  66710. }
  66711. },
  66712. computed: {
  66713. // 当前年、月、日、时、分、秒选择范围
  66714. years() {
  66715. return this.getCurrentRange("year");
  66716. },
  66717. months() {
  66718. return this.getCurrentRange("month");
  66719. },
  66720. days() {
  66721. return this.getCurrentRange("day");
  66722. },
  66723. hours() {
  66724. return this.getCurrentRange("hour");
  66725. },
  66726. minutes() {
  66727. return this.getCurrentRange("minute");
  66728. },
  66729. seconds() {
  66730. return this.getCurrentRange("second");
  66731. },
  66732. // picker 当前值数组
  66733. ymd() {
  66734. return [this.year - this.minYear, this.month - this.minMonth, this.day - this.minDay];
  66735. },
  66736. hms() {
  66737. return [this.hour - this.minHour, this.minute - this.minMinute, this.second - this.minSecond];
  66738. },
  66739. // 当前 date 是 start
  66740. currentDateIsStart() {
  66741. return this.year === this.startYear && this.month === this.startMonth && this.day === this.startDay;
  66742. },
  66743. // 当前 date 是 end
  66744. currentDateIsEnd() {
  66745. return this.year === this.endYear && this.month === this.endMonth && this.day === this.endDay;
  66746. },
  66747. // 当前年、月、日、时、分、秒的最小值和最大值
  66748. minYear() {
  66749. return this.startYear;
  66750. },
  66751. maxYear() {
  66752. return this.endYear;
  66753. },
  66754. minMonth() {
  66755. if (this.year === this.startYear) {
  66756. return this.startMonth;
  66757. } else {
  66758. return 1;
  66759. }
  66760. },
  66761. maxMonth() {
  66762. if (this.year === this.endYear) {
  66763. return this.endMonth;
  66764. } else {
  66765. return 12;
  66766. }
  66767. },
  66768. minDay() {
  66769. if (this.year === this.startYear && this.month === this.startMonth) {
  66770. return this.startDay;
  66771. } else {
  66772. return 1;
  66773. }
  66774. },
  66775. maxDay() {
  66776. if (this.year === this.endYear && this.month === this.endMonth) {
  66777. return this.endDay;
  66778. } else {
  66779. return this.daysInMonth(this.year, this.month);
  66780. }
  66781. },
  66782. minHour() {
  66783. if (this.type === "datetime") {
  66784. if (this.currentDateIsStart) {
  66785. return this.startHour;
  66786. } else {
  66787. return 0;
  66788. }
  66789. }
  66790. if (this.type === "time") {
  66791. return this.startHour;
  66792. }
  66793. },
  66794. maxHour() {
  66795. if (this.type === "datetime") {
  66796. if (this.currentDateIsEnd) {
  66797. return this.endHour;
  66798. } else {
  66799. return 23;
  66800. }
  66801. }
  66802. if (this.type === "time") {
  66803. return this.endHour;
  66804. }
  66805. },
  66806. minMinute() {
  66807. if (this.type === "datetime") {
  66808. if (this.currentDateIsStart && this.hour === this.startHour) {
  66809. return this.startMinute;
  66810. } else {
  66811. return 0;
  66812. }
  66813. }
  66814. if (this.type === "time") {
  66815. if (this.hour === this.startHour) {
  66816. return this.startMinute;
  66817. } else {
  66818. return 0;
  66819. }
  66820. }
  66821. },
  66822. maxMinute() {
  66823. if (this.type === "datetime") {
  66824. if (this.currentDateIsEnd && this.hour === this.endHour) {
  66825. return this.endMinute;
  66826. } else {
  66827. return 59;
  66828. }
  66829. }
  66830. if (this.type === "time") {
  66831. if (this.hour === this.endHour) {
  66832. return this.endMinute;
  66833. } else {
  66834. return 59;
  66835. }
  66836. }
  66837. },
  66838. minSecond() {
  66839. if (this.type === "datetime") {
  66840. if (this.currentDateIsStart && this.hour === this.startHour && this.minute === this.startMinute) {
  66841. return this.startSecond;
  66842. } else {
  66843. return 0;
  66844. }
  66845. }
  66846. if (this.type === "time") {
  66847. if (this.hour === this.startHour && this.minute === this.startMinute) {
  66848. return this.startSecond;
  66849. } else {
  66850. return 0;
  66851. }
  66852. }
  66853. },
  66854. maxSecond() {
  66855. if (this.type === "datetime") {
  66856. if (this.currentDateIsEnd && this.hour === this.endHour && this.minute === this.endMinute) {
  66857. return this.endSecond;
  66858. } else {
  66859. return 59;
  66860. }
  66861. }
  66862. if (this.type === "time") {
  66863. if (this.hour === this.endHour && this.minute === this.endMinute) {
  66864. return this.endSecond;
  66865. } else {
  66866. return 59;
  66867. }
  66868. }
  66869. },
  66870. /**
  66871. * for i18n
  66872. */
  66873. selectTimeText() {
  66874. return t$2("uni-datetime-picker.selectTime");
  66875. },
  66876. okText() {
  66877. return t$2("uni-datetime-picker.ok");
  66878. },
  66879. clearText() {
  66880. return t$2("uni-datetime-picker.clear");
  66881. },
  66882. cancelText() {
  66883. return t$2("uni-datetime-picker.cancel");
  66884. }
  66885. },
  66886. mounted() {
  66887. },
  66888. methods: {
  66889. /**
  66890. * @param {Object} item
  66891. * 小于 10 在前面加个 0
  66892. */
  66893. lessThanTen(item) {
  66894. return item < 10 ? "0" + item : item;
  66895. },
  66896. /**
  66897. * 解析时分秒字符串,例如:00:00:00
  66898. * @param {String} timeString
  66899. */
  66900. parseTimeType(timeString) {
  66901. if (timeString) {
  66902. let timeArr = timeString.split(":");
  66903. this.hour = Number(timeArr[0]);
  66904. this.minute = Number(timeArr[1]);
  66905. this.second = Number(timeArr[2]);
  66906. }
  66907. },
  66908. /**
  66909. * 解析选择器初始值,类型可以是字符串、时间戳,例如:2000-10-02、'08:30:00'、 1610695109000
  66910. * @param {String | Number} datetime
  66911. */
  66912. initPickerValue(datetime2) {
  66913. let defaultValue = null;
  66914. if (datetime2) {
  66915. defaultValue = this.compareValueWithStartAndEnd(datetime2, this.start, this.end);
  66916. } else {
  66917. defaultValue = Date.now();
  66918. defaultValue = this.compareValueWithStartAndEnd(defaultValue, this.start, this.end);
  66919. }
  66920. this.parseValue(defaultValue);
  66921. },
  66922. /**
  66923. * 初始值规则:
  66924. * - 用户设置初始值 value
  66925. * - 设置了起始时间 start、终止时间 end,并 start < value < end,初始值为 value, 否则初始值为 start
  66926. * - 只设置了起始时间 start,并 start < value,初始值为 value,否则初始值为 start
  66927. * - 只设置了终止时间 end,并 value < end,初始值为 value,否则初始值为 end
  66928. * - 无起始终止时间,则初始值为 value
  66929. * - 无初始值 value,则初始值为当前本地时间 Date.now()
  66930. * @param {Object} value
  66931. * @param {Object} dateBase
  66932. */
  66933. compareValueWithStartAndEnd(value, start, end) {
  66934. let winner = null;
  66935. value = this.superTimeStamp(value);
  66936. start = this.superTimeStamp(start);
  66937. end = this.superTimeStamp(end);
  66938. if (start && end) {
  66939. if (value < start) {
  66940. winner = new Date(start);
  66941. } else if (value > end) {
  66942. winner = new Date(end);
  66943. } else {
  66944. winner = new Date(value);
  66945. }
  66946. } else if (start && !end) {
  66947. winner = start <= value ? new Date(value) : new Date(start);
  66948. } else if (!start && end) {
  66949. winner = value <= end ? new Date(value) : new Date(end);
  66950. } else {
  66951. winner = new Date(value);
  66952. }
  66953. return winner;
  66954. },
  66955. /**
  66956. * 转换为可比较的时间戳,接受日期、时分秒、时间戳
  66957. * @param {Object} value
  66958. */
  66959. superTimeStamp(value) {
  66960. let dateBase = "";
  66961. if (this.type === "time" && value && typeof value === "string") {
  66962. const now2 = /* @__PURE__ */ new Date();
  66963. const year = now2.getFullYear();
  66964. const month = now2.getMonth() + 1;
  66965. const day = now2.getDate();
  66966. dateBase = year + "/" + month + "/" + day + " ";
  66967. }
  66968. if (Number(value) && typeof value !== NaN) {
  66969. value = parseInt(value);
  66970. dateBase = 0;
  66971. }
  66972. return this.createTimeStamp(dateBase + value);
  66973. },
  66974. /**
  66975. * 解析默认值 value,字符串、时间戳
  66976. * @param {Object} defaultTime
  66977. */
  66978. parseValue(value) {
  66979. if (!value) {
  66980. return;
  66981. }
  66982. if (this.type === "time" && typeof value === "string") {
  66983. this.parseTimeType(value);
  66984. } else {
  66985. let defaultDate = null;
  66986. defaultDate = new Date(value);
  66987. if (this.type !== "time") {
  66988. this.year = defaultDate.getFullYear();
  66989. this.month = defaultDate.getMonth() + 1;
  66990. this.day = defaultDate.getDate();
  66991. }
  66992. if (this.type !== "date") {
  66993. this.hour = defaultDate.getHours();
  66994. this.minute = defaultDate.getMinutes();
  66995. this.second = defaultDate.getSeconds();
  66996. }
  66997. }
  66998. if (this.hideSecond) {
  66999. this.second = 0;
  67000. }
  67001. },
  67002. /**
  67003. * 解析可选择时间范围 start、end,年月日字符串、时间戳
  67004. * @param {Object} defaultTime
  67005. */
  67006. parseDatetimeRange(point, pointType) {
  67007. if (!point) {
  67008. if (pointType === "start") {
  67009. this.startYear = 1920;
  67010. this.startMonth = 1;
  67011. this.startDay = 1;
  67012. this.startHour = 0;
  67013. this.startMinute = 0;
  67014. this.startSecond = 0;
  67015. }
  67016. if (pointType === "end") {
  67017. this.endYear = 2120;
  67018. this.endMonth = 12;
  67019. this.endDay = 31;
  67020. this.endHour = 23;
  67021. this.endMinute = 59;
  67022. this.endSecond = 59;
  67023. }
  67024. return;
  67025. }
  67026. if (this.type === "time") {
  67027. const pointArr = point.split(":");
  67028. this[pointType + "Hour"] = Number(pointArr[0]);
  67029. this[pointType + "Minute"] = Number(pointArr[1]);
  67030. this[pointType + "Second"] = Number(pointArr[2]);
  67031. } else {
  67032. if (!point) {
  67033. pointType === "start" ? this.startYear = this.year - 60 : this.endYear = this.year + 60;
  67034. return;
  67035. }
  67036. if (Number(point) && Number(point) !== NaN) {
  67037. point = parseInt(point);
  67038. }
  67039. const hasTime = /[0-9]:[0-9]/;
  67040. if (this.type === "datetime" && pointType === "end" && typeof point === "string" && !hasTime.test(
  67041. point
  67042. )) {
  67043. point = point + " 23:59:59";
  67044. }
  67045. const pointDate = new Date(point);
  67046. this[pointType + "Year"] = pointDate.getFullYear();
  67047. this[pointType + "Month"] = pointDate.getMonth() + 1;
  67048. this[pointType + "Day"] = pointDate.getDate();
  67049. if (this.type === "datetime") {
  67050. this[pointType + "Hour"] = pointDate.getHours();
  67051. this[pointType + "Minute"] = pointDate.getMinutes();
  67052. this[pointType + "Second"] = pointDate.getSeconds();
  67053. }
  67054. }
  67055. },
  67056. // 获取 年、月、日、时、分、秒 当前可选范围
  67057. getCurrentRange(value) {
  67058. const range2 = [];
  67059. for (let i2 = this["min" + this.capitalize(value)]; i2 <= this["max" + this.capitalize(value)]; i2++) {
  67060. range2.push(i2);
  67061. }
  67062. return range2;
  67063. },
  67064. // 字符串首字母大写
  67065. capitalize(str) {
  67066. return str.charAt(0).toUpperCase() + str.slice(1);
  67067. },
  67068. // 检查当前值是否在范围内,不在则当前值重置为可选范围第一项
  67069. checkValue(name2, value, values) {
  67070. if (values.indexOf(value) === -1) {
  67071. this[name2] = values[0];
  67072. }
  67073. },
  67074. // 每个月的实际天数
  67075. daysInMonth(year, month) {
  67076. return new Date(year, month, 0).getDate();
  67077. },
  67078. //兼容 iOS、safari 日期格式
  67079. fixIosDateFormat(value) {
  67080. if (typeof value === "string") {
  67081. value = value.replace(/-/g, "/");
  67082. }
  67083. return value;
  67084. },
  67085. /**
  67086. * 生成时间戳
  67087. * @param {Object} time
  67088. */
  67089. createTimeStamp(time2) {
  67090. if (!time2)
  67091. return;
  67092. if (typeof time2 === "number") {
  67093. return time2;
  67094. } else {
  67095. time2 = time2.replace(/-/g, "/");
  67096. if (this.type === "date") {
  67097. time2 = time2 + " 00:00:00";
  67098. }
  67099. return Date.parse(time2);
  67100. }
  67101. },
  67102. /**
  67103. * 生成日期或时间的字符串
  67104. */
  67105. createDomSting() {
  67106. const yymmdd = this.year + "-" + this.lessThanTen(this.month) + "-" + this.lessThanTen(this.day);
  67107. let hhmmss = this.lessThanTen(this.hour) + ":" + this.lessThanTen(this.minute);
  67108. if (!this.hideSecond) {
  67109. hhmmss = hhmmss + ":" + this.lessThanTen(this.second);
  67110. }
  67111. if (this.type === "date") {
  67112. return yymmdd;
  67113. } else if (this.type === "time") {
  67114. return hhmmss;
  67115. } else {
  67116. return yymmdd + " " + hhmmss;
  67117. }
  67118. },
  67119. /**
  67120. * 初始化返回值,并抛出 change 事件
  67121. */
  67122. initTime(emit = true) {
  67123. this.time = this.createDomSting();
  67124. if (!emit)
  67125. return;
  67126. if (this.returnType === "timestamp" && this.type !== "time") {
  67127. this.$emit("change", this.createTimeStamp(this.time));
  67128. this.$emit("input", this.createTimeStamp(this.time));
  67129. this.$emit("update:modelValue", this.createTimeStamp(this.time));
  67130. } else {
  67131. this.$emit("change", this.time);
  67132. this.$emit("input", this.time);
  67133. this.$emit("update:modelValue", this.time);
  67134. }
  67135. },
  67136. /**
  67137. * 用户选择日期或时间更新 data
  67138. * @param {Object} e
  67139. */
  67140. bindDateChange(e2) {
  67141. const val = e2.detail.value;
  67142. this.year = this.years[val[0]];
  67143. this.month = this.months[val[1]];
  67144. this.day = this.days[val[2]];
  67145. },
  67146. bindTimeChange(e2) {
  67147. const val = e2.detail.value;
  67148. this.hour = this.hours[val[0]];
  67149. this.minute = this.minutes[val[1]];
  67150. this.second = this.seconds[val[2]];
  67151. },
  67152. /**
  67153. * 初始化弹出层
  67154. */
  67155. initTimePicker() {
  67156. if (this.disabled)
  67157. return;
  67158. const value = this.fixIosDateFormat(this.value);
  67159. this.initPickerValue(value);
  67160. this.visible = !this.visible;
  67161. },
  67162. /**
  67163. * 触发或关闭弹框
  67164. */
  67165. tiggerTimePicker(e2) {
  67166. this.visible = !this.visible;
  67167. },
  67168. /**
  67169. * 用户点击“清空”按钮,清空当前值
  67170. */
  67171. clearTime() {
  67172. this.time = "";
  67173. this.$emit("change", this.time);
  67174. this.$emit("input", this.time);
  67175. this.$emit("update:modelValue", this.time);
  67176. this.tiggerTimePicker();
  67177. },
  67178. /**
  67179. * 用户点击“确定”按钮
  67180. */
  67181. setTime() {
  67182. this.initTime();
  67183. this.tiggerTimePicker();
  67184. }
  67185. }
  67186. };
  67187. function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) {
  67188. return vue.openBlock(), vue.createElementBlock("view", { class: "uni-datetime-picker" }, [
  67189. vue.createElementVNode("view", {
  67190. onClick: _cache[0] || (_cache[0] = (...args) => $options.initTimePicker && $options.initTimePicker(...args))
  67191. }, [
  67192. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  67193. vue.createElementVNode(
  67194. "view",
  67195. {
  67196. class: vue.normalizeClass(["uni-datetime-picker-timebox-pointer", { "uni-datetime-picker-disabled": $props.disabled, "uni-datetime-picker-timebox": $props.border }])
  67197. },
  67198. [
  67199. vue.createElementVNode(
  67200. "text",
  67201. { class: "uni-datetime-picker-text" },
  67202. vue.toDisplayString($data.time),
  67203. 1
  67204. /* TEXT */
  67205. ),
  67206. !$data.time ? (vue.openBlock(), vue.createElementBlock("view", {
  67207. key: 0,
  67208. class: "uni-datetime-picker-time"
  67209. }, [
  67210. vue.createElementVNode(
  67211. "text",
  67212. { class: "uni-datetime-picker-text" },
  67213. vue.toDisplayString($options.selectTimeText),
  67214. 1
  67215. /* TEXT */
  67216. )
  67217. ])) : vue.createCommentVNode("v-if", true)
  67218. ],
  67219. 2
  67220. /* CLASS */
  67221. )
  67222. ], true)
  67223. ]),
  67224. $data.visible ? (vue.openBlock(), vue.createElementBlock("view", {
  67225. key: 0,
  67226. id: "mask",
  67227. class: "uni-datetime-picker-mask",
  67228. onClick: _cache[1] || (_cache[1] = (...args) => $options.tiggerTimePicker && $options.tiggerTimePicker(...args))
  67229. })) : vue.createCommentVNode("v-if", true),
  67230. $data.visible ? (vue.openBlock(), vue.createElementBlock(
  67231. "view",
  67232. {
  67233. key: 1,
  67234. class: vue.normalizeClass(["uni-datetime-picker-popup", [$data.dateShow && $data.timeShow ? "" : "fix-nvue-height"]]),
  67235. style: vue.normalizeStyle($data.fixNvueBug)
  67236. },
  67237. [
  67238. vue.createElementVNode("view", { class: "uni-title" }, [
  67239. vue.createElementVNode(
  67240. "text",
  67241. { class: "uni-datetime-picker-text" },
  67242. vue.toDisplayString($options.selectTimeText),
  67243. 1
  67244. /* TEXT */
  67245. )
  67246. ]),
  67247. $data.dateShow ? (vue.openBlock(), vue.createElementBlock("view", {
  67248. key: 0,
  67249. class: "uni-datetime-picker__container-box"
  67250. }, [
  67251. vue.createElementVNode("picker-view", {
  67252. class: "uni-datetime-picker-view",
  67253. "indicator-style": $data.indicatorStyle,
  67254. value: $options.ymd,
  67255. onChange: _cache[2] || (_cache[2] = (...args) => $options.bindDateChange && $options.bindDateChange(...args))
  67256. }, [
  67257. vue.createElementVNode("picker-view-column", null, [
  67258. (vue.openBlock(true), vue.createElementBlock(
  67259. vue.Fragment,
  67260. null,
  67261. vue.renderList($options.years, (item, index2) => {
  67262. return vue.openBlock(), vue.createElementBlock("view", {
  67263. class: "uni-datetime-picker-item",
  67264. key: index2
  67265. }, [
  67266. vue.createElementVNode(
  67267. "text",
  67268. { class: "uni-datetime-picker-item" },
  67269. vue.toDisplayString($options.lessThanTen(item)),
  67270. 1
  67271. /* TEXT */
  67272. )
  67273. ]);
  67274. }),
  67275. 128
  67276. /* KEYED_FRAGMENT */
  67277. ))
  67278. ]),
  67279. vue.createElementVNode("picker-view-column", null, [
  67280. (vue.openBlock(true), vue.createElementBlock(
  67281. vue.Fragment,
  67282. null,
  67283. vue.renderList($options.months, (item, index2) => {
  67284. return vue.openBlock(), vue.createElementBlock("view", {
  67285. class: "uni-datetime-picker-item",
  67286. key: index2
  67287. }, [
  67288. vue.createElementVNode(
  67289. "text",
  67290. { class: "uni-datetime-picker-item" },
  67291. vue.toDisplayString($options.lessThanTen(item)),
  67292. 1
  67293. /* TEXT */
  67294. )
  67295. ]);
  67296. }),
  67297. 128
  67298. /* KEYED_FRAGMENT */
  67299. ))
  67300. ]),
  67301. vue.createElementVNode("picker-view-column", null, [
  67302. (vue.openBlock(true), vue.createElementBlock(
  67303. vue.Fragment,
  67304. null,
  67305. vue.renderList($options.days, (item, index2) => {
  67306. return vue.openBlock(), vue.createElementBlock("view", {
  67307. class: "uni-datetime-picker-item",
  67308. key: index2
  67309. }, [
  67310. vue.createElementVNode(
  67311. "text",
  67312. { class: "uni-datetime-picker-item" },
  67313. vue.toDisplayString($options.lessThanTen(item)),
  67314. 1
  67315. /* TEXT */
  67316. )
  67317. ]);
  67318. }),
  67319. 128
  67320. /* KEYED_FRAGMENT */
  67321. ))
  67322. ])
  67323. ], 40, ["indicator-style", "value"]),
  67324. vue.createCommentVNode(" 兼容 nvue 不支持伪类 "),
  67325. vue.createElementVNode("text", { class: "uni-datetime-picker-sign sign-left" }, "-"),
  67326. vue.createElementVNode("text", { class: "uni-datetime-picker-sign sign-right" }, "-")
  67327. ])) : vue.createCommentVNode("v-if", true),
  67328. $data.timeShow ? (vue.openBlock(), vue.createElementBlock("view", {
  67329. key: 1,
  67330. class: "uni-datetime-picker__container-box"
  67331. }, [
  67332. vue.createElementVNode("picker-view", {
  67333. class: vue.normalizeClass(["uni-datetime-picker-view", [$props.hideSecond ? "time-hide-second" : ""]]),
  67334. "indicator-style": $data.indicatorStyle,
  67335. value: $options.hms,
  67336. onChange: _cache[3] || (_cache[3] = (...args) => $options.bindTimeChange && $options.bindTimeChange(...args))
  67337. }, [
  67338. vue.createElementVNode("picker-view-column", null, [
  67339. (vue.openBlock(true), vue.createElementBlock(
  67340. vue.Fragment,
  67341. null,
  67342. vue.renderList($options.hours, (item, index2) => {
  67343. return vue.openBlock(), vue.createElementBlock("view", {
  67344. class: "uni-datetime-picker-item",
  67345. key: index2
  67346. }, [
  67347. vue.createElementVNode(
  67348. "text",
  67349. { class: "uni-datetime-picker-item" },
  67350. vue.toDisplayString($options.lessThanTen(item)),
  67351. 1
  67352. /* TEXT */
  67353. )
  67354. ]);
  67355. }),
  67356. 128
  67357. /* KEYED_FRAGMENT */
  67358. ))
  67359. ]),
  67360. vue.createElementVNode("picker-view-column", null, [
  67361. (vue.openBlock(true), vue.createElementBlock(
  67362. vue.Fragment,
  67363. null,
  67364. vue.renderList($options.minutes, (item, index2) => {
  67365. return vue.openBlock(), vue.createElementBlock("view", {
  67366. class: "uni-datetime-picker-item",
  67367. key: index2
  67368. }, [
  67369. vue.createElementVNode(
  67370. "text",
  67371. { class: "uni-datetime-picker-item" },
  67372. vue.toDisplayString($options.lessThanTen(item)),
  67373. 1
  67374. /* TEXT */
  67375. )
  67376. ]);
  67377. }),
  67378. 128
  67379. /* KEYED_FRAGMENT */
  67380. ))
  67381. ]),
  67382. !$props.hideSecond ? (vue.openBlock(), vue.createElementBlock("picker-view-column", { key: 0 }, [
  67383. (vue.openBlock(true), vue.createElementBlock(
  67384. vue.Fragment,
  67385. null,
  67386. vue.renderList($options.seconds, (item, index2) => {
  67387. return vue.openBlock(), vue.createElementBlock("view", {
  67388. class: "uni-datetime-picker-item",
  67389. key: index2
  67390. }, [
  67391. vue.createElementVNode(
  67392. "text",
  67393. { class: "uni-datetime-picker-item" },
  67394. vue.toDisplayString($options.lessThanTen(item)),
  67395. 1
  67396. /* TEXT */
  67397. )
  67398. ]);
  67399. }),
  67400. 128
  67401. /* KEYED_FRAGMENT */
  67402. ))
  67403. ])) : vue.createCommentVNode("v-if", true)
  67404. ], 42, ["indicator-style", "value"]),
  67405. vue.createCommentVNode(" 兼容 nvue 不支持伪类 "),
  67406. vue.createElementVNode(
  67407. "text",
  67408. {
  67409. class: vue.normalizeClass(["uni-datetime-picker-sign", [$props.hideSecond ? "sign-center" : "sign-left"]])
  67410. },
  67411. ":",
  67412. 2
  67413. /* CLASS */
  67414. ),
  67415. !$props.hideSecond ? (vue.openBlock(), vue.createElementBlock("text", {
  67416. key: 0,
  67417. class: "uni-datetime-picker-sign sign-right"
  67418. }, ":")) : vue.createCommentVNode("v-if", true)
  67419. ])) : vue.createCommentVNode("v-if", true),
  67420. vue.createElementVNode("view", { class: "uni-datetime-picker-btn" }, [
  67421. vue.createElementVNode("view", {
  67422. onClick: _cache[4] || (_cache[4] = (...args) => $options.clearTime && $options.clearTime(...args))
  67423. }, [
  67424. vue.createElementVNode(
  67425. "text",
  67426. { class: "uni-datetime-picker-btn-text" },
  67427. vue.toDisplayString($options.clearText),
  67428. 1
  67429. /* TEXT */
  67430. )
  67431. ]),
  67432. vue.createElementVNode("view", { class: "uni-datetime-picker-btn-group" }, [
  67433. vue.createElementVNode("view", {
  67434. class: "uni-datetime-picker-cancel",
  67435. onClick: _cache[5] || (_cache[5] = (...args) => $options.tiggerTimePicker && $options.tiggerTimePicker(...args))
  67436. }, [
  67437. vue.createElementVNode(
  67438. "text",
  67439. { class: "uni-datetime-picker-btn-text" },
  67440. vue.toDisplayString($options.cancelText),
  67441. 1
  67442. /* TEXT */
  67443. )
  67444. ]),
  67445. vue.createElementVNode("view", {
  67446. onClick: _cache[6] || (_cache[6] = (...args) => $options.setTime && $options.setTime(...args))
  67447. }, [
  67448. vue.createElementVNode(
  67449. "text",
  67450. { class: "uni-datetime-picker-btn-text" },
  67451. vue.toDisplayString($options.okText),
  67452. 1
  67453. /* TEXT */
  67454. )
  67455. ])
  67456. ])
  67457. ])
  67458. ],
  67459. 6
  67460. /* CLASS, STYLE */
  67461. )) : vue.createCommentVNode("v-if", true)
  67462. ]);
  67463. }
  67464. const timePicker = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["render", _sfc_render$11], ["__scopeId", "data-v-1d532b70"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue"]]);
  67465. const {
  67466. t: t$1
  67467. } = initVueI18n(messages);
  67468. const _sfc_main$11 = {
  67469. components: {
  67470. calendarItem,
  67471. timePicker
  67472. },
  67473. props: {
  67474. date: {
  67475. type: String,
  67476. default: ""
  67477. },
  67478. defTime: {
  67479. type: [String, Object],
  67480. default: ""
  67481. },
  67482. selectableTimes: {
  67483. type: [Object],
  67484. default() {
  67485. return {};
  67486. }
  67487. },
  67488. selected: {
  67489. type: Array,
  67490. default() {
  67491. return [];
  67492. }
  67493. },
  67494. lunar: {
  67495. type: Boolean,
  67496. default: false
  67497. },
  67498. startDate: {
  67499. type: String,
  67500. default: ""
  67501. },
  67502. endDate: {
  67503. type: String,
  67504. default: ""
  67505. },
  67506. range: {
  67507. type: Boolean,
  67508. default: false
  67509. },
  67510. typeHasTime: {
  67511. type: Boolean,
  67512. default: false
  67513. },
  67514. insert: {
  67515. type: Boolean,
  67516. default: true
  67517. },
  67518. showMonth: {
  67519. type: Boolean,
  67520. default: true
  67521. },
  67522. clearDate: {
  67523. type: Boolean,
  67524. default: true
  67525. },
  67526. left: {
  67527. type: Boolean,
  67528. default: true
  67529. },
  67530. right: {
  67531. type: Boolean,
  67532. default: true
  67533. },
  67534. checkHover: {
  67535. type: Boolean,
  67536. default: true
  67537. },
  67538. hideSecond: {
  67539. type: [Boolean],
  67540. default: false
  67541. },
  67542. pleStatus: {
  67543. type: Object,
  67544. default() {
  67545. return {
  67546. before: "",
  67547. after: "",
  67548. data: [],
  67549. fulldate: ""
  67550. };
  67551. }
  67552. }
  67553. },
  67554. data() {
  67555. return {
  67556. show: false,
  67557. weeks: [],
  67558. calendar: {},
  67559. nowDate: "",
  67560. aniMaskShow: false,
  67561. firstEnter: true,
  67562. time: "",
  67563. timeRange: {
  67564. startTime: "",
  67565. endTime: ""
  67566. },
  67567. tempSingleDate: "",
  67568. tempRange: {
  67569. before: "",
  67570. after: ""
  67571. }
  67572. };
  67573. },
  67574. watch: {
  67575. date: {
  67576. immediate: true,
  67577. handler(newVal, oldVal) {
  67578. if (!this.range) {
  67579. this.tempSingleDate = newVal;
  67580. setTimeout(() => {
  67581. this.init(newVal);
  67582. }, 100);
  67583. }
  67584. }
  67585. },
  67586. defTime: {
  67587. immediate: true,
  67588. handler(newVal, oldVal) {
  67589. if (!this.range) {
  67590. this.time = newVal;
  67591. } else {
  67592. this.timeRange.startTime = newVal.start;
  67593. this.timeRange.endTime = newVal.end;
  67594. }
  67595. }
  67596. },
  67597. startDate(val) {
  67598. this.cale.resetSatrtDate(val);
  67599. this.cale.setDate(this.nowDate.fullDate);
  67600. this.weeks = this.cale.weeks;
  67601. },
  67602. endDate(val) {
  67603. this.cale.resetEndDate(val);
  67604. this.cale.setDate(this.nowDate.fullDate);
  67605. this.weeks = this.cale.weeks;
  67606. },
  67607. selected(newVal) {
  67608. this.cale.setSelectInfo(this.nowDate.fullDate, newVal);
  67609. this.weeks = this.cale.weeks;
  67610. },
  67611. pleStatus: {
  67612. immediate: true,
  67613. handler(newVal, oldVal) {
  67614. const {
  67615. before,
  67616. after,
  67617. fulldate,
  67618. which
  67619. } = newVal;
  67620. this.tempRange.before = before;
  67621. this.tempRange.after = after;
  67622. setTimeout(() => {
  67623. if (fulldate) {
  67624. this.cale.setHoverMultiple(fulldate);
  67625. if (before && after) {
  67626. this.cale.lastHover = true;
  67627. if (this.rangeWithinMonth(after, before))
  67628. return;
  67629. this.setDate(before);
  67630. } else {
  67631. this.cale.setMultiple(fulldate);
  67632. this.setDate(this.nowDate.fullDate);
  67633. this.calendar.fullDate = "";
  67634. this.cale.lastHover = false;
  67635. }
  67636. } else {
  67637. this.cale.setDefaultMultiple(before, after);
  67638. if (which === "left") {
  67639. this.setDate(before);
  67640. this.weeks = this.cale.weeks;
  67641. } else {
  67642. this.setDate(after);
  67643. this.weeks = this.cale.weeks;
  67644. }
  67645. this.cale.lastHover = true;
  67646. }
  67647. }, 16);
  67648. }
  67649. }
  67650. },
  67651. computed: {
  67652. reactStartTime() {
  67653. const activeDate = this.range ? this.tempRange.before : this.calendar.fullDate;
  67654. const res = activeDate === this.startDate ? this.selectableTimes.start : "";
  67655. return res;
  67656. },
  67657. reactEndTime() {
  67658. const activeDate = this.range ? this.tempRange.after : this.calendar.fullDate;
  67659. const res = activeDate === this.endDate ? this.selectableTimes.end : "";
  67660. return res;
  67661. },
  67662. /**
  67663. * for i18n
  67664. */
  67665. selectDateText() {
  67666. return t$1("uni-datetime-picker.selectDate");
  67667. },
  67668. startDateText() {
  67669. return this.startPlaceholder || t$1("uni-datetime-picker.startDate");
  67670. },
  67671. endDateText() {
  67672. return this.endPlaceholder || t$1("uni-datetime-picker.endDate");
  67673. },
  67674. okText() {
  67675. return t$1("uni-datetime-picker.ok");
  67676. },
  67677. monText() {
  67678. return t$1("uni-calender.MON");
  67679. },
  67680. TUEText() {
  67681. return t$1("uni-calender.TUE");
  67682. },
  67683. WEDText() {
  67684. return t$1("uni-calender.WED");
  67685. },
  67686. THUText() {
  67687. return t$1("uni-calender.THU");
  67688. },
  67689. FRIText() {
  67690. return t$1("uni-calender.FRI");
  67691. },
  67692. SATText() {
  67693. return t$1("uni-calender.SAT");
  67694. },
  67695. SUNText() {
  67696. return t$1("uni-calender.SUN");
  67697. }
  67698. },
  67699. created() {
  67700. this.cale = new Calendar({
  67701. // date: new Date(),
  67702. selected: this.selected,
  67703. startDate: this.startDate,
  67704. endDate: this.endDate,
  67705. range: this.range
  67706. // multipleStatus: this.pleStatus
  67707. });
  67708. this.init(this.date);
  67709. },
  67710. methods: {
  67711. leaveCale() {
  67712. this.firstEnter = true;
  67713. },
  67714. handleMouse(weeks) {
  67715. if (weeks.disable)
  67716. return;
  67717. if (this.cale.lastHover)
  67718. return;
  67719. let {
  67720. before,
  67721. after
  67722. } = this.cale.multipleStatus;
  67723. if (!before)
  67724. return;
  67725. this.calendar = weeks;
  67726. this.cale.setHoverMultiple(this.calendar.fullDate);
  67727. this.weeks = this.cale.weeks;
  67728. if (this.firstEnter) {
  67729. this.$emit("firstEnterCale", this.cale.multipleStatus);
  67730. this.firstEnter = false;
  67731. }
  67732. },
  67733. rangeWithinMonth(A2, B2) {
  67734. const [yearA, monthA] = A2.split("-");
  67735. const [yearB, monthB] = B2.split("-");
  67736. return yearA === yearB && monthA === monthB;
  67737. },
  67738. // 取消穿透
  67739. clean() {
  67740. this.close();
  67741. },
  67742. clearCalender() {
  67743. if (this.range) {
  67744. this.timeRange.startTime = "";
  67745. this.timeRange.endTime = "";
  67746. this.tempRange.before = "";
  67747. this.tempRange.after = "";
  67748. this.cale.multipleStatus.before = "";
  67749. this.cale.multipleStatus.after = "";
  67750. this.cale.multipleStatus.data = [];
  67751. this.cale.lastHover = false;
  67752. } else {
  67753. this.time = "";
  67754. this.tempSingleDate = "";
  67755. }
  67756. this.calendar.fullDate = "";
  67757. this.setDate();
  67758. },
  67759. bindDateChange(e2) {
  67760. const value = e2.detail.value + "-1";
  67761. this.init(value);
  67762. },
  67763. /**
  67764. * 初始化日期显示
  67765. * @param {Object} date
  67766. */
  67767. init(date2) {
  67768. this.cale.setDate(date2);
  67769. this.weeks = this.cale.weeks;
  67770. this.nowDate = this.calendar = this.cale.getInfo(date2);
  67771. },
  67772. // choiceDate(weeks) {
  67773. // if (weeks.disable) return
  67774. // this.calendar = weeks
  67775. // // 设置多选
  67776. // this.cale.setMultiple(this.calendar.fullDate, true)
  67777. // this.weeks = this.cale.weeks
  67778. // this.tempSingleDate = this.calendar.fullDate
  67779. // this.tempRange.before = this.cale.multipleStatus.before
  67780. // this.tempRange.after = this.cale.multipleStatus.after
  67781. // this.change()
  67782. // },
  67783. /**
  67784. * 打开日历弹窗
  67785. */
  67786. open() {
  67787. if (this.clearDate && !this.insert) {
  67788. this.cale.cleanMultipleStatus();
  67789. this.init(this.date);
  67790. }
  67791. this.show = true;
  67792. this.$nextTick(() => {
  67793. setTimeout(() => {
  67794. this.aniMaskShow = true;
  67795. }, 50);
  67796. });
  67797. },
  67798. /**
  67799. * 关闭日历弹窗
  67800. */
  67801. close() {
  67802. this.aniMaskShow = false;
  67803. this.$nextTick(() => {
  67804. setTimeout(() => {
  67805. this.show = false;
  67806. this.$emit("close");
  67807. }, 300);
  67808. });
  67809. },
  67810. /**
  67811. * 确认按钮
  67812. */
  67813. confirm() {
  67814. this.setEmit("confirm");
  67815. this.close();
  67816. },
  67817. /**
  67818. * 变化触发
  67819. */
  67820. change() {
  67821. if (!this.insert)
  67822. return;
  67823. this.setEmit("change");
  67824. },
  67825. /**
  67826. * 选择月份触发
  67827. */
  67828. monthSwitch() {
  67829. let {
  67830. year,
  67831. month
  67832. } = this.nowDate;
  67833. this.$emit("monthSwitch", {
  67834. year,
  67835. month: Number(month)
  67836. });
  67837. },
  67838. /**
  67839. * 派发事件
  67840. * @param {Object} name
  67841. */
  67842. setEmit(name2) {
  67843. let {
  67844. year,
  67845. month,
  67846. date: date2,
  67847. fullDate,
  67848. lunar,
  67849. extraInfo
  67850. } = this.calendar;
  67851. this.$emit(name2, {
  67852. range: this.cale.multipleStatus,
  67853. year,
  67854. month,
  67855. date: date2,
  67856. time: this.time,
  67857. timeRange: this.timeRange,
  67858. fulldate: fullDate,
  67859. lunar,
  67860. extraInfo: extraInfo || {}
  67861. });
  67862. },
  67863. /**
  67864. * 选择天触发
  67865. * @param {Object} weeks
  67866. */
  67867. choiceDate(weeks) {
  67868. if (weeks.disable)
  67869. return;
  67870. this.calendar = weeks;
  67871. this.calendar.userChecked = true;
  67872. this.cale.setMultiple(this.calendar.fullDate, true);
  67873. this.weeks = this.cale.weeks;
  67874. this.tempSingleDate = this.calendar.fullDate;
  67875. this.tempRange.before = this.cale.multipleStatus.before;
  67876. this.tempRange.after = this.cale.multipleStatus.after;
  67877. this.change();
  67878. },
  67879. /**
  67880. * 回到今天
  67881. */
  67882. backtoday() {
  67883. let date2 = this.cale.getDate(/* @__PURE__ */ new Date()).fullDate;
  67884. this.init(date2);
  67885. this.change();
  67886. },
  67887. /**
  67888. * 比较时间大小
  67889. */
  67890. dateCompare(startDate, endDate) {
  67891. startDate = new Date(startDate.replace("-", "/").replace("-", "/"));
  67892. endDate = new Date(endDate.replace("-", "/").replace("-", "/"));
  67893. if (startDate <= endDate) {
  67894. return true;
  67895. } else {
  67896. return false;
  67897. }
  67898. },
  67899. /**
  67900. * 上个月
  67901. */
  67902. pre() {
  67903. const preDate = this.cale.getDate(this.nowDate.fullDate, -1, "month").fullDate;
  67904. this.setDate(preDate);
  67905. this.monthSwitch();
  67906. },
  67907. /**
  67908. * 下个月
  67909. */
  67910. next() {
  67911. const nextDate = this.cale.getDate(this.nowDate.fullDate, 1, "month").fullDate;
  67912. this.setDate(nextDate);
  67913. this.monthSwitch();
  67914. },
  67915. /**
  67916. * 设置日期
  67917. * @param {Object} date
  67918. */
  67919. setDate(date2) {
  67920. this.cale.setDate(date2);
  67921. this.weeks = this.cale.weeks;
  67922. this.nowDate = this.cale.getInfo(date2);
  67923. }
  67924. }
  67925. };
  67926. function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
  67927. const _component_calendar_item = vue.resolveComponent("calendar-item");
  67928. const _component_time_picker = vue.resolveComponent("time-picker");
  67929. const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$b);
  67930. return vue.openBlock(), vue.createElementBlock(
  67931. "view",
  67932. {
  67933. class: "uni-calendar",
  67934. onMouseleave: _cache[9] || (_cache[9] = (...args) => $options.leaveCale && $options.leaveCale(...args))
  67935. },
  67936. [
  67937. !$props.insert && $data.show ? (vue.openBlock(), vue.createElementBlock(
  67938. "view",
  67939. {
  67940. key: 0,
  67941. class: vue.normalizeClass(["uni-calendar__mask", { "uni-calendar--mask-show": $data.aniMaskShow }]),
  67942. onClick: _cache[0] || (_cache[0] = (...args) => $options.clean && $options.clean(...args))
  67943. },
  67944. null,
  67945. 2
  67946. /* CLASS */
  67947. )) : vue.createCommentVNode("v-if", true),
  67948. $props.insert || $data.show ? (vue.openBlock(), vue.createElementBlock(
  67949. "view",
  67950. {
  67951. key: 1,
  67952. class: vue.normalizeClass(["uni-calendar__content", { "uni-calendar--fixed": !$props.insert, "uni-calendar--ani-show": $data.aniMaskShow, "uni-calendar__content-mobile": $data.aniMaskShow }])
  67953. },
  67954. [
  67955. vue.createElementVNode(
  67956. "view",
  67957. {
  67958. class: vue.normalizeClass(["uni-calendar__header", { "uni-calendar__header-mobile": !$props.insert }])
  67959. },
  67960. [
  67961. $props.left ? (vue.openBlock(), vue.createElementBlock("view", {
  67962. key: 0,
  67963. class: "uni-calendar__header-btn-box",
  67964. onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.pre && $options.pre(...args), ["stop"]))
  67965. }, [
  67966. vue.createElementVNode("view", { class: "uni-calendar__header-btn uni-calendar--left" })
  67967. ])) : vue.createCommentVNode("v-if", true),
  67968. vue.createElementVNode("picker", {
  67969. mode: "date",
  67970. value: $props.date,
  67971. fields: "month",
  67972. onChange: _cache[2] || (_cache[2] = (...args) => $options.bindDateChange && $options.bindDateChange(...args))
  67973. }, [
  67974. vue.createElementVNode(
  67975. "text",
  67976. { class: "uni-calendar__header-text" },
  67977. vue.toDisplayString(($data.nowDate.year || "") + " 年 " + ($data.nowDate.month || "") + " 月"),
  67978. 1
  67979. /* TEXT */
  67980. )
  67981. ], 40, ["value"]),
  67982. $props.right ? (vue.openBlock(), vue.createElementBlock("view", {
  67983. key: 1,
  67984. class: "uni-calendar__header-btn-box",
  67985. onClick: _cache[3] || (_cache[3] = vue.withModifiers((...args) => $options.next && $options.next(...args), ["stop"]))
  67986. }, [
  67987. vue.createElementVNode("view", { class: "uni-calendar__header-btn uni-calendar--right" })
  67988. ])) : vue.createCommentVNode("v-if", true),
  67989. !$props.insert ? (vue.openBlock(), vue.createElementBlock("view", {
  67990. key: 2,
  67991. class: "dialog-close",
  67992. onClick: _cache[4] || (_cache[4] = (...args) => $options.clean && $options.clean(...args))
  67993. }, [
  67994. vue.createElementVNode("view", {
  67995. class: "dialog-close-plus",
  67996. "data-id": "close"
  67997. }),
  67998. vue.createElementVNode("view", {
  67999. class: "dialog-close-plus dialog-close-rotate",
  68000. "data-id": "close"
  68001. })
  68002. ])) : vue.createCommentVNode("v-if", true),
  68003. vue.createCommentVNode(' <text class="uni-calendar__backtoday" @click="backtoday">回到今天</text> ')
  68004. ],
  68005. 2
  68006. /* CLASS */
  68007. ),
  68008. vue.createElementVNode("view", { class: "uni-calendar__box" }, [
  68009. $props.showMonth ? (vue.openBlock(), vue.createElementBlock("view", {
  68010. key: 0,
  68011. class: "uni-calendar__box-bg"
  68012. }, [
  68013. vue.createElementVNode(
  68014. "text",
  68015. { class: "uni-calendar__box-bg-text" },
  68016. vue.toDisplayString($data.nowDate.month),
  68017. 1
  68018. /* TEXT */
  68019. )
  68020. ])) : vue.createCommentVNode("v-if", true),
  68021. vue.createElementVNode("view", {
  68022. class: "uni-calendar__weeks",
  68023. style: { "padding-bottom": "7px" }
  68024. }, [
  68025. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  68026. vue.createElementVNode(
  68027. "text",
  68028. { class: "uni-calendar__weeks-day-text" },
  68029. vue.toDisplayString($options.SUNText),
  68030. 1
  68031. /* TEXT */
  68032. )
  68033. ]),
  68034. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  68035. vue.createElementVNode(
  68036. "text",
  68037. { class: "uni-calendar__weeks-day-text" },
  68038. vue.toDisplayString($options.monText),
  68039. 1
  68040. /* TEXT */
  68041. )
  68042. ]),
  68043. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  68044. vue.createElementVNode(
  68045. "text",
  68046. { class: "uni-calendar__weeks-day-text" },
  68047. vue.toDisplayString($options.TUEText),
  68048. 1
  68049. /* TEXT */
  68050. )
  68051. ]),
  68052. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  68053. vue.createElementVNode(
  68054. "text",
  68055. { class: "uni-calendar__weeks-day-text" },
  68056. vue.toDisplayString($options.WEDText),
  68057. 1
  68058. /* TEXT */
  68059. )
  68060. ]),
  68061. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  68062. vue.createElementVNode(
  68063. "text",
  68064. { class: "uni-calendar__weeks-day-text" },
  68065. vue.toDisplayString($options.THUText),
  68066. 1
  68067. /* TEXT */
  68068. )
  68069. ]),
  68070. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  68071. vue.createElementVNode(
  68072. "text",
  68073. { class: "uni-calendar__weeks-day-text" },
  68074. vue.toDisplayString($options.FRIText),
  68075. 1
  68076. /* TEXT */
  68077. )
  68078. ]),
  68079. vue.createElementVNode("view", { class: "uni-calendar__weeks-day" }, [
  68080. vue.createElementVNode(
  68081. "text",
  68082. { class: "uni-calendar__weeks-day-text" },
  68083. vue.toDisplayString($options.SATText),
  68084. 1
  68085. /* TEXT */
  68086. )
  68087. ])
  68088. ]),
  68089. (vue.openBlock(true), vue.createElementBlock(
  68090. vue.Fragment,
  68091. null,
  68092. vue.renderList($data.weeks, (item, weekIndex) => {
  68093. return vue.openBlock(), vue.createElementBlock("view", {
  68094. class: "uni-calendar__weeks",
  68095. key: weekIndex
  68096. }, [
  68097. (vue.openBlock(true), vue.createElementBlock(
  68098. vue.Fragment,
  68099. null,
  68100. vue.renderList(item, (weeks, weeksIndex) => {
  68101. return vue.openBlock(), vue.createElementBlock("view", {
  68102. class: "uni-calendar__weeks-item",
  68103. key: weeksIndex
  68104. }, [
  68105. vue.createVNode(_component_calendar_item, {
  68106. class: "uni-calendar-item--hook",
  68107. weeks,
  68108. calendar: $data.calendar,
  68109. selected: $props.selected,
  68110. lunar: $props.lunar,
  68111. checkHover: $props.range,
  68112. onChange: $options.choiceDate,
  68113. onHandleMouse: $options.handleMouse
  68114. }, null, 8, ["weeks", "calendar", "selected", "lunar", "checkHover", "onChange", "onHandleMouse"])
  68115. ]);
  68116. }),
  68117. 128
  68118. /* KEYED_FRAGMENT */
  68119. ))
  68120. ]);
  68121. }),
  68122. 128
  68123. /* KEYED_FRAGMENT */
  68124. ))
  68125. ]),
  68126. !$props.insert && !$props.range && $props.typeHasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  68127. key: 0,
  68128. class: "uni-date-changed uni-calendar--fixed-top",
  68129. style: { "padding": "0 80px" }
  68130. }, [
  68131. vue.createElementVNode(
  68132. "view",
  68133. { class: "uni-date-changed--time-date" },
  68134. vue.toDisplayString($data.tempSingleDate ? $data.tempSingleDate : $options.selectDateText),
  68135. 1
  68136. /* TEXT */
  68137. ),
  68138. vue.createVNode(_component_time_picker, {
  68139. type: "time",
  68140. start: $options.reactStartTime,
  68141. end: $options.reactEndTime,
  68142. modelValue: $data.time,
  68143. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.time = $event),
  68144. disabled: !$data.tempSingleDate,
  68145. border: false,
  68146. "hide-second": $props.hideSecond,
  68147. class: "time-picker-style"
  68148. }, null, 8, ["start", "end", "modelValue", "disabled", "hide-second"])
  68149. ])) : vue.createCommentVNode("v-if", true),
  68150. !$props.insert && $props.range && $props.typeHasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  68151. key: 1,
  68152. class: "uni-date-changed uni-calendar--fixed-top"
  68153. }, [
  68154. vue.createElementVNode("view", { class: "uni-date-changed--time-start" }, [
  68155. vue.createElementVNode(
  68156. "view",
  68157. { class: "uni-date-changed--time-date" },
  68158. vue.toDisplayString($data.tempRange.before ? $data.tempRange.before : $options.startDateText),
  68159. 1
  68160. /* TEXT */
  68161. ),
  68162. vue.createVNode(_component_time_picker, {
  68163. type: "time",
  68164. start: $options.reactStartTime,
  68165. modelValue: $data.timeRange.startTime,
  68166. "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.timeRange.startTime = $event),
  68167. border: false,
  68168. "hide-second": $props.hideSecond,
  68169. disabled: !$data.tempRange.before,
  68170. class: "time-picker-style"
  68171. }, null, 8, ["start", "modelValue", "hide-second", "disabled"])
  68172. ]),
  68173. vue.createVNode(_component_uni_icons, {
  68174. type: "arrowthinright",
  68175. color: "#999",
  68176. style: { "line-height": "50px" }
  68177. }),
  68178. vue.createElementVNode("view", { class: "uni-date-changed--time-end" }, [
  68179. vue.createElementVNode(
  68180. "view",
  68181. { class: "uni-date-changed--time-date" },
  68182. vue.toDisplayString($data.tempRange.after ? $data.tempRange.after : $options.endDateText),
  68183. 1
  68184. /* TEXT */
  68185. ),
  68186. vue.createVNode(_component_time_picker, {
  68187. type: "time",
  68188. end: $options.reactEndTime,
  68189. modelValue: $data.timeRange.endTime,
  68190. "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $data.timeRange.endTime = $event),
  68191. border: false,
  68192. "hide-second": $props.hideSecond,
  68193. disabled: !$data.tempRange.after,
  68194. class: "time-picker-style"
  68195. }, null, 8, ["end", "modelValue", "hide-second", "disabled"])
  68196. ])
  68197. ])) : vue.createCommentVNode("v-if", true),
  68198. !$props.insert ? (vue.openBlock(), vue.createElementBlock("view", {
  68199. key: 2,
  68200. class: "uni-date-changed uni-date-btn--ok"
  68201. }, [
  68202. vue.createCommentVNode(' <view class="uni-calendar__header-btn-box">\n <text class="uni-calendar__button-text uni-calendar--fixed-width">{{okText}}</text>\n </view> '),
  68203. vue.createElementVNode("view", {
  68204. class: "uni-datetime-picker--btn",
  68205. onClick: _cache[8] || (_cache[8] = (...args) => $options.confirm && $options.confirm(...args))
  68206. }, "确认")
  68207. ])) : vue.createCommentVNode("v-if", true)
  68208. ],
  68209. 2
  68210. /* CLASS */
  68211. )) : vue.createCommentVNode("v-if", true)
  68212. ],
  68213. 32
  68214. /* NEED_HYDRATION */
  68215. );
  68216. }
  68217. const calendar = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["render", _sfc_render$10], ["__scopeId", "data-v-1d379219"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue"]]);
  68218. const {
  68219. t
  68220. } = initVueI18n(messages);
  68221. const _sfc_main$10 = {
  68222. name: "UniDatetimePicker",
  68223. components: {
  68224. calendar,
  68225. timePicker
  68226. },
  68227. data() {
  68228. return {
  68229. isRange: false,
  68230. hasTime: false,
  68231. mobileRange: false,
  68232. // 单选
  68233. singleVal: "",
  68234. tempSingleDate: "",
  68235. defSingleDate: "",
  68236. time: "",
  68237. // 范围选
  68238. caleRange: {
  68239. startDate: "",
  68240. startTime: "",
  68241. endDate: "",
  68242. endTime: ""
  68243. },
  68244. range: {
  68245. startDate: "",
  68246. // startTime: '',
  68247. endDate: ""
  68248. // endTime: ''
  68249. },
  68250. tempRange: {
  68251. startDate: "",
  68252. startTime: "",
  68253. endDate: "",
  68254. endTime: ""
  68255. },
  68256. // 左右日历同步数据
  68257. startMultipleStatus: {
  68258. before: "",
  68259. after: "",
  68260. data: [],
  68261. fulldate: ""
  68262. },
  68263. endMultipleStatus: {
  68264. before: "",
  68265. after: "",
  68266. data: [],
  68267. fulldate: ""
  68268. },
  68269. visible: false,
  68270. popup: false,
  68271. popover: null,
  68272. isEmitValue: false,
  68273. isPhone: false,
  68274. isFirstShow: true
  68275. };
  68276. },
  68277. props: {
  68278. type: {
  68279. type: String,
  68280. default: "datetime"
  68281. },
  68282. value: {
  68283. type: [String, Number, Array, Date],
  68284. default: ""
  68285. },
  68286. modelValue: {
  68287. type: [String, Number, Array, Date],
  68288. default: ""
  68289. },
  68290. start: {
  68291. type: [Number, String],
  68292. default: ""
  68293. },
  68294. end: {
  68295. type: [Number, String],
  68296. default: ""
  68297. },
  68298. returnType: {
  68299. type: String,
  68300. default: "string"
  68301. },
  68302. placeholder: {
  68303. type: String,
  68304. default: ""
  68305. },
  68306. startPlaceholder: {
  68307. type: String,
  68308. default: ""
  68309. },
  68310. endPlaceholder: {
  68311. type: String,
  68312. default: ""
  68313. },
  68314. rangeSeparator: {
  68315. type: String,
  68316. default: "-"
  68317. },
  68318. border: {
  68319. type: [Boolean],
  68320. default: true
  68321. },
  68322. disabled: {
  68323. type: [Boolean],
  68324. default: false
  68325. },
  68326. clearIcon: {
  68327. type: [Boolean],
  68328. default: true
  68329. },
  68330. hideSecond: {
  68331. type: [Boolean],
  68332. default: false
  68333. }
  68334. },
  68335. watch: {
  68336. type: {
  68337. immediate: true,
  68338. handler(newVal, oldVal) {
  68339. if (newVal.indexOf("time") !== -1) {
  68340. this.hasTime = true;
  68341. } else {
  68342. this.hasTime = false;
  68343. }
  68344. if (newVal.indexOf("range") !== -1) {
  68345. this.isRange = true;
  68346. } else {
  68347. this.isRange = false;
  68348. }
  68349. }
  68350. },
  68351. modelValue: {
  68352. immediate: true,
  68353. handler(newVal, oldVal) {
  68354. if (this.isEmitValue) {
  68355. this.isEmitValue = false;
  68356. return;
  68357. }
  68358. this.initPicker(newVal);
  68359. }
  68360. },
  68361. start: {
  68362. immediate: true,
  68363. handler(newVal, oldVal) {
  68364. if (!newVal)
  68365. return;
  68366. const {
  68367. defDate,
  68368. defTime
  68369. } = this.parseDate(newVal);
  68370. this.caleRange.startDate = defDate;
  68371. if (this.hasTime) {
  68372. this.caleRange.startTime = defTime;
  68373. }
  68374. }
  68375. },
  68376. end: {
  68377. immediate: true,
  68378. handler(newVal, oldVal) {
  68379. if (!newVal)
  68380. return;
  68381. const {
  68382. defDate,
  68383. defTime
  68384. } = this.parseDate(newVal);
  68385. this.caleRange.endDate = defDate;
  68386. if (this.hasTime) {
  68387. this.caleRange.endTime = defTime;
  68388. }
  68389. }
  68390. }
  68391. },
  68392. computed: {
  68393. reactStartTime() {
  68394. const activeDate = this.isRange ? this.tempRange.startDate : this.tempSingleDate;
  68395. const res = activeDate === this.caleRange.startDate ? this.caleRange.startTime : "";
  68396. return res;
  68397. },
  68398. reactEndTime() {
  68399. const activeDate = this.isRange ? this.tempRange.endDate : this.tempSingleDate;
  68400. const res = activeDate === this.caleRange.endDate ? this.caleRange.endTime : "";
  68401. return res;
  68402. },
  68403. reactMobDefTime() {
  68404. const times2 = {
  68405. start: this.tempRange.startTime,
  68406. end: this.tempRange.endTime
  68407. };
  68408. return this.isRange ? times2 : this.time;
  68409. },
  68410. mobSelectableTime() {
  68411. return {
  68412. start: this.caleRange.startTime,
  68413. end: this.caleRange.endTime
  68414. };
  68415. },
  68416. datePopupWidth() {
  68417. return this.isRange ? 653 : 301;
  68418. },
  68419. /**
  68420. * for i18n
  68421. */
  68422. singlePlaceholderText() {
  68423. return this.placeholder || (this.type === "date" ? this.selectDateText : t(
  68424. "uni-datetime-picker.selectDateTime"
  68425. ));
  68426. },
  68427. startPlaceholderText() {
  68428. return this.startPlaceholder || this.startDateText;
  68429. },
  68430. endPlaceholderText() {
  68431. return this.endPlaceholder || this.endDateText;
  68432. },
  68433. selectDateText() {
  68434. return t("uni-datetime-picker.selectDate");
  68435. },
  68436. selectTimeText() {
  68437. return t("uni-datetime-picker.selectTime");
  68438. },
  68439. startDateText() {
  68440. return this.startPlaceholder || t("uni-datetime-picker.startDate");
  68441. },
  68442. startTimeText() {
  68443. return t("uni-datetime-picker.startTime");
  68444. },
  68445. endDateText() {
  68446. return this.endPlaceholder || t("uni-datetime-picker.endDate");
  68447. },
  68448. endTimeText() {
  68449. return t("uni-datetime-picker.endTime");
  68450. },
  68451. okText() {
  68452. return t("uni-datetime-picker.ok");
  68453. },
  68454. clearText() {
  68455. return t("uni-datetime-picker.clear");
  68456. },
  68457. showClearIcon() {
  68458. const {
  68459. clearIcon,
  68460. disabled,
  68461. singleVal,
  68462. range: range2
  68463. } = this;
  68464. const bool = clearIcon && !disabled && (singleVal || range2.startDate && range2.endDate);
  68465. return bool;
  68466. }
  68467. },
  68468. created() {
  68469. this.form = this.getForm("uniForms");
  68470. this.formItem = this.getForm("uniFormsItem");
  68471. },
  68472. mounted() {
  68473. this.platform();
  68474. },
  68475. methods: {
  68476. /**
  68477. * 获取父元素实例
  68478. */
  68479. getForm(name2 = "uniForms") {
  68480. let parent2 = this.$parent;
  68481. let parentName = parent2.$options.name;
  68482. while (parentName !== name2) {
  68483. parent2 = parent2.$parent;
  68484. if (!parent2)
  68485. return false;
  68486. parentName = parent2.$options.name;
  68487. }
  68488. return parent2;
  68489. },
  68490. initPicker(newVal) {
  68491. if (!newVal || Array.isArray(newVal) && !newVal.length) {
  68492. this.$nextTick(() => {
  68493. this.clear(false);
  68494. });
  68495. return;
  68496. }
  68497. if (!Array.isArray(newVal) && !this.isRange) {
  68498. const {
  68499. defDate,
  68500. defTime
  68501. } = this.parseDate(newVal);
  68502. this.singleVal = defDate;
  68503. this.tempSingleDate = defDate;
  68504. this.defSingleDate = defDate;
  68505. if (this.hasTime) {
  68506. this.singleVal = defDate + " " + defTime;
  68507. this.time = defTime;
  68508. }
  68509. } else {
  68510. const [before, after] = newVal;
  68511. if (!before && !after)
  68512. return;
  68513. const defBefore = this.parseDate(before);
  68514. const defAfter = this.parseDate(after);
  68515. const startDate = defBefore.defDate;
  68516. const endDate = defAfter.defDate;
  68517. this.range.startDate = this.tempRange.startDate = startDate;
  68518. this.range.endDate = this.tempRange.endDate = endDate;
  68519. if (this.hasTime) {
  68520. this.range.startDate = defBefore.defDate + " " + defBefore.defTime;
  68521. this.range.endDate = defAfter.defDate + " " + defAfter.defTime;
  68522. this.tempRange.startTime = defBefore.defTime;
  68523. this.tempRange.endTime = defAfter.defTime;
  68524. }
  68525. const defaultRange = {
  68526. before: defBefore.defDate,
  68527. after: defAfter.defDate
  68528. };
  68529. this.startMultipleStatus = Object.assign({}, this.startMultipleStatus, defaultRange, {
  68530. which: "right"
  68531. });
  68532. this.endMultipleStatus = Object.assign({}, this.endMultipleStatus, defaultRange, {
  68533. which: "left"
  68534. });
  68535. }
  68536. },
  68537. updateLeftCale(e2) {
  68538. const left = this.$refs.left;
  68539. left.cale.setHoverMultiple(e2.after);
  68540. left.setDate(this.$refs.left.nowDate.fullDate);
  68541. },
  68542. updateRightCale(e2) {
  68543. const right = this.$refs.right;
  68544. right.cale.setHoverMultiple(e2.after);
  68545. right.setDate(this.$refs.right.nowDate.fullDate);
  68546. },
  68547. platform() {
  68548. const systemInfo = uni.getSystemInfoSync();
  68549. this.isPhone = systemInfo.windowWidth <= 500;
  68550. this.windowWidth = systemInfo.windowWidth;
  68551. },
  68552. show(event) {
  68553. if (this.disabled) {
  68554. return;
  68555. }
  68556. this.platform();
  68557. if (this.isPhone) {
  68558. this.$refs.mobile.open();
  68559. return;
  68560. }
  68561. this.popover = {
  68562. top: "10px"
  68563. };
  68564. const dateEditor = uni.createSelectorQuery().in(this).select(".uni-date-editor");
  68565. dateEditor.boundingClientRect((rect) => {
  68566. if (this.windowWidth - rect.left < this.datePopupWidth) {
  68567. this.popover.right = 0;
  68568. }
  68569. }).exec();
  68570. setTimeout(() => {
  68571. this.popup = !this.popup;
  68572. if (!this.isPhone && this.isRange && this.isFirstShow) {
  68573. this.isFirstShow = false;
  68574. const {
  68575. startDate,
  68576. endDate
  68577. } = this.range;
  68578. if (startDate && endDate) {
  68579. if (this.diffDate(startDate, endDate) < 30) {
  68580. this.$refs.right.next();
  68581. }
  68582. } else {
  68583. this.$refs.right.next();
  68584. this.$refs.right.cale.lastHover = false;
  68585. }
  68586. }
  68587. }, 50);
  68588. },
  68589. close() {
  68590. setTimeout(() => {
  68591. this.popup = false;
  68592. this.$emit("maskClick", this.value);
  68593. }, 20);
  68594. },
  68595. setEmit(value) {
  68596. if (this.returnType === "timestamp" || this.returnType === "date") {
  68597. if (!Array.isArray(value)) {
  68598. if (!this.hasTime) {
  68599. value = value + " 00:00:00";
  68600. }
  68601. value = this.createTimestamp(value);
  68602. if (this.returnType === "date") {
  68603. value = new Date(value);
  68604. }
  68605. } else {
  68606. if (!this.hasTime) {
  68607. value[0] = value[0] + " 00:00:00";
  68608. value[1] = value[1] + " 00:00:00";
  68609. }
  68610. value[0] = this.createTimestamp(value[0]);
  68611. value[1] = this.createTimestamp(value[1]);
  68612. if (this.returnType === "date") {
  68613. value[0] = new Date(value[0]);
  68614. value[1] = new Date(value[1]);
  68615. }
  68616. }
  68617. }
  68618. this.formItem && this.formItem.setValue(value);
  68619. this.$emit("change", value);
  68620. this.$emit("input", value);
  68621. this.$emit("update:modelValue", value);
  68622. this.isEmitValue = true;
  68623. },
  68624. createTimestamp(date2) {
  68625. date2 = this.fixIosDateFormat(date2);
  68626. return Date.parse(new Date(date2));
  68627. },
  68628. singleChange(e2) {
  68629. this.tempSingleDate = e2.fulldate;
  68630. if (this.hasTime)
  68631. return;
  68632. this.confirmSingleChange();
  68633. },
  68634. confirmSingleChange() {
  68635. if (!this.tempSingleDate) {
  68636. this.popup = false;
  68637. return;
  68638. }
  68639. if (this.hasTime) {
  68640. this.singleVal = this.tempSingleDate + " " + (this.time ? this.time : "00:00:00");
  68641. } else {
  68642. this.singleVal = this.tempSingleDate;
  68643. }
  68644. this.setEmit(this.singleVal);
  68645. this.popup = false;
  68646. },
  68647. leftChange(e2) {
  68648. const {
  68649. before,
  68650. after
  68651. } = e2.range;
  68652. this.rangeChange(before, after);
  68653. const obj = {
  68654. before: e2.range.before,
  68655. after: e2.range.after,
  68656. data: e2.range.data,
  68657. fulldate: e2.fulldate
  68658. };
  68659. this.startMultipleStatus = Object.assign({}, this.startMultipleStatus, obj);
  68660. },
  68661. rightChange(e2) {
  68662. const {
  68663. before,
  68664. after
  68665. } = e2.range;
  68666. this.rangeChange(before, after);
  68667. const obj = {
  68668. before: e2.range.before,
  68669. after: e2.range.after,
  68670. data: e2.range.data,
  68671. fulldate: e2.fulldate
  68672. };
  68673. this.endMultipleStatus = Object.assign({}, this.endMultipleStatus, obj);
  68674. },
  68675. mobileChange(e2) {
  68676. if (this.isRange) {
  68677. const {
  68678. before,
  68679. after
  68680. } = e2.range;
  68681. this.handleStartAndEnd(before, after, true);
  68682. if (this.hasTime) {
  68683. const {
  68684. startTime,
  68685. endTime
  68686. } = e2.timeRange;
  68687. this.tempRange.startTime = startTime;
  68688. this.tempRange.endTime = endTime;
  68689. }
  68690. this.confirmRangeChange();
  68691. } else {
  68692. if (this.hasTime) {
  68693. this.singleVal = e2.fulldate + " " + e2.time;
  68694. } else {
  68695. this.singleVal = e2.fulldate;
  68696. }
  68697. this.setEmit(this.singleVal);
  68698. }
  68699. this.$refs.mobile.close();
  68700. },
  68701. rangeChange(before, after) {
  68702. if (!(before && after))
  68703. return;
  68704. this.handleStartAndEnd(before, after, true);
  68705. if (this.hasTime)
  68706. return;
  68707. this.confirmRangeChange();
  68708. },
  68709. confirmRangeChange() {
  68710. if (!this.tempRange.startDate && !this.tempRange.endDate) {
  68711. this.popup = false;
  68712. return;
  68713. }
  68714. let start, end;
  68715. if (!this.hasTime) {
  68716. start = this.range.startDate = this.tempRange.startDate;
  68717. end = this.range.endDate = this.tempRange.endDate;
  68718. } else {
  68719. start = this.range.startDate = this.tempRange.startDate + " " + (this.tempRange.startTime ? this.tempRange.startTime : "00:00:00");
  68720. end = this.range.endDate = this.tempRange.endDate + " " + (this.tempRange.endTime ? this.tempRange.endTime : "00:00:00");
  68721. }
  68722. const displayRange = [start, end];
  68723. this.setEmit(displayRange);
  68724. this.popup = false;
  68725. },
  68726. handleStartAndEnd(before, after, temp = false) {
  68727. if (!(before && after))
  68728. return;
  68729. const type = temp ? "tempRange" : "range";
  68730. if (this.dateCompare(before, after)) {
  68731. this[type].startDate = before;
  68732. this[type].endDate = after;
  68733. } else {
  68734. this[type].startDate = after;
  68735. this[type].endDate = before;
  68736. }
  68737. },
  68738. /**
  68739. * 比较时间大小
  68740. */
  68741. dateCompare(startDate, endDate) {
  68742. startDate = new Date(startDate.replace("-", "/").replace("-", "/"));
  68743. endDate = new Date(endDate.replace("-", "/").replace("-", "/"));
  68744. if (startDate <= endDate) {
  68745. return true;
  68746. } else {
  68747. return false;
  68748. }
  68749. },
  68750. /**
  68751. * 比较时间差
  68752. */
  68753. diffDate(startDate, endDate) {
  68754. startDate = new Date(startDate.replace("-", "/").replace("-", "/"));
  68755. endDate = new Date(endDate.replace("-", "/").replace("-", "/"));
  68756. const diff = (endDate - startDate) / (24 * 60 * 60 * 1e3);
  68757. return Math.abs(diff);
  68758. },
  68759. clear(needEmit = true) {
  68760. if (!this.isRange) {
  68761. this.singleVal = "";
  68762. this.tempSingleDate = "";
  68763. this.time = "";
  68764. if (this.isPhone) {
  68765. this.$refs.mobile && this.$refs.mobile.clearCalender();
  68766. } else {
  68767. this.$refs.pcSingle && this.$refs.pcSingle.clearCalender();
  68768. }
  68769. if (needEmit) {
  68770. this.formItem && this.formItem.setValue("");
  68771. this.$emit("change", "");
  68772. this.$emit("input", "");
  68773. this.$emit("update:modelValue", "");
  68774. }
  68775. } else {
  68776. this.range.startDate = "";
  68777. this.range.endDate = "";
  68778. this.tempRange.startDate = "";
  68779. this.tempRange.startTime = "";
  68780. this.tempRange.endDate = "";
  68781. this.tempRange.endTime = "";
  68782. if (this.isPhone) {
  68783. this.$refs.mobile && this.$refs.mobile.clearCalender();
  68784. } else {
  68785. this.$refs.left && this.$refs.left.clearCalender();
  68786. this.$refs.right && this.$refs.right.clearCalender();
  68787. this.$refs.right && this.$refs.right.next();
  68788. }
  68789. if (needEmit) {
  68790. this.formItem && this.formItem.setValue([]);
  68791. this.$emit("change", []);
  68792. this.$emit("input", []);
  68793. this.$emit("update:modelValue", []);
  68794. }
  68795. }
  68796. },
  68797. parseDate(date2) {
  68798. date2 = this.fixIosDateFormat(date2);
  68799. const defVal = new Date(date2);
  68800. const year = defVal.getFullYear();
  68801. const month = defVal.getMonth() + 1;
  68802. const day = defVal.getDate();
  68803. const hour = defVal.getHours();
  68804. const minute = defVal.getMinutes();
  68805. const second = defVal.getSeconds();
  68806. const defDate = year + "-" + this.lessTen(month) + "-" + this.lessTen(day);
  68807. const defTime = this.lessTen(hour) + ":" + this.lessTen(minute) + (this.hideSecond ? "" : ":" + this.lessTen(second));
  68808. return {
  68809. defDate,
  68810. defTime
  68811. };
  68812. },
  68813. lessTen(item) {
  68814. return item < 10 ? "0" + item : item;
  68815. },
  68816. //兼容 iOS、safari 日期格式
  68817. fixIosDateFormat(value) {
  68818. if (typeof value === "string") {
  68819. value = value.replace(/-/g, "/");
  68820. }
  68821. return value;
  68822. },
  68823. leftMonthSwitch(e2) {
  68824. },
  68825. rightMonthSwitch(e2) {
  68826. }
  68827. }
  68828. };
  68829. function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) {
  68830. const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$b);
  68831. const _component_time_picker = vue.resolveComponent("time-picker");
  68832. const _component_calendar = vue.resolveComponent("calendar");
  68833. return vue.openBlock(), vue.createElementBlock("view", { class: "uni-date" }, [
  68834. vue.createElementVNode("view", {
  68835. class: "uni-date-editor",
  68836. onClick: _cache[4] || (_cache[4] = (...args) => $options.show && $options.show(...args))
  68837. }, [
  68838. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  68839. vue.createElementVNode(
  68840. "view",
  68841. {
  68842. class: vue.normalizeClass(["uni-date-editor--x", {
  68843. "uni-date-editor--x__disabled": $props.disabled,
  68844. "uni-date-x--border": $props.border
  68845. }])
  68846. },
  68847. [
  68848. !$data.isRange ? (vue.openBlock(), vue.createElementBlock("view", {
  68849. key: 0,
  68850. class: "uni-date-x uni-date-single"
  68851. }, [
  68852. vue.createVNode(_component_uni_icons, {
  68853. type: "calendar",
  68854. color: "#e1e1e1",
  68855. size: "22"
  68856. }),
  68857. vue.withDirectives(vue.createElementVNode("input", {
  68858. class: "uni-date__x-input",
  68859. type: "text",
  68860. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.singleVal = $event),
  68861. placeholder: $options.singlePlaceholderText,
  68862. disabled: true
  68863. }, null, 8, ["placeholder"]), [
  68864. [vue.vModelText, $data.singleVal]
  68865. ])
  68866. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  68867. key: 1,
  68868. class: "uni-date-x uni-date-range"
  68869. }, [
  68870. vue.createVNode(_component_uni_icons, {
  68871. type: "calendar",
  68872. color: "#e1e1e1",
  68873. size: "22"
  68874. }),
  68875. vue.withDirectives(vue.createElementVNode("input", {
  68876. class: "uni-date__x-input t-c",
  68877. type: "text",
  68878. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.range.startDate = $event),
  68879. placeholder: $options.startPlaceholderText,
  68880. disabled: true
  68881. }, null, 8, ["placeholder"]), [
  68882. [vue.vModelText, $data.range.startDate]
  68883. ]),
  68884. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  68885. vue.createElementVNode(
  68886. "view",
  68887. { class: "" },
  68888. vue.toDisplayString($props.rangeSeparator),
  68889. 1
  68890. /* TEXT */
  68891. )
  68892. ], true),
  68893. vue.withDirectives(vue.createElementVNode("input", {
  68894. class: "uni-date__x-input t-c",
  68895. type: "text",
  68896. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.range.endDate = $event),
  68897. placeholder: $options.endPlaceholderText,
  68898. disabled: true
  68899. }, null, 8, ["placeholder"]), [
  68900. [vue.vModelText, $data.range.endDate]
  68901. ])
  68902. ])),
  68903. $options.showClearIcon ? (vue.openBlock(), vue.createElementBlock("view", {
  68904. key: 2,
  68905. class: "uni-date__icon-clear",
  68906. onClick: _cache[3] || (_cache[3] = vue.withModifiers((...args) => $options.clear && $options.clear(...args), ["stop"]))
  68907. }, [
  68908. vue.createVNode(_component_uni_icons, {
  68909. type: "clear",
  68910. color: "#e1e1e1",
  68911. size: "18"
  68912. })
  68913. ])) : vue.createCommentVNode("v-if", true)
  68914. ],
  68915. 2
  68916. /* CLASS */
  68917. )
  68918. ], true)
  68919. ]),
  68920. vue.withDirectives(vue.createElementVNode(
  68921. "view",
  68922. {
  68923. class: "uni-date-mask",
  68924. onClick: _cache[5] || (_cache[5] = (...args) => $options.close && $options.close(...args))
  68925. },
  68926. null,
  68927. 512
  68928. /* NEED_PATCH */
  68929. ), [
  68930. [vue.vShow, $data.popup]
  68931. ]),
  68932. !$data.isPhone ? vue.withDirectives((vue.openBlock(), vue.createElementBlock(
  68933. "view",
  68934. {
  68935. key: 0,
  68936. ref: "datePicker",
  68937. class: "uni-date-picker__container"
  68938. },
  68939. [
  68940. !$data.isRange ? (vue.openBlock(), vue.createElementBlock(
  68941. "view",
  68942. {
  68943. key: 0,
  68944. class: "uni-date-single--x",
  68945. style: vue.normalizeStyle($data.popover)
  68946. },
  68947. [
  68948. vue.createElementVNode("view", { class: "uni-popper__arrow" }),
  68949. $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  68950. key: 0,
  68951. class: "uni-date-changed popup-x-header"
  68952. }, [
  68953. vue.withDirectives(vue.createElementVNode("input", {
  68954. class: "uni-date__input t-c",
  68955. type: "text",
  68956. "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.tempSingleDate = $event),
  68957. placeholder: $options.selectDateText
  68958. }, null, 8, ["placeholder"]), [
  68959. [vue.vModelText, $data.tempSingleDate]
  68960. ]),
  68961. vue.createVNode(_component_time_picker, {
  68962. type: "time",
  68963. modelValue: $data.time,
  68964. "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $data.time = $event),
  68965. border: false,
  68966. disabled: !$data.tempSingleDate,
  68967. start: $options.reactStartTime,
  68968. end: $options.reactEndTime,
  68969. hideSecond: $props.hideSecond,
  68970. style: { "width": "100%" }
  68971. }, {
  68972. default: vue.withCtx(() => [
  68973. vue.withDirectives(vue.createElementVNode("input", {
  68974. class: "uni-date__input t-c",
  68975. type: "text",
  68976. "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $data.time = $event),
  68977. placeholder: $options.selectTimeText,
  68978. disabled: !$data.tempSingleDate
  68979. }, null, 8, ["placeholder", "disabled"]), [
  68980. [vue.vModelText, $data.time]
  68981. ])
  68982. ]),
  68983. _: 1
  68984. /* STABLE */
  68985. }, 8, ["modelValue", "disabled", "start", "end", "hideSecond"])
  68986. ])) : vue.createCommentVNode("v-if", true),
  68987. vue.createVNode(_component_calendar, {
  68988. ref: "pcSingle",
  68989. showMonth: false,
  68990. "start-date": $data.caleRange.startDate,
  68991. "end-date": $data.caleRange.endDate,
  68992. date: $data.defSingleDate,
  68993. onChange: $options.singleChange,
  68994. style: { "padding": "0 8px" }
  68995. }, null, 8, ["start-date", "end-date", "date", "onChange"]),
  68996. $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  68997. key: 1,
  68998. class: "popup-x-footer"
  68999. }, [
  69000. vue.createCommentVNode(' <text class="">此刻</text> '),
  69001. vue.createElementVNode(
  69002. "text",
  69003. {
  69004. class: "confirm",
  69005. onClick: _cache[9] || (_cache[9] = (...args) => $options.confirmSingleChange && $options.confirmSingleChange(...args))
  69006. },
  69007. vue.toDisplayString($options.okText),
  69008. 1
  69009. /* TEXT */
  69010. )
  69011. ])) : vue.createCommentVNode("v-if", true),
  69012. vue.createElementVNode("view", { class: "uni-date-popper__arrow" })
  69013. ],
  69014. 4
  69015. /* STYLE */
  69016. )) : (vue.openBlock(), vue.createElementBlock(
  69017. "view",
  69018. {
  69019. key: 1,
  69020. class: "uni-date-range--x",
  69021. style: vue.normalizeStyle($data.popover)
  69022. },
  69023. [
  69024. vue.createElementVNode("view", { class: "uni-popper__arrow" }),
  69025. $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  69026. key: 0,
  69027. class: "popup-x-header uni-date-changed"
  69028. }, [
  69029. vue.createElementVNode("view", { class: "popup-x-header--datetime" }, [
  69030. vue.withDirectives(vue.createElementVNode("input", {
  69031. class: "uni-date__input uni-date-range__input",
  69032. type: "text",
  69033. "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => $data.tempRange.startDate = $event),
  69034. placeholder: $options.startDateText
  69035. }, null, 8, ["placeholder"]), [
  69036. [vue.vModelText, $data.tempRange.startDate]
  69037. ]),
  69038. vue.createVNode(_component_time_picker, {
  69039. type: "time",
  69040. modelValue: $data.tempRange.startTime,
  69041. "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => $data.tempRange.startTime = $event),
  69042. start: $options.reactStartTime,
  69043. border: false,
  69044. disabled: !$data.tempRange.startDate,
  69045. hideSecond: $props.hideSecond
  69046. }, {
  69047. default: vue.withCtx(() => [
  69048. vue.withDirectives(vue.createElementVNode("input", {
  69049. class: "uni-date__input uni-date-range__input",
  69050. type: "text",
  69051. "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => $data.tempRange.startTime = $event),
  69052. placeholder: $options.startTimeText,
  69053. disabled: !$data.tempRange.startDate
  69054. }, null, 8, ["placeholder", "disabled"]), [
  69055. [vue.vModelText, $data.tempRange.startTime]
  69056. ])
  69057. ]),
  69058. _: 1
  69059. /* STABLE */
  69060. }, 8, ["modelValue", "start", "disabled", "hideSecond"])
  69061. ]),
  69062. vue.createVNode(_component_uni_icons, {
  69063. type: "arrowthinright",
  69064. color: "#999",
  69065. style: { "line-height": "40px" }
  69066. }),
  69067. vue.createElementVNode("view", { class: "popup-x-header--datetime" }, [
  69068. vue.withDirectives(vue.createElementVNode("input", {
  69069. class: "uni-date__input uni-date-range__input",
  69070. type: "text",
  69071. "onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => $data.tempRange.endDate = $event),
  69072. placeholder: $options.endDateText
  69073. }, null, 8, ["placeholder"]), [
  69074. [vue.vModelText, $data.tempRange.endDate]
  69075. ]),
  69076. vue.createVNode(_component_time_picker, {
  69077. type: "time",
  69078. modelValue: $data.tempRange.endTime,
  69079. "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => $data.tempRange.endTime = $event),
  69080. end: $options.reactEndTime,
  69081. border: false,
  69082. disabled: !$data.tempRange.endDate,
  69083. hideSecond: $props.hideSecond
  69084. }, {
  69085. default: vue.withCtx(() => [
  69086. vue.withDirectives(vue.createElementVNode("input", {
  69087. class: "uni-date__input uni-date-range__input",
  69088. type: "text",
  69089. "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => $data.tempRange.endTime = $event),
  69090. placeholder: $options.endTimeText,
  69091. disabled: !$data.tempRange.endDate
  69092. }, null, 8, ["placeholder", "disabled"]), [
  69093. [vue.vModelText, $data.tempRange.endTime]
  69094. ])
  69095. ]),
  69096. _: 1
  69097. /* STABLE */
  69098. }, 8, ["modelValue", "end", "disabled", "hideSecond"])
  69099. ])
  69100. ])) : vue.createCommentVNode("v-if", true),
  69101. vue.createElementVNode("view", { class: "popup-x-body" }, [
  69102. vue.createVNode(_component_calendar, {
  69103. ref: "left",
  69104. showMonth: false,
  69105. "start-date": $data.caleRange.startDate,
  69106. "end-date": $data.caleRange.endDate,
  69107. range: true,
  69108. onChange: $options.leftChange,
  69109. pleStatus: $data.endMultipleStatus,
  69110. onFirstEnterCale: $options.updateRightCale,
  69111. onMonthSwitch: $options.leftMonthSwitch,
  69112. style: { "padding": "0 8px" }
  69113. }, null, 8, ["start-date", "end-date", "onChange", "pleStatus", "onFirstEnterCale", "onMonthSwitch"]),
  69114. vue.createVNode(_component_calendar, {
  69115. ref: "right",
  69116. showMonth: false,
  69117. "start-date": $data.caleRange.startDate,
  69118. "end-date": $data.caleRange.endDate,
  69119. range: true,
  69120. onChange: $options.rightChange,
  69121. pleStatus: $data.startMultipleStatus,
  69122. onFirstEnterCale: $options.updateLeftCale,
  69123. onMonthSwitch: $options.rightMonthSwitch,
  69124. style: { "padding": "0 8px", "border-left": "1px solid #F1F1F1" }
  69125. }, null, 8, ["start-date", "end-date", "onChange", "pleStatus", "onFirstEnterCale", "onMonthSwitch"])
  69126. ]),
  69127. $data.hasTime ? (vue.openBlock(), vue.createElementBlock("view", {
  69128. key: 1,
  69129. class: "popup-x-footer"
  69130. }, [
  69131. vue.createElementVNode(
  69132. "text",
  69133. {
  69134. class: "",
  69135. onClick: _cache[16] || (_cache[16] = (...args) => $options.clear && $options.clear(...args))
  69136. },
  69137. vue.toDisplayString($options.clearText),
  69138. 1
  69139. /* TEXT */
  69140. ),
  69141. vue.createElementVNode(
  69142. "text",
  69143. {
  69144. class: "confirm",
  69145. onClick: _cache[17] || (_cache[17] = (...args) => $options.confirmRangeChange && $options.confirmRangeChange(...args))
  69146. },
  69147. vue.toDisplayString($options.okText),
  69148. 1
  69149. /* TEXT */
  69150. )
  69151. ])) : vue.createCommentVNode("v-if", true)
  69152. ],
  69153. 4
  69154. /* STYLE */
  69155. ))
  69156. ],
  69157. 512
  69158. /* NEED_PATCH */
  69159. )), [
  69160. [vue.vShow, $data.popup]
  69161. ]) : vue.createCommentVNode("v-if", true),
  69162. vue.withDirectives(vue.createVNode(_component_calendar, {
  69163. ref: "mobile",
  69164. clearDate: false,
  69165. date: $data.defSingleDate,
  69166. defTime: $options.reactMobDefTime,
  69167. "start-date": $data.caleRange.startDate,
  69168. "end-date": $data.caleRange.endDate,
  69169. selectableTimes: $options.mobSelectableTime,
  69170. pleStatus: $data.endMultipleStatus,
  69171. showMonth: false,
  69172. range: $data.isRange,
  69173. typeHasTime: $data.hasTime,
  69174. insert: false,
  69175. hideSecond: $props.hideSecond,
  69176. onConfirm: $options.mobileChange
  69177. }, null, 8, ["date", "defTime", "start-date", "end-date", "selectableTimes", "pleStatus", "range", "typeHasTime", "hideSecond", "onConfirm"]), [
  69178. [vue.vShow, $data.isPhone]
  69179. ])
  69180. ]);
  69181. }
  69182. const __easycom_0$3 = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_render$$], ["__scopeId", "data-v-9802168a"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue"]]);
  69183. const _sfc_main$$ = {
  69184. __name: "money",
  69185. setup(__props, { expose: __expose }) {
  69186. __expose();
  69187. vue.useCssVars((_ctx) => ({
  69188. "69f29528-headerBg": vue.unref(headerBg)
  69189. }));
  69190. const headerBg = sheep$1.$url.css("/static/img/shop/user/wallet_card_bg.png");
  69191. const state = vue.reactive({
  69192. showMoney: false,
  69193. date: [],
  69194. // 筛选的时间段
  69195. currentTab: 0,
  69196. pagination: {
  69197. list: [],
  69198. total: 0,
  69199. pageNo: 1,
  69200. pageSize: 8
  69201. },
  69202. summary: {
  69203. totalIncome: 0,
  69204. totalExpense: 0
  69205. },
  69206. loadStatus: "",
  69207. today: ""
  69208. });
  69209. const tabMaps = [
  69210. {
  69211. name: "全部",
  69212. value: ""
  69213. },
  69214. {
  69215. name: "收入",
  69216. value: "1"
  69217. },
  69218. {
  69219. name: "支出",
  69220. value: "2"
  69221. }
  69222. ];
  69223. const userWallet = vue.computed(() => sheep$1.$store("user").userWallet);
  69224. const dateFilterText = vue.computed(() => {
  69225. if (state.date[0] === state.date[1]) {
  69226. return state.date[0];
  69227. } else {
  69228. return state.date.join("~");
  69229. }
  69230. });
  69231. async function getLogList() {
  69232. state.loadStatus = "loading";
  69233. const { data, code: code2 } = await PayWalletApi.getWalletTransactionPage({
  69234. pageNo: state.pagination.pageNo,
  69235. pageSize: state.pagination.pageSize,
  69236. type: tabMaps[state.currentTab].value,
  69237. "createTime[0]": state.date[0] + " 00:00:00",
  69238. "createTime[1]": state.date[1] + " 23:59:59"
  69239. });
  69240. if (code2 !== 0) {
  69241. return;
  69242. }
  69243. state.pagination.list = _$1.concat(state.pagination.list, data.list);
  69244. state.pagination.total = data.total;
  69245. state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore";
  69246. }
  69247. async function getSummary() {
  69248. const { data, code: code2 } = await PayWalletApi.getWalletTransactionSummary({
  69249. "createTime": [state.date[0] + " 00:00:00", state.date[1] + " 23:59:59"]
  69250. });
  69251. if (code2 !== 0) {
  69252. return;
  69253. }
  69254. state.summary = data;
  69255. }
  69256. onLoad(() => {
  69257. state.today = dayjs().format("YYYY-MM-DD");
  69258. state.date = [state.today, state.today];
  69259. getLogList();
  69260. getSummary();
  69261. sheep$1.$store("user").getWallet();
  69262. });
  69263. function onChange(e2) {
  69264. state.currentTab = e2.index;
  69265. resetPagination(state.pagination);
  69266. getLogList();
  69267. getSummary();
  69268. }
  69269. function onChangeTime(e2) {
  69270. state.date[0] = e2[0];
  69271. state.date[1] = e2[e2.length - 1];
  69272. resetPagination(state.pagination);
  69273. getLogList();
  69274. getSummary();
  69275. }
  69276. onReachBottom(() => {
  69277. if (state.loadStatus === "noMore") {
  69278. return;
  69279. }
  69280. state.pagination.pageNo++;
  69281. getLogList();
  69282. });
  69283. const __returned__ = { headerBg, state, tabMaps, userWallet, dateFilterText, getLogList, getSummary, onChange, onChangeTime, computed: vue.computed, reactive: vue.reactive, get onLoad() {
  69284. return onLoad;
  69285. }, get onReachBottom() {
  69286. return onReachBottom;
  69287. }, get sheep() {
  69288. return sheep$1;
  69289. }, get dayjs() {
  69290. return dayjs;
  69291. }, get _() {
  69292. return _$1;
  69293. }, get PayWalletApi() {
  69294. return PayWalletApi;
  69295. }, get fen2yuan() {
  69296. return fen2yuan;
  69297. }, get resetPagination() {
  69298. return resetPagination;
  69299. } };
  69300. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  69301. return __returned__;
  69302. }
  69303. };
  69304. function _sfc_render$_(_ctx, _cache, $props, $setup, $data, $options) {
  69305. const _component_uni_datetime_picker = resolveEasycom(vue.resolveDynamicComponent("uni-datetime-picker"), __easycom_0$3);
  69306. const _component_su_tabs = resolveEasycom(vue.resolveDynamicComponent("su-tabs"), __easycom_0$a);
  69307. const _component_su_sticky = resolveEasycom(vue.resolveDynamicComponent("su-sticky"), __easycom_0$9);
  69308. const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6);
  69309. const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5);
  69310. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  69311. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  69312. class: "wallet-wrap",
  69313. title: "钱包"
  69314. }, {
  69315. default: vue.withCtx(() => [
  69316. vue.createCommentVNode(" 钱包卡片 "),
  69317. vue.createElementVNode("view", { class: "header-box ss-flex ss-row-center ss-col-center" }, [
  69318. vue.createElementVNode("view", { class: "card-box ui-BG-Main ui-Shadow-Main" }, [
  69319. vue.createElementVNode("view", { class: "card-head ss-flex ss-col-center" }, [
  69320. vue.createElementVNode("view", { class: "card-title ss-m-r-10" }, "钱包余额(元)"),
  69321. vue.createElementVNode(
  69322. "view",
  69323. {
  69324. onClick: _cache[0] || (_cache[0] = ($event) => $setup.state.showMoney = !$setup.state.showMoney),
  69325. class: vue.normalizeClass(["ss-eye-icon", $setup.state.showMoney ? "cicon-eye" : "cicon-eye-off"])
  69326. },
  69327. null,
  69328. 2
  69329. /* CLASS */
  69330. )
  69331. ]),
  69332. vue.createElementVNode("view", { class: "ss-flex ss-row-between ss-col-center ss-m-t-64" }, [
  69333. vue.createElementVNode(
  69334. "view",
  69335. { class: "money-num" },
  69336. vue.toDisplayString($setup.state.showMoney ? $setup.fen2yuan($setup.userWallet.balance) : "*****"),
  69337. 1
  69338. /* TEXT */
  69339. ),
  69340. vue.createElementVNode("button", {
  69341. class: "ss-reset-button topup-btn",
  69342. onClick: _cache[1] || (_cache[1] = ($event) => $setup.sheep.$router.go("/pages/pay/recharge"))
  69343. }, " 充值 ")
  69344. ])
  69345. ])
  69346. ]),
  69347. vue.createVNode(_component_su_sticky, null, {
  69348. default: vue.withCtx(() => [
  69349. vue.createCommentVNode(" 统计 "),
  69350. vue.createElementVNode("view", { class: "filter-box ss-p-x-30 ss-flex ss-col-center ss-row-between" }, [
  69351. vue.createVNode(_component_uni_datetime_picker, {
  69352. modelValue: $setup.state.data,
  69353. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.data = $event),
  69354. type: "daterange",
  69355. onChange: $setup.onChangeTime,
  69356. end: $setup.state.today
  69357. }, {
  69358. default: vue.withCtx(() => [
  69359. vue.createElementVNode("button", { class: "ss-reset-button date-btn" }, [
  69360. vue.createElementVNode(
  69361. "text",
  69362. null,
  69363. vue.toDisplayString($setup.dateFilterText),
  69364. 1
  69365. /* TEXT */
  69366. ),
  69367. vue.createElementVNode("text", { class: "cicon-drop-down ss-seldate-icon" })
  69368. ])
  69369. ]),
  69370. _: 1
  69371. /* STABLE */
  69372. }, 8, ["modelValue", "end"]),
  69373. vue.createElementVNode("view", { class: "total-box" }, [
  69374. vue.createElementVNode(
  69375. "view",
  69376. { class: "ss-m-b-10" },
  69377. "总收入¥" + vue.toDisplayString($setup.fen2yuan($setup.state.summary.totalIncome)),
  69378. 1
  69379. /* TEXT */
  69380. ),
  69381. vue.createElementVNode(
  69382. "view",
  69383. null,
  69384. "总支出¥" + vue.toDisplayString($setup.fen2yuan($setup.state.summary.totalExpense)),
  69385. 1
  69386. /* TEXT */
  69387. )
  69388. ])
  69389. ]),
  69390. vue.createVNode(_component_su_tabs, {
  69391. list: $setup.tabMaps,
  69392. onChange: $setup.onChange,
  69393. scrollable: false,
  69394. current: $setup.state.currentTab
  69395. }, null, 8, ["current"])
  69396. ]),
  69397. _: 1
  69398. /* STABLE */
  69399. }),
  69400. $setup.state.pagination.total === 0 ? (vue.openBlock(), vue.createBlock(_component_s_empty, {
  69401. key: 0,
  69402. text: "暂无数据",
  69403. icon: "/static/data-empty.png"
  69404. })) : vue.createCommentVNode("v-if", true),
  69405. vue.createCommentVNode(" 钱包记录 "),
  69406. $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1 }, [
  69407. (vue.openBlock(true), vue.createElementBlock(
  69408. vue.Fragment,
  69409. null,
  69410. vue.renderList($setup.state.pagination.list, (item) => {
  69411. return vue.openBlock(), vue.createElementBlock("view", {
  69412. class: "wallet-list ss-flex border-bottom",
  69413. key: item.id
  69414. }, [
  69415. vue.createElementVNode("view", { class: "list-content" }, [
  69416. vue.createElementVNode("view", { class: "title-box ss-flex ss-row-between ss-m-b-20" }, [
  69417. vue.createElementVNode(
  69418. "text",
  69419. { class: "title ss-line-1" },
  69420. vue.toDisplayString(item.title),
  69421. 1
  69422. /* TEXT */
  69423. ),
  69424. vue.createElementVNode("view", { class: "money" }, [
  69425. item.price >= 0 ? (vue.openBlock(), vue.createElementBlock(
  69426. "text",
  69427. {
  69428. key: 0,
  69429. class: "add"
  69430. },
  69431. "+" + vue.toDisplayString($setup.fen2yuan(item.price)),
  69432. 1
  69433. /* TEXT */
  69434. )) : (vue.openBlock(), vue.createElementBlock(
  69435. "text",
  69436. {
  69437. key: 1,
  69438. class: "minus"
  69439. },
  69440. vue.toDisplayString($setup.fen2yuan(item.price)),
  69441. 1
  69442. /* TEXT */
  69443. ))
  69444. ])
  69445. ]),
  69446. vue.createElementVNode(
  69447. "text",
  69448. { class: "time" },
  69449. vue.toDisplayString($setup.sheep.$helper.timeFormat($setup.state.createTime, "yyyy-mm-dd hh:MM:ss")),
  69450. 1
  69451. /* TEXT */
  69452. )
  69453. ])
  69454. ]);
  69455. }),
  69456. 128
  69457. /* KEYED_FRAGMENT */
  69458. ))
  69459. ])) : vue.createCommentVNode("v-if", true),
  69460. $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, {
  69461. key: 2,
  69462. status: $setup.state.loadStatus,
  69463. "content-text": {
  69464. contentdown: "上拉加载更多"
  69465. }
  69466. }, null, 8, ["status"])) : vue.createCommentVNode("v-if", true)
  69467. ]),
  69468. _: 1
  69469. /* STABLE */
  69470. });
  69471. }
  69472. const PagesUserWalletMoney = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["render", _sfc_render$_], ["__scopeId", "data-v-69f29528"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/wallet/money.vue"]]);
  69473. const _sfc_main$_ = {
  69474. __name: "ScoreLog",
  69475. props: {
  69476. isFreeze: {
  69477. type: String,
  69478. default: ""
  69479. }
  69480. },
  69481. setup(__props, { expose: __expose }) {
  69482. __expose();
  69483. const userWallet = vue.computed(() => sheep$1.$store("user").userWallet);
  69484. const statusBarHeight = sheep$1.$platform.device.statusBarHeight * 2;
  69485. const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo);
  69486. const sys_navBar = sheep$1.$platform.navbar;
  69487. const props = __props;
  69488. const state = vue.reactive({
  69489. currentTab: 0,
  69490. pagination: {
  69491. list: [],
  69492. total: 0,
  69493. pageSize: 10,
  69494. pageNo: 1
  69495. },
  69496. loadStatus: "",
  69497. showModel: false,
  69498. showQueModel: false
  69499. });
  69500. async function getLogList(isFreeze) {
  69501. state.loadStatus = "loading";
  69502. let {
  69503. code: code2,
  69504. data
  69505. } = await ScoreApi.getScoreApi({
  69506. pageNo: state.pagination.pageNo,
  69507. pageSize: state.pagination.pageSize,
  69508. isFreeze
  69509. });
  69510. if (code2 !== 0) {
  69511. return;
  69512. }
  69513. let list = _$1.concat(state.pagination.list, data.list);
  69514. state.pagination.list = list;
  69515. state.pagination.total = data.total;
  69516. state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore";
  69517. }
  69518. const title = (item) => {
  69519. let title2 = item.profitStatusName + "";
  69520. if (item.username) {
  69521. title2 += "(" + item.username + ")";
  69522. }
  69523. if ([3].includes(item.profitStatus) && props.isFreeze == "false" && item.ancestorQuotaAmount) {
  69524. title2 += "(" + t$6("wallet.exceed_limit") + ":" + points2point(item.ancestorQuotaAmount) + ")";
  69525. }
  69526. if ([22].includes(item.profitStatus) && props.isFreeze == "false" && item.accumulatedQuotaAmount) {
  69527. title2 += "(" + t$6("wallet.exceed_limit") + ":" + points2point(item.accumulatedQuotaAmount) + ")";
  69528. }
  69529. return title2;
  69530. };
  69531. function onLoadMore(isFreeze) {
  69532. if (state.loadStatus === "noMore") {
  69533. return;
  69534. }
  69535. state.pagination.pageNo++;
  69536. getLogList(props.isFreeze);
  69537. }
  69538. onReachBottom(() => {
  69539. onLoadMore();
  69540. });
  69541. onLoad(() => {
  69542. getLogList(props.isFreeze);
  69543. });
  69544. const __returned__ = { userWallet, statusBarHeight, userInfo: userInfo2, sys_navBar, props, state, getLogList, title, onLoadMore, get sheep() {
  69545. return sheep$1;
  69546. }, get onLoad() {
  69547. return onLoad;
  69548. }, get onReachBottom() {
  69549. return onReachBottom;
  69550. }, computed: vue.computed, reactive: vue.reactive, get points2point() {
  69551. return points2point;
  69552. }, get _() {
  69553. return _$1;
  69554. }, get dayjs() {
  69555. return dayjs;
  69556. }, get PointApi() {
  69557. return PointApi;
  69558. }, get resetPagination() {
  69559. return resetPagination;
  69560. }, get ScoreApi() {
  69561. return ScoreApi;
  69562. }, get t() {
  69563. return t$6;
  69564. } };
  69565. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  69566. return __returned__;
  69567. }
  69568. };
  69569. function _sfc_render$Z(_ctx, _cache, $props, $setup, $data, $options) {
  69570. const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6);
  69571. const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5);
  69572. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  69573. return vue.openBlock(), vue.createElementBlock(
  69574. vue.Fragment,
  69575. null,
  69576. [
  69577. vue.createCommentVNode(" 佣金确权 "),
  69578. vue.createVNode(_component_s_layout, {
  69579. class: "wallet-wrap",
  69580. bgStyle: { "backgroundColor": "#ffffff" },
  69581. title: "",
  69582. navbar: "normal"
  69583. }, {
  69584. default: vue.withCtx(() => [
  69585. vue.createElementVNode("view", { class: "model-box ss-flex-col" }, [
  69586. vue.createElementVNode(
  69587. "scroll-view",
  69588. {
  69589. class: "list-box",
  69590. "scroll-y": "true",
  69591. onTouchmove: _cache[2] || (_cache[2] = vue.withModifiers(() => {
  69592. }, ["stop"]))
  69593. },
  69594. [
  69595. $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  69596. key: 0,
  69597. style: { "padding": "20rpx" }
  69598. }, [
  69599. (vue.openBlock(true), vue.createElementBlock(
  69600. vue.Fragment,
  69601. null,
  69602. vue.renderList($setup.state.pagination.list, (item, index2) => {
  69603. return vue.openBlock(), vue.createElementBlock("view", {
  69604. class: "list-item ss-flex ss-col-center ss-row-between",
  69605. key: item.id,
  69606. style: { "padding": "20rpx 0", "border-bottom": "1px solid #c4c4c4" }
  69607. }, [
  69608. vue.createElementVNode("view", {
  69609. class: "ss-flex ss-col-center",
  69610. style: { "width": "100%" }
  69611. }, [
  69612. vue.createElementVNode("view", {
  69613. class: "ss-flex ss-m-t-10",
  69614. style: { "flex-direction": "column", "align-items": "flex-start", "width": "100%" }
  69615. }, [
  69616. vue.createElementVNode("view", {
  69617. class: "name",
  69618. style: { "width": "100%" }
  69619. }, [
  69620. vue.createTextVNode(
  69621. vue.toDisplayString($setup.title(item)) + " ",
  69622. 1
  69623. /* TEXT */
  69624. ),
  69625. $props.isFreeze == "true" ? (vue.openBlock(), vue.createElementBlock(
  69626. "text",
  69627. {
  69628. key: 0,
  69629. style: { "float": "right" },
  69630. class: vue.normalizeClass(["color-red", { "color-green": item.freezeAmount < 0 }])
  69631. },
  69632. vue.toDisplayString(item.freezeAmount > 0 ? "+" + $setup.points2point(item.freezeAmount) : $setup.points2point(item.freezeAmount)),
  69633. 3
  69634. /* TEXT, CLASS */
  69635. )) : (vue.openBlock(), vue.createElementBlock(
  69636. "text",
  69637. {
  69638. key: 1,
  69639. style: { "float": "right" },
  69640. class: vue.normalizeClass(["color-red", { "color-green": item.amount < 0 }])
  69641. },
  69642. vue.toDisplayString(item.amount > 0 ? "+" + $setup.points2point(item.amount) : $setup.points2point(item.amount)),
  69643. 3
  69644. /* TEXT, CLASS */
  69645. ))
  69646. ]),
  69647. vue.createElementVNode("view", {
  69648. class: "time",
  69649. style: { "width": "100%" }
  69650. }, [
  69651. vue.createTextVNode(
  69652. vue.toDisplayString($setup.sheep.$helper.timeFormat(item.createTime, "yyyy-mm-dd hh:MM")) + " ",
  69653. 1
  69654. /* TEXT */
  69655. ),
  69656. vue.createCommentVNode(" 冻结佣金 "),
  69657. $props.isFreeze == "true" ? (vue.openBlock(), vue.createElementBlock(
  69658. "text",
  69659. {
  69660. key: 0,
  69661. style: { "float": "right" }
  69662. },
  69663. vue.toDisplayString($setup.t("wallet.balance")) + ":" + vue.toDisplayString($setup.points2point(item.afterFreezeAmount)),
  69664. 1
  69665. /* TEXT */
  69666. )) : (vue.openBlock(), vue.createElementBlock(
  69667. "text",
  69668. {
  69669. key: 1,
  69670. style: { "float": "right" }
  69671. },
  69672. vue.toDisplayString($setup.t("wallet.balance")) + ":" + vue.toDisplayString($setup.points2point(item.afterAmount)),
  69673. 1
  69674. /* TEXT */
  69675. ))
  69676. ])
  69677. ])
  69678. ])
  69679. ]);
  69680. }),
  69681. 128
  69682. /* KEYED_FRAGMENT */
  69683. ))
  69684. ])) : (vue.openBlock(), vue.createBlock(_component_s_empty, {
  69685. key: 1,
  69686. text: "暂无数据",
  69687. paddingTop: "200",
  69688. icon: "/static/data-empty.png"
  69689. })),
  69690. $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, {
  69691. key: 2,
  69692. status: $setup.state.loadStatus,
  69693. "content-text": {
  69694. contentdown: $setup.t("common.click_to_load_more")
  69695. },
  69696. onClick: _cache[0] || (_cache[0] = ($event) => $setup.onLoadMore(true)),
  69697. onScrolltolower: _cache[1] || (_cache[1] = ($event) => $setup.onLoadMore(true))
  69698. }, null, 8, ["status", "content-text"])) : vue.createCommentVNode("v-if", true)
  69699. ],
  69700. 32
  69701. /* NEED_HYDRATION */
  69702. )
  69703. ])
  69704. ]),
  69705. _: 1
  69706. /* STABLE */
  69707. })
  69708. ],
  69709. 2112
  69710. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  69711. );
  69712. }
  69713. const PagesUserWalletScoreLog = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["render", _sfc_render$Z], ["__scopeId", "data-v-ccce11dc"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/wallet/ScoreLog.vue"]]);
  69714. const _sfc_main$Z = {
  69715. __name: "score",
  69716. setup(__props, { expose: __expose }) {
  69717. __expose();
  69718. const userWallet = vue.computed(() => sheep$1.$store("user").userWallet);
  69719. const statusBarHeight = sheep$1.$platform.device.statusBarHeight * 2;
  69720. const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo);
  69721. const sys_navBar = sheep$1.$platform.navbar;
  69722. const state = vue.reactive({
  69723. currentTab: 0,
  69724. pagination: {
  69725. list: [],
  69726. total: 0,
  69727. pageSize: 10,
  69728. pageNo: 1
  69729. },
  69730. loadStatus: "",
  69731. showModel: false
  69732. });
  69733. function close() {
  69734. state.showModel = false;
  69735. }
  69736. const pointsPercentage = vue.computed(() => {
  69737. const currentQuota = parseFloat(points2point(userWallet.value.integralDO.accumulatedQuota + userWallet.value.integralDO.ancestorQuota));
  69738. const highQuotaTotal = parseFloat(points2point(userWallet.value.integralDO.highQuotaTotal));
  69739. const percentage = currentQuota / highQuotaTotal * 100;
  69740. return Math.min(percentage, 100);
  69741. });
  69742. const percentageColor = vue.computed(() => {
  69743. if (pointsPercentage.value >= 90) {
  69744. return "#fe0000";
  69745. } else if (pointsPercentage.value >= 75) {
  69746. return "#d8b800";
  69747. } else {
  69748. return "#0c912f";
  69749. }
  69750. });
  69751. const circleStyle = vue.computed(() => {
  69752. return {
  69753. // background: `conic-gradient(${percentageColor.value} ${pointsPercentage.value}%, #ddd ${pointsPercentage.value}%)`
  69754. background: percentageColor.value
  69755. };
  69756. });
  69757. onLoad((options2) => {
  69758. uni.$on("createWithDrawComplete", sheep$1.$store("user").getWallet);
  69759. uni.$on("consumptionTransfersComplete", sheep$1.$store("user").getWallet);
  69760. });
  69761. const __returned__ = { userWallet, statusBarHeight, userInfo: userInfo2, sys_navBar, state, close, pointsPercentage, percentageColor, circleStyle, get sheep() {
  69762. return sheep$1;
  69763. }, get onLoad() {
  69764. return onLoad;
  69765. }, get onReachBottom() {
  69766. return onReachBottom;
  69767. }, computed: vue.computed, reactive: vue.reactive, get points2point() {
  69768. return points2point;
  69769. }, get _() {
  69770. return _$1;
  69771. }, get dayjs() {
  69772. return dayjs;
  69773. }, get PointApi() {
  69774. return PointApi;
  69775. }, get resetPagination() {
  69776. return resetPagination;
  69777. }, get ScoreApi() {
  69778. return ScoreApi;
  69779. }, get ScoreLog() {
  69780. return PagesUserWalletScoreLog;
  69781. }, get richtext() {
  69782. return PagesPublicRichtext;
  69783. }, get t() {
  69784. return t$6;
  69785. } };
  69786. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  69787. return __returned__;
  69788. }
  69789. };
  69790. function _sfc_render$Y(_ctx, _cache, $props, $setup, $data, $options) {
  69791. const _component_uni_list_item = resolveEasycom(vue.resolveDynamicComponent("uni-list-item"), __easycom_0$i);
  69792. const _component_uni_list = resolveEasycom(vue.resolveDynamicComponent("uni-list"), __easycom_1$6);
  69793. const _component_su_popup = resolveEasycom(vue.resolveDynamicComponent("su-popup"), __easycom_4$3);
  69794. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  69795. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  69796. class: "wallet-wrap",
  69797. bgStyle: { "backgroundColor": "#ffffff" },
  69798. title: $setup.t("wallet.wallet"),
  69799. navbar: "normal"
  69800. }, {
  69801. default: vue.withCtx(() => [
  69802. vue.createElementVNode("view", { class: "score-box bg-white ss-flex-col ss-row-center ss-col-center" }, [
  69803. vue.createElementVNode("view", { class: "ss-flex ss-m-y-30 w-100" }, [
  69804. vue.createElementVNode("view", {
  69805. class: "ss-flex",
  69806. style: { "flex-direction": "column", "flex": "1", "border-right": "1px solid #f6f6f6" }
  69807. }, [
  69808. vue.createElementVNode(
  69809. "view",
  69810. {
  69811. class: "ss-m-b-10 circle value-box ss-flex ss-row-center",
  69812. style: vue.normalizeStyle($setup.circleStyle)
  69813. },
  69814. [
  69815. vue.createElementVNode(
  69816. "view",
  69817. null,
  69818. vue.toDisplayString($setup.t("wallet.commission")),
  69819. 1
  69820. /* TEXT */
  69821. )
  69822. ],
  69823. 4
  69824. /* STYLE */
  69825. ),
  69826. vue.createElementVNode(
  69827. "view",
  69828. {
  69829. class: "ss-m-b-30 ss-font-40",
  69830. style: vue.normalizeStyle({ color: $setup.percentageColor })
  69831. },
  69832. [
  69833. vue.createElementVNode(
  69834. "text",
  69835. { class: "all-title ss-m-r-8" },
  69836. vue.toDisplayString($setup.points2point($setup.userWallet.integralDO.currentQuota)),
  69837. 1
  69838. /* TEXT */
  69839. )
  69840. ],
  69841. 4
  69842. /* STYLE */
  69843. ),
  69844. vue.createElementVNode("view", { class: "ss-flex" }, [
  69845. vue.createElementVNode("view", { class: "all-title ss-m-r-8" }, [
  69846. vue.createElementVNode(
  69847. "button",
  69848. {
  69849. class: "btn ss-reset-button",
  69850. onClick: _cache[0] || (_cache[0] = ($event) => $setup.sheep.$router.go("/pages/user/wallet/withdraw"))
  69851. },
  69852. vue.toDisplayString($setup.t("wallet.withdraw")),
  69853. 1
  69854. /* TEXT */
  69855. )
  69856. ]),
  69857. vue.createElementVNode("view", { class: "all-title ss-m-r-8" }, [
  69858. vue.createElementVNode(
  69859. "button",
  69860. {
  69861. class: "btn ss-reset-button",
  69862. onClick: _cache[1] || (_cache[1] = ($event) => $setup.sheep.$router.go("/pages/user/wallet/scoreToConsumption"))
  69863. },
  69864. vue.toDisplayString($setup.t("wallet.transfer_points")),
  69865. 1
  69866. /* TEXT */
  69867. )
  69868. ])
  69869. ])
  69870. ]),
  69871. vue.createElementVNode("view", {
  69872. class: "ss-flex",
  69873. style: { "flex-direction": "column", "flex": "1" }
  69874. }, [
  69875. vue.createElementVNode("view", {
  69876. class: "ss-m-b-10 circle value-box ss-flex ss-row-center",
  69877. style: { "background": "#0c912f" }
  69878. }, [
  69879. vue.createElementVNode(
  69880. "view",
  69881. null,
  69882. vue.toDisplayString($setup.t("wallet.consumption_points")),
  69883. 1
  69884. /* TEXT */
  69885. )
  69886. ]),
  69887. vue.createElementVNode("view", {
  69888. class: "ss-m-b-30 ss-font-40",
  69889. style: { "color": "#0c912f" }
  69890. }, [
  69891. vue.createElementVNode(
  69892. "text",
  69893. { class: "all-title ss-m-r-8" },
  69894. vue.toDisplayString($setup.points2point($setup.userWallet.integralDO.consumptionPoints)),
  69895. 1
  69896. /* TEXT */
  69897. )
  69898. ]),
  69899. vue.createElementVNode("view", { class: "ss-flex" }, [
  69900. vue.createElementVNode("view", { class: "all-title ss-m-x-8" }, [
  69901. vue.createElementVNode(
  69902. "button",
  69903. {
  69904. class: "btn ss-reset-button",
  69905. onClick: _cache[2] || (_cache[2] = ($event) => $setup.sheep.$router.go("/pages/user/wallet/topupConsumptionPoints"))
  69906. },
  69907. vue.toDisplayString($setup.t("wallet.recharge")),
  69908. 1
  69909. /* TEXT */
  69910. )
  69911. ]),
  69912. vue.createElementVNode("view", { class: "all-title ss-m-x-8" }, [
  69913. vue.createElementVNode(
  69914. "button",
  69915. {
  69916. class: "btn ss-reset-button",
  69917. onClick: _cache[3] || (_cache[3] = ($event) => $setup.sheep.$router.go("/pages/user/wallet/consumptionTransfers"))
  69918. },
  69919. vue.toDisplayString($setup.t("wallet.points_transfer")),
  69920. 1
  69921. /* TEXT */
  69922. )
  69923. ])
  69924. ])
  69925. ])
  69926. ]),
  69927. vue.createCommentVNode(" 分割线 "),
  69928. vue.createElementVNode("view", { style: { "width": "100%", "height": "20rpx", "background-color": "#ececec" } }),
  69929. vue.createVNode(_component_uni_list, {
  69930. border: false,
  69931. class: "ss-p-t-10 ss-w-100"
  69932. }, {
  69933. default: vue.withCtx(() => [
  69934. vue.createVNode(_component_uni_list_item, {
  69935. clickable: "",
  69936. onClick: _cache[4] || (_cache[4] = ($event) => $setup.sheep.$router.go("/pages/user/wallet/maxScoreLog")),
  69937. title: "当前可获得峰值",
  69938. showArrow: "",
  69939. border: false
  69940. }, {
  69941. body: vue.withCtx(() => [
  69942. vue.createElementVNode(
  69943. "p",
  69944. { style: { "width": "100%" } },
  69945. vue.toDisplayString($setup.t("wallet.current_peak") + $setup.points2point($setup.userWallet.integralDO.accumulatedQuota + $setup.userWallet.integralDO.ancestorQuota)) + "/" + vue.toDisplayString($setup.points2point($setup.userWallet.integralDO.highQuotaTotal)),
  69946. 1
  69947. /* TEXT */
  69948. )
  69949. ]),
  69950. _: 1
  69951. /* STABLE */
  69952. }),
  69953. vue.createCommentVNode(` <uni-list-item clickable @tap="sheep.$router.go('/pages/user/wallet/ScoreLog', {isFreeze: true})"
  69954. title="待确权" showArrow :border="false">
  69955. <template v-slot:body>
  69956. <p style="width: 100%">待确权:{{points2point(userWallet.integralDO.freezeQuota)}}</p>
  69957. </template>
  69958. </uni-list-item> `),
  69959. vue.createVNode(_component_uni_list_item, {
  69960. clickable: "",
  69961. onClick: _cache[5] || (_cache[5] = ($event) => $setup.sheep.$router.go("/pages/user/wallet/ScoreLog", { isFreeze: false })),
  69962. title: "佣金记录",
  69963. showArrow: "",
  69964. border: false
  69965. }, {
  69966. body: vue.withCtx(() => [
  69967. vue.createElementVNode(
  69968. "p",
  69969. { style: { "width": "100%" } },
  69970. vue.toDisplayString($setup.t("wallet.commission_record")),
  69971. 1
  69972. /* TEXT */
  69973. )
  69974. ]),
  69975. _: 1
  69976. /* STABLE */
  69977. }),
  69978. vue.createVNode(_component_uni_list_item, {
  69979. clickable: "",
  69980. onClick: _cache[6] || (_cache[6] = ($event) => $setup.sheep.$router.go("/pages/user/wallet/consumptionLog")),
  69981. title: "消费分记录",
  69982. showArrow: "",
  69983. border: false
  69984. }, {
  69985. body: vue.withCtx(() => [
  69986. vue.createElementVNode(
  69987. "p",
  69988. { style: { "width": "100%" } },
  69989. vue.toDisplayString($setup.t("wallet.points_record")),
  69990. 1
  69991. /* TEXT */
  69992. )
  69993. ]),
  69994. _: 1
  69995. /* STABLE */
  69996. }),
  69997. vue.createCommentVNode(` <uni-list-item clickable @tap="sheep.$router.go('/pages/user/wallet/consumptionTransfersLog')"
  69998. title="消费分转账" showArrow :border="false">
  69999. <template v-slot:body>
  70000. <p style="width: 100%">消费分转账</p>
  70001. </template>
  70002. </uni-list-item> `),
  70003. vue.createVNode(_component_uni_list_item, {
  70004. clickable: "",
  70005. onClick: _cache[7] || (_cache[7] = ($event) => $setup.sheep.$router.go("/pages/user/wallet/withdrawalLog")),
  70006. title: "提现记录",
  70007. showArrow: "",
  70008. border: false
  70009. }, {
  70010. body: vue.withCtx(() => [
  70011. vue.createElementVNode(
  70012. "p",
  70013. { style: { "width": "100%" } },
  70014. vue.toDisplayString($setup.t("wallet.withdrawal")),
  70015. 1
  70016. /* TEXT */
  70017. )
  70018. ]),
  70019. _: 1
  70020. /* STABLE */
  70021. }),
  70022. vue.createVNode(_component_uni_list_item, {
  70023. clickable: "",
  70024. onClick: _cache[8] || (_cache[8] = ($event) => $setup.state.showModel = true),
  70025. title: "佣金计算规则",
  70026. border: false
  70027. }, {
  70028. body: vue.withCtx(() => [
  70029. vue.createElementVNode(
  70030. "p",
  70031. { style: { "width": "100%" } },
  70032. vue.toDisplayString($setup.t("wallet.commission_rules")),
  70033. 1
  70034. /* TEXT */
  70035. )
  70036. ]),
  70037. _: 1
  70038. /* STABLE */
  70039. })
  70040. ]),
  70041. _: 1
  70042. /* STABLE */
  70043. })
  70044. ]),
  70045. vue.createCommentVNode(" 佣金计算规则 "),
  70046. vue.createVNode(_component_su_popup, {
  70047. show: $setup.state.showModel,
  70048. type: "center",
  70049. round: "10",
  70050. isMaskClick: false,
  70051. showClose: "",
  70052. onClose: $setup.close
  70053. }, {
  70054. default: vue.withCtx(() => [
  70055. vue.createElementVNode("view", { class: "head-nav" }, [
  70056. vue.createElementVNode(
  70057. "view",
  70058. {
  70059. class: vue.normalizeClass([$setup.state.navIndex == 0 ? "activite" : "", "ss-m-l-20"]),
  70060. onClick: _cache[9] || (_cache[9] = ($event) => _ctx.checkIndex(0))
  70061. },
  70062. vue.toDisplayString($setup.t("wallet.commission_rules")),
  70063. 3
  70064. /* TEXT, CLASS */
  70065. )
  70066. ]),
  70067. vue.createElementVNode("scroll-view", {
  70068. class: "scroll-view_H",
  70069. "scroll-y": "true"
  70070. }, [
  70071. vue.createVNode($setup["richtext"], {
  70072. title: "佣金计算规则",
  70073. type: "tab"
  70074. })
  70075. ])
  70076. ]),
  70077. _: 1
  70078. /* STABLE */
  70079. }, 8, ["show"])
  70080. ]),
  70081. _: 1
  70082. /* STABLE */
  70083. }, 8, ["title"]);
  70084. }
  70085. const PagesUserWalletScore = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["render", _sfc_render$Y], ["__scopeId", "data-v-aa108703"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/wallet/score.vue"]]);
  70086. const _sfc_main$Y = {
  70087. __name: "consumptionLog",
  70088. setup(__props, { expose: __expose }) {
  70089. __expose();
  70090. const userWallet = vue.computed(() => sheep$1.$store("user").userWallet);
  70091. const statusBarHeight = sheep$1.$platform.device.statusBarHeight * 2;
  70092. const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo);
  70093. const sys_navBar = sheep$1.$platform.navbar;
  70094. const state = vue.reactive({
  70095. currentTab: 0,
  70096. pagination: {
  70097. list: [],
  70098. total: 0,
  70099. pageSize: 10,
  70100. pageNo: 1
  70101. },
  70102. loadStatus: "",
  70103. showModel: false,
  70104. showQueModel: false
  70105. });
  70106. async function getLogList() {
  70107. state.loadStatus = "loading";
  70108. let {
  70109. code: code2,
  70110. data
  70111. } = await ConsumptionApi.getConsumptionLog({
  70112. pageNo: state.pagination.pageNo,
  70113. pageSize: state.pagination.pageSize
  70114. });
  70115. if (code2 !== 0) {
  70116. return;
  70117. }
  70118. let list = _$1.concat(state.pagination.list, data.list);
  70119. state.pagination.list = list;
  70120. state.pagination.total = data.total;
  70121. state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore";
  70122. }
  70123. const title = (item) => {
  70124. let title2 = item.profitStatusName + "";
  70125. if (item.username) {
  70126. title2 += "(" + item.username + ")";
  70127. }
  70128. return title2;
  70129. };
  70130. function onLoadMore(isFreeze) {
  70131. if (state.loadStatus === "noMore") {
  70132. return;
  70133. }
  70134. state.pagination.pageNo++;
  70135. getLogList();
  70136. }
  70137. onReachBottom(() => {
  70138. onLoadMore();
  70139. });
  70140. onLoad(() => {
  70141. getLogList();
  70142. });
  70143. const __returned__ = { userWallet, statusBarHeight, userInfo: userInfo2, sys_navBar, state, getLogList, title, onLoadMore, get sheep() {
  70144. return sheep$1;
  70145. }, get onLoad() {
  70146. return onLoad;
  70147. }, get onReachBottom() {
  70148. return onReachBottom;
  70149. }, computed: vue.computed, reactive: vue.reactive, get points2point() {
  70150. return points2point;
  70151. }, get _() {
  70152. return _$1;
  70153. }, get dayjs() {
  70154. return dayjs;
  70155. }, get PointApi() {
  70156. return PointApi;
  70157. }, get resetPagination() {
  70158. return resetPagination;
  70159. }, get ConsumptionApi() {
  70160. return ConsumptionApi;
  70161. }, get t() {
  70162. return t$6;
  70163. } };
  70164. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  70165. return __returned__;
  70166. }
  70167. };
  70168. function _sfc_render$X(_ctx, _cache, $props, $setup, $data, $options) {
  70169. const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6);
  70170. const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5);
  70171. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  70172. return vue.openBlock(), vue.createElementBlock(
  70173. vue.Fragment,
  70174. null,
  70175. [
  70176. vue.createCommentVNode(" 消费分来源 "),
  70177. vue.createVNode(_component_s_layout, {
  70178. class: "wallet-wrap",
  70179. bgStyle: { "backgroundColor": "#ffffff" },
  70180. title: "",
  70181. navbar: "normal"
  70182. }, {
  70183. default: vue.withCtx(() => [
  70184. vue.createElementVNode("view", { class: "model-box ss-flex-col" }, [
  70185. vue.createElementVNode(
  70186. "scroll-view",
  70187. {
  70188. class: "list-box",
  70189. "scroll-y": "true",
  70190. onTouchmove: _cache[2] || (_cache[2] = vue.withModifiers(() => {
  70191. }, ["stop"]))
  70192. },
  70193. [
  70194. $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  70195. key: 0,
  70196. style: { "padding": "20rpx" }
  70197. }, [
  70198. (vue.openBlock(true), vue.createElementBlock(
  70199. vue.Fragment,
  70200. null,
  70201. vue.renderList($setup.state.pagination.list, (item, index2) => {
  70202. return vue.openBlock(), vue.createElementBlock("view", {
  70203. class: "list-item ss-flex ss-col-center ss-row-between",
  70204. key: item.id,
  70205. style: { "padding": "20rpx 0", "border-bottom": "1px solid #c4c4c4" }
  70206. }, [
  70207. vue.createElementVNode("view", {
  70208. class: "ss-flex ss-col-center",
  70209. style: { "width": "100%" }
  70210. }, [
  70211. vue.createElementVNode("view", {
  70212. class: "ss-flex ss-m-t-10",
  70213. style: { "flex-direction": "column", "align-items": "flex-start", "width": "100%" }
  70214. }, [
  70215. vue.createElementVNode("view", {
  70216. class: "name",
  70217. style: { "width": "100%" }
  70218. }, [
  70219. vue.createTextVNode(
  70220. vue.toDisplayString(item.consumptionStatusName) + vue.toDisplayString([3, 4].includes(item.consumptionStatus) ? "(" + item.generateUserName + ")" : "") + " " + vue.toDisplayString(item.consumptionStatus === 1 ? "(" + $setup.t("wallet.balance") + ":" + $setup.points2point(item.practicalConsumptionPoints) + ")" : "") + " ",
  70221. 1
  70222. /* TEXT */
  70223. ),
  70224. vue.createElementVNode(
  70225. "text",
  70226. {
  70227. style: { "float": "right" },
  70228. class: vue.normalizeClass(["color-red", { "color-green": item.consumptionPoints < 0 }])
  70229. },
  70230. vue.toDisplayString(item.consumptionPoints > 0 ? "+" + $setup.points2point(item.consumptionPoints) : $setup.points2point(item.consumptionPoints)),
  70231. 3
  70232. /* TEXT, CLASS */
  70233. )
  70234. ]),
  70235. vue.createElementVNode("view", {
  70236. class: "time",
  70237. style: { "width": "100%" }
  70238. }, [
  70239. vue.createTextVNode(
  70240. vue.toDisplayString($setup.sheep.$helper.timeFormat(item.createTime, "yyyy-mm-dd hh:MM")) + " ",
  70241. 1
  70242. /* TEXT */
  70243. ),
  70244. vue.createElementVNode(
  70245. "text",
  70246. { style: { "float": "right" } },
  70247. vue.toDisplayString($setup.t("wallet.balance")) + ":" + vue.toDisplayString($setup.points2point(item.afterConsumptionPoints)),
  70248. 1
  70249. /* TEXT */
  70250. )
  70251. ])
  70252. ])
  70253. ])
  70254. ]);
  70255. }),
  70256. 128
  70257. /* KEYED_FRAGMENT */
  70258. ))
  70259. ])) : (vue.openBlock(), vue.createBlock(_component_s_empty, {
  70260. key: 1,
  70261. text: "暂无数据",
  70262. paddingTop: "200",
  70263. icon: "/static/data-empty.png"
  70264. })),
  70265. $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, {
  70266. key: 2,
  70267. status: $setup.state.loadStatus,
  70268. "content-text": {
  70269. contentdown: $setup.t("common.click_to_load_more")
  70270. },
  70271. onClick: _cache[0] || (_cache[0] = ($event) => $setup.onLoadMore(true)),
  70272. onScrolltolower: _cache[1] || (_cache[1] = ($event) => $setup.onLoadMore(true))
  70273. }, null, 8, ["status", "content-text"])) : vue.createCommentVNode("v-if", true)
  70274. ],
  70275. 32
  70276. /* NEED_HYDRATION */
  70277. )
  70278. ])
  70279. ]),
  70280. _: 1
  70281. /* STABLE */
  70282. })
  70283. ],
  70284. 2112
  70285. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  70286. );
  70287. }
  70288. const PagesUserWalletConsumptionLog = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["render", _sfc_render$X], ["__scopeId", "data-v-663b1435"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/wallet/consumptionLog.vue"]]);
  70289. var md5$1 = { exports: {} };
  70290. (function(module) {
  70291. (function($2) {
  70292. function safeAdd(x, y2) {
  70293. var lsw = (x & 65535) + (y2 & 65535);
  70294. var msw = (x >> 16) + (y2 >> 16) + (lsw >> 16);
  70295. return msw << 16 | lsw & 65535;
  70296. }
  70297. function bitRotateLeft(num, cnt) {
  70298. return num << cnt | num >>> 32 - cnt;
  70299. }
  70300. function md5cmn(q2, a2, b2, x, s2, t2) {
  70301. return safeAdd(bitRotateLeft(safeAdd(safeAdd(a2, q2), safeAdd(x, t2)), s2), b2);
  70302. }
  70303. function md5ff(a2, b2, c2, d2, x, s2, t2) {
  70304. return md5cmn(b2 & c2 | ~b2 & d2, a2, b2, x, s2, t2);
  70305. }
  70306. function md5gg(a2, b2, c2, d2, x, s2, t2) {
  70307. return md5cmn(b2 & d2 | c2 & ~d2, a2, b2, x, s2, t2);
  70308. }
  70309. function md5hh(a2, b2, c2, d2, x, s2, t2) {
  70310. return md5cmn(b2 ^ c2 ^ d2, a2, b2, x, s2, t2);
  70311. }
  70312. function md5ii(a2, b2, c2, d2, x, s2, t2) {
  70313. return md5cmn(c2 ^ (b2 | ~d2), a2, b2, x, s2, t2);
  70314. }
  70315. function binlMD5(x, len) {
  70316. x[len >> 5] |= 128 << len % 32;
  70317. x[(len + 64 >>> 9 << 4) + 14] = len;
  70318. var i2;
  70319. var olda;
  70320. var oldb;
  70321. var oldc;
  70322. var oldd;
  70323. var a2 = 1732584193;
  70324. var b2 = -271733879;
  70325. var c2 = -1732584194;
  70326. var d2 = 271733878;
  70327. for (i2 = 0; i2 < x.length; i2 += 16) {
  70328. olda = a2;
  70329. oldb = b2;
  70330. oldc = c2;
  70331. oldd = d2;
  70332. a2 = md5ff(a2, b2, c2, d2, x[i2], 7, -680876936);
  70333. d2 = md5ff(d2, a2, b2, c2, x[i2 + 1], 12, -389564586);
  70334. c2 = md5ff(c2, d2, a2, b2, x[i2 + 2], 17, 606105819);
  70335. b2 = md5ff(b2, c2, d2, a2, x[i2 + 3], 22, -1044525330);
  70336. a2 = md5ff(a2, b2, c2, d2, x[i2 + 4], 7, -176418897);
  70337. d2 = md5ff(d2, a2, b2, c2, x[i2 + 5], 12, 1200080426);
  70338. c2 = md5ff(c2, d2, a2, b2, x[i2 + 6], 17, -1473231341);
  70339. b2 = md5ff(b2, c2, d2, a2, x[i2 + 7], 22, -45705983);
  70340. a2 = md5ff(a2, b2, c2, d2, x[i2 + 8], 7, 1770035416);
  70341. d2 = md5ff(d2, a2, b2, c2, x[i2 + 9], 12, -1958414417);
  70342. c2 = md5ff(c2, d2, a2, b2, x[i2 + 10], 17, -42063);
  70343. b2 = md5ff(b2, c2, d2, a2, x[i2 + 11], 22, -1990404162);
  70344. a2 = md5ff(a2, b2, c2, d2, x[i2 + 12], 7, 1804603682);
  70345. d2 = md5ff(d2, a2, b2, c2, x[i2 + 13], 12, -40341101);
  70346. c2 = md5ff(c2, d2, a2, b2, x[i2 + 14], 17, -1502002290);
  70347. b2 = md5ff(b2, c2, d2, a2, x[i2 + 15], 22, 1236535329);
  70348. a2 = md5gg(a2, b2, c2, d2, x[i2 + 1], 5, -165796510);
  70349. d2 = md5gg(d2, a2, b2, c2, x[i2 + 6], 9, -1069501632);
  70350. c2 = md5gg(c2, d2, a2, b2, x[i2 + 11], 14, 643717713);
  70351. b2 = md5gg(b2, c2, d2, a2, x[i2], 20, -373897302);
  70352. a2 = md5gg(a2, b2, c2, d2, x[i2 + 5], 5, -701558691);
  70353. d2 = md5gg(d2, a2, b2, c2, x[i2 + 10], 9, 38016083);
  70354. c2 = md5gg(c2, d2, a2, b2, x[i2 + 15], 14, -660478335);
  70355. b2 = md5gg(b2, c2, d2, a2, x[i2 + 4], 20, -405537848);
  70356. a2 = md5gg(a2, b2, c2, d2, x[i2 + 9], 5, 568446438);
  70357. d2 = md5gg(d2, a2, b2, c2, x[i2 + 14], 9, -1019803690);
  70358. c2 = md5gg(c2, d2, a2, b2, x[i2 + 3], 14, -187363961);
  70359. b2 = md5gg(b2, c2, d2, a2, x[i2 + 8], 20, 1163531501);
  70360. a2 = md5gg(a2, b2, c2, d2, x[i2 + 13], 5, -1444681467);
  70361. d2 = md5gg(d2, a2, b2, c2, x[i2 + 2], 9, -51403784);
  70362. c2 = md5gg(c2, d2, a2, b2, x[i2 + 7], 14, 1735328473);
  70363. b2 = md5gg(b2, c2, d2, a2, x[i2 + 12], 20, -1926607734);
  70364. a2 = md5hh(a2, b2, c2, d2, x[i2 + 5], 4, -378558);
  70365. d2 = md5hh(d2, a2, b2, c2, x[i2 + 8], 11, -2022574463);
  70366. c2 = md5hh(c2, d2, a2, b2, x[i2 + 11], 16, 1839030562);
  70367. b2 = md5hh(b2, c2, d2, a2, x[i2 + 14], 23, -35309556);
  70368. a2 = md5hh(a2, b2, c2, d2, x[i2 + 1], 4, -1530992060);
  70369. d2 = md5hh(d2, a2, b2, c2, x[i2 + 4], 11, 1272893353);
  70370. c2 = md5hh(c2, d2, a2, b2, x[i2 + 7], 16, -155497632);
  70371. b2 = md5hh(b2, c2, d2, a2, x[i2 + 10], 23, -1094730640);
  70372. a2 = md5hh(a2, b2, c2, d2, x[i2 + 13], 4, 681279174);
  70373. d2 = md5hh(d2, a2, b2, c2, x[i2], 11, -358537222);
  70374. c2 = md5hh(c2, d2, a2, b2, x[i2 + 3], 16, -722521979);
  70375. b2 = md5hh(b2, c2, d2, a2, x[i2 + 6], 23, 76029189);
  70376. a2 = md5hh(a2, b2, c2, d2, x[i2 + 9], 4, -640364487);
  70377. d2 = md5hh(d2, a2, b2, c2, x[i2 + 12], 11, -421815835);
  70378. c2 = md5hh(c2, d2, a2, b2, x[i2 + 15], 16, 530742520);
  70379. b2 = md5hh(b2, c2, d2, a2, x[i2 + 2], 23, -995338651);
  70380. a2 = md5ii(a2, b2, c2, d2, x[i2], 6, -198630844);
  70381. d2 = md5ii(d2, a2, b2, c2, x[i2 + 7], 10, 1126891415);
  70382. c2 = md5ii(c2, d2, a2, b2, x[i2 + 14], 15, -1416354905);
  70383. b2 = md5ii(b2, c2, d2, a2, x[i2 + 5], 21, -57434055);
  70384. a2 = md5ii(a2, b2, c2, d2, x[i2 + 12], 6, 1700485571);
  70385. d2 = md5ii(d2, a2, b2, c2, x[i2 + 3], 10, -1894986606);
  70386. c2 = md5ii(c2, d2, a2, b2, x[i2 + 10], 15, -1051523);
  70387. b2 = md5ii(b2, c2, d2, a2, x[i2 + 1], 21, -2054922799);
  70388. a2 = md5ii(a2, b2, c2, d2, x[i2 + 8], 6, 1873313359);
  70389. d2 = md5ii(d2, a2, b2, c2, x[i2 + 15], 10, -30611744);
  70390. c2 = md5ii(c2, d2, a2, b2, x[i2 + 6], 15, -1560198380);
  70391. b2 = md5ii(b2, c2, d2, a2, x[i2 + 13], 21, 1309151649);
  70392. a2 = md5ii(a2, b2, c2, d2, x[i2 + 4], 6, -145523070);
  70393. d2 = md5ii(d2, a2, b2, c2, x[i2 + 11], 10, -1120210379);
  70394. c2 = md5ii(c2, d2, a2, b2, x[i2 + 2], 15, 718787259);
  70395. b2 = md5ii(b2, c2, d2, a2, x[i2 + 9], 21, -343485551);
  70396. a2 = safeAdd(a2, olda);
  70397. b2 = safeAdd(b2, oldb);
  70398. c2 = safeAdd(c2, oldc);
  70399. d2 = safeAdd(d2, oldd);
  70400. }
  70401. return [a2, b2, c2, d2];
  70402. }
  70403. function binl2rstr(input) {
  70404. var i2;
  70405. var output = "";
  70406. var length32 = input.length * 32;
  70407. for (i2 = 0; i2 < length32; i2 += 8) {
  70408. output += String.fromCharCode(input[i2 >> 5] >>> i2 % 32 & 255);
  70409. }
  70410. return output;
  70411. }
  70412. function rstr2binl(input) {
  70413. var i2;
  70414. var output = [];
  70415. output[(input.length >> 2) - 1] = void 0;
  70416. for (i2 = 0; i2 < output.length; i2 += 1) {
  70417. output[i2] = 0;
  70418. }
  70419. var length8 = input.length * 8;
  70420. for (i2 = 0; i2 < length8; i2 += 8) {
  70421. output[i2 >> 5] |= (input.charCodeAt(i2 / 8) & 255) << i2 % 32;
  70422. }
  70423. return output;
  70424. }
  70425. function rstrMD5(s2) {
  70426. return binl2rstr(binlMD5(rstr2binl(s2), s2.length * 8));
  70427. }
  70428. function rstrHMACMD5(key, data) {
  70429. var i2;
  70430. var bkey = rstr2binl(key);
  70431. var ipad = [];
  70432. var opad = [];
  70433. var hash;
  70434. ipad[15] = opad[15] = void 0;
  70435. if (bkey.length > 16) {
  70436. bkey = binlMD5(bkey, key.length * 8);
  70437. }
  70438. for (i2 = 0; i2 < 16; i2 += 1) {
  70439. ipad[i2] = bkey[i2] ^ 909522486;
  70440. opad[i2] = bkey[i2] ^ 1549556828;
  70441. }
  70442. hash = binlMD5(ipad.concat(rstr2binl(data)), 512 + data.length * 8);
  70443. return binl2rstr(binlMD5(opad.concat(hash), 512 + 128));
  70444. }
  70445. function rstr2hex(input) {
  70446. var hexTab = "0123456789abcdef";
  70447. var output = "";
  70448. var x;
  70449. var i2;
  70450. for (i2 = 0; i2 < input.length; i2 += 1) {
  70451. x = input.charCodeAt(i2);
  70452. output += hexTab.charAt(x >>> 4 & 15) + hexTab.charAt(x & 15);
  70453. }
  70454. return output;
  70455. }
  70456. function str2rstrUTF8(input) {
  70457. return unescape(encodeURIComponent(input));
  70458. }
  70459. function rawMD5(s2) {
  70460. return rstrMD5(str2rstrUTF8(s2));
  70461. }
  70462. function hexMD5(s2) {
  70463. return rstr2hex(rawMD5(s2));
  70464. }
  70465. function rawHMACMD5(k, d2) {
  70466. return rstrHMACMD5(str2rstrUTF8(k), str2rstrUTF8(d2));
  70467. }
  70468. function hexHMACMD5(k, d2) {
  70469. return rstr2hex(rawHMACMD5(k, d2));
  70470. }
  70471. function md52(string, key, raw) {
  70472. if (!key) {
  70473. if (!raw) {
  70474. return hexMD5(string);
  70475. }
  70476. return rawMD5(string);
  70477. }
  70478. if (!raw) {
  70479. return hexHMACMD5(key, string);
  70480. }
  70481. return rawHMACMD5(key, string);
  70482. }
  70483. if (module.exports) {
  70484. module.exports = md52;
  70485. } else {
  70486. $2.md5 = md52;
  70487. }
  70488. })(commonjsGlobal);
  70489. })(md5$1);
  70490. var md5Exports = md5$1.exports;
  70491. const md5 = /* @__PURE__ */ getDefaultExportFromCjs(md5Exports);
  70492. const _sfc_main$X = {
  70493. __name: "topupConsumptionPoints",
  70494. setup(__props, { expose: __expose }) {
  70495. __expose();
  70496. const userWallet = vue.computed(() => sheep$1.$store("user").userWallet);
  70497. const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo);
  70498. const state = vue.reactive({
  70499. model: {},
  70500. payPrice: void 0,
  70501. percentage: {
  70502. consumptionMagnification: 0,
  70503. userTopUpConsumptionPoints: 0,
  70504. triggerMagnificationPoints: 0
  70505. }
  70506. });
  70507. const consumption = vue.computed(() => {
  70508. if (!state.payPrice) {
  70509. return 0;
  70510. }
  70511. let result2;
  70512. if (state.payPrice >= parseFloat(state.percentage.triggerMagnificationPoints)) {
  70513. result2 = (parseFloat(state.percentage.consumptionMagnification) * state.payPrice).toFixed(2);
  70514. } else {
  70515. result2 = state.payPrice;
  70516. }
  70517. return result2;
  70518. });
  70519. async function validateInput(value) {
  70520. const strPoints = value.toString();
  70521. const [integerPart, decimalPart] = strPoints.split(".");
  70522. if (decimalPart) {
  70523. vue.nextTick(() => {
  70524. });
  70525. }
  70526. }
  70527. const submit = async () => {
  70528. if (!state.payPrice) {
  70529. sheep$1.$helper.toast(t$6("wallet.enter_recharge_amount"));
  70530. return;
  70531. }
  70532. if (parseFloat(state.payPrice) < state.percentage.userTopUpConsumptionPoints) {
  70533. sheep$1.$helper.toast(t$6("wallet.recharge_amount_less_than", { point: state.percentage.userTopUpConsumptionPoints }));
  70534. return;
  70535. }
  70536. let {
  70537. code: code2,
  70538. data
  70539. } = await PayWalletApi.topupConsumptionPointsCreate({
  70540. payPrice: state.payPrice,
  70541. topUpConsumptionPoints: state.payPrice,
  70542. userName: userInfo2.value.username
  70543. });
  70544. if (code2 === 0) {
  70545. sheep$1.$router.redirect("/pages/pay/index", {
  70546. id: data.payOrderId,
  70547. type: 2
  70548. });
  70549. }
  70550. };
  70551. const getpercentage = async () => {
  70552. const {
  70553. code: code2,
  70554. data
  70555. } = await WithdrawalApi.getWithdrawalPercentage();
  70556. if (code2 === 0) {
  70557. state.percentage = data;
  70558. }
  70559. };
  70560. onLoad(async (options2) => {
  70561. await getpercentage();
  70562. });
  70563. const __returned__ = { userWallet, userInfo: userInfo2, state, consumption, validateInput, submit, getpercentage, computed: vue.computed, reactive: vue.reactive, watchEffect: vue.watchEffect, nextTick: vue.nextTick, onUnmounted: vue.onUnmounted, get onLoad() {
  70564. return onLoad;
  70565. }, get sheep() {
  70566. return sheep$1;
  70567. }, get clone() {
  70568. return lodashExports.clone;
  70569. }, get fen2yuan() {
  70570. return fen2yuan;
  70571. }, get points2point() {
  70572. return points2point;
  70573. }, get md5() {
  70574. return md5;
  70575. }, get PayWalletApi() {
  70576. return PayWalletApi;
  70577. }, get WithdrawalApi() {
  70578. return WithdrawalApi;
  70579. }, get showAuthModal() {
  70580. return showAuthModal;
  70581. }, get showShareModal() {
  70582. return showShareModal;
  70583. }, get t() {
  70584. return t$6;
  70585. } };
  70586. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  70587. return __returned__;
  70588. }
  70589. };
  70590. function _sfc_render$W(_ctx, _cache, $props, $setup, $data, $options) {
  70591. const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l);
  70592. const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9);
  70593. const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7);
  70594. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  70595. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  70596. title: $setup.t("wallet.points_recharge")
  70597. }, {
  70598. default: vue.withCtx(() => [
  70599. vue.createElementVNode("view", { class: "bg-white ss-modal-box ss-flex-col" }, [
  70600. vue.createCommentVNode(" 提现金额 "),
  70601. vue.createElementVNode("view", { class: "modal-content ss-m-t-30" }, [
  70602. vue.createVNode(_component_uni_forms, {
  70603. model: $setup.state.model,
  70604. rules: $setup.state.rules,
  70605. validateTrigger: "bind",
  70606. labelPosition: "left",
  70607. border: "",
  70608. class: "form-box",
  70609. labelWidth: "200",
  70610. ref: "FormRef"
  70611. }, {
  70612. default: vue.withCtx(() => [
  70613. vue.createElementVNode("view", { class: "bg-white ss-p-x-30" }, [
  70614. vue.createVNode(_component_uni_forms_item, {
  70615. name: "quota",
  70616. label: $setup.t("wallet.recharge_amount"),
  70617. required: true
  70618. }, {
  70619. default: vue.withCtx(() => [
  70620. vue.createVNode(_component_uni_easyinput, {
  70621. modelValue: $setup.state.payPrice,
  70622. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.state.payPrice = $event),
  70623. type: "number",
  70624. placeholder: $setup.t("wallet.enter_recharge_amount"),
  70625. inputBorder: false,
  70626. clearable: false,
  70627. onInput: $setup.validateInput,
  70628. maxlength: 9
  70629. }, null, 8, ["modelValue", "placeholder"])
  70630. ]),
  70631. _: 1
  70632. /* STABLE */
  70633. }, 8, ["label"]),
  70634. vue.createVNode(_component_uni_forms_item, {
  70635. name: "quota",
  70636. label: $setup.t("wallet.actual_points_received")
  70637. }, {
  70638. default: vue.withCtx(() => [
  70639. vue.createElementVNode(
  70640. "view",
  70641. { class: "ss-flex ss-h-100" },
  70642. vue.toDisplayString($setup.consumption),
  70643. 1
  70644. /* TEXT */
  70645. )
  70646. ]),
  70647. _: 1
  70648. /* STABLE */
  70649. }, 8, ["label"])
  70650. ])
  70651. ]),
  70652. _: 1
  70653. /* STABLE */
  70654. }, 8, ["model", "rules"]),
  70655. vue.createElementVNode(
  70656. "view",
  70657. { class: "ss-flex ss-row-center ss-col-center ss-m-t-30 text-red text-center" },
  70658. vue.toDisplayString($setup.t("wallet.note_recharge_bonus", { amount: $setup.state.percentage.triggerMagnificationPoints, multiplier: parseFloat($setup.state.percentage.consumptionMagnification) })),
  70659. 1
  70660. /* TEXT */
  70661. )
  70662. ]),
  70663. vue.createElementVNode("view", { class: "modal-footer ss-flex ss-row-center ss-col-center ss-m-t-80 ss-m-b-40 ss-flex-5" }, [
  70664. vue.createElementVNode(
  70665. "button",
  70666. {
  70667. class: "ss-reset-button save-btn",
  70668. onClick: $setup.submit
  70669. },
  70670. vue.toDisplayString($setup.t("common.confirm")),
  70671. 1
  70672. /* TEXT */
  70673. )
  70674. ])
  70675. ])
  70676. ]),
  70677. _: 1
  70678. /* STABLE */
  70679. }, 8, ["title"]);
  70680. }
  70681. const PagesUserWalletTopupConsumptionPoints = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["render", _sfc_render$W], ["__scopeId", "data-v-b526252b"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/wallet/topupConsumptionPoints.vue"]]);
  70682. const _sfc_main$W = {
  70683. __name: "consumptionTransfersLog",
  70684. setup(__props, { expose: __expose }) {
  70685. __expose();
  70686. const userWallet = vue.computed(() => sheep$1.$store("user").userWallet);
  70687. const statusBarHeight = sheep$1.$platform.device.statusBarHeight * 2;
  70688. const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo);
  70689. const sys_navBar = sheep$1.$platform.navbar;
  70690. const state = vue.reactive({
  70691. currentTab: 0,
  70692. pagination: {
  70693. list: [],
  70694. total: 0,
  70695. pageSize: 10,
  70696. pageNo: 1
  70697. },
  70698. loadStatus: "",
  70699. showModel: false,
  70700. showQueModel: false
  70701. });
  70702. async function getLogList() {
  70703. state.loadStatus = "loading";
  70704. let {
  70705. code: code2,
  70706. data
  70707. } = await ConsumptionApi.getConsumptionTransfersLog({
  70708. pageNo: state.pagination.pageNo,
  70709. pageSize: state.pagination.pageSize
  70710. });
  70711. if (code2 !== 0) {
  70712. return;
  70713. }
  70714. let list = _$1.concat(state.pagination.list, data.list);
  70715. state.pagination.list = list;
  70716. state.pagination.total = data.total;
  70717. state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore";
  70718. }
  70719. const currentUserId = userWallet.value.integralDO.userId;
  70720. const formatChangeValue = (item) => {
  70721. if (currentUserId === item.recipientUserId) {
  70722. return points2point(item.recipientPoints);
  70723. } else {
  70724. return points2point(item.consumptionPoints);
  70725. }
  70726. };
  70727. const formatValue = (item) => {
  70728. if (currentUserId === item.recipientUserId) {
  70729. return points2point(item.afterRecipientConsumptionPoints);
  70730. } else {
  70731. return points2point(item.afterTransferConsumptionPoints);
  70732. }
  70733. };
  70734. function onLoadMore(isFreeze) {
  70735. if (state.loadStatus === "noMore") {
  70736. return;
  70737. }
  70738. state.pagination.pageNo++;
  70739. getLogList();
  70740. }
  70741. onReachBottom(() => {
  70742. onLoadMore();
  70743. });
  70744. onLoad(() => {
  70745. getLogList();
  70746. });
  70747. const __returned__ = { userWallet, statusBarHeight, userInfo: userInfo2, sys_navBar, state, getLogList, currentUserId, formatChangeValue, formatValue, onLoadMore, get sheep() {
  70748. return sheep$1;
  70749. }, get onLoad() {
  70750. return onLoad;
  70751. }, get onReachBottom() {
  70752. return onReachBottom;
  70753. }, computed: vue.computed, reactive: vue.reactive, get points2point() {
  70754. return points2point;
  70755. }, get _() {
  70756. return _$1;
  70757. }, get dayjs() {
  70758. return dayjs;
  70759. }, get PointApi() {
  70760. return PointApi;
  70761. }, get resetPagination() {
  70762. return resetPagination;
  70763. }, get ConsumptionApi() {
  70764. return ConsumptionApi;
  70765. } };
  70766. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  70767. return __returned__;
  70768. }
  70769. };
  70770. function _sfc_render$V(_ctx, _cache, $props, $setup, $data, $options) {
  70771. const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6);
  70772. const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5);
  70773. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  70774. return vue.openBlock(), vue.createElementBlock(
  70775. vue.Fragment,
  70776. null,
  70777. [
  70778. vue.createCommentVNode(" 消费分转账 "),
  70779. vue.createVNode(_component_s_layout, {
  70780. class: "wallet-wrap",
  70781. bgStyle: { "backgroundColor": "#ffffff" },
  70782. title: "",
  70783. navbar: "normal"
  70784. }, {
  70785. default: vue.withCtx(() => [
  70786. vue.createElementVNode("view", { class: "model-box ss-flex-col" }, [
  70787. vue.createElementVNode(
  70788. "scroll-view",
  70789. {
  70790. class: "list-box",
  70791. "scroll-y": "true",
  70792. onTouchmove: _cache[2] || (_cache[2] = vue.withModifiers(() => {
  70793. }, ["stop"]))
  70794. },
  70795. [
  70796. $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  70797. key: 0,
  70798. style: { "padding": "20rpx" }
  70799. }, [
  70800. (vue.openBlock(true), vue.createElementBlock(
  70801. vue.Fragment,
  70802. null,
  70803. vue.renderList($setup.state.pagination.list, (item, index2) => {
  70804. return vue.openBlock(), vue.createElementBlock("view", {
  70805. class: "list-item ss-flex ss-col-center ss-row-between",
  70806. key: item.id,
  70807. style: { "padding": "20rpx 0", "border-bottom": "1px solid #c4c4c4" }
  70808. }, [
  70809. vue.createElementVNode("view", {
  70810. class: "ss-flex ss-col-center",
  70811. style: { "width": "100%" }
  70812. }, [
  70813. vue.createElementVNode("view", {
  70814. class: "ss-flex ss-m-t-10",
  70815. style: { "flex-direction": "column", "align-items": "flex-start", "width": "100%" }
  70816. }, [
  70817. vue.createElementVNode("view", {
  70818. class: "name",
  70819. style: { "width": "100%" }
  70820. }, [
  70821. vue.createTextVNode(
  70822. vue.toDisplayString(item.transferUserName + " > " + item.recipientUserName) + " ",
  70823. 1
  70824. /* TEXT */
  70825. ),
  70826. vue.createElementVNode(
  70827. "text",
  70828. {
  70829. style: { "float": "right" },
  70830. class: vue.normalizeClass(["color-red", { "color-green": $setup.formatChangeValue(item) < 0 }])
  70831. },
  70832. vue.toDisplayString($setup.formatChangeValue(item)),
  70833. 3
  70834. /* TEXT, CLASS */
  70835. )
  70836. ]),
  70837. vue.createElementVNode("view", {
  70838. class: "time",
  70839. style: { "width": "100%" }
  70840. }, [
  70841. vue.createTextVNode(
  70842. vue.toDisplayString($setup.sheep.$helper.timeFormat(item.createTime, "yyyy-mm-dd hh:MM")) + " ",
  70843. 1
  70844. /* TEXT */
  70845. ),
  70846. vue.createElementVNode(
  70847. "text",
  70848. { style: { "float": "right" } },
  70849. "余额:" + vue.toDisplayString($setup.formatValue(item)),
  70850. 1
  70851. /* TEXT */
  70852. )
  70853. ])
  70854. ])
  70855. ])
  70856. ]);
  70857. }),
  70858. 128
  70859. /* KEYED_FRAGMENT */
  70860. ))
  70861. ])) : (vue.openBlock(), vue.createBlock(_component_s_empty, {
  70862. key: 1,
  70863. text: "暂无数据",
  70864. paddingTop: "200",
  70865. icon: "/static/data-empty.png"
  70866. })),
  70867. $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, {
  70868. key: 2,
  70869. status: $setup.state.loadStatus,
  70870. "content-text": {
  70871. contentdown: "点击加载更多"
  70872. },
  70873. onClick: _cache[0] || (_cache[0] = ($event) => $setup.onLoadMore(true)),
  70874. onScrolltolower: _cache[1] || (_cache[1] = ($event) => $setup.onLoadMore(true))
  70875. }, null, 8, ["status"])) : vue.createCommentVNode("v-if", true)
  70876. ],
  70877. 32
  70878. /* NEED_HYDRATION */
  70879. )
  70880. ])
  70881. ]),
  70882. _: 1
  70883. /* STABLE */
  70884. })
  70885. ],
  70886. 2112
  70887. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  70888. );
  70889. }
  70890. const PagesUserWalletConsumptionTransfersLog = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["render", _sfc_render$V], ["__scopeId", "data-v-3ab7db52"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/wallet/consumptionTransfersLog.vue"]]);
  70891. const _sfc_main$V = {
  70892. __name: "consumptionTransfers",
  70893. setup(__props, { expose: __expose }) {
  70894. __expose();
  70895. const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo);
  70896. const userWallet = vue.computed(() => sheep$1.$store("user").userWallet);
  70897. const state = vue.reactive({
  70898. verifyUsername: true,
  70899. verifyMobile: true,
  70900. usernameErrorMsg: "",
  70901. mobileErrorMsg: "",
  70902. model: {
  70903. recipientUserName: void 0,
  70904. recipientUserId: void 0,
  70905. recipientUserPhone: void 0,
  70906. consumptionPoints: void 0,
  70907. smsCodeUseReqDTO: {
  70908. mobile: void 0,
  70909. scene: 11,
  70910. code: void 0
  70911. }
  70912. },
  70913. rules: {
  70914. recipientUserName: {
  70915. rules: [{
  70916. required: true,
  70917. errorMessage: t$6("wallet.recipient_cannot_be_empty")
  70918. }]
  70919. },
  70920. recipientUserPhone: {
  70921. rules: [{
  70922. required: true,
  70923. errorMessage: t$6("wallet.recipient_phone_cannot_be_empty")
  70924. }]
  70925. },
  70926. "smsCodeUseReqDTO.code": {
  70927. rules: [{
  70928. required: true,
  70929. errorMessage: t$6("wallet.verification_code_cannot_be_empty")
  70930. }]
  70931. },
  70932. consumptionPoints: {
  70933. rules: [
  70934. {
  70935. required: true,
  70936. errorMessage: t$6("wallet.transfer_amount_cannot_be_empty")
  70937. },
  70938. {
  70939. validateFunction: function(rule, value, data, callback) {
  70940. if (value <= 0) {
  70941. callback(t$6("wallet.transfer_amount_less_than_zero"));
  70942. }
  70943. return true;
  70944. }
  70945. }
  70946. ]
  70947. }
  70948. }
  70949. });
  70950. const canUseConsumptionPoints = vue.computed(() => points2point(userWallet.value.integralDO.consumptionPoints));
  70951. let lastUsername = vue.ref("");
  70952. async function verifyUsername(e2) {
  70953. const username2 = e2.detail.value;
  70954. if (username2 == lastUsername.value)
  70955. return;
  70956. if (username2 == "") {
  70957. state.verifyUsername = true;
  70958. return false;
  70959. } else if (username2 === userInfo2.value.username) {
  70960. state.usernameErrorMsg = t$6("wallet.recipient_cannot_be_self");
  70961. return false;
  70962. }
  70963. lastUsername.value = username2;
  70964. const {
  70965. data
  70966. } = await AuthUtil.verifyUsername(username2);
  70967. if (data) {
  70968. state.usernameErrorMsg = t$6("wallet.user_does_not_exist");
  70969. } else {
  70970. state.usernameErrorMsg = "";
  70971. }
  70972. state.verifyUsername = data;
  70973. }
  70974. async function verifyPhone(e2) {
  70975. const phone = e2.detail.value;
  70976. if (phone == "" || !state.model.recipientUserName) {
  70977. state.verifyMobile = true;
  70978. return false;
  70979. }
  70980. const {
  70981. data
  70982. } = await AuthUtil.verifyPhone(state.model.recipientUserName, phone);
  70983. if (!data || data.mobile !== phone) {
  70984. state.mobileErrorMsg = t$6("wallet.username_phone_mismatch");
  70985. state.verifyMobile = true;
  70986. } else {
  70987. state.mobileErrorMsg = "";
  70988. state.model.recipientUserId = data.id;
  70989. state.verifyMobile = false;
  70990. }
  70991. }
  70992. async function validateInput(value) {
  70993. const intValue = parseInt(value);
  70994. const strPoints = value.toString();
  70995. const [integerPart, decimalPart] = strPoints.split(".");
  70996. if (decimalPart) {
  70997. parseFloat(`${integerPart}.${decimalPart.slice(0, 2)}`);
  70998. vue.nextTick(() => {
  70999. state.model.consumptionPoints = integerPart;
  71000. });
  71001. }
  71002. if (intValue > parseInt(canUseConsumptionPoints.value)) {
  71003. vue.nextTick(() => {
  71004. state.model.consumptionPoints = parseInt(canUseConsumptionPoints.value);
  71005. });
  71006. } else {
  71007. vue.nextTick(() => {
  71008. state.model.consumptionPoints = intValue;
  71009. });
  71010. }
  71011. }
  71012. const FormRef = vue.ref(null);
  71013. const onSubmit = async () => {
  71014. if (state.model.recipientUserName === userInfo2.value.username) {
  71015. uni.showToast({
  71016. title: t$6("wallet.cannot_transfer_to_self"),
  71017. icon: "none",
  71018. duration: 2e3
  71019. });
  71020. return;
  71021. } else if (state.verifyUsername) {
  71022. return;
  71023. } else if (state.verifyMobile) {
  71024. return;
  71025. }
  71026. const validate = await vue.unref(FormRef).validate().catch((error2) => {
  71027. formatAppLog("log", "at pages/user/wallet/consumptionTransfers.vue:259", "error: ", error2);
  71028. });
  71029. if (!validate) {
  71030. return;
  71031. }
  71032. const {
  71033. data,
  71034. code: code2
  71035. } = await ConsumptionApi.createConsumptionLog(state.model);
  71036. if (code2 === 0) {
  71037. showWalletModal({ msg: t$6("wallet.transfer_successful") });
  71038. uni.$emit("consumptionTransfersComplete");
  71039. sheep$1.$router.redirect("/pages/user/wallet/score");
  71040. }
  71041. };
  71042. const isLogin = vue.computed(() => sheep$1.$store("user").isLogin);
  71043. vue.watch(
  71044. () => isLogin.value,
  71045. (newVal) => {
  71046. if (newVal) {
  71047. window.location.reload();
  71048. }
  71049. },
  71050. {
  71051. deep: true
  71052. // 深度监听
  71053. }
  71054. );
  71055. onLoad(async (options2) => {
  71056. if (!isLogin.value) {
  71057. showAuthModal();
  71058. }
  71059. state.model.smsCodeUseReqDTO.mobile = userInfo2.value.mobile;
  71060. });
  71061. const __returned__ = { userInfo: userInfo2, userWallet, state, canUseConsumptionPoints, get lastUsername() {
  71062. return lastUsername;
  71063. }, set lastUsername(v2) {
  71064. lastUsername = v2;
  71065. }, verifyUsername, verifyPhone, validateInput, FormRef, onSubmit, isLogin, computed: vue.computed, reactive: vue.reactive, onBeforeMount: vue.onBeforeMount, ref: vue.ref, unref: vue.unref, watch: vue.watch, nextTick: vue.nextTick, get sheep() {
  71066. return sheep$1;
  71067. }, get clone() {
  71068. return lodashExports.clone;
  71069. }, get onLoad() {
  71070. return onLoad;
  71071. }, get points2point() {
  71072. return points2point;
  71073. }, get email() {
  71074. return email;
  71075. }, get AuthUtil() {
  71076. return AuthUtil;
  71077. }, get ConsumptionApi() {
  71078. return ConsumptionApi;
  71079. }, get showAuthModal() {
  71080. return showAuthModal;
  71081. }, get closeAuthModal() {
  71082. return closeAuthModal;
  71083. }, get getSmsCode() {
  71084. return getSmsCode;
  71085. }, get getSmsTimer() {
  71086. return getSmsTimer;
  71087. }, get showWalletModal() {
  71088. return showWalletModal;
  71089. }, get colseWalletModal() {
  71090. return colseWalletModal;
  71091. }, get t() {
  71092. return t$6;
  71093. } };
  71094. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  71095. return __returned__;
  71096. }
  71097. };
  71098. function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) {
  71099. const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l);
  71100. const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9);
  71101. const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7);
  71102. const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9);
  71103. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  71104. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  71105. class: "set-wrap",
  71106. title: $setup.t("wallet.points_transfer"),
  71107. bgStyle: { color: "#FFF" }
  71108. }, {
  71109. default: vue.withCtx(() => [
  71110. vue.createVNode(_component_uni_forms, {
  71111. model: $setup.state.model,
  71112. rules: $setup.state.rules,
  71113. validateTrigger: "bind",
  71114. labelPosition: "left",
  71115. border: "",
  71116. class: "form-box",
  71117. labelWidth: "200",
  71118. ref: "FormRef"
  71119. }, {
  71120. default: vue.withCtx(() => [
  71121. vue.createElementVNode("view", { class: "bg-white ss-p-x-30" }, [
  71122. vue.createVNode(_component_uni_forms_item, {
  71123. name: "recipientUserName",
  71124. label: $setup.t("wallet.recipient"),
  71125. required: true,
  71126. "error-message": $setup.state.usernameErrorMsg
  71127. }, {
  71128. default: vue.withCtx(() => [
  71129. vue.createVNode(_component_uni_easyinput, {
  71130. modelValue: $setup.state.model.recipientUserName,
  71131. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.state.model.recipientUserName = $event),
  71132. type: "recipientUserName",
  71133. placeholder: $setup.t("wallet.enter_recipient_username"),
  71134. inputBorder: false,
  71135. clearable: false,
  71136. onBlur: $setup.verifyUsername
  71137. }, {
  71138. right: vue.withCtx(() => [
  71139. $setup.state.verifyUsername ? (vue.openBlock(), vue.createElementBlock("view", {
  71140. key: 0,
  71141. class: "icon"
  71142. }, [
  71143. vue.createElementVNode("image", {
  71144. style: "",
  71145. src: $setup.sheep.$url.static("/static/images/shibai.png")
  71146. }, null, 8, ["src"])
  71147. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  71148. key: 1,
  71149. class: "icon"
  71150. }, [
  71151. vue.createElementVNode("image", {
  71152. src: $setup.sheep.$url.static("/static/images/chenggong.png")
  71153. }, null, 8, ["src"])
  71154. ]))
  71155. ]),
  71156. _: 1
  71157. /* STABLE */
  71158. }, 8, ["modelValue", "placeholder"])
  71159. ]),
  71160. _: 1
  71161. /* STABLE */
  71162. }, 8, ["label", "error-message"]),
  71163. vue.createVNode(_component_uni_forms_item, {
  71164. name: "recipientUserPhone",
  71165. label: $setup.t("wallet.recipient_phone"),
  71166. required: true,
  71167. "error-message": $setup.state.mobileErrorMsg
  71168. }, {
  71169. default: vue.withCtx(() => [
  71170. vue.createVNode(_component_uni_easyinput, {
  71171. modelValue: $setup.state.model.recipientUserPhone,
  71172. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.model.recipientUserPhone = $event),
  71173. type: "number",
  71174. placeholder: $setup.t("wallet.enter_recipient_phone"),
  71175. inputBorder: false,
  71176. clearable: false,
  71177. onBlur: $setup.verifyPhone
  71178. }, {
  71179. right: vue.withCtx(() => [
  71180. $setup.state.verifyMobile ? (vue.openBlock(), vue.createElementBlock("view", {
  71181. key: 0,
  71182. class: "icon"
  71183. }, [
  71184. vue.createElementVNode("image", {
  71185. style: "",
  71186. src: $setup.sheep.$url.static("/static/images/shibai.png")
  71187. }, null, 8, ["src"])
  71188. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  71189. key: 1,
  71190. class: "icon"
  71191. }, [
  71192. vue.createElementVNode("image", {
  71193. src: $setup.sheep.$url.static("/static/images/chenggong.png")
  71194. }, null, 8, ["src"])
  71195. ]))
  71196. ]),
  71197. _: 1
  71198. /* STABLE */
  71199. }, 8, ["modelValue", "placeholder"])
  71200. ]),
  71201. _: 1
  71202. /* STABLE */
  71203. }, 8, ["label", "error-message"]),
  71204. vue.createVNode(_component_uni_forms_item, {
  71205. name: "mobile",
  71206. label: $setup.t("account.phone_number"),
  71207. class: "mobile loginUniFormItem ss-p-t-10"
  71208. }, {
  71209. default: vue.withCtx(() => [
  71210. vue.createVNode(_component_uni_easyinput, {
  71211. modelValue: $setup.state.model.smsCodeUseReqDTO.mobile,
  71212. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.state.model.smsCodeUseReqDTO.mobile = $event),
  71213. type: "smsCodeUseReqDTO",
  71214. placeholder: $setup.t("account.enter_phone_number"),
  71215. inputBorder: false,
  71216. clearable: false,
  71217. disabled: true
  71218. }, {
  71219. right: vue.withCtx(() => [
  71220. vue.createElementVNode("button", {
  71221. class: vue.normalizeClass(["ss-reset-button code-btn code-btn-start", { "disabled": $setup.verifyUsername == true || $setup.state.verifyMobile == true }]),
  71222. disabled: $setup.verifyUsername == true || $setup.state.verifyMobile == true,
  71223. onClick: _cache[2] || (_cache[2] = ($event) => $setup.getSmsCode("consumptionTransfers", $setup.state.model.smsCodeUseReqDTO.mobile))
  71224. }, vue.toDisplayString($setup.getSmsTimer("consumptionTransfers")), 11, ["disabled"])
  71225. ]),
  71226. _: 1
  71227. /* STABLE */
  71228. }, 8, ["modelValue", "placeholder"])
  71229. ]),
  71230. _: 1
  71231. /* STABLE */
  71232. }, 8, ["label"]),
  71233. vue.createVNode(_component_uni_forms_item, {
  71234. name: "smsCodeUseReqDTO.code",
  71235. label: $setup.t("account.verification_code"),
  71236. required: true
  71237. }, {
  71238. default: vue.withCtx(() => [
  71239. vue.createVNode(_component_uni_easyinput, {
  71240. modelValue: $setup.state.model.smsCodeUseReqDTO.code,
  71241. "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.state.model.smsCodeUseReqDTO.code = $event),
  71242. type: "number",
  71243. placeholder: $setup.t("account.enter_verification_code"),
  71244. inputBorder: false,
  71245. clearable: false
  71246. }, null, 8, ["modelValue", "placeholder"])
  71247. ]),
  71248. _: 1
  71249. /* STABLE */
  71250. }, 8, ["label"]),
  71251. vue.createVNode(_component_uni_forms_item, {
  71252. name: "consumptionPoints",
  71253. label: $setup.t("wallet.transfer_amount"),
  71254. required: true
  71255. }, {
  71256. default: vue.withCtx(() => [
  71257. vue.createVNode(_component_uni_easyinput, {
  71258. modelValue: $setup.state.model.consumptionPoints,
  71259. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $setup.state.model.consumptionPoints = $event),
  71260. type: "number",
  71261. placeholder: $setup.t("wallet.enter_transfer_amount"),
  71262. inputBorder: false,
  71263. clearable: false,
  71264. onInput: $setup.validateInput
  71265. }, null, 8, ["modelValue", "placeholder"])
  71266. ]),
  71267. _: 1
  71268. /* STABLE */
  71269. }, 8, ["label"])
  71270. ])
  71271. ]),
  71272. _: 1
  71273. /* STABLE */
  71274. }, 8, ["model", "rules"]),
  71275. vue.createElementVNode("view", { class: "ss-flex ss-row-center ss-col-center ss-m-t-30" }, [
  71276. vue.createTextVNode(
  71277. vue.toDisplayString($setup.t("wallet.current_transferable_amount")),
  71278. 1
  71279. /* TEXT */
  71280. ),
  71281. vue.createElementVNode(
  71282. "text",
  71283. { class: "text-red" },
  71284. vue.toDisplayString($setup.canUseConsumptionPoints),
  71285. 1
  71286. /* TEXT */
  71287. ),
  71288. vue.createCommentVNode(` <button class="ss-m-l-10 all-btn " @click="useAllPonints">{{t('common.all')}}</button> `)
  71289. ]),
  71290. vue.createVNode(_component_su_fixed, {
  71291. bottom: "",
  71292. placeholder: "",
  71293. bg: "none"
  71294. }, {
  71295. default: vue.withCtx(() => [
  71296. vue.createElementVNode("view", { class: "footer-box ss-p-20 ss-flex" }, [
  71297. vue.createElementVNode(
  71298. "button",
  71299. {
  71300. class: "ss-rest-button btn",
  71301. onClick: $setup.onSubmit
  71302. },
  71303. vue.toDisplayString($setup.t("common.confirm")),
  71304. 1
  71305. /* TEXT */
  71306. )
  71307. ])
  71308. ]),
  71309. _: 1
  71310. /* STABLE */
  71311. })
  71312. ]),
  71313. _: 1
  71314. /* STABLE */
  71315. }, 8, ["title"]);
  71316. }
  71317. const PagesUserWalletConsumptionTransfers = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["render", _sfc_render$U], ["__scopeId", "data-v-889a76b8"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/wallet/consumptionTransfers.vue"]]);
  71318. const _sfc_main$U = {
  71319. __name: "scoreToConsumption",
  71320. setup(__props, { expose: __expose }) {
  71321. __expose();
  71322. const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo);
  71323. const userWallet = vue.computed(() => sheep$1.$store("user").userWallet);
  71324. const state = vue.reactive({
  71325. model: {
  71326. quota: void 0
  71327. },
  71328. rules: {
  71329. quota: {
  71330. rules: [
  71331. {
  71332. required: true,
  71333. errorMessage: t$6("wallet.transfer_amount_cannot_be_empty")
  71334. },
  71335. {
  71336. validateFunction: function(rule, value, data, callback) {
  71337. if (value <= 0) {
  71338. callback(t$6("wallet.transfer_amount_cannot_be_zero"));
  71339. }
  71340. return true;
  71341. }
  71342. }
  71343. ]
  71344. }
  71345. }
  71346. });
  71347. const currentQuota = vue.computed(() => points2point(userWallet.value.integralDO.currentQuota));
  71348. async function validateInput(value) {
  71349. const intValue = parseInt(value);
  71350. const strPoints = value.toString();
  71351. const [integerPart, decimalPart] = strPoints.split(".");
  71352. if (decimalPart) {
  71353. vue.nextTick(() => {
  71354. state.model.quota = integerPart;
  71355. });
  71356. }
  71357. if (intValue > parseInt(currentQuota.value)) {
  71358. vue.nextTick(() => {
  71359. state.model.quota = parseInt(currentQuota.value);
  71360. });
  71361. } else {
  71362. vue.nextTick(() => {
  71363. state.model.quota = intValue;
  71364. });
  71365. }
  71366. }
  71367. const FormRef = vue.ref(null);
  71368. const onSubmit = async () => {
  71369. const validate = await vue.unref(FormRef).validate().catch((error2) => {
  71370. formatAppLog("log", "at pages/user/wallet/scoreToConsumption.vue:116", "error: ", error2);
  71371. });
  71372. if (!validate) {
  71373. return;
  71374. }
  71375. uni.showModal({
  71376. title: t$6("setting.prompt"),
  71377. content: t$6("wallet.commission_to_points_irreversible"),
  71378. success: async function(res) {
  71379. if (!res.confirm) {
  71380. return;
  71381. }
  71382. const {
  71383. data,
  71384. code: code2
  71385. } = await ConsumptionApi.quotaTransition(state.model.quota);
  71386. if (code2 === 0) {
  71387. uni.showToast({
  71388. title: t$6("wallet.conversion_successful"),
  71389. icon: "none",
  71390. duration: 2e3
  71391. });
  71392. uni.$emit("consumptionTransfersComplete");
  71393. sheep$1.$router.redirect("/pages/user/wallet/score");
  71394. }
  71395. }
  71396. });
  71397. };
  71398. const isLogin = vue.computed(() => sheep$1.$store("user").isLogin);
  71399. vue.watch(
  71400. () => isLogin.value,
  71401. (newVal) => {
  71402. if (newVal) {
  71403. window.location.reload();
  71404. }
  71405. },
  71406. {
  71407. deep: true
  71408. // 深度监听
  71409. }
  71410. );
  71411. onLoad(async (options2) => {
  71412. if (!isLogin.value) {
  71413. showAuthModal();
  71414. }
  71415. });
  71416. const __returned__ = { userInfo: userInfo2, userWallet, state, currentQuota, validateInput, FormRef, onSubmit, isLogin, computed: vue.computed, reactive: vue.reactive, onBeforeMount: vue.onBeforeMount, ref: vue.ref, unref: vue.unref, watch: vue.watch, nextTick: vue.nextTick, get sheep() {
  71417. return sheep$1;
  71418. }, get clone() {
  71419. return lodashExports.clone;
  71420. }, get onLoad() {
  71421. return onLoad;
  71422. }, get points2point() {
  71423. return points2point;
  71424. }, get email() {
  71425. return email;
  71426. }, get AuthUtil() {
  71427. return AuthUtil;
  71428. }, get ConsumptionApi() {
  71429. return ConsumptionApi;
  71430. }, get showAuthModal() {
  71431. return showAuthModal;
  71432. }, get t() {
  71433. return t$6;
  71434. } };
  71435. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  71436. return __returned__;
  71437. }
  71438. };
  71439. function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) {
  71440. const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l);
  71441. const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9);
  71442. const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7);
  71443. const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9);
  71444. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  71445. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  71446. class: "set-wrap",
  71447. title: $setup.t("wallet.commission_to_points"),
  71448. bgStyle: { color: "#FFF" }
  71449. }, {
  71450. default: vue.withCtx(() => [
  71451. vue.createVNode(_component_uni_forms, {
  71452. model: $setup.state.model,
  71453. rules: $setup.state.rules,
  71454. validateTrigger: "bind",
  71455. labelPosition: "left",
  71456. border: "",
  71457. class: "form-box",
  71458. labelWidth: "200",
  71459. ref: "FormRef"
  71460. }, {
  71461. default: vue.withCtx(() => [
  71462. vue.createElementVNode("view", { class: "bg-white ss-p-x-30" }, [
  71463. vue.createVNode(_component_uni_forms_item, {
  71464. name: "quota",
  71465. label: $setup.t("wallet.consumption_points"),
  71466. required: true
  71467. }, {
  71468. default: vue.withCtx(() => [
  71469. vue.createVNode(_component_uni_easyinput, {
  71470. modelValue: $setup.state.model.quota,
  71471. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.state.model.quota = $event),
  71472. type: "number",
  71473. placeholder: $setup.t("wallet.enter_transfer_amount"),
  71474. inputBorder: false,
  71475. clearable: false,
  71476. onInput: $setup.validateInput
  71477. }, null, 8, ["modelValue", "placeholder"])
  71478. ]),
  71479. _: 1
  71480. /* STABLE */
  71481. }, 8, ["label"])
  71482. ])
  71483. ]),
  71484. _: 1
  71485. /* STABLE */
  71486. }, 8, ["model", "rules"]),
  71487. vue.createElementVNode("view", { class: "ss-flex ss-row-center ss-col-center ss-m-t-30" }, [
  71488. vue.createTextVNode(
  71489. vue.toDisplayString($setup.t("wallet.current_commission_available")) + ":",
  71490. 1
  71491. /* TEXT */
  71492. ),
  71493. vue.createElementVNode(
  71494. "text",
  71495. { class: "text-red" },
  71496. vue.toDisplayString($setup.currentQuota),
  71497. 1
  71498. /* TEXT */
  71499. ),
  71500. vue.createCommentVNode(' <button class="ss-m-l-10 all-btn " @click="useAllPonints">全部</button> ')
  71501. ]),
  71502. vue.createVNode(_component_su_fixed, {
  71503. bottom: "",
  71504. placeholder: "",
  71505. bg: "none"
  71506. }, {
  71507. default: vue.withCtx(() => [
  71508. vue.createElementVNode("view", { class: "footer-box ss-p-20 ss-flex" }, [
  71509. vue.createElementVNode(
  71510. "button",
  71511. {
  71512. class: "ss-rest-button btn",
  71513. onClick: $setup.onSubmit
  71514. },
  71515. vue.toDisplayString($setup.t("common.confirm")),
  71516. 1
  71517. /* TEXT */
  71518. )
  71519. ])
  71520. ]),
  71521. _: 1
  71522. /* STABLE */
  71523. })
  71524. ]),
  71525. _: 1
  71526. /* STABLE */
  71527. }, 8, ["title"]);
  71528. }
  71529. const PagesUserWalletScoreToConsumption = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["render", _sfc_render$T], ["__scopeId", "data-v-27522d6e"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/wallet/scoreToConsumption.vue"]]);
  71530. const _sfc_main$T = {
  71531. __name: "withdraw",
  71532. setup(__props, { expose: __expose }) {
  71533. __expose();
  71534. const userWallet = vue.computed(() => sheep$1.$store("user").userWallet);
  71535. const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo);
  71536. const canUseMoney = vue.computed(() => points2point(userWallet.value.integralDO.currentQuota));
  71537. const alipayAccount2 = (account2) => {
  71538. if (!account2) {
  71539. return false;
  71540. }
  71541. if (/^\d{11}$/.test(account2)) {
  71542. return `${account2.substring(0, 3)}****${account2.substring(7)}`;
  71543. } else if (/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(account2)) {
  71544. const atIndex = account2.indexOf("@");
  71545. if (atIndex <= 3) {
  71546. return account2;
  71547. }
  71548. const username2 = account2.substring(0, Math.ceil(atIndex / 2));
  71549. const domain = account2.substring(atIndex);
  71550. return `${username2}***${domain}`;
  71551. }
  71552. };
  71553. const bankAccount2 = (account2) => {
  71554. if (!account2) {
  71555. return false;
  71556. }
  71557. if (account2.length === 8) {
  71558. return account2.substring(0, 2) + "********" + account2.substr(-2);
  71559. } else {
  71560. return account2.substring(0, 4) + "******" + account2.substr(-4);
  71561. }
  71562. };
  71563. const state = vue.reactive({
  71564. model: {},
  71565. orderType: "goods",
  71566. // 订单类型; goods - 商品订单, recharge - 充值订单
  71567. outMent: "",
  71568. outMoney: void 0,
  71569. disabled: true,
  71570. withdrawalPercentage: {
  71571. withdrawCommission: 0,
  71572. withdrawConsumption: 0
  71573. },
  71574. outMethods: [
  71575. // {
  71576. // title: t('wallet.withdraw_to_wechat'),
  71577. // value: '1'
  71578. // },
  71579. {
  71580. title: t$6("wallet.withdraw_to_alipay"),
  71581. value: "2",
  71582. account: ""
  71583. },
  71584. {
  71585. title: t$6("wallet.withdraw_to_bank_card"),
  71586. value: "3",
  71587. account: ""
  71588. }
  71589. ]
  71590. });
  71591. const withdrawCommission = vue.computed(() => {
  71592. return state.withdrawalPercentage.withdrawCommission * 100 + "%";
  71593. });
  71594. const withdrawConsumption = vue.computed(() => {
  71595. return state.withdrawalPercentage.withdrawConsumption * 100 + "%";
  71596. });
  71597. const commission = vue.computed(() => {
  71598. if (!state.outMoney) {
  71599. return 0;
  71600. }
  71601. let result2 = parseFloat(state.withdrawalPercentage.withdrawCommission) * state.outMoney;
  71602. result2 = Math.floor(result2 * 100) / 100;
  71603. return result2;
  71604. });
  71605. const consumption = vue.computed(() => {
  71606. if (!state.outMoney) {
  71607. return 0;
  71608. }
  71609. let result2 = parseFloat(state.withdrawalPercentage.withdrawConsumption) * state.outMoney;
  71610. result2 = Math.floor(result2 * 100) / 100;
  71611. return result2;
  71612. });
  71613. const handleBind = async (type) => {
  71614. if (type === "2") {
  71615. showAuthModal("alipayAccount");
  71616. } else if (type === "3") {
  71617. showAuthModal("bankAccount");
  71618. }
  71619. };
  71620. const submit = async () => {
  71621. if (state.outMent === "") {
  71622. sheep$1.$helper.toast(t$6("wallet.please_select_withdrawal_method"));
  71623. return;
  71624. }
  71625. if (!state.outMoney) {
  71626. sheep$1.$helper.toast(t$6("wallet.enter_withdrawal_amount"));
  71627. return;
  71628. }
  71629. if (state.outMent === "2" && !userInfo2.value.alipayAccount) {
  71630. uni.showModal({
  71631. title: t$6("setting.prompt"),
  71632. content: t$6("wallet.alipay_not_bound"),
  71633. confirmText: t$6("wallet.go_bind"),
  71634. success: async function(res) {
  71635. if (!res.confirm) {
  71636. return;
  71637. }
  71638. showAuthModal("alipayAccount");
  71639. }
  71640. });
  71641. return;
  71642. }
  71643. if (state.outMent === "3" && !userInfo2.value.bankAccount) {
  71644. uni.showModal({
  71645. title: t$6("setting.prompt"),
  71646. content: t$6("wallet.bank_card_not_bound"),
  71647. confirmText: t$6("wallet.go_bind"),
  71648. success: async function(res) {
  71649. if (!res.confirm) {
  71650. return;
  71651. }
  71652. showAuthModal("bankAccount");
  71653. }
  71654. });
  71655. return;
  71656. }
  71657. let {
  71658. code: code2,
  71659. data
  71660. } = await PayWalletApi.createWithdrawal({
  71661. amountTotal: state.outMoney,
  71662. withdrawalType: state.outMent
  71663. });
  71664. if (code2 === 0) {
  71665. uni.showToast({
  71666. icon: "success",
  71667. title: t$6("wallet.application_successful")
  71668. });
  71669. sheep$1.$router.redirect("/pages/user/wallet/withdrawalLog");
  71670. uni.$emit("createWithDrawComplete");
  71671. }
  71672. };
  71673. function onTapOut(e2) {
  71674. state.outMent = e2.detail.value;
  71675. }
  71676. async function useAllPonints() {
  71677. const { code: code2, data } = await PayWalletApi.getDuserInfo();
  71678. const userCanUsePoints = parseFloat(points2point(data.integralDO.currentQuota));
  71679. state.outMoney = parseInt(userCanUsePoints);
  71680. state.disable = false;
  71681. }
  71682. vue.watchEffect(() => {
  71683. if (parseFloat(state.outMoney) > parseFloat(canUseMoney.value)) {
  71684. vue.nextTick(() => {
  71685. state.outMoney = parseInt(canUseMoney.value);
  71686. });
  71687. }
  71688. if (canUseMoney.value == 0 || canUseMoney.value < 0) {
  71689. state.disabled = true;
  71690. }
  71691. if (canUseMoney.value > 0) {
  71692. state.disabled = false;
  71693. }
  71694. });
  71695. const getUserInfo = async () => {
  71696. const userInfo3 = await sheep$1.$store("user").getInfo();
  71697. state.model = lodashExports.clone(userInfo3);
  71698. state.outMethods.forEach((item) => {
  71699. if (item.value === "2") {
  71700. item.account = alipayAccount2(state.model.alipayAccount);
  71701. } else if (item.value === "3") {
  71702. item.account = bankAccount2(state.model.bankAccount);
  71703. }
  71704. });
  71705. };
  71706. const getWithdrawalPercentage = async () => {
  71707. const { code: code2, data } = await WithdrawalApi.getWithdrawalPercentage();
  71708. if (code2 === 0) {
  71709. state.withdrawalPercentage = data;
  71710. }
  71711. };
  71712. onLoad(async (options2) => {
  71713. await getUserInfo();
  71714. await getWithdrawalPercentage();
  71715. uni.$on("alipayAccountChangeComplete", getUserInfo);
  71716. uni.$on("bankAccountChangeComplete", getUserInfo);
  71717. });
  71718. const __returned__ = { userWallet, userInfo: userInfo2, canUseMoney, alipayAccount: alipayAccount2, bankAccount: bankAccount2, state, withdrawCommission, withdrawConsumption, commission, consumption, handleBind, submit, onTapOut, useAllPonints, getUserInfo, getWithdrawalPercentage, computed: vue.computed, reactive: vue.reactive, watchEffect: vue.watchEffect, nextTick: vue.nextTick, onUnmounted: vue.onUnmounted, get onLoad() {
  71719. return onLoad;
  71720. }, get sheep() {
  71721. return sheep$1;
  71722. }, get clone() {
  71723. return lodashExports.clone;
  71724. }, get fen2yuan() {
  71725. return fen2yuan;
  71726. }, get points2point() {
  71727. return points2point;
  71728. }, get md5() {
  71729. return md5;
  71730. }, get PayWalletApi() {
  71731. return PayWalletApi;
  71732. }, get WithdrawalApi() {
  71733. return WithdrawalApi;
  71734. }, get showAuthModal() {
  71735. return showAuthModal;
  71736. }, get showShareModal() {
  71737. return showShareModal;
  71738. }, get t() {
  71739. return t$6;
  71740. } };
  71741. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  71742. return __returned__;
  71743. }
  71744. };
  71745. function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) {
  71746. const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l);
  71747. const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9);
  71748. const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7);
  71749. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  71750. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  71751. title: $setup.t("wallet.withdraw")
  71752. }, {
  71753. default: vue.withCtx(() => [
  71754. vue.createElementVNode("view", { class: "bg-white ss-modal-box ss-flex-col" }, [
  71755. vue.createCommentVNode(" 提现方式 "),
  71756. vue.createElementVNode("view", { class: "modal-content" }, [
  71757. vue.createElementVNode(
  71758. "view",
  71759. { class: "out-title ss-p-l-30 ss-m-y-30" },
  71760. vue.toDisplayString($setup.t("wallet.select_withdrawal_method")),
  71761. 1
  71762. /* TEXT */
  71763. ),
  71764. vue.createElementVNode(
  71765. "radio-group",
  71766. { onChange: $setup.onTapOut },
  71767. [
  71768. (vue.openBlock(true), vue.createElementBlock(
  71769. vue.Fragment,
  71770. null,
  71771. vue.renderList($setup.state.outMethods, (item) => {
  71772. return vue.openBlock(), vue.createElementBlock("label", {
  71773. class: "out-type-item",
  71774. key: item.title
  71775. }, [
  71776. vue.createElementVNode(
  71777. "view",
  71778. {
  71779. class: vue.normalizeClass(["out-item ss-flex ss-col-center ss-row-between ss-p-x-30 border-bottom", { "disabled-out-item": item.disabled }])
  71780. },
  71781. [
  71782. vue.createElementVNode("view", { class: "ss-flex ss-col-center" }, [
  71783. vue.createElementVNode("view", { class: "check-box ss-flex ss-col-center ss-p-l-10" }, [
  71784. vue.createElementVNode("radio", {
  71785. value: item.value,
  71786. color: "var(--ui-BG-Main)",
  71787. style: { "transform": "scale(0.8)" },
  71788. disabled: item.disabled,
  71789. checked: $setup.state.payment === item.value
  71790. }, null, 8, ["value", "disabled", "checked"])
  71791. ]),
  71792. vue.createElementVNode(
  71793. "text",
  71794. { class: "out-title" },
  71795. vue.toDisplayString(item.title),
  71796. 1
  71797. /* TEXT */
  71798. )
  71799. ]),
  71800. item.account ? (vue.openBlock(), vue.createElementBlock(
  71801. "text",
  71802. {
  71803. key: 0,
  71804. style: { "float": "right" }
  71805. },
  71806. vue.toDisplayString(item.account),
  71807. 1
  71808. /* TEXT */
  71809. )) : (vue.openBlock(), vue.createElementBlock("text", {
  71810. key: 1,
  71811. style: { "float": "right" },
  71812. onClick: ($event) => $setup.handleBind(item.value)
  71813. }, vue.toDisplayString($setup.t("wallet.not_bound_click_to_bind")) + " >", 9, ["onClick"]))
  71814. ],
  71815. 2
  71816. /* CLASS */
  71817. )
  71818. ]);
  71819. }),
  71820. 128
  71821. /* KEYED_FRAGMENT */
  71822. ))
  71823. ],
  71824. 32
  71825. /* NEED_HYDRATION */
  71826. )
  71827. ]),
  71828. vue.createCommentVNode(" 提现金额 "),
  71829. vue.createElementVNode("view", { class: "modal-content ss-m-t-30" }, [
  71830. vue.createVNode(_component_uni_forms, {
  71831. model: $setup.state.model,
  71832. rules: $setup.state.rules,
  71833. validateTrigger: "bind",
  71834. labelPosition: "left",
  71835. border: "",
  71836. class: "form-box",
  71837. labelWidth: "200",
  71838. ref: "FormRef"
  71839. }, {
  71840. default: vue.withCtx(() => [
  71841. vue.createElementVNode("view", { class: "bg-white ss-p-x-30" }, [
  71842. vue.createVNode(_component_uni_forms_item, {
  71843. name: "quota",
  71844. label: $setup.t("wallet.withdrawal_amount"),
  71845. required: true
  71846. }, {
  71847. default: vue.withCtx(() => [
  71848. vue.createVNode(_component_uni_easyinput, {
  71849. modelValue: $setup.state.outMoney,
  71850. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.state.outMoney = $event),
  71851. type: "number",
  71852. placeholder: $setup.t("wallet.enter_withdrawal_amount"),
  71853. inputBorder: false,
  71854. clearable: false
  71855. }, null, 8, ["modelValue", "placeholder"])
  71856. ]),
  71857. _: 1
  71858. /* STABLE */
  71859. }, 8, ["label"]),
  71860. vue.createVNode(_component_uni_forms_item, {
  71861. name: "quota",
  71862. label: $setup.t("wallet.actual_amount_received")
  71863. }, {
  71864. default: vue.withCtx(() => [
  71865. vue.createElementVNode(
  71866. "view",
  71867. { class: "ss-flex ss-h-100" },
  71868. vue.toDisplayString($setup.commission),
  71869. 1
  71870. /* TEXT */
  71871. )
  71872. ]),
  71873. _: 1
  71874. /* STABLE */
  71875. }, 8, ["label"]),
  71876. vue.createVNode(_component_uni_forms_item, {
  71877. name: "quota",
  71878. label: $setup.t("wallet.consumption_points")
  71879. }, {
  71880. default: vue.withCtx(() => [
  71881. vue.createElementVNode(
  71882. "view",
  71883. { class: "ss-flex ss-h-100" },
  71884. vue.toDisplayString($setup.consumption),
  71885. 1
  71886. /* TEXT */
  71887. )
  71888. ]),
  71889. _: 1
  71890. /* STABLE */
  71891. }, 8, ["label"])
  71892. ])
  71893. ]),
  71894. _: 1
  71895. /* STABLE */
  71896. }, 8, ["model", "rules"]),
  71897. vue.createCommentVNode(' <view class="out-title ss-p-l-30 ss-m-y-30">提现金额</view>\n <view class="ss-flex ss-row-left ss-col-center input-money ss-m-y-30" >\n ¥\n <input v-model.number="state.outMoney" class="uni-input " type="number"\n placeholder="请输入金额" />\n </view> '),
  71898. vue.createElementVNode("view", { class: "ss-flex ss-row-center ss-col-center ss-m-t-30" }, [
  71899. vue.createTextVNode(
  71900. vue.toDisplayString($setup.t("wallet.current_exchangeable_amount")),
  71901. 1
  71902. /* TEXT */
  71903. ),
  71904. vue.createElementVNode(
  71905. "text",
  71906. { class: "text-red" },
  71907. vue.toDisplayString($setup.canUseMoney),
  71908. 1
  71909. /* TEXT */
  71910. ),
  71911. vue.createElementVNode(
  71912. "button",
  71913. {
  71914. class: "ss-m-l-10 all-btn",
  71915. onClick: $setup.useAllPonints
  71916. },
  71917. vue.toDisplayString($setup.t("common.all")),
  71918. 1
  71919. /* TEXT */
  71920. )
  71921. ]),
  71922. vue.createElementVNode(
  71923. "view",
  71924. { class: "ss-flex ss-row-center ss-col-center ss-m-t-30 text-red text-center" },
  71925. vue.toDisplayString($setup.t("wallet.note", { commission: $setup.withdrawCommission, consumption: $setup.withdrawConsumption })),
  71926. 1
  71927. /* TEXT */
  71928. )
  71929. ]),
  71930. vue.createCommentVNode(" 工具 "),
  71931. vue.createElementVNode("view", { class: "modal-footer ss-flex ss-row-center ss-col-center ss-m-t-80 ss-m-b-40 ss-flex-5" }, [
  71932. vue.createElementVNode("button", {
  71933. class: vue.normalizeClass(["ss-reset-button save-btn", { "disabled-btn": $setup.state.disabled }]),
  71934. onClick: $setup.submit,
  71935. disabled: $setup.state.disabled
  71936. }, vue.toDisplayString($setup.t("common.confirm")), 11, ["disabled"])
  71937. ])
  71938. ])
  71939. ]),
  71940. _: 1
  71941. /* STABLE */
  71942. }, 8, ["title"]);
  71943. }
  71944. const PagesUserWalletWithdraw = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_render$S], ["__scopeId", "data-v-2fe623b9"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/wallet/withdraw.vue"]]);
  71945. const _sfc_main$S = {
  71946. __name: "withdrawalLog",
  71947. setup(__props, { expose: __expose }) {
  71948. __expose();
  71949. const userWallet = vue.computed(() => sheep$1.$store("user").userWallet);
  71950. const statusBarHeight = sheep$1.$platform.device.statusBarHeight * 2;
  71951. const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo);
  71952. const sys_navBar = sheep$1.$platform.navbar;
  71953. const state = vue.reactive({
  71954. currentTab: 0,
  71955. pagination: {
  71956. list: [],
  71957. total: 0,
  71958. pageSize: 10,
  71959. pageNo: 1
  71960. },
  71961. loadStatus: ""
  71962. });
  71963. async function getLogList() {
  71964. state.loadStatus = "loading";
  71965. let {
  71966. code: code2,
  71967. data
  71968. } = await WithdrawalApi.getWithdrawalPage({
  71969. pageNo: state.pagination.pageNo,
  71970. pageSize: state.pagination.pageSize
  71971. });
  71972. if (code2 !== 0) {
  71973. return;
  71974. }
  71975. let list = _$1.concat(state.pagination.list, data.list);
  71976. state.pagination.list = list;
  71977. state.pagination.total = data.total;
  71978. state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore";
  71979. }
  71980. onLoad(() => {
  71981. getLogList();
  71982. });
  71983. function onLoadMore() {
  71984. if (state.loadStatus === "noMore") {
  71985. return;
  71986. }
  71987. state.pagination.pageNo++;
  71988. getLogList();
  71989. }
  71990. onReachBottom(() => {
  71991. onLoadMore();
  71992. });
  71993. const __returned__ = { userWallet, statusBarHeight, userInfo: userInfo2, sys_navBar, state, getLogList, onLoadMore, get sheep() {
  71994. return sheep$1;
  71995. }, get onLoad() {
  71996. return onLoad;
  71997. }, get onReachBottom() {
  71998. return onReachBottom;
  71999. }, computed: vue.computed, reactive: vue.reactive, get points2point() {
  72000. return points2point;
  72001. }, get fen2yuan() {
  72002. return fen2yuan;
  72003. }, get _() {
  72004. return _$1;
  72005. }, get dayjs() {
  72006. return dayjs;
  72007. }, get PointApi() {
  72008. return PointApi;
  72009. }, get resetPagination() {
  72010. return resetPagination;
  72011. }, get WithdrawalApi() {
  72012. return WithdrawalApi;
  72013. }, get t() {
  72014. return t$6;
  72015. } };
  72016. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  72017. return __returned__;
  72018. }
  72019. };
  72020. function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
  72021. const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6);
  72022. const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5);
  72023. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  72024. return vue.openBlock(), vue.createElementBlock(
  72025. vue.Fragment,
  72026. null,
  72027. [
  72028. vue.createCommentVNode(" 提现记录 "),
  72029. vue.createVNode(_component_s_layout, {
  72030. class: "wallet-wrap",
  72031. bgStyle: { "backgroundColor": "#ffffff" },
  72032. title: $setup.t("wallet.withdrawal_records"),
  72033. navbar: "normal"
  72034. }, {
  72035. default: vue.withCtx(() => [
  72036. vue.createElementVNode("view", { class: "model-box ss-flex-col" }, [
  72037. vue.createElementVNode(
  72038. "scroll-view",
  72039. {
  72040. class: "list-box",
  72041. "scroll-y": "true",
  72042. onTouchmove: _cache[2] || (_cache[2] = vue.withModifiers(() => {
  72043. }, ["stop"]))
  72044. },
  72045. [
  72046. $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  72047. key: 0,
  72048. style: { "padding": "20rpx" }
  72049. }, [
  72050. (vue.openBlock(true), vue.createElementBlock(
  72051. vue.Fragment,
  72052. null,
  72053. vue.renderList($setup.state.pagination.list, (item, index2) => {
  72054. return vue.openBlock(), vue.createElementBlock("view", {
  72055. class: "list-item ss-flex ss-col-center ss-row-between",
  72056. key: item.id,
  72057. style: { "padding": "20rpx 0", "border-bottom": "1px solid #c4c4c4" }
  72058. }, [
  72059. vue.createElementVNode("view", {
  72060. class: "ss-flex ss-col-center",
  72061. style: { "width": "100%" }
  72062. }, [
  72063. vue.createElementVNode("view", {
  72064. class: "ss-flex ss-m-t-10",
  72065. style: { "flex-direction": "column", "align-items": "flex-start", "width": "100%" }
  72066. }, [
  72067. vue.createElementVNode("view", {
  72068. class: "name",
  72069. style: { "width": "100%" }
  72070. }, [
  72071. vue.createTextVNode(
  72072. vue.toDisplayString(item.withdrawalType === 1 ? $setup.t("wallet.wechat") : item.withdrawalType === 2 ? $setup.t("wallet.alipay") : $setup.t("wallet.bank_card")) + " (" + vue.toDisplayString(item.withdrawalAccount) + ") ",
  72073. 1
  72074. /* TEXT */
  72075. ),
  72076. vue.createElementVNode(
  72077. "text",
  72078. {
  72079. style: { "float": "right" },
  72080. class: "color-red"
  72081. },
  72082. " ¥" + vue.toDisplayString($setup.fen2yuan(item.amount)) + " (" + vue.toDisplayString($setup.t("wallet.consumption_points") + $setup.points2point(item.withdrawConsumption)) + ") ",
  72083. 1
  72084. /* TEXT */
  72085. )
  72086. ]),
  72087. vue.createElementVNode("view", {
  72088. class: "time",
  72089. style: { "width": "100%" }
  72090. }, [
  72091. vue.createTextVNode(
  72092. vue.toDisplayString($setup.sheep.$helper.timeFormat(item.createTime, "yyyy-mm-dd hh:MM")) + " ",
  72093. 1
  72094. /* TEXT */
  72095. ),
  72096. vue.createElementVNode(
  72097. "text",
  72098. { style: { "float": "right" } },
  72099. vue.toDisplayString(item.status ? item.status === 1 ? $setup.t("wallet.credited") : $setup.t("wallet.withdrawal_failed") : $setup.t("wallet.withdrawing")),
  72100. 1
  72101. /* TEXT */
  72102. )
  72103. ])
  72104. ])
  72105. ])
  72106. ]);
  72107. }),
  72108. 128
  72109. /* KEYED_FRAGMENT */
  72110. ))
  72111. ])) : (vue.openBlock(), vue.createBlock(_component_s_empty, {
  72112. key: 1,
  72113. text: "暂无数据",
  72114. paddingTop: "200",
  72115. icon: "/static/data-empty.png"
  72116. })),
  72117. $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, {
  72118. key: 2,
  72119. status: $setup.state.loadStatus,
  72120. "content-text": {
  72121. contentdown: $setup.t("common.click_to_load_more")
  72122. },
  72123. onClick: _cache[0] || (_cache[0] = ($event) => $setup.onLoadMore(true)),
  72124. onScrolltolower: _cache[1] || (_cache[1] = ($event) => $setup.onLoadMore(true))
  72125. }, null, 8, ["status", "content-text"])) : vue.createCommentVNode("v-if", true)
  72126. ],
  72127. 32
  72128. /* NEED_HYDRATION */
  72129. )
  72130. ])
  72131. ]),
  72132. _: 1
  72133. /* STABLE */
  72134. }, 8, ["title"])
  72135. ],
  72136. 2112
  72137. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  72138. );
  72139. }
  72140. const PagesUserWalletWithdrawalLog = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["render", _sfc_render$R], ["__scopeId", "data-v-fa4881f2"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/wallet/withdrawalLog.vue"]]);
  72141. const _sfc_main$R = {
  72142. __name: "scoreToMoney",
  72143. setup(__props, { expose: __expose }) {
  72144. __expose();
  72145. const statusBarHeight = sheep$1.$platform.device.statusBarHeight * 2;
  72146. const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo);
  72147. const sys_navBar = sheep$1.$platform.navbar;
  72148. const state = vue.reactive({
  72149. currentTab: 0,
  72150. pagination: {
  72151. list: 0,
  72152. total: 0,
  72153. pageSize: 6,
  72154. pageNo: 1
  72155. },
  72156. loadStatus: "",
  72157. date: [],
  72158. today: "",
  72159. showModel: false,
  72160. showQueModel: false
  72161. });
  72162. const close = () => {
  72163. state.showModel = false;
  72164. state.showQueModel = false;
  72165. };
  72166. const tabMaps = [
  72167. {
  72168. name: "全部",
  72169. value: "all"
  72170. },
  72171. {
  72172. name: "收入",
  72173. value: "true"
  72174. },
  72175. {
  72176. name: "支出",
  72177. value: "false"
  72178. }
  72179. ];
  72180. const dateFilterText = vue.computed(() => {
  72181. if (state.date[0] === state.date[1]) {
  72182. return state.date[0];
  72183. } else {
  72184. return state.date.join("~");
  72185. }
  72186. });
  72187. async function getLogList() {
  72188. state.loadStatus = "loading";
  72189. let {
  72190. code: code2,
  72191. data
  72192. } = await PointApi.getPointRecordPage({
  72193. pageNo: state.pagination.pageNo,
  72194. pageSize: state.pagination.pageSize,
  72195. addStatus: state.currentTab > 0 ? tabMaps[state.currentTab].value : void 0,
  72196. "createTime[0]": state.date[0] + " 00:00:00",
  72197. "createTime[1]": state.date[1] + " 23:59:59"
  72198. });
  72199. if (code2 !== 0) {
  72200. return;
  72201. }
  72202. state.pagination.list = data.list;
  72203. state.pagination.total = data.total;
  72204. state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore";
  72205. }
  72206. onLoad(() => {
  72207. state.today = dayjs().format("YYYY-MM-DD");
  72208. state.date = [state.today, state.today];
  72209. getLogList();
  72210. });
  72211. function onChange(e2) {
  72212. state.currentTab = e2.index;
  72213. resetPagination(state.pagination);
  72214. getLogList();
  72215. }
  72216. function onChangeTime(e2) {
  72217. state.date[0] = e2[0];
  72218. state.date[1] = e2[e2.length - 1];
  72219. resetPagination(state.pagination);
  72220. getLogList();
  72221. }
  72222. function onLoadMore() {
  72223. if (state.loadStatus === "noMore") {
  72224. return;
  72225. }
  72226. state.pagination.pageNo++;
  72227. getLogList();
  72228. }
  72229. onReachBottom(() => {
  72230. onLoadMore();
  72231. });
  72232. const __returned__ = { statusBarHeight, userInfo: userInfo2, sys_navBar, state, close, tabMaps, dateFilterText, getLogList, onChange, onChangeTime, onLoadMore, get sheep() {
  72233. return sheep$1;
  72234. }, get onLoad() {
  72235. return onLoad;
  72236. }, get onReachBottom() {
  72237. return onReachBottom;
  72238. }, computed: vue.computed, reactive: vue.reactive, get _() {
  72239. return _$1;
  72240. }, get dayjs() {
  72241. return dayjs;
  72242. }, get PointApi() {
  72243. return PointApi;
  72244. }, get resetPagination() {
  72245. return resetPagination;
  72246. } };
  72247. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  72248. return __returned__;
  72249. }
  72250. };
  72251. function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
  72252. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  72253. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  72254. class: "wallet-wrap",
  72255. bgStyle: { "backgroundColor": "#ffffff" },
  72256. title: "佣金兑换",
  72257. navbar: "normal"
  72258. }, {
  72259. default: vue.withCtx(() => [
  72260. vue.createElementVNode("view", { class: "score-box bg-white ss-flex-col ss-row-center" }, [
  72261. vue.createElementVNode("view", null, [
  72262. vue.createElementVNode("view", {
  72263. class: "all-title ss-m-r-8",
  72264. style: { "border": "4rpx solid var(--ui-BG-Main)", "width": "100%", "box-sizing": "border-box", "height": "120rpx", "text-indent": "20rpx", "border-radius": "20rpx", "line-height": "120rpx" }
  72265. }, "到数字人民币钱包:钱包地址/未绑定---->")
  72266. ]),
  72267. vue.createElementVNode("view", { class: "ss-m-y-80" }, [
  72268. vue.createElementVNode("view", { class: "all-title ss-m-r-8 ss-m-b-10" }, "提现金额"),
  72269. vue.createElementVNode("view", { class: "all-title ss-m-r-8 ss-m-y-30" }, [
  72270. vue.createElementVNode("input", {
  72271. class: "uni-input",
  72272. style: { "border": "4rpx solid var(--ui-BG-Main)", "width": "100%", "box-sizing": "border-box", "height": "100rpx", "text-indent": "20rpx", "border-radius": "20rpx" },
  72273. type: "number",
  72274. placeholder: "请输入金额"
  72275. })
  72276. ]),
  72277. vue.createElementVNode("view", { class: "all-title ss-m-r-8 ss-m-b-10 text-center" }, "您当前可兑换金额:¥0")
  72278. ]),
  72279. vue.createElementVNode("view", { class: "ss-m-b-40 ss-flex ss-row-center" }, [
  72280. vue.createElementVNode("view", {
  72281. class: "all-title ss-m-r-80",
  72282. onClick: _cache[0] || (_cache[0] = ($event) => $setup.sheep.$router.back("/pages/user/wallet/score"))
  72283. }, [
  72284. vue.createElementVNode("button", { class: "btn ss-reset-button ui-Shadow-Main" }, " 取消 ")
  72285. ]),
  72286. vue.createElementVNode("view", { class: "all-title ss-m-r-8" }, [
  72287. vue.createElementVNode("button", { class: "btn ss-reset-button ui-Shadow-Main" }, " 确定 ")
  72288. ])
  72289. ])
  72290. ])
  72291. ]),
  72292. _: 1
  72293. /* STABLE */
  72294. });
  72295. }
  72296. const PagesUserWalletScoreToMoney = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["render", _sfc_render$Q], ["__scopeId", "data-v-ece509b1"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/wallet/scoreToMoney.vue"]]);
  72297. const _sfc_main$Q = {
  72298. __name: "maxScoreLog",
  72299. props: {
  72300. isFreeze: {
  72301. type: Boolean
  72302. }
  72303. },
  72304. setup(__props, { expose: __expose }) {
  72305. __expose();
  72306. const userWallet = vue.computed(() => sheep$1.$store("user").userWallet);
  72307. const statusBarHeight = sheep$1.$platform.device.statusBarHeight * 2;
  72308. const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo);
  72309. const sys_navBar = sheep$1.$platform.navbar;
  72310. const props = __props;
  72311. const state = vue.reactive({
  72312. currentTab: 0,
  72313. pagination: {
  72314. list: [],
  72315. total: 0,
  72316. pageSize: 10,
  72317. pageNo: 1
  72318. },
  72319. loadStatus: "",
  72320. showModel: false,
  72321. showQueModel: false
  72322. });
  72323. const title = (item) => {
  72324. let title2 = item.profitStatusName + "";
  72325. if (item.username) {
  72326. title2 += "(" + item.username + ")";
  72327. }
  72328. return title2;
  72329. };
  72330. const changeValue = (item) => {
  72331. let value = "";
  72332. if (item.freezeHighQuota > 0 || item.maxAvailablePointsAmount > 0) {
  72333. value = "+";
  72334. }
  72335. value += points2point(item.maxAvailablePointsAmount);
  72336. return value;
  72337. };
  72338. const balance = (item) => {
  72339. let value = "";
  72340. value += t$6("wallet.balance") + ":";
  72341. value += points2point(item.afterMaxAvailablePointsAmount);
  72342. return value;
  72343. };
  72344. async function getLogList(isFreeze) {
  72345. state.loadStatus = "loading";
  72346. let {
  72347. code: code2,
  72348. data
  72349. } = await ScoreApi.getMaxScoreList({
  72350. pageNo: state.pagination.pageNo,
  72351. pageSize: state.pagination.pageSize
  72352. });
  72353. if (code2 !== 0) {
  72354. return;
  72355. }
  72356. let list = _$1.concat(state.pagination.list, data.list);
  72357. state.pagination.list = list;
  72358. state.pagination.total = data.total;
  72359. state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore";
  72360. }
  72361. onLoad(() => {
  72362. getLogList(props.isFreeze);
  72363. });
  72364. function onLoadMore(isFreeze) {
  72365. if (state.loadStatus === "noMore") {
  72366. return;
  72367. }
  72368. state.pagination.pageNo++;
  72369. getLogList();
  72370. }
  72371. onReachBottom(() => {
  72372. onLoadMore();
  72373. });
  72374. const __returned__ = { userWallet, statusBarHeight, userInfo: userInfo2, sys_navBar, props, state, title, changeValue, balance, getLogList, onLoadMore, get sheep() {
  72375. return sheep$1;
  72376. }, get onLoad() {
  72377. return onLoad;
  72378. }, get onReachBottom() {
  72379. return onReachBottom;
  72380. }, computed: vue.computed, reactive: vue.reactive, get points2point() {
  72381. return points2point;
  72382. }, get _() {
  72383. return _$1;
  72384. }, get dayjs() {
  72385. return dayjs;
  72386. }, get PointApi() {
  72387. return PointApi;
  72388. }, get resetPagination() {
  72389. return resetPagination;
  72390. }, get ScoreApi() {
  72391. return ScoreApi;
  72392. }, get t() {
  72393. return t$6;
  72394. } };
  72395. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  72396. return __returned__;
  72397. }
  72398. };
  72399. function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) {
  72400. const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6);
  72401. const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5);
  72402. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  72403. return vue.openBlock(), vue.createElementBlock(
  72404. vue.Fragment,
  72405. null,
  72406. [
  72407. vue.createCommentVNode(" 佣金确权 "),
  72408. vue.createVNode(_component_s_layout, {
  72409. class: "wallet-wrap",
  72410. bgStyle: { "backgroundColor": "#ffffff" },
  72411. title: "",
  72412. navbar: "normal"
  72413. }, {
  72414. default: vue.withCtx(() => [
  72415. vue.createElementVNode("view", { class: "model-box ss-flex-col" }, [
  72416. vue.createElementVNode(
  72417. "scroll-view",
  72418. {
  72419. class: "list-box",
  72420. "scroll-y": "true",
  72421. onTouchmove: _cache[2] || (_cache[2] = vue.withModifiers(() => {
  72422. }, ["stop"]))
  72423. },
  72424. [
  72425. $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  72426. key: 0,
  72427. style: { "padding": "20rpx" }
  72428. }, [
  72429. (vue.openBlock(true), vue.createElementBlock(
  72430. vue.Fragment,
  72431. null,
  72432. vue.renderList($setup.state.pagination.list, (item, index2) => {
  72433. return vue.openBlock(), vue.createElementBlock("view", {
  72434. class: "list-item ss-flex ss-col-center ss-row-between",
  72435. key: item.id,
  72436. style: { "padding": "20rpx 0", "border-bottom": "1px solid #c4c4c4" }
  72437. }, [
  72438. vue.createElementVNode("view", {
  72439. class: "ss-flex ss-col-center",
  72440. style: { "width": "100%" }
  72441. }, [
  72442. vue.createElementVNode("view", {
  72443. class: "ss-flex ss-m-t-10",
  72444. style: { "flex-direction": "column", "align-items": "flex-start", "width": "100%" }
  72445. }, [
  72446. vue.createElementVNode("view", {
  72447. class: "name",
  72448. style: { "width": "100%" }
  72449. }, [
  72450. vue.createTextVNode(
  72451. vue.toDisplayString($setup.title(item)) + " ",
  72452. 1
  72453. /* TEXT */
  72454. ),
  72455. vue.createElementVNode(
  72456. "text",
  72457. {
  72458. style: { "float": "right" },
  72459. class: vue.normalizeClass(["color-red", { "color-green": item.maxAvailablePointsAmount < 0 || _ctx.freezeHighQuota < 0 }])
  72460. },
  72461. vue.toDisplayString($setup.changeValue(item)),
  72462. 3
  72463. /* TEXT, CLASS */
  72464. )
  72465. ]),
  72466. vue.createElementVNode("view", {
  72467. class: "time",
  72468. style: { "width": "100%" }
  72469. }, [
  72470. vue.createTextVNode(
  72471. vue.toDisplayString($setup.sheep.$helper.timeFormat(item.createTime, "yyyy-mm-dd hh:MM")) + " ",
  72472. 1
  72473. /* TEXT */
  72474. ),
  72475. vue.createElementVNode(
  72476. "text",
  72477. { style: { "float": "right" } },
  72478. vue.toDisplayString($setup.balance(item)),
  72479. 1
  72480. /* TEXT */
  72481. )
  72482. ])
  72483. ])
  72484. ])
  72485. ]);
  72486. }),
  72487. 128
  72488. /* KEYED_FRAGMENT */
  72489. ))
  72490. ])) : (vue.openBlock(), vue.createBlock(_component_s_empty, {
  72491. key: 1,
  72492. text: "暂无数据",
  72493. paddingTop: "200",
  72494. icon: "/static/data-empty.png"
  72495. })),
  72496. $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, {
  72497. key: 2,
  72498. status: $setup.state.loadStatus,
  72499. "content-text": {
  72500. contentdown: $setup.t("common.click_to_load_more")
  72501. },
  72502. onClick: _cache[0] || (_cache[0] = ($event) => $setup.onLoadMore(true)),
  72503. onScrolltolower: _cache[1] || (_cache[1] = ($event) => $setup.onLoadMore(true))
  72504. }, null, 8, ["status", "content-text"])) : vue.createCommentVNode("v-if", true)
  72505. ],
  72506. 32
  72507. /* NEED_HYDRATION */
  72508. )
  72509. ])
  72510. ]),
  72511. _: 1
  72512. /* STABLE */
  72513. })
  72514. ],
  72515. 2112
  72516. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  72517. );
  72518. }
  72519. const PagesUserWalletMaxScoreLog = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["render", _sfc_render$P], ["__scopeId", "data-v-4bc02433"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/wallet/maxScoreLog.vue"]]);
  72520. const _sfc_main$P = {
  72521. __name: "team",
  72522. setup(__props, { expose: __expose }) {
  72523. __expose();
  72524. const statusBarHeight = sheep$1.$platform.device.statusBarHeight * 2;
  72525. const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo);
  72526. const sys_navBar = sheep$1.$platform.navbar;
  72527. const state = vue.reactive({
  72528. currentTab: 0,
  72529. pagination: {
  72530. list: 0,
  72531. total: 0,
  72532. pageSize: 10,
  72533. pageNo: 1
  72534. },
  72535. loadStatus: "",
  72536. descendants: {
  72537. total: 0,
  72538. list: []
  72539. },
  72540. teamCount: 0,
  72541. ancestor: {}
  72542. });
  72543. const dateFilterText = vue.computed(() => {
  72544. if (state.date[0] === state.date[1]) {
  72545. return state.date[0];
  72546. } else {
  72547. return state.date.join("~");
  72548. }
  72549. });
  72550. async function getTeam() {
  72551. state.loadStatus = "loading";
  72552. let {
  72553. code: code2,
  72554. data
  72555. } = await TeamApi.getTeam({
  72556. pageNo: state.pagination.pageNo,
  72557. pageSize: state.pagination.pageSize
  72558. });
  72559. if (code2 !== 0) {
  72560. return;
  72561. }
  72562. state.teamCount = data.teamCount;
  72563. state.ancestor = data.ancestor;
  72564. let descendantsList = _$1.concat(state.descendants.list, data.descendants.list);
  72565. state.descendants.list = descendantsList;
  72566. state.descendants.total = data.descendants.total;
  72567. state.pagination.total = data.descendants.total;
  72568. state.loadStatus = state.descendants.list.length < state.descendants.total ? "more" : "noMore";
  72569. }
  72570. onLoad(() => {
  72571. state.today = dayjs().format("YYYY-MM-DD");
  72572. state.date = [state.today, state.today];
  72573. getTeam();
  72574. });
  72575. function loadMore() {
  72576. if (state.loadStatus === "noMore") {
  72577. return;
  72578. }
  72579. state.pagination.pageNo++;
  72580. getTeam();
  72581. }
  72582. onReachBottom(() => {
  72583. loadMore();
  72584. });
  72585. const __returned__ = { statusBarHeight, userInfo: userInfo2, sys_navBar, state, dateFilterText, getTeam, loadMore, get sheep() {
  72586. return sheep$1;
  72587. }, get onLoad() {
  72588. return onLoad;
  72589. }, get onReachBottom() {
  72590. return onReachBottom;
  72591. }, computed: vue.computed, reactive: vue.reactive, get _() {
  72592. return _$1;
  72593. }, get dayjs() {
  72594. return dayjs;
  72595. }, get TeamApi() {
  72596. return TeamApi;
  72597. }, get resetPagination() {
  72598. return resetPagination;
  72599. }, get points2point() {
  72600. return points2point;
  72601. }, get t() {
  72602. return t$6;
  72603. } };
  72604. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  72605. return __returned__;
  72606. }
  72607. };
  72608. function _sfc_render$O(_ctx, _cache, $props, $setup, $data, $options) {
  72609. const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6);
  72610. const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5);
  72611. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  72612. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  72613. class: "wallet-wrap",
  72614. bgStyle: { "backgroundColor": "#ffffff" },
  72615. title: "",
  72616. navbar: "normal"
  72617. }, {
  72618. default: vue.withCtx(() => [
  72619. vue.createElementVNode("view", { class: "model-box ss-flex-col" }, [
  72620. vue.createElementVNode("view", { class: "all-title ss-p-x-45 ss-p-t-30" }, [
  72621. vue.createElementVNode(
  72622. "text",
  72623. { style: { "float": "right" } },
  72624. vue.toDisplayString($setup.t("team.total_people", { count: $setup.state.teamCount })),
  72625. 1
  72626. /* TEXT */
  72627. )
  72628. ]),
  72629. vue.createElementVNode("view", {
  72630. class: "list-box",
  72631. style: { "width": "100%", "padding": "0", "height": "calc(100vh - 7.5rem)" }
  72632. }, [
  72633. vue.createCommentVNode(" 推荐人 "),
  72634. vue.createElementVNode("view", null, [
  72635. vue.createElementVNode("view", {
  72636. class: "list-item ss-flex ss-col-center ss-row-between",
  72637. style: { "padding-top": "30rpx", "padding-bottom": "0" }
  72638. }, [
  72639. vue.createElementVNode("view", {
  72640. class: "ss-flex ss-col-center",
  72641. style: { "width": "100%", "border-bottom": "1px solid #ededed", "padding-bottom": "30rpx" }
  72642. }, [
  72643. vue.createElementVNode("view", null, "    "),
  72644. vue.createCommentVNode(" 头像 "),
  72645. vue.createElementVNode("view", { class: "avatar-box ss-m-x-20" }, [
  72646. vue.createElementVNode("image", {
  72647. class: "avatar-img",
  72648. src: $setup.state.ancestor.avatar,
  72649. mode: "aspectFill"
  72650. }, null, 8, ["src"])
  72651. ]),
  72652. vue.createElementVNode("view", {
  72653. class: "ss-flex ss-m-t-10",
  72654. style: { "flex-direction": "column", "align-items": "flex-start", "width": "calc(100% - 5.5rem)" }
  72655. }, [
  72656. vue.createElementVNode("view", {
  72657. class: "name",
  72658. style: { "width": "100%" }
  72659. }, [
  72660. vue.createElementVNode(
  72661. "text",
  72662. { style: { "width": "50%", "display": "inline-block" } },
  72663. vue.toDisplayString($setup.state.ancestor.username || "昵称:" + $setup.state.ancestor.descNickName),
  72664. 1
  72665. /* TEXT */
  72666. ),
  72667. vue.createElementVNode(
  72668. "text",
  72669. {
  72670. class: "time",
  72671. style: { "float": "right", "color": "#666666" }
  72672. },
  72673. vue.toDisplayString($setup.t("team.retain_performance")) + ":" + vue.toDisplayString($setup.points2point($setup.state.ancestor.residueSocial)),
  72674. 1
  72675. /* TEXT */
  72676. )
  72677. ]),
  72678. vue.createElementVNode("view", {
  72679. class: "time",
  72680. style: { "width": "100%", "color": "#999" }
  72681. }, [
  72682. vue.createElementVNode(
  72683. "text",
  72684. null,
  72685. vue.toDisplayString($setup.state.ancestor.socialStatusLevel || "等级1"),
  72686. 1
  72687. /* TEXT */
  72688. ),
  72689. vue.createTextVNode(" / "),
  72690. vue.createElementVNode(
  72691. "text",
  72692. null,
  72693. vue.toDisplayString($setup.t("team.referrer")),
  72694. 1
  72695. /* TEXT */
  72696. ),
  72697. vue.createElementVNode(
  72698. "text",
  72699. { style: { "float": "right" } },
  72700. vue.toDisplayString($setup.t("team.team_count", { count: $setup.state.ancestor.descendantsCount })),
  72701. 1
  72702. /* TEXT */
  72703. )
  72704. ])
  72705. ])
  72706. ])
  72707. ])
  72708. ]),
  72709. vue.createCommentVNode(" 直推人和后代 "),
  72710. vue.createElementVNode("view", null, [
  72711. vue.createElementVNode(
  72712. "scroll-view",
  72713. {
  72714. style: { "width": "100%" },
  72715. "scroll-y": "true",
  72716. onTouchmove: _cache[0] || (_cache[0] = vue.withModifiers(() => {
  72717. }, ["stop"]))
  72718. },
  72719. [
  72720. $setup.state.descendants.total > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [
  72721. (vue.openBlock(true), vue.createElementBlock(
  72722. vue.Fragment,
  72723. null,
  72724. vue.renderList($setup.state.descendants.list, (item, index2) => {
  72725. return vue.openBlock(), vue.createElementBlock("view", {
  72726. class: "list-item ss-flex ss-col-center ss-row-between",
  72727. key: item.id,
  72728. style: { "padding-top": "30rpx", "padding-bottom": "0" }
  72729. }, [
  72730. vue.createElementVNode("view", {
  72731. class: "ss-flex ss-col-center",
  72732. style: { "width": "100%", "border-bottom": "1px solid #ededed", "padding-bottom": "30rpx" }
  72733. }, [
  72734. vue.createElementVNode(
  72735. "view",
  72736. null,
  72737. vue.toDisplayString(item.sort),
  72738. 1
  72739. /* TEXT */
  72740. ),
  72741. vue.createCommentVNode(" 头像 "),
  72742. vue.createElementVNode("view", { class: "avatar-box ss-m-x-20" }, [
  72743. vue.createElementVNode("image", {
  72744. class: "avatar-img",
  72745. src: item.avatar || $setup.sheep.$url.static("/static/images/default_avatar.png"),
  72746. mode: "aspectFill"
  72747. }, null, 8, ["src"])
  72748. ]),
  72749. vue.createElementVNode("view", {
  72750. class: "ss-flex ss-m-t-10",
  72751. style: { "flex-direction": "column", "align-items": "flex-start", "width": "calc(100% - 5.5rem)" }
  72752. }, [
  72753. vue.createElementVNode("view", {
  72754. class: "name",
  72755. style: { "width": "100%" }
  72756. }, [
  72757. vue.createElementVNode(
  72758. "text",
  72759. { style: { "width": "50%", "display": "inline-block" } },
  72760. vue.toDisplayString(item.username || "昵称:" + item.descNickName),
  72761. 1
  72762. /* TEXT */
  72763. ),
  72764. vue.createElementVNode(
  72765. "text",
  72766. {
  72767. class: "time",
  72768. style: { "float": "right", "color": "#666666" }
  72769. },
  72770. vue.toDisplayString($setup.t("team.new_performance_value")) + ":" + vue.toDisplayString($setup.points2point(item.residueSocial)),
  72771. 1
  72772. /* TEXT */
  72773. )
  72774. ]),
  72775. vue.createElementVNode("view", {
  72776. class: "time",
  72777. style: { "width": "100%", "color": "#999" }
  72778. }, [
  72779. vue.createTextVNode(
  72780. vue.toDisplayString(item.socialStatusLevel) + " / ",
  72781. 1
  72782. /* TEXT */
  72783. ),
  72784. vue.createElementVNode(
  72785. "text",
  72786. null,
  72787. vue.toDisplayString(item.depth == 1 ? $setup.t("team.direct_referral") : ""),
  72788. 1
  72789. /* TEXT */
  72790. ),
  72791. vue.createElementVNode(
  72792. "text",
  72793. { style: { "float": "right" } },
  72794. vue.toDisplayString($setup.t("team.team_count", { count: item.descendantsCount })),
  72795. 1
  72796. /* TEXT */
  72797. )
  72798. ])
  72799. ])
  72800. ])
  72801. ]);
  72802. }),
  72803. 128
  72804. /* KEYED_FRAGMENT */
  72805. ))
  72806. ])) : (vue.openBlock(), vue.createBlock(_component_s_empty, {
  72807. key: 1,
  72808. text: $setup.t("team.no_team_members"),
  72809. icon: "/static/data-empty.png"
  72810. }, null, 8, ["text"]))
  72811. ],
  72812. 32
  72813. /* NEED_HYDRATION */
  72814. )
  72815. ])
  72816. ])
  72817. ]),
  72818. $setup.state.descendants.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, {
  72819. key: 0,
  72820. status: $setup.state.loadStatus,
  72821. "content-text": {
  72822. contentdown: $setup.t("common.click_to_load_more")
  72823. },
  72824. onClick: $setup.loadMore
  72825. }, null, 8, ["status", "content-text"])) : vue.createCommentVNode("v-if", true)
  72826. ]),
  72827. _: 1
  72828. /* STABLE */
  72829. });
  72830. }
  72831. const PagesUserWalletTeam = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["render", _sfc_render$O], ["__scopeId", "data-v-f08f8293"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/user/wallet/team.vue"]]);
  72832. const _sfc_main$O = {
  72833. __name: "commission-info",
  72834. setup(__props, { expose: __expose }) {
  72835. __expose();
  72836. vue.useCssVars((_ctx) => ({
  72837. "2ef4f675-headerBg": vue.unref(headerBg)
  72838. }));
  72839. const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo);
  72840. const headerBg = sheep$1.$url.css("/static/img/shop/commission/background.png");
  72841. const state = vue.reactive({
  72842. showMoney: false
  72843. });
  72844. const __returned__ = { userInfo: userInfo2, headerBg, state, get sheep() {
  72845. return sheep$1;
  72846. }, computed: vue.computed, reactive: vue.reactive };
  72847. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  72848. return __returned__;
  72849. }
  72850. };
  72851. function _sfc_render$N(_ctx, _cache, $props, $setup, $data, $options) {
  72852. return vue.openBlock(), vue.createElementBlock(
  72853. vue.Fragment,
  72854. null,
  72855. [
  72856. vue.createCommentVNode(" 用户资料 "),
  72857. vue.createElementVNode("view", { class: "user-card ss-flex ss-col-bottom" }, [
  72858. vue.createElementVNode("view", { class: "card-top ss-flex ss-row-between" }, [
  72859. vue.createElementVNode("view", { class: "ss-flex" }, [
  72860. vue.createElementVNode("view", { class: "head-img-box" }, [
  72861. vue.createElementVNode("image", {
  72862. class: "head-img",
  72863. src: $setup.sheep.$url.cdn($setup.userInfo.avatar),
  72864. mode: "aspectFill"
  72865. }, null, 8, ["src"])
  72866. ]),
  72867. vue.createElementVNode("view", { class: "ss-flex-col" }, [
  72868. vue.createElementVNode(
  72869. "view",
  72870. { class: "user-name" },
  72871. vue.toDisplayString($setup.userInfo.nickname),
  72872. 1
  72873. /* TEXT */
  72874. )
  72875. ])
  72876. ])
  72877. ])
  72878. ])
  72879. ],
  72880. 2112
  72881. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  72882. );
  72883. }
  72884. const commissionInfo = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["render", _sfc_render$N], ["__scopeId", "data-v-2ef4f675"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/commission/components/commission-info.vue"]]);
  72885. const _sfc_main$N = {
  72886. __name: "account-info",
  72887. setup(__props, { expose: __expose }) {
  72888. __expose();
  72889. const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo);
  72890. const state = vue.reactive({
  72891. showMoney: false,
  72892. summary: {}
  72893. });
  72894. vue.onMounted(async () => {
  72895. let { code: code2, data } = await BrokerageApi.getBrokerageUserSummary();
  72896. if (code2 === 0) {
  72897. state.summary = data || {};
  72898. }
  72899. });
  72900. const __returned__ = { userInfo: userInfo2, state, get sheep() {
  72901. return sheep$1;
  72902. }, computed: vue.computed, reactive: vue.reactive, onMounted: vue.onMounted, get BrokerageApi() {
  72903. return BrokerageApi;
  72904. }, get fen2yuan() {
  72905. return fen2yuan;
  72906. } };
  72907. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  72908. return __returned__;
  72909. }
  72910. };
  72911. function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) {
  72912. const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$b);
  72913. return vue.openBlock(), vue.createElementBlock("view", { class: "account-card" }, [
  72914. vue.createElementVNode("view", { class: "account-card-box" }, [
  72915. vue.createElementVNode("view", { class: "ss-flex ss-row-between card-box-header" }, [
  72916. vue.createElementVNode("view", { class: "ss-flex" }, [
  72917. vue.createElementVNode("view", { class: "header-title ss-m-r-16" }, "账户信息"),
  72918. vue.createElementVNode("button", {
  72919. class: "ss-reset-button look-btn ss-flex",
  72920. onClick: _cache[0] || (_cache[0] = ($event) => $setup.state.showMoney = !$setup.state.showMoney)
  72921. }, [
  72922. vue.createVNode(_component_uni_icons, {
  72923. type: $setup.state.showMoney ? "eye-filled" : "eye-slash-filled",
  72924. color: "#A57A55",
  72925. size: "20"
  72926. }, null, 8, ["type"])
  72927. ])
  72928. ]),
  72929. vue.createElementVNode("view", {
  72930. class: "ss-flex",
  72931. onClick: _cache[1] || (_cache[1] = ($event) => $setup.sheep.$router.go("/pages/user/wallet/commission"))
  72932. }, [
  72933. vue.createElementVNode("view", { class: "header-title ss-m-r-4" }, "查看明细"),
  72934. vue.createElementVNode("text", { class: "cicon-play-arrow" })
  72935. ])
  72936. ]),
  72937. vue.createCommentVNode(" 收益 "),
  72938. vue.createElementVNode("view", { class: "card-content ss-flex" }, [
  72939. vue.createElementVNode("view", { class: "ss-flex-1 ss-flex-col ss-col-center" }, [
  72940. vue.createElementVNode("view", { class: "item-title" }, "当前佣金(元)"),
  72941. vue.createElementVNode(
  72942. "view",
  72943. { class: "item-detail" },
  72944. vue.toDisplayString($setup.state.showMoney ? $setup.fen2yuan($setup.state.summary.brokeragePrice || 0) : "***"),
  72945. 1
  72946. /* TEXT */
  72947. )
  72948. ]),
  72949. vue.createElementVNode("view", { class: "ss-flex-1 ss-flex-col ss-col-center" }, [
  72950. vue.createElementVNode("view", { class: "item-title" }, "昨天的佣金(元)"),
  72951. vue.createElementVNode(
  72952. "view",
  72953. { class: "item-detail" },
  72954. vue.toDisplayString($setup.state.showMoney ? $setup.fen2yuan($setup.state.summary.yesterdayPrice || 0) : "***"),
  72955. 1
  72956. /* TEXT */
  72957. )
  72958. ]),
  72959. vue.createElementVNode("view", { class: "ss-flex-1 ss-flex-col ss-col-center" }, [
  72960. vue.createElementVNode("view", { class: "item-title" }, "累计已提(元)"),
  72961. vue.createElementVNode(
  72962. "view",
  72963. { class: "item-detail" },
  72964. vue.toDisplayString($setup.state.showMoney ? $setup.fen2yuan($setup.state.summary.withdrawPrice || 0) : "***"),
  72965. 1
  72966. /* TEXT */
  72967. )
  72968. ])
  72969. ])
  72970. ])
  72971. ]);
  72972. }
  72973. const accountInfo = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", _sfc_render$M], ["__scopeId", "data-v-12734ec3"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/commission/components/account-info.vue"]]);
  72974. const _sfc_main$M = {
  72975. __name: "commission-log",
  72976. setup(__props, { expose: __expose }) {
  72977. __expose();
  72978. const state = vue.reactive({
  72979. loadStatus: "",
  72980. pagination: {
  72981. list: [],
  72982. total: 0,
  72983. pageNo: 1,
  72984. pageSize: 1
  72985. }
  72986. });
  72987. async function getLog() {
  72988. state.loadStatus = "loading";
  72989. const { code: code2, data } = await BrokerageApi.getBrokerageRecordPage({
  72990. pageNo: state.pagination.pageNo,
  72991. pageSize: state.pagination.pageSize
  72992. });
  72993. if (code2 !== 0) {
  72994. return;
  72995. }
  72996. state.pagination.list = _$1.concat(state.pagination.list, data.list);
  72997. state.pagination.total = data.total;
  72998. state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore";
  72999. }
  73000. getLog();
  73001. function loadmore() {
  73002. if (state.loadStatus === "noMore") {
  73003. return;
  73004. }
  73005. state.pagination.pageNo++;
  73006. getLog();
  73007. }
  73008. const __returned__ = { state, getLog, loadmore, get sheep() {
  73009. return sheep$1;
  73010. }, reactive: vue.reactive, get _() {
  73011. return _$1;
  73012. }, get dayjs() {
  73013. return dayjs;
  73014. }, get BrokerageApi() {
  73015. return BrokerageApi;
  73016. }, get fen2yuan() {
  73017. return fen2yuan;
  73018. } };
  73019. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  73020. return __returned__;
  73021. }
  73022. };
  73023. function _sfc_render$L(_ctx, _cache, $props, $setup, $data, $options) {
  73024. const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5);
  73025. return vue.openBlock(), vue.createElementBlock("view", { class: "distribution-log-wrap" }, [
  73026. vue.createElementVNode("view", { class: "header-box" }, [
  73027. vue.createElementVNode("image", {
  73028. class: "header-bg",
  73029. src: $setup.sheep.$url.static("/static/images/title2.png")
  73030. }, null, 8, ["src"]),
  73031. vue.createElementVNode("view", { class: "ss-flex header-title" }, [
  73032. vue.createElementVNode("view", { class: "title" }, "实时动态"),
  73033. vue.createElementVNode("text", { class: "cicon-forward" })
  73034. ])
  73035. ]),
  73036. vue.createElementVNode(
  73037. "scroll-view",
  73038. {
  73039. "scroll-y": "true",
  73040. onScrolltolower: $setup.loadmore,
  73041. class: "scroll-box log-scroll",
  73042. "scroll-with-animation": "true"
  73043. },
  73044. [
  73045. $setup.state.pagination.list ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [
  73046. (vue.openBlock(true), vue.createElementBlock(
  73047. vue.Fragment,
  73048. null,
  73049. vue.renderList($setup.state.pagination.list, (item) => {
  73050. return vue.openBlock(), vue.createElementBlock("view", {
  73051. class: "log-item-box ss-flex ss-row-between",
  73052. key: item.id
  73053. }, [
  73054. vue.createElementVNode("view", { class: "log-item-wrap" }, [
  73055. vue.createElementVNode("view", { class: "log-item ss-flex ss-ellipsis-1 ss-col-center" }, [
  73056. vue.createElementVNode("view", { class: "ss-flex ss-col-center" }, [
  73057. vue.createElementVNode("image", {
  73058. class: "log-img",
  73059. src: $setup.sheep.$url.static("/static/images/notice.png"),
  73060. mode: "aspectFill"
  73061. }, null, 8, ["src"])
  73062. ]),
  73063. vue.createElementVNode(
  73064. "view",
  73065. { class: "log-text ss-ellipsis-1" },
  73066. vue.toDisplayString(item.title) + " " + vue.toDisplayString($setup.fen2yuan(item.price)) + " 元 ",
  73067. 1
  73068. /* TEXT */
  73069. )
  73070. ])
  73071. ]),
  73072. vue.createElementVNode(
  73073. "text",
  73074. { class: "log-time" },
  73075. vue.toDisplayString($setup.dayjs(item.createTime).fromNow()),
  73076. 1
  73077. /* TEXT */
  73078. )
  73079. ]);
  73080. }),
  73081. 128
  73082. /* KEYED_FRAGMENT */
  73083. ))
  73084. ])) : vue.createCommentVNode("v-if", true),
  73085. vue.createCommentVNode(" 加载更多 "),
  73086. $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, {
  73087. key: 1,
  73088. status: $setup.state.loadStatus,
  73089. color: "#333333",
  73090. onClick: $setup.loadmore
  73091. }, null, 8, ["status"])) : vue.createCommentVNode("v-if", true)
  73092. ],
  73093. 32
  73094. /* NEED_HYDRATION */
  73095. )
  73096. ]);
  73097. }
  73098. const commissionLog = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["render", _sfc_render$L], ["__scopeId", "data-v-8c54e688"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/commission/components/commission-log.vue"]]);
  73099. const _sfc_main$L = {
  73100. __name: "commission-menu",
  73101. setup(__props, { expose: __expose }) {
  73102. __expose();
  73103. const state = vue.reactive({
  73104. menuList: [
  73105. {
  73106. img: "/static/images/commission_icon1.png",
  73107. title: "我的团队",
  73108. path: "/pages/commission/team"
  73109. },
  73110. {
  73111. img: "/static/images/commission_icon2.png",
  73112. title: "佣金明细",
  73113. path: "/pages/commission/wallet"
  73114. },
  73115. {
  73116. img: "/static/images/commission_icon3.png",
  73117. title: "分销订单",
  73118. path: "/pages/commission/order"
  73119. },
  73120. {
  73121. img: "/static/images/commission_icon4.png",
  73122. title: "推广商品",
  73123. path: "/pages/commission/goods"
  73124. },
  73125. // {
  73126. // img: '/static/images/commission_icon5.png',
  73127. // title: '我的资料',
  73128. // path: '/pages/commission/apply',
  73129. // isAgentFrom: true,
  73130. // },
  73131. // todo @非繁人:邀请海报需要登录后的个人数据
  73132. {
  73133. img: "/static/images/commission_icon7.png",
  73134. title: "邀请海报",
  73135. path: "action:showShareModal"
  73136. },
  73137. // TODO @非繁人:缺少 icon
  73138. {
  73139. // img: '/static/images/commission_icon7.png',
  73140. title: "推广排行",
  73141. path: "/pages/commission/promoter"
  73142. },
  73143. {
  73144. // img: '/static/images/commission_icon7.png',
  73145. title: "佣金排行",
  73146. path: "/pages/commission/commission-ranking"
  73147. }
  73148. ]
  73149. });
  73150. const __returned__ = { state, get sheep() {
  73151. return sheep$1;
  73152. }, reactive: vue.reactive };
  73153. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  73154. return __returned__;
  73155. }
  73156. };
  73157. function _sfc_render$K(_ctx, _cache, $props, $setup, $data, $options) {
  73158. return vue.openBlock(), vue.createElementBlock("view", { class: "menu-box ss-flex-col" }, [
  73159. vue.createElementVNode("view", { class: "header-box" }, [
  73160. vue.createElementVNode("image", {
  73161. class: "header-bg",
  73162. src: $setup.sheep.$url.static("/static/images/title1.png")
  73163. }, null, 8, ["src"]),
  73164. vue.createElementVNode("view", { class: "ss-flex header-title" }, [
  73165. vue.createElementVNode("view", { class: "title" }, "功能专区"),
  73166. vue.createElementVNode("text", { class: "cicon-forward" })
  73167. ])
  73168. ]),
  73169. vue.createElementVNode("view", { class: "menu-list ss-flex ss-flex-wrap" }, [
  73170. (vue.openBlock(true), vue.createElementBlock(
  73171. vue.Fragment,
  73172. null,
  73173. vue.renderList($setup.state.menuList, (item, index2) => {
  73174. return vue.openBlock(), vue.createElementBlock("view", {
  73175. key: index2,
  73176. class: "item-box ss-flex-col ss-col-center",
  73177. onClick: ($event) => $setup.sheep.$router.go(item.path)
  73178. }, [
  73179. vue.createElementVNode("image", {
  73180. class: "menu-icon ss-m-b-10",
  73181. src: $setup.sheep.$url.static(item.img),
  73182. mode: "aspectFill"
  73183. }, null, 8, ["src"]),
  73184. vue.createElementVNode(
  73185. "view",
  73186. null,
  73187. vue.toDisplayString(item.title),
  73188. 1
  73189. /* TEXT */
  73190. )
  73191. ], 8, ["onClick"]);
  73192. }),
  73193. 128
  73194. /* KEYED_FRAGMENT */
  73195. ))
  73196. ])
  73197. ]);
  73198. }
  73199. const commissionMenu = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["render", _sfc_render$K], ["__scopeId", "data-v-a53c0bfa"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/commission/components/commission-menu.vue"]]);
  73200. const _sfc_main$K = {
  73201. __name: "commission-auth",
  73202. setup(__props, { expose: __expose }) {
  73203. __expose();
  73204. const state = vue.reactive({
  73205. show: false
  73206. });
  73207. onShow(async () => {
  73208. const { code: code2, data } = await BrokerageApi.getBrokerageUser();
  73209. if (code2 === 0 && !(data == null ? void 0 : data.brokerageEnabled)) {
  73210. state.show = true;
  73211. }
  73212. });
  73213. const __returned__ = { state, get onShow() {
  73214. return onShow;
  73215. }, get sheep() {
  73216. return sheep$1;
  73217. }, reactive: vue.reactive, get BrokerageApi() {
  73218. return BrokerageApi;
  73219. } };
  73220. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  73221. return __returned__;
  73222. }
  73223. };
  73224. function _sfc_render$J(_ctx, _cache, $props, $setup, $data, $options) {
  73225. const _component_su_popup = resolveEasycom(vue.resolveDynamicComponent("su-popup"), __easycom_4$3);
  73226. return vue.openBlock(), vue.createBlock(_component_su_popup, {
  73227. show: $setup.state.show,
  73228. type: "center",
  73229. round: "10",
  73230. onClose: _cache[2] || (_cache[2] = ($event) => $setup.state.show = false),
  73231. isMaskClick: false,
  73232. maskBackgroundColor: "rgba(0, 0, 0, 0.7)"
  73233. }, {
  73234. default: vue.withCtx(() => [
  73235. vue.createElementVNode("view", { class: "notice-box" }, [
  73236. vue.createElementVNode("view", { class: "img-wrap" }, [
  73237. vue.createElementVNode("image", {
  73238. class: "notice-img",
  73239. src: $setup.sheep.$url.static("/static/images/forbidden.png"),
  73240. mode: "aspectFill"
  73241. }, null, 8, ["src"])
  73242. ]),
  73243. vue.createElementVNode("view", { class: "notice-title" }, " 抱歉!您没有分销权限 "),
  73244. vue.createElementVNode("view", { class: "notice-detail" }, " 该功能暂不可用 "),
  73245. vue.createElementVNode("button", {
  73246. class: "ss-reset-button notice-btn ui-Shadow-Main ui-BG-Main-Gradient",
  73247. onClick: _cache[0] || (_cache[0] = ($event) => $setup.sheep.$router.back())
  73248. }, " 知道了 "),
  73249. vue.createElementVNode("button", {
  73250. class: "ss-reset-button back-btn",
  73251. onClick: _cache[1] || (_cache[1] = ($event) => $setup.sheep.$router.back())
  73252. }, " 返回 ")
  73253. ])
  73254. ]),
  73255. _: 1
  73256. /* STABLE */
  73257. }, 8, ["show"]);
  73258. }
  73259. const commissionAuth = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["render", _sfc_render$J], ["__scopeId", "data-v-ec55d95e"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/commission/components/commission-auth.vue"]]);
  73260. const _sfc_main$J = {
  73261. __name: "index",
  73262. setup(__props, { expose: __expose }) {
  73263. __expose();
  73264. const state = vue.reactive({});
  73265. const bgStyle = {
  73266. color: "#F7D598"
  73267. };
  73268. const __returned__ = { state, bgStyle, reactive: vue.reactive, commissionInfo, accountInfo, commissionLog, commissionMenu, commissionAuth };
  73269. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  73270. return __returned__;
  73271. }
  73272. };
  73273. function _sfc_render$I(_ctx, _cache, $props, $setup, $data, $options) {
  73274. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  73275. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  73276. navbar: "inner",
  73277. class: "index-wrap",
  73278. title: "分销中心",
  73279. bgStyle: $setup.bgStyle,
  73280. onShareAppMessage: ""
  73281. }, {
  73282. default: vue.withCtx(() => [
  73283. vue.createCommentVNode(" 分销商信息 "),
  73284. vue.createVNode($setup["commissionInfo"]),
  73285. vue.createCommentVNode(" 账户信息 "),
  73286. vue.createVNode($setup["accountInfo"]),
  73287. vue.createCommentVNode(" 菜单栏 "),
  73288. vue.createVNode($setup["commissionMenu"]),
  73289. vue.createCommentVNode(" 分销记录 "),
  73290. vue.createVNode($setup["commissionLog"]),
  73291. vue.createCommentVNode(" 权限弹窗 "),
  73292. vue.createVNode($setup["commissionAuth"])
  73293. ]),
  73294. _: 1
  73295. /* STABLE */
  73296. });
  73297. }
  73298. const PagesCommissionIndex = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["render", _sfc_render$I], ["__scopeId", "data-v-a5d04a00"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/commission/index.vue"]]);
  73299. const _sfc_main$I = {
  73300. __name: "wallet",
  73301. setup(__props, { expose: __expose }) {
  73302. __expose();
  73303. vue.useCssVars((_ctx) => ({
  73304. "52afd294-headerBg": vue.unref(headerBg)
  73305. }));
  73306. const headerBg = sheep$1.$url.css("/static/img/shop/user/wallet_card_bg.png");
  73307. const state = vue.reactive({
  73308. showMoney: false,
  73309. summary: {},
  73310. // 分销信息
  73311. today: "",
  73312. date: [],
  73313. currentTab: 0,
  73314. pagination: {
  73315. list: [],
  73316. total: 0,
  73317. pageNo: 1,
  73318. pageSize: 1
  73319. },
  73320. loadStatus: "",
  73321. price: void 0,
  73322. showModal: false
  73323. });
  73324. const tabMaps = [
  73325. {
  73326. name: "分佣",
  73327. value: "1"
  73328. // BrokerageRecordBizTypeEnum.ORDER
  73329. },
  73330. {
  73331. name: "提现",
  73332. value: "2"
  73333. // BrokerageRecordBizTypeEnum.WITHDRAW
  73334. }
  73335. ];
  73336. const dateFilterText = vue.computed(() => {
  73337. if (state.date[0] === state.date[1]) {
  73338. return state.date[0];
  73339. } else {
  73340. return state.date.join("~");
  73341. }
  73342. });
  73343. async function getLogList() {
  73344. state.loadStatus = "loading";
  73345. let {
  73346. code: code2,
  73347. data
  73348. } = await BrokerageApi.getBrokerageRecordPage({
  73349. pageSize: state.pagination.pageSize,
  73350. pageNo: state.pagination.pageNo,
  73351. bizType: tabMaps[state.currentTab].value,
  73352. "createTime[0]": state.date[0] + " 00:00:00",
  73353. "createTime[1]": state.date[1] + " 23:59:59"
  73354. });
  73355. if (code2 !== 0) {
  73356. return;
  73357. }
  73358. state.pagination.list = _$1.concat(state.pagination.list, data.list);
  73359. state.pagination.total = data.total;
  73360. state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore";
  73361. }
  73362. function onChangeTab(e2) {
  73363. resetPagination(state.pagination);
  73364. state.currentTab = e2.index;
  73365. getLogList();
  73366. }
  73367. function onChangeTime(e2) {
  73368. state.date[0] = e2[0];
  73369. state.date[1] = e2[e2.length - 1];
  73370. resetPagination(state.pagination);
  73371. getLogList();
  73372. }
  73373. async function onConfirm() {
  73374. if (state.price <= 0) {
  73375. sheep$1.$helper.toast("请输入正确的金额");
  73376. return;
  73377. }
  73378. uni.showModal({
  73379. title: "提示",
  73380. content: "确认把您的佣金转入到余额钱包中?",
  73381. success: async function(res) {
  73382. if (!res.confirm) {
  73383. return;
  73384. }
  73385. const {
  73386. code: code2
  73387. } = await BrokerageApi.createBrokerageWithdraw({
  73388. type: 1,
  73389. // 钱包
  73390. price: state.price * 100
  73391. });
  73392. if (code2 === 0) {
  73393. state.showModal = false;
  73394. await getAgentInfo();
  73395. onChangeTab({
  73396. index: 1
  73397. });
  73398. }
  73399. }
  73400. });
  73401. }
  73402. async function getAgentInfo() {
  73403. const {
  73404. code: code2,
  73405. data
  73406. } = await BrokerageApi.getBrokerageUserSummary();
  73407. if (code2 !== 0) {
  73408. return;
  73409. }
  73410. state.summary = data;
  73411. }
  73412. onLoad(async (options2) => {
  73413. state.today = dayjs().format("YYYY-MM-DD");
  73414. state.date = [state.today, state.today];
  73415. if (options2.type === 2) {
  73416. state.currentTab = 1;
  73417. }
  73418. getLogList();
  73419. getAgentInfo();
  73420. });
  73421. onReachBottom(() => {
  73422. if (state.loadStatus === "noMore") {
  73423. return;
  73424. }
  73425. state.pagination.pageNo++;
  73426. getLogList();
  73427. });
  73428. const __returned__ = { headerBg, state, tabMaps, dateFilterText, getLogList, onChangeTab, onChangeTime, onConfirm, getAgentInfo, computed: vue.computed, reactive: vue.reactive, get onLoad() {
  73429. return onLoad;
  73430. }, get onReachBottom() {
  73431. return onReachBottom;
  73432. }, get sheep() {
  73433. return sheep$1;
  73434. }, get dayjs() {
  73435. return dayjs;
  73436. }, get _() {
  73437. return _$1;
  73438. }, get BrokerageApi() {
  73439. return BrokerageApi;
  73440. }, get fen2yuan() {
  73441. return fen2yuan;
  73442. }, get resetPagination() {
  73443. return resetPagination;
  73444. } };
  73445. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  73446. return __returned__;
  73447. }
  73448. };
  73449. function _sfc_render$H(_ctx, _cache, $props, $setup, $data, $options) {
  73450. const _component_uni_datetime_picker = resolveEasycom(vue.resolveDynamicComponent("uni-datetime-picker"), __easycom_0$3);
  73451. const _component_su_tabs = resolveEasycom(vue.resolveDynamicComponent("su-tabs"), __easycom_0$a);
  73452. const _component_su_sticky = resolveEasycom(vue.resolveDynamicComponent("su-sticky"), __easycom_0$9);
  73453. const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6);
  73454. const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l);
  73455. const _component_su_popup = resolveEasycom(vue.resolveDynamicComponent("su-popup"), __easycom_4$3);
  73456. const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5);
  73457. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  73458. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  73459. class: "wallet-wrap",
  73460. title: "佣金"
  73461. }, {
  73462. default: vue.withCtx(() => [
  73463. vue.createCommentVNode(" 钱包卡片 "),
  73464. vue.createElementVNode("view", { class: "header-box ss-flex ss-row-center ss-col-center" }, [
  73465. vue.createElementVNode("view", { class: "card-box ui-BG-Main ui-Shadow-Main" }, [
  73466. vue.createElementVNode("view", { class: "card-head ss-flex ss-col-center" }, [
  73467. vue.createElementVNode("view", { class: "card-title ss-m-r-10" }, "当前佣金(元)"),
  73468. vue.createElementVNode(
  73469. "view",
  73470. {
  73471. onClick: _cache[0] || (_cache[0] = ($event) => $setup.state.showMoney = !$setup.state.showMoney),
  73472. class: vue.normalizeClass(["ss-eye-icon", $setup.state.showMoney ? "cicon-eye" : "cicon-eye-off"])
  73473. },
  73474. null,
  73475. 2
  73476. /* CLASS */
  73477. )
  73478. ]),
  73479. vue.createElementVNode("view", { class: "ss-flex ss-row-between ss-col-center ss-m-t-30" }, [
  73480. vue.createElementVNode(
  73481. "view",
  73482. { class: "money-num" },
  73483. vue.toDisplayString($setup.state.showMoney ? $setup.fen2yuan($setup.state.summary.withdrawPrice || 0) : "*****"),
  73484. 1
  73485. /* TEXT */
  73486. ),
  73487. vue.createElementVNode("view", { class: "ss-flex" }, [
  73488. vue.createElementVNode("view", { class: "ss-m-r-20" }, [
  73489. vue.createElementVNode("button", {
  73490. class: "ss-reset-button withdraw-btn",
  73491. onClick: _cache[1] || (_cache[1] = ($event) => $setup.sheep.$router.go("/pages/commission/withdraw"))
  73492. }, " 提现 ")
  73493. ]),
  73494. vue.createElementVNode("button", {
  73495. class: "ss-reset-button balance-btn ss-m-l-20",
  73496. onClick: _cache[2] || (_cache[2] = ($event) => $setup.state.showModal = true)
  73497. }, " 转余额 ")
  73498. ])
  73499. ]),
  73500. vue.createElementVNode("view", { class: "ss-flex" }, [
  73501. vue.createElementVNode("view", { class: "loading-money" }, [
  73502. vue.createElementVNode("view", { class: "loading-money-title" }, "冻结佣金"),
  73503. vue.createElementVNode(
  73504. "view",
  73505. { class: "loading-money-num" },
  73506. vue.toDisplayString($setup.state.showMoney ? $setup.fen2yuan($setup.state.summary.frozenPrice || 0) : "*****"),
  73507. 1
  73508. /* TEXT */
  73509. )
  73510. ]),
  73511. vue.createElementVNode("view", { class: "loading-money ss-m-l-100" }, [
  73512. vue.createElementVNode("view", { class: "loading-money-title" }, "可提现佣金"),
  73513. vue.createElementVNode(
  73514. "view",
  73515. { class: "loading-money-num" },
  73516. vue.toDisplayString($setup.state.showMoney ? $setup.fen2yuan($setup.state.summary.brokeragePrice || 0) : "*****"),
  73517. 1
  73518. /* TEXT */
  73519. )
  73520. ])
  73521. ])
  73522. ])
  73523. ]),
  73524. vue.createVNode(_component_su_sticky, null, {
  73525. default: vue.withCtx(() => [
  73526. vue.createCommentVNode(" 统计 "),
  73527. vue.createElementVNode("view", { class: "filter-box ss-p-x-30 ss-flex ss-col-center ss-row-between" }, [
  73528. vue.createVNode(_component_uni_datetime_picker, {
  73529. modelValue: $setup.state.date,
  73530. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.state.date = $event),
  73531. type: "daterange",
  73532. onChange: $setup.onChangeTime,
  73533. end: $setup.state.today
  73534. }, {
  73535. default: vue.withCtx(() => [
  73536. vue.createElementVNode("button", { class: "ss-reset-button date-btn" }, [
  73537. vue.createElementVNode(
  73538. "text",
  73539. null,
  73540. vue.toDisplayString($setup.dateFilterText),
  73541. 1
  73542. /* TEXT */
  73543. ),
  73544. vue.createElementVNode("text", { class: "cicon-drop-down ss-seldate-icon" })
  73545. ])
  73546. ]),
  73547. _: 1
  73548. /* STABLE */
  73549. }, 8, ["modelValue", "end"]),
  73550. vue.createElementVNode("view", { class: "total-box" }, [
  73551. vue.createCommentVNode(" TODO 非繁人:这里暂时不考虑做 "),
  73552. vue.createCommentVNode(' <view class="ss-m-b-10">总收入¥{{ state.pagination.income.toFixed(2) }}</view> '),
  73553. vue.createCommentVNode(" <view>总支出¥{{ (-state.pagination.expense).toFixed(2) }}</view> ")
  73554. ])
  73555. ]),
  73556. vue.createVNode(_component_su_tabs, {
  73557. list: $setup.tabMaps,
  73558. onChange: $setup.onChangeTab,
  73559. scrollable: false,
  73560. current: $setup.state.currentTab
  73561. }, null, 8, ["current"])
  73562. ]),
  73563. _: 1
  73564. /* STABLE */
  73565. }),
  73566. $setup.state.pagination.total === 0 ? (vue.openBlock(), vue.createBlock(_component_s_empty, {
  73567. key: 0,
  73568. icon: "/static/data-empty.png",
  73569. text: "暂无数据"
  73570. })) : vue.createCommentVNode("v-if", true),
  73571. vue.createCommentVNode(" 转余额弹框 "),
  73572. vue.createVNode(_component_su_popup, {
  73573. show: $setup.state.showModal,
  73574. type: "bottom",
  73575. round: "20",
  73576. onClose: _cache[5] || (_cache[5] = ($event) => $setup.state.showModal = false),
  73577. showClose: ""
  73578. }, {
  73579. default: vue.withCtx(() => [
  73580. vue.createElementVNode("view", { class: "ss-p-x-20 ss-p-y-30" }, [
  73581. vue.createElementVNode("view", { class: "model-title ss-m-b-30 ss-m-l-20" }, "转余额"),
  73582. vue.createElementVNode("view", { class: "model-subtitle ss-m-b-100 ss-m-l-20" }, "将您的佣金转到余额中继续消费"),
  73583. vue.createElementVNode("view", { class: "input-box ss-flex ss-col-center border-bottom ss-m-b-70 ss-m-x-20" }, [
  73584. vue.createElementVNode("view", { class: "unit" }, "¥"),
  73585. vue.createVNode(_component_uni_easyinput, {
  73586. inputBorder: false,
  73587. class: "ss-flex-1 ss-p-l-10",
  73588. modelValue: $setup.state.price,
  73589. "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.state.price = $event),
  73590. type: "number",
  73591. placeholder: "请输入金额"
  73592. }, null, 8, ["modelValue"])
  73593. ]),
  73594. vue.createElementVNode("button", {
  73595. class: "ss-reset-button model-btn ui-BG-Main-Gradient ui-Shadow-Main",
  73596. onClick: $setup.onConfirm
  73597. }, " 确定 ")
  73598. ])
  73599. ]),
  73600. _: 1
  73601. /* STABLE */
  73602. }, 8, ["show"]),
  73603. vue.createCommentVNode(" 钱包记录 "),
  73604. $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1 }, [
  73605. (vue.openBlock(true), vue.createElementBlock(
  73606. vue.Fragment,
  73607. null,
  73608. vue.renderList($setup.state.pagination.list, (item) => {
  73609. return vue.openBlock(), vue.createElementBlock("view", {
  73610. class: "wallet-list ss-flex border-bottom",
  73611. key: item.id
  73612. }, [
  73613. vue.createElementVNode("view", { class: "list-content" }, [
  73614. vue.createElementVNode("view", { class: "title-box ss-flex ss-row-between ss-m-b-20" }, [
  73615. vue.createElementVNode(
  73616. "text",
  73617. { class: "title ss-line-1" },
  73618. vue.toDisplayString(item.title),
  73619. 1
  73620. /* TEXT */
  73621. ),
  73622. vue.createElementVNode("view", { class: "money" }, [
  73623. item.price >= 0 ? (vue.openBlock(), vue.createElementBlock(
  73624. "text",
  73625. {
  73626. key: 0,
  73627. class: "add"
  73628. },
  73629. "+" + vue.toDisplayString($setup.fen2yuan(item.price)),
  73630. 1
  73631. /* TEXT */
  73632. )) : (vue.openBlock(), vue.createElementBlock(
  73633. "text",
  73634. {
  73635. key: 1,
  73636. class: "minus"
  73637. },
  73638. vue.toDisplayString($setup.fen2yuan(item.price)),
  73639. 1
  73640. /* TEXT */
  73641. ))
  73642. ])
  73643. ]),
  73644. vue.createElementVNode(
  73645. "text",
  73646. { class: "time" },
  73647. vue.toDisplayString($setup.sheep.$helper.timeFormat(item.createTime, "yyyy-mm-dd hh:MM:ss")),
  73648. 1
  73649. /* TEXT */
  73650. )
  73651. ])
  73652. ]);
  73653. }),
  73654. 128
  73655. /* KEYED_FRAGMENT */
  73656. ))
  73657. ])) : vue.createCommentVNode("v-if", true),
  73658. vue.createCommentVNode(" <u-gap></u-gap> "),
  73659. $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, {
  73660. key: 2,
  73661. status: $setup.state.loadStatus,
  73662. "content-text": {
  73663. contentdown: "上拉加载更多"
  73664. }
  73665. }, null, 8, ["status"])) : vue.createCommentVNode("v-if", true)
  73666. ]),
  73667. _: 1
  73668. /* STABLE */
  73669. });
  73670. }
  73671. const PagesCommissionWallet = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["render", _sfc_render$H], ["__scopeId", "data-v-52afd294"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/commission/wallet.vue"]]);
  73672. const _sfc_main$H = {
  73673. __name: "goods",
  73674. setup(__props, { expose: __expose }) {
  73675. __expose();
  73676. const state = vue.reactive({
  73677. pagination: {
  73678. list: [],
  73679. total: 0,
  73680. pageNo: 1,
  73681. pageSize: 1
  73682. },
  73683. loadStatus: "",
  73684. shareInfo: {}
  73685. });
  73686. function onShareGoods(goodsInfo) {
  73687. state.shareInfo = $share.getShareInfo(
  73688. {
  73689. title: goodsInfo.title,
  73690. image: sheep$1.$url.cdn(goodsInfo.image),
  73691. desc: goodsInfo.subtitle,
  73692. params: {
  73693. page: "2",
  73694. query: goodsInfo.id
  73695. }
  73696. },
  73697. {
  73698. type: "goods",
  73699. // 商品海报
  73700. title: goodsInfo.title,
  73701. // 商品标题
  73702. image: sheep$1.$url.cdn(goodsInfo.image),
  73703. // 商品主图
  73704. price: goodsInfo.price[0],
  73705. // 商品价格
  73706. original_price: goodsInfo.original_price
  73707. // 商品原价
  73708. }
  73709. );
  73710. showShareModal();
  73711. }
  73712. async function getGoodsList() {
  73713. state.loadStatus = "loading";
  73714. let { code: code2, data } = await SpuApi.getSpuPage({
  73715. pageSize: state.pagination.pageSize,
  73716. pageNo: state.pagination.pageNo
  73717. });
  73718. if (code2 !== 0) {
  73719. return;
  73720. }
  73721. state.pagination.list = _$1.concat(state.pagination.list, data.list);
  73722. state.pagination.total = data.total;
  73723. state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore";
  73724. data.list.forEach((item) => {
  73725. BrokerageApi.getProductBrokeragePrice(item.id).then((res) => {
  73726. item.brokerageMinPrice = res.data.brokerageMinPrice;
  73727. item.brokerageMaxPrice = res.data.brokerageMaxPrice;
  73728. });
  73729. });
  73730. }
  73731. onLoad(() => {
  73732. getGoodsList();
  73733. });
  73734. function loadMore() {
  73735. if (state.loadStatus === "noMore") {
  73736. return;
  73737. }
  73738. state.pagination.pageNo++;
  73739. getGoodsList();
  73740. }
  73741. onReachBottom(() => {
  73742. loadMore();
  73743. });
  73744. const __returned__ = { state, onShareGoods, getGoodsList, loadMore, get sheep() {
  73745. return sheep$1;
  73746. }, get $share() {
  73747. return $share;
  73748. }, get onLoad() {
  73749. return onLoad;
  73750. }, get onReachBottom() {
  73751. return onReachBottom;
  73752. }, reactive: vue.reactive, get _() {
  73753. return _$1;
  73754. }, get showShareModal() {
  73755. return showShareModal;
  73756. }, get SpuApi() {
  73757. return SpuApi;
  73758. }, get BrokerageApi() {
  73759. return BrokerageApi;
  73760. }, get fen2yuan() {
  73761. return fen2yuan;
  73762. } };
  73763. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  73764. return __returned__;
  73765. }
  73766. };
  73767. function _sfc_render$G(_ctx, _cache, $props, $setup, $data, $options) {
  73768. const _component_s_goods_item = resolveEasycom(vue.resolveDynamicComponent("s-goods-item"), __easycom_3$5);
  73769. const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6);
  73770. const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5);
  73771. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  73772. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  73773. title: "推广商品",
  73774. onShareAppMessage: $setup.state.shareInfo
  73775. }, {
  73776. default: vue.withCtx(() => [
  73777. (vue.openBlock(true), vue.createElementBlock(
  73778. vue.Fragment,
  73779. null,
  73780. vue.renderList($setup.state.pagination.list, (item) => {
  73781. return vue.openBlock(), vue.createElementBlock("view", {
  73782. class: "goods-item ss-m-20",
  73783. key: item.id
  73784. }, [
  73785. vue.createVNode(_component_s_goods_item, {
  73786. size: "lg",
  73787. img: item.picUrl,
  73788. title: item.name,
  73789. subTitle: item.introduction,
  73790. price: item.price,
  73791. originPrice: item.marketPrice,
  73792. priceColor: "#333",
  73793. onClick: ($event) => $setup.sheep.$router.go("/pages/goods/index", { id: item.id })
  73794. }, {
  73795. rightBottom: vue.withCtx(() => [
  73796. vue.createElementVNode("view", { class: "ss-flex ss-row-between" }, [
  73797. item.brokerageMinPrice === void 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  73798. key: 0,
  73799. class: "commission-num"
  73800. }, "预计佣金:计算中")) : item.brokerageMinPrice === item.brokerageMaxPrice ? (vue.openBlock(), vue.createElementBlock(
  73801. "view",
  73802. {
  73803. key: 1,
  73804. class: "commission-num"
  73805. },
  73806. " 预计佣金:" + vue.toDisplayString($setup.fen2yuan(item.brokerageMinPrice)),
  73807. 1
  73808. /* TEXT */
  73809. )) : (vue.openBlock(), vue.createElementBlock(
  73810. "view",
  73811. {
  73812. key: 2,
  73813. class: "commission-num"
  73814. },
  73815. " 预计佣金:" + vue.toDisplayString($setup.fen2yuan(item.brokerageMinPrice)) + " ~ " + vue.toDisplayString($setup.fen2yuan(item.brokerageMaxPrice)),
  73816. 1
  73817. /* TEXT */
  73818. )),
  73819. vue.createElementVNode("button", {
  73820. class: "ss-reset-button share-btn ui-BG-Main-Gradient",
  73821. onClick: vue.withModifiers(($event) => $setup.onShareGoods(item), ["stop"])
  73822. }, " 分享赚 ", 8, ["onClick"])
  73823. ])
  73824. ]),
  73825. _: 2
  73826. /* DYNAMIC */
  73827. }, 1032, ["img", "title", "subTitle", "price", "originPrice", "onClick"])
  73828. ]);
  73829. }),
  73830. 128
  73831. /* KEYED_FRAGMENT */
  73832. )),
  73833. $setup.state.pagination.total === 0 ? (vue.openBlock(), vue.createBlock(_component_s_empty, {
  73834. key: 0,
  73835. icon: "/static/goods-empty.png",
  73836. text: "暂无推广商品"
  73837. })) : vue.createCommentVNode("v-if", true),
  73838. vue.createCommentVNode(" 加载更多 "),
  73839. $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, {
  73840. key: 1,
  73841. status: $setup.state.loadStatus,
  73842. "content-text": {
  73843. contentdown: "上拉加载更多"
  73844. },
  73845. onClick: $setup.loadMore
  73846. }, null, 8, ["status"])) : vue.createCommentVNode("v-if", true)
  73847. ]),
  73848. _: 1
  73849. /* STABLE */
  73850. }, 8, ["onShareAppMessage"]);
  73851. }
  73852. const PagesCommissionGoods = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_render$G], ["__scopeId", "data-v-1b0a4b5d"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/commission/goods.vue"]]);
  73853. const _sfc_main$G = {
  73854. __name: "order",
  73855. setup(__props, { expose: __expose }) {
  73856. __expose();
  73857. vue.useCssVars((_ctx) => ({
  73858. "3971f30d-headerBg": vue.unref(headerBg)
  73859. }));
  73860. const statusBarHeight = sheep$1.$platform.device.statusBarHeight * 2;
  73861. const headerBg = sheep$1.$url.css("/static/img/shop/user/withdraw_bg.png");
  73862. onPageScroll((e2) => {
  73863. state.scrollTop = e2.scrollTop <= 100;
  73864. });
  73865. const state = vue.reactive({
  73866. totals: 0,
  73867. // 累计推广订单(单)
  73868. scrollTop: false,
  73869. currentTab: 0,
  73870. loadStatus: "",
  73871. pagination: {
  73872. list: [],
  73873. total: 0,
  73874. pageNo: 1,
  73875. pageSize: 1
  73876. }
  73877. });
  73878. const tabMaps = [
  73879. {
  73880. name: "全部",
  73881. value: "all"
  73882. },
  73883. {
  73884. name: "待结算",
  73885. value: "0"
  73886. // 待结算
  73887. },
  73888. {
  73889. name: "已结算",
  73890. value: "1"
  73891. // 已结算
  73892. }
  73893. ];
  73894. function onTabsChange(e2) {
  73895. resetPagination(state.pagination);
  73896. state.currentTab = e2.index;
  73897. getOrderList();
  73898. }
  73899. async function getOrderList() {
  73900. state.loadStatus = "loading";
  73901. let { code: code2, data } = await BrokerageApi.getBrokerageRecordPage({
  73902. pageSize: state.pagination.pageSize,
  73903. pageNo: state.pagination.pageSize,
  73904. bizType: 1,
  73905. // 获得推广佣金
  73906. status: state.currentTab > 0 ? state.currentTab : void 0
  73907. });
  73908. if (code2 !== 0) {
  73909. return;
  73910. }
  73911. state.pagination.list = _$1.concat(state.pagination.list, data.list);
  73912. state.pagination.total = data.total;
  73913. state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore";
  73914. if (state.currentTab === 0) {
  73915. state.totals = data.total;
  73916. }
  73917. }
  73918. onLoad(() => {
  73919. getOrderList();
  73920. });
  73921. function loadMore() {
  73922. if (state.loadStatus === "noMore") {
  73923. return;
  73924. }
  73925. state.pagination.pageNo++;
  73926. getOrderList();
  73927. }
  73928. onReachBottom(() => {
  73929. loadMore();
  73930. });
  73931. const __returned__ = { statusBarHeight, headerBg, state, tabMaps, onTabsChange, getOrderList, loadMore, get sheep() {
  73932. return sheep$1;
  73933. }, get onLoad() {
  73934. return onLoad;
  73935. }, get onReachBottom() {
  73936. return onReachBottom;
  73937. }, reactive: vue.reactive, get _() {
  73938. return _$1;
  73939. }, get onPageScroll() {
  73940. return onPageScroll;
  73941. }, get resetPagination() {
  73942. return resetPagination;
  73943. }, get BrokerageApi() {
  73944. return BrokerageApi;
  73945. }, get fen2yuan() {
  73946. return fen2yuan;
  73947. } };
  73948. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  73949. return __returned__;
  73950. }
  73951. };
  73952. function _sfc_render$F(_ctx, _cache, $props, $setup, $data, $options) {
  73953. const _component_su_tabs = resolveEasycom(vue.resolveDynamicComponent("su-tabs"), __easycom_0$a);
  73954. const _component_su_sticky = resolveEasycom(vue.resolveDynamicComponent("su-sticky"), __easycom_0$9);
  73955. const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6);
  73956. const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5);
  73957. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  73958. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  73959. title: "分销订单",
  73960. class: vue.normalizeClass($setup.state.scrollTop ? "order-warp" : ""),
  73961. navbar: "inner"
  73962. }, {
  73963. default: vue.withCtx(() => [
  73964. vue.createElementVNode(
  73965. "view",
  73966. {
  73967. class: "header-box",
  73968. style: vue.normalizeStyle([
  73969. {
  73970. marginTop: "-" + Number($setup.statusBarHeight + 88) + "rpx",
  73971. paddingTop: Number($setup.statusBarHeight + 108) + "rpx"
  73972. }
  73973. ])
  73974. },
  73975. [
  73976. vue.createCommentVNode(" 团队数据总览 "),
  73977. vue.createElementVNode("view", {
  73978. class: "team-data-box ss-flex ss-col-center ss-row-between",
  73979. style: { "width": "100%" }
  73980. }, [
  73981. vue.createElementVNode("view", {
  73982. class: "data-card",
  73983. style: { "width": "100%" }
  73984. }, [
  73985. vue.createElementVNode("view", {
  73986. class: "total-item",
  73987. style: { "width": "100%" }
  73988. }, [
  73989. vue.createElementVNode("view", {
  73990. class: "item-title",
  73991. style: { "text-align": "center" }
  73992. }, "累计推广订单(单)"),
  73993. vue.createElementVNode(
  73994. "view",
  73995. {
  73996. class: "total-num",
  73997. style: { "text-align": "center" }
  73998. },
  73999. vue.toDisplayString($setup.state.totals),
  74000. 1
  74001. /* TEXT */
  74002. )
  74003. ])
  74004. ])
  74005. ])
  74006. ],
  74007. 4
  74008. /* STYLE */
  74009. ),
  74010. vue.createCommentVNode(" tab "),
  74011. vue.createVNode(_component_su_sticky, { bgColor: "#fff" }, {
  74012. default: vue.withCtx(() => [
  74013. vue.createVNode(_component_su_tabs, {
  74014. list: $setup.tabMaps,
  74015. scrollable: false,
  74016. current: $setup.state.currentTab,
  74017. onChange: $setup.onTabsChange
  74018. }, null, 8, ["current"])
  74019. ]),
  74020. _: 1
  74021. /* STABLE */
  74022. }),
  74023. vue.createCommentVNode(" 订单 "),
  74024. vue.createElementVNode("view", { class: "order-box" }, [
  74025. (vue.openBlock(true), vue.createElementBlock(
  74026. vue.Fragment,
  74027. null,
  74028. vue.renderList($setup.state.pagination.list, (item) => {
  74029. return vue.openBlock(), vue.createElementBlock("view", {
  74030. class: "order-item",
  74031. key: item
  74032. }, [
  74033. vue.createElementVNode("view", { class: "order-header" }, [
  74034. vue.createElementVNode("view", { class: "no-box ss-flex ss-col-center ss-row-between" }, [
  74035. vue.createElementVNode(
  74036. "text",
  74037. { class: "order-code" },
  74038. "订单编号:" + vue.toDisplayString(item.bizId),
  74039. 1
  74040. /* TEXT */
  74041. ),
  74042. vue.createElementVNode(
  74043. "text",
  74044. { class: "order-state" },
  74045. vue.toDisplayString(item.status === 0 ? "待结算" : item.status === 1 ? "已结算" : "已取消") + " ( 佣金 " + vue.toDisplayString($setup.fen2yuan(item.price)) + " 元 ) ",
  74046. 1
  74047. /* TEXT */
  74048. )
  74049. ]),
  74050. vue.createElementVNode("view", { class: "order-from ss-flex ss-col-center ss-row-between" }, [
  74051. vue.createElementVNode("view", { class: "from-user ss-flex ss-col-center" }, [
  74052. vue.createElementVNode(
  74053. "text",
  74054. null,
  74055. vue.toDisplayString(item.title),
  74056. 1
  74057. /* TEXT */
  74058. )
  74059. ]),
  74060. vue.createElementVNode(
  74061. "view",
  74062. { class: "order-time" },
  74063. vue.toDisplayString($setup.sheep.$helper.timeFormat(item.createTime, "yyyy-mm-dd hh:MM:ss")),
  74064. 1
  74065. /* TEXT */
  74066. )
  74067. ])
  74068. ])
  74069. ]);
  74070. }),
  74071. 128
  74072. /* KEYED_FRAGMENT */
  74073. )),
  74074. vue.createCommentVNode(" 数据为空 "),
  74075. $setup.state.pagination.total === 0 ? (vue.openBlock(), vue.createBlock(_component_s_empty, {
  74076. key: 0,
  74077. icon: "/static/order-empty.png",
  74078. text: "暂无订单"
  74079. })) : vue.createCommentVNode("v-if", true),
  74080. vue.createCommentVNode(" 加载更多 "),
  74081. $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, {
  74082. key: 1,
  74083. status: $setup.state.loadStatus,
  74084. "content-text": {
  74085. contentdown: "上拉加载更多"
  74086. },
  74087. onClick: $setup.loadMore
  74088. }, null, 8, ["status"])) : vue.createCommentVNode("v-if", true)
  74089. ])
  74090. ]),
  74091. _: 1
  74092. /* STABLE */
  74093. }, 8, ["class"]);
  74094. }
  74095. const PagesCommissionOrder = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$F], ["__scopeId", "data-v-3971f30d"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/commission/order.vue"]]);
  74096. const _imports_0$3 = "/static/images/search.png";
  74097. const _imports_1$1 = "/static/images/sort1.png";
  74098. const _imports_2 = "/static/images/sort3.png";
  74099. const _imports_3 = "/static/images/sort2.png";
  74100. const _sfc_main$F = {
  74101. __name: "team",
  74102. setup(__props, { expose: __expose }) {
  74103. __expose();
  74104. vue.useCssVars((_ctx) => ({
  74105. "42603af6-headerBg": vue.unref(headerBg)
  74106. }));
  74107. const statusBarHeight = sheep$1.$platform.device.statusBarHeight * 2;
  74108. const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo);
  74109. const headerBg = sheep$1.$url.css("/static/img/shop/user/withdraw_bg.png");
  74110. onPageScroll((e2) => {
  74111. state.scrollTop = e2.scrollTop <= 100;
  74112. });
  74113. let sort = vue.ref();
  74114. const state = vue.reactive({
  74115. summary: {},
  74116. pagination: {
  74117. pageNo: 1,
  74118. pageSize: 8,
  74119. list: [],
  74120. total: 0
  74121. },
  74122. loadStatus: "",
  74123. // ↓ 新 ui 逻辑
  74124. level: 1,
  74125. nickname: vue.ref(""),
  74126. sortKey: "",
  74127. isAsc: ""
  74128. });
  74129. function filterUserNum(num) {
  74130. if (_$1.isNil(num)) {
  74131. return "";
  74132. }
  74133. return `下级团队${num}人`;
  74134. }
  74135. function submitForm() {
  74136. state.pagination.list = [];
  74137. getTeamList();
  74138. }
  74139. async function getTeamList() {
  74140. state.loadStatus = "loading";
  74141. let { code: code2, data } = await BrokerageApi.getBrokerageUserChildSummaryPage({
  74142. pageNo: state.pagination.pageNo,
  74143. pageSize: state.pagination.pageSize,
  74144. level: state.level,
  74145. "sortingField.order": state.isAsc,
  74146. "sortingField.field": state.sortKey,
  74147. nickname: state.nickname
  74148. });
  74149. if (code2 !== 0) {
  74150. return;
  74151. }
  74152. state.pagination.list = _$1.concat(state.pagination.list, data.list);
  74153. state.pagination.total = data.total;
  74154. state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore";
  74155. }
  74156. function setType(e2) {
  74157. state.pagination.list = [];
  74158. state.level = e2 + "";
  74159. getTeamList();
  74160. }
  74161. function setSort(sortKey, isAsc) {
  74162. state.pagination.list = [];
  74163. sort = sortKey + isAsc.toUpperCase();
  74164. state.isAsc = isAsc;
  74165. state.sortKey = sortKey;
  74166. getTeamList();
  74167. }
  74168. onLoad(async () => {
  74169. await getTeamList();
  74170. let { data } = await BrokerageApi.getBrokerageUserSummary();
  74171. state.summary = data;
  74172. });
  74173. function loadMore() {
  74174. if (state.loadStatus === "noMore") {
  74175. return;
  74176. }
  74177. state.pagination.pageNo++;
  74178. getTeamList();
  74179. }
  74180. onReachBottom(() => {
  74181. loadMore();
  74182. });
  74183. const __returned__ = { statusBarHeight, userInfo: userInfo2, headerBg, get sort() {
  74184. return sort;
  74185. }, set sort(v2) {
  74186. sort = v2;
  74187. }, state, filterUserNum, submitForm, getTeamList, setType, setSort, loadMore, get sheep() {
  74188. return sheep$1;
  74189. }, get onLoad() {
  74190. return onLoad;
  74191. }, get onReachBottom() {
  74192. return onReachBottom;
  74193. }, computed: vue.computed, reactive: vue.reactive, ref: vue.ref, get _() {
  74194. return _$1;
  74195. }, get onPageScroll() {
  74196. return onPageScroll;
  74197. }, get BrokerageApi() {
  74198. return BrokerageApi;
  74199. } };
  74200. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  74201. return __returned__;
  74202. }
  74203. };
  74204. function _sfc_render$E(_ctx, _cache, $props, $setup, $data, $options) {
  74205. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  74206. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  74207. title: "我的团队",
  74208. class: vue.normalizeClass($setup.state.scrollTop ? "team-wrap" : ""),
  74209. navbar: "inner"
  74210. }, {
  74211. default: vue.withCtx(() => [
  74212. vue.createElementVNode("view", { class: "promoter-list" }, [
  74213. vue.createElementVNode("view", {
  74214. class: "promoterHeader bg-color",
  74215. style: { "backgroundcolor": "#e93323 !important", "height": "218rpx", "color": "#fff" }
  74216. }, [
  74217. vue.createElementVNode("view", {
  74218. class: "headerCon acea-row row-between",
  74219. style: { "padding": "28px 29px 0 29px" }
  74220. }, [
  74221. vue.createElementVNode("view", null, [
  74222. vue.createElementVNode("view", {
  74223. class: "name",
  74224. style: { "color": "#fff" }
  74225. }, "推广人数"),
  74226. vue.createElementVNode("view", null, [
  74227. vue.createElementVNode(
  74228. "text",
  74229. {
  74230. class: "num",
  74231. style: { "color": "#fff" }
  74232. },
  74233. vue.toDisplayString($setup.state.summary.firstBrokerageUserCount + $setup.state.summary.secondBrokerageUserCount || 0),
  74234. 1
  74235. /* TEXT */
  74236. ),
  74237. vue.createTextVNode(" 人 ")
  74238. ])
  74239. ]),
  74240. vue.createElementVNode("view", { class: "iconfont icon-tuandui" })
  74241. ])
  74242. ]),
  74243. vue.createElementVNode("view", { style: { "padding": "0 30rpx" } }, [
  74244. vue.createElementVNode("view", { class: "nav acea-row row-around l1" }, [
  74245. vue.createElementVNode(
  74246. "view",
  74247. {
  74248. class: vue.normalizeClass($setup.state.level == 1 ? "item on" : "item"),
  74249. onClick: _cache[0] || (_cache[0] = ($event) => $setup.setType(1))
  74250. },
  74251. " 一级(" + vue.toDisplayString($setup.state.summary.firstBrokerageUserCount || 0) + ") ",
  74252. 3
  74253. /* TEXT, CLASS */
  74254. ),
  74255. vue.createElementVNode(
  74256. "view",
  74257. {
  74258. class: vue.normalizeClass($setup.state.level == 2 ? "item on" : "item"),
  74259. onClick: _cache[1] || (_cache[1] = ($event) => $setup.setType(2))
  74260. },
  74261. " 二级(" + vue.toDisplayString($setup.state.summary.secondBrokerageUserCount || 0) + ") ",
  74262. 3
  74263. /* TEXT, CLASS */
  74264. )
  74265. ]),
  74266. vue.createElementVNode("view", {
  74267. class: "search acea-row row-between-wrapper",
  74268. style: { "display": "flex", "height": "100rpx", "align-items": "center" }
  74269. }, [
  74270. vue.createElementVNode("view", { class: "input" }, [
  74271. vue.withDirectives(vue.createElementVNode(
  74272. "input",
  74273. {
  74274. placeholder: "点击搜索会员名称",
  74275. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.nickname = $event),
  74276. "confirm-type": "search",
  74277. name: "search",
  74278. onConfirm: $setup.submitForm
  74279. },
  74280. null,
  74281. 544
  74282. /* NEED_HYDRATION, NEED_PATCH */
  74283. ), [
  74284. [vue.vModelText, $setup.state.nickname]
  74285. ])
  74286. ]),
  74287. vue.createElementVNode("image", {
  74288. src: _imports_0$3,
  74289. mode: "",
  74290. style: { "width": "60rpx", "height": "64rpx" },
  74291. onClick: $setup.submitForm
  74292. })
  74293. ]),
  74294. vue.createElementVNode("view", { class: "list" }, [
  74295. vue.createElementVNode("view", {
  74296. class: "sortNav acea-row row-middle",
  74297. style: { "display": "flex", "align-items": "center" }
  74298. }, [
  74299. $setup.sort === "userCountDESC" ? (vue.openBlock(), vue.createElementBlock("view", {
  74300. key: 0,
  74301. class: "sortItem",
  74302. onClick: _cache[3] || (_cache[3] = ($event) => $setup.setSort("userCount", "asc"))
  74303. }, [
  74304. vue.createTextVNode(" 团队排序 "),
  74305. vue.createCommentVNode(" TODO 非繁人:看看怎么从项目里拿出去 "),
  74306. vue.createElementVNode("image", { src: _imports_1$1 })
  74307. ])) : $setup.sort === "userCountASC" ? (vue.openBlock(), vue.createElementBlock("view", {
  74308. key: 1,
  74309. class: "sortItem",
  74310. onClick: _cache[4] || (_cache[4] = ($event) => $setup.setSort("userCount", "desc"))
  74311. }, [
  74312. vue.createTextVNode(" 团队排序 "),
  74313. vue.createElementVNode("image", { src: _imports_2 })
  74314. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  74315. key: 2,
  74316. class: "sortItem",
  74317. onClick: _cache[5] || (_cache[5] = ($event) => $setup.setSort("userCount", "desc"))
  74318. }, [
  74319. vue.createTextVNode(" 团队排序 "),
  74320. vue.createElementVNode("image", { src: _imports_3 })
  74321. ])),
  74322. $setup.sort === "priceDESC" ? (vue.openBlock(), vue.createElementBlock("view", {
  74323. key: 3,
  74324. class: "sortItem",
  74325. onClick: _cache[6] || (_cache[6] = ($event) => $setup.setSort("price", "asc"))
  74326. }, [
  74327. vue.createTextVNode(" 金额排序 "),
  74328. vue.createElementVNode("image", { src: _imports_1$1 })
  74329. ])) : $setup.sort === "priceASC" ? (vue.openBlock(), vue.createElementBlock("view", {
  74330. key: 4,
  74331. class: "sortItem",
  74332. onClick: _cache[7] || (_cache[7] = ($event) => $setup.setSort("price", "desc"))
  74333. }, [
  74334. vue.createTextVNode(" 金额排序 "),
  74335. vue.createElementVNode("image", { src: _imports_2 })
  74336. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  74337. key: 5,
  74338. class: "sortItem",
  74339. onClick: _cache[8] || (_cache[8] = ($event) => $setup.setSort("price", "desc"))
  74340. }, [
  74341. vue.createTextVNode(" 金额排序 "),
  74342. vue.createElementVNode("image", { src: _imports_3 })
  74343. ])),
  74344. $setup.sort === "orderCountDESC" ? (vue.openBlock(), vue.createElementBlock("view", {
  74345. key: 6,
  74346. class: "sortItem",
  74347. onClick: _cache[9] || (_cache[9] = ($event) => $setup.setSort("orderCount", "asc"))
  74348. }, [
  74349. vue.createTextVNode(" 订单排序 "),
  74350. vue.createElementVNode("image", { src: _imports_1$1 })
  74351. ])) : $setup.sort === "orderCountASC" ? (vue.openBlock(), vue.createElementBlock("view", {
  74352. key: 7,
  74353. class: "sortItem",
  74354. onClick: _cache[10] || (_cache[10] = ($event) => $setup.setSort("orderCount", "desc"))
  74355. }, [
  74356. vue.createTextVNode(" 订单排序 "),
  74357. vue.createElementVNode("image", { src: _imports_2 })
  74358. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  74359. key: 8,
  74360. class: "sortItem",
  74361. onClick: _cache[11] || (_cache[11] = ($event) => $setup.setSort("orderCount", "desc"))
  74362. }, [
  74363. vue.createTextVNode(" 订单排序 "),
  74364. vue.createElementVNode("image", { src: _imports_3 })
  74365. ]))
  74366. ]),
  74367. (vue.openBlock(true), vue.createElementBlock(
  74368. vue.Fragment,
  74369. null,
  74370. vue.renderList($setup.state.pagination.list, (item, index2) => {
  74371. return vue.openBlock(), vue.createElementBlock("view", {
  74372. key: index2,
  74373. class: "item acea-row row-between-wrapper",
  74374. style: { "display": "flex" }
  74375. }, [
  74376. vue.createElementVNode("view", {
  74377. class: "picTxt acea-row row-between-wrapper",
  74378. style: { "display": "flex", "align-items": "center" }
  74379. }, [
  74380. vue.createElementVNode("view", { class: "pictrue" }, [
  74381. vue.createElementVNode("image", {
  74382. src: item.avatar
  74383. }, null, 8, ["src"])
  74384. ]),
  74385. vue.createElementVNode("view", { class: "text" }, [
  74386. vue.createElementVNode(
  74387. "view",
  74388. { class: "name line1" },
  74389. vue.toDisplayString(item.nickname),
  74390. 1
  74391. /* TEXT */
  74392. ),
  74393. vue.createElementVNode(
  74394. "view",
  74395. null,
  74396. " 加入时间: " + vue.toDisplayString($setup.sheep.$helper.timeFormat(item.brokerageTime, "yyyy-mm-dd hh:MM:ss")),
  74397. 1
  74398. /* TEXT */
  74399. )
  74400. ])
  74401. ]),
  74402. vue.createElementVNode("view", {
  74403. class: "right",
  74404. style: { "justify-content": "center", "flex-direction": "column", "display": "flex", "margin-left": "auto" }
  74405. }, [
  74406. vue.createElementVNode("view", null, [
  74407. vue.createElementVNode(
  74408. "text",
  74409. { class: "num font-color" },
  74410. vue.toDisplayString(item.brokerageUserCount || 0),
  74411. 1
  74412. /* TEXT */
  74413. ),
  74414. vue.createTextVNode("人 ")
  74415. ]),
  74416. vue.createElementVNode("view", null, [
  74417. vue.createElementVNode(
  74418. "text",
  74419. { class: "num" },
  74420. vue.toDisplayString(item.orderCount || 0),
  74421. 1
  74422. /* TEXT */
  74423. ),
  74424. vue.createTextVNode("单")
  74425. ]),
  74426. vue.createElementVNode("view", null, [
  74427. vue.createElementVNode(
  74428. "text",
  74429. { class: "num" },
  74430. vue.toDisplayString(item.brokeragePrice || 0),
  74431. 1
  74432. /* TEXT */
  74433. ),
  74434. vue.createTextVNode("元 ")
  74435. ])
  74436. ])
  74437. ]);
  74438. }),
  74439. 128
  74440. /* KEYED_FRAGMENT */
  74441. )),
  74442. $setup.state.pagination.list.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  74443. key: 0,
  74444. style: { "text-align": "center" }
  74445. }, "暂无推广人数")) : vue.createCommentVNode("v-if", true)
  74446. ])
  74447. ])
  74448. ]),
  74449. vue.createCommentVNode(" <home></home> "),
  74450. vue.createCommentVNode(` <view class="header-box" :style="[
  74451. {
  74452. marginTop: '-' + Number(statusBarHeight + 88) + 'rpx',
  74453. paddingTop: Number(statusBarHeight + 108) + 'rpx',
  74454. },
  74455. ]">
  74456. <view v-if="userInfo.parent_user" class="referrer-box ss-flex ss-col-center">
  74457. 推荐人:
  74458. <image class="referrer-avatar ss-m-r-10" :src="sheep.$url.cdn(userInfo.parent_user.avatar)"
  74459. mode="aspectFill">
  74460. </image>
  74461. {{ userInfo.parent_user.nickname }}
  74462. </view>
  74463. <view class="team-data-box ss-flex ss-col-center ss-row-between">
  74464. <view class="data-card">
  74465. <view class="total-item">
  74466. <view class="item-title">团队总人数(人)</view>
  74467. <view class="total-num">
  74468. {{ (state.summary.firstBrokerageUserCount+ state.summary.secondBrokerageUserCount)|| 0 }}
  74469. </view>
  74470. </view>
  74471. <view class="category-item ss-flex">
  74472. <view class="ss-flex-1">
  74473. <view class="item-title">一级成员</view>
  74474. <view class="category-num">{{ state.summary.firstBrokerageUserCount || 0 }}</view>
  74475. </view>
  74476. <view class="ss-flex-1">
  74477. <view class="item-title">二级成员</view>
  74478. <view class="category-num">{{ state.summary.secondBrokerageUserCount || 0 }}</view>
  74479. </view>
  74480. </view>
  74481. </view>
  74482. <view class="data-card">
  74483. <view class="total-item">
  74484. <view class="item-title">团队分销商人数(人)</view>
  74485. <view class="total-num">{{ agentInfo?.child_agent_count_all || 0 }}</view>
  74486. </view>
  74487. <view class="category-item ss-flex">
  74488. <view class="ss-flex-1">
  74489. <view class="item-title">一级分销商</view>
  74490. <view class="category-num">{{ agentInfo?.child_agent_count_1 || 0 }}</view>
  74491. </view>
  74492. <view class="ss-flex-1">
  74493. <view class="item-title">二级分销商</view>
  74494. <view class="category-num">{{ agentInfo?.child_agent_count_2 || 0 }}</view>
  74495. </view>
  74496. </view>
  74497. </view>
  74498. </view>
  74499. </view>
  74500. <view class="list-box">
  74501. <uni-list :border="false">
  74502. <uni-list-chat v-for="item in state.pagination.data" :key="item.id" :avatar-circle="true"
  74503. :title="item.nickname" :avatar="sheep.$url.cdn(item.avatar)"
  74504. :note="filterUserNum(item.agent?.child_user_count_1)">
  74505. <view class="chat-custom-right">
  74506. <view v-if="item.avatar" class="tag-box ss-flex ss-col-center">
  74507. <image class="tag-img" :src="sheep.$url.cdn(item.avatar)" mode="aspectFill">
  74508. </image>
  74509. <text class="tag-title">{{ item.nickname }}</text>
  74510. </view>
  74511. <text
  74512. class="time-text">{{ sheep.$helper.timeFormat(item.brokerageTime, 'yyyy-mm-dd hh:MM:ss') }}</text>
  74513. </view>
  74514. </uni-list-chat>
  74515. </uni-list>
  74516. </view>
  74517. <s-empty v-if="state.pagination.total === 0" icon="/static/data-empty.png" text="暂无团队信息">
  74518. </s-empty> `)
  74519. ]),
  74520. _: 1
  74521. /* STABLE */
  74522. }, 8, ["class"]);
  74523. }
  74524. const PagesCommissionTeam = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["render", _sfc_render$E], ["__scopeId", "data-v-42603af6"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/commission/team.vue"]]);
  74525. const _sfc_main$E = {
  74526. __name: "promoter",
  74527. setup(__props, { expose: __expose }) {
  74528. __expose();
  74529. const tabMaps = ["周排行", "月排行"];
  74530. const state = vue.reactive({
  74531. currentTab: 0,
  74532. rankList: [],
  74533. times: [],
  74534. one: {},
  74535. // 排名第一
  74536. two: {},
  74537. // 排名第二
  74538. three: {}
  74539. // 排名第三
  74540. });
  74541. function switchTap(index2) {
  74542. if (state.currentTab === index2) {
  74543. return;
  74544. }
  74545. state.currentTab = index2;
  74546. calculateTimes();
  74547. getRankList();
  74548. }
  74549. async function getRankList() {
  74550. state.one = {};
  74551. state.two = {};
  74552. state.three = {};
  74553. state.rankList = [];
  74554. const { code: code2, data } = await BrokerageApi.getBrokerageUserRankPageByUserCount({
  74555. pageNo: 1,
  74556. pageSize: 10,
  74557. "times[0]": state.times[0],
  74558. "times[1]": state.times[1]
  74559. });
  74560. if (code2 !== 0) {
  74561. return;
  74562. }
  74563. state.rankList = data.list;
  74564. state.one = state.rankList.shift() || {};
  74565. state.two = state.rankList.shift() || {};
  74566. state.trhee = state.rankList.shift() || {};
  74567. }
  74568. function calculateTimes() {
  74569. let times2;
  74570. if (state.currentTab === 0) {
  74571. times2 = getWeekTimes();
  74572. } else {
  74573. times2 = getMonthTimes();
  74574. }
  74575. state.times = [formatDate2(times2[0]), formatDate2(times2[1])];
  74576. }
  74577. onLoad(function() {
  74578. calculateTimes();
  74579. getRankList();
  74580. });
  74581. function formatDate2(date2) {
  74582. return sheep$1.$helper.timeFormat(date2, "yyyy-mm-dd hh:MM:ss");
  74583. }
  74584. function getWeekTimes() {
  74585. const today = /* @__PURE__ */ new Date();
  74586. const dayOfWeek = today.getDay();
  74587. return [
  74588. new Date(today.getFullYear(), today.getMonth(), today.getDate() - dayOfWeek, 0, 0, 0),
  74589. new Date(today.getFullYear(), today.getMonth(), today.getDate() + (6 - dayOfWeek), 23, 59, 59)
  74590. ];
  74591. }
  74592. function getMonthTimes() {
  74593. const today = /* @__PURE__ */ new Date();
  74594. const year = today.getFullYear();
  74595. const month = today.getMonth();
  74596. const startDate = new Date(year, month, 1, 0, 0, 0);
  74597. const nextMonth = new Date(year, month + 1, 1);
  74598. const endDate = new Date(nextMonth.getTime() - 1);
  74599. return [startDate, endDate];
  74600. }
  74601. const __returned__ = { tabMaps, state, switchTap, getRankList, calculateTimes, formatDate: formatDate2, getWeekTimes, getMonthTimes, get sheep() {
  74602. return sheep$1;
  74603. }, get onLoad() {
  74604. return onLoad;
  74605. }, reactive: vue.reactive, get BrokerageApi() {
  74606. return BrokerageApi;
  74607. } };
  74608. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  74609. return __returned__;
  74610. }
  74611. };
  74612. function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) {
  74613. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  74614. return vue.openBlock(), vue.createBlock(_component_s_layout, { title: "推广人排行榜" }, {
  74615. default: vue.withCtx(() => [
  74616. vue.createElementVNode("view", {
  74617. class: "PromoterRank",
  74618. style: { "backgroundColor": "red" }
  74619. }, [
  74620. vue.createElementVNode("view", { class: "redBg bg-color" }, [
  74621. vue.createElementVNode("view", { class: "header" }, [
  74622. vue.createElementVNode("view", {
  74623. class: "nav acea-row row-center-wrapper",
  74624. style: { "display": "flex" }
  74625. }, [
  74626. (vue.openBlock(), vue.createElementBlock(
  74627. vue.Fragment,
  74628. null,
  74629. vue.renderList($setup.tabMaps, (item, index2) => {
  74630. return vue.createElementVNode("view", {
  74631. class: vue.normalizeClass(["item", $setup.state.currentTab === index2 ? "font-color" : ""]),
  74632. key: index2,
  74633. onClick: ($event) => $setup.switchTap(index2)
  74634. }, vue.toDisplayString(item), 11, ["onClick"]);
  74635. }),
  74636. 64
  74637. /* STABLE_FRAGMENT */
  74638. ))
  74639. ]),
  74640. vue.createCommentVNode(" top3 排名 "),
  74641. vue.createElementVNode("view", { class: "rank acea-row row-bottom row-around" }, [
  74642. vue.withDirectives(vue.createElementVNode(
  74643. "view",
  74644. { class: "item" },
  74645. [
  74646. vue.createElementVNode("view", { class: "pictrue" }, [
  74647. vue.createElementVNode("image", {
  74648. src: $setup.state.two.avatar
  74649. }, null, 8, ["src"])
  74650. ]),
  74651. vue.createElementVNode(
  74652. "view",
  74653. { class: "name line1" },
  74654. vue.toDisplayString($setup.state.two.nickname),
  74655. 1
  74656. /* TEXT */
  74657. ),
  74658. vue.createElementVNode(
  74659. "view",
  74660. { class: "num" },
  74661. vue.toDisplayString($setup.state.two.brokerageUserCount) + "人",
  74662. 1
  74663. /* TEXT */
  74664. )
  74665. ],
  74666. 512
  74667. /* NEED_PATCH */
  74668. ), [
  74669. [vue.vShow, $setup.state.two.id]
  74670. ]),
  74671. vue.withDirectives(vue.createElementVNode(
  74672. "view",
  74673. { class: "item" },
  74674. [
  74675. vue.createElementVNode("view", { class: "pictrue" }, [
  74676. vue.createElementVNode("image", {
  74677. src: $setup.state.one.avatar
  74678. }, null, 8, ["src"])
  74679. ]),
  74680. vue.createElementVNode(
  74681. "view",
  74682. { class: "name line1" },
  74683. vue.toDisplayString($setup.state.one.nickname),
  74684. 1
  74685. /* TEXT */
  74686. ),
  74687. vue.createElementVNode(
  74688. "view",
  74689. { class: "num" },
  74690. vue.toDisplayString($setup.state.one.brokerageUserCount) + "人",
  74691. 1
  74692. /* TEXT */
  74693. )
  74694. ],
  74695. 512
  74696. /* NEED_PATCH */
  74697. ), [
  74698. [vue.vShow, $setup.state.one.id]
  74699. ]),
  74700. vue.withDirectives(vue.createElementVNode(
  74701. "view",
  74702. { class: "item" },
  74703. [
  74704. vue.createElementVNode("view", { class: "pictrue" }, [
  74705. vue.createElementVNode("image", {
  74706. src: $setup.state.three.avatar
  74707. }, null, 8, ["src"])
  74708. ]),
  74709. vue.createElementVNode(
  74710. "view",
  74711. { class: "name line1" },
  74712. vue.toDisplayString($setup.state.three.nickname),
  74713. 1
  74714. /* TEXT */
  74715. ),
  74716. vue.createElementVNode(
  74717. "view",
  74718. { class: "num" },
  74719. vue.toDisplayString($setup.state.three.brokerageUserCount) + "人",
  74720. 1
  74721. /* TEXT */
  74722. )
  74723. ],
  74724. 512
  74725. /* NEED_PATCH */
  74726. ), [
  74727. [vue.vShow, $setup.state.three.id]
  74728. ])
  74729. ])
  74730. ])
  74731. ]),
  74732. vue.createCommentVNode(" 其它排名 "),
  74733. $setup.state.rankList.length ? (vue.openBlock(), vue.createElementBlock("view", {
  74734. key: 0,
  74735. class: "list"
  74736. }, [
  74737. (vue.openBlock(true), vue.createElementBlock(
  74738. vue.Fragment,
  74739. null,
  74740. vue.renderList($setup.state.rankList, (item, index2) => {
  74741. return vue.openBlock(), vue.createElementBlock("view", {
  74742. class: "item acea-row row-between-wrapper",
  74743. key: index2
  74744. }, [
  74745. vue.createElementVNode(
  74746. "view",
  74747. { class: "num" },
  74748. vue.toDisplayString(index2 + 4),
  74749. 1
  74750. /* TEXT */
  74751. ),
  74752. vue.createElementVNode("view", { class: "picTxt acea-row row-between-wrapper" }, [
  74753. vue.createElementVNode("view", { class: "pictrue" }, [
  74754. vue.createElementVNode("image", {
  74755. src: item.avatar
  74756. }, null, 8, ["src"])
  74757. ]),
  74758. vue.createElementVNode(
  74759. "view",
  74760. { class: "text line1" },
  74761. vue.toDisplayString(item.nickname),
  74762. 1
  74763. /* TEXT */
  74764. )
  74765. ]),
  74766. vue.createElementVNode(
  74767. "view",
  74768. { class: "people font-color" },
  74769. vue.toDisplayString(item.brokerageUserCount) + "人",
  74770. 1
  74771. /* TEXT */
  74772. )
  74773. ]);
  74774. }),
  74775. 128
  74776. /* KEYED_FRAGMENT */
  74777. ))
  74778. ])) : vue.createCommentVNode("v-if", true)
  74779. ])
  74780. ]),
  74781. _: 1
  74782. /* STABLE */
  74783. });
  74784. }
  74785. const PagesCommissionPromoter = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["render", _sfc_render$D], ["__scopeId", "data-v-fe20a205"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/commission/promoter.vue"]]);
  74786. const _sfc_main$D = {
  74787. __name: "commission-ranking",
  74788. setup(__props, { expose: __expose }) {
  74789. __expose();
  74790. const tabMaps = ["周排行", "月排行"];
  74791. const state = vue.reactive({
  74792. currentTab: 0,
  74793. position: 0,
  74794. // 排名
  74795. rankList: []
  74796. });
  74797. async function switchTap(index2) {
  74798. state.currentTab = index2;
  74799. state.rankList = [];
  74800. calculateTimes();
  74801. getBrokerageRankList();
  74802. getBrokerageRankNumber();
  74803. }
  74804. async function getBrokerageRankList() {
  74805. const {
  74806. code: code2,
  74807. data
  74808. } = await BrokerageApi.getBrokerageUserChildSummaryPageByPrice({
  74809. pageNo: 1,
  74810. pageSize: 10,
  74811. "times[0]": state.times[0],
  74812. "times[1]": state.times[1]
  74813. });
  74814. if (code2 !== 0) {
  74815. return;
  74816. }
  74817. state.rankList = data.list;
  74818. }
  74819. async function getBrokerageRankNumber() {
  74820. const {
  74821. code: code2,
  74822. data
  74823. } = await BrokerageApi.getRankByPrice({
  74824. times: state.times
  74825. });
  74826. if (code2 !== 0) {
  74827. return;
  74828. }
  74829. state.position = data;
  74830. }
  74831. function formatDate2(date2) {
  74832. return sheep$1.$helper.timeFormat(date2, "yyyy-mm-dd hh:MM:ss");
  74833. }
  74834. function calculateTimes() {
  74835. let times2;
  74836. if (state.currentTab === 0) {
  74837. times2 = getWeekTimes();
  74838. } else {
  74839. times2 = getMonthTimes();
  74840. }
  74841. state.times = [formatDate2(times2[0]), formatDate2(times2[1])];
  74842. }
  74843. onLoad(function() {
  74844. calculateTimes();
  74845. getBrokerageRankList();
  74846. getBrokerageRankNumber();
  74847. });
  74848. function getWeekTimes() {
  74849. const today = /* @__PURE__ */ new Date();
  74850. const dayOfWeek = today.getDay();
  74851. return [
  74852. new Date(today.getFullYear(), today.getMonth(), today.getDate() - dayOfWeek, 0, 0, 0),
  74853. new Date(
  74854. today.getFullYear(),
  74855. today.getMonth(),
  74856. today.getDate() + (6 - dayOfWeek),
  74857. 23,
  74858. 59,
  74859. 59
  74860. )
  74861. ];
  74862. }
  74863. function getMonthTimes() {
  74864. const today = /* @__PURE__ */ new Date();
  74865. const year = today.getFullYear();
  74866. const month = today.getMonth();
  74867. const startDate = new Date(year, month, 1, 0, 0, 0);
  74868. const nextMonth = new Date(year, month + 1, 1);
  74869. const endDate = new Date(nextMonth.getTime() - 1);
  74870. return [startDate, endDate];
  74871. }
  74872. const __returned__ = { tabMaps, state, switchTap, getBrokerageRankList, getBrokerageRankNumber, formatDate: formatDate2, calculateTimes, getWeekTimes, getMonthTimes, get sheep() {
  74873. return sheep$1;
  74874. }, get onLoad() {
  74875. return onLoad;
  74876. }, reactive: vue.reactive, get BrokerageApi() {
  74877. return BrokerageApi;
  74878. }, get fen2yuan() {
  74879. return fen2yuan;
  74880. } };
  74881. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  74882. return __returned__;
  74883. }
  74884. };
  74885. function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
  74886. const _component_emptyPage = vue.resolveComponent("emptyPage");
  74887. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  74888. return vue.openBlock(), vue.createBlock(_component_s_layout, { title: "佣金排行榜" }, {
  74889. default: vue.withCtx(() => [
  74890. vue.createElementVNode("view", { class: "CommissionRank" }, [
  74891. vue.createElementVNode("view", { class: "header" }, [
  74892. $setup.state.position ? (vue.openBlock(), vue.createElementBlock("view", {
  74893. key: 0,
  74894. class: "rank"
  74895. }, [
  74896. vue.createTextVNode(" 您目前的排名 "),
  74897. vue.createElementVNode(
  74898. "text",
  74899. { class: "num" },
  74900. vue.toDisplayString($setup.state.position),
  74901. 1
  74902. /* TEXT */
  74903. ),
  74904. vue.createTextVNode(" 名 ")
  74905. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  74906. key: 1,
  74907. class: "rank"
  74908. }, "您目前暂无排名"))
  74909. ]),
  74910. vue.createElementVNode("view", { class: "wrapper" }, [
  74911. vue.createElementVNode("view", {
  74912. class: "nav acea-row row-around",
  74913. style: { "justify-content": "space-around", "display": "flex" }
  74914. }, [
  74915. (vue.openBlock(), vue.createElementBlock(
  74916. vue.Fragment,
  74917. null,
  74918. vue.renderList($setup.tabMaps, (item, index2) => {
  74919. return vue.createElementVNode("view", {
  74920. class: vue.normalizeClass(["item", $setup.state.currentTab === index2 ? "font-color" : ""]),
  74921. key: index2,
  74922. onClick: ($event) => $setup.switchTap(index2)
  74923. }, vue.toDisplayString(item), 11, ["onClick"]);
  74924. }),
  74925. 64
  74926. /* STABLE_FRAGMENT */
  74927. ))
  74928. ]),
  74929. vue.createElementVNode("view", { class: "list" }, [
  74930. (vue.openBlock(true), vue.createElementBlock(
  74931. vue.Fragment,
  74932. null,
  74933. vue.renderList($setup.state.rankList, (item, index2) => {
  74934. return vue.openBlock(), vue.createElementBlock("view", {
  74935. class: "item acea-row row-between-wrapper",
  74936. key: index2
  74937. }, [
  74938. index2 <= 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  74939. key: 0,
  74940. class: "num"
  74941. }, [
  74942. vue.createElementVNode("image", {
  74943. src: "/static/images/medal0" + (index2 + 1) + ".png"
  74944. }, null, 8, ["src"])
  74945. ])) : (vue.openBlock(), vue.createElementBlock(
  74946. "view",
  74947. {
  74948. key: 1,
  74949. class: "num"
  74950. },
  74951. vue.toDisplayString(index2 + 1),
  74952. 1
  74953. /* TEXT */
  74954. )),
  74955. vue.createElementVNode("view", { class: "picTxt acea-row row-between-wrapper" }, [
  74956. vue.createElementVNode("view", { class: "pictrue" }, [
  74957. vue.createElementVNode("image", {
  74958. src: item.avatar
  74959. }, null, 8, ["src"])
  74960. ]),
  74961. vue.createElementVNode(
  74962. "view",
  74963. { class: "text line1" },
  74964. vue.toDisplayString(item.nickname),
  74965. 1
  74966. /* TEXT */
  74967. )
  74968. ]),
  74969. vue.createElementVNode(
  74970. "view",
  74971. { class: "people font-color" },
  74972. "¥" + vue.toDisplayString($setup.fen2yuan(item.brokeragePrice)),
  74973. 1
  74974. /* TEXT */
  74975. )
  74976. ]);
  74977. }),
  74978. 128
  74979. /* KEYED_FRAGMENT */
  74980. ))
  74981. ]),
  74982. $setup.state.rankList.length === 0 && ($setup.state.page !== 1 || $setup.state.active === 0) ? (vue.openBlock(), vue.createElementBlock("view", {
  74983. key: 0,
  74984. class: "noCommodity"
  74985. }, [
  74986. vue.createVNode(_component_emptyPage, { title: "暂无排行~" })
  74987. ])) : vue.createCommentVNode("v-if", true)
  74988. ])
  74989. ])
  74990. ]),
  74991. _: 1
  74992. /* STABLE */
  74993. });
  74994. }
  74995. const PagesCommissionCommissionRanking = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$C], ["__scopeId", "data-v-4b4e4229"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/commission/commission-ranking.vue"]]);
  74996. const _sfc_main$C = {
  74997. __name: "account-type-select",
  74998. props: {
  74999. modelValue: {
  75000. type: Object,
  75001. default() {
  75002. }
  75003. },
  75004. show: {
  75005. type: Boolean,
  75006. default: false
  75007. },
  75008. methods: {
  75009. // 开启的提现方式
  75010. type: Array,
  75011. default: []
  75012. }
  75013. },
  75014. emits: ["update:modelValue", "change", "close"],
  75015. setup(__props, { expose: __expose, emit: __emit }) {
  75016. __expose();
  75017. const props = __props;
  75018. const emits = __emit;
  75019. const state = vue.reactive({
  75020. currentValue: ""
  75021. });
  75022. const typeList = [
  75023. {
  75024. // icon: '/static/img/shop/pay/wechat.png', // TODO 非繁人:后续给个 icon
  75025. title: "钱包余额",
  75026. value: "1"
  75027. },
  75028. {
  75029. icon: "/static/img/shop/pay/wechat.png",
  75030. title: "微信零钱",
  75031. value: "2"
  75032. },
  75033. {
  75034. icon: "/static/img/shop/pay/alipay.png",
  75035. title: "支付宝账户",
  75036. value: "3"
  75037. },
  75038. {
  75039. icon: "/static/img/shop/pay/bank.png",
  75040. title: "银行卡转账",
  75041. value: "4"
  75042. }
  75043. ];
  75044. function onChange(e2) {
  75045. state.currentValue = e2.detail.value;
  75046. }
  75047. const onConfirm = async () => {
  75048. if (state.currentValue === "") {
  75049. sheep$1.$helper.toast("请选择提现方式");
  75050. return;
  75051. }
  75052. emits("update:modelValue", {
  75053. type: state.currentValue
  75054. });
  75055. emits("close");
  75056. };
  75057. const hideModal = () => {
  75058. emits("close");
  75059. };
  75060. const __returned__ = { props, emits, state, typeList, onChange, onConfirm, hideModal, reactive: vue.reactive, get sheep() {
  75061. return sheep$1;
  75062. } };
  75063. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  75064. return __returned__;
  75065. }
  75066. };
  75067. function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
  75068. const _component_su_popup = resolveEasycom(vue.resolveDynamicComponent("su-popup"), __easycom_4$3);
  75069. return vue.openBlock(), vue.createBlock(_component_su_popup, {
  75070. show: $props.show,
  75071. class: "ss-checkout-counter-wrap",
  75072. onClose: $setup.hideModal
  75073. }, {
  75074. default: vue.withCtx(() => [
  75075. vue.createElementVNode("view", { class: "ss-modal-box bg-white ss-flex-col" }, [
  75076. vue.createElementVNode("view", { class: "modal-header ss-flex-col ss-col-left" }, [
  75077. vue.createElementVNode("text", { class: "modal-title ss-m-b-20" }, "选择提现方式")
  75078. ]),
  75079. vue.createElementVNode("view", { class: "modal-content ss-flex-1 ss-p-b-100" }, [
  75080. vue.createElementVNode(
  75081. "radio-group",
  75082. { onChange: $setup.onChange },
  75083. [
  75084. (vue.openBlock(), vue.createElementBlock(
  75085. vue.Fragment,
  75086. null,
  75087. vue.renderList($setup.typeList, (item, index2) => {
  75088. return vue.createElementVNode("label", {
  75089. class: "container-list ss-p-l-34 ss-p-r-24 ss-flex ss-col-center ss-row-center",
  75090. key: index2
  75091. }, [
  75092. vue.createElementVNode("view", { class: "container-icon ss-flex ss-m-r-20" }, [
  75093. vue.createElementVNode("image", {
  75094. src: $setup.sheep.$url.static(item.icon)
  75095. }, null, 8, ["src"])
  75096. ]),
  75097. vue.createElementVNode(
  75098. "view",
  75099. { class: "ss-flex-1" },
  75100. vue.toDisplayString(item.title),
  75101. 1
  75102. /* TEXT */
  75103. ),
  75104. vue.createElementVNode("radio", {
  75105. value: item.value,
  75106. color: "var(--ui-BG-Main)",
  75107. checked: item.value === $setup.state.currentValue,
  75108. disabled: !$props.methods.includes(parseInt(item.value))
  75109. }, null, 8, ["value", "checked", "disabled"])
  75110. ]);
  75111. }),
  75112. 64
  75113. /* STABLE_FRAGMENT */
  75114. ))
  75115. ],
  75116. 32
  75117. /* NEED_HYDRATION */
  75118. )
  75119. ]),
  75120. vue.createElementVNode("view", { class: "modal-footer ss-flex ss-row-center ss-col-center" }, [
  75121. vue.createElementVNode("button", {
  75122. class: "ss-reset-button save-btn",
  75123. onClick: $setup.onConfirm
  75124. }, "确定")
  75125. ])
  75126. ])
  75127. ]),
  75128. _: 1
  75129. /* STABLE */
  75130. }, 8, ["show"]);
  75131. }
  75132. const accountTypeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$B], ["__scopeId", "data-v-a5da3655"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/commission/components/account-type-select.vue"]]);
  75133. const _sfc_main$B = {
  75134. __name: "withdraw",
  75135. setup(__props, { expose: __expose }) {
  75136. __expose();
  75137. vue.useCssVars((_ctx) => ({
  75138. "cf14c8af-headerBg": vue.unref(headerBg)
  75139. }));
  75140. const headerBg = sheep$1.$url.css("/static/img/shop/user/withdraw_bg.png");
  75141. const statusBarHeight = sheep$1.$platform.device.statusBarHeight * 2;
  75142. const userStore = sheep$1.$store("user");
  75143. const userInfo2 = vue.computed(() => userStore.userInfo);
  75144. const state = vue.reactive({
  75145. accountInfo: {
  75146. // 提现表单
  75147. type: void 0,
  75148. accountNo: void 0,
  75149. accountQrCodeUrl: void 0,
  75150. name: void 0,
  75151. bankName: void 0,
  75152. bankAddress: void 0
  75153. },
  75154. accountSelect: false,
  75155. brokerageInfo: {},
  75156. // 分销信息
  75157. frozenDays: 0,
  75158. // 冻结天数
  75159. minPrice: 0,
  75160. // 最低提现金额
  75161. withdrawTypes: []
  75162. // 提现方式
  75163. });
  75164. const onAccountSelect = (e2) => {
  75165. state.accountSelect = e2;
  75166. };
  75167. const onConfirm = async () => {
  75168. debugger;
  75169. if (!state.accountInfo.price || state.accountInfo.price > state.brokerageInfo.price || state.accountInfo.price <= 0) {
  75170. sheep$1.$helper.toast("请输入正确的提现金额");
  75171. return;
  75172. }
  75173. if (!state.accountInfo.type) {
  75174. sheep$1.$helper.toast("请选择提现方式");
  75175. return;
  75176. }
  75177. let { code: code2 } = await BrokerageApi.createBrokerageWithdraw({
  75178. ...state.accountInfo,
  75179. price: state.accountInfo.price * 100
  75180. });
  75181. if (code2 !== 0) {
  75182. return;
  75183. }
  75184. uni.showModal({
  75185. title: "操作成功",
  75186. content: "您的提现申请已成功提交",
  75187. cancelText: "继续提现",
  75188. confirmText: "查看记录",
  75189. success: (res) => {
  75190. if (res.confirm) {
  75191. sheep$1.$router.go("/pages/commission/wallet", { type: 2 });
  75192. return;
  75193. }
  75194. getBrokerageUser();
  75195. state.accountInfo = {};
  75196. }
  75197. });
  75198. };
  75199. async function getWithdrawRules() {
  75200. let { code: code2, data } = await TradeConfigApi.getTradeConfig();
  75201. if (code2 !== 0) {
  75202. return;
  75203. }
  75204. if (data) {
  75205. state.minPrice = data.brokerageWithdrawMinPrice || 0;
  75206. state.frozenDays = data.brokerageFrozenDays || 0;
  75207. state.withdrawTypes = data.brokerageWithdrawTypes;
  75208. }
  75209. }
  75210. async function getBrokerageUser() {
  75211. const { data, code: code2 } = await BrokerageApi.getBrokerageUser();
  75212. if (code2 === 0) {
  75213. state.brokerageInfo = data;
  75214. }
  75215. }
  75216. vue.onBeforeMount(() => {
  75217. getWithdrawRules();
  75218. getBrokerageUser();
  75219. });
  75220. const __returned__ = { headerBg, statusBarHeight, userStore, userInfo: userInfo2, state, onAccountSelect, onConfirm, getWithdrawRules, getBrokerageUser, computed: vue.computed, reactive: vue.reactive, onBeforeMount: vue.onBeforeMount, get sheep() {
  75221. return sheep$1;
  75222. }, accountTypeSelect, get fen2yuan() {
  75223. return fen2yuan;
  75224. }, get TradeConfigApi() {
  75225. return TradeConfigApi;
  75226. }, get BrokerageApi() {
  75227. return BrokerageApi;
  75228. } };
  75229. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  75230. return __returned__;
  75231. }
  75232. };
  75233. function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
  75234. const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l);
  75235. const _component_s_uploader = resolveEasycom(vue.resolveDynamicComponent("s-uploader"), __easycom_3$4);
  75236. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  75237. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  75238. title: "申请提现",
  75239. class: "withdraw-wrap",
  75240. navbar: "inner"
  75241. }, {
  75242. default: vue.withCtx(() => [
  75243. vue.createElementVNode("view", { class: "page-bg" }),
  75244. vue.createElementVNode(
  75245. "view",
  75246. {
  75247. class: "wallet-num-box ss-flex ss-col-center ss-row-between",
  75248. style: vue.normalizeStyle([
  75249. {
  75250. marginTop: "-" + Number($setup.statusBarHeight + 88) + "rpx",
  75251. paddingTop: Number($setup.statusBarHeight + 108) + "rpx"
  75252. }
  75253. ])
  75254. },
  75255. [
  75256. vue.createElementVNode("view", { class: "" }, [
  75257. vue.createElementVNode("view", { class: "num-title" }, "可提现金额(元)"),
  75258. vue.createElementVNode(
  75259. "view",
  75260. { class: "wallet-num" },
  75261. vue.toDisplayString($setup.fen2yuan($setup.state.brokerageInfo.brokeragePrice)),
  75262. 1
  75263. /* TEXT */
  75264. )
  75265. ]),
  75266. vue.createElementVNode("button", {
  75267. class: "ss-reset-button log-btn",
  75268. onClick: _cache[0] || (_cache[0] = ($event) => $setup.sheep.$router.go("/pages/commission/wallet", { type: 2 }))
  75269. }, " 提现记录 ")
  75270. ],
  75271. 4
  75272. /* STYLE */
  75273. ),
  75274. vue.createCommentVNode(" 提现输入卡片"),
  75275. vue.createElementVNode("view", { class: "draw-card" }, [
  75276. vue.createElementVNode("view", { class: "bank-box ss-flex ss-col-center ss-row-between ss-m-b-30" }, [
  75277. vue.createElementVNode("view", { class: "name" }, "提现至"),
  75278. vue.createElementVNode("view", {
  75279. class: "bank-list ss-flex ss-col-center",
  75280. onClick: _cache[1] || (_cache[1] = ($event) => $setup.onAccountSelect(true))
  75281. }, [
  75282. !$setup.state.accountInfo.type ? (vue.openBlock(), vue.createElementBlock("view", {
  75283. key: 0,
  75284. class: "empty-text"
  75285. }, "请选择提现方式")) : vue.createCommentVNode("v-if", true),
  75286. $setup.state.accountInfo.type === "1" ? (vue.openBlock(), vue.createElementBlock("view", {
  75287. key: 1,
  75288. class: "empty-text"
  75289. }, "钱包余额")) : vue.createCommentVNode("v-if", true),
  75290. $setup.state.accountInfo.type === "2" ? (vue.openBlock(), vue.createElementBlock("view", {
  75291. key: 2,
  75292. class: "empty-text"
  75293. }, "微信零钱")) : vue.createCommentVNode("v-if", true),
  75294. $setup.state.accountInfo.type === "3" ? (vue.openBlock(), vue.createElementBlock("view", {
  75295. key: 3,
  75296. class: "empty-text"
  75297. }, "支付宝账户")) : vue.createCommentVNode("v-if", true),
  75298. $setup.state.accountInfo.type === "4" ? (vue.openBlock(), vue.createElementBlock("view", {
  75299. key: 4,
  75300. class: "empty-text"
  75301. }, "银行卡转账")) : vue.createCommentVNode("v-if", true),
  75302. vue.createElementVNode("text", { class: "cicon-forward" })
  75303. ])
  75304. ]),
  75305. vue.createCommentVNode(" 提现金额 "),
  75306. vue.createElementVNode("view", { class: "card-title" }, "提现金额"),
  75307. vue.createElementVNode("view", { class: "input-box ss-flex ss-col-center border-bottom" }, [
  75308. vue.createElementVNode("view", { class: "unit" }, "¥"),
  75309. vue.createVNode(_component_uni_easyinput, {
  75310. inputBorder: false,
  75311. class: "ss-flex-1 ss-p-l-10",
  75312. modelValue: $setup.state.accountInfo.price,
  75313. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.accountInfo.price = $event),
  75314. type: "number",
  75315. placeholder: "请输入提现金额"
  75316. }, null, 8, ["modelValue"])
  75317. ]),
  75318. vue.createCommentVNode(" 提现账号 "),
  75319. vue.withDirectives(vue.createElementVNode(
  75320. "view",
  75321. { class: "card-title" },
  75322. " 提现账号 ",
  75323. 512
  75324. /* NEED_PATCH */
  75325. ), [
  75326. [vue.vShow, ["2", "3", "4"].includes($setup.state.accountInfo.type)]
  75327. ]),
  75328. vue.withDirectives(vue.createElementVNode(
  75329. "view",
  75330. { class: "input-box ss-flex ss-col-center border-bottom" },
  75331. [
  75332. vue.createElementVNode("view", { class: "unit" }),
  75333. vue.createVNode(_component_uni_easyinput, {
  75334. inputBorder: false,
  75335. class: "ss-flex-1 ss-p-l-10",
  75336. modelValue: $setup.state.accountInfo.accountNo,
  75337. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.state.accountInfo.accountNo = $event),
  75338. placeholder: "请输入提现账号"
  75339. }, null, 8, ["modelValue"])
  75340. ],
  75341. 512
  75342. /* NEED_PATCH */
  75343. ), [
  75344. [vue.vShow, ["2", "3", "4"].includes($setup.state.accountInfo.type)]
  75345. ]),
  75346. vue.createCommentVNode(" 收款码 "),
  75347. vue.withDirectives(vue.createElementVNode(
  75348. "view",
  75349. { class: "card-title" },
  75350. "收款码",
  75351. 512
  75352. /* NEED_PATCH */
  75353. ), [
  75354. [vue.vShow, ["2", "3"].includes($setup.state.accountInfo.type)]
  75355. ]),
  75356. vue.withDirectives(vue.createElementVNode(
  75357. "view",
  75358. { class: "input-box ss-flex ss-col-center" },
  75359. [
  75360. vue.createElementVNode("view", { class: "unit" }),
  75361. vue.createElementVNode("view", { class: "upload-img" }, [
  75362. vue.createVNode(_component_s_uploader, {
  75363. url: $setup.state.accountInfo.accountQrCodeUrl,
  75364. "onUpdate:url": _cache[4] || (_cache[4] = ($event) => $setup.state.accountInfo.accountQrCodeUrl = $event),
  75365. fileMediatype: "image",
  75366. limit: "1",
  75367. mode: "grid",
  75368. imageStyles: { width: "168rpx", height: "168rpx" }
  75369. }, null, 8, ["url"])
  75370. ])
  75371. ],
  75372. 512
  75373. /* NEED_PATCH */
  75374. ), [
  75375. [vue.vShow, ["2", "3"].includes($setup.state.accountInfo.type)]
  75376. ]),
  75377. vue.createCommentVNode(" 持卡人姓名 "),
  75378. vue.withDirectives(vue.createElementVNode(
  75379. "view",
  75380. { class: "card-title" },
  75381. "持卡人",
  75382. 512
  75383. /* NEED_PATCH */
  75384. ), [
  75385. [vue.vShow, $setup.state.accountInfo.type === "4"]
  75386. ]),
  75387. vue.withDirectives(vue.createElementVNode(
  75388. "view",
  75389. { class: "input-box ss-flex ss-col-center border-bottom" },
  75390. [
  75391. vue.createElementVNode("view", { class: "unit" }),
  75392. vue.createVNode(_component_uni_easyinput, {
  75393. inputBorder: false,
  75394. class: "ss-flex-1 ss-p-l-10",
  75395. modelValue: $setup.state.accountInfo.name,
  75396. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $setup.state.accountInfo.name = $event),
  75397. placeholder: "请输入持卡人姓名"
  75398. }, null, 8, ["modelValue"])
  75399. ],
  75400. 512
  75401. /* NEED_PATCH */
  75402. ), [
  75403. [vue.vShow, $setup.state.accountInfo.type === "4"]
  75404. ]),
  75405. vue.createCommentVNode(" 提现银行 "),
  75406. vue.withDirectives(vue.createElementVNode(
  75407. "view",
  75408. { class: "card-title" },
  75409. "提现银行",
  75410. 512
  75411. /* NEED_PATCH */
  75412. ), [
  75413. [vue.vShow, $setup.state.accountInfo.type === "4"]
  75414. ]),
  75415. vue.withDirectives(vue.createElementVNode(
  75416. "view",
  75417. { class: "input-box ss-flex ss-col-center border-bottom" },
  75418. [
  75419. vue.createElementVNode("view", { class: "unit" }),
  75420. vue.createVNode(_component_uni_easyinput, {
  75421. inputBorder: false,
  75422. class: "ss-flex-1 ss-p-l-10",
  75423. modelValue: $setup.state.accountInfo.bankName,
  75424. "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $setup.state.accountInfo.bankName = $event),
  75425. placeholder: "请输入提现银行"
  75426. }, null, 8, ["modelValue"])
  75427. ],
  75428. 512
  75429. /* NEED_PATCH */
  75430. ), [
  75431. [vue.vShow, $setup.state.accountInfo.type === "4"]
  75432. ]),
  75433. vue.createCommentVNode(" 开户地址 "),
  75434. vue.withDirectives(vue.createElementVNode(
  75435. "view",
  75436. { class: "card-title" },
  75437. "开户地址",
  75438. 512
  75439. /* NEED_PATCH */
  75440. ), [
  75441. [vue.vShow, $setup.state.accountInfo.type === "4"]
  75442. ]),
  75443. vue.withDirectives(vue.createElementVNode(
  75444. "view",
  75445. { class: "input-box ss-flex ss-col-center border-bottom" },
  75446. [
  75447. vue.createElementVNode("view", { class: "unit" }),
  75448. vue.createVNode(_component_uni_easyinput, {
  75449. inputBorder: false,
  75450. class: "ss-flex-1 ss-p-l-10",
  75451. modelValue: $setup.state.accountInfo.bankAddress,
  75452. "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $setup.state.accountInfo.bankAddress = $event),
  75453. placeholder: "请输入开户地址"
  75454. }, null, 8, ["modelValue"])
  75455. ],
  75456. 512
  75457. /* NEED_PATCH */
  75458. ), [
  75459. [vue.vShow, $setup.state.accountInfo.type === "4"]
  75460. ]),
  75461. vue.createElementVNode("button", {
  75462. class: "ss-reset-button save-btn ui-BG-Main-Gradient ui-Shadow-Main",
  75463. onClick: $setup.onConfirm
  75464. }, " 确认提现 ")
  75465. ]),
  75466. vue.createCommentVNode(" 提现说明 "),
  75467. vue.createElementVNode("view", { class: "draw-notice" }, [
  75468. vue.createElementVNode("view", { class: "title ss-m-b-30" }, "提现说明"),
  75469. vue.createElementVNode(
  75470. "view",
  75471. { class: "draw-list" },
  75472. " 最低提现金额 " + vue.toDisplayString($setup.fen2yuan($setup.state.minPrice)) + " 元 ",
  75473. 1
  75474. /* TEXT */
  75475. ),
  75476. vue.createElementVNode("view", { class: "draw-list" }, [
  75477. vue.createTextVNode(" 冻结佣金:"),
  75478. vue.createElementVNode(
  75479. "text",
  75480. null,
  75481. "¥" + vue.toDisplayString($setup.fen2yuan($setup.state.brokerageInfo.frozenPrice)),
  75482. 1
  75483. /* TEXT */
  75484. ),
  75485. vue.createTextVNode(
  75486. " (每笔佣金的冻结期为 " + vue.toDisplayString($setup.state.frozenDays) + " 天,到期后可提现) ",
  75487. 1
  75488. /* TEXT */
  75489. )
  75490. ])
  75491. ]),
  75492. vue.createCommentVNode(" 选择提现账户 "),
  75493. vue.createVNode($setup["accountTypeSelect"], {
  75494. show: $setup.state.accountSelect,
  75495. onClose: _cache[8] || (_cache[8] = ($event) => $setup.onAccountSelect(false)),
  75496. round: "10",
  75497. modelValue: $setup.state.accountInfo,
  75498. "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $setup.state.accountInfo = $event),
  75499. methods: $setup.state.withdrawTypes
  75500. }, null, 8, ["show", "modelValue", "methods"])
  75501. ]),
  75502. _: 1
  75503. /* STABLE */
  75504. });
  75505. }
  75506. const PagesCommissionWithdraw = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$A], ["__scopeId", "data-v-cf14c8af"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/commission/withdraw.vue"]]);
  75507. const _sfc_main$A = {
  75508. __name: "sign",
  75509. setup(__props, { expose: __expose }) {
  75510. __expose();
  75511. vue.useCssVars((_ctx) => ({
  75512. "964858d2-headerBg": vue.unref(headerBg)
  75513. }));
  75514. const headerBg = sheep$1.$url.css("/static/images/sign.png");
  75515. const state = vue.reactive({
  75516. data: {
  75517. days: [],
  75518. //日历
  75519. rules: {}
  75520. //规则
  75521. },
  75522. cur_year: 0,
  75523. //当前选的年
  75524. cur_month: 0,
  75525. //当前选的月
  75526. cur_day: 0,
  75527. //当前选择的天
  75528. weeks_ch: [
  75529. {
  75530. title: t$6("sign.sunday"),
  75531. value: "0"
  75532. },
  75533. {
  75534. title: t$6("sign.monday"),
  75535. value: "1"
  75536. },
  75537. {
  75538. title: t$6("sign.tuesday"),
  75539. value: "2"
  75540. },
  75541. {
  75542. title: t$6("sign.wednesday"),
  75543. value: "3"
  75544. },
  75545. {
  75546. title: t$6("sign.thursday"),
  75547. value: "4"
  75548. },
  75549. {
  75550. title: t$6("sign.friday"),
  75551. value: "5"
  75552. },
  75553. {
  75554. title: t$6("sign.saturday"),
  75555. value: "6"
  75556. }
  75557. ],
  75558. //星期
  75559. showModel: false,
  75560. //签到弹框
  75561. continue_days: 0,
  75562. //连续签到天数
  75563. signin: {},
  75564. // 签到
  75565. showRetroactive: false,
  75566. //补签弹框
  75567. date: "",
  75568. //补签选中日期
  75569. isSign: 0,
  75570. //今天是否签到
  75571. loading: true
  75572. });
  75573. async function onSign2() {
  75574. const {
  75575. code: code2,
  75576. data
  75577. } = await SignInApi.createSignInRecord();
  75578. if (code2 === 0) {
  75579. state.showModel = true;
  75580. state.signin = data;
  75581. state.isSign = 1;
  75582. uni.setStorageSync("isSign", true);
  75583. }
  75584. }
  75585. function onShowRetroactive(e2) {
  75586. state.showRetroactive = true;
  75587. state.date = e2;
  75588. }
  75589. vue.watch(() => state.showModel, (newValue) => {
  75590. if (newValue) {
  75591. setTimeout(onConfirm, 3e3);
  75592. }
  75593. });
  75594. function onConfirm() {
  75595. state.showModel = false;
  75596. getData({
  75597. month: formatDate2(/* @__PURE__ */ new Date()).substring(0, 7)
  75598. });
  75599. }
  75600. function formatDate2(t2) {
  75601. let date2 = new Date(t2);
  75602. let year = date2.getFullYear();
  75603. let month = String(date2.getMonth() + 1).padStart(2, "0");
  75604. let day = String(date2.getDate()).padStart(2, "0");
  75605. let dateString = `${year}-${month}-${day}`;
  75606. return dateString;
  75607. }
  75608. async function getData(mouth) {
  75609. const {
  75610. code: code2,
  75611. data
  75612. } = await SignInApi.getOwnSignInMoon(mouth);
  75613. if (code2 === 0) {
  75614. data.days.forEach((i2, index2) => {
  75615. if (i2.week == "SUNDAY") {
  75616. i2.week = 0;
  75617. } else if (i2.week == "MONDAY") {
  75618. i2.week = 1;
  75619. } else if (i2.week == "TUESDAY") {
  75620. i2.week = 2;
  75621. } else if (i2.week == "WEDNESDAY") {
  75622. i2.week = 3;
  75623. } else if (i2.week == "THURSDAY") {
  75624. i2.week = 4;
  75625. } else if (i2.week == "FRIDAY") {
  75626. i2.week = 5;
  75627. } else if (i2.week == "SATURDAY") {
  75628. i2.week = 6;
  75629. }
  75630. i2.date = formatDate2(i2.date);
  75631. });
  75632. state.data = data;
  75633. } else {
  75634. state.data = null;
  75635. }
  75636. state.loading = false;
  75637. if (state.data) {
  75638. state.data.days.forEach((i2, index2) => {
  75639. if (index2 < i2.week) {
  75640. index2++;
  75641. var obj = {
  75642. day: null,
  75643. isSign: false
  75644. };
  75645. state.data.days.unshift(obj);
  75646. }
  75647. if (index2 == 1) {
  75648. let arr = i2.date.split("-");
  75649. state.cur_year = arr[0];
  75650. state.cur_month = arr[1];
  75651. }
  75652. });
  75653. if (state.data.days[0].day == null) {
  75654. state.data.days.forEach((i2, index2) => {
  75655. if (i2.current == "today") {
  75656. state.isSign = i2.isSign;
  75657. }
  75658. });
  75659. }
  75660. state.continue_days = data.continueDays;
  75661. }
  75662. }
  75663. onReady(() => {
  75664. getData({
  75665. month: formatDate2(/* @__PURE__ */ new Date()).substring(0, 7)
  75666. });
  75667. });
  75668. const handleCalendar = (type) => {
  75669. const cur_year = parseInt(state.cur_year);
  75670. const cur_month = parseInt(state.cur_month);
  75671. var newMonth;
  75672. var newYear = cur_year;
  75673. if (type === 0) {
  75674. newMonth = cur_month - 1;
  75675. if (newMonth < 1) {
  75676. newYear = cur_year - 1;
  75677. newMonth = 12;
  75678. } else if (newMonth < 10) {
  75679. newMonth = "0" + newMonth;
  75680. }
  75681. } else {
  75682. newMonth = cur_month + 1;
  75683. if (newMonth > 12) {
  75684. newYear = cur_year + 1;
  75685. newMonth = "01";
  75686. } else if (newMonth < 10) {
  75687. newMonth = "0" + newMonth;
  75688. }
  75689. }
  75690. getData({
  75691. month: newYear + "-" + newMonth
  75692. });
  75693. };
  75694. const __returned__ = { headerBg, state, onSign: onSign2, onShowRetroactive, onConfirm, formatDate: formatDate2, getData, handleCalendar, get sheep() {
  75695. return sheep$1;
  75696. }, get onLoad() {
  75697. return onLoad;
  75698. }, get onReady() {
  75699. return onReady;
  75700. }, computed: vue.computed, reactive: vue.reactive, watchEffect: vue.watchEffect, watch: vue.watch, onMounted: vue.onMounted, get SignInApi() {
  75701. return SignInApi;
  75702. }, get t() {
  75703. return t$6;
  75704. } };
  75705. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  75706. return __returned__;
  75707. }
  75708. };
  75709. function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
  75710. const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6);
  75711. const _component_su_popup = resolveEasycom(vue.resolveDynamicComponent("su-popup"), __easycom_4$3);
  75712. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  75713. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  75714. title: $setup.t("sign.check_in_gift")
  75715. }, {
  75716. default: vue.withCtx(() => [
  75717. $setup.state.loading ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 })) : $setup.state.data && !$setup.state.loading ? (vue.openBlock(), vue.createElementBlock("view", {
  75718. key: 1,
  75719. class: "sign-wrap"
  75720. }, [
  75721. vue.createCommentVNode(" 签到日历 "),
  75722. vue.createElementVNode("view", { class: "content-box calendar" }, [
  75723. vue.createElementVNode("view", { class: "sign-everyday ss-flex ss-col-center ss-row-between ss-p-x-30" }, [
  75724. vue.createElementVNode(
  75725. "text",
  75726. { class: "sign-everyday-title" },
  75727. vue.toDisplayString($setup.t("sign.check_in")),
  75728. 1
  75729. /* TEXT */
  75730. ),
  75731. vue.createElementVNode("view", { class: "sign-num-box" }, [
  75732. vue.createTextVNode(
  75733. vue.toDisplayString($setup.t("sign.consecutive_check_ins")) + " ",
  75734. 1
  75735. /* TEXT */
  75736. ),
  75737. vue.createElementVNode(
  75738. "text",
  75739. { class: "sign-num" },
  75740. vue.toDisplayString($setup.state.continue_days),
  75741. 1
  75742. /* TEXT */
  75743. ),
  75744. vue.createTextVNode(
  75745. " " + vue.toDisplayString($setup.t("sign.days")),
  75746. 1
  75747. /* TEXT */
  75748. )
  75749. ])
  75750. ]),
  75751. vue.createCommentVNode(" 切换年月 "),
  75752. vue.createElementVNode("view", { class: "bar ss-flex ss-col-center ss-row-center" }, [
  75753. vue.createElementVNode("view", {
  75754. class: "previous",
  75755. onClick: _cache[0] || (_cache[0] = ($event) => $setup.handleCalendar(0))
  75756. }, [
  75757. vue.createElementVNode("text", { class: "cicon-back" })
  75758. ]),
  75759. vue.createElementVNode(
  75760. "view",
  75761. { class: "date ss-m-x-20" },
  75762. vue.toDisplayString($setup.t("sign.month_year", { year: $setup.state.cur_year || "--", month: $setup.state.cur_month || "--" })),
  75763. 1
  75764. /* TEXT */
  75765. ),
  75766. vue.createElementVNode("view", {
  75767. class: "next",
  75768. onClick: _cache[1] || (_cache[1] = ($event) => $setup.handleCalendar(1))
  75769. }, [
  75770. vue.createElementVNode("text", { class: "cicon-forward" })
  75771. ])
  75772. ]),
  75773. vue.createCommentVNode(" 显示星期 "),
  75774. vue.createElementVNode("view", { class: "week ss-flex" }, [
  75775. (vue.openBlock(true), vue.createElementBlock(
  75776. vue.Fragment,
  75777. null,
  75778. vue.renderList($setup.state.weeks_ch, (item, index2) => {
  75779. return vue.openBlock(), vue.createElementBlock(
  75780. "view",
  75781. {
  75782. class: "week-item ss-flex ss-row-center",
  75783. key: index2
  75784. },
  75785. vue.toDisplayString(item.title),
  75786. 1
  75787. /* TEXT */
  75788. );
  75789. }),
  75790. 128
  75791. /* KEYED_FRAGMENT */
  75792. ))
  75793. ]),
  75794. vue.createCommentVNode(" 日历表 "),
  75795. vue.createElementVNode("view", { class: "myDateTable" }, [
  75796. (vue.openBlock(true), vue.createElementBlock(
  75797. vue.Fragment,
  75798. null,
  75799. vue.renderList($setup.state.data.days, (item, j2) => {
  75800. return vue.openBlock(), vue.createElementBlock("view", {
  75801. key: j2,
  75802. class: "dateCell ss-flex ss-row-center ss-col-center"
  75803. }, [
  75804. vue.createCommentVNode(" 空格 "),
  75805. vue.createElementVNode("view", { class: "ss-flex ss-row-center ss-col-center" }, [
  75806. vue.createElementVNode("text", { decode: true }, "  ")
  75807. ]),
  75808. vue.createElementVNode("view", null, [
  75809. vue.createCommentVNode(" 已签到日期 "),
  75810. item.isSign ? (vue.openBlock(), vue.createElementBlock("view", {
  75811. key: 0,
  75812. class: "is-sign ss-flex ss-row-center"
  75813. }, [
  75814. vue.createElementVNode(
  75815. "view",
  75816. { class: "is-sign-num" },
  75817. vue.toDisplayString(item.day < 10 ? "0" + item.day : item.day),
  75818. 1
  75819. /* TEXT */
  75820. ),
  75821. vue.createElementVNode("image", {
  75822. class: "is-sign-image",
  75823. src: $setup.sheep.$url.static("/static/images/correct.png")
  75824. }, null, 8, ["src"])
  75825. ])) : vue.createCommentVNode("v-if", true),
  75826. vue.createCommentVNode(" 未签到日期 "),
  75827. vue.createCommentVNode(' <view class="is-sign ss-flex ss-row-center" v-if="item.isReplenish == 1"\r\n @tap="onShowRetroactive(item.date)"> '),
  75828. item.isReplenish == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  75829. key: 1,
  75830. class: "is-sign ss-flex ss-row-center"
  75831. }, [
  75832. vue.createElementVNode(
  75833. "view",
  75834. { class: "cell-num" },
  75835. vue.toDisplayString(item.day < 10 ? "0" + item.day : item.day),
  75836. 1
  75837. /* TEXT */
  75838. ),
  75839. vue.createElementVNode("text", { class: "cicon-title" })
  75840. ])) : vue.createCommentVNode("v-if", true),
  75841. item.isReplenish == 0 && !item.isSign ? (vue.openBlock(), vue.createElementBlock("view", {
  75842. key: 2,
  75843. class: "is-sign ss-flex ss-row-center"
  75844. }, [
  75845. vue.createElementVNode(
  75846. "view",
  75847. { class: "cell-num" },
  75848. vue.toDisplayString(item.day < 10 ? "0" + item.day : item.day),
  75849. 1
  75850. /* TEXT */
  75851. )
  75852. ])) : vue.createCommentVNode("v-if", true)
  75853. ])
  75854. ]);
  75855. }),
  75856. 128
  75857. /* KEYED_FRAGMENT */
  75858. )),
  75859. vue.createCommentVNode(" 签到按钮 "),
  75860. vue.createElementVNode("view", { class: "ss-flex ss-col-center ss-row-center sign-box ss-m-y-40" }, [
  75861. $setup.state.isSign === 0 ? (vue.openBlock(), vue.createElementBlock(
  75862. "button",
  75863. {
  75864. key: 0,
  75865. class: "ss-reset-button sign-btn",
  75866. onClick: $setup.onSign
  75867. },
  75868. vue.toDisplayString($setup.t("sign.check_in")),
  75869. 1
  75870. /* TEXT */
  75871. )) : vue.createCommentVNode("v-if", true),
  75872. $setup.state.isSign === 1 ? (vue.openBlock(), vue.createElementBlock(
  75873. "button",
  75874. {
  75875. key: 1,
  75876. class: "ss-reset-button already-btn",
  75877. disabled: ""
  75878. },
  75879. vue.toDisplayString($setup.t("sign.already_checked_in")),
  75880. 1
  75881. /* TEXT */
  75882. )) : vue.createCommentVNode("v-if", true)
  75883. ])
  75884. ])
  75885. ]),
  75886. vue.createElementVNode("view", { class: "bg-white ss-m-t-16 ss-p-t-30 ss-p-b-60 ss-p-x-40" }, [
  75887. vue.createElementVNode(
  75888. "view",
  75889. { class: "activity-title ss-m-b-30" },
  75890. vue.toDisplayString($setup.t("sign.check_in_description")),
  75891. 1
  75892. /* TEXT */
  75893. ),
  75894. vue.createElementVNode("view", { class: "activity-des" }, [
  75895. vue.createTextVNode(
  75896. " 1." + vue.toDisplayString($setup.t("sign.daily_check_in_fixed", { social: $setup.state.data.signInSocialStatus })) + " ",
  75897. 1
  75898. /* TEXT */
  75899. ),
  75900. vue.createCommentVNode(` <text v-if="state.data.rules.is_inc == '1'">\r
  75901. ,次日递增奖励 {{ state.data.rules.inc_num }} 身价,直到\r
  75902. {{ state.data.rules.until_day }} 天之后不再增加\r
  75903. </text> `)
  75904. ]),
  75905. vue.createCommentVNode(' <view class="activity-des" v-if="state.data.rules.discounts?.length > 0">\r\n 2、<text class="" v-for="i in state.data.rules.discounts" :key="i">\r\n 连续签到 {{ i.full }} 天,奖励 {{ i.value }} 身价;\r\n </text>\r\n </view> '),
  75906. vue.createCommentVNode(` <view class="activity-des" v-if="state.data.rules.is_replenish == '1'">\r
  75907. {{ state.data.rules.discounts?.length > 0 ? '3' : '2' }}、用户在\r
  75908. {{ state.data.rules.replenish_limit }} 天内,可补签\r
  75909. {{ state.data.rules.replenish_days }} 天,每次补签消耗\r
  75910. {{ state.data.rules.replenish_num }}身价\r
  75911. </view> `)
  75912. ])
  75913. ])) : !$setup.state.data && !$setup.state.loading ? (vue.openBlock(), vue.createBlock(_component_s_empty, {
  75914. key: 2,
  75915. icon: "/static/data-empty.png",
  75916. text: $setup.t("sign.check_in_not_started")
  75917. }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true),
  75918. vue.createVNode(_component_su_popup, {
  75919. show: $setup.state.showModel,
  75920. type: "center",
  75921. round: "10",
  75922. isMaskClick: false
  75923. }, {
  75924. default: vue.withCtx(() => {
  75925. var _a2, _b2;
  75926. return [
  75927. vue.createElementVNode("view", { class: "model-box ss-flex-col" }, [
  75928. vue.createElementVNode("view", { class: "ss-m-t-56 ss-flex-col ss-col-center" }, [
  75929. vue.createElementVNode("text", { class: "cicon-check-round" }),
  75930. vue.createElementVNode(
  75931. "view",
  75932. { class: "score-title" },
  75933. vue.toDisplayString($setup.t("sign.congratulations_on_check_in")),
  75934. 1
  75935. /* TEXT */
  75936. ),
  75937. vue.createElementVNode(
  75938. "view",
  75939. { class: "model-title ss-flex ss-col-center ss-m-t-22 ss-m-b-30" },
  75940. vue.toDisplayString($setup.t("sign.daily_check_in_reward", { social: $setup.state.signin.social })),
  75941. 1
  75942. /* TEXT */
  75943. ),
  75944. ((_a2 = $setup.state) == null ? void 0 : _a2.upgradeOrNot) ? (vue.openBlock(), vue.createElementBlock(
  75945. "view",
  75946. {
  75947. key: 0,
  75948. class: "model-title ss-flex ss-col-center ss-m-b-30"
  75949. },
  75950. vue.toDisplayString($setup.t("sign.level_upgraded", { level: (_b2 = $setup.state) == null ? void 0 : _b2.socialStatusName })),
  75951. 1
  75952. /* TEXT */
  75953. )) : vue.createCommentVNode("v-if", true)
  75954. ]),
  75955. vue.createElementVNode("view", { class: "model-bg ss-flex-col ss-col-center ss-row-right" }, [
  75956. vue.createCommentVNode(' <view class="title ss-m-b-64">签到成功</view> '),
  75957. vue.createElementVNode("view", { class: "ss-m-b-40" }, [
  75958. vue.createElementVNode(
  75959. "button",
  75960. {
  75961. class: "ss-reset-button confirm-btn",
  75962. onClick: _cache[2] || (_cache[2] = ($event) => $setup.onConfirm())
  75963. },
  75964. vue.toDisplayString($setup.t("common.confirm")),
  75965. 1
  75966. /* TEXT */
  75967. )
  75968. ])
  75969. ])
  75970. ])
  75971. ];
  75972. }),
  75973. _: 1
  75974. /* STABLE */
  75975. }, 8, ["show"]),
  75976. vue.createCommentVNode('<su-popup :show="state.showRetroactive" type="center" round="10" :isMaskClick="false">\r\n <view class="model-box ss-flex-col">\r\n <view class="ss-m-t-56 ss-flex-col ss-col-center">\r\n <text class="cicon-check-round"></text>\r\n <view class="score-title">消耗{{ state.data?.rules.replenish_num }}身价</view>\r\n <view class="model-title ss-flex ss-col-center ss-m-t-22 ss-m-b-30">\r\n 已连续打卡{{ state.continue_days }}天\r\n </view>\r\n </view>\r\n <view class="model-bg ss-flex-col ss-col-center ss-row-right">\r\n <view class="title ss-m-b-64">确认补签</view>\r\n <view class="ss-m-b-40 ss-flex">\r\n <button class="ss-reset-button cancel-btn" @tap="state.showRetroactive = false">取消</button>\r\n <button class="ss-reset-button confirm-btn" @tap="onRetroactive">确认</button>\r\n </view>\r\n </view> \r\n </view>\r\n </su-popup>')
  75977. ]),
  75978. _: 1
  75979. /* STABLE */
  75980. }, 8, ["title"]);
  75981. }
  75982. const PagesAppSign = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$z], ["__scopeId", "data-v-964858d2"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/app/sign.vue"]]);
  75983. const _sfc_main$z = {
  75984. __name: "index",
  75985. setup(__props, { expose: __expose }) {
  75986. __expose();
  75987. uni.hideTabBar();
  75988. const template = vue.ref({});
  75989. const shopName = vue.ref("");
  75990. const state = vue.reactive({
  75991. shopName: "",
  75992. merchantId: 0,
  75993. shopId: 0
  75994. });
  75995. const tabbar = vue.ref({
  75996. "theme": "red",
  75997. "style": {
  75998. "bgType": "color",
  75999. "bgColor": "#323b4e",
  76000. "color": "#e6e6e5",
  76001. "activeColor": "#1fa380"
  76002. },
  76003. "items": [
  76004. {
  76005. "text": t$6("common.shop_index"),
  76006. "url": "/pages/shop/index",
  76007. "iconUrl": sheep$1.$url.static("/static/firstIndex/index.svg"),
  76008. "activeIconUrl": sheep$1.$url.static("/static/firstIndex/index-active.svg")
  76009. },
  76010. {
  76011. "text": t$6("common.shop_category"),
  76012. "url": "/pages/shop/category",
  76013. "iconUrl": sheep$1.$url.static("/static/firstIndex/activity.svg"),
  76014. "activeIconUrl": sheep$1.$url.static("/static/firstIndex/activity-active.svg")
  76015. },
  76016. {
  76017. "text": t$6("common.all_product"),
  76018. "url": "/pages/shop/allproduct",
  76019. "iconUrl": sheep$1.$url.static("/static/firstIndex/video.svg"),
  76020. "activeIconUrl": sheep$1.$url.static("/static/firstIndex/video-active.svg")
  76021. }
  76022. ]
  76023. });
  76024. onLoad(async (options2) => {
  76025. if (options2.templateId) {
  76026. sheep$1.$store("app").init(options2.templateId);
  76027. }
  76028. if (options2.spm) {
  76029. $share.decryptSpm(options2.spm);
  76030. }
  76031. if (options2.page) {
  76032. sheep$1.$router.go(decodeURIComponent(options2.page));
  76033. }
  76034. state.merchantId = options2.merchantId;
  76035. state.shopId = options2.shopId;
  76036. state.shopName = options2.shopName;
  76037. tabbar.value.items = tabbar.value.items.map((item) => {
  76038. item.url = `${item.url}?shopId=${state.shopId}&shopName=${encodeURIComponent(state.shopName)}&merchantId=${state.merchantId}`;
  76039. return item;
  76040. });
  76041. const { code: code2, data } = await PageApi.getPage({ shopId: options2.shopId, merchantId: options2.merchantId });
  76042. template.value = data.property;
  76043. });
  76044. onPageScroll(() => {
  76045. });
  76046. const __returned__ = { template, shopName, state, tabbar, computed: vue.computed, reactive: vue.reactive, ref: vue.ref, get onLoad() {
  76047. return onLoad;
  76048. }, get onPageScroll() {
  76049. return onPageScroll;
  76050. }, get onPullDownRefresh() {
  76051. return onPullDownRefresh;
  76052. }, get sheep() {
  76053. return sheep$1;
  76054. }, get $share() {
  76055. return $share;
  76056. }, get PageApi() {
  76057. return PageApi;
  76058. }, get t() {
  76059. return t$6;
  76060. } };
  76061. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  76062. return __returned__;
  76063. }
  76064. };
  76065. function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
  76066. const _component_su_navbar = resolveEasycom(vue.resolveDynamicComponent("su-navbar"), __easycom_0$o);
  76067. const _component_s_block_item = resolveEasycom(vue.resolveDynamicComponent("s-block-item"), __easycom_1$3);
  76068. const _component_s_block = resolveEasycom(vue.resolveDynamicComponent("s-block"), __easycom_2$3);
  76069. const _component_s_tabbar = resolveEasycom(vue.resolveDynamicComponent("s-tabbar"), __easycom_3$7);
  76070. return $setup.template ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [
  76071. vue.createVNode(_component_su_navbar, {
  76072. title: $setup.state.shopName,
  76073. statusBar: "",
  76074. color: _ctx.color,
  76075. tools: _ctx.tools,
  76076. opacityBgUi: _ctx.opacityBgUi,
  76077. onSearch: _cache[0] || (_cache[0] = (e2) => _ctx.emits("search", e2)),
  76078. defaultSearch: _ctx.defaultSearch
  76079. }, null, 8, ["title", "color", "tools", "opacityBgUi", "defaultSearch"]),
  76080. (vue.openBlock(true), vue.createElementBlock(
  76081. vue.Fragment,
  76082. null,
  76083. vue.renderList($setup.template.components, (item, index2) => {
  76084. return vue.openBlock(), vue.createBlock(_component_s_block, {
  76085. key: index2,
  76086. styles: item.property.style
  76087. }, {
  76088. default: vue.withCtx(() => [
  76089. vue.createVNode(_component_s_block_item, {
  76090. type: item.id,
  76091. data: item.property,
  76092. styles: item.property.style
  76093. }, null, 8, ["type", "data", "styles"])
  76094. ]),
  76095. _: 2
  76096. /* DYNAMIC */
  76097. }, 1032, ["styles"]);
  76098. }),
  76099. 128
  76100. /* KEYED_FRAGMENT */
  76101. )),
  76102. vue.createVNode(_component_s_tabbar, {
  76103. path: "/pages/shop/index",
  76104. tabbar: $setup.tabbar
  76105. }, null, 8, ["tabbar"])
  76106. ])) : vue.createCommentVNode("v-if", true);
  76107. }
  76108. const PagesShopIndex = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$y], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/shop/index.vue"]]);
  76109. const _sfc_main$y = {
  76110. __name: "category",
  76111. setup(__props, { expose: __expose }) {
  76112. __expose();
  76113. const state = vue.reactive({
  76114. style: "second_one",
  76115. // first_one(一级 - 样式一), first_two(二级 - 样式二), second_one(二级)
  76116. categoryList: [],
  76117. // 商品分类树
  76118. activeMenu: 0,
  76119. // 选中的一级菜单,在 categoryList 的下标
  76120. pagination: {
  76121. // 商品分页
  76122. list: [],
  76123. // 商品列表
  76124. total: [],
  76125. // 商品总数
  76126. pageNo: 1,
  76127. pageSize: 6
  76128. },
  76129. loadStatus: ""
  76130. });
  76131. const {
  76132. safeArea
  76133. } = sheep$1.$platform.device;
  76134. const pageHeight = vue.computed(() => safeArea.height - 44 - 50);
  76135. async function getList() {
  76136. const {
  76137. code: code2,
  76138. data
  76139. } = await CategoryApi.getCategoryList();
  76140. if (code2 !== 0) {
  76141. return;
  76142. }
  76143. state.categoryList = handleTree(data);
  76144. }
  76145. const onMenu = (val) => {
  76146. state.activeMenu = val;
  76147. if (state.style === "first_one" || state.style === "first_two") {
  76148. state.pagination.pageNo = 1;
  76149. state.pagination.list = [];
  76150. state.pagination.total = 0;
  76151. getGoodsList();
  76152. }
  76153. };
  76154. async function getGoodsList() {
  76155. state.loadStatus = "loading";
  76156. const res = await SpuApi.getSpuPage({
  76157. categoryId: state.categoryList[state.activeMenu].id,
  76158. pageNo: state.pagination.pageNo,
  76159. pageSize: state.pagination.pageSize
  76160. });
  76161. if (res.code !== 0) {
  76162. return;
  76163. }
  76164. state.pagination.list = _$1.concat(state.pagination.list, res.data.list);
  76165. state.pagination.total = res.data.total;
  76166. state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore";
  76167. }
  76168. function loadMore() {
  76169. if (state.loadStatus === "noMore") {
  76170. return;
  76171. }
  76172. state.pagination.pageNo++;
  76173. getGoodsList();
  76174. }
  76175. onLoad(async () => {
  76176. await getList();
  76177. if (state.style === "first_one" || state.style === "first_two") {
  76178. onMenu(0);
  76179. }
  76180. });
  76181. onReachBottom(() => {
  76182. loadMore();
  76183. });
  76184. const __returned__ = { state, safeArea, pageHeight, getList, onMenu, getGoodsList, loadMore, get sheep() {
  76185. return sheep$1;
  76186. }, get CategoryApi() {
  76187. return CategoryApi;
  76188. }, get SpuApi() {
  76189. return SpuApi;
  76190. }, get onLoad() {
  76191. return onLoad;
  76192. }, get onReachBottom() {
  76193. return onReachBottom;
  76194. }, computed: vue.computed, reactive: vue.reactive, get _() {
  76195. return _$1;
  76196. }, get handleTree() {
  76197. return handleTree;
  76198. } };
  76199. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  76200. return __returned__;
  76201. }
  76202. };
  76203. function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
  76204. const _component_first_one = vue.resolveComponent("first-one");
  76205. const _component_first_two = vue.resolveComponent("first-two");
  76206. const _component_second_one = vue.resolveComponent("second-one");
  76207. const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5);
  76208. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  76209. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  76210. title: _ctx.$t("common.category"),
  76211. tabbar: "/pages/index/category",
  76212. bgStyle: { color: "#fff" }
  76213. }, {
  76214. default: vue.withCtx(() => {
  76215. var _a2;
  76216. return [
  76217. vue.createElementVNode("view", { class: "s-category" }, [
  76218. vue.createElementVNode(
  76219. "view",
  76220. {
  76221. class: "three-level-wrap ss-flex ss-col-top",
  76222. style: vue.normalizeStyle([{ height: $setup.pageHeight + "px" }])
  76223. },
  76224. [
  76225. vue.createCommentVNode(" 商品分类(左) "),
  76226. vue.createElementVNode(
  76227. "scroll-view",
  76228. {
  76229. class: "side-menu-wrap",
  76230. "scroll-y": "",
  76231. style: vue.normalizeStyle([{ height: $setup.pageHeight + "px" }])
  76232. },
  76233. [
  76234. (vue.openBlock(true), vue.createElementBlock(
  76235. vue.Fragment,
  76236. null,
  76237. vue.renderList($setup.state.categoryList, (item, index2) => {
  76238. return vue.openBlock(), vue.createElementBlock("view", {
  76239. class: vue.normalizeClass(["menu-item ss-flex", [{ "menu-item-active": index2 === $setup.state.activeMenu }]]),
  76240. key: item.id,
  76241. onClick: ($event) => $setup.onMenu(index2)
  76242. }, [
  76243. vue.createElementVNode(
  76244. "view",
  76245. { class: "menu-title ss-line-1" },
  76246. vue.toDisplayString(item.name),
  76247. 1
  76248. /* TEXT */
  76249. )
  76250. ], 10, ["onClick"]);
  76251. }),
  76252. 128
  76253. /* KEYED_FRAGMENT */
  76254. ))
  76255. ],
  76256. 4
  76257. /* STYLE */
  76258. ),
  76259. vue.createCommentVNode(" 商品分类(右) "),
  76260. ((_a2 = $setup.state.categoryList) == null ? void 0 : _a2.length) ? (vue.openBlock(), vue.createElementBlock(
  76261. "scroll-view",
  76262. {
  76263. key: 0,
  76264. class: "goods-list-box",
  76265. "scroll-y": "",
  76266. style: vue.normalizeStyle([{ height: $setup.pageHeight + "px" }])
  76267. },
  76268. [
  76269. $setup.state.categoryList[$setup.state.activeMenu].picUrl ? (vue.openBlock(), vue.createElementBlock("image", {
  76270. key: 0,
  76271. class: "banner-img",
  76272. src: $setup.sheep.$url.cdn($setup.state.categoryList[$setup.state.activeMenu].picUrl),
  76273. mode: "widthFix"
  76274. }, null, 8, ["src"])) : vue.createCommentVNode("v-if", true),
  76275. $setup.state.style === "first_one" ? (vue.openBlock(), vue.createBlock(_component_first_one, {
  76276. key: 1,
  76277. pagination: $setup.state.pagination
  76278. }, null, 8, ["pagination"])) : vue.createCommentVNode("v-if", true),
  76279. $setup.state.style === "first_two" ? (vue.openBlock(), vue.createBlock(_component_first_two, {
  76280. key: 2,
  76281. pagination: $setup.state.pagination
  76282. }, null, 8, ["pagination"])) : vue.createCommentVNode("v-if", true),
  76283. $setup.state.style === "second_one" ? (vue.openBlock(), vue.createBlock(_component_second_one, {
  76284. key: 3,
  76285. data: $setup.state.categoryList,
  76286. activeMenu: $setup.state.activeMenu
  76287. }, null, 8, ["data", "activeMenu"])) : vue.createCommentVNode("v-if", true),
  76288. ($setup.state.style === "first_one" || $setup.state.style === "first_two") && $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, {
  76289. key: 4,
  76290. status: $setup.state.loadStatus,
  76291. "content-text": {
  76292. contentdown: "点击查看更多"
  76293. },
  76294. onClick: $setup.loadMore
  76295. }, null, 8, ["status"])) : vue.createCommentVNode("v-if", true)
  76296. ],
  76297. 4
  76298. /* STYLE */
  76299. )) : vue.createCommentVNode("v-if", true)
  76300. ],
  76301. 4
  76302. /* STYLE */
  76303. )
  76304. ])
  76305. ];
  76306. }),
  76307. _: 1
  76308. /* STABLE */
  76309. }, 8, ["title"]);
  76310. }
  76311. const PagesShopCategory = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$x], ["__scopeId", "data-v-cb6343c4"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/shop/category.vue"]]);
  76312. const _sfc_main$x = {
  76313. __name: "allproduct",
  76314. setup(__props, { expose: __expose }) {
  76315. __expose();
  76316. const state = vue.reactive({
  76317. style: "second_one",
  76318. // first_one(一级 - 样式一), first_two(二级 - 样式二), second_one(二级)
  76319. categoryList: [],
  76320. // 商品分类树
  76321. activeMenu: 0,
  76322. // 选中的一级菜单,在 categoryList 的下标
  76323. pagination: {
  76324. // 商品分页
  76325. list: [],
  76326. // 商品列表
  76327. total: [],
  76328. // 商品总数
  76329. pageNo: 1,
  76330. pageSize: 6
  76331. },
  76332. loadStatus: ""
  76333. });
  76334. const {
  76335. safeArea
  76336. } = sheep$1.$platform.device;
  76337. const pageHeight = vue.computed(() => safeArea.height - 44 - 50);
  76338. async function getList() {
  76339. const {
  76340. code: code2,
  76341. data
  76342. } = await CategoryApi.getCategoryList();
  76343. if (code2 !== 0) {
  76344. return;
  76345. }
  76346. state.categoryList = handleTree(data);
  76347. }
  76348. const onMenu = (val) => {
  76349. state.activeMenu = val;
  76350. if (state.style === "first_one" || state.style === "first_two") {
  76351. state.pagination.pageNo = 1;
  76352. state.pagination.list = [];
  76353. state.pagination.total = 0;
  76354. getGoodsList();
  76355. }
  76356. };
  76357. async function getGoodsList() {
  76358. state.loadStatus = "loading";
  76359. const res = await SpuApi.getSpuPage({
  76360. categoryId: state.categoryList[state.activeMenu].id,
  76361. pageNo: state.pagination.pageNo,
  76362. pageSize: state.pagination.pageSize
  76363. });
  76364. if (res.code !== 0) {
  76365. return;
  76366. }
  76367. state.pagination.list = _$1.concat(state.pagination.list, res.data.list);
  76368. state.pagination.total = res.data.total;
  76369. state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore";
  76370. }
  76371. function loadMore() {
  76372. if (state.loadStatus === "noMore") {
  76373. return;
  76374. }
  76375. state.pagination.pageNo++;
  76376. getGoodsList();
  76377. }
  76378. onLoad(async () => {
  76379. await getList();
  76380. if (state.style === "first_one" || state.style === "first_two") {
  76381. onMenu(0);
  76382. }
  76383. });
  76384. onReachBottom(() => {
  76385. loadMore();
  76386. });
  76387. const __returned__ = { state, safeArea, pageHeight, getList, onMenu, getGoodsList, loadMore, get sheep() {
  76388. return sheep$1;
  76389. }, get CategoryApi() {
  76390. return CategoryApi;
  76391. }, get SpuApi() {
  76392. return SpuApi;
  76393. }, get onLoad() {
  76394. return onLoad;
  76395. }, get onReachBottom() {
  76396. return onReachBottom;
  76397. }, computed: vue.computed, reactive: vue.reactive, get _() {
  76398. return _$1;
  76399. }, get handleTree() {
  76400. return handleTree;
  76401. } };
  76402. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  76403. return __returned__;
  76404. }
  76405. };
  76406. function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
  76407. const _component_first_one = vue.resolveComponent("first-one");
  76408. const _component_first_two = vue.resolveComponent("first-two");
  76409. const _component_second_one = vue.resolveComponent("second-one");
  76410. const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5);
  76411. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  76412. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  76413. title: _ctx.$t("common.category"),
  76414. tabbar: "/pages/index/category",
  76415. bgStyle: { color: "#fff" }
  76416. }, {
  76417. default: vue.withCtx(() => {
  76418. var _a2;
  76419. return [
  76420. vue.createElementVNode("view", { class: "s-category" }, [
  76421. vue.createElementVNode(
  76422. "view",
  76423. {
  76424. class: "three-level-wrap ss-flex ss-col-top",
  76425. style: vue.normalizeStyle([{ height: $setup.pageHeight + "px" }])
  76426. },
  76427. [
  76428. vue.createCommentVNode(" 商品分类(左) "),
  76429. vue.createElementVNode(
  76430. "scroll-view",
  76431. {
  76432. class: "side-menu-wrap",
  76433. "scroll-y": "",
  76434. style: vue.normalizeStyle([{ height: $setup.pageHeight + "px" }])
  76435. },
  76436. [
  76437. (vue.openBlock(true), vue.createElementBlock(
  76438. vue.Fragment,
  76439. null,
  76440. vue.renderList($setup.state.categoryList, (item, index2) => {
  76441. return vue.openBlock(), vue.createElementBlock("view", {
  76442. class: vue.normalizeClass(["menu-item ss-flex", [{ "menu-item-active": index2 === $setup.state.activeMenu }]]),
  76443. key: item.id,
  76444. onClick: ($event) => $setup.onMenu(index2)
  76445. }, [
  76446. vue.createElementVNode(
  76447. "view",
  76448. { class: "menu-title ss-line-1" },
  76449. vue.toDisplayString(item.name),
  76450. 1
  76451. /* TEXT */
  76452. )
  76453. ], 10, ["onClick"]);
  76454. }),
  76455. 128
  76456. /* KEYED_FRAGMENT */
  76457. ))
  76458. ],
  76459. 4
  76460. /* STYLE */
  76461. ),
  76462. vue.createCommentVNode(" 商品分类(右) "),
  76463. ((_a2 = $setup.state.categoryList) == null ? void 0 : _a2.length) ? (vue.openBlock(), vue.createElementBlock(
  76464. "scroll-view",
  76465. {
  76466. key: 0,
  76467. class: "goods-list-box",
  76468. "scroll-y": "",
  76469. style: vue.normalizeStyle([{ height: $setup.pageHeight + "px" }])
  76470. },
  76471. [
  76472. $setup.state.categoryList[$setup.state.activeMenu].picUrl ? (vue.openBlock(), vue.createElementBlock("image", {
  76473. key: 0,
  76474. class: "banner-img",
  76475. src: $setup.sheep.$url.cdn($setup.state.categoryList[$setup.state.activeMenu].picUrl),
  76476. mode: "widthFix"
  76477. }, null, 8, ["src"])) : vue.createCommentVNode("v-if", true),
  76478. $setup.state.style === "first_one" ? (vue.openBlock(), vue.createBlock(_component_first_one, {
  76479. key: 1,
  76480. pagination: $setup.state.pagination
  76481. }, null, 8, ["pagination"])) : vue.createCommentVNode("v-if", true),
  76482. $setup.state.style === "first_two" ? (vue.openBlock(), vue.createBlock(_component_first_two, {
  76483. key: 2,
  76484. pagination: $setup.state.pagination
  76485. }, null, 8, ["pagination"])) : vue.createCommentVNode("v-if", true),
  76486. $setup.state.style === "second_one" ? (vue.openBlock(), vue.createBlock(_component_second_one, {
  76487. key: 3,
  76488. data: $setup.state.categoryList,
  76489. activeMenu: $setup.state.activeMenu
  76490. }, null, 8, ["data", "activeMenu"])) : vue.createCommentVNode("v-if", true),
  76491. ($setup.state.style === "first_one" || $setup.state.style === "first_two") && $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, {
  76492. key: 4,
  76493. status: $setup.state.loadStatus,
  76494. "content-text": {
  76495. contentdown: "点击查看更多"
  76496. },
  76497. onClick: $setup.loadMore
  76498. }, null, 8, ["status"])) : vue.createCommentVNode("v-if", true)
  76499. ],
  76500. 4
  76501. /* STYLE */
  76502. )) : vue.createCommentVNode("v-if", true)
  76503. ],
  76504. 4
  76505. /* STYLE */
  76506. )
  76507. ])
  76508. ];
  76509. }),
  76510. _: 1
  76511. /* STABLE */
  76512. }, 8, ["title"]);
  76513. }
  76514. const PagesShopAllproduct = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render$w], ["__scopeId", "data-v-d2ae9314"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/shop/allproduct.vue"]]);
  76515. const _imports_0$2 = "/static/zxlogo.png";
  76516. const _sfc_main$w = {
  76517. __name: "setting",
  76518. setup(__props, { expose: __expose }) {
  76519. __expose();
  76520. const appInfo = vue.computed(() => sheep$1.$store("app").info);
  76521. const isLogin = vue.computed(() => sheep$1.$store("user").isLogin);
  76522. const storageSize = uni.getStorageInfoSync().currentSize + "Kb";
  76523. const state = vue.reactive({
  76524. showModal: false
  76525. });
  76526. function onCheckUpdate() {
  76527. sheep$1.$platform.checkUpdate();
  76528. }
  76529. function onLogoff() {
  76530. uni.showModal({
  76531. title: t$6("setting.prompt"),
  76532. content: t$6("common.confirm_logout"),
  76533. success: async function(res) {
  76534. if (!res.confirm) {
  76535. return;
  76536. }
  76537. const {
  76538. code: code2
  76539. } = await AuthUtil.logout();
  76540. if (code2 !== 0) {
  76541. return;
  76542. }
  76543. sheep$1.$store("user").logout();
  76544. sheep$1.$router.go("/pages/index/user");
  76545. }
  76546. });
  76547. }
  76548. const __returned__ = { appInfo, isLogin, storageSize, state, onCheckUpdate, onLogoff, get sheep() {
  76549. return sheep$1;
  76550. }, computed: vue.computed, reactive: vue.reactive, get AuthUtil() {
  76551. return AuthUtil;
  76552. }, get t() {
  76553. return t$6;
  76554. } };
  76555. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  76556. return __returned__;
  76557. }
  76558. };
  76559. function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
  76560. const _component_uni_list_item = resolveEasycom(vue.resolveDynamicComponent("uni-list-item"), __easycom_0$i);
  76561. const _component_uni_list = resolveEasycom(vue.resolveDynamicComponent("uni-list"), __easycom_1$6);
  76562. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  76563. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  76564. class: "set-wrap",
  76565. title: $setup.t("common.system"),
  76566. bgStyle: { color: "#fff" }
  76567. }, {
  76568. default: vue.withCtx(() => [
  76569. vue.createElementVNode("view", { class: "header-box ss-flex-col ss-row-center ss-col-center" }, [
  76570. vue.createElementVNode("image", {
  76571. class: "logo-img ss-m-b-46",
  76572. src: _imports_0$2,
  76573. mode: "aspectFit"
  76574. }),
  76575. vue.createElementVNode(
  76576. "view",
  76577. { class: "name ss-m-b-24" },
  76578. vue.toDisplayString($setup.appInfo.name),
  76579. 1
  76580. /* TEXT */
  76581. )
  76582. ]),
  76583. vue.createElementVNode("view", { class: "container-list" }, [
  76584. vue.createVNode(_component_uni_list, { border: false }, {
  76585. default: vue.withCtx(() => [
  76586. vue.createVNode(_component_uni_list_item, {
  76587. title: $setup.t("common.current_version"),
  76588. rightText: $setup.appInfo.version,
  76589. showArrow: "",
  76590. clickable: "",
  76591. border: false,
  76592. class: "list-border",
  76593. onClick: $setup.onCheckUpdate
  76594. }, null, 8, ["title", "rightText"]),
  76595. vue.createVNode(_component_uni_list_item, {
  76596. title: $setup.t("common.local_cache"),
  76597. rightText: $setup.storageSize,
  76598. showArrow: "",
  76599. border: false,
  76600. class: "list-border"
  76601. }, null, 8, ["title"]),
  76602. vue.createVNode(_component_uni_list_item, {
  76603. title: $setup.t("common.about_us"),
  76604. showArrow: "",
  76605. clickable: "",
  76606. border: false,
  76607. class: "list-border",
  76608. onClick: _cache[0] || (_cache[0] = ($event) => $setup.sheep.$router.go("/pages/public/richtext", {
  76609. title: "关于我们"
  76610. }))
  76611. }, null, 8, ["title"]),
  76612. vue.createCommentVNode(" 为了过审 只有 iOS-App 有注销账号功能 "),
  76613. $setup.isLogin && $setup.sheep.$platform.os === "ios" && $setup.sheep.$platform.name === "App" ? (vue.openBlock(), vue.createBlock(_component_uni_list_item, {
  76614. key: 0,
  76615. title: $setup.t("common.logout_account"),
  76616. rightText: "",
  76617. showArrow: "",
  76618. clickable: "",
  76619. border: false,
  76620. class: "list-border",
  76621. onClick: $setup.onLogoff
  76622. }, null, 8, ["title"])) : vue.createCommentVNode("v-if", true)
  76623. ]),
  76624. _: 1
  76625. /* STABLE */
  76626. })
  76627. ]),
  76628. vue.createElementVNode("view", { class: "set-footer ss-flex-col ss-row-center ss-col-center" }, [
  76629. vue.createElementVNode("view", { class: "agreement-box ss-flex ss-col-center ss-m-b-40" }, [
  76630. vue.createElementVNode("view", { class: "ss-flex ss-col-center ss-m-b-10" }, [
  76631. vue.createElementVNode(
  76632. "view",
  76633. {
  76634. class: "tcp-text",
  76635. onClick: _cache[1] || (_cache[1] = ($event) => $setup.sheep.$router.go("/pages/public/richtext", {
  76636. title: "用户协议"
  76637. }))
  76638. },
  76639. vue.toDisplayString($setup.t("account.user_agreement")),
  76640. 1
  76641. /* TEXT */
  76642. ),
  76643. vue.createElementVNode(
  76644. "view",
  76645. { class: "agreement-text" },
  76646. "  " + vue.toDisplayString($setup.t("account.and")) + "  ",
  76647. 1
  76648. /* TEXT */
  76649. ),
  76650. vue.createElementVNode(
  76651. "view",
  76652. {
  76653. class: "tcp-text",
  76654. onClick: _cache[2] || (_cache[2] = ($event) => $setup.sheep.$router.go("/pages/public/richtext", {
  76655. title: "隐私协议"
  76656. }))
  76657. },
  76658. vue.toDisplayString($setup.t("account.privacy_policy")),
  76659. 1
  76660. /* TEXT */
  76661. )
  76662. ])
  76663. ]),
  76664. vue.createCommentVNode(' <view class="copyright-text ss-m-b-10">{{ appInfo.copyright }}</view> '),
  76665. vue.createCommentVNode(' <view class="copyright-text">{{ appInfo.copytime }}</view> ')
  76666. ]),
  76667. vue.createCommentVNode(' <su-fixed bottom placeholder>\r\n <view class="ss-p-x-20 ss-p-b-40">\r\n <button class="loginout-btn ss-reset-button ui-BG-Main ui-Shadow-Main" @tap="onLogout" v-if="isLogin">\r\n 退出登录\r\n </button>\r\n </view>\r\n </su-fixed> ')
  76668. ]),
  76669. _: 1
  76670. /* STABLE */
  76671. }, 8, ["title"]);
  76672. }
  76673. const PagesPublicSetting = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$v], ["__scopeId", "data-v-5fed78fb"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/public/setting.vue"]]);
  76674. const _sfc_main$v = {
  76675. name: "uniCollapseItem",
  76676. props: {
  76677. // 列表标题
  76678. title: {
  76679. type: String,
  76680. default: ""
  76681. },
  76682. name: {
  76683. type: [Number, String],
  76684. default: ""
  76685. },
  76686. // 是否禁用
  76687. disabled: {
  76688. type: Boolean,
  76689. default: false
  76690. },
  76691. // 是否显示动画,app 端默认不开启动画,卡顿严重
  76692. showAnimation: {
  76693. type: Boolean,
  76694. default: false
  76695. },
  76696. // 是否展开
  76697. open: {
  76698. type: Boolean,
  76699. default: false
  76700. },
  76701. // 缩略图
  76702. thumb: {
  76703. type: String,
  76704. default: ""
  76705. },
  76706. // 标题分隔线显示类型
  76707. titleBorder: {
  76708. type: String,
  76709. default: "auto"
  76710. },
  76711. border: {
  76712. type: Boolean,
  76713. default: true
  76714. },
  76715. showArrow: {
  76716. type: Boolean,
  76717. default: true
  76718. }
  76719. },
  76720. data() {
  76721. const elId = `Uni_${Math.ceil(Math.random() * 1e6).toString(36)}`;
  76722. return {
  76723. isOpen: false,
  76724. isheight: null,
  76725. height: 0,
  76726. elId,
  76727. nameSync: 0
  76728. };
  76729. },
  76730. watch: {
  76731. open(val) {
  76732. this.isOpen = val;
  76733. this.onClick(val, "init");
  76734. }
  76735. },
  76736. updated(e2) {
  76737. this.$nextTick(() => {
  76738. this.init(true);
  76739. });
  76740. },
  76741. created() {
  76742. this.collapse = this.getCollapse();
  76743. this.oldHeight = 0;
  76744. this.onClick(this.open, "init");
  76745. },
  76746. // TODO vue3
  76747. unmounted() {
  76748. this.__isUnmounted = true;
  76749. this.uninstall();
  76750. },
  76751. mounted() {
  76752. if (!this.collapse)
  76753. return;
  76754. if (this.name !== "") {
  76755. this.nameSync = this.name;
  76756. } else {
  76757. this.nameSync = this.collapse.childrens.length + "";
  76758. }
  76759. if (this.collapse.names.indexOf(this.nameSync) === -1) {
  76760. this.collapse.names.push(this.nameSync);
  76761. } else {
  76762. formatAppLog("warn", "at uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item.vue:154", `name 值 ${this.nameSync} 重复`);
  76763. }
  76764. if (this.collapse.childrens.indexOf(this) === -1) {
  76765. this.collapse.childrens.push(this);
  76766. }
  76767. this.init();
  76768. },
  76769. methods: {
  76770. init(type) {
  76771. this.getCollapseHeight(type);
  76772. },
  76773. uninstall() {
  76774. if (this.collapse) {
  76775. this.collapse.childrens.forEach((item, index2) => {
  76776. if (item === this) {
  76777. this.collapse.childrens.splice(index2, 1);
  76778. }
  76779. });
  76780. this.collapse.names.forEach((item, index2) => {
  76781. if (item === this.nameSync) {
  76782. this.collapse.names.splice(index2, 1);
  76783. }
  76784. });
  76785. }
  76786. },
  76787. onClick(isOpen, type) {
  76788. if (this.disabled)
  76789. return;
  76790. this.isOpen = isOpen;
  76791. if (this.isOpen && this.collapse) {
  76792. this.collapse.setAccordion(this);
  76793. }
  76794. if (type !== "init") {
  76795. this.collapse.onChange(isOpen, this);
  76796. }
  76797. },
  76798. getCollapseHeight(type, index2 = 0) {
  76799. const views = uni.createSelectorQuery().in(this);
  76800. views.select(`#${this.elId}`).fields({
  76801. size: true
  76802. }, (data) => {
  76803. if (index2 >= 10)
  76804. return;
  76805. if (!data) {
  76806. index2++;
  76807. this.getCollapseHeight(false, index2);
  76808. return;
  76809. }
  76810. this.height = data.height;
  76811. this.isheight = true;
  76812. if (type)
  76813. return;
  76814. this.onClick(this.isOpen, "init");
  76815. }).exec();
  76816. },
  76817. getNvueHwight(type) {
  76818. dom.getComponentRect(this.$refs["collapse--hook"], (option) => {
  76819. if (option && option.result && option.size) {
  76820. this.height = option.size.height;
  76821. this.isheight = true;
  76822. if (type)
  76823. return;
  76824. this.onClick(this.open, "init");
  76825. }
  76826. });
  76827. },
  76828. /**
  76829. * 获取父元素实例
  76830. */
  76831. getCollapse(name2 = "uniCollapse") {
  76832. let parent2 = this.$parent;
  76833. let parentName = parent2.$options.name;
  76834. while (parentName !== name2) {
  76835. parent2 = parent2.$parent;
  76836. if (!parent2)
  76837. return false;
  76838. parentName = parent2.$options.name;
  76839. }
  76840. return parent2;
  76841. }
  76842. }
  76843. };
  76844. function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
  76845. const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$b);
  76846. return vue.openBlock(), vue.createElementBlock("view", { class: "uni-collapse-item" }, [
  76847. vue.createCommentVNode(" onClick(!isOpen) "),
  76848. vue.createElementVNode(
  76849. "view",
  76850. {
  76851. onClick: _cache[0] || (_cache[0] = ($event) => $options.onClick(!$data.isOpen)),
  76852. class: vue.normalizeClass(["uni-collapse-item__title", { "is-open": $data.isOpen && $props.titleBorder === "auto", "uni-collapse-item-border": $props.titleBorder !== "none" }])
  76853. },
  76854. [
  76855. vue.createElementVNode("view", { class: "uni-collapse-item__title-wrap" }, [
  76856. vue.renderSlot(_ctx.$slots, "title", {}, () => [
  76857. vue.createElementVNode(
  76858. "view",
  76859. {
  76860. class: vue.normalizeClass(["uni-collapse-item__title-box", { "is-disabled": $props.disabled }])
  76861. },
  76862. [
  76863. $props.thumb ? (vue.openBlock(), vue.createElementBlock("image", {
  76864. key: 0,
  76865. src: $props.thumb,
  76866. class: "uni-collapse-item__title-img"
  76867. }, null, 8, ["src"])) : vue.createCommentVNode("v-if", true),
  76868. vue.createElementVNode(
  76869. "text",
  76870. { class: "uni-collapse-item__title-text" },
  76871. vue.toDisplayString($props.title),
  76872. 1
  76873. /* TEXT */
  76874. )
  76875. ],
  76876. 2
  76877. /* CLASS */
  76878. )
  76879. ], true)
  76880. ]),
  76881. $props.showArrow ? (vue.openBlock(), vue.createElementBlock(
  76882. "view",
  76883. {
  76884. key: 0,
  76885. class: vue.normalizeClass([{ "uni-collapse-item__title-arrow-active": $data.isOpen, "uni-collapse-item--animation": $props.showAnimation === true }, "uni-collapse-item__title-arrow"])
  76886. },
  76887. [
  76888. vue.createVNode(_component_uni_icons, {
  76889. color: $props.disabled ? "#ddd" : "#bbb",
  76890. size: "14",
  76891. type: "bottom"
  76892. }, null, 8, ["color"])
  76893. ],
  76894. 2
  76895. /* CLASS */
  76896. )) : vue.createCommentVNode("v-if", true)
  76897. ],
  76898. 2
  76899. /* CLASS */
  76900. ),
  76901. vue.createElementVNode(
  76902. "view",
  76903. {
  76904. class: vue.normalizeClass(["uni-collapse-item__wrap", { "is--transition": $props.showAnimation }]),
  76905. style: vue.normalizeStyle({ height: ($data.isOpen ? $data.height : 0) + "px" })
  76906. },
  76907. [
  76908. vue.createElementVNode("view", {
  76909. id: $data.elId,
  76910. ref: "collapse--hook",
  76911. class: vue.normalizeClass(["uni-collapse-item__wrap-content", { open: $data.isheight, "uni-collapse-item--border": $props.border && $data.isOpen }])
  76912. }, [
  76913. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  76914. ], 10, ["id"])
  76915. ],
  76916. 6
  76917. /* CLASS, STYLE */
  76918. )
  76919. ]);
  76920. }
  76921. const __easycom_0$2 = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$u], ["__scopeId", "data-v-3d2dde9f"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item.vue"]]);
  76922. const _sfc_main$u = {
  76923. name: "uniCollapse",
  76924. emits: ["change", "activeItem", "input", "update:modelValue"],
  76925. props: {
  76926. value: {
  76927. type: [String, Array],
  76928. default: ""
  76929. },
  76930. modelValue: {
  76931. type: [String, Array],
  76932. default: ""
  76933. },
  76934. accordion: {
  76935. // 是否开启手风琴效果
  76936. type: [Boolean, String],
  76937. default: false
  76938. }
  76939. },
  76940. data() {
  76941. return {};
  76942. },
  76943. computed: {
  76944. // TODO 兼容 vue2 和 vue3
  76945. dataValue() {
  76946. let value = typeof this.value === "string" && this.value === "" || Array.isArray(this.value) && this.value.length === 0;
  76947. let modelValue = typeof this.modelValue === "string" && this.modelValue === "" || Array.isArray(this.modelValue) && this.modelValue.length === 0;
  76948. if (value) {
  76949. return this.modelValue;
  76950. }
  76951. if (modelValue) {
  76952. return this.value;
  76953. }
  76954. return this.value;
  76955. }
  76956. },
  76957. watch: {
  76958. dataValue(val) {
  76959. this.setOpen(val);
  76960. }
  76961. },
  76962. created() {
  76963. this.childrens = [];
  76964. this.names = [];
  76965. },
  76966. mounted() {
  76967. this.$nextTick(() => {
  76968. this.setOpen(this.dataValue);
  76969. });
  76970. },
  76971. methods: {
  76972. setOpen(val) {
  76973. let str = typeof val === "string";
  76974. let arr = Array.isArray(val);
  76975. this.childrens.forEach((vm, index2) => {
  76976. if (str) {
  76977. if (val === vm.nameSync) {
  76978. if (!this.accordion) {
  76979. formatAppLog("warn", "at uni_modules/uni-collapse/components/uni-collapse/uni-collapse.vue:75", "accordion 属性为 false ,v-model 类型应该为 array");
  76980. return;
  76981. }
  76982. vm.isOpen = true;
  76983. }
  76984. }
  76985. if (arr) {
  76986. val.forEach((v2) => {
  76987. if (v2 === vm.nameSync) {
  76988. if (this.accordion) {
  76989. formatAppLog("warn", "at uni_modules/uni-collapse/components/uni-collapse/uni-collapse.vue:85", "accordion 属性为 true ,v-model 类型应该为 string");
  76990. return;
  76991. }
  76992. vm.isOpen = true;
  76993. }
  76994. });
  76995. }
  76996. });
  76997. this.emit(val);
  76998. },
  76999. setAccordion(self2) {
  77000. if (!this.accordion)
  77001. return;
  77002. this.childrens.forEach((vm, index2) => {
  77003. if (self2 !== vm) {
  77004. vm.isOpen = false;
  77005. }
  77006. });
  77007. },
  77008. resize() {
  77009. this.childrens.forEach((vm, index2) => {
  77010. vm.getCollapseHeight();
  77011. });
  77012. },
  77013. onChange(isOpen, self2) {
  77014. let activeItem = [];
  77015. if (this.accordion) {
  77016. activeItem = isOpen ? self2.nameSync : "";
  77017. } else {
  77018. this.childrens.forEach((vm, index2) => {
  77019. if (vm.isOpen) {
  77020. activeItem.push(vm.nameSync);
  77021. }
  77022. });
  77023. }
  77024. this.$emit("change", activeItem);
  77025. this.emit(activeItem);
  77026. },
  77027. emit(val) {
  77028. this.$emit("input", val);
  77029. this.$emit("update:modelValue", val);
  77030. }
  77031. }
  77032. };
  77033. function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
  77034. return vue.openBlock(), vue.createElementBlock("view", { class: "uni-collapse" }, [
  77035. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  77036. ]);
  77037. }
  77038. const __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$t], ["__scopeId", "data-v-3f050360"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-collapse/components/uni-collapse/uni-collapse.vue"]]);
  77039. const _sfc_main$t = {
  77040. __name: "faq",
  77041. setup(__props, { expose: __expose }) {
  77042. __expose();
  77043. const state = vue.reactive({
  77044. list: [],
  77045. loading: true
  77046. });
  77047. async function getFaqList() {
  77048. const { error: error2, data } = await sheep$1.$api.data.faq();
  77049. if (error2 === 0) {
  77050. state.list = data;
  77051. state.loading = false;
  77052. }
  77053. }
  77054. onLoad(() => {
  77055. {
  77056. sheep$1.$router.go("/pages/public/richtext", {
  77057. title: "常见问题"
  77058. });
  77059. return;
  77060. }
  77061. });
  77062. const __returned__ = { state, getFaqList, get onLoad() {
  77063. return onLoad;
  77064. }, reactive: vue.reactive, get sheep() {
  77065. return sheep$1;
  77066. } };
  77067. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  77068. return __returned__;
  77069. }
  77070. };
  77071. function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
  77072. const _component_uni_collapse_item = resolveEasycom(vue.resolveDynamicComponent("uni-collapse-item"), __easycom_0$2);
  77073. const _component_uni_collapse = resolveEasycom(vue.resolveDynamicComponent("uni-collapse"), __easycom_1);
  77074. const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6);
  77075. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  77076. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  77077. class: "set-wrap",
  77078. title: "常见问题",
  77079. bgStyle: { color: "#FFF" }
  77080. }, {
  77081. default: vue.withCtx(() => [
  77082. vue.createVNode(_component_uni_collapse, null, {
  77083. default: vue.withCtx(() => [
  77084. (vue.openBlock(true), vue.createElementBlock(
  77085. vue.Fragment,
  77086. null,
  77087. vue.renderList($setup.state.list, (item, index2) => {
  77088. return vue.openBlock(), vue.createBlock(
  77089. _component_uni_collapse_item,
  77090. { key: item },
  77091. {
  77092. title: vue.withCtx(() => [
  77093. vue.createElementVNode("view", { class: "ss-flex ss-col-center header" }, [
  77094. vue.createElementVNode("view", { class: "ss-m-l-20 ss-m-r-20 icon" }, [
  77095. vue.createElementVNode("view", { class: "rectangle" }, [
  77096. vue.createElementVNode(
  77097. "view",
  77098. { class: "num ss-flex ss-row-center ss-col-center" },
  77099. vue.toDisplayString(index2 + 1 < 10 ? "0" + (index2 + 1) : index2 + 1),
  77100. 1
  77101. /* TEXT */
  77102. )
  77103. ]),
  77104. vue.createElementVNode("view", { class: "triangle" })
  77105. ]),
  77106. vue.createElementVNode(
  77107. "view",
  77108. { class: "title ss-m-t-36 ss-m-b-36" },
  77109. vue.toDisplayString(item.title),
  77110. 1
  77111. /* TEXT */
  77112. )
  77113. ])
  77114. ]),
  77115. default: vue.withCtx(() => [
  77116. vue.createElementVNode("view", { class: "content ss-p-l-78 ss-p-r-40 ss-p-b-50 ss-p-t-20" }, [
  77117. vue.createElementVNode(
  77118. "text",
  77119. { class: "text" },
  77120. vue.toDisplayString(item.content),
  77121. 1
  77122. /* TEXT */
  77123. )
  77124. ])
  77125. ]),
  77126. _: 2
  77127. /* DYNAMIC */
  77128. },
  77129. 1024
  77130. /* DYNAMIC_SLOTS */
  77131. );
  77132. }),
  77133. 128
  77134. /* KEYED_FRAGMENT */
  77135. ))
  77136. ]),
  77137. _: 1
  77138. /* STABLE */
  77139. }),
  77140. $setup.state.list.length === 0 && !$setup.state.loading ? (vue.openBlock(), vue.createBlock(_component_s_empty, {
  77141. key: 0,
  77142. text: "暂无常见问题",
  77143. icon: "/static/collect-empty.png"
  77144. })) : vue.createCommentVNode("v-if", true)
  77145. ]),
  77146. _: 1
  77147. /* STABLE */
  77148. });
  77149. }
  77150. const PagesPublicFaq = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$s], ["__scopeId", "data-v-b3a79332"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/public/faq.vue"]]);
  77151. const _sfc_main$s = {
  77152. __name: "error",
  77153. setup(__props, { expose: __expose }) {
  77154. __expose();
  77155. const errCode = vue.ref("");
  77156. const errMsg = vue.ref("");
  77157. onLoad((options2) => {
  77158. errCode.value = options2.errCode;
  77159. errMsg.value = options2.errMsg;
  77160. });
  77161. async function onReconnect() {
  77162. uni.reLaunch({
  77163. url: "/pages/index/index"
  77164. });
  77165. await ShoproInit();
  77166. }
  77167. const __returned__ = { errCode, errMsg, onReconnect, get onLoad() {
  77168. return onLoad;
  77169. }, ref: vue.ref, get ShoproInit() {
  77170. return ShoproInit;
  77171. } };
  77172. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  77173. return __returned__;
  77174. }
  77175. };
  77176. function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
  77177. const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6);
  77178. return vue.openBlock(), vue.createElementBlock("view", { class: "error-page" }, [
  77179. $setup.errCode === "NetworkError" ? (vue.openBlock(), vue.createBlock(_component_s_empty, {
  77180. key: 0,
  77181. icon: "/static/internet-empty.png",
  77182. text: "网络连接失败",
  77183. showAction: "",
  77184. actionText: "重新连接",
  77185. onClickAction: $setup.onReconnect,
  77186. buttonColor: "#132b85"
  77187. })) : $setup.errCode === "TemplateError" ? (vue.openBlock(), vue.createBlock(_component_s_empty, {
  77188. key: 1,
  77189. icon: "/static/internet-empty.png",
  77190. text: "未找到模板",
  77191. showAction: "",
  77192. actionText: "重新加载",
  77193. onClickAction: $setup.onReconnect,
  77194. buttonColor: "#132b85"
  77195. })) : $setup.errCode !== "" ? (vue.openBlock(), vue.createBlock(_component_s_empty, {
  77196. key: 2,
  77197. icon: "/static/internet-empty.png",
  77198. text: $setup.errMsg,
  77199. showAction: "",
  77200. actionText: "重新加载",
  77201. onClickAction: $setup.onReconnect,
  77202. buttonColor: "#132b85"
  77203. }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true)
  77204. ]);
  77205. }
  77206. const PagesPublicError = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$r], ["__scopeId", "data-v-8e014bcf"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/public/error.vue"]]);
  77207. const _sfc_main$r = {
  77208. __name: "webview",
  77209. setup(__props, { expose: __expose }) {
  77210. __expose();
  77211. const url2 = vue.ref("");
  77212. onLoad((options2) => {
  77213. url2.value = decodeURIComponent(options2.url);
  77214. });
  77215. const __returned__ = { url: url2, get onLoad() {
  77216. return onLoad;
  77217. }, ref: vue.ref };
  77218. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  77219. return __returned__;
  77220. }
  77221. };
  77222. function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
  77223. return vue.openBlock(), vue.createElementBlock("view", null, [
  77224. vue.createElementVNode("web-view", { src: $setup.url }, null, 8, ["src"])
  77225. ]);
  77226. }
  77227. const PagesPublicWebview = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$q], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/public/webview.vue"]]);
  77228. const dataPicker = {
  77229. props: {
  77230. localdata: {
  77231. type: [Array, Object],
  77232. default() {
  77233. return [];
  77234. }
  77235. },
  77236. spaceInfo: {
  77237. type: Object,
  77238. default() {
  77239. return {};
  77240. }
  77241. },
  77242. collection: {
  77243. type: String,
  77244. default: ""
  77245. },
  77246. action: {
  77247. type: String,
  77248. default: ""
  77249. },
  77250. field: {
  77251. type: String,
  77252. default: ""
  77253. },
  77254. orderby: {
  77255. type: String,
  77256. default: ""
  77257. },
  77258. where: {
  77259. type: [String, Object],
  77260. default: ""
  77261. },
  77262. pageData: {
  77263. type: String,
  77264. default: "add"
  77265. },
  77266. pageCurrent: {
  77267. type: Number,
  77268. default: 1
  77269. },
  77270. pageSize: {
  77271. type: Number,
  77272. default: 20
  77273. },
  77274. getcount: {
  77275. type: [Boolean, String],
  77276. default: false
  77277. },
  77278. getone: {
  77279. type: [Boolean, String],
  77280. default: false
  77281. },
  77282. gettree: {
  77283. type: [Boolean, String],
  77284. default: false
  77285. },
  77286. manual: {
  77287. type: Boolean,
  77288. default: false
  77289. },
  77290. value: {
  77291. type: [Array, String, Number],
  77292. default() {
  77293. return [];
  77294. }
  77295. },
  77296. modelValue: {
  77297. type: [Array, String, Number],
  77298. default() {
  77299. return [];
  77300. }
  77301. },
  77302. preload: {
  77303. type: Boolean,
  77304. default: false
  77305. },
  77306. stepSearh: {
  77307. type: Boolean,
  77308. default: true
  77309. },
  77310. selfField: {
  77311. type: String,
  77312. default: ""
  77313. },
  77314. parentField: {
  77315. type: String,
  77316. default: ""
  77317. },
  77318. multiple: {
  77319. type: Boolean,
  77320. default: false
  77321. },
  77322. map: {
  77323. type: Object,
  77324. default() {
  77325. return {
  77326. text: "text",
  77327. value: "value"
  77328. };
  77329. }
  77330. }
  77331. },
  77332. data() {
  77333. return {
  77334. loading: false,
  77335. errorMessage: "",
  77336. loadMore: {
  77337. contentdown: "",
  77338. contentrefresh: "",
  77339. contentnomore: ""
  77340. },
  77341. dataList: [],
  77342. selected: [],
  77343. selectedIndex: 0,
  77344. page: {
  77345. current: this.pageCurrent,
  77346. size: this.pageSize,
  77347. count: 0
  77348. }
  77349. };
  77350. },
  77351. computed: {
  77352. isLocaldata() {
  77353. return !this.collection.length;
  77354. },
  77355. postField() {
  77356. let fields = [this.field];
  77357. if (this.parentField) {
  77358. fields.push(`${this.parentField} as parent_value`);
  77359. }
  77360. return fields.join(",");
  77361. },
  77362. dataValue() {
  77363. let isModelValue = Array.isArray(this.modelValue) ? this.modelValue.length > 0 : this.modelValue !== null || this.modelValue !== void 0;
  77364. return isModelValue ? this.modelValue : this.value;
  77365. },
  77366. hasValue() {
  77367. if (typeof this.dataValue === "number") {
  77368. return true;
  77369. }
  77370. return this.dataValue != null && this.dataValue.length > 0;
  77371. }
  77372. },
  77373. created() {
  77374. this.$watch(() => {
  77375. var al = [];
  77376. [
  77377. "pageCurrent",
  77378. "pageSize",
  77379. "spaceInfo",
  77380. "value",
  77381. "modelValue",
  77382. "localdata",
  77383. "collection",
  77384. "action",
  77385. "field",
  77386. "orderby",
  77387. "where",
  77388. "getont",
  77389. "getcount",
  77390. "gettree"
  77391. ].forEach((key) => {
  77392. al.push(this[key]);
  77393. });
  77394. return al;
  77395. }, (newValue, oldValue) => {
  77396. for (let i2 = 2; i2 < newValue.length; i2++) {
  77397. if (newValue[i2] != oldValue[i2]) {
  77398. break;
  77399. }
  77400. }
  77401. if (newValue[0] != oldValue[0]) {
  77402. this.page.current = this.pageCurrent;
  77403. }
  77404. this.page.size = this.pageSize;
  77405. this.onPropsChange();
  77406. });
  77407. this._treeData = [];
  77408. },
  77409. methods: {
  77410. onPropsChange() {
  77411. this._treeData = [];
  77412. },
  77413. getCommand(options2 = {}) {
  77414. let db = Ys.database(this.spaceInfo);
  77415. const action = options2.action || this.action;
  77416. if (action) {
  77417. db = db.action(action);
  77418. }
  77419. const collection = options2.collection || this.collection;
  77420. db = db.collection(collection);
  77421. const where = options2.where || this.where;
  77422. if (!(!where || !Object.keys(where).length)) {
  77423. db = db.where(where);
  77424. }
  77425. const field = options2.field || this.field;
  77426. if (field) {
  77427. db = db.field(field);
  77428. }
  77429. const orderby = options2.orderby || this.orderby;
  77430. if (orderby) {
  77431. db = db.orderBy(orderby);
  77432. }
  77433. const current = options2.pageCurrent !== void 0 ? options2.pageCurrent : this.page.current;
  77434. const size = options2.pageSize !== void 0 ? options2.pageSize : this.page.size;
  77435. const getCount = options2.getcount !== void 0 ? options2.getcount : this.getcount;
  77436. const getTree = options2.gettree !== void 0 ? options2.gettree : this.gettree;
  77437. const getOptions = {
  77438. getCount,
  77439. getTree
  77440. };
  77441. if (options2.getTreePath) {
  77442. getOptions.getTreePath = options2.getTreePath;
  77443. }
  77444. db = db.skip(size * (current - 1)).limit(size).get(getOptions);
  77445. return db;
  77446. },
  77447. getNodeData(callback) {
  77448. if (this.loading) {
  77449. return;
  77450. }
  77451. this.loading = true;
  77452. this.getCommand({
  77453. field: this.postField,
  77454. where: this._pathWhere()
  77455. }).then((res) => {
  77456. this.loading = false;
  77457. this.selected = res.result.data;
  77458. callback && callback();
  77459. }).catch((err) => {
  77460. this.loading = false;
  77461. this.errorMessage = err;
  77462. });
  77463. },
  77464. getTreePath(callback) {
  77465. if (this.loading) {
  77466. return;
  77467. }
  77468. this.loading = true;
  77469. this.getCommand({
  77470. field: this.postField,
  77471. getTreePath: {
  77472. startWith: `${this.selfField}=='${this.dataValue}'`
  77473. }
  77474. }).then((res) => {
  77475. this.loading = false;
  77476. let treePath = [];
  77477. this._extractTreePath(res.result.data, treePath);
  77478. this.selected = treePath;
  77479. callback && callback();
  77480. }).catch((err) => {
  77481. this.loading = false;
  77482. this.errorMessage = err;
  77483. });
  77484. },
  77485. loadData() {
  77486. if (this.isLocaldata) {
  77487. this._processLocalData();
  77488. return;
  77489. }
  77490. if (this.dataValue != null) {
  77491. this._loadNodeData((data) => {
  77492. this._treeData = data;
  77493. this._updateBindData();
  77494. this._updateSelected();
  77495. });
  77496. return;
  77497. }
  77498. if (this.stepSearh) {
  77499. this._loadNodeData((data) => {
  77500. this._treeData = data;
  77501. this._updateBindData();
  77502. });
  77503. } else {
  77504. this._loadAllData((data) => {
  77505. this._treeData = [];
  77506. this._extractTree(data, this._treeData, null);
  77507. this._updateBindData();
  77508. });
  77509. }
  77510. },
  77511. _loadAllData(callback) {
  77512. if (this.loading) {
  77513. return;
  77514. }
  77515. this.loading = true;
  77516. this.getCommand({
  77517. field: this.postField,
  77518. gettree: true,
  77519. startwith: `${this.selfField}=='${this.dataValue}'`
  77520. }).then((res) => {
  77521. this.loading = false;
  77522. callback(res.result.data);
  77523. this.onDataChange();
  77524. }).catch((err) => {
  77525. this.loading = false;
  77526. this.errorMessage = err;
  77527. });
  77528. },
  77529. _loadNodeData(callback, pw) {
  77530. if (this.loading) {
  77531. return;
  77532. }
  77533. this.loading = true;
  77534. this.getCommand({
  77535. field: this.postField,
  77536. where: pw || this._postWhere(),
  77537. pageSize: 500
  77538. }).then((res) => {
  77539. this.loading = false;
  77540. callback(res.result.data);
  77541. this.onDataChange();
  77542. }).catch((err) => {
  77543. this.loading = false;
  77544. this.errorMessage = err;
  77545. });
  77546. },
  77547. _pathWhere() {
  77548. let result2 = [];
  77549. let where_field = this._getParentNameByField();
  77550. if (where_field) {
  77551. result2.push(`${where_field} == '${this.dataValue}'`);
  77552. }
  77553. if (this.where) {
  77554. return `(${this.where}) && (${result2.join(" || ")})`;
  77555. }
  77556. return result2.join(" || ");
  77557. },
  77558. _postWhere() {
  77559. let result2 = [];
  77560. let selected = this.selected;
  77561. let parentField = this.parentField;
  77562. if (parentField) {
  77563. result2.push(`${parentField} == null || ${parentField} == ""`);
  77564. }
  77565. if (selected.length) {
  77566. for (var i2 = 0; i2 < selected.length - 1; i2++) {
  77567. result2.push(`${parentField} == '${selected[i2].value}'`);
  77568. }
  77569. }
  77570. let where = [];
  77571. if (this.where) {
  77572. where.push(`(${this.where})`);
  77573. }
  77574. if (result2.length) {
  77575. where.push(`(${result2.join(" || ")})`);
  77576. }
  77577. return where.join(" && ");
  77578. },
  77579. _nodeWhere() {
  77580. let result2 = [];
  77581. let selected = this.selected;
  77582. if (selected.length) {
  77583. result2.push(`${this.parentField} == '${selected[selected.length - 1].value}'`);
  77584. }
  77585. if (this.where) {
  77586. return `(${this.where}) && (${result2.join(" || ")})`;
  77587. }
  77588. return result2.join(" || ");
  77589. },
  77590. _getParentNameByField() {
  77591. const fields = this.field.split(",");
  77592. let where_field = null;
  77593. for (let i2 = 0; i2 < fields.length; i2++) {
  77594. const items = fields[i2].split("as");
  77595. if (items.length < 2) {
  77596. continue;
  77597. }
  77598. if (items[1].trim() === "value") {
  77599. where_field = items[0].trim();
  77600. break;
  77601. }
  77602. }
  77603. return where_field;
  77604. },
  77605. _isTreeView() {
  77606. return this.parentField && this.selfField;
  77607. },
  77608. _updateSelected() {
  77609. var dl = this.dataList;
  77610. var sl = this.selected;
  77611. let textField = this.map.text;
  77612. let valueField = this.map.value;
  77613. for (var i2 = 0; i2 < sl.length; i2++) {
  77614. var value = sl[i2].value;
  77615. var dl2 = dl[i2];
  77616. for (var j2 = 0; j2 < dl2.length; j2++) {
  77617. var item2 = dl2[j2];
  77618. if (item2[valueField] === value) {
  77619. sl[i2].text = item2[textField];
  77620. break;
  77621. }
  77622. }
  77623. }
  77624. },
  77625. _updateBindData(node2) {
  77626. const {
  77627. dataList,
  77628. hasNodes
  77629. } = this._filterData(this._treeData, this.selected);
  77630. let isleaf = this._stepSearh === false && !hasNodes;
  77631. if (node2) {
  77632. node2.isleaf = isleaf;
  77633. }
  77634. this.dataList = dataList;
  77635. this.selectedIndex = dataList.length - 1;
  77636. if (!isleaf && this.selected.length < dataList.length) {
  77637. this.selected.push({
  77638. value: null,
  77639. text: "请选择"
  77640. });
  77641. }
  77642. return {
  77643. isleaf,
  77644. hasNodes
  77645. };
  77646. },
  77647. _filterData(data, paths) {
  77648. let dataList = [];
  77649. let hasNodes = true;
  77650. dataList.push(data.filter((item) => {
  77651. return item.parent_value === null || item.parent_value === void 0 || item.parent_value === "";
  77652. }));
  77653. for (let i2 = 0; i2 < paths.length; i2++) {
  77654. var value = paths[i2].value;
  77655. var nodes = data.filter((item) => {
  77656. return item.parent_value === value;
  77657. });
  77658. if (nodes.length) {
  77659. dataList.push(nodes);
  77660. } else {
  77661. hasNodes = false;
  77662. }
  77663. }
  77664. return {
  77665. dataList,
  77666. hasNodes
  77667. };
  77668. },
  77669. _extractTree(nodes, result2, parent_value) {
  77670. let valueField = this.map.value;
  77671. for (let i2 = 0; i2 < nodes.length; i2++) {
  77672. let node2 = nodes[i2];
  77673. let child = {};
  77674. for (let key in node2) {
  77675. if (key !== "children") {
  77676. child[key] = node2[key];
  77677. }
  77678. }
  77679. if (parent_value !== null && parent_value !== void 0 && parent_value !== "") {
  77680. child.parent_value = parent_value;
  77681. }
  77682. result2.push(child);
  77683. let children = node2.children;
  77684. if (children) {
  77685. this._extractTree(children, result2, node2[valueField]);
  77686. }
  77687. }
  77688. },
  77689. _extractTreePath(nodes, result2) {
  77690. for (let i2 = 0; i2 < nodes.length; i2++) {
  77691. let node2 = nodes[i2];
  77692. let child = {};
  77693. for (let key in node2) {
  77694. if (key !== "children") {
  77695. child[key] = node2[key];
  77696. }
  77697. }
  77698. result2.push(child);
  77699. let children = node2.children;
  77700. if (children) {
  77701. this._extractTreePath(children, result2);
  77702. }
  77703. }
  77704. },
  77705. _findNodePath(key, nodes, path = []) {
  77706. let textField = this.map.text;
  77707. let valueField = this.map.value;
  77708. for (let i2 = 0; i2 < nodes.length; i2++) {
  77709. let node2 = nodes[i2];
  77710. let children = node2.children;
  77711. let text = node2[textField];
  77712. let value = node2[valueField];
  77713. path.push({
  77714. value,
  77715. text
  77716. });
  77717. if (value === key) {
  77718. return path;
  77719. }
  77720. if (children) {
  77721. const p2 = this._findNodePath(key, children, path);
  77722. if (p2.length) {
  77723. return p2;
  77724. }
  77725. }
  77726. path.pop();
  77727. }
  77728. return [];
  77729. },
  77730. _processLocalData() {
  77731. this._treeData = [];
  77732. this._extractTree(this.localdata, this._treeData);
  77733. var inputValue = this.dataValue;
  77734. if (inputValue === void 0) {
  77735. return;
  77736. }
  77737. if (Array.isArray(inputValue)) {
  77738. inputValue = inputValue[inputValue.length - 1];
  77739. if (typeof inputValue === "object" && inputValue[this.map.value]) {
  77740. inputValue = inputValue[this.map.value];
  77741. }
  77742. }
  77743. this.selected = this._findNodePath(inputValue, this.localdata);
  77744. }
  77745. }
  77746. };
  77747. const _sfc_main$q = {
  77748. name: "UniDataPickerView",
  77749. emits: ["nodeclick", "change", "datachange", "update:modelValue"],
  77750. mixins: [dataPicker],
  77751. props: {
  77752. managedMode: {
  77753. type: Boolean,
  77754. default: false
  77755. },
  77756. ellipsis: {
  77757. type: Boolean,
  77758. default: true
  77759. }
  77760. },
  77761. data() {
  77762. return {};
  77763. },
  77764. created() {
  77765. if (this.managedMode) {
  77766. return;
  77767. }
  77768. this.$nextTick(() => {
  77769. this.load();
  77770. });
  77771. },
  77772. methods: {
  77773. onPropsChange() {
  77774. this._treeData = [];
  77775. this.selectedIndex = 0;
  77776. this.load();
  77777. },
  77778. load() {
  77779. if (this.isLocaldata) {
  77780. this.loadData();
  77781. } else if (this.dataValue.length) {
  77782. this.getTreePath((res) => {
  77783. this.loadData();
  77784. });
  77785. }
  77786. },
  77787. handleSelect(index2) {
  77788. this.selectedIndex = index2;
  77789. },
  77790. handleNodeClick(item, i2, j2) {
  77791. if (item.disable) {
  77792. return;
  77793. }
  77794. const node2 = this.dataList[i2][j2];
  77795. const text = node2[this.map.text];
  77796. const value = node2[this.map.value];
  77797. if (i2 < this.selected.length - 1) {
  77798. this.selected.splice(i2, this.selected.length - i2);
  77799. this.selected.push({
  77800. text,
  77801. value
  77802. });
  77803. } else if (i2 === this.selected.length - 1) {
  77804. this.selected.splice(i2, 1, {
  77805. text,
  77806. value
  77807. });
  77808. }
  77809. if (node2.isleaf) {
  77810. this.onSelectedChange(node2, node2.isleaf);
  77811. return;
  77812. }
  77813. const {
  77814. isleaf,
  77815. hasNodes
  77816. } = this._updateBindData();
  77817. if (!this._isTreeView() && !hasNodes) {
  77818. this.onSelectedChange(node2, true);
  77819. return;
  77820. }
  77821. if (this.isLocaldata && (!hasNodes || isleaf)) {
  77822. this.onSelectedChange(node2, true);
  77823. return;
  77824. }
  77825. if (!isleaf && !hasNodes) {
  77826. this._loadNodeData((data) => {
  77827. if (!data.length) {
  77828. node2.isleaf = true;
  77829. } else {
  77830. this._treeData.push(...data);
  77831. this._updateBindData(node2);
  77832. }
  77833. this.onSelectedChange(node2, node2.isleaf);
  77834. }, this._nodeWhere());
  77835. return;
  77836. }
  77837. this.onSelectedChange(node2, false);
  77838. },
  77839. updateData(data) {
  77840. this._treeData = data.treeData;
  77841. this.selected = data.selected;
  77842. if (!this._treeData.length) {
  77843. this.loadData();
  77844. } else {
  77845. this._updateBindData();
  77846. }
  77847. },
  77848. onDataChange() {
  77849. this.$emit("datachange");
  77850. },
  77851. onSelectedChange(node2, isleaf) {
  77852. if (isleaf) {
  77853. this._dispatchEvent();
  77854. }
  77855. if (node2) {
  77856. this.$emit("nodeclick", node2);
  77857. }
  77858. },
  77859. _dispatchEvent() {
  77860. this.$emit("change", this.selected.slice(0));
  77861. }
  77862. }
  77863. };
  77864. function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
  77865. const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5);
  77866. return vue.openBlock(), vue.createElementBlock("view", { class: "uni-data-pickerview" }, [
  77867. vue.createElementVNode("scroll-view", {
  77868. class: "selected-area",
  77869. "scroll-x": "true",
  77870. "scroll-y": "false",
  77871. "show-scrollbar": false
  77872. }, [
  77873. vue.createElementVNode("view", { class: "selected-list" }, [
  77874. (vue.openBlock(true), vue.createElementBlock(
  77875. vue.Fragment,
  77876. null,
  77877. vue.renderList(_ctx.selected, (item, index2) => {
  77878. return vue.openBlock(), vue.createElementBlock(
  77879. vue.Fragment,
  77880. null,
  77881. [
  77882. item.text ? (vue.openBlock(), vue.createElementBlock("view", {
  77883. class: vue.normalizeClass(["selected-item", { "selected-item-active": index2 == _ctx.selectedIndex, "selected-item-text-overflow": $props.ellipsis }]),
  77884. key: index2,
  77885. onClick: ($event) => $options.handleSelect(index2)
  77886. }, [
  77887. vue.createElementVNode(
  77888. "text",
  77889. { class: "" },
  77890. vue.toDisplayString(item.text),
  77891. 1
  77892. /* TEXT */
  77893. )
  77894. ], 10, ["onClick"])) : vue.createCommentVNode("v-if", true)
  77895. ],
  77896. 64
  77897. /* STABLE_FRAGMENT */
  77898. );
  77899. }),
  77900. 256
  77901. /* UNKEYED_FRAGMENT */
  77902. ))
  77903. ])
  77904. ]),
  77905. vue.createElementVNode("view", { class: "tab-c" }, [
  77906. (vue.openBlock(true), vue.createElementBlock(
  77907. vue.Fragment,
  77908. null,
  77909. vue.renderList(_ctx.dataList, (child, i2) => {
  77910. return vue.openBlock(), vue.createElementBlock(
  77911. vue.Fragment,
  77912. null,
  77913. [
  77914. i2 == _ctx.selectedIndex ? (vue.openBlock(), vue.createElementBlock("scroll-view", {
  77915. class: "list",
  77916. key: i2,
  77917. "scroll-y": true
  77918. }, [
  77919. (vue.openBlock(true), vue.createElementBlock(
  77920. vue.Fragment,
  77921. null,
  77922. vue.renderList(child, (item, j2) => {
  77923. return vue.openBlock(), vue.createElementBlock("view", {
  77924. class: vue.normalizeClass(["item", { "is-disabled": !!item.disable }]),
  77925. key: j2,
  77926. onClick: ($event) => $options.handleNodeClick(item, i2, j2)
  77927. }, [
  77928. vue.createElementVNode(
  77929. "text",
  77930. { class: "item-text item-text-overflow" },
  77931. vue.toDisplayString(item[_ctx.map.text]),
  77932. 1
  77933. /* TEXT */
  77934. ),
  77935. _ctx.selected.length > i2 && item[_ctx.map.value] == _ctx.selected[i2].value ? (vue.openBlock(), vue.createElementBlock("view", {
  77936. key: 0,
  77937. class: "check"
  77938. })) : vue.createCommentVNode("v-if", true)
  77939. ], 10, ["onClick"]);
  77940. }),
  77941. 128
  77942. /* KEYED_FRAGMENT */
  77943. ))
  77944. ])) : vue.createCommentVNode("v-if", true)
  77945. ],
  77946. 64
  77947. /* STABLE_FRAGMENT */
  77948. );
  77949. }),
  77950. 256
  77951. /* UNKEYED_FRAGMENT */
  77952. )),
  77953. _ctx.loading ? (vue.openBlock(), vue.createElementBlock("view", {
  77954. key: 0,
  77955. class: "loading-cover"
  77956. }, [
  77957. vue.createVNode(_component_uni_load_more, {
  77958. class: "load-more",
  77959. contentText: _ctx.loadMore,
  77960. status: "loading"
  77961. }, null, 8, ["contentText"])
  77962. ])) : vue.createCommentVNode("v-if", true),
  77963. _ctx.errorMessage ? (vue.openBlock(), vue.createElementBlock("view", {
  77964. key: 1,
  77965. class: "error-message"
  77966. }, [
  77967. vue.createElementVNode(
  77968. "text",
  77969. { class: "error-text" },
  77970. vue.toDisplayString(_ctx.errorMessage),
  77971. 1
  77972. /* TEXT */
  77973. )
  77974. ])) : vue.createCommentVNode("v-if", true)
  77975. ])
  77976. ]);
  77977. }
  77978. const DataPickerView = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$p], ["__scopeId", "data-v-91ec6a82"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-data-picker/components/uni-data-pickerview/uni-data-pickerview.vue"]]);
  77979. const _sfc_main$p = {
  77980. name: "UniDataPicker",
  77981. emits: ["popupopened", "popupclosed", "nodeclick", "input", "change", "update:modelValue"],
  77982. mixins: [dataPicker],
  77983. components: {
  77984. DataPickerView
  77985. },
  77986. props: {
  77987. options: {
  77988. type: [Object, Array],
  77989. default() {
  77990. return {};
  77991. }
  77992. },
  77993. popupTitle: {
  77994. type: String,
  77995. default: "请选择"
  77996. },
  77997. placeholder: {
  77998. type: String,
  77999. default: "请选择"
  78000. },
  78001. heightMobile: {
  78002. type: String,
  78003. default: ""
  78004. },
  78005. readonly: {
  78006. type: Boolean,
  78007. default: false
  78008. },
  78009. clearIcon: {
  78010. type: Boolean,
  78011. default: true
  78012. },
  78013. border: {
  78014. type: Boolean,
  78015. default: true
  78016. },
  78017. split: {
  78018. type: String,
  78019. default: "/"
  78020. },
  78021. ellipsis: {
  78022. type: Boolean,
  78023. default: true
  78024. }
  78025. },
  78026. data() {
  78027. return {
  78028. isOpened: false,
  78029. inputSelected: []
  78030. };
  78031. },
  78032. created() {
  78033. this.form = this.getForm("uniForms");
  78034. this.formItem = this.getForm("uniFormsItem");
  78035. if (this.formItem) {
  78036. if (this.formItem.name) {
  78037. this.rename = this.formItem.name;
  78038. this.form.inputChildrens.push(this);
  78039. }
  78040. }
  78041. this.$nextTick(() => {
  78042. this.load();
  78043. });
  78044. },
  78045. methods: {
  78046. clear() {
  78047. this.inputSelected.splice(0);
  78048. this._dispatchEvent([]);
  78049. },
  78050. onPropsChange() {
  78051. this._treeData = [];
  78052. this.selectedIndex = 0;
  78053. this.load();
  78054. },
  78055. load() {
  78056. if (this.readonly) {
  78057. this._processReadonly(this.localdata, this.dataValue);
  78058. return;
  78059. }
  78060. if (this.isLocaldata) {
  78061. this.loadData();
  78062. this.inputSelected = this.selected.slice(0);
  78063. } else if (!this.parentField && !this.selfField && this.hasValue) {
  78064. this.getNodeData(() => {
  78065. this.inputSelected = this.selected.slice(0);
  78066. });
  78067. } else if (this.hasValue) {
  78068. this.getTreePath(() => {
  78069. this.inputSelected = this.selected.slice(0);
  78070. });
  78071. }
  78072. },
  78073. getForm(name2 = "uniForms") {
  78074. let parent2 = this.$parent;
  78075. let parentName = parent2.$options.name;
  78076. while (parentName !== name2) {
  78077. parent2 = parent2.$parent;
  78078. if (!parent2)
  78079. return false;
  78080. parentName = parent2.$options.name;
  78081. }
  78082. return parent2;
  78083. },
  78084. show() {
  78085. this.isOpened = true;
  78086. setTimeout(() => {
  78087. this.$refs.pickerView.updateData({
  78088. treeData: this._treeData,
  78089. selected: this.selected,
  78090. selectedIndex: this.selectedIndex
  78091. });
  78092. }, 200);
  78093. this.$emit("popupopened");
  78094. },
  78095. hide() {
  78096. this.isOpened = false;
  78097. this.$emit("popupclosed");
  78098. },
  78099. handleInput() {
  78100. if (this.readonly) {
  78101. return;
  78102. }
  78103. this.show();
  78104. },
  78105. handleClose(e2) {
  78106. this.hide();
  78107. },
  78108. onnodeclick(e2) {
  78109. this.$emit("nodeclick", e2);
  78110. },
  78111. ondatachange(e2) {
  78112. this._treeData = this.$refs.pickerView._treeData;
  78113. },
  78114. onchange(e2) {
  78115. this.hide();
  78116. this.inputSelected = e2;
  78117. this._dispatchEvent(e2);
  78118. },
  78119. _processReadonly(dataList, value) {
  78120. var isTree = dataList.findIndex((item2) => {
  78121. return item2.children;
  78122. });
  78123. if (isTree > -1) {
  78124. let inputValue;
  78125. if (Array.isArray(value)) {
  78126. inputValue = value[value.length - 1];
  78127. if (typeof inputValue === "object" && inputValue.value) {
  78128. inputValue = inputValue.value;
  78129. }
  78130. } else {
  78131. inputValue = value;
  78132. }
  78133. this.inputSelected = this._findNodePath(inputValue, this.localdata);
  78134. return;
  78135. }
  78136. if (!this.hasValue) {
  78137. this.inputSelected = [];
  78138. return;
  78139. }
  78140. let result2 = [];
  78141. for (let i2 = 0; i2 < value.length; i2++) {
  78142. var val = value[i2];
  78143. var item = dataList.find((v2) => {
  78144. return v2.value == val;
  78145. });
  78146. if (item) {
  78147. result2.push(item);
  78148. }
  78149. }
  78150. if (result2.length) {
  78151. this.inputSelected = result2;
  78152. }
  78153. },
  78154. _filterForArray(data, valueArray) {
  78155. var result2 = [];
  78156. for (let i2 = 0; i2 < valueArray.length; i2++) {
  78157. var value = valueArray[i2];
  78158. var found = data.find((item) => {
  78159. return item.value == value;
  78160. });
  78161. if (found) {
  78162. result2.push(found);
  78163. }
  78164. }
  78165. return result2;
  78166. },
  78167. _dispatchEvent(selected) {
  78168. let item = {};
  78169. if (selected.length) {
  78170. var value = new Array(selected.length);
  78171. for (var i2 = 0; i2 < selected.length; i2++) {
  78172. value[i2] = selected[i2].value;
  78173. }
  78174. item = selected[selected.length - 1];
  78175. } else {
  78176. item.value = "";
  78177. }
  78178. if (this.formItem) {
  78179. this.formItem.setValue(item.value);
  78180. }
  78181. this.$emit("input", item.value);
  78182. this.$emit("update:modelValue", item.value);
  78183. this.$emit("change", {
  78184. detail: {
  78185. value: selected
  78186. }
  78187. });
  78188. }
  78189. }
  78190. };
  78191. function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
  78192. const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5);
  78193. const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_1$b);
  78194. const _component_data_picker_view = vue.resolveComponent("data-picker-view");
  78195. return vue.openBlock(), vue.createElementBlock("view", { class: "uni-data-tree" }, [
  78196. vue.createElementVNode("view", {
  78197. class: "uni-data-tree-input",
  78198. onClick: _cache[1] || (_cache[1] = (...args) => $options.handleInput && $options.handleInput(...args))
  78199. }, [
  78200. vue.renderSlot(_ctx.$slots, "default", {
  78201. options: $props.options,
  78202. data: $data.inputSelected,
  78203. error: _ctx.errorMessage
  78204. }, () => [
  78205. vue.createElementVNode(
  78206. "view",
  78207. {
  78208. class: vue.normalizeClass(["input-value", { "input-value-border": $props.border }])
  78209. },
  78210. [
  78211. _ctx.errorMessage ? (vue.openBlock(), vue.createElementBlock(
  78212. "text",
  78213. {
  78214. key: 0,
  78215. class: "selected-area error-text"
  78216. },
  78217. vue.toDisplayString(_ctx.errorMessage),
  78218. 1
  78219. /* TEXT */
  78220. )) : _ctx.loading && !$data.isOpened ? (vue.openBlock(), vue.createElementBlock("view", {
  78221. key: 1,
  78222. class: "selected-area"
  78223. }, [
  78224. vue.createVNode(_component_uni_load_more, {
  78225. class: "load-more",
  78226. contentText: _ctx.loadMore,
  78227. status: "loading"
  78228. }, null, 8, ["contentText"])
  78229. ])) : $data.inputSelected.length ? (vue.openBlock(), vue.createElementBlock("scroll-view", {
  78230. key: 2,
  78231. class: "selected-area",
  78232. "scroll-x": "true"
  78233. }, [
  78234. vue.createElementVNode("view", { class: "selected-list" }, [
  78235. (vue.openBlock(true), vue.createElementBlock(
  78236. vue.Fragment,
  78237. null,
  78238. vue.renderList($data.inputSelected, (item, index2) => {
  78239. return vue.openBlock(), vue.createElementBlock("view", {
  78240. class: "selected-item",
  78241. key: index2
  78242. }, [
  78243. vue.createElementVNode(
  78244. "text",
  78245. null,
  78246. vue.toDisplayString(item.text),
  78247. 1
  78248. /* TEXT */
  78249. ),
  78250. index2 < $data.inputSelected.length - 1 ? (vue.openBlock(), vue.createElementBlock(
  78251. "text",
  78252. {
  78253. key: 0,
  78254. class: "input-split-line"
  78255. },
  78256. vue.toDisplayString($props.split),
  78257. 1
  78258. /* TEXT */
  78259. )) : vue.createCommentVNode("v-if", true)
  78260. ]);
  78261. }),
  78262. 128
  78263. /* KEYED_FRAGMENT */
  78264. ))
  78265. ])
  78266. ])) : (vue.openBlock(), vue.createElementBlock(
  78267. "text",
  78268. {
  78269. key: 3,
  78270. class: "selected-area placeholder"
  78271. },
  78272. vue.toDisplayString($props.placeholder),
  78273. 1
  78274. /* TEXT */
  78275. )),
  78276. $props.clearIcon && !$props.readonly && $data.inputSelected.length ? (vue.openBlock(), vue.createElementBlock("view", {
  78277. key: 4,
  78278. class: "icon-clear",
  78279. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.clear && $options.clear(...args), ["stop"]))
  78280. }, [
  78281. vue.createVNode(_component_uni_icons, {
  78282. type: "clear",
  78283. color: "#e1e1e1",
  78284. size: "14"
  78285. })
  78286. ])) : vue.createCommentVNode("v-if", true),
  78287. (!$props.clearIcon || !$data.inputSelected.length) && !$props.readonly ? (vue.openBlock(), vue.createElementBlock("view", {
  78288. key: 5,
  78289. class: "arrow-area"
  78290. }, [
  78291. vue.createElementVNode("view", { class: "input-arrow" })
  78292. ])) : vue.createCommentVNode("v-if", true)
  78293. ],
  78294. 2
  78295. /* CLASS */
  78296. )
  78297. ], true)
  78298. ]),
  78299. $data.isOpened ? (vue.openBlock(), vue.createElementBlock("view", {
  78300. key: 0,
  78301. class: "uni-data-tree-cover",
  78302. onClick: _cache[2] || (_cache[2] = (...args) => $options.handleClose && $options.handleClose(...args))
  78303. })) : vue.createCommentVNode("v-if", true),
  78304. $data.isOpened ? (vue.openBlock(), vue.createElementBlock("view", {
  78305. key: 1,
  78306. class: "uni-data-tree-dialog"
  78307. }, [
  78308. vue.createElementVNode("view", { class: "uni-popper__arrow" }),
  78309. vue.createElementVNode("view", { class: "dialog-caption" }, [
  78310. vue.createElementVNode("view", { class: "title-area" }, [
  78311. vue.createElementVNode(
  78312. "text",
  78313. { class: "dialog-title" },
  78314. vue.toDisplayString($props.popupTitle),
  78315. 1
  78316. /* TEXT */
  78317. )
  78318. ]),
  78319. vue.createElementVNode("view", {
  78320. class: "dialog-close",
  78321. onClick: _cache[3] || (_cache[3] = (...args) => $options.handleClose && $options.handleClose(...args))
  78322. }, [
  78323. vue.createElementVNode("view", {
  78324. class: "dialog-close-plus",
  78325. "data-id": "close"
  78326. }),
  78327. vue.createElementVNode("view", {
  78328. class: "dialog-close-plus dialog-close-rotate",
  78329. "data-id": "close"
  78330. })
  78331. ])
  78332. ]),
  78333. vue.createVNode(_component_data_picker_view, {
  78334. class: "picker-view",
  78335. ref: "pickerView",
  78336. modelValue: _ctx.dataValue,
  78337. "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => _ctx.dataValue = $event),
  78338. localdata: _ctx.localdata,
  78339. preload: _ctx.preload,
  78340. collection: _ctx.collection,
  78341. field: _ctx.field,
  78342. orderby: _ctx.orderby,
  78343. where: _ctx.where,
  78344. "step-searh": _ctx.stepSearh,
  78345. "self-field": _ctx.selfField,
  78346. "parent-field": _ctx.parentField,
  78347. "managed-mode": true,
  78348. map: _ctx.map,
  78349. ellipsis: $props.ellipsis,
  78350. onChange: $options.onchange,
  78351. onDatachange: $options.ondatachange,
  78352. onNodeclick: $options.onnodeclick
  78353. }, null, 8, ["modelValue", "localdata", "preload", "collection", "field", "orderby", "where", "step-searh", "self-field", "parent-field", "map", "ellipsis", "onChange", "onDatachange", "onNodeclick"])
  78354. ])) : vue.createCommentVNode("v-if", true)
  78355. ]);
  78356. }
  78357. const __easycom_3$1 = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$o], ["__scopeId", "data-v-2653531e"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.vue"]]);
  78358. const placeholderStyle = "color:#BBBBBB;font-size:28rpx;line-height:normal";
  78359. const _sfc_main$o = {
  78360. __name: "merchant",
  78361. setup(__props, { expose: __expose }) {
  78362. __expose();
  78363. const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo);
  78364. const state = vue.reactive({
  78365. canUse: true,
  78366. //用户是否可以打开页面true 可以,false不行
  78367. userApplyStatus: false,
  78368. //用户是否已经申请过false未无 true为有
  78369. formStatus: false,
  78370. // 当前表单是否可以修改
  78371. changeIng: false,
  78372. //当前是否在修改
  78373. model: {
  78374. checkStatus: void 0,
  78375. id: void 0,
  78376. name: void 0,
  78377. status: void 0,
  78378. description: void 0,
  78379. contact: void 0,
  78380. address: void 0,
  78381. contactNumber: void 0,
  78382. website: void 0,
  78383. createTime: void 0,
  78384. complaintsHotline: void 0,
  78385. customerServiceHotline: void 0,
  78386. email: void 0,
  78387. businessLicensePicture: void 0,
  78388. expireTime: void 0,
  78389. areaId: void 0,
  78390. accountName: void 0,
  78391. accountNumber: void 0,
  78392. bankName: void 0,
  78393. logoUrl: void 0,
  78394. brandLicensing: void 0,
  78395. otherCertificate: [],
  78396. legalPerson: void 0,
  78397. legalPersonNumber: void 0,
  78398. identityCardFront: void 0,
  78399. identityCardReverseSide: void 0
  78400. },
  78401. areaIdError: "",
  78402. businessLicensePictureError: "",
  78403. brandLicensingError: "",
  78404. identityCardFrontError: "",
  78405. identityCardReverseSideError: "",
  78406. rules: {
  78407. name: {
  78408. rules: [{
  78409. required: true,
  78410. errorMessage: t$6("merchant.merchant_name_required")
  78411. }]
  78412. },
  78413. // description: {
  78414. // rules: [{
  78415. // required: true,
  78416. // errorMessage: t('merchant.introduction_required'),
  78417. // }, ],
  78418. // },
  78419. contact: {
  78420. rules: [{
  78421. required: true,
  78422. errorMessage: t$6("merchant.contact_required")
  78423. }]
  78424. },
  78425. contactNumber: {
  78426. rules: [{
  78427. required: true,
  78428. errorMessage: t$6("merchant.contact_phone_required")
  78429. }]
  78430. },
  78431. // customerServiceHotline: {
  78432. // rules: [{
  78433. // required: true,
  78434. // errorMessage: t('merchant.customer_service_phone_required'),
  78435. // }, ],
  78436. // },
  78437. // email,
  78438. // legalPerson: {
  78439. // rules: [{
  78440. // required: true,
  78441. // errorMessage: t('merchant.legal_person_required'),
  78442. // }, ],
  78443. // },
  78444. // legalPersonNumber: {
  78445. // rules: [{
  78446. // required: true,
  78447. // errorMessage: t('merchant.legal_person_phone_required'),
  78448. // }, ],
  78449. // },
  78450. accountName: {
  78451. rules: [{
  78452. required: true,
  78453. errorMessage: t$6("merchant.account_name_required")
  78454. }]
  78455. },
  78456. accountNumber: {
  78457. rules: [{
  78458. required: true,
  78459. errorMessage: t$6("merchant.account_number_required")
  78460. }]
  78461. },
  78462. bankName: {
  78463. rules: [{
  78464. required: true,
  78465. errorMessage: t$6("merchant.bank_required")
  78466. }]
  78467. }
  78468. }
  78469. });
  78470. const statusName = vue.computed(() => {
  78471. const status = state.model.checkStatus;
  78472. if (status === 0) {
  78473. return t$6("merchant.under_review");
  78474. } else if (status === 1) {
  78475. return t$6("merchant.approved");
  78476. } else if (status === 2) {
  78477. return t$6("merchant.rejected");
  78478. } else {
  78479. return "";
  78480. }
  78481. });
  78482. const downloadTemplate = () => {
  78483. const fileUrl = "https://zxgz.newfeifan.cn/static/file/%E9%9D%9E%E7%8B%AC%E5%AE%B6%E5%93%81%E7%89%8C%E6%8E%88%E6%9D%83%E4%B9%A6.docx";
  78484. const a2 = document.createElement("a");
  78485. a2.href = fileUrl;
  78486. a2.download = t$6("merchant.non_exclusive_authorization") + ".docx";
  78487. document.body.appendChild(a2);
  78488. a2.click();
  78489. document.body.removeChild(a2);
  78490. };
  78491. const checkNumber = () => {
  78492. SaleApi.checkContactNumber({
  78493. mobile: state.model.contactNumber
  78494. });
  78495. };
  78496. const merchantFormRef = vue.ref(null);
  78497. const onSubmit = async () => {
  78498. const validate = await vue.unref(merchantFormRef).validate().catch((error2) => {
  78499. formatAppLog("log", "at pages/public/merchant.vue:341", "error: ", error2);
  78500. });
  78501. if (!validate) {
  78502. return;
  78503. }
  78504. if (!state.model.businessLicensePicture) {
  78505. state.businessLicensePictureError = t$6("merchant.upload_business_license");
  78506. return;
  78507. }
  78508. if (!state.model.brandLicensing) {
  78509. state.brandLicensingError = t$6("merchant.upload_brand_authorization");
  78510. return;
  78511. }
  78512. const {
  78513. data,
  78514. code: code2
  78515. } = await SaleApi.createMerchant(state.model);
  78516. if (code2 === 0) {
  78517. await getInfo2();
  78518. }
  78519. };
  78520. const onChange = () => {
  78521. state.formStatus = false;
  78522. state.changeIng = true;
  78523. };
  78524. const onCancel = () => {
  78525. state.formStatus = true;
  78526. state.changeIng = false;
  78527. };
  78528. const openList = () => {
  78529. sheep$1.$router.go("/pages/public/merchantApplyList", {
  78530. merchantApplyId: state.model.id
  78531. });
  78532. };
  78533. const onSave = async () => {
  78534. const validate = await vue.unref(merchantFormRef).validate().catch((error2) => {
  78535. formatAppLog("log", "at pages/public/merchant.vue:398", "error: ", error2);
  78536. });
  78537. if (!validate) {
  78538. return;
  78539. }
  78540. const {
  78541. data,
  78542. code: code2
  78543. } = await SaleApi.updateMerchant(state.model);
  78544. if (code2 === 0) {
  78545. state.formStatus = true;
  78546. state.changeIng = false;
  78547. await getInfo2();
  78548. }
  78549. };
  78550. const areaTree = vue.ref([]);
  78551. function format2(data) {
  78552. return data.map((item) => ({
  78553. text: item.name,
  78554. // 显示的文本
  78555. value: item.id,
  78556. // 值
  78557. children: item.children.length ? format2(item.children) : null
  78558. // 子项
  78559. }));
  78560. }
  78561. const getInfo2 = async () => {
  78562. const {
  78563. data,
  78564. code: code2
  78565. } = await SaleApi.getMerchant();
  78566. if (code2 === 0 && data) {
  78567. state.model = data;
  78568. state.userApplyStatus = true;
  78569. state.formStatus = true;
  78570. } else {
  78571. state.userApplyStatus = false;
  78572. state.formStatus = false;
  78573. }
  78574. };
  78575. const isLogin = vue.computed(() => sheep$1.$store("user").isLogin);
  78576. vue.watch(
  78577. () => isLogin.value,
  78578. (newVal) => {
  78579. if (newVal) {
  78580. window.location.reload();
  78581. }
  78582. },
  78583. {
  78584. deep: true
  78585. // 深度监听
  78586. }
  78587. );
  78588. onLoad(async (options2) => {
  78589. if (!isLogin.value) {
  78590. showAuthModal();
  78591. } else {
  78592. await SaleApi.checkSystemUser().then((res) => {
  78593. formatAppLog("log", "at pages/public/merchant.vue:463", !res.data);
  78594. state.canUse = !res.data;
  78595. });
  78596. await AreaApi.getAreaTree().then((res) => {
  78597. areaTree.value = format2(res.data);
  78598. });
  78599. await getInfo2();
  78600. }
  78601. });
  78602. const __returned__ = { userInfo: userInfo2, state, placeholderStyle, statusName, downloadTemplate, checkNumber, merchantFormRef, onSubmit, onChange, onCancel, openList, onSave, areaTree, format: format2, getInfo: getInfo2, isLogin, computed: vue.computed, reactive: vue.reactive, onBeforeMount: vue.onBeforeMount, ref: vue.ref, unref: vue.unref, watch: vue.watch, get sheep() {
  78603. return sheep$1;
  78604. }, get clone() {
  78605. return lodashExports.clone;
  78606. }, get onLoad() {
  78607. return onLoad;
  78608. }, get SaleApi() {
  78609. return SaleApi;
  78610. }, get AreaApi() {
  78611. return AreaApi;
  78612. }, get email() {
  78613. return email;
  78614. }, get showAuthModal() {
  78615. return showAuthModal;
  78616. }, get t() {
  78617. return t$6;
  78618. } };
  78619. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  78620. return __returned__;
  78621. }
  78622. };
  78623. function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
  78624. const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l);
  78625. const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9);
  78626. const _component_s_uploader = resolveEasycom(vue.resolveDynamicComponent("s-uploader"), __easycom_3$4);
  78627. const _component_uni_data_picker = resolveEasycom(vue.resolveDynamicComponent("uni-data-picker"), __easycom_3$1);
  78628. const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7);
  78629. const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9);
  78630. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  78631. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  78632. class: "set-wrap",
  78633. title: $setup.t("merchant.merchant_registration"),
  78634. bgStyle: { color: "#FFF" }
  78635. }, {
  78636. default: vue.withCtx(() => [
  78637. $setup.state.canUse ? (vue.openBlock(), vue.createElementBlock(
  78638. vue.Fragment,
  78639. { key: 0 },
  78640. [
  78641. vue.createVNode(_component_uni_forms, {
  78642. model: $setup.state.model,
  78643. rules: $setup.state.rules,
  78644. validateTrigger: "bind",
  78645. labelPosition: "left",
  78646. border: "",
  78647. class: "form-box",
  78648. labelWidth: "200",
  78649. ref: "merchantFormRef"
  78650. }, {
  78651. default: vue.withCtx(() => [
  78652. vue.createElementVNode("view", { class: "bg-white ss-p-x-30" }, [
  78653. vue.createVNode(_component_uni_forms_item, {
  78654. name: "name",
  78655. label: $setup.t("merchant.merchant_name"),
  78656. required: !$setup.state.formStatus
  78657. }, {
  78658. default: vue.withCtx(() => [
  78659. vue.createVNode(_component_uni_easyinput, {
  78660. modelValue: $setup.state.model.name,
  78661. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.state.model.name = $event),
  78662. type: "name",
  78663. ":placeholder": $setup.t("merchant.merchant_name"),
  78664. inputBorder: false,
  78665. placeholderStyle: $setup.placeholderStyle,
  78666. clearable: false,
  78667. disabled: $setup.state.formStatus
  78668. }, null, 8, ["modelValue", ":placeholder", "disabled"])
  78669. ]),
  78670. _: 1
  78671. /* STABLE */
  78672. }, 8, ["label", "required"]),
  78673. vue.createVNode(_component_uni_forms_item, {
  78674. name: "contact",
  78675. label: $setup.t("merchant.contact_person"),
  78676. required: !$setup.state.formStatus
  78677. }, {
  78678. default: vue.withCtx(() => [
  78679. vue.createVNode(_component_uni_easyinput, {
  78680. modelValue: $setup.state.model.contact,
  78681. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.model.contact = $event),
  78682. type: "contact",
  78683. placeholder: $setup.t("merchant.enter_contact_person"),
  78684. inputBorder: false,
  78685. placeholderStyle: $setup.placeholderStyle,
  78686. clearable: false,
  78687. disabled: $setup.state.formStatus
  78688. }, null, 8, ["modelValue", "placeholder", "disabled"])
  78689. ]),
  78690. _: 1
  78691. /* STABLE */
  78692. }, 8, ["label", "required"]),
  78693. vue.createVNode(_component_uni_forms_item, {
  78694. name: "contactNumber",
  78695. label: $setup.t("merchant.contact_phone"),
  78696. required: !$setup.state.formStatus
  78697. }, {
  78698. default: vue.withCtx(() => [
  78699. vue.createVNode(_component_uni_easyinput, {
  78700. modelValue: $setup.state.model.contactNumber,
  78701. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.model.contactNumber = $event),
  78702. type: "contactNumber",
  78703. placeholder: $setup.t("merchant.enter_contact_phone"),
  78704. inputBorder: false,
  78705. placeholderStyle: $setup.placeholderStyle,
  78706. clearable: false,
  78707. disabled: $setup.state.formStatus
  78708. }, null, 8, ["modelValue", "placeholder", "disabled"])
  78709. ]),
  78710. _: 1
  78711. /* STABLE */
  78712. }, 8, ["label", "required"]),
  78713. vue.createVNode(_component_uni_forms_item, {
  78714. name: "legalPerson",
  78715. label: $setup.t("merchant.legal_person"),
  78716. required: !$setup.state.formStatus
  78717. }, {
  78718. default: vue.withCtx(() => [
  78719. vue.createVNode(_component_uni_easyinput, {
  78720. modelValue: $setup.state.model.legalPerson,
  78721. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.state.model.legalPerson = $event),
  78722. type: "legalPerson",
  78723. placeholder: $setup.t("merchant.enter_legal_person"),
  78724. inputBorder: false,
  78725. placeholderStyle: $setup.placeholderStyle,
  78726. clearable: false,
  78727. disabled: $setup.state.formStatus
  78728. }, null, 8, ["modelValue", "placeholder", "disabled"])
  78729. ]),
  78730. _: 1
  78731. /* STABLE */
  78732. }, 8, ["label", "required"]),
  78733. vue.createVNode(_component_uni_forms_item, {
  78734. name: "legalPersonNumber",
  78735. label: $setup.t("merchant.legal_person_phone"),
  78736. required: !$setup.state.formStatus
  78737. }, {
  78738. default: vue.withCtx(() => [
  78739. vue.createVNode(_component_uni_easyinput, {
  78740. modelValue: $setup.state.model.legalPersonNumber,
  78741. "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.state.model.legalPersonNumber = $event),
  78742. type: "legalPersonNumber",
  78743. placeholder: $setup.t("merchant.enter_legal_person_phone"),
  78744. inputBorder: false,
  78745. placeholderStyle: $setup.placeholderStyle,
  78746. clearable: false,
  78747. disabled: $setup.state.formStatus
  78748. }, null, 8, ["modelValue", "placeholder", "disabled"])
  78749. ]),
  78750. _: 1
  78751. /* STABLE */
  78752. }, 8, ["label", "required"]),
  78753. vue.createVNode(_component_uni_forms_item, {
  78754. name: "identityCardFront",
  78755. label: $setup.t("merchant.legal_person_id_front"),
  78756. required: !$setup.state.formStatus,
  78757. errorMessage: $setup.state.identityCardFrontError
  78758. }, {
  78759. default: vue.withCtx(() => [
  78760. vue.createVNode(_component_s_uploader, {
  78761. url: $setup.state.model.identityCardFront,
  78762. "onUpdate:url": _cache[5] || (_cache[5] = ($event) => $setup.state.model.identityCardFront = $event),
  78763. fileMediatype: "image",
  78764. limit: "1",
  78765. mode: "grid",
  78766. imageStyles: { width: "299rpx", height: "168rpx" },
  78767. readonly: $setup.state.formStatus
  78768. }, null, 8, ["url", "readonly"])
  78769. ]),
  78770. _: 1
  78771. /* STABLE */
  78772. }, 8, ["label", "required", "errorMessage"]),
  78773. vue.createVNode(_component_uni_forms_item, {
  78774. name: "identityCardReverseSide",
  78775. label: $setup.t("merchant.legal_person_id_back"),
  78776. required: !$setup.state.formStatus,
  78777. errorMessage: _ctx.identityCardReverseSideError
  78778. }, {
  78779. default: vue.withCtx(() => [
  78780. vue.createVNode(_component_s_uploader, {
  78781. url: $setup.state.model.identityCardReverseSide,
  78782. "onUpdate:url": _cache[6] || (_cache[6] = ($event) => $setup.state.model.identityCardReverseSide = $event),
  78783. fileMediatype: "image",
  78784. limit: "1",
  78785. mode: "grid",
  78786. imageStyles: { width: "299rpx", height: "168rpx" },
  78787. readonly: $setup.state.formStatus
  78788. }, null, 8, ["url", "readonly"])
  78789. ]),
  78790. _: 1
  78791. /* STABLE */
  78792. }, 8, ["label", "required", "errorMessage"]),
  78793. vue.createVNode(_component_uni_forms_item, {
  78794. name: "areaId",
  78795. label: $setup.t("merchant.location"),
  78796. required: !$setup.state.formStatus,
  78797. errorMessage: $setup.state.areaIdError
  78798. }, {
  78799. default: vue.withCtx(() => [
  78800. vue.createVNode(_component_uni_data_picker, {
  78801. modelValue: $setup.state.model.areaId,
  78802. "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $setup.state.model.areaId = $event),
  78803. localdata: $setup.areaTree,
  78804. readonly: $setup.state.formStatus
  78805. }, null, 8, ["modelValue", "localdata", "readonly"])
  78806. ]),
  78807. _: 1
  78808. /* STABLE */
  78809. }, 8, ["label", "required", "errorMessage"]),
  78810. vue.createVNode(_component_uni_forms_item, {
  78811. name: "email",
  78812. label: $setup.t("merchant.email"),
  78813. required: !$setup.state.formStatus
  78814. }, {
  78815. default: vue.withCtx(() => [
  78816. vue.createVNode(_component_uni_easyinput, {
  78817. modelValue: $setup.state.model.email,
  78818. "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $setup.state.model.email = $event),
  78819. type: "email",
  78820. placeholder: $setup.t("merchant.enter_email"),
  78821. inputBorder: false,
  78822. placeholderStyle: $setup.placeholderStyle,
  78823. clearable: false,
  78824. disabled: $setup.state.formStatus
  78825. }, null, 8, ["modelValue", "placeholder", "disabled"])
  78826. ]),
  78827. _: 1
  78828. /* STABLE */
  78829. }, 8, ["label", "required"]),
  78830. vue.createVNode(_component_uni_forms_item, {
  78831. name: "address",
  78832. label: $setup.t("merchant.office_address")
  78833. }, {
  78834. default: vue.withCtx(() => [
  78835. vue.createVNode(_component_uni_easyinput, {
  78836. modelValue: $setup.state.model.address,
  78837. "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $setup.state.model.address = $event),
  78838. type: "address",
  78839. placeholder: $setup.t("merchant.office_address"),
  78840. inputBorder: false,
  78841. placeholderStyle: $setup.placeholderStyle,
  78842. clearable: false,
  78843. disabled: $setup.state.formStatus
  78844. }, null, 8, ["modelValue", "placeholder", "disabled"])
  78845. ]),
  78846. _: 1
  78847. /* STABLE */
  78848. }, 8, ["label"]),
  78849. vue.createVNode(_component_uni_forms_item, {
  78850. name: "complaintsHotline",
  78851. label: $setup.t("merchant.rights_phone")
  78852. }, {
  78853. default: vue.withCtx(() => [
  78854. vue.createVNode(_component_uni_easyinput, {
  78855. modelValue: $setup.state.model.complaintsHotline,
  78856. "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => $setup.state.model.complaintsHotline = $event),
  78857. type: "complaintsHotline",
  78858. placeholder: $setup.t("merchant.enter_rights_phone"),
  78859. inputBorder: false,
  78860. placeholderStyle: $setup.placeholderStyle,
  78861. clearable: false,
  78862. disabled: $setup.state.formStatus
  78863. }, null, 8, ["modelValue", "placeholder", "disabled"])
  78864. ]),
  78865. _: 1
  78866. /* STABLE */
  78867. }, 8, ["label"]),
  78868. vue.createVNode(_component_uni_forms_item, {
  78869. name: "customerServiceHotline",
  78870. label: $setup.t("merchant.customer_service_phone"),
  78871. required: !$setup.state.formStatus
  78872. }, {
  78873. default: vue.withCtx(() => [
  78874. vue.createVNode(_component_uni_easyinput, {
  78875. modelValue: $setup.state.model.customerServiceHotline,
  78876. "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => $setup.state.model.customerServiceHotline = $event),
  78877. type: "customerServiceHotline",
  78878. placeholder: $setup.t("merchant.enter_customer_service_phone"),
  78879. inputBorder: false,
  78880. placeholderStyle: $setup.placeholderStyle,
  78881. clearable: false,
  78882. disabled: $setup.state.formStatus
  78883. }, null, 8, ["modelValue", "placeholder", "disabled"])
  78884. ]),
  78885. _: 1
  78886. /* STABLE */
  78887. }, 8, ["label", "required"]),
  78888. vue.createVNode(_component_uni_forms_item, {
  78889. name: "website",
  78890. label: $setup.t("merchant.website")
  78891. }, {
  78892. default: vue.withCtx(() => [
  78893. vue.createVNode(_component_uni_easyinput, {
  78894. modelValue: $setup.state.model.website,
  78895. "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => $setup.state.model.website = $event),
  78896. type: "website",
  78897. placeholder: $setup.t("merchant.enter_website"),
  78898. inputBorder: false,
  78899. placeholderStyle: $setup.placeholderStyle,
  78900. clearable: false,
  78901. disabled: $setup.state.formStatus
  78902. }, null, 8, ["modelValue", "placeholder", "disabled"])
  78903. ]),
  78904. _: 1
  78905. /* STABLE */
  78906. }, 8, ["label"]),
  78907. vue.createVNode(_component_uni_forms_item, {
  78908. name: "bankName",
  78909. label: $setup.t("merchant.bank"),
  78910. required: !$setup.state.formStatus
  78911. }, {
  78912. default: vue.withCtx(() => [
  78913. vue.createVNode(_component_uni_easyinput, {
  78914. modelValue: $setup.state.model.bankName,
  78915. "onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => $setup.state.model.bankName = $event),
  78916. type: "bankName",
  78917. placeholder: $setup.t("merchant.enter_bank"),
  78918. inputBorder: false,
  78919. placeholderStyle: $setup.placeholderStyle,
  78920. clearable: false,
  78921. disabled: $setup.state.formStatus
  78922. }, null, 8, ["modelValue", "placeholder", "disabled"])
  78923. ]),
  78924. _: 1
  78925. /* STABLE */
  78926. }, 8, ["label", "required"]),
  78927. vue.createVNode(_component_uni_forms_item, {
  78928. name: "accountName",
  78929. label: $setup.t("merchant.account_name"),
  78930. required: !$setup.state.formStatus
  78931. }, {
  78932. default: vue.withCtx(() => [
  78933. vue.createVNode(_component_uni_easyinput, {
  78934. modelValue: $setup.state.model.accountName,
  78935. "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => $setup.state.model.accountName = $event),
  78936. type: "accountName",
  78937. placeholder: $setup.t("merchant.enter_account_name"),
  78938. inputBorder: false,
  78939. placeholderStyle: $setup.placeholderStyle,
  78940. clearable: false,
  78941. disabled: $setup.state.formStatus
  78942. }, null, 8, ["modelValue", "placeholder", "disabled"])
  78943. ]),
  78944. _: 1
  78945. /* STABLE */
  78946. }, 8, ["label", "required"]),
  78947. vue.createVNode(_component_uni_forms_item, {
  78948. name: "accountNumber",
  78949. label: $setup.t("merchant.account_number"),
  78950. required: !$setup.state.formStatus
  78951. }, {
  78952. default: vue.withCtx(() => [
  78953. vue.createVNode(_component_uni_easyinput, {
  78954. modelValue: $setup.state.model.accountNumber,
  78955. "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => $setup.state.model.accountNumber = $event),
  78956. type: "number",
  78957. placeholder: $setup.t("merchant.enter_account_number"),
  78958. inputBorder: false,
  78959. placeholderStyle: $setup.placeholderStyle,
  78960. clearable: false,
  78961. disabled: $setup.state.formStatus
  78962. }, null, 8, ["modelValue", "placeholder", "disabled"])
  78963. ]),
  78964. _: 1
  78965. /* STABLE */
  78966. }, 8, ["label", "required"]),
  78967. vue.createVNode(_component_uni_forms_item, {
  78968. name: "logoUrl",
  78969. label: "Logo"
  78970. }, {
  78971. default: vue.withCtx(() => [
  78972. vue.createVNode(_component_s_uploader, {
  78973. url: $setup.state.model.logoUrl,
  78974. "onUpdate:url": _cache[16] || (_cache[16] = ($event) => $setup.state.model.logoUrl = $event),
  78975. fileMediatype: "image",
  78976. limit: "1",
  78977. mode: "grid",
  78978. imageStyles: { width: "299rpx", height: "168rpx" },
  78979. readonly: $setup.state.formStatus
  78980. }, null, 8, ["url", "readonly"])
  78981. ]),
  78982. _: 1
  78983. /* STABLE */
  78984. }),
  78985. vue.createVNode(_component_uni_forms_item, {
  78986. name: "businessLicensePicture",
  78987. label: $setup.t("merchant.business_license"),
  78988. required: !$setup.state.formStatus,
  78989. errorMessage: $setup.state.businessLicensePictureError
  78990. }, {
  78991. default: vue.withCtx(() => [
  78992. vue.createVNode(_component_s_uploader, {
  78993. url: $setup.state.model.businessLicensePicture,
  78994. "onUpdate:url": _cache[17] || (_cache[17] = ($event) => $setup.state.model.businessLicensePicture = $event),
  78995. fileMediatype: "image",
  78996. limit: "1",
  78997. mode: "grid",
  78998. imageStyles: { width: "299rpx", height: "168rpx" },
  78999. readonly: $setup.state.formStatus
  79000. }, null, 8, ["url", "readonly"])
  79001. ]),
  79002. _: 1
  79003. /* STABLE */
  79004. }, 8, ["label", "required", "errorMessage"]),
  79005. vue.createVNode(_component_uni_forms_item, {
  79006. name: "brandLicensing",
  79007. label: $setup.t("merchant.brand_authorization"),
  79008. required: !$setup.state.formStatus,
  79009. errorMessage: $setup.state.brandLicensingError
  79010. }, {
  79011. default: vue.withCtx(() => [
  79012. vue.createVNode(_component_s_uploader, {
  79013. url: $setup.state.model.brandLicensing,
  79014. "onUpdate:url": _cache[18] || (_cache[18] = ($event) => $setup.state.model.brandLicensing = $event),
  79015. fileMediatype: "image",
  79016. limit: "1",
  79017. mode: "grid",
  79018. imageStyles: { width: "299rpx", height: "168rpx" },
  79019. readonly: $setup.state.formStatus
  79020. }, null, 8, ["url", "readonly"]),
  79021. !$setup.state.model.brandLicensing ? (vue.openBlock(), vue.createElementBlock(
  79022. "view",
  79023. {
  79024. key: 0,
  79025. class: "ss-m-t-20",
  79026. style: { "color": "var(--ui-BG-Main)" },
  79027. onClick: $setup.downloadTemplate
  79028. },
  79029. vue.toDisplayString($setup.t("merchant.download_template")),
  79030. 1
  79031. /* TEXT */
  79032. )) : vue.createCommentVNode("v-if", true)
  79033. ]),
  79034. _: 1
  79035. /* STABLE */
  79036. }, 8, ["label", "required", "errorMessage"]),
  79037. vue.createVNode(_component_uni_forms_item, {
  79038. name: "otherCertificate",
  79039. label: $setup.t("merchant.other_certificates")
  79040. }, {
  79041. default: vue.withCtx(() => [
  79042. vue.createVNode(_component_s_uploader, {
  79043. url: $setup.state.model.otherCertificate,
  79044. "onUpdate:url": _cache[19] || (_cache[19] = ($event) => $setup.state.model.otherCertificate = $event),
  79045. fileMediatype: "image",
  79046. limit: "9",
  79047. mode: "grid",
  79048. imageStyles: { width: "299rpx", height: "168rpx" },
  79049. readonly: $setup.state.formStatus
  79050. }, null, 8, ["url", "readonly"])
  79051. ]),
  79052. _: 1
  79053. /* STABLE */
  79054. }, 8, ["label"]),
  79055. vue.createVNode(_component_uni_forms_item, {
  79056. name: "description",
  79057. label: $setup.t("merchant.introduction"),
  79058. required: !$setup.state.formStatus
  79059. }, {
  79060. default: vue.withCtx(() => [
  79061. vue.createVNode(_component_uni_easyinput, {
  79062. modelValue: $setup.state.model.description,
  79063. "onUpdate:modelValue": _cache[20] || (_cache[20] = ($event) => $setup.state.model.description = $event),
  79064. type: "description",
  79065. placeholder: $setup.t("merchant.enter_introduction"),
  79066. inputBorder: false,
  79067. placeholderStyle: $setup.placeholderStyle,
  79068. clearable: false,
  79069. disabled: $setup.state.formStatus
  79070. }, null, 8, ["modelValue", "placeholder", "disabled"])
  79071. ]),
  79072. _: 1
  79073. /* STABLE */
  79074. }, 8, ["label", "required"]),
  79075. $setup.state.userApplyStatus ? (vue.openBlock(), vue.createBlock(_component_uni_forms_item, {
  79076. key: 0,
  79077. name: "description",
  79078. label: $setup.t("merchant.status")
  79079. }, {
  79080. default: vue.withCtx(() => [
  79081. vue.createVNode(_component_uni_easyinput, {
  79082. modelValue: $setup.statusName,
  79083. "onUpdate:modelValue": _cache[21] || (_cache[21] = ($event) => $setup.statusName = $event),
  79084. type: "description",
  79085. inputBorder: false,
  79086. placeholderStyle: $setup.placeholderStyle,
  79087. clearable: false,
  79088. disabled: true
  79089. }, null, 8, ["modelValue"])
  79090. ]),
  79091. _: 1
  79092. /* STABLE */
  79093. }, 8, ["label"])) : vue.createCommentVNode("v-if", true)
  79094. ])
  79095. ]),
  79096. _: 1
  79097. /* STABLE */
  79098. }, 8, ["model", "rules"]),
  79099. vue.createVNode(_component_su_fixed, {
  79100. bottom: "",
  79101. placeholder: "",
  79102. bg: "none"
  79103. }, {
  79104. default: vue.withCtx(() => [
  79105. vue.createElementVNode("view", { class: "footer-box ss-p-20 ss-flex" }, [
  79106. vue.createCommentVNode(" 审核中不允许改 "),
  79107. vue.createCommentVNode(" 通过后 变动 "),
  79108. vue.createCommentVNode(' {{"用户是否申请过:"+state.userApplyStatus}}\n {{"当前状态"+state.model.checkStatus}}\n {{"当前状态是否能改动:" + !state.formStatus}} '),
  79109. !$setup.state.userApplyStatus ? (vue.openBlock(), vue.createElementBlock(
  79110. "button",
  79111. {
  79112. key: 0,
  79113. class: "ss-rest-button btn",
  79114. onClick: $setup.onSubmit
  79115. },
  79116. vue.toDisplayString($setup.t("common.submit")),
  79117. 1
  79118. /* TEXT */
  79119. )) : vue.createCommentVNode("v-if", true),
  79120. [0].includes($setup.state.model.checkStatus) ? (vue.openBlock(), vue.createElementBlock(
  79121. "button",
  79122. {
  79123. key: 1,
  79124. class: "ss-rest-button btn"
  79125. },
  79126. vue.toDisplayString($setup.t("merchant.review_in_progress")),
  79127. 1
  79128. /* TEXT */
  79129. )) : vue.createCommentVNode("v-if", true),
  79130. [1, 2].includes($setup.state.model.checkStatus) ? (vue.openBlock(), vue.createElementBlock(
  79131. vue.Fragment,
  79132. { key: 2 },
  79133. [
  79134. !$setup.state.changeIng ? (vue.openBlock(), vue.createElementBlock(
  79135. vue.Fragment,
  79136. { key: 0 },
  79137. [
  79138. vue.createElementVNode(
  79139. "button",
  79140. {
  79141. class: "ss-rest-button btn-two",
  79142. onClick: $setup.openList
  79143. },
  79144. vue.toDisplayString($setup.t("merchant.review_records")),
  79145. 1
  79146. /* TEXT */
  79147. ),
  79148. vue.createElementVNode(
  79149. "button",
  79150. {
  79151. class: "ss-rest-button btn-two",
  79152. onClick: $setup.onChange
  79153. },
  79154. vue.toDisplayString($setup.t("merchant.changes")),
  79155. 1
  79156. /* TEXT */
  79157. )
  79158. ],
  79159. 64
  79160. /* STABLE_FRAGMENT */
  79161. )) : (vue.openBlock(), vue.createElementBlock(
  79162. vue.Fragment,
  79163. { key: 1 },
  79164. [
  79165. vue.createElementVNode(
  79166. "button",
  79167. {
  79168. class: "ss-rest-button btn-two",
  79169. onClick: $setup.onCancel
  79170. },
  79171. vue.toDisplayString($setup.t("common.cancel")),
  79172. 1
  79173. /* TEXT */
  79174. ),
  79175. vue.createElementVNode(
  79176. "button",
  79177. {
  79178. class: "ss-rest-button btn-two",
  79179. onClick: $setup.onSave
  79180. },
  79181. vue.toDisplayString($setup.t("merchant.save_and_submit")),
  79182. 1
  79183. /* TEXT */
  79184. )
  79185. ],
  79186. 64
  79187. /* STABLE_FRAGMENT */
  79188. ))
  79189. ],
  79190. 64
  79191. /* STABLE_FRAGMENT */
  79192. )) : vue.createCommentVNode("v-if", true)
  79193. ])
  79194. ]),
  79195. _: 1
  79196. /* STABLE */
  79197. })
  79198. ],
  79199. 64
  79200. /* STABLE_FRAGMENT */
  79201. )) : vue.createCommentVNode("v-if", true),
  79202. !$setup.state.canUse ? (vue.openBlock(), vue.createElementBlock(
  79203. "view",
  79204. {
  79205. key: 1,
  79206. style: { "position": "fixed", "top": "50%", "left": "50%", "transform": "translate(-50%,-50%)", "text-align": "center" }
  79207. },
  79208. vue.toDisplayString($setup.t("merchant.existing_merchant_alert", { user: $setup.userInfo.mobile })),
  79209. 1
  79210. /* TEXT */
  79211. )) : vue.createCommentVNode("v-if", true)
  79212. ]),
  79213. _: 1
  79214. /* STABLE */
  79215. }, 8, ["title"]);
  79216. }
  79217. const PagesPublicMerchant = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$n], ["__scopeId", "data-v-72155725"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/public/merchant.vue"]]);
  79218. const _sfc_main$n = {
  79219. __name: "merchantApplyList",
  79220. props: {
  79221. merchantApplyId: {
  79222. type: Number,
  79223. default: ""
  79224. }
  79225. },
  79226. setup(__props, { expose: __expose }) {
  79227. __expose();
  79228. const props = __props;
  79229. const userWallet = vue.computed(() => sheep$1.$store("user").userWallet);
  79230. const statusBarHeight = sheep$1.$platform.device.statusBarHeight * 2;
  79231. const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo);
  79232. const sys_navBar = sheep$1.$platform.navbar;
  79233. const state = vue.reactive({
  79234. currentTab: 0,
  79235. pagination: {
  79236. list: [],
  79237. total: 0,
  79238. pageSize: 10,
  79239. pageNo: 1
  79240. },
  79241. loadStatus: ""
  79242. });
  79243. async function getLogList() {
  79244. state.loadStatus = "loading";
  79245. let {
  79246. code: code2,
  79247. data
  79248. } = await SaleApi.getMerchantPage({
  79249. pageNo: state.pagination.pageNo,
  79250. pageSize: state.pagination.pageSize,
  79251. merchantApplyId: props.merchantApplyId
  79252. });
  79253. if (code2 !== 0) {
  79254. return;
  79255. }
  79256. let list = _$1.concat(state.pagination.list, data.list);
  79257. state.pagination.list = list;
  79258. state.pagination.total = data.total;
  79259. state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore";
  79260. }
  79261. onLoad(() => {
  79262. getLogList();
  79263. });
  79264. function onLoadMore() {
  79265. if (state.loadStatus === "noMore") {
  79266. return;
  79267. }
  79268. state.pagination.pageNo++;
  79269. getLogList();
  79270. }
  79271. onReachBottom(() => {
  79272. onLoadMore();
  79273. });
  79274. const __returned__ = { props, userWallet, statusBarHeight, userInfo: userInfo2, sys_navBar, state, getLogList, onLoadMore, get sheep() {
  79275. return sheep$1;
  79276. }, get onLoad() {
  79277. return onLoad;
  79278. }, get onReachBottom() {
  79279. return onReachBottom;
  79280. }, computed: vue.computed, reactive: vue.reactive, get points2point() {
  79281. return points2point;
  79282. }, get _() {
  79283. return _$1;
  79284. }, get dayjs() {
  79285. return dayjs;
  79286. }, get PointApi() {
  79287. return PointApi;
  79288. }, get resetPagination() {
  79289. return resetPagination;
  79290. }, get SaleApi() {
  79291. return SaleApi;
  79292. } };
  79293. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  79294. return __returned__;
  79295. }
  79296. };
  79297. function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
  79298. const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6);
  79299. const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5);
  79300. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  79301. return vue.openBlock(), vue.createElementBlock(
  79302. vue.Fragment,
  79303. null,
  79304. [
  79305. vue.createCommentVNode(" 商家申请审核记录 "),
  79306. vue.createVNode(_component_s_layout, {
  79307. class: "wallet-wrap",
  79308. bgStyle: { "backgroundColor": "#ffffff" },
  79309. title: "审核记录",
  79310. navbar: "normal"
  79311. }, {
  79312. default: vue.withCtx(() => [
  79313. vue.createElementVNode("view", { class: "model-box ss-flex-col" }, [
  79314. $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  79315. key: 0,
  79316. style: { "padding": "0 20rpx" }
  79317. }, [
  79318. vue.createElementVNode("view", {
  79319. class: "list-item ss-flex ss-col-center ss-row-between",
  79320. style: { "padding": "20rpx 0", "border-bottom": "1px solid #c4c4c4" }
  79321. }, [
  79322. vue.createElementVNode("view", {
  79323. class: "ss-flex ss-col-center",
  79324. style: { "width": "100%" }
  79325. }, [
  79326. vue.createElementVNode("view", {
  79327. class: "ss-flex ss-m-t-10",
  79328. style: { "flex-direction": "column", "align-items": "flex-start", "width": "100%" }
  79329. }, [
  79330. vue.createElementVNode("view", {
  79331. class: "name",
  79332. style: { "width": "100%" }
  79333. }, [
  79334. vue.createTextVNode(" 商户登陆地址: "),
  79335. vue.createElementVNode("text", {
  79336. class: "color-red",
  79337. onClick: _cache[0] || (_cache[0] = ($event) => $setup.sheep.$helper.copyText("https://sh.letcgo.com"))
  79338. }, "https://sh.letcgo.com")
  79339. ]),
  79340. vue.createElementVNode("view", {
  79341. class: "time",
  79342. style: { "width": "100%" }
  79343. }, " 默认管理员账号: 联络人手机号 "),
  79344. vue.createElementVNode("view", {
  79345. class: "time",
  79346. style: { "width": "100%" }
  79347. }, " 默认管理员密码: zxpt@联络人手机号 ")
  79348. ])
  79349. ])
  79350. ])
  79351. ])) : vue.createCommentVNode("v-if", true),
  79352. vue.createElementVNode(
  79353. "scroll-view",
  79354. {
  79355. class: "list-box",
  79356. "scroll-y": "true",
  79357. onTouchmove: _cache[3] || (_cache[3] = vue.withModifiers(() => {
  79358. }, ["stop"]))
  79359. },
  79360. [
  79361. $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  79362. key: 0,
  79363. style: { "padding": "20rpx", "padding-top": "0" }
  79364. }, [
  79365. (vue.openBlock(true), vue.createElementBlock(
  79366. vue.Fragment,
  79367. null,
  79368. vue.renderList($setup.state.pagination.list, (item, index2) => {
  79369. return vue.openBlock(), vue.createElementBlock("view", {
  79370. class: "list-item ss-flex ss-col-center ss-row-between",
  79371. key: item.id,
  79372. style: { "padding": "20rpx 0", "border-bottom": "1px solid #c4c4c4" }
  79373. }, [
  79374. vue.createElementVNode("view", {
  79375. class: "ss-flex ss-col-center",
  79376. style: { "width": "100%" }
  79377. }, [
  79378. vue.createElementVNode("view", {
  79379. class: "ss-flex ss-m-t-10",
  79380. style: { "flex-direction": "column", "align-items": "flex-start", "width": "100%" }
  79381. }, [
  79382. vue.createElementVNode(
  79383. "view",
  79384. {
  79385. class: "name",
  79386. style: { "width": "100%" }
  79387. },
  79388. vue.toDisplayString(item.status === 1 ? "通过" : "拒绝"),
  79389. 1
  79390. /* TEXT */
  79391. ),
  79392. vue.createElementVNode(
  79393. "view",
  79394. {
  79395. class: "time",
  79396. style: { "width": "100%" }
  79397. },
  79398. " 审核时间:" + vue.toDisplayString($setup.sheep.$helper.timeFormat(item.createTime, "yyyy-mm-dd hh:MM")),
  79399. 1
  79400. /* TEXT */
  79401. ),
  79402. vue.createElementVNode(
  79403. "view",
  79404. {
  79405. class: "time",
  79406. style: { "width": "100%" }
  79407. },
  79408. " 描述:" + vue.toDisplayString(item.checkComment),
  79409. 1
  79410. /* TEXT */
  79411. )
  79412. ])
  79413. ])
  79414. ]);
  79415. }),
  79416. 128
  79417. /* KEYED_FRAGMENT */
  79418. ))
  79419. ])) : (vue.openBlock(), vue.createBlock(_component_s_empty, {
  79420. key: 1,
  79421. text: "暂无数据",
  79422. paddingTop: "200",
  79423. icon: "/static/data-empty.png"
  79424. })),
  79425. $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, {
  79426. key: 2,
  79427. status: $setup.state.loadStatus,
  79428. "content-text": {
  79429. contentdown: "点击加载更多"
  79430. },
  79431. onClick: _cache[1] || (_cache[1] = ($event) => $setup.onLoadMore(true)),
  79432. onScrolltolower: _cache[2] || (_cache[2] = ($event) => $setup.onLoadMore(true))
  79433. }, null, 8, ["status"])) : vue.createCommentVNode("v-if", true)
  79434. ],
  79435. 32
  79436. /* NEED_HYDRATION */
  79437. )
  79438. ])
  79439. ]),
  79440. _: 1
  79441. /* STABLE */
  79442. })
  79443. ],
  79444. 2112
  79445. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  79446. );
  79447. }
  79448. const PagesPublicMerchantApplyList = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$m], ["__scopeId", "data-v-3c232040"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/public/merchantApplyList.vue"]]);
  79449. const _sfc_main$m = {
  79450. __name: "s-coupon-list",
  79451. props: {
  79452. data: {
  79453. type: Object,
  79454. default: {}
  79455. },
  79456. disabled: {
  79457. type: Boolean,
  79458. default: false
  79459. },
  79460. type: {
  79461. type: String,
  79462. default: "coupon"
  79463. // coupon 优惠劵模版;user 用户优惠劵
  79464. }
  79465. },
  79466. setup(__props, { expose: __expose }) {
  79467. __expose();
  79468. const state = vue.reactive({});
  79469. const isDisable = vue.computed(() => {
  79470. if (props.type === "coupon") {
  79471. return false;
  79472. }
  79473. return props.data.status !== 1;
  79474. });
  79475. const props = __props;
  79476. const __returned__ = { state, isDisable, props, computed: vue.computed, reactive: vue.reactive, get fen2yuan() {
  79477. return fen2yuan;
  79478. }, get sheep() {
  79479. return sheep$1;
  79480. } };
  79481. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  79482. return __returned__;
  79483. }
  79484. };
  79485. function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
  79486. return vue.openBlock(), vue.createElementBlock(
  79487. "view",
  79488. {
  79489. class: "ss-m-20",
  79490. style: vue.normalizeStyle({ opacity: $props.disabled ? "0.5" : "1" })
  79491. },
  79492. [
  79493. vue.createElementVNode("view", { class: "content" }, [
  79494. vue.createElementVNode(
  79495. "view",
  79496. {
  79497. class: vue.normalizeClass(["tag ss-flex ss-row-center", $setup.isDisable ? "disabled-bg-color" : "info-bg-color"])
  79498. },
  79499. vue.toDisplayString($props.data.discountType === 1 ? "满减券" : "折扣券"),
  79500. 3
  79501. /* TEXT, CLASS */
  79502. ),
  79503. vue.createElementVNode("view", { class: "title ss-m-x-30 ss-p-t-18" }, [
  79504. vue.createElementVNode("view", { class: "ss-flex ss-row-between" }, [
  79505. vue.createElementVNode(
  79506. "view",
  79507. {
  79508. class: vue.normalizeClass(["value-text ss-flex-1 ss-m-r-10", $setup.isDisable ? "disabled-color" : "info-color"])
  79509. },
  79510. vue.toDisplayString($props.data.name),
  79511. 3
  79512. /* TEXT, CLASS */
  79513. ),
  79514. vue.createElementVNode("view", null, [
  79515. vue.createElementVNode(
  79516. "view",
  79517. {
  79518. class: vue.normalizeClass(["ss-flex ss-col-bottom", $setup.isDisable ? "disabled-color" : "price-text"])
  79519. },
  79520. [
  79521. $props.data.discountType === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  79522. key: 0,
  79523. class: "value-reduce ss-m-b-10"
  79524. }, "¥")) : vue.createCommentVNode("v-if", true),
  79525. vue.createElementVNode(
  79526. "view",
  79527. { class: "value-price" },
  79528. vue.toDisplayString($props.data.discountType === 1 ? $setup.fen2yuan($props.data.discountPrice) : $props.data.discountPercent / 10),
  79529. 1
  79530. /* TEXT */
  79531. ),
  79532. $props.data.discountType === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  79533. key: 1,
  79534. class: "value-discount ss-m-b-10 ss-m-l-4"
  79535. }, "折")) : vue.createCommentVNode("v-if", true)
  79536. ],
  79537. 2
  79538. /* CLASS */
  79539. )
  79540. ])
  79541. ]),
  79542. vue.createElementVNode("view", { class: "ss-flex ss-row-between ss-m-t-16" }, [
  79543. $props.data.validityType === 2 ? (vue.openBlock(), vue.createElementBlock(
  79544. "view",
  79545. {
  79546. key: 0,
  79547. class: vue.normalizeClass(["sellby-text", $setup.isDisable ? "disabled-color" : "subtitle-color"])
  79548. },
  79549. " 有效期:领取后 " + vue.toDisplayString($props.data.fixedEndTerm) + " 天内可用 ",
  79550. 3
  79551. /* TEXT, CLASS */
  79552. )) : (vue.openBlock(), vue.createElementBlock(
  79553. "view",
  79554. {
  79555. key: 1,
  79556. class: vue.normalizeClass(["sellby-text", $setup.isDisable ? "disabled-color" : "subtitle-color"])
  79557. },
  79558. " 有效期: " + vue.toDisplayString($setup.sheep.$helper.timeFormat($props.data.validStartTime, "yyyy-mm-dd")) + " 至 " + vue.toDisplayString($setup.sheep.$helper.timeFormat($props.data.validEndTime, "yyyy-mm-dd")),
  79559. 3
  79560. /* TEXT, CLASS */
  79561. )),
  79562. vue.createElementVNode(
  79563. "view",
  79564. {
  79565. class: vue.normalizeClass(["value-enough", $setup.isDisable ? "disabled-color" : "subtitle-color"])
  79566. },
  79567. " 满 " + vue.toDisplayString($setup.fen2yuan($props.data.usePrice)) + " 可用 ",
  79568. 3
  79569. /* TEXT, CLASS */
  79570. )
  79571. ])
  79572. ])
  79573. ]),
  79574. vue.createCommentVNode(" TODO 非繁人:可优化,增加优惠劵的描述 "),
  79575. vue.createElementVNode("view", { class: "desc ss-flex ss-row-between" }, [
  79576. vue.createElementVNode("view", null, [
  79577. vue.createElementVNode(
  79578. "view",
  79579. { class: "desc-title" },
  79580. vue.toDisplayString($props.data.description),
  79581. 1
  79582. /* TEXT */
  79583. ),
  79584. vue.createElementVNode("view", null, [
  79585. vue.renderSlot(_ctx.$slots, "reason", {}, void 0, true)
  79586. ])
  79587. ]),
  79588. vue.createElementVNode("view", null, [
  79589. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  79590. ])
  79591. ])
  79592. ],
  79593. 4
  79594. /* STYLE */
  79595. );
  79596. }
  79597. const __easycom_3 = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$l], ["__scopeId", "data-v-81b7b3dc"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-coupon-list/s-coupon-list.vue"]]);
  79598. const _sfc_main$l = {
  79599. __name: "list",
  79600. setup(__props, { expose: __expose }) {
  79601. __expose();
  79602. const state = vue.reactive({
  79603. currentTab: 0,
  79604. // 当前 tab
  79605. type: "1",
  79606. pagination: {
  79607. list: [],
  79608. total: 0,
  79609. pageNo: 1,
  79610. pageSize: 5
  79611. },
  79612. loadStatus: ""
  79613. });
  79614. const tabMaps = [
  79615. {
  79616. name: "领券中心",
  79617. value: "all"
  79618. },
  79619. {
  79620. name: "已领取",
  79621. value: "1"
  79622. },
  79623. {
  79624. name: "已使用",
  79625. value: "2"
  79626. },
  79627. {
  79628. name: "已失效",
  79629. value: "3"
  79630. }
  79631. ];
  79632. function onTabsChange(e2) {
  79633. state.currentTab = e2.index;
  79634. state.type = e2.value;
  79635. resetPagination(state.pagination);
  79636. if (state.currentTab === 0) {
  79637. getData();
  79638. } else {
  79639. getCoupon();
  79640. }
  79641. }
  79642. async function getData() {
  79643. state.loadStatus = "loading";
  79644. const { data, code: code2 } = await CouponApi.getCouponTemplatePage({
  79645. pageNo: state.pagination.pageNo,
  79646. pageSize: state.pagination.pageSize
  79647. });
  79648. if (code2 !== 0) {
  79649. return;
  79650. }
  79651. state.pagination.list = _$1.concat(state.pagination.list, data.list);
  79652. state.pagination.total = data.total;
  79653. state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore";
  79654. }
  79655. async function getCoupon() {
  79656. state.loadStatus = "loading";
  79657. const { data, code: code2 } = await CouponApi.getCouponPage({
  79658. pageNo: state.pagination.pageNo,
  79659. pageSize: state.pagination.pageSize,
  79660. status: state.type
  79661. });
  79662. if (code2 !== 0) {
  79663. return;
  79664. }
  79665. state.pagination.list = _$1.concat(state.pagination.list, data.list);
  79666. state.pagination.total = data.total;
  79667. state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore";
  79668. }
  79669. async function getBuy(id) {
  79670. const { code: code2 } = await CouponApi.takeCoupon(id);
  79671. if (code2 !== 0) {
  79672. return;
  79673. }
  79674. uni.showToast({
  79675. title: "领取成功"
  79676. });
  79677. setTimeout(() => {
  79678. resetPagination(state.pagination);
  79679. getData();
  79680. }, 1e3);
  79681. }
  79682. function loadMore() {
  79683. if (state.loadStatus === "noMore") {
  79684. return;
  79685. }
  79686. state.pagination.pageNo++;
  79687. if (state.currentTab === 0) {
  79688. getData();
  79689. } else {
  79690. getCoupon();
  79691. }
  79692. }
  79693. onLoad((Option) => {
  79694. if (Option.type === "all" || !Option.type) {
  79695. getData();
  79696. } else {
  79697. Option.type === "geted" ? state.currentTab = 1 : Option.type === "used" ? state.currentTab = 2 : state.currentTab = 3;
  79698. state.type = state.currentTab;
  79699. getCoupon();
  79700. }
  79701. });
  79702. onReachBottom(() => {
  79703. loadMore();
  79704. });
  79705. const __returned__ = { state, tabMaps, onTabsChange, getData, getCoupon, getBuy, loadMore, get sheep() {
  79706. return sheep$1;
  79707. }, get onLoad() {
  79708. return onLoad;
  79709. }, get onReachBottom() {
  79710. return onReachBottom;
  79711. }, reactive: vue.reactive, get _() {
  79712. return _$1;
  79713. }, get resetPagination() {
  79714. return resetPagination;
  79715. }, get CouponApi() {
  79716. return CouponApi;
  79717. } };
  79718. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  79719. return __returned__;
  79720. }
  79721. };
  79722. function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
  79723. const _component_su_tabs = resolveEasycom(vue.resolveDynamicComponent("su-tabs"), __easycom_0$a);
  79724. const _component_su_sticky = resolveEasycom(vue.resolveDynamicComponent("su-sticky"), __easycom_0$9);
  79725. const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6);
  79726. const _component_s_coupon_list = resolveEasycom(vue.resolveDynamicComponent("s-coupon-list"), __easycom_3);
  79727. const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5);
  79728. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  79729. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  79730. title: "优惠券",
  79731. bgStyle: { color: "#f2f2f2" }
  79732. }, {
  79733. default: vue.withCtx(() => [
  79734. vue.createVNode(_component_su_sticky, { bgColor: "#fff" }, {
  79735. default: vue.withCtx(() => [
  79736. vue.createVNode(_component_su_tabs, {
  79737. list: $setup.tabMaps,
  79738. scrollable: false,
  79739. onChange: $setup.onTabsChange,
  79740. current: $setup.state.currentTab
  79741. }, null, 8, ["current"])
  79742. ]),
  79743. _: 1
  79744. /* STABLE */
  79745. }),
  79746. $setup.state.pagination.total === 0 ? (vue.openBlock(), vue.createBlock(_component_s_empty, {
  79747. key: 0,
  79748. icon: "/static/coupon-empty.png",
  79749. text: "暂无优惠券"
  79750. })) : vue.createCommentVNode("v-if", true),
  79751. vue.createCommentVNode(" 情况一:领劵中心 "),
  79752. $setup.state.currentTab === 0 ? (vue.openBlock(true), vue.createElementBlock(
  79753. vue.Fragment,
  79754. { key: 1 },
  79755. vue.renderList($setup.state.pagination.list, (item) => {
  79756. return vue.openBlock(), vue.createElementBlock("view", {
  79757. key: item.id
  79758. }, [
  79759. vue.createVNode(_component_s_coupon_list, {
  79760. data: item,
  79761. onClick: ($event) => $setup.sheep.$router.go("/pages/coupon/detail", { id: item.id })
  79762. }, {
  79763. default: vue.withCtx(() => [
  79764. vue.createElementVNode("button", {
  79765. class: vue.normalizeClass(["ss-reset-button card-btn ss-flex ss-row-center ss-col-center", !item.canTake ? "border-btn" : ""]),
  79766. onClick: vue.withModifiers(($event) => $setup.getBuy(item.id), ["stop"]),
  79767. disabled: !item.canTake
  79768. }, vue.toDisplayString(item.canTake ? "立即领取" : "已领取"), 11, ["onClick", "disabled"])
  79769. ]),
  79770. _: 2
  79771. /* DYNAMIC */
  79772. }, 1032, ["data", "onClick"])
  79773. ]);
  79774. }),
  79775. 128
  79776. /* KEYED_FRAGMENT */
  79777. )) : (vue.openBlock(), vue.createElementBlock(
  79778. vue.Fragment,
  79779. { key: 2 },
  79780. [
  79781. vue.createCommentVNode(" 情况二:我的优惠劵 "),
  79782. (vue.openBlock(true), vue.createElementBlock(
  79783. vue.Fragment,
  79784. null,
  79785. vue.renderList($setup.state.pagination.list, (item) => {
  79786. return vue.openBlock(), vue.createElementBlock("view", {
  79787. key: item.id
  79788. }, [
  79789. vue.createVNode(_component_s_coupon_list, {
  79790. data: item,
  79791. type: "user",
  79792. onClick: ($event) => $setup.sheep.$router.go("/pages/coupon/detail", { couponId: item.id })
  79793. }, {
  79794. default: vue.withCtx(() => [
  79795. vue.createElementVNode("button", {
  79796. class: vue.normalizeClass(["ss-reset-button card-btn ss-flex ss-row-center ss-col-center", item.status !== 1 ? "disabled-btn" : ""]),
  79797. disabled: item.status !== 1,
  79798. onClick: vue.withModifiers(($event) => $setup.sheep.$router.go("/pages/coupon/detail", { couponId: item.id }), ["stop"])
  79799. }, vue.toDisplayString(item.status === 1 ? "立即使用" : item.status === 2 ? "已使用" : "已过期"), 11, ["disabled", "onClick"])
  79800. ]),
  79801. _: 2
  79802. /* DYNAMIC */
  79803. }, 1032, ["data", "onClick"])
  79804. ]);
  79805. }),
  79806. 128
  79807. /* KEYED_FRAGMENT */
  79808. ))
  79809. ],
  79810. 64
  79811. /* STABLE_FRAGMENT */
  79812. )),
  79813. $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, {
  79814. key: 3,
  79815. status: $setup.state.loadStatus,
  79816. "content-text": {
  79817. contentdown: "上拉加载更多"
  79818. },
  79819. onClick: $setup.loadMore
  79820. }, null, 8, ["status"])) : vue.createCommentVNode("v-if", true)
  79821. ]),
  79822. _: 1
  79823. /* STABLE */
  79824. });
  79825. }
  79826. const PagesCouponList = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$k], ["__scopeId", "data-v-019d569f"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/coupon/list.vue"]]);
  79827. const _sfc_main$k = {
  79828. __name: "detail",
  79829. setup(__props, { expose: __expose }) {
  79830. __expose();
  79831. const state = vue.reactive({
  79832. id: 0,
  79833. // 优惠劵模版编号 templateId
  79834. couponId: 0,
  79835. // 用户优惠劵编号 couponId
  79836. coupon: {},
  79837. // 优惠劵信息
  79838. pagination: {
  79839. list: [],
  79840. total: 0,
  79841. pageNo: 1,
  79842. pageSize: 1
  79843. },
  79844. categoryId: 0,
  79845. // 选中的商品分类编号
  79846. tabMaps: [],
  79847. // 指定分类时,每个分类构成一个 tab
  79848. currentTab: 0,
  79849. // 选中的 tabMaps 下标
  79850. loadStatus: ""
  79851. });
  79852. function onTabsChange(e2) {
  79853. resetPagination(state.pagination);
  79854. state.currentTab = e2.index;
  79855. state.categoryId = e2.value;
  79856. getGoodsListByCategory();
  79857. }
  79858. async function getGoodsListByCategory() {
  79859. state.loadStatus = "loading";
  79860. const { code: code2, data } = await SpuApi.getSpuPage({
  79861. categoryId: state.categoryId,
  79862. pageNo: state.pagination.pageNo,
  79863. pageSize: state.pagination.pageSize
  79864. });
  79865. if (code2 !== 0) {
  79866. return;
  79867. }
  79868. state.pagination.list = _$1.concat(state.pagination.list, data.list);
  79869. state.pagination.total = data.total;
  79870. state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore";
  79871. }
  79872. async function getGoodsListById() {
  79873. const { data, code: code2 } = await SpuApi.getSpuListByIds(state.coupon.productScopeValues.join(","));
  79874. if (code2 !== 0) {
  79875. return;
  79876. }
  79877. state.pagination.list = data;
  79878. }
  79879. async function getCategoryList() {
  79880. const { data, code: code2 } = await CategoryApi.getCategoryListByIds(state.coupon.productScopeValues.join(","));
  79881. if (code2 !== 0) {
  79882. return;
  79883. }
  79884. state.tabMaps = data.map((category) => ({ name: category.name, value: category.id }));
  79885. if (state.tabMaps.length > 0) {
  79886. state.categoryId = state.tabMaps[0].value;
  79887. await getGoodsListByCategory();
  79888. }
  79889. }
  79890. async function getCoupon() {
  79891. const { code: code2 } = await CouponApi.takeCoupon(state.id);
  79892. if (code2 !== 0) {
  79893. return;
  79894. }
  79895. uni.showToast({
  79896. title: "领取成功"
  79897. });
  79898. setTimeout(() => {
  79899. getCouponContent();
  79900. }, 1e3);
  79901. }
  79902. async function getCouponContent() {
  79903. const { code: code2, data } = state.id > 0 ? await CouponApi.getCouponTemplate(state.id) : await CouponApi.getCoupon(state.couponId);
  79904. if (code2 !== 0) {
  79905. return;
  79906. }
  79907. state.coupon = data;
  79908. if (state.coupon.productScope === 2) {
  79909. await getGoodsListById();
  79910. } else if (state.coupon.productScope === 3) {
  79911. await getCategoryList();
  79912. }
  79913. }
  79914. function loadMore() {
  79915. if (state.loadStatus === "noMore") {
  79916. return;
  79917. }
  79918. state.pagination.pageNo++;
  79919. getGoodsListByCategory();
  79920. }
  79921. onLoad((options2) => {
  79922. state.id = options2.id;
  79923. state.couponId = options2.couponId;
  79924. getCouponContent(state.id, state.couponId);
  79925. });
  79926. onReachBottom(() => {
  79927. loadMore();
  79928. });
  79929. const __returned__ = { state, onTabsChange, getGoodsListByCategory, getGoodsListById, getCategoryList, getCoupon, getCouponContent, loadMore, get sheep() {
  79930. return sheep$1;
  79931. }, get onLoad() {
  79932. return onLoad;
  79933. }, get onReachBottom() {
  79934. return onReachBottom;
  79935. }, reactive: vue.reactive, get _() {
  79936. return _$1;
  79937. }, get CouponApi() {
  79938. return CouponApi;
  79939. }, get fen2yuan() {
  79940. return fen2yuan;
  79941. }, get SpuApi() {
  79942. return SpuApi;
  79943. }, get CategoryApi() {
  79944. return CategoryApi;
  79945. }, get resetPagination() {
  79946. return resetPagination;
  79947. } };
  79948. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  79949. return __returned__;
  79950. }
  79951. };
  79952. function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
  79953. const _component_uni_collapse_item = resolveEasycom(vue.resolveDynamicComponent("uni-collapse-item"), __easycom_0$2);
  79954. const _component_uni_collapse = resolveEasycom(vue.resolveDynamicComponent("uni-collapse"), __easycom_1);
  79955. const _component_su_tabs = resolveEasycom(vue.resolveDynamicComponent("su-tabs"), __easycom_0$a);
  79956. const _component_su_sticky = resolveEasycom(vue.resolveDynamicComponent("su-sticky"), __easycom_0$9);
  79957. const _component_s_goods_column = resolveEasycom(vue.resolveDynamicComponent("s-goods-column"), __easycom_1$4);
  79958. const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5);
  79959. const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6);
  79960. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  79961. return vue.openBlock(), vue.createBlock(_component_s_layout, { title: "优惠券详情" }, {
  79962. default: vue.withCtx(() => [
  79963. vue.createElementVNode("view", { class: "bg-white" }, [
  79964. vue.createCommentVNode(" 详情卡片 "),
  79965. vue.createElementVNode("view", { class: "detail-wrap ss-p-20" }, [
  79966. vue.createElementVNode("view", { class: "detail-box" }, [
  79967. vue.createElementVNode("view", { class: "tag-box ss-flex ss-col-center ss-row-center" }, [
  79968. vue.createElementVNode("image", {
  79969. class: "tag-image",
  79970. src: $setup.sheep.$url.static("/static/images/coupon_icon.png"),
  79971. mode: "aspectFit"
  79972. }, null, 8, ["src"])
  79973. ]),
  79974. vue.createElementVNode("view", { class: "top ss-flex-col ss-col-center" }, [
  79975. vue.createElementVNode(
  79976. "view",
  79977. { class: "title ss-m-t-50 ss-m-b-20 ss-m-x-20" },
  79978. vue.toDisplayString($setup.state.coupon.name),
  79979. 1
  79980. /* TEXT */
  79981. ),
  79982. vue.createElementVNode(
  79983. "view",
  79984. { class: "subtitle ss-m-b-50" },
  79985. " 满 " + vue.toDisplayString($setup.fen2yuan($setup.state.coupon.usePrice)) + " 元, " + vue.toDisplayString($setup.state.coupon.discountType === 1 ? "减 " + $setup.fen2yuan($setup.state.coupon.discountPrice) + " 元" : "打 " + $setup.state.coupon.discountPercent / 10 + " 折"),
  79986. 1
  79987. /* TEXT */
  79988. ),
  79989. vue.createElementVNode("button", {
  79990. class: vue.normalizeClass([
  79991. "ss-reset-button ss-m-b-30",
  79992. $setup.state.coupon.canTake || $setup.state.coupon.status === 1 ? "use-btn" : "disable-btn"
  79993. ]),
  79994. disabled: !$setup.state.coupon.canTake,
  79995. onClick: $setup.getCoupon
  79996. }, [
  79997. $setup.state.id > 0 ? (vue.openBlock(), vue.createElementBlock(
  79998. "text",
  79999. { key: 0 },
  80000. vue.toDisplayString($setup.state.coupon.canTake ? "立即领取" : "已领取"),
  80001. 1
  80002. /* TEXT */
  80003. )) : (vue.openBlock(), vue.createElementBlock(
  80004. "text",
  80005. { key: 1 },
  80006. vue.toDisplayString($setup.state.coupon.status === 1 ? "立即使用" : $setup.state.coupon.status === 2 ? "已使用" : "已过期"),
  80007. 1
  80008. /* TEXT */
  80009. ))
  80010. ], 10, ["disabled"]),
  80011. $setup.state.coupon.validityType === 2 ? (vue.openBlock(), vue.createElementBlock(
  80012. "view",
  80013. {
  80014. key: 0,
  80015. class: "time ss-m-y-30"
  80016. },
  80017. " 有效期:领取后 " + vue.toDisplayString($setup.state.coupon.fixedEndTerm) + " 天内可用 ",
  80018. 1
  80019. /* TEXT */
  80020. )) : (vue.openBlock(), vue.createElementBlock(
  80021. "view",
  80022. {
  80023. key: 1,
  80024. class: "time ss-m-y-30"
  80025. },
  80026. " 有效期: " + vue.toDisplayString($setup.sheep.$helper.timeFormat($setup.state.coupon.validStartTime, "yyyy-mm-dd")) + " 至 " + vue.toDisplayString($setup.sheep.$helper.timeFormat($setup.state.coupon.validEndTime, "yyyy-mm-dd")),
  80027. 1
  80028. /* TEXT */
  80029. )),
  80030. vue.createElementVNode("view", { class: "coupon-line ss-m-t-14" })
  80031. ]),
  80032. vue.createElementVNode("view", { class: "bottom" }, [
  80033. vue.createElementVNode("view", { class: "type ss-flex ss-col-center ss-row-between ss-p-x-30" }, [
  80034. vue.createElementVNode("view", null, "优惠券类型"),
  80035. vue.createElementVNode(
  80036. "view",
  80037. null,
  80038. vue.toDisplayString($setup.state.coupon.discountType === 1 ? "满减券" : "折扣券"),
  80039. 1
  80040. /* TEXT */
  80041. )
  80042. ]),
  80043. vue.createCommentVNode(" TODO 非繁人:可优化,增加优惠劵的描述 "),
  80044. vue.createVNode(_component_uni_collapse, null, {
  80045. default: vue.withCtx(() => [
  80046. $setup.state.coupon.description ? (vue.openBlock(), vue.createBlock(_component_uni_collapse_item, {
  80047. key: 0,
  80048. title: "优惠券说明"
  80049. }, {
  80050. default: vue.withCtx(() => [
  80051. vue.createElementVNode("view", { class: "content ss-p-b-20" }, [
  80052. vue.createElementVNode(
  80053. "text",
  80054. { class: "des ss-p-l-30" },
  80055. vue.toDisplayString($setup.state.coupon.description),
  80056. 1
  80057. /* TEXT */
  80058. )
  80059. ])
  80060. ]),
  80061. _: 1
  80062. /* STABLE */
  80063. })) : vue.createCommentVNode("v-if", true)
  80064. ]),
  80065. _: 1
  80066. /* STABLE */
  80067. })
  80068. ])
  80069. ])
  80070. ]),
  80071. vue.createCommentVNode(" 适用商品 "),
  80072. $setup.state.coupon.productScope === 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  80073. key: 0,
  80074. class: "all-user ss-flex ss-row-center ss-col-center"
  80075. }, " 全场通用 ")) : (vue.openBlock(), vue.createBlock(_component_su_sticky, {
  80076. key: 1,
  80077. bgColor: "#fff"
  80078. }, {
  80079. default: vue.withCtx(() => [
  80080. vue.createElementVNode(
  80081. "view",
  80082. { class: "goods-title ss-p-20" },
  80083. vue.toDisplayString($setup.state.coupon.productScope === 2 ? "指定商品可用" : "指定分类可用"),
  80084. 1
  80085. /* TEXT */
  80086. ),
  80087. $setup.state.coupon.productScope === 3 ? (vue.openBlock(), vue.createBlock(_component_su_tabs, {
  80088. key: 0,
  80089. scrollable: true,
  80090. list: $setup.state.tabMaps,
  80091. onChange: $setup.onTabsChange,
  80092. current: $setup.state.currentTab
  80093. }, null, 8, ["list", "current"])) : vue.createCommentVNode("v-if", true)
  80094. ]),
  80095. _: 1
  80096. /* STABLE */
  80097. })),
  80098. vue.createCommentVNode(" 指定商品 "),
  80099. $setup.state.coupon.productScope === 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2 }, [
  80100. (vue.openBlock(true), vue.createElementBlock(
  80101. vue.Fragment,
  80102. null,
  80103. vue.renderList($setup.state.pagination.list, (item, index2) => {
  80104. return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
  80105. vue.createVNode(_component_s_goods_column, {
  80106. class: "ss-m-20",
  80107. size: "lg",
  80108. data: item,
  80109. onClick: ($event) => $setup.sheep.$router.go("/pages/goods/index", { id: item.id }),
  80110. goodsFields: {
  80111. title: { show: true },
  80112. subtitle: { show: true },
  80113. price: { show: true },
  80114. original_price: { show: true },
  80115. sales: { show: true },
  80116. stock: { show: false }
  80117. }
  80118. }, null, 8, ["data", "onClick"])
  80119. ]);
  80120. }),
  80121. 128
  80122. /* KEYED_FRAGMENT */
  80123. ))
  80124. ])) : vue.createCommentVNode("v-if", true),
  80125. vue.createCommentVNode(" 指定分类 "),
  80126. $setup.state.coupon.productScope === 3 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3 }, [
  80127. (vue.openBlock(true), vue.createElementBlock(
  80128. vue.Fragment,
  80129. null,
  80130. vue.renderList($setup.state.pagination.list, (item, index2) => {
  80131. return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [
  80132. vue.createVNode(_component_s_goods_column, {
  80133. class: "ss-m-20",
  80134. size: "lg",
  80135. data: item,
  80136. onClick: ($event) => $setup.sheep.$router.go("/pages/goods/index", { id: item.id }),
  80137. goodsFields: {
  80138. title: { show: true },
  80139. subtitle: { show: true },
  80140. price: { show: true },
  80141. original_price: { show: true },
  80142. sales: { show: true },
  80143. stock: { show: false }
  80144. }
  80145. }, null, 8, ["data", "onClick"])
  80146. ]);
  80147. }),
  80148. 128
  80149. /* KEYED_FRAGMENT */
  80150. ))
  80151. ])) : vue.createCommentVNode("v-if", true),
  80152. $setup.state.pagination.total > 0 && $setup.state.coupon.productScope === 3 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, {
  80153. key: 4,
  80154. status: $setup.state.loadStatus,
  80155. "content-text": {
  80156. contentdown: "上拉加载更多"
  80157. },
  80158. onClick: $setup.loadMore
  80159. }, null, 8, ["status"])) : vue.createCommentVNode("v-if", true),
  80160. $setup.state.coupon.productScope === 3 && $setup.state.pagination.total === 0 ? (vue.openBlock(), vue.createBlock(_component_s_empty, {
  80161. key: 5,
  80162. paddingTop: "0",
  80163. icon: "/static/soldout-empty.png",
  80164. text: "暂无商品"
  80165. })) : vue.createCommentVNode("v-if", true)
  80166. ])
  80167. ]),
  80168. _: 1
  80169. /* STABLE */
  80170. });
  80171. }
  80172. const PagesCouponDetail = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$j], ["__scopeId", "data-v-2d1fcfdf"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/coupon/detail.vue"]]);
  80173. const emojiList = [
  80174. { name: "[笑掉牙]", file: "xiaodiaoya.png" },
  80175. { name: "[可爱]", file: "keai.png" },
  80176. { name: "[冷酷]", file: "lengku.png" },
  80177. { name: "[闭嘴]", file: "bizui.png" },
  80178. { name: "[生气]", file: "shengqi.png" },
  80179. { name: "[惊恐]", file: "jingkong.png" },
  80180. { name: "[瞌睡]", file: "keshui.png" },
  80181. { name: "[大笑]", file: "daxiao.png" },
  80182. { name: "[爱心]", file: "aixin.png" },
  80183. { name: "[坏笑]", file: "huaixiao.png" },
  80184. { name: "[飞吻]", file: "feiwen.png" },
  80185. { name: "[疑问]", file: "yiwen.png" },
  80186. { name: "[开心]", file: "kaixin.png" },
  80187. { name: "[发呆]", file: "fadai.png" },
  80188. { name: "[流泪]", file: "liulei.png" },
  80189. { name: "[汗颜]", file: "hanyan.png" },
  80190. { name: "[惊悚]", file: "jingshu.png" },
  80191. { name: "[困~]", file: "kun.png" },
  80192. { name: "[心碎]", file: "xinsui.png" },
  80193. { name: "[天使]", file: "tianshi.png" },
  80194. { name: "[晕]", file: "yun.png" },
  80195. { name: "[啊]", file: "a.png" },
  80196. { name: "[愤怒]", file: "fennu.png" },
  80197. { name: "[睡着]", file: "shuizhuo.png" },
  80198. { name: "[面无表情]", file: "mianwubiaoqing.png" },
  80199. { name: "[难过]", file: "nanguo.png" },
  80200. { name: "[犯困]", file: "fankun.png" },
  80201. { name: "[好吃]", file: "haochi.png" },
  80202. { name: "[呕吐]", file: "outu.png" },
  80203. { name: "[龇牙]", file: "ziya.png" },
  80204. { name: "[懵比]", file: "mengbi.png" },
  80205. { name: "[白眼]", file: "baiyan.png" },
  80206. { name: "[饿死]", file: "esi.png" },
  80207. { name: "[凶]", file: "xiong.png" },
  80208. { name: "[感冒]", file: "ganmao.png" },
  80209. { name: "[流汗]", file: "liuhan.png" },
  80210. { name: "[笑哭]", file: "xiaoku.png" },
  80211. { name: "[流口水]", file: "liukoushui.png" },
  80212. { name: "[尴尬]", file: "ganga.png" },
  80213. { name: "[惊讶]", file: "jingya.png" },
  80214. { name: "[大惊]", file: "dajing.png" },
  80215. { name: "[不好意思]", file: "buhaoyisi.png" },
  80216. { name: "[大闹]", file: "danao.png" },
  80217. { name: "[不可思议]", file: "bukesiyi.png" },
  80218. { name: "[爱你]", file: "aini.png" },
  80219. { name: "[红心]", file: "hongxin.png" },
  80220. { name: "[点赞]", file: "dianzan.png" },
  80221. { name: "[恶魔]", file: "emo.png" }
  80222. ];
  80223. let emojiPage = {};
  80224. emojiList.forEach((item, index2) => {
  80225. if (!emojiPage[Math.floor(index2 / 30) + 1]) {
  80226. emojiPage[Math.floor(index2 / 30) + 1] = [];
  80227. }
  80228. emojiPage[Math.floor(index2 / 30) + 1].push(item);
  80229. });
  80230. const _sfc_main$j = {
  80231. __name: "goods",
  80232. props: {
  80233. goodsData: {
  80234. type: Object,
  80235. default: {}
  80236. }
  80237. },
  80238. setup(__props, { expose: __expose }) {
  80239. __expose();
  80240. const props = __props;
  80241. const __returned__ = { props, get sheep() {
  80242. return sheep$1;
  80243. }, get isArray() {
  80244. return lodashExports.isArray;
  80245. } };
  80246. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  80247. return __returned__;
  80248. }
  80249. };
  80250. function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
  80251. return vue.openBlock(), vue.createElementBlock("view", { class: "goods ss-flex" }, [
  80252. vue.createElementVNode("image", {
  80253. class: "image",
  80254. src: $setup.sheep.$url.cdn($props.goodsData.image),
  80255. mode: "aspectFill"
  80256. }, null, 8, ["src"]),
  80257. vue.createElementVNode("view", { class: "ss-flex-1" }, [
  80258. vue.createElementVNode(
  80259. "view",
  80260. { class: "title ss-line-2" },
  80261. vue.toDisplayString($props.goodsData.title),
  80262. 1
  80263. /* TEXT */
  80264. ),
  80265. $props.goodsData.subtitle ? (vue.openBlock(), vue.createElementBlock(
  80266. "view",
  80267. {
  80268. key: 0,
  80269. class: "subtitle ss-line-1"
  80270. },
  80271. vue.toDisplayString($props.goodsData.subtitle),
  80272. 1
  80273. /* TEXT */
  80274. )) : vue.createCommentVNode("v-if", true),
  80275. vue.createElementVNode(
  80276. "view",
  80277. { class: "price ss-m-t-8" },
  80278. " ¥" + vue.toDisplayString($setup.isArray($props.goodsData.price) ? $props.goodsData.price[0] : $props.goodsData.price),
  80279. 1
  80280. /* TEXT */
  80281. )
  80282. ])
  80283. ]);
  80284. }
  80285. const GoodsItem = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$i], ["__scopeId", "data-v-820d22a6"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/chat/components/goods.vue"]]);
  80286. const _sfc_main$i = {
  80287. __name: "order",
  80288. props: {
  80289. from: String,
  80290. orderData: {
  80291. type: Object,
  80292. default: {}
  80293. }
  80294. },
  80295. setup(__props, { expose: __expose }) {
  80296. __expose();
  80297. const props = __props;
  80298. const __returned__ = { props, get sheep() {
  80299. return sheep$1;
  80300. } };
  80301. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  80302. return __returned__;
  80303. }
  80304. };
  80305. function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
  80306. return vue.openBlock(), vue.createElementBlock("view", { class: "order" }, [
  80307. vue.createElementVNode("view", { class: "top ss-flex ss-row-between" }, [
  80308. vue.createElementVNode(
  80309. "span",
  80310. null,
  80311. vue.toDisplayString($props.orderData.order_sn),
  80312. 1
  80313. /* TEXT */
  80314. ),
  80315. vue.createElementVNode(
  80316. "span",
  80317. null,
  80318. vue.toDisplayString($props.orderData.create_time.split(" ")[1]),
  80319. 1
  80320. /* TEXT */
  80321. )
  80322. ]),
  80323. $props.from != "msg" ? (vue.openBlock(true), vue.createElementBlock(
  80324. vue.Fragment,
  80325. { key: 0 },
  80326. vue.renderList($props.orderData.items, (item) => {
  80327. return vue.openBlock(), vue.createElementBlock("view", {
  80328. class: "bottom ss-flex",
  80329. key: item
  80330. }, [
  80331. vue.createElementVNode("image", {
  80332. class: "image",
  80333. src: $setup.sheep.$url.cdn(item.goods_image),
  80334. mode: "aspectFill"
  80335. }, null, 8, ["src"]),
  80336. vue.createElementVNode("view", { class: "ss-flex-1" }, [
  80337. vue.createElementVNode(
  80338. "view",
  80339. { class: "title ss-line-2" },
  80340. vue.toDisplayString(item.goods_title),
  80341. 1
  80342. /* TEXT */
  80343. ),
  80344. item.goods_num ? (vue.openBlock(), vue.createElementBlock(
  80345. "view",
  80346. {
  80347. key: 0,
  80348. class: "num ss-m-b-10"
  80349. },
  80350. " 数量:" + vue.toDisplayString(item.goods_num),
  80351. 1
  80352. /* TEXT */
  80353. )) : vue.createCommentVNode("v-if", true),
  80354. vue.createElementVNode("view", { class: "ss-flex ss-row-between ss-m-t-8" }, [
  80355. vue.createElementVNode(
  80356. "span",
  80357. { class: "price" },
  80358. "¥" + vue.toDisplayString(item.goods_price),
  80359. 1
  80360. /* TEXT */
  80361. ),
  80362. vue.createElementVNode(
  80363. "span",
  80364. { class: "status" },
  80365. vue.toDisplayString($props.orderData.status_text),
  80366. 1
  80367. /* TEXT */
  80368. )
  80369. ])
  80370. ])
  80371. ]);
  80372. }),
  80373. 128
  80374. /* KEYED_FRAGMENT */
  80375. )) : (vue.openBlock(true), vue.createElementBlock(
  80376. vue.Fragment,
  80377. { key: 1 },
  80378. vue.renderList([$props.orderData.items[0]], (item) => {
  80379. return vue.openBlock(), vue.createElementBlock("view", {
  80380. class: "bottom ss-flex",
  80381. key: item
  80382. }, [
  80383. vue.createElementVNode("image", {
  80384. class: "image",
  80385. src: $setup.sheep.$url.cdn(item.goods_image),
  80386. mode: "aspectFill"
  80387. }, null, 8, ["src"]),
  80388. vue.createElementVNode("view", { class: "ss-flex-1" }, [
  80389. vue.createElementVNode(
  80390. "view",
  80391. { class: "title title-1 ss-line-1" },
  80392. vue.toDisplayString(item.goods_title),
  80393. 1
  80394. /* TEXT */
  80395. ),
  80396. vue.createElementVNode("view", { class: "order-total ss-flex ss-row-between ss-m-t-8" }, [
  80397. vue.createElementVNode(
  80398. "span",
  80399. null,
  80400. "共" + vue.toDisplayString($props.orderData.items.length) + "件商品",
  80401. 1
  80402. /* TEXT */
  80403. ),
  80404. vue.createElementVNode(
  80405. "span",
  80406. null,
  80407. "合计 ¥" + vue.toDisplayString($props.orderData.pay_fee),
  80408. 1
  80409. /* TEXT */
  80410. )
  80411. ]),
  80412. vue.createElementVNode("view", { class: "ss-flex ss-row-right ss-m-t-8" }, [
  80413. vue.createElementVNode(
  80414. "span",
  80415. { class: "status" },
  80416. vue.toDisplayString($props.orderData.status_text),
  80417. 1
  80418. /* TEXT */
  80419. )
  80420. ])
  80421. ])
  80422. ]);
  80423. }),
  80424. 128
  80425. /* KEYED_FRAGMENT */
  80426. ))
  80427. ]);
  80428. }
  80429. const OrderItem = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$h], ["__scopeId", "data-v-a458419c"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/chat/components/order.vue"]]);
  80430. const _sfc_main$h = {
  80431. __name: "select-popup",
  80432. props: {
  80433. mode: {
  80434. type: String,
  80435. default: "goods"
  80436. },
  80437. show: {
  80438. type: Boolean,
  80439. default: false
  80440. }
  80441. },
  80442. emits: ["select", "close"],
  80443. setup(__props, { expose: __expose, emit: __emit }) {
  80444. __expose();
  80445. const emits = __emit;
  80446. const props = __props;
  80447. vue.watch(
  80448. () => props.mode,
  80449. () => {
  80450. state.pagination.data = [];
  80451. if (props.mode) {
  80452. getList(state.pagination.page);
  80453. }
  80454. }
  80455. );
  80456. const state = vue.reactive({
  80457. loadStatus: "",
  80458. pagination: {
  80459. data: [],
  80460. current_page: 1,
  80461. total: 1,
  80462. last_page: 1
  80463. }
  80464. });
  80465. async function getList(page2, list_rows = 5) {
  80466. state.loadStatus = "loading";
  80467. const res = props.mode == "goods" ? await SpuHistoryApi.getBrowseHistoryPage({
  80468. page: page2,
  80469. list_rows
  80470. }) : await OrderApi.getOrderPage({
  80471. page: page2,
  80472. list_rows
  80473. });
  80474. let orderList = _$1.concat(state.pagination.data, res.data.data);
  80475. state.pagination = {
  80476. ...res.data,
  80477. data: orderList
  80478. };
  80479. if (state.pagination.current_page < state.pagination.last_page) {
  80480. state.loadStatus = "more";
  80481. } else {
  80482. state.loadStatus = "noMore";
  80483. }
  80484. }
  80485. function loadmore() {
  80486. if (state.loadStatus !== "noMore") {
  80487. getList(state.pagination.current_page + 1);
  80488. }
  80489. }
  80490. const __returned__ = { emits, props, state, getList, loadmore, reactive: vue.reactive, watch: vue.watch, get sheep() {
  80491. return sheep$1;
  80492. }, get _() {
  80493. return _$1;
  80494. }, GoodsItem, OrderItem, get OrderApi() {
  80495. return OrderApi;
  80496. }, get SpuHistoryApi() {
  80497. return SpuHistoryApi;
  80498. } };
  80499. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  80500. return __returned__;
  80501. }
  80502. };
  80503. function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
  80504. const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5);
  80505. const _component_su_popup = resolveEasycom(vue.resolveDynamicComponent("su-popup"), __easycom_4$3);
  80506. return vue.openBlock(), vue.createBlock(_component_su_popup, {
  80507. show: $props.show,
  80508. showClose: "",
  80509. round: "10",
  80510. backgroundColor: "#eee",
  80511. onClose: _cache[0] || (_cache[0] = ($event) => $setup.emits("close"))
  80512. }, {
  80513. default: vue.withCtx(() => [
  80514. vue.createElementVNode("view", { class: "select-popup" }, [
  80515. vue.createElementVNode("view", { class: "title" }, [
  80516. vue.createElementVNode(
  80517. "span",
  80518. null,
  80519. vue.toDisplayString($props.mode == "goods" ? "我的浏览" : "我的订单"),
  80520. 1
  80521. /* TEXT */
  80522. )
  80523. ]),
  80524. vue.createElementVNode(
  80525. "scroll-view",
  80526. {
  80527. class: "scroll-box",
  80528. "scroll-y": "true",
  80529. "scroll-with-animation": true,
  80530. "show-scrollbar": false,
  80531. onScrolltolower: $setup.loadmore
  80532. },
  80533. [
  80534. (vue.openBlock(true), vue.createElementBlock(
  80535. vue.Fragment,
  80536. null,
  80537. vue.renderList($setup.state.pagination.data, (item) => {
  80538. return vue.openBlock(), vue.createElementBlock("view", {
  80539. class: "item",
  80540. key: item,
  80541. onClick: ($event) => $setup.emits("select", { type: $props.mode, data: item })
  80542. }, [
  80543. $props.mode == "goods" ? (vue.openBlock(), vue.createBlock($setup["GoodsItem"], {
  80544. key: 0,
  80545. goodsData: item.goods
  80546. }, null, 8, ["goodsData"])) : vue.createCommentVNode("v-if", true),
  80547. $props.mode == "order" ? (vue.openBlock(), vue.createBlock($setup["OrderItem"], {
  80548. key: 1,
  80549. orderData: item
  80550. }, null, 8, ["orderData"])) : vue.createCommentVNode("v-if", true)
  80551. ], 8, ["onClick"]);
  80552. }),
  80553. 128
  80554. /* KEYED_FRAGMENT */
  80555. )),
  80556. vue.createVNode(_component_uni_load_more, {
  80557. status: $setup.state.loadStatus,
  80558. "content-text": { contentdown: "上拉加载更多" }
  80559. }, null, 8, ["status"])
  80560. ],
  80561. 32
  80562. /* NEED_HYDRATION */
  80563. )
  80564. ])
  80565. ]),
  80566. _: 1
  80567. /* STABLE */
  80568. }, 8, ["show"]);
  80569. }
  80570. const SelectPopup = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g], ["__scopeId", "data-v-878522b0"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/chat/components/select-popup.vue"]]);
  80571. var uniSocket_io = { exports: {} };
  80572. (function(module, exports) {
  80573. !function(t2, e2) {
  80574. module.exports = e2();
  80575. }(window, function() {
  80576. return function(t2) {
  80577. var e2 = {};
  80578. function r2(n2) {
  80579. if (e2[n2])
  80580. return e2[n2].exports;
  80581. var o2 = e2[n2] = { i: n2, l: false, exports: {} };
  80582. return t2[n2].call(o2.exports, o2, o2.exports, r2), o2.l = true, o2.exports;
  80583. }
  80584. return r2.m = t2, r2.c = e2, r2.d = function(t3, e3, n2) {
  80585. r2.o(t3, e3) || Object.defineProperty(t3, e3, { enumerable: true, get: n2 });
  80586. }, r2.r = function(t3) {
  80587. "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t3, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t3, "__esModule", { value: true });
  80588. }, r2.t = function(t3, e3) {
  80589. if (1 & e3 && (t3 = r2(t3)), 8 & e3)
  80590. return t3;
  80591. if (4 & e3 && "object" == typeof t3 && t3 && t3.__esModule)
  80592. return t3;
  80593. var n2 = /* @__PURE__ */ Object.create(null);
  80594. if (r2.r(n2), Object.defineProperty(n2, "default", { enumerable: true, value: t3 }), 2 & e3 && "string" != typeof t3)
  80595. for (var o2 in t3)
  80596. r2.d(n2, o2, (function(e4) {
  80597. return t3[e4];
  80598. }).bind(null, o2));
  80599. return n2;
  80600. }, r2.n = function(t3) {
  80601. var e3 = t3 && t3.__esModule ? function() {
  80602. return t3.default;
  80603. } : function() {
  80604. return t3;
  80605. };
  80606. return r2.d(e3, "a", e3), e3;
  80607. }, r2.o = function(t3, e3) {
  80608. return Object.prototype.hasOwnProperty.call(t3, e3);
  80609. }, r2.p = "", r2(r2.s = 22);
  80610. }([function(t2, e2) {
  80611. t2.exports = function() {
  80612. return function() {
  80613. };
  80614. };
  80615. }, function(t2, e2, r2) {
  80616. function n2(t3) {
  80617. if (t3)
  80618. return function(t4) {
  80619. for (var e3 in n2.prototype)
  80620. t4[e3] = n2.prototype[e3];
  80621. return t4;
  80622. }(t3);
  80623. }
  80624. t2.exports = n2, n2.prototype.on = n2.prototype.addEventListener = function(t3, e3) {
  80625. return this._callbacks = this._callbacks || {}, (this._callbacks["$" + t3] = this._callbacks["$" + t3] || []).push(e3), this;
  80626. }, n2.prototype.once = function(t3, e3) {
  80627. function r3() {
  80628. this.off(t3, r3), e3.apply(this, arguments);
  80629. }
  80630. return r3.fn = e3, this.on(t3, r3), this;
  80631. }, n2.prototype.off = n2.prototype.removeListener = n2.prototype.removeAllListeners = n2.prototype.removeEventListener = function(t3, e3) {
  80632. if (this._callbacks = this._callbacks || {}, 0 == arguments.length)
  80633. return this._callbacks = {}, this;
  80634. var r3, n3 = this._callbacks["$" + t3];
  80635. if (!n3)
  80636. return this;
  80637. if (1 == arguments.length)
  80638. return delete this._callbacks["$" + t3], this;
  80639. for (var o2 = 0; o2 < n3.length; o2++)
  80640. if ((r3 = n3[o2]) === e3 || r3.fn === e3) {
  80641. n3.splice(o2, 1);
  80642. break;
  80643. }
  80644. return this;
  80645. }, n2.prototype.emit = function(t3) {
  80646. this._callbacks = this._callbacks || {};
  80647. var e3 = [].slice.call(arguments, 1), r3 = this._callbacks["$" + t3];
  80648. if (r3)
  80649. for (var n3 = 0, o2 = (r3 = r3.slice(0)).length; n3 < o2; ++n3)
  80650. r3[n3].apply(this, e3);
  80651. return this;
  80652. }, n2.prototype.listeners = function(t3) {
  80653. return this._callbacks = this._callbacks || {}, this._callbacks["$" + t3] || [];
  80654. }, n2.prototype.hasListeners = function(t3) {
  80655. return !!this.listeners(t3).length;
  80656. };
  80657. }, function(t2, e2, r2) {
  80658. var n2, o2 = r2(33), i2 = r2(16), s2 = r2(35), a2 = r2(36), c2 = r2(37);
  80659. "undefined" != typeof ArrayBuffer && (n2 = r2(38));
  80660. var h2 = "undefined" != typeof navigator && /Android/i.test(navigator.userAgent), u2 = "undefined" != typeof navigator && /PhantomJS/i.test(navigator.userAgent), f2 = h2 || u2;
  80661. e2.protocol = 3;
  80662. var p2 = e2.packets = { open: 0, close: 1, ping: 2, pong: 3, message: 4, upgrade: 5, noop: 6 }, l2 = o2(p2), d2 = { type: "error", data: "parser error" }, y2 = r2(39);
  80663. function g2(t3, e3, r3) {
  80664. for (var n3 = new Array(t3.length), o3 = a2(t3.length, r3), i3 = function(t4, r4, o4) {
  80665. e3(r4, function(e4, r5) {
  80666. n3[t4] = r5, o4(e4, n3);
  80667. });
  80668. }, s3 = 0; s3 < t3.length; s3++)
  80669. i3(s3, t3[s3], o3);
  80670. }
  80671. e2.encodePacket = function(t3, r3, n3, o3) {
  80672. "function" == typeof r3 && (o3 = r3, r3 = false), "function" == typeof n3 && (o3 = n3, n3 = null);
  80673. var i3 = void 0 === t3.data ? void 0 : t3.data.buffer || t3.data;
  80674. if ("undefined" != typeof ArrayBuffer && i3 instanceof ArrayBuffer)
  80675. return function(t4, r4, n4) {
  80676. if (!r4)
  80677. return e2.encodeBase64Packet(t4, n4);
  80678. var o4 = t4.data, i4 = new Uint8Array(o4), s4 = new Uint8Array(1 + o4.byteLength);
  80679. s4[0] = p2[t4.type];
  80680. for (var a3 = 0; a3 < i4.length; a3++)
  80681. s4[a3 + 1] = i4[a3];
  80682. return n4(s4.buffer);
  80683. }(t3, r3, o3);
  80684. if (void 0 !== y2 && i3 instanceof y2)
  80685. return function(t4, r4, n4) {
  80686. if (!r4)
  80687. return e2.encodeBase64Packet(t4, n4);
  80688. if (f2)
  80689. return function(t5, r5, n5) {
  80690. if (!r5)
  80691. return e2.encodeBase64Packet(t5, n5);
  80692. var o5 = new FileReader();
  80693. return o5.onload = function() {
  80694. e2.encodePacket({ type: t5.type, data: o5.result }, r5, true, n5);
  80695. }, o5.readAsArrayBuffer(t5.data);
  80696. }(t4, r4, n4);
  80697. var o4 = new Uint8Array(1);
  80698. o4[0] = p2[t4.type];
  80699. var i4 = new y2([o4.buffer, t4.data]);
  80700. return n4(i4);
  80701. }(t3, r3, o3);
  80702. if (i3 && i3.base64)
  80703. return function(t4, r4) {
  80704. var n4 = "b" + e2.packets[t4.type] + t4.data.data;
  80705. return r4(n4);
  80706. }(t3, o3);
  80707. var s3 = p2[t3.type];
  80708. return void 0 !== t3.data && (s3 += n3 ? c2.encode(String(t3.data), { strict: false }) : String(t3.data)), o3("" + s3);
  80709. }, e2.encodeBase64Packet = function(t3, r3) {
  80710. var n3, o3 = "b" + e2.packets[t3.type];
  80711. if (void 0 !== y2 && t3.data instanceof y2) {
  80712. var i3 = new FileReader();
  80713. return i3.onload = function() {
  80714. var t4 = i3.result.split(",")[1];
  80715. r3(o3 + t4);
  80716. }, i3.readAsDataURL(t3.data);
  80717. }
  80718. try {
  80719. n3 = String.fromCharCode.apply(null, new Uint8Array(t3.data));
  80720. } catch (e3) {
  80721. for (var s3 = new Uint8Array(t3.data), a3 = new Array(s3.length), c3 = 0; c3 < s3.length; c3++)
  80722. a3[c3] = s3[c3];
  80723. n3 = String.fromCharCode.apply(null, a3);
  80724. }
  80725. return o3 += btoa(n3), r3(o3);
  80726. }, e2.decodePacket = function(t3, r3, n3) {
  80727. if (void 0 === t3)
  80728. return d2;
  80729. if ("string" == typeof t3) {
  80730. if ("b" === t3.charAt(0))
  80731. return e2.decodeBase64Packet(t3.substr(1), r3);
  80732. if (n3 && false === (t3 = function(t4) {
  80733. try {
  80734. t4 = c2.decode(t4, { strict: false });
  80735. } catch (t5) {
  80736. return false;
  80737. }
  80738. return t4;
  80739. }(t3)))
  80740. return d2;
  80741. var o3 = t3.charAt(0);
  80742. return Number(o3) == o3 && l2[o3] ? t3.length > 1 ? { type: l2[o3], data: t3.substring(1) } : { type: l2[o3] } : d2;
  80743. }
  80744. o3 = new Uint8Array(t3)[0];
  80745. var i3 = s2(t3, 1);
  80746. return y2 && "blob" === r3 && (i3 = new y2([i3])), { type: l2[o3], data: i3 };
  80747. }, e2.decodeBase64Packet = function(t3, e3) {
  80748. var r3 = l2[t3.charAt(0)];
  80749. if (!n2)
  80750. return { type: r3, data: { base64: true, data: t3.substr(1) } };
  80751. var o3 = n2.decode(t3.substr(1));
  80752. return "blob" === e3 && y2 && (o3 = new y2([o3])), { type: r3, data: o3 };
  80753. }, e2.encodePayload = function(t3, r3, n3) {
  80754. "function" == typeof r3 && (n3 = r3, r3 = null);
  80755. var o3 = i2(t3);
  80756. if (r3 && o3)
  80757. return y2 && !f2 ? e2.encodePayloadAsBlob(t3, n3) : e2.encodePayloadAsArrayBuffer(t3, n3);
  80758. if (!t3.length)
  80759. return n3("0:");
  80760. g2(t3, function(t4, n4) {
  80761. e2.encodePacket(t4, !!o3 && r3, false, function(t5) {
  80762. n4(null, function(t6) {
  80763. return t6.length + ":" + t6;
  80764. }(t5));
  80765. });
  80766. }, function(t4, e3) {
  80767. return n3(e3.join(""));
  80768. });
  80769. }, e2.decodePayload = function(t3, r3, n3) {
  80770. if ("string" != typeof t3)
  80771. return e2.decodePayloadAsBinary(t3, r3, n3);
  80772. var o3;
  80773. if ("function" == typeof r3 && (n3 = r3, r3 = null), "" === t3)
  80774. return n3(d2, 0, 1);
  80775. for (var i3, s3, a3 = "", c3 = 0, h3 = t3.length; c3 < h3; c3++) {
  80776. var u3 = t3.charAt(c3);
  80777. if (":" === u3) {
  80778. if ("" === a3 || a3 != (i3 = Number(a3)))
  80779. return n3(d2, 0, 1);
  80780. if (a3 != (s3 = t3.substr(c3 + 1, i3)).length)
  80781. return n3(d2, 0, 1);
  80782. if (s3.length) {
  80783. if (o3 = e2.decodePacket(s3, r3, false), d2.type === o3.type && d2.data === o3.data)
  80784. return n3(d2, 0, 1);
  80785. if (false === n3(o3, c3 + i3, h3))
  80786. return;
  80787. }
  80788. c3 += i3, a3 = "";
  80789. } else
  80790. a3 += u3;
  80791. }
  80792. return "" !== a3 ? n3(d2, 0, 1) : void 0;
  80793. }, e2.encodePayloadAsArrayBuffer = function(t3, r3) {
  80794. if (!t3.length)
  80795. return r3(new ArrayBuffer(0));
  80796. g2(t3, function(t4, r4) {
  80797. e2.encodePacket(t4, true, true, function(t5) {
  80798. return r4(null, t5);
  80799. });
  80800. }, function(t4, e3) {
  80801. var n3 = e3.reduce(function(t5, e4) {
  80802. var r4;
  80803. return t5 + (r4 = "string" == typeof e4 ? e4.length : e4.byteLength).toString().length + r4 + 2;
  80804. }, 0), o3 = new Uint8Array(n3), i3 = 0;
  80805. return e3.forEach(function(t5) {
  80806. var e4 = "string" == typeof t5, r4 = t5;
  80807. if (e4) {
  80808. for (var n4 = new Uint8Array(t5.length), s3 = 0; s3 < t5.length; s3++)
  80809. n4[s3] = t5.charCodeAt(s3);
  80810. r4 = n4.buffer;
  80811. }
  80812. o3[i3++] = e4 ? 0 : 1;
  80813. var a3 = r4.byteLength.toString();
  80814. for (s3 = 0; s3 < a3.length; s3++)
  80815. o3[i3++] = parseInt(a3[s3]);
  80816. o3[i3++] = 255;
  80817. for (n4 = new Uint8Array(r4), s3 = 0; s3 < n4.length; s3++)
  80818. o3[i3++] = n4[s3];
  80819. }), r3(o3.buffer);
  80820. });
  80821. }, e2.encodePayloadAsBlob = function(t3, r3) {
  80822. g2(t3, function(t4, r4) {
  80823. e2.encodePacket(t4, true, true, function(t5) {
  80824. var e3 = new Uint8Array(1);
  80825. if (e3[0] = 1, "string" == typeof t5) {
  80826. for (var n3 = new Uint8Array(t5.length), o3 = 0; o3 < t5.length; o3++)
  80827. n3[o3] = t5.charCodeAt(o3);
  80828. t5 = n3.buffer, e3[0] = 0;
  80829. }
  80830. var i3 = (t5 instanceof ArrayBuffer ? t5.byteLength : t5.size).toString(), s3 = new Uint8Array(i3.length + 1);
  80831. for (o3 = 0; o3 < i3.length; o3++)
  80832. s3[o3] = parseInt(i3[o3]);
  80833. if (s3[i3.length] = 255, y2) {
  80834. var a3 = new y2([e3.buffer, s3.buffer, t5]);
  80835. r4(null, a3);
  80836. }
  80837. });
  80838. }, function(t4, e3) {
  80839. return r3(new y2(e3));
  80840. });
  80841. }, e2.decodePayloadAsBinary = function(t3, r3, n3) {
  80842. "function" == typeof r3 && (n3 = r3, r3 = null);
  80843. for (var o3 = t3, i3 = []; o3.byteLength > 0; ) {
  80844. for (var a3 = new Uint8Array(o3), c3 = 0 === a3[0], h3 = "", u3 = 1; 255 !== a3[u3]; u3++) {
  80845. if (h3.length > 310)
  80846. return n3(d2, 0, 1);
  80847. h3 += a3[u3];
  80848. }
  80849. o3 = s2(o3, 2 + h3.length), h3 = parseInt(h3);
  80850. var f3 = s2(o3, 0, h3);
  80851. if (c3)
  80852. try {
  80853. f3 = String.fromCharCode.apply(null, new Uint8Array(f3));
  80854. } catch (t4) {
  80855. var p3 = new Uint8Array(f3);
  80856. f3 = "";
  80857. for (u3 = 0; u3 < p3.length; u3++)
  80858. f3 += String.fromCharCode(p3[u3]);
  80859. }
  80860. i3.push(f3), o3 = s2(o3, h3);
  80861. }
  80862. var l3 = i3.length;
  80863. i3.forEach(function(t4, o4) {
  80864. n3(e2.decodePacket(t4, r3, true), o4, l3);
  80865. });
  80866. };
  80867. }, function(t2, e2) {
  80868. e2.encode = function(t3) {
  80869. var e3 = "";
  80870. for (var r2 in t3)
  80871. t3.hasOwnProperty(r2) && (e3.length && (e3 += "&"), e3 += encodeURIComponent(r2) + "=" + encodeURIComponent(t3[r2]));
  80872. return e3;
  80873. }, e2.decode = function(t3) {
  80874. for (var e3 = {}, r2 = t3.split("&"), n2 = 0, o2 = r2.length; n2 < o2; n2++) {
  80875. var i2 = r2[n2].split("=");
  80876. e3[decodeURIComponent(i2[0])] = decodeURIComponent(i2[1]);
  80877. }
  80878. return e3;
  80879. };
  80880. }, function(t2, e2) {
  80881. t2.exports = function(t3, e3) {
  80882. var r2 = function() {
  80883. };
  80884. r2.prototype = e3.prototype, t3.prototype = new r2(), t3.prototype.constructor = t3;
  80885. };
  80886. }, function(t2, e2, r2) {
  80887. var n2 = r2(0)("socket.io-parser"), o2 = r2(1), i2 = r2(25), s2 = r2(10), a2 = r2(11);
  80888. function c2() {
  80889. }
  80890. e2.protocol = 4, e2.types = ["CONNECT", "DISCONNECT", "EVENT", "ACK", "ERROR", "BINARY_EVENT", "BINARY_ACK"], e2.CONNECT = 0, e2.DISCONNECT = 1, e2.EVENT = 2, e2.ACK = 3, e2.ERROR = 4, e2.BINARY_EVENT = 5, e2.BINARY_ACK = 6, e2.Encoder = c2, e2.Decoder = f2;
  80891. var h2 = e2.ERROR + '"encode error"';
  80892. function u2(t3) {
  80893. var r3 = "" + t3.type;
  80894. if (e2.BINARY_EVENT !== t3.type && e2.BINARY_ACK !== t3.type || (r3 += t3.attachments + "-"), t3.nsp && "/" !== t3.nsp && (r3 += t3.nsp + ","), null != t3.id && (r3 += t3.id), null != t3.data) {
  80895. var o3 = function(t4) {
  80896. try {
  80897. return JSON.stringify(t4);
  80898. } catch (t5) {
  80899. return false;
  80900. }
  80901. }(t3.data);
  80902. if (false === o3)
  80903. return h2;
  80904. r3 += o3;
  80905. }
  80906. return n2("encoded %j as %s", t3, r3), r3;
  80907. }
  80908. function f2() {
  80909. this.reconstructor = null;
  80910. }
  80911. function p2(t3) {
  80912. this.reconPack = t3, this.buffers = [];
  80913. }
  80914. function l2(t3) {
  80915. return { type: e2.ERROR, data: "parser error: " + t3 };
  80916. }
  80917. c2.prototype.encode = function(t3, r3) {
  80918. (n2("encoding packet %j", t3), e2.BINARY_EVENT === t3.type || e2.BINARY_ACK === t3.type) ? function(t4, e3) {
  80919. i2.removeBlobs(t4, function(t5) {
  80920. var r4 = i2.deconstructPacket(t5), n3 = u2(r4.packet), o3 = r4.buffers;
  80921. o3.unshift(n3), e3(o3);
  80922. });
  80923. }(t3, r3) : r3([u2(t3)]);
  80924. }, o2(f2.prototype), f2.prototype.add = function(t3) {
  80925. var r3;
  80926. if ("string" == typeof t3)
  80927. r3 = function(t4) {
  80928. var r4 = 0, o3 = { type: Number(t4.charAt(0)) };
  80929. if (null == e2.types[o3.type])
  80930. return l2("unknown packet type " + o3.type);
  80931. if (e2.BINARY_EVENT === o3.type || e2.BINARY_ACK === o3.type) {
  80932. for (var i3 = ""; "-" !== t4.charAt(++r4) && (i3 += t4.charAt(r4), r4 != t4.length); )
  80933. ;
  80934. if (i3 != Number(i3) || "-" !== t4.charAt(r4))
  80935. throw new Error("Illegal attachments");
  80936. o3.attachments = Number(i3);
  80937. }
  80938. if ("/" === t4.charAt(r4 + 1))
  80939. for (o3.nsp = ""; ++r4; ) {
  80940. if ("," === (c3 = t4.charAt(r4)))
  80941. break;
  80942. if (o3.nsp += c3, r4 === t4.length)
  80943. break;
  80944. }
  80945. else
  80946. o3.nsp = "/";
  80947. var a3 = t4.charAt(r4 + 1);
  80948. if ("" !== a3 && Number(a3) == a3) {
  80949. for (o3.id = ""; ++r4; ) {
  80950. var c3;
  80951. if (null == (c3 = t4.charAt(r4)) || Number(c3) != c3) {
  80952. --r4;
  80953. break;
  80954. }
  80955. if (o3.id += t4.charAt(r4), r4 === t4.length)
  80956. break;
  80957. }
  80958. o3.id = Number(o3.id);
  80959. }
  80960. if (t4.charAt(++r4)) {
  80961. var h3 = function(t5) {
  80962. try {
  80963. return JSON.parse(t5);
  80964. } catch (t6) {
  80965. return false;
  80966. }
  80967. }(t4.substr(r4));
  80968. if (!(false !== h3 && (o3.type === e2.ERROR || s2(h3))))
  80969. return l2("invalid payload");
  80970. o3.data = h3;
  80971. }
  80972. return n2("decoded %s as %j", t4, o3), o3;
  80973. }(t3), e2.BINARY_EVENT === r3.type || e2.BINARY_ACK === r3.type ? (this.reconstructor = new p2(r3), 0 === this.reconstructor.reconPack.attachments && this.emit("decoded", r3)) : this.emit("decoded", r3);
  80974. else {
  80975. if (!a2(t3) && !t3.base64)
  80976. throw new Error("Unknown type: " + t3);
  80977. if (!this.reconstructor)
  80978. throw new Error("got binary data when not reconstructing a packet");
  80979. (r3 = this.reconstructor.takeBinaryData(t3)) && (this.reconstructor = null, this.emit("decoded", r3));
  80980. }
  80981. }, f2.prototype.destroy = function() {
  80982. this.reconstructor && this.reconstructor.finishedReconstruction();
  80983. }, p2.prototype.takeBinaryData = function(t3) {
  80984. if (this.buffers.push(t3), this.buffers.length === this.reconPack.attachments) {
  80985. var e3 = i2.reconstructPacket(this.reconPack, this.buffers);
  80986. return this.finishedReconstruction(), e3;
  80987. }
  80988. return null;
  80989. }, p2.prototype.finishedReconstruction = function() {
  80990. this.reconPack = null, this.buffers = [];
  80991. };
  80992. }, function(t2, e2, r2) {
  80993. (function(t3) {
  80994. /*!
  80995. * The buffer module from node.js, for the browser.
  80996. *
  80997. * @author Feross Aboukhadijeh <http://feross.org>
  80998. * @license MIT
  80999. */
  81000. var n2 = r2(26), o2 = r2(27), i2 = r2(28);
  81001. function s2() {
  81002. return c2.TYPED_ARRAY_SUPPORT ? 2147483647 : 1073741823;
  81003. }
  81004. function a2(t4, e3) {
  81005. if (s2() < e3)
  81006. throw new RangeError("Invalid typed array length");
  81007. return c2.TYPED_ARRAY_SUPPORT ? (t4 = new Uint8Array(e3)).__proto__ = c2.prototype : (null === t4 && (t4 = new c2(e3)), t4.length = e3), t4;
  81008. }
  81009. function c2(t4, e3, r3) {
  81010. if (!(c2.TYPED_ARRAY_SUPPORT || this instanceof c2))
  81011. return new c2(t4, e3, r3);
  81012. if ("number" == typeof t4) {
  81013. if ("string" == typeof e3)
  81014. throw new Error("If encoding is specified then the first argument must be a string");
  81015. return f2(this, t4);
  81016. }
  81017. return h2(this, t4, e3, r3);
  81018. }
  81019. function h2(t4, e3, r3, n3) {
  81020. if ("number" == typeof e3)
  81021. throw new TypeError('"value" argument must not be a number');
  81022. return "undefined" != typeof ArrayBuffer && e3 instanceof ArrayBuffer ? function(t5, e4, r4, n4) {
  81023. if (e4.byteLength, r4 < 0 || e4.byteLength < r4)
  81024. throw new RangeError("'offset' is out of bounds");
  81025. if (e4.byteLength < r4 + (n4 || 0))
  81026. throw new RangeError("'length' is out of bounds");
  81027. e4 = void 0 === r4 && void 0 === n4 ? new Uint8Array(e4) : void 0 === n4 ? new Uint8Array(e4, r4) : new Uint8Array(e4, r4, n4);
  81028. c2.TYPED_ARRAY_SUPPORT ? (t5 = e4).__proto__ = c2.prototype : t5 = p2(t5, e4);
  81029. return t5;
  81030. }(t4, e3, r3, n3) : "string" == typeof e3 ? function(t5, e4, r4) {
  81031. "string" == typeof r4 && "" !== r4 || (r4 = "utf8");
  81032. if (!c2.isEncoding(r4))
  81033. throw new TypeError('"encoding" must be a valid string encoding');
  81034. var n4 = 0 | d2(e4, r4), o3 = (t5 = a2(t5, n4)).write(e4, r4);
  81035. o3 !== n4 && (t5 = t5.slice(0, o3));
  81036. return t5;
  81037. }(t4, e3, r3) : function(t5, e4) {
  81038. if (c2.isBuffer(e4)) {
  81039. var r4 = 0 | l2(e4.length);
  81040. return 0 === (t5 = a2(t5, r4)).length || e4.copy(t5, 0, 0, r4), t5;
  81041. }
  81042. if (e4) {
  81043. if ("undefined" != typeof ArrayBuffer && e4.buffer instanceof ArrayBuffer || "length" in e4)
  81044. return "number" != typeof e4.length || (n4 = e4.length) != n4 ? a2(t5, 0) : p2(t5, e4);
  81045. if ("Buffer" === e4.type && i2(e4.data))
  81046. return p2(t5, e4.data);
  81047. }
  81048. var n4;
  81049. throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.");
  81050. }(t4, e3);
  81051. }
  81052. function u2(t4) {
  81053. if ("number" != typeof t4)
  81054. throw new TypeError('"size" argument must be a number');
  81055. if (t4 < 0)
  81056. throw new RangeError('"size" argument must not be negative');
  81057. }
  81058. function f2(t4, e3) {
  81059. if (u2(e3), t4 = a2(t4, e3 < 0 ? 0 : 0 | l2(e3)), !c2.TYPED_ARRAY_SUPPORT)
  81060. for (var r3 = 0; r3 < e3; ++r3)
  81061. t4[r3] = 0;
  81062. return t4;
  81063. }
  81064. function p2(t4, e3) {
  81065. var r3 = e3.length < 0 ? 0 : 0 | l2(e3.length);
  81066. t4 = a2(t4, r3);
  81067. for (var n3 = 0; n3 < r3; n3 += 1)
  81068. t4[n3] = 255 & e3[n3];
  81069. return t4;
  81070. }
  81071. function l2(t4) {
  81072. if (t4 >= s2())
  81073. throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + s2().toString(16) + " bytes");
  81074. return 0 | t4;
  81075. }
  81076. function d2(t4, e3) {
  81077. if (c2.isBuffer(t4))
  81078. return t4.length;
  81079. if ("undefined" != typeof ArrayBuffer && "function" == typeof ArrayBuffer.isView && (ArrayBuffer.isView(t4) || t4 instanceof ArrayBuffer))
  81080. return t4.byteLength;
  81081. "string" != typeof t4 && (t4 = "" + t4);
  81082. var r3 = t4.length;
  81083. if (0 === r3)
  81084. return 0;
  81085. for (var n3 = false; ; )
  81086. switch (e3) {
  81087. case "ascii":
  81088. case "latin1":
  81089. case "binary":
  81090. return r3;
  81091. case "utf8":
  81092. case "utf-8":
  81093. case void 0:
  81094. return q2(t4).length;
  81095. case "ucs2":
  81096. case "ucs-2":
  81097. case "utf16le":
  81098. case "utf-16le":
  81099. return 2 * r3;
  81100. case "hex":
  81101. return r3 >>> 1;
  81102. case "base64":
  81103. return Y2(t4).length;
  81104. default:
  81105. if (n3)
  81106. return q2(t4).length;
  81107. e3 = ("" + e3).toLowerCase(), n3 = true;
  81108. }
  81109. }
  81110. function y2(t4, e3, r3) {
  81111. var n3 = false;
  81112. if ((void 0 === e3 || e3 < 0) && (e3 = 0), e3 > this.length)
  81113. return "";
  81114. if ((void 0 === r3 || r3 > this.length) && (r3 = this.length), r3 <= 0)
  81115. return "";
  81116. if ((r3 >>>= 0) <= (e3 >>>= 0))
  81117. return "";
  81118. for (t4 || (t4 = "utf8"); ; )
  81119. switch (t4) {
  81120. case "hex":
  81121. return C2(this, e3, r3);
  81122. case "utf8":
  81123. case "utf-8":
  81124. return x(this, e3, r3);
  81125. case "ascii":
  81126. return R2(this, e3, r3);
  81127. case "latin1":
  81128. case "binary":
  81129. return S2(this, e3, r3);
  81130. case "base64":
  81131. return _2(this, e3, r3);
  81132. case "ucs2":
  81133. case "ucs-2":
  81134. case "utf16le":
  81135. case "utf-16le":
  81136. return P2(this, e3, r3);
  81137. default:
  81138. if (n3)
  81139. throw new TypeError("Unknown encoding: " + t4);
  81140. t4 = (t4 + "").toLowerCase(), n3 = true;
  81141. }
  81142. }
  81143. function g2(t4, e3, r3) {
  81144. var n3 = t4[e3];
  81145. t4[e3] = t4[r3], t4[r3] = n3;
  81146. }
  81147. function v2(t4, e3, r3, n3, o3) {
  81148. if (0 === t4.length)
  81149. return -1;
  81150. if ("string" == typeof r3 ? (n3 = r3, r3 = 0) : r3 > 2147483647 ? r3 = 2147483647 : r3 < -2147483648 && (r3 = -2147483648), r3 = +r3, isNaN(r3) && (r3 = o3 ? 0 : t4.length - 1), r3 < 0 && (r3 = t4.length + r3), r3 >= t4.length) {
  81151. if (o3)
  81152. return -1;
  81153. r3 = t4.length - 1;
  81154. } else if (r3 < 0) {
  81155. if (!o3)
  81156. return -1;
  81157. r3 = 0;
  81158. }
  81159. if ("string" == typeof e3 && (e3 = c2.from(e3, n3)), c2.isBuffer(e3))
  81160. return 0 === e3.length ? -1 : m2(t4, e3, r3, n3, o3);
  81161. if ("number" == typeof e3)
  81162. return e3 &= 255, c2.TYPED_ARRAY_SUPPORT && "function" == typeof Uint8Array.prototype.indexOf ? o3 ? Uint8Array.prototype.indexOf.call(t4, e3, r3) : Uint8Array.prototype.lastIndexOf.call(t4, e3, r3) : m2(t4, [e3], r3, n3, o3);
  81163. throw new TypeError("val must be string, number or Buffer");
  81164. }
  81165. function m2(t4, e3, r3, n3, o3) {
  81166. var i3, s3 = 1, a3 = t4.length, c3 = e3.length;
  81167. if (void 0 !== n3 && ("ucs2" === (n3 = String(n3).toLowerCase()) || "ucs-2" === n3 || "utf16le" === n3 || "utf-16le" === n3)) {
  81168. if (t4.length < 2 || e3.length < 2)
  81169. return -1;
  81170. s3 = 2, a3 /= 2, c3 /= 2, r3 /= 2;
  81171. }
  81172. function h3(t5, e4) {
  81173. return 1 === s3 ? t5[e4] : t5.readUInt16BE(e4 * s3);
  81174. }
  81175. if (o3) {
  81176. var u3 = -1;
  81177. for (i3 = r3; i3 < a3; i3++)
  81178. if (h3(t4, i3) === h3(e3, -1 === u3 ? 0 : i3 - u3)) {
  81179. if (-1 === u3 && (u3 = i3), i3 - u3 + 1 === c3)
  81180. return u3 * s3;
  81181. } else
  81182. -1 !== u3 && (i3 -= i3 - u3), u3 = -1;
  81183. } else
  81184. for (r3 + c3 > a3 && (r3 = a3 - c3), i3 = r3; i3 >= 0; i3--) {
  81185. for (var f3 = true, p3 = 0; p3 < c3; p3++)
  81186. if (h3(t4, i3 + p3) !== h3(e3, p3)) {
  81187. f3 = false;
  81188. break;
  81189. }
  81190. if (f3)
  81191. return i3;
  81192. }
  81193. return -1;
  81194. }
  81195. function b2(t4, e3, r3, n3) {
  81196. r3 = Number(r3) || 0;
  81197. var o3 = t4.length - r3;
  81198. n3 ? (n3 = Number(n3)) > o3 && (n3 = o3) : n3 = o3;
  81199. var i3 = e3.length;
  81200. if (i3 % 2 != 0)
  81201. throw new TypeError("Invalid hex string");
  81202. n3 > i3 / 2 && (n3 = i3 / 2);
  81203. for (var s3 = 0; s3 < n3; ++s3) {
  81204. var a3 = parseInt(e3.substr(2 * s3, 2), 16);
  81205. if (isNaN(a3))
  81206. return s3;
  81207. t4[r3 + s3] = a3;
  81208. }
  81209. return s3;
  81210. }
  81211. function w2(t4, e3, r3, n3) {
  81212. return H2(q2(e3, t4.length - r3), t4, r3, n3);
  81213. }
  81214. function A2(t4, e3, r3, n3) {
  81215. return H2(function(t5) {
  81216. for (var e4 = [], r4 = 0; r4 < t5.length; ++r4)
  81217. e4.push(255 & t5.charCodeAt(r4));
  81218. return e4;
  81219. }(e3), t4, r3, n3);
  81220. }
  81221. function k(t4, e3, r3, n3) {
  81222. return A2(t4, e3, r3, n3);
  81223. }
  81224. function E2(t4, e3, r3, n3) {
  81225. return H2(Y2(e3), t4, r3, n3);
  81226. }
  81227. function B2(t4, e3, r3, n3) {
  81228. return H2(function(t5, e4) {
  81229. for (var r4, n4, o3, i3 = [], s3 = 0; s3 < t5.length && !((e4 -= 2) < 0); ++s3)
  81230. r4 = t5.charCodeAt(s3), n4 = r4 >> 8, o3 = r4 % 256, i3.push(o3), i3.push(n4);
  81231. return i3;
  81232. }(e3, t4.length - r3), t4, r3, n3);
  81233. }
  81234. function _2(t4, e3, r3) {
  81235. return 0 === e3 && r3 === t4.length ? n2.fromByteArray(t4) : n2.fromByteArray(t4.slice(e3, r3));
  81236. }
  81237. function x(t4, e3, r3) {
  81238. r3 = Math.min(t4.length, r3);
  81239. for (var n3 = [], o3 = e3; o3 < r3; ) {
  81240. var i3, s3, a3, c3, h3 = t4[o3], u3 = null, f3 = h3 > 239 ? 4 : h3 > 223 ? 3 : h3 > 191 ? 2 : 1;
  81241. if (o3 + f3 <= r3)
  81242. switch (f3) {
  81243. case 1:
  81244. h3 < 128 && (u3 = h3);
  81245. break;
  81246. case 2:
  81247. 128 == (192 & (i3 = t4[o3 + 1])) && (c3 = (31 & h3) << 6 | 63 & i3) > 127 && (u3 = c3);
  81248. break;
  81249. case 3:
  81250. i3 = t4[o3 + 1], s3 = t4[o3 + 2], 128 == (192 & i3) && 128 == (192 & s3) && (c3 = (15 & h3) << 12 | (63 & i3) << 6 | 63 & s3) > 2047 && (c3 < 55296 || c3 > 57343) && (u3 = c3);
  81251. break;
  81252. case 4:
  81253. i3 = t4[o3 + 1], s3 = t4[o3 + 2], a3 = t4[o3 + 3], 128 == (192 & i3) && 128 == (192 & s3) && 128 == (192 & a3) && (c3 = (15 & h3) << 18 | (63 & i3) << 12 | (63 & s3) << 6 | 63 & a3) > 65535 && c3 < 1114112 && (u3 = c3);
  81254. }
  81255. null === u3 ? (u3 = 65533, f3 = 1) : u3 > 65535 && (u3 -= 65536, n3.push(u3 >>> 10 & 1023 | 55296), u3 = 56320 | 1023 & u3), n3.push(u3), o3 += f3;
  81256. }
  81257. return function(t5) {
  81258. var e4 = t5.length;
  81259. if (e4 <= 4096)
  81260. return String.fromCharCode.apply(String, t5);
  81261. var r4 = "", n4 = 0;
  81262. for (; n4 < e4; )
  81263. r4 += String.fromCharCode.apply(String, t5.slice(n4, n4 += 4096));
  81264. return r4;
  81265. }(n3);
  81266. }
  81267. e2.Buffer = c2, e2.SlowBuffer = function(t4) {
  81268. +t4 != t4 && (t4 = 0);
  81269. return c2.alloc(+t4);
  81270. }, e2.INSPECT_MAX_BYTES = 50, c2.TYPED_ARRAY_SUPPORT = void 0 !== t3.TYPED_ARRAY_SUPPORT ? t3.TYPED_ARRAY_SUPPORT : function() {
  81271. try {
  81272. var t4 = new Uint8Array(1);
  81273. return t4.__proto__ = { __proto__: Uint8Array.prototype, foo: function() {
  81274. return 42;
  81275. } }, 42 === t4.foo() && "function" == typeof t4.subarray && 0 === t4.subarray(1, 1).byteLength;
  81276. } catch (t5) {
  81277. return false;
  81278. }
  81279. }(), e2.kMaxLength = s2(), c2.poolSize = 8192, c2._augment = function(t4) {
  81280. return t4.__proto__ = c2.prototype, t4;
  81281. }, c2.from = function(t4, e3, r3) {
  81282. return h2(null, t4, e3, r3);
  81283. }, c2.TYPED_ARRAY_SUPPORT && (c2.prototype.__proto__ = Uint8Array.prototype, c2.__proto__ = Uint8Array, "undefined" != typeof Symbol && Symbol.species && c2[Symbol.species] === c2 && Object.defineProperty(c2, Symbol.species, { value: null, configurable: true })), c2.alloc = function(t4, e3, r3) {
  81284. return function(t5, e4, r4, n3) {
  81285. return u2(e4), e4 <= 0 ? a2(t5, e4) : void 0 !== r4 ? "string" == typeof n3 ? a2(t5, e4).fill(r4, n3) : a2(t5, e4).fill(r4) : a2(t5, e4);
  81286. }(null, t4, e3, r3);
  81287. }, c2.allocUnsafe = function(t4) {
  81288. return f2(null, t4);
  81289. }, c2.allocUnsafeSlow = function(t4) {
  81290. return f2(null, t4);
  81291. }, c2.isBuffer = function(t4) {
  81292. return !(null == t4 || !t4._isBuffer);
  81293. }, c2.compare = function(t4, e3) {
  81294. if (!c2.isBuffer(t4) || !c2.isBuffer(e3))
  81295. throw new TypeError("Arguments must be Buffers");
  81296. if (t4 === e3)
  81297. return 0;
  81298. for (var r3 = t4.length, n3 = e3.length, o3 = 0, i3 = Math.min(r3, n3); o3 < i3; ++o3)
  81299. if (t4[o3] !== e3[o3]) {
  81300. r3 = t4[o3], n3 = e3[o3];
  81301. break;
  81302. }
  81303. return r3 < n3 ? -1 : n3 < r3 ? 1 : 0;
  81304. }, c2.isEncoding = function(t4) {
  81305. switch (String(t4).toLowerCase()) {
  81306. case "hex":
  81307. case "utf8":
  81308. case "utf-8":
  81309. case "ascii":
  81310. case "latin1":
  81311. case "binary":
  81312. case "base64":
  81313. case "ucs2":
  81314. case "ucs-2":
  81315. case "utf16le":
  81316. case "utf-16le":
  81317. return true;
  81318. default:
  81319. return false;
  81320. }
  81321. }, c2.concat = function(t4, e3) {
  81322. if (!i2(t4))
  81323. throw new TypeError('"list" argument must be an Array of Buffers');
  81324. if (0 === t4.length)
  81325. return c2.alloc(0);
  81326. var r3;
  81327. if (void 0 === e3)
  81328. for (e3 = 0, r3 = 0; r3 < t4.length; ++r3)
  81329. e3 += t4[r3].length;
  81330. var n3 = c2.allocUnsafe(e3), o3 = 0;
  81331. for (r3 = 0; r3 < t4.length; ++r3) {
  81332. var s3 = t4[r3];
  81333. if (!c2.isBuffer(s3))
  81334. throw new TypeError('"list" argument must be an Array of Buffers');
  81335. s3.copy(n3, o3), o3 += s3.length;
  81336. }
  81337. return n3;
  81338. }, c2.byteLength = d2, c2.prototype._isBuffer = true, c2.prototype.swap16 = function() {
  81339. var t4 = this.length;
  81340. if (t4 % 2 != 0)
  81341. throw new RangeError("Buffer size must be a multiple of 16-bits");
  81342. for (var e3 = 0; e3 < t4; e3 += 2)
  81343. g2(this, e3, e3 + 1);
  81344. return this;
  81345. }, c2.prototype.swap32 = function() {
  81346. var t4 = this.length;
  81347. if (t4 % 4 != 0)
  81348. throw new RangeError("Buffer size must be a multiple of 32-bits");
  81349. for (var e3 = 0; e3 < t4; e3 += 4)
  81350. g2(this, e3, e3 + 3), g2(this, e3 + 1, e3 + 2);
  81351. return this;
  81352. }, c2.prototype.swap64 = function() {
  81353. var t4 = this.length;
  81354. if (t4 % 8 != 0)
  81355. throw new RangeError("Buffer size must be a multiple of 64-bits");
  81356. for (var e3 = 0; e3 < t4; e3 += 8)
  81357. g2(this, e3, e3 + 7), g2(this, e3 + 1, e3 + 6), g2(this, e3 + 2, e3 + 5), g2(this, e3 + 3, e3 + 4);
  81358. return this;
  81359. }, c2.prototype.toString = function() {
  81360. var t4 = 0 | this.length;
  81361. return 0 === t4 ? "" : 0 === arguments.length ? x(this, 0, t4) : y2.apply(this, arguments);
  81362. }, c2.prototype.equals = function(t4) {
  81363. if (!c2.isBuffer(t4))
  81364. throw new TypeError("Argument must be a Buffer");
  81365. return this === t4 || 0 === c2.compare(this, t4);
  81366. }, c2.prototype.inspect = function() {
  81367. var t4 = "", r3 = e2.INSPECT_MAX_BYTES;
  81368. return this.length > 0 && (t4 = this.toString("hex", 0, r3).match(/.{2}/g).join(" "), this.length > r3 && (t4 += " ... ")), "<Buffer " + t4 + ">";
  81369. }, c2.prototype.compare = function(t4, e3, r3, n3, o3) {
  81370. if (!c2.isBuffer(t4))
  81371. throw new TypeError("Argument must be a Buffer");
  81372. if (void 0 === e3 && (e3 = 0), void 0 === r3 && (r3 = t4 ? t4.length : 0), void 0 === n3 && (n3 = 0), void 0 === o3 && (o3 = this.length), e3 < 0 || r3 > t4.length || n3 < 0 || o3 > this.length)
  81373. throw new RangeError("out of range index");
  81374. if (n3 >= o3 && e3 >= r3)
  81375. return 0;
  81376. if (n3 >= o3)
  81377. return -1;
  81378. if (e3 >= r3)
  81379. return 1;
  81380. if (this === t4)
  81381. return 0;
  81382. for (var i3 = (o3 >>>= 0) - (n3 >>>= 0), s3 = (r3 >>>= 0) - (e3 >>>= 0), a3 = Math.min(i3, s3), h3 = this.slice(n3, o3), u3 = t4.slice(e3, r3), f3 = 0; f3 < a3; ++f3)
  81383. if (h3[f3] !== u3[f3]) {
  81384. i3 = h3[f3], s3 = u3[f3];
  81385. break;
  81386. }
  81387. return i3 < s3 ? -1 : s3 < i3 ? 1 : 0;
  81388. }, c2.prototype.includes = function(t4, e3, r3) {
  81389. return -1 !== this.indexOf(t4, e3, r3);
  81390. }, c2.prototype.indexOf = function(t4, e3, r3) {
  81391. return v2(this, t4, e3, r3, true);
  81392. }, c2.prototype.lastIndexOf = function(t4, e3, r3) {
  81393. return v2(this, t4, e3, r3, false);
  81394. }, c2.prototype.write = function(t4, e3, r3, n3) {
  81395. if (void 0 === e3)
  81396. n3 = "utf8", r3 = this.length, e3 = 0;
  81397. else if (void 0 === r3 && "string" == typeof e3)
  81398. n3 = e3, r3 = this.length, e3 = 0;
  81399. else {
  81400. if (!isFinite(e3))
  81401. throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
  81402. e3 |= 0, isFinite(r3) ? (r3 |= 0, void 0 === n3 && (n3 = "utf8")) : (n3 = r3, r3 = void 0);
  81403. }
  81404. var o3 = this.length - e3;
  81405. if ((void 0 === r3 || r3 > o3) && (r3 = o3), t4.length > 0 && (r3 < 0 || e3 < 0) || e3 > this.length)
  81406. throw new RangeError("Attempt to write outside buffer bounds");
  81407. n3 || (n3 = "utf8");
  81408. for (var i3 = false; ; )
  81409. switch (n3) {
  81410. case "hex":
  81411. return b2(this, t4, e3, r3);
  81412. case "utf8":
  81413. case "utf-8":
  81414. return w2(this, t4, e3, r3);
  81415. case "ascii":
  81416. return A2(this, t4, e3, r3);
  81417. case "latin1":
  81418. case "binary":
  81419. return k(this, t4, e3, r3);
  81420. case "base64":
  81421. return E2(this, t4, e3, r3);
  81422. case "ucs2":
  81423. case "ucs-2":
  81424. case "utf16le":
  81425. case "utf-16le":
  81426. return B2(this, t4, e3, r3);
  81427. default:
  81428. if (i3)
  81429. throw new TypeError("Unknown encoding: " + n3);
  81430. n3 = ("" + n3).toLowerCase(), i3 = true;
  81431. }
  81432. }, c2.prototype.toJSON = function() {
  81433. return { type: "Buffer", data: Array.prototype.slice.call(this._arr || this, 0) };
  81434. };
  81435. function R2(t4, e3, r3) {
  81436. var n3 = "";
  81437. r3 = Math.min(t4.length, r3);
  81438. for (var o3 = e3; o3 < r3; ++o3)
  81439. n3 += String.fromCharCode(127 & t4[o3]);
  81440. return n3;
  81441. }
  81442. function S2(t4, e3, r3) {
  81443. var n3 = "";
  81444. r3 = Math.min(t4.length, r3);
  81445. for (var o3 = e3; o3 < r3; ++o3)
  81446. n3 += String.fromCharCode(t4[o3]);
  81447. return n3;
  81448. }
  81449. function C2(t4, e3, r3) {
  81450. var n3 = t4.length;
  81451. (!e3 || e3 < 0) && (e3 = 0), (!r3 || r3 < 0 || r3 > n3) && (r3 = n3);
  81452. for (var o3 = "", i3 = e3; i3 < r3; ++i3)
  81453. o3 += M2(t4[i3]);
  81454. return o3;
  81455. }
  81456. function P2(t4, e3, r3) {
  81457. for (var n3 = t4.slice(e3, r3), o3 = "", i3 = 0; i3 < n3.length; i3 += 2)
  81458. o3 += String.fromCharCode(n3[i3] + 256 * n3[i3 + 1]);
  81459. return o3;
  81460. }
  81461. function T2(t4, e3, r3) {
  81462. if (t4 % 1 != 0 || t4 < 0)
  81463. throw new RangeError("offset is not uint");
  81464. if (t4 + e3 > r3)
  81465. throw new RangeError("Trying to access beyond buffer length");
  81466. }
  81467. function O2(t4, e3, r3, n3, o3, i3) {
  81468. if (!c2.isBuffer(t4))
  81469. throw new TypeError('"buffer" argument must be a Buffer instance');
  81470. if (e3 > o3 || e3 < i3)
  81471. throw new RangeError('"value" argument is out of bounds');
  81472. if (r3 + n3 > t4.length)
  81473. throw new RangeError("Index out of range");
  81474. }
  81475. function N2(t4, e3, r3, n3) {
  81476. e3 < 0 && (e3 = 65535 + e3 + 1);
  81477. for (var o3 = 0, i3 = Math.min(t4.length - r3, 2); o3 < i3; ++o3)
  81478. t4[r3 + o3] = (e3 & 255 << 8 * (n3 ? o3 : 1 - o3)) >>> 8 * (n3 ? o3 : 1 - o3);
  81479. }
  81480. function L2(t4, e3, r3, n3) {
  81481. e3 < 0 && (e3 = 4294967295 + e3 + 1);
  81482. for (var o3 = 0, i3 = Math.min(t4.length - r3, 4); o3 < i3; ++o3)
  81483. t4[r3 + o3] = e3 >>> 8 * (n3 ? o3 : 3 - o3) & 255;
  81484. }
  81485. function U2(t4, e3, r3, n3, o3, i3) {
  81486. if (r3 + n3 > t4.length)
  81487. throw new RangeError("Index out of range");
  81488. if (r3 < 0)
  81489. throw new RangeError("Index out of range");
  81490. }
  81491. function I2(t4, e3, r3, n3, i3) {
  81492. return i3 || U2(t4, 0, r3, 4), o2.write(t4, e3, r3, n3, 23, 4), r3 + 4;
  81493. }
  81494. function j2(t4, e3, r3, n3, i3) {
  81495. return i3 || U2(t4, 0, r3, 8), o2.write(t4, e3, r3, n3, 52, 8), r3 + 8;
  81496. }
  81497. c2.prototype.slice = function(t4, e3) {
  81498. var r3, n3 = this.length;
  81499. if ((t4 = ~~t4) < 0 ? (t4 += n3) < 0 && (t4 = 0) : t4 > n3 && (t4 = n3), (e3 = void 0 === e3 ? n3 : ~~e3) < 0 ? (e3 += n3) < 0 && (e3 = 0) : e3 > n3 && (e3 = n3), e3 < t4 && (e3 = t4), c2.TYPED_ARRAY_SUPPORT)
  81500. (r3 = this.subarray(t4, e3)).__proto__ = c2.prototype;
  81501. else {
  81502. var o3 = e3 - t4;
  81503. r3 = new c2(o3, void 0);
  81504. for (var i3 = 0; i3 < o3; ++i3)
  81505. r3[i3] = this[i3 + t4];
  81506. }
  81507. return r3;
  81508. }, c2.prototype.readUIntLE = function(t4, e3, r3) {
  81509. t4 |= 0, e3 |= 0, r3 || T2(t4, e3, this.length);
  81510. for (var n3 = this[t4], o3 = 1, i3 = 0; ++i3 < e3 && (o3 *= 256); )
  81511. n3 += this[t4 + i3] * o3;
  81512. return n3;
  81513. }, c2.prototype.readUIntBE = function(t4, e3, r3) {
  81514. t4 |= 0, e3 |= 0, r3 || T2(t4, e3, this.length);
  81515. for (var n3 = this[t4 + --e3], o3 = 1; e3 > 0 && (o3 *= 256); )
  81516. n3 += this[t4 + --e3] * o3;
  81517. return n3;
  81518. }, c2.prototype.readUInt8 = function(t4, e3) {
  81519. return e3 || T2(t4, 1, this.length), this[t4];
  81520. }, c2.prototype.readUInt16LE = function(t4, e3) {
  81521. return e3 || T2(t4, 2, this.length), this[t4] | this[t4 + 1] << 8;
  81522. }, c2.prototype.readUInt16BE = function(t4, e3) {
  81523. return e3 || T2(t4, 2, this.length), this[t4] << 8 | this[t4 + 1];
  81524. }, c2.prototype.readUInt32LE = function(t4, e3) {
  81525. return e3 || T2(t4, 4, this.length), (this[t4] | this[t4 + 1] << 8 | this[t4 + 2] << 16) + 16777216 * this[t4 + 3];
  81526. }, c2.prototype.readUInt32BE = function(t4, e3) {
  81527. return e3 || T2(t4, 4, this.length), 16777216 * this[t4] + (this[t4 + 1] << 16 | this[t4 + 2] << 8 | this[t4 + 3]);
  81528. }, c2.prototype.readIntLE = function(t4, e3, r3) {
  81529. t4 |= 0, e3 |= 0, r3 || T2(t4, e3, this.length);
  81530. for (var n3 = this[t4], o3 = 1, i3 = 0; ++i3 < e3 && (o3 *= 256); )
  81531. n3 += this[t4 + i3] * o3;
  81532. return n3 >= (o3 *= 128) && (n3 -= Math.pow(2, 8 * e3)), n3;
  81533. }, c2.prototype.readIntBE = function(t4, e3, r3) {
  81534. t4 |= 0, e3 |= 0, r3 || T2(t4, e3, this.length);
  81535. for (var n3 = e3, o3 = 1, i3 = this[t4 + --n3]; n3 > 0 && (o3 *= 256); )
  81536. i3 += this[t4 + --n3] * o3;
  81537. return i3 >= (o3 *= 128) && (i3 -= Math.pow(2, 8 * e3)), i3;
  81538. }, c2.prototype.readInt8 = function(t4, e3) {
  81539. return e3 || T2(t4, 1, this.length), 128 & this[t4] ? -1 * (255 - this[t4] + 1) : this[t4];
  81540. }, c2.prototype.readInt16LE = function(t4, e3) {
  81541. e3 || T2(t4, 2, this.length);
  81542. var r3 = this[t4] | this[t4 + 1] << 8;
  81543. return 32768 & r3 ? 4294901760 | r3 : r3;
  81544. }, c2.prototype.readInt16BE = function(t4, e3) {
  81545. e3 || T2(t4, 2, this.length);
  81546. var r3 = this[t4 + 1] | this[t4] << 8;
  81547. return 32768 & r3 ? 4294901760 | r3 : r3;
  81548. }, c2.prototype.readInt32LE = function(t4, e3) {
  81549. return e3 || T2(t4, 4, this.length), this[t4] | this[t4 + 1] << 8 | this[t4 + 2] << 16 | this[t4 + 3] << 24;
  81550. }, c2.prototype.readInt32BE = function(t4, e3) {
  81551. return e3 || T2(t4, 4, this.length), this[t4] << 24 | this[t4 + 1] << 16 | this[t4 + 2] << 8 | this[t4 + 3];
  81552. }, c2.prototype.readFloatLE = function(t4, e3) {
  81553. return e3 || T2(t4, 4, this.length), o2.read(this, t4, true, 23, 4);
  81554. }, c2.prototype.readFloatBE = function(t4, e3) {
  81555. return e3 || T2(t4, 4, this.length), o2.read(this, t4, false, 23, 4);
  81556. }, c2.prototype.readDoubleLE = function(t4, e3) {
  81557. return e3 || T2(t4, 8, this.length), o2.read(this, t4, true, 52, 8);
  81558. }, c2.prototype.readDoubleBE = function(t4, e3) {
  81559. return e3 || T2(t4, 8, this.length), o2.read(this, t4, false, 52, 8);
  81560. }, c2.prototype.writeUIntLE = function(t4, e3, r3, n3) {
  81561. (t4 = +t4, e3 |= 0, r3 |= 0, n3) || O2(this, t4, e3, r3, Math.pow(2, 8 * r3) - 1, 0);
  81562. var o3 = 1, i3 = 0;
  81563. for (this[e3] = 255 & t4; ++i3 < r3 && (o3 *= 256); )
  81564. this[e3 + i3] = t4 / o3 & 255;
  81565. return e3 + r3;
  81566. }, c2.prototype.writeUIntBE = function(t4, e3, r3, n3) {
  81567. (t4 = +t4, e3 |= 0, r3 |= 0, n3) || O2(this, t4, e3, r3, Math.pow(2, 8 * r3) - 1, 0);
  81568. var o3 = r3 - 1, i3 = 1;
  81569. for (this[e3 + o3] = 255 & t4; --o3 >= 0 && (i3 *= 256); )
  81570. this[e3 + o3] = t4 / i3 & 255;
  81571. return e3 + r3;
  81572. }, c2.prototype.writeUInt8 = function(t4, e3, r3) {
  81573. return t4 = +t4, e3 |= 0, r3 || O2(this, t4, e3, 1, 255, 0), c2.TYPED_ARRAY_SUPPORT || (t4 = Math.floor(t4)), this[e3] = 255 & t4, e3 + 1;
  81574. }, c2.prototype.writeUInt16LE = function(t4, e3, r3) {
  81575. return t4 = +t4, e3 |= 0, r3 || O2(this, t4, e3, 2, 65535, 0), c2.TYPED_ARRAY_SUPPORT ? (this[e3] = 255 & t4, this[e3 + 1] = t4 >>> 8) : N2(this, t4, e3, true), e3 + 2;
  81576. }, c2.prototype.writeUInt16BE = function(t4, e3, r3) {
  81577. return t4 = +t4, e3 |= 0, r3 || O2(this, t4, e3, 2, 65535, 0), c2.TYPED_ARRAY_SUPPORT ? (this[e3] = t4 >>> 8, this[e3 + 1] = 255 & t4) : N2(this, t4, e3, false), e3 + 2;
  81578. }, c2.prototype.writeUInt32LE = function(t4, e3, r3) {
  81579. return t4 = +t4, e3 |= 0, r3 || O2(this, t4, e3, 4, 4294967295, 0), c2.TYPED_ARRAY_SUPPORT ? (this[e3 + 3] = t4 >>> 24, this[e3 + 2] = t4 >>> 16, this[e3 + 1] = t4 >>> 8, this[e3] = 255 & t4) : L2(this, t4, e3, true), e3 + 4;
  81580. }, c2.prototype.writeUInt32BE = function(t4, e3, r3) {
  81581. return t4 = +t4, e3 |= 0, r3 || O2(this, t4, e3, 4, 4294967295, 0), c2.TYPED_ARRAY_SUPPORT ? (this[e3] = t4 >>> 24, this[e3 + 1] = t4 >>> 16, this[e3 + 2] = t4 >>> 8, this[e3 + 3] = 255 & t4) : L2(this, t4, e3, false), e3 + 4;
  81582. }, c2.prototype.writeIntLE = function(t4, e3, r3, n3) {
  81583. if (t4 = +t4, e3 |= 0, !n3) {
  81584. var o3 = Math.pow(2, 8 * r3 - 1);
  81585. O2(this, t4, e3, r3, o3 - 1, -o3);
  81586. }
  81587. var i3 = 0, s3 = 1, a3 = 0;
  81588. for (this[e3] = 255 & t4; ++i3 < r3 && (s3 *= 256); )
  81589. t4 < 0 && 0 === a3 && 0 !== this[e3 + i3 - 1] && (a3 = 1), this[e3 + i3] = (t4 / s3 >> 0) - a3 & 255;
  81590. return e3 + r3;
  81591. }, c2.prototype.writeIntBE = function(t4, e3, r3, n3) {
  81592. if (t4 = +t4, e3 |= 0, !n3) {
  81593. var o3 = Math.pow(2, 8 * r3 - 1);
  81594. O2(this, t4, e3, r3, o3 - 1, -o3);
  81595. }
  81596. var i3 = r3 - 1, s3 = 1, a3 = 0;
  81597. for (this[e3 + i3] = 255 & t4; --i3 >= 0 && (s3 *= 256); )
  81598. t4 < 0 && 0 === a3 && 0 !== this[e3 + i3 + 1] && (a3 = 1), this[e3 + i3] = (t4 / s3 >> 0) - a3 & 255;
  81599. return e3 + r3;
  81600. }, c2.prototype.writeInt8 = function(t4, e3, r3) {
  81601. return t4 = +t4, e3 |= 0, r3 || O2(this, t4, e3, 1, 127, -128), c2.TYPED_ARRAY_SUPPORT || (t4 = Math.floor(t4)), t4 < 0 && (t4 = 255 + t4 + 1), this[e3] = 255 & t4, e3 + 1;
  81602. }, c2.prototype.writeInt16LE = function(t4, e3, r3) {
  81603. return t4 = +t4, e3 |= 0, r3 || O2(this, t4, e3, 2, 32767, -32768), c2.TYPED_ARRAY_SUPPORT ? (this[e3] = 255 & t4, this[e3 + 1] = t4 >>> 8) : N2(this, t4, e3, true), e3 + 2;
  81604. }, c2.prototype.writeInt16BE = function(t4, e3, r3) {
  81605. return t4 = +t4, e3 |= 0, r3 || O2(this, t4, e3, 2, 32767, -32768), c2.TYPED_ARRAY_SUPPORT ? (this[e3] = t4 >>> 8, this[e3 + 1] = 255 & t4) : N2(this, t4, e3, false), e3 + 2;
  81606. }, c2.prototype.writeInt32LE = function(t4, e3, r3) {
  81607. return t4 = +t4, e3 |= 0, r3 || O2(this, t4, e3, 4, 2147483647, -2147483648), c2.TYPED_ARRAY_SUPPORT ? (this[e3] = 255 & t4, this[e3 + 1] = t4 >>> 8, this[e3 + 2] = t4 >>> 16, this[e3 + 3] = t4 >>> 24) : L2(this, t4, e3, true), e3 + 4;
  81608. }, c2.prototype.writeInt32BE = function(t4, e3, r3) {
  81609. return t4 = +t4, e3 |= 0, r3 || O2(this, t4, e3, 4, 2147483647, -2147483648), t4 < 0 && (t4 = 4294967295 + t4 + 1), c2.TYPED_ARRAY_SUPPORT ? (this[e3] = t4 >>> 24, this[e3 + 1] = t4 >>> 16, this[e3 + 2] = t4 >>> 8, this[e3 + 3] = 255 & t4) : L2(this, t4, e3, false), e3 + 4;
  81610. }, c2.prototype.writeFloatLE = function(t4, e3, r3) {
  81611. return I2(this, t4, e3, true, r3);
  81612. }, c2.prototype.writeFloatBE = function(t4, e3, r3) {
  81613. return I2(this, t4, e3, false, r3);
  81614. }, c2.prototype.writeDoubleLE = function(t4, e3, r3) {
  81615. return j2(this, t4, e3, true, r3);
  81616. }, c2.prototype.writeDoubleBE = function(t4, e3, r3) {
  81617. return j2(this, t4, e3, false, r3);
  81618. }, c2.prototype.copy = function(t4, e3, r3, n3) {
  81619. if (r3 || (r3 = 0), n3 || 0 === n3 || (n3 = this.length), e3 >= t4.length && (e3 = t4.length), e3 || (e3 = 0), n3 > 0 && n3 < r3 && (n3 = r3), n3 === r3)
  81620. return 0;
  81621. if (0 === t4.length || 0 === this.length)
  81622. return 0;
  81623. if (e3 < 0)
  81624. throw new RangeError("targetStart out of bounds");
  81625. if (r3 < 0 || r3 >= this.length)
  81626. throw new RangeError("sourceStart out of bounds");
  81627. if (n3 < 0)
  81628. throw new RangeError("sourceEnd out of bounds");
  81629. n3 > this.length && (n3 = this.length), t4.length - e3 < n3 - r3 && (n3 = t4.length - e3 + r3);
  81630. var o3, i3 = n3 - r3;
  81631. if (this === t4 && r3 < e3 && e3 < n3)
  81632. for (o3 = i3 - 1; o3 >= 0; --o3)
  81633. t4[o3 + e3] = this[o3 + r3];
  81634. else if (i3 < 1e3 || !c2.TYPED_ARRAY_SUPPORT)
  81635. for (o3 = 0; o3 < i3; ++o3)
  81636. t4[o3 + e3] = this[o3 + r3];
  81637. else
  81638. Uint8Array.prototype.set.call(t4, this.subarray(r3, r3 + i3), e3);
  81639. return i3;
  81640. }, c2.prototype.fill = function(t4, e3, r3, n3) {
  81641. if ("string" == typeof t4) {
  81642. if ("string" == typeof e3 ? (n3 = e3, e3 = 0, r3 = this.length) : "string" == typeof r3 && (n3 = r3, r3 = this.length), 1 === t4.length) {
  81643. var o3 = t4.charCodeAt(0);
  81644. o3 < 256 && (t4 = o3);
  81645. }
  81646. if (void 0 !== n3 && "string" != typeof n3)
  81647. throw new TypeError("encoding must be a string");
  81648. if ("string" == typeof n3 && !c2.isEncoding(n3))
  81649. throw new TypeError("Unknown encoding: " + n3);
  81650. } else
  81651. "number" == typeof t4 && (t4 &= 255);
  81652. if (e3 < 0 || this.length < e3 || this.length < r3)
  81653. throw new RangeError("Out of range index");
  81654. if (r3 <= e3)
  81655. return this;
  81656. var i3;
  81657. if (e3 >>>= 0, r3 = void 0 === r3 ? this.length : r3 >>> 0, t4 || (t4 = 0), "number" == typeof t4)
  81658. for (i3 = e3; i3 < r3; ++i3)
  81659. this[i3] = t4;
  81660. else {
  81661. var s3 = c2.isBuffer(t4) ? t4 : q2(new c2(t4, n3).toString()), a3 = s3.length;
  81662. for (i3 = 0; i3 < r3 - e3; ++i3)
  81663. this[i3 + e3] = s3[i3 % a3];
  81664. }
  81665. return this;
  81666. };
  81667. var D2 = /[^+\/0-9A-Za-z-_]/g;
  81668. function M2(t4) {
  81669. return t4 < 16 ? "0" + t4.toString(16) : t4.toString(16);
  81670. }
  81671. function q2(t4, e3) {
  81672. var r3;
  81673. e3 = e3 || 1 / 0;
  81674. for (var n3 = t4.length, o3 = null, i3 = [], s3 = 0; s3 < n3; ++s3) {
  81675. if ((r3 = t4.charCodeAt(s3)) > 55295 && r3 < 57344) {
  81676. if (!o3) {
  81677. if (r3 > 56319) {
  81678. (e3 -= 3) > -1 && i3.push(239, 191, 189);
  81679. continue;
  81680. }
  81681. if (s3 + 1 === n3) {
  81682. (e3 -= 3) > -1 && i3.push(239, 191, 189);
  81683. continue;
  81684. }
  81685. o3 = r3;
  81686. continue;
  81687. }
  81688. if (r3 < 56320) {
  81689. (e3 -= 3) > -1 && i3.push(239, 191, 189), o3 = r3;
  81690. continue;
  81691. }
  81692. r3 = 65536 + (o3 - 55296 << 10 | r3 - 56320);
  81693. } else
  81694. o3 && (e3 -= 3) > -1 && i3.push(239, 191, 189);
  81695. if (o3 = null, r3 < 128) {
  81696. if ((e3 -= 1) < 0)
  81697. break;
  81698. i3.push(r3);
  81699. } else if (r3 < 2048) {
  81700. if ((e3 -= 2) < 0)
  81701. break;
  81702. i3.push(r3 >> 6 | 192, 63 & r3 | 128);
  81703. } else if (r3 < 65536) {
  81704. if ((e3 -= 3) < 0)
  81705. break;
  81706. i3.push(r3 >> 12 | 224, r3 >> 6 & 63 | 128, 63 & r3 | 128);
  81707. } else {
  81708. if (!(r3 < 1114112))
  81709. throw new Error("Invalid code point");
  81710. if ((e3 -= 4) < 0)
  81711. break;
  81712. i3.push(r3 >> 18 | 240, r3 >> 12 & 63 | 128, r3 >> 6 & 63 | 128, 63 & r3 | 128);
  81713. }
  81714. }
  81715. return i3;
  81716. }
  81717. function Y2(t4) {
  81718. return n2.toByteArray(function(t5) {
  81719. if ((t5 = function(t6) {
  81720. return t6.trim ? t6.trim() : t6.replace(/^\s+|\s+$/g, "");
  81721. }(t5).replace(D2, "")).length < 2)
  81722. return "";
  81723. for (; t5.length % 4 != 0; )
  81724. t5 += "=";
  81725. return t5;
  81726. }(t4));
  81727. }
  81728. function H2(t4, e3, r3, n3) {
  81729. for (var o3 = 0; o3 < n3 && !(o3 + r3 >= e3.length || o3 >= t4.length); ++o3)
  81730. e3[o3 + r3] = t4[o3];
  81731. return o3;
  81732. }
  81733. }).call(this, r2(12));
  81734. }, function(t2, e2, r2) {
  81735. var n2 = r2(31);
  81736. t2.exports = function(t3) {
  81737. var e3 = t3.xdomain, r3 = t3.xscheme, o2 = t3.enablesXDR;
  81738. try {
  81739. if ("undefined" != typeof XMLHttpRequest && (!e3 || n2))
  81740. return new XMLHttpRequest();
  81741. } catch (t4) {
  81742. }
  81743. try {
  81744. if ("undefined" != typeof XDomainRequest && !r3 && o2)
  81745. return new XDomainRequest();
  81746. } catch (t4) {
  81747. }
  81748. if (!e3)
  81749. try {
  81750. return new self[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP");
  81751. } catch (t4) {
  81752. }
  81753. };
  81754. }, function(t2, e2, r2) {
  81755. var n2 = r2(2), o2 = r2(1);
  81756. function i2(t3) {
  81757. this.path = t3.path, this.hostname = t3.hostname, this.port = t3.port, this.secure = t3.secure, this.query = t3.query, this.timestampParam = t3.timestampParam, this.timestampRequests = t3.timestampRequests, this.readyState = "", this.agent = t3.agent || false, this.socket = t3.socket, this.enablesXDR = t3.enablesXDR, this.withCredentials = t3.withCredentials, this.pfx = t3.pfx, this.key = t3.key, this.passphrase = t3.passphrase, this.cert = t3.cert, this.ca = t3.ca, this.ciphers = t3.ciphers, this.rejectUnauthorized = t3.rejectUnauthorized, this.forceNode = t3.forceNode, this.isReactNative = t3.isReactNative, this.extraHeaders = t3.extraHeaders, this.localAddress = t3.localAddress;
  81758. }
  81759. t2.exports = i2, o2(i2.prototype), i2.prototype.onError = function(t3, e3) {
  81760. var r3 = new Error(t3);
  81761. return r3.type = "TransportError", r3.description = e3, this.emit("error", r3), this;
  81762. }, i2.prototype.open = function() {
  81763. return "closed" !== this.readyState && "" !== this.readyState || (this.readyState = "opening", this.doOpen()), this;
  81764. }, i2.prototype.close = function() {
  81765. return "opening" !== this.readyState && "open" !== this.readyState || (this.doClose(), this.onClose()), this;
  81766. }, i2.prototype.send = function(t3) {
  81767. if ("open" !== this.readyState)
  81768. throw new Error("Transport not open");
  81769. this.write(t3);
  81770. }, i2.prototype.onOpen = function() {
  81771. this.readyState = "open", this.writable = true, this.emit("open");
  81772. }, i2.prototype.onData = function(t3) {
  81773. var e3 = n2.decodePacket(t3, this.socket.binaryType);
  81774. this.onPacket(e3);
  81775. }, i2.prototype.onPacket = function(t3) {
  81776. this.emit("packet", t3);
  81777. }, i2.prototype.onClose = function() {
  81778. this.readyState = "closed", this.emit("close");
  81779. };
  81780. }, function(t2, e2) {
  81781. var r2 = /^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/, n2 = ["source", "protocol", "authority", "userInfo", "user", "password", "host", "port", "relative", "path", "directory", "file", "query", "anchor"];
  81782. t2.exports = function(t3) {
  81783. var e3 = t3, o2 = t3.indexOf("["), i2 = t3.indexOf("]");
  81784. -1 != o2 && -1 != i2 && (t3 = t3.substring(0, o2) + t3.substring(o2, i2).replace(/:/g, ";") + t3.substring(i2, t3.length));
  81785. for (var s2 = r2.exec(t3 || ""), a2 = {}, c2 = 14; c2--; )
  81786. a2[n2[c2]] = s2[c2] || "";
  81787. return -1 != o2 && -1 != i2 && (a2.source = e3, a2.host = a2.host.substring(1, a2.host.length - 1).replace(/;/g, ":"), a2.authority = a2.authority.replace("[", "").replace("]", "").replace(/;/g, ":"), a2.ipv6uri = true), a2;
  81788. };
  81789. }, function(t2, e2) {
  81790. var r2 = {}.toString;
  81791. t2.exports = Array.isArray || function(t3) {
  81792. return "[object Array]" == r2.call(t3);
  81793. };
  81794. }, function(t2, e2, r2) {
  81795. (function(e3) {
  81796. t2.exports = function(t3) {
  81797. return r3 && e3.isBuffer(t3) || n2 && (t3 instanceof ArrayBuffer || function(t4) {
  81798. return "function" == typeof ArrayBuffer.isView ? ArrayBuffer.isView(t4) : t4.buffer instanceof ArrayBuffer;
  81799. }(t3));
  81800. };
  81801. var r3 = "function" == typeof e3 && "function" == typeof e3.isBuffer, n2 = "function" == typeof ArrayBuffer;
  81802. }).call(this, r2(6).Buffer);
  81803. }, function(t2, e2) {
  81804. var r2;
  81805. r2 = /* @__PURE__ */ function() {
  81806. return this;
  81807. }();
  81808. try {
  81809. r2 = r2 || new Function("return this")();
  81810. } catch (t3) {
  81811. "object" == typeof window && (r2 = window);
  81812. }
  81813. t2.exports = r2;
  81814. }, function(t2, e2, r2) {
  81815. var n2 = r2(29), o2 = r2(19), i2 = r2(1), s2 = r2(5), a2 = r2(20), c2 = r2(21), h2 = r2(0)("socket.io-client:manager"), u2 = r2(18), f2 = r2(46), p2 = Object.prototype.hasOwnProperty;
  81816. function l2(t3, e3) {
  81817. if (!(this instanceof l2))
  81818. return new l2(t3, e3);
  81819. t3 && "object" == typeof t3 && (e3 = t3, t3 = void 0), (e3 = e3 || {}).path = e3.path || "/socket.io", this.nsps = {}, this.subs = [], this.opts = e3, this.reconnection(false !== e3.reconnection), this.reconnectionAttempts(e3.reconnectionAttempts || 1 / 0), this.reconnectionDelay(e3.reconnectionDelay || 1e3), this.reconnectionDelayMax(e3.reconnectionDelayMax || 5e3), this.randomizationFactor(e3.randomizationFactor || 0.5), this.backoff = new f2({ min: this.reconnectionDelay(), max: this.reconnectionDelayMax(), jitter: this.randomizationFactor() }), this.timeout(null == e3.timeout ? 2e4 : e3.timeout), this.readyState = "closed", this.uri = t3, this.connecting = [], this.lastPing = null, this.encoding = false, this.packetBuffer = [];
  81820. var r3 = e3.parser || s2;
  81821. this.encoder = new r3.Encoder(), this.decoder = new r3.Decoder(), this.autoConnect = false !== e3.autoConnect, this.autoConnect && this.open();
  81822. }
  81823. t2.exports = l2, l2.prototype.emitAll = function() {
  81824. for (var t3 in this.emit.apply(this, arguments), this.nsps)
  81825. p2.call(this.nsps, t3) && this.nsps[t3].emit.apply(this.nsps[t3], arguments);
  81826. }, l2.prototype.updateSocketIds = function() {
  81827. for (var t3 in this.nsps)
  81828. p2.call(this.nsps, t3) && (this.nsps[t3].id = this.generateId(t3));
  81829. }, l2.prototype.generateId = function(t3) {
  81830. return ("/" === t3 ? "" : t3 + "#") + this.engine.id;
  81831. }, i2(l2.prototype), l2.prototype.reconnection = function(t3) {
  81832. return arguments.length ? (this._reconnection = !!t3, this) : this._reconnection;
  81833. }, l2.prototype.reconnectionAttempts = function(t3) {
  81834. return arguments.length ? (this._reconnectionAttempts = t3, this) : this._reconnectionAttempts;
  81835. }, l2.prototype.reconnectionDelay = function(t3) {
  81836. return arguments.length ? (this._reconnectionDelay = t3, this.backoff && this.backoff.setMin(t3), this) : this._reconnectionDelay;
  81837. }, l2.prototype.randomizationFactor = function(t3) {
  81838. return arguments.length ? (this._randomizationFactor = t3, this.backoff && this.backoff.setJitter(t3), this) : this._randomizationFactor;
  81839. }, l2.prototype.reconnectionDelayMax = function(t3) {
  81840. return arguments.length ? (this._reconnectionDelayMax = t3, this.backoff && this.backoff.setMax(t3), this) : this._reconnectionDelayMax;
  81841. }, l2.prototype.timeout = function(t3) {
  81842. return arguments.length ? (this._timeout = t3, this) : this._timeout;
  81843. }, l2.prototype.maybeReconnectOnOpen = function() {
  81844. !this.reconnecting && this._reconnection && 0 === this.backoff.attempts && this.reconnect();
  81845. }, l2.prototype.open = l2.prototype.connect = function(t3, e3) {
  81846. if (h2("readyState %s", this.readyState), ~this.readyState.indexOf("open"))
  81847. return this;
  81848. h2("opening %s", this.uri), this.engine = n2(this.uri, this.opts);
  81849. var r3 = this.engine, o3 = this;
  81850. this.readyState = "opening", this.skipReconnect = false;
  81851. var i3 = a2(r3, "open", function() {
  81852. o3.onopen(), t3 && t3();
  81853. }), s3 = a2(r3, "error", function(e4) {
  81854. if (h2("connect_error"), o3.cleanup(), o3.readyState = "closed", o3.emitAll("connect_error", e4), t3) {
  81855. var r4 = new Error("Connection error");
  81856. r4.data = e4, t3(r4);
  81857. } else
  81858. o3.maybeReconnectOnOpen();
  81859. });
  81860. if (false !== this._timeout) {
  81861. var c3 = this._timeout;
  81862. h2("connect attempt will timeout after %d", c3);
  81863. var u3 = setTimeout(function() {
  81864. h2("connect attempt timed out after %d", c3), i3.destroy(), r3.close(), r3.emit("error", "timeout"), o3.emitAll("connect_timeout", c3);
  81865. }, c3);
  81866. this.subs.push({ destroy: function() {
  81867. clearTimeout(u3);
  81868. } });
  81869. }
  81870. return this.subs.push(i3), this.subs.push(s3), this;
  81871. }, l2.prototype.onopen = function() {
  81872. h2("open"), this.cleanup(), this.readyState = "open", this.emit("open");
  81873. var t3 = this.engine;
  81874. this.subs.push(a2(t3, "data", c2(this, "ondata"))), this.subs.push(a2(t3, "ping", c2(this, "onping"))), this.subs.push(a2(t3, "pong", c2(this, "onpong"))), this.subs.push(a2(t3, "error", c2(this, "onerror"))), this.subs.push(a2(t3, "close", c2(this, "onclose"))), this.subs.push(a2(this.decoder, "decoded", c2(this, "ondecoded")));
  81875. }, l2.prototype.onping = function() {
  81876. this.lastPing = /* @__PURE__ */ new Date(), this.emitAll("ping");
  81877. }, l2.prototype.onpong = function() {
  81878. this.emitAll("pong", /* @__PURE__ */ new Date() - this.lastPing);
  81879. }, l2.prototype.ondata = function(t3) {
  81880. this.decoder.add(t3);
  81881. }, l2.prototype.ondecoded = function(t3) {
  81882. this.emit("packet", t3);
  81883. }, l2.prototype.onerror = function(t3) {
  81884. h2("error", t3), this.emitAll("error", t3);
  81885. }, l2.prototype.socket = function(t3, e3) {
  81886. var r3 = this.nsps[t3];
  81887. if (!r3) {
  81888. r3 = new o2(this, t3, e3), this.nsps[t3] = r3;
  81889. var n3 = this;
  81890. r3.on("connecting", i3), r3.on("connect", function() {
  81891. r3.id = n3.generateId(t3);
  81892. }), this.autoConnect && i3();
  81893. }
  81894. function i3() {
  81895. ~u2(n3.connecting, r3) || n3.connecting.push(r3);
  81896. }
  81897. return r3;
  81898. }, l2.prototype.destroy = function(t3) {
  81899. var e3 = u2(this.connecting, t3);
  81900. ~e3 && this.connecting.splice(e3, 1), this.connecting.length || this.close();
  81901. }, l2.prototype.packet = function(t3) {
  81902. h2("writing packet %j", t3);
  81903. var e3 = this;
  81904. t3.query && 0 === t3.type && (t3.nsp += "?" + t3.query), e3.encoding ? e3.packetBuffer.push(t3) : (e3.encoding = true, this.encoder.encode(t3, function(r3) {
  81905. for (var n3 = 0; n3 < r3.length; n3++)
  81906. e3.engine.write(r3[n3], t3.options);
  81907. e3.encoding = false, e3.processPacketQueue();
  81908. }));
  81909. }, l2.prototype.processPacketQueue = function() {
  81910. if (this.packetBuffer.length > 0 && !this.encoding) {
  81911. var t3 = this.packetBuffer.shift();
  81912. this.packet(t3);
  81913. }
  81914. }, l2.prototype.cleanup = function() {
  81915. h2("cleanup");
  81916. for (var t3 = this.subs.length, e3 = 0; e3 < t3; e3++) {
  81917. this.subs.shift().destroy();
  81918. }
  81919. this.packetBuffer = [], this.encoding = false, this.lastPing = null, this.decoder.destroy();
  81920. }, l2.prototype.close = l2.prototype.disconnect = function() {
  81921. h2("disconnect"), this.skipReconnect = true, this.reconnecting = false, "opening" === this.readyState && this.cleanup(), this.backoff.reset(), this.readyState = "closed", this.engine && this.engine.close();
  81922. }, l2.prototype.onclose = function(t3) {
  81923. h2("onclose"), this.cleanup(), this.backoff.reset(), this.readyState = "closed", this.emit("close", t3), this._reconnection && !this.skipReconnect && this.reconnect();
  81924. }, l2.prototype.reconnect = function() {
  81925. if (this.reconnecting || this.skipReconnect)
  81926. return this;
  81927. var t3 = this;
  81928. if (this.backoff.attempts >= this._reconnectionAttempts)
  81929. h2("reconnect failed"), this.backoff.reset(), this.emitAll("reconnect_failed"), this.reconnecting = false;
  81930. else {
  81931. var e3 = this.backoff.duration();
  81932. h2("will wait %dms before reconnect attempt", e3), this.reconnecting = true;
  81933. var r3 = setTimeout(function() {
  81934. t3.skipReconnect || (h2("attempting reconnect"), t3.emitAll("reconnect_attempt", t3.backoff.attempts), t3.emitAll("reconnecting", t3.backoff.attempts), t3.skipReconnect || t3.open(function(e4) {
  81935. e4 ? (h2("reconnect attempt error"), t3.reconnecting = false, t3.reconnect(), t3.emitAll("reconnect_error", e4.data)) : (h2("reconnect success"), t3.onreconnect());
  81936. }));
  81937. }, e3);
  81938. this.subs.push({ destroy: function() {
  81939. clearTimeout(r3);
  81940. } });
  81941. }
  81942. }, l2.prototype.onreconnect = function() {
  81943. var t3 = this.backoff.attempts;
  81944. this.reconnecting = false, this.backoff.reset(), this.updateSocketIds(), this.emitAll("reconnect", t3);
  81945. };
  81946. }, function(t2, e2, r2) {
  81947. var n2 = r2(7), o2 = r2(32), i2 = r2(40), s2 = r2(41);
  81948. e2.polling = function(t3) {
  81949. var e3 = false, r3 = false, s3 = false !== t3.jsonp;
  81950. if ("undefined" != typeof location) {
  81951. var a2 = "https:" === location.protocol, c2 = location.port;
  81952. c2 || (c2 = a2 ? 443 : 80), e3 = t3.hostname !== location.hostname || c2 !== t3.port, r3 = t3.secure !== a2;
  81953. }
  81954. if (t3.xdomain = e3, t3.xscheme = r3, "open" in new n2(t3) && !t3.forceJSONP)
  81955. return new o2(t3);
  81956. if (!s3)
  81957. throw new Error("JSONP disabled");
  81958. return new i2(t3);
  81959. }, e2.websocket = s2;
  81960. }, function(t2, e2, r2) {
  81961. var n2 = r2(8), o2 = r2(3), i2 = r2(2), s2 = r2(4), a2 = r2(17), c2 = r2(0)("engine.io-client:polling");
  81962. t2.exports = u2;
  81963. var h2 = null != new (r2(7))({ xdomain: false }).responseType;
  81964. function u2(t3) {
  81965. var e3 = t3 && t3.forceBase64;
  81966. h2 && !e3 || (this.supportsBinary = false), n2.call(this, t3);
  81967. }
  81968. s2(u2, n2), u2.prototype.name = "polling", u2.prototype.doOpen = function() {
  81969. this.poll();
  81970. }, u2.prototype.pause = function(t3) {
  81971. var e3 = this;
  81972. function r3() {
  81973. c2("paused"), e3.readyState = "paused", t3();
  81974. }
  81975. if (this.readyState = "pausing", this.polling || !this.writable) {
  81976. var n3 = 0;
  81977. this.polling && (c2("we are currently polling - waiting to pause"), n3++, this.once("pollComplete", function() {
  81978. c2("pre-pause polling complete"), --n3 || r3();
  81979. })), this.writable || (c2("we are currently writing - waiting to pause"), n3++, this.once("drain", function() {
  81980. c2("pre-pause writing complete"), --n3 || r3();
  81981. }));
  81982. } else
  81983. r3();
  81984. }, u2.prototype.poll = function() {
  81985. c2("polling"), this.polling = true, this.doPoll(), this.emit("poll");
  81986. }, u2.prototype.onData = function(t3) {
  81987. var e3 = this;
  81988. c2("polling got data %s", t3);
  81989. i2.decodePayload(t3, this.socket.binaryType, function(t4, r3, n3) {
  81990. if ("opening" === e3.readyState && e3.onOpen(), "close" === t4.type)
  81991. return e3.onClose(), false;
  81992. e3.onPacket(t4);
  81993. }), "closed" !== this.readyState && (this.polling = false, this.emit("pollComplete"), "open" === this.readyState ? this.poll() : c2('ignoring poll - transport state "%s"', this.readyState));
  81994. }, u2.prototype.doClose = function() {
  81995. var t3 = this;
  81996. function e3() {
  81997. c2("writing close packet"), t3.write([{ type: "close" }]);
  81998. }
  81999. "open" === this.readyState ? (c2("transport open - closing"), e3()) : (c2("transport not open - deferring close"), this.once("open", e3));
  82000. }, u2.prototype.write = function(t3) {
  82001. var e3 = this;
  82002. this.writable = false;
  82003. var r3 = function() {
  82004. e3.writable = true, e3.emit("drain");
  82005. };
  82006. i2.encodePayload(t3, this.supportsBinary, function(t4) {
  82007. e3.doWrite(t4, r3);
  82008. });
  82009. }, u2.prototype.uri = function() {
  82010. var t3 = this.query || {}, e3 = this.secure ? "https" : "http", r3 = "";
  82011. return false !== this.timestampRequests && (t3[this.timestampParam] = a2()), this.supportsBinary || t3.sid || (t3.b64 = 1), t3 = o2.encode(t3), this.port && ("https" === e3 && 443 !== Number(this.port) || "http" === e3 && 80 !== Number(this.port)) && (r3 = ":" + this.port), t3.length && (t3 = "?" + t3), e3 + "://" + (-1 !== this.hostname.indexOf(":") ? "[" + this.hostname + "]" : this.hostname) + r3 + this.path + t3;
  82012. };
  82013. }, function(t2, e2, r2) {
  82014. (function(e3) {
  82015. var n2 = r2(34), o2 = Object.prototype.toString, i2 = "function" == typeof Blob || "undefined" != typeof Blob && "[object BlobConstructor]" === o2.call(Blob), s2 = "function" == typeof File || "undefined" != typeof File && "[object FileConstructor]" === o2.call(File);
  82016. t2.exports = function t3(r3) {
  82017. if (!r3 || "object" != typeof r3)
  82018. return false;
  82019. if (n2(r3)) {
  82020. for (var o3 = 0, a2 = r3.length; o3 < a2; o3++)
  82021. if (t3(r3[o3]))
  82022. return true;
  82023. return false;
  82024. }
  82025. if ("function" == typeof e3 && e3.isBuffer && e3.isBuffer(r3) || "function" == typeof ArrayBuffer && r3 instanceof ArrayBuffer || i2 && r3 instanceof Blob || s2 && r3 instanceof File)
  82026. return true;
  82027. if (r3.toJSON && "function" == typeof r3.toJSON && 1 === arguments.length)
  82028. return t3(r3.toJSON(), true);
  82029. for (var c2 in r3)
  82030. if (Object.prototype.hasOwnProperty.call(r3, c2) && t3(r3[c2]))
  82031. return true;
  82032. return false;
  82033. };
  82034. }).call(this, r2(6).Buffer);
  82035. }, function(t2, e2, r2) {
  82036. var n2, o2 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""), i2 = {}, s2 = 0, a2 = 0;
  82037. function c2(t3) {
  82038. var e3 = "";
  82039. do {
  82040. e3 = o2[t3 % 64] + e3, t3 = Math.floor(t3 / 64);
  82041. } while (t3 > 0);
  82042. return e3;
  82043. }
  82044. function h2() {
  82045. var t3 = c2(+/* @__PURE__ */ new Date());
  82046. return t3 !== n2 ? (s2 = 0, n2 = t3) : t3 + "." + c2(s2++);
  82047. }
  82048. for (; a2 < 64; a2++)
  82049. i2[o2[a2]] = a2;
  82050. h2.encode = c2, h2.decode = function(t3) {
  82051. var e3 = 0;
  82052. for (a2 = 0; a2 < t3.length; a2++)
  82053. e3 = 64 * e3 + i2[t3.charAt(a2)];
  82054. return e3;
  82055. }, t2.exports = h2;
  82056. }, function(t2, e2) {
  82057. var r2 = [].indexOf;
  82058. t2.exports = function(t3, e3) {
  82059. if (r2)
  82060. return t3.indexOf(e3);
  82061. for (var n2 = 0; n2 < t3.length; ++n2)
  82062. if (t3[n2] === e3)
  82063. return n2;
  82064. return -1;
  82065. };
  82066. }, function(t2, e2, r2) {
  82067. var n2 = r2(5), o2 = r2(1), i2 = r2(45), s2 = r2(20), a2 = r2(21), c2 = r2(0)("socket.io-client:socket"), h2 = r2(3), u2 = r2(16);
  82068. t2.exports = l2;
  82069. var f2 = { connect: 1, connect_error: 1, connect_timeout: 1, connecting: 1, disconnect: 1, error: 1, reconnect: 1, reconnect_attempt: 1, reconnect_failed: 1, reconnect_error: 1, reconnecting: 1, ping: 1, pong: 1 }, p2 = o2.prototype.emit;
  82070. function l2(t3, e3, r3) {
  82071. this.io = t3, this.nsp = e3, this.json = this, this.ids = 0, this.acks = {}, this.receiveBuffer = [], this.sendBuffer = [], this.connected = false, this.disconnected = true, this.flags = {}, r3 && r3.query && (this.query = r3.query), this.io.autoConnect && this.open();
  82072. }
  82073. o2(l2.prototype), l2.prototype.subEvents = function() {
  82074. if (!this.subs) {
  82075. var t3 = this.io;
  82076. this.subs = [s2(t3, "open", a2(this, "onopen")), s2(t3, "packet", a2(this, "onpacket")), s2(t3, "close", a2(this, "onclose"))];
  82077. }
  82078. }, l2.prototype.open = l2.prototype.connect = function() {
  82079. return this.connected || (this.subEvents(), this.io.open(), "open" === this.io.readyState && this.onopen(), this.emit("connecting")), this;
  82080. }, l2.prototype.send = function() {
  82081. var t3 = i2(arguments);
  82082. return t3.unshift("message"), this.emit.apply(this, t3), this;
  82083. }, l2.prototype.emit = function(t3) {
  82084. if (f2.hasOwnProperty(t3))
  82085. return p2.apply(this, arguments), this;
  82086. var e3 = i2(arguments), r3 = { type: (void 0 !== this.flags.binary ? this.flags.binary : u2(e3)) ? n2.BINARY_EVENT : n2.EVENT, data: e3, options: {} };
  82087. return r3.options.compress = !this.flags || false !== this.flags.compress, "function" == typeof e3[e3.length - 1] && (c2("emitting packet with ack id %d", this.ids), this.acks[this.ids] = e3.pop(), r3.id = this.ids++), this.connected ? this.packet(r3) : this.sendBuffer.push(r3), this.flags = {}, this;
  82088. }, l2.prototype.packet = function(t3) {
  82089. t3.nsp = this.nsp, this.io.packet(t3);
  82090. }, l2.prototype.onopen = function() {
  82091. if (c2("transport is open - connecting"), "/" !== this.nsp)
  82092. if (this.query) {
  82093. var t3 = "object" == typeof this.query ? h2.encode(this.query) : this.query;
  82094. c2("sending connect packet with query %s", t3), this.packet({ type: n2.CONNECT, query: t3 });
  82095. } else
  82096. this.packet({ type: n2.CONNECT });
  82097. }, l2.prototype.onclose = function(t3) {
  82098. c2("close (%s)", t3), this.connected = false, this.disconnected = true, delete this.id, this.emit("disconnect", t3);
  82099. }, l2.prototype.onpacket = function(t3) {
  82100. var e3 = t3.nsp === this.nsp, r3 = t3.type === n2.ERROR && "/" === t3.nsp;
  82101. if (e3 || r3)
  82102. switch (t3.type) {
  82103. case n2.CONNECT:
  82104. this.onconnect();
  82105. break;
  82106. case n2.EVENT:
  82107. case n2.BINARY_EVENT:
  82108. this.onevent(t3);
  82109. break;
  82110. case n2.ACK:
  82111. case n2.BINARY_ACK:
  82112. this.onack(t3);
  82113. break;
  82114. case n2.DISCONNECT:
  82115. this.ondisconnect();
  82116. break;
  82117. case n2.ERROR:
  82118. this.emit("error", t3.data);
  82119. }
  82120. }, l2.prototype.onevent = function(t3) {
  82121. var e3 = t3.data || [];
  82122. c2("emitting event %j", e3), null != t3.id && (c2("attaching ack callback to event"), e3.push(this.ack(t3.id))), this.connected ? p2.apply(this, e3) : this.receiveBuffer.push(e3);
  82123. }, l2.prototype.ack = function(t3) {
  82124. var e3 = this, r3 = false;
  82125. return function() {
  82126. if (!r3) {
  82127. r3 = true;
  82128. var o3 = i2(arguments);
  82129. c2("sending ack %j", o3), e3.packet({ type: u2(o3) ? n2.BINARY_ACK : n2.ACK, id: t3, data: o3 });
  82130. }
  82131. };
  82132. }, l2.prototype.onack = function(t3) {
  82133. var e3 = this.acks[t3.id];
  82134. "function" == typeof e3 ? (c2("calling ack %s with %j", t3.id, t3.data), e3.apply(this, t3.data), delete this.acks[t3.id]) : c2("bad ack %s", t3.id);
  82135. }, l2.prototype.onconnect = function() {
  82136. this.connected = true, this.disconnected = false, this.emit("connect"), this.emitBuffered();
  82137. }, l2.prototype.emitBuffered = function() {
  82138. var t3;
  82139. for (t3 = 0; t3 < this.receiveBuffer.length; t3++)
  82140. p2.apply(this, this.receiveBuffer[t3]);
  82141. for (this.receiveBuffer = [], t3 = 0; t3 < this.sendBuffer.length; t3++)
  82142. this.packet(this.sendBuffer[t3]);
  82143. this.sendBuffer = [];
  82144. }, l2.prototype.ondisconnect = function() {
  82145. c2("server disconnect (%s)", this.nsp), this.destroy(), this.onclose("io server disconnect");
  82146. }, l2.prototype.destroy = function() {
  82147. if (this.subs) {
  82148. for (var t3 = 0; t3 < this.subs.length; t3++)
  82149. this.subs[t3].destroy();
  82150. this.subs = null;
  82151. }
  82152. this.io.destroy(this);
  82153. }, l2.prototype.close = l2.prototype.disconnect = function() {
  82154. return this.connected && (c2("performing disconnect (%s)", this.nsp), this.packet({ type: n2.DISCONNECT })), this.destroy(), this.connected && this.onclose("io client disconnect"), this;
  82155. }, l2.prototype.compress = function(t3) {
  82156. return this.flags.compress = t3, this;
  82157. }, l2.prototype.binary = function(t3) {
  82158. return this.flags.binary = t3, this;
  82159. };
  82160. }, function(t2, e2) {
  82161. t2.exports = function(t3, e3, r2) {
  82162. return t3.on(e3, r2), { destroy: function() {
  82163. t3.removeListener(e3, r2);
  82164. } };
  82165. };
  82166. }, function(t2, e2) {
  82167. var r2 = [].slice;
  82168. t2.exports = function(t3, e3) {
  82169. if ("string" == typeof e3 && (e3 = t3[e3]), "function" != typeof e3)
  82170. throw new Error("bind() requires a function");
  82171. var n2 = r2.call(arguments, 2);
  82172. return function() {
  82173. return e3.apply(t3, n2.concat(r2.call(arguments)));
  82174. };
  82175. };
  82176. }, function(t2, e2, r2) {
  82177. t2.exports = r2(23);
  82178. }, function(t2, e2, r2) {
  82179. var n2 = r2(24), o2 = r2(5), i2 = r2(13), s2 = r2(0)("socket.io-client");
  82180. t2.exports = e2 = c2;
  82181. var a2 = e2.managers = {};
  82182. function c2(t3, e3) {
  82183. "object" == typeof t3 && (e3 = t3, t3 = void 0), e3 = e3 || {};
  82184. var r3, o3 = n2(t3), c3 = o3.source, h2 = o3.id, u2 = o3.path, f2 = a2[h2] && u2 in a2[h2].nsps;
  82185. return e3.forceNew || e3["force new connection"] || false === e3.multiplex || f2 ? (s2("ignoring socket cache for %s", c3), r3 = i2(c3, e3)) : (a2[h2] || (s2("new io instance for %s", c3), a2[h2] = i2(c3, e3)), r3 = a2[h2]), o3.query && !e3.query && (e3.query = o3.query), r3.socket(o3.path, e3);
  82186. }
  82187. e2.protocol = o2.protocol, e2.connect = c2, e2.Manager = r2(13), e2.Socket = r2(19);
  82188. }, function(t2, e2, r2) {
  82189. var n2 = r2(9), o2 = r2(0)("socket.io-client:url");
  82190. t2.exports = function(t3, e3) {
  82191. var r3 = t3;
  82192. e3 = e3 || "undefined" != typeof location && location, null == t3 && (t3 = e3.protocol + "//" + e3.host);
  82193. "string" == typeof t3 && ("/" === t3.charAt(0) && (t3 = "/" === t3.charAt(1) ? e3.protocol + t3 : e3.host + t3), /^(https?|wss?):\/\//.test(t3) || (o2("protocol-less url %s", t3), t3 = void 0 !== e3 ? e3.protocol + "//" + t3 : "https://" + t3), o2("parse %s", t3), r3 = n2(t3));
  82194. r3.port || (/^(http|ws)$/.test(r3.protocol) ? r3.port = "80" : /^(http|ws)s$/.test(r3.protocol) && (r3.port = "443"));
  82195. r3.path = r3.path || "/";
  82196. var i2 = -1 !== r3.host.indexOf(":") ? "[" + r3.host + "]" : r3.host;
  82197. return r3.id = r3.protocol + "://" + i2 + ":" + r3.port, r3.href = r3.protocol + "://" + i2 + (e3 && e3.port === r3.port ? "" : ":" + r3.port), r3;
  82198. };
  82199. }, function(t2, e2, r2) {
  82200. var n2 = r2(10), o2 = r2(11), i2 = Object.prototype.toString, s2 = "function" == typeof Blob || "undefined" != typeof Blob && "[object BlobConstructor]" === i2.call(Blob), a2 = "function" == typeof File || "undefined" != typeof File && "[object FileConstructor]" === i2.call(File);
  82201. e2.deconstructPacket = function(t3) {
  82202. var e3 = [], r3 = t3.data, i3 = t3;
  82203. return i3.data = function t4(e4, r4) {
  82204. if (!e4)
  82205. return e4;
  82206. if (o2(e4)) {
  82207. var i4 = { _placeholder: true, num: r4.length };
  82208. return r4.push(e4), i4;
  82209. }
  82210. if (n2(e4)) {
  82211. for (var s3 = new Array(e4.length), a3 = 0; a3 < e4.length; a3++)
  82212. s3[a3] = t4(e4[a3], r4);
  82213. return s3;
  82214. }
  82215. if ("object" == typeof e4 && !(e4 instanceof Date)) {
  82216. s3 = {};
  82217. for (var c2 in e4)
  82218. s3[c2] = t4(e4[c2], r4);
  82219. return s3;
  82220. }
  82221. return e4;
  82222. }(r3, e3), i3.attachments = e3.length, { packet: i3, buffers: e3 };
  82223. }, e2.reconstructPacket = function(t3, e3) {
  82224. return t3.data = function t4(e4, r3) {
  82225. if (!e4)
  82226. return e4;
  82227. if (e4 && e4._placeholder)
  82228. return r3[e4.num];
  82229. if (n2(e4))
  82230. for (var o3 = 0; o3 < e4.length; o3++)
  82231. e4[o3] = t4(e4[o3], r3);
  82232. else if ("object" == typeof e4)
  82233. for (var i3 in e4)
  82234. e4[i3] = t4(e4[i3], r3);
  82235. return e4;
  82236. }(t3.data, e3), t3.attachments = void 0, t3;
  82237. }, e2.removeBlobs = function(t3, e3) {
  82238. var r3 = 0, i3 = t3;
  82239. !function t4(c2, h2, u2) {
  82240. if (!c2)
  82241. return c2;
  82242. if (s2 && c2 instanceof Blob || a2 && c2 instanceof File) {
  82243. r3++;
  82244. var f2 = new FileReader();
  82245. f2.onload = function() {
  82246. u2 ? u2[h2] = this.result : i3 = this.result, --r3 || e3(i3);
  82247. }, f2.readAsArrayBuffer(c2);
  82248. } else if (n2(c2))
  82249. for (var p2 = 0; p2 < c2.length; p2++)
  82250. t4(c2[p2], p2, c2);
  82251. else if ("object" == typeof c2 && !o2(c2))
  82252. for (var l2 in c2)
  82253. t4(c2[l2], l2, c2);
  82254. }(i3), r3 || e3(i3);
  82255. };
  82256. }, function(t2, e2, r2) {
  82257. e2.byteLength = function(t3) {
  82258. var e3 = h2(t3), r3 = e3[0], n3 = e3[1];
  82259. return 3 * (r3 + n3) / 4 - n3;
  82260. }, e2.toByteArray = function(t3) {
  82261. var e3, r3, n3 = h2(t3), s3 = n3[0], a3 = n3[1], c3 = new i2(function(t4, e4, r4) {
  82262. return 3 * (e4 + r4) / 4 - r4;
  82263. }(0, s3, a3)), u3 = 0, f2 = a3 > 0 ? s3 - 4 : s3;
  82264. for (r3 = 0; r3 < f2; r3 += 4)
  82265. e3 = o2[t3.charCodeAt(r3)] << 18 | o2[t3.charCodeAt(r3 + 1)] << 12 | o2[t3.charCodeAt(r3 + 2)] << 6 | o2[t3.charCodeAt(r3 + 3)], c3[u3++] = e3 >> 16 & 255, c3[u3++] = e3 >> 8 & 255, c3[u3++] = 255 & e3;
  82266. 2 === a3 && (e3 = o2[t3.charCodeAt(r3)] << 2 | o2[t3.charCodeAt(r3 + 1)] >> 4, c3[u3++] = 255 & e3);
  82267. 1 === a3 && (e3 = o2[t3.charCodeAt(r3)] << 10 | o2[t3.charCodeAt(r3 + 1)] << 4 | o2[t3.charCodeAt(r3 + 2)] >> 2, c3[u3++] = e3 >> 8 & 255, c3[u3++] = 255 & e3);
  82268. return c3;
  82269. }, e2.fromByteArray = function(t3) {
  82270. for (var e3, r3 = t3.length, o3 = r3 % 3, i3 = [], s3 = 0, a3 = r3 - o3; s3 < a3; s3 += 16383)
  82271. i3.push(u2(t3, s3, s3 + 16383 > a3 ? a3 : s3 + 16383));
  82272. 1 === o3 ? (e3 = t3[r3 - 1], i3.push(n2[e3 >> 2] + n2[e3 << 4 & 63] + "==")) : 2 === o3 && (e3 = (t3[r3 - 2] << 8) + t3[r3 - 1], i3.push(n2[e3 >> 10] + n2[e3 >> 4 & 63] + n2[e3 << 2 & 63] + "="));
  82273. return i3.join("");
  82274. };
  82275. for (var n2 = [], o2 = [], i2 = "undefined" != typeof Uint8Array ? Uint8Array : Array, s2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", a2 = 0, c2 = s2.length; a2 < c2; ++a2)
  82276. n2[a2] = s2[a2], o2[s2.charCodeAt(a2)] = a2;
  82277. function h2(t3) {
  82278. var e3 = t3.length;
  82279. if (e3 % 4 > 0)
  82280. throw new Error("Invalid string. Length must be a multiple of 4");
  82281. var r3 = t3.indexOf("=");
  82282. return -1 === r3 && (r3 = e3), [r3, r3 === e3 ? 0 : 4 - r3 % 4];
  82283. }
  82284. function u2(t3, e3, r3) {
  82285. for (var o3, i3, s3 = [], a3 = e3; a3 < r3; a3 += 3)
  82286. o3 = (t3[a3] << 16 & 16711680) + (t3[a3 + 1] << 8 & 65280) + (255 & t3[a3 + 2]), s3.push(n2[(i3 = o3) >> 18 & 63] + n2[i3 >> 12 & 63] + n2[i3 >> 6 & 63] + n2[63 & i3]);
  82287. return s3.join("");
  82288. }
  82289. o2["-".charCodeAt(0)] = 62, o2["_".charCodeAt(0)] = 63;
  82290. }, function(t2, e2) {
  82291. e2.read = function(t3, e3, r2, n2, o2) {
  82292. var i2, s2, a2 = 8 * o2 - n2 - 1, c2 = (1 << a2) - 1, h2 = c2 >> 1, u2 = -7, f2 = r2 ? o2 - 1 : 0, p2 = r2 ? -1 : 1, l2 = t3[e3 + f2];
  82293. for (f2 += p2, i2 = l2 & (1 << -u2) - 1, l2 >>= -u2, u2 += a2; u2 > 0; i2 = 256 * i2 + t3[e3 + f2], f2 += p2, u2 -= 8)
  82294. ;
  82295. for (s2 = i2 & (1 << -u2) - 1, i2 >>= -u2, u2 += n2; u2 > 0; s2 = 256 * s2 + t3[e3 + f2], f2 += p2, u2 -= 8)
  82296. ;
  82297. if (0 === i2)
  82298. i2 = 1 - h2;
  82299. else {
  82300. if (i2 === c2)
  82301. return s2 ? NaN : 1 / 0 * (l2 ? -1 : 1);
  82302. s2 += Math.pow(2, n2), i2 -= h2;
  82303. }
  82304. return (l2 ? -1 : 1) * s2 * Math.pow(2, i2 - n2);
  82305. }, e2.write = function(t3, e3, r2, n2, o2, i2) {
  82306. var s2, a2, c2, h2 = 8 * i2 - o2 - 1, u2 = (1 << h2) - 1, f2 = u2 >> 1, p2 = 23 === o2 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, l2 = n2 ? 0 : i2 - 1, d2 = n2 ? 1 : -1, y2 = e3 < 0 || 0 === e3 && 1 / e3 < 0 ? 1 : 0;
  82307. for (e3 = Math.abs(e3), isNaN(e3) || e3 === 1 / 0 ? (a2 = isNaN(e3) ? 1 : 0, s2 = u2) : (s2 = Math.floor(Math.log(e3) / Math.LN2), e3 * (c2 = Math.pow(2, -s2)) < 1 && (s2--, c2 *= 2), (e3 += s2 + f2 >= 1 ? p2 / c2 : p2 * Math.pow(2, 1 - f2)) * c2 >= 2 && (s2++, c2 /= 2), s2 + f2 >= u2 ? (a2 = 0, s2 = u2) : s2 + f2 >= 1 ? (a2 = (e3 * c2 - 1) * Math.pow(2, o2), s2 += f2) : (a2 = e3 * Math.pow(2, f2 - 1) * Math.pow(2, o2), s2 = 0)); o2 >= 8; t3[r2 + l2] = 255 & a2, l2 += d2, a2 /= 256, o2 -= 8)
  82308. ;
  82309. for (s2 = s2 << o2 | a2, h2 += o2; h2 > 0; t3[r2 + l2] = 255 & s2, l2 += d2, s2 /= 256, h2 -= 8)
  82310. ;
  82311. t3[r2 + l2 - d2] |= 128 * y2;
  82312. };
  82313. }, function(t2, e2) {
  82314. var r2 = {}.toString;
  82315. t2.exports = Array.isArray || function(t3) {
  82316. return "[object Array]" == r2.call(t3);
  82317. };
  82318. }, function(t2, e2, r2) {
  82319. t2.exports = r2(30), t2.exports.parser = r2(2);
  82320. }, function(t2, e2, r2) {
  82321. var n2 = r2(14), o2 = r2(1), i2 = r2(0)("engine.io-client:socket"), s2 = r2(18), a2 = r2(2), c2 = r2(9), h2 = r2(3);
  82322. function u2(t3, e3) {
  82323. if (!(this instanceof u2))
  82324. return new u2(t3, e3);
  82325. e3 = e3 || {}, t3 && "object" == typeof t3 && (e3 = t3, t3 = null), t3 ? (t3 = c2(t3), e3.hostname = t3.host, e3.secure = "https" === t3.protocol || "wss" === t3.protocol, e3.port = t3.port, t3.query && (e3.query = t3.query)) : e3.host && (e3.hostname = c2(e3.host).host), this.secure = null != e3.secure ? e3.secure : "undefined" != typeof location && "https:" === location.protocol, e3.hostname && !e3.port && (e3.port = this.secure ? "443" : "80"), this.agent = e3.agent || false, this.hostname = e3.hostname || ("undefined" != typeof location ? location.hostname : "localhost"), this.port = e3.port || ("undefined" != typeof location && location.port ? location.port : this.secure ? 443 : 80), this.query = e3.query || {}, "string" == typeof this.query && (this.query = h2.decode(this.query)), this.upgrade = false !== e3.upgrade, this.path = (e3.path || "/engine.io").replace(/\/$/, "") + "/", this.forceJSONP = !!e3.forceJSONP, this.jsonp = false !== e3.jsonp, this.forceBase64 = !!e3.forceBase64, this.enablesXDR = !!e3.enablesXDR, this.withCredentials = false !== e3.withCredentials, this.timestampParam = e3.timestampParam || "t", this.timestampRequests = e3.timestampRequests, this.transports = e3.transports || ["polling", "websocket"], this.transportOptions = e3.transportOptions || {}, this.readyState = "", this.writeBuffer = [], this.prevBufferLen = 0, this.policyPort = e3.policyPort || 843, this.rememberUpgrade = e3.rememberUpgrade || false, this.binaryType = null, this.onlyBinaryUpgrades = e3.onlyBinaryUpgrades, this.perMessageDeflate = false !== e3.perMessageDeflate && (e3.perMessageDeflate || {}), true === this.perMessageDeflate && (this.perMessageDeflate = {}), this.perMessageDeflate && null == this.perMessageDeflate.threshold && (this.perMessageDeflate.threshold = 1024), this.pfx = e3.pfx || null, this.key = e3.key || null, this.passphrase = e3.passphrase || null, this.cert = e3.cert || null, this.ca = e3.ca || null, this.ciphers = e3.ciphers || null, this.rejectUnauthorized = void 0 === e3.rejectUnauthorized || e3.rejectUnauthorized, this.forceNode = !!e3.forceNode, this.isReactNative = "undefined" != typeof navigator && "string" == typeof navigator.product && "reactnative" === navigator.product.toLowerCase(), ("undefined" == typeof self || this.isReactNative) && (e3.extraHeaders && Object.keys(e3.extraHeaders).length > 0 && (this.extraHeaders = e3.extraHeaders), e3.localAddress && (this.localAddress = e3.localAddress)), this.id = null, this.upgrades = null, this.pingInterval = null, this.pingTimeout = null, this.pingIntervalTimer = null, this.pingTimeoutTimer = null, this.open();
  82326. }
  82327. t2.exports = u2, u2.priorWebsocketSuccess = false, o2(u2.prototype), u2.protocol = a2.protocol, u2.Socket = u2, u2.Transport = r2(8), u2.transports = r2(14), u2.parser = r2(2), u2.prototype.createTransport = function(t3) {
  82328. i2('creating transport "%s"', t3);
  82329. var e3 = function(t4) {
  82330. var e4 = {};
  82331. for (var r4 in t4)
  82332. t4.hasOwnProperty(r4) && (e4[r4] = t4[r4]);
  82333. return e4;
  82334. }(this.query);
  82335. e3.EIO = a2.protocol, e3.transport = t3;
  82336. var r3 = this.transportOptions[t3] || {};
  82337. return this.id && (e3.sid = this.id), new n2[t3]({ query: e3, socket: this, agent: r3.agent || this.agent, hostname: r3.hostname || this.hostname, port: r3.port || this.port, secure: r3.secure || this.secure, path: r3.path || this.path, forceJSONP: r3.forceJSONP || this.forceJSONP, jsonp: r3.jsonp || this.jsonp, forceBase64: r3.forceBase64 || this.forceBase64, enablesXDR: r3.enablesXDR || this.enablesXDR, withCredentials: r3.withCredentials || this.withCredentials, timestampRequests: r3.timestampRequests || this.timestampRequests, timestampParam: r3.timestampParam || this.timestampParam, policyPort: r3.policyPort || this.policyPort, pfx: r3.pfx || this.pfx, key: r3.key || this.key, passphrase: r3.passphrase || this.passphrase, cert: r3.cert || this.cert, ca: r3.ca || this.ca, ciphers: r3.ciphers || this.ciphers, rejectUnauthorized: r3.rejectUnauthorized || this.rejectUnauthorized, perMessageDeflate: r3.perMessageDeflate || this.perMessageDeflate, extraHeaders: r3.extraHeaders || this.extraHeaders, forceNode: r3.forceNode || this.forceNode, localAddress: r3.localAddress || this.localAddress, requestTimeout: r3.requestTimeout || this.requestTimeout, protocols: r3.protocols || void 0, isReactNative: this.isReactNative });
  82338. }, u2.prototype.open = function() {
  82339. var t3;
  82340. if (this.rememberUpgrade && u2.priorWebsocketSuccess && -1 !== this.transports.indexOf("websocket"))
  82341. t3 = "websocket";
  82342. else {
  82343. if (0 === this.transports.length) {
  82344. var e3 = this;
  82345. return void setTimeout(function() {
  82346. e3.emit("error", "No transports available");
  82347. }, 0);
  82348. }
  82349. t3 = this.transports[0];
  82350. }
  82351. this.readyState = "opening";
  82352. try {
  82353. t3 = this.createTransport(t3);
  82354. } catch (t4) {
  82355. return this.transports.shift(), void this.open();
  82356. }
  82357. t3.open(), this.setTransport(t3);
  82358. }, u2.prototype.setTransport = function(t3) {
  82359. i2("setting transport %s", t3.name);
  82360. var e3 = this;
  82361. this.transport && (i2("clearing existing transport %s", this.transport.name), this.transport.removeAllListeners()), this.transport = t3, t3.on("drain", function() {
  82362. e3.onDrain();
  82363. }).on("packet", function(t4) {
  82364. e3.onPacket(t4);
  82365. }).on("error", function(t4) {
  82366. e3.onError(t4);
  82367. }).on("close", function() {
  82368. e3.onClose("transport close");
  82369. });
  82370. }, u2.prototype.probe = function(t3) {
  82371. i2('probing transport "%s"', t3);
  82372. var e3 = this.createTransport(t3, { probe: 1 }), r3 = false, n3 = this;
  82373. function o3() {
  82374. if (n3.onlyBinaryUpgrades) {
  82375. var o4 = !this.supportsBinary && n3.transport.supportsBinary;
  82376. r3 = r3 || o4;
  82377. }
  82378. r3 || (i2('probe transport "%s" opened', t3), e3.send([{ type: "ping", data: "probe" }]), e3.once("packet", function(o5) {
  82379. if (!r3)
  82380. if ("pong" === o5.type && "probe" === o5.data) {
  82381. if (i2('probe transport "%s" pong', t3), n3.upgrading = true, n3.emit("upgrading", e3), !e3)
  82382. return;
  82383. u2.priorWebsocketSuccess = "websocket" === e3.name, i2('pausing current transport "%s"', n3.transport.name), n3.transport.pause(function() {
  82384. r3 || "closed" !== n3.readyState && (i2("changing transport and sending upgrade packet"), p2(), n3.setTransport(e3), e3.send([{ type: "upgrade" }]), n3.emit("upgrade", e3), e3 = null, n3.upgrading = false, n3.flush());
  82385. });
  82386. } else {
  82387. i2('probe transport "%s" failed', t3);
  82388. var s4 = new Error("probe error");
  82389. s4.transport = e3.name, n3.emit("upgradeError", s4);
  82390. }
  82391. }));
  82392. }
  82393. function s3() {
  82394. r3 || (r3 = true, p2(), e3.close(), e3 = null);
  82395. }
  82396. function a3(r4) {
  82397. var o4 = new Error("probe error: " + r4);
  82398. o4.transport = e3.name, s3(), i2('probe transport "%s" failed because of error: %s', t3, r4), n3.emit("upgradeError", o4);
  82399. }
  82400. function c3() {
  82401. a3("transport closed");
  82402. }
  82403. function h3() {
  82404. a3("socket closed");
  82405. }
  82406. function f2(t4) {
  82407. e3 && t4.name !== e3.name && (i2('"%s" works - aborting "%s"', t4.name, e3.name), s3());
  82408. }
  82409. function p2() {
  82410. e3.removeListener("open", o3), e3.removeListener("error", a3), e3.removeListener("close", c3), n3.removeListener("close", h3), n3.removeListener("upgrading", f2);
  82411. }
  82412. u2.priorWebsocketSuccess = false, e3.once("open", o3), e3.once("error", a3), e3.once("close", c3), this.once("close", h3), this.once("upgrading", f2), e3.open();
  82413. }, u2.prototype.onOpen = function() {
  82414. if (i2("socket open"), this.readyState = "open", u2.priorWebsocketSuccess = "websocket" === this.transport.name, this.emit("open"), this.flush(), "open" === this.readyState && this.upgrade && this.transport.pause) {
  82415. i2("starting upgrade probes");
  82416. for (var t3 = 0, e3 = this.upgrades.length; t3 < e3; t3++)
  82417. this.probe(this.upgrades[t3]);
  82418. }
  82419. }, u2.prototype.onPacket = function(t3) {
  82420. if ("opening" === this.readyState || "open" === this.readyState || "closing" === this.readyState)
  82421. switch (i2('socket receive: type "%s", data "%s"', t3.type, t3.data), this.emit("packet", t3), this.emit("heartbeat"), t3.type) {
  82422. case "open":
  82423. this.onHandshake(JSON.parse(t3.data));
  82424. break;
  82425. case "pong":
  82426. this.setPing(), this.emit("pong");
  82427. break;
  82428. case "error":
  82429. var e3 = new Error("server error");
  82430. e3.code = t3.data, this.onError(e3);
  82431. break;
  82432. case "message":
  82433. this.emit("data", t3.data), this.emit("message", t3.data);
  82434. }
  82435. else
  82436. i2('packet received with socket readyState "%s"', this.readyState);
  82437. }, u2.prototype.onHandshake = function(t3) {
  82438. this.emit("handshake", t3), this.id = t3.sid, this.transport.query.sid = t3.sid, this.upgrades = this.filterUpgrades(t3.upgrades), this.pingInterval = t3.pingInterval, this.pingTimeout = t3.pingTimeout, this.onOpen(), "closed" !== this.readyState && (this.setPing(), this.removeListener("heartbeat", this.onHeartbeat), this.on("heartbeat", this.onHeartbeat));
  82439. }, u2.prototype.onHeartbeat = function(t3) {
  82440. clearTimeout(this.pingTimeoutTimer);
  82441. var e3 = this;
  82442. e3.pingTimeoutTimer = setTimeout(function() {
  82443. "closed" !== e3.readyState && e3.onClose("ping timeout");
  82444. }, t3 || e3.pingInterval + e3.pingTimeout);
  82445. }, u2.prototype.setPing = function() {
  82446. var t3 = this;
  82447. clearTimeout(t3.pingIntervalTimer), t3.pingIntervalTimer = setTimeout(function() {
  82448. i2("writing ping packet - expecting pong within %sms", t3.pingTimeout), t3.ping(), t3.onHeartbeat(t3.pingTimeout);
  82449. }, t3.pingInterval);
  82450. }, u2.prototype.ping = function() {
  82451. var t3 = this;
  82452. this.sendPacket("ping", function() {
  82453. t3.emit("ping");
  82454. });
  82455. }, u2.prototype.onDrain = function() {
  82456. this.writeBuffer.splice(0, this.prevBufferLen), this.prevBufferLen = 0, 0 === this.writeBuffer.length ? this.emit("drain") : this.flush();
  82457. }, u2.prototype.flush = function() {
  82458. "closed" !== this.readyState && this.transport.writable && !this.upgrading && this.writeBuffer.length && (i2("flushing %d packets in socket", this.writeBuffer.length), this.transport.send(this.writeBuffer), this.prevBufferLen = this.writeBuffer.length, this.emit("flush"));
  82459. }, u2.prototype.write = u2.prototype.send = function(t3, e3, r3) {
  82460. return this.sendPacket("message", t3, e3, r3), this;
  82461. }, u2.prototype.sendPacket = function(t3, e3, r3, n3) {
  82462. if ("function" == typeof e3 && (n3 = e3, e3 = void 0), "function" == typeof r3 && (n3 = r3, r3 = null), "closing" !== this.readyState && "closed" !== this.readyState) {
  82463. (r3 = r3 || {}).compress = false !== r3.compress;
  82464. var o3 = { type: t3, data: e3, options: r3 };
  82465. this.emit("packetCreate", o3), this.writeBuffer.push(o3), n3 && this.once("flush", n3), this.flush();
  82466. }
  82467. }, u2.prototype.close = function() {
  82468. if ("opening" === this.readyState || "open" === this.readyState) {
  82469. this.readyState = "closing";
  82470. var t3 = this;
  82471. this.writeBuffer.length ? this.once("drain", function() {
  82472. this.upgrading ? n3() : e3();
  82473. }) : this.upgrading ? n3() : e3();
  82474. }
  82475. function e3() {
  82476. t3.onClose("forced close"), i2("socket closing - telling transport to close"), t3.transport.close();
  82477. }
  82478. function r3() {
  82479. t3.removeListener("upgrade", r3), t3.removeListener("upgradeError", r3), e3();
  82480. }
  82481. function n3() {
  82482. t3.once("upgrade", r3), t3.once("upgradeError", r3);
  82483. }
  82484. return this;
  82485. }, u2.prototype.onError = function(t3) {
  82486. i2("socket error %j", t3), u2.priorWebsocketSuccess = false, this.emit("error", t3), this.onClose("transport error", t3);
  82487. }, u2.prototype.onClose = function(t3, e3) {
  82488. if ("opening" === this.readyState || "open" === this.readyState || "closing" === this.readyState) {
  82489. i2('socket close with reason: "%s"', t3);
  82490. clearTimeout(this.pingIntervalTimer), clearTimeout(this.pingTimeoutTimer), this.transport.removeAllListeners("close"), this.transport.close(), this.transport.removeAllListeners(), this.readyState = "closed", this.id = null, this.emit("close", t3, e3), this.writeBuffer = [], this.prevBufferLen = 0;
  82491. }
  82492. }, u2.prototype.filterUpgrades = function(t3) {
  82493. for (var e3 = [], r3 = 0, n3 = t3.length; r3 < n3; r3++)
  82494. ~s2(this.transports, t3[r3]) && e3.push(t3[r3]);
  82495. return e3;
  82496. };
  82497. }, function(t2, e2) {
  82498. try {
  82499. t2.exports = "undefined" != typeof XMLHttpRequest && "withCredentials" in new XMLHttpRequest();
  82500. } catch (e3) {
  82501. t2.exports = false;
  82502. }
  82503. }, function(t2, e2, r2) {
  82504. var n2 = r2(7), o2 = r2(15), i2 = r2(1), s2 = r2(4), a2 = r2(0)("engine.io-client:polling-xhr");
  82505. function c2() {
  82506. }
  82507. function h2(t3) {
  82508. if (o2.call(this, t3), this.requestTimeout = t3.requestTimeout, this.extraHeaders = t3.extraHeaders, "undefined" != typeof location) {
  82509. var e3 = "https:" === location.protocol, r3 = location.port;
  82510. r3 || (r3 = e3 ? 443 : 80), this.xd = "undefined" != typeof location && t3.hostname !== location.hostname || r3 !== t3.port, this.xs = t3.secure !== e3;
  82511. }
  82512. }
  82513. function u2(t3) {
  82514. this.method = t3.method || "GET", this.uri = t3.uri, this.xd = !!t3.xd, this.xs = !!t3.xs, this.async = false !== t3.async, this.data = void 0 !== t3.data ? t3.data : null, this.agent = t3.agent, this.isBinary = t3.isBinary, this.supportsBinary = t3.supportsBinary, this.enablesXDR = t3.enablesXDR, this.withCredentials = t3.withCredentials, this.requestTimeout = t3.requestTimeout, this.pfx = t3.pfx, this.key = t3.key, this.passphrase = t3.passphrase, this.cert = t3.cert, this.ca = t3.ca, this.ciphers = t3.ciphers, this.rejectUnauthorized = t3.rejectUnauthorized, this.extraHeaders = t3.extraHeaders, this.create();
  82515. }
  82516. if (t2.exports = h2, t2.exports.Request = u2, s2(h2, o2), h2.prototype.supportsBinary = true, h2.prototype.request = function(t3) {
  82517. return (t3 = t3 || {}).uri = this.uri(), t3.xd = this.xd, t3.xs = this.xs, t3.agent = this.agent || false, t3.supportsBinary = this.supportsBinary, t3.enablesXDR = this.enablesXDR, t3.withCredentials = this.withCredentials, t3.pfx = this.pfx, t3.key = this.key, t3.passphrase = this.passphrase, t3.cert = this.cert, t3.ca = this.ca, t3.ciphers = this.ciphers, t3.rejectUnauthorized = this.rejectUnauthorized, t3.requestTimeout = this.requestTimeout, t3.extraHeaders = this.extraHeaders, new u2(t3);
  82518. }, h2.prototype.doWrite = function(t3, e3) {
  82519. var r3 = "string" != typeof t3 && void 0 !== t3, n3 = this.request({ method: "POST", data: t3, isBinary: r3 }), o3 = this;
  82520. n3.on("success", e3), n3.on("error", function(t4) {
  82521. o3.onError("xhr post error", t4);
  82522. }), this.sendXhr = n3;
  82523. }, h2.prototype.doPoll = function() {
  82524. a2("xhr poll");
  82525. var t3 = this.request(), e3 = this;
  82526. t3.on("data", function(t4) {
  82527. e3.onData(t4);
  82528. }), t3.on("error", function(t4) {
  82529. e3.onError("xhr poll error", t4);
  82530. }), this.pollXhr = t3;
  82531. }, i2(u2.prototype), u2.prototype.create = function() {
  82532. var t3 = { agent: this.agent, xdomain: this.xd, xscheme: this.xs, enablesXDR: this.enablesXDR };
  82533. t3.pfx = this.pfx, t3.key = this.key, t3.passphrase = this.passphrase, t3.cert = this.cert, t3.ca = this.ca, t3.ciphers = this.ciphers, t3.rejectUnauthorized = this.rejectUnauthorized;
  82534. var e3 = this.xhr = new n2(t3), r3 = this;
  82535. try {
  82536. a2("xhr open %s: %s", this.method, this.uri), e3.open(this.method, this.uri, this.async);
  82537. try {
  82538. if (this.extraHeaders)
  82539. for (var o3 in e3.setDisableHeaderCheck && e3.setDisableHeaderCheck(true), this.extraHeaders)
  82540. this.extraHeaders.hasOwnProperty(o3) && e3.setRequestHeader(o3, this.extraHeaders[o3]);
  82541. } catch (t4) {
  82542. }
  82543. if ("POST" === this.method)
  82544. try {
  82545. this.isBinary ? e3.setRequestHeader("Content-type", "application/octet-stream") : e3.setRequestHeader("Content-type", "text/plain;charset=UTF-8");
  82546. } catch (t4) {
  82547. }
  82548. try {
  82549. e3.setRequestHeader("Accept", "*/*");
  82550. } catch (t4) {
  82551. }
  82552. "withCredentials" in e3 && (e3.withCredentials = this.withCredentials), this.requestTimeout && (e3.timeout = this.requestTimeout), this.hasXDR() ? (e3.onload = function() {
  82553. r3.onLoad();
  82554. }, e3.onerror = function() {
  82555. r3.onError(e3.responseText);
  82556. }) : e3.onreadystatechange = function() {
  82557. if (2 === e3.readyState)
  82558. try {
  82559. var t4 = e3.getResponseHeader("Content-Type");
  82560. (r3.supportsBinary && "application/octet-stream" === t4 || "application/octet-stream; charset=UTF-8" === t4) && (e3.responseType = "arraybuffer");
  82561. } catch (t5) {
  82562. }
  82563. 4 === e3.readyState && (200 === e3.status || 1223 === e3.status ? r3.onLoad() : setTimeout(function() {
  82564. r3.onError("number" == typeof e3.status ? e3.status : 0);
  82565. }, 0));
  82566. }, a2("xhr data %s", this.data), e3.send(this.data);
  82567. } catch (t4) {
  82568. return void setTimeout(function() {
  82569. r3.onError(t4);
  82570. }, 0);
  82571. }
  82572. "undefined" != typeof document && (this.index = u2.requestsCount++, u2.requests[this.index] = this);
  82573. }, u2.prototype.onSuccess = function() {
  82574. this.emit("success"), this.cleanup();
  82575. }, u2.prototype.onData = function(t3) {
  82576. this.emit("data", t3), this.onSuccess();
  82577. }, u2.prototype.onError = function(t3) {
  82578. this.emit("error", t3), this.cleanup(true);
  82579. }, u2.prototype.cleanup = function(t3) {
  82580. if (void 0 !== this.xhr && null !== this.xhr) {
  82581. if (this.hasXDR() ? this.xhr.onload = this.xhr.onerror = c2 : this.xhr.onreadystatechange = c2, t3)
  82582. try {
  82583. this.xhr.abort();
  82584. } catch (t4) {
  82585. }
  82586. "undefined" != typeof document && delete u2.requests[this.index], this.xhr = null;
  82587. }
  82588. }, u2.prototype.onLoad = function() {
  82589. var t3;
  82590. try {
  82591. var e3;
  82592. try {
  82593. e3 = this.xhr.getResponseHeader("Content-Type");
  82594. } catch (t4) {
  82595. }
  82596. t3 = ("application/octet-stream" === e3 || "application/octet-stream; charset=UTF-8" === e3) && this.xhr.response || this.xhr.responseText;
  82597. } catch (t4) {
  82598. this.onError(t4);
  82599. }
  82600. null != t3 && this.onData(t3);
  82601. }, u2.prototype.hasXDR = function() {
  82602. return "undefined" != typeof XDomainRequest && !this.xs && this.enablesXDR;
  82603. }, u2.prototype.abort = function() {
  82604. this.cleanup();
  82605. }, u2.requestsCount = 0, u2.requests = {}, "undefined" != typeof document) {
  82606. if ("function" == typeof attachEvent)
  82607. attachEvent("onunload", p2);
  82608. else if ("function" == typeof addEventListener) {
  82609. var f2 = "onpagehide" in self ? "pagehide" : "unload";
  82610. addEventListener(f2, p2, false);
  82611. }
  82612. }
  82613. function p2() {
  82614. for (var t3 in u2.requests)
  82615. u2.requests.hasOwnProperty(t3) && u2.requests[t3].abort();
  82616. }
  82617. }, function(t2, e2) {
  82618. t2.exports = Object.keys || function(t3) {
  82619. var e3 = [], r2 = Object.prototype.hasOwnProperty;
  82620. for (var n2 in t3)
  82621. r2.call(t3, n2) && e3.push(n2);
  82622. return e3;
  82623. };
  82624. }, function(t2, e2) {
  82625. var r2 = {}.toString;
  82626. t2.exports = Array.isArray || function(t3) {
  82627. return "[object Array]" == r2.call(t3);
  82628. };
  82629. }, function(t2, e2) {
  82630. t2.exports = function(t3, e3, r2) {
  82631. var n2 = t3.byteLength;
  82632. if (e3 = e3 || 0, r2 = r2 || n2, t3.slice)
  82633. return t3.slice(e3, r2);
  82634. if (e3 < 0 && (e3 += n2), r2 < 0 && (r2 += n2), r2 > n2 && (r2 = n2), e3 >= n2 || e3 >= r2 || 0 === n2)
  82635. return new ArrayBuffer(0);
  82636. for (var o2 = new Uint8Array(t3), i2 = new Uint8Array(r2 - e3), s2 = e3, a2 = 0; s2 < r2; s2++, a2++)
  82637. i2[a2] = o2[s2];
  82638. return i2.buffer;
  82639. };
  82640. }, function(t2, e2) {
  82641. function r2() {
  82642. }
  82643. t2.exports = function(t3, e3, n2) {
  82644. var o2 = false;
  82645. return n2 = n2 || r2, i2.count = t3, 0 === t3 ? e3() : i2;
  82646. function i2(t4, r3) {
  82647. if (i2.count <= 0)
  82648. throw new Error("after called too many times");
  82649. --i2.count, t4 ? (o2 = true, e3(t4), e3 = n2) : 0 !== i2.count || o2 || e3(null, r3);
  82650. }
  82651. };
  82652. }, function(t2, e2) {
  82653. /*! https://mths.be/utf8js v2.1.2 by @mathias */
  82654. var r2, n2, o2, i2 = String.fromCharCode;
  82655. function s2(t3) {
  82656. for (var e3, r3, n3 = [], o3 = 0, i3 = t3.length; o3 < i3; )
  82657. (e3 = t3.charCodeAt(o3++)) >= 55296 && e3 <= 56319 && o3 < i3 ? 56320 == (64512 & (r3 = t3.charCodeAt(o3++))) ? n3.push(((1023 & e3) << 10) + (1023 & r3) + 65536) : (n3.push(e3), o3--) : n3.push(e3);
  82658. return n3;
  82659. }
  82660. function a2(t3, e3) {
  82661. if (t3 >= 55296 && t3 <= 57343) {
  82662. if (e3)
  82663. throw Error("Lone surrogate U+" + t3.toString(16).toUpperCase() + " is not a scalar value");
  82664. return false;
  82665. }
  82666. return true;
  82667. }
  82668. function c2(t3, e3) {
  82669. return i2(t3 >> e3 & 63 | 128);
  82670. }
  82671. function h2(t3, e3) {
  82672. if (0 == (4294967168 & t3))
  82673. return i2(t3);
  82674. var r3 = "";
  82675. return 0 == (4294965248 & t3) ? r3 = i2(t3 >> 6 & 31 | 192) : 0 == (4294901760 & t3) ? (a2(t3, e3) || (t3 = 65533), r3 = i2(t3 >> 12 & 15 | 224), r3 += c2(t3, 6)) : 0 == (4292870144 & t3) && (r3 = i2(t3 >> 18 & 7 | 240), r3 += c2(t3, 12), r3 += c2(t3, 6)), r3 += i2(63 & t3 | 128);
  82676. }
  82677. function u2() {
  82678. if (o2 >= n2)
  82679. throw Error("Invalid byte index");
  82680. var t3 = 255 & r2[o2];
  82681. if (o2++, 128 == (192 & t3))
  82682. return 63 & t3;
  82683. throw Error("Invalid continuation byte");
  82684. }
  82685. function f2(t3) {
  82686. var e3, i3;
  82687. if (o2 > n2)
  82688. throw Error("Invalid byte index");
  82689. if (o2 == n2)
  82690. return false;
  82691. if (e3 = 255 & r2[o2], o2++, 0 == (128 & e3))
  82692. return e3;
  82693. if (192 == (224 & e3)) {
  82694. if ((i3 = (31 & e3) << 6 | u2()) >= 128)
  82695. return i3;
  82696. throw Error("Invalid continuation byte");
  82697. }
  82698. if (224 == (240 & e3)) {
  82699. if ((i3 = (15 & e3) << 12 | u2() << 6 | u2()) >= 2048)
  82700. return a2(i3, t3) ? i3 : 65533;
  82701. throw Error("Invalid continuation byte");
  82702. }
  82703. if (240 == (248 & e3) && (i3 = (7 & e3) << 18 | u2() << 12 | u2() << 6 | u2()) >= 65536 && i3 <= 1114111)
  82704. return i3;
  82705. throw Error("Invalid UTF-8 detected");
  82706. }
  82707. t2.exports = { version: "2.1.2", encode: function(t3, e3) {
  82708. for (var r3 = false !== (e3 = e3 || {}).strict, n3 = s2(t3), o3 = n3.length, i3 = -1, a3 = ""; ++i3 < o3; )
  82709. a3 += h2(n3[i3], r3);
  82710. return a3;
  82711. }, decode: function(t3, e3) {
  82712. var a3 = false !== (e3 = e3 || {}).strict;
  82713. r2 = s2(t3), n2 = r2.length, o2 = 0;
  82714. for (var c3, h3 = []; false !== (c3 = f2(a3)); )
  82715. h3.push(c3);
  82716. return function(t4) {
  82717. for (var e4, r3 = t4.length, n3 = -1, o3 = ""; ++n3 < r3; )
  82718. (e4 = t4[n3]) > 65535 && (o3 += i2((e4 -= 65536) >>> 10 & 1023 | 55296), e4 = 56320 | 1023 & e4), o3 += i2(e4);
  82719. return o3;
  82720. }(h3);
  82721. } };
  82722. }, function(t2, e2) {
  82723. !function() {
  82724. for (var t3 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", r2 = new Uint8Array(256), n2 = 0; n2 < t3.length; n2++)
  82725. r2[t3.charCodeAt(n2)] = n2;
  82726. e2.encode = function(e3) {
  82727. var r3, n3 = new Uint8Array(e3), o2 = n3.length, i2 = "";
  82728. for (r3 = 0; r3 < o2; r3 += 3)
  82729. i2 += t3[n3[r3] >> 2], i2 += t3[(3 & n3[r3]) << 4 | n3[r3 + 1] >> 4], i2 += t3[(15 & n3[r3 + 1]) << 2 | n3[r3 + 2] >> 6], i2 += t3[63 & n3[r3 + 2]];
  82730. return o2 % 3 == 2 ? i2 = i2.substring(0, i2.length - 1) + "=" : o2 % 3 == 1 && (i2 = i2.substring(0, i2.length - 2) + "=="), i2;
  82731. }, e2.decode = function(t4) {
  82732. var e3, n3, o2, i2, s2, a2 = 0.75 * t4.length, c2 = t4.length, h2 = 0;
  82733. "=" === t4[t4.length - 1] && (a2--, "=" === t4[t4.length - 2] && a2--);
  82734. var u2 = new ArrayBuffer(a2), f2 = new Uint8Array(u2);
  82735. for (e3 = 0; e3 < c2; e3 += 4)
  82736. n3 = r2[t4.charCodeAt(e3)], o2 = r2[t4.charCodeAt(e3 + 1)], i2 = r2[t4.charCodeAt(e3 + 2)], s2 = r2[t4.charCodeAt(e3 + 3)], f2[h2++] = n3 << 2 | o2 >> 4, f2[h2++] = (15 & o2) << 4 | i2 >> 2, f2[h2++] = (3 & i2) << 6 | 63 & s2;
  82737. return u2;
  82738. };
  82739. }();
  82740. }, function(t2, e2) {
  82741. var r2 = void 0 !== r2 ? r2 : "undefined" != typeof WebKitBlobBuilder ? WebKitBlobBuilder : "undefined" != typeof MSBlobBuilder ? MSBlobBuilder : "undefined" != typeof MozBlobBuilder && MozBlobBuilder, n2 = function() {
  82742. try {
  82743. return 2 === new Blob(["hi"]).size;
  82744. } catch (t3) {
  82745. return false;
  82746. }
  82747. }(), o2 = n2 && function() {
  82748. try {
  82749. return 2 === new Blob([new Uint8Array([1, 2])]).size;
  82750. } catch (t3) {
  82751. return false;
  82752. }
  82753. }(), i2 = r2 && r2.prototype.append && r2.prototype.getBlob;
  82754. function s2(t3) {
  82755. return t3.map(function(t4) {
  82756. if (t4.buffer instanceof ArrayBuffer) {
  82757. var e3 = t4.buffer;
  82758. if (t4.byteLength !== e3.byteLength) {
  82759. var r3 = new Uint8Array(t4.byteLength);
  82760. r3.set(new Uint8Array(e3, t4.byteOffset, t4.byteLength)), e3 = r3.buffer;
  82761. }
  82762. return e3;
  82763. }
  82764. return t4;
  82765. });
  82766. }
  82767. function a2(t3, e3) {
  82768. e3 = e3 || {};
  82769. var n3 = new r2();
  82770. return s2(t3).forEach(function(t4) {
  82771. n3.append(t4);
  82772. }), e3.type ? n3.getBlob(e3.type) : n3.getBlob();
  82773. }
  82774. function c2(t3, e3) {
  82775. return new Blob(s2(t3), e3 || {});
  82776. }
  82777. "undefined" != typeof Blob && (a2.prototype = Blob.prototype, c2.prototype = Blob.prototype), t2.exports = n2 ? o2 ? Blob : c2 : i2 ? a2 : void 0;
  82778. }, function(t2, e2, r2) {
  82779. (function(e3) {
  82780. var n2 = r2(15), o2 = r2(4);
  82781. t2.exports = u2;
  82782. var i2, s2 = /\n/g, a2 = /\\n/g;
  82783. function c2() {
  82784. }
  82785. function h2() {
  82786. return "undefined" != typeof self ? self : "undefined" != typeof window ? window : void 0 !== e3 ? e3 : {};
  82787. }
  82788. function u2(t3) {
  82789. if (n2.call(this, t3), this.query = this.query || {}, !i2) {
  82790. var e4 = h2();
  82791. i2 = e4.___eio = e4.___eio || [];
  82792. }
  82793. this.index = i2.length;
  82794. var r3 = this;
  82795. i2.push(function(t4) {
  82796. r3.onData(t4);
  82797. }), this.query.j = this.index, "function" == typeof addEventListener && addEventListener("beforeunload", function() {
  82798. r3.script && (r3.script.onerror = c2);
  82799. }, false);
  82800. }
  82801. o2(u2, n2), u2.prototype.supportsBinary = false, u2.prototype.doClose = function() {
  82802. this.script && (this.script.parentNode.removeChild(this.script), this.script = null), this.form && (this.form.parentNode.removeChild(this.form), this.form = null, this.iframe = null), n2.prototype.doClose.call(this);
  82803. }, u2.prototype.doPoll = function() {
  82804. var t3 = this, e4 = document.createElement("script");
  82805. this.script && (this.script.parentNode.removeChild(this.script), this.script = null), e4.async = true, e4.src = this.uri(), e4.onerror = function(e5) {
  82806. t3.onError("jsonp poll error", e5);
  82807. };
  82808. var r3 = document.getElementsByTagName("script")[0];
  82809. r3 ? r3.parentNode.insertBefore(e4, r3) : (document.head || document.body).appendChild(e4), this.script = e4, "undefined" != typeof navigator && /gecko/i.test(navigator.userAgent) && setTimeout(function() {
  82810. var t4 = document.createElement("iframe");
  82811. document.body.appendChild(t4), document.body.removeChild(t4);
  82812. }, 100);
  82813. }, u2.prototype.doWrite = function(t3, e4) {
  82814. var r3 = this;
  82815. if (!this.form) {
  82816. var n3, o3 = document.createElement("form"), i3 = document.createElement("textarea"), c3 = this.iframeId = "eio_iframe_" + this.index;
  82817. o3.className = "socketio", o3.style.position = "absolute", o3.style.top = "-1000px", o3.style.left = "-1000px", o3.target = c3, o3.method = "POST", o3.setAttribute("accept-charset", "utf-8"), i3.name = "d", o3.appendChild(i3), document.body.appendChild(o3), this.form = o3, this.area = i3;
  82818. }
  82819. function h3() {
  82820. u3(), e4();
  82821. }
  82822. function u3() {
  82823. if (r3.iframe)
  82824. try {
  82825. r3.form.removeChild(r3.iframe);
  82826. } catch (t5) {
  82827. r3.onError("jsonp polling iframe removal error", t5);
  82828. }
  82829. try {
  82830. var t4 = '<iframe src="javascript:0" name="' + r3.iframeId + '">';
  82831. n3 = document.createElement(t4);
  82832. } catch (t5) {
  82833. (n3 = document.createElement("iframe")).name = r3.iframeId, n3.src = "javascript:0";
  82834. }
  82835. n3.id = r3.iframeId, r3.form.appendChild(n3), r3.iframe = n3;
  82836. }
  82837. this.form.action = this.uri(), u3(), t3 = t3.replace(a2, "\\\n"), this.area.value = t3.replace(s2, "\\n");
  82838. try {
  82839. this.form.submit();
  82840. } catch (t4) {
  82841. }
  82842. this.iframe.attachEvent ? this.iframe.onreadystatechange = function() {
  82843. "complete" === r3.iframe.readyState && h3();
  82844. } : this.iframe.onload = h3;
  82845. };
  82846. }).call(this, r2(12));
  82847. }, function(t2, e2, r2) {
  82848. (function(e3) {
  82849. var n2, o2, i2 = r2(8), s2 = r2(2), a2 = r2(3), c2 = r2(4), h2 = r2(17), u2 = r2(0)("engine.io-client:websocket");
  82850. if ("undefined" != typeof WebSocket ? n2 = WebSocket : "undefined" != typeof self && (n2 = self.WebSocket || self.MozWebSocket), "undefined" == typeof window)
  82851. try {
  82852. o2 = r2(42);
  82853. } catch (t3) {
  82854. }
  82855. var f2 = n2 || o2;
  82856. function p2(t3) {
  82857. t3 && t3.forceBase64 && (this.supportsBinary = false), this.perMessageDeflate = t3.perMessageDeflate, this.usingBrowserWebSocket = n2 && !t3.forceNode, this.protocols = t3.protocols, this.usingBrowserWebSocket || (f2 = o2), i2.call(this, t3);
  82858. }
  82859. t2.exports = p2, c2(p2, i2), p2.prototype.name = "websocket", p2.prototype.supportsBinary = true, p2.prototype.doOpen = function() {
  82860. if (this.check()) {
  82861. var t3 = this.uri(), e4 = this.protocols, r3 = { agent: this.agent, perMessageDeflate: this.perMessageDeflate };
  82862. r3.pfx = this.pfx, r3.key = this.key, r3.passphrase = this.passphrase, r3.cert = this.cert, r3.ca = this.ca, r3.ciphers = this.ciphers, r3.rejectUnauthorized = this.rejectUnauthorized, this.extraHeaders && (r3.headers = this.extraHeaders), this.localAddress && (r3.localAddress = this.localAddress);
  82863. try {
  82864. this.ws = this.usingBrowserWebSocket && !this.isReactNative ? e4 ? new f2(t3, e4) : new f2(t3) : new f2(t3, e4, r3);
  82865. } catch (t4) {
  82866. return this.emit("error", t4);
  82867. }
  82868. void 0 === this.ws.binaryType && (this.supportsBinary = false), this.ws.supports && this.ws.supports.binary ? (this.supportsBinary = true, this.ws.binaryType = "nodebuffer") : this.ws.binaryType = "arraybuffer", this.addEventListeners();
  82869. }
  82870. }, p2.prototype.addEventListeners = function() {
  82871. var t3 = this;
  82872. this.ws.onopen = function() {
  82873. t3.onOpen();
  82874. }, this.ws.onclose = function() {
  82875. t3.onClose();
  82876. }, this.ws.onmessage = function(e4) {
  82877. t3.onData(e4.data);
  82878. }, this.ws.onerror = function(e4) {
  82879. t3.onError("websocket error", e4);
  82880. };
  82881. }, p2.prototype.write = function(t3) {
  82882. var r3 = this;
  82883. this.writable = false;
  82884. for (var n3 = t3.length, o3 = 0, i3 = n3; o3 < i3; o3++)
  82885. !function(t4) {
  82886. s2.encodePacket(t4, r3.supportsBinary, function(o4) {
  82887. if (!r3.usingBrowserWebSocket) {
  82888. var i4 = {};
  82889. if (t4.options && (i4.compress = t4.options.compress), r3.perMessageDeflate)
  82890. ("string" == typeof o4 ? e3.byteLength(o4) : o4.length) < r3.perMessageDeflate.threshold && (i4.compress = false);
  82891. }
  82892. try {
  82893. r3.usingBrowserWebSocket ? r3.ws.send(o4) : r3.ws.send(o4, i4);
  82894. } catch (t5) {
  82895. u2("websocket closed before onclose event");
  82896. }
  82897. --n3 || a3();
  82898. });
  82899. }(t3[o3]);
  82900. function a3() {
  82901. r3.emit("flush"), setTimeout(function() {
  82902. r3.writable = true, r3.emit("drain");
  82903. }, 0);
  82904. }
  82905. }, p2.prototype.onClose = function() {
  82906. i2.prototype.onClose.call(this);
  82907. }, p2.prototype.doClose = function() {
  82908. void 0 !== this.ws && this.ws.close();
  82909. }, p2.prototype.uri = function() {
  82910. var t3 = this.query || {}, e4 = this.secure ? "wss" : "ws", r3 = "";
  82911. return this.port && ("wss" === e4 && 443 !== Number(this.port) || "ws" === e4 && 80 !== Number(this.port)) && (r3 = ":" + this.port), this.timestampRequests && (t3[this.timestampParam] = h2()), this.supportsBinary || (t3.b64 = 1), (t3 = a2.encode(t3)).length && (t3 = "?" + t3), e4 + "://" + (-1 !== this.hostname.indexOf(":") ? "[" + this.hostname + "]" : this.hostname) + r3 + this.path + t3;
  82912. }, p2.prototype.check = function() {
  82913. return !(!f2 || "__initialize" in f2 && this.name === p2.prototype.name);
  82914. };
  82915. }).call(this, r2(6).Buffer);
  82916. }, function(t2, e2, r2) {
  82917. const n2 = r2(43), o2 = r2(44), i2 = r2(0)("@hyoga/uni-socket:"), s2 = ["CONNECTING", "OPEN", "CLOSING", "CLOSED"], a2 = uni || wx;
  82918. class c2 extends n2 {
  82919. constructor(t3, e3, r3) {
  82920. super(), this.readyState = c2.CONNECTING, this.protocol = "", this._socket = null, null !== t3 && (Array.isArray(e3) ? e3 = e3.join(", ") : "object" == typeof e3 && null !== e3 && (r3 = e3, e3 = void 0), h2.call(this, t3, e3, r3));
  82921. }
  82922. get CONNECTING() {
  82923. return c2.CONNECTING;
  82924. }
  82925. get CLOSING() {
  82926. return c2.CLOSING;
  82927. }
  82928. get CLOSED() {
  82929. return c2.CLOSED;
  82930. }
  82931. get OPEN() {
  82932. return c2.OPEN;
  82933. }
  82934. addSocketEventListeners() {
  82935. this._socket.onOpen(() => {
  82936. this.readyState = c2.OPEN, this.onopen();
  82937. }), this._socket.onClose((t3) => {
  82938. i2("onclose: ", t3), this.readyState = c2.CLOSED, this.onclose(t3.code, t3.reason);
  82939. }), this._socket.onError((t3) => {
  82940. i2("onerror: ", t3), this.onerror(t3);
  82941. }), this._socket.onMessage((t3) => {
  82942. this.onmessage(t3);
  82943. });
  82944. }
  82945. send(t3) {
  82946. i2("send data: ", t3, this.readyState), this.readyState === c2.OPEN && this._socket.send({ data: t3 });
  82947. }
  82948. close(t3, e3) {
  82949. i2("close socket: ", t3, e3), this.readyState = c2.CLOSING, this._socket.close({ code: t3, reason: e3 });
  82950. }
  82951. }
  82952. function h2(t3, e3, r3) {
  82953. Object.assign(r3, { url: t3, header: { "content-type": "application/json" }, protocols: e3, method: "GET" }), this._socket = function(t4) {
  82954. const e4 = a2.connectSocket({ complete: () => {
  82955. }, ...t4 });
  82956. if (e4)
  82957. return e4;
  82958. return { onClose: a2.onSocketClose, onOpen: a2.onSocketOpen, onError: a2.onSocketError, onMessage: a2.onSocketMessage, send: a2.sendSocketMessage, close: a2.closeSocket };
  82959. }(r3), this.addSocketEventListeners();
  82960. }
  82961. s2.forEach((t3, e3) => {
  82962. c2[s2[e3]] = e3;
  82963. });
  82964. ["open", "error", "close", "message"].forEach((t3) => {
  82965. Object.defineProperty(c2.prototype, `on${t3}`, { get() {
  82966. const e3 = this.listeners(t3);
  82967. for (var r3 = 0; r3 < e3.length; r3++)
  82968. if (e3[r3]._listener)
  82969. return e3[r3]._listener;
  82970. }, set(e3) {
  82971. const r3 = this.listeners(t3);
  82972. for (var n3 = 0; n3 < r3.length; n3++)
  82973. r3[n3]._listener && this.removeListener(t3, r3[n3]);
  82974. this.addEventListener(t3, e3);
  82975. } });
  82976. }), c2.prototype.addEventListener = o2.addEventListener, c2.prototype.removeEventListener = o2.removeEventListener, t2.exports = c2;
  82977. }, function(t2, e2, r2) {
  82978. var n2, o2 = "object" == typeof Reflect ? Reflect : null, i2 = o2 && "function" == typeof o2.apply ? o2.apply : function(t3, e3, r3) {
  82979. return Function.prototype.apply.call(t3, e3, r3);
  82980. };
  82981. n2 = o2 && "function" == typeof o2.ownKeys ? o2.ownKeys : Object.getOwnPropertySymbols ? function(t3) {
  82982. return Object.getOwnPropertyNames(t3).concat(Object.getOwnPropertySymbols(t3));
  82983. } : function(t3) {
  82984. return Object.getOwnPropertyNames(t3);
  82985. };
  82986. var s2 = Number.isNaN || function(t3) {
  82987. return t3 != t3;
  82988. };
  82989. function a2() {
  82990. a2.init.call(this);
  82991. }
  82992. t2.exports = a2, a2.EventEmitter = a2, a2.prototype._events = void 0, a2.prototype._eventsCount = 0, a2.prototype._maxListeners = void 0;
  82993. var c2 = 10;
  82994. function h2(t3) {
  82995. if ("function" != typeof t3)
  82996. throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof t3);
  82997. }
  82998. function u2(t3) {
  82999. return void 0 === t3._maxListeners ? a2.defaultMaxListeners : t3._maxListeners;
  83000. }
  83001. function f2(t3, e3, r3, n3) {
  83002. var o3, i3, s3, a3;
  83003. if (h2(r3), void 0 === (i3 = t3._events) ? (i3 = t3._events = /* @__PURE__ */ Object.create(null), t3._eventsCount = 0) : (void 0 !== i3.newListener && (t3.emit("newListener", e3, r3.listener ? r3.listener : r3), i3 = t3._events), s3 = i3[e3]), void 0 === s3)
  83004. s3 = i3[e3] = r3, ++t3._eventsCount;
  83005. else if ("function" == typeof s3 ? s3 = i3[e3] = n3 ? [r3, s3] : [s3, r3] : n3 ? s3.unshift(r3) : s3.push(r3), (o3 = u2(t3)) > 0 && s3.length > o3 && !s3.warned) {
  83006. s3.warned = true;
  83007. var c3 = new Error("Possible EventEmitter memory leak detected. " + s3.length + " " + String(e3) + " listeners added. Use emitter.setMaxListeners() to increase limit");
  83008. c3.name = "MaxListenersExceededWarning", c3.emitter = t3, c3.type = e3, c3.count = s3.length, a3 = c3, console && console.warn && formatAppLog("warn", "at node_modules/@hyoga/uni-socket.io/dist/uni-socket.io.js:10", a3);
  83009. }
  83010. return t3;
  83011. }
  83012. function p2() {
  83013. if (!this.fired)
  83014. return this.target.removeListener(this.type, this.wrapFn), this.fired = true, 0 === arguments.length ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
  83015. }
  83016. function l2(t3, e3, r3) {
  83017. var n3 = { fired: false, wrapFn: void 0, target: t3, type: e3, listener: r3 }, o3 = p2.bind(n3);
  83018. return o3.listener = r3, n3.wrapFn = o3, o3;
  83019. }
  83020. function d2(t3, e3, r3) {
  83021. var n3 = t3._events;
  83022. if (void 0 === n3)
  83023. return [];
  83024. var o3 = n3[e3];
  83025. return void 0 === o3 ? [] : "function" == typeof o3 ? r3 ? [o3.listener || o3] : [o3] : r3 ? function(t4) {
  83026. for (var e4 = new Array(t4.length), r4 = 0; r4 < e4.length; ++r4)
  83027. e4[r4] = t4[r4].listener || t4[r4];
  83028. return e4;
  83029. }(o3) : g2(o3, o3.length);
  83030. }
  83031. function y2(t3) {
  83032. var e3 = this._events;
  83033. if (void 0 !== e3) {
  83034. var r3 = e3[t3];
  83035. if ("function" == typeof r3)
  83036. return 1;
  83037. if (void 0 !== r3)
  83038. return r3.length;
  83039. }
  83040. return 0;
  83041. }
  83042. function g2(t3, e3) {
  83043. for (var r3 = new Array(e3), n3 = 0; n3 < e3; ++n3)
  83044. r3[n3] = t3[n3];
  83045. return r3;
  83046. }
  83047. Object.defineProperty(a2, "defaultMaxListeners", { enumerable: true, get: function() {
  83048. return c2;
  83049. }, set: function(t3) {
  83050. if ("number" != typeof t3 || t3 < 0 || s2(t3))
  83051. throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + t3 + ".");
  83052. c2 = t3;
  83053. } }), a2.init = function() {
  83054. void 0 !== this._events && this._events !== Object.getPrototypeOf(this)._events || (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
  83055. }, a2.prototype.setMaxListeners = function(t3) {
  83056. if ("number" != typeof t3 || t3 < 0 || s2(t3))
  83057. throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + t3 + ".");
  83058. return this._maxListeners = t3, this;
  83059. }, a2.prototype.getMaxListeners = function() {
  83060. return u2(this);
  83061. }, a2.prototype.emit = function(t3) {
  83062. for (var e3 = [], r3 = 1; r3 < arguments.length; r3++)
  83063. e3.push(arguments[r3]);
  83064. var n3 = "error" === t3, o3 = this._events;
  83065. if (void 0 !== o3)
  83066. n3 = n3 && void 0 === o3.error;
  83067. else if (!n3)
  83068. return false;
  83069. if (n3) {
  83070. var s3;
  83071. if (e3.length > 0 && (s3 = e3[0]), s3 instanceof Error)
  83072. throw s3;
  83073. var a3 = new Error("Unhandled error." + (s3 ? " (" + s3.message + ")" : ""));
  83074. throw a3.context = s3, a3;
  83075. }
  83076. var c3 = o3[t3];
  83077. if (void 0 === c3)
  83078. return false;
  83079. if ("function" == typeof c3)
  83080. i2(c3, this, e3);
  83081. else {
  83082. var h3 = c3.length, u3 = g2(c3, h3);
  83083. for (r3 = 0; r3 < h3; ++r3)
  83084. i2(u3[r3], this, e3);
  83085. }
  83086. return true;
  83087. }, a2.prototype.addListener = function(t3, e3) {
  83088. return f2(this, t3, e3, false);
  83089. }, a2.prototype.on = a2.prototype.addListener, a2.prototype.prependListener = function(t3, e3) {
  83090. return f2(this, t3, e3, true);
  83091. }, a2.prototype.once = function(t3, e3) {
  83092. return h2(e3), this.on(t3, l2(this, t3, e3)), this;
  83093. }, a2.prototype.prependOnceListener = function(t3, e3) {
  83094. return h2(e3), this.prependListener(t3, l2(this, t3, e3)), this;
  83095. }, a2.prototype.removeListener = function(t3, e3) {
  83096. var r3, n3, o3, i3, s3;
  83097. if (h2(e3), void 0 === (n3 = this._events))
  83098. return this;
  83099. if (void 0 === (r3 = n3[t3]))
  83100. return this;
  83101. if (r3 === e3 || r3.listener === e3)
  83102. 0 == --this._eventsCount ? this._events = /* @__PURE__ */ Object.create(null) : (delete n3[t3], n3.removeListener && this.emit("removeListener", t3, r3.listener || e3));
  83103. else if ("function" != typeof r3) {
  83104. for (o3 = -1, i3 = r3.length - 1; i3 >= 0; i3--)
  83105. if (r3[i3] === e3 || r3[i3].listener === e3) {
  83106. s3 = r3[i3].listener, o3 = i3;
  83107. break;
  83108. }
  83109. if (o3 < 0)
  83110. return this;
  83111. 0 === o3 ? r3.shift() : function(t4, e4) {
  83112. for (; e4 + 1 < t4.length; e4++)
  83113. t4[e4] = t4[e4 + 1];
  83114. t4.pop();
  83115. }(r3, o3), 1 === r3.length && (n3[t3] = r3[0]), void 0 !== n3.removeListener && this.emit("removeListener", t3, s3 || e3);
  83116. }
  83117. return this;
  83118. }, a2.prototype.off = a2.prototype.removeListener, a2.prototype.removeAllListeners = function(t3) {
  83119. var e3, r3, n3;
  83120. if (void 0 === (r3 = this._events))
  83121. return this;
  83122. if (void 0 === r3.removeListener)
  83123. return 0 === arguments.length ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : void 0 !== r3[t3] && (0 == --this._eventsCount ? this._events = /* @__PURE__ */ Object.create(null) : delete r3[t3]), this;
  83124. if (0 === arguments.length) {
  83125. var o3, i3 = Object.keys(r3);
  83126. for (n3 = 0; n3 < i3.length; ++n3)
  83127. "removeListener" !== (o3 = i3[n3]) && this.removeAllListeners(o3);
  83128. return this.removeAllListeners("removeListener"), this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0, this;
  83129. }
  83130. if ("function" == typeof (e3 = r3[t3]))
  83131. this.removeListener(t3, e3);
  83132. else if (void 0 !== e3)
  83133. for (n3 = e3.length - 1; n3 >= 0; n3--)
  83134. this.removeListener(t3, e3[n3]);
  83135. return this;
  83136. }, a2.prototype.listeners = function(t3) {
  83137. return d2(this, t3, true);
  83138. }, a2.prototype.rawListeners = function(t3) {
  83139. return d2(this, t3, false);
  83140. }, a2.listenerCount = function(t3, e3) {
  83141. return "function" == typeof t3.listenerCount ? t3.listenerCount(e3) : y2.call(t3, e3);
  83142. }, a2.prototype.listenerCount = y2, a2.prototype.eventNames = function() {
  83143. return this._eventsCount > 0 ? n2(this._events) : [];
  83144. };
  83145. }, function(t2, e2, r2) {
  83146. class n2 {
  83147. constructor(t3, e3) {
  83148. this.target = e3, this.type = t3;
  83149. }
  83150. }
  83151. class o2 extends n2 {
  83152. constructor(t3, e3) {
  83153. super("message", e3), this.data = t3;
  83154. }
  83155. }
  83156. class i2 extends n2 {
  83157. constructor(t3, e3, r3) {
  83158. super("close", r3), this.wasClean = r3._closeFrameReceived && r3._closeFrameSent, this.reason = e3, this.code = t3;
  83159. }
  83160. }
  83161. class s2 extends n2 {
  83162. constructor(t3) {
  83163. super("open", t3);
  83164. }
  83165. }
  83166. class a2 extends n2 {
  83167. constructor(t3, e3) {
  83168. super("error", e3), this.message = t3.message, this.error = t3;
  83169. }
  83170. }
  83171. const c2 = { addEventListener(t3, e3) {
  83172. function r3(t4) {
  83173. e3.call(this, new o2(t4, this));
  83174. }
  83175. function n3(t4, r4) {
  83176. e3.call(this, new i2(t4, r4, this));
  83177. }
  83178. function c3(t4) {
  83179. e3.call(this, new a2(t4, this));
  83180. }
  83181. function h2() {
  83182. e3.call(this, new s2(this));
  83183. }
  83184. "function" == typeof e3 && ("message" === t3 ? (r3._listener = e3, this.on(t3, r3)) : "close" === t3 ? (n3._listener = e3, this.on(t3, n3)) : "error" === t3 ? (c3._listener = e3, this.on(t3, c3)) : "open" === t3 ? (h2._listener = e3, this.on(t3, h2)) : this.on(t3, e3));
  83185. }, removeEventListener(t3, e3) {
  83186. const r3 = this.listeners(t3);
  83187. for (var n3 = 0; n3 < r3.length; n3++)
  83188. r3[n3] !== e3 && r3[n3]._listener !== e3 || this.removeListener(t3, r3[n3]);
  83189. } };
  83190. t2.exports = c2;
  83191. }, function(t2, e2) {
  83192. t2.exports = function(t3, e3) {
  83193. for (var r2 = [], n2 = (e3 = e3 || 0) || 0; n2 < t3.length; n2++)
  83194. r2[n2 - e3] = t3[n2];
  83195. return r2;
  83196. };
  83197. }, function(t2, e2) {
  83198. function r2(t3) {
  83199. t3 = t3 || {}, this.ms = t3.min || 100, this.max = t3.max || 1e4, this.factor = t3.factor || 2, this.jitter = t3.jitter > 0 && t3.jitter <= 1 ? t3.jitter : 0, this.attempts = 0;
  83200. }
  83201. t2.exports = r2, r2.prototype.duration = function() {
  83202. var t3 = this.ms * Math.pow(this.factor, this.attempts++);
  83203. if (this.jitter) {
  83204. var e3 = Math.random(), r3 = Math.floor(e3 * this.jitter * t3);
  83205. t3 = 0 == (1 & Math.floor(10 * e3)) ? t3 - r3 : t3 + r3;
  83206. }
  83207. return 0 | Math.min(t3, this.max);
  83208. }, r2.prototype.reset = function() {
  83209. this.attempts = 0;
  83210. }, r2.prototype.setMin = function(t3) {
  83211. this.ms = t3;
  83212. }, r2.prototype.setMax = function(t3) {
  83213. this.max = t3;
  83214. }, r2.prototype.setJitter = function(t3) {
  83215. this.jitter = t3;
  83216. };
  83217. }]);
  83218. });
  83219. })(uniSocket_io);
  83220. var uniSocket_ioExports = uniSocket_io.exports;
  83221. const io = /* @__PURE__ */ getDefaultExportFromCjs(uniSocket_ioExports);
  83222. function useChatWebSocket(socketConfig) {
  83223. let SocketIo = null;
  83224. const state = vue.reactive({
  83225. chatDotNum: 0,
  83226. //总状态红点
  83227. chatList: [],
  83228. //会话信息
  83229. customerUserInfo: {},
  83230. //用户信息
  83231. customerServerInfo: {
  83232. //客服信息
  83233. title: "连接中...",
  83234. state: "connecting",
  83235. avatar: null,
  83236. nickname: ""
  83237. },
  83238. socketState: {
  83239. isConnect: true,
  83240. //是否连接成功
  83241. isConnecting: false,
  83242. //重连中,不允许新的socket开启。
  83243. tip: ""
  83244. },
  83245. chatHistoryPagination: {
  83246. page: 0,
  83247. //当前页
  83248. list_rows: 10,
  83249. //每页条数
  83250. last_id: 0,
  83251. //最后条ID
  83252. lastPage: 0,
  83253. //总共多少页
  83254. loadStatus: "loadmore"
  83255. //loadmore-加载前的状态,loading-加载中的状态,nomore-没有更多的状态
  83256. },
  83257. templateChatList: [],
  83258. //猜你想问
  83259. chatConfig: {},
  83260. // 配置信息
  83261. isSendSucces: -1
  83262. // 是否发送成功 -1=发送中|0=发送成功|1发送失败
  83263. });
  83264. const socketInit = (config2, callBack) => {
  83265. state.chatConfig = config2;
  83266. if (SocketIo && SocketIo.connected)
  83267. return;
  83268. if (state.socketState.isConnecting)
  83269. return;
  83270. SocketIo = io(config2.chat_domain, {
  83271. reconnection: true,
  83272. // 默认 true 是否断线重连
  83273. reconnectionAttempts: 5,
  83274. // 默认无限次 断线尝试次数
  83275. reconnectionDelay: 1e3,
  83276. // 默认 1000,进行下一次重连的间隔。
  83277. reconnectionDelayMax: 5e3,
  83278. // 默认 5000, 重新连接等待的最长时间 默认 5000
  83279. randomizationFactor: 0.5,
  83280. // 默认 0.5 [0-1],随机重连延迟时间
  83281. timeout: 2e4,
  83282. // 默认 20s
  83283. transports: ["websocket", "polling"],
  83284. // websocket | polling,
  83285. ...config2
  83286. });
  83287. SocketIo.on("connect", async (res) => {
  83288. socketReset(callBack);
  83289. formatAppLog("log", "at pages/chat/socket.js:69", "socket:connect");
  83290. });
  83291. SocketIo.on("message", (res) => {
  83292. if (res.error === 0) {
  83293. res.data;
  83294. state.chatList.push(formatMessage2(res.data.message));
  83295. callBack && callBack();
  83296. }
  83297. });
  83298. SocketIo.on("customer_service_access", (res) => {
  83299. if (res.error === 0) {
  83300. editCustomerServerInfo({
  83301. title: res.data.customer_service.name,
  83302. state: "online",
  83303. avatar: res.data.customer_service.avatar
  83304. });
  83305. state.chatList.push(formatMessage2(res.data.message));
  83306. }
  83307. });
  83308. SocketIo.on("waiting_queue", (res) => {
  83309. if (res.error === 0) {
  83310. editCustomerServerInfo({
  83311. title: res.data.title,
  83312. state: "waiting",
  83313. avatar: ""
  83314. });
  83315. }
  83316. });
  83317. SocketIo.on("no_customer_service", (res) => {
  83318. if (res.error === 0) {
  83319. editCustomerServerInfo({
  83320. title: "暂无客服在线...",
  83321. state: "waiting",
  83322. avatar: ""
  83323. });
  83324. }
  83325. state.chatList.push(formatMessage2(res.data.message));
  83326. });
  83327. SocketIo.on("customer_service_online", (res) => {
  83328. if (res.error === 0) {
  83329. editCustomerServerInfo({
  83330. title: res.data.customer_service.name,
  83331. state: "online",
  83332. avatar: res.data.customer_service.avatar
  83333. });
  83334. }
  83335. });
  83336. SocketIo.on("customer_service_offline", (res) => {
  83337. if (res.error === 0) {
  83338. editCustomerServerInfo({
  83339. title: res.data.customer_service.name,
  83340. state: "offline",
  83341. avatar: res.data.customer_service.avatar
  83342. });
  83343. }
  83344. });
  83345. SocketIo.on("customer_service_busy", (res) => {
  83346. if (res.error === 0) {
  83347. editCustomerServerInfo({
  83348. title: res.data.customer_service.name,
  83349. state: "busy",
  83350. avatar: res.data.customer_service.avatar
  83351. });
  83352. }
  83353. });
  83354. SocketIo.on("customer_service_break", (res) => {
  83355. if (res.error === 0) {
  83356. editCustomerServerInfo({
  83357. title: "客服服务结束",
  83358. state: "offline",
  83359. avatar: ""
  83360. });
  83361. state.socketState.isConnect = false;
  83362. state.socketState.tip = "当前服务已结束";
  83363. }
  83364. state.chatList.push(formatMessage2(res.data.message));
  83365. });
  83366. SocketIo.on("custom_error", (error2) => {
  83367. editCustomerServerInfo({
  83368. title: error2.msg,
  83369. state: "offline",
  83370. avatar: ""
  83371. });
  83372. formatAppLog("log", "at pages/chat/socket.js:170", "custom_error:", error2);
  83373. });
  83374. SocketIo.on("error", (error2) => {
  83375. formatAppLog("log", "at pages/chat/socket.js:174", "error:", error2);
  83376. });
  83377. SocketIo.on("connect_error", (error2) => {
  83378. formatAppLog("log", "at pages/chat/socket.js:178", "connect_error");
  83379. });
  83380. SocketIo.on("connect_timeout", (error2) => {
  83381. formatAppLog("log", "at pages/chat/socket.js:182", error2, "connect_timeout");
  83382. });
  83383. SocketIo.on("disconnect", (error2) => {
  83384. formatAppLog("log", "at pages/chat/socket.js:186", error2, "disconnect");
  83385. });
  83386. SocketIo.on("reconnect", (error2) => {
  83387. formatAppLog("log", "at pages/chat/socket.js:190", error2, "reconnect");
  83388. });
  83389. SocketIo.on("reconnect_attempt", (error2) => {
  83390. state.socketState.isConnect = false;
  83391. state.socketState.isConnecting = true;
  83392. editCustomerServerInfo({
  83393. title: `重连中,第${error2}次尝试...`,
  83394. state: "waiting",
  83395. avatar: ""
  83396. });
  83397. formatAppLog("log", "at pages/chat/socket.js:201", error2, "reconnect_attempt");
  83398. });
  83399. SocketIo.on("reconnecting", (error2) => {
  83400. formatAppLog("log", "at pages/chat/socket.js:205", error2, "reconnecting");
  83401. });
  83402. SocketIo.on("reconnect_error", (error2) => {
  83403. formatAppLog("log", "at pages/chat/socket.js:209", "reconnect_error");
  83404. });
  83405. SocketIo.on("reconnect_failed", (error2) => {
  83406. state.socketState.isConnecting = false;
  83407. editCustomerServerInfo({
  83408. title: `重连失败,请刷新重试~`,
  83409. state: "waiting",
  83410. avatar: ""
  83411. });
  83412. formatAppLog("log", "at pages/chat/socket.js:219", error2, "reconnect_failed");
  83413. state.isSendSucces = 1;
  83414. });
  83415. };
  83416. const socketReset = (callBack) => {
  83417. state.chatList = [];
  83418. state.chatHistoryList = [];
  83419. state.chatHistoryPagination = {
  83420. page: 0,
  83421. per_page: 10,
  83422. last_id: 0,
  83423. totalPage: 0
  83424. };
  83425. socketConnection(callBack);
  83426. };
  83427. const socketClose = () => {
  83428. SocketIo.emit("customer_logout", {}, (res) => {
  83429. formatAppLog("log", "at pages/chat/socket.js:243", "socket:退出", res);
  83430. });
  83431. };
  83432. const socketTest = () => {
  83433. SocketIo.emit("test", {}, (res) => {
  83434. formatAppLog("log", "at pages/chat/socket.js:250", "test:test", res);
  83435. });
  83436. };
  83437. const socketSendMsg = (data, sendMsgCallBack) => {
  83438. state.isSendSucces = -1;
  83439. state.chatList.push(data);
  83440. sendMsgCallBack && sendMsgCallBack();
  83441. SocketIo.emit(
  83442. "message",
  83443. {
  83444. message: formatInput(data),
  83445. ...data.customData
  83446. },
  83447. (res) => {
  83448. state.isSendSucces = res.error;
  83449. }
  83450. );
  83451. };
  83452. const socketConnection = (callBack) => {
  83453. SocketIo.emit(
  83454. "connection",
  83455. {
  83456. auth: "user",
  83457. token: uni.getStorageSync("socketUserToken") || "",
  83458. session_id: uni.getStorageSync("socketSessionId") || ""
  83459. },
  83460. (res) => {
  83461. if (res.error === 0) {
  83462. socketCustomerLogin(callBack);
  83463. uni.setStorageSync("socketSessionId", res.data.session_id);
  83464. state.customerUserInfo = res.data.chat_user;
  83465. state.socketState.isConnect = true;
  83466. } else {
  83467. editCustomerServerInfo({
  83468. title: `服务器异常!`,
  83469. state: "waiting",
  83470. avatar: ""
  83471. });
  83472. state.socketState.isConnect = false;
  83473. }
  83474. }
  83475. );
  83476. };
  83477. const getUserToken = async (id) => {
  83478. const res = await chat.unifiedToken();
  83479. if (res.error === 0) {
  83480. uni.setStorageSync("socketUserToken", res.data.token);
  83481. }
  83482. return res;
  83483. };
  83484. const socketCustomerLogin = (callBack) => {
  83485. SocketIo.emit(
  83486. "customer_login",
  83487. {
  83488. room_id: state.chatConfig.room_id
  83489. },
  83490. (res) => {
  83491. state.templateChatList = res.data.questions.length ? res.data.questions : [];
  83492. state.chatList.push({
  83493. from: "customer_service",
  83494. // 用户customer右 | 顾客customer_service左 | 系统system中间
  83495. mode: "template",
  83496. // goods,order,image,text,system
  83497. date: (/* @__PURE__ */ new Date()).getTime(),
  83498. //时间
  83499. content: {
  83500. //内容
  83501. list: state.templateChatList
  83502. }
  83503. });
  83504. res.error === 0 && socketHistoryList(callBack);
  83505. }
  83506. );
  83507. };
  83508. const socketHistoryList = (historyCallBack) => {
  83509. state.chatHistoryPagination.loadStatus = "loading";
  83510. state.chatHistoryPagination.page += 1;
  83511. SocketIo.emit("messages", state.chatHistoryPagination, (res) => {
  83512. if (res.error === 0) {
  83513. state.chatHistoryPagination.total = res.data.messages.total;
  83514. state.chatHistoryPagination.lastPage = res.data.messages.last_page;
  83515. state.chatHistoryPagination.page = res.data.messages.current_page;
  83516. res.data.messages.data.forEach((item) => {
  83517. item.message_type && state.chatList.unshift(formatMessage2(item));
  83518. });
  83519. state.chatHistoryPagination.loadStatus = state.chatHistoryPagination.page < state.chatHistoryPagination.lastPage ? "loadmore" : "nomore";
  83520. if (state.chatHistoryPagination.last_id == 0) {
  83521. state.chatHistoryPagination.last_id = res.data.messages.data.length ? res.data.messages.data[0].id : 0;
  83522. }
  83523. state.chatHistoryPagination.page === 1 && historyCallBack && historyCallBack();
  83524. }
  83525. });
  83526. };
  83527. const editCustomerServerInfo = (data) => {
  83528. state.customerServerInfo = {
  83529. ...state.customerServerInfo,
  83530. ...data
  83531. };
  83532. };
  83533. const showTime = (item, index2) => {
  83534. if (vue.unref(state.chatList)[index2 + 1]) {
  83535. let dateString = dayjs(vue.unref(state.chatList)[index2 + 1].date).fromNow();
  83536. if (dateString === dayjs(vue.unref(item).date).fromNow()) {
  83537. return false;
  83538. } else {
  83539. dateString = dayjs(vue.unref(item).date).fromNow();
  83540. return true;
  83541. }
  83542. }
  83543. return false;
  83544. };
  83545. const formatTime = (time2) => {
  83546. let diffTime = (/* @__PURE__ */ new Date()).getTime() - time2;
  83547. if (diffTime > 28 * 24 * 60 * 1e3) {
  83548. return dayjs(time2).format("MM/DD HH:mm");
  83549. }
  83550. if (diffTime > 360 * 28 * 24 * 60 * 1e3) {
  83551. return dayjs(time2).format("YYYY/MM/DD HH:mm");
  83552. }
  83553. return dayjs(time2).fromNow();
  83554. };
  83555. const getFocus = (virtualNode) => {
  83556. if (window.getSelection) {
  83557. let chatInput2 = vue.unref(virtualNode);
  83558. chatInput2.focus();
  83559. let range2 = window.getSelection();
  83560. range2.selectAllChildren(chatInput2);
  83561. range2.collapseToEnd();
  83562. } else if (document.selection) {
  83563. let range2 = document.selection.createRange();
  83564. range2.moveToElementText(chatInput);
  83565. range2.collapse(false);
  83566. range2.select();
  83567. }
  83568. };
  83569. const upload = (name2, file) => {
  83570. return new Promise((resolve, reject) => {
  83571. let data = new FormData();
  83572. data.append("file", file, name2);
  83573. data.append("group", "chat");
  83574. ajax({
  83575. url: "/upload",
  83576. method: "post",
  83577. headers: {
  83578. "Content-Type": "multipart/form-data"
  83579. },
  83580. data,
  83581. success: function(res) {
  83582. resolve(res);
  83583. },
  83584. error: function(err) {
  83585. reject(err);
  83586. }
  83587. });
  83588. });
  83589. };
  83590. const onPaste = async (e2) => {
  83591. let paste = e2.clipboardData || window.clipboardData;
  83592. let filesArr = Array.from(paste.files);
  83593. filesArr.forEach(async (child) => {
  83594. if (child && child.type.includes("image")) {
  83595. e2.preventDefault();
  83596. let file = child;
  83597. const img = await readImg(file);
  83598. const blob = await compressImg(img, file.type);
  83599. const { data } = await upload(file.name, blob);
  83600. let image = `<img class="full-url" src='${data.fullurl}'>`;
  83601. document.execCommand("insertHTML", false, image);
  83602. } else {
  83603. document.execCommand("insertHTML", false, paste.getData("text"));
  83604. }
  83605. });
  83606. };
  83607. const onDrop = async (e2) => {
  83608. e2.preventDefault();
  83609. let filesArr = Array.from(e2.dataTransfer.files);
  83610. filesArr.forEach(async (child) => {
  83611. if (child && child.type.includes("image")) {
  83612. let file = child;
  83613. const img = await readImg(file);
  83614. const blob = await compressImg(img, file.type);
  83615. const { data } = await upload(file.name, blob);
  83616. let image = `<img class="full-url" src='${data.fullurl}' >`;
  83617. document.execCommand("insertHTML", false, image);
  83618. } else {
  83619. ElMessage({
  83620. message: "禁止拖拽非图片资源",
  83621. type: "warning"
  83622. });
  83623. }
  83624. });
  83625. };
  83626. const formatChatInput = (virtualNode, formatInputCallBack) => {
  83627. let res = "";
  83628. let elemArr = Array.from(virtualNode.childNodes);
  83629. elemArr.forEach((child, index2) => {
  83630. if (child.nodeName === "#text") {
  83631. res += child.nodeValue;
  83632. if (
  83633. //文本节点的后面是图片,并且不是emoji,分开发送。输入框中的图片和文本表情分开。
  83634. elemArr[index2 + 1] && elemArr[index2 + 1].nodeName === "IMG" && elemArr[index2 + 1] && elemArr[index2 + 1].name !== "emoji"
  83635. ) {
  83636. const data = {
  83637. from: "customer",
  83638. mode: "text",
  83639. date: (/* @__PURE__ */ new Date()).getTime(),
  83640. content: {
  83641. text: filterXSS(res)
  83642. }
  83643. };
  83644. formatInputCallBack && formatInputCallBack(data);
  83645. res = "";
  83646. }
  83647. } else if (child.nodeName === "BR") {
  83648. res += "<br/>";
  83649. } else if (child.nodeName === "IMG") {
  83650. if (child.name !== "emoji") {
  83651. let srcReg = /src=[\'\']?([^\'\']*)[\'\']?/i;
  83652. let src = child.outerHTML.match(srcReg);
  83653. const data = {
  83654. from: "customer",
  83655. mode: "image",
  83656. date: (/* @__PURE__ */ new Date()).getTime(),
  83657. content: {
  83658. url: src[1],
  83659. path: src[1].replace(/http:\/\/[^\/]*/, "")
  83660. }
  83661. };
  83662. formatInputCallBack && formatInputCallBack(data);
  83663. } else {
  83664. res += child.outerHTML;
  83665. }
  83666. } else if (child.nodeName === "DIV") {
  83667. res += `<div style='width:200px; white-space: nowrap;'>${child.outerHTML}</div>`;
  83668. }
  83669. });
  83670. if (res) {
  83671. const data = {
  83672. from: "customer",
  83673. mode: "text",
  83674. date: (/* @__PURE__ */ new Date()).getTime(),
  83675. content: {
  83676. text: filterXSS(res)
  83677. }
  83678. };
  83679. formatInputCallBack && formatInputCallBack(data);
  83680. }
  83681. vue.unref(virtualNode).innerHTML = "";
  83682. };
  83683. const callBackNotice = (res) => {
  83684. ElNotification({
  83685. title: "socket",
  83686. message: res.msg,
  83687. showClose: true,
  83688. type: res.error === 0 ? "success" : "warning",
  83689. duration: 1200
  83690. });
  83691. };
  83692. const formatInput = (message) => {
  83693. let obj = {};
  83694. switch (message.mode) {
  83695. case "text":
  83696. obj = {
  83697. message_type: "text",
  83698. message: message.content.text
  83699. };
  83700. break;
  83701. case "image":
  83702. obj = {
  83703. message_type: "image",
  83704. message: message.content.path
  83705. };
  83706. break;
  83707. case "goods":
  83708. obj = {
  83709. message_type: "goods",
  83710. message: message.content.item
  83711. };
  83712. break;
  83713. case "order":
  83714. obj = {
  83715. message_type: "order",
  83716. message: message.content.item
  83717. };
  83718. break;
  83719. }
  83720. return obj;
  83721. };
  83722. const formatMessage2 = (message) => {
  83723. let obj = {};
  83724. switch (message.message_type) {
  83725. case "system":
  83726. obj = {
  83727. from: "system",
  83728. // 用户customer左 | 顾客customer_service右 | 系统system中间
  83729. mode: "system",
  83730. // goods,order,image,text,system
  83731. date: message.create_time * 1e3,
  83732. //时间
  83733. content: {
  83734. //内容
  83735. text: message.message
  83736. }
  83737. };
  83738. break;
  83739. case "text":
  83740. obj = {
  83741. from: message.sender_identify,
  83742. mode: message.message_type,
  83743. date: message.create_time * 1e3,
  83744. //时间
  83745. sender: message.sender,
  83746. content: {
  83747. text: message.message,
  83748. messageId: message.id
  83749. }
  83750. };
  83751. break;
  83752. case "image":
  83753. obj = {
  83754. from: message.sender_identify,
  83755. mode: message.message_type,
  83756. date: message.create_time * 1e3,
  83757. //时间
  83758. sender: message.sender,
  83759. content: {
  83760. url: sheep$1.$url.cdn(message.message),
  83761. messageId: message.id
  83762. }
  83763. };
  83764. break;
  83765. case "goods":
  83766. obj = {
  83767. from: message.sender_identify,
  83768. mode: message.message_type,
  83769. date: message.create_time * 1e3,
  83770. //时间
  83771. sender: message.sender,
  83772. content: {
  83773. item: message.message,
  83774. messageId: message.id
  83775. }
  83776. };
  83777. break;
  83778. case "order":
  83779. obj = {
  83780. from: message.sender_identify,
  83781. mode: message.message_type,
  83782. date: message.create_time * 1e3,
  83783. //时间
  83784. sender: message.sender,
  83785. content: {
  83786. item: message.message,
  83787. messageId: message.id
  83788. }
  83789. };
  83790. break;
  83791. }
  83792. return obj;
  83793. };
  83794. const readImg = (file) => {
  83795. return new Promise((resolve, reject) => {
  83796. const img = new Image();
  83797. const reader = new FileReader();
  83798. reader.onload = function(e2) {
  83799. img.src = e2.target.result;
  83800. };
  83801. reader.onerror = function(e2) {
  83802. reject(e2);
  83803. };
  83804. reader.readAsDataURL(file);
  83805. img.onload = function() {
  83806. resolve(img);
  83807. };
  83808. img.onerror = function(e2) {
  83809. reject(e2);
  83810. };
  83811. });
  83812. };
  83813. const compressImg = (img, type = "image/jpeg", mx = 1e3, mh = 1e3, quality = 1) => {
  83814. return new Promise((resolve, reject) => {
  83815. const canvas = document.createElement("canvas");
  83816. const context = canvas.getContext("2d");
  83817. const { width: originWidth, height: originHeight } = img;
  83818. const maxWidth = mx;
  83819. const maxHeight = mh;
  83820. let targetWidth = originWidth;
  83821. let targetHeight = originHeight;
  83822. if (originWidth > maxWidth || originHeight > maxHeight) {
  83823. if (originWidth / originHeight > 1) {
  83824. targetWidth = maxWidth;
  83825. targetHeight = Math.round(maxWidth * (originHeight / originWidth));
  83826. } else {
  83827. targetHeight = maxHeight;
  83828. targetWidth = Math.round(maxHeight * (originWidth / originHeight));
  83829. }
  83830. }
  83831. canvas.width = targetWidth;
  83832. canvas.height = targetHeight;
  83833. context.clearRect(0, 0, targetWidth, targetHeight);
  83834. context.drawImage(img, 0, 0, targetWidth, targetHeight);
  83835. canvas.toBlob(
  83836. function(blob) {
  83837. resolve(blob);
  83838. },
  83839. type,
  83840. quality
  83841. );
  83842. });
  83843. };
  83844. return {
  83845. compressImg,
  83846. readImg,
  83847. formatMessage: formatMessage2,
  83848. formatInput,
  83849. callBackNotice,
  83850. socketInit,
  83851. socketSendMsg,
  83852. socketClose,
  83853. socketHistoryList,
  83854. getFocus,
  83855. formatChatInput,
  83856. onDrop,
  83857. onPaste,
  83858. upload,
  83859. getUserToken,
  83860. state,
  83861. socketTest,
  83862. showTime,
  83863. formatTime
  83864. };
  83865. }
  83866. const _sfc_main$g = {
  83867. __name: "index",
  83868. setup(__props, { expose: __expose }) {
  83869. __expose();
  83870. const {
  83871. socketInit,
  83872. state: chatData,
  83873. socketSendMsg,
  83874. formatChatInput,
  83875. socketHistoryList,
  83876. onDrop,
  83877. onPaste,
  83878. getFocus,
  83879. // upload,
  83880. getUserToken,
  83881. // socketTest,
  83882. showTime,
  83883. formatTime
  83884. } = useChatWebSocket();
  83885. const chatList = vue.toRefs(chatData).chatList;
  83886. const customerServiceInfo = vue.toRefs(chatData).customerServerInfo;
  83887. const chatHistoryPagination = vue.toRefs(chatData).chatHistoryPagination;
  83888. const customerUserInfo = vue.toRefs(chatData).customerUserInfo;
  83889. const socketState = vue.toRefs(chatData).socketState;
  83890. const sys_navBar = sheep$1.$platform.navbar;
  83891. const chatConfig = vue.computed(() => sheep$1.$store("app").chat);
  83892. const { screenHeight, safeAreaInsets, safeArea, screenWidth } = sheep$1.$platform.device;
  83893. const pageHeight = safeArea.height - 44 - 35 - 50;
  83894. const chatStatus = {
  83895. online: {
  83896. text: "在线",
  83897. colorVariate: "#46c55f"
  83898. },
  83899. offline: {
  83900. text: "离线",
  83901. colorVariate: "#b5b5b5"
  83902. },
  83903. busy: {
  83904. text: "忙碌",
  83905. colorVariate: "#ff0e1b"
  83906. }
  83907. };
  83908. const loadingMap = {
  83909. loadmore: {
  83910. title: "查看更多",
  83911. icon: "el-icon-d-arrow-left"
  83912. },
  83913. nomore: {
  83914. title: "没有更多了",
  83915. icon: ""
  83916. },
  83917. loading: {
  83918. title: "加载中... ",
  83919. icon: "el-icon-loading"
  83920. }
  83921. };
  83922. const onLoadMore = () => {
  83923. chatHistoryPagination.value.page < chatHistoryPagination.value.lastPage && socketHistoryList();
  83924. };
  83925. const chat2 = vue.reactive({
  83926. msg: "",
  83927. scrollInto: "",
  83928. showTools: false,
  83929. toolsMode: "",
  83930. showSelect: false,
  83931. selectMode: "",
  83932. chatStyle: {
  83933. mode: "inner",
  83934. color: "#F8270F",
  83935. type: "color",
  83936. alwaysShow: 1,
  83937. src: "",
  83938. list: {}
  83939. }
  83940. });
  83941. function onTools(mode) {
  83942. if (!socketState.value.isConnect) {
  83943. sheep$1.$helper.toast(socketState.value.tip || "您已掉线!请返回重试");
  83944. return;
  83945. }
  83946. if (!chat2.toolsMode || chat2.toolsMode === mode) {
  83947. chat2.showTools = !chat2.showTools;
  83948. }
  83949. chat2.toolsMode = mode;
  83950. if (!chat2.showTools) {
  83951. chat2.toolsMode = "";
  83952. }
  83953. }
  83954. function onShowSelect(mode) {
  83955. chat2.showTools = false;
  83956. chat2.showSelect = true;
  83957. chat2.selectMode = mode;
  83958. }
  83959. async function onSelect({ type, data }) {
  83960. let msg = "";
  83961. switch (type) {
  83962. case "image":
  83963. const { path, fullurl } = await sheep$1.$api.app.upload(data.tempFiles[0].path, "default");
  83964. msg = {
  83965. from: "customer",
  83966. mode: "image",
  83967. date: (/* @__PURE__ */ new Date()).getTime(),
  83968. content: {
  83969. url: fullurl,
  83970. path
  83971. }
  83972. };
  83973. break;
  83974. case "goods":
  83975. msg = {
  83976. from: "customer",
  83977. mode: "goods",
  83978. date: (/* @__PURE__ */ new Date()).getTime(),
  83979. content: {
  83980. item: {
  83981. id: data.goods.id,
  83982. title: data.goods.title,
  83983. image: data.goods.image,
  83984. price: data.goods.price,
  83985. stock: data.goods.stock
  83986. }
  83987. }
  83988. };
  83989. break;
  83990. case "order":
  83991. msg = {
  83992. from: "customer",
  83993. mode: "order",
  83994. date: (/* @__PURE__ */ new Date()).getTime(),
  83995. content: {
  83996. item: {
  83997. id: data.id,
  83998. order_sn: data.order_sn,
  83999. create_time: data.create_time,
  84000. pay_fee: data.pay_fee,
  84001. items: data.items.filter((item) => ({
  84002. goods_id: item.goods_id,
  84003. goods_title: item.goods_title,
  84004. goods_image: item.goods_image,
  84005. goods_price: item.goods_price
  84006. })),
  84007. status_text: data.status_text
  84008. }
  84009. }
  84010. };
  84011. break;
  84012. }
  84013. if (msg) {
  84014. socketSendMsg(msg, () => {
  84015. scrollBottom();
  84016. });
  84017. chat2.showTools = false;
  84018. chat2.showSelect = false;
  84019. chat2.selectMode = "";
  84020. }
  84021. }
  84022. function onAgainSendMessage(item) {
  84023. if (!socketState.value.isConnect) {
  84024. sheep$1.$helper.toast(socketState.value.tip || "您已掉线!请返回重试");
  84025. return;
  84026. }
  84027. if (!item)
  84028. return;
  84029. const data = {
  84030. from: "customer",
  84031. mode: "text",
  84032. date: (/* @__PURE__ */ new Date()).getTime(),
  84033. content: item.content
  84034. };
  84035. socketSendMsg(data, () => {
  84036. scrollBottom();
  84037. });
  84038. }
  84039. function onSendMessage() {
  84040. if (!socketState.value.isConnect) {
  84041. sheep$1.$helper.toast(socketState.value.tip || "您已掉线!请返回重试");
  84042. return;
  84043. }
  84044. if (!chat2.msg)
  84045. return;
  84046. const data = {
  84047. from: "customer",
  84048. mode: "text",
  84049. date: (/* @__PURE__ */ new Date()).getTime(),
  84050. content: {
  84051. text: chat2.msg
  84052. }
  84053. };
  84054. socketSendMsg(data, () => {
  84055. scrollBottom();
  84056. });
  84057. chat2.showTools = false;
  84058. setTimeout(() => {
  84059. chat2.msg = "";
  84060. }, 100);
  84061. }
  84062. function onTemplateList(e2) {
  84063. if (!socketState.value.isConnect) {
  84064. sheep$1.$helper.toast(socketState.value.tip || "您已掉线!请返回重试");
  84065. return;
  84066. }
  84067. const data = {
  84068. from: "customer",
  84069. mode: "text",
  84070. date: (/* @__PURE__ */ new Date()).getTime(),
  84071. content: {
  84072. text: e2.title
  84073. },
  84074. customData: {
  84075. question_id: e2.id
  84076. }
  84077. };
  84078. socketSendMsg(data, () => {
  84079. scrollBottom();
  84080. });
  84081. }
  84082. function onEmoji(item) {
  84083. chat2.msg += item.name;
  84084. }
  84085. function selEmojiFile(name2) {
  84086. for (let index2 in emojiList) {
  84087. if (emojiList[index2].name === name2) {
  84088. return emojiList[index2].file;
  84089. }
  84090. }
  84091. return false;
  84092. }
  84093. function replaceEmoji(data) {
  84094. let newData = data;
  84095. if (typeof newData !== "object") {
  84096. let reg = /\[(.+?)\]/g;
  84097. let zhEmojiName = newData.match(reg);
  84098. if (zhEmojiName) {
  84099. zhEmojiName.forEach((item) => {
  84100. let emojiFile = selEmojiFile(item);
  84101. newData = newData.replace(
  84102. item,
  84103. `<image class="chat-img" style="width: 24px;height: 24px;margin: 0 3px;" src="${sheep$1.$url.cdn(
  84104. "/static/img/chat/emoji/" + emojiFile
  84105. )}"/></image>`
  84106. );
  84107. });
  84108. }
  84109. }
  84110. return newData;
  84111. }
  84112. function scrollBottom() {
  84113. let timeout = null;
  84114. chat2.scrollInto = "";
  84115. clearTimeout(timeout);
  84116. timeout = setTimeout(() => {
  84117. chat2.scrollInto = "scrollBottom";
  84118. }, 100);
  84119. }
  84120. onLoad(async () => {
  84121. const { error: error2 } = await getUserToken();
  84122. if (error2 === 0) {
  84123. socketInit(chatConfig.value, () => {
  84124. scrollBottom();
  84125. });
  84126. } else {
  84127. socketState.value.isConnect = false;
  84128. }
  84129. });
  84130. const __returned__ = { socketInit, chatData, socketSendMsg, formatChatInput, socketHistoryList, onDrop, onPaste, getFocus, getUserToken, showTime, formatTime, chatList, customerServiceInfo, chatHistoryPagination, customerUserInfo, socketState, sys_navBar, chatConfig, screenHeight, safeAreaInsets, safeArea, screenWidth, pageHeight, chatStatus, loadingMap, onLoadMore, chat: chat2, onTools, onShowSelect, onSelect, onAgainSendMessage, onSendMessage, onTemplateList, onEmoji, selEmojiFile, replaceEmoji, scrollBottom, get sheep() {
  84131. return sheep$1;
  84132. }, computed: vue.computed, reactive: vue.reactive, toRefs: vue.toRefs, get onLoad() {
  84133. return onLoad;
  84134. }, get emojiList() {
  84135. return emojiList;
  84136. }, get emojiPage() {
  84137. return emojiPage;
  84138. }, SelectPopup, GoodsItem, OrderItem, get useChatWebSocket() {
  84139. return useChatWebSocket;
  84140. } };
  84141. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  84142. return __returned__;
  84143. }
  84144. };
  84145. function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
  84146. const _component_su_image = resolveEasycom(vue.resolveDynamicComponent("su-image"), __easycom_0$f);
  84147. const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l);
  84148. const _component_su_fixed = resolveEasycom(vue.resolveDynamicComponent("su-fixed"), __easycom_2$9);
  84149. const _component_s_uploader = resolveEasycom(vue.resolveDynamicComponent("s-uploader"), __easycom_3$4);
  84150. const _component_su_popup = resolveEasycom(vue.resolveDynamicComponent("su-popup"), __easycom_4$3);
  84151. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  84152. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  84153. class: "chat-wrap",
  84154. title: "客服",
  84155. navbar: "inner"
  84156. }, {
  84157. default: vue.withCtx(() => [
  84158. vue.createElementVNode(
  84159. "div",
  84160. { class: "status" },
  84161. vue.toDisplayString($setup.socketState.isConnect ? $setup.customerServiceInfo.title : "网络已断开,请检查网络后刷新重试"),
  84162. 1
  84163. /* TEXT */
  84164. ),
  84165. vue.createElementVNode(
  84166. "div",
  84167. {
  84168. class: "page-bg",
  84169. style: vue.normalizeStyle({ height: $setup.sys_navBar + "px" })
  84170. },
  84171. null,
  84172. 4
  84173. /* STYLE */
  84174. ),
  84175. vue.createElementVNode(
  84176. "view",
  84177. {
  84178. class: "chat-box",
  84179. style: vue.normalizeStyle({ height: $setup.pageHeight + "px" })
  84180. },
  84181. [
  84182. vue.createElementVNode("scroll-view", {
  84183. style: vue.normalizeStyle({ height: $setup.pageHeight + "px" }),
  84184. "scroll-y": "true",
  84185. "scroll-with-animation": false,
  84186. "enable-back-to-top": true,
  84187. "scroll-into-view": $setup.chat.scrollInto
  84188. }, [
  84189. $setup.chatList.length && $setup.chatHistoryPagination.lastPage > 1 && $setup.loadingMap[$setup.chatHistoryPagination.loadStatus].title ? (vue.openBlock(), vue.createElementBlock("button", {
  84190. key: 0,
  84191. class: "loadmore-btn ss-reset-button",
  84192. onClick: $setup.onLoadMore
  84193. }, [
  84194. vue.createTextVNode(
  84195. vue.toDisplayString($setup.loadingMap[$setup.chatHistoryPagination.loadStatus].title) + " ",
  84196. 1
  84197. /* TEXT */
  84198. ),
  84199. vue.createElementVNode(
  84200. "i",
  84201. {
  84202. class: vue.normalizeClass(["loadmore-icon sa-m-l-6", $setup.loadingMap[$setup.chatHistoryPagination.loadStatus].icon])
  84203. },
  84204. null,
  84205. 2
  84206. /* CLASS */
  84207. )
  84208. ])) : vue.createCommentVNode("v-if", true),
  84209. (vue.openBlock(true), vue.createElementBlock(
  84210. vue.Fragment,
  84211. null,
  84212. vue.renderList($setup.chatList, (item, index2) => {
  84213. var _a2;
  84214. return vue.openBlock(), vue.createElementBlock("view", {
  84215. class: "message-item ss-flex-col",
  84216. key: index2
  84217. }, [
  84218. vue.createElementVNode("view", { class: "ss-flex ss-row-center ss-col-center" }, [
  84219. vue.createCommentVNode(" 日期 "),
  84220. item.from !== "system" && $setup.showTime(item, index2) ? (vue.openBlock(), vue.createElementBlock(
  84221. "view",
  84222. {
  84223. key: 0,
  84224. class: "date-message"
  84225. },
  84226. vue.toDisplayString($setup.formatTime(item.date)),
  84227. 1
  84228. /* TEXT */
  84229. )) : vue.createCommentVNode("v-if", true),
  84230. vue.createCommentVNode(" 系统消息 "),
  84231. item.from === "system" ? (vue.openBlock(), vue.createElementBlock(
  84232. "view",
  84233. {
  84234. key: 1,
  84235. class: "system-message"
  84236. },
  84237. vue.toDisplayString(item.content.text),
  84238. 1
  84239. /* TEXT */
  84240. )) : vue.createCommentVNode("v-if", true)
  84241. ]),
  84242. vue.createCommentVNode(" 常见问题 "),
  84243. item.mode === "template" && item.content.list.length ? (vue.openBlock(), vue.createElementBlock("view", {
  84244. key: 0,
  84245. class: "template-wrap"
  84246. }, [
  84247. vue.createElementVNode("view", { class: "title" }, "猜你想问"),
  84248. (vue.openBlock(true), vue.createElementBlock(
  84249. vue.Fragment,
  84250. null,
  84251. vue.renderList(item.content.list, (item2, index3) => {
  84252. return vue.openBlock(), vue.createElementBlock("view", {
  84253. class: "item",
  84254. key: index3,
  84255. onClick: ($event) => $setup.onTemplateList(item2)
  84256. }, " * " + vue.toDisplayString(item2.title), 9, ["onClick"]);
  84257. }),
  84258. 128
  84259. /* KEYED_FRAGMENT */
  84260. ))
  84261. ])) : vue.createCommentVNode("v-if", true),
  84262. item.from === "customer_service" && item.mode !== "template" || item.from === "customer" ? (vue.openBlock(), vue.createElementBlock(
  84263. "view",
  84264. {
  84265. key: 1,
  84266. class: vue.normalizeClass(["ss-flex ss-col-top", [
  84267. item.from === "customer_service" ? `ss-row-left` : item.from === "customer" ? `ss-row-right` : ""
  84268. ]])
  84269. },
  84270. [
  84271. vue.createCommentVNode(" 客服头像 "),
  84272. vue.withDirectives(vue.createElementVNode("image", {
  84273. class: "chat-avatar ss-m-r-24",
  84274. src: $setup.sheep.$url.cdn((_a2 = item == null ? void 0 : item.sender) == null ? void 0 : _a2.avatar) || $setup.sheep.$url.static("/static/images/default.png"),
  84275. mode: "aspectFill"
  84276. }, null, 8, ["src"]), [
  84277. [vue.vShow, item.from === "customer_service"]
  84278. ]),
  84279. vue.createCommentVNode(" 发送状态 "),
  84280. item.from === "customer" && index2 == $setup.chatData.chatList.length - 1 && $setup.chatData.isSendSucces !== 0 ? (vue.openBlock(), vue.createElementBlock("span", {
  84281. key: 0,
  84282. class: "send-status"
  84283. }, [
  84284. $setup.chatData.isSendSucces == -1 ? (vue.openBlock(), vue.createElementBlock("image", {
  84285. key: 0,
  84286. class: "loading",
  84287. src: $setup.sheep.$url.static("/static/images/loading.png"),
  84288. mode: "aspectFill"
  84289. }, null, 8, ["src"])) : vue.createCommentVNode("v-if", true),
  84290. vue.createCommentVNode(` <image
  84291. v-if="chatData.isSendSucces == 1"
  84292. class="warning"
  84293. :src="sheep.$url.static('/static/images/warning.png')"
  84294. mode="aspectFill"
  84295. @click="onAgainSendMessage(item)"
  84296. ></image> `)
  84297. ])) : vue.createCommentVNode("v-if", true),
  84298. vue.createCommentVNode(" 内容 "),
  84299. item.mode === "text" ? (vue.openBlock(), vue.createElementBlock(
  84300. "view",
  84301. {
  84302. key: 1,
  84303. class: vue.normalizeClass(["message-box", [item.from]])
  84304. },
  84305. [
  84306. vue.createElementVNode("div", {
  84307. class: "message-text ss-flex ss-flex-wrap",
  84308. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onRichtext && _ctx.onRichtext(...args)),
  84309. innerHTML: $setup.replaceEmoji(item.content.text)
  84310. }, null, 8, ["innerHTML"])
  84311. ],
  84312. 2
  84313. /* CLASS */
  84314. )) : vue.createCommentVNode("v-if", true),
  84315. item.mode === "image" ? (vue.openBlock(), vue.createElementBlock(
  84316. "view",
  84317. {
  84318. key: 2,
  84319. class: vue.normalizeClass(["message-box", [item.from]]),
  84320. style: { width: "200rpx" }
  84321. },
  84322. [
  84323. vue.createVNode(_component_su_image, {
  84324. class: "message-img",
  84325. isPreview: "",
  84326. previewList: [$setup.sheep.$url.cdn(item.content.url)],
  84327. current: 0,
  84328. src: $setup.sheep.$url.cdn(item.content.url),
  84329. height: 200,
  84330. width: 200,
  84331. mode: "aspectFill"
  84332. }, null, 8, ["previewList", "src"])
  84333. ],
  84334. 2
  84335. /* CLASS */
  84336. )) : vue.createCommentVNode("v-if", true),
  84337. item.mode === "goods" ? (vue.openBlock(), vue.createBlock($setup["GoodsItem"], {
  84338. key: 3,
  84339. goodsData: item.content.item,
  84340. onClick: ($event) => $setup.sheep.$router.go("/pages/goods/index", {
  84341. id: item.content.item.id
  84342. })
  84343. }, null, 8, ["goodsData", "onClick"])) : vue.createCommentVNode("v-if", true),
  84344. item.mode === "order" ? (vue.openBlock(), vue.createBlock($setup["OrderItem"], {
  84345. key: 4,
  84346. from: "msg",
  84347. orderData: item.content.item,
  84348. onClick: ($event) => $setup.sheep.$router.go("/pages/order/detail", {
  84349. id: item.content.item.id
  84350. })
  84351. }, null, 8, ["orderData", "onClick"])) : vue.createCommentVNode("v-if", true),
  84352. vue.createCommentVNode(" user头像 "),
  84353. vue.withDirectives(vue.createElementVNode("image", {
  84354. class: "chat-avatar ss-m-l-24",
  84355. src: $setup.sheep.$url.cdn($setup.customerUserInfo.avatar),
  84356. mode: "aspectFill"
  84357. }, null, 8, ["src"]), [
  84358. [vue.vShow, item.from === "customer"]
  84359. ])
  84360. ],
  84361. 2
  84362. /* CLASS */
  84363. )) : vue.createCommentVNode("v-if", true)
  84364. ]);
  84365. }),
  84366. 128
  84367. /* KEYED_FRAGMENT */
  84368. )),
  84369. vue.createElementVNode("view", { id: "scrollBottom" })
  84370. ], 12, ["scroll-into-view"])
  84371. ],
  84372. 4
  84373. /* STYLE */
  84374. ),
  84375. vue.createVNode(_component_su_fixed, { bottom: "" }, {
  84376. default: vue.withCtx(() => [
  84377. vue.createElementVNode("view", { class: "send-wrap ss-flex" }, [
  84378. vue.createElementVNode("view", { class: "left ss-flex ss-flex-1" }, [
  84379. vue.createVNode(_component_uni_easyinput, {
  84380. class: "ss-flex-1 ss-p-l-22",
  84381. inputBorder: false,
  84382. clearable: false,
  84383. modelValue: $setup.chat.msg,
  84384. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.chat.msg = $event),
  84385. placeholder: "请输入你要咨询的问题"
  84386. }, null, 8, ["modelValue"])
  84387. ]),
  84388. vue.createElementVNode("text", {
  84389. class: "sicon-basic bq",
  84390. onClick: _cache[2] || (_cache[2] = vue.withModifiers(($event) => $setup.onTools("emoji"), ["stop"]))
  84391. }),
  84392. !$setup.chat.msg ? (vue.openBlock(), vue.createElementBlock(
  84393. "text",
  84394. {
  84395. key: 0,
  84396. class: vue.normalizeClass(["sicon-edit", { "is-active": $setup.chat.toolsMode == "tools" }]),
  84397. onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $setup.onTools("tools"), ["stop"]))
  84398. },
  84399. null,
  84400. 2
  84401. /* CLASS */
  84402. )) : vue.createCommentVNode("v-if", true),
  84403. $setup.chat.msg ? (vue.openBlock(), vue.createElementBlock("button", {
  84404. key: 1,
  84405. class: "ss-reset-button send-btn",
  84406. onClick: $setup.onSendMessage
  84407. }, " 发送 ")) : vue.createCommentVNode("v-if", true)
  84408. ])
  84409. ]),
  84410. _: 1
  84411. /* STABLE */
  84412. }),
  84413. vue.createVNode(_component_su_popup, {
  84414. show: $setup.chat.showTools,
  84415. onClose: _cache[10] || (_cache[10] = ($event) => {
  84416. $setup.chat.showTools = false;
  84417. $setup.chat.toolsMode = "";
  84418. })
  84419. }, {
  84420. default: vue.withCtx(() => [
  84421. vue.createElementVNode("view", { class: "ss-modal-box ss-flex-col" }, [
  84422. vue.createElementVNode("view", { class: "send-wrap ss-flex" }, [
  84423. vue.createElementVNode("view", { class: "left ss-flex ss-flex-1" }, [
  84424. vue.createVNode(_component_uni_easyinput, {
  84425. class: "ss-flex-1 ss-p-l-22",
  84426. inputBorder: false,
  84427. clearable: false,
  84428. modelValue: $setup.chat.msg,
  84429. "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $setup.chat.msg = $event),
  84430. placeholder: "请输入你要咨询的问题"
  84431. }, null, 8, ["modelValue"])
  84432. ]),
  84433. vue.createElementVNode("text", {
  84434. class: "sicon-basic bq",
  84435. onClick: _cache[5] || (_cache[5] = vue.withModifiers(($event) => $setup.onTools("emoji"), ["stop"]))
  84436. }),
  84437. vue.createElementVNode("text"),
  84438. !$setup.chat.msg ? (vue.openBlock(), vue.createElementBlock(
  84439. "text",
  84440. {
  84441. key: 0,
  84442. class: vue.normalizeClass(["sicon-edit", { "is-active": $setup.chat.toolsMode == "tools" }]),
  84443. onClick: _cache[6] || (_cache[6] = vue.withModifiers(($event) => $setup.onTools("tools"), ["stop"]))
  84444. },
  84445. null,
  84446. 2
  84447. /* CLASS */
  84448. )) : vue.createCommentVNode("v-if", true),
  84449. $setup.chat.msg ? (vue.openBlock(), vue.createElementBlock("button", {
  84450. key: 1,
  84451. class: "ss-reset-button send-btn",
  84452. onClick: $setup.onSendMessage
  84453. }, " 发送 ")) : vue.createCommentVNode("v-if", true)
  84454. ]),
  84455. vue.createElementVNode("view", { class: "content ss-flex ss-flex-1" }, [
  84456. $setup.chat.toolsMode == "emoji" ? (vue.openBlock(), vue.createElementBlock("swiper", {
  84457. key: 0,
  84458. class: "emoji-swiper",
  84459. "indicator-dots": true,
  84460. circular: "",
  84461. "indicator-active-color": "#7063D2",
  84462. "indicator-color": "rgba(235, 231, 255, 1)",
  84463. autoplay: false,
  84464. interval: 3e3,
  84465. duration: 1e3
  84466. }, [
  84467. (vue.openBlock(true), vue.createElementBlock(
  84468. vue.Fragment,
  84469. null,
  84470. vue.renderList($setup.emojiPage, (emoji) => {
  84471. return vue.openBlock(), vue.createElementBlock("swiper-item", { key: emoji }, [
  84472. vue.createElementVNode("view", { class: "ss-flex ss-flex-wrap" }, [
  84473. (vue.openBlock(true), vue.createElementBlock(
  84474. vue.Fragment,
  84475. null,
  84476. vue.renderList(emoji, (item) => {
  84477. return vue.openBlock(), vue.createElementBlock("image", {
  84478. key: item,
  84479. class: "emoji-img",
  84480. src: $setup.sheep.$url.cdn(`/static/img/chat/emoji/${item.file}`),
  84481. onClick: ($event) => $setup.onEmoji(item)
  84482. }, null, 8, ["src", "onClick"]);
  84483. }),
  84484. 128
  84485. /* KEYED_FRAGMENT */
  84486. ))
  84487. ])
  84488. ]);
  84489. }),
  84490. 128
  84491. /* KEYED_FRAGMENT */
  84492. ))
  84493. ])) : (vue.openBlock(), vue.createElementBlock(
  84494. vue.Fragment,
  84495. { key: 1 },
  84496. [
  84497. vue.createElementVNode("view", { class: "image" }, [
  84498. vue.createVNode(_component_s_uploader, {
  84499. "file-mediatype": "image",
  84500. imageStyles: { width: 50, height: 50, border: false },
  84501. onSelect: _cache[7] || (_cache[7] = ($event) => $setup.onSelect({ type: "image", data: $event }))
  84502. }, {
  84503. default: vue.withCtx(() => [
  84504. vue.createElementVNode("image", {
  84505. class: "icon",
  84506. src: $setup.sheep.$url.static("/static/images/image.png"),
  84507. mode: "aspectFill"
  84508. }, null, 8, ["src"])
  84509. ]),
  84510. _: 1
  84511. /* STABLE */
  84512. }),
  84513. vue.createElementVNode("view", null, "图片")
  84514. ]),
  84515. vue.createElementVNode("view", {
  84516. class: "goods",
  84517. onClick: _cache[8] || (_cache[8] = ($event) => $setup.onShowSelect("goods"))
  84518. }, [
  84519. vue.createElementVNode("image", {
  84520. class: "icon",
  84521. src: $setup.sheep.$url.static("/static/images/goods.png"),
  84522. mode: "aspectFill"
  84523. }, null, 8, ["src"]),
  84524. vue.createElementVNode("view", null, "商品")
  84525. ]),
  84526. vue.createElementVNode("view", {
  84527. class: "order",
  84528. onClick: _cache[9] || (_cache[9] = ($event) => $setup.onShowSelect("order"))
  84529. }, [
  84530. vue.createElementVNode("image", {
  84531. class: "icon",
  84532. src: $setup.sheep.$url.static("/static/images/order.png"),
  84533. mode: "aspectFill"
  84534. }, null, 8, ["src"]),
  84535. vue.createElementVNode("view", null, "订单")
  84536. ])
  84537. ],
  84538. 64
  84539. /* STABLE_FRAGMENT */
  84540. ))
  84541. ])
  84542. ])
  84543. ]),
  84544. _: 1
  84545. /* STABLE */
  84546. }, 8, ["show"]),
  84547. vue.createVNode($setup["SelectPopup"], {
  84548. mode: $setup.chat.selectMode,
  84549. show: $setup.chat.showSelect,
  84550. onSelect: $setup.onSelect,
  84551. onClose: _cache[11] || (_cache[11] = ($event) => $setup.chat.showSelect = false)
  84552. }, null, 8, ["mode", "show"])
  84553. ]),
  84554. _: 1
  84555. /* STABLE */
  84556. });
  84557. }
  84558. const PagesChatIndex = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f], ["__scopeId", "data-v-5a559478"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/chat/index.vue"]]);
  84559. const _imports_0$1 = "/static/icon/audioPaly.png";
  84560. const minRecordingTime = 500;
  84561. const cancelOffset = 280;
  84562. const _sfc_main$f = {
  84563. __name: "speechtotext",
  84564. setup(__props, { expose: __expose }) {
  84565. __expose();
  84566. const {
  84567. safeAreaInsets,
  84568. safeArea
  84569. } = sheep$1.$platform.device;
  84570. const sysNavBar = sheep$1.$platform.navbar;
  84571. const messagesHeight = safeArea.height - sysNavBar - 20 - 60;
  84572. const messages2 = vue.ref([]);
  84573. const isRecording = vue.ref(false);
  84574. let startTime = vue.ref(null);
  84575. const recordingDuration = vue.ref("");
  84576. let intervalId = null;
  84577. const startTouchY = vue.ref(0);
  84578. let mediaRecorder = null;
  84579. let audioChunks = [];
  84580. let isCancelled = vue.ref(false);
  84581. vue.onMounted(() => {
  84582. navigator.mediaDevices.getUserMedia({
  84583. audio: true
  84584. }).then((stream) => {
  84585. mediaRecorder = new MediaRecorder(stream);
  84586. mediaRecorder.ondataavailable = (event) => {
  84587. audioChunks.push(event.data);
  84588. };
  84589. mediaRecorder.onstop = () => {
  84590. if (!isCancelled.value) {
  84591. sendDuration();
  84592. }
  84593. audioChunks = [];
  84594. };
  84595. }).catch((error2) => {
  84596. formatAppLog("error", "at pages/chat/speechtotext.vue:76", "Error accessing media devices.", error2);
  84597. });
  84598. });
  84599. async function sendAudioToServer(audioBlob, audioUrl, duration2, messageIndex) {
  84600. const formData = new FormData();
  84601. formData.append("audio_file", audioBlob);
  84602. try {
  84603. const response = await fetch("https://zxgz.newfeifan.cn/voice2text/", {
  84604. method: "POST",
  84605. body: formData
  84606. });
  84607. const data = await response.json();
  84608. if (data.success) {
  84609. messages2.value[messageIndex].transcription = data.transcription;
  84610. }
  84611. formatAppLog("log", "at pages/chat/speechtotext.vue:91", "Server response:", data);
  84612. } catch (error2) {
  84613. formatAppLog("error", "at pages/chat/speechtotext.vue:93", "Error sending audio file:", error2);
  84614. }
  84615. }
  84616. const sendDuration = () => {
  84617. const audioBlob = new Blob(audioChunks, {
  84618. type: "audio/mpeg"
  84619. });
  84620. const audioUrl = URL.createObjectURL(audioBlob);
  84621. const duration2 = Math.max(Math.floor((/* @__PURE__ */ new Date() - startTime.value) / 1e3), 1);
  84622. const messageIndex = messages2.value.push({
  84623. duration: duration2,
  84624. audioUrl,
  84625. transcription: ""
  84626. // 初始为空
  84627. }) - 1;
  84628. sendAudioToServer(audioBlob, audioUrl, duration2, messageIndex);
  84629. vue.nextTick(() => {
  84630. let messagesElement = document.getElementById("messages");
  84631. messagesElement.scrollTop = messagesElement.scrollHeight;
  84632. });
  84633. };
  84634. const updateDuration = () => {
  84635. const currentDuration = Math.floor((/* @__PURE__ */ new Date() - startTime.value) / 1e3);
  84636. recordingDuration.value = currentDuration + "s";
  84637. if (currentDuration >= 60) {
  84638. stopRecording(new Event("mouseup"));
  84639. }
  84640. };
  84641. const startRecording = (event) => {
  84642. if (!isRecording.value && (event.type === "mousedown" || event.type === "touchstart")) {
  84643. startTime.value = /* @__PURE__ */ new Date();
  84644. isRecording.value = true;
  84645. intervalId = setInterval(updateDuration, 1e3);
  84646. recordingDuration.value = "1s";
  84647. event.preventDefault();
  84648. startTouchY.value = event.touches ? event.touches[0].clientY : 0;
  84649. audioChunks = [];
  84650. isCancelled.value = false;
  84651. mediaRecorder.start();
  84652. }
  84653. };
  84654. const stopRecording = (event) => {
  84655. if (isRecording.value && (event.type === "mouseup" || event.type === "touchend" || event.type === "mouseleave" || event.type === "touchcancel")) {
  84656. clearInterval(intervalId);
  84657. isRecording.value = false;
  84658. recordingDuration.value = "";
  84659. if (/* @__PURE__ */ new Date() - startTime.value >= minRecordingTime) {
  84660. mediaRecorder.stop();
  84661. } else {
  84662. formatAppLog("log", "at pages/chat/speechtotext.vue:150", "录音时间太短,不保存");
  84663. }
  84664. }
  84665. };
  84666. const cancelRecording = () => {
  84667. if (isRecording.value) {
  84668. clearInterval(intervalId);
  84669. formatAppLog("log", "at pages/chat/speechtotext.vue:159", "录音取消");
  84670. isCancelled.value = true;
  84671. mediaRecorder.stop();
  84672. resetRecording();
  84673. }
  84674. };
  84675. const resetRecording = () => {
  84676. isRecording.value = false;
  84677. recordingDuration.value = 0;
  84678. startTime.value = null;
  84679. audioChunks = [];
  84680. };
  84681. const handleTouchMove = (event) => {
  84682. const currentTouchY = event.touches[0].clientY;
  84683. if (startTouchY.value - currentTouchY > cancelOffset) {
  84684. cancelRecording();
  84685. }
  84686. };
  84687. const playRecording = (index2) => {
  84688. const message = messages2.value[index2];
  84689. const audio = new Audio(message.audioUrl);
  84690. audio.play();
  84691. };
  84692. const __returned__ = { safeAreaInsets, safeArea, sysNavBar, messagesHeight, messages: messages2, isRecording, get startTime() {
  84693. return startTime;
  84694. }, set startTime(v2) {
  84695. startTime = v2;
  84696. }, recordingDuration, minRecordingTime, get intervalId() {
  84697. return intervalId;
  84698. }, set intervalId(v2) {
  84699. intervalId = v2;
  84700. }, cancelOffset, startTouchY, get mediaRecorder() {
  84701. return mediaRecorder;
  84702. }, set mediaRecorder(v2) {
  84703. mediaRecorder = v2;
  84704. }, get audioChunks() {
  84705. return audioChunks;
  84706. }, set audioChunks(v2) {
  84707. audioChunks = v2;
  84708. }, get isCancelled() {
  84709. return isCancelled;
  84710. }, set isCancelled(v2) {
  84711. isCancelled = v2;
  84712. }, sendAudioToServer, sendDuration, updateDuration, startRecording, stopRecording, cancelRecording, resetRecording, handleTouchMove, playRecording, ref: vue.ref, nextTick: vue.nextTick, onMounted: vue.onMounted, get sheep() {
  84713. return sheep$1;
  84714. }, get VoiceApi() {
  84715. return VoiceApi;
  84716. } };
  84717. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  84718. return __returned__;
  84719. }
  84720. };
  84721. function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
  84722. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  84723. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  84724. class: "chat-wrap",
  84725. title: "语音转文字"
  84726. }, {
  84727. default: vue.withCtx(() => [
  84728. vue.createElementVNode("view", { class: "chat-container" }, [
  84729. vue.createElementVNode(
  84730. "view",
  84731. {
  84732. class: "messages",
  84733. style: vue.normalizeStyle({ height: $setup.messagesHeight + "px" }),
  84734. id: "messages"
  84735. },
  84736. [
  84737. (vue.openBlock(true), vue.createElementBlock(
  84738. vue.Fragment,
  84739. null,
  84740. vue.renderList($setup.messages, (message, index2) => {
  84741. return vue.openBlock(), vue.createElementBlock("view", {
  84742. key: index2,
  84743. class: "message",
  84744. onClick: ($event) => $setup.playRecording(index2)
  84745. }, [
  84746. vue.createElementVNode("view", { class: "bubble" }, [
  84747. vue.createElementVNode(
  84748. "text",
  84749. { class: "duration" },
  84750. vue.toDisplayString(message.duration) + '" ',
  84751. 1
  84752. /* TEXT */
  84753. ),
  84754. vue.createElementVNode("text", { class: "ss-m-l-10" }, [
  84755. vue.createElementVNode("image", {
  84756. src: _imports_0$1,
  84757. class: "audioPaly"
  84758. })
  84759. ])
  84760. ]),
  84761. message.transcription != null && message.transcription != "" ? (vue.openBlock(), vue.createElementBlock(
  84762. "view",
  84763. {
  84764. key: 0,
  84765. class: "text"
  84766. },
  84767. vue.toDisplayString(message.transcription),
  84768. 1
  84769. /* TEXT */
  84770. )) : vue.createCommentVNode("v-if", true)
  84771. ], 8, ["onClick"]);
  84772. }),
  84773. 128
  84774. /* KEYED_FRAGMENT */
  84775. ))
  84776. ],
  84777. 4
  84778. /* STYLE */
  84779. ),
  84780. vue.createElementVNode("view", { class: "input-area" }, [
  84781. vue.createElementVNode(
  84782. "button",
  84783. {
  84784. onMousedown: $setup.startRecording,
  84785. onMouseup: $setup.stopRecording,
  84786. onMouseleave: $setup.cancelRecording,
  84787. onTouchstart: $setup.startRecording,
  84788. onTouchend: $setup.stopRecording,
  84789. onTouchcancel: $setup.cancelRecording,
  84790. onTouchmove: $setup.handleTouchMove
  84791. },
  84792. " 按住 说话 ",
  84793. 32
  84794. /* NEED_HYDRATION */
  84795. ),
  84796. $setup.isRecording ? (vue.openBlock(), vue.createElementBlock("view", {
  84797. key: 0,
  84798. class: "recording-overlay"
  84799. }, [
  84800. vue.createElementVNode(
  84801. "view",
  84802. null,
  84803. vue.toDisplayString($setup.recordingDuration),
  84804. 1
  84805. /* TEXT */
  84806. ),
  84807. vue.createElementVNode("view", null, "上滑至此取消")
  84808. ])) : vue.createCommentVNode("v-if", true)
  84809. ])
  84810. ])
  84811. ]),
  84812. _: 1
  84813. /* STABLE */
  84814. });
  84815. }
  84816. const PagesChatSpeechtotext = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e], ["__scopeId", "data-v-c5c3bce2"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/chat/speechtotext.vue"]]);
  84817. const _sfc_main$e = {
  84818. __name: "index",
  84819. setup(__props, { expose: __expose }) {
  84820. __expose();
  84821. const userWallet = vue.computed(() => sheep$1.$store("user").userWallet);
  84822. const userInfo2 = vue.computed(() => sheep$1.$store("user").userInfo);
  84823. const state = vue.reactive({
  84824. orderType: "goods",
  84825. // 订单类型; goods - 商品订单, recharge - 充值订单
  84826. orderInfo: {},
  84827. // 支付单信息
  84828. payStatus: 0,
  84829. // 0=检测支付环境, -2=未查询到支付单信息, -1=支付已过期, 1=待支付,2=订单已支付
  84830. payMethods: [],
  84831. // 可选的支付方式
  84832. payment: "",
  84833. // 选中的支付方式
  84834. model: {
  84835. id: "",
  84836. smsCodeUseReqDTO: {
  84837. mobile: "",
  84838. code: "",
  84839. scene: 12
  84840. },
  84841. orderType: 0
  84842. },
  84843. rules: {
  84844. "smsCodeUseReqDTO.code": {
  84845. rules: [{
  84846. required: true,
  84847. errorMessage: t$6("cashier.verification_code_cannot_be_empty")
  84848. }]
  84849. }
  84850. }
  84851. });
  84852. const onPay = () => {
  84853. if (state.payment === "") {
  84854. sheep$1.$helper.toast(t$6("cashier.choose_payment_method"));
  84855. return;
  84856. }
  84857. sheep$1.$platform.pay(state.payment, state.orderType, state.orderInfo.id, state.model.type);
  84858. };
  84859. const FormRef = vue.ref(null);
  84860. const onZeroPay = async () => {
  84861. const validate = await vue.unref(FormRef).validate().catch((error2) => {
  84862. formatAppLog("log", "at pages/pay/index.vue:158", "error: ", error2);
  84863. });
  84864. if (!validate) {
  84865. return;
  84866. }
  84867. const { code: code2, data } = await PayOrderApi.ZeroPurchaseSubmit(state.model);
  84868. if (data) {
  84869. sheep$1.$router.redirect("/pages/pay/resultYuan", {
  84870. id: state.model.id,
  84871. orderType: state.orderType,
  84872. payState: "success",
  84873. payRes: JSON.stringify(data)
  84874. });
  84875. }
  84876. };
  84877. const payDescText = vue.computed(() => {
  84878. if (state.payStatus === 2) {
  84879. return t$6("cashier.order_paid");
  84880. }
  84881. if (state.payStatus === 1) {
  84882. const time2 = useDurationTime(state.orderInfo.expireTime);
  84883. if (time2.ms <= 0) {
  84884. state.payStatus = -1;
  84885. return "";
  84886. }
  84887. return t$6("cashier.remaining_payment_time", { h: time2.h, m: time2.m, s: time2.s });
  84888. }
  84889. if (state.payStatus === -2) {
  84890. return t$6("cashier.no_payment_order_found");
  84891. }
  84892. return "";
  84893. });
  84894. function checkPayStatus() {
  84895. if (state.orderInfo.status === 10 || state.orderInfo.status === 20) {
  84896. state.payStatus = 2;
  84897. return;
  84898. }
  84899. if (state.orderInfo.status === 30) {
  84900. state.payStatus = -1;
  84901. return;
  84902. }
  84903. state.payStatus = 1;
  84904. }
  84905. function onTapPay(e2) {
  84906. state.payment = e2.detail.value;
  84907. }
  84908. async function setOrder(id) {
  84909. const {
  84910. data,
  84911. code: code2
  84912. } = await PayOrderApi.getOrder(id);
  84913. if (code2 !== 0 || !data) {
  84914. state.payStatus = -2;
  84915. return;
  84916. }
  84917. state.orderInfo = data;
  84918. await setPayMethods();
  84919. checkPayStatus();
  84920. }
  84921. async function setPayOrder(id) {
  84922. const {
  84923. data,
  84924. code: code2
  84925. } = await PayOrderApi.getPayOrder(id);
  84926. if (code2 !== 0 || !data) {
  84927. state.payStatus = -2;
  84928. return;
  84929. }
  84930. state.orderInfo = data;
  84931. await setPayMethods();
  84932. checkPayStatus();
  84933. }
  84934. async function setPayMethods() {
  84935. const {
  84936. data,
  84937. code: code2
  84938. } = await PayChannelApi.getEnableChannelCodeList(state.orderInfo.appId);
  84939. if (code2 !== 0) {
  84940. return;
  84941. }
  84942. state.payMethods = getPayMethods(data);
  84943. }
  84944. onLoad((options2) => {
  84945. if (sheep$1.$platform.name === "WechatOfficialAccount" && sheep$1.$platform.os === "ios" && !sheep$1.$platform.landingPage.includes("pages/pay/index")) {
  84946. location.reload();
  84947. return;
  84948. }
  84949. let id = options2.id;
  84950. options2.type;
  84951. state.model.id = options2.id;
  84952. state.model.type = options2.type;
  84953. if (options2.orderType) {
  84954. state.orderType = options2.orderType;
  84955. }
  84956. setOrder(id);
  84957. sheep$1.$store("user").getWallet();
  84958. state.model.smsCodeUseReqDTO.mobile = userInfo2.value.mobile;
  84959. });
  84960. const __returned__ = { userWallet, userInfo: userInfo2, state, onPay, FormRef, onZeroPay, payDescText, checkPayStatus, onTapPay, setOrder, setPayOrder, setPayMethods, computed: vue.computed, reactive: vue.reactive, ref: vue.ref, unref: vue.unref, get onLoad() {
  84961. return onLoad;
  84962. }, get sheep() {
  84963. return sheep$1;
  84964. }, get fen2yuan() {
  84965. return fen2yuan;
  84966. }, get useDurationTime() {
  84967. return useDurationTime;
  84968. }, get PayOrderApi() {
  84969. return PayOrderApi;
  84970. }, get PayChannelApi() {
  84971. return PayChannelApi;
  84972. }, get getPayMethods() {
  84973. return getPayMethods;
  84974. }, get md5() {
  84975. return md5;
  84976. }, get showAuthModal() {
  84977. return showAuthModal;
  84978. }, get closeAuthModal() {
  84979. return closeAuthModal;
  84980. }, get getSmsCode() {
  84981. return getSmsCode;
  84982. }, get getSmsTimer() {
  84983. return getSmsTimer;
  84984. }, get t() {
  84985. return t$6;
  84986. } };
  84987. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  84988. return __returned__;
  84989. }
  84990. };
  84991. function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
  84992. const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l);
  84993. const _component_uni_forms_item = resolveEasycom(vue.resolveDynamicComponent("uni-forms-item"), __easycom_1$9);
  84994. const _component_uni_forms = resolveEasycom(vue.resolveDynamicComponent("uni-forms"), __easycom_2$7);
  84995. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  84996. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  84997. title: $setup.t("cashier.cashier")
  84998. }, {
  84999. default: vue.withCtx(() => [
  85000. vue.createElementVNode("view", { class: "bg-white ss-modal-box ss-flex-col" }, [
  85001. vue.createCommentVNode(" 订单信息 "),
  85002. vue.createElementVNode("view", { class: "modal-header ss-flex-col ss-col-center ss-row-center" }, [
  85003. vue.createElementVNode("view", { class: "money-box ss-m-b-20" }, [
  85004. vue.createElementVNode(
  85005. "text",
  85006. { class: "money-text" },
  85007. vue.toDisplayString($setup.fen2yuan($setup.state.orderInfo.price)),
  85008. 1
  85009. /* TEXT */
  85010. )
  85011. ]),
  85012. vue.createElementVNode("view", { class: "time-text" }, [
  85013. vue.createElementVNode(
  85014. "text",
  85015. null,
  85016. vue.toDisplayString($setup.payDescText),
  85017. 1
  85018. /* TEXT */
  85019. )
  85020. ])
  85021. ]),
  85022. vue.createCommentVNode(" 支付方式 "),
  85023. $setup.state.orderInfo.price ? (vue.openBlock(), vue.createElementBlock("view", {
  85024. key: 0,
  85025. class: "modal-content ss-flex-1"
  85026. }, [
  85027. vue.createElementVNode(
  85028. "view",
  85029. { class: "pay-title ss-p-l-30 ss-m-y-30" },
  85030. vue.toDisplayString($setup.t("cashier.select_payment_method")),
  85031. 1
  85032. /* TEXT */
  85033. ),
  85034. vue.createElementVNode(
  85035. "radio-group",
  85036. { onChange: $setup.onTapPay },
  85037. [
  85038. (vue.openBlock(true), vue.createElementBlock(
  85039. vue.Fragment,
  85040. null,
  85041. vue.renderList($setup.state.payMethods, (item) => {
  85042. return vue.openBlock(), vue.createElementBlock("label", {
  85043. class: "pay-type-item",
  85044. key: item.title
  85045. }, [
  85046. vue.createElementVNode(
  85047. "view",
  85048. {
  85049. class: vue.normalizeClass(["pay-item ss-flex ss-col-center ss-row-between ss-p-x-30 border-bottom", { "disabled-pay-item": item.disabled }])
  85050. },
  85051. [
  85052. vue.createElementVNode("view", { class: "ss-flex ss-col-center" }, [
  85053. item.disabled ? (vue.openBlock(), vue.createElementBlock("image", {
  85054. key: 0,
  85055. class: "pay-icon",
  85056. src: $setup.sheep.$url.static("/static/img/shop/pay/cod_disabled.png"),
  85057. mode: "aspectFit"
  85058. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock(
  85059. vue.Fragment,
  85060. { key: 1 },
  85061. [
  85062. vue.createCommentVNode(" @/static/icon/cart.png "),
  85063. vue.createElementVNode("image", {
  85064. class: "pay-icon",
  85065. src: item.icon,
  85066. mode: "aspectFit"
  85067. }, null, 8, ["src"])
  85068. ],
  85069. 2112
  85070. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  85071. )),
  85072. vue.createElementVNode(
  85073. "text",
  85074. { class: "pay-title" },
  85075. vue.toDisplayString(item.title),
  85076. 1
  85077. /* TEXT */
  85078. )
  85079. ]),
  85080. vue.createElementVNode("view", { class: "check-box ss-flex ss-col-center ss-p-l-10" }, [
  85081. vue.createElementVNode("radio", {
  85082. value: item.value,
  85083. color: "var(--ui-BG-Main)",
  85084. style: { "transform": "scale(0.8)" },
  85085. disabled: item.disabled,
  85086. checked: $setup.state.payment === item.value
  85087. }, null, 8, ["value", "disabled", "checked"])
  85088. ])
  85089. ],
  85090. 2
  85091. /* CLASS */
  85092. )
  85093. ]);
  85094. }),
  85095. 128
  85096. /* KEYED_FRAGMENT */
  85097. ))
  85098. ],
  85099. 32
  85100. /* NEED_HYDRATION */
  85101. )
  85102. ])) : (vue.openBlock(), vue.createElementBlock(
  85103. vue.Fragment,
  85104. { key: 1 },
  85105. [
  85106. vue.createCommentVNode(" 如果是0元,被佣金或者消费分抵扣完了 走验证码 "),
  85107. vue.createElementVNode("view", { class: "" }, [
  85108. vue.createVNode(_component_uni_forms, {
  85109. model: $setup.state.model,
  85110. rules: $setup.state.rules,
  85111. validateTrigger: "bind",
  85112. labelPosition: "left",
  85113. border: "",
  85114. class: "form-box",
  85115. labelWidth: "200",
  85116. ref: "FormRef"
  85117. }, {
  85118. default: vue.withCtx(() => [
  85119. vue.createElementVNode("view", { class: "bg-white ss-p-x-30" }, [
  85120. vue.createVNode(_component_uni_forms_item, {
  85121. name: "mobile",
  85122. label: $setup.t("cashier.phone_number"),
  85123. class: "mobile loginUniFormItem ss-p-t-10"
  85124. }, {
  85125. default: vue.withCtx(() => [
  85126. vue.createVNode(_component_uni_easyinput, {
  85127. modelValue: $setup.state.model.smsCodeUseReqDTO.mobile,
  85128. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.model.smsCodeUseReqDTO.mobile = $event),
  85129. type: "smsCodeUseReqDTO",
  85130. placeholder: $setup.t("cashier.enter_phone_number"),
  85131. inputBorder: false,
  85132. clearable: false,
  85133. disabled: true
  85134. }, {
  85135. right: vue.withCtx(() => [
  85136. vue.createElementVNode("button", {
  85137. class: "ss-reset-button code-btn code-btn-start",
  85138. disabled: $setup.state.payStatus !== 1,
  85139. onClick: _cache[0] || (_cache[0] = ($event) => $setup.getSmsCode("zeroBuy", $setup.state.model.smsCodeUseReqDTO.mobile))
  85140. }, vue.toDisplayString($setup.getSmsTimer("zeroBuy")), 9, ["disabled"])
  85141. ]),
  85142. _: 1
  85143. /* STABLE */
  85144. }, 8, ["modelValue", "placeholder"])
  85145. ]),
  85146. _: 1
  85147. /* STABLE */
  85148. }, 8, ["label"]),
  85149. vue.createVNode(_component_uni_forms_item, {
  85150. name: "smsCodeUseReqDTO.code",
  85151. label: $setup.t("cashier.verification_code"),
  85152. required: true
  85153. }, {
  85154. default: vue.withCtx(() => [
  85155. vue.createVNode(_component_uni_easyinput, {
  85156. modelValue: $setup.state.model.smsCodeUseReqDTO.code,
  85157. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.state.model.smsCodeUseReqDTO.code = $event),
  85158. type: "number",
  85159. placeholder: $setup.t("cashier.enter_verification_code"),
  85160. inputBorder: false,
  85161. clearable: false
  85162. }, null, 8, ["modelValue", "placeholder"])
  85163. ]),
  85164. _: 1
  85165. /* STABLE */
  85166. }, 8, ["label"])
  85167. ])
  85168. ]),
  85169. _: 1
  85170. /* STABLE */
  85171. }, 8, ["model", "rules"])
  85172. ])
  85173. ],
  85174. 2112
  85175. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  85176. )),
  85177. vue.createCommentVNode(" 工具 "),
  85178. vue.createElementVNode("view", { class: "modal-footer ss-flex ss-row-center ss-col-center ss-m-t-80 ss-m-b-40" }, [
  85179. $setup.state.payStatus === 0 ? (vue.openBlock(), vue.createElementBlock(
  85180. "button",
  85181. {
  85182. key: 0,
  85183. class: "ss-reset-button past-due-btn"
  85184. },
  85185. vue.toDisplayString($setup.t("cashier.checking_payment_environment")),
  85186. 1
  85187. /* TEXT */
  85188. )) : $setup.state.payStatus === -1 ? (vue.openBlock(), vue.createElementBlock(
  85189. "button",
  85190. {
  85191. key: 1,
  85192. class: "ss-reset-button past-due-btn",
  85193. disabled: ""
  85194. },
  85195. vue.toDisplayString($setup.t("cashier.payment_expired")),
  85196. 1
  85197. /* TEXT */
  85198. )) : $setup.state.payStatus === 1 && $setup.state.orderInfo.price ? (vue.openBlock(), vue.createElementBlock(
  85199. vue.Fragment,
  85200. { key: 2 },
  85201. [
  85202. vue.createCommentVNode(" 支付状态没过期,并且支付金额不为0 "),
  85203. vue.createElementVNode("button", {
  85204. class: vue.normalizeClass(["ss-reset-button save-btn", { "disabled-btn": $setup.state.payStatus !== 1 }]),
  85205. onClick: $setup.onPay,
  85206. disabled: $setup.state.payStatus !== 1
  85207. }, vue.toDisplayString($setup.t("cashier.pay_now")), 11, ["disabled"])
  85208. ],
  85209. 2112
  85210. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  85211. )) : (vue.openBlock(), vue.createElementBlock(
  85212. vue.Fragment,
  85213. { key: 3 },
  85214. [
  85215. vue.createCommentVNode(" 支付状态没过期,并且支付金额为0 "),
  85216. vue.createElementVNode("button", {
  85217. class: vue.normalizeClass(["ss-reset-button save-btn", { "disabled-btn": $setup.state.payStatus !== 1 }]),
  85218. onClick: $setup.onZeroPay,
  85219. disabled: $setup.state.payStatus !== 1
  85220. }, vue.toDisplayString($setup.t("cashier.pay_now")), 11, ["disabled"])
  85221. ],
  85222. 2112
  85223. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  85224. ))
  85225. ])
  85226. ])
  85227. ]),
  85228. _: 1
  85229. /* STABLE */
  85230. }, 8, ["title"]);
  85231. }
  85232. const PagesPayIndex = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d], ["__scopeId", "data-v-d7fd7b38"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/pay/index.vue"]]);
  85233. function bind(fn, thisArg) {
  85234. return function wrap() {
  85235. return fn.apply(thisArg, arguments);
  85236. };
  85237. }
  85238. const { toString } = Object.prototype;
  85239. const { getPrototypeOf } = Object;
  85240. const kindOf = /* @__PURE__ */ ((cache2) => (thing) => {
  85241. const str = toString.call(thing);
  85242. return cache2[str] || (cache2[str] = str.slice(8, -1).toLowerCase());
  85243. })(/* @__PURE__ */ Object.create(null));
  85244. const kindOfTest = (type) => {
  85245. type = type.toLowerCase();
  85246. return (thing) => kindOf(thing) === type;
  85247. };
  85248. const typeOfTest = (type) => (thing) => typeof thing === type;
  85249. const { isArray } = Array;
  85250. const isUndefined = typeOfTest("undefined");
  85251. function isBuffer(val) {
  85252. return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
  85253. }
  85254. const isArrayBuffer = kindOfTest("ArrayBuffer");
  85255. function isArrayBufferView(val) {
  85256. let result2;
  85257. if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
  85258. result2 = ArrayBuffer.isView(val);
  85259. } else {
  85260. result2 = val && val.buffer && isArrayBuffer(val.buffer);
  85261. }
  85262. return result2;
  85263. }
  85264. const isString = typeOfTest("string");
  85265. const isFunction = typeOfTest("function");
  85266. const isNumber = typeOfTest("number");
  85267. const isObject = (thing) => thing !== null && typeof thing === "object";
  85268. const isBoolean = (thing) => thing === true || thing === false;
  85269. const isPlainObject = (val) => {
  85270. if (kindOf(val) !== "object") {
  85271. return false;
  85272. }
  85273. const prototype2 = getPrototypeOf(val);
  85274. return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
  85275. };
  85276. const isDate = kindOfTest("Date");
  85277. const isFile = kindOfTest("File");
  85278. const isBlob = kindOfTest("Blob");
  85279. const isFileList = kindOfTest("FileList");
  85280. const isStream = (val) => isObject(val) && isFunction(val.pipe);
  85281. const isFormData = (thing) => {
  85282. let kind;
  85283. return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance
  85284. kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]"));
  85285. };
  85286. const isURLSearchParams = kindOfTest("URLSearchParams");
  85287. const [isReadableStream, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest);
  85288. const trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
  85289. function forEach(obj, fn, { allOwnKeys = false } = {}) {
  85290. if (obj === null || typeof obj === "undefined") {
  85291. return;
  85292. }
  85293. let i2;
  85294. let l2;
  85295. if (typeof obj !== "object") {
  85296. obj = [obj];
  85297. }
  85298. if (isArray(obj)) {
  85299. for (i2 = 0, l2 = obj.length; i2 < l2; i2++) {
  85300. fn.call(null, obj[i2], i2, obj);
  85301. }
  85302. } else {
  85303. const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
  85304. const len = keys.length;
  85305. let key;
  85306. for (i2 = 0; i2 < len; i2++) {
  85307. key = keys[i2];
  85308. fn.call(null, obj[key], key, obj);
  85309. }
  85310. }
  85311. }
  85312. function findKey(obj, key) {
  85313. key = key.toLowerCase();
  85314. const keys = Object.keys(obj);
  85315. let i2 = keys.length;
  85316. let _key;
  85317. while (i2-- > 0) {
  85318. _key = keys[i2];
  85319. if (key === _key.toLowerCase()) {
  85320. return _key;
  85321. }
  85322. }
  85323. return null;
  85324. }
  85325. const _global = (() => {
  85326. if (typeof globalThis !== "undefined")
  85327. return globalThis;
  85328. return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global;
  85329. })();
  85330. const isContextDefined = (context) => !isUndefined(context) && context !== _global;
  85331. function merge() {
  85332. const { caseless } = isContextDefined(this) && this || {};
  85333. const result2 = {};
  85334. const assignValue = (val, key) => {
  85335. const targetKey = caseless && findKey(result2, key) || key;
  85336. if (isPlainObject(result2[targetKey]) && isPlainObject(val)) {
  85337. result2[targetKey] = merge(result2[targetKey], val);
  85338. } else if (isPlainObject(val)) {
  85339. result2[targetKey] = merge({}, val);
  85340. } else if (isArray(val)) {
  85341. result2[targetKey] = val.slice();
  85342. } else {
  85343. result2[targetKey] = val;
  85344. }
  85345. };
  85346. for (let i2 = 0, l2 = arguments.length; i2 < l2; i2++) {
  85347. arguments[i2] && forEach(arguments[i2], assignValue);
  85348. }
  85349. return result2;
  85350. }
  85351. const extend = (a2, b2, thisArg, { allOwnKeys } = {}) => {
  85352. forEach(b2, (val, key) => {
  85353. if (thisArg && isFunction(val)) {
  85354. a2[key] = bind(val, thisArg);
  85355. } else {
  85356. a2[key] = val;
  85357. }
  85358. }, { allOwnKeys });
  85359. return a2;
  85360. };
  85361. const stripBOM = (content) => {
  85362. if (content.charCodeAt(0) === 65279) {
  85363. content = content.slice(1);
  85364. }
  85365. return content;
  85366. };
  85367. const inherits = (constructor, superConstructor, props, descriptors2) => {
  85368. constructor.prototype = Object.create(superConstructor.prototype, descriptors2);
  85369. constructor.prototype.constructor = constructor;
  85370. Object.defineProperty(constructor, "super", {
  85371. value: superConstructor.prototype
  85372. });
  85373. props && Object.assign(constructor.prototype, props);
  85374. };
  85375. const toFlatObject = (sourceObj, destObj, filter, propFilter) => {
  85376. let props;
  85377. let i2;
  85378. let prop;
  85379. const merged = {};
  85380. destObj = destObj || {};
  85381. if (sourceObj == null)
  85382. return destObj;
  85383. do {
  85384. props = Object.getOwnPropertyNames(sourceObj);
  85385. i2 = props.length;
  85386. while (i2-- > 0) {
  85387. prop = props[i2];
  85388. if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
  85389. destObj[prop] = sourceObj[prop];
  85390. merged[prop] = true;
  85391. }
  85392. }
  85393. sourceObj = filter !== false && getPrototypeOf(sourceObj);
  85394. } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
  85395. return destObj;
  85396. };
  85397. const endsWith = (str, searchString, position) => {
  85398. str = String(str);
  85399. if (position === void 0 || position > str.length) {
  85400. position = str.length;
  85401. }
  85402. position -= searchString.length;
  85403. const lastIndex = str.indexOf(searchString, position);
  85404. return lastIndex !== -1 && lastIndex === position;
  85405. };
  85406. const toArray = (thing) => {
  85407. if (!thing)
  85408. return null;
  85409. if (isArray(thing))
  85410. return thing;
  85411. let i2 = thing.length;
  85412. if (!isNumber(i2))
  85413. return null;
  85414. const arr = new Array(i2);
  85415. while (i2-- > 0) {
  85416. arr[i2] = thing[i2];
  85417. }
  85418. return arr;
  85419. };
  85420. const isTypedArray = /* @__PURE__ */ ((TypedArray) => {
  85421. return (thing) => {
  85422. return TypedArray && thing instanceof TypedArray;
  85423. };
  85424. })(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array));
  85425. const forEachEntry = (obj, fn) => {
  85426. const generator = obj && obj[Symbol.iterator];
  85427. const iterator = generator.call(obj);
  85428. let result2;
  85429. while ((result2 = iterator.next()) && !result2.done) {
  85430. const pair = result2.value;
  85431. fn.call(obj, pair[0], pair[1]);
  85432. }
  85433. };
  85434. const matchAll = (regExp, str) => {
  85435. let matches;
  85436. const arr = [];
  85437. while ((matches = regExp.exec(str)) !== null) {
  85438. arr.push(matches);
  85439. }
  85440. return arr;
  85441. };
  85442. const isHTMLForm = kindOfTest("HTMLFormElement");
  85443. const toCamelCase = (str) => {
  85444. return str.toLowerCase().replace(
  85445. /[-_\s]([a-z\d])(\w*)/g,
  85446. function replacer(m2, p1, p2) {
  85447. return p1.toUpperCase() + p2;
  85448. }
  85449. );
  85450. };
  85451. const hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
  85452. const isRegExp = kindOfTest("RegExp");
  85453. const reduceDescriptors = (obj, reducer) => {
  85454. const descriptors2 = Object.getOwnPropertyDescriptors(obj);
  85455. const reducedDescriptors = {};
  85456. forEach(descriptors2, (descriptor, name2) => {
  85457. let ret;
  85458. if ((ret = reducer(descriptor, name2, obj)) !== false) {
  85459. reducedDescriptors[name2] = ret || descriptor;
  85460. }
  85461. });
  85462. Object.defineProperties(obj, reducedDescriptors);
  85463. };
  85464. const freezeMethods = (obj) => {
  85465. reduceDescriptors(obj, (descriptor, name2) => {
  85466. if (isFunction(obj) && ["arguments", "caller", "callee"].indexOf(name2) !== -1) {
  85467. return false;
  85468. }
  85469. const value = obj[name2];
  85470. if (!isFunction(value))
  85471. return;
  85472. descriptor.enumerable = false;
  85473. if ("writable" in descriptor) {
  85474. descriptor.writable = false;
  85475. return;
  85476. }
  85477. if (!descriptor.set) {
  85478. descriptor.set = () => {
  85479. throw Error("Can not rewrite read-only method '" + name2 + "'");
  85480. };
  85481. }
  85482. });
  85483. };
  85484. const toObjectSet = (arrayOrString, delimiter) => {
  85485. const obj = {};
  85486. const define = (arr) => {
  85487. arr.forEach((value) => {
  85488. obj[value] = true;
  85489. });
  85490. };
  85491. isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
  85492. return obj;
  85493. };
  85494. const noop = () => {
  85495. };
  85496. const toFiniteNumber = (value, defaultValue) => {
  85497. return value != null && Number.isFinite(value = +value) ? value : defaultValue;
  85498. };
  85499. const ALPHA = "abcdefghijklmnopqrstuvwxyz";
  85500. const DIGIT = "0123456789";
  85501. const ALPHABET = {
  85502. DIGIT,
  85503. ALPHA,
  85504. ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
  85505. };
  85506. const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
  85507. let str = "";
  85508. const { length } = alphabet;
  85509. while (size--) {
  85510. str += alphabet[Math.random() * length | 0];
  85511. }
  85512. return str;
  85513. };
  85514. function isSpecCompliantForm(thing) {
  85515. return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === "FormData" && thing[Symbol.iterator]);
  85516. }
  85517. const toJSONObject = (obj) => {
  85518. const stack = new Array(10);
  85519. const visit = (source, i2) => {
  85520. if (isObject(source)) {
  85521. if (stack.indexOf(source) >= 0) {
  85522. return;
  85523. }
  85524. if (!("toJSON" in source)) {
  85525. stack[i2] = source;
  85526. const target = isArray(source) ? [] : {};
  85527. forEach(source, (value, key) => {
  85528. const reducedValue = visit(value, i2 + 1);
  85529. !isUndefined(reducedValue) && (target[key] = reducedValue);
  85530. });
  85531. stack[i2] = void 0;
  85532. return target;
  85533. }
  85534. }
  85535. return source;
  85536. };
  85537. return visit(obj, 0);
  85538. };
  85539. const isAsyncFn = kindOfTest("AsyncFunction");
  85540. const isThenable = (thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
  85541. const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
  85542. if (setImmediateSupported) {
  85543. return setImmediate;
  85544. }
  85545. return postMessageSupported ? ((token, callbacks) => {
  85546. _global.addEventListener("message", ({ source, data }) => {
  85547. if (source === _global && data === token) {
  85548. callbacks.length && callbacks.shift()();
  85549. }
  85550. }, false);
  85551. return (cb) => {
  85552. callbacks.push(cb);
  85553. _global.postMessage(token, "*");
  85554. };
  85555. })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
  85556. })(
  85557. typeof setImmediate === "function",
  85558. isFunction(_global.postMessage)
  85559. );
  85560. const asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
  85561. const utils$1 = {
  85562. isArray,
  85563. isArrayBuffer,
  85564. isBuffer,
  85565. isFormData,
  85566. isArrayBufferView,
  85567. isString,
  85568. isNumber,
  85569. isBoolean,
  85570. isObject,
  85571. isPlainObject,
  85572. isReadableStream,
  85573. isRequest,
  85574. isResponse,
  85575. isHeaders,
  85576. isUndefined,
  85577. isDate,
  85578. isFile,
  85579. isBlob,
  85580. isRegExp,
  85581. isFunction,
  85582. isStream,
  85583. isURLSearchParams,
  85584. isTypedArray,
  85585. isFileList,
  85586. forEach,
  85587. merge,
  85588. extend,
  85589. trim,
  85590. stripBOM,
  85591. inherits,
  85592. toFlatObject,
  85593. kindOf,
  85594. kindOfTest,
  85595. endsWith,
  85596. toArray,
  85597. forEachEntry,
  85598. matchAll,
  85599. isHTMLForm,
  85600. hasOwnProperty,
  85601. hasOwnProp: hasOwnProperty,
  85602. // an alias to avoid ESLint no-prototype-builtins detection
  85603. reduceDescriptors,
  85604. freezeMethods,
  85605. toObjectSet,
  85606. toCamelCase,
  85607. noop,
  85608. toFiniteNumber,
  85609. findKey,
  85610. global: _global,
  85611. isContextDefined,
  85612. ALPHABET,
  85613. generateString,
  85614. isSpecCompliantForm,
  85615. toJSONObject,
  85616. isAsyncFn,
  85617. isThenable,
  85618. setImmediate: _setImmediate,
  85619. asap
  85620. };
  85621. function AxiosError(message, code2, config2, request2, response) {
  85622. Error.call(this);
  85623. if (Error.captureStackTrace) {
  85624. Error.captureStackTrace(this, this.constructor);
  85625. } else {
  85626. this.stack = new Error().stack;
  85627. }
  85628. this.message = message;
  85629. this.name = "AxiosError";
  85630. code2 && (this.code = code2);
  85631. config2 && (this.config = config2);
  85632. request2 && (this.request = request2);
  85633. if (response) {
  85634. this.response = response;
  85635. this.status = response.status ? response.status : null;
  85636. }
  85637. }
  85638. utils$1.inherits(AxiosError, Error, {
  85639. toJSON: function toJSON() {
  85640. return {
  85641. // Standard
  85642. message: this.message,
  85643. name: this.name,
  85644. // Microsoft
  85645. description: this.description,
  85646. number: this.number,
  85647. // Mozilla
  85648. fileName: this.fileName,
  85649. lineNumber: this.lineNumber,
  85650. columnNumber: this.columnNumber,
  85651. stack: this.stack,
  85652. // Axios
  85653. config: utils$1.toJSONObject(this.config),
  85654. code: this.code,
  85655. status: this.status
  85656. };
  85657. }
  85658. });
  85659. const prototype$1 = AxiosError.prototype;
  85660. const descriptors = {};
  85661. [
  85662. "ERR_BAD_OPTION_VALUE",
  85663. "ERR_BAD_OPTION",
  85664. "ECONNABORTED",
  85665. "ETIMEDOUT",
  85666. "ERR_NETWORK",
  85667. "ERR_FR_TOO_MANY_REDIRECTS",
  85668. "ERR_DEPRECATED",
  85669. "ERR_BAD_RESPONSE",
  85670. "ERR_BAD_REQUEST",
  85671. "ERR_CANCELED",
  85672. "ERR_NOT_SUPPORT",
  85673. "ERR_INVALID_URL"
  85674. // eslint-disable-next-line func-names
  85675. ].forEach((code2) => {
  85676. descriptors[code2] = { value: code2 };
  85677. });
  85678. Object.defineProperties(AxiosError, descriptors);
  85679. Object.defineProperty(prototype$1, "isAxiosError", { value: true });
  85680. AxiosError.from = (error2, code2, config2, request2, response, customProps) => {
  85681. const axiosError = Object.create(prototype$1);
  85682. utils$1.toFlatObject(error2, axiosError, function filter(obj) {
  85683. return obj !== Error.prototype;
  85684. }, (prop) => {
  85685. return prop !== "isAxiosError";
  85686. });
  85687. AxiosError.call(axiosError, error2.message, code2, config2, request2, response);
  85688. axiosError.cause = error2;
  85689. axiosError.name = error2.name;
  85690. customProps && Object.assign(axiosError, customProps);
  85691. return axiosError;
  85692. };
  85693. const httpAdapter = null;
  85694. function isVisitable(thing) {
  85695. return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
  85696. }
  85697. function removeBrackets(key) {
  85698. return utils$1.endsWith(key, "[]") ? key.slice(0, -2) : key;
  85699. }
  85700. function renderKey(path, key, dots) {
  85701. if (!path)
  85702. return key;
  85703. return path.concat(key).map(function each(token, i2) {
  85704. token = removeBrackets(token);
  85705. return !dots && i2 ? "[" + token + "]" : token;
  85706. }).join(dots ? "." : "");
  85707. }
  85708. function isFlatArray(arr) {
  85709. return utils$1.isArray(arr) && !arr.some(isVisitable);
  85710. }
  85711. const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
  85712. return /^is[A-Z]/.test(prop);
  85713. });
  85714. function toFormData(obj, formData, options2) {
  85715. if (!utils$1.isObject(obj)) {
  85716. throw new TypeError("target must be an object");
  85717. }
  85718. formData = formData || new FormData();
  85719. options2 = utils$1.toFlatObject(options2, {
  85720. metaTokens: true,
  85721. dots: false,
  85722. indexes: false
  85723. }, false, function defined(option, source) {
  85724. return !utils$1.isUndefined(source[option]);
  85725. });
  85726. const metaTokens = options2.metaTokens;
  85727. const visitor = options2.visitor || defaultVisitor;
  85728. const dots = options2.dots;
  85729. const indexes = options2.indexes;
  85730. const _Blob = options2.Blob || typeof Blob !== "undefined" && Blob;
  85731. const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
  85732. if (!utils$1.isFunction(visitor)) {
  85733. throw new TypeError("visitor must be a function");
  85734. }
  85735. function convertValue(value) {
  85736. if (value === null)
  85737. return "";
  85738. if (utils$1.isDate(value)) {
  85739. return value.toISOString();
  85740. }
  85741. if (!useBlob && utils$1.isBlob(value)) {
  85742. throw new AxiosError("Blob is not supported. Use a Buffer instead.");
  85743. }
  85744. if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
  85745. return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
  85746. }
  85747. return value;
  85748. }
  85749. function defaultVisitor(value, key, path) {
  85750. let arr = value;
  85751. if (value && !path && typeof value === "object") {
  85752. if (utils$1.endsWith(key, "{}")) {
  85753. key = metaTokens ? key : key.slice(0, -2);
  85754. value = JSON.stringify(value);
  85755. } else if (utils$1.isArray(value) && isFlatArray(value) || (utils$1.isFileList(value) || utils$1.endsWith(key, "[]")) && (arr = utils$1.toArray(value))) {
  85756. key = removeBrackets(key);
  85757. arr.forEach(function each(el, index2) {
  85758. !(utils$1.isUndefined(el) || el === null) && formData.append(
  85759. // eslint-disable-next-line no-nested-ternary
  85760. indexes === true ? renderKey([key], index2, dots) : indexes === null ? key : key + "[]",
  85761. convertValue(el)
  85762. );
  85763. });
  85764. return false;
  85765. }
  85766. }
  85767. if (isVisitable(value)) {
  85768. return true;
  85769. }
  85770. formData.append(renderKey(path, key, dots), convertValue(value));
  85771. return false;
  85772. }
  85773. const stack = [];
  85774. const exposedHelpers = Object.assign(predicates, {
  85775. defaultVisitor,
  85776. convertValue,
  85777. isVisitable
  85778. });
  85779. function build(value, path) {
  85780. if (utils$1.isUndefined(value))
  85781. return;
  85782. if (stack.indexOf(value) !== -1) {
  85783. throw Error("Circular reference detected in " + path.join("."));
  85784. }
  85785. stack.push(value);
  85786. utils$1.forEach(value, function each(el, key) {
  85787. const result2 = !(utils$1.isUndefined(el) || el === null) && visitor.call(
  85788. formData,
  85789. el,
  85790. utils$1.isString(key) ? key.trim() : key,
  85791. path,
  85792. exposedHelpers
  85793. );
  85794. if (result2 === true) {
  85795. build(el, path ? path.concat(key) : [key]);
  85796. }
  85797. });
  85798. stack.pop();
  85799. }
  85800. if (!utils$1.isObject(obj)) {
  85801. throw new TypeError("data must be an object");
  85802. }
  85803. build(obj);
  85804. return formData;
  85805. }
  85806. function encode$1(str) {
  85807. const charMap = {
  85808. "!": "%21",
  85809. "'": "%27",
  85810. "(": "%28",
  85811. ")": "%29",
  85812. "~": "%7E",
  85813. "%20": "+",
  85814. "%00": "\0"
  85815. };
  85816. return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
  85817. return charMap[match];
  85818. });
  85819. }
  85820. function AxiosURLSearchParams(params, options2) {
  85821. this._pairs = [];
  85822. params && toFormData(params, this, options2);
  85823. }
  85824. const prototype = AxiosURLSearchParams.prototype;
  85825. prototype.append = function append(name2, value) {
  85826. this._pairs.push([name2, value]);
  85827. };
  85828. prototype.toString = function toString2(encoder) {
  85829. const _encode = encoder ? function(value) {
  85830. return encoder.call(this, value, encode$1);
  85831. } : encode$1;
  85832. return this._pairs.map(function each(pair) {
  85833. return _encode(pair[0]) + "=" + _encode(pair[1]);
  85834. }, "").join("&");
  85835. };
  85836. function encode(val) {
  85837. return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
  85838. }
  85839. function buildURL(url2, params, options2) {
  85840. if (!params) {
  85841. return url2;
  85842. }
  85843. const _encode = options2 && options2.encode || encode;
  85844. const serializeFn = options2 && options2.serialize;
  85845. let serializedParams;
  85846. if (serializeFn) {
  85847. serializedParams = serializeFn(params, options2);
  85848. } else {
  85849. serializedParams = utils$1.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, options2).toString(_encode);
  85850. }
  85851. if (serializedParams) {
  85852. const hashmarkIndex = url2.indexOf("#");
  85853. if (hashmarkIndex !== -1) {
  85854. url2 = url2.slice(0, hashmarkIndex);
  85855. }
  85856. url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams;
  85857. }
  85858. return url2;
  85859. }
  85860. class InterceptorManager {
  85861. constructor() {
  85862. this.handlers = [];
  85863. }
  85864. /**
  85865. * Add a new interceptor to the stack
  85866. *
  85867. * @param {Function} fulfilled The function to handle `then` for a `Promise`
  85868. * @param {Function} rejected The function to handle `reject` for a `Promise`
  85869. *
  85870. * @return {Number} An ID used to remove interceptor later
  85871. */
  85872. use(fulfilled, rejected, options2) {
  85873. this.handlers.push({
  85874. fulfilled,
  85875. rejected,
  85876. synchronous: options2 ? options2.synchronous : false,
  85877. runWhen: options2 ? options2.runWhen : null
  85878. });
  85879. return this.handlers.length - 1;
  85880. }
  85881. /**
  85882. * Remove an interceptor from the stack
  85883. *
  85884. * @param {Number} id The ID that was returned by `use`
  85885. *
  85886. * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
  85887. */
  85888. eject(id) {
  85889. if (this.handlers[id]) {
  85890. this.handlers[id] = null;
  85891. }
  85892. }
  85893. /**
  85894. * Clear all interceptors from the stack
  85895. *
  85896. * @returns {void}
  85897. */
  85898. clear() {
  85899. if (this.handlers) {
  85900. this.handlers = [];
  85901. }
  85902. }
  85903. /**
  85904. * Iterate over all the registered interceptors
  85905. *
  85906. * This method is particularly useful for skipping over any
  85907. * interceptors that may have become `null` calling `eject`.
  85908. *
  85909. * @param {Function} fn The function to call for each interceptor
  85910. *
  85911. * @returns {void}
  85912. */
  85913. forEach(fn) {
  85914. utils$1.forEach(this.handlers, function forEachHandler(h2) {
  85915. if (h2 !== null) {
  85916. fn(h2);
  85917. }
  85918. });
  85919. }
  85920. }
  85921. const transitionalDefaults = {
  85922. silentJSONParsing: true,
  85923. forcedJSONParsing: true,
  85924. clarifyTimeoutError: false
  85925. };
  85926. const URLSearchParams$1 = typeof URLSearchParams !== "undefined" ? URLSearchParams : AxiosURLSearchParams;
  85927. const FormData$1 = typeof FormData !== "undefined" ? FormData : null;
  85928. const Blob$1 = typeof Blob !== "undefined" ? Blob : null;
  85929. const platform$1 = {
  85930. isBrowser: true,
  85931. classes: {
  85932. URLSearchParams: URLSearchParams$1,
  85933. FormData: FormData$1,
  85934. Blob: Blob$1
  85935. },
  85936. protocols: ["http", "https", "file", "blob", "url", "data"]
  85937. };
  85938. const hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
  85939. const _navigator = typeof navigator === "object" && navigator || void 0;
  85940. const hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0);
  85941. const hasStandardBrowserWebWorkerEnv = (() => {
  85942. return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef
  85943. self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
  85944. })();
  85945. const origin = hasBrowserEnv && window.location.href || "http://localhost";
  85946. const utils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  85947. __proto__: null,
  85948. hasBrowserEnv,
  85949. hasStandardBrowserEnv,
  85950. hasStandardBrowserWebWorkerEnv,
  85951. navigator: _navigator,
  85952. origin
  85953. }, Symbol.toStringTag, { value: "Module" }));
  85954. const platform = {
  85955. ...utils,
  85956. ...platform$1
  85957. };
  85958. function toURLEncodedForm(data, options2) {
  85959. return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
  85960. visitor: function(value, key, path, helpers) {
  85961. if (platform.isNode && utils$1.isBuffer(value)) {
  85962. this.append(key, value.toString("base64"));
  85963. return false;
  85964. }
  85965. return helpers.defaultVisitor.apply(this, arguments);
  85966. }
  85967. }, options2));
  85968. }
  85969. function parsePropPath(name2) {
  85970. return utils$1.matchAll(/\w+|\[(\w*)]/g, name2).map((match) => {
  85971. return match[0] === "[]" ? "" : match[1] || match[0];
  85972. });
  85973. }
  85974. function arrayToObject(arr) {
  85975. const obj = {};
  85976. const keys = Object.keys(arr);
  85977. let i2;
  85978. const len = keys.length;
  85979. let key;
  85980. for (i2 = 0; i2 < len; i2++) {
  85981. key = keys[i2];
  85982. obj[key] = arr[key];
  85983. }
  85984. return obj;
  85985. }
  85986. function formDataToJSON(formData) {
  85987. function buildPath(path, value, target, index2) {
  85988. let name2 = path[index2++];
  85989. if (name2 === "__proto__")
  85990. return true;
  85991. const isNumericKey = Number.isFinite(+name2);
  85992. const isLast = index2 >= path.length;
  85993. name2 = !name2 && utils$1.isArray(target) ? target.length : name2;
  85994. if (isLast) {
  85995. if (utils$1.hasOwnProp(target, name2)) {
  85996. target[name2] = [target[name2], value];
  85997. } else {
  85998. target[name2] = value;
  85999. }
  86000. return !isNumericKey;
  86001. }
  86002. if (!target[name2] || !utils$1.isObject(target[name2])) {
  86003. target[name2] = [];
  86004. }
  86005. const result2 = buildPath(path, value, target[name2], index2);
  86006. if (result2 && utils$1.isArray(target[name2])) {
  86007. target[name2] = arrayToObject(target[name2]);
  86008. }
  86009. return !isNumericKey;
  86010. }
  86011. if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
  86012. const obj = {};
  86013. utils$1.forEachEntry(formData, (name2, value) => {
  86014. buildPath(parsePropPath(name2), value, obj, 0);
  86015. });
  86016. return obj;
  86017. }
  86018. return null;
  86019. }
  86020. function stringifySafely(rawValue, parser, encoder) {
  86021. if (utils$1.isString(rawValue)) {
  86022. try {
  86023. (parser || JSON.parse)(rawValue);
  86024. return utils$1.trim(rawValue);
  86025. } catch (e2) {
  86026. if (e2.name !== "SyntaxError") {
  86027. throw e2;
  86028. }
  86029. }
  86030. }
  86031. return (encoder || JSON.stringify)(rawValue);
  86032. }
  86033. const defaults = {
  86034. transitional: transitionalDefaults,
  86035. adapter: ["xhr", "http", "fetch"],
  86036. transformRequest: [function transformRequest(data, headers) {
  86037. const contentType = headers.getContentType() || "";
  86038. const hasJSONContentType = contentType.indexOf("application/json") > -1;
  86039. const isObjectPayload = utils$1.isObject(data);
  86040. if (isObjectPayload && utils$1.isHTMLForm(data)) {
  86041. data = new FormData(data);
  86042. }
  86043. const isFormData2 = utils$1.isFormData(data);
  86044. if (isFormData2) {
  86045. return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
  86046. }
  86047. if (utils$1.isArrayBuffer(data) || utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || utils$1.isBlob(data) || utils$1.isReadableStream(data)) {
  86048. return data;
  86049. }
  86050. if (utils$1.isArrayBufferView(data)) {
  86051. return data.buffer;
  86052. }
  86053. if (utils$1.isURLSearchParams(data)) {
  86054. headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
  86055. return data.toString();
  86056. }
  86057. let isFileList2;
  86058. if (isObjectPayload) {
  86059. if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
  86060. return toURLEncodedForm(data, this.formSerializer).toString();
  86061. }
  86062. if ((isFileList2 = utils$1.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
  86063. const _FormData = this.env && this.env.FormData;
  86064. return toFormData(
  86065. isFileList2 ? { "files[]": data } : data,
  86066. _FormData && new _FormData(),
  86067. this.formSerializer
  86068. );
  86069. }
  86070. }
  86071. if (isObjectPayload || hasJSONContentType) {
  86072. headers.setContentType("application/json", false);
  86073. return stringifySafely(data);
  86074. }
  86075. return data;
  86076. }],
  86077. transformResponse: [function transformResponse(data) {
  86078. const transitional = this.transitional || defaults.transitional;
  86079. const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
  86080. const JSONRequested = this.responseType === "json";
  86081. if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
  86082. return data;
  86083. }
  86084. if (data && utils$1.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
  86085. const silentJSONParsing = transitional && transitional.silentJSONParsing;
  86086. const strictJSONParsing = !silentJSONParsing && JSONRequested;
  86087. try {
  86088. return JSON.parse(data);
  86089. } catch (e2) {
  86090. if (strictJSONParsing) {
  86091. if (e2.name === "SyntaxError") {
  86092. throw AxiosError.from(e2, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
  86093. }
  86094. throw e2;
  86095. }
  86096. }
  86097. }
  86098. return data;
  86099. }],
  86100. /**
  86101. * A timeout in milliseconds to abort a request. If set to 0 (default) a
  86102. * timeout is not created.
  86103. */
  86104. timeout: 0,
  86105. xsrfCookieName: "XSRF-TOKEN",
  86106. xsrfHeaderName: "X-XSRF-TOKEN",
  86107. maxContentLength: -1,
  86108. maxBodyLength: -1,
  86109. env: {
  86110. FormData: platform.classes.FormData,
  86111. Blob: platform.classes.Blob
  86112. },
  86113. validateStatus: function validateStatus(status) {
  86114. return status >= 200 && status < 300;
  86115. },
  86116. headers: {
  86117. common: {
  86118. "Accept": "application/json, text/plain, */*",
  86119. "Content-Type": void 0
  86120. }
  86121. }
  86122. };
  86123. utils$1.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => {
  86124. defaults.headers[method] = {};
  86125. });
  86126. const defaults$1 = defaults;
  86127. const ignoreDuplicateOf = utils$1.toObjectSet([
  86128. "age",
  86129. "authorization",
  86130. "content-length",
  86131. "content-type",
  86132. "etag",
  86133. "expires",
  86134. "from",
  86135. "host",
  86136. "if-modified-since",
  86137. "if-unmodified-since",
  86138. "last-modified",
  86139. "location",
  86140. "max-forwards",
  86141. "proxy-authorization",
  86142. "referer",
  86143. "retry-after",
  86144. "user-agent"
  86145. ]);
  86146. const parseHeaders = (rawHeaders) => {
  86147. const parsed = {};
  86148. let key;
  86149. let val;
  86150. let i2;
  86151. rawHeaders && rawHeaders.split("\n").forEach(function parser(line) {
  86152. i2 = line.indexOf(":");
  86153. key = line.substring(0, i2).trim().toLowerCase();
  86154. val = line.substring(i2 + 1).trim();
  86155. if (!key || parsed[key] && ignoreDuplicateOf[key]) {
  86156. return;
  86157. }
  86158. if (key === "set-cookie") {
  86159. if (parsed[key]) {
  86160. parsed[key].push(val);
  86161. } else {
  86162. parsed[key] = [val];
  86163. }
  86164. } else {
  86165. parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
  86166. }
  86167. });
  86168. return parsed;
  86169. };
  86170. const $internals = Symbol("internals");
  86171. function normalizeHeader(header) {
  86172. return header && String(header).trim().toLowerCase();
  86173. }
  86174. function normalizeValue(value) {
  86175. if (value === false || value == null) {
  86176. return value;
  86177. }
  86178. return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
  86179. }
  86180. function parseTokens(str) {
  86181. const tokens = /* @__PURE__ */ Object.create(null);
  86182. const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
  86183. let match;
  86184. while (match = tokensRE.exec(str)) {
  86185. tokens[match[1]] = match[2];
  86186. }
  86187. return tokens;
  86188. }
  86189. const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
  86190. function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
  86191. if (utils$1.isFunction(filter)) {
  86192. return filter.call(this, value, header);
  86193. }
  86194. if (isHeaderNameFilter) {
  86195. value = header;
  86196. }
  86197. if (!utils$1.isString(value))
  86198. return;
  86199. if (utils$1.isString(filter)) {
  86200. return value.indexOf(filter) !== -1;
  86201. }
  86202. if (utils$1.isRegExp(filter)) {
  86203. return filter.test(value);
  86204. }
  86205. }
  86206. function formatHeader(header) {
  86207. return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w2, char, str) => {
  86208. return char.toUpperCase() + str;
  86209. });
  86210. }
  86211. function buildAccessors(obj, header) {
  86212. const accessorName = utils$1.toCamelCase(" " + header);
  86213. ["get", "set", "has"].forEach((methodName) => {
  86214. Object.defineProperty(obj, methodName + accessorName, {
  86215. value: function(arg1, arg2, arg3) {
  86216. return this[methodName].call(this, header, arg1, arg2, arg3);
  86217. },
  86218. configurable: true
  86219. });
  86220. });
  86221. }
  86222. class AxiosHeaders {
  86223. constructor(headers) {
  86224. headers && this.set(headers);
  86225. }
  86226. set(header, valueOrRewrite, rewrite) {
  86227. const self2 = this;
  86228. function setHeader(_value, _header, _rewrite) {
  86229. const lHeader = normalizeHeader(_header);
  86230. if (!lHeader) {
  86231. throw new Error("header name must be a non-empty string");
  86232. }
  86233. const key = utils$1.findKey(self2, lHeader);
  86234. if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
  86235. self2[key || _header] = normalizeValue(_value);
  86236. }
  86237. }
  86238. const setHeaders = (headers, _rewrite) => utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
  86239. if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
  86240. setHeaders(header, valueOrRewrite);
  86241. } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
  86242. setHeaders(parseHeaders(header), valueOrRewrite);
  86243. } else if (utils$1.isHeaders(header)) {
  86244. for (const [key, value] of header.entries()) {
  86245. setHeader(value, key, rewrite);
  86246. }
  86247. } else {
  86248. header != null && setHeader(valueOrRewrite, header, rewrite);
  86249. }
  86250. return this;
  86251. }
  86252. get(header, parser) {
  86253. header = normalizeHeader(header);
  86254. if (header) {
  86255. const key = utils$1.findKey(this, header);
  86256. if (key) {
  86257. const value = this[key];
  86258. if (!parser) {
  86259. return value;
  86260. }
  86261. if (parser === true) {
  86262. return parseTokens(value);
  86263. }
  86264. if (utils$1.isFunction(parser)) {
  86265. return parser.call(this, value, key);
  86266. }
  86267. if (utils$1.isRegExp(parser)) {
  86268. return parser.exec(value);
  86269. }
  86270. throw new TypeError("parser must be boolean|regexp|function");
  86271. }
  86272. }
  86273. }
  86274. has(header, matcher) {
  86275. header = normalizeHeader(header);
  86276. if (header) {
  86277. const key = utils$1.findKey(this, header);
  86278. return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
  86279. }
  86280. return false;
  86281. }
  86282. delete(header, matcher) {
  86283. const self2 = this;
  86284. let deleted = false;
  86285. function deleteHeader(_header) {
  86286. _header = normalizeHeader(_header);
  86287. if (_header) {
  86288. const key = utils$1.findKey(self2, _header);
  86289. if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) {
  86290. delete self2[key];
  86291. deleted = true;
  86292. }
  86293. }
  86294. }
  86295. if (utils$1.isArray(header)) {
  86296. header.forEach(deleteHeader);
  86297. } else {
  86298. deleteHeader(header);
  86299. }
  86300. return deleted;
  86301. }
  86302. clear(matcher) {
  86303. const keys = Object.keys(this);
  86304. let i2 = keys.length;
  86305. let deleted = false;
  86306. while (i2--) {
  86307. const key = keys[i2];
  86308. if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
  86309. delete this[key];
  86310. deleted = true;
  86311. }
  86312. }
  86313. return deleted;
  86314. }
  86315. normalize(format2) {
  86316. const self2 = this;
  86317. const headers = {};
  86318. utils$1.forEach(this, (value, header) => {
  86319. const key = utils$1.findKey(headers, header);
  86320. if (key) {
  86321. self2[key] = normalizeValue(value);
  86322. delete self2[header];
  86323. return;
  86324. }
  86325. const normalized = format2 ? formatHeader(header) : String(header).trim();
  86326. if (normalized !== header) {
  86327. delete self2[header];
  86328. }
  86329. self2[normalized] = normalizeValue(value);
  86330. headers[normalized] = true;
  86331. });
  86332. return this;
  86333. }
  86334. concat(...targets) {
  86335. return this.constructor.concat(this, ...targets);
  86336. }
  86337. toJSON(asStrings) {
  86338. const obj = /* @__PURE__ */ Object.create(null);
  86339. utils$1.forEach(this, (value, header) => {
  86340. value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(", ") : value);
  86341. });
  86342. return obj;
  86343. }
  86344. [Symbol.iterator]() {
  86345. return Object.entries(this.toJSON())[Symbol.iterator]();
  86346. }
  86347. toString() {
  86348. return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
  86349. }
  86350. get [Symbol.toStringTag]() {
  86351. return "AxiosHeaders";
  86352. }
  86353. static from(thing) {
  86354. return thing instanceof this ? thing : new this(thing);
  86355. }
  86356. static concat(first, ...targets) {
  86357. const computed = new this(first);
  86358. targets.forEach((target) => computed.set(target));
  86359. return computed;
  86360. }
  86361. static accessor(header) {
  86362. const internals = this[$internals] = this[$internals] = {
  86363. accessors: {}
  86364. };
  86365. const accessors = internals.accessors;
  86366. const prototype2 = this.prototype;
  86367. function defineAccessor(_header) {
  86368. const lHeader = normalizeHeader(_header);
  86369. if (!accessors[lHeader]) {
  86370. buildAccessors(prototype2, _header);
  86371. accessors[lHeader] = true;
  86372. }
  86373. }
  86374. utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
  86375. return this;
  86376. }
  86377. }
  86378. AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
  86379. utils$1.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
  86380. let mapped = key[0].toUpperCase() + key.slice(1);
  86381. return {
  86382. get: () => value,
  86383. set(headerValue) {
  86384. this[mapped] = headerValue;
  86385. }
  86386. };
  86387. });
  86388. utils$1.freezeMethods(AxiosHeaders);
  86389. const AxiosHeaders$1 = AxiosHeaders;
  86390. function transformData(fns, response) {
  86391. const config2 = this || defaults$1;
  86392. const context = response || config2;
  86393. const headers = AxiosHeaders$1.from(context.headers);
  86394. let data = context.data;
  86395. utils$1.forEach(fns, function transform(fn) {
  86396. data = fn.call(config2, data, headers.normalize(), response ? response.status : void 0);
  86397. });
  86398. headers.normalize();
  86399. return data;
  86400. }
  86401. function isCancel(value) {
  86402. return !!(value && value.__CANCEL__);
  86403. }
  86404. function CanceledError(message, config2, request2) {
  86405. AxiosError.call(this, message == null ? "canceled" : message, AxiosError.ERR_CANCELED, config2, request2);
  86406. this.name = "CanceledError";
  86407. }
  86408. utils$1.inherits(CanceledError, AxiosError, {
  86409. __CANCEL__: true
  86410. });
  86411. function settle(resolve, reject, response) {
  86412. const validateStatus = response.config.validateStatus;
  86413. if (!response.status || !validateStatus || validateStatus(response.status)) {
  86414. resolve(response);
  86415. } else {
  86416. reject(new AxiosError(
  86417. "Request failed with status code " + response.status,
  86418. [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
  86419. response.config,
  86420. response.request,
  86421. response
  86422. ));
  86423. }
  86424. }
  86425. function parseProtocol(url2) {
  86426. const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url2);
  86427. return match && match[1] || "";
  86428. }
  86429. function speedometer(samplesCount, min) {
  86430. samplesCount = samplesCount || 10;
  86431. const bytes = new Array(samplesCount);
  86432. const timestamps = new Array(samplesCount);
  86433. let head = 0;
  86434. let tail = 0;
  86435. let firstSampleTS;
  86436. min = min !== void 0 ? min : 1e3;
  86437. return function push(chunkLength) {
  86438. const now2 = Date.now();
  86439. const startedAt = timestamps[tail];
  86440. if (!firstSampleTS) {
  86441. firstSampleTS = now2;
  86442. }
  86443. bytes[head] = chunkLength;
  86444. timestamps[head] = now2;
  86445. let i2 = tail;
  86446. let bytesCount = 0;
  86447. while (i2 !== head) {
  86448. bytesCount += bytes[i2++];
  86449. i2 = i2 % samplesCount;
  86450. }
  86451. head = (head + 1) % samplesCount;
  86452. if (head === tail) {
  86453. tail = (tail + 1) % samplesCount;
  86454. }
  86455. if (now2 - firstSampleTS < min) {
  86456. return;
  86457. }
  86458. const passed = startedAt && now2 - startedAt;
  86459. return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;
  86460. };
  86461. }
  86462. function throttle(fn, freq) {
  86463. let timestamp = 0;
  86464. let threshold = 1e3 / freq;
  86465. let lastArgs;
  86466. let timer2;
  86467. const invoke = (args, now2 = Date.now()) => {
  86468. timestamp = now2;
  86469. lastArgs = null;
  86470. if (timer2) {
  86471. clearTimeout(timer2);
  86472. timer2 = null;
  86473. }
  86474. fn.apply(null, args);
  86475. };
  86476. const throttled = (...args) => {
  86477. const now2 = Date.now();
  86478. const passed = now2 - timestamp;
  86479. if (passed >= threshold) {
  86480. invoke(args, now2);
  86481. } else {
  86482. lastArgs = args;
  86483. if (!timer2) {
  86484. timer2 = setTimeout(() => {
  86485. timer2 = null;
  86486. invoke(lastArgs);
  86487. }, threshold - passed);
  86488. }
  86489. }
  86490. };
  86491. const flush = () => lastArgs && invoke(lastArgs);
  86492. return [throttled, flush];
  86493. }
  86494. const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
  86495. let bytesNotified = 0;
  86496. const _speedometer = speedometer(50, 250);
  86497. return throttle((e2) => {
  86498. const loaded = e2.loaded;
  86499. const total = e2.lengthComputable ? e2.total : void 0;
  86500. const progressBytes = loaded - bytesNotified;
  86501. const rate = _speedometer(progressBytes);
  86502. const inRange = loaded <= total;
  86503. bytesNotified = loaded;
  86504. const data = {
  86505. loaded,
  86506. total,
  86507. progress: total ? loaded / total : void 0,
  86508. bytes: progressBytes,
  86509. rate: rate ? rate : void 0,
  86510. estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
  86511. event: e2,
  86512. lengthComputable: total != null,
  86513. [isDownloadStream ? "download" : "upload"]: true
  86514. };
  86515. listener(data);
  86516. }, freq);
  86517. };
  86518. const progressEventDecorator = (total, throttled) => {
  86519. const lengthComputable = total != null;
  86520. return [(loaded) => throttled[0]({
  86521. lengthComputable,
  86522. total,
  86523. loaded
  86524. }), throttled[1]];
  86525. };
  86526. const asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));
  86527. const isURLSameOrigin = platform.hasStandardBrowserEnv ? (
  86528. // Standard browser envs have full support of the APIs needed to test
  86529. // whether the request URL is of the same origin as current location.
  86530. function standardBrowserEnv() {
  86531. const msie = platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent);
  86532. const urlParsingNode = document.createElement("a");
  86533. let originURL;
  86534. function resolveURL(url2) {
  86535. let href = url2;
  86536. if (msie) {
  86537. urlParsingNode.setAttribute("href", href);
  86538. href = urlParsingNode.href;
  86539. }
  86540. urlParsingNode.setAttribute("href", href);
  86541. return {
  86542. href: urlParsingNode.href,
  86543. protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, "") : "",
  86544. host: urlParsingNode.host,
  86545. search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, "") : "",
  86546. hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, "") : "",
  86547. hostname: urlParsingNode.hostname,
  86548. port: urlParsingNode.port,
  86549. pathname: urlParsingNode.pathname.charAt(0) === "/" ? urlParsingNode.pathname : "/" + urlParsingNode.pathname
  86550. };
  86551. }
  86552. originURL = resolveURL(window.location.href);
  86553. return function isURLSameOrigin2(requestURL) {
  86554. const parsed = utils$1.isString(requestURL) ? resolveURL(requestURL) : requestURL;
  86555. return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
  86556. };
  86557. }()
  86558. ) : (
  86559. // Non standard browser envs (web workers, react-native) lack needed support.
  86560. /* @__PURE__ */ function nonStandardBrowserEnv() {
  86561. return function isURLSameOrigin2() {
  86562. return true;
  86563. };
  86564. }()
  86565. );
  86566. const cookies = platform.hasStandardBrowserEnv ? (
  86567. // Standard browser envs support document.cookie
  86568. {
  86569. write(name2, value, expires, path, domain, secure) {
  86570. const cookie = [name2 + "=" + encodeURIComponent(value)];
  86571. utils$1.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString());
  86572. utils$1.isString(path) && cookie.push("path=" + path);
  86573. utils$1.isString(domain) && cookie.push("domain=" + domain);
  86574. secure === true && cookie.push("secure");
  86575. document.cookie = cookie.join("; ");
  86576. },
  86577. read(name2) {
  86578. const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name2 + ")=([^;]*)"));
  86579. return match ? decodeURIComponent(match[3]) : null;
  86580. },
  86581. remove(name2) {
  86582. this.write(name2, "", Date.now() - 864e5);
  86583. }
  86584. }
  86585. ) : (
  86586. // Non-standard browser env (web workers, react-native) lack needed support.
  86587. {
  86588. write() {
  86589. },
  86590. read() {
  86591. return null;
  86592. },
  86593. remove() {
  86594. }
  86595. }
  86596. );
  86597. function isAbsoluteURL(url2) {
  86598. return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
  86599. }
  86600. function combineURLs(baseURL, relativeURL) {
  86601. return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
  86602. }
  86603. function buildFullPath(baseURL, requestedURL) {
  86604. if (baseURL && !isAbsoluteURL(requestedURL)) {
  86605. return combineURLs(baseURL, requestedURL);
  86606. }
  86607. return requestedURL;
  86608. }
  86609. const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
  86610. function mergeConfig(config1, config2) {
  86611. config2 = config2 || {};
  86612. const config3 = {};
  86613. function getMergedValue(target, source, caseless) {
  86614. if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
  86615. return utils$1.merge.call({ caseless }, target, source);
  86616. } else if (utils$1.isPlainObject(source)) {
  86617. return utils$1.merge({}, source);
  86618. } else if (utils$1.isArray(source)) {
  86619. return source.slice();
  86620. }
  86621. return source;
  86622. }
  86623. function mergeDeepProperties(a2, b2, caseless) {
  86624. if (!utils$1.isUndefined(b2)) {
  86625. return getMergedValue(a2, b2, caseless);
  86626. } else if (!utils$1.isUndefined(a2)) {
  86627. return getMergedValue(void 0, a2, caseless);
  86628. }
  86629. }
  86630. function valueFromConfig2(a2, b2) {
  86631. if (!utils$1.isUndefined(b2)) {
  86632. return getMergedValue(void 0, b2);
  86633. }
  86634. }
  86635. function defaultToConfig2(a2, b2) {
  86636. if (!utils$1.isUndefined(b2)) {
  86637. return getMergedValue(void 0, b2);
  86638. } else if (!utils$1.isUndefined(a2)) {
  86639. return getMergedValue(void 0, a2);
  86640. }
  86641. }
  86642. function mergeDirectKeys(a2, b2, prop) {
  86643. if (prop in config2) {
  86644. return getMergedValue(a2, b2);
  86645. } else if (prop in config1) {
  86646. return getMergedValue(void 0, a2);
  86647. }
  86648. }
  86649. const mergeMap = {
  86650. url: valueFromConfig2,
  86651. method: valueFromConfig2,
  86652. data: valueFromConfig2,
  86653. baseURL: defaultToConfig2,
  86654. transformRequest: defaultToConfig2,
  86655. transformResponse: defaultToConfig2,
  86656. paramsSerializer: defaultToConfig2,
  86657. timeout: defaultToConfig2,
  86658. timeoutMessage: defaultToConfig2,
  86659. withCredentials: defaultToConfig2,
  86660. withXSRFToken: defaultToConfig2,
  86661. adapter: defaultToConfig2,
  86662. responseType: defaultToConfig2,
  86663. xsrfCookieName: defaultToConfig2,
  86664. xsrfHeaderName: defaultToConfig2,
  86665. onUploadProgress: defaultToConfig2,
  86666. onDownloadProgress: defaultToConfig2,
  86667. decompress: defaultToConfig2,
  86668. maxContentLength: defaultToConfig2,
  86669. maxBodyLength: defaultToConfig2,
  86670. beforeRedirect: defaultToConfig2,
  86671. transport: defaultToConfig2,
  86672. httpAgent: defaultToConfig2,
  86673. httpsAgent: defaultToConfig2,
  86674. cancelToken: defaultToConfig2,
  86675. socketPath: defaultToConfig2,
  86676. responseEncoding: defaultToConfig2,
  86677. validateStatus: mergeDirectKeys,
  86678. headers: (a2, b2) => mergeDeepProperties(headersToObject(a2), headersToObject(b2), true)
  86679. };
  86680. utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
  86681. const merge2 = mergeMap[prop] || mergeDeepProperties;
  86682. const configValue = merge2(config1[prop], config2[prop], prop);
  86683. utils$1.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config3[prop] = configValue);
  86684. });
  86685. return config3;
  86686. }
  86687. const resolveConfig = (config2) => {
  86688. const newConfig = mergeConfig({}, config2);
  86689. let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
  86690. newConfig.headers = headers = AxiosHeaders$1.from(headers);
  86691. newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config2.params, config2.paramsSerializer);
  86692. if (auth) {
  86693. headers.set(
  86694. "Authorization",
  86695. "Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : ""))
  86696. );
  86697. }
  86698. let contentType;
  86699. if (utils$1.isFormData(data)) {
  86700. if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
  86701. headers.setContentType(void 0);
  86702. } else if ((contentType = headers.getContentType()) !== false) {
  86703. const [type, ...tokens] = contentType ? contentType.split(";").map((token) => token.trim()).filter(Boolean) : [];
  86704. headers.setContentType([type || "multipart/form-data", ...tokens].join("; "));
  86705. }
  86706. }
  86707. if (platform.hasStandardBrowserEnv) {
  86708. withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
  86709. if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin(newConfig.url)) {
  86710. const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
  86711. if (xsrfValue) {
  86712. headers.set(xsrfHeaderName, xsrfValue);
  86713. }
  86714. }
  86715. }
  86716. return newConfig;
  86717. };
  86718. const isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
  86719. const xhrAdapter = isXHRAdapterSupported && function(config2) {
  86720. return new Promise(function dispatchXhrRequest(resolve, reject) {
  86721. const _config = resolveConfig(config2);
  86722. let requestData = _config.data;
  86723. const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
  86724. let { responseType, onUploadProgress, onDownloadProgress } = _config;
  86725. let onCanceled;
  86726. let uploadThrottled, downloadThrottled;
  86727. let flushUpload, flushDownload;
  86728. function done() {
  86729. flushUpload && flushUpload();
  86730. flushDownload && flushDownload();
  86731. _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
  86732. _config.signal && _config.signal.removeEventListener("abort", onCanceled);
  86733. }
  86734. let request2 = new XMLHttpRequest();
  86735. request2.open(_config.method.toUpperCase(), _config.url, true);
  86736. request2.timeout = _config.timeout;
  86737. function onloadend() {
  86738. if (!request2) {
  86739. return;
  86740. }
  86741. const responseHeaders = AxiosHeaders$1.from(
  86742. "getAllResponseHeaders" in request2 && request2.getAllResponseHeaders()
  86743. );
  86744. const responseData = !responseType || responseType === "text" || responseType === "json" ? request2.responseText : request2.response;
  86745. const response = {
  86746. data: responseData,
  86747. status: request2.status,
  86748. statusText: request2.statusText,
  86749. headers: responseHeaders,
  86750. config: config2,
  86751. request: request2
  86752. };
  86753. settle(function _resolve(value) {
  86754. resolve(value);
  86755. done();
  86756. }, function _reject(err) {
  86757. reject(err);
  86758. done();
  86759. }, response);
  86760. request2 = null;
  86761. }
  86762. if ("onloadend" in request2) {
  86763. request2.onloadend = onloadend;
  86764. } else {
  86765. request2.onreadystatechange = function handleLoad() {
  86766. if (!request2 || request2.readyState !== 4) {
  86767. return;
  86768. }
  86769. if (request2.status === 0 && !(request2.responseURL && request2.responseURL.indexOf("file:") === 0)) {
  86770. return;
  86771. }
  86772. setTimeout(onloadend);
  86773. };
  86774. }
  86775. request2.onabort = function handleAbort() {
  86776. if (!request2) {
  86777. return;
  86778. }
  86779. reject(new AxiosError("Request aborted", AxiosError.ECONNABORTED, config2, request2));
  86780. request2 = null;
  86781. };
  86782. request2.onerror = function handleError() {
  86783. reject(new AxiosError("Network Error", AxiosError.ERR_NETWORK, config2, request2));
  86784. request2 = null;
  86785. };
  86786. request2.ontimeout = function handleTimeout() {
  86787. let timeoutErrorMessage = _config.timeout ? "timeout of " + _config.timeout + "ms exceeded" : "timeout exceeded";
  86788. const transitional = _config.transitional || transitionalDefaults;
  86789. if (_config.timeoutErrorMessage) {
  86790. timeoutErrorMessage = _config.timeoutErrorMessage;
  86791. }
  86792. reject(new AxiosError(
  86793. timeoutErrorMessage,
  86794. transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
  86795. config2,
  86796. request2
  86797. ));
  86798. request2 = null;
  86799. };
  86800. requestData === void 0 && requestHeaders.setContentType(null);
  86801. if ("setRequestHeader" in request2) {
  86802. utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
  86803. request2.setRequestHeader(key, val);
  86804. });
  86805. }
  86806. if (!utils$1.isUndefined(_config.withCredentials)) {
  86807. request2.withCredentials = !!_config.withCredentials;
  86808. }
  86809. if (responseType && responseType !== "json") {
  86810. request2.responseType = _config.responseType;
  86811. }
  86812. if (onDownloadProgress) {
  86813. [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
  86814. request2.addEventListener("progress", downloadThrottled);
  86815. }
  86816. if (onUploadProgress && request2.upload) {
  86817. [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);
  86818. request2.upload.addEventListener("progress", uploadThrottled);
  86819. request2.upload.addEventListener("loadend", flushUpload);
  86820. }
  86821. if (_config.cancelToken || _config.signal) {
  86822. onCanceled = (cancel) => {
  86823. if (!request2) {
  86824. return;
  86825. }
  86826. reject(!cancel || cancel.type ? new CanceledError(null, config2, request2) : cancel);
  86827. request2.abort();
  86828. request2 = null;
  86829. };
  86830. _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
  86831. if (_config.signal) {
  86832. _config.signal.aborted ? onCanceled() : _config.signal.addEventListener("abort", onCanceled);
  86833. }
  86834. }
  86835. const protocol = parseProtocol(_config.url);
  86836. if (protocol && platform.protocols.indexOf(protocol) === -1) {
  86837. reject(new AxiosError("Unsupported protocol " + protocol + ":", AxiosError.ERR_BAD_REQUEST, config2));
  86838. return;
  86839. }
  86840. request2.send(requestData || null);
  86841. });
  86842. };
  86843. const composeSignals = (signals, timeout) => {
  86844. const { length } = signals = signals ? signals.filter(Boolean) : [];
  86845. if (timeout || length) {
  86846. let controller = new AbortController();
  86847. let aborted;
  86848. const onabort = function(reason) {
  86849. if (!aborted) {
  86850. aborted = true;
  86851. unsubscribe();
  86852. const err = reason instanceof Error ? reason : this.reason;
  86853. controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
  86854. }
  86855. };
  86856. let timer2 = timeout && setTimeout(() => {
  86857. timer2 = null;
  86858. onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT));
  86859. }, timeout);
  86860. const unsubscribe = () => {
  86861. if (signals) {
  86862. timer2 && clearTimeout(timer2);
  86863. timer2 = null;
  86864. signals.forEach((signal2) => {
  86865. signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener("abort", onabort);
  86866. });
  86867. signals = null;
  86868. }
  86869. };
  86870. signals.forEach((signal2) => signal2.addEventListener("abort", onabort));
  86871. const { signal } = controller;
  86872. signal.unsubscribe = () => utils$1.asap(unsubscribe);
  86873. return signal;
  86874. }
  86875. };
  86876. const composeSignals$1 = composeSignals;
  86877. const streamChunk = function* (chunk, chunkSize) {
  86878. let len = chunk.byteLength;
  86879. if (!chunkSize || len < chunkSize) {
  86880. yield chunk;
  86881. return;
  86882. }
  86883. let pos = 0;
  86884. let end;
  86885. while (pos < len) {
  86886. end = pos + chunkSize;
  86887. yield chunk.slice(pos, end);
  86888. pos = end;
  86889. }
  86890. };
  86891. const readBytes = async function* (iterable, chunkSize) {
  86892. for await (const chunk of readStream(iterable)) {
  86893. yield* streamChunk(chunk, chunkSize);
  86894. }
  86895. };
  86896. const readStream = async function* (stream) {
  86897. if (stream[Symbol.asyncIterator]) {
  86898. yield* stream;
  86899. return;
  86900. }
  86901. const reader = stream.getReader();
  86902. try {
  86903. for (; ; ) {
  86904. const { done, value } = await reader.read();
  86905. if (done) {
  86906. break;
  86907. }
  86908. yield value;
  86909. }
  86910. } finally {
  86911. await reader.cancel();
  86912. }
  86913. };
  86914. const trackStream = (stream, chunkSize, onProgress, onFinish) => {
  86915. const iterator = readBytes(stream, chunkSize);
  86916. let bytes = 0;
  86917. let done;
  86918. let _onFinish = (e2) => {
  86919. if (!done) {
  86920. done = true;
  86921. onFinish && onFinish(e2);
  86922. }
  86923. };
  86924. return new ReadableStream({
  86925. async pull(controller) {
  86926. try {
  86927. const { done: done2, value } = await iterator.next();
  86928. if (done2) {
  86929. _onFinish();
  86930. controller.close();
  86931. return;
  86932. }
  86933. let len = value.byteLength;
  86934. if (onProgress) {
  86935. let loadedBytes = bytes += len;
  86936. onProgress(loadedBytes);
  86937. }
  86938. controller.enqueue(new Uint8Array(value));
  86939. } catch (err) {
  86940. _onFinish(err);
  86941. throw err;
  86942. }
  86943. },
  86944. cancel(reason) {
  86945. _onFinish(reason);
  86946. return iterator.return();
  86947. }
  86948. }, {
  86949. highWaterMark: 2
  86950. });
  86951. };
  86952. const isFetchSupported = typeof fetch === "function" && typeof Request === "function" && typeof Response === "function";
  86953. const isReadableStreamSupported = isFetchSupported && typeof ReadableStream === "function";
  86954. const encodeText = isFetchSupported && (typeof TextEncoder === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Response(str).arrayBuffer()));
  86955. const test = (fn, ...args) => {
  86956. try {
  86957. return !!fn(...args);
  86958. } catch (e2) {
  86959. return false;
  86960. }
  86961. };
  86962. const supportsRequestStream = isReadableStreamSupported && test(() => {
  86963. let duplexAccessed = false;
  86964. const hasContentType = new Request(platform.origin, {
  86965. body: new ReadableStream(),
  86966. method: "POST",
  86967. get duplex() {
  86968. duplexAccessed = true;
  86969. return "half";
  86970. }
  86971. }).headers.has("Content-Type");
  86972. return duplexAccessed && !hasContentType;
  86973. });
  86974. const DEFAULT_CHUNK_SIZE = 64 * 1024;
  86975. const supportsResponseStream = isReadableStreamSupported && test(() => utils$1.isReadableStream(new Response("").body));
  86976. const resolvers = {
  86977. stream: supportsResponseStream && ((res) => res.body)
  86978. };
  86979. isFetchSupported && ((res) => {
  86980. ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => {
  86981. !resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? (res2) => res2[type]() : (_2, config2) => {
  86982. throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config2);
  86983. });
  86984. });
  86985. })(new Response());
  86986. const getBodyLength = async (body) => {
  86987. if (body == null) {
  86988. return 0;
  86989. }
  86990. if (utils$1.isBlob(body)) {
  86991. return body.size;
  86992. }
  86993. if (utils$1.isSpecCompliantForm(body)) {
  86994. const _request = new Request(platform.origin, {
  86995. method: "POST",
  86996. body
  86997. });
  86998. return (await _request.arrayBuffer()).byteLength;
  86999. }
  87000. if (utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
  87001. return body.byteLength;
  87002. }
  87003. if (utils$1.isURLSearchParams(body)) {
  87004. body = body + "";
  87005. }
  87006. if (utils$1.isString(body)) {
  87007. return (await encodeText(body)).byteLength;
  87008. }
  87009. };
  87010. const resolveBodyLength = async (headers, body) => {
  87011. const length = utils$1.toFiniteNumber(headers.getContentLength());
  87012. return length == null ? getBodyLength(body) : length;
  87013. };
  87014. const fetchAdapter = isFetchSupported && (async (config2) => {
  87015. let {
  87016. url: url2,
  87017. method,
  87018. data,
  87019. signal,
  87020. cancelToken,
  87021. timeout,
  87022. onDownloadProgress,
  87023. onUploadProgress,
  87024. responseType,
  87025. headers,
  87026. withCredentials = "same-origin",
  87027. fetchOptions
  87028. } = resolveConfig(config2);
  87029. responseType = responseType ? (responseType + "").toLowerCase() : "text";
  87030. let composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
  87031. let request2;
  87032. const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
  87033. composedSignal.unsubscribe();
  87034. });
  87035. let requestContentLength;
  87036. try {
  87037. if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
  87038. let _request = new Request(url2, {
  87039. method: "POST",
  87040. body: data,
  87041. duplex: "half"
  87042. });
  87043. let contentTypeHeader;
  87044. if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
  87045. headers.setContentType(contentTypeHeader);
  87046. }
  87047. if (_request.body) {
  87048. const [onProgress, flush] = progressEventDecorator(
  87049. requestContentLength,
  87050. progressEventReducer(asyncDecorator(onUploadProgress))
  87051. );
  87052. data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
  87053. }
  87054. }
  87055. if (!utils$1.isString(withCredentials)) {
  87056. withCredentials = withCredentials ? "include" : "omit";
  87057. }
  87058. const isCredentialsSupported = "credentials" in Request.prototype;
  87059. request2 = new Request(url2, {
  87060. ...fetchOptions,
  87061. signal: composedSignal,
  87062. method: method.toUpperCase(),
  87063. headers: headers.normalize().toJSON(),
  87064. body: data,
  87065. duplex: "half",
  87066. credentials: isCredentialsSupported ? withCredentials : void 0
  87067. });
  87068. let response = await fetch(request2);
  87069. const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
  87070. if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
  87071. const options2 = {};
  87072. ["status", "statusText", "headers"].forEach((prop) => {
  87073. options2[prop] = response[prop];
  87074. });
  87075. const responseContentLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
  87076. const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
  87077. responseContentLength,
  87078. progressEventReducer(asyncDecorator(onDownloadProgress), true)
  87079. ) || [];
  87080. response = new Response(
  87081. trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
  87082. flush && flush();
  87083. unsubscribe && unsubscribe();
  87084. }),
  87085. options2
  87086. );
  87087. }
  87088. responseType = responseType || "text";
  87089. let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || "text"](response, config2);
  87090. !isStreamResponse && unsubscribe && unsubscribe();
  87091. return await new Promise((resolve, reject) => {
  87092. settle(resolve, reject, {
  87093. data: responseData,
  87094. headers: AxiosHeaders$1.from(response.headers),
  87095. status: response.status,
  87096. statusText: response.statusText,
  87097. config: config2,
  87098. request: request2
  87099. });
  87100. });
  87101. } catch (err) {
  87102. unsubscribe && unsubscribe();
  87103. if (err && err.name === "TypeError" && /fetch/i.test(err.message)) {
  87104. throw Object.assign(
  87105. new AxiosError("Network Error", AxiosError.ERR_NETWORK, config2, request2),
  87106. {
  87107. cause: err.cause || err
  87108. }
  87109. );
  87110. }
  87111. throw AxiosError.from(err, err && err.code, config2, request2);
  87112. }
  87113. });
  87114. const knownAdapters = {
  87115. http: httpAdapter,
  87116. xhr: xhrAdapter,
  87117. fetch: fetchAdapter
  87118. };
  87119. utils$1.forEach(knownAdapters, (fn, value) => {
  87120. if (fn) {
  87121. try {
  87122. Object.defineProperty(fn, "name", { value });
  87123. } catch (e2) {
  87124. }
  87125. Object.defineProperty(fn, "adapterName", { value });
  87126. }
  87127. });
  87128. const renderReason = (reason) => `- ${reason}`;
  87129. const isResolvedHandle = (adapter2) => utils$1.isFunction(adapter2) || adapter2 === null || adapter2 === false;
  87130. const adapters = {
  87131. getAdapter: (adapters2) => {
  87132. adapters2 = utils$1.isArray(adapters2) ? adapters2 : [adapters2];
  87133. const { length } = adapters2;
  87134. let nameOrAdapter;
  87135. let adapter2;
  87136. const rejectedReasons = {};
  87137. for (let i2 = 0; i2 < length; i2++) {
  87138. nameOrAdapter = adapters2[i2];
  87139. let id;
  87140. adapter2 = nameOrAdapter;
  87141. if (!isResolvedHandle(nameOrAdapter)) {
  87142. adapter2 = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
  87143. if (adapter2 === void 0) {
  87144. throw new AxiosError(`Unknown adapter '${id}'`);
  87145. }
  87146. }
  87147. if (adapter2) {
  87148. break;
  87149. }
  87150. rejectedReasons[id || "#" + i2] = adapter2;
  87151. }
  87152. if (!adapter2) {
  87153. const reasons = Object.entries(rejectedReasons).map(
  87154. ([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build")
  87155. );
  87156. let s2 = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
  87157. throw new AxiosError(
  87158. `There is no suitable adapter to dispatch the request ` + s2,
  87159. "ERR_NOT_SUPPORT"
  87160. );
  87161. }
  87162. return adapter2;
  87163. },
  87164. adapters: knownAdapters
  87165. };
  87166. function throwIfCancellationRequested(config2) {
  87167. if (config2.cancelToken) {
  87168. config2.cancelToken.throwIfRequested();
  87169. }
  87170. if (config2.signal && config2.signal.aborted) {
  87171. throw new CanceledError(null, config2);
  87172. }
  87173. }
  87174. function dispatchRequest(config2) {
  87175. throwIfCancellationRequested(config2);
  87176. config2.headers = AxiosHeaders$1.from(config2.headers);
  87177. config2.data = transformData.call(
  87178. config2,
  87179. config2.transformRequest
  87180. );
  87181. if (["post", "put", "patch"].indexOf(config2.method) !== -1) {
  87182. config2.headers.setContentType("application/x-www-form-urlencoded", false);
  87183. }
  87184. const adapter2 = adapters.getAdapter(config2.adapter || defaults$1.adapter);
  87185. return adapter2(config2).then(function onAdapterResolution(response) {
  87186. throwIfCancellationRequested(config2);
  87187. response.data = transformData.call(
  87188. config2,
  87189. config2.transformResponse,
  87190. response
  87191. );
  87192. response.headers = AxiosHeaders$1.from(response.headers);
  87193. return response;
  87194. }, function onAdapterRejection(reason) {
  87195. if (!isCancel(reason)) {
  87196. throwIfCancellationRequested(config2);
  87197. if (reason && reason.response) {
  87198. reason.response.data = transformData.call(
  87199. config2,
  87200. config2.transformResponse,
  87201. reason.response
  87202. );
  87203. reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
  87204. }
  87205. }
  87206. return Promise.reject(reason);
  87207. });
  87208. }
  87209. const VERSION = "1.7.7";
  87210. const validators$1 = {};
  87211. ["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i2) => {
  87212. validators$1[type] = function validator2(thing) {
  87213. return typeof thing === type || "a" + (i2 < 1 ? "n " : " ") + type;
  87214. };
  87215. });
  87216. const deprecatedWarnings = {};
  87217. validators$1.transitional = function transitional(validator2, version, message) {
  87218. function formatMessage2(opt, desc) {
  87219. return "[Axios v" + VERSION + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
  87220. }
  87221. return (value, opt, opts) => {
  87222. if (validator2 === false) {
  87223. throw new AxiosError(
  87224. formatMessage2(opt, " has been removed" + (version ? " in " + version : "")),
  87225. AxiosError.ERR_DEPRECATED
  87226. );
  87227. }
  87228. if (version && !deprecatedWarnings[opt]) {
  87229. deprecatedWarnings[opt] = true;
  87230. formatAppLog(
  87231. "warn",
  87232. "at node_modules/axios/lib/helpers/validator.js:43",
  87233. formatMessage2(
  87234. opt,
  87235. " has been deprecated since v" + version + " and will be removed in the near future"
  87236. )
  87237. );
  87238. }
  87239. return validator2 ? validator2(value, opt, opts) : true;
  87240. };
  87241. };
  87242. function assertOptions(options2, schema, allowUnknown) {
  87243. if (typeof options2 !== "object") {
  87244. throw new AxiosError("options must be an object", AxiosError.ERR_BAD_OPTION_VALUE);
  87245. }
  87246. const keys = Object.keys(options2);
  87247. let i2 = keys.length;
  87248. while (i2-- > 0) {
  87249. const opt = keys[i2];
  87250. const validator2 = schema[opt];
  87251. if (validator2) {
  87252. const value = options2[opt];
  87253. const result2 = value === void 0 || validator2(value, opt, options2);
  87254. if (result2 !== true) {
  87255. throw new AxiosError("option " + opt + " must be " + result2, AxiosError.ERR_BAD_OPTION_VALUE);
  87256. }
  87257. continue;
  87258. }
  87259. if (allowUnknown !== true) {
  87260. throw new AxiosError("Unknown option " + opt, AxiosError.ERR_BAD_OPTION);
  87261. }
  87262. }
  87263. }
  87264. const validator = {
  87265. assertOptions,
  87266. validators: validators$1
  87267. };
  87268. const validators = validator.validators;
  87269. class Axios {
  87270. constructor(instanceConfig) {
  87271. this.defaults = instanceConfig;
  87272. this.interceptors = {
  87273. request: new InterceptorManager(),
  87274. response: new InterceptorManager()
  87275. };
  87276. }
  87277. /**
  87278. * Dispatch a request
  87279. *
  87280. * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
  87281. * @param {?Object} config
  87282. *
  87283. * @returns {Promise} The Promise to be fulfilled
  87284. */
  87285. async request(configOrUrl, config2) {
  87286. try {
  87287. return await this._request(configOrUrl, config2);
  87288. } catch (err) {
  87289. if (err instanceof Error) {
  87290. let dummy;
  87291. Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : dummy = new Error();
  87292. const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : "";
  87293. try {
  87294. if (!err.stack) {
  87295. err.stack = stack;
  87296. } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) {
  87297. err.stack += "\n" + stack;
  87298. }
  87299. } catch (e2) {
  87300. }
  87301. }
  87302. throw err;
  87303. }
  87304. }
  87305. _request(configOrUrl, config2) {
  87306. if (typeof configOrUrl === "string") {
  87307. config2 = config2 || {};
  87308. config2.url = configOrUrl;
  87309. } else {
  87310. config2 = configOrUrl || {};
  87311. }
  87312. config2 = mergeConfig(this.defaults, config2);
  87313. const { transitional, paramsSerializer, headers } = config2;
  87314. if (transitional !== void 0) {
  87315. validator.assertOptions(transitional, {
  87316. silentJSONParsing: validators.transitional(validators.boolean),
  87317. forcedJSONParsing: validators.transitional(validators.boolean),
  87318. clarifyTimeoutError: validators.transitional(validators.boolean)
  87319. }, false);
  87320. }
  87321. if (paramsSerializer != null) {
  87322. if (utils$1.isFunction(paramsSerializer)) {
  87323. config2.paramsSerializer = {
  87324. serialize: paramsSerializer
  87325. };
  87326. } else {
  87327. validator.assertOptions(paramsSerializer, {
  87328. encode: validators.function,
  87329. serialize: validators.function
  87330. }, true);
  87331. }
  87332. }
  87333. config2.method = (config2.method || this.defaults.method || "get").toLowerCase();
  87334. let contextHeaders = headers && utils$1.merge(
  87335. headers.common,
  87336. headers[config2.method]
  87337. );
  87338. headers && utils$1.forEach(
  87339. ["delete", "get", "head", "post", "put", "patch", "common"],
  87340. (method) => {
  87341. delete headers[method];
  87342. }
  87343. );
  87344. config2.headers = AxiosHeaders$1.concat(contextHeaders, headers);
  87345. const requestInterceptorChain = [];
  87346. let synchronousRequestInterceptors = true;
  87347. this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
  87348. if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config2) === false) {
  87349. return;
  87350. }
  87351. synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
  87352. requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
  87353. });
  87354. const responseInterceptorChain = [];
  87355. this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
  87356. responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
  87357. });
  87358. let promise;
  87359. let i2 = 0;
  87360. let len;
  87361. if (!synchronousRequestInterceptors) {
  87362. const chain = [dispatchRequest.bind(this), void 0];
  87363. chain.unshift.apply(chain, requestInterceptorChain);
  87364. chain.push.apply(chain, responseInterceptorChain);
  87365. len = chain.length;
  87366. promise = Promise.resolve(config2);
  87367. while (i2 < len) {
  87368. promise = promise.then(chain[i2++], chain[i2++]);
  87369. }
  87370. return promise;
  87371. }
  87372. len = requestInterceptorChain.length;
  87373. let newConfig = config2;
  87374. i2 = 0;
  87375. while (i2 < len) {
  87376. const onFulfilled = requestInterceptorChain[i2++];
  87377. const onRejected = requestInterceptorChain[i2++];
  87378. try {
  87379. newConfig = onFulfilled(newConfig);
  87380. } catch (error2) {
  87381. onRejected.call(this, error2);
  87382. break;
  87383. }
  87384. }
  87385. try {
  87386. promise = dispatchRequest.call(this, newConfig);
  87387. } catch (error2) {
  87388. return Promise.reject(error2);
  87389. }
  87390. i2 = 0;
  87391. len = responseInterceptorChain.length;
  87392. while (i2 < len) {
  87393. promise = promise.then(responseInterceptorChain[i2++], responseInterceptorChain[i2++]);
  87394. }
  87395. return promise;
  87396. }
  87397. getUri(config2) {
  87398. config2 = mergeConfig(this.defaults, config2);
  87399. const fullPath = buildFullPath(config2.baseURL, config2.url);
  87400. return buildURL(fullPath, config2.params, config2.paramsSerializer);
  87401. }
  87402. }
  87403. utils$1.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
  87404. Axios.prototype[method] = function(url2, config2) {
  87405. return this.request(mergeConfig(config2 || {}, {
  87406. method,
  87407. url: url2,
  87408. data: (config2 || {}).data
  87409. }));
  87410. };
  87411. });
  87412. utils$1.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
  87413. function generateHTTPMethod(isForm) {
  87414. return function httpMethod(url2, data, config2) {
  87415. return this.request(mergeConfig(config2 || {}, {
  87416. method,
  87417. headers: isForm ? {
  87418. "Content-Type": "multipart/form-data"
  87419. } : {},
  87420. url: url2,
  87421. data
  87422. }));
  87423. };
  87424. }
  87425. Axios.prototype[method] = generateHTTPMethod();
  87426. Axios.prototype[method + "Form"] = generateHTTPMethod(true);
  87427. });
  87428. const Axios$1 = Axios;
  87429. class CancelToken {
  87430. constructor(executor) {
  87431. if (typeof executor !== "function") {
  87432. throw new TypeError("executor must be a function.");
  87433. }
  87434. let resolvePromise;
  87435. this.promise = new Promise(function promiseExecutor(resolve) {
  87436. resolvePromise = resolve;
  87437. });
  87438. const token = this;
  87439. this.promise.then((cancel) => {
  87440. if (!token._listeners)
  87441. return;
  87442. let i2 = token._listeners.length;
  87443. while (i2-- > 0) {
  87444. token._listeners[i2](cancel);
  87445. }
  87446. token._listeners = null;
  87447. });
  87448. this.promise.then = (onfulfilled) => {
  87449. let _resolve;
  87450. const promise = new Promise((resolve) => {
  87451. token.subscribe(resolve);
  87452. _resolve = resolve;
  87453. }).then(onfulfilled);
  87454. promise.cancel = function reject() {
  87455. token.unsubscribe(_resolve);
  87456. };
  87457. return promise;
  87458. };
  87459. executor(function cancel(message, config2, request2) {
  87460. if (token.reason) {
  87461. return;
  87462. }
  87463. token.reason = new CanceledError(message, config2, request2);
  87464. resolvePromise(token.reason);
  87465. });
  87466. }
  87467. /**
  87468. * Throws a `CanceledError` if cancellation has been requested.
  87469. */
  87470. throwIfRequested() {
  87471. if (this.reason) {
  87472. throw this.reason;
  87473. }
  87474. }
  87475. /**
  87476. * Subscribe to the cancel signal
  87477. */
  87478. subscribe(listener) {
  87479. if (this.reason) {
  87480. listener(this.reason);
  87481. return;
  87482. }
  87483. if (this._listeners) {
  87484. this._listeners.push(listener);
  87485. } else {
  87486. this._listeners = [listener];
  87487. }
  87488. }
  87489. /**
  87490. * Unsubscribe from the cancel signal
  87491. */
  87492. unsubscribe(listener) {
  87493. if (!this._listeners) {
  87494. return;
  87495. }
  87496. const index2 = this._listeners.indexOf(listener);
  87497. if (index2 !== -1) {
  87498. this._listeners.splice(index2, 1);
  87499. }
  87500. }
  87501. toAbortSignal() {
  87502. const controller = new AbortController();
  87503. const abort = (err) => {
  87504. controller.abort(err);
  87505. };
  87506. this.subscribe(abort);
  87507. controller.signal.unsubscribe = () => this.unsubscribe(abort);
  87508. return controller.signal;
  87509. }
  87510. /**
  87511. * Returns an object that contains a new `CancelToken` and a function that, when called,
  87512. * cancels the `CancelToken`.
  87513. */
  87514. static source() {
  87515. let cancel;
  87516. const token = new CancelToken(function executor(c2) {
  87517. cancel = c2;
  87518. });
  87519. return {
  87520. token,
  87521. cancel
  87522. };
  87523. }
  87524. }
  87525. const CancelToken$1 = CancelToken;
  87526. function spread(callback) {
  87527. return function wrap(arr) {
  87528. return callback.apply(null, arr);
  87529. };
  87530. }
  87531. function isAxiosError(payload) {
  87532. return utils$1.isObject(payload) && payload.isAxiosError === true;
  87533. }
  87534. const HttpStatusCode = {
  87535. Continue: 100,
  87536. SwitchingProtocols: 101,
  87537. Processing: 102,
  87538. EarlyHints: 103,
  87539. Ok: 200,
  87540. Created: 201,
  87541. Accepted: 202,
  87542. NonAuthoritativeInformation: 203,
  87543. NoContent: 204,
  87544. ResetContent: 205,
  87545. PartialContent: 206,
  87546. MultiStatus: 207,
  87547. AlreadyReported: 208,
  87548. ImUsed: 226,
  87549. MultipleChoices: 300,
  87550. MovedPermanently: 301,
  87551. Found: 302,
  87552. SeeOther: 303,
  87553. NotModified: 304,
  87554. UseProxy: 305,
  87555. Unused: 306,
  87556. TemporaryRedirect: 307,
  87557. PermanentRedirect: 308,
  87558. BadRequest: 400,
  87559. Unauthorized: 401,
  87560. PaymentRequired: 402,
  87561. Forbidden: 403,
  87562. NotFound: 404,
  87563. MethodNotAllowed: 405,
  87564. NotAcceptable: 406,
  87565. ProxyAuthenticationRequired: 407,
  87566. RequestTimeout: 408,
  87567. Conflict: 409,
  87568. Gone: 410,
  87569. LengthRequired: 411,
  87570. PreconditionFailed: 412,
  87571. PayloadTooLarge: 413,
  87572. UriTooLong: 414,
  87573. UnsupportedMediaType: 415,
  87574. RangeNotSatisfiable: 416,
  87575. ExpectationFailed: 417,
  87576. ImATeapot: 418,
  87577. MisdirectedRequest: 421,
  87578. UnprocessableEntity: 422,
  87579. Locked: 423,
  87580. FailedDependency: 424,
  87581. TooEarly: 425,
  87582. UpgradeRequired: 426,
  87583. PreconditionRequired: 428,
  87584. TooManyRequests: 429,
  87585. RequestHeaderFieldsTooLarge: 431,
  87586. UnavailableForLegalReasons: 451,
  87587. InternalServerError: 500,
  87588. NotImplemented: 501,
  87589. BadGateway: 502,
  87590. ServiceUnavailable: 503,
  87591. GatewayTimeout: 504,
  87592. HttpVersionNotSupported: 505,
  87593. VariantAlsoNegotiates: 506,
  87594. InsufficientStorage: 507,
  87595. LoopDetected: 508,
  87596. NotExtended: 510,
  87597. NetworkAuthenticationRequired: 511
  87598. };
  87599. Object.entries(HttpStatusCode).forEach(([key, value]) => {
  87600. HttpStatusCode[value] = key;
  87601. });
  87602. const HttpStatusCode$1 = HttpStatusCode;
  87603. function createInstance(defaultConfig) {
  87604. const context = new Axios$1(defaultConfig);
  87605. const instance = bind(Axios$1.prototype.request, context);
  87606. utils$1.extend(instance, Axios$1.prototype, context, { allOwnKeys: true });
  87607. utils$1.extend(instance, context, null, { allOwnKeys: true });
  87608. instance.create = function create(instanceConfig) {
  87609. return createInstance(mergeConfig(defaultConfig, instanceConfig));
  87610. };
  87611. return instance;
  87612. }
  87613. const axios = createInstance(defaults$1);
  87614. axios.Axios = Axios$1;
  87615. axios.CanceledError = CanceledError;
  87616. axios.CancelToken = CancelToken$1;
  87617. axios.isCancel = isCancel;
  87618. axios.VERSION = VERSION;
  87619. axios.toFormData = toFormData;
  87620. axios.AxiosError = AxiosError;
  87621. axios.Cancel = axios.CanceledError;
  87622. axios.all = function all(promises) {
  87623. return Promise.all(promises);
  87624. };
  87625. axios.spread = spread;
  87626. axios.isAxiosError = isAxiosError;
  87627. axios.mergeConfig = mergeConfig;
  87628. axios.AxiosHeaders = AxiosHeaders$1;
  87629. axios.formToJSON = (thing) => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
  87630. axios.getAdapter = adapters.getAdapter;
  87631. axios.HttpStatusCode = HttpStatusCode$1;
  87632. axios.default = axios;
  87633. const axios$1 = axios;
  87634. const _sfc_main$d = {
  87635. __name: "result",
  87636. setup(__props, { expose: __expose }) {
  87637. __expose();
  87638. const order2 = vue.ref({});
  87639. const result2 = vue.ref({});
  87640. const url2 = vue.ref("https://payapp.weixin.qq.com");
  87641. const getQueryVal = () => {
  87642. const queryStr = window.location.href.split("?")[1];
  87643. const strArr = queryStr.split("&");
  87644. if (strArr.length) {
  87645. strArr.forEach((val) => {
  87646. const subStrArr = val.split("=");
  87647. result2.value[subStrArr[0]] = subStrArr[1];
  87648. });
  87649. }
  87650. };
  87651. const showCustomPage = () => {
  87652. formatAppLog("log", "at pages/pay/result.vue:101", "showCustomPage");
  87653. const customData = JSON.stringify({
  87654. action: "onIframeReady",
  87655. displayStyle: "SHOW_CUSTOM_PAGE"
  87656. // height: 900
  87657. });
  87658. parent.postMessage(customData, url2.value);
  87659. };
  87660. const state = vue.reactive({
  87661. id: 0,
  87662. // 支付单号
  87663. orderType: "goods",
  87664. // 订单类型
  87665. result: "unpaid",
  87666. // 支付状态
  87667. orderInfo: {},
  87668. // 支付订单信息
  87669. tradeOrder: {},
  87670. // 商品订单信息,只有在 orderType 为 goods 才会请求。目的:【我的拼团】按钮的展示
  87671. counter: 0
  87672. // 获取结果次数
  87673. });
  87674. const payResult = vue.computed(() => {
  87675. if (state.result === "unpaid") {
  87676. return "waiting";
  87677. }
  87678. if (state.result === "paid") {
  87679. return "success";
  87680. }
  87681. if (state.result === "failed") {
  87682. return "failed";
  87683. }
  87684. if (state.result === "closed") {
  87685. return "closed";
  87686. }
  87687. });
  87688. const isTopUp = vue.computed(() => {
  87689. return result2.value.out_trade_no.includes("top-up");
  87690. });
  87691. async function getOrderInfo(payOrderNo) {
  87692. state.counter++;
  87693. const {
  87694. data,
  87695. code: code2
  87696. } = await PayOrderApi.getFuYouPayOrderByStatus(payOrderNo);
  87697. if (code2 === 0) {
  87698. state.orderInfo = data;
  87699. if (!state.orderInfo || state.orderInfo.status === 30) {
  87700. state.result = "closed";
  87701. return;
  87702. }
  87703. if (state.orderInfo.status !== 0) {
  87704. state.result = "paid";
  87705. return;
  87706. }
  87707. }
  87708. if (state.counter < 3 && state.result === "unpaid") {
  87709. setTimeout(() => {
  87710. getOrderInfo(payOrderNo);
  87711. }, 1500);
  87712. }
  87713. if (state.counter >= 3) {
  87714. state.result = "failed";
  87715. }
  87716. }
  87717. vue.onMounted(async () => {
  87718. await showCustomPage();
  87719. await getQueryVal();
  87720. await getOrderInfo(result2.value.out_trade_no);
  87721. });
  87722. const goBack = () => {
  87723. const mchData = {
  87724. action: "jumpOut",
  87725. jumpOutUrl: `${location.origin}/#/pages/index/index?points=${state.orderInfo.jf}&socialStatus=${state.orderInfo.sj}`
  87726. };
  87727. formatAppLog("log", "at pages/pay/result.vue:212", mchData.jumpOutUrl);
  87728. const postData = JSON.stringify(mchData);
  87729. parent.postMessage(postData, url2.value);
  87730. };
  87731. const goOrderList = () => {
  87732. formatAppLog("log", "at pages/pay/result.vue:218", state.orderInfo);
  87733. const mchData = {
  87734. action: "jumpOut",
  87735. jumpOutUrl: `${location.origin}/#/pages/order/list?type=2&points=${state.orderInfo.jf}&socialStatus=${state.orderInfo.sj}`
  87736. };
  87737. formatAppLog("log", "at pages/pay/result.vue:223", mchData.jumpOutUrl);
  87738. const postData = JSON.stringify(mchData);
  87739. parent.postMessage(postData, url2.value);
  87740. };
  87741. const goWallet = () => {
  87742. const mchData = {
  87743. action: "jumpOut",
  87744. jumpOutUrl: `${location.origin}/#/pages/user/wallet/score`
  87745. };
  87746. const postData = JSON.stringify(mchData);
  87747. parent.postMessage(postData, url2.value);
  87748. };
  87749. const __returned__ = { order: order2, result: result2, url: url2, getQueryVal, showCustomPage, state, payResult, isTopUp, getOrderInfo, goBack, goOrderList, goWallet, ref: vue.ref, onMounted: vue.onMounted, reactive: vue.reactive, computed: vue.computed, watchEffect: vue.watchEffect, get axios() {
  87750. return axios$1;
  87751. }, get onLoad() {
  87752. return onLoad;
  87753. }, get onHide() {
  87754. return onHide;
  87755. }, get onShow() {
  87756. return onShow;
  87757. }, get isEmpty() {
  87758. return lodashExports.isEmpty;
  87759. }, get sheep() {
  87760. return sheep$1;
  87761. }, get PayOrderApi() {
  87762. return PayOrderApi;
  87763. }, get fen2yuan() {
  87764. return fen2yuan;
  87765. }, get OrderApi() {
  87766. return OrderApi;
  87767. }, get showWalletModal() {
  87768. return showWalletModal;
  87769. }, get colseWalletModal() {
  87770. return colseWalletModal;
  87771. }, get t() {
  87772. return t$6;
  87773. } };
  87774. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  87775. return __returned__;
  87776. }
  87777. };
  87778. function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
  87779. return vue.openBlock(), vue.createElementBlock(
  87780. vue.Fragment,
  87781. null,
  87782. [
  87783. vue.createCommentVNode(" result:{{result}} "),
  87784. vue.createElementVNode("view", { class: "pay-result-box ss-flex-col ss-row-center ss-col-center" }, [
  87785. vue.createCommentVNode(" 信息展示 "),
  87786. $setup.payResult === "waiting" ? (vue.openBlock(), vue.createElementBlock("view", {
  87787. key: 0,
  87788. class: "pay-waiting ss-m-b-30"
  87789. })) : vue.createCommentVNode("v-if", true),
  87790. $setup.payResult === "success" ? (vue.openBlock(), vue.createElementBlock("image", {
  87791. key: 1,
  87792. class: "pay-img ss-m-b-30",
  87793. src: $setup.sheep.$url.static("/static/images/order_pay_success.gif")
  87794. }, null, 8, ["src"])) : vue.createCommentVNode("v-if", true),
  87795. ["failed", "closed"].includes($setup.payResult) ? (vue.openBlock(), vue.createElementBlock("image", {
  87796. key: 2,
  87797. class: "pay-img ss-m-b-30",
  87798. src: $setup.sheep.$url.static("/static/images/order_paty_fail.gif")
  87799. }, null, 8, ["src"])) : vue.createCommentVNode("v-if", true),
  87800. $setup.payResult === "success" ? (vue.openBlock(), vue.createElementBlock(
  87801. "view",
  87802. {
  87803. key: 3,
  87804. class: "tip-text ss-m-b-30"
  87805. },
  87806. vue.toDisplayString($setup.t("order.payment_successful")),
  87807. 1
  87808. /* TEXT */
  87809. )) : vue.createCommentVNode("v-if", true),
  87810. $setup.payResult === "failed" ? (vue.openBlock(), vue.createElementBlock(
  87811. "view",
  87812. {
  87813. key: 4,
  87814. class: "tip-text ss-m-b-30"
  87815. },
  87816. vue.toDisplayString($setup.t("order.payment_failed")),
  87817. 1
  87818. /* TEXT */
  87819. )) : vue.createCommentVNode("v-if", true),
  87820. $setup.payResult === "closed" ? (vue.openBlock(), vue.createElementBlock(
  87821. "view",
  87822. {
  87823. key: 5,
  87824. class: "tip-text ss-m-b-30"
  87825. },
  87826. vue.toDisplayString($setup.t("order.order_closed")),
  87827. 1
  87828. /* TEXT */
  87829. )) : vue.createCommentVNode("v-if", true),
  87830. $setup.payResult === "waiting" ? (vue.openBlock(), vue.createElementBlock(
  87831. "view",
  87832. {
  87833. key: 6,
  87834. class: "tip-text ss-m-b-30"
  87835. },
  87836. vue.toDisplayString($setup.t("order.checking_payment_result")),
  87837. 1
  87838. /* TEXT */
  87839. )) : vue.createCommentVNode("v-if", true),
  87840. $setup.payResult === "success" ? (vue.openBlock(), vue.createElementBlock("view", {
  87841. key: 7,
  87842. class: "pay-total-num ss-flex"
  87843. }, [
  87844. vue.createElementVNode(
  87845. "view",
  87846. null,
  87847. "¥" + vue.toDisplayString($setup.fen2yuan($setup.state.orderInfo.price)),
  87848. 1
  87849. /* TEXT */
  87850. )
  87851. ])) : vue.createCommentVNode("v-if", true),
  87852. vue.createCommentVNode(" 操作区 "),
  87853. vue.createElementVNode("view", { class: "btn-box ss-flex ss-row-center ss-m-t-50" }, [
  87854. vue.createElementVNode(
  87855. "button",
  87856. {
  87857. class: "back-btn ss-reset-button",
  87858. onClick: $setup.goBack
  87859. },
  87860. vue.toDisplayString($setup.t("order.return_home")),
  87861. 1
  87862. /* TEXT */
  87863. ),
  87864. vue.createCommentVNode(` <button class="check-btn ss-reset-button" v-if="payResult === 'failed'" @tap="
  87865. sheep.$router.redirect('/pages/pay/index', { id: state.id, orderType: state.orderType })
  87866. ">
  87867. {{ t('order.retry_payment') }}
  87868. </button> `),
  87869. $setup.payResult === "success" && !$setup.isTopUp ? (vue.openBlock(), vue.createElementBlock(
  87870. "button",
  87871. {
  87872. key: 0,
  87873. class: "check-btn ss-reset-button",
  87874. onClick: $setup.goOrderList
  87875. },
  87876. vue.toDisplayString($setup.t("order.view_order")),
  87877. 1
  87878. /* TEXT */
  87879. )) : vue.createCommentVNode("v-if", true),
  87880. $setup.payResult === "success" && $setup.isTopUp ? (vue.openBlock(), vue.createElementBlock(
  87881. "button",
  87882. {
  87883. key: 1,
  87884. class: "check-btn ss-reset-button",
  87885. onClick: $setup.goWallet
  87886. },
  87887. vue.toDisplayString($setup.t("order.view_wallet")),
  87888. 1
  87889. /* TEXT */
  87890. )) : vue.createCommentVNode("v-if", true),
  87891. vue.createCommentVNode(" TODO 非繁人:拼团接入 "),
  87892. vue.createCommentVNode(` <button class="check-btn ss-reset-button" v-if="payResult === 'success' && state.tradeOrder.type === 3"
  87893. @tap="sheep.$router.redirect('/pages/activity/groupon/order')">
  87894. {{ t('order.my_group_buying') }}
  87895. </button> `)
  87896. ]),
  87897. vue.createCommentVNode(" TODO 非繁人:订阅 ")
  87898. ])
  87899. ],
  87900. 2112
  87901. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  87902. );
  87903. }
  87904. const PagesPayResult = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c], ["__scopeId", "data-v-42b1ec48"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/pay/result.vue"]]);
  87905. const _sfc_main$c = {
  87906. __name: "resultYuan",
  87907. setup(__props, { expose: __expose }) {
  87908. __expose();
  87909. const state = vue.reactive({
  87910. id: 0,
  87911. // 支付单号
  87912. orderType: "goods",
  87913. // 订单类型
  87914. result: "unpaid",
  87915. // 支付状态
  87916. orderInfo: {},
  87917. // 支付订单信息
  87918. tradeOrder: {},
  87919. // 商品订单信息,只有在 orderType 为 goods 才会请求。目的:【我的拼团】按钮的展示
  87920. counter: 0
  87921. // 获取结果次数
  87922. });
  87923. const payResult = vue.computed(() => {
  87924. if (state.result === "unpaid") {
  87925. return "waiting";
  87926. }
  87927. if (state.result === "paid") {
  87928. return "success";
  87929. }
  87930. if (state.result === "failed") {
  87931. return "failed";
  87932. }
  87933. if (state.result === "closed") {
  87934. return "closed";
  87935. }
  87936. });
  87937. vue.watchEffect(() => {
  87938. if (payResult.value == "success") {
  87939. showWalletModal({ points: state.orderInfo.jf, socialStatus: state.orderInfo.sj });
  87940. }
  87941. });
  87942. async function getOrderInfo(id) {
  87943. state.counter++;
  87944. const {
  87945. data,
  87946. code: code2
  87947. } = await PayOrderApi.getByStatus2(id);
  87948. if (code2 === 0) {
  87949. state.orderInfo = data;
  87950. if (!state.orderInfo || state.orderInfo.status === 30) {
  87951. state.result = "closed";
  87952. return;
  87953. }
  87954. if (state.orderInfo.status !== 0) {
  87955. state.result = "paid";
  87956. return;
  87957. }
  87958. }
  87959. if (state.counter < 3 && state.result === "unpaid") {
  87960. setTimeout(() => {
  87961. getOrderInfo(id);
  87962. }, 1500);
  87963. }
  87964. if (state.counter >= 3) {
  87965. state.result = "failed";
  87966. }
  87967. }
  87968. function onOrder() {
  87969. if (state.orderType === "recharge") {
  87970. sheep$1.$router.redirect("/pages/pay/recharge-log");
  87971. } else {
  87972. sheep$1.$router.redirect("/pages/order/list", { type: 2 });
  87973. }
  87974. }
  87975. const isTopUp = vue.computed(() => {
  87976. return state.orderInfo.no.includes("top-up");
  87977. });
  87978. onLoad(async (options2) => {
  87979. if (options2.id) {
  87980. state.id = options2.id;
  87981. }
  87982. if (options2.orderType) {
  87983. state.orderType = options2.orderType;
  87984. }
  87985. if (options2.payRes) {
  87986. state.payState = "success";
  87987. state.orderInfo = JSON.parse(options2.payRes);
  87988. state.result = "paid";
  87989. } else {
  87990. await getOrderInfo(state.id);
  87991. }
  87992. });
  87993. onShow(() => {
  87994. if (lodashExports.isEmpty(state.orderInfo) || state.payState === "success") {
  87995. return;
  87996. }
  87997. getOrderInfo(state.id);
  87998. });
  87999. onHide(() => {
  88000. state.result = "unpaid";
  88001. state.counter = 0;
  88002. });
  88003. const __returned__ = { state, payResult, getOrderInfo, onOrder, isTopUp, get onLoad() {
  88004. return onLoad;
  88005. }, get onHide() {
  88006. return onHide;
  88007. }, get onShow() {
  88008. return onShow;
  88009. }, reactive: vue.reactive, computed: vue.computed, watchEffect: vue.watchEffect, get isEmpty() {
  88010. return lodashExports.isEmpty;
  88011. }, get sheep() {
  88012. return sheep$1;
  88013. }, get PayOrderApi() {
  88014. return PayOrderApi;
  88015. }, get fen2yuan() {
  88016. return fen2yuan;
  88017. }, get OrderApi() {
  88018. return OrderApi;
  88019. }, get showWalletModal() {
  88020. return showWalletModal;
  88021. }, get colseWalletModal() {
  88022. return colseWalletModal;
  88023. }, get t() {
  88024. return t$6;
  88025. } };
  88026. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  88027. return __returned__;
  88028. }
  88029. };
  88030. function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
  88031. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  88032. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  88033. title: $setup.t("order.payment_result"),
  88034. bgStyle: { color: "#FFF" }
  88035. }, {
  88036. default: vue.withCtx(() => [
  88037. vue.createElementVNode("view", { class: "pay-result-box ss-flex-col ss-row-center ss-col-center" }, [
  88038. vue.createCommentVNode(" 信息展示 "),
  88039. $setup.payResult === "waiting" ? (vue.openBlock(), vue.createElementBlock("view", {
  88040. key: 0,
  88041. class: "pay-waiting ss-m-b-30"
  88042. })) : vue.createCommentVNode("v-if", true),
  88043. $setup.payResult === "success" ? (vue.openBlock(), vue.createElementBlock("image", {
  88044. key: 1,
  88045. class: "pay-img ss-m-b-30",
  88046. src: $setup.sheep.$url.static("/static/images/order_pay_success.gif")
  88047. }, null, 8, ["src"])) : vue.createCommentVNode("v-if", true),
  88048. ["failed", "closed"].includes($setup.payResult) ? (vue.openBlock(), vue.createElementBlock("image", {
  88049. key: 2,
  88050. class: "pay-img ss-m-b-30",
  88051. src: $setup.sheep.$url.static("/static/images/order_paty_fail.gif")
  88052. }, null, 8, ["src"])) : vue.createCommentVNode("v-if", true),
  88053. $setup.payResult === "success" ? (vue.openBlock(), vue.createElementBlock(
  88054. "view",
  88055. {
  88056. key: 3,
  88057. class: "tip-text ss-m-b-30"
  88058. },
  88059. vue.toDisplayString($setup.t("order.payment_successful")),
  88060. 1
  88061. /* TEXT */
  88062. )) : vue.createCommentVNode("v-if", true),
  88063. $setup.payResult === "failed" ? (vue.openBlock(), vue.createElementBlock(
  88064. "view",
  88065. {
  88066. key: 4,
  88067. class: "tip-text ss-m-b-30"
  88068. },
  88069. vue.toDisplayString($setup.t("order.payment_failed")),
  88070. 1
  88071. /* TEXT */
  88072. )) : vue.createCommentVNode("v-if", true),
  88073. $setup.payResult === "closed" ? (vue.openBlock(), vue.createElementBlock(
  88074. "view",
  88075. {
  88076. key: 5,
  88077. class: "tip-text ss-m-b-30"
  88078. },
  88079. vue.toDisplayString($setup.t("order.order_closed")),
  88080. 1
  88081. /* TEXT */
  88082. )) : vue.createCommentVNode("v-if", true),
  88083. $setup.payResult === "waiting" ? (vue.openBlock(), vue.createElementBlock(
  88084. "view",
  88085. {
  88086. key: 6,
  88087. class: "tip-text ss-m-b-30"
  88088. },
  88089. vue.toDisplayString($setup.t("order.checking_payment_result")) + "...",
  88090. 1
  88091. /* TEXT */
  88092. )) : vue.createCommentVNode("v-if", true),
  88093. $setup.payResult === "success" ? (vue.openBlock(), vue.createElementBlock("view", {
  88094. key: 7,
  88095. class: "pay-total-num ss-flex"
  88096. }, [
  88097. vue.createElementVNode(
  88098. "view",
  88099. null,
  88100. "¥" + vue.toDisplayString($setup.fen2yuan($setup.state.orderInfo.price)),
  88101. 1
  88102. /* TEXT */
  88103. )
  88104. ])) : vue.createCommentVNode("v-if", true),
  88105. vue.createCommentVNode(" 操作区 "),
  88106. vue.createElementVNode("view", { class: "btn-box ss-flex ss-row-center ss-m-t-50" }, [
  88107. vue.createElementVNode(
  88108. "button",
  88109. {
  88110. class: "back-btn ss-reset-button",
  88111. onClick: _cache[0] || (_cache[0] = ($event) => $setup.sheep.$router.go("/pages/index/index"))
  88112. },
  88113. vue.toDisplayString($setup.t("order.return_home")),
  88114. 1
  88115. /* TEXT */
  88116. ),
  88117. $setup.payResult === "failed" ? (vue.openBlock(), vue.createElementBlock(
  88118. "button",
  88119. {
  88120. key: 0,
  88121. class: "check-btn ss-reset-button",
  88122. onClick: _cache[1] || (_cache[1] = ($event) => $setup.sheep.$router.redirect("/pages/pay/index", { id: $setup.state.id, orderType: $setup.state.orderType }))
  88123. },
  88124. vue.toDisplayString($setup.t("order.retry_payment")),
  88125. 1
  88126. /* TEXT */
  88127. )) : vue.createCommentVNode("v-if", true),
  88128. $setup.payResult === "success" && !$setup.isTopUp ? (vue.openBlock(), vue.createElementBlock(
  88129. "button",
  88130. {
  88131. key: 1,
  88132. class: "check-btn ss-reset-button",
  88133. onClick: $setup.onOrder
  88134. },
  88135. vue.toDisplayString($setup.t("order.view_order")),
  88136. 1
  88137. /* TEXT */
  88138. )) : vue.createCommentVNode("v-if", true),
  88139. $setup.payResult === "success" && $setup.isTopUp ? (vue.openBlock(), vue.createElementBlock(
  88140. "button",
  88141. {
  88142. key: 2,
  88143. class: "check-btn ss-reset-button",
  88144. onClick: _cache[2] || (_cache[2] = ($event) => $setup.sheep.$router.redirect("/pages/user/wallet/score"))
  88145. },
  88146. vue.toDisplayString($setup.t("order.view_wallet")),
  88147. 1
  88148. /* TEXT */
  88149. )) : vue.createCommentVNode("v-if", true),
  88150. vue.createCommentVNode(" TODO 非繁人:拼团接入 "),
  88151. $setup.payResult === "success" && $setup.state.tradeOrder.type === 3 ? (vue.openBlock(), vue.createElementBlock(
  88152. "button",
  88153. {
  88154. key: 3,
  88155. class: "check-btn ss-reset-button",
  88156. onClick: _cache[3] || (_cache[3] = ($event) => $setup.sheep.$router.redirect("/pages/activity/groupon/order"))
  88157. },
  88158. vue.toDisplayString($setup.t("order.my_group_buying")),
  88159. 1
  88160. /* TEXT */
  88161. )) : vue.createCommentVNode("v-if", true)
  88162. ]),
  88163. vue.createCommentVNode(" TODO 非繁人:订阅 ")
  88164. ])
  88165. ]),
  88166. _: 1
  88167. /* STABLE */
  88168. }, 8, ["title"]);
  88169. }
  88170. const PagesPayResultYuan = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b], ["__scopeId", "data-v-67cd5b50"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/pay/resultYuan.vue"]]);
  88171. const _sfc_main$b = {
  88172. __name: "recharge",
  88173. setup(__props, { expose: __expose }) {
  88174. __expose();
  88175. vue.useCssVars((_ctx) => ({
  88176. "b0187d83-headerBg": vue.unref(headerBg)
  88177. }));
  88178. const userWallet = vue.computed(() => sheep$1.$store("user").userWallet);
  88179. const statusBarHeight = sheep$1.$platform.device.statusBarHeight * 2;
  88180. const headerBg = sheep$1.$url.css("/static/img/shop/user/withdraw_bg.png");
  88181. const state = vue.reactive({
  88182. recharge_money: "",
  88183. // 输入的充值金额
  88184. packageList: []
  88185. });
  88186. function onCard(e2) {
  88187. state.recharge_money = fen2yuan(e2);
  88188. }
  88189. async function getRechargeTabs() {
  88190. const { code: code2, data } = await PayWalletApi.getWalletRechargePackageList();
  88191. if (code2 !== 0) {
  88192. return;
  88193. }
  88194. state.packageList = data;
  88195. }
  88196. async function onConfirm() {
  88197. var _a2;
  88198. const { code: code2, data } = await PayWalletApi.createWalletRecharge({
  88199. packageId: (_a2 = state.packageList.find((item) => fen2yuan(item.payPrice) === state.recharge_money)) == null ? void 0 : _a2.id,
  88200. payPrice: state.recharge_money * 100
  88201. });
  88202. if (code2 !== 0) {
  88203. return;
  88204. }
  88205. sheep$1.$router.go("/pages/pay/index", {
  88206. id: data.payOrderId,
  88207. orderType: "recharge"
  88208. });
  88209. }
  88210. onLoad(() => {
  88211. getRechargeTabs();
  88212. });
  88213. const __returned__ = { userWallet, statusBarHeight, headerBg, state, onCard, getRechargeTabs, onConfirm, computed: vue.computed, reactive: vue.reactive, get sheep() {
  88214. return sheep$1;
  88215. }, get onLoad() {
  88216. return onLoad;
  88217. }, get fen2yuan() {
  88218. return fen2yuan;
  88219. }, get PayWalletApi() {
  88220. return PayWalletApi;
  88221. } };
  88222. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  88223. return __returned__;
  88224. }
  88225. };
  88226. function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
  88227. const _component_uni_easyinput = resolveEasycom(vue.resolveDynamicComponent("uni-easyinput"), __easycom_0$l);
  88228. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  88229. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  88230. title: "充值",
  88231. class: "withdraw-wrap",
  88232. navbar: "inner"
  88233. }, {
  88234. default: vue.withCtx(() => [
  88235. vue.createElementVNode(
  88236. "view",
  88237. {
  88238. class: "wallet-num-box ss-flex ss-col-center ss-row-between",
  88239. style: vue.normalizeStyle([
  88240. {
  88241. marginTop: "-" + Number($setup.statusBarHeight + 88) + "rpx",
  88242. paddingTop: Number($setup.statusBarHeight + 108) + "rpx"
  88243. }
  88244. ])
  88245. },
  88246. [
  88247. vue.createElementVNode("view", { class: "" }, [
  88248. vue.createElementVNode("view", { class: "num-title" }, "当前余额(元)"),
  88249. vue.createElementVNode(
  88250. "view",
  88251. { class: "wallet-num" },
  88252. vue.toDisplayString($setup.fen2yuan($setup.userWallet.balance)),
  88253. 1
  88254. /* TEXT */
  88255. )
  88256. ]),
  88257. vue.createElementVNode("button", {
  88258. class: "ss-reset-button log-btn",
  88259. onClick: _cache[0] || (_cache[0] = ($event) => $setup.sheep.$router.go("/pages/pay/recharge-log"))
  88260. }, " 充值记录 ")
  88261. ],
  88262. 4
  88263. /* STYLE */
  88264. ),
  88265. vue.createElementVNode("view", { class: "recharge-box" }, [
  88266. vue.createElementVNode("view", { class: "recharge-card-box" }, [
  88267. vue.createElementVNode("view", { class: "input-label ss-m-b-50" }, "充值金额"),
  88268. vue.createElementVNode("view", { class: "input-box ss-flex border-bottom ss-p-b-20" }, [
  88269. vue.createElementVNode("view", { class: "unit" }, "¥"),
  88270. vue.createVNode(_component_uni_easyinput, {
  88271. modelValue: $setup.state.recharge_money,
  88272. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.state.recharge_money = $event),
  88273. type: "digit",
  88274. placeholder: "请输入充值金额",
  88275. inputBorder: false
  88276. }, null, 8, ["modelValue"])
  88277. ]),
  88278. vue.createElementVNode("view", { class: "face-value-box ss-flex ss-flex-wrap ss-m-y-40" }, [
  88279. (vue.openBlock(true), vue.createElementBlock(
  88280. vue.Fragment,
  88281. null,
  88282. vue.renderList($setup.state.packageList, (item) => {
  88283. return vue.openBlock(), vue.createElementBlock("button", {
  88284. class: vue.normalizeClass(["ss-reset-button face-value-btn", [{ "btn-active": $setup.state.recharge_money === $setup.fen2yuan(item.payPrice) }]]),
  88285. key: item.money,
  88286. onClick: ($event) => $setup.onCard(item.payPrice)
  88287. }, [
  88288. vue.createElementVNode(
  88289. "text",
  88290. { class: "face-value-title" },
  88291. vue.toDisplayString($setup.fen2yuan(item.payPrice)),
  88292. 1
  88293. /* TEXT */
  88294. ),
  88295. item.bonusPrice ? (vue.openBlock(), vue.createElementBlock(
  88296. "view",
  88297. {
  88298. key: 0,
  88299. class: "face-value-tag"
  88300. },
  88301. " 送 " + vue.toDisplayString($setup.fen2yuan(item.bonusPrice)) + " 元 ",
  88302. 1
  88303. /* TEXT */
  88304. )) : vue.createCommentVNode("v-if", true)
  88305. ], 10, ["onClick"]);
  88306. }),
  88307. 128
  88308. /* KEYED_FRAGMENT */
  88309. ))
  88310. ]),
  88311. vue.createElementVNode("button", {
  88312. class: "ss-reset-button save-btn ui-BG-Main-Gradient ss-m-t-60 ui-Shadow-Main",
  88313. onClick: $setup.onConfirm
  88314. }, " 确认充值 ")
  88315. ])
  88316. ])
  88317. ]),
  88318. _: 1
  88319. /* STABLE */
  88320. });
  88321. }
  88322. const PagesPayRecharge = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a], ["__scopeId", "data-v-b0187d83"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/pay/recharge.vue"]]);
  88323. const _sfc_main$a = {
  88324. __name: "recharge-log",
  88325. setup(__props, { expose: __expose }) {
  88326. __expose();
  88327. const state = vue.reactive({
  88328. pagination: {
  88329. list: [],
  88330. total: 0,
  88331. pageNo: 1,
  88332. pageSize: 5
  88333. },
  88334. loadStatus: ""
  88335. });
  88336. async function getLogList(page2 = 1, list_rows = 5) {
  88337. const { code: code2, data } = await PayWalletApi.getWalletRechargePage({
  88338. pageNo: page2,
  88339. pageSize: list_rows
  88340. });
  88341. if (code2 !== 0) {
  88342. return;
  88343. }
  88344. state.pagination.list = _$1.concat(state.pagination.list, data.list);
  88345. state.pagination.total = data.total;
  88346. state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore";
  88347. }
  88348. function loadMore() {
  88349. if (state.loadStatus === "noMore") {
  88350. return;
  88351. }
  88352. state.pagination.pageNo++;
  88353. getLogList();
  88354. }
  88355. onLoad(() => {
  88356. getLogList();
  88357. });
  88358. onReachBottom(() => {
  88359. loadMore();
  88360. });
  88361. const __returned__ = { state, getLogList, loadMore, reactive: vue.reactive, get onLoad() {
  88362. return onLoad;
  88363. }, get onReachBottom() {
  88364. return onReachBottom;
  88365. }, get _() {
  88366. return _$1;
  88367. }, get PayWalletApi() {
  88368. return PayWalletApi;
  88369. }, get sheep() {
  88370. return sheep$1;
  88371. }, get fen2yuan() {
  88372. return fen2yuan;
  88373. } };
  88374. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  88375. return __returned__;
  88376. }
  88377. };
  88378. function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
  88379. const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6);
  88380. const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5);
  88381. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  88382. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  88383. class: "widthdraw-log-wrap",
  88384. title: "充值记录"
  88385. }, {
  88386. default: vue.withCtx(() => [
  88387. vue.createCommentVNode(" 记录卡片 "),
  88388. vue.createElementVNode("view", { class: "wallet-log-box ss-p-b-30" }, [
  88389. (vue.openBlock(true), vue.createElementBlock(
  88390. vue.Fragment,
  88391. null,
  88392. vue.renderList($setup.state.pagination.list, (item) => {
  88393. return vue.openBlock(), vue.createElementBlock("view", {
  88394. class: "log-list",
  88395. key: item
  88396. }, [
  88397. vue.createElementVNode("view", { class: "head ss-flex ss-col-center ss-row-between" }, [
  88398. vue.createElementVNode("view", { class: "title" }, "充值金额"),
  88399. vue.createElementVNode(
  88400. "view",
  88401. {
  88402. class: vue.normalizeClass(["num", item.refundStatus === 10 ? "danger-color" : "success-color"])
  88403. },
  88404. [
  88405. vue.createTextVNode(
  88406. vue.toDisplayString($setup.fen2yuan(item.payPrice)) + " 元 ",
  88407. 1
  88408. /* TEXT */
  88409. ),
  88410. item.bonusPrice > 0 ? (vue.openBlock(), vue.createElementBlock(
  88411. "text",
  88412. { key: 0 },
  88413. "(赠送 " + vue.toDisplayString($setup.fen2yuan(item.bonusPrice)) + " 元)",
  88414. 1
  88415. /* TEXT */
  88416. )) : vue.createCommentVNode("v-if", true)
  88417. ],
  88418. 2
  88419. /* CLASS */
  88420. )
  88421. ]),
  88422. vue.createElementVNode("view", { class: "status-box item ss-flex ss-col-center ss-row-between" }, [
  88423. vue.createElementVNode("view", { class: "item-title" }, "支付状态"),
  88424. vue.createElementVNode(
  88425. "view",
  88426. {
  88427. class: vue.normalizeClass(["status-text", item.refundStatus === 10 ? "danger-color" : "success-color"])
  88428. },
  88429. vue.toDisplayString(item.refundStatus === 10 ? "已退款" : "已支付"),
  88430. 3
  88431. /* TEXT, CLASS */
  88432. )
  88433. ]),
  88434. vue.createElementVNode("view", { class: "time-box item ss-flex ss-col-center ss-row-between" }, [
  88435. vue.createElementVNode("text", { class: "item-title" }, "充值渠道"),
  88436. vue.createElementVNode(
  88437. "view",
  88438. { class: "time ss-ellipsis-1" },
  88439. vue.toDisplayString(item.payChannelName),
  88440. 1
  88441. /* TEXT */
  88442. )
  88443. ]),
  88444. vue.createElementVNode("view", { class: "time-box item ss-flex ss-col-center ss-row-between" }, [
  88445. vue.createElementVNode("text", { class: "item-title" }, "充值单号"),
  88446. vue.createElementVNode(
  88447. "view",
  88448. { class: "time" },
  88449. vue.toDisplayString(item.payOrderChannelOrderNo),
  88450. 1
  88451. /* TEXT */
  88452. )
  88453. ]),
  88454. vue.createElementVNode("view", { class: "time-box item ss-flex ss-col-center ss-row-between" }, [
  88455. vue.createElementVNode("text", { class: "item-title" }, "充值时间"),
  88456. vue.createElementVNode(
  88457. "view",
  88458. { class: "time" },
  88459. vue.toDisplayString($setup.sheep.$helper.timeFormat(item.payTime, "yyyy-mm-dd hh:MM:ss")),
  88460. 1
  88461. /* TEXT */
  88462. )
  88463. ])
  88464. ]);
  88465. }),
  88466. 128
  88467. /* KEYED_FRAGMENT */
  88468. ))
  88469. ]),
  88470. $setup.state.pagination.total === 0 ? (vue.openBlock(), vue.createBlock(_component_s_empty, {
  88471. key: 0,
  88472. icon: "/static/comment-empty.png",
  88473. text: "暂无充值记录"
  88474. })) : vue.createCommentVNode("v-if", true),
  88475. $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, {
  88476. key: 1,
  88477. status: $setup.state.loadStatus,
  88478. "content-text": {
  88479. contentdown: "上拉加载更多"
  88480. },
  88481. onClick: $setup.loadMore
  88482. }, null, 8, ["status"])) : vue.createCommentVNode("v-if", true)
  88483. ]),
  88484. _: 1
  88485. /* STABLE */
  88486. });
  88487. }
  88488. const PagesPayRechargeLog = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9], ["__scopeId", "data-v-fcfe0364"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/pay/recharge-log.vue"]]);
  88489. const _sfc_main$9 = {
  88490. __name: "detail",
  88491. setup(__props, { expose: __expose }) {
  88492. __expose();
  88493. vue.useCssVars((_ctx) => ({
  88494. "f4b0e588-headerBg": vue.unref(headerBg)
  88495. }));
  88496. const headerBg = sheep$1.$url.css("/static/img/shop/user/withdraw_bg.png");
  88497. const statusBarHeight = sheep$1.$platform.device.statusBarHeight * 2;
  88498. const state = vue.reactive({
  88499. data: {},
  88500. // 拼团详情
  88501. loading: true,
  88502. grouponAction: "create",
  88503. showSelectSku: false,
  88504. grouponNum: 0,
  88505. number: 0,
  88506. activity: {},
  88507. combinationHeadId: null
  88508. // 拼团团长编号
  88509. });
  88510. const shareInfo = vue.computed(() => {
  88511. var _a2, _b2, _c;
  88512. if (lodashExports.isEmpty(state.data))
  88513. return {};
  88514. return sheep$1.$platform.share.getShareInfo(
  88515. {
  88516. title: state.data.headRecord.spuName,
  88517. image: sheep$1.$url.cdn(state.data.headRecord.picUrl),
  88518. desc: (_a2 = state.data.goods) == null ? void 0 : _a2.subtitle,
  88519. params: {
  88520. page: "5",
  88521. query: state.data.id
  88522. }
  88523. },
  88524. {
  88525. type: "groupon",
  88526. // 邀请拼团海报
  88527. title: state.data.headRecord.spuName,
  88528. // 商品标题
  88529. image: sheep$1.$url.cdn(state.data.headRecord.picUrl),
  88530. // 商品主图
  88531. price: (_b2 = state.data.goods) == null ? void 0 : _b2.price,
  88532. // 商品价格
  88533. original_price: (_c = state.data.goods) == null ? void 0 : _c.original_price
  88534. // 商品原价
  88535. }
  88536. );
  88537. });
  88538. function onDetail(orderId) {
  88539. sheep$1.$router.go("/pages/order/detail", {
  88540. id: orderId
  88541. });
  88542. }
  88543. function onCreateGroupon() {
  88544. state.grouponAction = "create";
  88545. state.grouponId = 0;
  88546. state.showSelectSku = true;
  88547. }
  88548. function onSkuChange(e2) {
  88549. state.selectedSkuPrice = e2;
  88550. }
  88551. function onJoinGroupon() {
  88552. state.grouponAction = "join";
  88553. state.grouponId = state.data.activityId;
  88554. state.combinationHeadId = state.data.id;
  88555. state.grouponNum = state.data.num;
  88556. state.showSelectSku = true;
  88557. }
  88558. function onBuy(sku) {
  88559. sheep$1.$router.go("/pages/order/confirm", {
  88560. data: JSON.stringify({
  88561. order_type: "goods",
  88562. combinationActivityId: state.data.activity.id,
  88563. combinationHeadId: state.combinationHeadId,
  88564. items: [
  88565. {
  88566. skuId: sku.id,
  88567. count: sku.count
  88568. }
  88569. ]
  88570. })
  88571. });
  88572. }
  88573. const endTime = vue.computed(() => {
  88574. return useDurationTime(state.data.headRecord.expireTime);
  88575. });
  88576. async function getGrouponDetail(id) {
  88577. const { code: code2, data } = await CombinationApi.getCombinationRecordDetail(id);
  88578. if (code2 === 0) {
  88579. state.data = data;
  88580. const remainNumber = Number(state.data.headRecord.userSize - state.data.headRecord.userCount);
  88581. state.remainNumber = remainNumber > 0 ? remainNumber : 0;
  88582. const { data: activity } = await CombinationApi.getCombinationActivity(data.headRecord.activityId);
  88583. state.activity = activity;
  88584. } else {
  88585. state.data = null;
  88586. }
  88587. state.loading = false;
  88588. }
  88589. function onShare() {
  88590. showShareModal();
  88591. }
  88592. onLoad((options2) => {
  88593. getGrouponDetail(options2.id);
  88594. });
  88595. const __returned__ = { headerBg, statusBarHeight, state, shareInfo, onDetail, onCreateGroupon, onSkuChange, onJoinGroupon, onBuy, endTime, getGrouponDetail, onShare, computed: vue.computed, reactive: vue.reactive, get sheep() {
  88596. return sheep$1;
  88597. }, get onLoad() {
  88598. return onLoad;
  88599. }, get useDurationTime() {
  88600. return useDurationTime;
  88601. }, get showShareModal() {
  88602. return showShareModal;
  88603. }, get isEmpty() {
  88604. return lodashExports.isEmpty;
  88605. }, get CombinationApi() {
  88606. return CombinationApi;
  88607. } };
  88608. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  88609. return __returned__;
  88610. }
  88611. };
  88612. function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
  88613. const _component_s_goods_item = resolveEasycom(vue.resolveDynamicComponent("s-goods-item"), __easycom_3$5);
  88614. const _component_s_select_groupon_sku = resolveEasycom(vue.resolveDynamicComponent("s-select-groupon-sku"), __easycom_1$1);
  88615. const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6);
  88616. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  88617. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  88618. title: "拼团详情",
  88619. class: "detail-wrap",
  88620. navbar: $setup.state.data && !$setup.state.loading ? "inner" : "normal",
  88621. onShareAppMessage: $setup.shareInfo
  88622. }, {
  88623. default: vue.withCtx(() => [
  88624. $setup.state.loading ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 })) : vue.createCommentVNode("v-if", true),
  88625. $setup.state.data && !$setup.state.loading ? (vue.openBlock(), vue.createElementBlock("view", { key: 1 }, [
  88626. vue.createCommentVNode(" 团长信息 + 活动信息 "),
  88627. $setup.state.data.headRecord ? (vue.openBlock(), vue.createElementBlock(
  88628. "view",
  88629. {
  88630. key: 0,
  88631. class: "recharge-box",
  88632. style: vue.normalizeStyle([
  88633. {
  88634. marginTop: "-" + Number($setup.statusBarHeight + 88) + "rpx",
  88635. paddingTop: Number($setup.statusBarHeight + 108) + "rpx"
  88636. }
  88637. ])
  88638. },
  88639. [
  88640. vue.createVNode(_component_s_goods_item, {
  88641. class: "goods-box",
  88642. img: $setup.state.data.headRecord.picUrl,
  88643. title: $setup.state.data.headRecord.spuName,
  88644. price: $setup.state.data.headRecord.combinationPrice,
  88645. priceColor: "#E1212B",
  88646. onClick: _cache[0] || (_cache[0] = ($event) => $setup.sheep.$router.go("/pages/goods/groupon", {
  88647. id: $setup.state.data.headRecord.activityId
  88648. })),
  88649. style: vue.normalizeStyle([{ top: Number($setup.statusBarHeight + 108) + "rpx" }])
  88650. }, {
  88651. groupon: vue.withCtx(() => [
  88652. vue.createElementVNode("view", { class: "ss-flex" }, [
  88653. vue.createElementVNode(
  88654. "view",
  88655. { class: "sales-title" },
  88656. vue.toDisplayString($setup.state.data.headRecord.userSize) + "人团",
  88657. 1
  88658. /* TEXT */
  88659. ),
  88660. vue.createElementVNode(
  88661. "view",
  88662. { class: "num-title ss-m-l-20" },
  88663. "已拼" + vue.toDisplayString($setup.state.data.headRecord.userCount) + "件",
  88664. 1
  88665. /* TEXT */
  88666. )
  88667. ])
  88668. ]),
  88669. _: 1
  88670. /* STABLE */
  88671. }, 8, ["img", "title", "price", "style"])
  88672. ],
  88673. 4
  88674. /* STYLE */
  88675. )) : vue.createCommentVNode("v-if", true),
  88676. vue.createElementVNode("view", { class: "countdown-box detail-card ss-p-t-44 ss-flex-col ss-col-center" }, [
  88677. vue.createCommentVNode(" 情况一:拼团成功 "),
  88678. $setup.state.data.headRecord.status === 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [
  88679. $setup.state.data.orderId ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [
  88680. vue.createElementVNode("view", { class: "countdown-title ss-flex" }, [
  88681. vue.createElementVNode("text", { class: "cicon-check-round" }),
  88682. vue.createTextVNode(" 恭喜您~拼团成功 ")
  88683. ])
  88684. ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1 }, [
  88685. vue.createElementVNode("view", { class: "countdown-title ss-flex" }, [
  88686. vue.createElementVNode("text", { class: "cicon-info" }),
  88687. vue.createTextVNode(" 抱歉~该团已满员 ")
  88688. ])
  88689. ]))
  88690. ])) : vue.createCommentVNode("v-if", true),
  88691. vue.createCommentVNode(" 情况二:拼团失败 "),
  88692. $setup.state.data.headRecord.status === 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1 }, [
  88693. vue.createElementVNode("view", { class: "countdown-title ss-flex" }, [
  88694. vue.createElementVNode("text", { class: "cicon-info" }),
  88695. vue.createTextVNode(
  88696. " " + vue.toDisplayString($setup.state.data.orderId ? "拼团超时,已自动退款" : "该团已解散"),
  88697. 1
  88698. /* TEXT */
  88699. )
  88700. ])
  88701. ])) : vue.createCommentVNode("v-if", true),
  88702. vue.createCommentVNode(" 情况三:拼团进行中 "),
  88703. $setup.state.data.headRecord.status === 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2 }, [
  88704. $setup.state.data.headRecord.expireTime <= (/* @__PURE__ */ new Date()).getTime() ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [
  88705. vue.createElementVNode("view", { class: "countdown-title ss-flex" }, [
  88706. vue.createElementVNode("text", { class: "cicon-info" }),
  88707. vue.createTextVNode(" 拼团已结束,请关注下次活动 ")
  88708. ])
  88709. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  88710. key: 1,
  88711. class: "countdown-title ss-flex"
  88712. }, [
  88713. vue.createTextVNode(" 还差 "),
  88714. vue.createElementVNode(
  88715. "view",
  88716. { class: "num" },
  88717. vue.toDisplayString($setup.state.data.headRecord.userSize - $setup.state.data.headRecord.userCount) + "人",
  88718. 1
  88719. /* TEXT */
  88720. ),
  88721. vue.createTextVNode(" 拼团成功 "),
  88722. vue.createElementVNode("view", { class: "ss-flex countdown-time" }, [
  88723. vue.createElementVNode(
  88724. "view",
  88725. { class: "countdown-h ss-flex ss-row-center" },
  88726. vue.toDisplayString($setup.endTime.h),
  88727. 1
  88728. /* TEXT */
  88729. ),
  88730. vue.createElementVNode("view", { class: "ss-m-x-4" }, ":"),
  88731. vue.createElementVNode(
  88732. "view",
  88733. { class: "countdown-num ss-flex ss-row-center" },
  88734. vue.toDisplayString($setup.endTime.m),
  88735. 1
  88736. /* TEXT */
  88737. ),
  88738. vue.createElementVNode("view", { class: "ss-m-x-4" }, ":"),
  88739. vue.createElementVNode(
  88740. "view",
  88741. { class: "countdown-num ss-flex ss-row-center" },
  88742. vue.toDisplayString($setup.endTime.s),
  88743. 1
  88744. /* TEXT */
  88745. )
  88746. ])
  88747. ]))
  88748. ])) : vue.createCommentVNode("v-if", true),
  88749. vue.createCommentVNode(" 拼团的记录列表,展示每个参团人 "),
  88750. vue.createElementVNode("view", { class: "ss-m-t-60 ss-flex ss-flex-wrap ss-row-center" }, [
  88751. vue.createCommentVNode(" 团长 "),
  88752. vue.createElementVNode("view", { class: "header-avatar ss-m-r-24 ss-m-b-20" }, [
  88753. vue.createElementVNode("image", {
  88754. src: $setup.sheep.$url.cdn($setup.state.data.headRecord.avatar),
  88755. class: "avatar-img"
  88756. }, null, 8, ["src"]),
  88757. vue.createElementVNode("view", { class: "header-tag ss-flex ss-col-center ss-row-center" }, "团长")
  88758. ]),
  88759. vue.createCommentVNode(" 团员 "),
  88760. (vue.openBlock(true), vue.createElementBlock(
  88761. vue.Fragment,
  88762. null,
  88763. vue.renderList($setup.state.data.memberRecords, (item) => {
  88764. return vue.openBlock(), vue.createElementBlock("view", {
  88765. class: "header-avatar ss-m-r-24 ss-m-b-20",
  88766. key: item.id
  88767. }, [
  88768. vue.createElementVNode("image", {
  88769. src: $setup.sheep.$url.cdn(item.avatar),
  88770. class: "avatar-img"
  88771. }, null, 8, ["src"]),
  88772. item.is_leader == "1" ? (vue.openBlock(), vue.createElementBlock("view", {
  88773. key: 0,
  88774. class: "header-tag ss-flex ss-col-center ss-row-center"
  88775. }, " 团长 ")) : vue.createCommentVNode("v-if", true)
  88776. ]);
  88777. }),
  88778. 128
  88779. /* KEYED_FRAGMENT */
  88780. )),
  88781. vue.createCommentVNode(" 还有几个坑位 "),
  88782. (vue.openBlock(true), vue.createElementBlock(
  88783. vue.Fragment,
  88784. null,
  88785. vue.renderList($setup.state.remainNumber, (item) => {
  88786. return vue.openBlock(), vue.createElementBlock("view", {
  88787. class: "default-avatar ss-m-r-24 ss-m-b-20",
  88788. key: item
  88789. }, [
  88790. vue.createElementVNode("image", {
  88791. src: $setup.sheep.$url.static("/static/images/unknown.png"),
  88792. class: "avatar-img"
  88793. }, null, 8, ["src"])
  88794. ]);
  88795. }),
  88796. 128
  88797. /* KEYED_FRAGMENT */
  88798. ))
  88799. ])
  88800. ]),
  88801. vue.createCommentVNode(" 情况一:拼团成功;情况二:拼团失败 "),
  88802. $setup.state.data.headRecord.status === 1 || $setup.state.data.headRecord.status === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  88803. key: 1,
  88804. class: "ss-m-t-40 ss-flex ss-row-center"
  88805. }, [
  88806. $setup.state.data.orderId ? (vue.openBlock(), vue.createElementBlock("button", {
  88807. key: 0,
  88808. class: "ss-reset-button order-btn",
  88809. onClick: _cache[1] || (_cache[1] = ($event) => $setup.onDetail($setup.state.data.orderId))
  88810. }, " 查看订单 ")) : (vue.openBlock(), vue.createElementBlock("button", {
  88811. key: 1,
  88812. class: "ss-reset-button join-btn",
  88813. onClick: $setup.onCreateGroupon
  88814. }, " 我要开团 "))
  88815. ])) : vue.createCommentVNode("v-if", true),
  88816. vue.createCommentVNode(" 情况三:拼团进行中,查看订单或参加或邀请好友或参加 "),
  88817. $setup.state.data.headRecord.status === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  88818. key: 2,
  88819. class: "ss-m-t-40 ss-flex ss-row-center"
  88820. }, [
  88821. $setup.state.data.headRecord.expireTime <= (/* @__PURE__ */ new Date()).getTime() ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [
  88822. $setup.state.data.orderId ? (vue.openBlock(), vue.createElementBlock("button", {
  88823. key: 0,
  88824. class: "ss-reset-button join-btn",
  88825. onClick: _cache[2] || (_cache[2] = ($event) => $setup.onDetail($setup.state.data.orderId))
  88826. }, " 查看订单 ")) : (vue.openBlock(), vue.createElementBlock("button", {
  88827. key: 1,
  88828. class: "ss-reset-button disabled-btn",
  88829. disabled: "",
  88830. onClick: _cache[3] || (_cache[3] = ($event) => $setup.onDetail($setup.state.data.orderId))
  88831. }, " 去参团 "))
  88832. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  88833. key: 1,
  88834. class: "ss-flex ss-row-center"
  88835. }, [
  88836. $setup.state.data.orderId ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [
  88837. vue.createElementVNode("button", {
  88838. class: "ss-reset-button join-btn",
  88839. disabled: $setup.endTime.ms <= 0,
  88840. onClick: $setup.onShare
  88841. }, " 邀请好友来拼团 ", 8, ["disabled"])
  88842. ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1 }, [
  88843. vue.createElementVNode("button", {
  88844. class: "ss-reset-button join-btn",
  88845. disabled: $setup.endTime.ms <= 0,
  88846. onClick: _cache[4] || (_cache[4] = ($event) => $setup.onJoinGroupon())
  88847. }, " 立即参团 ", 8, ["disabled"])
  88848. ]))
  88849. ]))
  88850. ])) : vue.createCommentVNode("v-if", true),
  88851. vue.createCommentVNode(" TODO 非繁人:这里暂时没接入 "),
  88852. $setup.state.data.goods ? (vue.openBlock(), vue.createElementBlock("view", { key: 3 }, [
  88853. vue.createVNode(_component_s_select_groupon_sku, {
  88854. show: $setup.state.showSelectSku,
  88855. goodsInfo: $setup.state.data.goods,
  88856. grouponAction: $setup.state.grouponAction,
  88857. grouponNum: $setup.state.grouponNum,
  88858. onBuy: $setup.onBuy,
  88859. onChange: $setup.onSkuChange,
  88860. onClose: _cache[5] || (_cache[5] = ($event) => $setup.state.showSelectSku = false)
  88861. }, null, 8, ["show", "goodsInfo", "grouponAction", "grouponNum"])
  88862. ])) : vue.createCommentVNode("v-if", true)
  88863. ])) : vue.createCommentVNode("v-if", true),
  88864. !$setup.state.data && !$setup.state.loading ? (vue.openBlock(), vue.createBlock(_component_s_empty, {
  88865. key: 2,
  88866. icon: "/static/goods-empty.png"
  88867. })) : vue.createCommentVNode("v-if", true)
  88868. ]),
  88869. _: 1
  88870. /* STABLE */
  88871. }, 8, ["navbar", "onShareAppMessage"]);
  88872. }
  88873. const PagesActivityGrouponDetail = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8], ["__scopeId", "data-v-f4b0e588"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/activity/groupon/detail.vue"]]);
  88874. const _sfc_main$8 = {
  88875. __name: "order",
  88876. setup(__props, { expose: __expose }) {
  88877. __expose();
  88878. const state = vue.reactive({
  88879. currentTab: 0,
  88880. pagination: {
  88881. list: [],
  88882. total: 0,
  88883. pageNo: 1,
  88884. pageSize: 5
  88885. },
  88886. loadStatus: "",
  88887. deleteOrderId: 0
  88888. });
  88889. const tabMaps = [
  88890. {
  88891. name: "全部"
  88892. },
  88893. {
  88894. name: "进行中",
  88895. value: 0
  88896. },
  88897. {
  88898. name: "拼团成功",
  88899. value: 1
  88900. },
  88901. {
  88902. name: "拼团失败",
  88903. value: 2
  88904. }
  88905. ];
  88906. function onTabsChange(e2) {
  88907. resetPagination(state.pagination);
  88908. state.currentTab = e2.index;
  88909. getGrouponList();
  88910. }
  88911. async function getGrouponList() {
  88912. state.loadStatus = "loading";
  88913. const { code: code2, data } = await CombinationApi.getCombinationRecordPage({
  88914. pageNo: state.pagination.pageNo,
  88915. pageSize: state.pagination.pageSize,
  88916. status: tabMaps[state.currentTab].value
  88917. });
  88918. if (code2 !== 0) {
  88919. return;
  88920. }
  88921. state.pagination.list = _$1.concat(state.pagination.list, data.list);
  88922. state.pagination.total = data.total;
  88923. state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore";
  88924. }
  88925. onLoad((options2) => {
  88926. if (options2.type) {
  88927. state.currentTab = options2.type;
  88928. }
  88929. getGrouponList();
  88930. });
  88931. function loadMore() {
  88932. if (state.loadStatus === "noMore") {
  88933. return;
  88934. }
  88935. state.pagination.pageNo++;
  88936. getGrouponList();
  88937. }
  88938. onReachBottom(() => {
  88939. loadMore();
  88940. });
  88941. onPullDownRefresh(() => {
  88942. getGrouponList();
  88943. setTimeout(function() {
  88944. uni.stopPullDownRefresh();
  88945. }, 800);
  88946. });
  88947. const __returned__ = { state, tabMaps, onTabsChange, getGrouponList, loadMore, reactive: vue.reactive, get onLoad() {
  88948. return onLoad;
  88949. }, get onReachBottom() {
  88950. return onReachBottom;
  88951. }, get onPullDownRefresh() {
  88952. return onPullDownRefresh;
  88953. }, get sheep() {
  88954. return sheep$1;
  88955. }, get _() {
  88956. return _$1;
  88957. }, get formatOrderColor() {
  88958. return formatOrderColor;
  88959. }, get resetPagination() {
  88960. return resetPagination;
  88961. }, get CombinationApi() {
  88962. return CombinationApi;
  88963. } };
  88964. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  88965. return __returned__;
  88966. }
  88967. };
  88968. function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
  88969. const _component_su_tabs = resolveEasycom(vue.resolveDynamicComponent("su-tabs"), __easycom_0$a);
  88970. const _component_su_sticky = resolveEasycom(vue.resolveDynamicComponent("su-sticky"), __easycom_0$9);
  88971. const _component_s_empty = resolveEasycom(vue.resolveDynamicComponent("s-empty"), __easycom_2$6);
  88972. const _component_s_goods_item = resolveEasycom(vue.resolveDynamicComponent("s-goods-item"), __easycom_3$5);
  88973. const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5);
  88974. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  88975. return vue.openBlock(), vue.createBlock(_component_s_layout, { title: "我的拼团" }, {
  88976. default: vue.withCtx(() => [
  88977. vue.createVNode(_component_su_sticky, { bgColor: "#fff" }, {
  88978. default: vue.withCtx(() => [
  88979. vue.createVNode(_component_su_tabs, {
  88980. list: $setup.tabMaps,
  88981. scrollable: false,
  88982. onChange: $setup.onTabsChange,
  88983. current: $setup.state.currentTab
  88984. }, null, 8, ["current"])
  88985. ]),
  88986. _: 1
  88987. /* STABLE */
  88988. }),
  88989. $setup.state.pagination.total === 0 ? (vue.openBlock(), vue.createBlock(_component_s_empty, {
  88990. key: 0,
  88991. icon: "/static/goods-empty.png"
  88992. })) : vue.createCommentVNode("v-if", true),
  88993. $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1 }, [
  88994. (vue.openBlock(true), vue.createElementBlock(
  88995. vue.Fragment,
  88996. null,
  88997. vue.renderList($setup.state.pagination.list, (record) => {
  88998. return vue.openBlock(), vue.createElementBlock("view", {
  88999. class: "order-list-card-box bg-white ss-r-10 ss-m-t-14 ss-m-20",
  89000. key: record.id
  89001. }, [
  89002. vue.createElementVNode("view", { class: "order-card-header ss-flex ss-col-center ss-row-between ss-p-x-20" }, [
  89003. vue.createElementVNode(
  89004. "view",
  89005. { class: "order-no" },
  89006. "拼团编号:" + vue.toDisplayString(record.id),
  89007. 1
  89008. /* TEXT */
  89009. ),
  89010. vue.createElementVNode(
  89011. "view",
  89012. {
  89013. class: vue.normalizeClass(["ss-font-26", $setup.formatOrderColor(record)])
  89014. },
  89015. vue.toDisplayString($setup.tabMaps.find((item) => item.value === record.status).name),
  89016. 3
  89017. /* TEXT, CLASS */
  89018. )
  89019. ]),
  89020. vue.createElementVNode("view", { class: "border-bottom" }, [
  89021. vue.createVNode(_component_s_goods_item, {
  89022. img: record.picUrl,
  89023. title: record.spuName,
  89024. price: record.combinationPrice
  89025. }, {
  89026. groupon: vue.withCtx(() => [
  89027. vue.createElementVNode("view", { class: "ss-flex" }, [
  89028. vue.createElementVNode(
  89029. "view",
  89030. { class: "sales-title" },
  89031. vue.toDisplayString(record.userSize) + " 人团 ",
  89032. 1
  89033. /* TEXT */
  89034. )
  89035. ])
  89036. ]),
  89037. _: 2
  89038. /* DYNAMIC */
  89039. }, 1032, ["img", "title", "price"])
  89040. ]),
  89041. vue.createElementVNode("view", { class: "order-card-footer ss-flex ss-row-right ss-p-x-20" }, [
  89042. vue.createElementVNode("button", {
  89043. class: "detail-btn ss-reset-button",
  89044. onClick: ($event) => $setup.sheep.$router.go("/pages/order/detail", { id: record.orderId })
  89045. }, " 订单详情 ", 8, ["onClick"]),
  89046. vue.createElementVNode("button", {
  89047. class: vue.normalizeClass(["tool-btn ss-reset-button", { "ui-BG-Main-Gradient": record.status === 0 }]),
  89048. onClick: ($event) => $setup.sheep.$router.go("/pages/activity/groupon/detail", { id: record.id })
  89049. }, vue.toDisplayString(record.status === 0 ? "邀请拼团" : "拼团详情"), 11, ["onClick"])
  89050. ])
  89051. ]);
  89052. }),
  89053. 128
  89054. /* KEYED_FRAGMENT */
  89055. ))
  89056. ])) : vue.createCommentVNode("v-if", true),
  89057. $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, {
  89058. key: 2,
  89059. status: $setup.state.loadStatus,
  89060. "content-text": {
  89061. contentdown: "上拉加载更多"
  89062. },
  89063. onClick: $setup.loadMore
  89064. }, null, 8, ["status"])) : vue.createCommentVNode("v-if", true)
  89065. ]),
  89066. _: 1
  89067. /* STABLE */
  89068. });
  89069. }
  89070. const PagesActivityGrouponOrder = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7], ["__scopeId", "data-v-5be50f68"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/activity/groupon/order.vue"]]);
  89071. const _imports_0 = "/static/activity-left.png";
  89072. const _imports_1 = "/static/activity-right.png";
  89073. const _sfc_main$7 = {
  89074. __name: "index",
  89075. setup(__props, { expose: __expose }) {
  89076. __expose();
  89077. const state = vue.reactive({
  89078. activityId: 0,
  89079. // 获得编号
  89080. activityInfo: {},
  89081. // 获得信息
  89082. pagination: {
  89083. list: [],
  89084. total: 1,
  89085. pageNo: 1,
  89086. pageSize: 8
  89087. },
  89088. loadStatus: "",
  89089. leftGoodsList: [],
  89090. rightGoodsList: []
  89091. });
  89092. let count = 0;
  89093. let leftHeight = 0;
  89094. let rightHeight = 0;
  89095. function mountMasonry(height = 0, where = "left") {
  89096. if (!state.pagination.list[count])
  89097. return;
  89098. if (where === "left") {
  89099. leftHeight += height;
  89100. } else {
  89101. rightHeight += height;
  89102. }
  89103. if (leftHeight <= rightHeight) {
  89104. state.leftGoodsList.push(state.pagination.list[count]);
  89105. } else {
  89106. state.rightGoodsList.push(state.pagination.list[count]);
  89107. }
  89108. count++;
  89109. }
  89110. async function getList() {
  89111. const params = {};
  89112. if (state.activityInfo.productScope === 2) {
  89113. params.ids = state.activityInfo.productSpuIds.join(",");
  89114. } else if (state.activityInfo.productScope === 3) {
  89115. params.categoryIds = state.activityInfo.productSpuIds.join(",");
  89116. }
  89117. state.loadStatus = "loading";
  89118. const { code: code2, data } = await SpuApi.getSpuPage({
  89119. pageNo: state.pagination.pageNo,
  89120. pageSize: state.pagination.pageSize,
  89121. ...params
  89122. });
  89123. if (code2 !== 0) {
  89124. return;
  89125. }
  89126. state.pagination.list = _$1.concat(state.pagination.list, data.list);
  89127. state.pagination.total = data.total;
  89128. state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore";
  89129. mountMasonry();
  89130. }
  89131. async function getActivity(id) {
  89132. const { code: code2, data } = await RewardActivityApi.getRewardActivity(id);
  89133. if (code2 === 0) {
  89134. state.activityInfo = data;
  89135. }
  89136. }
  89137. function loadMore() {
  89138. if (state.loadStatus === "noMore") {
  89139. return;
  89140. }
  89141. state.pagination.pageNo++;
  89142. getList();
  89143. }
  89144. onReachBottom(() => {
  89145. loadMore();
  89146. });
  89147. onLoad(async (options2) => {
  89148. state.activityId = options2.activityId;
  89149. await getActivity(state.activityId);
  89150. await getList(state.activityId);
  89151. });
  89152. const __returned__ = { state, get count() {
  89153. return count;
  89154. }, set count(v2) {
  89155. count = v2;
  89156. }, get leftHeight() {
  89157. return leftHeight;
  89158. }, set leftHeight(v2) {
  89159. leftHeight = v2;
  89160. }, get rightHeight() {
  89161. return rightHeight;
  89162. }, set rightHeight(v2) {
  89163. rightHeight = v2;
  89164. }, mountMasonry, getList, getActivity, loadMore, reactive: vue.reactive, get onLoad() {
  89165. return onLoad;
  89166. }, get onReachBottom() {
  89167. return onReachBottom;
  89168. }, get sheep() {
  89169. return sheep$1;
  89170. }, get _() {
  89171. return _$1;
  89172. }, get RewardActivityApi() {
  89173. return RewardActivityApi;
  89174. }, get formatRewardActivityRule() {
  89175. return formatRewardActivityRule;
  89176. }, get SpuApi() {
  89177. return SpuApi;
  89178. } };
  89179. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  89180. return __returned__;
  89181. }
  89182. };
  89183. function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
  89184. const _component_su_sticky = resolveEasycom(vue.resolveDynamicComponent("su-sticky"), __easycom_0$9);
  89185. const _component_s_goods_column = resolveEasycom(vue.resolveDynamicComponent("s-goods-column"), __easycom_1$4);
  89186. const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5);
  89187. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  89188. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  89189. class: "activity-wrap",
  89190. title: $setup.state.activityInfo.title
  89191. }, {
  89192. default: vue.withCtx(() => [
  89193. vue.createCommentVNode(" 活动信息 "),
  89194. vue.createVNode(_component_su_sticky, { bgColor: "#fff" }, {
  89195. default: vue.withCtx(() => [
  89196. vue.createElementVNode("view", { class: "ss-flex ss-col-top tip-box" }, [
  89197. vue.createElementVNode("view", { class: "type-text ss-flex ss-row-center" }, "满减:"),
  89198. vue.createElementVNode("view", { class: "ss-flex-1" }, [
  89199. (vue.openBlock(true), vue.createElementBlock(
  89200. vue.Fragment,
  89201. null,
  89202. vue.renderList($setup.state.activityInfo.rules, (item) => {
  89203. return vue.openBlock(), vue.createElementBlock(
  89204. "view",
  89205. {
  89206. class: "tip-content",
  89207. key: item
  89208. },
  89209. vue.toDisplayString($setup.formatRewardActivityRule($setup.state.activityInfo, item)),
  89210. 1
  89211. /* TEXT */
  89212. );
  89213. }),
  89214. 128
  89215. /* KEYED_FRAGMENT */
  89216. ))
  89217. ]),
  89218. vue.createElementVNode("image", {
  89219. class: "activity-left-image",
  89220. src: _imports_0
  89221. }),
  89222. vue.createElementVNode("image", {
  89223. class: "activity-right-image",
  89224. src: _imports_1
  89225. })
  89226. ])
  89227. ]),
  89228. _: 1
  89229. /* STABLE */
  89230. }),
  89231. vue.createCommentVNode(" 商品信息 "),
  89232. vue.createElementVNode("view", { class: "ss-flex ss-flex-wrap ss-p-x-20 ss-m-t-20 ss-col-top" }, [
  89233. vue.createElementVNode("view", { class: "goods-list-box" }, [
  89234. (vue.openBlock(true), vue.createElementBlock(
  89235. vue.Fragment,
  89236. null,
  89237. vue.renderList($setup.state.leftGoodsList, (item) => {
  89238. return vue.openBlock(), vue.createElementBlock("view", {
  89239. class: "left-list",
  89240. key: item.id
  89241. }, [
  89242. vue.createVNode(_component_s_goods_column, {
  89243. class: "goods-md-box",
  89244. size: "md",
  89245. data: item,
  89246. onClick: ($event) => $setup.sheep.$router.go("/pages/goods/index", { id: item.id }),
  89247. onGetHeight: _cache[0] || (_cache[0] = ($event) => $setup.mountMasonry($event, "left"))
  89248. }, {
  89249. cart: vue.withCtx(() => [
  89250. vue.createElementVNode("button", { class: "ss-reset-button cart-btn" })
  89251. ]),
  89252. _: 2
  89253. /* DYNAMIC */
  89254. }, 1032, ["data", "onClick"])
  89255. ]);
  89256. }),
  89257. 128
  89258. /* KEYED_FRAGMENT */
  89259. ))
  89260. ]),
  89261. vue.createElementVNode("view", { class: "goods-list-box" }, [
  89262. (vue.openBlock(true), vue.createElementBlock(
  89263. vue.Fragment,
  89264. null,
  89265. vue.renderList($setup.state.rightGoodsList, (item) => {
  89266. return vue.openBlock(), vue.createElementBlock("view", {
  89267. class: "right-list",
  89268. key: item.id
  89269. }, [
  89270. vue.createVNode(_component_s_goods_column, {
  89271. class: "goods-md-box",
  89272. size: "md",
  89273. data: item,
  89274. onClick: ($event) => $setup.sheep.$router.go("/pages/goods/index", { id: item.id }),
  89275. onGetHeight: _cache[1] || (_cache[1] = ($event) => $setup.mountMasonry($event, "right"))
  89276. }, {
  89277. cart: vue.withCtx(() => [
  89278. vue.createElementVNode("button", { class: "ss-reset-button cart-btn" })
  89279. ]),
  89280. _: 2
  89281. /* DYNAMIC */
  89282. }, 1032, ["data", "onClick"])
  89283. ]);
  89284. }),
  89285. 128
  89286. /* KEYED_FRAGMENT */
  89287. ))
  89288. ])
  89289. ]),
  89290. $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, {
  89291. key: 0,
  89292. status: $setup.state.loadStatus,
  89293. "content-text": {
  89294. contentdown: "上拉加载更多"
  89295. },
  89296. onClick: $setup.loadMore
  89297. }, null, 8, ["status"])) : vue.createCommentVNode("v-if", true)
  89298. ]),
  89299. _: 1
  89300. /* STABLE */
  89301. }, 8, ["title"]);
  89302. }
  89303. const PagesActivityIndex = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6], ["__scopeId", "data-v-2c61ebca"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/activity/index.vue"]]);
  89304. const _sfc_main$6 = {
  89305. __name: "list",
  89306. setup(__props, { expose: __expose }) {
  89307. __expose();
  89308. vue.useCssVars((_ctx) => ({
  89309. "628ec892-headerBg": vue.unref(headerBg)
  89310. }));
  89311. const { safeAreaInsets, safeArea } = sheep$1.$platform.device;
  89312. const sysNavBar = sheep$1.$platform.navbar;
  89313. const statusBarHeight = sheep$1.$platform.device.statusBarHeight * 2;
  89314. const pageHeight = (safeArea.height + safeAreaInsets.bottom) * 2 + statusBarHeight - sysNavBar - 350;
  89315. const headerBg = sheep$1.$url.css("/static/img/shop/goods/groupon-header.png");
  89316. const state = vue.reactive({
  89317. pagination: {
  89318. list: [],
  89319. total: 0,
  89320. pageNo: 1,
  89321. pageSize: 10
  89322. },
  89323. loadStatus: "",
  89324. summaryData: {}
  89325. });
  89326. const getSummary = async () => {
  89327. const { data } = await CombinationApi.getCombinationRecordSummary();
  89328. state.summaryData = data;
  89329. };
  89330. async function getList() {
  89331. state.loadStatus = "loading";
  89332. const { data } = await CombinationApi.getCombinationActivityPage({
  89333. pageNo: state.pagination.pageNo,
  89334. pageSize: state.pagination.pageSize
  89335. });
  89336. data.list.forEach((activity) => {
  89337. state.pagination.list.push({ ...activity, price: activity.combinationPrice });
  89338. });
  89339. state.pagination.total = data.total;
  89340. state.loadStatus = state.pagination.list.length < state.pagination.total ? "more" : "noMore";
  89341. }
  89342. function loadMore() {
  89343. if (state.loadStatus === "noMore") {
  89344. return;
  89345. }
  89346. state.pagination.pageNo++;
  89347. getList();
  89348. }
  89349. onReachBottom(() => loadMore());
  89350. onLoad(() => {
  89351. getSummary();
  89352. getList();
  89353. });
  89354. const __returned__ = { safeAreaInsets, safeArea, sysNavBar, statusBarHeight, pageHeight, headerBg, state, getSummary, getList, loadMore, reactive: vue.reactive, get onLoad() {
  89355. return onLoad;
  89356. }, get onReachBottom() {
  89357. return onReachBottom;
  89358. }, get sheep() {
  89359. return sheep$1;
  89360. }, get CombinationApi() {
  89361. return CombinationApi;
  89362. } };
  89363. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  89364. return __returned__;
  89365. }
  89366. };
  89367. function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
  89368. const _component_s_goods_column = resolveEasycom(vue.resolveDynamicComponent("s-goods-column"), __easycom_1$4);
  89369. const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5);
  89370. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  89371. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  89372. navbar: "inner",
  89373. bgStyle: { color: "#FE832A" }
  89374. }, {
  89375. default: vue.withCtx(() => [
  89376. vue.createElementVNode(
  89377. "view",
  89378. {
  89379. class: "page-bg",
  89380. style: vue.normalizeStyle([{ marginTop: "-" + Number($setup.statusBarHeight + 88) + "rpx" }])
  89381. },
  89382. null,
  89383. 4
  89384. /* STYLE */
  89385. ),
  89386. vue.createElementVNode("view", { class: "list-content" }, [
  89387. vue.createCommentVNode(" 参团会员统计 "),
  89388. vue.createElementVNode("view", { class: "content-header ss-flex-col ss-col-center ss-row-center" }, [
  89389. vue.createElementVNode("view", { class: "content-header-title ss-flex ss-row-center" }, [
  89390. (vue.openBlock(true), vue.createElementBlock(
  89391. vue.Fragment,
  89392. null,
  89393. vue.renderList($setup.state.summaryData.avatars, (item, index2) => {
  89394. return vue.openBlock(), vue.createElementBlock(
  89395. "view",
  89396. {
  89397. key: index2,
  89398. class: "picture",
  89399. style: vue.normalizeStyle(index2 === 6 ? "position: relative" : "position: static")
  89400. },
  89401. [
  89402. vue.createElementVNode(
  89403. "span",
  89404. {
  89405. class: "avatar",
  89406. style: vue.normalizeStyle(`background-image: url(${item})`)
  89407. },
  89408. null,
  89409. 4
  89410. /* STYLE */
  89411. ),
  89412. index2 === 6 && $setup.state.summaryData.avatars.length > 3 ? (vue.openBlock(), vue.createElementBlock("span", {
  89413. key: 0,
  89414. class: "mengceng"
  89415. }, [
  89416. vue.createElementVNode("i", null, "···")
  89417. ])) : vue.createCommentVNode("v-if", true)
  89418. ],
  89419. 4
  89420. /* STYLE */
  89421. );
  89422. }),
  89423. 128
  89424. /* KEYED_FRAGMENT */
  89425. )),
  89426. vue.createElementVNode(
  89427. "text",
  89428. { class: "pic_count" },
  89429. vue.toDisplayString($setup.state.summaryData.userCount || 0) + "人参与",
  89430. 1
  89431. /* TEXT */
  89432. )
  89433. ])
  89434. ]),
  89435. vue.createElementVNode(
  89436. "scroll-view",
  89437. {
  89438. class: "scroll-box",
  89439. style: vue.normalizeStyle({ height: $setup.pageHeight + "rpx" }),
  89440. "scroll-y": "true",
  89441. "scroll-with-animation": false,
  89442. "enable-back-to-top": true
  89443. },
  89444. [
  89445. (vue.openBlock(true), vue.createElementBlock(
  89446. vue.Fragment,
  89447. null,
  89448. vue.renderList($setup.state.pagination.list, (item) => {
  89449. return vue.openBlock(), vue.createElementBlock("view", {
  89450. class: "goods-box ss-m-b-20",
  89451. key: item.id
  89452. }, [
  89453. vue.createVNode(_component_s_goods_column, {
  89454. class: "",
  89455. size: "lg",
  89456. data: item,
  89457. grouponTag: true,
  89458. onClick: ($event) => $setup.sheep.$router.go("/pages/goods/groupon", { id: item.id })
  89459. }, {
  89460. cart: vue.withCtx(() => [
  89461. vue.createElementVNode("button", { class: "ss-reset-button cart-btn" }, "去拼团")
  89462. ]),
  89463. _: 2
  89464. /* DYNAMIC */
  89465. }, 1032, ["data", "onClick"])
  89466. ]);
  89467. }),
  89468. 128
  89469. /* KEYED_FRAGMENT */
  89470. )),
  89471. $setup.state.pagination.total > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, {
  89472. key: 0,
  89473. status: $setup.state.loadStatus,
  89474. "content-text": {
  89475. contentdown: "上拉加载更多"
  89476. },
  89477. onClick: $setup.loadMore
  89478. }, null, 8, ["status"])) : vue.createCommentVNode("v-if", true)
  89479. ],
  89480. 4
  89481. /* STYLE */
  89482. )
  89483. ])
  89484. ]),
  89485. _: 1
  89486. /* STABLE */
  89487. });
  89488. }
  89489. const PagesActivityGrouponList = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5], ["__scopeId", "data-v-628ec892"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/activity/groupon/list.vue"]]);
  89490. const _sfc_main$5 = {
  89491. name: "AiProgress",
  89492. components: {},
  89493. props: {
  89494. // 进度条的值
  89495. percentage: {
  89496. type: [Number, String],
  89497. required: true
  89498. },
  89499. // 是否内联显示数据
  89500. textInside: {
  89501. type: Boolean,
  89502. default: false
  89503. },
  89504. // 进度条高度
  89505. strokeWidth: {
  89506. type: [Number, String],
  89507. default: 6
  89508. },
  89509. // 默认动画时长
  89510. duration: {
  89511. type: [Number, String],
  89512. default: 2e3
  89513. },
  89514. // 是否有动画
  89515. isAnimate: {
  89516. type: Boolean,
  89517. default: false
  89518. },
  89519. // 背景颜色
  89520. bgColor: {
  89521. type: String,
  89522. default: "linear-gradient(90deg, var(--ui-BG-Main) 0%, var(--ui-BG-Main-gradient) 100%)"
  89523. },
  89524. // 是否不显示数据
  89525. noData: {
  89526. type: Boolean,
  89527. default: false
  89528. },
  89529. // 是否自定义显示内容
  89530. lineData: {
  89531. type: Boolean,
  89532. default: false
  89533. },
  89534. // 自定义底色
  89535. inBgColor: {
  89536. type: String,
  89537. default: "#ebeef5"
  89538. }
  89539. },
  89540. data() {
  89541. return {
  89542. width: 0,
  89543. timer: null,
  89544. containerWidth: 0,
  89545. contentWidth: 0
  89546. };
  89547. },
  89548. methods: {
  89549. start() {
  89550. if (this.isAnimate) {
  89551. const container = uni.createSelectorQuery().in(this).selectAll("#container");
  89552. uni.createSelectorQuery().in(this).selectAll("#content");
  89553. container.boundingClientRect().exec((res1) => {
  89554. this.contentWidth = res1[0][0].width * 1 * (this.percentage * 1 / 100).toFixed(2) + "px";
  89555. });
  89556. }
  89557. }
  89558. },
  89559. mounted() {
  89560. this.$nextTick(() => {
  89561. this.start();
  89562. });
  89563. },
  89564. created() {
  89565. },
  89566. filters: {},
  89567. computed: {},
  89568. watch: {},
  89569. directives: {}
  89570. };
  89571. function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
  89572. return vue.openBlock(), vue.createElementBlock("view", null, [
  89573. $props.lineData ? (vue.openBlock(), vue.createElementBlock("view", {
  89574. key: 0,
  89575. class: "flex a-center content"
  89576. }, [
  89577. vue.createElementVNode("view", null, [
  89578. vue.renderSlot(_ctx.$slots, "content", {}, void 0, true)
  89579. ])
  89580. ])) : vue.createCommentVNode("v-if", true),
  89581. vue.createElementVNode("view", {
  89582. class: "flex a-center",
  89583. style: { "padding-right": "10rpx" }
  89584. }, [
  89585. vue.createElementVNode(
  89586. "view",
  89587. {
  89588. class: "progress-container",
  89589. id: "container",
  89590. ref: "progressContainer",
  89591. style: vue.normalizeStyle({ background: $props.inBgColor })
  89592. },
  89593. [
  89594. $props.isAnimate ? (vue.openBlock(), vue.createElementBlock(
  89595. "view",
  89596. {
  89597. key: 0,
  89598. class: "progress-content flex j-end",
  89599. id: "content",
  89600. ref: "progressContent",
  89601. style: vue.normalizeStyle({
  89602. height: $props.strokeWidth + "px",
  89603. background: $props.bgColor,
  89604. width: $data.contentWidth,
  89605. transition: `width ${$props.duration / 1e3}s ease`
  89606. })
  89607. },
  89608. [
  89609. $props.textInside && !$props.noData ? (vue.openBlock(), vue.createElementBlock("view", {
  89610. key: 0,
  89611. class: "textInside flex a-center j-center"
  89612. }, [
  89613. vue.createElementVNode(
  89614. "view",
  89615. { class: "text" },
  89616. vue.toDisplayString($props.percentage) + "%",
  89617. 1
  89618. /* TEXT */
  89619. )
  89620. ])) : vue.createCommentVNode("v-if", true)
  89621. ],
  89622. 4
  89623. /* STYLE */
  89624. )) : vue.createCommentVNode("v-if", true),
  89625. !$props.isAnimate ? (vue.openBlock(), vue.createElementBlock(
  89626. "view",
  89627. {
  89628. key: 1,
  89629. class: "progress-content flex j-end",
  89630. style: vue.normalizeStyle({ width: $props.percentage + "%", height: $props.strokeWidth + "px", background: $props.bgColor })
  89631. },
  89632. [
  89633. $props.textInside && !$props.noData ? (vue.openBlock(), vue.createElementBlock("view", {
  89634. key: 0,
  89635. class: "textInside flex a-center j-center"
  89636. }, [
  89637. vue.createElementVNode(
  89638. "view",
  89639. { class: "text" },
  89640. vue.toDisplayString($props.percentage) + "%",
  89641. 1
  89642. /* TEXT */
  89643. )
  89644. ])) : vue.createCommentVNode("v-if", true)
  89645. ],
  89646. 4
  89647. /* STYLE */
  89648. )) : vue.createCommentVNode("v-if", true)
  89649. ],
  89650. 4
  89651. /* STYLE */
  89652. ),
  89653. vue.createElementVNode("view", null, [
  89654. !$props.textInside && !$props.lineData && !$props.noData && !$props.isAnimate ? (vue.openBlock(), vue.createElementBlock(
  89655. "view",
  89656. {
  89657. key: 0,
  89658. class: "percentage"
  89659. },
  89660. vue.toDisplayString($props.percentage) + "% ",
  89661. 1
  89662. /* TEXT */
  89663. )) : vue.createCommentVNode("v-if", true)
  89664. ])
  89665. ])
  89666. ]);
  89667. }
  89668. const __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4], ["__scopeId", "data-v-e717a0ca"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/ui/su-progress/su-progress.vue"]]);
  89669. const _sfc_main$4 = {
  89670. __name: "list",
  89671. setup(__props, { expose: __expose }) {
  89672. __expose();
  89673. vue.useCssVars((_ctx) => ({
  89674. "de8354c5-headerBg": vue.unref(headerBg)
  89675. }));
  89676. const { safeAreaInsets, safeArea } = sheep$1.$platform.device;
  89677. const statusBarHeight = sheep$1.$platform.device.statusBarHeight * 2;
  89678. const pageHeight = (safeArea.height + safeAreaInsets.bottom) * 2 + statusBarHeight - sheep$1.$platform.navbar - 350;
  89679. const headerBg = sheep$1.$url.css("/static/img/shop/goods/seckill-header.png");
  89680. const goodsFields = {
  89681. name: { show: true },
  89682. introduction: { show: true },
  89683. price: { show: true },
  89684. marketPrice: { show: true }
  89685. };
  89686. const timeConfigList = vue.ref([]);
  89687. const getSeckillConfigList = async () => {
  89688. const { data } = await SeckillApi.getSeckillConfigList();
  89689. const now2 = dayjs();
  89690. const today = now2.format("YYYY-MM-DD");
  89691. data.forEach((config2, index2) => {
  89692. const startTime = dayjs(`${today} ${config2.startTime}`);
  89693. const endTime = dayjs(`${today} ${config2.endTime}`);
  89694. if (now2.isBefore(startTime)) {
  89695. config2.status = TimeStatusEnum.WAIT_START;
  89696. } else if (now2.isAfter(endTime)) {
  89697. config2.status = TimeStatusEnum.END;
  89698. } else {
  89699. config2.status = TimeStatusEnum.STARTED;
  89700. activeTimeIndex.value = index2;
  89701. }
  89702. });
  89703. timeConfigList.value = data;
  89704. handleChangeTimeConfig(activeTimeIndex.value);
  89705. scrollToTimeConfig(activeTimeIndex.value);
  89706. };
  89707. const activeTimeElId = vue.ref("");
  89708. const scrollToTimeConfig = (index2) => {
  89709. vue.nextTick(() => activeTimeElId.value = `timeItem${index2}`);
  89710. };
  89711. const activeTimeIndex = vue.ref(0);
  89712. const activeTimeConfig = vue.computed(() => timeConfigList.value[activeTimeIndex.value]);
  89713. const handleChangeTimeConfig = (index2) => {
  89714. activeTimeIndex.value = index2;
  89715. activityPageParams.pageNo = 1;
  89716. activityList.value = [];
  89717. getActivityList();
  89718. };
  89719. const countDown = vue.computed(() => {
  89720. var _a2;
  89721. const endTime = (_a2 = activeTimeConfig.value) == null ? void 0 : _a2.endTime;
  89722. if (endTime) {
  89723. return useDurationTime(`${dayjs().format("YYYY-MM-DD")} ${endTime}`);
  89724. }
  89725. });
  89726. const activityPageParams = vue.reactive({
  89727. id: 0,
  89728. // 时间段 ID
  89729. pageNo: 1,
  89730. // 页码
  89731. pageSize: 5
  89732. // 每页数量
  89733. });
  89734. const activityTotal = vue.ref(0);
  89735. const activityList = vue.ref([]);
  89736. const loadStatus = vue.ref("");
  89737. async function getActivityList() {
  89738. loadStatus.value = "loading";
  89739. const { data } = await SeckillApi.getSeckillActivityPage(activityPageParams);
  89740. data.list.forEach((activity) => {
  89741. activity.percent = parseInt(100 * (activity.totalStock - activity.stock) / activity.totalStock);
  89742. });
  89743. activityList.value = activityList.value.concat(...data.list);
  89744. activityTotal.value = data.total;
  89745. loadStatus.value = activityList.value.length < activityTotal.value ? "more" : "noMore";
  89746. }
  89747. function loadMore() {
  89748. if (loadStatus.value !== "noMore") {
  89749. activityPageParams.pageNo += 1;
  89750. getActivityList();
  89751. }
  89752. }
  89753. onReachBottom(() => loadMore());
  89754. onLoad(async () => {
  89755. await getSeckillConfigList();
  89756. });
  89757. const __returned__ = { safeAreaInsets, safeArea, statusBarHeight, pageHeight, headerBg, goodsFields, timeConfigList, getSeckillConfigList, activeTimeElId, scrollToTimeConfig, activeTimeIndex, activeTimeConfig, handleChangeTimeConfig, countDown, activityPageParams, activityTotal, activityList, loadStatus, getActivityList, loadMore, reactive: vue.reactive, computed: vue.computed, ref: vue.ref, nextTick: vue.nextTick, get onLoad() {
  89758. return onLoad;
  89759. }, get onReachBottom() {
  89760. return onReachBottom;
  89761. }, get sheep() {
  89762. return sheep$1;
  89763. }, get useDurationTime() {
  89764. return useDurationTime;
  89765. }, get SeckillApi() {
  89766. return SeckillApi;
  89767. }, get dayjs() {
  89768. return dayjs;
  89769. }, get TimeStatusEnum() {
  89770. return TimeStatusEnum;
  89771. } };
  89772. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  89773. return __returned__;
  89774. }
  89775. };
  89776. function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
  89777. const _component_su_progress = resolveEasycom(vue.resolveDynamicComponent("su-progress"), __easycom_0$1);
  89778. const _component_s_goods_column = resolveEasycom(vue.resolveDynamicComponent("s-goods-column"), __easycom_1$4);
  89779. const _component_uni_load_more = resolveEasycom(vue.resolveDynamicComponent("uni-load-more"), __easycom_2$5);
  89780. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  89781. return vue.openBlock(), vue.createBlock(_component_s_layout, {
  89782. navbar: "inner",
  89783. bgStyle: { color: "rgb(245,28,19)" }
  89784. }, {
  89785. default: vue.withCtx(() => {
  89786. var _a2, _b2, _c, _d;
  89787. return [
  89788. vue.createCommentVNode("顶部背景图"),
  89789. vue.createElementVNode(
  89790. "view",
  89791. {
  89792. class: "page-bg",
  89793. style: vue.normalizeStyle([{ marginTop: "-" + Number($setup.statusBarHeight + 88) + "rpx" }])
  89794. },
  89795. null,
  89796. 4
  89797. /* STYLE */
  89798. ),
  89799. vue.createCommentVNode(" 时间段轮播图 "),
  89800. ((_b2 = (_a2 = $setup.activeTimeConfig) == null ? void 0 : _a2.sliderPicUrls) == null ? void 0 : _b2.length) > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  89801. key: 0,
  89802. class: "header"
  89803. }, [
  89804. vue.createElementVNode("swiper", {
  89805. "indicator-dots": "true",
  89806. autoplay: "true",
  89807. circular: true,
  89808. interval: "3000",
  89809. duration: "1500",
  89810. "indicator-color": "rgba(255,255,255,0.6)",
  89811. "indicator-active-color": "#fff"
  89812. }, [
  89813. (vue.openBlock(true), vue.createElementBlock(
  89814. vue.Fragment,
  89815. null,
  89816. vue.renderList($setup.activeTimeConfig.sliderPicUrls, (picUrl, index2) => {
  89817. return vue.openBlock(), vue.createElementBlock("swiper-item", {
  89818. key: index2,
  89819. class: "borRadius14"
  89820. }, [
  89821. vue.createElementVNode("image", {
  89822. src: picUrl,
  89823. class: "slide-image borRadius14",
  89824. "lazy-load": ""
  89825. }, null, 8, ["src"])
  89826. ]);
  89827. }),
  89828. 128
  89829. /* KEYED_FRAGMENT */
  89830. ))
  89831. ])
  89832. ])) : vue.createCommentVNode("v-if", true),
  89833. vue.createCommentVNode(" 时间段列表 "),
  89834. vue.createElementVNode("view", { class: "flex align-center justify-between ss-p-25" }, [
  89835. vue.createCommentVNode(" 左侧图标 "),
  89836. vue.createElementVNode("view", { class: "time-icon" }, [
  89837. vue.createCommentVNode(" TODO 非繁人:图片统一维护 "),
  89838. vue.createElementVNode("image", {
  89839. class: "ss-w-100 ss-h-100",
  89840. src: "http://mall.yudao.iocoder.cn/static/images/priceTag.png"
  89841. })
  89842. ]),
  89843. vue.createElementVNode("scroll-view", {
  89844. class: "time-list",
  89845. "scroll-into-view": $setup.activeTimeElId,
  89846. "scroll-x": "",
  89847. "scroll-with-animation": ""
  89848. }, [
  89849. (vue.openBlock(true), vue.createElementBlock(
  89850. vue.Fragment,
  89851. null,
  89852. vue.renderList($setup.timeConfigList, (config2, index2) => {
  89853. return vue.openBlock(), vue.createElementBlock("view", {
  89854. key: index2,
  89855. class: vue.normalizeClass(["item", { active: $setup.activeTimeIndex === index2 }]),
  89856. id: `timeItem${index2}`,
  89857. onClick: ($event) => $setup.handleChangeTimeConfig(index2)
  89858. }, [
  89859. vue.createCommentVNode(" 活动起始时间 "),
  89860. vue.createElementVNode(
  89861. "view",
  89862. { class: "time" },
  89863. vue.toDisplayString(config2.startTime),
  89864. 1
  89865. /* TEXT */
  89866. ),
  89867. vue.createCommentVNode(" 活动状态 "),
  89868. vue.createElementVNode(
  89869. "view",
  89870. { class: "status" },
  89871. vue.toDisplayString(config2.status),
  89872. 1
  89873. /* TEXT */
  89874. )
  89875. ], 10, ["id", "onClick"]);
  89876. }),
  89877. 128
  89878. /* KEYED_FRAGMENT */
  89879. ))
  89880. ], 8, ["scroll-into-view"])
  89881. ]),
  89882. vue.createCommentVNode(" 内容区 "),
  89883. vue.createElementVNode("view", { class: "list-content" }, [
  89884. vue.createCommentVNode(" 活动倒计时 "),
  89885. vue.createElementVNode("view", { class: "content-header ss-flex-col ss-col-center ss-row-center" }, [
  89886. vue.createElementVNode("view", { class: "content-header-box ss-flex ss-row-center" }, [
  89887. ((_c = $setup.activeTimeConfig) == null ? void 0 : _c.status) === $setup.TimeStatusEnum.STARTED ? (vue.openBlock(), vue.createElementBlock("view", {
  89888. key: 0,
  89889. class: "countdown-box ss-flex"
  89890. }, [
  89891. vue.createElementVNode("view", { class: "countdown-title ss-m-r-12" }, "距结束"),
  89892. vue.createElementVNode("view", { class: "ss-flex countdown-time" }, [
  89893. vue.createElementVNode(
  89894. "view",
  89895. { class: "ss-flex countdown-h" },
  89896. vue.toDisplayString($setup.countDown.h),
  89897. 1
  89898. /* TEXT */
  89899. ),
  89900. vue.createElementVNode("view", { class: "ss-m-x-4" }, ":"),
  89901. vue.createElementVNode(
  89902. "view",
  89903. { class: "countdown-num ss-flex ss-row-center" },
  89904. vue.toDisplayString($setup.countDown.m),
  89905. 1
  89906. /* TEXT */
  89907. ),
  89908. vue.createElementVNode("view", { class: "ss-m-x-4" }, ":"),
  89909. vue.createElementVNode(
  89910. "view",
  89911. { class: "countdown-num ss-flex ss-row-center" },
  89912. vue.toDisplayString($setup.countDown.s),
  89913. 1
  89914. /* TEXT */
  89915. )
  89916. ])
  89917. ])) : (vue.openBlock(), vue.createElementBlock(
  89918. "view",
  89919. { key: 1 },
  89920. vue.toDisplayString((_d = $setup.activeTimeConfig) == null ? void 0 : _d.status),
  89921. 1
  89922. /* TEXT */
  89923. ))
  89924. ])
  89925. ]),
  89926. vue.createCommentVNode(" 活动列表 "),
  89927. vue.createElementVNode(
  89928. "scroll-view",
  89929. {
  89930. class: "scroll-box",
  89931. style: vue.normalizeStyle({ height: $setup.pageHeight + "rpx" }),
  89932. "scroll-y": "true",
  89933. "scroll-with-animation": false,
  89934. "enable-back-to-top": true
  89935. },
  89936. [
  89937. (vue.openBlock(true), vue.createElementBlock(
  89938. vue.Fragment,
  89939. null,
  89940. vue.renderList($setup.activityList, (activity) => {
  89941. return vue.openBlock(), vue.createElementBlock("view", {
  89942. class: "goods-box ss-m-b-20",
  89943. key: activity.id
  89944. }, [
  89945. vue.createVNode(_component_s_goods_column, {
  89946. size: "lg",
  89947. data: { ...activity, price: activity.seckillPrice },
  89948. goodsFields: $setup.goodsFields,
  89949. seckillTag: true,
  89950. onClick: ($event) => $setup.sheep.$router.go("/pages/goods/seckill", { id: activity.id })
  89951. }, {
  89952. activity: vue.withCtx(() => [
  89953. vue.createElementVNode("view", { class: "limit" }, [
  89954. vue.createTextVNode("限量 "),
  89955. vue.createElementVNode(
  89956. "text",
  89957. { class: "ss-m-l-5" },
  89958. vue.toDisplayString(activity.stock) + " " + vue.toDisplayString(activity.unitName),
  89959. 1
  89960. /* TEXT */
  89961. )
  89962. ]),
  89963. vue.createVNode(_component_su_progress, {
  89964. percentage: activity.percent,
  89965. strokeWidth: "10",
  89966. textInside: "",
  89967. isAnimate: ""
  89968. }, null, 8, ["percentage"])
  89969. ]),
  89970. cart: vue.withCtx(() => {
  89971. var _a3, _b3;
  89972. return [
  89973. vue.createElementVNode(
  89974. "button",
  89975. {
  89976. class: vue.normalizeClass(["ss-reset-button cart-btn", { disabled: $setup.activeTimeConfig.status === $setup.TimeStatusEnum.END }])
  89977. },
  89978. [
  89979. ((_a3 = $setup.activeTimeConfig) == null ? void 0 : _a3.status) === $setup.TimeStatusEnum.WAIT_START ? (vue.openBlock(), vue.createElementBlock("span", { key: 0 }, "未开始")) : ((_b3 = $setup.activeTimeConfig) == null ? void 0 : _b3.status) === $setup.TimeStatusEnum.STARTED ? (vue.openBlock(), vue.createElementBlock("span", { key: 1 }, "马上抢")) : (vue.openBlock(), vue.createElementBlock("span", { key: 2 }, "已结束"))
  89980. ],
  89981. 2
  89982. /* CLASS */
  89983. )
  89984. ];
  89985. }),
  89986. _: 2
  89987. /* DYNAMIC */
  89988. }, 1032, ["data", "onClick"])
  89989. ]);
  89990. }),
  89991. 128
  89992. /* KEYED_FRAGMENT */
  89993. )),
  89994. $setup.activityTotal > 0 ? (vue.openBlock(), vue.createBlock(_component_uni_load_more, {
  89995. key: 0,
  89996. status: $setup.loadStatus,
  89997. "content-text": {
  89998. contentdown: "上拉加载更多"
  89999. },
  90000. onClick: $setup.loadMore
  90001. }, null, 8, ["status"])) : vue.createCommentVNode("v-if", true)
  90002. ],
  90003. 4
  90004. /* STYLE */
  90005. )
  90006. ])
  90007. ];
  90008. }),
  90009. _: 1
  90010. /* STABLE */
  90011. }, 8, ["bgStyle"]);
  90012. }
  90013. const PagesActivitySeckillList = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__scopeId", "data-v-de8354c5"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/activity/seckill/list.vue"]]);
  90014. const _sfc_main$3 = {
  90015. name: "countDown",
  90016. props: {
  90017. justifyLeft: {
  90018. type: String,
  90019. default: ""
  90020. },
  90021. //距离开始提示文字
  90022. tipText: {
  90023. type: String,
  90024. default: "倒计时"
  90025. },
  90026. dayText: {
  90027. type: String,
  90028. default: "天"
  90029. },
  90030. hourText: {
  90031. type: String,
  90032. default: "时"
  90033. },
  90034. minuteText: {
  90035. type: String,
  90036. default: "分"
  90037. },
  90038. secondText: {
  90039. type: String,
  90040. default: "秒"
  90041. },
  90042. datatime: {
  90043. type: Number,
  90044. default: 0
  90045. },
  90046. isDay: {
  90047. type: Boolean,
  90048. default: true
  90049. },
  90050. isCol: {
  90051. type: Boolean,
  90052. default: false
  90053. },
  90054. bgColor: {
  90055. type: Object,
  90056. default: null
  90057. }
  90058. },
  90059. data: function() {
  90060. return {
  90061. day: "00",
  90062. hour: "00",
  90063. minute: "00",
  90064. second: "00"
  90065. };
  90066. },
  90067. created: function() {
  90068. this.show_time();
  90069. },
  90070. mounted: function() {
  90071. },
  90072. methods: {
  90073. show_time: function() {
  90074. let that = this;
  90075. function runTime() {
  90076. let intDiff = that.datatime - Date.parse(/* @__PURE__ */ new Date()) / 1e3;
  90077. let day = 0, hour = 0, minute = 0, second = 0;
  90078. if (intDiff > 0) {
  90079. if (that.isDay === true) {
  90080. day = Math.floor(intDiff / (60 * 60 * 24));
  90081. } else {
  90082. day = 0;
  90083. }
  90084. hour = Math.floor(intDiff / (60 * 60)) - day * 24;
  90085. minute = Math.floor(intDiff / 60) - day * 24 * 60 - hour * 60;
  90086. second = Math.floor(intDiff) - day * 24 * 60 * 60 - hour * 60 * 60 - minute * 60;
  90087. if (hour <= 9)
  90088. hour = "0" + hour;
  90089. if (minute <= 9)
  90090. minute = "0" + minute;
  90091. if (second <= 9)
  90092. second = "0" + second;
  90093. that.day = day;
  90094. that.hour = hour;
  90095. that.minute = minute;
  90096. that.second = second;
  90097. } else {
  90098. that.day = "00";
  90099. that.hour = "00";
  90100. that.minute = "00";
  90101. that.second = "00";
  90102. }
  90103. }
  90104. runTime();
  90105. setInterval(runTime, 1e3);
  90106. }
  90107. }
  90108. };
  90109. function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
  90110. return vue.openBlock(), vue.createElementBlock(
  90111. "view",
  90112. {
  90113. class: "time",
  90114. style: vue.normalizeStyle($props.justifyLeft)
  90115. },
  90116. [
  90117. $props.tipText ? (vue.openBlock(), vue.createElementBlock(
  90118. "text",
  90119. {
  90120. key: 0,
  90121. class: ""
  90122. },
  90123. vue.toDisplayString($props.tipText),
  90124. 1
  90125. /* TEXT */
  90126. )) : vue.createCommentVNode("v-if", true),
  90127. $props.isDay === true ? (vue.openBlock(), vue.createElementBlock(
  90128. "text",
  90129. {
  90130. key: 1,
  90131. class: "styleAll p6",
  90132. style: vue.normalizeStyle({ background: $props.bgColor.bgColor, color: $props.bgColor.Color })
  90133. },
  90134. vue.toDisplayString(_ctx.day) + vue.toDisplayString($props.bgColor.isDay ? "天" : ""),
  90135. 5
  90136. /* TEXT, STYLE */
  90137. )) : vue.createCommentVNode("v-if", true),
  90138. $props.dayText ? (vue.openBlock(), vue.createElementBlock(
  90139. "text",
  90140. {
  90141. key: 2,
  90142. class: "timeTxt",
  90143. style: vue.normalizeStyle({ width: $props.bgColor.timeTxtwidth, color: $props.bgColor.bgColor })
  90144. },
  90145. vue.toDisplayString($props.dayText),
  90146. 5
  90147. /* TEXT, STYLE */
  90148. )) : vue.createCommentVNode("v-if", true),
  90149. vue.createElementVNode(
  90150. "text",
  90151. {
  90152. class: vue.normalizeClass(["styleAll", $props.isCol ? "timeCol" : ""]),
  90153. style: vue.normalizeStyle({ background: $props.bgColor.bgColor, color: $props.bgColor.Color, width: $props.bgColor.width })
  90154. },
  90155. vue.toDisplayString(_ctx.hour),
  90156. 7
  90157. /* TEXT, CLASS, STYLE */
  90158. ),
  90159. $props.hourText ? (vue.openBlock(), vue.createElementBlock(
  90160. "text",
  90161. {
  90162. key: 3,
  90163. class: vue.normalizeClass(["timeTxt", $props.isCol ? "whit" : ""]),
  90164. style: vue.normalizeStyle({ width: $props.bgColor.timeTxtwidth, color: $props.bgColor.bgColor })
  90165. },
  90166. vue.toDisplayString($props.hourText),
  90167. 7
  90168. /* TEXT, CLASS, STYLE */
  90169. )) : vue.createCommentVNode("v-if", true),
  90170. vue.createElementVNode(
  90171. "text",
  90172. {
  90173. class: vue.normalizeClass(["styleAll", $props.isCol ? "timeCol" : ""]),
  90174. style: vue.normalizeStyle({ background: $props.bgColor.bgColor, color: $props.bgColor.Color, width: $props.bgColor.width })
  90175. },
  90176. vue.toDisplayString(_ctx.minute),
  90177. 7
  90178. /* TEXT, CLASS, STYLE */
  90179. ),
  90180. $props.minuteText ? (vue.openBlock(), vue.createElementBlock(
  90181. "text",
  90182. {
  90183. key: 4,
  90184. class: vue.normalizeClass(["timeTxt", $props.isCol ? "whit" : ""]),
  90185. style: vue.normalizeStyle({ width: $props.bgColor.timeTxtwidth, color: $props.bgColor.bgColor })
  90186. },
  90187. vue.toDisplayString($props.minuteText),
  90188. 7
  90189. /* TEXT, CLASS, STYLE */
  90190. )) : vue.createCommentVNode("v-if", true),
  90191. vue.createElementVNode(
  90192. "text",
  90193. {
  90194. class: vue.normalizeClass(["styleAll", $props.isCol ? "timeCol" : ""]),
  90195. style: vue.normalizeStyle({ background: $props.bgColor.bgColor, color: $props.bgColor.Color, width: $props.bgColor.width })
  90196. },
  90197. vue.toDisplayString(_ctx.second),
  90198. 7
  90199. /* TEXT, CLASS, STYLE */
  90200. ),
  90201. $props.secondText ? (vue.openBlock(), vue.createElementBlock(
  90202. "text",
  90203. {
  90204. key: 5,
  90205. class: "timeTxt"
  90206. },
  90207. vue.toDisplayString($props.secondText),
  90208. 1
  90209. /* TEXT */
  90210. )) : vue.createCommentVNode("v-if", true)
  90211. ],
  90212. 4
  90213. /* STYLE */
  90214. );
  90215. }
  90216. const __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__scopeId", "data-v-39f8fd44"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/sheep/components/s-count-down/s-count-down.vue"]]);
  90217. const _sfc_main$2 = {
  90218. __name: "list",
  90219. setup(__props, { expose: __expose }) {
  90220. __expose();
  90221. const state = vue.reactive({
  90222. navH: "",
  90223. returnShow: true,
  90224. // ========== 砍价记录概要的相关变量 ==========
  90225. bargainTotal: 0,
  90226. bargainSuccessList: [],
  90227. // ========== 砍价活动的相关变量 ==========
  90228. bargainList: [],
  90229. page: 1,
  90230. limit: 10,
  90231. loading: false,
  90232. loadend: false,
  90233. bgColor: {
  90234. "bgColor": "#E93323",
  90235. "Color": "#fff",
  90236. "width": "44rpx",
  90237. "timeTxtwidth": "16rpx",
  90238. "isDay": true
  90239. },
  90240. loadTitle: "加载更多"
  90241. });
  90242. async function getBargainHeader() {
  90243. let {
  90244. code: code2,
  90245. data
  90246. } = await BargainApi.getBargainRecordSummary();
  90247. if (code2 == 0) {
  90248. state.bargainTotal = data.successUserCount;
  90249. state.bargainSuccessList = data.successList;
  90250. } else {
  90251. state.$util.Tips({
  90252. title: data
  90253. });
  90254. }
  90255. }
  90256. async function getBargainList() {
  90257. if (state.loadend || state.loading) {
  90258. return;
  90259. }
  90260. state.loading = true;
  90261. state.loadTitle = "";
  90262. let {
  90263. data,
  90264. code: code2
  90265. } = await BargainApi.getBargainActivityPage({
  90266. pageNo: state.page,
  90267. pageSize: state.limit
  90268. });
  90269. if (code2 == 0) {
  90270. const list = data.list;
  90271. _$1.concat(state.bargainList, list);
  90272. const loadend = list.length < state.limit;
  90273. state.loadend = loadend;
  90274. state.loading = false;
  90275. state.loadTitle = loadend ? "已全部加载" : "加载更多";
  90276. state.bargainList = data.list;
  90277. state.page = state.page + 1;
  90278. } else {
  90279. state.loading = false;
  90280. state.loadTitle = "加载更多";
  90281. }
  90282. }
  90283. function openSubscribe(e2) {
  90284. formatAppLog("log", "at pages/activity/bargain/list.vue:158", "跳转");
  90285. formatAppLog("log", "at pages/activity/bargain/list.vue:159", e2);
  90286. sheep$1.$router.go(e2);
  90287. return;
  90288. }
  90289. onLoad(function() {
  90290. getBargainHeader();
  90291. getBargainList();
  90292. });
  90293. onReachBottom(() => {
  90294. getBargainList();
  90295. });
  90296. const __returned__ = { state, getBargainHeader, getBargainList, openSubscribe, reactive: vue.reactive, get sheep() {
  90297. return sheep$1;
  90298. }, get _() {
  90299. return _$1;
  90300. }, get onLoad() {
  90301. return onLoad;
  90302. }, get onReachBottom() {
  90303. return onReachBottom;
  90304. }, get fen2yuan() {
  90305. return fen2yuan;
  90306. }, get BargainApi() {
  90307. return BargainApi;
  90308. } };
  90309. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  90310. return __returned__;
  90311. }
  90312. };
  90313. function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
  90314. const _component_s_count_down = resolveEasycom(vue.resolveDynamicComponent("s-count-down"), __easycom_0);
  90315. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  90316. return vue.openBlock(), vue.createElementBlock(
  90317. vue.Fragment,
  90318. null,
  90319. [
  90320. vue.createCommentVNode(" TODO @科举:参考 groupon/list.vue 和 seckill/list.vue 界面,调整下头部,就是从 5 到 11 行的 "),
  90321. vue.createVNode(_component_s_layout, {
  90322. navbar: "inner",
  90323. title: "砍价列表"
  90324. }, {
  90325. default: vue.withCtx(() => [
  90326. vue.createElementVNode("view", { style: { "background-color": "red", "height": "100vh" } }, [
  90327. vue.createElementVNode("view", { class: "bargain-list" }, [
  90328. vue.createCommentVNode(" 砍价记录的概要 "),
  90329. vue.createElementVNode("view", { class: "header" }, [
  90330. vue.createElementVNode("view", { class: "pic" }, [
  90331. vue.createElementVNode("view", { class: "swipers" }, [
  90332. vue.createElementVNode("swiper", {
  90333. "indicator-dots": "true",
  90334. autoplay: "true",
  90335. interval: "2500",
  90336. duration: "500",
  90337. vertical: "true",
  90338. circular: "true"
  90339. }, [
  90340. (vue.openBlock(true), vue.createElementBlock(
  90341. vue.Fragment,
  90342. null,
  90343. vue.renderList($setup.state.bargainSuccessList, (item, index2) => {
  90344. return vue.openBlock(), vue.createElementBlock("swiper-item", { key: index2 }, [
  90345. vue.createElementVNode("view", {
  90346. class: "acea-row row-middle",
  90347. style: { "display": "flex" }
  90348. }, [
  90349. vue.createElementVNode("image", {
  90350. src: item.avatar,
  90351. class: "mr9"
  90352. }, null, 8, ["src"]),
  90353. vue.createElementVNode(
  90354. "view",
  90355. { class: "mr9 nickName" },
  90356. vue.toDisplayString(item.nickname),
  90357. 1
  90358. /* TEXT */
  90359. ),
  90360. vue.createElementVNode("text", { class: "mr9" }, "拿了"),
  90361. vue.createElementVNode(
  90362. "view",
  90363. { class: "line1" },
  90364. vue.toDisplayString(item.activityName),
  90365. 1
  90366. /* TEXT */
  90367. )
  90368. ])
  90369. ]);
  90370. }),
  90371. 128
  90372. /* KEYED_FRAGMENT */
  90373. ))
  90374. ])
  90375. ])
  90376. ]),
  90377. vue.createElementVNode(
  90378. "view",
  90379. { class: "tit" },
  90380. "已有" + vue.toDisplayString($setup.state.bargainTotal) + "人砍成功",
  90381. 1
  90382. /* TEXT */
  90383. )
  90384. ]),
  90385. vue.createCommentVNode(" 砍价活动列表 "),
  90386. vue.createElementVNode("view", { class: "list" }, [
  90387. (vue.openBlock(true), vue.createElementBlock(
  90388. vue.Fragment,
  90389. null,
  90390. vue.renderList($setup.state.bargainList, (item, index2) => {
  90391. return vue.openBlock(), vue.createElementBlock("view", {
  90392. key: index2,
  90393. style: { "display": "flex" },
  90394. class: "item acea-row row-between-wrapper",
  90395. onClick: ($event) => $setup.openSubscribe("/pages/activity/bargain/detail?id=" + item.id)
  90396. }, [
  90397. vue.createElementVNode("view", { class: "pictrue" }, [
  90398. vue.createElementVNode("image", {
  90399. src: item.picUrl
  90400. }, null, 8, ["src"])
  90401. ]),
  90402. vue.createElementVNode("view", { class: "text acea-row row-column-around" }, [
  90403. vue.createElementVNode(
  90404. "view",
  90405. { class: "name line2" },
  90406. vue.toDisplayString(item.name),
  90407. 1
  90408. /* TEXT */
  90409. ),
  90410. vue.createElementVNode("view", {
  90411. class: "acea-row",
  90412. style: { "margin-bottom": "14rpx", "display": "flex" }
  90413. }, [
  90414. vue.createVNode(_component_s_count_down, {
  90415. tipText: " ",
  90416. bgColor: $setup.state.bgColor,
  90417. dayText: ":",
  90418. hourText: ":",
  90419. minuteText: ":",
  90420. secondText: " ",
  90421. datatime: item.endTime / 1e3,
  90422. isDay: true
  90423. }, null, 8, ["bgColor", "datatime"]),
  90424. vue.createElementVNode("text", { class: "txt" }, "后结束")
  90425. ]),
  90426. item.stock === 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [
  90427. vue.createElementVNode("view", {
  90428. style: { "font-size": "22rpx" },
  90429. onClick: ($event) => $setup.openSubscribe("/pages/activity/goods_bargain_details/index?id=" + item.id + "&startBargainUid=" + _ctx.uid)
  90430. }, " 已售罄", 8, ["onClick"])
  90431. ])) : vue.createCommentVNode("v-if", true),
  90432. vue.createElementVNode("view", { class: "money font-color" }, [
  90433. vue.createTextVNode("最低: ¥"),
  90434. vue.createElementVNode(
  90435. "text",
  90436. { class: "price" },
  90437. vue.toDisplayString($setup.fen2yuan(item.bargainMinPrice)),
  90438. 1
  90439. /* TEXT */
  90440. )
  90441. ])
  90442. ]),
  90443. item.stock > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  90444. key: 0,
  90445. class: "cutBnt bg-color"
  90446. }, "参与砍价")) : vue.createCommentVNode("v-if", true),
  90447. item.stock === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  90448. key: 1,
  90449. class: "cutBnt bg-color-hui"
  90450. }, "已售罄")) : vue.createCommentVNode("v-if", true)
  90451. ], 8, ["onClick"]);
  90452. }),
  90453. 128
  90454. /* KEYED_FRAGMENT */
  90455. )),
  90456. $setup.state.bargainList.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  90457. key: 0,
  90458. class: "loadingicon acea-row row-center-wrapper",
  90459. style: { "text-align": "center" }
  90460. }, [
  90461. vue.createElementVNode("text", {
  90462. class: "loading iconfont icon-jiazai",
  90463. hidden: !_ctx.loading
  90464. }, null, 8, ["hidden"]),
  90465. vue.createTextVNode(
  90466. vue.toDisplayString($setup.state.loadTitle),
  90467. 1
  90468. /* TEXT */
  90469. )
  90470. ])) : vue.createCommentVNode("v-if", true)
  90471. ])
  90472. ])
  90473. ])
  90474. ]),
  90475. _: 1
  90476. /* STABLE */
  90477. })
  90478. ],
  90479. 2112
  90480. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  90481. );
  90482. }
  90483. const PagesActivityBargainList = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__scopeId", "data-v-7572db9c"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/activity/bargain/list.vue"]]);
  90484. const _sfc_main$1 = {
  90485. __name: "detail",
  90486. setup(__props, { expose: __expose }) {
  90487. __expose();
  90488. const state = vue.reactive({
  90489. id: "",
  90490. buyPrice: "",
  90491. bargainInfo: {},
  90492. bgColor: {
  90493. "bgColor": "#333333",
  90494. "Color": "#fff",
  90495. "width": "44rpx",
  90496. "timeTxtwidth": "16rpx",
  90497. "isDay": true
  90498. },
  90499. bargainUserHelpList: [],
  90500. couponsHidden: true
  90501. });
  90502. async function getBargainDetails() {
  90503. let {
  90504. data,
  90505. code: code2
  90506. } = await BargainApi.getBargainActivityDetail({
  90507. id: state.id
  90508. });
  90509. if (code2 == 0) {
  90510. state.bargainInfo = data;
  90511. state.buyPrice = state.bargainInfo.bargainFirstPrice;
  90512. }
  90513. }
  90514. onLoad(function(options2) {
  90515. if (options2.hasOwnProperty("id")) {
  90516. options2.id ? state.id = options2.id : state.id = "";
  90517. }
  90518. getBargainDetails();
  90519. });
  90520. function fen2yuan2(price) {
  90521. return (price / 100).toFixed(2);
  90522. }
  90523. const __returned__ = { state, getBargainDetails, fen2yuan: fen2yuan2, reactive: vue.reactive, get sheep() {
  90524. return sheep$1;
  90525. }, get onLoad() {
  90526. return onLoad;
  90527. }, get BargainApi() {
  90528. return BargainApi;
  90529. } };
  90530. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  90531. return __returned__;
  90532. }
  90533. };
  90534. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  90535. const _component_s_count_down = resolveEasycom(vue.resolveDynamicComponent("s-count-down"), __easycom_0);
  90536. const _component_s_layout = resolveEasycom(vue.resolveDynamicComponent("s-layout"), __easycom_1$8);
  90537. return vue.openBlock(), vue.createElementBlock(
  90538. vue.Fragment,
  90539. null,
  90540. [
  90541. vue.createCommentVNode(" TODO @科举:按照项目的代码风格,调整下这个界面 "),
  90542. vue.createCommentVNode(" TODO @科举:挪到 bargain/detail.vue 里 "),
  90543. vue.createCommentVNode(" TODO @科举:尽量都迁移完;依赖数据的部分,通过直接在 state 写死状态,不用后端返回,跑通整个界面;不追求 100% 对,但是至少自己观感是 ok 的 "),
  90544. vue.createVNode(_component_s_layout, { title: "砍价详情" }, {
  90545. default: vue.withCtx(() => [
  90546. vue.createElementVNode("view", { class: "bargain" }, [
  90547. vue.createCommentVNode(` :class="startBargainUid !== userInfo.uid ? 'on' : ''" `),
  90548. vue.createElementVNode("view", { class: "header" }, [
  90549. vue.createElementVNode("navigator", {
  90550. url: "/pages/activity/bargainingList",
  90551. "hover-class": "none"
  90552. }, [
  90553. vue.createElementVNode("view", {
  90554. class: "back",
  90555. style: { "width": "234rpx", "height": "54rpx", "background": "linear-gradient(233deg,#ffd169,#fe960f)", "opacity": "1", "border-radius": "0 26rpx 26rpx 0", "line-height": "54rpx", "text-align": "center", "color": "#6e3f00", "font-size": "25rpx" }
  90556. }, [
  90557. vue.createElementVNode("text", { class: "iconfont icon-xiangzuo" }),
  90558. vue.createTextVNode(" 返回砍价列表 ")
  90559. ])
  90560. ])
  90561. ]),
  90562. vue.createElementVNode("view", {
  90563. class: "pad30",
  90564. style: { "padding-bottom": "30rpx" }
  90565. }, [
  90566. vue.createElementVNode("view", { class: "wrapper" }, [
  90567. vue.createElementVNode("view", {
  90568. class: "pictxt acea-row row-between",
  90569. onClick: _cache[2] || (_cache[2] = (...args) => _ctx.goProduct && _ctx.goProduct(...args)),
  90570. style: { "display": "flex", "box-sizing": "border-box" }
  90571. }, [
  90572. vue.createElementVNode("view", { class: "pictrue" }, [
  90573. vue.createElementVNode("image", {
  90574. src: $setup.state.bargainInfo.picUrl
  90575. }, null, 8, ["src"])
  90576. ]),
  90577. vue.createElementVNode("view", {
  90578. class: "text acea-row row-column-around",
  90579. style: { "margin-left": "10rpx" }
  90580. }, [
  90581. vue.createElementVNode(
  90582. "view",
  90583. { class: "line1" },
  90584. vue.toDisplayString($setup.state.bargainInfo.name),
  90585. 1
  90586. /* TEXT */
  90587. ),
  90588. vue.createElementVNode(
  90589. "view",
  90590. { class: "surplus" },
  90591. "最低价:¥" + vue.toDisplayString($setup.fen2yuan($setup.state.bargainInfo.bargainMinPrice)),
  90592. 1
  90593. /* TEXT */
  90594. ),
  90595. vue.createElementVNode(
  90596. "view",
  90597. { class: "surplus" },
  90598. "剩余:" + vue.toDisplayString($setup.state.bargainInfo.stock) + " " + vue.toDisplayString($setup.state.bargainInfo.unitName),
  90599. 1
  90600. /* TEXT */
  90601. ),
  90602. vue.createElementVNode("view", {
  90603. class: "money font-color-red",
  90604. style: { "color": "red" }
  90605. }, [
  90606. vue.createTextVNode(" 当前: ¥ "),
  90607. vue.createElementVNode(
  90608. "text",
  90609. { class: "num" },
  90610. vue.toDisplayString($setup.fen2yuan($setup.state.buyPrice)),
  90611. 1
  90612. /* TEXT */
  90613. )
  90614. ]),
  90615. $setup.state.bargainInfo.endTime > (/* @__PURE__ */ new Date()).getTime() && $setup.state.bargainInfo.stock > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  90616. key: 0,
  90617. class: "acea-row",
  90618. style: { "display": "flex" }
  90619. }, [
  90620. vue.createVNode(_component_s_count_down, {
  90621. tipText: " ",
  90622. bgColor: $setup.state.bgColor,
  90623. dayText: ":",
  90624. hourText: ":",
  90625. minuteText: ":",
  90626. secondText: " ",
  90627. datatime: $setup.state.bargainInfo.endTime / 1e3,
  90628. isDay: true
  90629. }, null, 8, ["bgColor", "datatime"]),
  90630. vue.createElementVNode("text", { style: { "font-size": "22rpx", "margin-left": "4rpx", "line-height": "36rpx" } }, "后结束")
  90631. ])) : $setup.state.bargainInfo.endTime <= (/* @__PURE__ */ new Date()).getTime() ? (vue.openBlock(), vue.createElementBlock("view", { key: 1 }, [
  90632. vue.createElementVNode("view", {
  90633. style: { "font-size": "22rpx" },
  90634. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.currentBargainUser && _ctx.currentBargainUser(...args))
  90635. }, "已结束")
  90636. ])) : $setup.state.bargainInfo.stock <= 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2 }, [
  90637. vue.createElementVNode("view", {
  90638. style: { "font-size": "22rpx" },
  90639. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.currentBargainUser && _ctx.currentBargainUser(...args))
  90640. }, "已售罄")
  90641. ])) : vue.createCommentVNode("v-if", true)
  90642. ]),
  90643. vue.createElementVNode("text", { class: "iconfont icon-jiantou iconfonts" })
  90644. ])
  90645. ]),
  90646. vue.createCommentVNode(" 砍价记录 "),
  90647. vue.createElementVNode("view", { class: "title font-color acea-row row-center-wrapper" }, [
  90648. vue.createElementVNode("view", { class: "pictrue" }, [
  90649. vue.createCommentVNode(" TODO 芋艿:暂时不支持砍价功能,后续换到 cdn 加载图片 "),
  90650. vue.createCommentVNode(" <image src='../static/zuo2.png'></image>")
  90651. ]),
  90652. vue.createElementVNode("view", { class: "tits" }, [
  90653. vue.createElementVNode("view", { class: "titleCon" }, "砍价记录"),
  90654. vue.createElementVNode("view", { class: "line" })
  90655. ]),
  90656. vue.createElementVNode("view", { class: "pictrue on" }, [
  90657. vue.createCommentVNode(" TODO 芋艿:暂时不支持砍价功能,后续换到 cdn 加载图片 "),
  90658. vue.createCommentVNode(" <image src='../static/you2.png'></image>")
  90659. ])
  90660. ]),
  90661. vue.createElementVNode("view", { class: "bargainGang borRadius14" }, [
  90662. $setup.state.bargainUserHelpList.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  90663. key: 0,
  90664. class: "list"
  90665. }, [
  90666. _ctx.index < 3 || !$setup.state.couponsHidden ? (vue.openBlock(true), vue.createElementBlock(
  90667. vue.Fragment,
  90668. { key: 0 },
  90669. vue.renderList($setup.state.bargainUserHelpList, (item, index2) => {
  90670. return vue.openBlock(), vue.createElementBlock("view", {
  90671. key: index2,
  90672. class: "item acea-row row-between-wrapper"
  90673. }, [
  90674. vue.createElementVNode("view", { class: "pictxt acea-row row-between-wrapper" }, [
  90675. vue.createElementVNode("view", { class: "pictrue" }, [
  90676. vue.createElementVNode("image", {
  90677. src: item.avatar
  90678. }, null, 8, ["src"])
  90679. ]),
  90680. vue.createElementVNode("view", { class: "text" }, [
  90681. vue.createElementVNode(
  90682. "view",
  90683. { class: "name line1" },
  90684. vue.toDisplayString(item.nickname),
  90685. 1
  90686. /* TEXT */
  90687. ),
  90688. vue.createElementVNode(
  90689. "view",
  90690. { class: "line1" },
  90691. vue.toDisplayString(_ctx.formatDate(item.createTime)),
  90692. 1
  90693. /* TEXT */
  90694. )
  90695. ])
  90696. ]),
  90697. vue.createElementVNode("view", { class: "money" }, [
  90698. vue.createTextVNode(" 已砍 "),
  90699. vue.createElementVNode(
  90700. "text",
  90701. { class: "font-color-red" },
  90702. vue.toDisplayString($setup.fen2yuan(item.reducePrice)),
  90703. 1
  90704. /* TEXT */
  90705. ),
  90706. vue.createTextVNode("元 ")
  90707. ])
  90708. ]);
  90709. }),
  90710. 128
  90711. /* KEYED_FRAGMENT */
  90712. )) : vue.createCommentVNode("v-if", true),
  90713. $setup.state.bargainUserHelpList.length > 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  90714. key: 1,
  90715. class: "open acea-row row-center-wrapper",
  90716. onClick: _cache[3] || (_cache[3] = (...args) => _ctx.openTap && _ctx.openTap(...args))
  90717. }, [
  90718. vue.createTextVNode(
  90719. vue.toDisplayString($setup.state.couponsHidden ? "展开更多" : "关闭展开") + " ",
  90720. 1
  90721. /* TEXT */
  90722. ),
  90723. vue.createElementVNode(
  90724. "text",
  90725. {
  90726. class: vue.normalizeClass(["iconfont", $setup.state.couponsHidden ? "icon-xiangxia" : "icon-xiangshang"])
  90727. },
  90728. null,
  90729. 2
  90730. /* CLASS */
  90731. )
  90732. ])) : vue.createCommentVNode("v-if", true)
  90733. ])) : vue.createCommentVNode("v-if", true),
  90734. $setup.state.bargainUserHelpList.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  90735. key: 1,
  90736. class: "contentNo"
  90737. }, [
  90738. vue.createElementVNode("text", { class: "iconfont icon-xiaolian mr8" }),
  90739. vue.createTextVNode(" 暂无助力记录 ")
  90740. ])) : vue.createCommentVNode("v-if", true)
  90741. ])
  90742. ])
  90743. ])
  90744. ]),
  90745. _: 1
  90746. /* STABLE */
  90747. })
  90748. ],
  90749. 2112
  90750. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  90751. );
  90752. }
  90753. const PagesActivityBargainDetail = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__scopeId", "data-v-6d33792e"], ["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/pages/activity/bargain/detail.vue"]]);
  90754. __definePage("pages/index/FirstIndex", PagesIndexFirstIndex);
  90755. __definePage("pages/index/FirstActivity", PagesIndexFirstActivity);
  90756. __definePage("pages/index/FirstVideo", PagesIndexFirstVideo);
  90757. __definePage("pages/index/FirstList", PagesIndexFirstList);
  90758. __definePage("pages/index/index", PagesIndexIndex);
  90759. __definePage("pages/index/user", PagesIndexUser);
  90760. __definePage("pages/index/category", PagesIndexCategory);
  90761. __definePage("pages/index/cart", PagesIndexCart);
  90762. __definePage("pages/index/login", PagesIndexLogin);
  90763. __definePage("pages/index/search", PagesIndexSearch);
  90764. __definePage("pages/index/page", PagesIndexPage);
  90765. __definePage("pages/goods/index", PagesGoodsIndex);
  90766. __definePage("pages/goods/groupon", PagesGoodsGroupon);
  90767. __definePage("pages/goods/seckill", PagesGoodsSeckill);
  90768. __definePage("pages/goods/list", PagesGoodsList);
  90769. __definePage("pages/goods/comment/add", PagesGoodsCommentAdd);
  90770. __definePage("pages/goods/comment/list", PagesGoodsCommentList);
  90771. __definePage("pages/order/detail", PagesOrderDetail);
  90772. __definePage("pages/order/confirm", PagesOrderConfirm);
  90773. __definePage("pages/order/list", PagesOrderList);
  90774. __definePage("pages/order/aftersale/apply", PagesOrderAftersaleApply);
  90775. __definePage("pages/order/aftersale/return-delivery", PagesOrderAftersaleReturnDelivery);
  90776. __definePage("pages/order/aftersale/list", PagesOrderAftersaleList);
  90777. __definePage("pages/order/aftersale/detail", PagesOrderAftersaleDetail);
  90778. __definePage("pages/order/aftersale/log", PagesOrderAftersaleLog);
  90779. __definePage("pages/order/express/log", PagesOrderExpressLog);
  90780. __definePage("pages/order/otherlist", PagesOrderOtherlist);
  90781. __definePage("pages/user/info", PagesUserInfo);
  90782. __definePage("pages/user/setting", PagesUserSetting);
  90783. __definePage("pages/user/qrcode-share", PagesUserQrcodeShare);
  90784. __definePage("pages/user/goods-collect", PagesUserGoodsCollect);
  90785. __definePage("pages/user/goods-log", PagesUserGoodsLog);
  90786. __definePage("pages/user/address/list", PagesUserAddressList);
  90787. __definePage("pages/user/dummyAddress/list", PagesUserDummyAddressList);
  90788. __definePage("pages/user/invoice/edit", PagesUserInvoiceEdit);
  90789. __definePage("pages/user/invoice/list", PagesUserInvoiceList);
  90790. __definePage("pages/user/address/edit", PagesUserAddressEdit);
  90791. __definePage("pages/user/dummyAddress/edit", PagesUserDummyAddressEdit);
  90792. __definePage("pages/user/wallet/money", PagesUserWalletMoney);
  90793. __definePage("pages/user/wallet/score", PagesUserWalletScore);
  90794. __definePage("pages/user/wallet/consumptionLog", PagesUserWalletConsumptionLog);
  90795. __definePage("pages/user/wallet/topupConsumptionPoints", PagesUserWalletTopupConsumptionPoints);
  90796. __definePage("pages/user/wallet/consumptionTransfersLog", PagesUserWalletConsumptionTransfersLog);
  90797. __definePage("pages/user/wallet/consumptionTransfers", PagesUserWalletConsumptionTransfers);
  90798. __definePage("pages/user/wallet/scoreToConsumption", PagesUserWalletScoreToConsumption);
  90799. __definePage("pages/user/wallet/withdraw", PagesUserWalletWithdraw);
  90800. __definePage("pages/user/wallet/withdrawalLog", PagesUserWalletWithdrawalLog);
  90801. __definePage("pages/user/wallet/scoreToMoney", PagesUserWalletScoreToMoney);
  90802. __definePage("pages/user/wallet/ScoreLog", PagesUserWalletScoreLog);
  90803. __definePage("pages/user/wallet/maxScoreLog", PagesUserWalletMaxScoreLog);
  90804. __definePage("pages/user/wallet/team", PagesUserWalletTeam);
  90805. __definePage("pages/commission/index", PagesCommissionIndex);
  90806. __definePage("pages/commission/wallet", PagesCommissionWallet);
  90807. __definePage("pages/commission/goods", PagesCommissionGoods);
  90808. __definePage("pages/commission/order", PagesCommissionOrder);
  90809. __definePage("pages/commission/team", PagesCommissionTeam);
  90810. __definePage("pages/commission/promoter", PagesCommissionPromoter);
  90811. __definePage("pages/commission/commission-ranking", PagesCommissionCommissionRanking);
  90812. __definePage("pages/commission/withdraw", PagesCommissionWithdraw);
  90813. __definePage("pages/app/sign", PagesAppSign);
  90814. __definePage("pages/shop/index", PagesShopIndex);
  90815. __definePage("pages/shop/category", PagesShopCategory);
  90816. __definePage("pages/shop/allproduct", PagesShopAllproduct);
  90817. __definePage("pages/public/setting", PagesPublicSetting);
  90818. __definePage("pages/public/richtext", PagesPublicRichtext);
  90819. __definePage("pages/public/faq", PagesPublicFaq);
  90820. __definePage("pages/public/error", PagesPublicError);
  90821. __definePage("pages/public/webview", PagesPublicWebview);
  90822. __definePage("pages/public/merchant", PagesPublicMerchant);
  90823. __definePage("pages/public/merchantApplyList", PagesPublicMerchantApplyList);
  90824. __definePage("pages/coupon/list", PagesCouponList);
  90825. __definePage("pages/coupon/detail", PagesCouponDetail);
  90826. __definePage("pages/chat/index", PagesChatIndex);
  90827. __definePage("pages/chat/speechtotext", PagesChatSpeechtotext);
  90828. __definePage("pages/pay/index", PagesPayIndex);
  90829. __definePage("pages/pay/result", PagesPayResult);
  90830. __definePage("pages/pay/resultYuan", PagesPayResultYuan);
  90831. __definePage("pages/pay/recharge", PagesPayRecharge);
  90832. __definePage("pages/pay/recharge-log", PagesPayRechargeLog);
  90833. __definePage("pages/activity/groupon/detail", PagesActivityGrouponDetail);
  90834. __definePage("pages/activity/groupon/order", PagesActivityGrouponOrder);
  90835. __definePage("pages/activity/index", PagesActivityIndex);
  90836. __definePage("pages/activity/groupon/list", PagesActivityGrouponList);
  90837. __definePage("pages/activity/seckill/list", PagesActivitySeckillList);
  90838. __definePage("pages/activity/bargain/list", PagesActivityBargainList);
  90839. __definePage("pages/activity/bargain/detail", PagesActivityBargainDetail);
  90840. const _sfc_main = {
  90841. __name: "App",
  90842. setup(__props, { expose: __expose }) {
  90843. __expose();
  90844. onShow((options2) => {
  90845. autoSign();
  90846. plus.runtime.arguments;
  90847. uni.getClipboardData({
  90848. success: (res) => {
  90849. }
  90850. });
  90851. });
  90852. onHide(() => {
  90853. cancelAutoSign();
  90854. });
  90855. onLaunch(() => {
  90856. uni.hideTabBar();
  90857. ShoproInit();
  90858. resetSignStatusIfNeeded();
  90859. });
  90860. onError((err) => {
  90861. formatAppLog("log", "at App.vue:53", "AppOnError:", err);
  90862. });
  90863. const __returned__ = { get onLaunch() {
  90864. return onLaunch;
  90865. }, get onShow() {
  90866. return onShow;
  90867. }, get onError() {
  90868. return onError;
  90869. }, get onHide() {
  90870. return onHide;
  90871. }, get ShoproInit() {
  90872. return ShoproInit;
  90873. }, get autoSign() {
  90874. return autoSign;
  90875. }, get cancelAutoSign() {
  90876. return cancelAutoSign;
  90877. }, get resetSignStatusIfNeeded() {
  90878. return resetSignStatusIfNeeded;
  90879. } };
  90880. Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
  90881. return __returned__;
  90882. }
  90883. };
  90884. const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/xuruhua/Desktop/zx/mall-newfeifan-zx-app/App.vue"]]);
  90885. function clearLinkId() {
  90886. uni.removeStorageSync("linkId");
  90887. }
  90888. setInterval(clearLinkId, 3e5);
  90889. function createApp() {
  90890. const app2 = vue.createVueApp(App);
  90891. app2.use(i18n);
  90892. setupPinia(app2);
  90893. return {
  90894. app: app2
  90895. };
  90896. }
  90897. const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp();
  90898. uni.Vuex = __Vuex__;
  90899. uni.Pinia = __Pinia__;
  90900. __app__.provide("__globalStyles", __uniConfig.styles);
  90901. __app__._component.mpType = "app";
  90902. __app__._component.render = () => {
  90903. };
  90904. __app__.mount("#app");
  90905. })(Vue);