resources_js_pages_mutation_Report_vue.js 706KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466
  1. (self["webpackChunk"] = self["webpackChunk"] || []).push([["resources_js_pages_mutation_Report_vue"],{
  2. /***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppButtonLink.vue?vue&type=script&setup=true&lang=js":
  3. /*!******************************************************************************************************************************************************************************************************************!*\
  4. !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppButtonLink.vue?vue&type=script&setup=true&lang=js ***!
  5. \******************************************************************************************************************************************************************************************************************/
  6. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  7. "use strict";
  8. __webpack_require__.r(__webpack_exports__);
  9. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  10. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  11. /* harmony export */ });
  12. /* harmony import */ var _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @inertiajs/inertia-vue3 */ "./node_modules/@inertiajs/inertia-vue3/dist/index.js");
  13. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  14. props: {
  15. inertiaLink: {
  16. type: Boolean,
  17. "default": true
  18. },
  19. icon: String,
  20. label: String,
  21. classButton: String
  22. },
  23. setup: function setup(__props, _ref) {
  24. var expose = _ref.expose;
  25. expose();
  26. var __returned__ = {
  27. Link: _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_0__.Link
  28. };
  29. Object.defineProperty(__returned__, '__isScriptSetup', {
  30. enumerable: false,
  31. value: true
  32. });
  33. return __returned__;
  34. }
  35. });
  36. /***/ }),
  37. /***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppMessage.vue?vue&type=script&setup=true&lang=js":
  38. /*!***************************************************************************************************************************************************************************************************************!*\
  39. !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppMessage.vue?vue&type=script&setup=true&lang=js ***!
  40. \***************************************************************************************************************************************************************************************************************/
  41. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  42. "use strict";
  43. __webpack_require__.r(__webpack_exports__);
  44. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  45. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  46. /* harmony export */ });
  47. /* harmony import */ var _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @inertiajs/inertia-vue3 */ "./node_modules/@inertiajs/inertia-vue3/dist/index.js");
  48. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  49. setup: function setup(__props, _ref) {
  50. var expose = _ref.expose;
  51. expose();
  52. var onClose = function onClose() {
  53. (0,_inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_0__.usePage)().props.value.errors = {};
  54. (0,_inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_0__.usePage)().props.value.flash.success = null;
  55. (0,_inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_0__.usePage)().props.value.flash.error = null;
  56. };
  57. var __returned__ = {
  58. onClose: onClose,
  59. usePage: _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_0__.usePage
  60. };
  61. Object.defineProperty(__returned__, '__isScriptSetup', {
  62. enumerable: false,
  63. value: true
  64. });
  65. return __returned__;
  66. }
  67. });
  68. /***/ }),
  69. /***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppPagination.vue?vue&type=script&setup=true&lang=js":
  70. /*!******************************************************************************************************************************************************************************************************************!*\
  71. !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppPagination.vue?vue&type=script&setup=true&lang=js ***!
  72. \******************************************************************************************************************************************************************************************************************/
  73. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  74. "use strict";
  75. __webpack_require__.r(__webpack_exports__);
  76. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  77. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  78. /* harmony export */ });
  79. /* harmony import */ var _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @inertiajs/inertia-vue3 */ "./node_modules/@inertiajs/inertia-vue3/dist/index.js");
  80. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  81. props: {
  82. links: Array
  83. },
  84. setup: function setup(__props, _ref) {
  85. var expose = _ref.expose;
  86. expose();
  87. var __returned__ = {
  88. Link: _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_0__.Link
  89. };
  90. Object.defineProperty(__returned__, '__isScriptSetup', {
  91. enumerable: false,
  92. value: true
  93. });
  94. return __returned__;
  95. }
  96. });
  97. /***/ }),
  98. /***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSidebar.vue?vue&type=script&setup=true&lang=js":
  99. /*!***************************************************************************************************************************************************************************************************************!*\
  100. !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSidebar.vue?vue&type=script&setup=true&lang=js ***!
  101. \***************************************************************************************************************************************************************************************************************/
  102. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  103. "use strict";
  104. __webpack_require__.r(__webpack_exports__);
  105. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  106. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  107. /* harmony export */ });
  108. /* harmony import */ var _components_AppSubSidebar_vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/components/AppSubSidebar.vue */ "./resources/js/components/AppSubSidebar.vue");
  109. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  110. props: {
  111. menu: Array
  112. },
  113. setup: function setup(__props, _ref) {
  114. var expose = _ref.expose;
  115. expose();
  116. var __returned__ = {
  117. AppSubSidebar: _components_AppSubSidebar_vue__WEBPACK_IMPORTED_MODULE_0__["default"]
  118. };
  119. Object.defineProperty(__returned__, '__isScriptSetup', {
  120. enumerable: false,
  121. value: true
  122. });
  123. return __returned__;
  124. }
  125. });
  126. /***/ }),
  127. /***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSubSidebar.vue?vue&type=script&setup=true&lang=js":
  128. /*!******************************************************************************************************************************************************************************************************************!*\
  129. !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSubSidebar.vue?vue&type=script&setup=true&lang=js ***!
  130. \******************************************************************************************************************************************************************************************************************/
  131. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  132. "use strict";
  133. __webpack_require__.r(__webpack_exports__);
  134. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  135. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  136. /* harmony export */ });
  137. /* harmony import */ var _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @inertiajs/inertia-vue3 */ "./node_modules/@inertiajs/inertia-vue3/dist/index.js");
  138. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  139. props: {
  140. items: Array,
  141. root: {
  142. type: Boolean,
  143. "default": false
  144. }
  145. },
  146. setup: function setup(__props, _ref) {
  147. var expose = _ref.expose;
  148. expose();
  149. var __returned__ = {
  150. Link: _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_0__.Link
  151. };
  152. Object.defineProperty(__returned__, '__isScriptSetup', {
  153. enumerable: false,
  154. value: true
  155. });
  156. return __returned__;
  157. }
  158. });
  159. /***/ }),
  160. /***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppTopBar.vue?vue&type=script&setup=true&lang=js":
  161. /*!**************************************************************************************************************************************************************************************************************!*\
  162. !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppTopBar.vue?vue&type=script&setup=true&lang=js ***!
  163. \**************************************************************************************************************************************************************************************************************/
  164. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  165. "use strict";
  166. __webpack_require__.r(__webpack_exports__);
  167. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  168. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  169. /* harmony export */ });
  170. /* harmony import */ var _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @inertiajs/inertia-vue3 */ "./node_modules/@inertiajs/inertia-vue3/dist/index.js");
  171. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  172. emits: ['menu-toggle'],
  173. setup: function setup(__props, _ref) {
  174. var expose = _ref.expose;
  175. expose();
  176. var __returned__ = {
  177. Link: _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_0__.Link
  178. };
  179. Object.defineProperty(__returned__, '__isScriptSetup', {
  180. enumerable: false,
  181. value: true
  182. });
  183. return __returned__;
  184. }
  185. });
  186. /***/ }),
  187. /***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/layouts/DashboardLayout.vue?vue&type=script&setup=true&lang=js":
  188. /*!*****************************************************************************************************************************************************************************************************************!*\
  189. !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/layouts/DashboardLayout.vue?vue&type=script&setup=true&lang=js ***!
  190. \*****************************************************************************************************************************************************************************************************************/
  191. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  192. "use strict";
  193. __webpack_require__.r(__webpack_exports__);
  194. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  195. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  196. /* harmony export */ });
  197. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  198. /* harmony import */ var _components_AppTopBar_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/components/AppTopBar.vue */ "./resources/js/components/AppTopBar.vue");
  199. /* harmony import */ var _components_AppSidebar_vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/components/AppSidebar.vue */ "./resources/js/components/AppSidebar.vue");
  200. /* harmony import */ var _components_AppFooter_vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/components/AppFooter.vue */ "./resources/js/components/AppFooter.vue");
  201. /* harmony import */ var _components_AppMessage_vue__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/components/AppMessage.vue */ "./resources/js/components/AppMessage.vue");
  202. /* harmony import */ var _utils_menu__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/utils/menu */ "./resources/js/utils/menu.js");
  203. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  204. setup: function setup(__props, _ref) {
  205. var expose = _ref.expose;
  206. expose();
  207. var mobileMenuActive = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(false);
  208. var staticMenuInactive = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(false);
  209. var menuClick = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(false);
  210. var isDesktop = function isDesktop() {
  211. return window.innerWidth >= 992;
  212. };
  213. var containerClass = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(function () {
  214. return ['layout-wrapper', {
  215. 'layout-static-sidebar-inactive': staticMenuInactive.value,
  216. 'layout-mobile-sidebar-active': mobileMenuActive.value
  217. }];
  218. });
  219. var onWrapperClick = function onWrapperClick() {
  220. if (!menuClick.value) {
  221. mobileMenuActive.value = false;
  222. }
  223. menuClick.value = false;
  224. };
  225. var onMenuToggle = function onMenuToggle(event) {
  226. menuClick.value = true;
  227. if (isDesktop()) {
  228. staticMenuInactive.value = !staticMenuInactive.value;
  229. } else {
  230. mobileMenuActive.value = !mobileMenuActive.value;
  231. }
  232. event.preventDefault();
  233. };
  234. var __returned__ = {
  235. mobileMenuActive: mobileMenuActive,
  236. staticMenuInactive: staticMenuInactive,
  237. menuClick: menuClick,
  238. isDesktop: isDesktop,
  239. containerClass: containerClass,
  240. onWrapperClick: onWrapperClick,
  241. onMenuToggle: onMenuToggle,
  242. ref: vue__WEBPACK_IMPORTED_MODULE_0__.ref,
  243. computed: vue__WEBPACK_IMPORTED_MODULE_0__.computed,
  244. AppTopBar: _components_AppTopBar_vue__WEBPACK_IMPORTED_MODULE_1__["default"],
  245. AppSidebar: _components_AppSidebar_vue__WEBPACK_IMPORTED_MODULE_2__["default"],
  246. AppFooter: _components_AppFooter_vue__WEBPACK_IMPORTED_MODULE_3__["default"],
  247. AppMessage: _components_AppMessage_vue__WEBPACK_IMPORTED_MODULE_4__["default"],
  248. menu: _utils_menu__WEBPACK_IMPORTED_MODULE_5__["default"]
  249. };
  250. Object.defineProperty(__returned__, '__isScriptSetup', {
  251. enumerable: false,
  252. value: true
  253. });
  254. return __returned__;
  255. }
  256. });
  257. /***/ }),
  258. /***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/pages/mutation/Report.vue?vue&type=script&setup=true&lang=js":
  259. /*!***************************************************************************************************************************************************************************************************************!*\
  260. !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/pages/mutation/Report.vue?vue&type=script&setup=true&lang=js ***!
  261. \***************************************************************************************************************************************************************************************************************/
  262. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  263. "use strict";
  264. __webpack_require__.r(__webpack_exports__);
  265. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  266. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  267. /* harmony export */ });
  268. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  269. /* harmony import */ var _inertiajs_inertia__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @inertiajs/inertia */ "./node_modules/@inertiajs/inertia/dist/index.js");
  270. /* harmony import */ var _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @inertiajs/inertia-vue3 */ "./node_modules/@inertiajs/inertia-vue3/dist/index.js");
  271. /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js");
  272. /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);
  273. /* harmony import */ var _tableHeader__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./tableHeader */ "./resources/js/pages/mutation/tableHeader.js");
  274. /* harmony import */ var _components_useDateRangeFilter__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/components/useDateRangeFilter */ "./resources/js/components/useDateRangeFilter.js");
  275. /* harmony import */ var _layouts_DashboardLayout_vue__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/layouts/DashboardLayout.vue */ "./resources/js/layouts/DashboardLayout.vue");
  276. /* harmony import */ var _components_AppPagination_vue__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/components/AppPagination.vue */ "./resources/js/components/AppPagination.vue");
  277. /* harmony import */ var _components_AppButtonLink_vue__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/components/AppButtonLink.vue */ "./resources/js/components/AppButtonLink.vue");
  278. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  279. props: {
  280. mutations: {
  281. type: Object,
  282. "default": {
  283. details: {
  284. data: [],
  285. links: [],
  286. total: 0
  287. }
  288. }
  289. },
  290. initialDateRage: Array
  291. },
  292. setup: function setup(__props, _ref) {
  293. var expose = _ref.expose;
  294. expose();
  295. var props = __props;
  296. var _useDateRangeFilter = (0,_components_useDateRangeFilter__WEBPACK_IMPORTED_MODULE_5__.useDateRangeFilter)(props.initialDateRage),
  297. dates = _useDateRangeFilter.dates,
  298. startDate = _useDateRangeFilter.startDate,
  299. endDate = _useDateRangeFilter.endDate;
  300. (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(dates, function () {
  301. _inertiajs_inertia__WEBPACK_IMPORTED_MODULE_1__.Inertia.reload({
  302. data: (0,lodash__WEBPACK_IMPORTED_MODULE_3__.pickBy)({
  303. startDate: startDate.value,
  304. endDate: endDate.value
  305. }),
  306. only: ['mutations']
  307. });
  308. var params = window.location.search;
  309. exportExcelLink.value = "/reports/mutations/export/excel".concat(params);
  310. });
  311. var filterReset = function filterReset() {
  312. _inertiajs_inertia__WEBPACK_IMPORTED_MODULE_1__.Inertia.get('/reports/mutations');
  313. };
  314. var linkReference = function linkReference(data) {
  315. if (data.topUpId) {
  316. return route('top-ups.show', data.topUpId);
  317. } else if (data.expenseId) {
  318. return route('expenses.show', data.expenseId);
  319. } else {
  320. return route('out-transactions.show', data.outTransactionId);
  321. }
  322. };
  323. var exportExcelLink = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)('/reports/mutations/export/excel');
  324. var __returned__ = {
  325. props: props,
  326. dates: dates,
  327. startDate: startDate,
  328. endDate: endDate,
  329. filterReset: filterReset,
  330. linkReference: linkReference,
  331. exportExcelLink: exportExcelLink,
  332. watch: vue__WEBPACK_IMPORTED_MODULE_0__.watch,
  333. ref: vue__WEBPACK_IMPORTED_MODULE_0__.ref,
  334. Inertia: _inertiajs_inertia__WEBPACK_IMPORTED_MODULE_1__.Inertia,
  335. Head: _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_2__.Head,
  336. pickBy: lodash__WEBPACK_IMPORTED_MODULE_3__.pickBy,
  337. tableHeader: _tableHeader__WEBPACK_IMPORTED_MODULE_4__["default"],
  338. useDateRangeFilter: _components_useDateRangeFilter__WEBPACK_IMPORTED_MODULE_5__.useDateRangeFilter,
  339. DashboardLayout: _layouts_DashboardLayout_vue__WEBPACK_IMPORTED_MODULE_6__["default"],
  340. AppPagination: _components_AppPagination_vue__WEBPACK_IMPORTED_MODULE_7__["default"],
  341. AppButtonLink: _components_AppButtonLink_vue__WEBPACK_IMPORTED_MODULE_8__["default"]
  342. };
  343. Object.defineProperty(__returned__, '__isScriptSetup', {
  344. enumerable: false,
  345. value: true
  346. });
  347. return __returned__;
  348. }
  349. });
  350. /***/ }),
  351. /***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppButtonLink.vue?vue&type=template&id=c3621f1c":
  352. /*!***********************************************************************************************************************************************************************************************************************************************************************************!*\
  353. !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppButtonLink.vue?vue&type=template&id=c3621f1c ***!
  354. \***********************************************************************************************************************************************************************************************************************************************************************************/
  355. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  356. "use strict";
  357. __webpack_require__.r(__webpack_exports__);
  358. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  359. /* harmony export */ "render": () => (/* binding */ render)
  360. /* harmony export */ });
  361. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  362. var _hoisted_1 = {
  363. key: 1,
  364. "class": "p-button-label"
  365. };
  366. var _hoisted_2 = {
  367. key: 1,
  368. "class": "p-button-label"
  369. };
  370. function render(_ctx, _cache, $props, $setup, $data, $options) {
  371. return $props.inertiaLink ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)($setup["Link"], {
  372. key: 0,
  373. "class": "p-button p-component",
  374. as: "button",
  375. type: "button"
  376. }, {
  377. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  378. return [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
  379. key: 0,
  380. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
  381. }, null, 2
  382. /* CLASS */
  383. )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_1, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
  384. /* TEXT */
  385. )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)];
  386. }),
  387. _: 1
  388. /* STABLE */
  389. })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", {
  390. key: 1,
  391. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([$props.classButton, "p-button p-component"])
  392. }, [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
  393. key: 0,
  394. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
  395. }, null, 2
  396. /* CLASS */
  397. )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_2, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
  398. /* TEXT */
  399. )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)], 2
  400. /* CLASS */
  401. ));
  402. }
  403. /***/ }),
  404. /***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppFooter.vue?vue&type=template&id=4ab6097e&scoped=true":
  405. /*!*******************************************************************************************************************************************************************************************************************************************************************************************!*\
  406. !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppFooter.vue?vue&type=template&id=4ab6097e&scoped=true ***!
  407. \*******************************************************************************************************************************************************************************************************************************************************************************************/
  408. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  409. "use strict";
  410. __webpack_require__.r(__webpack_exports__);
  411. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  412. /* harmony export */ "render": () => (/* binding */ render)
  413. /* harmony export */ });
  414. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  415. var _withScopeId = function _withScopeId(n) {
  416. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.pushScopeId)("data-v-4ab6097e"), n = n(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.popScopeId)(), n;
  417. };
  418. var _hoisted_1 = {
  419. "class": "layout-footer"
  420. };
  421. var _hoisted_2 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(" Developed by ");
  422. var _hoisted_3 = /*#__PURE__*/_withScopeId(function () {
  423. return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("a", {
  424. href: "https://dijitalcode.com",
  425. target: "_blank",
  426. "class": "font-medium ml-2"
  427. }, "DijitalCODE", -1
  428. /* HOISTED */
  429. );
  430. });
  431. var _hoisted_4 = [_hoisted_2, _hoisted_3];
  432. function render(_ctx, _cache) {
  433. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_1, _hoisted_4);
  434. }
  435. /***/ }),
  436. /***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppMessage.vue?vue&type=template&id=07159051":
  437. /*!********************************************************************************************************************************************************************************************************************************************************************************!*\
  438. !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppMessage.vue?vue&type=template&id=07159051 ***!
  439. \********************************************************************************************************************************************************************************************************************************************************************************/
  440. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  441. "use strict";
  442. __webpack_require__.r(__webpack_exports__);
  443. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  444. /* harmony export */ "render": () => (/* binding */ render)
  445. /* harmony export */ });
  446. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  447. var _hoisted_1 = {
  448. key: 0
  449. };
  450. var _hoisted_2 = {
  451. key: 1
  452. };
  453. function render(_ctx, _cache, $props, $setup, $data, $options) {
  454. var _component_Message = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Message");
  455. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, [_ctx.$page.props.flash.success ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_Message, {
  456. key: 0,
  457. severity: "success",
  458. onClose: $setup.onClose
  459. }, {
  460. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  461. return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)((0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.$page.props.flash.success), 1
  462. /* TEXT */
  463. )];
  464. }),
  465. _: 1
  466. /* STABLE */
  467. })) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), _ctx.$page.props.flash.error ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_Message, {
  468. key: 1,
  469. severity: "error",
  470. onClose: $setup.onClose
  471. }, {
  472. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  473. return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)((0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.$page.props.flash.error), 1
  474. /* TEXT */
  475. )];
  476. }),
  477. _: 1
  478. /* STABLE */
  479. })) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), Object.keys(_ctx.$page.props.errors).length > 0 ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_Message, {
  480. key: 2,
  481. severity: "error",
  482. onClose: $setup.onClose
  483. }, {
  484. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  485. return [Object.keys(_ctx.$page.props.errors).length === 1 ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_1, "Ditemukan satu error pada form")) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_2, "Ditemukan " + (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(Object.keys(_ctx.$page.props.errors).length) + " error pada form", 1
  486. /* TEXT */
  487. ))];
  488. }),
  489. _: 1
  490. /* STABLE */
  491. })) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)], 64
  492. /* STABLE_FRAGMENT */
  493. );
  494. }
  495. /***/ }),
  496. /***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppPagination.vue?vue&type=template&id=4da56ec0":
  497. /*!***********************************************************************************************************************************************************************************************************************************************************************************!*\
  498. !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppPagination.vue?vue&type=template&id=4da56ec0 ***!
  499. \***********************************************************************************************************************************************************************************************************************************************************************************/
  500. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  501. "use strict";
  502. __webpack_require__.r(__webpack_exports__);
  503. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  504. /* harmony export */ "render": () => (/* binding */ render)
  505. /* harmony export */ });
  506. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  507. var _hoisted_1 = {
  508. key: 0,
  509. "class": "p-paginator p-component flex justify-content-start"
  510. };
  511. var _hoisted_2 = {
  512. "class": "p-paginator-pages"
  513. };
  514. var _hoisted_3 = ["innerHTML"];
  515. function render(_ctx, _cache, $props, $setup, $data, $options) {
  516. return $props.links.length > 3 ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("nav", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_2, [((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)($props.links, function (link, key) {
  517. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, [link.url === null ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", {
  518. key: "link-".concat(key),
  519. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-paginator-page p-paginator-element p-link", {
  520. 'p-disabled': link
  521. }]),
  522. innerHTML: link.label
  523. }, null, 10
  524. /* CLASS, PROPS */
  525. , _hoisted_3)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), link.url !== null ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)($setup["Link"], {
  526. key: "link-".concat(key),
  527. href: link.url,
  528. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([{
  529. 'p-highlight': link.active
  530. }, "p-paginator-page p-paginator-element p-link"]),
  531. innerHTML: link.label
  532. }, null, 8
  533. /* PROPS */
  534. , ["href", "class", "innerHTML"])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)], 64
  535. /* STABLE_FRAGMENT */
  536. );
  537. }), 256
  538. /* UNKEYED_FRAGMENT */
  539. ))])])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true);
  540. }
  541. /***/ }),
  542. /***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSidebar.vue?vue&type=template&id=22a4e926&scoped=true":
  543. /*!********************************************************************************************************************************************************************************************************************************************************************************************!*\
  544. !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSidebar.vue?vue&type=template&id=22a4e926&scoped=true ***!
  545. \********************************************************************************************************************************************************************************************************************************************************************************************/
  546. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  547. "use strict";
  548. __webpack_require__.r(__webpack_exports__);
  549. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  550. /* harmony export */ "render": () => (/* binding */ render)
  551. /* harmony export */ });
  552. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  553. function render(_ctx, _cache, $props, $setup, $data, $options) {
  554. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["AppSubSidebar"], {
  555. "class": "layout-menu",
  556. items: $props.menu,
  557. root: true
  558. }, null, 8
  559. /* PROPS */
  560. , ["items"])]);
  561. }
  562. /***/ }),
  563. /***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSubSidebar.vue?vue&type=template&id=0addd9bc&scoped=true":
  564. /*!***********************************************************************************************************************************************************************************************************************************************************************************************!*\
  565. !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSubSidebar.vue?vue&type=template&id=0addd9bc&scoped=true ***!
  566. \***********************************************************************************************************************************************************************************************************************************************************************************************/
  567. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  568. "use strict";
  569. __webpack_require__.r(__webpack_exports__);
  570. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  571. /* harmony export */ "render": () => (/* binding */ render)
  572. /* harmony export */ });
  573. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  574. var _withScopeId = function _withScopeId(n) {
  575. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.pushScopeId)("data-v-0addd9bc"), n = n(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.popScopeId)(), n;
  576. };
  577. var _hoisted_1 = {
  578. key: 0
  579. };
  580. var _hoisted_2 = ["aria-label"];
  581. var _hoisted_3 = ["aria-label"];
  582. function render(_ctx, _cache, $props, $setup, $data, $options) {
  583. var _component_AppSubSidebar = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("AppSubSidebar", true);
  584. return $props.items ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("ul", _hoisted_1, [((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)($props.items, function (item, i) {
  585. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, [item ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("li", {
  586. key: i,
  587. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([{
  588. 'layout-menuitem-category': $props.root
  589. }]),
  590. role: "none"
  591. }, [$props.root ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
  592. key: 0
  593. }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", {
  594. "class": "layout-menuitem-root-text",
  595. "aria-label": item.label
  596. }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(item.label), 9
  597. /* TEXT, PROPS */
  598. , _hoisted_2), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_AppSubSidebar, {
  599. items: item.items
  600. }, null, 8
  601. /* PROPS */
  602. , ["items"])], 64
  603. /* STABLE_FRAGMENT */
  604. )) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
  605. key: 1
  606. }, [item.to ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)($setup["Link"], {
  607. key: 0,
  608. role: "menuitem",
  609. href: item.to,
  610. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([{
  611. 'router-link-active': _ctx.$page.component.startsWith(item.component) || _ctx.$page.url.startsWith(item.to),
  612. 'router-link-exact-active': _ctx.$page.component.startsWith(item.component) || _ctx.$page.url.startsWith(item.to)
  613. }]),
  614. "aria-label": item.label
  615. }, {
  616. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  617. return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("i", {
  618. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(item.icon)
  619. }, null, 2
  620. /* CLASS */
  621. ), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(item.label), 1
  622. /* TEXT */
  623. )];
  624. }),
  625. _: 2
  626. /* DYNAMIC */
  627. }, 1032
  628. /* PROPS, DYNAMIC_SLOTS */
  629. , ["href", "class", "aria-label"])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), !item.to ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", {
  630. key: 1,
  631. href: "#",
  632. role: "menuitem",
  633. "aria-label": item.label
  634. }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("i", {
  635. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(item.icon)
  636. }, null, 2
  637. /* CLASS */
  638. ), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(item.label), 1
  639. /* TEXT */
  640. )], 8
  641. /* PROPS */
  642. , _hoisted_3)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_AppSubSidebar, {
  643. items: item.items
  644. }, null, 8
  645. /* PROPS */
  646. , ["items"])], 64
  647. /* STABLE_FRAGMENT */
  648. ))], 2
  649. /* CLASS */
  650. )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)], 64
  651. /* STABLE_FRAGMENT */
  652. );
  653. }), 256
  654. /* UNKEYED_FRAGMENT */
  655. ))])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true);
  656. }
  657. /***/ }),
  658. /***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppTopBar.vue?vue&type=template&id=42bf62a4&scoped=true":
  659. /*!*******************************************************************************************************************************************************************************************************************************************************************************************!*\
  660. !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppTopBar.vue?vue&type=template&id=42bf62a4&scoped=true ***!
  661. \*******************************************************************************************************************************************************************************************************************************************************************************************/
  662. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  663. "use strict";
  664. __webpack_require__.r(__webpack_exports__);
  665. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  666. /* harmony export */ "render": () => (/* binding */ render)
  667. /* harmony export */ });
  668. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  669. var _withScopeId = function _withScopeId(n) {
  670. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.pushScopeId)("data-v-42bf62a4"), n = n(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.popScopeId)(), n;
  671. };
  672. var _hoisted_1 = {
  673. "class": "layout-topbar"
  674. };
  675. var _hoisted_2 = /*#__PURE__*/_withScopeId(function () {
  676. return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("img", {
  677. alt: "Logo",
  678. src: "/images/logo.svg",
  679. "class": "md:mr-3"
  680. }, null, -1
  681. /* HOISTED */
  682. );
  683. });
  684. var _hoisted_3 = /*#__PURE__*/_withScopeId(function () {
  685. return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", null, "Parkirin", -1
  686. /* HOISTED */
  687. );
  688. });
  689. var _hoisted_4 = /*#__PURE__*/_withScopeId(function () {
  690. return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("i", {
  691. "class": "pi pi-bars"
  692. }, null, -1
  693. /* HOISTED */
  694. );
  695. });
  696. var _hoisted_5 = [_hoisted_4];
  697. var _hoisted_6 = {
  698. "class": "p-link layout-topbar-menu-button layout-topbar-button"
  699. };
  700. var _hoisted_7 = /*#__PURE__*/_withScopeId(function () {
  701. return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("i", {
  702. "class": "pi pi-ellipsis-v"
  703. }, null, -1
  704. /* HOISTED */
  705. );
  706. });
  707. var _hoisted_8 = [_hoisted_7];
  708. var _hoisted_9 = {
  709. "class": "layout-topbar-menu hidden lg:flex origin-top"
  710. };
  711. var _hoisted_10 = {
  712. "class": "align-self-center"
  713. };
  714. var _hoisted_11 = {
  715. "class": "hidden lg:inline"
  716. };
  717. var _hoisted_12 = /*#__PURE__*/_withScopeId(function () {
  718. return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("i", {
  719. "class": "pi pi-user"
  720. }, null, -1
  721. /* HOISTED */
  722. );
  723. });
  724. var _hoisted_13 = /*#__PURE__*/_withScopeId(function () {
  725. return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", null, "Profil Saya", -1
  726. /* HOISTED */
  727. );
  728. });
  729. var _hoisted_14 = /*#__PURE__*/_withScopeId(function () {
  730. return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("i", {
  731. "class": "pi pi-sign-out"
  732. }, null, -1
  733. /* HOISTED */
  734. );
  735. });
  736. var _hoisted_15 = /*#__PURE__*/_withScopeId(function () {
  737. return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", null, "Sign Out", -1
  738. /* HOISTED */
  739. );
  740. });
  741. function render(_ctx, _cache, $props, $setup, $data, $options) {
  742. var _directive_styleclass = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveDirective)("styleclass");
  743. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["Link"], {
  744. href: "/",
  745. "class": "layout-topbar-logo"
  746. }, {
  747. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  748. return [_hoisted_2, _hoisted_3];
  749. }),
  750. _: 1
  751. /* STABLE */
  752. }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("button", {
  753. "class": "p-link layout-menu-button layout-topbar-button",
  754. onClick: _cache[0] || (_cache[0] = function ($event) {
  755. return _ctx.$emit('menu-toggle', $event);
  756. })
  757. }, _hoisted_5), (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)(((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("button", _hoisted_6, _hoisted_8)), [[_directive_styleclass, {
  758. selector: '@next',
  759. enterClass: 'hidden',
  760. enterActiveClass: 'scalein',
  761. leaveToClass: 'hidden',
  762. leaveActiveClass: 'fadeout',
  763. hideOnOutsideClick: true
  764. }]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("ul", _hoisted_9, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("li", _hoisted_10, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", _hoisted_11, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.$page.props.auth.user.name), 1
  765. /* TEXT */
  766. )]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("li", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["Link"], {
  767. href: _ctx.route('users.show', _ctx.$page.props.auth.user.id),
  768. "class": "p-link layout-topbar-button"
  769. }, {
  770. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  771. return [_hoisted_12, _hoisted_13];
  772. }),
  773. _: 1
  774. /* STABLE */
  775. }, 8
  776. /* PROPS */
  777. , ["href"])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("li", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["Link"], {
  778. href: _ctx.route('logout'),
  779. as: "button",
  780. method: "post",
  781. "class": "p-link layout-topbar-button"
  782. }, {
  783. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  784. return [_hoisted_14, _hoisted_15];
  785. }),
  786. _: 1
  787. /* STABLE */
  788. }, 8
  789. /* PROPS */
  790. , ["href"])])])]);
  791. }
  792. /***/ }),
  793. /***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/layouts/DashboardLayout.vue?vue&type=template&id=549bf5ac&scoped=true":
  794. /*!**********************************************************************************************************************************************************************************************************************************************************************************************!*\
  795. !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/layouts/DashboardLayout.vue?vue&type=template&id=549bf5ac&scoped=true ***!
  796. \**********************************************************************************************************************************************************************************************************************************************************************************************/
  797. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  798. "use strict";
  799. __webpack_require__.r(__webpack_exports__);
  800. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  801. /* harmony export */ "render": () => (/* binding */ render)
  802. /* harmony export */ });
  803. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  804. var _withScopeId = function _withScopeId(n) {
  805. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.pushScopeId)("data-v-549bf5ac"), n = n(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.popScopeId)(), n;
  806. };
  807. var _hoisted_1 = {
  808. "class": "layout-sidebar"
  809. };
  810. var _hoisted_2 = {
  811. "class": "layout-main-container"
  812. };
  813. var _hoisted_3 = {
  814. "class": "layout-main"
  815. };
  816. var _hoisted_4 = {
  817. key: 0,
  818. "class": "layout-mask p-component-overlay"
  819. };
  820. function render(_ctx, _cache, $props, $setup, $data, $options) {
  821. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", {
  822. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)($setup.containerClass),
  823. onClick: $setup.onWrapperClick
  824. }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["AppTopBar"], {
  825. onMenuToggle: $setup.onMenuToggle
  826. }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["AppSidebar"], {
  827. menu: $setup.menu[_ctx.$page.props.auth.user.role_id]
  828. }, null, 8
  829. /* PROPS */
  830. , ["menu"])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_3, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["AppMessage"]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, "default", {}, undefined, true)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["AppFooter"])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(vue__WEBPACK_IMPORTED_MODULE_0__.Transition, {
  831. name: "layout-mask"
  832. }, {
  833. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  834. return [$setup.mobileMenuActive ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_4)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)];
  835. }),
  836. _: 1
  837. /* STABLE */
  838. })], 2
  839. /* CLASS */
  840. );
  841. }
  842. /***/ }),
  843. /***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/pages/mutation/Report.vue?vue&type=template&id=289c9421":
  844. /*!********************************************************************************************************************************************************************************************************************************************************************************!*\
  845. !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/pages/mutation/Report.vue?vue&type=template&id=289c9421 ***!
  846. \********************************************************************************************************************************************************************************************************************************************************************************/
  847. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  848. "use strict";
  849. __webpack_require__.r(__webpack_exports__);
  850. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  851. /* harmony export */ "render": () => (/* binding */ render)
  852. /* harmony export */ });
  853. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  854. var _hoisted_1 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h1", null, "Laporan Mutasi", -1
  855. /* HOISTED */
  856. );
  857. var _hoisted_2 = {
  858. "class": "grid"
  859. };
  860. var _hoisted_3 = {
  861. "class": "col-12 md:col-8"
  862. };
  863. var _hoisted_4 = {
  864. "class": "grid"
  865. };
  866. var _hoisted_5 = {
  867. "class": "col-12 md:col-4"
  868. };
  869. var _hoisted_6 = {
  870. "class": "col-auto mt-2 ml-2"
  871. };
  872. var _hoisted_7 = {
  873. "class": "col-12 md:col-4 flex flex-column md:flex-row justify-content-end"
  874. };
  875. var _hoisted_8 = {
  876. key: 0,
  877. "class": "grid mt-5 ml-1"
  878. };
  879. var _hoisted_9 = {
  880. "class": "col-auto mr-7"
  881. };
  882. var _hoisted_10 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", {
  883. "class": "text-base"
  884. }, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("i", {
  885. "class": "pi pi-wallet"
  886. }), /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(" Pendapatan")], -1
  887. /* HOISTED */
  888. );
  889. var _hoisted_11 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("br", null, null, -1
  890. /* HOISTED */
  891. );
  892. var _hoisted_12 = {
  893. "class": "text-xl font-bold"
  894. };
  895. var _hoisted_13 = {
  896. "class": "col-auto mr-7"
  897. };
  898. var _hoisted_14 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", {
  899. "class": "text-base"
  900. }, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("i", {
  901. "class": "pi pi-wallet"
  902. }), /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(" Pengeluaran")], -1
  903. /* HOISTED */
  904. );
  905. var _hoisted_15 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("br", null, null, -1
  906. /* HOISTED */
  907. );
  908. var _hoisted_16 = {
  909. "class": "text-xl font-bold"
  910. };
  911. var _hoisted_17 = {
  912. "class": "col-auto"
  913. };
  914. var _hoisted_18 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", {
  915. "class": "text-base"
  916. }, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("i", {
  917. "class": "pi pi-wallet"
  918. }), /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(" Total ")], -1
  919. /* HOISTED */
  920. );
  921. var _hoisted_19 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("br", null, null, -1
  922. /* HOISTED */
  923. );
  924. var _hoisted_20 = {
  925. "class": "text-xl font-bold"
  926. };
  927. function render(_ctx, _cache, $props, $setup, $data, $options) {
  928. var _component_Calendar = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Calendar");
  929. var _component_Button = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Button");
  930. var _component_Column = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Column");
  931. var _component_DataTable = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("DataTable");
  932. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)($setup["DashboardLayout"], null, {
  933. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  934. return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["Head"], {
  935. title: "Laporan Mutasi"
  936. }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_DataTable, {
  937. "responsive-layout": "scroll",
  938. "column-resize-mode": "expand",
  939. value: $props.mutations.details.data,
  940. "row-hover": true,
  941. "striped-rows": true
  942. }, {
  943. header: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  944. return [_hoisted_1, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_3, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_4, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_5, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Calendar, {
  945. "touch-u-i": "",
  946. "class": "w-full",
  947. modelValue: $setup.dates,
  948. "onUpdate:modelValue": _cache[0] || (_cache[0] = function ($event) {
  949. return $setup.dates = $event;
  950. }),
  951. "selection-mode": "range",
  952. placeholder: "filter waktu...",
  953. "date-format": "dd/mm/yy",
  954. "manual-input": false
  955. }, null, 8
  956. /* PROPS */
  957. , ["modelValue"])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_6, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Button, {
  958. label: "reset",
  959. "class": "p-button-link",
  960. onClick: $setup.filterReset
  961. })])])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_7, [$props.mutations.details.total ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)($setup["AppButtonLink"], {
  962. key: 0,
  963. label: "Export excel",
  964. "class-button": "p-button-outlined md:w-16rem",
  965. icon: "pi pi-file-excel",
  966. "inertia-link": false,
  967. href: $setup.exportExcelLink
  968. }, null, 8
  969. /* PROPS */
  970. , ["href"])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)])]), $props.mutations.totalAmount ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_8, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_9, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h2", null, [_hoisted_10, _hoisted_11, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", _hoisted_12, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.mutations.totalIncome), 1
  971. /* TEXT */
  972. )])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_13, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h2", null, [_hoisted_14, _hoisted_15, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", _hoisted_16, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.mutations.totalExpense), 1
  973. /* TEXT */
  974. )])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_17, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h2", null, [_hoisted_18, _hoisted_19, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", _hoisted_20, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.mutations.totalAmount), 1
  975. /* TEXT */
  976. )])])])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)];
  977. }),
  978. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  979. return [((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)($setup.tableHeader, function (value) {
  980. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_Column, {
  981. field: value.field,
  982. header: value.header,
  983. key: value.field
  984. }, null, 8
  985. /* PROPS */
  986. , ["field", "header"]);
  987. }), 128
  988. /* KEYED_FRAGMENT */
  989. )), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Column, null, {
  990. body: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function (_ref) {
  991. var data = _ref.data;
  992. return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["AppButtonLink"], {
  993. icon: "pi pi-link",
  994. "class": "p-button-text p-button-icon-only p-button-rounded p-button-text",
  995. href: $setup.linkReference(data)
  996. }, null, 8
  997. /* PROPS */
  998. , ["href"])];
  999. }),
  1000. _: 1
  1001. /* STABLE */
  1002. })];
  1003. }),
  1004. _: 1
  1005. /* STABLE */
  1006. }, 8
  1007. /* PROPS */
  1008. , ["value"]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["AppPagination"], {
  1009. links: $props.mutations.details.links
  1010. }, null, 8
  1011. /* PROPS */
  1012. , ["links"])];
  1013. }),
  1014. _: 1
  1015. /* STABLE */
  1016. });
  1017. }
  1018. /***/ }),
  1019. /***/ "./resources/js/components/useDateRangeFilter.js":
  1020. /*!*******************************************************!*\
  1021. !*** ./resources/js/components/useDateRangeFilter.js ***!
  1022. \*******************************************************/
  1023. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  1024. "use strict";
  1025. __webpack_require__.r(__webpack_exports__);
  1026. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1027. /* harmony export */ "useDateRangeFilter": () => (/* binding */ useDateRangeFilter)
  1028. /* harmony export */ });
  1029. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  1030. /* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! dayjs */ "./node_modules/dayjs/dayjs.min.js");
  1031. /* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_1__);
  1032. function useDateRangeFilter() {
  1033. var initialDateRage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  1034. var dates = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null);
  1035. var startDate = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null);
  1036. var endDate = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null);
  1037. (0,vue__WEBPACK_IMPORTED_MODULE_0__.onMounted)(function () {
  1038. if (initialDateRage[0] || initialDateRage[1]) {
  1039. if (initialDateRage[1]) {
  1040. dates.push([new Date(initialDateRage[0]), new Date(initialDateRage[1])]);
  1041. } else {
  1042. dates.push([new Date(props.initialDateRage[1]), null]);
  1043. }
  1044. }
  1045. });
  1046. (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(dates, function () {
  1047. if (dates.value[1]) {
  1048. startDate.value = dayjs__WEBPACK_IMPORTED_MODULE_1___default()(dates.value[0]).format('YYYY-MM-DD');
  1049. endDate.value = dayjs__WEBPACK_IMPORTED_MODULE_1___default()(dates.value[1]).format('YYYY-MM-DD');
  1050. } else if (dates.value[0]) {
  1051. startDate.value = dayjs__WEBPACK_IMPORTED_MODULE_1___default()(dates.value[0]).format('YYYY-MM-DD');
  1052. endDate.value = null;
  1053. }
  1054. });
  1055. return {
  1056. dates: dates,
  1057. startDate: startDate,
  1058. endDate: endDate
  1059. };
  1060. }
  1061. /***/ }),
  1062. /***/ "./resources/js/pages/mutation/tableHeader.js":
  1063. /*!****************************************************!*\
  1064. !*** ./resources/js/pages/mutation/tableHeader.js ***!
  1065. \****************************************************/
  1066. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  1067. "use strict";
  1068. __webpack_require__.r(__webpack_exports__);
  1069. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1070. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  1071. /* harmony export */ });
  1072. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ([{
  1073. field: 'createdAt',
  1074. header: 'Tanggal'
  1075. }, {
  1076. field: 'type',
  1077. header: 'Tipe'
  1078. }, {
  1079. field: 'amount',
  1080. header: 'Nilai'
  1081. }]);
  1082. /***/ }),
  1083. /***/ "./resources/js/utils/menu.js":
  1084. /*!************************************!*\
  1085. !*** ./resources/js/utils/menu.js ***!
  1086. \************************************/
  1087. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  1088. "use strict";
  1089. __webpack_require__.r(__webpack_exports__);
  1090. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1091. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  1092. /* harmony export */ });
  1093. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  1094. // Admin
  1095. 1: [{
  1096. label: 'Home',
  1097. items: [{
  1098. label: 'Dashboard',
  1099. icon: 'pi pi-home',
  1100. to: '/dashboards',
  1101. component: 'home/Index'
  1102. }]
  1103. }, {
  1104. label: 'Master',
  1105. items: [{
  1106. label: 'User',
  1107. icon: 'pi pi-user',
  1108. to: '/users',
  1109. component: 'user/Index'
  1110. }]
  1111. }],
  1112. // Supervisor
  1113. 2: [{
  1114. label: 'Home',
  1115. items: [{
  1116. label: 'Dashboard',
  1117. icon: 'pi pi-home',
  1118. to: '/dashboards',
  1119. component: 'home/Index'
  1120. }]
  1121. }, {
  1122. label: 'Menu',
  1123. items: [{
  1124. label: 'Pengeluaran',
  1125. icon: 'pi pi-wallet',
  1126. to: '/expenses',
  1127. component: 'expense/Index'
  1128. }, {
  1129. label: 'Laporan',
  1130. icon: 'pi pi-book',
  1131. items: [{
  1132. label: 'Mutasi',
  1133. icon: 'pi pi-circle',
  1134. to: '/reports/mutations',
  1135. component: 'mutation/Report'
  1136. }]
  1137. }]
  1138. }, {
  1139. label: 'Master',
  1140. items: [{
  1141. label: 'Jenis Kendaraan',
  1142. icon: 'pi pi-car',
  1143. to: '/type-vehicles',
  1144. component: 'typevehicle/Index'
  1145. }, {
  1146. label: 'Jenis Member',
  1147. icon: 'pi pi-id-card',
  1148. to: '/type-members',
  1149. component: 'typemember/Index'
  1150. }]
  1151. }, {
  1152. label: 'Pengaturan',
  1153. items: [{
  1154. label: 'Tarif Parkir',
  1155. icon: 'pi pi-car',
  1156. to: '/parking-fees/create',
  1157. component: 'parkingfee/Create'
  1158. }]
  1159. }],
  1160. // Operator
  1161. 3: [{
  1162. label: 'Home',
  1163. items: [{
  1164. label: 'Dashboard',
  1165. icon: 'pi pi-home',
  1166. to: '/dashboards',
  1167. component: 'home/Index'
  1168. }]
  1169. }, {
  1170. label: 'Menu',
  1171. items: [{
  1172. label: 'Pengeluaran',
  1173. icon: 'pi pi-wallet',
  1174. to: '/expenses',
  1175. component: 'expense/Index'
  1176. }, {
  1177. label: 'Member',
  1178. icon: 'pi pi-id-card',
  1179. to: '/members',
  1180. component: 'member/Index'
  1181. }, {
  1182. label: 'Top Up',
  1183. icon: 'pi pi-car',
  1184. to: '/top-ups',
  1185. component: 'topup/Index'
  1186. }]
  1187. }]
  1188. });
  1189. /***/ }),
  1190. /***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppFooter.vue?vue&type=style&index=0&id=4ab6097e&lang=scss&scoped=true":
  1191. /*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  1192. !*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppFooter.vue?vue&type=style&index=0&id=4ab6097e&lang=scss&scoped=true ***!
  1193. \***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  1194. /***/ ((module, __webpack_exports__, __webpack_require__) => {
  1195. "use strict";
  1196. __webpack_require__.r(__webpack_exports__);
  1197. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1198. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  1199. /* harmony export */ });
  1200. /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
  1201. /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
  1202. // Imports
  1203. var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
  1204. // Module
  1205. ___CSS_LOADER_EXPORT___.push([module.id, ".layout-footer[data-v-4ab6097e] {\n transition: margin-left 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n padding-top: 1rem;\n border-top: 1px solid var(--surface-border);\n}", ""]);
  1206. // Exports
  1207. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
  1208. /***/ }),
  1209. /***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSidebar.vue?vue&type=style&index=0&id=22a4e926&lang=scss&scoped=true":
  1210. /*!************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  1211. !*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSidebar.vue?vue&type=style&index=0&id=22a4e926&lang=scss&scoped=true ***!
  1212. \************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  1213. /***/ ((module, __webpack_exports__, __webpack_require__) => {
  1214. "use strict";
  1215. __webpack_require__.r(__webpack_exports__);
  1216. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1217. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  1218. /* harmony export */ });
  1219. /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
  1220. /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
  1221. // Imports
  1222. var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
  1223. // Module
  1224. ___CSS_LOADER_EXPORT___.push([module.id, ".layout-menu[data-v-22a4e926] {\n list-style-type: none;\n margin: 0;\n padding: 0;\n}", ""]);
  1225. // Exports
  1226. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
  1227. /***/ }),
  1228. /***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSubSidebar.vue?vue&type=style&index=0&id=0addd9bc&lang=scss&scoped=true":
  1229. /*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  1230. !*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSubSidebar.vue?vue&type=style&index=0&id=0addd9bc&lang=scss&scoped=true ***!
  1231. \***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  1232. /***/ ((module, __webpack_exports__, __webpack_require__) => {
  1233. "use strict";
  1234. __webpack_require__.r(__webpack_exports__);
  1235. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1236. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  1237. /* harmony export */ });
  1238. /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
  1239. /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
  1240. // Imports
  1241. var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
  1242. // Module
  1243. ___CSS_LOADER_EXPORT___.push([module.id, "li.layout-menuitem-category[data-v-0addd9bc] {\n margin-top: 0.75rem;\n}\nli.layout-menuitem-category[data-v-0addd9bc]:first-child {\n margin-top: 0;\n}\nli .layout-menuitem-root-text[data-v-0addd9bc] {\n text-transform: uppercase;\n color: var(--surface-900);\n font-weight: 600;\n margin-bottom: 0.5rem;\n font-size: 0.875rem;\n}\nli a[data-v-0addd9bc] {\n cursor: pointer;\n text-decoration: none;\n display: flex;\n align-items: center;\n color: var(--text-color);\n transition: color 0.2s;\n border-radius: 12px;\n padding: 0.75rem 1rem;\n transition: background-color 0.15s;\n}\nli a span[data-v-0addd9bc] {\n margin-left: 0.5rem;\n}\nli a .menuitem-toggle-icon[data-v-0addd9bc] {\n margin-left: auto;\n}\nli a[data-v-0addd9bc]:focus {\n outline: 0 none;\n outline-offset: 0;\n transition: box-shadow 0.2s;\n box-shadow: inset var(--focus-ring);\n}\nli a[data-v-0addd9bc]:hover {\n background-color: var(--surface-hover);\n}\nli a.router-link-exact-active[data-v-0addd9bc] {\n font-weight: 700;\n color: var(--primary-color);\n}\nli ul[data-v-0addd9bc] {\n list-style-type: none;\n margin: 0;\n padding: 0;\n}\nli ul ul[data-v-0addd9bc] {\n padding-left: 1rem;\n}", ""]);
  1244. // Exports
  1245. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
  1246. /***/ }),
  1247. /***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppTopBar.vue?vue&type=style&index=0&id=42bf62a4&lang=scss&scoped=true":
  1248. /*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  1249. !*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppTopBar.vue?vue&type=style&index=0&id=42bf62a4&lang=scss&scoped=true ***!
  1250. \***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  1251. /***/ ((module, __webpack_exports__, __webpack_require__) => {
  1252. "use strict";
  1253. __webpack_require__.r(__webpack_exports__);
  1254. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1255. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  1256. /* harmony export */ });
  1257. /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
  1258. /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
  1259. // Imports
  1260. var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
  1261. // Module
  1262. ___CSS_LOADER_EXPORT___.push([module.id, ".layout-topbar[data-v-42bf62a4] {\n position: fixed;\n height: 5rem;\n z-index: 997;\n left: 0;\n top: 0;\n width: 100%;\n padding: 0 2rem;\n background-color: var(--surface-card);\n transition: left 0.2s;\n display: flex;\n align-items: center;\n box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.02), 0px 0px 2px rgba(0, 0, 0, 0.05), 0px 1px 4px rgba(0, 0, 0, 0.08);\n}\n.layout-topbar .layout-topbar-logo[data-v-42bf62a4] {\n display: flex;\n align-items: center;\n color: var(--surface-900);\n font-size: 1.5rem;\n font-weight: 500;\n width: 300px;\n border-radius: 12px;\n}\n.layout-topbar .layout-topbar-logo img[data-v-42bf62a4] {\n height: 2.5rem;\n margin-right: 0.5rem;\n}\n.layout-topbar .layout-topbar-logo[data-v-42bf62a4]:focus {\n outline: 0 none;\n outline-offset: 0;\n transition: box-shadow 0.2s;\n box-shadow: var(--focus-ring);\n}\n.layout-topbar .layout-topbar-button[data-v-42bf62a4] {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n position: relative;\n color: var(--text-color-secondary);\n border-radius: 50%;\n width: 3rem;\n height: 3rem;\n cursor: pointer;\n transition: background-color 0.2s;\n}\n.layout-topbar .layout-topbar-button[data-v-42bf62a4]:hover {\n color: var(--text-color);\n background-color: var(--surface-hover);\n}\n.layout-topbar .layout-topbar-button[data-v-42bf62a4]:focus {\n outline: 0 none;\n outline-offset: 0;\n transition: box-shadow 0.2s;\n box-shadow: var(--focus-ring);\n}\n.layout-topbar .layout-topbar-button i[data-v-42bf62a4] {\n font-size: 1.5rem;\n}\n.layout-topbar .layout-topbar-button span[data-v-42bf62a4] {\n font-size: 1rem;\n display: none;\n}\n.layout-topbar .layout-menu-button[data-v-42bf62a4] {\n margin-left: 2rem;\n}\n.layout-topbar .layout-topbar-menu-button[data-v-42bf62a4] {\n display: none;\n}\n.layout-topbar .layout-topbar-menu-button i[data-v-42bf62a4] {\n font-size: 1.25rem;\n}\n.layout-topbar .layout-topbar-menu[data-v-42bf62a4] {\n margin: 0 0 0 auto;\n padding: 0;\n list-style: none;\n display: flex;\n}\n.layout-topbar .layout-topbar-menu .layout-topbar-button[data-v-42bf62a4] {\n margin-left: 1rem;\n}\n@media (max-width: 991px) {\n.layout-topbar[data-v-42bf62a4] {\n justify-content: space-between;\n}\n.layout-topbar .layout-topbar-logo[data-v-42bf62a4] {\n width: auto;\n order: 2;\n}\n.layout-topbar .layout-menu-button[data-v-42bf62a4] {\n margin-left: 0;\n order: 1;\n}\n.layout-topbar .layout-topbar-menu-button[data-v-42bf62a4] {\n display: inline-flex;\n margin-left: 0;\n order: 3;\n}\n.layout-topbar .layout-topbar-menu[data-v-42bf62a4] {\n margin-left: 0;\n position: absolute;\n flex-direction: column;\n background-color: var(--surface-overlay);\n box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.02), 0px 0px 2px rgba(0, 0, 0, 0.05), 0px 1px 4px rgba(0, 0, 0, 0.08);\n border-radius: 4px;\n padding: 1rem;\n right: 2rem;\n top: 5rem;\n min-width: 15rem;\n}\n.layout-topbar .layout-topbar-menu .layout-topbar-button[data-v-42bf62a4] {\n margin-left: 0;\n display: flex;\n width: 100%;\n height: auto;\n justify-content: flex-start;\n border-radius: 12px;\n padding: 1rem;\n}\n.layout-topbar .layout-topbar-menu .layout-topbar-button i[data-v-42bf62a4] {\n font-size: 1rem;\n margin-right: 0.5rem;\n}\n.layout-topbar .layout-topbar-menu .layout-topbar-button span[data-v-42bf62a4] {\n font-weight: medium;\n display: block;\n}\n}", ""]);
  1263. // Exports
  1264. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
  1265. /***/ }),
  1266. /***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/layouts/DashboardLayout.vue?vue&type=style&index=0&id=549bf5ac&lang=scss&scoped=true":
  1267. /*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  1268. !*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/layouts/DashboardLayout.vue?vue&type=style&index=0&id=549bf5ac&lang=scss&scoped=true ***!
  1269. \**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  1270. /***/ ((module, __webpack_exports__, __webpack_require__) => {
  1271. "use strict";
  1272. __webpack_require__.r(__webpack_exports__);
  1273. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1274. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  1275. /* harmony export */ });
  1276. /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
  1277. /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
  1278. // Imports
  1279. var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
  1280. // Module
  1281. ___CSS_LOADER_EXPORT___.push([module.id, ".layout-sidebar[data-v-549bf5ac] {\n position: fixed;\n width: 300px;\n height: calc(100vh - 9rem);\n z-index: 999;\n overflow-y: auto;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n top: 7rem;\n left: 2rem;\n transition: transform 0.2s, left 0.2s;\n background-color: var(--surface-overlay);\n border-radius: 4px;\n padding: 1.5rem;\n box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.02), 0px 0px 2px rgba(0, 0, 0, 0.05), 0px 1px 4px rgba(0, 0, 0, 0.08);\n}\n.layout-main-container[data-v-549bf5ac] {\n display: flex;\n flex-direction: column;\n min-height: 100vh;\n justify-content: space-between;\n padding: 7rem 2rem 2rem 4rem;\n transition: margin-left 0.2s;\n}\n.layout-main[data-v-549bf5ac] {\n flex: 1 1 auto;\n}\n@media (min-width: 992px) {\n.layout-wrapper .layout-main-container[data-v-549bf5ac] {\n margin-left: 300px;\n}\n.layout-wrapper.layout-static-sidebar-inactive .layout-sidebar[data-v-549bf5ac] {\n transform: translateX(-100%);\n left: 0;\n}\n.layout-wrapper.layout-static-sidebar-inactive .layout-main-container[data-v-549bf5ac] {\n margin-left: 0;\n padding-left: 2rem;\n}\n.layout-wrapper .layout-mask[data-v-549bf5ac] {\n display: none;\n}\n}\n@media (max-width: 991px) {\n.layout-wrapper .layout-main-container[data-v-549bf5ac] {\n margin-left: 0;\n padding-left: 2rem;\n}\n.layout-wrapper .layout-sidebar[data-v-549bf5ac] {\n transform: translateX(-100%);\n left: 0;\n top: 0;\n height: 100vh;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n.layout-wrapper .layout-mask[data-v-549bf5ac] {\n z-index: 998;\n background-color: var(--maskbg);\n}\n.layout-wrapper .layout-mask.layout-mask-enter-from[data-v-549bf5ac], .layout-wrapper .layout-mask.layout-mask-leave-to[data-v-549bf5ac] {\n background-color: transparent;\n}\n.layout-wrapper.layout-mobile-sidebar-active .layout-sidebar[data-v-549bf5ac] {\n transform: translateX(0);\n}\n.layout-wrapper.layout-mobile-sidebar-active .layout-mask[data-v-549bf5ac] {\n display: block;\n}\n}", ""]);
  1282. // Exports
  1283. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
  1284. /***/ }),
  1285. /***/ "./node_modules/dayjs/dayjs.min.js":
  1286. /*!*****************************************!*\
  1287. !*** ./node_modules/dayjs/dayjs.min.js ***!
  1288. \*****************************************/
  1289. /***/ (function(module) {
  1290. !function(t,e){ true?module.exports=e():0}(this,(function(){"use strict";var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",f="month",h="quarter",c="year",d="date",$="Invalid Date",l=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|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,M={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("_")},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},g={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,f),s=n-i<0,u=e.clone().add(r+(s?-1:1),f);return+(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:f,y:c,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},v="en",D={};D[v]=M;var p=function(t){return t instanceof _},S=function t(e,n,r){var i;if(!e)return v;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(v=i),i||!r&&v},w=function(t,e){if(p(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=g;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t)}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(l);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return O},m.isValid=function(){return!(this.$d.toString()===$)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!O.u(e)||e,h=O.p(t),$=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},l=function(t,e){return O.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,g="set"+(this.$u?"UTC":"");switch(h){case c:return r?$(1,0):$(31,11);case f:return r?$(1,M):$(0,M+1);case o:var v=this.$locale().weekStart||0,D=(y<v?y+7:y)-v;return $(r?m-D:m+(6-D),M);case a:case d:return l(g+"Hours",0);case u:return l(g+"Minutes",1);case s:return l(g+"Seconds",2);case i:return l(g+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=O.p(t),h="set"+(this.$u?"UTC":""),$=(n={},n[a]=h+"Date",n[d]=h+"Date",n[f]=h+"Month",n[c]=h+"FullYear",n[u]=h+"Hours",n[s]=h+"Minutes",n[i]=h+"Seconds",n[r]=h+"Milliseconds",n)[o],l=o===a?this.$D+(e-this.$W):e;if(o===f||o===c){var y=this.clone().set(d,1);y.$d[$](l),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d}else $&&this.$d[$](l);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[O.p(t)]()},m.add=function(r,h){var d,$=this;r=Number(r);var l=O.p(h),y=function(t){var e=w($);return O.w(e.date(e.date()+Math.round(t*r)),$)};if(l===f)return this.set(f,this.$M+r);if(l===c)return this.set(c,this.$y+r);if(l===a)return y(1);if(l===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[l]||1,m=this.$d.getTime()+r*M;return O.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||$;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=O.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,f=n.months,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},c=function(t){return O.s(s%12||12,t,"0")},d=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},l={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:O.s(a+1,2,"0"),MMM:h(n.monthsShort,a,f,3),MMMM:h(f,a),D:this.$D,DD:O.s(this.$D,2,"0"),d:String(this.$W),dd:h(n.weekdaysMin,this.$W,o,2),ddd:h(n.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:O.s(s,2,"0"),h:c(1),hh:c(2),a:d(s,u,!0),A:d(s,u,!1),m:String(u),mm:O.s(u,2,"0"),s:String(this.$s),ss:O.s(this.$s,2,"0"),SSS:O.s(this.$ms,3,"0"),Z:i};return r.replace(y,(function(t,e){return e||l[t]||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,$){var l,y=O.p(d),M=w(r),m=(M.utcOffset()-this.utcOffset())*e,g=this-M,v=O.m(this,M);return v=(l={},l[c]=v/12,l[f]=v,l[h]=v/3,l[o]=(g-m)/6048e5,l[a]=(g-m)/864e5,l[u]=g/n,l[s]=g/e,l[i]=g/t,l)[y]||g,$?v:O.a(v)},m.daysInMonth=function(){return this.endOf(f).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return O.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),T=_.prototype;return w.prototype=T,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",f],["$y",c],["$D",d]].forEach((function(t){T[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),w.extend=function(t,e){return t.$i||(t(e,_,w),t.$i=!0),w},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t)},w.en=D[v],w.Ls=D,w.p={},w}));
  1291. /***/ }),
  1292. /***/ "./node_modules/lodash/lodash.js":
  1293. /*!***************************************!*\
  1294. !*** ./node_modules/lodash/lodash.js ***!
  1295. \***************************************/
  1296. /***/ (function(module, exports, __webpack_require__) {
  1297. /* module decorator */ module = __webpack_require__.nmd(module);
  1298. var __WEBPACK_AMD_DEFINE_RESULT__;/**
  1299. * @license
  1300. * Lodash <https://lodash.com/>
  1301. * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
  1302. * Released under MIT license <https://lodash.com/license>
  1303. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  1304. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1305. */
  1306. ;(function() {
  1307. /** Used as a safe reference for `undefined` in pre-ES5 environments. */
  1308. var undefined;
  1309. /** Used as the semantic version number. */
  1310. var VERSION = '4.17.21';
  1311. /** Used as the size to enable large array optimizations. */
  1312. var LARGE_ARRAY_SIZE = 200;
  1313. /** Error message constants. */
  1314. var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
  1315. FUNC_ERROR_TEXT = 'Expected a function',
  1316. INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';
  1317. /** Used to stand-in for `undefined` hash values. */
  1318. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  1319. /** Used as the maximum memoize cache size. */
  1320. var MAX_MEMOIZE_SIZE = 500;
  1321. /** Used as the internal argument placeholder. */
  1322. var PLACEHOLDER = '__lodash_placeholder__';
  1323. /** Used to compose bitmasks for cloning. */
  1324. var CLONE_DEEP_FLAG = 1,
  1325. CLONE_FLAT_FLAG = 2,
  1326. CLONE_SYMBOLS_FLAG = 4;
  1327. /** Used to compose bitmasks for value comparisons. */
  1328. var COMPARE_PARTIAL_FLAG = 1,
  1329. COMPARE_UNORDERED_FLAG = 2;
  1330. /** Used to compose bitmasks for function metadata. */
  1331. var WRAP_BIND_FLAG = 1,
  1332. WRAP_BIND_KEY_FLAG = 2,
  1333. WRAP_CURRY_BOUND_FLAG = 4,
  1334. WRAP_CURRY_FLAG = 8,
  1335. WRAP_CURRY_RIGHT_FLAG = 16,
  1336. WRAP_PARTIAL_FLAG = 32,
  1337. WRAP_PARTIAL_RIGHT_FLAG = 64,
  1338. WRAP_ARY_FLAG = 128,
  1339. WRAP_REARG_FLAG = 256,
  1340. WRAP_FLIP_FLAG = 512;
  1341. /** Used as default options for `_.truncate`. */
  1342. var DEFAULT_TRUNC_LENGTH = 30,
  1343. DEFAULT_TRUNC_OMISSION = '...';
  1344. /** Used to detect hot functions by number of calls within a span of milliseconds. */
  1345. var HOT_COUNT = 800,
  1346. HOT_SPAN = 16;
  1347. /** Used to indicate the type of lazy iteratees. */
  1348. var LAZY_FILTER_FLAG = 1,
  1349. LAZY_MAP_FLAG = 2,
  1350. LAZY_WHILE_FLAG = 3;
  1351. /** Used as references for various `Number` constants. */
  1352. var INFINITY = 1 / 0,
  1353. MAX_SAFE_INTEGER = 9007199254740991,
  1354. MAX_INTEGER = 1.7976931348623157e+308,
  1355. NAN = 0 / 0;
  1356. /** Used as references for the maximum length and index of an array. */
  1357. var MAX_ARRAY_LENGTH = 4294967295,
  1358. MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
  1359. HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
  1360. /** Used to associate wrap methods with their bit flags. */
  1361. var wrapFlags = [
  1362. ['ary', WRAP_ARY_FLAG],
  1363. ['bind', WRAP_BIND_FLAG],
  1364. ['bindKey', WRAP_BIND_KEY_FLAG],
  1365. ['curry', WRAP_CURRY_FLAG],
  1366. ['curryRight', WRAP_CURRY_RIGHT_FLAG],
  1367. ['flip', WRAP_FLIP_FLAG],
  1368. ['partial', WRAP_PARTIAL_FLAG],
  1369. ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
  1370. ['rearg', WRAP_REARG_FLAG]
  1371. ];
  1372. /** `Object#toString` result references. */
  1373. var argsTag = '[object Arguments]',
  1374. arrayTag = '[object Array]',
  1375. asyncTag = '[object AsyncFunction]',
  1376. boolTag = '[object Boolean]',
  1377. dateTag = '[object Date]',
  1378. domExcTag = '[object DOMException]',
  1379. errorTag = '[object Error]',
  1380. funcTag = '[object Function]',
  1381. genTag = '[object GeneratorFunction]',
  1382. mapTag = '[object Map]',
  1383. numberTag = '[object Number]',
  1384. nullTag = '[object Null]',
  1385. objectTag = '[object Object]',
  1386. promiseTag = '[object Promise]',
  1387. proxyTag = '[object Proxy]',
  1388. regexpTag = '[object RegExp]',
  1389. setTag = '[object Set]',
  1390. stringTag = '[object String]',
  1391. symbolTag = '[object Symbol]',
  1392. undefinedTag = '[object Undefined]',
  1393. weakMapTag = '[object WeakMap]',
  1394. weakSetTag = '[object WeakSet]';
  1395. var arrayBufferTag = '[object ArrayBuffer]',
  1396. dataViewTag = '[object DataView]',
  1397. float32Tag = '[object Float32Array]',
  1398. float64Tag = '[object Float64Array]',
  1399. int8Tag = '[object Int8Array]',
  1400. int16Tag = '[object Int16Array]',
  1401. int32Tag = '[object Int32Array]',
  1402. uint8Tag = '[object Uint8Array]',
  1403. uint8ClampedTag = '[object Uint8ClampedArray]',
  1404. uint16Tag = '[object Uint16Array]',
  1405. uint32Tag = '[object Uint32Array]';
  1406. /** Used to match empty string literals in compiled template source. */
  1407. var reEmptyStringLeading = /\b__p \+= '';/g,
  1408. reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
  1409. reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
  1410. /** Used to match HTML entities and HTML characters. */
  1411. var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
  1412. reUnescapedHtml = /[&<>"']/g,
  1413. reHasEscapedHtml = RegExp(reEscapedHtml.source),
  1414. reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
  1415. /** Used to match template delimiters. */
  1416. var reEscape = /<%-([\s\S]+?)%>/g,
  1417. reEvaluate = /<%([\s\S]+?)%>/g,
  1418. reInterpolate = /<%=([\s\S]+?)%>/g;
  1419. /** Used to match property names within property paths. */
  1420. var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
  1421. reIsPlainProp = /^\w*$/,
  1422. rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
  1423. /**
  1424. * Used to match `RegExp`
  1425. * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
  1426. */
  1427. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
  1428. reHasRegExpChar = RegExp(reRegExpChar.source);
  1429. /** Used to match leading whitespace. */
  1430. var reTrimStart = /^\s+/;
  1431. /** Used to match a single whitespace character. */
  1432. var reWhitespace = /\s/;
  1433. /** Used to match wrap detail comments. */
  1434. var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
  1435. reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
  1436. reSplitDetails = /,? & /;
  1437. /** Used to match words composed of alphanumeric characters. */
  1438. var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
  1439. /**
  1440. * Used to validate the `validate` option in `_.template` variable.
  1441. *
  1442. * Forbids characters which could potentially change the meaning of the function argument definition:
  1443. * - "()," (modification of function parameters)
  1444. * - "=" (default value)
  1445. * - "[]{}" (destructuring of function parameters)
  1446. * - "/" (beginning of a comment)
  1447. * - whitespace
  1448. */
  1449. var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/;
  1450. /** Used to match backslashes in property paths. */
  1451. var reEscapeChar = /\\(\\)?/g;
  1452. /**
  1453. * Used to match
  1454. * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
  1455. */
  1456. var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
  1457. /** Used to match `RegExp` flags from their coerced string values. */
  1458. var reFlags = /\w*$/;
  1459. /** Used to detect bad signed hexadecimal string values. */
  1460. var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
  1461. /** Used to detect binary string values. */
  1462. var reIsBinary = /^0b[01]+$/i;
  1463. /** Used to detect host constructors (Safari). */
  1464. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  1465. /** Used to detect octal string values. */
  1466. var reIsOctal = /^0o[0-7]+$/i;
  1467. /** Used to detect unsigned integer values. */
  1468. var reIsUint = /^(?:0|[1-9]\d*)$/;
  1469. /** Used to match Latin Unicode letters (excluding mathematical operators). */
  1470. var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
  1471. /** Used to ensure capturing order of template delimiters. */
  1472. var reNoMatch = /($^)/;
  1473. /** Used to match unescaped characters in compiled string literals. */
  1474. var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
  1475. /** Used to compose unicode character classes. */
  1476. var rsAstralRange = '\\ud800-\\udfff',
  1477. rsComboMarksRange = '\\u0300-\\u036f',
  1478. reComboHalfMarksRange = '\\ufe20-\\ufe2f',
  1479. rsComboSymbolsRange = '\\u20d0-\\u20ff',
  1480. rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
  1481. rsDingbatRange = '\\u2700-\\u27bf',
  1482. rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
  1483. rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
  1484. rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
  1485. rsPunctuationRange = '\\u2000-\\u206f',
  1486. 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',
  1487. rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
  1488. rsVarRange = '\\ufe0e\\ufe0f',
  1489. rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
  1490. /** Used to compose unicode capture groups. */
  1491. var rsApos = "['\u2019]",
  1492. rsAstral = '[' + rsAstralRange + ']',
  1493. rsBreak = '[' + rsBreakRange + ']',
  1494. rsCombo = '[' + rsComboRange + ']',
  1495. rsDigits = '\\d+',
  1496. rsDingbat = '[' + rsDingbatRange + ']',
  1497. rsLower = '[' + rsLowerRange + ']',
  1498. rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
  1499. rsFitz = '\\ud83c[\\udffb-\\udfff]',
  1500. rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
  1501. rsNonAstral = '[^' + rsAstralRange + ']',
  1502. rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
  1503. rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
  1504. rsUpper = '[' + rsUpperRange + ']',
  1505. rsZWJ = '\\u200d';
  1506. /** Used to compose unicode regexes. */
  1507. var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
  1508. rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
  1509. rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
  1510. rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
  1511. reOptMod = rsModifier + '?',
  1512. rsOptVar = '[' + rsVarRange + ']?',
  1513. rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
  1514. rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
  1515. rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
  1516. rsSeq = rsOptVar + reOptMod + rsOptJoin,
  1517. rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
  1518. rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
  1519. /** Used to match apostrophes. */
  1520. var reApos = RegExp(rsApos, 'g');
  1521. /**
  1522. * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
  1523. * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
  1524. */
  1525. var reComboMark = RegExp(rsCombo, 'g');
  1526. /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
  1527. var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
  1528. /** Used to match complex or compound words. */
  1529. var reUnicodeWord = RegExp([
  1530. rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
  1531. rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
  1532. rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
  1533. rsUpper + '+' + rsOptContrUpper,
  1534. rsOrdUpper,
  1535. rsOrdLower,
  1536. rsDigits,
  1537. rsEmoji
  1538. ].join('|'), 'g');
  1539. /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
  1540. var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
  1541. /** Used to detect strings that need a more robust regexp to match words. */
  1542. 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 ]/;
  1543. /** Used to assign default `context` object properties. */
  1544. var contextProps = [
  1545. 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
  1546. 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
  1547. 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',
  1548. 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
  1549. '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
  1550. ];
  1551. /** Used to make template sourceURLs easier to identify. */
  1552. var templateCounter = -1;
  1553. /** Used to identify `toStringTag` values of typed arrays. */
  1554. var typedArrayTags = {};
  1555. typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
  1556. typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
  1557. typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
  1558. typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
  1559. typedArrayTags[uint32Tag] = true;
  1560. typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
  1561. typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
  1562. typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
  1563. typedArrayTags[errorTag] = typedArrayTags[funcTag] =
  1564. typedArrayTags[mapTag] = typedArrayTags[numberTag] =
  1565. typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
  1566. typedArrayTags[setTag] = typedArrayTags[stringTag] =
  1567. typedArrayTags[weakMapTag] = false;
  1568. /** Used to identify `toStringTag` values supported by `_.clone`. */
  1569. var cloneableTags = {};
  1570. cloneableTags[argsTag] = cloneableTags[arrayTag] =
  1571. cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
  1572. cloneableTags[boolTag] = cloneableTags[dateTag] =
  1573. cloneableTags[float32Tag] = cloneableTags[float64Tag] =
  1574. cloneableTags[int8Tag] = cloneableTags[int16Tag] =
  1575. cloneableTags[int32Tag] = cloneableTags[mapTag] =
  1576. cloneableTags[numberTag] = cloneableTags[objectTag] =
  1577. cloneableTags[regexpTag] = cloneableTags[setTag] =
  1578. cloneableTags[stringTag] = cloneableTags[symbolTag] =
  1579. cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
  1580. cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
  1581. cloneableTags[errorTag] = cloneableTags[funcTag] =
  1582. cloneableTags[weakMapTag] = false;
  1583. /** Used to map Latin Unicode letters to basic Latin letters. */
  1584. var deburredLetters = {
  1585. // Latin-1 Supplement block.
  1586. '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
  1587. '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
  1588. '\xc7': 'C', '\xe7': 'c',
  1589. '\xd0': 'D', '\xf0': 'd',
  1590. '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
  1591. '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
  1592. '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
  1593. '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
  1594. '\xd1': 'N', '\xf1': 'n',
  1595. '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
  1596. '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
  1597. '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
  1598. '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
  1599. '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
  1600. '\xc6': 'Ae', '\xe6': 'ae',
  1601. '\xde': 'Th', '\xfe': 'th',
  1602. '\xdf': 'ss',
  1603. // Latin Extended-A block.
  1604. '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
  1605. '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
  1606. '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
  1607. '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
  1608. '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
  1609. '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
  1610. '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
  1611. '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
  1612. '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
  1613. '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
  1614. '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
  1615. '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
  1616. '\u0134': 'J', '\u0135': 'j',
  1617. '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
  1618. '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
  1619. '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
  1620. '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
  1621. '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
  1622. '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
  1623. '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
  1624. '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
  1625. '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
  1626. '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
  1627. '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
  1628. '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
  1629. '\u0163': 't', '\u0165': 't', '\u0167': 't',
  1630. '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
  1631. '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
  1632. '\u0174': 'W', '\u0175': 'w',
  1633. '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
  1634. '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
  1635. '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
  1636. '\u0132': 'IJ', '\u0133': 'ij',
  1637. '\u0152': 'Oe', '\u0153': 'oe',
  1638. '\u0149': "'n", '\u017f': 's'
  1639. };
  1640. /** Used to map characters to HTML entities. */
  1641. var htmlEscapes = {
  1642. '&': '&amp;',
  1643. '<': '&lt;',
  1644. '>': '&gt;',
  1645. '"': '&quot;',
  1646. "'": '&#39;'
  1647. };
  1648. /** Used to map HTML entities to characters. */
  1649. var htmlUnescapes = {
  1650. '&amp;': '&',
  1651. '&lt;': '<',
  1652. '&gt;': '>',
  1653. '&quot;': '"',
  1654. '&#39;': "'"
  1655. };
  1656. /** Used to escape characters for inclusion in compiled string literals. */
  1657. var stringEscapes = {
  1658. '\\': '\\',
  1659. "'": "'",
  1660. '\n': 'n',
  1661. '\r': 'r',
  1662. '\u2028': 'u2028',
  1663. '\u2029': 'u2029'
  1664. };
  1665. /** Built-in method references without a dependency on `root`. */
  1666. var freeParseFloat = parseFloat,
  1667. freeParseInt = parseInt;
  1668. /** Detect free variable `global` from Node.js. */
  1669. var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g;
  1670. /** Detect free variable `self`. */
  1671. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  1672. /** Used as a reference to the global object. */
  1673. var root = freeGlobal || freeSelf || Function('return this')();
  1674. /** Detect free variable `exports`. */
  1675. var freeExports = true && exports && !exports.nodeType && exports;
  1676. /** Detect free variable `module`. */
  1677. var freeModule = freeExports && "object" == 'object' && module && !module.nodeType && module;
  1678. /** Detect the popular CommonJS extension `module.exports`. */
  1679. var moduleExports = freeModule && freeModule.exports === freeExports;
  1680. /** Detect free variable `process` from Node.js. */
  1681. var freeProcess = moduleExports && freeGlobal.process;
  1682. /** Used to access faster Node.js helpers. */
  1683. var nodeUtil = (function() {
  1684. try {
  1685. // Use `util.types` for Node.js 10+.
  1686. var types = freeModule && freeModule.require && freeModule.require('util').types;
  1687. if (types) {
  1688. return types;
  1689. }
  1690. // Legacy `process.binding('util')` for Node.js < 10.
  1691. return freeProcess && freeProcess.binding && freeProcess.binding('util');
  1692. } catch (e) {}
  1693. }());
  1694. /* Node.js helper references. */
  1695. var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,
  1696. nodeIsDate = nodeUtil && nodeUtil.isDate,
  1697. nodeIsMap = nodeUtil && nodeUtil.isMap,
  1698. nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,
  1699. nodeIsSet = nodeUtil && nodeUtil.isSet,
  1700. nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
  1701. /*--------------------------------------------------------------------------*/
  1702. /**
  1703. * A faster alternative to `Function#apply`, this function invokes `func`
  1704. * with the `this` binding of `thisArg` and the arguments of `args`.
  1705. *
  1706. * @private
  1707. * @param {Function} func The function to invoke.
  1708. * @param {*} thisArg The `this` binding of `func`.
  1709. * @param {Array} args The arguments to invoke `func` with.
  1710. * @returns {*} Returns the result of `func`.
  1711. */
  1712. function apply(func, thisArg, args) {
  1713. switch (args.length) {
  1714. case 0: return func.call(thisArg);
  1715. case 1: return func.call(thisArg, args[0]);
  1716. case 2: return func.call(thisArg, args[0], args[1]);
  1717. case 3: return func.call(thisArg, args[0], args[1], args[2]);
  1718. }
  1719. return func.apply(thisArg, args);
  1720. }
  1721. /**
  1722. * A specialized version of `baseAggregator` for arrays.
  1723. *
  1724. * @private
  1725. * @param {Array} [array] The array to iterate over.
  1726. * @param {Function} setter The function to set `accumulator` values.
  1727. * @param {Function} iteratee The iteratee to transform keys.
  1728. * @param {Object} accumulator The initial aggregated object.
  1729. * @returns {Function} Returns `accumulator`.
  1730. */
  1731. function arrayAggregator(array, setter, iteratee, accumulator) {
  1732. var index = -1,
  1733. length = array == null ? 0 : array.length;
  1734. while (++index < length) {
  1735. var value = array[index];
  1736. setter(accumulator, value, iteratee(value), array);
  1737. }
  1738. return accumulator;
  1739. }
  1740. /**
  1741. * A specialized version of `_.forEach` for arrays without support for
  1742. * iteratee shorthands.
  1743. *
  1744. * @private
  1745. * @param {Array} [array] The array to iterate over.
  1746. * @param {Function} iteratee The function invoked per iteration.
  1747. * @returns {Array} Returns `array`.
  1748. */
  1749. function arrayEach(array, iteratee) {
  1750. var index = -1,
  1751. length = array == null ? 0 : array.length;
  1752. while (++index < length) {
  1753. if (iteratee(array[index], index, array) === false) {
  1754. break;
  1755. }
  1756. }
  1757. return array;
  1758. }
  1759. /**
  1760. * A specialized version of `_.forEachRight` for arrays without support for
  1761. * iteratee shorthands.
  1762. *
  1763. * @private
  1764. * @param {Array} [array] The array to iterate over.
  1765. * @param {Function} iteratee The function invoked per iteration.
  1766. * @returns {Array} Returns `array`.
  1767. */
  1768. function arrayEachRight(array, iteratee) {
  1769. var length = array == null ? 0 : array.length;
  1770. while (length--) {
  1771. if (iteratee(array[length], length, array) === false) {
  1772. break;
  1773. }
  1774. }
  1775. return array;
  1776. }
  1777. /**
  1778. * A specialized version of `_.every` for arrays without support for
  1779. * iteratee shorthands.
  1780. *
  1781. * @private
  1782. * @param {Array} [array] The array to iterate over.
  1783. * @param {Function} predicate The function invoked per iteration.
  1784. * @returns {boolean} Returns `true` if all elements pass the predicate check,
  1785. * else `false`.
  1786. */
  1787. function arrayEvery(array, predicate) {
  1788. var index = -1,
  1789. length = array == null ? 0 : array.length;
  1790. while (++index < length) {
  1791. if (!predicate(array[index], index, array)) {
  1792. return false;
  1793. }
  1794. }
  1795. return true;
  1796. }
  1797. /**
  1798. * A specialized version of `_.filter` for arrays without support for
  1799. * iteratee shorthands.
  1800. *
  1801. * @private
  1802. * @param {Array} [array] The array to iterate over.
  1803. * @param {Function} predicate The function invoked per iteration.
  1804. * @returns {Array} Returns the new filtered array.
  1805. */
  1806. function arrayFilter(array, predicate) {
  1807. var index = -1,
  1808. length = array == null ? 0 : array.length,
  1809. resIndex = 0,
  1810. result = [];
  1811. while (++index < length) {
  1812. var value = array[index];
  1813. if (predicate(value, index, array)) {
  1814. result[resIndex++] = value;
  1815. }
  1816. }
  1817. return result;
  1818. }
  1819. /**
  1820. * A specialized version of `_.includes` for arrays without support for
  1821. * specifying an index to search from.
  1822. *
  1823. * @private
  1824. * @param {Array} [array] The array to inspect.
  1825. * @param {*} target The value to search for.
  1826. * @returns {boolean} Returns `true` if `target` is found, else `false`.
  1827. */
  1828. function arrayIncludes(array, value) {
  1829. var length = array == null ? 0 : array.length;
  1830. return !!length && baseIndexOf(array, value, 0) > -1;
  1831. }
  1832. /**
  1833. * This function is like `arrayIncludes` except that it accepts a comparator.
  1834. *
  1835. * @private
  1836. * @param {Array} [array] The array to inspect.
  1837. * @param {*} target The value to search for.
  1838. * @param {Function} comparator The comparator invoked per element.
  1839. * @returns {boolean} Returns `true` if `target` is found, else `false`.
  1840. */
  1841. function arrayIncludesWith(array, value, comparator) {
  1842. var index = -1,
  1843. length = array == null ? 0 : array.length;
  1844. while (++index < length) {
  1845. if (comparator(value, array[index])) {
  1846. return true;
  1847. }
  1848. }
  1849. return false;
  1850. }
  1851. /**
  1852. * A specialized version of `_.map` for arrays without support for iteratee
  1853. * shorthands.
  1854. *
  1855. * @private
  1856. * @param {Array} [array] The array to iterate over.
  1857. * @param {Function} iteratee The function invoked per iteration.
  1858. * @returns {Array} Returns the new mapped array.
  1859. */
  1860. function arrayMap(array, iteratee) {
  1861. var index = -1,
  1862. length = array == null ? 0 : array.length,
  1863. result = Array(length);
  1864. while (++index < length) {
  1865. result[index] = iteratee(array[index], index, array);
  1866. }
  1867. return result;
  1868. }
  1869. /**
  1870. * Appends the elements of `values` to `array`.
  1871. *
  1872. * @private
  1873. * @param {Array} array The array to modify.
  1874. * @param {Array} values The values to append.
  1875. * @returns {Array} Returns `array`.
  1876. */
  1877. function arrayPush(array, values) {
  1878. var index = -1,
  1879. length = values.length,
  1880. offset = array.length;
  1881. while (++index < length) {
  1882. array[offset + index] = values[index];
  1883. }
  1884. return array;
  1885. }
  1886. /**
  1887. * A specialized version of `_.reduce` for arrays without support for
  1888. * iteratee shorthands.
  1889. *
  1890. * @private
  1891. * @param {Array} [array] The array to iterate over.
  1892. * @param {Function} iteratee The function invoked per iteration.
  1893. * @param {*} [accumulator] The initial value.
  1894. * @param {boolean} [initAccum] Specify using the first element of `array` as
  1895. * the initial value.
  1896. * @returns {*} Returns the accumulated value.
  1897. */
  1898. function arrayReduce(array, iteratee, accumulator, initAccum) {
  1899. var index = -1,
  1900. length = array == null ? 0 : array.length;
  1901. if (initAccum && length) {
  1902. accumulator = array[++index];
  1903. }
  1904. while (++index < length) {
  1905. accumulator = iteratee(accumulator, array[index], index, array);
  1906. }
  1907. return accumulator;
  1908. }
  1909. /**
  1910. * A specialized version of `_.reduceRight` for arrays without support for
  1911. * iteratee shorthands.
  1912. *
  1913. * @private
  1914. * @param {Array} [array] The array to iterate over.
  1915. * @param {Function} iteratee The function invoked per iteration.
  1916. * @param {*} [accumulator] The initial value.
  1917. * @param {boolean} [initAccum] Specify using the last element of `array` as
  1918. * the initial value.
  1919. * @returns {*} Returns the accumulated value.
  1920. */
  1921. function arrayReduceRight(array, iteratee, accumulator, initAccum) {
  1922. var length = array == null ? 0 : array.length;
  1923. if (initAccum && length) {
  1924. accumulator = array[--length];
  1925. }
  1926. while (length--) {
  1927. accumulator = iteratee(accumulator, array[length], length, array);
  1928. }
  1929. return accumulator;
  1930. }
  1931. /**
  1932. * A specialized version of `_.some` for arrays without support for iteratee
  1933. * shorthands.
  1934. *
  1935. * @private
  1936. * @param {Array} [array] The array to iterate over.
  1937. * @param {Function} predicate The function invoked per iteration.
  1938. * @returns {boolean} Returns `true` if any element passes the predicate check,
  1939. * else `false`.
  1940. */
  1941. function arraySome(array, predicate) {
  1942. var index = -1,
  1943. length = array == null ? 0 : array.length;
  1944. while (++index < length) {
  1945. if (predicate(array[index], index, array)) {
  1946. return true;
  1947. }
  1948. }
  1949. return false;
  1950. }
  1951. /**
  1952. * Gets the size of an ASCII `string`.
  1953. *
  1954. * @private
  1955. * @param {string} string The string inspect.
  1956. * @returns {number} Returns the string size.
  1957. */
  1958. var asciiSize = baseProperty('length');
  1959. /**
  1960. * Converts an ASCII `string` to an array.
  1961. *
  1962. * @private
  1963. * @param {string} string The string to convert.
  1964. * @returns {Array} Returns the converted array.
  1965. */
  1966. function asciiToArray(string) {
  1967. return string.split('');
  1968. }
  1969. /**
  1970. * Splits an ASCII `string` into an array of its words.
  1971. *
  1972. * @private
  1973. * @param {string} The string to inspect.
  1974. * @returns {Array} Returns the words of `string`.
  1975. */
  1976. function asciiWords(string) {
  1977. return string.match(reAsciiWord) || [];
  1978. }
  1979. /**
  1980. * The base implementation of methods like `_.findKey` and `_.findLastKey`,
  1981. * without support for iteratee shorthands, which iterates over `collection`
  1982. * using `eachFunc`.
  1983. *
  1984. * @private
  1985. * @param {Array|Object} collection The collection to inspect.
  1986. * @param {Function} predicate The function invoked per iteration.
  1987. * @param {Function} eachFunc The function to iterate over `collection`.
  1988. * @returns {*} Returns the found element or its key, else `undefined`.
  1989. */
  1990. function baseFindKey(collection, predicate, eachFunc) {
  1991. var result;
  1992. eachFunc(collection, function(value, key, collection) {
  1993. if (predicate(value, key, collection)) {
  1994. result = key;
  1995. return false;
  1996. }
  1997. });
  1998. return result;
  1999. }
  2000. /**
  2001. * The base implementation of `_.findIndex` and `_.findLastIndex` without
  2002. * support for iteratee shorthands.
  2003. *
  2004. * @private
  2005. * @param {Array} array The array to inspect.
  2006. * @param {Function} predicate The function invoked per iteration.
  2007. * @param {number} fromIndex The index to search from.
  2008. * @param {boolean} [fromRight] Specify iterating from right to left.
  2009. * @returns {number} Returns the index of the matched value, else `-1`.
  2010. */
  2011. function baseFindIndex(array, predicate, fromIndex, fromRight) {
  2012. var length = array.length,
  2013. index = fromIndex + (fromRight ? 1 : -1);
  2014. while ((fromRight ? index-- : ++index < length)) {
  2015. if (predicate(array[index], index, array)) {
  2016. return index;
  2017. }
  2018. }
  2019. return -1;
  2020. }
  2021. /**
  2022. * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
  2023. *
  2024. * @private
  2025. * @param {Array} array The array to inspect.
  2026. * @param {*} value The value to search for.
  2027. * @param {number} fromIndex The index to search from.
  2028. * @returns {number} Returns the index of the matched value, else `-1`.
  2029. */
  2030. function baseIndexOf(array, value, fromIndex) {
  2031. return value === value
  2032. ? strictIndexOf(array, value, fromIndex)
  2033. : baseFindIndex(array, baseIsNaN, fromIndex);
  2034. }
  2035. /**
  2036. * This function is like `baseIndexOf` except that it accepts a comparator.
  2037. *
  2038. * @private
  2039. * @param {Array} array The array to inspect.
  2040. * @param {*} value The value to search for.
  2041. * @param {number} fromIndex The index to search from.
  2042. * @param {Function} comparator The comparator invoked per element.
  2043. * @returns {number} Returns the index of the matched value, else `-1`.
  2044. */
  2045. function baseIndexOfWith(array, value, fromIndex, comparator) {
  2046. var index = fromIndex - 1,
  2047. length = array.length;
  2048. while (++index < length) {
  2049. if (comparator(array[index], value)) {
  2050. return index;
  2051. }
  2052. }
  2053. return -1;
  2054. }
  2055. /**
  2056. * The base implementation of `_.isNaN` without support for number objects.
  2057. *
  2058. * @private
  2059. * @param {*} value The value to check.
  2060. * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
  2061. */
  2062. function baseIsNaN(value) {
  2063. return value !== value;
  2064. }
  2065. /**
  2066. * The base implementation of `_.mean` and `_.meanBy` without support for
  2067. * iteratee shorthands.
  2068. *
  2069. * @private
  2070. * @param {Array} array The array to iterate over.
  2071. * @param {Function} iteratee The function invoked per iteration.
  2072. * @returns {number} Returns the mean.
  2073. */
  2074. function baseMean(array, iteratee) {
  2075. var length = array == null ? 0 : array.length;
  2076. return length ? (baseSum(array, iteratee) / length) : NAN;
  2077. }
  2078. /**
  2079. * The base implementation of `_.property` without support for deep paths.
  2080. *
  2081. * @private
  2082. * @param {string} key The key of the property to get.
  2083. * @returns {Function} Returns the new accessor function.
  2084. */
  2085. function baseProperty(key) {
  2086. return function(object) {
  2087. return object == null ? undefined : object[key];
  2088. };
  2089. }
  2090. /**
  2091. * The base implementation of `_.propertyOf` without support for deep paths.
  2092. *
  2093. * @private
  2094. * @param {Object} object The object to query.
  2095. * @returns {Function} Returns the new accessor function.
  2096. */
  2097. function basePropertyOf(object) {
  2098. return function(key) {
  2099. return object == null ? undefined : object[key];
  2100. };
  2101. }
  2102. /**
  2103. * The base implementation of `_.reduce` and `_.reduceRight`, without support
  2104. * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
  2105. *
  2106. * @private
  2107. * @param {Array|Object} collection The collection to iterate over.
  2108. * @param {Function} iteratee The function invoked per iteration.
  2109. * @param {*} accumulator The initial value.
  2110. * @param {boolean} initAccum Specify using the first or last element of
  2111. * `collection` as the initial value.
  2112. * @param {Function} eachFunc The function to iterate over `collection`.
  2113. * @returns {*} Returns the accumulated value.
  2114. */
  2115. function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
  2116. eachFunc(collection, function(value, index, collection) {
  2117. accumulator = initAccum
  2118. ? (initAccum = false, value)
  2119. : iteratee(accumulator, value, index, collection);
  2120. });
  2121. return accumulator;
  2122. }
  2123. /**
  2124. * The base implementation of `_.sortBy` which uses `comparer` to define the
  2125. * sort order of `array` and replaces criteria objects with their corresponding
  2126. * values.
  2127. *
  2128. * @private
  2129. * @param {Array} array The array to sort.
  2130. * @param {Function} comparer The function to define sort order.
  2131. * @returns {Array} Returns `array`.
  2132. */
  2133. function baseSortBy(array, comparer) {
  2134. var length = array.length;
  2135. array.sort(comparer);
  2136. while (length--) {
  2137. array[length] = array[length].value;
  2138. }
  2139. return array;
  2140. }
  2141. /**
  2142. * The base implementation of `_.sum` and `_.sumBy` without support for
  2143. * iteratee shorthands.
  2144. *
  2145. * @private
  2146. * @param {Array} array The array to iterate over.
  2147. * @param {Function} iteratee The function invoked per iteration.
  2148. * @returns {number} Returns the sum.
  2149. */
  2150. function baseSum(array, iteratee) {
  2151. var result,
  2152. index = -1,
  2153. length = array.length;
  2154. while (++index < length) {
  2155. var current = iteratee(array[index]);
  2156. if (current !== undefined) {
  2157. result = result === undefined ? current : (result + current);
  2158. }
  2159. }
  2160. return result;
  2161. }
  2162. /**
  2163. * The base implementation of `_.times` without support for iteratee shorthands
  2164. * or max array length checks.
  2165. *
  2166. * @private
  2167. * @param {number} n The number of times to invoke `iteratee`.
  2168. * @param {Function} iteratee The function invoked per iteration.
  2169. * @returns {Array} Returns the array of results.
  2170. */
  2171. function baseTimes(n, iteratee) {
  2172. var index = -1,
  2173. result = Array(n);
  2174. while (++index < n) {
  2175. result[index] = iteratee(index);
  2176. }
  2177. return result;
  2178. }
  2179. /**
  2180. * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
  2181. * of key-value pairs for `object` corresponding to the property names of `props`.
  2182. *
  2183. * @private
  2184. * @param {Object} object The object to query.
  2185. * @param {Array} props The property names to get values for.
  2186. * @returns {Object} Returns the key-value pairs.
  2187. */
  2188. function baseToPairs(object, props) {
  2189. return arrayMap(props, function(key) {
  2190. return [key, object[key]];
  2191. });
  2192. }
  2193. /**
  2194. * The base implementation of `_.trim`.
  2195. *
  2196. * @private
  2197. * @param {string} string The string to trim.
  2198. * @returns {string} Returns the trimmed string.
  2199. */
  2200. function baseTrim(string) {
  2201. return string
  2202. ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
  2203. : string;
  2204. }
  2205. /**
  2206. * The base implementation of `_.unary` without support for storing metadata.
  2207. *
  2208. * @private
  2209. * @param {Function} func The function to cap arguments for.
  2210. * @returns {Function} Returns the new capped function.
  2211. */
  2212. function baseUnary(func) {
  2213. return function(value) {
  2214. return func(value);
  2215. };
  2216. }
  2217. /**
  2218. * The base implementation of `_.values` and `_.valuesIn` which creates an
  2219. * array of `object` property values corresponding to the property names
  2220. * of `props`.
  2221. *
  2222. * @private
  2223. * @param {Object} object The object to query.
  2224. * @param {Array} props The property names to get values for.
  2225. * @returns {Object} Returns the array of property values.
  2226. */
  2227. function baseValues(object, props) {
  2228. return arrayMap(props, function(key) {
  2229. return object[key];
  2230. });
  2231. }
  2232. /**
  2233. * Checks if a `cache` value for `key` exists.
  2234. *
  2235. * @private
  2236. * @param {Object} cache The cache to query.
  2237. * @param {string} key The key of the entry to check.
  2238. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  2239. */
  2240. function cacheHas(cache, key) {
  2241. return cache.has(key);
  2242. }
  2243. /**
  2244. * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
  2245. * that is not found in the character symbols.
  2246. *
  2247. * @private
  2248. * @param {Array} strSymbols The string symbols to inspect.
  2249. * @param {Array} chrSymbols The character symbols to find.
  2250. * @returns {number} Returns the index of the first unmatched string symbol.
  2251. */
  2252. function charsStartIndex(strSymbols, chrSymbols) {
  2253. var index = -1,
  2254. length = strSymbols.length;
  2255. while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
  2256. return index;
  2257. }
  2258. /**
  2259. * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
  2260. * that is not found in the character symbols.
  2261. *
  2262. * @private
  2263. * @param {Array} strSymbols The string symbols to inspect.
  2264. * @param {Array} chrSymbols The character symbols to find.
  2265. * @returns {number} Returns the index of the last unmatched string symbol.
  2266. */
  2267. function charsEndIndex(strSymbols, chrSymbols) {
  2268. var index = strSymbols.length;
  2269. while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
  2270. return index;
  2271. }
  2272. /**
  2273. * Gets the number of `placeholder` occurrences in `array`.
  2274. *
  2275. * @private
  2276. * @param {Array} array The array to inspect.
  2277. * @param {*} placeholder The placeholder to search for.
  2278. * @returns {number} Returns the placeholder count.
  2279. */
  2280. function countHolders(array, placeholder) {
  2281. var length = array.length,
  2282. result = 0;
  2283. while (length--) {
  2284. if (array[length] === placeholder) {
  2285. ++result;
  2286. }
  2287. }
  2288. return result;
  2289. }
  2290. /**
  2291. * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
  2292. * letters to basic Latin letters.
  2293. *
  2294. * @private
  2295. * @param {string} letter The matched letter to deburr.
  2296. * @returns {string} Returns the deburred letter.
  2297. */
  2298. var deburrLetter = basePropertyOf(deburredLetters);
  2299. /**
  2300. * Used by `_.escape` to convert characters to HTML entities.
  2301. *
  2302. * @private
  2303. * @param {string} chr The matched character to escape.
  2304. * @returns {string} Returns the escaped character.
  2305. */
  2306. var escapeHtmlChar = basePropertyOf(htmlEscapes);
  2307. /**
  2308. * Used by `_.template` to escape characters for inclusion in compiled string literals.
  2309. *
  2310. * @private
  2311. * @param {string} chr The matched character to escape.
  2312. * @returns {string} Returns the escaped character.
  2313. */
  2314. function escapeStringChar(chr) {
  2315. return '\\' + stringEscapes[chr];
  2316. }
  2317. /**
  2318. * Gets the value at `key` of `object`.
  2319. *
  2320. * @private
  2321. * @param {Object} [object] The object to query.
  2322. * @param {string} key The key of the property to get.
  2323. * @returns {*} Returns the property value.
  2324. */
  2325. function getValue(object, key) {
  2326. return object == null ? undefined : object[key];
  2327. }
  2328. /**
  2329. * Checks if `string` contains Unicode symbols.
  2330. *
  2331. * @private
  2332. * @param {string} string The string to inspect.
  2333. * @returns {boolean} Returns `true` if a symbol is found, else `false`.
  2334. */
  2335. function hasUnicode(string) {
  2336. return reHasUnicode.test(string);
  2337. }
  2338. /**
  2339. * Checks if `string` contains a word composed of Unicode symbols.
  2340. *
  2341. * @private
  2342. * @param {string} string The string to inspect.
  2343. * @returns {boolean} Returns `true` if a word is found, else `false`.
  2344. */
  2345. function hasUnicodeWord(string) {
  2346. return reHasUnicodeWord.test(string);
  2347. }
  2348. /**
  2349. * Converts `iterator` to an array.
  2350. *
  2351. * @private
  2352. * @param {Object} iterator The iterator to convert.
  2353. * @returns {Array} Returns the converted array.
  2354. */
  2355. function iteratorToArray(iterator) {
  2356. var data,
  2357. result = [];
  2358. while (!(data = iterator.next()).done) {
  2359. result.push(data.value);
  2360. }
  2361. return result;
  2362. }
  2363. /**
  2364. * Converts `map` to its key-value pairs.
  2365. *
  2366. * @private
  2367. * @param {Object} map The map to convert.
  2368. * @returns {Array} Returns the key-value pairs.
  2369. */
  2370. function mapToArray(map) {
  2371. var index = -1,
  2372. result = Array(map.size);
  2373. map.forEach(function(value, key) {
  2374. result[++index] = [key, value];
  2375. });
  2376. return result;
  2377. }
  2378. /**
  2379. * Creates a unary function that invokes `func` with its argument transformed.
  2380. *
  2381. * @private
  2382. * @param {Function} func The function to wrap.
  2383. * @param {Function} transform The argument transform.
  2384. * @returns {Function} Returns the new function.
  2385. */
  2386. function overArg(func, transform) {
  2387. return function(arg) {
  2388. return func(transform(arg));
  2389. };
  2390. }
  2391. /**
  2392. * Replaces all `placeholder` elements in `array` with an internal placeholder
  2393. * and returns an array of their indexes.
  2394. *
  2395. * @private
  2396. * @param {Array} array The array to modify.
  2397. * @param {*} placeholder The placeholder to replace.
  2398. * @returns {Array} Returns the new array of placeholder indexes.
  2399. */
  2400. function replaceHolders(array, placeholder) {
  2401. var index = -1,
  2402. length = array.length,
  2403. resIndex = 0,
  2404. result = [];
  2405. while (++index < length) {
  2406. var value = array[index];
  2407. if (value === placeholder || value === PLACEHOLDER) {
  2408. array[index] = PLACEHOLDER;
  2409. result[resIndex++] = index;
  2410. }
  2411. }
  2412. return result;
  2413. }
  2414. /**
  2415. * Converts `set` to an array of its values.
  2416. *
  2417. * @private
  2418. * @param {Object} set The set to convert.
  2419. * @returns {Array} Returns the values.
  2420. */
  2421. function setToArray(set) {
  2422. var index = -1,
  2423. result = Array(set.size);
  2424. set.forEach(function(value) {
  2425. result[++index] = value;
  2426. });
  2427. return result;
  2428. }
  2429. /**
  2430. * Converts `set` to its value-value pairs.
  2431. *
  2432. * @private
  2433. * @param {Object} set The set to convert.
  2434. * @returns {Array} Returns the value-value pairs.
  2435. */
  2436. function setToPairs(set) {
  2437. var index = -1,
  2438. result = Array(set.size);
  2439. set.forEach(function(value) {
  2440. result[++index] = [value, value];
  2441. });
  2442. return result;
  2443. }
  2444. /**
  2445. * A specialized version of `_.indexOf` which performs strict equality
  2446. * comparisons of values, i.e. `===`.
  2447. *
  2448. * @private
  2449. * @param {Array} array The array to inspect.
  2450. * @param {*} value The value to search for.
  2451. * @param {number} fromIndex The index to search from.
  2452. * @returns {number} Returns the index of the matched value, else `-1`.
  2453. */
  2454. function strictIndexOf(array, value, fromIndex) {
  2455. var index = fromIndex - 1,
  2456. length = array.length;
  2457. while (++index < length) {
  2458. if (array[index] === value) {
  2459. return index;
  2460. }
  2461. }
  2462. return -1;
  2463. }
  2464. /**
  2465. * A specialized version of `_.lastIndexOf` which performs strict equality
  2466. * comparisons of values, i.e. `===`.
  2467. *
  2468. * @private
  2469. * @param {Array} array The array to inspect.
  2470. * @param {*} value The value to search for.
  2471. * @param {number} fromIndex The index to search from.
  2472. * @returns {number} Returns the index of the matched value, else `-1`.
  2473. */
  2474. function strictLastIndexOf(array, value, fromIndex) {
  2475. var index = fromIndex + 1;
  2476. while (index--) {
  2477. if (array[index] === value) {
  2478. return index;
  2479. }
  2480. }
  2481. return index;
  2482. }
  2483. /**
  2484. * Gets the number of symbols in `string`.
  2485. *
  2486. * @private
  2487. * @param {string} string The string to inspect.
  2488. * @returns {number} Returns the string size.
  2489. */
  2490. function stringSize(string) {
  2491. return hasUnicode(string)
  2492. ? unicodeSize(string)
  2493. : asciiSize(string);
  2494. }
  2495. /**
  2496. * Converts `string` to an array.
  2497. *
  2498. * @private
  2499. * @param {string} string The string to convert.
  2500. * @returns {Array} Returns the converted array.
  2501. */
  2502. function stringToArray(string) {
  2503. return hasUnicode(string)
  2504. ? unicodeToArray(string)
  2505. : asciiToArray(string);
  2506. }
  2507. /**
  2508. * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
  2509. * character of `string`.
  2510. *
  2511. * @private
  2512. * @param {string} string The string to inspect.
  2513. * @returns {number} Returns the index of the last non-whitespace character.
  2514. */
  2515. function trimmedEndIndex(string) {
  2516. var index = string.length;
  2517. while (index-- && reWhitespace.test(string.charAt(index))) {}
  2518. return index;
  2519. }
  2520. /**
  2521. * Used by `_.unescape` to convert HTML entities to characters.
  2522. *
  2523. * @private
  2524. * @param {string} chr The matched character to unescape.
  2525. * @returns {string} Returns the unescaped character.
  2526. */
  2527. var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
  2528. /**
  2529. * Gets the size of a Unicode `string`.
  2530. *
  2531. * @private
  2532. * @param {string} string The string inspect.
  2533. * @returns {number} Returns the string size.
  2534. */
  2535. function unicodeSize(string) {
  2536. var result = reUnicode.lastIndex = 0;
  2537. while (reUnicode.test(string)) {
  2538. ++result;
  2539. }
  2540. return result;
  2541. }
  2542. /**
  2543. * Converts a Unicode `string` to an array.
  2544. *
  2545. * @private
  2546. * @param {string} string The string to convert.
  2547. * @returns {Array} Returns the converted array.
  2548. */
  2549. function unicodeToArray(string) {
  2550. return string.match(reUnicode) || [];
  2551. }
  2552. /**
  2553. * Splits a Unicode `string` into an array of its words.
  2554. *
  2555. * @private
  2556. * @param {string} The string to inspect.
  2557. * @returns {Array} Returns the words of `string`.
  2558. */
  2559. function unicodeWords(string) {
  2560. return string.match(reUnicodeWord) || [];
  2561. }
  2562. /*--------------------------------------------------------------------------*/
  2563. /**
  2564. * Create a new pristine `lodash` function using the `context` object.
  2565. *
  2566. * @static
  2567. * @memberOf _
  2568. * @since 1.1.0
  2569. * @category Util
  2570. * @param {Object} [context=root] The context object.
  2571. * @returns {Function} Returns a new `lodash` function.
  2572. * @example
  2573. *
  2574. * _.mixin({ 'foo': _.constant('foo') });
  2575. *
  2576. * var lodash = _.runInContext();
  2577. * lodash.mixin({ 'bar': lodash.constant('bar') });
  2578. *
  2579. * _.isFunction(_.foo);
  2580. * // => true
  2581. * _.isFunction(_.bar);
  2582. * // => false
  2583. *
  2584. * lodash.isFunction(lodash.foo);
  2585. * // => false
  2586. * lodash.isFunction(lodash.bar);
  2587. * // => true
  2588. *
  2589. * // Create a suped-up `defer` in Node.js.
  2590. * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
  2591. */
  2592. var runInContext = (function runInContext(context) {
  2593. context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
  2594. /** Built-in constructor references. */
  2595. var Array = context.Array,
  2596. Date = context.Date,
  2597. Error = context.Error,
  2598. Function = context.Function,
  2599. Math = context.Math,
  2600. Object = context.Object,
  2601. RegExp = context.RegExp,
  2602. String = context.String,
  2603. TypeError = context.TypeError;
  2604. /** Used for built-in method references. */
  2605. var arrayProto = Array.prototype,
  2606. funcProto = Function.prototype,
  2607. objectProto = Object.prototype;
  2608. /** Used to detect overreaching core-js shims. */
  2609. var coreJsData = context['__core-js_shared__'];
  2610. /** Used to resolve the decompiled source of functions. */
  2611. var funcToString = funcProto.toString;
  2612. /** Used to check objects for own properties. */
  2613. var hasOwnProperty = objectProto.hasOwnProperty;
  2614. /** Used to generate unique IDs. */
  2615. var idCounter = 0;
  2616. /** Used to detect methods masquerading as native. */
  2617. var maskSrcKey = (function() {
  2618. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  2619. return uid ? ('Symbol(src)_1.' + uid) : '';
  2620. }());
  2621. /**
  2622. * Used to resolve the
  2623. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  2624. * of values.
  2625. */
  2626. var nativeObjectToString = objectProto.toString;
  2627. /** Used to infer the `Object` constructor. */
  2628. var objectCtorString = funcToString.call(Object);
  2629. /** Used to restore the original `_` reference in `_.noConflict`. */
  2630. var oldDash = root._;
  2631. /** Used to detect if a method is native. */
  2632. var reIsNative = RegExp('^' +
  2633. funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
  2634. .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
  2635. );
  2636. /** Built-in value references. */
  2637. var Buffer = moduleExports ? context.Buffer : undefined,
  2638. Symbol = context.Symbol,
  2639. Uint8Array = context.Uint8Array,
  2640. allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
  2641. getPrototype = overArg(Object.getPrototypeOf, Object),
  2642. objectCreate = Object.create,
  2643. propertyIsEnumerable = objectProto.propertyIsEnumerable,
  2644. splice = arrayProto.splice,
  2645. spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,
  2646. symIterator = Symbol ? Symbol.iterator : undefined,
  2647. symToStringTag = Symbol ? Symbol.toStringTag : undefined;
  2648. var defineProperty = (function() {
  2649. try {
  2650. var func = getNative(Object, 'defineProperty');
  2651. func({}, '', {});
  2652. return func;
  2653. } catch (e) {}
  2654. }());
  2655. /** Mocked built-ins. */
  2656. var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,
  2657. ctxNow = Date && Date.now !== root.Date.now && Date.now,
  2658. ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
  2659. /* Built-in method references for those with the same name as other `lodash` methods. */
  2660. var nativeCeil = Math.ceil,
  2661. nativeFloor = Math.floor,
  2662. nativeGetSymbols = Object.getOwnPropertySymbols,
  2663. nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
  2664. nativeIsFinite = context.isFinite,
  2665. nativeJoin = arrayProto.join,
  2666. nativeKeys = overArg(Object.keys, Object),
  2667. nativeMax = Math.max,
  2668. nativeMin = Math.min,
  2669. nativeNow = Date.now,
  2670. nativeParseInt = context.parseInt,
  2671. nativeRandom = Math.random,
  2672. nativeReverse = arrayProto.reverse;
  2673. /* Built-in method references that are verified to be native. */
  2674. var DataView = getNative(context, 'DataView'),
  2675. Map = getNative(context, 'Map'),
  2676. Promise = getNative(context, 'Promise'),
  2677. Set = getNative(context, 'Set'),
  2678. WeakMap = getNative(context, 'WeakMap'),
  2679. nativeCreate = getNative(Object, 'create');
  2680. /** Used to store function metadata. */
  2681. var metaMap = WeakMap && new WeakMap;
  2682. /** Used to lookup unminified function names. */
  2683. var realNames = {};
  2684. /** Used to detect maps, sets, and weakmaps. */
  2685. var dataViewCtorString = toSource(DataView),
  2686. mapCtorString = toSource(Map),
  2687. promiseCtorString = toSource(Promise),
  2688. setCtorString = toSource(Set),
  2689. weakMapCtorString = toSource(WeakMap);
  2690. /** Used to convert symbols to primitives and strings. */
  2691. var symbolProto = Symbol ? Symbol.prototype : undefined,
  2692. symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
  2693. symbolToString = symbolProto ? symbolProto.toString : undefined;
  2694. /*------------------------------------------------------------------------*/
  2695. /**
  2696. * Creates a `lodash` object which wraps `value` to enable implicit method
  2697. * chain sequences. Methods that operate on and return arrays, collections,
  2698. * and functions can be chained together. Methods that retrieve a single value
  2699. * or may return a primitive value will automatically end the chain sequence
  2700. * and return the unwrapped value. Otherwise, the value must be unwrapped
  2701. * with `_#value`.
  2702. *
  2703. * Explicit chain sequences, which must be unwrapped with `_#value`, may be
  2704. * enabled using `_.chain`.
  2705. *
  2706. * The execution of chained methods is lazy, that is, it's deferred until
  2707. * `_#value` is implicitly or explicitly called.
  2708. *
  2709. * Lazy evaluation allows several methods to support shortcut fusion.
  2710. * Shortcut fusion is an optimization to merge iteratee calls; this avoids
  2711. * the creation of intermediate arrays and can greatly reduce the number of
  2712. * iteratee executions. Sections of a chain sequence qualify for shortcut
  2713. * fusion if the section is applied to an array and iteratees accept only
  2714. * one argument. The heuristic for whether a section qualifies for shortcut
  2715. * fusion is subject to change.
  2716. *
  2717. * Chaining is supported in custom builds as long as the `_#value` method is
  2718. * directly or indirectly included in the build.
  2719. *
  2720. * In addition to lodash methods, wrappers have `Array` and `String` methods.
  2721. *
  2722. * The wrapper `Array` methods are:
  2723. * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
  2724. *
  2725. * The wrapper `String` methods are:
  2726. * `replace` and `split`
  2727. *
  2728. * The wrapper methods that support shortcut fusion are:
  2729. * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
  2730. * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
  2731. * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
  2732. *
  2733. * The chainable wrapper methods are:
  2734. * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
  2735. * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
  2736. * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
  2737. * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
  2738. * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
  2739. * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
  2740. * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
  2741. * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
  2742. * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
  2743. * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
  2744. * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
  2745. * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
  2746. * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
  2747. * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
  2748. * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
  2749. * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
  2750. * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
  2751. * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
  2752. * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
  2753. * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
  2754. * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
  2755. * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
  2756. * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
  2757. * `zipObject`, `zipObjectDeep`, and `zipWith`
  2758. *
  2759. * The wrapper methods that are **not** chainable by default are:
  2760. * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
  2761. * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
  2762. * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
  2763. * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
  2764. * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
  2765. * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
  2766. * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
  2767. * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
  2768. * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
  2769. * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
  2770. * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
  2771. * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
  2772. * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
  2773. * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
  2774. * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
  2775. * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
  2776. * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
  2777. * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
  2778. * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
  2779. * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
  2780. * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
  2781. * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
  2782. * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
  2783. * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
  2784. * `upperFirst`, `value`, and `words`
  2785. *
  2786. * @name _
  2787. * @constructor
  2788. * @category Seq
  2789. * @param {*} value The value to wrap in a `lodash` instance.
  2790. * @returns {Object} Returns the new `lodash` wrapper instance.
  2791. * @example
  2792. *
  2793. * function square(n) {
  2794. * return n * n;
  2795. * }
  2796. *
  2797. * var wrapped = _([1, 2, 3]);
  2798. *
  2799. * // Returns an unwrapped value.
  2800. * wrapped.reduce(_.add);
  2801. * // => 6
  2802. *
  2803. * // Returns a wrapped value.
  2804. * var squares = wrapped.map(square);
  2805. *
  2806. * _.isArray(squares);
  2807. * // => false
  2808. *
  2809. * _.isArray(squares.value());
  2810. * // => true
  2811. */
  2812. function lodash(value) {
  2813. if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
  2814. if (value instanceof LodashWrapper) {
  2815. return value;
  2816. }
  2817. if (hasOwnProperty.call(value, '__wrapped__')) {
  2818. return wrapperClone(value);
  2819. }
  2820. }
  2821. return new LodashWrapper(value);
  2822. }
  2823. /**
  2824. * The base implementation of `_.create` without support for assigning
  2825. * properties to the created object.
  2826. *
  2827. * @private
  2828. * @param {Object} proto The object to inherit from.
  2829. * @returns {Object} Returns the new object.
  2830. */
  2831. var baseCreate = (function() {
  2832. function object() {}
  2833. return function(proto) {
  2834. if (!isObject(proto)) {
  2835. return {};
  2836. }
  2837. if (objectCreate) {
  2838. return objectCreate(proto);
  2839. }
  2840. object.prototype = proto;
  2841. var result = new object;
  2842. object.prototype = undefined;
  2843. return result;
  2844. };
  2845. }());
  2846. /**
  2847. * The function whose prototype chain sequence wrappers inherit from.
  2848. *
  2849. * @private
  2850. */
  2851. function baseLodash() {
  2852. // No operation performed.
  2853. }
  2854. /**
  2855. * The base constructor for creating `lodash` wrapper objects.
  2856. *
  2857. * @private
  2858. * @param {*} value The value to wrap.
  2859. * @param {boolean} [chainAll] Enable explicit method chain sequences.
  2860. */
  2861. function LodashWrapper(value, chainAll) {
  2862. this.__wrapped__ = value;
  2863. this.__actions__ = [];
  2864. this.__chain__ = !!chainAll;
  2865. this.__index__ = 0;
  2866. this.__values__ = undefined;
  2867. }
  2868. /**
  2869. * By default, the template delimiters used by lodash are like those in
  2870. * embedded Ruby (ERB) as well as ES2015 template strings. Change the
  2871. * following template settings to use alternative delimiters.
  2872. *
  2873. * @static
  2874. * @memberOf _
  2875. * @type {Object}
  2876. */
  2877. lodash.templateSettings = {
  2878. /**
  2879. * Used to detect `data` property values to be HTML-escaped.
  2880. *
  2881. * @memberOf _.templateSettings
  2882. * @type {RegExp}
  2883. */
  2884. 'escape': reEscape,
  2885. /**
  2886. * Used to detect code to be evaluated.
  2887. *
  2888. * @memberOf _.templateSettings
  2889. * @type {RegExp}
  2890. */
  2891. 'evaluate': reEvaluate,
  2892. /**
  2893. * Used to detect `data` property values to inject.
  2894. *
  2895. * @memberOf _.templateSettings
  2896. * @type {RegExp}
  2897. */
  2898. 'interpolate': reInterpolate,
  2899. /**
  2900. * Used to reference the data object in the template text.
  2901. *
  2902. * @memberOf _.templateSettings
  2903. * @type {string}
  2904. */
  2905. 'variable': '',
  2906. /**
  2907. * Used to import variables into the compiled template.
  2908. *
  2909. * @memberOf _.templateSettings
  2910. * @type {Object}
  2911. */
  2912. 'imports': {
  2913. /**
  2914. * A reference to the `lodash` function.
  2915. *
  2916. * @memberOf _.templateSettings.imports
  2917. * @type {Function}
  2918. */
  2919. '_': lodash
  2920. }
  2921. };
  2922. // Ensure wrappers are instances of `baseLodash`.
  2923. lodash.prototype = baseLodash.prototype;
  2924. lodash.prototype.constructor = lodash;
  2925. LodashWrapper.prototype = baseCreate(baseLodash.prototype);
  2926. LodashWrapper.prototype.constructor = LodashWrapper;
  2927. /*------------------------------------------------------------------------*/
  2928. /**
  2929. * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
  2930. *
  2931. * @private
  2932. * @constructor
  2933. * @param {*} value The value to wrap.
  2934. */
  2935. function LazyWrapper(value) {
  2936. this.__wrapped__ = value;
  2937. this.__actions__ = [];
  2938. this.__dir__ = 1;
  2939. this.__filtered__ = false;
  2940. this.__iteratees__ = [];
  2941. this.__takeCount__ = MAX_ARRAY_LENGTH;
  2942. this.__views__ = [];
  2943. }
  2944. /**
  2945. * Creates a clone of the lazy wrapper object.
  2946. *
  2947. * @private
  2948. * @name clone
  2949. * @memberOf LazyWrapper
  2950. * @returns {Object} Returns the cloned `LazyWrapper` object.
  2951. */
  2952. function lazyClone() {
  2953. var result = new LazyWrapper(this.__wrapped__);
  2954. result.__actions__ = copyArray(this.__actions__);
  2955. result.__dir__ = this.__dir__;
  2956. result.__filtered__ = this.__filtered__;
  2957. result.__iteratees__ = copyArray(this.__iteratees__);
  2958. result.__takeCount__ = this.__takeCount__;
  2959. result.__views__ = copyArray(this.__views__);
  2960. return result;
  2961. }
  2962. /**
  2963. * Reverses the direction of lazy iteration.
  2964. *
  2965. * @private
  2966. * @name reverse
  2967. * @memberOf LazyWrapper
  2968. * @returns {Object} Returns the new reversed `LazyWrapper` object.
  2969. */
  2970. function lazyReverse() {
  2971. if (this.__filtered__) {
  2972. var result = new LazyWrapper(this);
  2973. result.__dir__ = -1;
  2974. result.__filtered__ = true;
  2975. } else {
  2976. result = this.clone();
  2977. result.__dir__ *= -1;
  2978. }
  2979. return result;
  2980. }
  2981. /**
  2982. * Extracts the unwrapped value from its lazy wrapper.
  2983. *
  2984. * @private
  2985. * @name value
  2986. * @memberOf LazyWrapper
  2987. * @returns {*} Returns the unwrapped value.
  2988. */
  2989. function lazyValue() {
  2990. var array = this.__wrapped__.value(),
  2991. dir = this.__dir__,
  2992. isArr = isArray(array),
  2993. isRight = dir < 0,
  2994. arrLength = isArr ? array.length : 0,
  2995. view = getView(0, arrLength, this.__views__),
  2996. start = view.start,
  2997. end = view.end,
  2998. length = end - start,
  2999. index = isRight ? end : (start - 1),
  3000. iteratees = this.__iteratees__,
  3001. iterLength = iteratees.length,
  3002. resIndex = 0,
  3003. takeCount = nativeMin(length, this.__takeCount__);
  3004. if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
  3005. return baseWrapperValue(array, this.__actions__);
  3006. }
  3007. var result = [];
  3008. outer:
  3009. while (length-- && resIndex < takeCount) {
  3010. index += dir;
  3011. var iterIndex = -1,
  3012. value = array[index];
  3013. while (++iterIndex < iterLength) {
  3014. var data = iteratees[iterIndex],
  3015. iteratee = data.iteratee,
  3016. type = data.type,
  3017. computed = iteratee(value);
  3018. if (type == LAZY_MAP_FLAG) {
  3019. value = computed;
  3020. } else if (!computed) {
  3021. if (type == LAZY_FILTER_FLAG) {
  3022. continue outer;
  3023. } else {
  3024. break outer;
  3025. }
  3026. }
  3027. }
  3028. result[resIndex++] = value;
  3029. }
  3030. return result;
  3031. }
  3032. // Ensure `LazyWrapper` is an instance of `baseLodash`.
  3033. LazyWrapper.prototype = baseCreate(baseLodash.prototype);
  3034. LazyWrapper.prototype.constructor = LazyWrapper;
  3035. /*------------------------------------------------------------------------*/
  3036. /**
  3037. * Creates a hash object.
  3038. *
  3039. * @private
  3040. * @constructor
  3041. * @param {Array} [entries] The key-value pairs to cache.
  3042. */
  3043. function Hash(entries) {
  3044. var index = -1,
  3045. length = entries == null ? 0 : entries.length;
  3046. this.clear();
  3047. while (++index < length) {
  3048. var entry = entries[index];
  3049. this.set(entry[0], entry[1]);
  3050. }
  3051. }
  3052. /**
  3053. * Removes all key-value entries from the hash.
  3054. *
  3055. * @private
  3056. * @name clear
  3057. * @memberOf Hash
  3058. */
  3059. function hashClear() {
  3060. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  3061. this.size = 0;
  3062. }
  3063. /**
  3064. * Removes `key` and its value from the hash.
  3065. *
  3066. * @private
  3067. * @name delete
  3068. * @memberOf Hash
  3069. * @param {Object} hash The hash to modify.
  3070. * @param {string} key The key of the value to remove.
  3071. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  3072. */
  3073. function hashDelete(key) {
  3074. var result = this.has(key) && delete this.__data__[key];
  3075. this.size -= result ? 1 : 0;
  3076. return result;
  3077. }
  3078. /**
  3079. * Gets the hash value for `key`.
  3080. *
  3081. * @private
  3082. * @name get
  3083. * @memberOf Hash
  3084. * @param {string} key The key of the value to get.
  3085. * @returns {*} Returns the entry value.
  3086. */
  3087. function hashGet(key) {
  3088. var data = this.__data__;
  3089. if (nativeCreate) {
  3090. var result = data[key];
  3091. return result === HASH_UNDEFINED ? undefined : result;
  3092. }
  3093. return hasOwnProperty.call(data, key) ? data[key] : undefined;
  3094. }
  3095. /**
  3096. * Checks if a hash value for `key` exists.
  3097. *
  3098. * @private
  3099. * @name has
  3100. * @memberOf Hash
  3101. * @param {string} key The key of the entry to check.
  3102. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  3103. */
  3104. function hashHas(key) {
  3105. var data = this.__data__;
  3106. return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
  3107. }
  3108. /**
  3109. * Sets the hash `key` to `value`.
  3110. *
  3111. * @private
  3112. * @name set
  3113. * @memberOf Hash
  3114. * @param {string} key The key of the value to set.
  3115. * @param {*} value The value to set.
  3116. * @returns {Object} Returns the hash instance.
  3117. */
  3118. function hashSet(key, value) {
  3119. var data = this.__data__;
  3120. this.size += this.has(key) ? 0 : 1;
  3121. data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
  3122. return this;
  3123. }
  3124. // Add methods to `Hash`.
  3125. Hash.prototype.clear = hashClear;
  3126. Hash.prototype['delete'] = hashDelete;
  3127. Hash.prototype.get = hashGet;
  3128. Hash.prototype.has = hashHas;
  3129. Hash.prototype.set = hashSet;
  3130. /*------------------------------------------------------------------------*/
  3131. /**
  3132. * Creates an list cache object.
  3133. *
  3134. * @private
  3135. * @constructor
  3136. * @param {Array} [entries] The key-value pairs to cache.
  3137. */
  3138. function ListCache(entries) {
  3139. var index = -1,
  3140. length = entries == null ? 0 : entries.length;
  3141. this.clear();
  3142. while (++index < length) {
  3143. var entry = entries[index];
  3144. this.set(entry[0], entry[1]);
  3145. }
  3146. }
  3147. /**
  3148. * Removes all key-value entries from the list cache.
  3149. *
  3150. * @private
  3151. * @name clear
  3152. * @memberOf ListCache
  3153. */
  3154. function listCacheClear() {
  3155. this.__data__ = [];
  3156. this.size = 0;
  3157. }
  3158. /**
  3159. * Removes `key` and its value from the list cache.
  3160. *
  3161. * @private
  3162. * @name delete
  3163. * @memberOf ListCache
  3164. * @param {string} key The key of the value to remove.
  3165. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  3166. */
  3167. function listCacheDelete(key) {
  3168. var data = this.__data__,
  3169. index = assocIndexOf(data, key);
  3170. if (index < 0) {
  3171. return false;
  3172. }
  3173. var lastIndex = data.length - 1;
  3174. if (index == lastIndex) {
  3175. data.pop();
  3176. } else {
  3177. splice.call(data, index, 1);
  3178. }
  3179. --this.size;
  3180. return true;
  3181. }
  3182. /**
  3183. * Gets the list cache value for `key`.
  3184. *
  3185. * @private
  3186. * @name get
  3187. * @memberOf ListCache
  3188. * @param {string} key The key of the value to get.
  3189. * @returns {*} Returns the entry value.
  3190. */
  3191. function listCacheGet(key) {
  3192. var data = this.__data__,
  3193. index = assocIndexOf(data, key);
  3194. return index < 0 ? undefined : data[index][1];
  3195. }
  3196. /**
  3197. * Checks if a list cache value for `key` exists.
  3198. *
  3199. * @private
  3200. * @name has
  3201. * @memberOf ListCache
  3202. * @param {string} key The key of the entry to check.
  3203. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  3204. */
  3205. function listCacheHas(key) {
  3206. return assocIndexOf(this.__data__, key) > -1;
  3207. }
  3208. /**
  3209. * Sets the list cache `key` to `value`.
  3210. *
  3211. * @private
  3212. * @name set
  3213. * @memberOf ListCache
  3214. * @param {string} key The key of the value to set.
  3215. * @param {*} value The value to set.
  3216. * @returns {Object} Returns the list cache instance.
  3217. */
  3218. function listCacheSet(key, value) {
  3219. var data = this.__data__,
  3220. index = assocIndexOf(data, key);
  3221. if (index < 0) {
  3222. ++this.size;
  3223. data.push([key, value]);
  3224. } else {
  3225. data[index][1] = value;
  3226. }
  3227. return this;
  3228. }
  3229. // Add methods to `ListCache`.
  3230. ListCache.prototype.clear = listCacheClear;
  3231. ListCache.prototype['delete'] = listCacheDelete;
  3232. ListCache.prototype.get = listCacheGet;
  3233. ListCache.prototype.has = listCacheHas;
  3234. ListCache.prototype.set = listCacheSet;
  3235. /*------------------------------------------------------------------------*/
  3236. /**
  3237. * Creates a map cache object to store key-value pairs.
  3238. *
  3239. * @private
  3240. * @constructor
  3241. * @param {Array} [entries] The key-value pairs to cache.
  3242. */
  3243. function MapCache(entries) {
  3244. var index = -1,
  3245. length = entries == null ? 0 : entries.length;
  3246. this.clear();
  3247. while (++index < length) {
  3248. var entry = entries[index];
  3249. this.set(entry[0], entry[1]);
  3250. }
  3251. }
  3252. /**
  3253. * Removes all key-value entries from the map.
  3254. *
  3255. * @private
  3256. * @name clear
  3257. * @memberOf MapCache
  3258. */
  3259. function mapCacheClear() {
  3260. this.size = 0;
  3261. this.__data__ = {
  3262. 'hash': new Hash,
  3263. 'map': new (Map || ListCache),
  3264. 'string': new Hash
  3265. };
  3266. }
  3267. /**
  3268. * Removes `key` and its value from the map.
  3269. *
  3270. * @private
  3271. * @name delete
  3272. * @memberOf MapCache
  3273. * @param {string} key The key of the value to remove.
  3274. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  3275. */
  3276. function mapCacheDelete(key) {
  3277. var result = getMapData(this, key)['delete'](key);
  3278. this.size -= result ? 1 : 0;
  3279. return result;
  3280. }
  3281. /**
  3282. * Gets the map value for `key`.
  3283. *
  3284. * @private
  3285. * @name get
  3286. * @memberOf MapCache
  3287. * @param {string} key The key of the value to get.
  3288. * @returns {*} Returns the entry value.
  3289. */
  3290. function mapCacheGet(key) {
  3291. return getMapData(this, key).get(key);
  3292. }
  3293. /**
  3294. * Checks if a map value for `key` exists.
  3295. *
  3296. * @private
  3297. * @name has
  3298. * @memberOf MapCache
  3299. * @param {string} key The key of the entry to check.
  3300. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  3301. */
  3302. function mapCacheHas(key) {
  3303. return getMapData(this, key).has(key);
  3304. }
  3305. /**
  3306. * Sets the map `key` to `value`.
  3307. *
  3308. * @private
  3309. * @name set
  3310. * @memberOf MapCache
  3311. * @param {string} key The key of the value to set.
  3312. * @param {*} value The value to set.
  3313. * @returns {Object} Returns the map cache instance.
  3314. */
  3315. function mapCacheSet(key, value) {
  3316. var data = getMapData(this, key),
  3317. size = data.size;
  3318. data.set(key, value);
  3319. this.size += data.size == size ? 0 : 1;
  3320. return this;
  3321. }
  3322. // Add methods to `MapCache`.
  3323. MapCache.prototype.clear = mapCacheClear;
  3324. MapCache.prototype['delete'] = mapCacheDelete;
  3325. MapCache.prototype.get = mapCacheGet;
  3326. MapCache.prototype.has = mapCacheHas;
  3327. MapCache.prototype.set = mapCacheSet;
  3328. /*------------------------------------------------------------------------*/
  3329. /**
  3330. *
  3331. * Creates an array cache object to store unique values.
  3332. *
  3333. * @private
  3334. * @constructor
  3335. * @param {Array} [values] The values to cache.
  3336. */
  3337. function SetCache(values) {
  3338. var index = -1,
  3339. length = values == null ? 0 : values.length;
  3340. this.__data__ = new MapCache;
  3341. while (++index < length) {
  3342. this.add(values[index]);
  3343. }
  3344. }
  3345. /**
  3346. * Adds `value` to the array cache.
  3347. *
  3348. * @private
  3349. * @name add
  3350. * @memberOf SetCache
  3351. * @alias push
  3352. * @param {*} value The value to cache.
  3353. * @returns {Object} Returns the cache instance.
  3354. */
  3355. function setCacheAdd(value) {
  3356. this.__data__.set(value, HASH_UNDEFINED);
  3357. return this;
  3358. }
  3359. /**
  3360. * Checks if `value` is in the array cache.
  3361. *
  3362. * @private
  3363. * @name has
  3364. * @memberOf SetCache
  3365. * @param {*} value The value to search for.
  3366. * @returns {number} Returns `true` if `value` is found, else `false`.
  3367. */
  3368. function setCacheHas(value) {
  3369. return this.__data__.has(value);
  3370. }
  3371. // Add methods to `SetCache`.
  3372. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
  3373. SetCache.prototype.has = setCacheHas;
  3374. /*------------------------------------------------------------------------*/
  3375. /**
  3376. * Creates a stack cache object to store key-value pairs.
  3377. *
  3378. * @private
  3379. * @constructor
  3380. * @param {Array} [entries] The key-value pairs to cache.
  3381. */
  3382. function Stack(entries) {
  3383. var data = this.__data__ = new ListCache(entries);
  3384. this.size = data.size;
  3385. }
  3386. /**
  3387. * Removes all key-value entries from the stack.
  3388. *
  3389. * @private
  3390. * @name clear
  3391. * @memberOf Stack
  3392. */
  3393. function stackClear() {
  3394. this.__data__ = new ListCache;
  3395. this.size = 0;
  3396. }
  3397. /**
  3398. * Removes `key` and its value from the stack.
  3399. *
  3400. * @private
  3401. * @name delete
  3402. * @memberOf Stack
  3403. * @param {string} key The key of the value to remove.
  3404. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  3405. */
  3406. function stackDelete(key) {
  3407. var data = this.__data__,
  3408. result = data['delete'](key);
  3409. this.size = data.size;
  3410. return result;
  3411. }
  3412. /**
  3413. * Gets the stack value for `key`.
  3414. *
  3415. * @private
  3416. * @name get
  3417. * @memberOf Stack
  3418. * @param {string} key The key of the value to get.
  3419. * @returns {*} Returns the entry value.
  3420. */
  3421. function stackGet(key) {
  3422. return this.__data__.get(key);
  3423. }
  3424. /**
  3425. * Checks if a stack value for `key` exists.
  3426. *
  3427. * @private
  3428. * @name has
  3429. * @memberOf Stack
  3430. * @param {string} key The key of the entry to check.
  3431. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  3432. */
  3433. function stackHas(key) {
  3434. return this.__data__.has(key);
  3435. }
  3436. /**
  3437. * Sets the stack `key` to `value`.
  3438. *
  3439. * @private
  3440. * @name set
  3441. * @memberOf Stack
  3442. * @param {string} key The key of the value to set.
  3443. * @param {*} value The value to set.
  3444. * @returns {Object} Returns the stack cache instance.
  3445. */
  3446. function stackSet(key, value) {
  3447. var data = this.__data__;
  3448. if (data instanceof ListCache) {
  3449. var pairs = data.__data__;
  3450. if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
  3451. pairs.push([key, value]);
  3452. this.size = ++data.size;
  3453. return this;
  3454. }
  3455. data = this.__data__ = new MapCache(pairs);
  3456. }
  3457. data.set(key, value);
  3458. this.size = data.size;
  3459. return this;
  3460. }
  3461. // Add methods to `Stack`.
  3462. Stack.prototype.clear = stackClear;
  3463. Stack.prototype['delete'] = stackDelete;
  3464. Stack.prototype.get = stackGet;
  3465. Stack.prototype.has = stackHas;
  3466. Stack.prototype.set = stackSet;
  3467. /*------------------------------------------------------------------------*/
  3468. /**
  3469. * Creates an array of the enumerable property names of the array-like `value`.
  3470. *
  3471. * @private
  3472. * @param {*} value The value to query.
  3473. * @param {boolean} inherited Specify returning inherited property names.
  3474. * @returns {Array} Returns the array of property names.
  3475. */
  3476. function arrayLikeKeys(value, inherited) {
  3477. var isArr = isArray(value),
  3478. isArg = !isArr && isArguments(value),
  3479. isBuff = !isArr && !isArg && isBuffer(value),
  3480. isType = !isArr && !isArg && !isBuff && isTypedArray(value),
  3481. skipIndexes = isArr || isArg || isBuff || isType,
  3482. result = skipIndexes ? baseTimes(value.length, String) : [],
  3483. length = result.length;
  3484. for (var key in value) {
  3485. if ((inherited || hasOwnProperty.call(value, key)) &&
  3486. !(skipIndexes && (
  3487. // Safari 9 has enumerable `arguments.length` in strict mode.
  3488. key == 'length' ||
  3489. // Node.js 0.10 has enumerable non-index properties on buffers.
  3490. (isBuff && (key == 'offset' || key == 'parent')) ||
  3491. // PhantomJS 2 has enumerable non-index properties on typed arrays.
  3492. (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
  3493. // Skip index properties.
  3494. isIndex(key, length)
  3495. ))) {
  3496. result.push(key);
  3497. }
  3498. }
  3499. return result;
  3500. }
  3501. /**
  3502. * A specialized version of `_.sample` for arrays.
  3503. *
  3504. * @private
  3505. * @param {Array} array The array to sample.
  3506. * @returns {*} Returns the random element.
  3507. */
  3508. function arraySample(array) {
  3509. var length = array.length;
  3510. return length ? array[baseRandom(0, length - 1)] : undefined;
  3511. }
  3512. /**
  3513. * A specialized version of `_.sampleSize` for arrays.
  3514. *
  3515. * @private
  3516. * @param {Array} array The array to sample.
  3517. * @param {number} n The number of elements to sample.
  3518. * @returns {Array} Returns the random elements.
  3519. */
  3520. function arraySampleSize(array, n) {
  3521. return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
  3522. }
  3523. /**
  3524. * A specialized version of `_.shuffle` for arrays.
  3525. *
  3526. * @private
  3527. * @param {Array} array The array to shuffle.
  3528. * @returns {Array} Returns the new shuffled array.
  3529. */
  3530. function arrayShuffle(array) {
  3531. return shuffleSelf(copyArray(array));
  3532. }
  3533. /**
  3534. * This function is like `assignValue` except that it doesn't assign
  3535. * `undefined` values.
  3536. *
  3537. * @private
  3538. * @param {Object} object The object to modify.
  3539. * @param {string} key The key of the property to assign.
  3540. * @param {*} value The value to assign.
  3541. */
  3542. function assignMergeValue(object, key, value) {
  3543. if ((value !== undefined && !eq(object[key], value)) ||
  3544. (value === undefined && !(key in object))) {
  3545. baseAssignValue(object, key, value);
  3546. }
  3547. }
  3548. /**
  3549. * Assigns `value` to `key` of `object` if the existing value is not equivalent
  3550. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  3551. * for equality comparisons.
  3552. *
  3553. * @private
  3554. * @param {Object} object The object to modify.
  3555. * @param {string} key The key of the property to assign.
  3556. * @param {*} value The value to assign.
  3557. */
  3558. function assignValue(object, key, value) {
  3559. var objValue = object[key];
  3560. if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
  3561. (value === undefined && !(key in object))) {
  3562. baseAssignValue(object, key, value);
  3563. }
  3564. }
  3565. /**
  3566. * Gets the index at which the `key` is found in `array` of key-value pairs.
  3567. *
  3568. * @private
  3569. * @param {Array} array The array to inspect.
  3570. * @param {*} key The key to search for.
  3571. * @returns {number} Returns the index of the matched value, else `-1`.
  3572. */
  3573. function assocIndexOf(array, key) {
  3574. var length = array.length;
  3575. while (length--) {
  3576. if (eq(array[length][0], key)) {
  3577. return length;
  3578. }
  3579. }
  3580. return -1;
  3581. }
  3582. /**
  3583. * Aggregates elements of `collection` on `accumulator` with keys transformed
  3584. * by `iteratee` and values set by `setter`.
  3585. *
  3586. * @private
  3587. * @param {Array|Object} collection The collection to iterate over.
  3588. * @param {Function} setter The function to set `accumulator` values.
  3589. * @param {Function} iteratee The iteratee to transform keys.
  3590. * @param {Object} accumulator The initial aggregated object.
  3591. * @returns {Function} Returns `accumulator`.
  3592. */
  3593. function baseAggregator(collection, setter, iteratee, accumulator) {
  3594. baseEach(collection, function(value, key, collection) {
  3595. setter(accumulator, value, iteratee(value), collection);
  3596. });
  3597. return accumulator;
  3598. }
  3599. /**
  3600. * The base implementation of `_.assign` without support for multiple sources
  3601. * or `customizer` functions.
  3602. *
  3603. * @private
  3604. * @param {Object} object The destination object.
  3605. * @param {Object} source The source object.
  3606. * @returns {Object} Returns `object`.
  3607. */
  3608. function baseAssign(object, source) {
  3609. return object && copyObject(source, keys(source), object);
  3610. }
  3611. /**
  3612. * The base implementation of `_.assignIn` without support for multiple sources
  3613. * or `customizer` functions.
  3614. *
  3615. * @private
  3616. * @param {Object} object The destination object.
  3617. * @param {Object} source The source object.
  3618. * @returns {Object} Returns `object`.
  3619. */
  3620. function baseAssignIn(object, source) {
  3621. return object && copyObject(source, keysIn(source), object);
  3622. }
  3623. /**
  3624. * The base implementation of `assignValue` and `assignMergeValue` without
  3625. * value checks.
  3626. *
  3627. * @private
  3628. * @param {Object} object The object to modify.
  3629. * @param {string} key The key of the property to assign.
  3630. * @param {*} value The value to assign.
  3631. */
  3632. function baseAssignValue(object, key, value) {
  3633. if (key == '__proto__' && defineProperty) {
  3634. defineProperty(object, key, {
  3635. 'configurable': true,
  3636. 'enumerable': true,
  3637. 'value': value,
  3638. 'writable': true
  3639. });
  3640. } else {
  3641. object[key] = value;
  3642. }
  3643. }
  3644. /**
  3645. * The base implementation of `_.at` without support for individual paths.
  3646. *
  3647. * @private
  3648. * @param {Object} object The object to iterate over.
  3649. * @param {string[]} paths The property paths to pick.
  3650. * @returns {Array} Returns the picked elements.
  3651. */
  3652. function baseAt(object, paths) {
  3653. var index = -1,
  3654. length = paths.length,
  3655. result = Array(length),
  3656. skip = object == null;
  3657. while (++index < length) {
  3658. result[index] = skip ? undefined : get(object, paths[index]);
  3659. }
  3660. return result;
  3661. }
  3662. /**
  3663. * The base implementation of `_.clamp` which doesn't coerce arguments.
  3664. *
  3665. * @private
  3666. * @param {number} number The number to clamp.
  3667. * @param {number} [lower] The lower bound.
  3668. * @param {number} upper The upper bound.
  3669. * @returns {number} Returns the clamped number.
  3670. */
  3671. function baseClamp(number, lower, upper) {
  3672. if (number === number) {
  3673. if (upper !== undefined) {
  3674. number = number <= upper ? number : upper;
  3675. }
  3676. if (lower !== undefined) {
  3677. number = number >= lower ? number : lower;
  3678. }
  3679. }
  3680. return number;
  3681. }
  3682. /**
  3683. * The base implementation of `_.clone` and `_.cloneDeep` which tracks
  3684. * traversed objects.
  3685. *
  3686. * @private
  3687. * @param {*} value The value to clone.
  3688. * @param {boolean} bitmask The bitmask flags.
  3689. * 1 - Deep clone
  3690. * 2 - Flatten inherited properties
  3691. * 4 - Clone symbols
  3692. * @param {Function} [customizer] The function to customize cloning.
  3693. * @param {string} [key] The key of `value`.
  3694. * @param {Object} [object] The parent object of `value`.
  3695. * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
  3696. * @returns {*} Returns the cloned value.
  3697. */
  3698. function baseClone(value, bitmask, customizer, key, object, stack) {
  3699. var result,
  3700. isDeep = bitmask & CLONE_DEEP_FLAG,
  3701. isFlat = bitmask & CLONE_FLAT_FLAG,
  3702. isFull = bitmask & CLONE_SYMBOLS_FLAG;
  3703. if (customizer) {
  3704. result = object ? customizer(value, key, object, stack) : customizer(value);
  3705. }
  3706. if (result !== undefined) {
  3707. return result;
  3708. }
  3709. if (!isObject(value)) {
  3710. return value;
  3711. }
  3712. var isArr = isArray(value);
  3713. if (isArr) {
  3714. result = initCloneArray(value);
  3715. if (!isDeep) {
  3716. return copyArray(value, result);
  3717. }
  3718. } else {
  3719. var tag = getTag(value),
  3720. isFunc = tag == funcTag || tag == genTag;
  3721. if (isBuffer(value)) {
  3722. return cloneBuffer(value, isDeep);
  3723. }
  3724. if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
  3725. result = (isFlat || isFunc) ? {} : initCloneObject(value);
  3726. if (!isDeep) {
  3727. return isFlat
  3728. ? copySymbolsIn(value, baseAssignIn(result, value))
  3729. : copySymbols(value, baseAssign(result, value));
  3730. }
  3731. } else {
  3732. if (!cloneableTags[tag]) {
  3733. return object ? value : {};
  3734. }
  3735. result = initCloneByTag(value, tag, isDeep);
  3736. }
  3737. }
  3738. // Check for circular references and return its corresponding clone.
  3739. stack || (stack = new Stack);
  3740. var stacked = stack.get(value);
  3741. if (stacked) {
  3742. return stacked;
  3743. }
  3744. stack.set(value, result);
  3745. if (isSet(value)) {
  3746. value.forEach(function(subValue) {
  3747. result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
  3748. });
  3749. } else if (isMap(value)) {
  3750. value.forEach(function(subValue, key) {
  3751. result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
  3752. });
  3753. }
  3754. var keysFunc = isFull
  3755. ? (isFlat ? getAllKeysIn : getAllKeys)
  3756. : (isFlat ? keysIn : keys);
  3757. var props = isArr ? undefined : keysFunc(value);
  3758. arrayEach(props || value, function(subValue, key) {
  3759. if (props) {
  3760. key = subValue;
  3761. subValue = value[key];
  3762. }
  3763. // Recursively populate clone (susceptible to call stack limits).
  3764. assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
  3765. });
  3766. return result;
  3767. }
  3768. /**
  3769. * The base implementation of `_.conforms` which doesn't clone `source`.
  3770. *
  3771. * @private
  3772. * @param {Object} source The object of property predicates to conform to.
  3773. * @returns {Function} Returns the new spec function.
  3774. */
  3775. function baseConforms(source) {
  3776. var props = keys(source);
  3777. return function(object) {
  3778. return baseConformsTo(object, source, props);
  3779. };
  3780. }
  3781. /**
  3782. * The base implementation of `_.conformsTo` which accepts `props` to check.
  3783. *
  3784. * @private
  3785. * @param {Object} object The object to inspect.
  3786. * @param {Object} source The object of property predicates to conform to.
  3787. * @returns {boolean} Returns `true` if `object` conforms, else `false`.
  3788. */
  3789. function baseConformsTo(object, source, props) {
  3790. var length = props.length;
  3791. if (object == null) {
  3792. return !length;
  3793. }
  3794. object = Object(object);
  3795. while (length--) {
  3796. var key = props[length],
  3797. predicate = source[key],
  3798. value = object[key];
  3799. if ((value === undefined && !(key in object)) || !predicate(value)) {
  3800. return false;
  3801. }
  3802. }
  3803. return true;
  3804. }
  3805. /**
  3806. * The base implementation of `_.delay` and `_.defer` which accepts `args`
  3807. * to provide to `func`.
  3808. *
  3809. * @private
  3810. * @param {Function} func The function to delay.
  3811. * @param {number} wait The number of milliseconds to delay invocation.
  3812. * @param {Array} args The arguments to provide to `func`.
  3813. * @returns {number|Object} Returns the timer id or timeout object.
  3814. */
  3815. function baseDelay(func, wait, args) {
  3816. if (typeof func != 'function') {
  3817. throw new TypeError(FUNC_ERROR_TEXT);
  3818. }
  3819. return setTimeout(function() { func.apply(undefined, args); }, wait);
  3820. }
  3821. /**
  3822. * The base implementation of methods like `_.difference` without support
  3823. * for excluding multiple arrays or iteratee shorthands.
  3824. *
  3825. * @private
  3826. * @param {Array} array The array to inspect.
  3827. * @param {Array} values The values to exclude.
  3828. * @param {Function} [iteratee] The iteratee invoked per element.
  3829. * @param {Function} [comparator] The comparator invoked per element.
  3830. * @returns {Array} Returns the new array of filtered values.
  3831. */
  3832. function baseDifference(array, values, iteratee, comparator) {
  3833. var index = -1,
  3834. includes = arrayIncludes,
  3835. isCommon = true,
  3836. length = array.length,
  3837. result = [],
  3838. valuesLength = values.length;
  3839. if (!length) {
  3840. return result;
  3841. }
  3842. if (iteratee) {
  3843. values = arrayMap(values, baseUnary(iteratee));
  3844. }
  3845. if (comparator) {
  3846. includes = arrayIncludesWith;
  3847. isCommon = false;
  3848. }
  3849. else if (values.length >= LARGE_ARRAY_SIZE) {
  3850. includes = cacheHas;
  3851. isCommon = false;
  3852. values = new SetCache(values);
  3853. }
  3854. outer:
  3855. while (++index < length) {
  3856. var value = array[index],
  3857. computed = iteratee == null ? value : iteratee(value);
  3858. value = (comparator || value !== 0) ? value : 0;
  3859. if (isCommon && computed === computed) {
  3860. var valuesIndex = valuesLength;
  3861. while (valuesIndex--) {
  3862. if (values[valuesIndex] === computed) {
  3863. continue outer;
  3864. }
  3865. }
  3866. result.push(value);
  3867. }
  3868. else if (!includes(values, computed, comparator)) {
  3869. result.push(value);
  3870. }
  3871. }
  3872. return result;
  3873. }
  3874. /**
  3875. * The base implementation of `_.forEach` without support for iteratee shorthands.
  3876. *
  3877. * @private
  3878. * @param {Array|Object} collection The collection to iterate over.
  3879. * @param {Function} iteratee The function invoked per iteration.
  3880. * @returns {Array|Object} Returns `collection`.
  3881. */
  3882. var baseEach = createBaseEach(baseForOwn);
  3883. /**
  3884. * The base implementation of `_.forEachRight` without support for iteratee shorthands.
  3885. *
  3886. * @private
  3887. * @param {Array|Object} collection The collection to iterate over.
  3888. * @param {Function} iteratee The function invoked per iteration.
  3889. * @returns {Array|Object} Returns `collection`.
  3890. */
  3891. var baseEachRight = createBaseEach(baseForOwnRight, true);
  3892. /**
  3893. * The base implementation of `_.every` without support for iteratee shorthands.
  3894. *
  3895. * @private
  3896. * @param {Array|Object} collection The collection to iterate over.
  3897. * @param {Function} predicate The function invoked per iteration.
  3898. * @returns {boolean} Returns `true` if all elements pass the predicate check,
  3899. * else `false`
  3900. */
  3901. function baseEvery(collection, predicate) {
  3902. var result = true;
  3903. baseEach(collection, function(value, index, collection) {
  3904. result = !!predicate(value, index, collection);
  3905. return result;
  3906. });
  3907. return result;
  3908. }
  3909. /**
  3910. * The base implementation of methods like `_.max` and `_.min` which accepts a
  3911. * `comparator` to determine the extremum value.
  3912. *
  3913. * @private
  3914. * @param {Array} array The array to iterate over.
  3915. * @param {Function} iteratee The iteratee invoked per iteration.
  3916. * @param {Function} comparator The comparator used to compare values.
  3917. * @returns {*} Returns the extremum value.
  3918. */
  3919. function baseExtremum(array, iteratee, comparator) {
  3920. var index = -1,
  3921. length = array.length;
  3922. while (++index < length) {
  3923. var value = array[index],
  3924. current = iteratee(value);
  3925. if (current != null && (computed === undefined
  3926. ? (current === current && !isSymbol(current))
  3927. : comparator(current, computed)
  3928. )) {
  3929. var computed = current,
  3930. result = value;
  3931. }
  3932. }
  3933. return result;
  3934. }
  3935. /**
  3936. * The base implementation of `_.fill` without an iteratee call guard.
  3937. *
  3938. * @private
  3939. * @param {Array} array The array to fill.
  3940. * @param {*} value The value to fill `array` with.
  3941. * @param {number} [start=0] The start position.
  3942. * @param {number} [end=array.length] The end position.
  3943. * @returns {Array} Returns `array`.
  3944. */
  3945. function baseFill(array, value, start, end) {
  3946. var length = array.length;
  3947. start = toInteger(start);
  3948. if (start < 0) {
  3949. start = -start > length ? 0 : (length + start);
  3950. }
  3951. end = (end === undefined || end > length) ? length : toInteger(end);
  3952. if (end < 0) {
  3953. end += length;
  3954. }
  3955. end = start > end ? 0 : toLength(end);
  3956. while (start < end) {
  3957. array[start++] = value;
  3958. }
  3959. return array;
  3960. }
  3961. /**
  3962. * The base implementation of `_.filter` without support for iteratee shorthands.
  3963. *
  3964. * @private
  3965. * @param {Array|Object} collection The collection to iterate over.
  3966. * @param {Function} predicate The function invoked per iteration.
  3967. * @returns {Array} Returns the new filtered array.
  3968. */
  3969. function baseFilter(collection, predicate) {
  3970. var result = [];
  3971. baseEach(collection, function(value, index, collection) {
  3972. if (predicate(value, index, collection)) {
  3973. result.push(value);
  3974. }
  3975. });
  3976. return result;
  3977. }
  3978. /**
  3979. * The base implementation of `_.flatten` with support for restricting flattening.
  3980. *
  3981. * @private
  3982. * @param {Array} array The array to flatten.
  3983. * @param {number} depth The maximum recursion depth.
  3984. * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
  3985. * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
  3986. * @param {Array} [result=[]] The initial result value.
  3987. * @returns {Array} Returns the new flattened array.
  3988. */
  3989. function baseFlatten(array, depth, predicate, isStrict, result) {
  3990. var index = -1,
  3991. length = array.length;
  3992. predicate || (predicate = isFlattenable);
  3993. result || (result = []);
  3994. while (++index < length) {
  3995. var value = array[index];
  3996. if (depth > 0 && predicate(value)) {
  3997. if (depth > 1) {
  3998. // Recursively flatten arrays (susceptible to call stack limits).
  3999. baseFlatten(value, depth - 1, predicate, isStrict, result);
  4000. } else {
  4001. arrayPush(result, value);
  4002. }
  4003. } else if (!isStrict) {
  4004. result[result.length] = value;
  4005. }
  4006. }
  4007. return result;
  4008. }
  4009. /**
  4010. * The base implementation of `baseForOwn` which iterates over `object`
  4011. * properties returned by `keysFunc` and invokes `iteratee` for each property.
  4012. * Iteratee functions may exit iteration early by explicitly returning `false`.
  4013. *
  4014. * @private
  4015. * @param {Object} object The object to iterate over.
  4016. * @param {Function} iteratee The function invoked per iteration.
  4017. * @param {Function} keysFunc The function to get the keys of `object`.
  4018. * @returns {Object} Returns `object`.
  4019. */
  4020. var baseFor = createBaseFor();
  4021. /**
  4022. * This function is like `baseFor` except that it iterates over properties
  4023. * in the opposite order.
  4024. *
  4025. * @private
  4026. * @param {Object} object The object to iterate over.
  4027. * @param {Function} iteratee The function invoked per iteration.
  4028. * @param {Function} keysFunc The function to get the keys of `object`.
  4029. * @returns {Object} Returns `object`.
  4030. */
  4031. var baseForRight = createBaseFor(true);
  4032. /**
  4033. * The base implementation of `_.forOwn` without support for iteratee shorthands.
  4034. *
  4035. * @private
  4036. * @param {Object} object The object to iterate over.
  4037. * @param {Function} iteratee The function invoked per iteration.
  4038. * @returns {Object} Returns `object`.
  4039. */
  4040. function baseForOwn(object, iteratee) {
  4041. return object && baseFor(object, iteratee, keys);
  4042. }
  4043. /**
  4044. * The base implementation of `_.forOwnRight` without support for iteratee shorthands.
  4045. *
  4046. * @private
  4047. * @param {Object} object The object to iterate over.
  4048. * @param {Function} iteratee The function invoked per iteration.
  4049. * @returns {Object} Returns `object`.
  4050. */
  4051. function baseForOwnRight(object, iteratee) {
  4052. return object && baseForRight(object, iteratee, keys);
  4053. }
  4054. /**
  4055. * The base implementation of `_.functions` which creates an array of
  4056. * `object` function property names filtered from `props`.
  4057. *
  4058. * @private
  4059. * @param {Object} object The object to inspect.
  4060. * @param {Array} props The property names to filter.
  4061. * @returns {Array} Returns the function names.
  4062. */
  4063. function baseFunctions(object, props) {
  4064. return arrayFilter(props, function(key) {
  4065. return isFunction(object[key]);
  4066. });
  4067. }
  4068. /**
  4069. * The base implementation of `_.get` without support for default values.
  4070. *
  4071. * @private
  4072. * @param {Object} object The object to query.
  4073. * @param {Array|string} path The path of the property to get.
  4074. * @returns {*} Returns the resolved value.
  4075. */
  4076. function baseGet(object, path) {
  4077. path = castPath(path, object);
  4078. var index = 0,
  4079. length = path.length;
  4080. while (object != null && index < length) {
  4081. object = object[toKey(path[index++])];
  4082. }
  4083. return (index && index == length) ? object : undefined;
  4084. }
  4085. /**
  4086. * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
  4087. * `keysFunc` and `symbolsFunc` to get the enumerable property names and
  4088. * symbols of `object`.
  4089. *
  4090. * @private
  4091. * @param {Object} object The object to query.
  4092. * @param {Function} keysFunc The function to get the keys of `object`.
  4093. * @param {Function} symbolsFunc The function to get the symbols of `object`.
  4094. * @returns {Array} Returns the array of property names and symbols.
  4095. */
  4096. function baseGetAllKeys(object, keysFunc, symbolsFunc) {
  4097. var result = keysFunc(object);
  4098. return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
  4099. }
  4100. /**
  4101. * The base implementation of `getTag` without fallbacks for buggy environments.
  4102. *
  4103. * @private
  4104. * @param {*} value The value to query.
  4105. * @returns {string} Returns the `toStringTag`.
  4106. */
  4107. function baseGetTag(value) {
  4108. if (value == null) {
  4109. return value === undefined ? undefinedTag : nullTag;
  4110. }
  4111. return (symToStringTag && symToStringTag in Object(value))
  4112. ? getRawTag(value)
  4113. : objectToString(value);
  4114. }
  4115. /**
  4116. * The base implementation of `_.gt` which doesn't coerce arguments.
  4117. *
  4118. * @private
  4119. * @param {*} value The value to compare.
  4120. * @param {*} other The other value to compare.
  4121. * @returns {boolean} Returns `true` if `value` is greater than `other`,
  4122. * else `false`.
  4123. */
  4124. function baseGt(value, other) {
  4125. return value > other;
  4126. }
  4127. /**
  4128. * The base implementation of `_.has` without support for deep paths.
  4129. *
  4130. * @private
  4131. * @param {Object} [object] The object to query.
  4132. * @param {Array|string} key The key to check.
  4133. * @returns {boolean} Returns `true` if `key` exists, else `false`.
  4134. */
  4135. function baseHas(object, key) {
  4136. return object != null && hasOwnProperty.call(object, key);
  4137. }
  4138. /**
  4139. * The base implementation of `_.hasIn` without support for deep paths.
  4140. *
  4141. * @private
  4142. * @param {Object} [object] The object to query.
  4143. * @param {Array|string} key The key to check.
  4144. * @returns {boolean} Returns `true` if `key` exists, else `false`.
  4145. */
  4146. function baseHasIn(object, key) {
  4147. return object != null && key in Object(object);
  4148. }
  4149. /**
  4150. * The base implementation of `_.inRange` which doesn't coerce arguments.
  4151. *
  4152. * @private
  4153. * @param {number} number The number to check.
  4154. * @param {number} start The start of the range.
  4155. * @param {number} end The end of the range.
  4156. * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
  4157. */
  4158. function baseInRange(number, start, end) {
  4159. return number >= nativeMin(start, end) && number < nativeMax(start, end);
  4160. }
  4161. /**
  4162. * The base implementation of methods like `_.intersection`, without support
  4163. * for iteratee shorthands, that accepts an array of arrays to inspect.
  4164. *
  4165. * @private
  4166. * @param {Array} arrays The arrays to inspect.
  4167. * @param {Function} [iteratee] The iteratee invoked per element.
  4168. * @param {Function} [comparator] The comparator invoked per element.
  4169. * @returns {Array} Returns the new array of shared values.
  4170. */
  4171. function baseIntersection(arrays, iteratee, comparator) {
  4172. var includes = comparator ? arrayIncludesWith : arrayIncludes,
  4173. length = arrays[0].length,
  4174. othLength = arrays.length,
  4175. othIndex = othLength,
  4176. caches = Array(othLength),
  4177. maxLength = Infinity,
  4178. result = [];
  4179. while (othIndex--) {
  4180. var array = arrays[othIndex];
  4181. if (othIndex && iteratee) {
  4182. array = arrayMap(array, baseUnary(iteratee));
  4183. }
  4184. maxLength = nativeMin(array.length, maxLength);
  4185. caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
  4186. ? new SetCache(othIndex && array)
  4187. : undefined;
  4188. }
  4189. array = arrays[0];
  4190. var index = -1,
  4191. seen = caches[0];
  4192. outer:
  4193. while (++index < length && result.length < maxLength) {
  4194. var value = array[index],
  4195. computed = iteratee ? iteratee(value) : value;
  4196. value = (comparator || value !== 0) ? value : 0;
  4197. if (!(seen
  4198. ? cacheHas(seen, computed)
  4199. : includes(result, computed, comparator)
  4200. )) {
  4201. othIndex = othLength;
  4202. while (--othIndex) {
  4203. var cache = caches[othIndex];
  4204. if (!(cache
  4205. ? cacheHas(cache, computed)
  4206. : includes(arrays[othIndex], computed, comparator))
  4207. ) {
  4208. continue outer;
  4209. }
  4210. }
  4211. if (seen) {
  4212. seen.push(computed);
  4213. }
  4214. result.push(value);
  4215. }
  4216. }
  4217. return result;
  4218. }
  4219. /**
  4220. * The base implementation of `_.invert` and `_.invertBy` which inverts
  4221. * `object` with values transformed by `iteratee` and set by `setter`.
  4222. *
  4223. * @private
  4224. * @param {Object} object The object to iterate over.
  4225. * @param {Function} setter The function to set `accumulator` values.
  4226. * @param {Function} iteratee The iteratee to transform values.
  4227. * @param {Object} accumulator The initial inverted object.
  4228. * @returns {Function} Returns `accumulator`.
  4229. */
  4230. function baseInverter(object, setter, iteratee, accumulator) {
  4231. baseForOwn(object, function(value, key, object) {
  4232. setter(accumulator, iteratee(value), key, object);
  4233. });
  4234. return accumulator;
  4235. }
  4236. /**
  4237. * The base implementation of `_.invoke` without support for individual
  4238. * method arguments.
  4239. *
  4240. * @private
  4241. * @param {Object} object The object to query.
  4242. * @param {Array|string} path The path of the method to invoke.
  4243. * @param {Array} args The arguments to invoke the method with.
  4244. * @returns {*} Returns the result of the invoked method.
  4245. */
  4246. function baseInvoke(object, path, args) {
  4247. path = castPath(path, object);
  4248. object = parent(object, path);
  4249. var func = object == null ? object : object[toKey(last(path))];
  4250. return func == null ? undefined : apply(func, object, args);
  4251. }
  4252. /**
  4253. * The base implementation of `_.isArguments`.
  4254. *
  4255. * @private
  4256. * @param {*} value The value to check.
  4257. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  4258. */
  4259. function baseIsArguments(value) {
  4260. return isObjectLike(value) && baseGetTag(value) == argsTag;
  4261. }
  4262. /**
  4263. * The base implementation of `_.isArrayBuffer` without Node.js optimizations.
  4264. *
  4265. * @private
  4266. * @param {*} value The value to check.
  4267. * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
  4268. */
  4269. function baseIsArrayBuffer(value) {
  4270. return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
  4271. }
  4272. /**
  4273. * The base implementation of `_.isDate` without Node.js optimizations.
  4274. *
  4275. * @private
  4276. * @param {*} value The value to check.
  4277. * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
  4278. */
  4279. function baseIsDate(value) {
  4280. return isObjectLike(value) && baseGetTag(value) == dateTag;
  4281. }
  4282. /**
  4283. * The base implementation of `_.isEqual` which supports partial comparisons
  4284. * and tracks traversed objects.
  4285. *
  4286. * @private
  4287. * @param {*} value The value to compare.
  4288. * @param {*} other The other value to compare.
  4289. * @param {boolean} bitmask The bitmask flags.
  4290. * 1 - Unordered comparison
  4291. * 2 - Partial comparison
  4292. * @param {Function} [customizer] The function to customize comparisons.
  4293. * @param {Object} [stack] Tracks traversed `value` and `other` objects.
  4294. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  4295. */
  4296. function baseIsEqual(value, other, bitmask, customizer, stack) {
  4297. if (value === other) {
  4298. return true;
  4299. }
  4300. if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
  4301. return value !== value && other !== other;
  4302. }
  4303. return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
  4304. }
  4305. /**
  4306. * A specialized version of `baseIsEqual` for arrays and objects which performs
  4307. * deep comparisons and tracks traversed objects enabling objects with circular
  4308. * references to be compared.
  4309. *
  4310. * @private
  4311. * @param {Object} object The object to compare.
  4312. * @param {Object} other The other object to compare.
  4313. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  4314. * @param {Function} customizer The function to customize comparisons.
  4315. * @param {Function} equalFunc The function to determine equivalents of values.
  4316. * @param {Object} [stack] Tracks traversed `object` and `other` objects.
  4317. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  4318. */
  4319. function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
  4320. var objIsArr = isArray(object),
  4321. othIsArr = isArray(other),
  4322. objTag = objIsArr ? arrayTag : getTag(object),
  4323. othTag = othIsArr ? arrayTag : getTag(other);
  4324. objTag = objTag == argsTag ? objectTag : objTag;
  4325. othTag = othTag == argsTag ? objectTag : othTag;
  4326. var objIsObj = objTag == objectTag,
  4327. othIsObj = othTag == objectTag,
  4328. isSameTag = objTag == othTag;
  4329. if (isSameTag && isBuffer(object)) {
  4330. if (!isBuffer(other)) {
  4331. return false;
  4332. }
  4333. objIsArr = true;
  4334. objIsObj = false;
  4335. }
  4336. if (isSameTag && !objIsObj) {
  4337. stack || (stack = new Stack);
  4338. return (objIsArr || isTypedArray(object))
  4339. ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
  4340. : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
  4341. }
  4342. if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
  4343. var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
  4344. othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
  4345. if (objIsWrapped || othIsWrapped) {
  4346. var objUnwrapped = objIsWrapped ? object.value() : object,
  4347. othUnwrapped = othIsWrapped ? other.value() : other;
  4348. stack || (stack = new Stack);
  4349. return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
  4350. }
  4351. }
  4352. if (!isSameTag) {
  4353. return false;
  4354. }
  4355. stack || (stack = new Stack);
  4356. return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
  4357. }
  4358. /**
  4359. * The base implementation of `_.isMap` without Node.js optimizations.
  4360. *
  4361. * @private
  4362. * @param {*} value The value to check.
  4363. * @returns {boolean} Returns `true` if `value` is a map, else `false`.
  4364. */
  4365. function baseIsMap(value) {
  4366. return isObjectLike(value) && getTag(value) == mapTag;
  4367. }
  4368. /**
  4369. * The base implementation of `_.isMatch` without support for iteratee shorthands.
  4370. *
  4371. * @private
  4372. * @param {Object} object The object to inspect.
  4373. * @param {Object} source The object of property values to match.
  4374. * @param {Array} matchData The property names, values, and compare flags to match.
  4375. * @param {Function} [customizer] The function to customize comparisons.
  4376. * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  4377. */
  4378. function baseIsMatch(object, source, matchData, customizer) {
  4379. var index = matchData.length,
  4380. length = index,
  4381. noCustomizer = !customizer;
  4382. if (object == null) {
  4383. return !length;
  4384. }
  4385. object = Object(object);
  4386. while (index--) {
  4387. var data = matchData[index];
  4388. if ((noCustomizer && data[2])
  4389. ? data[1] !== object[data[0]]
  4390. : !(data[0] in object)
  4391. ) {
  4392. return false;
  4393. }
  4394. }
  4395. while (++index < length) {
  4396. data = matchData[index];
  4397. var key = data[0],
  4398. objValue = object[key],
  4399. srcValue = data[1];
  4400. if (noCustomizer && data[2]) {
  4401. if (objValue === undefined && !(key in object)) {
  4402. return false;
  4403. }
  4404. } else {
  4405. var stack = new Stack;
  4406. if (customizer) {
  4407. var result = customizer(objValue, srcValue, key, object, source, stack);
  4408. }
  4409. if (!(result === undefined
  4410. ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
  4411. : result
  4412. )) {
  4413. return false;
  4414. }
  4415. }
  4416. }
  4417. return true;
  4418. }
  4419. /**
  4420. * The base implementation of `_.isNative` without bad shim checks.
  4421. *
  4422. * @private
  4423. * @param {*} value The value to check.
  4424. * @returns {boolean} Returns `true` if `value` is a native function,
  4425. * else `false`.
  4426. */
  4427. function baseIsNative(value) {
  4428. if (!isObject(value) || isMasked(value)) {
  4429. return false;
  4430. }
  4431. var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
  4432. return pattern.test(toSource(value));
  4433. }
  4434. /**
  4435. * The base implementation of `_.isRegExp` without Node.js optimizations.
  4436. *
  4437. * @private
  4438. * @param {*} value The value to check.
  4439. * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
  4440. */
  4441. function baseIsRegExp(value) {
  4442. return isObjectLike(value) && baseGetTag(value) == regexpTag;
  4443. }
  4444. /**
  4445. * The base implementation of `_.isSet` without Node.js optimizations.
  4446. *
  4447. * @private
  4448. * @param {*} value The value to check.
  4449. * @returns {boolean} Returns `true` if `value` is a set, else `false`.
  4450. */
  4451. function baseIsSet(value) {
  4452. return isObjectLike(value) && getTag(value) == setTag;
  4453. }
  4454. /**
  4455. * The base implementation of `_.isTypedArray` without Node.js optimizations.
  4456. *
  4457. * @private
  4458. * @param {*} value The value to check.
  4459. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  4460. */
  4461. function baseIsTypedArray(value) {
  4462. return isObjectLike(value) &&
  4463. isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
  4464. }
  4465. /**
  4466. * The base implementation of `_.iteratee`.
  4467. *
  4468. * @private
  4469. * @param {*} [value=_.identity] The value to convert to an iteratee.
  4470. * @returns {Function} Returns the iteratee.
  4471. */
  4472. function baseIteratee(value) {
  4473. // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
  4474. // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
  4475. if (typeof value == 'function') {
  4476. return value;
  4477. }
  4478. if (value == null) {
  4479. return identity;
  4480. }
  4481. if (typeof value == 'object') {
  4482. return isArray(value)
  4483. ? baseMatchesProperty(value[0], value[1])
  4484. : baseMatches(value);
  4485. }
  4486. return property(value);
  4487. }
  4488. /**
  4489. * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
  4490. *
  4491. * @private
  4492. * @param {Object} object The object to query.
  4493. * @returns {Array} Returns the array of property names.
  4494. */
  4495. function baseKeys(object) {
  4496. if (!isPrototype(object)) {
  4497. return nativeKeys(object);
  4498. }
  4499. var result = [];
  4500. for (var key in Object(object)) {
  4501. if (hasOwnProperty.call(object, key) && key != 'constructor') {
  4502. result.push(key);
  4503. }
  4504. }
  4505. return result;
  4506. }
  4507. /**
  4508. * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
  4509. *
  4510. * @private
  4511. * @param {Object} object The object to query.
  4512. * @returns {Array} Returns the array of property names.
  4513. */
  4514. function baseKeysIn(object) {
  4515. if (!isObject(object)) {
  4516. return nativeKeysIn(object);
  4517. }
  4518. var isProto = isPrototype(object),
  4519. result = [];
  4520. for (var key in object) {
  4521. if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
  4522. result.push(key);
  4523. }
  4524. }
  4525. return result;
  4526. }
  4527. /**
  4528. * The base implementation of `_.lt` which doesn't coerce arguments.
  4529. *
  4530. * @private
  4531. * @param {*} value The value to compare.
  4532. * @param {*} other The other value to compare.
  4533. * @returns {boolean} Returns `true` if `value` is less than `other`,
  4534. * else `false`.
  4535. */
  4536. function baseLt(value, other) {
  4537. return value < other;
  4538. }
  4539. /**
  4540. * The base implementation of `_.map` without support for iteratee shorthands.
  4541. *
  4542. * @private
  4543. * @param {Array|Object} collection The collection to iterate over.
  4544. * @param {Function} iteratee The function invoked per iteration.
  4545. * @returns {Array} Returns the new mapped array.
  4546. */
  4547. function baseMap(collection, iteratee) {
  4548. var index = -1,
  4549. result = isArrayLike(collection) ? Array(collection.length) : [];
  4550. baseEach(collection, function(value, key, collection) {
  4551. result[++index] = iteratee(value, key, collection);
  4552. });
  4553. return result;
  4554. }
  4555. /**
  4556. * The base implementation of `_.matches` which doesn't clone `source`.
  4557. *
  4558. * @private
  4559. * @param {Object} source The object of property values to match.
  4560. * @returns {Function} Returns the new spec function.
  4561. */
  4562. function baseMatches(source) {
  4563. var matchData = getMatchData(source);
  4564. if (matchData.length == 1 && matchData[0][2]) {
  4565. return matchesStrictComparable(matchData[0][0], matchData[0][1]);
  4566. }
  4567. return function(object) {
  4568. return object === source || baseIsMatch(object, source, matchData);
  4569. };
  4570. }
  4571. /**
  4572. * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
  4573. *
  4574. * @private
  4575. * @param {string} path The path of the property to get.
  4576. * @param {*} srcValue The value to match.
  4577. * @returns {Function} Returns the new spec function.
  4578. */
  4579. function baseMatchesProperty(path, srcValue) {
  4580. if (isKey(path) && isStrictComparable(srcValue)) {
  4581. return matchesStrictComparable(toKey(path), srcValue);
  4582. }
  4583. return function(object) {
  4584. var objValue = get(object, path);
  4585. return (objValue === undefined && objValue === srcValue)
  4586. ? hasIn(object, path)
  4587. : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
  4588. };
  4589. }
  4590. /**
  4591. * The base implementation of `_.merge` without support for multiple sources.
  4592. *
  4593. * @private
  4594. * @param {Object} object The destination object.
  4595. * @param {Object} source The source object.
  4596. * @param {number} srcIndex The index of `source`.
  4597. * @param {Function} [customizer] The function to customize merged values.
  4598. * @param {Object} [stack] Tracks traversed source values and their merged
  4599. * counterparts.
  4600. */
  4601. function baseMerge(object, source, srcIndex, customizer, stack) {
  4602. if (object === source) {
  4603. return;
  4604. }
  4605. baseFor(source, function(srcValue, key) {
  4606. stack || (stack = new Stack);
  4607. if (isObject(srcValue)) {
  4608. baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
  4609. }
  4610. else {
  4611. var newValue = customizer
  4612. ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
  4613. : undefined;
  4614. if (newValue === undefined) {
  4615. newValue = srcValue;
  4616. }
  4617. assignMergeValue(object, key, newValue);
  4618. }
  4619. }, keysIn);
  4620. }
  4621. /**
  4622. * A specialized version of `baseMerge` for arrays and objects which performs
  4623. * deep merges and tracks traversed objects enabling objects with circular
  4624. * references to be merged.
  4625. *
  4626. * @private
  4627. * @param {Object} object The destination object.
  4628. * @param {Object} source The source object.
  4629. * @param {string} key The key of the value to merge.
  4630. * @param {number} srcIndex The index of `source`.
  4631. * @param {Function} mergeFunc The function to merge values.
  4632. * @param {Function} [customizer] The function to customize assigned values.
  4633. * @param {Object} [stack] Tracks traversed source values and their merged
  4634. * counterparts.
  4635. */
  4636. function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
  4637. var objValue = safeGet(object, key),
  4638. srcValue = safeGet(source, key),
  4639. stacked = stack.get(srcValue);
  4640. if (stacked) {
  4641. assignMergeValue(object, key, stacked);
  4642. return;
  4643. }
  4644. var newValue = customizer
  4645. ? customizer(objValue, srcValue, (key + ''), object, source, stack)
  4646. : undefined;
  4647. var isCommon = newValue === undefined;
  4648. if (isCommon) {
  4649. var isArr = isArray(srcValue),
  4650. isBuff = !isArr && isBuffer(srcValue),
  4651. isTyped = !isArr && !isBuff && isTypedArray(srcValue);
  4652. newValue = srcValue;
  4653. if (isArr || isBuff || isTyped) {
  4654. if (isArray(objValue)) {
  4655. newValue = objValue;
  4656. }
  4657. else if (isArrayLikeObject(objValue)) {
  4658. newValue = copyArray(objValue);
  4659. }
  4660. else if (isBuff) {
  4661. isCommon = false;
  4662. newValue = cloneBuffer(srcValue, true);
  4663. }
  4664. else if (isTyped) {
  4665. isCommon = false;
  4666. newValue = cloneTypedArray(srcValue, true);
  4667. }
  4668. else {
  4669. newValue = [];
  4670. }
  4671. }
  4672. else if (isPlainObject(srcValue) || isArguments(srcValue)) {
  4673. newValue = objValue;
  4674. if (isArguments(objValue)) {
  4675. newValue = toPlainObject(objValue);
  4676. }
  4677. else if (!isObject(objValue) || isFunction(objValue)) {
  4678. newValue = initCloneObject(srcValue);
  4679. }
  4680. }
  4681. else {
  4682. isCommon = false;
  4683. }
  4684. }
  4685. if (isCommon) {
  4686. // Recursively merge objects and arrays (susceptible to call stack limits).
  4687. stack.set(srcValue, newValue);
  4688. mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
  4689. stack['delete'](srcValue);
  4690. }
  4691. assignMergeValue(object, key, newValue);
  4692. }
  4693. /**
  4694. * The base implementation of `_.nth` which doesn't coerce arguments.
  4695. *
  4696. * @private
  4697. * @param {Array} array The array to query.
  4698. * @param {number} n The index of the element to return.
  4699. * @returns {*} Returns the nth element of `array`.
  4700. */
  4701. function baseNth(array, n) {
  4702. var length = array.length;
  4703. if (!length) {
  4704. return;
  4705. }
  4706. n += n < 0 ? length : 0;
  4707. return isIndex(n, length) ? array[n] : undefined;
  4708. }
  4709. /**
  4710. * The base implementation of `_.orderBy` without param guards.
  4711. *
  4712. * @private
  4713. * @param {Array|Object} collection The collection to iterate over.
  4714. * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
  4715. * @param {string[]} orders The sort orders of `iteratees`.
  4716. * @returns {Array} Returns the new sorted array.
  4717. */
  4718. function baseOrderBy(collection, iteratees, orders) {
  4719. if (iteratees.length) {
  4720. iteratees = arrayMap(iteratees, function(iteratee) {
  4721. if (isArray(iteratee)) {
  4722. return function(value) {
  4723. return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
  4724. }
  4725. }
  4726. return iteratee;
  4727. });
  4728. } else {
  4729. iteratees = [identity];
  4730. }
  4731. var index = -1;
  4732. iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
  4733. var result = baseMap(collection, function(value, key, collection) {
  4734. var criteria = arrayMap(iteratees, function(iteratee) {
  4735. return iteratee(value);
  4736. });
  4737. return { 'criteria': criteria, 'index': ++index, 'value': value };
  4738. });
  4739. return baseSortBy(result, function(object, other) {
  4740. return compareMultiple(object, other, orders);
  4741. });
  4742. }
  4743. /**
  4744. * The base implementation of `_.pick` without support for individual
  4745. * property identifiers.
  4746. *
  4747. * @private
  4748. * @param {Object} object The source object.
  4749. * @param {string[]} paths The property paths to pick.
  4750. * @returns {Object} Returns the new object.
  4751. */
  4752. function basePick(object, paths) {
  4753. return basePickBy(object, paths, function(value, path) {
  4754. return hasIn(object, path);
  4755. });
  4756. }
  4757. /**
  4758. * The base implementation of `_.pickBy` without support for iteratee shorthands.
  4759. *
  4760. * @private
  4761. * @param {Object} object The source object.
  4762. * @param {string[]} paths The property paths to pick.
  4763. * @param {Function} predicate The function invoked per property.
  4764. * @returns {Object} Returns the new object.
  4765. */
  4766. function basePickBy(object, paths, predicate) {
  4767. var index = -1,
  4768. length = paths.length,
  4769. result = {};
  4770. while (++index < length) {
  4771. var path = paths[index],
  4772. value = baseGet(object, path);
  4773. if (predicate(value, path)) {
  4774. baseSet(result, castPath(path, object), value);
  4775. }
  4776. }
  4777. return result;
  4778. }
  4779. /**
  4780. * A specialized version of `baseProperty` which supports deep paths.
  4781. *
  4782. * @private
  4783. * @param {Array|string} path The path of the property to get.
  4784. * @returns {Function} Returns the new accessor function.
  4785. */
  4786. function basePropertyDeep(path) {
  4787. return function(object) {
  4788. return baseGet(object, path);
  4789. };
  4790. }
  4791. /**
  4792. * The base implementation of `_.pullAllBy` without support for iteratee
  4793. * shorthands.
  4794. *
  4795. * @private
  4796. * @param {Array} array The array to modify.
  4797. * @param {Array} values The values to remove.
  4798. * @param {Function} [iteratee] The iteratee invoked per element.
  4799. * @param {Function} [comparator] The comparator invoked per element.
  4800. * @returns {Array} Returns `array`.
  4801. */
  4802. function basePullAll(array, values, iteratee, comparator) {
  4803. var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
  4804. index = -1,
  4805. length = values.length,
  4806. seen = array;
  4807. if (array === values) {
  4808. values = copyArray(values);
  4809. }
  4810. if (iteratee) {
  4811. seen = arrayMap(array, baseUnary(iteratee));
  4812. }
  4813. while (++index < length) {
  4814. var fromIndex = 0,
  4815. value = values[index],
  4816. computed = iteratee ? iteratee(value) : value;
  4817. while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
  4818. if (seen !== array) {
  4819. splice.call(seen, fromIndex, 1);
  4820. }
  4821. splice.call(array, fromIndex, 1);
  4822. }
  4823. }
  4824. return array;
  4825. }
  4826. /**
  4827. * The base implementation of `_.pullAt` without support for individual
  4828. * indexes or capturing the removed elements.
  4829. *
  4830. * @private
  4831. * @param {Array} array The array to modify.
  4832. * @param {number[]} indexes The indexes of elements to remove.
  4833. * @returns {Array} Returns `array`.
  4834. */
  4835. function basePullAt(array, indexes) {
  4836. var length = array ? indexes.length : 0,
  4837. lastIndex = length - 1;
  4838. while (length--) {
  4839. var index = indexes[length];
  4840. if (length == lastIndex || index !== previous) {
  4841. var previous = index;
  4842. if (isIndex(index)) {
  4843. splice.call(array, index, 1);
  4844. } else {
  4845. baseUnset(array, index);
  4846. }
  4847. }
  4848. }
  4849. return array;
  4850. }
  4851. /**
  4852. * The base implementation of `_.random` without support for returning
  4853. * floating-point numbers.
  4854. *
  4855. * @private
  4856. * @param {number} lower The lower bound.
  4857. * @param {number} upper The upper bound.
  4858. * @returns {number} Returns the random number.
  4859. */
  4860. function baseRandom(lower, upper) {
  4861. return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
  4862. }
  4863. /**
  4864. * The base implementation of `_.range` and `_.rangeRight` which doesn't
  4865. * coerce arguments.
  4866. *
  4867. * @private
  4868. * @param {number} start The start of the range.
  4869. * @param {number} end The end of the range.
  4870. * @param {number} step The value to increment or decrement by.
  4871. * @param {boolean} [fromRight] Specify iterating from right to left.
  4872. * @returns {Array} Returns the range of numbers.
  4873. */
  4874. function baseRange(start, end, step, fromRight) {
  4875. var index = -1,
  4876. length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
  4877. result = Array(length);
  4878. while (length--) {
  4879. result[fromRight ? length : ++index] = start;
  4880. start += step;
  4881. }
  4882. return result;
  4883. }
  4884. /**
  4885. * The base implementation of `_.repeat` which doesn't coerce arguments.
  4886. *
  4887. * @private
  4888. * @param {string} string The string to repeat.
  4889. * @param {number} n The number of times to repeat the string.
  4890. * @returns {string} Returns the repeated string.
  4891. */
  4892. function baseRepeat(string, n) {
  4893. var result = '';
  4894. if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
  4895. return result;
  4896. }
  4897. // Leverage the exponentiation by squaring algorithm for a faster repeat.
  4898. // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
  4899. do {
  4900. if (n % 2) {
  4901. result += string;
  4902. }
  4903. n = nativeFloor(n / 2);
  4904. if (n) {
  4905. string += string;
  4906. }
  4907. } while (n);
  4908. return result;
  4909. }
  4910. /**
  4911. * The base implementation of `_.rest` which doesn't validate or coerce arguments.
  4912. *
  4913. * @private
  4914. * @param {Function} func The function to apply a rest parameter to.
  4915. * @param {number} [start=func.length-1] The start position of the rest parameter.
  4916. * @returns {Function} Returns the new function.
  4917. */
  4918. function baseRest(func, start) {
  4919. return setToString(overRest(func, start, identity), func + '');
  4920. }
  4921. /**
  4922. * The base implementation of `_.sample`.
  4923. *
  4924. * @private
  4925. * @param {Array|Object} collection The collection to sample.
  4926. * @returns {*} Returns the random element.
  4927. */
  4928. function baseSample(collection) {
  4929. return arraySample(values(collection));
  4930. }
  4931. /**
  4932. * The base implementation of `_.sampleSize` without param guards.
  4933. *
  4934. * @private
  4935. * @param {Array|Object} collection The collection to sample.
  4936. * @param {number} n The number of elements to sample.
  4937. * @returns {Array} Returns the random elements.
  4938. */
  4939. function baseSampleSize(collection, n) {
  4940. var array = values(collection);
  4941. return shuffleSelf(array, baseClamp(n, 0, array.length));
  4942. }
  4943. /**
  4944. * The base implementation of `_.set`.
  4945. *
  4946. * @private
  4947. * @param {Object} object The object to modify.
  4948. * @param {Array|string} path The path of the property to set.
  4949. * @param {*} value The value to set.
  4950. * @param {Function} [customizer] The function to customize path creation.
  4951. * @returns {Object} Returns `object`.
  4952. */
  4953. function baseSet(object, path, value, customizer) {
  4954. if (!isObject(object)) {
  4955. return object;
  4956. }
  4957. path = castPath(path, object);
  4958. var index = -1,
  4959. length = path.length,
  4960. lastIndex = length - 1,
  4961. nested = object;
  4962. while (nested != null && ++index < length) {
  4963. var key = toKey(path[index]),
  4964. newValue = value;
  4965. if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
  4966. return object;
  4967. }
  4968. if (index != lastIndex) {
  4969. var objValue = nested[key];
  4970. newValue = customizer ? customizer(objValue, key, nested) : undefined;
  4971. if (newValue === undefined) {
  4972. newValue = isObject(objValue)
  4973. ? objValue
  4974. : (isIndex(path[index + 1]) ? [] : {});
  4975. }
  4976. }
  4977. assignValue(nested, key, newValue);
  4978. nested = nested[key];
  4979. }
  4980. return object;
  4981. }
  4982. /**
  4983. * The base implementation of `setData` without support for hot loop shorting.
  4984. *
  4985. * @private
  4986. * @param {Function} func The function to associate metadata with.
  4987. * @param {*} data The metadata.
  4988. * @returns {Function} Returns `func`.
  4989. */
  4990. var baseSetData = !metaMap ? identity : function(func, data) {
  4991. metaMap.set(func, data);
  4992. return func;
  4993. };
  4994. /**
  4995. * The base implementation of `setToString` without support for hot loop shorting.
  4996. *
  4997. * @private
  4998. * @param {Function} func The function to modify.
  4999. * @param {Function} string The `toString` result.
  5000. * @returns {Function} Returns `func`.
  5001. */
  5002. var baseSetToString = !defineProperty ? identity : function(func, string) {
  5003. return defineProperty(func, 'toString', {
  5004. 'configurable': true,
  5005. 'enumerable': false,
  5006. 'value': constant(string),
  5007. 'writable': true
  5008. });
  5009. };
  5010. /**
  5011. * The base implementation of `_.shuffle`.
  5012. *
  5013. * @private
  5014. * @param {Array|Object} collection The collection to shuffle.
  5015. * @returns {Array} Returns the new shuffled array.
  5016. */
  5017. function baseShuffle(collection) {
  5018. return shuffleSelf(values(collection));
  5019. }
  5020. /**
  5021. * The base implementation of `_.slice` without an iteratee call guard.
  5022. *
  5023. * @private
  5024. * @param {Array} array The array to slice.
  5025. * @param {number} [start=0] The start position.
  5026. * @param {number} [end=array.length] The end position.
  5027. * @returns {Array} Returns the slice of `array`.
  5028. */
  5029. function baseSlice(array, start, end) {
  5030. var index = -1,
  5031. length = array.length;
  5032. if (start < 0) {
  5033. start = -start > length ? 0 : (length + start);
  5034. }
  5035. end = end > length ? length : end;
  5036. if (end < 0) {
  5037. end += length;
  5038. }
  5039. length = start > end ? 0 : ((end - start) >>> 0);
  5040. start >>>= 0;
  5041. var result = Array(length);
  5042. while (++index < length) {
  5043. result[index] = array[index + start];
  5044. }
  5045. return result;
  5046. }
  5047. /**
  5048. * The base implementation of `_.some` without support for iteratee shorthands.
  5049. *
  5050. * @private
  5051. * @param {Array|Object} collection The collection to iterate over.
  5052. * @param {Function} predicate The function invoked per iteration.
  5053. * @returns {boolean} Returns `true` if any element passes the predicate check,
  5054. * else `false`.
  5055. */
  5056. function baseSome(collection, predicate) {
  5057. var result;
  5058. baseEach(collection, function(value, index, collection) {
  5059. result = predicate(value, index, collection);
  5060. return !result;
  5061. });
  5062. return !!result;
  5063. }
  5064. /**
  5065. * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
  5066. * performs a binary search of `array` to determine the index at which `value`
  5067. * should be inserted into `array` in order to maintain its sort order.
  5068. *
  5069. * @private
  5070. * @param {Array} array The sorted array to inspect.
  5071. * @param {*} value The value to evaluate.
  5072. * @param {boolean} [retHighest] Specify returning the highest qualified index.
  5073. * @returns {number} Returns the index at which `value` should be inserted
  5074. * into `array`.
  5075. */
  5076. function baseSortedIndex(array, value, retHighest) {
  5077. var low = 0,
  5078. high = array == null ? low : array.length;
  5079. if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
  5080. while (low < high) {
  5081. var mid = (low + high) >>> 1,
  5082. computed = array[mid];
  5083. if (computed !== null && !isSymbol(computed) &&
  5084. (retHighest ? (computed <= value) : (computed < value))) {
  5085. low = mid + 1;
  5086. } else {
  5087. high = mid;
  5088. }
  5089. }
  5090. return high;
  5091. }
  5092. return baseSortedIndexBy(array, value, identity, retHighest);
  5093. }
  5094. /**
  5095. * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
  5096. * which invokes `iteratee` for `value` and each element of `array` to compute
  5097. * their sort ranking. The iteratee is invoked with one argument; (value).
  5098. *
  5099. * @private
  5100. * @param {Array} array The sorted array to inspect.
  5101. * @param {*} value The value to evaluate.
  5102. * @param {Function} iteratee The iteratee invoked per element.
  5103. * @param {boolean} [retHighest] Specify returning the highest qualified index.
  5104. * @returns {number} Returns the index at which `value` should be inserted
  5105. * into `array`.
  5106. */
  5107. function baseSortedIndexBy(array, value, iteratee, retHighest) {
  5108. var low = 0,
  5109. high = array == null ? 0 : array.length;
  5110. if (high === 0) {
  5111. return 0;
  5112. }
  5113. value = iteratee(value);
  5114. var valIsNaN = value !== value,
  5115. valIsNull = value === null,
  5116. valIsSymbol = isSymbol(value),
  5117. valIsUndefined = value === undefined;
  5118. while (low < high) {
  5119. var mid = nativeFloor((low + high) / 2),
  5120. computed = iteratee(array[mid]),
  5121. othIsDefined = computed !== undefined,
  5122. othIsNull = computed === null,
  5123. othIsReflexive = computed === computed,
  5124. othIsSymbol = isSymbol(computed);
  5125. if (valIsNaN) {
  5126. var setLow = retHighest || othIsReflexive;
  5127. } else if (valIsUndefined) {
  5128. setLow = othIsReflexive && (retHighest || othIsDefined);
  5129. } else if (valIsNull) {
  5130. setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
  5131. } else if (valIsSymbol) {
  5132. setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
  5133. } else if (othIsNull || othIsSymbol) {
  5134. setLow = false;
  5135. } else {
  5136. setLow = retHighest ? (computed <= value) : (computed < value);
  5137. }
  5138. if (setLow) {
  5139. low = mid + 1;
  5140. } else {
  5141. high = mid;
  5142. }
  5143. }
  5144. return nativeMin(high, MAX_ARRAY_INDEX);
  5145. }
  5146. /**
  5147. * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
  5148. * support for iteratee shorthands.
  5149. *
  5150. * @private
  5151. * @param {Array} array The array to inspect.
  5152. * @param {Function} [iteratee] The iteratee invoked per element.
  5153. * @returns {Array} Returns the new duplicate free array.
  5154. */
  5155. function baseSortedUniq(array, iteratee) {
  5156. var index = -1,
  5157. length = array.length,
  5158. resIndex = 0,
  5159. result = [];
  5160. while (++index < length) {
  5161. var value = array[index],
  5162. computed = iteratee ? iteratee(value) : value;
  5163. if (!index || !eq(computed, seen)) {
  5164. var seen = computed;
  5165. result[resIndex++] = value === 0 ? 0 : value;
  5166. }
  5167. }
  5168. return result;
  5169. }
  5170. /**
  5171. * The base implementation of `_.toNumber` which doesn't ensure correct
  5172. * conversions of binary, hexadecimal, or octal string values.
  5173. *
  5174. * @private
  5175. * @param {*} value The value to process.
  5176. * @returns {number} Returns the number.
  5177. */
  5178. function baseToNumber(value) {
  5179. if (typeof value == 'number') {
  5180. return value;
  5181. }
  5182. if (isSymbol(value)) {
  5183. return NAN;
  5184. }
  5185. return +value;
  5186. }
  5187. /**
  5188. * The base implementation of `_.toString` which doesn't convert nullish
  5189. * values to empty strings.
  5190. *
  5191. * @private
  5192. * @param {*} value The value to process.
  5193. * @returns {string} Returns the string.
  5194. */
  5195. function baseToString(value) {
  5196. // Exit early for strings to avoid a performance hit in some environments.
  5197. if (typeof value == 'string') {
  5198. return value;
  5199. }
  5200. if (isArray(value)) {
  5201. // Recursively convert values (susceptible to call stack limits).
  5202. return arrayMap(value, baseToString) + '';
  5203. }
  5204. if (isSymbol(value)) {
  5205. return symbolToString ? symbolToString.call(value) : '';
  5206. }
  5207. var result = (value + '');
  5208. return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
  5209. }
  5210. /**
  5211. * The base implementation of `_.uniqBy` without support for iteratee shorthands.
  5212. *
  5213. * @private
  5214. * @param {Array} array The array to inspect.
  5215. * @param {Function} [iteratee] The iteratee invoked per element.
  5216. * @param {Function} [comparator] The comparator invoked per element.
  5217. * @returns {Array} Returns the new duplicate free array.
  5218. */
  5219. function baseUniq(array, iteratee, comparator) {
  5220. var index = -1,
  5221. includes = arrayIncludes,
  5222. length = array.length,
  5223. isCommon = true,
  5224. result = [],
  5225. seen = result;
  5226. if (comparator) {
  5227. isCommon = false;
  5228. includes = arrayIncludesWith;
  5229. }
  5230. else if (length >= LARGE_ARRAY_SIZE) {
  5231. var set = iteratee ? null : createSet(array);
  5232. if (set) {
  5233. return setToArray(set);
  5234. }
  5235. isCommon = false;
  5236. includes = cacheHas;
  5237. seen = new SetCache;
  5238. }
  5239. else {
  5240. seen = iteratee ? [] : result;
  5241. }
  5242. outer:
  5243. while (++index < length) {
  5244. var value = array[index],
  5245. computed = iteratee ? iteratee(value) : value;
  5246. value = (comparator || value !== 0) ? value : 0;
  5247. if (isCommon && computed === computed) {
  5248. var seenIndex = seen.length;
  5249. while (seenIndex--) {
  5250. if (seen[seenIndex] === computed) {
  5251. continue outer;
  5252. }
  5253. }
  5254. if (iteratee) {
  5255. seen.push(computed);
  5256. }
  5257. result.push(value);
  5258. }
  5259. else if (!includes(seen, computed, comparator)) {
  5260. if (seen !== result) {
  5261. seen.push(computed);
  5262. }
  5263. result.push(value);
  5264. }
  5265. }
  5266. return result;
  5267. }
  5268. /**
  5269. * The base implementation of `_.unset`.
  5270. *
  5271. * @private
  5272. * @param {Object} object The object to modify.
  5273. * @param {Array|string} path The property path to unset.
  5274. * @returns {boolean} Returns `true` if the property is deleted, else `false`.
  5275. */
  5276. function baseUnset(object, path) {
  5277. path = castPath(path, object);
  5278. object = parent(object, path);
  5279. return object == null || delete object[toKey(last(path))];
  5280. }
  5281. /**
  5282. * The base implementation of `_.update`.
  5283. *
  5284. * @private
  5285. * @param {Object} object The object to modify.
  5286. * @param {Array|string} path The path of the property to update.
  5287. * @param {Function} updater The function to produce the updated value.
  5288. * @param {Function} [customizer] The function to customize path creation.
  5289. * @returns {Object} Returns `object`.
  5290. */
  5291. function baseUpdate(object, path, updater, customizer) {
  5292. return baseSet(object, path, updater(baseGet(object, path)), customizer);
  5293. }
  5294. /**
  5295. * The base implementation of methods like `_.dropWhile` and `_.takeWhile`
  5296. * without support for iteratee shorthands.
  5297. *
  5298. * @private
  5299. * @param {Array} array The array to query.
  5300. * @param {Function} predicate The function invoked per iteration.
  5301. * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
  5302. * @param {boolean} [fromRight] Specify iterating from right to left.
  5303. * @returns {Array} Returns the slice of `array`.
  5304. */
  5305. function baseWhile(array, predicate, isDrop, fromRight) {
  5306. var length = array.length,
  5307. index = fromRight ? length : -1;
  5308. while ((fromRight ? index-- : ++index < length) &&
  5309. predicate(array[index], index, array)) {}
  5310. return isDrop
  5311. ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
  5312. : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
  5313. }
  5314. /**
  5315. * The base implementation of `wrapperValue` which returns the result of
  5316. * performing a sequence of actions on the unwrapped `value`, where each
  5317. * successive action is supplied the return value of the previous.
  5318. *
  5319. * @private
  5320. * @param {*} value The unwrapped value.
  5321. * @param {Array} actions Actions to perform to resolve the unwrapped value.
  5322. * @returns {*} Returns the resolved value.
  5323. */
  5324. function baseWrapperValue(value, actions) {
  5325. var result = value;
  5326. if (result instanceof LazyWrapper) {
  5327. result = result.value();
  5328. }
  5329. return arrayReduce(actions, function(result, action) {
  5330. return action.func.apply(action.thisArg, arrayPush([result], action.args));
  5331. }, result);
  5332. }
  5333. /**
  5334. * The base implementation of methods like `_.xor`, without support for
  5335. * iteratee shorthands, that accepts an array of arrays to inspect.
  5336. *
  5337. * @private
  5338. * @param {Array} arrays The arrays to inspect.
  5339. * @param {Function} [iteratee] The iteratee invoked per element.
  5340. * @param {Function} [comparator] The comparator invoked per element.
  5341. * @returns {Array} Returns the new array of values.
  5342. */
  5343. function baseXor(arrays, iteratee, comparator) {
  5344. var length = arrays.length;
  5345. if (length < 2) {
  5346. return length ? baseUniq(arrays[0]) : [];
  5347. }
  5348. var index = -1,
  5349. result = Array(length);
  5350. while (++index < length) {
  5351. var array = arrays[index],
  5352. othIndex = -1;
  5353. while (++othIndex < length) {
  5354. if (othIndex != index) {
  5355. result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
  5356. }
  5357. }
  5358. }
  5359. return baseUniq(baseFlatten(result, 1), iteratee, comparator);
  5360. }
  5361. /**
  5362. * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
  5363. *
  5364. * @private
  5365. * @param {Array} props The property identifiers.
  5366. * @param {Array} values The property values.
  5367. * @param {Function} assignFunc The function to assign values.
  5368. * @returns {Object} Returns the new object.
  5369. */
  5370. function baseZipObject(props, values, assignFunc) {
  5371. var index = -1,
  5372. length = props.length,
  5373. valsLength = values.length,
  5374. result = {};
  5375. while (++index < length) {
  5376. var value = index < valsLength ? values[index] : undefined;
  5377. assignFunc(result, props[index], value);
  5378. }
  5379. return result;
  5380. }
  5381. /**
  5382. * Casts `value` to an empty array if it's not an array like object.
  5383. *
  5384. * @private
  5385. * @param {*} value The value to inspect.
  5386. * @returns {Array|Object} Returns the cast array-like object.
  5387. */
  5388. function castArrayLikeObject(value) {
  5389. return isArrayLikeObject(value) ? value : [];
  5390. }
  5391. /**
  5392. * Casts `value` to `identity` if it's not a function.
  5393. *
  5394. * @private
  5395. * @param {*} value The value to inspect.
  5396. * @returns {Function} Returns cast function.
  5397. */
  5398. function castFunction(value) {
  5399. return typeof value == 'function' ? value : identity;
  5400. }
  5401. /**
  5402. * Casts `value` to a path array if it's not one.
  5403. *
  5404. * @private
  5405. * @param {*} value The value to inspect.
  5406. * @param {Object} [object] The object to query keys on.
  5407. * @returns {Array} Returns the cast property path array.
  5408. */
  5409. function castPath(value, object) {
  5410. if (isArray(value)) {
  5411. return value;
  5412. }
  5413. return isKey(value, object) ? [value] : stringToPath(toString(value));
  5414. }
  5415. /**
  5416. * A `baseRest` alias which can be replaced with `identity` by module
  5417. * replacement plugins.
  5418. *
  5419. * @private
  5420. * @type {Function}
  5421. * @param {Function} func The function to apply a rest parameter to.
  5422. * @returns {Function} Returns the new function.
  5423. */
  5424. var castRest = baseRest;
  5425. /**
  5426. * Casts `array` to a slice if it's needed.
  5427. *
  5428. * @private
  5429. * @param {Array} array The array to inspect.
  5430. * @param {number} start The start position.
  5431. * @param {number} [end=array.length] The end position.
  5432. * @returns {Array} Returns the cast slice.
  5433. */
  5434. function castSlice(array, start, end) {
  5435. var length = array.length;
  5436. end = end === undefined ? length : end;
  5437. return (!start && end >= length) ? array : baseSlice(array, start, end);
  5438. }
  5439. /**
  5440. * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).
  5441. *
  5442. * @private
  5443. * @param {number|Object} id The timer id or timeout object of the timer to clear.
  5444. */
  5445. var clearTimeout = ctxClearTimeout || function(id) {
  5446. return root.clearTimeout(id);
  5447. };
  5448. /**
  5449. * Creates a clone of `buffer`.
  5450. *
  5451. * @private
  5452. * @param {Buffer} buffer The buffer to clone.
  5453. * @param {boolean} [isDeep] Specify a deep clone.
  5454. * @returns {Buffer} Returns the cloned buffer.
  5455. */
  5456. function cloneBuffer(buffer, isDeep) {
  5457. if (isDeep) {
  5458. return buffer.slice();
  5459. }
  5460. var length = buffer.length,
  5461. result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
  5462. buffer.copy(result);
  5463. return result;
  5464. }
  5465. /**
  5466. * Creates a clone of `arrayBuffer`.
  5467. *
  5468. * @private
  5469. * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
  5470. * @returns {ArrayBuffer} Returns the cloned array buffer.
  5471. */
  5472. function cloneArrayBuffer(arrayBuffer) {
  5473. var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
  5474. new Uint8Array(result).set(new Uint8Array(arrayBuffer));
  5475. return result;
  5476. }
  5477. /**
  5478. * Creates a clone of `dataView`.
  5479. *
  5480. * @private
  5481. * @param {Object} dataView The data view to clone.
  5482. * @param {boolean} [isDeep] Specify a deep clone.
  5483. * @returns {Object} Returns the cloned data view.
  5484. */
  5485. function cloneDataView(dataView, isDeep) {
  5486. var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
  5487. return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
  5488. }
  5489. /**
  5490. * Creates a clone of `regexp`.
  5491. *
  5492. * @private
  5493. * @param {Object} regexp The regexp to clone.
  5494. * @returns {Object} Returns the cloned regexp.
  5495. */
  5496. function cloneRegExp(regexp) {
  5497. var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
  5498. result.lastIndex = regexp.lastIndex;
  5499. return result;
  5500. }
  5501. /**
  5502. * Creates a clone of the `symbol` object.
  5503. *
  5504. * @private
  5505. * @param {Object} symbol The symbol object to clone.
  5506. * @returns {Object} Returns the cloned symbol object.
  5507. */
  5508. function cloneSymbol(symbol) {
  5509. return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
  5510. }
  5511. /**
  5512. * Creates a clone of `typedArray`.
  5513. *
  5514. * @private
  5515. * @param {Object} typedArray The typed array to clone.
  5516. * @param {boolean} [isDeep] Specify a deep clone.
  5517. * @returns {Object} Returns the cloned typed array.
  5518. */
  5519. function cloneTypedArray(typedArray, isDeep) {
  5520. var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
  5521. return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
  5522. }
  5523. /**
  5524. * Compares values to sort them in ascending order.
  5525. *
  5526. * @private
  5527. * @param {*} value The value to compare.
  5528. * @param {*} other The other value to compare.
  5529. * @returns {number} Returns the sort order indicator for `value`.
  5530. */
  5531. function compareAscending(value, other) {
  5532. if (value !== other) {
  5533. var valIsDefined = value !== undefined,
  5534. valIsNull = value === null,
  5535. valIsReflexive = value === value,
  5536. valIsSymbol = isSymbol(value);
  5537. var othIsDefined = other !== undefined,
  5538. othIsNull = other === null,
  5539. othIsReflexive = other === other,
  5540. othIsSymbol = isSymbol(other);
  5541. if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
  5542. (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
  5543. (valIsNull && othIsDefined && othIsReflexive) ||
  5544. (!valIsDefined && othIsReflexive) ||
  5545. !valIsReflexive) {
  5546. return 1;
  5547. }
  5548. if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
  5549. (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
  5550. (othIsNull && valIsDefined && valIsReflexive) ||
  5551. (!othIsDefined && valIsReflexive) ||
  5552. !othIsReflexive) {
  5553. return -1;
  5554. }
  5555. }
  5556. return 0;
  5557. }
  5558. /**
  5559. * Used by `_.orderBy` to compare multiple properties of a value to another
  5560. * and stable sort them.
  5561. *
  5562. * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
  5563. * specify an order of "desc" for descending or "asc" for ascending sort order
  5564. * of corresponding values.
  5565. *
  5566. * @private
  5567. * @param {Object} object The object to compare.
  5568. * @param {Object} other The other object to compare.
  5569. * @param {boolean[]|string[]} orders The order to sort by for each property.
  5570. * @returns {number} Returns the sort order indicator for `object`.
  5571. */
  5572. function compareMultiple(object, other, orders) {
  5573. var index = -1,
  5574. objCriteria = object.criteria,
  5575. othCriteria = other.criteria,
  5576. length = objCriteria.length,
  5577. ordersLength = orders.length;
  5578. while (++index < length) {
  5579. var result = compareAscending(objCriteria[index], othCriteria[index]);
  5580. if (result) {
  5581. if (index >= ordersLength) {
  5582. return result;
  5583. }
  5584. var order = orders[index];
  5585. return result * (order == 'desc' ? -1 : 1);
  5586. }
  5587. }
  5588. // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
  5589. // that causes it, under certain circumstances, to provide the same value for
  5590. // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
  5591. // for more details.
  5592. //
  5593. // This also ensures a stable sort in V8 and other engines.
  5594. // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
  5595. return object.index - other.index;
  5596. }
  5597. /**
  5598. * Creates an array that is the composition of partially applied arguments,
  5599. * placeholders, and provided arguments into a single array of arguments.
  5600. *
  5601. * @private
  5602. * @param {Array} args The provided arguments.
  5603. * @param {Array} partials The arguments to prepend to those provided.
  5604. * @param {Array} holders The `partials` placeholder indexes.
  5605. * @params {boolean} [isCurried] Specify composing for a curried function.
  5606. * @returns {Array} Returns the new array of composed arguments.
  5607. */
  5608. function composeArgs(args, partials, holders, isCurried) {
  5609. var argsIndex = -1,
  5610. argsLength = args.length,
  5611. holdersLength = holders.length,
  5612. leftIndex = -1,
  5613. leftLength = partials.length,
  5614. rangeLength = nativeMax(argsLength - holdersLength, 0),
  5615. result = Array(leftLength + rangeLength),
  5616. isUncurried = !isCurried;
  5617. while (++leftIndex < leftLength) {
  5618. result[leftIndex] = partials[leftIndex];
  5619. }
  5620. while (++argsIndex < holdersLength) {
  5621. if (isUncurried || argsIndex < argsLength) {
  5622. result[holders[argsIndex]] = args[argsIndex];
  5623. }
  5624. }
  5625. while (rangeLength--) {
  5626. result[leftIndex++] = args[argsIndex++];
  5627. }
  5628. return result;
  5629. }
  5630. /**
  5631. * This function is like `composeArgs` except that the arguments composition
  5632. * is tailored for `_.partialRight`.
  5633. *
  5634. * @private
  5635. * @param {Array} args The provided arguments.
  5636. * @param {Array} partials The arguments to append to those provided.
  5637. * @param {Array} holders The `partials` placeholder indexes.
  5638. * @params {boolean} [isCurried] Specify composing for a curried function.
  5639. * @returns {Array} Returns the new array of composed arguments.
  5640. */
  5641. function composeArgsRight(args, partials, holders, isCurried) {
  5642. var argsIndex = -1,
  5643. argsLength = args.length,
  5644. holdersIndex = -1,
  5645. holdersLength = holders.length,
  5646. rightIndex = -1,
  5647. rightLength = partials.length,
  5648. rangeLength = nativeMax(argsLength - holdersLength, 0),
  5649. result = Array(rangeLength + rightLength),
  5650. isUncurried = !isCurried;
  5651. while (++argsIndex < rangeLength) {
  5652. result[argsIndex] = args[argsIndex];
  5653. }
  5654. var offset = argsIndex;
  5655. while (++rightIndex < rightLength) {
  5656. result[offset + rightIndex] = partials[rightIndex];
  5657. }
  5658. while (++holdersIndex < holdersLength) {
  5659. if (isUncurried || argsIndex < argsLength) {
  5660. result[offset + holders[holdersIndex]] = args[argsIndex++];
  5661. }
  5662. }
  5663. return result;
  5664. }
  5665. /**
  5666. * Copies the values of `source` to `array`.
  5667. *
  5668. * @private
  5669. * @param {Array} source The array to copy values from.
  5670. * @param {Array} [array=[]] The array to copy values to.
  5671. * @returns {Array} Returns `array`.
  5672. */
  5673. function copyArray(source, array) {
  5674. var index = -1,
  5675. length = source.length;
  5676. array || (array = Array(length));
  5677. while (++index < length) {
  5678. array[index] = source[index];
  5679. }
  5680. return array;
  5681. }
  5682. /**
  5683. * Copies properties of `source` to `object`.
  5684. *
  5685. * @private
  5686. * @param {Object} source The object to copy properties from.
  5687. * @param {Array} props The property identifiers to copy.
  5688. * @param {Object} [object={}] The object to copy properties to.
  5689. * @param {Function} [customizer] The function to customize copied values.
  5690. * @returns {Object} Returns `object`.
  5691. */
  5692. function copyObject(source, props, object, customizer) {
  5693. var isNew = !object;
  5694. object || (object = {});
  5695. var index = -1,
  5696. length = props.length;
  5697. while (++index < length) {
  5698. var key = props[index];
  5699. var newValue = customizer
  5700. ? customizer(object[key], source[key], key, object, source)
  5701. : undefined;
  5702. if (newValue === undefined) {
  5703. newValue = source[key];
  5704. }
  5705. if (isNew) {
  5706. baseAssignValue(object, key, newValue);
  5707. } else {
  5708. assignValue(object, key, newValue);
  5709. }
  5710. }
  5711. return object;
  5712. }
  5713. /**
  5714. * Copies own symbols of `source` to `object`.
  5715. *
  5716. * @private
  5717. * @param {Object} source The object to copy symbols from.
  5718. * @param {Object} [object={}] The object to copy symbols to.
  5719. * @returns {Object} Returns `object`.
  5720. */
  5721. function copySymbols(source, object) {
  5722. return copyObject(source, getSymbols(source), object);
  5723. }
  5724. /**
  5725. * Copies own and inherited symbols of `source` to `object`.
  5726. *
  5727. * @private
  5728. * @param {Object} source The object to copy symbols from.
  5729. * @param {Object} [object={}] The object to copy symbols to.
  5730. * @returns {Object} Returns `object`.
  5731. */
  5732. function copySymbolsIn(source, object) {
  5733. return copyObject(source, getSymbolsIn(source), object);
  5734. }
  5735. /**
  5736. * Creates a function like `_.groupBy`.
  5737. *
  5738. * @private
  5739. * @param {Function} setter The function to set accumulator values.
  5740. * @param {Function} [initializer] The accumulator object initializer.
  5741. * @returns {Function} Returns the new aggregator function.
  5742. */
  5743. function createAggregator(setter, initializer) {
  5744. return function(collection, iteratee) {
  5745. var func = isArray(collection) ? arrayAggregator : baseAggregator,
  5746. accumulator = initializer ? initializer() : {};
  5747. return func(collection, setter, getIteratee(iteratee, 2), accumulator);
  5748. };
  5749. }
  5750. /**
  5751. * Creates a function like `_.assign`.
  5752. *
  5753. * @private
  5754. * @param {Function} assigner The function to assign values.
  5755. * @returns {Function} Returns the new assigner function.
  5756. */
  5757. function createAssigner(assigner) {
  5758. return baseRest(function(object, sources) {
  5759. var index = -1,
  5760. length = sources.length,
  5761. customizer = length > 1 ? sources[length - 1] : undefined,
  5762. guard = length > 2 ? sources[2] : undefined;
  5763. customizer = (assigner.length > 3 && typeof customizer == 'function')
  5764. ? (length--, customizer)
  5765. : undefined;
  5766. if (guard && isIterateeCall(sources[0], sources[1], guard)) {
  5767. customizer = length < 3 ? undefined : customizer;
  5768. length = 1;
  5769. }
  5770. object = Object(object);
  5771. while (++index < length) {
  5772. var source = sources[index];
  5773. if (source) {
  5774. assigner(object, source, index, customizer);
  5775. }
  5776. }
  5777. return object;
  5778. });
  5779. }
  5780. /**
  5781. * Creates a `baseEach` or `baseEachRight` function.
  5782. *
  5783. * @private
  5784. * @param {Function} eachFunc The function to iterate over a collection.
  5785. * @param {boolean} [fromRight] Specify iterating from right to left.
  5786. * @returns {Function} Returns the new base function.
  5787. */
  5788. function createBaseEach(eachFunc, fromRight) {
  5789. return function(collection, iteratee) {
  5790. if (collection == null) {
  5791. return collection;
  5792. }
  5793. if (!isArrayLike(collection)) {
  5794. return eachFunc(collection, iteratee);
  5795. }
  5796. var length = collection.length,
  5797. index = fromRight ? length : -1,
  5798. iterable = Object(collection);
  5799. while ((fromRight ? index-- : ++index < length)) {
  5800. if (iteratee(iterable[index], index, iterable) === false) {
  5801. break;
  5802. }
  5803. }
  5804. return collection;
  5805. };
  5806. }
  5807. /**
  5808. * Creates a base function for methods like `_.forIn` and `_.forOwn`.
  5809. *
  5810. * @private
  5811. * @param {boolean} [fromRight] Specify iterating from right to left.
  5812. * @returns {Function} Returns the new base function.
  5813. */
  5814. function createBaseFor(fromRight) {
  5815. return function(object, iteratee, keysFunc) {
  5816. var index = -1,
  5817. iterable = Object(object),
  5818. props = keysFunc(object),
  5819. length = props.length;
  5820. while (length--) {
  5821. var key = props[fromRight ? length : ++index];
  5822. if (iteratee(iterable[key], key, iterable) === false) {
  5823. break;
  5824. }
  5825. }
  5826. return object;
  5827. };
  5828. }
  5829. /**
  5830. * Creates a function that wraps `func` to invoke it with the optional `this`
  5831. * binding of `thisArg`.
  5832. *
  5833. * @private
  5834. * @param {Function} func The function to wrap.
  5835. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  5836. * @param {*} [thisArg] The `this` binding of `func`.
  5837. * @returns {Function} Returns the new wrapped function.
  5838. */
  5839. function createBind(func, bitmask, thisArg) {
  5840. var isBind = bitmask & WRAP_BIND_FLAG,
  5841. Ctor = createCtor(func);
  5842. function wrapper() {
  5843. var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
  5844. return fn.apply(isBind ? thisArg : this, arguments);
  5845. }
  5846. return wrapper;
  5847. }
  5848. /**
  5849. * Creates a function like `_.lowerFirst`.
  5850. *
  5851. * @private
  5852. * @param {string} methodName The name of the `String` case method to use.
  5853. * @returns {Function} Returns the new case function.
  5854. */
  5855. function createCaseFirst(methodName) {
  5856. return function(string) {
  5857. string = toString(string);
  5858. var strSymbols = hasUnicode(string)
  5859. ? stringToArray(string)
  5860. : undefined;
  5861. var chr = strSymbols
  5862. ? strSymbols[0]
  5863. : string.charAt(0);
  5864. var trailing = strSymbols
  5865. ? castSlice(strSymbols, 1).join('')
  5866. : string.slice(1);
  5867. return chr[methodName]() + trailing;
  5868. };
  5869. }
  5870. /**
  5871. * Creates a function like `_.camelCase`.
  5872. *
  5873. * @private
  5874. * @param {Function} callback The function to combine each word.
  5875. * @returns {Function} Returns the new compounder function.
  5876. */
  5877. function createCompounder(callback) {
  5878. return function(string) {
  5879. return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
  5880. };
  5881. }
  5882. /**
  5883. * Creates a function that produces an instance of `Ctor` regardless of
  5884. * whether it was invoked as part of a `new` expression or by `call` or `apply`.
  5885. *
  5886. * @private
  5887. * @param {Function} Ctor The constructor to wrap.
  5888. * @returns {Function} Returns the new wrapped function.
  5889. */
  5890. function createCtor(Ctor) {
  5891. return function() {
  5892. // Use a `switch` statement to work with class constructors. See
  5893. // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
  5894. // for more details.
  5895. var args = arguments;
  5896. switch (args.length) {
  5897. case 0: return new Ctor;
  5898. case 1: return new Ctor(args[0]);
  5899. case 2: return new Ctor(args[0], args[1]);
  5900. case 3: return new Ctor(args[0], args[1], args[2]);
  5901. case 4: return new Ctor(args[0], args[1], args[2], args[3]);
  5902. case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
  5903. case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
  5904. case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
  5905. }
  5906. var thisBinding = baseCreate(Ctor.prototype),
  5907. result = Ctor.apply(thisBinding, args);
  5908. // Mimic the constructor's `return` behavior.
  5909. // See https://es5.github.io/#x13.2.2 for more details.
  5910. return isObject(result) ? result : thisBinding;
  5911. };
  5912. }
  5913. /**
  5914. * Creates a function that wraps `func` to enable currying.
  5915. *
  5916. * @private
  5917. * @param {Function} func The function to wrap.
  5918. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  5919. * @param {number} arity The arity of `func`.
  5920. * @returns {Function} Returns the new wrapped function.
  5921. */
  5922. function createCurry(func, bitmask, arity) {
  5923. var Ctor = createCtor(func);
  5924. function wrapper() {
  5925. var length = arguments.length,
  5926. args = Array(length),
  5927. index = length,
  5928. placeholder = getHolder(wrapper);
  5929. while (index--) {
  5930. args[index] = arguments[index];
  5931. }
  5932. var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
  5933. ? []
  5934. : replaceHolders(args, placeholder);
  5935. length -= holders.length;
  5936. if (length < arity) {
  5937. return createRecurry(
  5938. func, bitmask, createHybrid, wrapper.placeholder, undefined,
  5939. args, holders, undefined, undefined, arity - length);
  5940. }
  5941. var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
  5942. return apply(fn, this, args);
  5943. }
  5944. return wrapper;
  5945. }
  5946. /**
  5947. * Creates a `_.find` or `_.findLast` function.
  5948. *
  5949. * @private
  5950. * @param {Function} findIndexFunc The function to find the collection index.
  5951. * @returns {Function} Returns the new find function.
  5952. */
  5953. function createFind(findIndexFunc) {
  5954. return function(collection, predicate, fromIndex) {
  5955. var iterable = Object(collection);
  5956. if (!isArrayLike(collection)) {
  5957. var iteratee = getIteratee(predicate, 3);
  5958. collection = keys(collection);
  5959. predicate = function(key) { return iteratee(iterable[key], key, iterable); };
  5960. }
  5961. var index = findIndexFunc(collection, predicate, fromIndex);
  5962. return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
  5963. };
  5964. }
  5965. /**
  5966. * Creates a `_.flow` or `_.flowRight` function.
  5967. *
  5968. * @private
  5969. * @param {boolean} [fromRight] Specify iterating from right to left.
  5970. * @returns {Function} Returns the new flow function.
  5971. */
  5972. function createFlow(fromRight) {
  5973. return flatRest(function(funcs) {
  5974. var length = funcs.length,
  5975. index = length,
  5976. prereq = LodashWrapper.prototype.thru;
  5977. if (fromRight) {
  5978. funcs.reverse();
  5979. }
  5980. while (index--) {
  5981. var func = funcs[index];
  5982. if (typeof func != 'function') {
  5983. throw new TypeError(FUNC_ERROR_TEXT);
  5984. }
  5985. if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
  5986. var wrapper = new LodashWrapper([], true);
  5987. }
  5988. }
  5989. index = wrapper ? index : length;
  5990. while (++index < length) {
  5991. func = funcs[index];
  5992. var funcName = getFuncName(func),
  5993. data = funcName == 'wrapper' ? getData(func) : undefined;
  5994. if (data && isLaziable(data[0]) &&
  5995. data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
  5996. !data[4].length && data[9] == 1
  5997. ) {
  5998. wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
  5999. } else {
  6000. wrapper = (func.length == 1 && isLaziable(func))
  6001. ? wrapper[funcName]()
  6002. : wrapper.thru(func);
  6003. }
  6004. }
  6005. return function() {
  6006. var args = arguments,
  6007. value = args[0];
  6008. if (wrapper && args.length == 1 && isArray(value)) {
  6009. return wrapper.plant(value).value();
  6010. }
  6011. var index = 0,
  6012. result = length ? funcs[index].apply(this, args) : value;
  6013. while (++index < length) {
  6014. result = funcs[index].call(this, result);
  6015. }
  6016. return result;
  6017. };
  6018. });
  6019. }
  6020. /**
  6021. * Creates a function that wraps `func` to invoke it with optional `this`
  6022. * binding of `thisArg`, partial application, and currying.
  6023. *
  6024. * @private
  6025. * @param {Function|string} func The function or method name to wrap.
  6026. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  6027. * @param {*} [thisArg] The `this` binding of `func`.
  6028. * @param {Array} [partials] The arguments to prepend to those provided to
  6029. * the new function.
  6030. * @param {Array} [holders] The `partials` placeholder indexes.
  6031. * @param {Array} [partialsRight] The arguments to append to those provided
  6032. * to the new function.
  6033. * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
  6034. * @param {Array} [argPos] The argument positions of the new function.
  6035. * @param {number} [ary] The arity cap of `func`.
  6036. * @param {number} [arity] The arity of `func`.
  6037. * @returns {Function} Returns the new wrapped function.
  6038. */
  6039. function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
  6040. var isAry = bitmask & WRAP_ARY_FLAG,
  6041. isBind = bitmask & WRAP_BIND_FLAG,
  6042. isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
  6043. isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
  6044. isFlip = bitmask & WRAP_FLIP_FLAG,
  6045. Ctor = isBindKey ? undefined : createCtor(func);
  6046. function wrapper() {
  6047. var length = arguments.length,
  6048. args = Array(length),
  6049. index = length;
  6050. while (index--) {
  6051. args[index] = arguments[index];
  6052. }
  6053. if (isCurried) {
  6054. var placeholder = getHolder(wrapper),
  6055. holdersCount = countHolders(args, placeholder);
  6056. }
  6057. if (partials) {
  6058. args = composeArgs(args, partials, holders, isCurried);
  6059. }
  6060. if (partialsRight) {
  6061. args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
  6062. }
  6063. length -= holdersCount;
  6064. if (isCurried && length < arity) {
  6065. var newHolders = replaceHolders(args, placeholder);
  6066. return createRecurry(
  6067. func, bitmask, createHybrid, wrapper.placeholder, thisArg,
  6068. args, newHolders, argPos, ary, arity - length
  6069. );
  6070. }
  6071. var thisBinding = isBind ? thisArg : this,
  6072. fn = isBindKey ? thisBinding[func] : func;
  6073. length = args.length;
  6074. if (argPos) {
  6075. args = reorder(args, argPos);
  6076. } else if (isFlip && length > 1) {
  6077. args.reverse();
  6078. }
  6079. if (isAry && ary < length) {
  6080. args.length = ary;
  6081. }
  6082. if (this && this !== root && this instanceof wrapper) {
  6083. fn = Ctor || createCtor(fn);
  6084. }
  6085. return fn.apply(thisBinding, args);
  6086. }
  6087. return wrapper;
  6088. }
  6089. /**
  6090. * Creates a function like `_.invertBy`.
  6091. *
  6092. * @private
  6093. * @param {Function} setter The function to set accumulator values.
  6094. * @param {Function} toIteratee The function to resolve iteratees.
  6095. * @returns {Function} Returns the new inverter function.
  6096. */
  6097. function createInverter(setter, toIteratee) {
  6098. return function(object, iteratee) {
  6099. return baseInverter(object, setter, toIteratee(iteratee), {});
  6100. };
  6101. }
  6102. /**
  6103. * Creates a function that performs a mathematical operation on two values.
  6104. *
  6105. * @private
  6106. * @param {Function} operator The function to perform the operation.
  6107. * @param {number} [defaultValue] The value used for `undefined` arguments.
  6108. * @returns {Function} Returns the new mathematical operation function.
  6109. */
  6110. function createMathOperation(operator, defaultValue) {
  6111. return function(value, other) {
  6112. var result;
  6113. if (value === undefined && other === undefined) {
  6114. return defaultValue;
  6115. }
  6116. if (value !== undefined) {
  6117. result = value;
  6118. }
  6119. if (other !== undefined) {
  6120. if (result === undefined) {
  6121. return other;
  6122. }
  6123. if (typeof value == 'string' || typeof other == 'string') {
  6124. value = baseToString(value);
  6125. other = baseToString(other);
  6126. } else {
  6127. value = baseToNumber(value);
  6128. other = baseToNumber(other);
  6129. }
  6130. result = operator(value, other);
  6131. }
  6132. return result;
  6133. };
  6134. }
  6135. /**
  6136. * Creates a function like `_.over`.
  6137. *
  6138. * @private
  6139. * @param {Function} arrayFunc The function to iterate over iteratees.
  6140. * @returns {Function} Returns the new over function.
  6141. */
  6142. function createOver(arrayFunc) {
  6143. return flatRest(function(iteratees) {
  6144. iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
  6145. return baseRest(function(args) {
  6146. var thisArg = this;
  6147. return arrayFunc(iteratees, function(iteratee) {
  6148. return apply(iteratee, thisArg, args);
  6149. });
  6150. });
  6151. });
  6152. }
  6153. /**
  6154. * Creates the padding for `string` based on `length`. The `chars` string
  6155. * is truncated if the number of characters exceeds `length`.
  6156. *
  6157. * @private
  6158. * @param {number} length The padding length.
  6159. * @param {string} [chars=' '] The string used as padding.
  6160. * @returns {string} Returns the padding for `string`.
  6161. */
  6162. function createPadding(length, chars) {
  6163. chars = chars === undefined ? ' ' : baseToString(chars);
  6164. var charsLength = chars.length;
  6165. if (charsLength < 2) {
  6166. return charsLength ? baseRepeat(chars, length) : chars;
  6167. }
  6168. var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
  6169. return hasUnicode(chars)
  6170. ? castSlice(stringToArray(result), 0, length).join('')
  6171. : result.slice(0, length);
  6172. }
  6173. /**
  6174. * Creates a function that wraps `func` to invoke it with the `this` binding
  6175. * of `thisArg` and `partials` prepended to the arguments it receives.
  6176. *
  6177. * @private
  6178. * @param {Function} func The function to wrap.
  6179. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  6180. * @param {*} thisArg The `this` binding of `func`.
  6181. * @param {Array} partials The arguments to prepend to those provided to
  6182. * the new function.
  6183. * @returns {Function} Returns the new wrapped function.
  6184. */
  6185. function createPartial(func, bitmask, thisArg, partials) {
  6186. var isBind = bitmask & WRAP_BIND_FLAG,
  6187. Ctor = createCtor(func);
  6188. function wrapper() {
  6189. var argsIndex = -1,
  6190. argsLength = arguments.length,
  6191. leftIndex = -1,
  6192. leftLength = partials.length,
  6193. args = Array(leftLength + argsLength),
  6194. fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
  6195. while (++leftIndex < leftLength) {
  6196. args[leftIndex] = partials[leftIndex];
  6197. }
  6198. while (argsLength--) {
  6199. args[leftIndex++] = arguments[++argsIndex];
  6200. }
  6201. return apply(fn, isBind ? thisArg : this, args);
  6202. }
  6203. return wrapper;
  6204. }
  6205. /**
  6206. * Creates a `_.range` or `_.rangeRight` function.
  6207. *
  6208. * @private
  6209. * @param {boolean} [fromRight] Specify iterating from right to left.
  6210. * @returns {Function} Returns the new range function.
  6211. */
  6212. function createRange(fromRight) {
  6213. return function(start, end, step) {
  6214. if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
  6215. end = step = undefined;
  6216. }
  6217. // Ensure the sign of `-0` is preserved.
  6218. start = toFinite(start);
  6219. if (end === undefined) {
  6220. end = start;
  6221. start = 0;
  6222. } else {
  6223. end = toFinite(end);
  6224. }
  6225. step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
  6226. return baseRange(start, end, step, fromRight);
  6227. };
  6228. }
  6229. /**
  6230. * Creates a function that performs a relational operation on two values.
  6231. *
  6232. * @private
  6233. * @param {Function} operator The function to perform the operation.
  6234. * @returns {Function} Returns the new relational operation function.
  6235. */
  6236. function createRelationalOperation(operator) {
  6237. return function(value, other) {
  6238. if (!(typeof value == 'string' && typeof other == 'string')) {
  6239. value = toNumber(value);
  6240. other = toNumber(other);
  6241. }
  6242. return operator(value, other);
  6243. };
  6244. }
  6245. /**
  6246. * Creates a function that wraps `func` to continue currying.
  6247. *
  6248. * @private
  6249. * @param {Function} func The function to wrap.
  6250. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  6251. * @param {Function} wrapFunc The function to create the `func` wrapper.
  6252. * @param {*} placeholder The placeholder value.
  6253. * @param {*} [thisArg] The `this` binding of `func`.
  6254. * @param {Array} [partials] The arguments to prepend to those provided to
  6255. * the new function.
  6256. * @param {Array} [holders] The `partials` placeholder indexes.
  6257. * @param {Array} [argPos] The argument positions of the new function.
  6258. * @param {number} [ary] The arity cap of `func`.
  6259. * @param {number} [arity] The arity of `func`.
  6260. * @returns {Function} Returns the new wrapped function.
  6261. */
  6262. function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
  6263. var isCurry = bitmask & WRAP_CURRY_FLAG,
  6264. newHolders = isCurry ? holders : undefined,
  6265. newHoldersRight = isCurry ? undefined : holders,
  6266. newPartials = isCurry ? partials : undefined,
  6267. newPartialsRight = isCurry ? undefined : partials;
  6268. bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
  6269. bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
  6270. if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
  6271. bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
  6272. }
  6273. var newData = [
  6274. func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
  6275. newHoldersRight, argPos, ary, arity
  6276. ];
  6277. var result = wrapFunc.apply(undefined, newData);
  6278. if (isLaziable(func)) {
  6279. setData(result, newData);
  6280. }
  6281. result.placeholder = placeholder;
  6282. return setWrapToString(result, func, bitmask);
  6283. }
  6284. /**
  6285. * Creates a function like `_.round`.
  6286. *
  6287. * @private
  6288. * @param {string} methodName The name of the `Math` method to use when rounding.
  6289. * @returns {Function} Returns the new round function.
  6290. */
  6291. function createRound(methodName) {
  6292. var func = Math[methodName];
  6293. return function(number, precision) {
  6294. number = toNumber(number);
  6295. precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
  6296. if (precision && nativeIsFinite(number)) {
  6297. // Shift with exponential notation to avoid floating-point issues.
  6298. // See [MDN](https://mdn.io/round#Examples) for more details.
  6299. var pair = (toString(number) + 'e').split('e'),
  6300. value = func(pair[0] + 'e' + (+pair[1] + precision));
  6301. pair = (toString(value) + 'e').split('e');
  6302. return +(pair[0] + 'e' + (+pair[1] - precision));
  6303. }
  6304. return func(number);
  6305. };
  6306. }
  6307. /**
  6308. * Creates a set object of `values`.
  6309. *
  6310. * @private
  6311. * @param {Array} values The values to add to the set.
  6312. * @returns {Object} Returns the new set.
  6313. */
  6314. var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
  6315. return new Set(values);
  6316. };
  6317. /**
  6318. * Creates a `_.toPairs` or `_.toPairsIn` function.
  6319. *
  6320. * @private
  6321. * @param {Function} keysFunc The function to get the keys of a given object.
  6322. * @returns {Function} Returns the new pairs function.
  6323. */
  6324. function createToPairs(keysFunc) {
  6325. return function(object) {
  6326. var tag = getTag(object);
  6327. if (tag == mapTag) {
  6328. return mapToArray(object);
  6329. }
  6330. if (tag == setTag) {
  6331. return setToPairs(object);
  6332. }
  6333. return baseToPairs(object, keysFunc(object));
  6334. };
  6335. }
  6336. /**
  6337. * Creates a function that either curries or invokes `func` with optional
  6338. * `this` binding and partially applied arguments.
  6339. *
  6340. * @private
  6341. * @param {Function|string} func The function or method name to wrap.
  6342. * @param {number} bitmask The bitmask flags.
  6343. * 1 - `_.bind`
  6344. * 2 - `_.bindKey`
  6345. * 4 - `_.curry` or `_.curryRight` of a bound function
  6346. * 8 - `_.curry`
  6347. * 16 - `_.curryRight`
  6348. * 32 - `_.partial`
  6349. * 64 - `_.partialRight`
  6350. * 128 - `_.rearg`
  6351. * 256 - `_.ary`
  6352. * 512 - `_.flip`
  6353. * @param {*} [thisArg] The `this` binding of `func`.
  6354. * @param {Array} [partials] The arguments to be partially applied.
  6355. * @param {Array} [holders] The `partials` placeholder indexes.
  6356. * @param {Array} [argPos] The argument positions of the new function.
  6357. * @param {number} [ary] The arity cap of `func`.
  6358. * @param {number} [arity] The arity of `func`.
  6359. * @returns {Function} Returns the new wrapped function.
  6360. */
  6361. function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
  6362. var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
  6363. if (!isBindKey && typeof func != 'function') {
  6364. throw new TypeError(FUNC_ERROR_TEXT);
  6365. }
  6366. var length = partials ? partials.length : 0;
  6367. if (!length) {
  6368. bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
  6369. partials = holders = undefined;
  6370. }
  6371. ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
  6372. arity = arity === undefined ? arity : toInteger(arity);
  6373. length -= holders ? holders.length : 0;
  6374. if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
  6375. var partialsRight = partials,
  6376. holdersRight = holders;
  6377. partials = holders = undefined;
  6378. }
  6379. var data = isBindKey ? undefined : getData(func);
  6380. var newData = [
  6381. func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
  6382. argPos, ary, arity
  6383. ];
  6384. if (data) {
  6385. mergeData(newData, data);
  6386. }
  6387. func = newData[0];
  6388. bitmask = newData[1];
  6389. thisArg = newData[2];
  6390. partials = newData[3];
  6391. holders = newData[4];
  6392. arity = newData[9] = newData[9] === undefined
  6393. ? (isBindKey ? 0 : func.length)
  6394. : nativeMax(newData[9] - length, 0);
  6395. if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
  6396. bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
  6397. }
  6398. if (!bitmask || bitmask == WRAP_BIND_FLAG) {
  6399. var result = createBind(func, bitmask, thisArg);
  6400. } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
  6401. result = createCurry(func, bitmask, arity);
  6402. } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
  6403. result = createPartial(func, bitmask, thisArg, partials);
  6404. } else {
  6405. result = createHybrid.apply(undefined, newData);
  6406. }
  6407. var setter = data ? baseSetData : setData;
  6408. return setWrapToString(setter(result, newData), func, bitmask);
  6409. }
  6410. /**
  6411. * Used by `_.defaults` to customize its `_.assignIn` use to assign properties
  6412. * of source objects to the destination object for all destination properties
  6413. * that resolve to `undefined`.
  6414. *
  6415. * @private
  6416. * @param {*} objValue The destination value.
  6417. * @param {*} srcValue The source value.
  6418. * @param {string} key The key of the property to assign.
  6419. * @param {Object} object The parent object of `objValue`.
  6420. * @returns {*} Returns the value to assign.
  6421. */
  6422. function customDefaultsAssignIn(objValue, srcValue, key, object) {
  6423. if (objValue === undefined ||
  6424. (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
  6425. return srcValue;
  6426. }
  6427. return objValue;
  6428. }
  6429. /**
  6430. * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
  6431. * objects into destination objects that are passed thru.
  6432. *
  6433. * @private
  6434. * @param {*} objValue The destination value.
  6435. * @param {*} srcValue The source value.
  6436. * @param {string} key The key of the property to merge.
  6437. * @param {Object} object The parent object of `objValue`.
  6438. * @param {Object} source The parent object of `srcValue`.
  6439. * @param {Object} [stack] Tracks traversed source values and their merged
  6440. * counterparts.
  6441. * @returns {*} Returns the value to assign.
  6442. */
  6443. function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
  6444. if (isObject(objValue) && isObject(srcValue)) {
  6445. // Recursively merge objects and arrays (susceptible to call stack limits).
  6446. stack.set(srcValue, objValue);
  6447. baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
  6448. stack['delete'](srcValue);
  6449. }
  6450. return objValue;
  6451. }
  6452. /**
  6453. * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
  6454. * objects.
  6455. *
  6456. * @private
  6457. * @param {*} value The value to inspect.
  6458. * @param {string} key The key of the property to inspect.
  6459. * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
  6460. */
  6461. function customOmitClone(value) {
  6462. return isPlainObject(value) ? undefined : value;
  6463. }
  6464. /**
  6465. * A specialized version of `baseIsEqualDeep` for arrays with support for
  6466. * partial deep comparisons.
  6467. *
  6468. * @private
  6469. * @param {Array} array The array to compare.
  6470. * @param {Array} other The other array to compare.
  6471. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  6472. * @param {Function} customizer The function to customize comparisons.
  6473. * @param {Function} equalFunc The function to determine equivalents of values.
  6474. * @param {Object} stack Tracks traversed `array` and `other` objects.
  6475. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
  6476. */
  6477. function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
  6478. var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
  6479. arrLength = array.length,
  6480. othLength = other.length;
  6481. if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
  6482. return false;
  6483. }
  6484. // Check that cyclic values are equal.
  6485. var arrStacked = stack.get(array);
  6486. var othStacked = stack.get(other);
  6487. if (arrStacked && othStacked) {
  6488. return arrStacked == other && othStacked == array;
  6489. }
  6490. var index = -1,
  6491. result = true,
  6492. seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
  6493. stack.set(array, other);
  6494. stack.set(other, array);
  6495. // Ignore non-index properties.
  6496. while (++index < arrLength) {
  6497. var arrValue = array[index],
  6498. othValue = other[index];
  6499. if (customizer) {
  6500. var compared = isPartial
  6501. ? customizer(othValue, arrValue, index, other, array, stack)
  6502. : customizer(arrValue, othValue, index, array, other, stack);
  6503. }
  6504. if (compared !== undefined) {
  6505. if (compared) {
  6506. continue;
  6507. }
  6508. result = false;
  6509. break;
  6510. }
  6511. // Recursively compare arrays (susceptible to call stack limits).
  6512. if (seen) {
  6513. if (!arraySome(other, function(othValue, othIndex) {
  6514. if (!cacheHas(seen, othIndex) &&
  6515. (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
  6516. return seen.push(othIndex);
  6517. }
  6518. })) {
  6519. result = false;
  6520. break;
  6521. }
  6522. } else if (!(
  6523. arrValue === othValue ||
  6524. equalFunc(arrValue, othValue, bitmask, customizer, stack)
  6525. )) {
  6526. result = false;
  6527. break;
  6528. }
  6529. }
  6530. stack['delete'](array);
  6531. stack['delete'](other);
  6532. return result;
  6533. }
  6534. /**
  6535. * A specialized version of `baseIsEqualDeep` for comparing objects of
  6536. * the same `toStringTag`.
  6537. *
  6538. * **Note:** This function only supports comparing values with tags of
  6539. * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
  6540. *
  6541. * @private
  6542. * @param {Object} object The object to compare.
  6543. * @param {Object} other The other object to compare.
  6544. * @param {string} tag The `toStringTag` of the objects to compare.
  6545. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  6546. * @param {Function} customizer The function to customize comparisons.
  6547. * @param {Function} equalFunc The function to determine equivalents of values.
  6548. * @param {Object} stack Tracks traversed `object` and `other` objects.
  6549. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  6550. */
  6551. function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
  6552. switch (tag) {
  6553. case dataViewTag:
  6554. if ((object.byteLength != other.byteLength) ||
  6555. (object.byteOffset != other.byteOffset)) {
  6556. return false;
  6557. }
  6558. object = object.buffer;
  6559. other = other.buffer;
  6560. case arrayBufferTag:
  6561. if ((object.byteLength != other.byteLength) ||
  6562. !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
  6563. return false;
  6564. }
  6565. return true;
  6566. case boolTag:
  6567. case dateTag:
  6568. case numberTag:
  6569. // Coerce booleans to `1` or `0` and dates to milliseconds.
  6570. // Invalid dates are coerced to `NaN`.
  6571. return eq(+object, +other);
  6572. case errorTag:
  6573. return object.name == other.name && object.message == other.message;
  6574. case regexpTag:
  6575. case stringTag:
  6576. // Coerce regexes to strings and treat strings, primitives and objects,
  6577. // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
  6578. // for more details.
  6579. return object == (other + '');
  6580. case mapTag:
  6581. var convert = mapToArray;
  6582. case setTag:
  6583. var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
  6584. convert || (convert = setToArray);
  6585. if (object.size != other.size && !isPartial) {
  6586. return false;
  6587. }
  6588. // Assume cyclic values are equal.
  6589. var stacked = stack.get(object);
  6590. if (stacked) {
  6591. return stacked == other;
  6592. }
  6593. bitmask |= COMPARE_UNORDERED_FLAG;
  6594. // Recursively compare objects (susceptible to call stack limits).
  6595. stack.set(object, other);
  6596. var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
  6597. stack['delete'](object);
  6598. return result;
  6599. case symbolTag:
  6600. if (symbolValueOf) {
  6601. return symbolValueOf.call(object) == symbolValueOf.call(other);
  6602. }
  6603. }
  6604. return false;
  6605. }
  6606. /**
  6607. * A specialized version of `baseIsEqualDeep` for objects with support for
  6608. * partial deep comparisons.
  6609. *
  6610. * @private
  6611. * @param {Object} object The object to compare.
  6612. * @param {Object} other The other object to compare.
  6613. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  6614. * @param {Function} customizer The function to customize comparisons.
  6615. * @param {Function} equalFunc The function to determine equivalents of values.
  6616. * @param {Object} stack Tracks traversed `object` and `other` objects.
  6617. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  6618. */
  6619. function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
  6620. var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
  6621. objProps = getAllKeys(object),
  6622. objLength = objProps.length,
  6623. othProps = getAllKeys(other),
  6624. othLength = othProps.length;
  6625. if (objLength != othLength && !isPartial) {
  6626. return false;
  6627. }
  6628. var index = objLength;
  6629. while (index--) {
  6630. var key = objProps[index];
  6631. if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
  6632. return false;
  6633. }
  6634. }
  6635. // Check that cyclic values are equal.
  6636. var objStacked = stack.get(object);
  6637. var othStacked = stack.get(other);
  6638. if (objStacked && othStacked) {
  6639. return objStacked == other && othStacked == object;
  6640. }
  6641. var result = true;
  6642. stack.set(object, other);
  6643. stack.set(other, object);
  6644. var skipCtor = isPartial;
  6645. while (++index < objLength) {
  6646. key = objProps[index];
  6647. var objValue = object[key],
  6648. othValue = other[key];
  6649. if (customizer) {
  6650. var compared = isPartial
  6651. ? customizer(othValue, objValue, key, other, object, stack)
  6652. : customizer(objValue, othValue, key, object, other, stack);
  6653. }
  6654. // Recursively compare objects (susceptible to call stack limits).
  6655. if (!(compared === undefined
  6656. ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
  6657. : compared
  6658. )) {
  6659. result = false;
  6660. break;
  6661. }
  6662. skipCtor || (skipCtor = key == 'constructor');
  6663. }
  6664. if (result && !skipCtor) {
  6665. var objCtor = object.constructor,
  6666. othCtor = other.constructor;
  6667. // Non `Object` object instances with different constructors are not equal.
  6668. if (objCtor != othCtor &&
  6669. ('constructor' in object && 'constructor' in other) &&
  6670. !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
  6671. typeof othCtor == 'function' && othCtor instanceof othCtor)) {
  6672. result = false;
  6673. }
  6674. }
  6675. stack['delete'](object);
  6676. stack['delete'](other);
  6677. return result;
  6678. }
  6679. /**
  6680. * A specialized version of `baseRest` which flattens the rest array.
  6681. *
  6682. * @private
  6683. * @param {Function} func The function to apply a rest parameter to.
  6684. * @returns {Function} Returns the new function.
  6685. */
  6686. function flatRest(func) {
  6687. return setToString(overRest(func, undefined, flatten), func + '');
  6688. }
  6689. /**
  6690. * Creates an array of own enumerable property names and symbols of `object`.
  6691. *
  6692. * @private
  6693. * @param {Object} object The object to query.
  6694. * @returns {Array} Returns the array of property names and symbols.
  6695. */
  6696. function getAllKeys(object) {
  6697. return baseGetAllKeys(object, keys, getSymbols);
  6698. }
  6699. /**
  6700. * Creates an array of own and inherited enumerable property names and
  6701. * symbols of `object`.
  6702. *
  6703. * @private
  6704. * @param {Object} object The object to query.
  6705. * @returns {Array} Returns the array of property names and symbols.
  6706. */
  6707. function getAllKeysIn(object) {
  6708. return baseGetAllKeys(object, keysIn, getSymbolsIn);
  6709. }
  6710. /**
  6711. * Gets metadata for `func`.
  6712. *
  6713. * @private
  6714. * @param {Function} func The function to query.
  6715. * @returns {*} Returns the metadata for `func`.
  6716. */
  6717. var getData = !metaMap ? noop : function(func) {
  6718. return metaMap.get(func);
  6719. };
  6720. /**
  6721. * Gets the name of `func`.
  6722. *
  6723. * @private
  6724. * @param {Function} func The function to query.
  6725. * @returns {string} Returns the function name.
  6726. */
  6727. function getFuncName(func) {
  6728. var result = (func.name + ''),
  6729. array = realNames[result],
  6730. length = hasOwnProperty.call(realNames, result) ? array.length : 0;
  6731. while (length--) {
  6732. var data = array[length],
  6733. otherFunc = data.func;
  6734. if (otherFunc == null || otherFunc == func) {
  6735. return data.name;
  6736. }
  6737. }
  6738. return result;
  6739. }
  6740. /**
  6741. * Gets the argument placeholder value for `func`.
  6742. *
  6743. * @private
  6744. * @param {Function} func The function to inspect.
  6745. * @returns {*} Returns the placeholder value.
  6746. */
  6747. function getHolder(func) {
  6748. var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
  6749. return object.placeholder;
  6750. }
  6751. /**
  6752. * Gets the appropriate "iteratee" function. If `_.iteratee` is customized,
  6753. * this function returns the custom method, otherwise it returns `baseIteratee`.
  6754. * If arguments are provided, the chosen function is invoked with them and
  6755. * its result is returned.
  6756. *
  6757. * @private
  6758. * @param {*} [value] The value to convert to an iteratee.
  6759. * @param {number} [arity] The arity of the created iteratee.
  6760. * @returns {Function} Returns the chosen function or its result.
  6761. */
  6762. function getIteratee() {
  6763. var result = lodash.iteratee || iteratee;
  6764. result = result === iteratee ? baseIteratee : result;
  6765. return arguments.length ? result(arguments[0], arguments[1]) : result;
  6766. }
  6767. /**
  6768. * Gets the data for `map`.
  6769. *
  6770. * @private
  6771. * @param {Object} map The map to query.
  6772. * @param {string} key The reference key.
  6773. * @returns {*} Returns the map data.
  6774. */
  6775. function getMapData(map, key) {
  6776. var data = map.__data__;
  6777. return isKeyable(key)
  6778. ? data[typeof key == 'string' ? 'string' : 'hash']
  6779. : data.map;
  6780. }
  6781. /**
  6782. * Gets the property names, values, and compare flags of `object`.
  6783. *
  6784. * @private
  6785. * @param {Object} object The object to query.
  6786. * @returns {Array} Returns the match data of `object`.
  6787. */
  6788. function getMatchData(object) {
  6789. var result = keys(object),
  6790. length = result.length;
  6791. while (length--) {
  6792. var key = result[length],
  6793. value = object[key];
  6794. result[length] = [key, value, isStrictComparable(value)];
  6795. }
  6796. return result;
  6797. }
  6798. /**
  6799. * Gets the native function at `key` of `object`.
  6800. *
  6801. * @private
  6802. * @param {Object} object The object to query.
  6803. * @param {string} key The key of the method to get.
  6804. * @returns {*} Returns the function if it's native, else `undefined`.
  6805. */
  6806. function getNative(object, key) {
  6807. var value = getValue(object, key);
  6808. return baseIsNative(value) ? value : undefined;
  6809. }
  6810. /**
  6811. * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
  6812. *
  6813. * @private
  6814. * @param {*} value The value to query.
  6815. * @returns {string} Returns the raw `toStringTag`.
  6816. */
  6817. function getRawTag(value) {
  6818. var isOwn = hasOwnProperty.call(value, symToStringTag),
  6819. tag = value[symToStringTag];
  6820. try {
  6821. value[symToStringTag] = undefined;
  6822. var unmasked = true;
  6823. } catch (e) {}
  6824. var result = nativeObjectToString.call(value);
  6825. if (unmasked) {
  6826. if (isOwn) {
  6827. value[symToStringTag] = tag;
  6828. } else {
  6829. delete value[symToStringTag];
  6830. }
  6831. }
  6832. return result;
  6833. }
  6834. /**
  6835. * Creates an array of the own enumerable symbols of `object`.
  6836. *
  6837. * @private
  6838. * @param {Object} object The object to query.
  6839. * @returns {Array} Returns the array of symbols.
  6840. */
  6841. var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
  6842. if (object == null) {
  6843. return [];
  6844. }
  6845. object = Object(object);
  6846. return arrayFilter(nativeGetSymbols(object), function(symbol) {
  6847. return propertyIsEnumerable.call(object, symbol);
  6848. });
  6849. };
  6850. /**
  6851. * Creates an array of the own and inherited enumerable symbols of `object`.
  6852. *
  6853. * @private
  6854. * @param {Object} object The object to query.
  6855. * @returns {Array} Returns the array of symbols.
  6856. */
  6857. var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
  6858. var result = [];
  6859. while (object) {
  6860. arrayPush(result, getSymbols(object));
  6861. object = getPrototype(object);
  6862. }
  6863. return result;
  6864. };
  6865. /**
  6866. * Gets the `toStringTag` of `value`.
  6867. *
  6868. * @private
  6869. * @param {*} value The value to query.
  6870. * @returns {string} Returns the `toStringTag`.
  6871. */
  6872. var getTag = baseGetTag;
  6873. // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
  6874. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
  6875. (Map && getTag(new Map) != mapTag) ||
  6876. (Promise && getTag(Promise.resolve()) != promiseTag) ||
  6877. (Set && getTag(new Set) != setTag) ||
  6878. (WeakMap && getTag(new WeakMap) != weakMapTag)) {
  6879. getTag = function(value) {
  6880. var result = baseGetTag(value),
  6881. Ctor = result == objectTag ? value.constructor : undefined,
  6882. ctorString = Ctor ? toSource(Ctor) : '';
  6883. if (ctorString) {
  6884. switch (ctorString) {
  6885. case dataViewCtorString: return dataViewTag;
  6886. case mapCtorString: return mapTag;
  6887. case promiseCtorString: return promiseTag;
  6888. case setCtorString: return setTag;
  6889. case weakMapCtorString: return weakMapTag;
  6890. }
  6891. }
  6892. return result;
  6893. };
  6894. }
  6895. /**
  6896. * Gets the view, applying any `transforms` to the `start` and `end` positions.
  6897. *
  6898. * @private
  6899. * @param {number} start The start of the view.
  6900. * @param {number} end The end of the view.
  6901. * @param {Array} transforms The transformations to apply to the view.
  6902. * @returns {Object} Returns an object containing the `start` and `end`
  6903. * positions of the view.
  6904. */
  6905. function getView(start, end, transforms) {
  6906. var index = -1,
  6907. length = transforms.length;
  6908. while (++index < length) {
  6909. var data = transforms[index],
  6910. size = data.size;
  6911. switch (data.type) {
  6912. case 'drop': start += size; break;
  6913. case 'dropRight': end -= size; break;
  6914. case 'take': end = nativeMin(end, start + size); break;
  6915. case 'takeRight': start = nativeMax(start, end - size); break;
  6916. }
  6917. }
  6918. return { 'start': start, 'end': end };
  6919. }
  6920. /**
  6921. * Extracts wrapper details from the `source` body comment.
  6922. *
  6923. * @private
  6924. * @param {string} source The source to inspect.
  6925. * @returns {Array} Returns the wrapper details.
  6926. */
  6927. function getWrapDetails(source) {
  6928. var match = source.match(reWrapDetails);
  6929. return match ? match[1].split(reSplitDetails) : [];
  6930. }
  6931. /**
  6932. * Checks if `path` exists on `object`.
  6933. *
  6934. * @private
  6935. * @param {Object} object The object to query.
  6936. * @param {Array|string} path The path to check.
  6937. * @param {Function} hasFunc The function to check properties.
  6938. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  6939. */
  6940. function hasPath(object, path, hasFunc) {
  6941. path = castPath(path, object);
  6942. var index = -1,
  6943. length = path.length,
  6944. result = false;
  6945. while (++index < length) {
  6946. var key = toKey(path[index]);
  6947. if (!(result = object != null && hasFunc(object, key))) {
  6948. break;
  6949. }
  6950. object = object[key];
  6951. }
  6952. if (result || ++index != length) {
  6953. return result;
  6954. }
  6955. length = object == null ? 0 : object.length;
  6956. return !!length && isLength(length) && isIndex(key, length) &&
  6957. (isArray(object) || isArguments(object));
  6958. }
  6959. /**
  6960. * Initializes an array clone.
  6961. *
  6962. * @private
  6963. * @param {Array} array The array to clone.
  6964. * @returns {Array} Returns the initialized clone.
  6965. */
  6966. function initCloneArray(array) {
  6967. var length = array.length,
  6968. result = new array.constructor(length);
  6969. // Add properties assigned by `RegExp#exec`.
  6970. if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
  6971. result.index = array.index;
  6972. result.input = array.input;
  6973. }
  6974. return result;
  6975. }
  6976. /**
  6977. * Initializes an object clone.
  6978. *
  6979. * @private
  6980. * @param {Object} object The object to clone.
  6981. * @returns {Object} Returns the initialized clone.
  6982. */
  6983. function initCloneObject(object) {
  6984. return (typeof object.constructor == 'function' && !isPrototype(object))
  6985. ? baseCreate(getPrototype(object))
  6986. : {};
  6987. }
  6988. /**
  6989. * Initializes an object clone based on its `toStringTag`.
  6990. *
  6991. * **Note:** This function only supports cloning values with tags of
  6992. * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
  6993. *
  6994. * @private
  6995. * @param {Object} object The object to clone.
  6996. * @param {string} tag The `toStringTag` of the object to clone.
  6997. * @param {boolean} [isDeep] Specify a deep clone.
  6998. * @returns {Object} Returns the initialized clone.
  6999. */
  7000. function initCloneByTag(object, tag, isDeep) {
  7001. var Ctor = object.constructor;
  7002. switch (tag) {
  7003. case arrayBufferTag:
  7004. return cloneArrayBuffer(object);
  7005. case boolTag:
  7006. case dateTag:
  7007. return new Ctor(+object);
  7008. case dataViewTag:
  7009. return cloneDataView(object, isDeep);
  7010. case float32Tag: case float64Tag:
  7011. case int8Tag: case int16Tag: case int32Tag:
  7012. case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
  7013. return cloneTypedArray(object, isDeep);
  7014. case mapTag:
  7015. return new Ctor;
  7016. case numberTag:
  7017. case stringTag:
  7018. return new Ctor(object);
  7019. case regexpTag:
  7020. return cloneRegExp(object);
  7021. case setTag:
  7022. return new Ctor;
  7023. case symbolTag:
  7024. return cloneSymbol(object);
  7025. }
  7026. }
  7027. /**
  7028. * Inserts wrapper `details` in a comment at the top of the `source` body.
  7029. *
  7030. * @private
  7031. * @param {string} source The source to modify.
  7032. * @returns {Array} details The details to insert.
  7033. * @returns {string} Returns the modified source.
  7034. */
  7035. function insertWrapDetails(source, details) {
  7036. var length = details.length;
  7037. if (!length) {
  7038. return source;
  7039. }
  7040. var lastIndex = length - 1;
  7041. details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
  7042. details = details.join(length > 2 ? ', ' : ' ');
  7043. return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
  7044. }
  7045. /**
  7046. * Checks if `value` is a flattenable `arguments` object or array.
  7047. *
  7048. * @private
  7049. * @param {*} value The value to check.
  7050. * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
  7051. */
  7052. function isFlattenable(value) {
  7053. return isArray(value) || isArguments(value) ||
  7054. !!(spreadableSymbol && value && value[spreadableSymbol]);
  7055. }
  7056. /**
  7057. * Checks if `value` is a valid array-like index.
  7058. *
  7059. * @private
  7060. * @param {*} value The value to check.
  7061. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
  7062. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
  7063. */
  7064. function isIndex(value, length) {
  7065. var type = typeof value;
  7066. length = length == null ? MAX_SAFE_INTEGER : length;
  7067. return !!length &&
  7068. (type == 'number' ||
  7069. (type != 'symbol' && reIsUint.test(value))) &&
  7070. (value > -1 && value % 1 == 0 && value < length);
  7071. }
  7072. /**
  7073. * Checks if the given arguments are from an iteratee call.
  7074. *
  7075. * @private
  7076. * @param {*} value The potential iteratee value argument.
  7077. * @param {*} index The potential iteratee index or key argument.
  7078. * @param {*} object The potential iteratee object argument.
  7079. * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
  7080. * else `false`.
  7081. */
  7082. function isIterateeCall(value, index, object) {
  7083. if (!isObject(object)) {
  7084. return false;
  7085. }
  7086. var type = typeof index;
  7087. if (type == 'number'
  7088. ? (isArrayLike(object) && isIndex(index, object.length))
  7089. : (type == 'string' && index in object)
  7090. ) {
  7091. return eq(object[index], value);
  7092. }
  7093. return false;
  7094. }
  7095. /**
  7096. * Checks if `value` is a property name and not a property path.
  7097. *
  7098. * @private
  7099. * @param {*} value The value to check.
  7100. * @param {Object} [object] The object to query keys on.
  7101. * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
  7102. */
  7103. function isKey(value, object) {
  7104. if (isArray(value)) {
  7105. return false;
  7106. }
  7107. var type = typeof value;
  7108. if (type == 'number' || type == 'symbol' || type == 'boolean' ||
  7109. value == null || isSymbol(value)) {
  7110. return true;
  7111. }
  7112. return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
  7113. (object != null && value in Object(object));
  7114. }
  7115. /**
  7116. * Checks if `value` is suitable for use as unique object key.
  7117. *
  7118. * @private
  7119. * @param {*} value The value to check.
  7120. * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
  7121. */
  7122. function isKeyable(value) {
  7123. var type = typeof value;
  7124. return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
  7125. ? (value !== '__proto__')
  7126. : (value === null);
  7127. }
  7128. /**
  7129. * Checks if `func` has a lazy counterpart.
  7130. *
  7131. * @private
  7132. * @param {Function} func The function to check.
  7133. * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
  7134. * else `false`.
  7135. */
  7136. function isLaziable(func) {
  7137. var funcName = getFuncName(func),
  7138. other = lodash[funcName];
  7139. if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
  7140. return false;
  7141. }
  7142. if (func === other) {
  7143. return true;
  7144. }
  7145. var data = getData(other);
  7146. return !!data && func === data[0];
  7147. }
  7148. /**
  7149. * Checks if `func` has its source masked.
  7150. *
  7151. * @private
  7152. * @param {Function} func The function to check.
  7153. * @returns {boolean} Returns `true` if `func` is masked, else `false`.
  7154. */
  7155. function isMasked(func) {
  7156. return !!maskSrcKey && (maskSrcKey in func);
  7157. }
  7158. /**
  7159. * Checks if `func` is capable of being masked.
  7160. *
  7161. * @private
  7162. * @param {*} value The value to check.
  7163. * @returns {boolean} Returns `true` if `func` is maskable, else `false`.
  7164. */
  7165. var isMaskable = coreJsData ? isFunction : stubFalse;
  7166. /**
  7167. * Checks if `value` is likely a prototype object.
  7168. *
  7169. * @private
  7170. * @param {*} value The value to check.
  7171. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
  7172. */
  7173. function isPrototype(value) {
  7174. var Ctor = value && value.constructor,
  7175. proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
  7176. return value === proto;
  7177. }
  7178. /**
  7179. * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
  7180. *
  7181. * @private
  7182. * @param {*} value The value to check.
  7183. * @returns {boolean} Returns `true` if `value` if suitable for strict
  7184. * equality comparisons, else `false`.
  7185. */
  7186. function isStrictComparable(value) {
  7187. return value === value && !isObject(value);
  7188. }
  7189. /**
  7190. * A specialized version of `matchesProperty` for source values suitable
  7191. * for strict equality comparisons, i.e. `===`.
  7192. *
  7193. * @private
  7194. * @param {string} key The key of the property to get.
  7195. * @param {*} srcValue The value to match.
  7196. * @returns {Function} Returns the new spec function.
  7197. */
  7198. function matchesStrictComparable(key, srcValue) {
  7199. return function(object) {
  7200. if (object == null) {
  7201. return false;
  7202. }
  7203. return object[key] === srcValue &&
  7204. (srcValue !== undefined || (key in Object(object)));
  7205. };
  7206. }
  7207. /**
  7208. * A specialized version of `_.memoize` which clears the memoized function's
  7209. * cache when it exceeds `MAX_MEMOIZE_SIZE`.
  7210. *
  7211. * @private
  7212. * @param {Function} func The function to have its output memoized.
  7213. * @returns {Function} Returns the new memoized function.
  7214. */
  7215. function memoizeCapped(func) {
  7216. var result = memoize(func, function(key) {
  7217. if (cache.size === MAX_MEMOIZE_SIZE) {
  7218. cache.clear();
  7219. }
  7220. return key;
  7221. });
  7222. var cache = result.cache;
  7223. return result;
  7224. }
  7225. /**
  7226. * Merges the function metadata of `source` into `data`.
  7227. *
  7228. * Merging metadata reduces the number of wrappers used to invoke a function.
  7229. * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
  7230. * may be applied regardless of execution order. Methods like `_.ary` and
  7231. * `_.rearg` modify function arguments, making the order in which they are
  7232. * executed important, preventing the merging of metadata. However, we make
  7233. * an exception for a safe combined case where curried functions have `_.ary`
  7234. * and or `_.rearg` applied.
  7235. *
  7236. * @private
  7237. * @param {Array} data The destination metadata.
  7238. * @param {Array} source The source metadata.
  7239. * @returns {Array} Returns `data`.
  7240. */
  7241. function mergeData(data, source) {
  7242. var bitmask = data[1],
  7243. srcBitmask = source[1],
  7244. newBitmask = bitmask | srcBitmask,
  7245. isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
  7246. var isCombo =
  7247. ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
  7248. ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
  7249. ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));
  7250. // Exit early if metadata can't be merged.
  7251. if (!(isCommon || isCombo)) {
  7252. return data;
  7253. }
  7254. // Use source `thisArg` if available.
  7255. if (srcBitmask & WRAP_BIND_FLAG) {
  7256. data[2] = source[2];
  7257. // Set when currying a bound function.
  7258. newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
  7259. }
  7260. // Compose partial arguments.
  7261. var value = source[3];
  7262. if (value) {
  7263. var partials = data[3];
  7264. data[3] = partials ? composeArgs(partials, value, source[4]) : value;
  7265. data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
  7266. }
  7267. // Compose partial right arguments.
  7268. value = source[5];
  7269. if (value) {
  7270. partials = data[5];
  7271. data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
  7272. data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
  7273. }
  7274. // Use source `argPos` if available.
  7275. value = source[7];
  7276. if (value) {
  7277. data[7] = value;
  7278. }
  7279. // Use source `ary` if it's smaller.
  7280. if (srcBitmask & WRAP_ARY_FLAG) {
  7281. data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
  7282. }
  7283. // Use source `arity` if one is not provided.
  7284. if (data[9] == null) {
  7285. data[9] = source[9];
  7286. }
  7287. // Use source `func` and merge bitmasks.
  7288. data[0] = source[0];
  7289. data[1] = newBitmask;
  7290. return data;
  7291. }
  7292. /**
  7293. * This function is like
  7294. * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  7295. * except that it includes inherited enumerable properties.
  7296. *
  7297. * @private
  7298. * @param {Object} object The object to query.
  7299. * @returns {Array} Returns the array of property names.
  7300. */
  7301. function nativeKeysIn(object) {
  7302. var result = [];
  7303. if (object != null) {
  7304. for (var key in Object(object)) {
  7305. result.push(key);
  7306. }
  7307. }
  7308. return result;
  7309. }
  7310. /**
  7311. * Converts `value` to a string using `Object.prototype.toString`.
  7312. *
  7313. * @private
  7314. * @param {*} value The value to convert.
  7315. * @returns {string} Returns the converted string.
  7316. */
  7317. function objectToString(value) {
  7318. return nativeObjectToString.call(value);
  7319. }
  7320. /**
  7321. * A specialized version of `baseRest` which transforms the rest array.
  7322. *
  7323. * @private
  7324. * @param {Function} func The function to apply a rest parameter to.
  7325. * @param {number} [start=func.length-1] The start position of the rest parameter.
  7326. * @param {Function} transform The rest array transform.
  7327. * @returns {Function} Returns the new function.
  7328. */
  7329. function overRest(func, start, transform) {
  7330. start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
  7331. return function() {
  7332. var args = arguments,
  7333. index = -1,
  7334. length = nativeMax(args.length - start, 0),
  7335. array = Array(length);
  7336. while (++index < length) {
  7337. array[index] = args[start + index];
  7338. }
  7339. index = -1;
  7340. var otherArgs = Array(start + 1);
  7341. while (++index < start) {
  7342. otherArgs[index] = args[index];
  7343. }
  7344. otherArgs[start] = transform(array);
  7345. return apply(func, this, otherArgs);
  7346. };
  7347. }
  7348. /**
  7349. * Gets the parent value at `path` of `object`.
  7350. *
  7351. * @private
  7352. * @param {Object} object The object to query.
  7353. * @param {Array} path The path to get the parent value of.
  7354. * @returns {*} Returns the parent value.
  7355. */
  7356. function parent(object, path) {
  7357. return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
  7358. }
  7359. /**
  7360. * Reorder `array` according to the specified indexes where the element at
  7361. * the first index is assigned as the first element, the element at
  7362. * the second index is assigned as the second element, and so on.
  7363. *
  7364. * @private
  7365. * @param {Array} array The array to reorder.
  7366. * @param {Array} indexes The arranged array indexes.
  7367. * @returns {Array} Returns `array`.
  7368. */
  7369. function reorder(array, indexes) {
  7370. var arrLength = array.length,
  7371. length = nativeMin(indexes.length, arrLength),
  7372. oldArray = copyArray(array);
  7373. while (length--) {
  7374. var index = indexes[length];
  7375. array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
  7376. }
  7377. return array;
  7378. }
  7379. /**
  7380. * Gets the value at `key`, unless `key` is "__proto__" or "constructor".
  7381. *
  7382. * @private
  7383. * @param {Object} object The object to query.
  7384. * @param {string} key The key of the property to get.
  7385. * @returns {*} Returns the property value.
  7386. */
  7387. function safeGet(object, key) {
  7388. if (key === 'constructor' && typeof object[key] === 'function') {
  7389. return;
  7390. }
  7391. if (key == '__proto__') {
  7392. return;
  7393. }
  7394. return object[key];
  7395. }
  7396. /**
  7397. * Sets metadata for `func`.
  7398. *
  7399. * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
  7400. * period of time, it will trip its breaker and transition to an identity
  7401. * function to avoid garbage collection pauses in V8. See
  7402. * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
  7403. * for more details.
  7404. *
  7405. * @private
  7406. * @param {Function} func The function to associate metadata with.
  7407. * @param {*} data The metadata.
  7408. * @returns {Function} Returns `func`.
  7409. */
  7410. var setData = shortOut(baseSetData);
  7411. /**
  7412. * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).
  7413. *
  7414. * @private
  7415. * @param {Function} func The function to delay.
  7416. * @param {number} wait The number of milliseconds to delay invocation.
  7417. * @returns {number|Object} Returns the timer id or timeout object.
  7418. */
  7419. var setTimeout = ctxSetTimeout || function(func, wait) {
  7420. return root.setTimeout(func, wait);
  7421. };
  7422. /**
  7423. * Sets the `toString` method of `func` to return `string`.
  7424. *
  7425. * @private
  7426. * @param {Function} func The function to modify.
  7427. * @param {Function} string The `toString` result.
  7428. * @returns {Function} Returns `func`.
  7429. */
  7430. var setToString = shortOut(baseSetToString);
  7431. /**
  7432. * Sets the `toString` method of `wrapper` to mimic the source of `reference`
  7433. * with wrapper details in a comment at the top of the source body.
  7434. *
  7435. * @private
  7436. * @param {Function} wrapper The function to modify.
  7437. * @param {Function} reference The reference function.
  7438. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  7439. * @returns {Function} Returns `wrapper`.
  7440. */
  7441. function setWrapToString(wrapper, reference, bitmask) {
  7442. var source = (reference + '');
  7443. return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
  7444. }
  7445. /**
  7446. * Creates a function that'll short out and invoke `identity` instead
  7447. * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
  7448. * milliseconds.
  7449. *
  7450. * @private
  7451. * @param {Function} func The function to restrict.
  7452. * @returns {Function} Returns the new shortable function.
  7453. */
  7454. function shortOut(func) {
  7455. var count = 0,
  7456. lastCalled = 0;
  7457. return function() {
  7458. var stamp = nativeNow(),
  7459. remaining = HOT_SPAN - (stamp - lastCalled);
  7460. lastCalled = stamp;
  7461. if (remaining > 0) {
  7462. if (++count >= HOT_COUNT) {
  7463. return arguments[0];
  7464. }
  7465. } else {
  7466. count = 0;
  7467. }
  7468. return func.apply(undefined, arguments);
  7469. };
  7470. }
  7471. /**
  7472. * A specialized version of `_.shuffle` which mutates and sets the size of `array`.
  7473. *
  7474. * @private
  7475. * @param {Array} array The array to shuffle.
  7476. * @param {number} [size=array.length] The size of `array`.
  7477. * @returns {Array} Returns `array`.
  7478. */
  7479. function shuffleSelf(array, size) {
  7480. var index = -1,
  7481. length = array.length,
  7482. lastIndex = length - 1;
  7483. size = size === undefined ? length : size;
  7484. while (++index < size) {
  7485. var rand = baseRandom(index, lastIndex),
  7486. value = array[rand];
  7487. array[rand] = array[index];
  7488. array[index] = value;
  7489. }
  7490. array.length = size;
  7491. return array;
  7492. }
  7493. /**
  7494. * Converts `string` to a property path array.
  7495. *
  7496. * @private
  7497. * @param {string} string The string to convert.
  7498. * @returns {Array} Returns the property path array.
  7499. */
  7500. var stringToPath = memoizeCapped(function(string) {
  7501. var result = [];
  7502. if (string.charCodeAt(0) === 46 /* . */) {
  7503. result.push('');
  7504. }
  7505. string.replace(rePropName, function(match, number, quote, subString) {
  7506. result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
  7507. });
  7508. return result;
  7509. });
  7510. /**
  7511. * Converts `value` to a string key if it's not a string or symbol.
  7512. *
  7513. * @private
  7514. * @param {*} value The value to inspect.
  7515. * @returns {string|symbol} Returns the key.
  7516. */
  7517. function toKey(value) {
  7518. if (typeof value == 'string' || isSymbol(value)) {
  7519. return value;
  7520. }
  7521. var result = (value + '');
  7522. return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
  7523. }
  7524. /**
  7525. * Converts `func` to its source code.
  7526. *
  7527. * @private
  7528. * @param {Function} func The function to convert.
  7529. * @returns {string} Returns the source code.
  7530. */
  7531. function toSource(func) {
  7532. if (func != null) {
  7533. try {
  7534. return funcToString.call(func);
  7535. } catch (e) {}
  7536. try {
  7537. return (func + '');
  7538. } catch (e) {}
  7539. }
  7540. return '';
  7541. }
  7542. /**
  7543. * Updates wrapper `details` based on `bitmask` flags.
  7544. *
  7545. * @private
  7546. * @returns {Array} details The details to modify.
  7547. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  7548. * @returns {Array} Returns `details`.
  7549. */
  7550. function updateWrapDetails(details, bitmask) {
  7551. arrayEach(wrapFlags, function(pair) {
  7552. var value = '_.' + pair[0];
  7553. if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
  7554. details.push(value);
  7555. }
  7556. });
  7557. return details.sort();
  7558. }
  7559. /**
  7560. * Creates a clone of `wrapper`.
  7561. *
  7562. * @private
  7563. * @param {Object} wrapper The wrapper to clone.
  7564. * @returns {Object} Returns the cloned wrapper.
  7565. */
  7566. function wrapperClone(wrapper) {
  7567. if (wrapper instanceof LazyWrapper) {
  7568. return wrapper.clone();
  7569. }
  7570. var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
  7571. result.__actions__ = copyArray(wrapper.__actions__);
  7572. result.__index__ = wrapper.__index__;
  7573. result.__values__ = wrapper.__values__;
  7574. return result;
  7575. }
  7576. /*------------------------------------------------------------------------*/
  7577. /**
  7578. * Creates an array of elements split into groups the length of `size`.
  7579. * If `array` can't be split evenly, the final chunk will be the remaining
  7580. * elements.
  7581. *
  7582. * @static
  7583. * @memberOf _
  7584. * @since 3.0.0
  7585. * @category Array
  7586. * @param {Array} array The array to process.
  7587. * @param {number} [size=1] The length of each chunk
  7588. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  7589. * @returns {Array} Returns the new array of chunks.
  7590. * @example
  7591. *
  7592. * _.chunk(['a', 'b', 'c', 'd'], 2);
  7593. * // => [['a', 'b'], ['c', 'd']]
  7594. *
  7595. * _.chunk(['a', 'b', 'c', 'd'], 3);
  7596. * // => [['a', 'b', 'c'], ['d']]
  7597. */
  7598. function chunk(array, size, guard) {
  7599. if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
  7600. size = 1;
  7601. } else {
  7602. size = nativeMax(toInteger(size), 0);
  7603. }
  7604. var length = array == null ? 0 : array.length;
  7605. if (!length || size < 1) {
  7606. return [];
  7607. }
  7608. var index = 0,
  7609. resIndex = 0,
  7610. result = Array(nativeCeil(length / size));
  7611. while (index < length) {
  7612. result[resIndex++] = baseSlice(array, index, (index += size));
  7613. }
  7614. return result;
  7615. }
  7616. /**
  7617. * Creates an array with all falsey values removed. The values `false`, `null`,
  7618. * `0`, `""`, `undefined`, and `NaN` are falsey.
  7619. *
  7620. * @static
  7621. * @memberOf _
  7622. * @since 0.1.0
  7623. * @category Array
  7624. * @param {Array} array The array to compact.
  7625. * @returns {Array} Returns the new array of filtered values.
  7626. * @example
  7627. *
  7628. * _.compact([0, 1, false, 2, '', 3]);
  7629. * // => [1, 2, 3]
  7630. */
  7631. function compact(array) {
  7632. var index = -1,
  7633. length = array == null ? 0 : array.length,
  7634. resIndex = 0,
  7635. result = [];
  7636. while (++index < length) {
  7637. var value = array[index];
  7638. if (value) {
  7639. result[resIndex++] = value;
  7640. }
  7641. }
  7642. return result;
  7643. }
  7644. /**
  7645. * Creates a new array concatenating `array` with any additional arrays
  7646. * and/or values.
  7647. *
  7648. * @static
  7649. * @memberOf _
  7650. * @since 4.0.0
  7651. * @category Array
  7652. * @param {Array} array The array to concatenate.
  7653. * @param {...*} [values] The values to concatenate.
  7654. * @returns {Array} Returns the new concatenated array.
  7655. * @example
  7656. *
  7657. * var array = [1];
  7658. * var other = _.concat(array, 2, [3], [[4]]);
  7659. *
  7660. * console.log(other);
  7661. * // => [1, 2, 3, [4]]
  7662. *
  7663. * console.log(array);
  7664. * // => [1]
  7665. */
  7666. function concat() {
  7667. var length = arguments.length;
  7668. if (!length) {
  7669. return [];
  7670. }
  7671. var args = Array(length - 1),
  7672. array = arguments[0],
  7673. index = length;
  7674. while (index--) {
  7675. args[index - 1] = arguments[index];
  7676. }
  7677. return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
  7678. }
  7679. /**
  7680. * Creates an array of `array` values not included in the other given arrays
  7681. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  7682. * for equality comparisons. The order and references of result values are
  7683. * determined by the first array.
  7684. *
  7685. * **Note:** Unlike `_.pullAll`, this method returns a new array.
  7686. *
  7687. * @static
  7688. * @memberOf _
  7689. * @since 0.1.0
  7690. * @category Array
  7691. * @param {Array} array The array to inspect.
  7692. * @param {...Array} [values] The values to exclude.
  7693. * @returns {Array} Returns the new array of filtered values.
  7694. * @see _.without, _.xor
  7695. * @example
  7696. *
  7697. * _.difference([2, 1], [2, 3]);
  7698. * // => [1]
  7699. */
  7700. var difference = baseRest(function(array, values) {
  7701. return isArrayLikeObject(array)
  7702. ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
  7703. : [];
  7704. });
  7705. /**
  7706. * This method is like `_.difference` except that it accepts `iteratee` which
  7707. * is invoked for each element of `array` and `values` to generate the criterion
  7708. * by which they're compared. The order and references of result values are
  7709. * determined by the first array. The iteratee is invoked with one argument:
  7710. * (value).
  7711. *
  7712. * **Note:** Unlike `_.pullAllBy`, this method returns a new array.
  7713. *
  7714. * @static
  7715. * @memberOf _
  7716. * @since 4.0.0
  7717. * @category Array
  7718. * @param {Array} array The array to inspect.
  7719. * @param {...Array} [values] The values to exclude.
  7720. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  7721. * @returns {Array} Returns the new array of filtered values.
  7722. * @example
  7723. *
  7724. * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);
  7725. * // => [1.2]
  7726. *
  7727. * // The `_.property` iteratee shorthand.
  7728. * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
  7729. * // => [{ 'x': 2 }]
  7730. */
  7731. var differenceBy = baseRest(function(array, values) {
  7732. var iteratee = last(values);
  7733. if (isArrayLikeObject(iteratee)) {
  7734. iteratee = undefined;
  7735. }
  7736. return isArrayLikeObject(array)
  7737. ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))
  7738. : [];
  7739. });
  7740. /**
  7741. * This method is like `_.difference` except that it accepts `comparator`
  7742. * which is invoked to compare elements of `array` to `values`. The order and
  7743. * references of result values are determined by the first array. The comparator
  7744. * is invoked with two arguments: (arrVal, othVal).
  7745. *
  7746. * **Note:** Unlike `_.pullAllWith`, this method returns a new array.
  7747. *
  7748. * @static
  7749. * @memberOf _
  7750. * @since 4.0.0
  7751. * @category Array
  7752. * @param {Array} array The array to inspect.
  7753. * @param {...Array} [values] The values to exclude.
  7754. * @param {Function} [comparator] The comparator invoked per element.
  7755. * @returns {Array} Returns the new array of filtered values.
  7756. * @example
  7757. *
  7758. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  7759. *
  7760. * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
  7761. * // => [{ 'x': 2, 'y': 1 }]
  7762. */
  7763. var differenceWith = baseRest(function(array, values) {
  7764. var comparator = last(values);
  7765. if (isArrayLikeObject(comparator)) {
  7766. comparator = undefined;
  7767. }
  7768. return isArrayLikeObject(array)
  7769. ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
  7770. : [];
  7771. });
  7772. /**
  7773. * Creates a slice of `array` with `n` elements dropped from the beginning.
  7774. *
  7775. * @static
  7776. * @memberOf _
  7777. * @since 0.5.0
  7778. * @category Array
  7779. * @param {Array} array The array to query.
  7780. * @param {number} [n=1] The number of elements to drop.
  7781. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  7782. * @returns {Array} Returns the slice of `array`.
  7783. * @example
  7784. *
  7785. * _.drop([1, 2, 3]);
  7786. * // => [2, 3]
  7787. *
  7788. * _.drop([1, 2, 3], 2);
  7789. * // => [3]
  7790. *
  7791. * _.drop([1, 2, 3], 5);
  7792. * // => []
  7793. *
  7794. * _.drop([1, 2, 3], 0);
  7795. * // => [1, 2, 3]
  7796. */
  7797. function drop(array, n, guard) {
  7798. var length = array == null ? 0 : array.length;
  7799. if (!length) {
  7800. return [];
  7801. }
  7802. n = (guard || n === undefined) ? 1 : toInteger(n);
  7803. return baseSlice(array, n < 0 ? 0 : n, length);
  7804. }
  7805. /**
  7806. * Creates a slice of `array` with `n` elements dropped from the end.
  7807. *
  7808. * @static
  7809. * @memberOf _
  7810. * @since 3.0.0
  7811. * @category Array
  7812. * @param {Array} array The array to query.
  7813. * @param {number} [n=1] The number of elements to drop.
  7814. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  7815. * @returns {Array} Returns the slice of `array`.
  7816. * @example
  7817. *
  7818. * _.dropRight([1, 2, 3]);
  7819. * // => [1, 2]
  7820. *
  7821. * _.dropRight([1, 2, 3], 2);
  7822. * // => [1]
  7823. *
  7824. * _.dropRight([1, 2, 3], 5);
  7825. * // => []
  7826. *
  7827. * _.dropRight([1, 2, 3], 0);
  7828. * // => [1, 2, 3]
  7829. */
  7830. function dropRight(array, n, guard) {
  7831. var length = array == null ? 0 : array.length;
  7832. if (!length) {
  7833. return [];
  7834. }
  7835. n = (guard || n === undefined) ? 1 : toInteger(n);
  7836. n = length - n;
  7837. return baseSlice(array, 0, n < 0 ? 0 : n);
  7838. }
  7839. /**
  7840. * Creates a slice of `array` excluding elements dropped from the end.
  7841. * Elements are dropped until `predicate` returns falsey. The predicate is
  7842. * invoked with three arguments: (value, index, array).
  7843. *
  7844. * @static
  7845. * @memberOf _
  7846. * @since 3.0.0
  7847. * @category Array
  7848. * @param {Array} array The array to query.
  7849. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  7850. * @returns {Array} Returns the slice of `array`.
  7851. * @example
  7852. *
  7853. * var users = [
  7854. * { 'user': 'barney', 'active': true },
  7855. * { 'user': 'fred', 'active': false },
  7856. * { 'user': 'pebbles', 'active': false }
  7857. * ];
  7858. *
  7859. * _.dropRightWhile(users, function(o) { return !o.active; });
  7860. * // => objects for ['barney']
  7861. *
  7862. * // The `_.matches` iteratee shorthand.
  7863. * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
  7864. * // => objects for ['barney', 'fred']
  7865. *
  7866. * // The `_.matchesProperty` iteratee shorthand.
  7867. * _.dropRightWhile(users, ['active', false]);
  7868. * // => objects for ['barney']
  7869. *
  7870. * // The `_.property` iteratee shorthand.
  7871. * _.dropRightWhile(users, 'active');
  7872. * // => objects for ['barney', 'fred', 'pebbles']
  7873. */
  7874. function dropRightWhile(array, predicate) {
  7875. return (array && array.length)
  7876. ? baseWhile(array, getIteratee(predicate, 3), true, true)
  7877. : [];
  7878. }
  7879. /**
  7880. * Creates a slice of `array` excluding elements dropped from the beginning.
  7881. * Elements are dropped until `predicate` returns falsey. The predicate is
  7882. * invoked with three arguments: (value, index, array).
  7883. *
  7884. * @static
  7885. * @memberOf _
  7886. * @since 3.0.0
  7887. * @category Array
  7888. * @param {Array} array The array to query.
  7889. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  7890. * @returns {Array} Returns the slice of `array`.
  7891. * @example
  7892. *
  7893. * var users = [
  7894. * { 'user': 'barney', 'active': false },
  7895. * { 'user': 'fred', 'active': false },
  7896. * { 'user': 'pebbles', 'active': true }
  7897. * ];
  7898. *
  7899. * _.dropWhile(users, function(o) { return !o.active; });
  7900. * // => objects for ['pebbles']
  7901. *
  7902. * // The `_.matches` iteratee shorthand.
  7903. * _.dropWhile(users, { 'user': 'barney', 'active': false });
  7904. * // => objects for ['fred', 'pebbles']
  7905. *
  7906. * // The `_.matchesProperty` iteratee shorthand.
  7907. * _.dropWhile(users, ['active', false]);
  7908. * // => objects for ['pebbles']
  7909. *
  7910. * // The `_.property` iteratee shorthand.
  7911. * _.dropWhile(users, 'active');
  7912. * // => objects for ['barney', 'fred', 'pebbles']
  7913. */
  7914. function dropWhile(array, predicate) {
  7915. return (array && array.length)
  7916. ? baseWhile(array, getIteratee(predicate, 3), true)
  7917. : [];
  7918. }
  7919. /**
  7920. * Fills elements of `array` with `value` from `start` up to, but not
  7921. * including, `end`.
  7922. *
  7923. * **Note:** This method mutates `array`.
  7924. *
  7925. * @static
  7926. * @memberOf _
  7927. * @since 3.2.0
  7928. * @category Array
  7929. * @param {Array} array The array to fill.
  7930. * @param {*} value The value to fill `array` with.
  7931. * @param {number} [start=0] The start position.
  7932. * @param {number} [end=array.length] The end position.
  7933. * @returns {Array} Returns `array`.
  7934. * @example
  7935. *
  7936. * var array = [1, 2, 3];
  7937. *
  7938. * _.fill(array, 'a');
  7939. * console.log(array);
  7940. * // => ['a', 'a', 'a']
  7941. *
  7942. * _.fill(Array(3), 2);
  7943. * // => [2, 2, 2]
  7944. *
  7945. * _.fill([4, 6, 8, 10], '*', 1, 3);
  7946. * // => [4, '*', '*', 10]
  7947. */
  7948. function fill(array, value, start, end) {
  7949. var length = array == null ? 0 : array.length;
  7950. if (!length) {
  7951. return [];
  7952. }
  7953. if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
  7954. start = 0;
  7955. end = length;
  7956. }
  7957. return baseFill(array, value, start, end);
  7958. }
  7959. /**
  7960. * This method is like `_.find` except that it returns the index of the first
  7961. * element `predicate` returns truthy for instead of the element itself.
  7962. *
  7963. * @static
  7964. * @memberOf _
  7965. * @since 1.1.0
  7966. * @category Array
  7967. * @param {Array} array The array to inspect.
  7968. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  7969. * @param {number} [fromIndex=0] The index to search from.
  7970. * @returns {number} Returns the index of the found element, else `-1`.
  7971. * @example
  7972. *
  7973. * var users = [
  7974. * { 'user': 'barney', 'active': false },
  7975. * { 'user': 'fred', 'active': false },
  7976. * { 'user': 'pebbles', 'active': true }
  7977. * ];
  7978. *
  7979. * _.findIndex(users, function(o) { return o.user == 'barney'; });
  7980. * // => 0
  7981. *
  7982. * // The `_.matches` iteratee shorthand.
  7983. * _.findIndex(users, { 'user': 'fred', 'active': false });
  7984. * // => 1
  7985. *
  7986. * // The `_.matchesProperty` iteratee shorthand.
  7987. * _.findIndex(users, ['active', false]);
  7988. * // => 0
  7989. *
  7990. * // The `_.property` iteratee shorthand.
  7991. * _.findIndex(users, 'active');
  7992. * // => 2
  7993. */
  7994. function findIndex(array, predicate, fromIndex) {
  7995. var length = array == null ? 0 : array.length;
  7996. if (!length) {
  7997. return -1;
  7998. }
  7999. var index = fromIndex == null ? 0 : toInteger(fromIndex);
  8000. if (index < 0) {
  8001. index = nativeMax(length + index, 0);
  8002. }
  8003. return baseFindIndex(array, getIteratee(predicate, 3), index);
  8004. }
  8005. /**
  8006. * This method is like `_.findIndex` except that it iterates over elements
  8007. * of `collection` from right to left.
  8008. *
  8009. * @static
  8010. * @memberOf _
  8011. * @since 2.0.0
  8012. * @category Array
  8013. * @param {Array} array The array to inspect.
  8014. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  8015. * @param {number} [fromIndex=array.length-1] The index to search from.
  8016. * @returns {number} Returns the index of the found element, else `-1`.
  8017. * @example
  8018. *
  8019. * var users = [
  8020. * { 'user': 'barney', 'active': true },
  8021. * { 'user': 'fred', 'active': false },
  8022. * { 'user': 'pebbles', 'active': false }
  8023. * ];
  8024. *
  8025. * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
  8026. * // => 2
  8027. *
  8028. * // The `_.matches` iteratee shorthand.
  8029. * _.findLastIndex(users, { 'user': 'barney', 'active': true });
  8030. * // => 0
  8031. *
  8032. * // The `_.matchesProperty` iteratee shorthand.
  8033. * _.findLastIndex(users, ['active', false]);
  8034. * // => 2
  8035. *
  8036. * // The `_.property` iteratee shorthand.
  8037. * _.findLastIndex(users, 'active');
  8038. * // => 0
  8039. */
  8040. function findLastIndex(array, predicate, fromIndex) {
  8041. var length = array == null ? 0 : array.length;
  8042. if (!length) {
  8043. return -1;
  8044. }
  8045. var index = length - 1;
  8046. if (fromIndex !== undefined) {
  8047. index = toInteger(fromIndex);
  8048. index = fromIndex < 0
  8049. ? nativeMax(length + index, 0)
  8050. : nativeMin(index, length - 1);
  8051. }
  8052. return baseFindIndex(array, getIteratee(predicate, 3), index, true);
  8053. }
  8054. /**
  8055. * Flattens `array` a single level deep.
  8056. *
  8057. * @static
  8058. * @memberOf _
  8059. * @since 0.1.0
  8060. * @category Array
  8061. * @param {Array} array The array to flatten.
  8062. * @returns {Array} Returns the new flattened array.
  8063. * @example
  8064. *
  8065. * _.flatten([1, [2, [3, [4]], 5]]);
  8066. * // => [1, 2, [3, [4]], 5]
  8067. */
  8068. function flatten(array) {
  8069. var length = array == null ? 0 : array.length;
  8070. return length ? baseFlatten(array, 1) : [];
  8071. }
  8072. /**
  8073. * Recursively flattens `array`.
  8074. *
  8075. * @static
  8076. * @memberOf _
  8077. * @since 3.0.0
  8078. * @category Array
  8079. * @param {Array} array The array to flatten.
  8080. * @returns {Array} Returns the new flattened array.
  8081. * @example
  8082. *
  8083. * _.flattenDeep([1, [2, [3, [4]], 5]]);
  8084. * // => [1, 2, 3, 4, 5]
  8085. */
  8086. function flattenDeep(array) {
  8087. var length = array == null ? 0 : array.length;
  8088. return length ? baseFlatten(array, INFINITY) : [];
  8089. }
  8090. /**
  8091. * Recursively flatten `array` up to `depth` times.
  8092. *
  8093. * @static
  8094. * @memberOf _
  8095. * @since 4.4.0
  8096. * @category Array
  8097. * @param {Array} array The array to flatten.
  8098. * @param {number} [depth=1] The maximum recursion depth.
  8099. * @returns {Array} Returns the new flattened array.
  8100. * @example
  8101. *
  8102. * var array = [1, [2, [3, [4]], 5]];
  8103. *
  8104. * _.flattenDepth(array, 1);
  8105. * // => [1, 2, [3, [4]], 5]
  8106. *
  8107. * _.flattenDepth(array, 2);
  8108. * // => [1, 2, 3, [4], 5]
  8109. */
  8110. function flattenDepth(array, depth) {
  8111. var length = array == null ? 0 : array.length;
  8112. if (!length) {
  8113. return [];
  8114. }
  8115. depth = depth === undefined ? 1 : toInteger(depth);
  8116. return baseFlatten(array, depth);
  8117. }
  8118. /**
  8119. * The inverse of `_.toPairs`; this method returns an object composed
  8120. * from key-value `pairs`.
  8121. *
  8122. * @static
  8123. * @memberOf _
  8124. * @since 4.0.0
  8125. * @category Array
  8126. * @param {Array} pairs The key-value pairs.
  8127. * @returns {Object} Returns the new object.
  8128. * @example
  8129. *
  8130. * _.fromPairs([['a', 1], ['b', 2]]);
  8131. * // => { 'a': 1, 'b': 2 }
  8132. */
  8133. function fromPairs(pairs) {
  8134. var index = -1,
  8135. length = pairs == null ? 0 : pairs.length,
  8136. result = {};
  8137. while (++index < length) {
  8138. var pair = pairs[index];
  8139. result[pair[0]] = pair[1];
  8140. }
  8141. return result;
  8142. }
  8143. /**
  8144. * Gets the first element of `array`.
  8145. *
  8146. * @static
  8147. * @memberOf _
  8148. * @since 0.1.0
  8149. * @alias first
  8150. * @category Array
  8151. * @param {Array} array The array to query.
  8152. * @returns {*} Returns the first element of `array`.
  8153. * @example
  8154. *
  8155. * _.head([1, 2, 3]);
  8156. * // => 1
  8157. *
  8158. * _.head([]);
  8159. * // => undefined
  8160. */
  8161. function head(array) {
  8162. return (array && array.length) ? array[0] : undefined;
  8163. }
  8164. /**
  8165. * Gets the index at which the first occurrence of `value` is found in `array`
  8166. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  8167. * for equality comparisons. If `fromIndex` is negative, it's used as the
  8168. * offset from the end of `array`.
  8169. *
  8170. * @static
  8171. * @memberOf _
  8172. * @since 0.1.0
  8173. * @category Array
  8174. * @param {Array} array The array to inspect.
  8175. * @param {*} value The value to search for.
  8176. * @param {number} [fromIndex=0] The index to search from.
  8177. * @returns {number} Returns the index of the matched value, else `-1`.
  8178. * @example
  8179. *
  8180. * _.indexOf([1, 2, 1, 2], 2);
  8181. * // => 1
  8182. *
  8183. * // Search from the `fromIndex`.
  8184. * _.indexOf([1, 2, 1, 2], 2, 2);
  8185. * // => 3
  8186. */
  8187. function indexOf(array, value, fromIndex) {
  8188. var length = array == null ? 0 : array.length;
  8189. if (!length) {
  8190. return -1;
  8191. }
  8192. var index = fromIndex == null ? 0 : toInteger(fromIndex);
  8193. if (index < 0) {
  8194. index = nativeMax(length + index, 0);
  8195. }
  8196. return baseIndexOf(array, value, index);
  8197. }
  8198. /**
  8199. * Gets all but the last element of `array`.
  8200. *
  8201. * @static
  8202. * @memberOf _
  8203. * @since 0.1.0
  8204. * @category Array
  8205. * @param {Array} array The array to query.
  8206. * @returns {Array} Returns the slice of `array`.
  8207. * @example
  8208. *
  8209. * _.initial([1, 2, 3]);
  8210. * // => [1, 2]
  8211. */
  8212. function initial(array) {
  8213. var length = array == null ? 0 : array.length;
  8214. return length ? baseSlice(array, 0, -1) : [];
  8215. }
  8216. /**
  8217. * Creates an array of unique values that are included in all given arrays
  8218. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  8219. * for equality comparisons. The order and references of result values are
  8220. * determined by the first array.
  8221. *
  8222. * @static
  8223. * @memberOf _
  8224. * @since 0.1.0
  8225. * @category Array
  8226. * @param {...Array} [arrays] The arrays to inspect.
  8227. * @returns {Array} Returns the new array of intersecting values.
  8228. * @example
  8229. *
  8230. * _.intersection([2, 1], [2, 3]);
  8231. * // => [2]
  8232. */
  8233. var intersection = baseRest(function(arrays) {
  8234. var mapped = arrayMap(arrays, castArrayLikeObject);
  8235. return (mapped.length && mapped[0] === arrays[0])
  8236. ? baseIntersection(mapped)
  8237. : [];
  8238. });
  8239. /**
  8240. * This method is like `_.intersection` except that it accepts `iteratee`
  8241. * which is invoked for each element of each `arrays` to generate the criterion
  8242. * by which they're compared. The order and references of result values are
  8243. * determined by the first array. The iteratee is invoked with one argument:
  8244. * (value).
  8245. *
  8246. * @static
  8247. * @memberOf _
  8248. * @since 4.0.0
  8249. * @category Array
  8250. * @param {...Array} [arrays] The arrays to inspect.
  8251. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  8252. * @returns {Array} Returns the new array of intersecting values.
  8253. * @example
  8254. *
  8255. * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
  8256. * // => [2.1]
  8257. *
  8258. * // The `_.property` iteratee shorthand.
  8259. * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
  8260. * // => [{ 'x': 1 }]
  8261. */
  8262. var intersectionBy = baseRest(function(arrays) {
  8263. var iteratee = last(arrays),
  8264. mapped = arrayMap(arrays, castArrayLikeObject);
  8265. if (iteratee === last(mapped)) {
  8266. iteratee = undefined;
  8267. } else {
  8268. mapped.pop();
  8269. }
  8270. return (mapped.length && mapped[0] === arrays[0])
  8271. ? baseIntersection(mapped, getIteratee(iteratee, 2))
  8272. : [];
  8273. });
  8274. /**
  8275. * This method is like `_.intersection` except that it accepts `comparator`
  8276. * which is invoked to compare elements of `arrays`. The order and references
  8277. * of result values are determined by the first array. The comparator is
  8278. * invoked with two arguments: (arrVal, othVal).
  8279. *
  8280. * @static
  8281. * @memberOf _
  8282. * @since 4.0.0
  8283. * @category Array
  8284. * @param {...Array} [arrays] The arrays to inspect.
  8285. * @param {Function} [comparator] The comparator invoked per element.
  8286. * @returns {Array} Returns the new array of intersecting values.
  8287. * @example
  8288. *
  8289. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  8290. * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
  8291. *
  8292. * _.intersectionWith(objects, others, _.isEqual);
  8293. * // => [{ 'x': 1, 'y': 2 }]
  8294. */
  8295. var intersectionWith = baseRest(function(arrays) {
  8296. var comparator = last(arrays),
  8297. mapped = arrayMap(arrays, castArrayLikeObject);
  8298. comparator = typeof comparator == 'function' ? comparator : undefined;
  8299. if (comparator) {
  8300. mapped.pop();
  8301. }
  8302. return (mapped.length && mapped[0] === arrays[0])
  8303. ? baseIntersection(mapped, undefined, comparator)
  8304. : [];
  8305. });
  8306. /**
  8307. * Converts all elements in `array` into a string separated by `separator`.
  8308. *
  8309. * @static
  8310. * @memberOf _
  8311. * @since 4.0.0
  8312. * @category Array
  8313. * @param {Array} array The array to convert.
  8314. * @param {string} [separator=','] The element separator.
  8315. * @returns {string} Returns the joined string.
  8316. * @example
  8317. *
  8318. * _.join(['a', 'b', 'c'], '~');
  8319. * // => 'a~b~c'
  8320. */
  8321. function join(array, separator) {
  8322. return array == null ? '' : nativeJoin.call(array, separator);
  8323. }
  8324. /**
  8325. * Gets the last element of `array`.
  8326. *
  8327. * @static
  8328. * @memberOf _
  8329. * @since 0.1.0
  8330. * @category Array
  8331. * @param {Array} array The array to query.
  8332. * @returns {*} Returns the last element of `array`.
  8333. * @example
  8334. *
  8335. * _.last([1, 2, 3]);
  8336. * // => 3
  8337. */
  8338. function last(array) {
  8339. var length = array == null ? 0 : array.length;
  8340. return length ? array[length - 1] : undefined;
  8341. }
  8342. /**
  8343. * This method is like `_.indexOf` except that it iterates over elements of
  8344. * `array` from right to left.
  8345. *
  8346. * @static
  8347. * @memberOf _
  8348. * @since 0.1.0
  8349. * @category Array
  8350. * @param {Array} array The array to inspect.
  8351. * @param {*} value The value to search for.
  8352. * @param {number} [fromIndex=array.length-1] The index to search from.
  8353. * @returns {number} Returns the index of the matched value, else `-1`.
  8354. * @example
  8355. *
  8356. * _.lastIndexOf([1, 2, 1, 2], 2);
  8357. * // => 3
  8358. *
  8359. * // Search from the `fromIndex`.
  8360. * _.lastIndexOf([1, 2, 1, 2], 2, 2);
  8361. * // => 1
  8362. */
  8363. function lastIndexOf(array, value, fromIndex) {
  8364. var length = array == null ? 0 : array.length;
  8365. if (!length) {
  8366. return -1;
  8367. }
  8368. var index = length;
  8369. if (fromIndex !== undefined) {
  8370. index = toInteger(fromIndex);
  8371. index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
  8372. }
  8373. return value === value
  8374. ? strictLastIndexOf(array, value, index)
  8375. : baseFindIndex(array, baseIsNaN, index, true);
  8376. }
  8377. /**
  8378. * Gets the element at index `n` of `array`. If `n` is negative, the nth
  8379. * element from the end is returned.
  8380. *
  8381. * @static
  8382. * @memberOf _
  8383. * @since 4.11.0
  8384. * @category Array
  8385. * @param {Array} array The array to query.
  8386. * @param {number} [n=0] The index of the element to return.
  8387. * @returns {*} Returns the nth element of `array`.
  8388. * @example
  8389. *
  8390. * var array = ['a', 'b', 'c', 'd'];
  8391. *
  8392. * _.nth(array, 1);
  8393. * // => 'b'
  8394. *
  8395. * _.nth(array, -2);
  8396. * // => 'c';
  8397. */
  8398. function nth(array, n) {
  8399. return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
  8400. }
  8401. /**
  8402. * Removes all given values from `array` using
  8403. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  8404. * for equality comparisons.
  8405. *
  8406. * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
  8407. * to remove elements from an array by predicate.
  8408. *
  8409. * @static
  8410. * @memberOf _
  8411. * @since 2.0.0
  8412. * @category Array
  8413. * @param {Array} array The array to modify.
  8414. * @param {...*} [values] The values to remove.
  8415. * @returns {Array} Returns `array`.
  8416. * @example
  8417. *
  8418. * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
  8419. *
  8420. * _.pull(array, 'a', 'c');
  8421. * console.log(array);
  8422. * // => ['b', 'b']
  8423. */
  8424. var pull = baseRest(pullAll);
  8425. /**
  8426. * This method is like `_.pull` except that it accepts an array of values to remove.
  8427. *
  8428. * **Note:** Unlike `_.difference`, this method mutates `array`.
  8429. *
  8430. * @static
  8431. * @memberOf _
  8432. * @since 4.0.0
  8433. * @category Array
  8434. * @param {Array} array The array to modify.
  8435. * @param {Array} values The values to remove.
  8436. * @returns {Array} Returns `array`.
  8437. * @example
  8438. *
  8439. * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
  8440. *
  8441. * _.pullAll(array, ['a', 'c']);
  8442. * console.log(array);
  8443. * // => ['b', 'b']
  8444. */
  8445. function pullAll(array, values) {
  8446. return (array && array.length && values && values.length)
  8447. ? basePullAll(array, values)
  8448. : array;
  8449. }
  8450. /**
  8451. * This method is like `_.pullAll` except that it accepts `iteratee` which is
  8452. * invoked for each element of `array` and `values` to generate the criterion
  8453. * by which they're compared. The iteratee is invoked with one argument: (value).
  8454. *
  8455. * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
  8456. *
  8457. * @static
  8458. * @memberOf _
  8459. * @since 4.0.0
  8460. * @category Array
  8461. * @param {Array} array The array to modify.
  8462. * @param {Array} values The values to remove.
  8463. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  8464. * @returns {Array} Returns `array`.
  8465. * @example
  8466. *
  8467. * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
  8468. *
  8469. * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
  8470. * console.log(array);
  8471. * // => [{ 'x': 2 }]
  8472. */
  8473. function pullAllBy(array, values, iteratee) {
  8474. return (array && array.length && values && values.length)
  8475. ? basePullAll(array, values, getIteratee(iteratee, 2))
  8476. : array;
  8477. }
  8478. /**
  8479. * This method is like `_.pullAll` except that it accepts `comparator` which
  8480. * is invoked to compare elements of `array` to `values`. The comparator is
  8481. * invoked with two arguments: (arrVal, othVal).
  8482. *
  8483. * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
  8484. *
  8485. * @static
  8486. * @memberOf _
  8487. * @since 4.6.0
  8488. * @category Array
  8489. * @param {Array} array The array to modify.
  8490. * @param {Array} values The values to remove.
  8491. * @param {Function} [comparator] The comparator invoked per element.
  8492. * @returns {Array} Returns `array`.
  8493. * @example
  8494. *
  8495. * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
  8496. *
  8497. * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
  8498. * console.log(array);
  8499. * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
  8500. */
  8501. function pullAllWith(array, values, comparator) {
  8502. return (array && array.length && values && values.length)
  8503. ? basePullAll(array, values, undefined, comparator)
  8504. : array;
  8505. }
  8506. /**
  8507. * Removes elements from `array` corresponding to `indexes` and returns an
  8508. * array of removed elements.
  8509. *
  8510. * **Note:** Unlike `_.at`, this method mutates `array`.
  8511. *
  8512. * @static
  8513. * @memberOf _
  8514. * @since 3.0.0
  8515. * @category Array
  8516. * @param {Array} array The array to modify.
  8517. * @param {...(number|number[])} [indexes] The indexes of elements to remove.
  8518. * @returns {Array} Returns the new array of removed elements.
  8519. * @example
  8520. *
  8521. * var array = ['a', 'b', 'c', 'd'];
  8522. * var pulled = _.pullAt(array, [1, 3]);
  8523. *
  8524. * console.log(array);
  8525. * // => ['a', 'c']
  8526. *
  8527. * console.log(pulled);
  8528. * // => ['b', 'd']
  8529. */
  8530. var pullAt = flatRest(function(array, indexes) {
  8531. var length = array == null ? 0 : array.length,
  8532. result = baseAt(array, indexes);
  8533. basePullAt(array, arrayMap(indexes, function(index) {
  8534. return isIndex(index, length) ? +index : index;
  8535. }).sort(compareAscending));
  8536. return result;
  8537. });
  8538. /**
  8539. * Removes all elements from `array` that `predicate` returns truthy for
  8540. * and returns an array of the removed elements. The predicate is invoked
  8541. * with three arguments: (value, index, array).
  8542. *
  8543. * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
  8544. * to pull elements from an array by value.
  8545. *
  8546. * @static
  8547. * @memberOf _
  8548. * @since 2.0.0
  8549. * @category Array
  8550. * @param {Array} array The array to modify.
  8551. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  8552. * @returns {Array} Returns the new array of removed elements.
  8553. * @example
  8554. *
  8555. * var array = [1, 2, 3, 4];
  8556. * var evens = _.remove(array, function(n) {
  8557. * return n % 2 == 0;
  8558. * });
  8559. *
  8560. * console.log(array);
  8561. * // => [1, 3]
  8562. *
  8563. * console.log(evens);
  8564. * // => [2, 4]
  8565. */
  8566. function remove(array, predicate) {
  8567. var result = [];
  8568. if (!(array && array.length)) {
  8569. return result;
  8570. }
  8571. var index = -1,
  8572. indexes = [],
  8573. length = array.length;
  8574. predicate = getIteratee(predicate, 3);
  8575. while (++index < length) {
  8576. var value = array[index];
  8577. if (predicate(value, index, array)) {
  8578. result.push(value);
  8579. indexes.push(index);
  8580. }
  8581. }
  8582. basePullAt(array, indexes);
  8583. return result;
  8584. }
  8585. /**
  8586. * Reverses `array` so that the first element becomes the last, the second
  8587. * element becomes the second to last, and so on.
  8588. *
  8589. * **Note:** This method mutates `array` and is based on
  8590. * [`Array#reverse`](https://mdn.io/Array/reverse).
  8591. *
  8592. * @static
  8593. * @memberOf _
  8594. * @since 4.0.0
  8595. * @category Array
  8596. * @param {Array} array The array to modify.
  8597. * @returns {Array} Returns `array`.
  8598. * @example
  8599. *
  8600. * var array = [1, 2, 3];
  8601. *
  8602. * _.reverse(array);
  8603. * // => [3, 2, 1]
  8604. *
  8605. * console.log(array);
  8606. * // => [3, 2, 1]
  8607. */
  8608. function reverse(array) {
  8609. return array == null ? array : nativeReverse.call(array);
  8610. }
  8611. /**
  8612. * Creates a slice of `array` from `start` up to, but not including, `end`.
  8613. *
  8614. * **Note:** This method is used instead of
  8615. * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
  8616. * returned.
  8617. *
  8618. * @static
  8619. * @memberOf _
  8620. * @since 3.0.0
  8621. * @category Array
  8622. * @param {Array} array The array to slice.
  8623. * @param {number} [start=0] The start position.
  8624. * @param {number} [end=array.length] The end position.
  8625. * @returns {Array} Returns the slice of `array`.
  8626. */
  8627. function slice(array, start, end) {
  8628. var length = array == null ? 0 : array.length;
  8629. if (!length) {
  8630. return [];
  8631. }
  8632. if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
  8633. start = 0;
  8634. end = length;
  8635. }
  8636. else {
  8637. start = start == null ? 0 : toInteger(start);
  8638. end = end === undefined ? length : toInteger(end);
  8639. }
  8640. return baseSlice(array, start, end);
  8641. }
  8642. /**
  8643. * Uses a binary search to determine the lowest index at which `value`
  8644. * should be inserted into `array` in order to maintain its sort order.
  8645. *
  8646. * @static
  8647. * @memberOf _
  8648. * @since 0.1.0
  8649. * @category Array
  8650. * @param {Array} array The sorted array to inspect.
  8651. * @param {*} value The value to evaluate.
  8652. * @returns {number} Returns the index at which `value` should be inserted
  8653. * into `array`.
  8654. * @example
  8655. *
  8656. * _.sortedIndex([30, 50], 40);
  8657. * // => 1
  8658. */
  8659. function sortedIndex(array, value) {
  8660. return baseSortedIndex(array, value);
  8661. }
  8662. /**
  8663. * This method is like `_.sortedIndex` except that it accepts `iteratee`
  8664. * which is invoked for `value` and each element of `array` to compute their
  8665. * sort ranking. The iteratee is invoked with one argument: (value).
  8666. *
  8667. * @static
  8668. * @memberOf _
  8669. * @since 4.0.0
  8670. * @category Array
  8671. * @param {Array} array The sorted array to inspect.
  8672. * @param {*} value The value to evaluate.
  8673. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  8674. * @returns {number} Returns the index at which `value` should be inserted
  8675. * into `array`.
  8676. * @example
  8677. *
  8678. * var objects = [{ 'x': 4 }, { 'x': 5 }];
  8679. *
  8680. * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
  8681. * // => 0
  8682. *
  8683. * // The `_.property` iteratee shorthand.
  8684. * _.sortedIndexBy(objects, { 'x': 4 }, 'x');
  8685. * // => 0
  8686. */
  8687. function sortedIndexBy(array, value, iteratee) {
  8688. return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));
  8689. }
  8690. /**
  8691. * This method is like `_.indexOf` except that it performs a binary
  8692. * search on a sorted `array`.
  8693. *
  8694. * @static
  8695. * @memberOf _
  8696. * @since 4.0.0
  8697. * @category Array
  8698. * @param {Array} array The array to inspect.
  8699. * @param {*} value The value to search for.
  8700. * @returns {number} Returns the index of the matched value, else `-1`.
  8701. * @example
  8702. *
  8703. * _.sortedIndexOf([4, 5, 5, 5, 6], 5);
  8704. * // => 1
  8705. */
  8706. function sortedIndexOf(array, value) {
  8707. var length = array == null ? 0 : array.length;
  8708. if (length) {
  8709. var index = baseSortedIndex(array, value);
  8710. if (index < length && eq(array[index], value)) {
  8711. return index;
  8712. }
  8713. }
  8714. return -1;
  8715. }
  8716. /**
  8717. * This method is like `_.sortedIndex` except that it returns the highest
  8718. * index at which `value` should be inserted into `array` in order to
  8719. * maintain its sort order.
  8720. *
  8721. * @static
  8722. * @memberOf _
  8723. * @since 3.0.0
  8724. * @category Array
  8725. * @param {Array} array The sorted array to inspect.
  8726. * @param {*} value The value to evaluate.
  8727. * @returns {number} Returns the index at which `value` should be inserted
  8728. * into `array`.
  8729. * @example
  8730. *
  8731. * _.sortedLastIndex([4, 5, 5, 5, 6], 5);
  8732. * // => 4
  8733. */
  8734. function sortedLastIndex(array, value) {
  8735. return baseSortedIndex(array, value, true);
  8736. }
  8737. /**
  8738. * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
  8739. * which is invoked for `value` and each element of `array` to compute their
  8740. * sort ranking. The iteratee is invoked with one argument: (value).
  8741. *
  8742. * @static
  8743. * @memberOf _
  8744. * @since 4.0.0
  8745. * @category Array
  8746. * @param {Array} array The sorted array to inspect.
  8747. * @param {*} value The value to evaluate.
  8748. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  8749. * @returns {number} Returns the index at which `value` should be inserted
  8750. * into `array`.
  8751. * @example
  8752. *
  8753. * var objects = [{ 'x': 4 }, { 'x': 5 }];
  8754. *
  8755. * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
  8756. * // => 1
  8757. *
  8758. * // The `_.property` iteratee shorthand.
  8759. * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');
  8760. * // => 1
  8761. */
  8762. function sortedLastIndexBy(array, value, iteratee) {
  8763. return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);
  8764. }
  8765. /**
  8766. * This method is like `_.lastIndexOf` except that it performs a binary
  8767. * search on a sorted `array`.
  8768. *
  8769. * @static
  8770. * @memberOf _
  8771. * @since 4.0.0
  8772. * @category Array
  8773. * @param {Array} array The array to inspect.
  8774. * @param {*} value The value to search for.
  8775. * @returns {number} Returns the index of the matched value, else `-1`.
  8776. * @example
  8777. *
  8778. * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
  8779. * // => 3
  8780. */
  8781. function sortedLastIndexOf(array, value) {
  8782. var length = array == null ? 0 : array.length;
  8783. if (length) {
  8784. var index = baseSortedIndex(array, value, true) - 1;
  8785. if (eq(array[index], value)) {
  8786. return index;
  8787. }
  8788. }
  8789. return -1;
  8790. }
  8791. /**
  8792. * This method is like `_.uniq` except that it's designed and optimized
  8793. * for sorted arrays.
  8794. *
  8795. * @static
  8796. * @memberOf _
  8797. * @since 4.0.0
  8798. * @category Array
  8799. * @param {Array} array The array to inspect.
  8800. * @returns {Array} Returns the new duplicate free array.
  8801. * @example
  8802. *
  8803. * _.sortedUniq([1, 1, 2]);
  8804. * // => [1, 2]
  8805. */
  8806. function sortedUniq(array) {
  8807. return (array && array.length)
  8808. ? baseSortedUniq(array)
  8809. : [];
  8810. }
  8811. /**
  8812. * This method is like `_.uniqBy` except that it's designed and optimized
  8813. * for sorted arrays.
  8814. *
  8815. * @static
  8816. * @memberOf _
  8817. * @since 4.0.0
  8818. * @category Array
  8819. * @param {Array} array The array to inspect.
  8820. * @param {Function} [iteratee] The iteratee invoked per element.
  8821. * @returns {Array} Returns the new duplicate free array.
  8822. * @example
  8823. *
  8824. * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
  8825. * // => [1.1, 2.3]
  8826. */
  8827. function sortedUniqBy(array, iteratee) {
  8828. return (array && array.length)
  8829. ? baseSortedUniq(array, getIteratee(iteratee, 2))
  8830. : [];
  8831. }
  8832. /**
  8833. * Gets all but the first element of `array`.
  8834. *
  8835. * @static
  8836. * @memberOf _
  8837. * @since 4.0.0
  8838. * @category Array
  8839. * @param {Array} array The array to query.
  8840. * @returns {Array} Returns the slice of `array`.
  8841. * @example
  8842. *
  8843. * _.tail([1, 2, 3]);
  8844. * // => [2, 3]
  8845. */
  8846. function tail(array) {
  8847. var length = array == null ? 0 : array.length;
  8848. return length ? baseSlice(array, 1, length) : [];
  8849. }
  8850. /**
  8851. * Creates a slice of `array` with `n` elements taken from the beginning.
  8852. *
  8853. * @static
  8854. * @memberOf _
  8855. * @since 0.1.0
  8856. * @category Array
  8857. * @param {Array} array The array to query.
  8858. * @param {number} [n=1] The number of elements to take.
  8859. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  8860. * @returns {Array} Returns the slice of `array`.
  8861. * @example
  8862. *
  8863. * _.take([1, 2, 3]);
  8864. * // => [1]
  8865. *
  8866. * _.take([1, 2, 3], 2);
  8867. * // => [1, 2]
  8868. *
  8869. * _.take([1, 2, 3], 5);
  8870. * // => [1, 2, 3]
  8871. *
  8872. * _.take([1, 2, 3], 0);
  8873. * // => []
  8874. */
  8875. function take(array, n, guard) {
  8876. if (!(array && array.length)) {
  8877. return [];
  8878. }
  8879. n = (guard || n === undefined) ? 1 : toInteger(n);
  8880. return baseSlice(array, 0, n < 0 ? 0 : n);
  8881. }
  8882. /**
  8883. * Creates a slice of `array` with `n` elements taken from the end.
  8884. *
  8885. * @static
  8886. * @memberOf _
  8887. * @since 3.0.0
  8888. * @category Array
  8889. * @param {Array} array The array to query.
  8890. * @param {number} [n=1] The number of elements to take.
  8891. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  8892. * @returns {Array} Returns the slice of `array`.
  8893. * @example
  8894. *
  8895. * _.takeRight([1, 2, 3]);
  8896. * // => [3]
  8897. *
  8898. * _.takeRight([1, 2, 3], 2);
  8899. * // => [2, 3]
  8900. *
  8901. * _.takeRight([1, 2, 3], 5);
  8902. * // => [1, 2, 3]
  8903. *
  8904. * _.takeRight([1, 2, 3], 0);
  8905. * // => []
  8906. */
  8907. function takeRight(array, n, guard) {
  8908. var length = array == null ? 0 : array.length;
  8909. if (!length) {
  8910. return [];
  8911. }
  8912. n = (guard || n === undefined) ? 1 : toInteger(n);
  8913. n = length - n;
  8914. return baseSlice(array, n < 0 ? 0 : n, length);
  8915. }
  8916. /**
  8917. * Creates a slice of `array` with elements taken from the end. Elements are
  8918. * taken until `predicate` returns falsey. The predicate is invoked with
  8919. * three arguments: (value, index, array).
  8920. *
  8921. * @static
  8922. * @memberOf _
  8923. * @since 3.0.0
  8924. * @category Array
  8925. * @param {Array} array The array to query.
  8926. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  8927. * @returns {Array} Returns the slice of `array`.
  8928. * @example
  8929. *
  8930. * var users = [
  8931. * { 'user': 'barney', 'active': true },
  8932. * { 'user': 'fred', 'active': false },
  8933. * { 'user': 'pebbles', 'active': false }
  8934. * ];
  8935. *
  8936. * _.takeRightWhile(users, function(o) { return !o.active; });
  8937. * // => objects for ['fred', 'pebbles']
  8938. *
  8939. * // The `_.matches` iteratee shorthand.
  8940. * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
  8941. * // => objects for ['pebbles']
  8942. *
  8943. * // The `_.matchesProperty` iteratee shorthand.
  8944. * _.takeRightWhile(users, ['active', false]);
  8945. * // => objects for ['fred', 'pebbles']
  8946. *
  8947. * // The `_.property` iteratee shorthand.
  8948. * _.takeRightWhile(users, 'active');
  8949. * // => []
  8950. */
  8951. function takeRightWhile(array, predicate) {
  8952. return (array && array.length)
  8953. ? baseWhile(array, getIteratee(predicate, 3), false, true)
  8954. : [];
  8955. }
  8956. /**
  8957. * Creates a slice of `array` with elements taken from the beginning. Elements
  8958. * are taken until `predicate` returns falsey. The predicate is invoked with
  8959. * three arguments: (value, index, array).
  8960. *
  8961. * @static
  8962. * @memberOf _
  8963. * @since 3.0.0
  8964. * @category Array
  8965. * @param {Array} array The array to query.
  8966. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  8967. * @returns {Array} Returns the slice of `array`.
  8968. * @example
  8969. *
  8970. * var users = [
  8971. * { 'user': 'barney', 'active': false },
  8972. * { 'user': 'fred', 'active': false },
  8973. * { 'user': 'pebbles', 'active': true }
  8974. * ];
  8975. *
  8976. * _.takeWhile(users, function(o) { return !o.active; });
  8977. * // => objects for ['barney', 'fred']
  8978. *
  8979. * // The `_.matches` iteratee shorthand.
  8980. * _.takeWhile(users, { 'user': 'barney', 'active': false });
  8981. * // => objects for ['barney']
  8982. *
  8983. * // The `_.matchesProperty` iteratee shorthand.
  8984. * _.takeWhile(users, ['active', false]);
  8985. * // => objects for ['barney', 'fred']
  8986. *
  8987. * // The `_.property` iteratee shorthand.
  8988. * _.takeWhile(users, 'active');
  8989. * // => []
  8990. */
  8991. function takeWhile(array, predicate) {
  8992. return (array && array.length)
  8993. ? baseWhile(array, getIteratee(predicate, 3))
  8994. : [];
  8995. }
  8996. /**
  8997. * Creates an array of unique values, in order, from all given arrays using
  8998. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  8999. * for equality comparisons.
  9000. *
  9001. * @static
  9002. * @memberOf _
  9003. * @since 0.1.0
  9004. * @category Array
  9005. * @param {...Array} [arrays] The arrays to inspect.
  9006. * @returns {Array} Returns the new array of combined values.
  9007. * @example
  9008. *
  9009. * _.union([2], [1, 2]);
  9010. * // => [2, 1]
  9011. */
  9012. var union = baseRest(function(arrays) {
  9013. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
  9014. });
  9015. /**
  9016. * This method is like `_.union` except that it accepts `iteratee` which is
  9017. * invoked for each element of each `arrays` to generate the criterion by
  9018. * which uniqueness is computed. Result values are chosen from the first
  9019. * array in which the value occurs. The iteratee is invoked with one argument:
  9020. * (value).
  9021. *
  9022. * @static
  9023. * @memberOf _
  9024. * @since 4.0.0
  9025. * @category Array
  9026. * @param {...Array} [arrays] The arrays to inspect.
  9027. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  9028. * @returns {Array} Returns the new array of combined values.
  9029. * @example
  9030. *
  9031. * _.unionBy([2.1], [1.2, 2.3], Math.floor);
  9032. * // => [2.1, 1.2]
  9033. *
  9034. * // The `_.property` iteratee shorthand.
  9035. * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
  9036. * // => [{ 'x': 1 }, { 'x': 2 }]
  9037. */
  9038. var unionBy = baseRest(function(arrays) {
  9039. var iteratee = last(arrays);
  9040. if (isArrayLikeObject(iteratee)) {
  9041. iteratee = undefined;
  9042. }
  9043. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));
  9044. });
  9045. /**
  9046. * This method is like `_.union` except that it accepts `comparator` which
  9047. * is invoked to compare elements of `arrays`. Result values are chosen from
  9048. * the first array in which the value occurs. The comparator is invoked
  9049. * with two arguments: (arrVal, othVal).
  9050. *
  9051. * @static
  9052. * @memberOf _
  9053. * @since 4.0.0
  9054. * @category Array
  9055. * @param {...Array} [arrays] The arrays to inspect.
  9056. * @param {Function} [comparator] The comparator invoked per element.
  9057. * @returns {Array} Returns the new array of combined values.
  9058. * @example
  9059. *
  9060. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  9061. * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
  9062. *
  9063. * _.unionWith(objects, others, _.isEqual);
  9064. * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
  9065. */
  9066. var unionWith = baseRest(function(arrays) {
  9067. var comparator = last(arrays);
  9068. comparator = typeof comparator == 'function' ? comparator : undefined;
  9069. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
  9070. });
  9071. /**
  9072. * Creates a duplicate-free version of an array, using
  9073. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  9074. * for equality comparisons, in which only the first occurrence of each element
  9075. * is kept. The order of result values is determined by the order they occur
  9076. * in the array.
  9077. *
  9078. * @static
  9079. * @memberOf _
  9080. * @since 0.1.0
  9081. * @category Array
  9082. * @param {Array} array The array to inspect.
  9083. * @returns {Array} Returns the new duplicate free array.
  9084. * @example
  9085. *
  9086. * _.uniq([2, 1, 2]);
  9087. * // => [2, 1]
  9088. */
  9089. function uniq(array) {
  9090. return (array && array.length) ? baseUniq(array) : [];
  9091. }
  9092. /**
  9093. * This method is like `_.uniq` except that it accepts `iteratee` which is
  9094. * invoked for each element in `array` to generate the criterion by which
  9095. * uniqueness is computed. The order of result values is determined by the
  9096. * order they occur in the array. The iteratee is invoked with one argument:
  9097. * (value).
  9098. *
  9099. * @static
  9100. * @memberOf _
  9101. * @since 4.0.0
  9102. * @category Array
  9103. * @param {Array} array The array to inspect.
  9104. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  9105. * @returns {Array} Returns the new duplicate free array.
  9106. * @example
  9107. *
  9108. * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
  9109. * // => [2.1, 1.2]
  9110. *
  9111. * // The `_.property` iteratee shorthand.
  9112. * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
  9113. * // => [{ 'x': 1 }, { 'x': 2 }]
  9114. */
  9115. function uniqBy(array, iteratee) {
  9116. return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];
  9117. }
  9118. /**
  9119. * This method is like `_.uniq` except that it accepts `comparator` which
  9120. * is invoked to compare elements of `array`. The order of result values is
  9121. * determined by the order they occur in the array.The comparator is invoked
  9122. * with two arguments: (arrVal, othVal).
  9123. *
  9124. * @static
  9125. * @memberOf _
  9126. * @since 4.0.0
  9127. * @category Array
  9128. * @param {Array} array The array to inspect.
  9129. * @param {Function} [comparator] The comparator invoked per element.
  9130. * @returns {Array} Returns the new duplicate free array.
  9131. * @example
  9132. *
  9133. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
  9134. *
  9135. * _.uniqWith(objects, _.isEqual);
  9136. * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
  9137. */
  9138. function uniqWith(array, comparator) {
  9139. comparator = typeof comparator == 'function' ? comparator : undefined;
  9140. return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
  9141. }
  9142. /**
  9143. * This method is like `_.zip` except that it accepts an array of grouped
  9144. * elements and creates an array regrouping the elements to their pre-zip
  9145. * configuration.
  9146. *
  9147. * @static
  9148. * @memberOf _
  9149. * @since 1.2.0
  9150. * @category Array
  9151. * @param {Array} array The array of grouped elements to process.
  9152. * @returns {Array} Returns the new array of regrouped elements.
  9153. * @example
  9154. *
  9155. * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);
  9156. * // => [['a', 1, true], ['b', 2, false]]
  9157. *
  9158. * _.unzip(zipped);
  9159. * // => [['a', 'b'], [1, 2], [true, false]]
  9160. */
  9161. function unzip(array) {
  9162. if (!(array && array.length)) {
  9163. return [];
  9164. }
  9165. var length = 0;
  9166. array = arrayFilter(array, function(group) {
  9167. if (isArrayLikeObject(group)) {
  9168. length = nativeMax(group.length, length);
  9169. return true;
  9170. }
  9171. });
  9172. return baseTimes(length, function(index) {
  9173. return arrayMap(array, baseProperty(index));
  9174. });
  9175. }
  9176. /**
  9177. * This method is like `_.unzip` except that it accepts `iteratee` to specify
  9178. * how regrouped values should be combined. The iteratee is invoked with the
  9179. * elements of each group: (...group).
  9180. *
  9181. * @static
  9182. * @memberOf _
  9183. * @since 3.8.0
  9184. * @category Array
  9185. * @param {Array} array The array of grouped elements to process.
  9186. * @param {Function} [iteratee=_.identity] The function to combine
  9187. * regrouped values.
  9188. * @returns {Array} Returns the new array of regrouped elements.
  9189. * @example
  9190. *
  9191. * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
  9192. * // => [[1, 10, 100], [2, 20, 200]]
  9193. *
  9194. * _.unzipWith(zipped, _.add);
  9195. * // => [3, 30, 300]
  9196. */
  9197. function unzipWith(array, iteratee) {
  9198. if (!(array && array.length)) {
  9199. return [];
  9200. }
  9201. var result = unzip(array);
  9202. if (iteratee == null) {
  9203. return result;
  9204. }
  9205. return arrayMap(result, function(group) {
  9206. return apply(iteratee, undefined, group);
  9207. });
  9208. }
  9209. /**
  9210. * Creates an array excluding all given values using
  9211. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  9212. * for equality comparisons.
  9213. *
  9214. * **Note:** Unlike `_.pull`, this method returns a new array.
  9215. *
  9216. * @static
  9217. * @memberOf _
  9218. * @since 0.1.0
  9219. * @category Array
  9220. * @param {Array} array The array to inspect.
  9221. * @param {...*} [values] The values to exclude.
  9222. * @returns {Array} Returns the new array of filtered values.
  9223. * @see _.difference, _.xor
  9224. * @example
  9225. *
  9226. * _.without([2, 1, 2, 3], 1, 2);
  9227. * // => [3]
  9228. */
  9229. var without = baseRest(function(array, values) {
  9230. return isArrayLikeObject(array)
  9231. ? baseDifference(array, values)
  9232. : [];
  9233. });
  9234. /**
  9235. * Creates an array of unique values that is the
  9236. * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
  9237. * of the given arrays. The order of result values is determined by the order
  9238. * they occur in the arrays.
  9239. *
  9240. * @static
  9241. * @memberOf _
  9242. * @since 2.4.0
  9243. * @category Array
  9244. * @param {...Array} [arrays] The arrays to inspect.
  9245. * @returns {Array} Returns the new array of filtered values.
  9246. * @see _.difference, _.without
  9247. * @example
  9248. *
  9249. * _.xor([2, 1], [2, 3]);
  9250. * // => [1, 3]
  9251. */
  9252. var xor = baseRest(function(arrays) {
  9253. return baseXor(arrayFilter(arrays, isArrayLikeObject));
  9254. });
  9255. /**
  9256. * This method is like `_.xor` except that it accepts `iteratee` which is
  9257. * invoked for each element of each `arrays` to generate the criterion by
  9258. * which by which they're compared. The order of result values is determined
  9259. * by the order they occur in the arrays. The iteratee is invoked with one
  9260. * argument: (value).
  9261. *
  9262. * @static
  9263. * @memberOf _
  9264. * @since 4.0.0
  9265. * @category Array
  9266. * @param {...Array} [arrays] The arrays to inspect.
  9267. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  9268. * @returns {Array} Returns the new array of filtered values.
  9269. * @example
  9270. *
  9271. * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);
  9272. * // => [1.2, 3.4]
  9273. *
  9274. * // The `_.property` iteratee shorthand.
  9275. * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
  9276. * // => [{ 'x': 2 }]
  9277. */
  9278. var xorBy = baseRest(function(arrays) {
  9279. var iteratee = last(arrays);
  9280. if (isArrayLikeObject(iteratee)) {
  9281. iteratee = undefined;
  9282. }
  9283. return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));
  9284. });
  9285. /**
  9286. * This method is like `_.xor` except that it accepts `comparator` which is
  9287. * invoked to compare elements of `arrays`. The order of result values is
  9288. * determined by the order they occur in the arrays. The comparator is invoked
  9289. * with two arguments: (arrVal, othVal).
  9290. *
  9291. * @static
  9292. * @memberOf _
  9293. * @since 4.0.0
  9294. * @category Array
  9295. * @param {...Array} [arrays] The arrays to inspect.
  9296. * @param {Function} [comparator] The comparator invoked per element.
  9297. * @returns {Array} Returns the new array of filtered values.
  9298. * @example
  9299. *
  9300. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  9301. * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
  9302. *
  9303. * _.xorWith(objects, others, _.isEqual);
  9304. * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
  9305. */
  9306. var xorWith = baseRest(function(arrays) {
  9307. var comparator = last(arrays);
  9308. comparator = typeof comparator == 'function' ? comparator : undefined;
  9309. return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
  9310. });
  9311. /**
  9312. * Creates an array of grouped elements, the first of which contains the
  9313. * first elements of the given arrays, the second of which contains the
  9314. * second elements of the given arrays, and so on.
  9315. *
  9316. * @static
  9317. * @memberOf _
  9318. * @since 0.1.0
  9319. * @category Array
  9320. * @param {...Array} [arrays] The arrays to process.
  9321. * @returns {Array} Returns the new array of grouped elements.
  9322. * @example
  9323. *
  9324. * _.zip(['a', 'b'], [1, 2], [true, false]);
  9325. * // => [['a', 1, true], ['b', 2, false]]
  9326. */
  9327. var zip = baseRest(unzip);
  9328. /**
  9329. * This method is like `_.fromPairs` except that it accepts two arrays,
  9330. * one of property identifiers and one of corresponding values.
  9331. *
  9332. * @static
  9333. * @memberOf _
  9334. * @since 0.4.0
  9335. * @category Array
  9336. * @param {Array} [props=[]] The property identifiers.
  9337. * @param {Array} [values=[]] The property values.
  9338. * @returns {Object} Returns the new object.
  9339. * @example
  9340. *
  9341. * _.zipObject(['a', 'b'], [1, 2]);
  9342. * // => { 'a': 1, 'b': 2 }
  9343. */
  9344. function zipObject(props, values) {
  9345. return baseZipObject(props || [], values || [], assignValue);
  9346. }
  9347. /**
  9348. * This method is like `_.zipObject` except that it supports property paths.
  9349. *
  9350. * @static
  9351. * @memberOf _
  9352. * @since 4.1.0
  9353. * @category Array
  9354. * @param {Array} [props=[]] The property identifiers.
  9355. * @param {Array} [values=[]] The property values.
  9356. * @returns {Object} Returns the new object.
  9357. * @example
  9358. *
  9359. * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
  9360. * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
  9361. */
  9362. function zipObjectDeep(props, values) {
  9363. return baseZipObject(props || [], values || [], baseSet);
  9364. }
  9365. /**
  9366. * This method is like `_.zip` except that it accepts `iteratee` to specify
  9367. * how grouped values should be combined. The iteratee is invoked with the
  9368. * elements of each group: (...group).
  9369. *
  9370. * @static
  9371. * @memberOf _
  9372. * @since 3.8.0
  9373. * @category Array
  9374. * @param {...Array} [arrays] The arrays to process.
  9375. * @param {Function} [iteratee=_.identity] The function to combine
  9376. * grouped values.
  9377. * @returns {Array} Returns the new array of grouped elements.
  9378. * @example
  9379. *
  9380. * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
  9381. * return a + b + c;
  9382. * });
  9383. * // => [111, 222]
  9384. */
  9385. var zipWith = baseRest(function(arrays) {
  9386. var length = arrays.length,
  9387. iteratee = length > 1 ? arrays[length - 1] : undefined;
  9388. iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
  9389. return unzipWith(arrays, iteratee);
  9390. });
  9391. /*------------------------------------------------------------------------*/
  9392. /**
  9393. * Creates a `lodash` wrapper instance that wraps `value` with explicit method
  9394. * chain sequences enabled. The result of such sequences must be unwrapped
  9395. * with `_#value`.
  9396. *
  9397. * @static
  9398. * @memberOf _
  9399. * @since 1.3.0
  9400. * @category Seq
  9401. * @param {*} value The value to wrap.
  9402. * @returns {Object} Returns the new `lodash` wrapper instance.
  9403. * @example
  9404. *
  9405. * var users = [
  9406. * { 'user': 'barney', 'age': 36 },
  9407. * { 'user': 'fred', 'age': 40 },
  9408. * { 'user': 'pebbles', 'age': 1 }
  9409. * ];
  9410. *
  9411. * var youngest = _
  9412. * .chain(users)
  9413. * .sortBy('age')
  9414. * .map(function(o) {
  9415. * return o.user + ' is ' + o.age;
  9416. * })
  9417. * .head()
  9418. * .value();
  9419. * // => 'pebbles is 1'
  9420. */
  9421. function chain(value) {
  9422. var result = lodash(value);
  9423. result.__chain__ = true;
  9424. return result;
  9425. }
  9426. /**
  9427. * This method invokes `interceptor` and returns `value`. The interceptor
  9428. * is invoked with one argument; (value). The purpose of this method is to
  9429. * "tap into" a method chain sequence in order to modify intermediate results.
  9430. *
  9431. * @static
  9432. * @memberOf _
  9433. * @since 0.1.0
  9434. * @category Seq
  9435. * @param {*} value The value to provide to `interceptor`.
  9436. * @param {Function} interceptor The function to invoke.
  9437. * @returns {*} Returns `value`.
  9438. * @example
  9439. *
  9440. * _([1, 2, 3])
  9441. * .tap(function(array) {
  9442. * // Mutate input array.
  9443. * array.pop();
  9444. * })
  9445. * .reverse()
  9446. * .value();
  9447. * // => [2, 1]
  9448. */
  9449. function tap(value, interceptor) {
  9450. interceptor(value);
  9451. return value;
  9452. }
  9453. /**
  9454. * This method is like `_.tap` except that it returns the result of `interceptor`.
  9455. * The purpose of this method is to "pass thru" values replacing intermediate
  9456. * results in a method chain sequence.
  9457. *
  9458. * @static
  9459. * @memberOf _
  9460. * @since 3.0.0
  9461. * @category Seq
  9462. * @param {*} value The value to provide to `interceptor`.
  9463. * @param {Function} interceptor The function to invoke.
  9464. * @returns {*} Returns the result of `interceptor`.
  9465. * @example
  9466. *
  9467. * _(' abc ')
  9468. * .chain()
  9469. * .trim()
  9470. * .thru(function(value) {
  9471. * return [value];
  9472. * })
  9473. * .value();
  9474. * // => ['abc']
  9475. */
  9476. function thru(value, interceptor) {
  9477. return interceptor(value);
  9478. }
  9479. /**
  9480. * This method is the wrapper version of `_.at`.
  9481. *
  9482. * @name at
  9483. * @memberOf _
  9484. * @since 1.0.0
  9485. * @category Seq
  9486. * @param {...(string|string[])} [paths] The property paths to pick.
  9487. * @returns {Object} Returns the new `lodash` wrapper instance.
  9488. * @example
  9489. *
  9490. * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
  9491. *
  9492. * _(object).at(['a[0].b.c', 'a[1]']).value();
  9493. * // => [3, 4]
  9494. */
  9495. var wrapperAt = flatRest(function(paths) {
  9496. var length = paths.length,
  9497. start = length ? paths[0] : 0,
  9498. value = this.__wrapped__,
  9499. interceptor = function(object) { return baseAt(object, paths); };
  9500. if (length > 1 || this.__actions__.length ||
  9501. !(value instanceof LazyWrapper) || !isIndex(start)) {
  9502. return this.thru(interceptor);
  9503. }
  9504. value = value.slice(start, +start + (length ? 1 : 0));
  9505. value.__actions__.push({
  9506. 'func': thru,
  9507. 'args': [interceptor],
  9508. 'thisArg': undefined
  9509. });
  9510. return new LodashWrapper(value, this.__chain__).thru(function(array) {
  9511. if (length && !array.length) {
  9512. array.push(undefined);
  9513. }
  9514. return array;
  9515. });
  9516. });
  9517. /**
  9518. * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
  9519. *
  9520. * @name chain
  9521. * @memberOf _
  9522. * @since 0.1.0
  9523. * @category Seq
  9524. * @returns {Object} Returns the new `lodash` wrapper instance.
  9525. * @example
  9526. *
  9527. * var users = [
  9528. * { 'user': 'barney', 'age': 36 },
  9529. * { 'user': 'fred', 'age': 40 }
  9530. * ];
  9531. *
  9532. * // A sequence without explicit chaining.
  9533. * _(users).head();
  9534. * // => { 'user': 'barney', 'age': 36 }
  9535. *
  9536. * // A sequence with explicit chaining.
  9537. * _(users)
  9538. * .chain()
  9539. * .head()
  9540. * .pick('user')
  9541. * .value();
  9542. * // => { 'user': 'barney' }
  9543. */
  9544. function wrapperChain() {
  9545. return chain(this);
  9546. }
  9547. /**
  9548. * Executes the chain sequence and returns the wrapped result.
  9549. *
  9550. * @name commit
  9551. * @memberOf _
  9552. * @since 3.2.0
  9553. * @category Seq
  9554. * @returns {Object} Returns the new `lodash` wrapper instance.
  9555. * @example
  9556. *
  9557. * var array = [1, 2];
  9558. * var wrapped = _(array).push(3);
  9559. *
  9560. * console.log(array);
  9561. * // => [1, 2]
  9562. *
  9563. * wrapped = wrapped.commit();
  9564. * console.log(array);
  9565. * // => [1, 2, 3]
  9566. *
  9567. * wrapped.last();
  9568. * // => 3
  9569. *
  9570. * console.log(array);
  9571. * // => [1, 2, 3]
  9572. */
  9573. function wrapperCommit() {
  9574. return new LodashWrapper(this.value(), this.__chain__);
  9575. }
  9576. /**
  9577. * Gets the next value on a wrapped object following the
  9578. * [iterator protocol](https://mdn.io/iteration_protocols#iterator).
  9579. *
  9580. * @name next
  9581. * @memberOf _
  9582. * @since 4.0.0
  9583. * @category Seq
  9584. * @returns {Object} Returns the next iterator value.
  9585. * @example
  9586. *
  9587. * var wrapped = _([1, 2]);
  9588. *
  9589. * wrapped.next();
  9590. * // => { 'done': false, 'value': 1 }
  9591. *
  9592. * wrapped.next();
  9593. * // => { 'done': false, 'value': 2 }
  9594. *
  9595. * wrapped.next();
  9596. * // => { 'done': true, 'value': undefined }
  9597. */
  9598. function wrapperNext() {
  9599. if (this.__values__ === undefined) {
  9600. this.__values__ = toArray(this.value());
  9601. }
  9602. var done = this.__index__ >= this.__values__.length,
  9603. value = done ? undefined : this.__values__[this.__index__++];
  9604. return { 'done': done, 'value': value };
  9605. }
  9606. /**
  9607. * Enables the wrapper to be iterable.
  9608. *
  9609. * @name Symbol.iterator
  9610. * @memberOf _
  9611. * @since 4.0.0
  9612. * @category Seq
  9613. * @returns {Object} Returns the wrapper object.
  9614. * @example
  9615. *
  9616. * var wrapped = _([1, 2]);
  9617. *
  9618. * wrapped[Symbol.iterator]() === wrapped;
  9619. * // => true
  9620. *
  9621. * Array.from(wrapped);
  9622. * // => [1, 2]
  9623. */
  9624. function wrapperToIterator() {
  9625. return this;
  9626. }
  9627. /**
  9628. * Creates a clone of the chain sequence planting `value` as the wrapped value.
  9629. *
  9630. * @name plant
  9631. * @memberOf _
  9632. * @since 3.2.0
  9633. * @category Seq
  9634. * @param {*} value The value to plant.
  9635. * @returns {Object} Returns the new `lodash` wrapper instance.
  9636. * @example
  9637. *
  9638. * function square(n) {
  9639. * return n * n;
  9640. * }
  9641. *
  9642. * var wrapped = _([1, 2]).map(square);
  9643. * var other = wrapped.plant([3, 4]);
  9644. *
  9645. * other.value();
  9646. * // => [9, 16]
  9647. *
  9648. * wrapped.value();
  9649. * // => [1, 4]
  9650. */
  9651. function wrapperPlant(value) {
  9652. var result,
  9653. parent = this;
  9654. while (parent instanceof baseLodash) {
  9655. var clone = wrapperClone(parent);
  9656. clone.__index__ = 0;
  9657. clone.__values__ = undefined;
  9658. if (result) {
  9659. previous.__wrapped__ = clone;
  9660. } else {
  9661. result = clone;
  9662. }
  9663. var previous = clone;
  9664. parent = parent.__wrapped__;
  9665. }
  9666. previous.__wrapped__ = value;
  9667. return result;
  9668. }
  9669. /**
  9670. * This method is the wrapper version of `_.reverse`.
  9671. *
  9672. * **Note:** This method mutates the wrapped array.
  9673. *
  9674. * @name reverse
  9675. * @memberOf _
  9676. * @since 0.1.0
  9677. * @category Seq
  9678. * @returns {Object} Returns the new `lodash` wrapper instance.
  9679. * @example
  9680. *
  9681. * var array = [1, 2, 3];
  9682. *
  9683. * _(array).reverse().value()
  9684. * // => [3, 2, 1]
  9685. *
  9686. * console.log(array);
  9687. * // => [3, 2, 1]
  9688. */
  9689. function wrapperReverse() {
  9690. var value = this.__wrapped__;
  9691. if (value instanceof LazyWrapper) {
  9692. var wrapped = value;
  9693. if (this.__actions__.length) {
  9694. wrapped = new LazyWrapper(this);
  9695. }
  9696. wrapped = wrapped.reverse();
  9697. wrapped.__actions__.push({
  9698. 'func': thru,
  9699. 'args': [reverse],
  9700. 'thisArg': undefined
  9701. });
  9702. return new LodashWrapper(wrapped, this.__chain__);
  9703. }
  9704. return this.thru(reverse);
  9705. }
  9706. /**
  9707. * Executes the chain sequence to resolve the unwrapped value.
  9708. *
  9709. * @name value
  9710. * @memberOf _
  9711. * @since 0.1.0
  9712. * @alias toJSON, valueOf
  9713. * @category Seq
  9714. * @returns {*} Returns the resolved unwrapped value.
  9715. * @example
  9716. *
  9717. * _([1, 2, 3]).value();
  9718. * // => [1, 2, 3]
  9719. */
  9720. function wrapperValue() {
  9721. return baseWrapperValue(this.__wrapped__, this.__actions__);
  9722. }
  9723. /*------------------------------------------------------------------------*/
  9724. /**
  9725. * Creates an object composed of keys generated from the results of running
  9726. * each element of `collection` thru `iteratee`. The corresponding value of
  9727. * each key is the number of times the key was returned by `iteratee`. The
  9728. * iteratee is invoked with one argument: (value).
  9729. *
  9730. * @static
  9731. * @memberOf _
  9732. * @since 0.5.0
  9733. * @category Collection
  9734. * @param {Array|Object} collection The collection to iterate over.
  9735. * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
  9736. * @returns {Object} Returns the composed aggregate object.
  9737. * @example
  9738. *
  9739. * _.countBy([6.1, 4.2, 6.3], Math.floor);
  9740. * // => { '4': 1, '6': 2 }
  9741. *
  9742. * // The `_.property` iteratee shorthand.
  9743. * _.countBy(['one', 'two', 'three'], 'length');
  9744. * // => { '3': 2, '5': 1 }
  9745. */
  9746. var countBy = createAggregator(function(result, value, key) {
  9747. if (hasOwnProperty.call(result, key)) {
  9748. ++result[key];
  9749. } else {
  9750. baseAssignValue(result, key, 1);
  9751. }
  9752. });
  9753. /**
  9754. * Checks if `predicate` returns truthy for **all** elements of `collection`.
  9755. * Iteration is stopped once `predicate` returns falsey. The predicate is
  9756. * invoked with three arguments: (value, index|key, collection).
  9757. *
  9758. * **Note:** This method returns `true` for
  9759. * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
  9760. * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
  9761. * elements of empty collections.
  9762. *
  9763. * @static
  9764. * @memberOf _
  9765. * @since 0.1.0
  9766. * @category Collection
  9767. * @param {Array|Object} collection The collection to iterate over.
  9768. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  9769. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  9770. * @returns {boolean} Returns `true` if all elements pass the predicate check,
  9771. * else `false`.
  9772. * @example
  9773. *
  9774. * _.every([true, 1, null, 'yes'], Boolean);
  9775. * // => false
  9776. *
  9777. * var users = [
  9778. * { 'user': 'barney', 'age': 36, 'active': false },
  9779. * { 'user': 'fred', 'age': 40, 'active': false }
  9780. * ];
  9781. *
  9782. * // The `_.matches` iteratee shorthand.
  9783. * _.every(users, { 'user': 'barney', 'active': false });
  9784. * // => false
  9785. *
  9786. * // The `_.matchesProperty` iteratee shorthand.
  9787. * _.every(users, ['active', false]);
  9788. * // => true
  9789. *
  9790. * // The `_.property` iteratee shorthand.
  9791. * _.every(users, 'active');
  9792. * // => false
  9793. */
  9794. function every(collection, predicate, guard) {
  9795. var func = isArray(collection) ? arrayEvery : baseEvery;
  9796. if (guard && isIterateeCall(collection, predicate, guard)) {
  9797. predicate = undefined;
  9798. }
  9799. return func(collection, getIteratee(predicate, 3));
  9800. }
  9801. /**
  9802. * Iterates over elements of `collection`, returning an array of all elements
  9803. * `predicate` returns truthy for. The predicate is invoked with three
  9804. * arguments: (value, index|key, collection).
  9805. *
  9806. * **Note:** Unlike `_.remove`, this method returns a new array.
  9807. *
  9808. * @static
  9809. * @memberOf _
  9810. * @since 0.1.0
  9811. * @category Collection
  9812. * @param {Array|Object} collection The collection to iterate over.
  9813. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  9814. * @returns {Array} Returns the new filtered array.
  9815. * @see _.reject
  9816. * @example
  9817. *
  9818. * var users = [
  9819. * { 'user': 'barney', 'age': 36, 'active': true },
  9820. * { 'user': 'fred', 'age': 40, 'active': false }
  9821. * ];
  9822. *
  9823. * _.filter(users, function(o) { return !o.active; });
  9824. * // => objects for ['fred']
  9825. *
  9826. * // The `_.matches` iteratee shorthand.
  9827. * _.filter(users, { 'age': 36, 'active': true });
  9828. * // => objects for ['barney']
  9829. *
  9830. * // The `_.matchesProperty` iteratee shorthand.
  9831. * _.filter(users, ['active', false]);
  9832. * // => objects for ['fred']
  9833. *
  9834. * // The `_.property` iteratee shorthand.
  9835. * _.filter(users, 'active');
  9836. * // => objects for ['barney']
  9837. *
  9838. * // Combining several predicates using `_.overEvery` or `_.overSome`.
  9839. * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));
  9840. * // => objects for ['fred', 'barney']
  9841. */
  9842. function filter(collection, predicate) {
  9843. var func = isArray(collection) ? arrayFilter : baseFilter;
  9844. return func(collection, getIteratee(predicate, 3));
  9845. }
  9846. /**
  9847. * Iterates over elements of `collection`, returning the first element
  9848. * `predicate` returns truthy for. The predicate is invoked with three
  9849. * arguments: (value, index|key, collection).
  9850. *
  9851. * @static
  9852. * @memberOf _
  9853. * @since 0.1.0
  9854. * @category Collection
  9855. * @param {Array|Object} collection The collection to inspect.
  9856. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  9857. * @param {number} [fromIndex=0] The index to search from.
  9858. * @returns {*} Returns the matched element, else `undefined`.
  9859. * @example
  9860. *
  9861. * var users = [
  9862. * { 'user': 'barney', 'age': 36, 'active': true },
  9863. * { 'user': 'fred', 'age': 40, 'active': false },
  9864. * { 'user': 'pebbles', 'age': 1, 'active': true }
  9865. * ];
  9866. *
  9867. * _.find(users, function(o) { return o.age < 40; });
  9868. * // => object for 'barney'
  9869. *
  9870. * // The `_.matches` iteratee shorthand.
  9871. * _.find(users, { 'age': 1, 'active': true });
  9872. * // => object for 'pebbles'
  9873. *
  9874. * // The `_.matchesProperty` iteratee shorthand.
  9875. * _.find(users, ['active', false]);
  9876. * // => object for 'fred'
  9877. *
  9878. * // The `_.property` iteratee shorthand.
  9879. * _.find(users, 'active');
  9880. * // => object for 'barney'
  9881. */
  9882. var find = createFind(findIndex);
  9883. /**
  9884. * This method is like `_.find` except that it iterates over elements of
  9885. * `collection` from right to left.
  9886. *
  9887. * @static
  9888. * @memberOf _
  9889. * @since 2.0.0
  9890. * @category Collection
  9891. * @param {Array|Object} collection The collection to inspect.
  9892. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  9893. * @param {number} [fromIndex=collection.length-1] The index to search from.
  9894. * @returns {*} Returns the matched element, else `undefined`.
  9895. * @example
  9896. *
  9897. * _.findLast([1, 2, 3, 4], function(n) {
  9898. * return n % 2 == 1;
  9899. * });
  9900. * // => 3
  9901. */
  9902. var findLast = createFind(findLastIndex);
  9903. /**
  9904. * Creates a flattened array of values by running each element in `collection`
  9905. * thru `iteratee` and flattening the mapped results. The iteratee is invoked
  9906. * with three arguments: (value, index|key, collection).
  9907. *
  9908. * @static
  9909. * @memberOf _
  9910. * @since 4.0.0
  9911. * @category Collection
  9912. * @param {Array|Object} collection The collection to iterate over.
  9913. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  9914. * @returns {Array} Returns the new flattened array.
  9915. * @example
  9916. *
  9917. * function duplicate(n) {
  9918. * return [n, n];
  9919. * }
  9920. *
  9921. * _.flatMap([1, 2], duplicate);
  9922. * // => [1, 1, 2, 2]
  9923. */
  9924. function flatMap(collection, iteratee) {
  9925. return baseFlatten(map(collection, iteratee), 1);
  9926. }
  9927. /**
  9928. * This method is like `_.flatMap` except that it recursively flattens the
  9929. * mapped results.
  9930. *
  9931. * @static
  9932. * @memberOf _
  9933. * @since 4.7.0
  9934. * @category Collection
  9935. * @param {Array|Object} collection The collection to iterate over.
  9936. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  9937. * @returns {Array} Returns the new flattened array.
  9938. * @example
  9939. *
  9940. * function duplicate(n) {
  9941. * return [[[n, n]]];
  9942. * }
  9943. *
  9944. * _.flatMapDeep([1, 2], duplicate);
  9945. * // => [1, 1, 2, 2]
  9946. */
  9947. function flatMapDeep(collection, iteratee) {
  9948. return baseFlatten(map(collection, iteratee), INFINITY);
  9949. }
  9950. /**
  9951. * This method is like `_.flatMap` except that it recursively flattens the
  9952. * mapped results up to `depth` times.
  9953. *
  9954. * @static
  9955. * @memberOf _
  9956. * @since 4.7.0
  9957. * @category Collection
  9958. * @param {Array|Object} collection The collection to iterate over.
  9959. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  9960. * @param {number} [depth=1] The maximum recursion depth.
  9961. * @returns {Array} Returns the new flattened array.
  9962. * @example
  9963. *
  9964. * function duplicate(n) {
  9965. * return [[[n, n]]];
  9966. * }
  9967. *
  9968. * _.flatMapDepth([1, 2], duplicate, 2);
  9969. * // => [[1, 1], [2, 2]]
  9970. */
  9971. function flatMapDepth(collection, iteratee, depth) {
  9972. depth = depth === undefined ? 1 : toInteger(depth);
  9973. return baseFlatten(map(collection, iteratee), depth);
  9974. }
  9975. /**
  9976. * Iterates over elements of `collection` and invokes `iteratee` for each element.
  9977. * The iteratee is invoked with three arguments: (value, index|key, collection).
  9978. * Iteratee functions may exit iteration early by explicitly returning `false`.
  9979. *
  9980. * **Note:** As with other "Collections" methods, objects with a "length"
  9981. * property are iterated like arrays. To avoid this behavior use `_.forIn`
  9982. * or `_.forOwn` for object iteration.
  9983. *
  9984. * @static
  9985. * @memberOf _
  9986. * @since 0.1.0
  9987. * @alias each
  9988. * @category Collection
  9989. * @param {Array|Object} collection The collection to iterate over.
  9990. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  9991. * @returns {Array|Object} Returns `collection`.
  9992. * @see _.forEachRight
  9993. * @example
  9994. *
  9995. * _.forEach([1, 2], function(value) {
  9996. * console.log(value);
  9997. * });
  9998. * // => Logs `1` then `2`.
  9999. *
  10000. * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
  10001. * console.log(key);
  10002. * });
  10003. * // => Logs 'a' then 'b' (iteration order is not guaranteed).
  10004. */
  10005. function forEach(collection, iteratee) {
  10006. var func = isArray(collection) ? arrayEach : baseEach;
  10007. return func(collection, getIteratee(iteratee, 3));
  10008. }
  10009. /**
  10010. * This method is like `_.forEach` except that it iterates over elements of
  10011. * `collection` from right to left.
  10012. *
  10013. * @static
  10014. * @memberOf _
  10015. * @since 2.0.0
  10016. * @alias eachRight
  10017. * @category Collection
  10018. * @param {Array|Object} collection The collection to iterate over.
  10019. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  10020. * @returns {Array|Object} Returns `collection`.
  10021. * @see _.forEach
  10022. * @example
  10023. *
  10024. * _.forEachRight([1, 2], function(value) {
  10025. * console.log(value);
  10026. * });
  10027. * // => Logs `2` then `1`.
  10028. */
  10029. function forEachRight(collection, iteratee) {
  10030. var func = isArray(collection) ? arrayEachRight : baseEachRight;
  10031. return func(collection, getIteratee(iteratee, 3));
  10032. }
  10033. /**
  10034. * Creates an object composed of keys generated from the results of running
  10035. * each element of `collection` thru `iteratee`. The order of grouped values
  10036. * is determined by the order they occur in `collection`. The corresponding
  10037. * value of each key is an array of elements responsible for generating the
  10038. * key. The iteratee is invoked with one argument: (value).
  10039. *
  10040. * @static
  10041. * @memberOf _
  10042. * @since 0.1.0
  10043. * @category Collection
  10044. * @param {Array|Object} collection The collection to iterate over.
  10045. * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
  10046. * @returns {Object} Returns the composed aggregate object.
  10047. * @example
  10048. *
  10049. * _.groupBy([6.1, 4.2, 6.3], Math.floor);
  10050. * // => { '4': [4.2], '6': [6.1, 6.3] }
  10051. *
  10052. * // The `_.property` iteratee shorthand.
  10053. * _.groupBy(['one', 'two', 'three'], 'length');
  10054. * // => { '3': ['one', 'two'], '5': ['three'] }
  10055. */
  10056. var groupBy = createAggregator(function(result, value, key) {
  10057. if (hasOwnProperty.call(result, key)) {
  10058. result[key].push(value);
  10059. } else {
  10060. baseAssignValue(result, key, [value]);
  10061. }
  10062. });
  10063. /**
  10064. * Checks if `value` is in `collection`. If `collection` is a string, it's
  10065. * checked for a substring of `value`, otherwise
  10066. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  10067. * is used for equality comparisons. If `fromIndex` is negative, it's used as
  10068. * the offset from the end of `collection`.
  10069. *
  10070. * @static
  10071. * @memberOf _
  10072. * @since 0.1.0
  10073. * @category Collection
  10074. * @param {Array|Object|string} collection The collection to inspect.
  10075. * @param {*} value The value to search for.
  10076. * @param {number} [fromIndex=0] The index to search from.
  10077. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
  10078. * @returns {boolean} Returns `true` if `value` is found, else `false`.
  10079. * @example
  10080. *
  10081. * _.includes([1, 2, 3], 1);
  10082. * // => true
  10083. *
  10084. * _.includes([1, 2, 3], 1, 2);
  10085. * // => false
  10086. *
  10087. * _.includes({ 'a': 1, 'b': 2 }, 1);
  10088. * // => true
  10089. *
  10090. * _.includes('abcd', 'bc');
  10091. * // => true
  10092. */
  10093. function includes(collection, value, fromIndex, guard) {
  10094. collection = isArrayLike(collection) ? collection : values(collection);
  10095. fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
  10096. var length = collection.length;
  10097. if (fromIndex < 0) {
  10098. fromIndex = nativeMax(length + fromIndex, 0);
  10099. }
  10100. return isString(collection)
  10101. ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
  10102. : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
  10103. }
  10104. /**
  10105. * Invokes the method at `path` of each element in `collection`, returning
  10106. * an array of the results of each invoked method. Any additional arguments
  10107. * are provided to each invoked method. If `path` is a function, it's invoked
  10108. * for, and `this` bound to, each element in `collection`.
  10109. *
  10110. * @static
  10111. * @memberOf _
  10112. * @since 4.0.0
  10113. * @category Collection
  10114. * @param {Array|Object} collection The collection to iterate over.
  10115. * @param {Array|Function|string} path The path of the method to invoke or
  10116. * the function invoked per iteration.
  10117. * @param {...*} [args] The arguments to invoke each method with.
  10118. * @returns {Array} Returns the array of results.
  10119. * @example
  10120. *
  10121. * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
  10122. * // => [[1, 5, 7], [1, 2, 3]]
  10123. *
  10124. * _.invokeMap([123, 456], String.prototype.split, '');
  10125. * // => [['1', '2', '3'], ['4', '5', '6']]
  10126. */
  10127. var invokeMap = baseRest(function(collection, path, args) {
  10128. var index = -1,
  10129. isFunc = typeof path == 'function',
  10130. result = isArrayLike(collection) ? Array(collection.length) : [];
  10131. baseEach(collection, function(value) {
  10132. result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
  10133. });
  10134. return result;
  10135. });
  10136. /**
  10137. * Creates an object composed of keys generated from the results of running
  10138. * each element of `collection` thru `iteratee`. The corresponding value of
  10139. * each key is the last element responsible for generating the key. The
  10140. * iteratee is invoked with one argument: (value).
  10141. *
  10142. * @static
  10143. * @memberOf _
  10144. * @since 4.0.0
  10145. * @category Collection
  10146. * @param {Array|Object} collection The collection to iterate over.
  10147. * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
  10148. * @returns {Object} Returns the composed aggregate object.
  10149. * @example
  10150. *
  10151. * var array = [
  10152. * { 'dir': 'left', 'code': 97 },
  10153. * { 'dir': 'right', 'code': 100 }
  10154. * ];
  10155. *
  10156. * _.keyBy(array, function(o) {
  10157. * return String.fromCharCode(o.code);
  10158. * });
  10159. * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
  10160. *
  10161. * _.keyBy(array, 'dir');
  10162. * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
  10163. */
  10164. var keyBy = createAggregator(function(result, value, key) {
  10165. baseAssignValue(result, key, value);
  10166. });
  10167. /**
  10168. * Creates an array of values by running each element in `collection` thru
  10169. * `iteratee`. The iteratee is invoked with three arguments:
  10170. * (value, index|key, collection).
  10171. *
  10172. * Many lodash methods are guarded to work as iteratees for methods like
  10173. * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
  10174. *
  10175. * The guarded methods are:
  10176. * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
  10177. * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
  10178. * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
  10179. * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
  10180. *
  10181. * @static
  10182. * @memberOf _
  10183. * @since 0.1.0
  10184. * @category Collection
  10185. * @param {Array|Object} collection The collection to iterate over.
  10186. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  10187. * @returns {Array} Returns the new mapped array.
  10188. * @example
  10189. *
  10190. * function square(n) {
  10191. * return n * n;
  10192. * }
  10193. *
  10194. * _.map([4, 8], square);
  10195. * // => [16, 64]
  10196. *
  10197. * _.map({ 'a': 4, 'b': 8 }, square);
  10198. * // => [16, 64] (iteration order is not guaranteed)
  10199. *
  10200. * var users = [
  10201. * { 'user': 'barney' },
  10202. * { 'user': 'fred' }
  10203. * ];
  10204. *
  10205. * // The `_.property` iteratee shorthand.
  10206. * _.map(users, 'user');
  10207. * // => ['barney', 'fred']
  10208. */
  10209. function map(collection, iteratee) {
  10210. var func = isArray(collection) ? arrayMap : baseMap;
  10211. return func(collection, getIteratee(iteratee, 3));
  10212. }
  10213. /**
  10214. * This method is like `_.sortBy` except that it allows specifying the sort
  10215. * orders of the iteratees to sort by. If `orders` is unspecified, all values
  10216. * are sorted in ascending order. Otherwise, specify an order of "desc" for
  10217. * descending or "asc" for ascending sort order of corresponding values.
  10218. *
  10219. * @static
  10220. * @memberOf _
  10221. * @since 4.0.0
  10222. * @category Collection
  10223. * @param {Array|Object} collection The collection to iterate over.
  10224. * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
  10225. * The iteratees to sort by.
  10226. * @param {string[]} [orders] The sort orders of `iteratees`.
  10227. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
  10228. * @returns {Array} Returns the new sorted array.
  10229. * @example
  10230. *
  10231. * var users = [
  10232. * { 'user': 'fred', 'age': 48 },
  10233. * { 'user': 'barney', 'age': 34 },
  10234. * { 'user': 'fred', 'age': 40 },
  10235. * { 'user': 'barney', 'age': 36 }
  10236. * ];
  10237. *
  10238. * // Sort by `user` in ascending order and by `age` in descending order.
  10239. * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
  10240. * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
  10241. */
  10242. function orderBy(collection, iteratees, orders, guard) {
  10243. if (collection == null) {
  10244. return [];
  10245. }
  10246. if (!isArray(iteratees)) {
  10247. iteratees = iteratees == null ? [] : [iteratees];
  10248. }
  10249. orders = guard ? undefined : orders;
  10250. if (!isArray(orders)) {
  10251. orders = orders == null ? [] : [orders];
  10252. }
  10253. return baseOrderBy(collection, iteratees, orders);
  10254. }
  10255. /**
  10256. * Creates an array of elements split into two groups, the first of which
  10257. * contains elements `predicate` returns truthy for, the second of which
  10258. * contains elements `predicate` returns falsey for. The predicate is
  10259. * invoked with one argument: (value).
  10260. *
  10261. * @static
  10262. * @memberOf _
  10263. * @since 3.0.0
  10264. * @category Collection
  10265. * @param {Array|Object} collection The collection to iterate over.
  10266. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  10267. * @returns {Array} Returns the array of grouped elements.
  10268. * @example
  10269. *
  10270. * var users = [
  10271. * { 'user': 'barney', 'age': 36, 'active': false },
  10272. * { 'user': 'fred', 'age': 40, 'active': true },
  10273. * { 'user': 'pebbles', 'age': 1, 'active': false }
  10274. * ];
  10275. *
  10276. * _.partition(users, function(o) { return o.active; });
  10277. * // => objects for [['fred'], ['barney', 'pebbles']]
  10278. *
  10279. * // The `_.matches` iteratee shorthand.
  10280. * _.partition(users, { 'age': 1, 'active': false });
  10281. * // => objects for [['pebbles'], ['barney', 'fred']]
  10282. *
  10283. * // The `_.matchesProperty` iteratee shorthand.
  10284. * _.partition(users, ['active', false]);
  10285. * // => objects for [['barney', 'pebbles'], ['fred']]
  10286. *
  10287. * // The `_.property` iteratee shorthand.
  10288. * _.partition(users, 'active');
  10289. * // => objects for [['fred'], ['barney', 'pebbles']]
  10290. */
  10291. var partition = createAggregator(function(result, value, key) {
  10292. result[key ? 0 : 1].push(value);
  10293. }, function() { return [[], []]; });
  10294. /**
  10295. * Reduces `collection` to a value which is the accumulated result of running
  10296. * each element in `collection` thru `iteratee`, where each successive
  10297. * invocation is supplied the return value of the previous. If `accumulator`
  10298. * is not given, the first element of `collection` is used as the initial
  10299. * value. The iteratee is invoked with four arguments:
  10300. * (accumulator, value, index|key, collection).
  10301. *
  10302. * Many lodash methods are guarded to work as iteratees for methods like
  10303. * `_.reduce`, `_.reduceRight`, and `_.transform`.
  10304. *
  10305. * The guarded methods are:
  10306. * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
  10307. * and `sortBy`
  10308. *
  10309. * @static
  10310. * @memberOf _
  10311. * @since 0.1.0
  10312. * @category Collection
  10313. * @param {Array|Object} collection The collection to iterate over.
  10314. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  10315. * @param {*} [accumulator] The initial value.
  10316. * @returns {*} Returns the accumulated value.
  10317. * @see _.reduceRight
  10318. * @example
  10319. *
  10320. * _.reduce([1, 2], function(sum, n) {
  10321. * return sum + n;
  10322. * }, 0);
  10323. * // => 3
  10324. *
  10325. * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
  10326. * (result[value] || (result[value] = [])).push(key);
  10327. * return result;
  10328. * }, {});
  10329. * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
  10330. */
  10331. function reduce(collection, iteratee, accumulator) {
  10332. var func = isArray(collection) ? arrayReduce : baseReduce,
  10333. initAccum = arguments.length < 3;
  10334. return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
  10335. }
  10336. /**
  10337. * This method is like `_.reduce` except that it iterates over elements of
  10338. * `collection` from right to left.
  10339. *
  10340. * @static
  10341. * @memberOf _
  10342. * @since 0.1.0
  10343. * @category Collection
  10344. * @param {Array|Object} collection The collection to iterate over.
  10345. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  10346. * @param {*} [accumulator] The initial value.
  10347. * @returns {*} Returns the accumulated value.
  10348. * @see _.reduce
  10349. * @example
  10350. *
  10351. * var array = [[0, 1], [2, 3], [4, 5]];
  10352. *
  10353. * _.reduceRight(array, function(flattened, other) {
  10354. * return flattened.concat(other);
  10355. * }, []);
  10356. * // => [4, 5, 2, 3, 0, 1]
  10357. */
  10358. function reduceRight(collection, iteratee, accumulator) {
  10359. var func = isArray(collection) ? arrayReduceRight : baseReduce,
  10360. initAccum = arguments.length < 3;
  10361. return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
  10362. }
  10363. /**
  10364. * The opposite of `_.filter`; this method returns the elements of `collection`
  10365. * that `predicate` does **not** return truthy for.
  10366. *
  10367. * @static
  10368. * @memberOf _
  10369. * @since 0.1.0
  10370. * @category Collection
  10371. * @param {Array|Object} collection The collection to iterate over.
  10372. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  10373. * @returns {Array} Returns the new filtered array.
  10374. * @see _.filter
  10375. * @example
  10376. *
  10377. * var users = [
  10378. * { 'user': 'barney', 'age': 36, 'active': false },
  10379. * { 'user': 'fred', 'age': 40, 'active': true }
  10380. * ];
  10381. *
  10382. * _.reject(users, function(o) { return !o.active; });
  10383. * // => objects for ['fred']
  10384. *
  10385. * // The `_.matches` iteratee shorthand.
  10386. * _.reject(users, { 'age': 40, 'active': true });
  10387. * // => objects for ['barney']
  10388. *
  10389. * // The `_.matchesProperty` iteratee shorthand.
  10390. * _.reject(users, ['active', false]);
  10391. * // => objects for ['fred']
  10392. *
  10393. * // The `_.property` iteratee shorthand.
  10394. * _.reject(users, 'active');
  10395. * // => objects for ['barney']
  10396. */
  10397. function reject(collection, predicate) {
  10398. var func = isArray(collection) ? arrayFilter : baseFilter;
  10399. return func(collection, negate(getIteratee(predicate, 3)));
  10400. }
  10401. /**
  10402. * Gets a random element from `collection`.
  10403. *
  10404. * @static
  10405. * @memberOf _
  10406. * @since 2.0.0
  10407. * @category Collection
  10408. * @param {Array|Object} collection The collection to sample.
  10409. * @returns {*} Returns the random element.
  10410. * @example
  10411. *
  10412. * _.sample([1, 2, 3, 4]);
  10413. * // => 2
  10414. */
  10415. function sample(collection) {
  10416. var func = isArray(collection) ? arraySample : baseSample;
  10417. return func(collection);
  10418. }
  10419. /**
  10420. * Gets `n` random elements at unique keys from `collection` up to the
  10421. * size of `collection`.
  10422. *
  10423. * @static
  10424. * @memberOf _
  10425. * @since 4.0.0
  10426. * @category Collection
  10427. * @param {Array|Object} collection The collection to sample.
  10428. * @param {number} [n=1] The number of elements to sample.
  10429. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  10430. * @returns {Array} Returns the random elements.
  10431. * @example
  10432. *
  10433. * _.sampleSize([1, 2, 3], 2);
  10434. * // => [3, 1]
  10435. *
  10436. * _.sampleSize([1, 2, 3], 4);
  10437. * // => [2, 3, 1]
  10438. */
  10439. function sampleSize(collection, n, guard) {
  10440. if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
  10441. n = 1;
  10442. } else {
  10443. n = toInteger(n);
  10444. }
  10445. var func = isArray(collection) ? arraySampleSize : baseSampleSize;
  10446. return func(collection, n);
  10447. }
  10448. /**
  10449. * Creates an array of shuffled values, using a version of the
  10450. * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
  10451. *
  10452. * @static
  10453. * @memberOf _
  10454. * @since 0.1.0
  10455. * @category Collection
  10456. * @param {Array|Object} collection The collection to shuffle.
  10457. * @returns {Array} Returns the new shuffled array.
  10458. * @example
  10459. *
  10460. * _.shuffle([1, 2, 3, 4]);
  10461. * // => [4, 1, 3, 2]
  10462. */
  10463. function shuffle(collection) {
  10464. var func = isArray(collection) ? arrayShuffle : baseShuffle;
  10465. return func(collection);
  10466. }
  10467. /**
  10468. * Gets the size of `collection` by returning its length for array-like
  10469. * values or the number of own enumerable string keyed properties for objects.
  10470. *
  10471. * @static
  10472. * @memberOf _
  10473. * @since 0.1.0
  10474. * @category Collection
  10475. * @param {Array|Object|string} collection The collection to inspect.
  10476. * @returns {number} Returns the collection size.
  10477. * @example
  10478. *
  10479. * _.size([1, 2, 3]);
  10480. * // => 3
  10481. *
  10482. * _.size({ 'a': 1, 'b': 2 });
  10483. * // => 2
  10484. *
  10485. * _.size('pebbles');
  10486. * // => 7
  10487. */
  10488. function size(collection) {
  10489. if (collection == null) {
  10490. return 0;
  10491. }
  10492. if (isArrayLike(collection)) {
  10493. return isString(collection) ? stringSize(collection) : collection.length;
  10494. }
  10495. var tag = getTag(collection);
  10496. if (tag == mapTag || tag == setTag) {
  10497. return collection.size;
  10498. }
  10499. return baseKeys(collection).length;
  10500. }
  10501. /**
  10502. * Checks if `predicate` returns truthy for **any** element of `collection`.
  10503. * Iteration is stopped once `predicate` returns truthy. The predicate is
  10504. * invoked with three arguments: (value, index|key, collection).
  10505. *
  10506. * @static
  10507. * @memberOf _
  10508. * @since 0.1.0
  10509. * @category Collection
  10510. * @param {Array|Object} collection The collection to iterate over.
  10511. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  10512. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  10513. * @returns {boolean} Returns `true` if any element passes the predicate check,
  10514. * else `false`.
  10515. * @example
  10516. *
  10517. * _.some([null, 0, 'yes', false], Boolean);
  10518. * // => true
  10519. *
  10520. * var users = [
  10521. * { 'user': 'barney', 'active': true },
  10522. * { 'user': 'fred', 'active': false }
  10523. * ];
  10524. *
  10525. * // The `_.matches` iteratee shorthand.
  10526. * _.some(users, { 'user': 'barney', 'active': false });
  10527. * // => false
  10528. *
  10529. * // The `_.matchesProperty` iteratee shorthand.
  10530. * _.some(users, ['active', false]);
  10531. * // => true
  10532. *
  10533. * // The `_.property` iteratee shorthand.
  10534. * _.some(users, 'active');
  10535. * // => true
  10536. */
  10537. function some(collection, predicate, guard) {
  10538. var func = isArray(collection) ? arraySome : baseSome;
  10539. if (guard && isIterateeCall(collection, predicate, guard)) {
  10540. predicate = undefined;
  10541. }
  10542. return func(collection, getIteratee(predicate, 3));
  10543. }
  10544. /**
  10545. * Creates an array of elements, sorted in ascending order by the results of
  10546. * running each element in a collection thru each iteratee. This method
  10547. * performs a stable sort, that is, it preserves the original sort order of
  10548. * equal elements. The iteratees are invoked with one argument: (value).
  10549. *
  10550. * @static
  10551. * @memberOf _
  10552. * @since 0.1.0
  10553. * @category Collection
  10554. * @param {Array|Object} collection The collection to iterate over.
  10555. * @param {...(Function|Function[])} [iteratees=[_.identity]]
  10556. * The iteratees to sort by.
  10557. * @returns {Array} Returns the new sorted array.
  10558. * @example
  10559. *
  10560. * var users = [
  10561. * { 'user': 'fred', 'age': 48 },
  10562. * { 'user': 'barney', 'age': 36 },
  10563. * { 'user': 'fred', 'age': 30 },
  10564. * { 'user': 'barney', 'age': 34 }
  10565. * ];
  10566. *
  10567. * _.sortBy(users, [function(o) { return o.user; }]);
  10568. * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
  10569. *
  10570. * _.sortBy(users, ['user', 'age']);
  10571. * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
  10572. */
  10573. var sortBy = baseRest(function(collection, iteratees) {
  10574. if (collection == null) {
  10575. return [];
  10576. }
  10577. var length = iteratees.length;
  10578. if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
  10579. iteratees = [];
  10580. } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
  10581. iteratees = [iteratees[0]];
  10582. }
  10583. return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
  10584. });
  10585. /*------------------------------------------------------------------------*/
  10586. /**
  10587. * Gets the timestamp of the number of milliseconds that have elapsed since
  10588. * the Unix epoch (1 January 1970 00:00:00 UTC).
  10589. *
  10590. * @static
  10591. * @memberOf _
  10592. * @since 2.4.0
  10593. * @category Date
  10594. * @returns {number} Returns the timestamp.
  10595. * @example
  10596. *
  10597. * _.defer(function(stamp) {
  10598. * console.log(_.now() - stamp);
  10599. * }, _.now());
  10600. * // => Logs the number of milliseconds it took for the deferred invocation.
  10601. */
  10602. var now = ctxNow || function() {
  10603. return root.Date.now();
  10604. };
  10605. /*------------------------------------------------------------------------*/
  10606. /**
  10607. * The opposite of `_.before`; this method creates a function that invokes
  10608. * `func` once it's called `n` or more times.
  10609. *
  10610. * @static
  10611. * @memberOf _
  10612. * @since 0.1.0
  10613. * @category Function
  10614. * @param {number} n The number of calls before `func` is invoked.
  10615. * @param {Function} func The function to restrict.
  10616. * @returns {Function} Returns the new restricted function.
  10617. * @example
  10618. *
  10619. * var saves = ['profile', 'settings'];
  10620. *
  10621. * var done = _.after(saves.length, function() {
  10622. * console.log('done saving!');
  10623. * });
  10624. *
  10625. * _.forEach(saves, function(type) {
  10626. * asyncSave({ 'type': type, 'complete': done });
  10627. * });
  10628. * // => Logs 'done saving!' after the two async saves have completed.
  10629. */
  10630. function after(n, func) {
  10631. if (typeof func != 'function') {
  10632. throw new TypeError(FUNC_ERROR_TEXT);
  10633. }
  10634. n = toInteger(n);
  10635. return function() {
  10636. if (--n < 1) {
  10637. return func.apply(this, arguments);
  10638. }
  10639. };
  10640. }
  10641. /**
  10642. * Creates a function that invokes `func`, with up to `n` arguments,
  10643. * ignoring any additional arguments.
  10644. *
  10645. * @static
  10646. * @memberOf _
  10647. * @since 3.0.0
  10648. * @category Function
  10649. * @param {Function} func The function to cap arguments for.
  10650. * @param {number} [n=func.length] The arity cap.
  10651. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  10652. * @returns {Function} Returns the new capped function.
  10653. * @example
  10654. *
  10655. * _.map(['6', '8', '10'], _.ary(parseInt, 1));
  10656. * // => [6, 8, 10]
  10657. */
  10658. function ary(func, n, guard) {
  10659. n = guard ? undefined : n;
  10660. n = (func && n == null) ? func.length : n;
  10661. return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
  10662. }
  10663. /**
  10664. * Creates a function that invokes `func`, with the `this` binding and arguments
  10665. * of the created function, while it's called less than `n` times. Subsequent
  10666. * calls to the created function return the result of the last `func` invocation.
  10667. *
  10668. * @static
  10669. * @memberOf _
  10670. * @since 3.0.0
  10671. * @category Function
  10672. * @param {number} n The number of calls at which `func` is no longer invoked.
  10673. * @param {Function} func The function to restrict.
  10674. * @returns {Function} Returns the new restricted function.
  10675. * @example
  10676. *
  10677. * jQuery(element).on('click', _.before(5, addContactToList));
  10678. * // => Allows adding up to 4 contacts to the list.
  10679. */
  10680. function before(n, func) {
  10681. var result;
  10682. if (typeof func != 'function') {
  10683. throw new TypeError(FUNC_ERROR_TEXT);
  10684. }
  10685. n = toInteger(n);
  10686. return function() {
  10687. if (--n > 0) {
  10688. result = func.apply(this, arguments);
  10689. }
  10690. if (n <= 1) {
  10691. func = undefined;
  10692. }
  10693. return result;
  10694. };
  10695. }
  10696. /**
  10697. * Creates a function that invokes `func` with the `this` binding of `thisArg`
  10698. * and `partials` prepended to the arguments it receives.
  10699. *
  10700. * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
  10701. * may be used as a placeholder for partially applied arguments.
  10702. *
  10703. * **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
  10704. * property of bound functions.
  10705. *
  10706. * @static
  10707. * @memberOf _
  10708. * @since 0.1.0
  10709. * @category Function
  10710. * @param {Function} func The function to bind.
  10711. * @param {*} thisArg The `this` binding of `func`.
  10712. * @param {...*} [partials] The arguments to be partially applied.
  10713. * @returns {Function} Returns the new bound function.
  10714. * @example
  10715. *
  10716. * function greet(greeting, punctuation) {
  10717. * return greeting + ' ' + this.user + punctuation;
  10718. * }
  10719. *
  10720. * var object = { 'user': 'fred' };
  10721. *
  10722. * var bound = _.bind(greet, object, 'hi');
  10723. * bound('!');
  10724. * // => 'hi fred!'
  10725. *
  10726. * // Bound with placeholders.
  10727. * var bound = _.bind(greet, object, _, '!');
  10728. * bound('hi');
  10729. * // => 'hi fred!'
  10730. */
  10731. var bind = baseRest(function(func, thisArg, partials) {
  10732. var bitmask = WRAP_BIND_FLAG;
  10733. if (partials.length) {
  10734. var holders = replaceHolders(partials, getHolder(bind));
  10735. bitmask |= WRAP_PARTIAL_FLAG;
  10736. }
  10737. return createWrap(func, bitmask, thisArg, partials, holders);
  10738. });
  10739. /**
  10740. * Creates a function that invokes the method at `object[key]` with `partials`
  10741. * prepended to the arguments it receives.
  10742. *
  10743. * This method differs from `_.bind` by allowing bound functions to reference
  10744. * methods that may be redefined or don't yet exist. See
  10745. * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
  10746. * for more details.
  10747. *
  10748. * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
  10749. * builds, may be used as a placeholder for partially applied arguments.
  10750. *
  10751. * @static
  10752. * @memberOf _
  10753. * @since 0.10.0
  10754. * @category Function
  10755. * @param {Object} object The object to invoke the method on.
  10756. * @param {string} key The key of the method.
  10757. * @param {...*} [partials] The arguments to be partially applied.
  10758. * @returns {Function} Returns the new bound function.
  10759. * @example
  10760. *
  10761. * var object = {
  10762. * 'user': 'fred',
  10763. * 'greet': function(greeting, punctuation) {
  10764. * return greeting + ' ' + this.user + punctuation;
  10765. * }
  10766. * };
  10767. *
  10768. * var bound = _.bindKey(object, 'greet', 'hi');
  10769. * bound('!');
  10770. * // => 'hi fred!'
  10771. *
  10772. * object.greet = function(greeting, punctuation) {
  10773. * return greeting + 'ya ' + this.user + punctuation;
  10774. * };
  10775. *
  10776. * bound('!');
  10777. * // => 'hiya fred!'
  10778. *
  10779. * // Bound with placeholders.
  10780. * var bound = _.bindKey(object, 'greet', _, '!');
  10781. * bound('hi');
  10782. * // => 'hiya fred!'
  10783. */
  10784. var bindKey = baseRest(function(object, key, partials) {
  10785. var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
  10786. if (partials.length) {
  10787. var holders = replaceHolders(partials, getHolder(bindKey));
  10788. bitmask |= WRAP_PARTIAL_FLAG;
  10789. }
  10790. return createWrap(key, bitmask, object, partials, holders);
  10791. });
  10792. /**
  10793. * Creates a function that accepts arguments of `func` and either invokes
  10794. * `func` returning its result, if at least `arity` number of arguments have
  10795. * been provided, or returns a function that accepts the remaining `func`
  10796. * arguments, and so on. The arity of `func` may be specified if `func.length`
  10797. * is not sufficient.
  10798. *
  10799. * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
  10800. * may be used as a placeholder for provided arguments.
  10801. *
  10802. * **Note:** This method doesn't set the "length" property of curried functions.
  10803. *
  10804. * @static
  10805. * @memberOf _
  10806. * @since 2.0.0
  10807. * @category Function
  10808. * @param {Function} func The function to curry.
  10809. * @param {number} [arity=func.length] The arity of `func`.
  10810. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  10811. * @returns {Function} Returns the new curried function.
  10812. * @example
  10813. *
  10814. * var abc = function(a, b, c) {
  10815. * return [a, b, c];
  10816. * };
  10817. *
  10818. * var curried = _.curry(abc);
  10819. *
  10820. * curried(1)(2)(3);
  10821. * // => [1, 2, 3]
  10822. *
  10823. * curried(1, 2)(3);
  10824. * // => [1, 2, 3]
  10825. *
  10826. * curried(1, 2, 3);
  10827. * // => [1, 2, 3]
  10828. *
  10829. * // Curried with placeholders.
  10830. * curried(1)(_, 3)(2);
  10831. * // => [1, 2, 3]
  10832. */
  10833. function curry(func, arity, guard) {
  10834. arity = guard ? undefined : arity;
  10835. var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
  10836. result.placeholder = curry.placeholder;
  10837. return result;
  10838. }
  10839. /**
  10840. * This method is like `_.curry` except that arguments are applied to `func`
  10841. * in the manner of `_.partialRight` instead of `_.partial`.
  10842. *
  10843. * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
  10844. * builds, may be used as a placeholder for provided arguments.
  10845. *
  10846. * **Note:** This method doesn't set the "length" property of curried functions.
  10847. *
  10848. * @static
  10849. * @memberOf _
  10850. * @since 3.0.0
  10851. * @category Function
  10852. * @param {Function} func The function to curry.
  10853. * @param {number} [arity=func.length] The arity of `func`.
  10854. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  10855. * @returns {Function} Returns the new curried function.
  10856. * @example
  10857. *
  10858. * var abc = function(a, b, c) {
  10859. * return [a, b, c];
  10860. * };
  10861. *
  10862. * var curried = _.curryRight(abc);
  10863. *
  10864. * curried(3)(2)(1);
  10865. * // => [1, 2, 3]
  10866. *
  10867. * curried(2, 3)(1);
  10868. * // => [1, 2, 3]
  10869. *
  10870. * curried(1, 2, 3);
  10871. * // => [1, 2, 3]
  10872. *
  10873. * // Curried with placeholders.
  10874. * curried(3)(1, _)(2);
  10875. * // => [1, 2, 3]
  10876. */
  10877. function curryRight(func, arity, guard) {
  10878. arity = guard ? undefined : arity;
  10879. var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
  10880. result.placeholder = curryRight.placeholder;
  10881. return result;
  10882. }
  10883. /**
  10884. * Creates a debounced function that delays invoking `func` until after `wait`
  10885. * milliseconds have elapsed since the last time the debounced function was
  10886. * invoked. The debounced function comes with a `cancel` method to cancel
  10887. * delayed `func` invocations and a `flush` method to immediately invoke them.
  10888. * Provide `options` to indicate whether `func` should be invoked on the
  10889. * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
  10890. * with the last arguments provided to the debounced function. Subsequent
  10891. * calls to the debounced function return the result of the last `func`
  10892. * invocation.
  10893. *
  10894. * **Note:** If `leading` and `trailing` options are `true`, `func` is
  10895. * invoked on the trailing edge of the timeout only if the debounced function
  10896. * is invoked more than once during the `wait` timeout.
  10897. *
  10898. * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
  10899. * until to the next tick, similar to `setTimeout` with a timeout of `0`.
  10900. *
  10901. * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
  10902. * for details over the differences between `_.debounce` and `_.throttle`.
  10903. *
  10904. * @static
  10905. * @memberOf _
  10906. * @since 0.1.0
  10907. * @category Function
  10908. * @param {Function} func The function to debounce.
  10909. * @param {number} [wait=0] The number of milliseconds to delay.
  10910. * @param {Object} [options={}] The options object.
  10911. * @param {boolean} [options.leading=false]
  10912. * Specify invoking on the leading edge of the timeout.
  10913. * @param {number} [options.maxWait]
  10914. * The maximum time `func` is allowed to be delayed before it's invoked.
  10915. * @param {boolean} [options.trailing=true]
  10916. * Specify invoking on the trailing edge of the timeout.
  10917. * @returns {Function} Returns the new debounced function.
  10918. * @example
  10919. *
  10920. * // Avoid costly calculations while the window size is in flux.
  10921. * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
  10922. *
  10923. * // Invoke `sendMail` when clicked, debouncing subsequent calls.
  10924. * jQuery(element).on('click', _.debounce(sendMail, 300, {
  10925. * 'leading': true,
  10926. * 'trailing': false
  10927. * }));
  10928. *
  10929. * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
  10930. * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
  10931. * var source = new EventSource('/stream');
  10932. * jQuery(source).on('message', debounced);
  10933. *
  10934. * // Cancel the trailing debounced invocation.
  10935. * jQuery(window).on('popstate', debounced.cancel);
  10936. */
  10937. function debounce(func, wait, options) {
  10938. var lastArgs,
  10939. lastThis,
  10940. maxWait,
  10941. result,
  10942. timerId,
  10943. lastCallTime,
  10944. lastInvokeTime = 0,
  10945. leading = false,
  10946. maxing = false,
  10947. trailing = true;
  10948. if (typeof func != 'function') {
  10949. throw new TypeError(FUNC_ERROR_TEXT);
  10950. }
  10951. wait = toNumber(wait) || 0;
  10952. if (isObject(options)) {
  10953. leading = !!options.leading;
  10954. maxing = 'maxWait' in options;
  10955. maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
  10956. trailing = 'trailing' in options ? !!options.trailing : trailing;
  10957. }
  10958. function invokeFunc(time) {
  10959. var args = lastArgs,
  10960. thisArg = lastThis;
  10961. lastArgs = lastThis = undefined;
  10962. lastInvokeTime = time;
  10963. result = func.apply(thisArg, args);
  10964. return result;
  10965. }
  10966. function leadingEdge(time) {
  10967. // Reset any `maxWait` timer.
  10968. lastInvokeTime = time;
  10969. // Start the timer for the trailing edge.
  10970. timerId = setTimeout(timerExpired, wait);
  10971. // Invoke the leading edge.
  10972. return leading ? invokeFunc(time) : result;
  10973. }
  10974. function remainingWait(time) {
  10975. var timeSinceLastCall = time - lastCallTime,
  10976. timeSinceLastInvoke = time - lastInvokeTime,
  10977. timeWaiting = wait - timeSinceLastCall;
  10978. return maxing
  10979. ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
  10980. : timeWaiting;
  10981. }
  10982. function shouldInvoke(time) {
  10983. var timeSinceLastCall = time - lastCallTime,
  10984. timeSinceLastInvoke = time - lastInvokeTime;
  10985. // Either this is the first call, activity has stopped and we're at the
  10986. // trailing edge, the system time has gone backwards and we're treating
  10987. // it as the trailing edge, or we've hit the `maxWait` limit.
  10988. return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
  10989. (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
  10990. }
  10991. function timerExpired() {
  10992. var time = now();
  10993. if (shouldInvoke(time)) {
  10994. return trailingEdge(time);
  10995. }
  10996. // Restart the timer.
  10997. timerId = setTimeout(timerExpired, remainingWait(time));
  10998. }
  10999. function trailingEdge(time) {
  11000. timerId = undefined;
  11001. // Only invoke if we have `lastArgs` which means `func` has been
  11002. // debounced at least once.
  11003. if (trailing && lastArgs) {
  11004. return invokeFunc(time);
  11005. }
  11006. lastArgs = lastThis = undefined;
  11007. return result;
  11008. }
  11009. function cancel() {
  11010. if (timerId !== undefined) {
  11011. clearTimeout(timerId);
  11012. }
  11013. lastInvokeTime = 0;
  11014. lastArgs = lastCallTime = lastThis = timerId = undefined;
  11015. }
  11016. function flush() {
  11017. return timerId === undefined ? result : trailingEdge(now());
  11018. }
  11019. function debounced() {
  11020. var time = now(),
  11021. isInvoking = shouldInvoke(time);
  11022. lastArgs = arguments;
  11023. lastThis = this;
  11024. lastCallTime = time;
  11025. if (isInvoking) {
  11026. if (timerId === undefined) {
  11027. return leadingEdge(lastCallTime);
  11028. }
  11029. if (maxing) {
  11030. // Handle invocations in a tight loop.
  11031. clearTimeout(timerId);
  11032. timerId = setTimeout(timerExpired, wait);
  11033. return invokeFunc(lastCallTime);
  11034. }
  11035. }
  11036. if (timerId === undefined) {
  11037. timerId = setTimeout(timerExpired, wait);
  11038. }
  11039. return result;
  11040. }
  11041. debounced.cancel = cancel;
  11042. debounced.flush = flush;
  11043. return debounced;
  11044. }
  11045. /**
  11046. * Defers invoking the `func` until the current call stack has cleared. Any
  11047. * additional arguments are provided to `func` when it's invoked.
  11048. *
  11049. * @static
  11050. * @memberOf _
  11051. * @since 0.1.0
  11052. * @category Function
  11053. * @param {Function} func The function to defer.
  11054. * @param {...*} [args] The arguments to invoke `func` with.
  11055. * @returns {number} Returns the timer id.
  11056. * @example
  11057. *
  11058. * _.defer(function(text) {
  11059. * console.log(text);
  11060. * }, 'deferred');
  11061. * // => Logs 'deferred' after one millisecond.
  11062. */
  11063. var defer = baseRest(function(func, args) {
  11064. return baseDelay(func, 1, args);
  11065. });
  11066. /**
  11067. * Invokes `func` after `wait` milliseconds. Any additional arguments are
  11068. * provided to `func` when it's invoked.
  11069. *
  11070. * @static
  11071. * @memberOf _
  11072. * @since 0.1.0
  11073. * @category Function
  11074. * @param {Function} func The function to delay.
  11075. * @param {number} wait The number of milliseconds to delay invocation.
  11076. * @param {...*} [args] The arguments to invoke `func` with.
  11077. * @returns {number} Returns the timer id.
  11078. * @example
  11079. *
  11080. * _.delay(function(text) {
  11081. * console.log(text);
  11082. * }, 1000, 'later');
  11083. * // => Logs 'later' after one second.
  11084. */
  11085. var delay = baseRest(function(func, wait, args) {
  11086. return baseDelay(func, toNumber(wait) || 0, args);
  11087. });
  11088. /**
  11089. * Creates a function that invokes `func` with arguments reversed.
  11090. *
  11091. * @static
  11092. * @memberOf _
  11093. * @since 4.0.0
  11094. * @category Function
  11095. * @param {Function} func The function to flip arguments for.
  11096. * @returns {Function} Returns the new flipped function.
  11097. * @example
  11098. *
  11099. * var flipped = _.flip(function() {
  11100. * return _.toArray(arguments);
  11101. * });
  11102. *
  11103. * flipped('a', 'b', 'c', 'd');
  11104. * // => ['d', 'c', 'b', 'a']
  11105. */
  11106. function flip(func) {
  11107. return createWrap(func, WRAP_FLIP_FLAG);
  11108. }
  11109. /**
  11110. * Creates a function that memoizes the result of `func`. If `resolver` is
  11111. * provided, it determines the cache key for storing the result based on the
  11112. * arguments provided to the memoized function. By default, the first argument
  11113. * provided to the memoized function is used as the map cache key. The `func`
  11114. * is invoked with the `this` binding of the memoized function.
  11115. *
  11116. * **Note:** The cache is exposed as the `cache` property on the memoized
  11117. * function. Its creation may be customized by replacing the `_.memoize.Cache`
  11118. * constructor with one whose instances implement the
  11119. * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
  11120. * method interface of `clear`, `delete`, `get`, `has`, and `set`.
  11121. *
  11122. * @static
  11123. * @memberOf _
  11124. * @since 0.1.0
  11125. * @category Function
  11126. * @param {Function} func The function to have its output memoized.
  11127. * @param {Function} [resolver] The function to resolve the cache key.
  11128. * @returns {Function} Returns the new memoized function.
  11129. * @example
  11130. *
  11131. * var object = { 'a': 1, 'b': 2 };
  11132. * var other = { 'c': 3, 'd': 4 };
  11133. *
  11134. * var values = _.memoize(_.values);
  11135. * values(object);
  11136. * // => [1, 2]
  11137. *
  11138. * values(other);
  11139. * // => [3, 4]
  11140. *
  11141. * object.a = 2;
  11142. * values(object);
  11143. * // => [1, 2]
  11144. *
  11145. * // Modify the result cache.
  11146. * values.cache.set(object, ['a', 'b']);
  11147. * values(object);
  11148. * // => ['a', 'b']
  11149. *
  11150. * // Replace `_.memoize.Cache`.
  11151. * _.memoize.Cache = WeakMap;
  11152. */
  11153. function memoize(func, resolver) {
  11154. if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
  11155. throw new TypeError(FUNC_ERROR_TEXT);
  11156. }
  11157. var memoized = function() {
  11158. var args = arguments,
  11159. key = resolver ? resolver.apply(this, args) : args[0],
  11160. cache = memoized.cache;
  11161. if (cache.has(key)) {
  11162. return cache.get(key);
  11163. }
  11164. var result = func.apply(this, args);
  11165. memoized.cache = cache.set(key, result) || cache;
  11166. return result;
  11167. };
  11168. memoized.cache = new (memoize.Cache || MapCache);
  11169. return memoized;
  11170. }
  11171. // Expose `MapCache`.
  11172. memoize.Cache = MapCache;
  11173. /**
  11174. * Creates a function that negates the result of the predicate `func`. The
  11175. * `func` predicate is invoked with the `this` binding and arguments of the
  11176. * created function.
  11177. *
  11178. * @static
  11179. * @memberOf _
  11180. * @since 3.0.0
  11181. * @category Function
  11182. * @param {Function} predicate The predicate to negate.
  11183. * @returns {Function} Returns the new negated function.
  11184. * @example
  11185. *
  11186. * function isEven(n) {
  11187. * return n % 2 == 0;
  11188. * }
  11189. *
  11190. * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
  11191. * // => [1, 3, 5]
  11192. */
  11193. function negate(predicate) {
  11194. if (typeof predicate != 'function') {
  11195. throw new TypeError(FUNC_ERROR_TEXT);
  11196. }
  11197. return function() {
  11198. var args = arguments;
  11199. switch (args.length) {
  11200. case 0: return !predicate.call(this);
  11201. case 1: return !predicate.call(this, args[0]);
  11202. case 2: return !predicate.call(this, args[0], args[1]);
  11203. case 3: return !predicate.call(this, args[0], args[1], args[2]);
  11204. }
  11205. return !predicate.apply(this, args);
  11206. };
  11207. }
  11208. /**
  11209. * Creates a function that is restricted to invoking `func` once. Repeat calls
  11210. * to the function return the value of the first invocation. The `func` is
  11211. * invoked with the `this` binding and arguments of the created function.
  11212. *
  11213. * @static
  11214. * @memberOf _
  11215. * @since 0.1.0
  11216. * @category Function
  11217. * @param {Function} func The function to restrict.
  11218. * @returns {Function} Returns the new restricted function.
  11219. * @example
  11220. *
  11221. * var initialize = _.once(createApplication);
  11222. * initialize();
  11223. * initialize();
  11224. * // => `createApplication` is invoked once
  11225. */
  11226. function once(func) {
  11227. return before(2, func);
  11228. }
  11229. /**
  11230. * Creates a function that invokes `func` with its arguments transformed.
  11231. *
  11232. * @static
  11233. * @since 4.0.0
  11234. * @memberOf _
  11235. * @category Function
  11236. * @param {Function} func The function to wrap.
  11237. * @param {...(Function|Function[])} [transforms=[_.identity]]
  11238. * The argument transforms.
  11239. * @returns {Function} Returns the new function.
  11240. * @example
  11241. *
  11242. * function doubled(n) {
  11243. * return n * 2;
  11244. * }
  11245. *
  11246. * function square(n) {
  11247. * return n * n;
  11248. * }
  11249. *
  11250. * var func = _.overArgs(function(x, y) {
  11251. * return [x, y];
  11252. * }, [square, doubled]);
  11253. *
  11254. * func(9, 3);
  11255. * // => [81, 6]
  11256. *
  11257. * func(10, 5);
  11258. * // => [100, 10]
  11259. */
  11260. var overArgs = castRest(function(func, transforms) {
  11261. transforms = (transforms.length == 1 && isArray(transforms[0]))
  11262. ? arrayMap(transforms[0], baseUnary(getIteratee()))
  11263. : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
  11264. var funcsLength = transforms.length;
  11265. return baseRest(function(args) {
  11266. var index = -1,
  11267. length = nativeMin(args.length, funcsLength);
  11268. while (++index < length) {
  11269. args[index] = transforms[index].call(this, args[index]);
  11270. }
  11271. return apply(func, this, args);
  11272. });
  11273. });
  11274. /**
  11275. * Creates a function that invokes `func` with `partials` prepended to the
  11276. * arguments it receives. This method is like `_.bind` except it does **not**
  11277. * alter the `this` binding.
  11278. *
  11279. * The `_.partial.placeholder` value, which defaults to `_` in monolithic
  11280. * builds, may be used as a placeholder for partially applied arguments.
  11281. *
  11282. * **Note:** This method doesn't set the "length" property of partially
  11283. * applied functions.
  11284. *
  11285. * @static
  11286. * @memberOf _
  11287. * @since 0.2.0
  11288. * @category Function
  11289. * @param {Function} func The function to partially apply arguments to.
  11290. * @param {...*} [partials] The arguments to be partially applied.
  11291. * @returns {Function} Returns the new partially applied function.
  11292. * @example
  11293. *
  11294. * function greet(greeting, name) {
  11295. * return greeting + ' ' + name;
  11296. * }
  11297. *
  11298. * var sayHelloTo = _.partial(greet, 'hello');
  11299. * sayHelloTo('fred');
  11300. * // => 'hello fred'
  11301. *
  11302. * // Partially applied with placeholders.
  11303. * var greetFred = _.partial(greet, _, 'fred');
  11304. * greetFred('hi');
  11305. * // => 'hi fred'
  11306. */
  11307. var partial = baseRest(function(func, partials) {
  11308. var holders = replaceHolders(partials, getHolder(partial));
  11309. return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
  11310. });
  11311. /**
  11312. * This method is like `_.partial` except that partially applied arguments
  11313. * are appended to the arguments it receives.
  11314. *
  11315. * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
  11316. * builds, may be used as a placeholder for partially applied arguments.
  11317. *
  11318. * **Note:** This method doesn't set the "length" property of partially
  11319. * applied functions.
  11320. *
  11321. * @static
  11322. * @memberOf _
  11323. * @since 1.0.0
  11324. * @category Function
  11325. * @param {Function} func The function to partially apply arguments to.
  11326. * @param {...*} [partials] The arguments to be partially applied.
  11327. * @returns {Function} Returns the new partially applied function.
  11328. * @example
  11329. *
  11330. * function greet(greeting, name) {
  11331. * return greeting + ' ' + name;
  11332. * }
  11333. *
  11334. * var greetFred = _.partialRight(greet, 'fred');
  11335. * greetFred('hi');
  11336. * // => 'hi fred'
  11337. *
  11338. * // Partially applied with placeholders.
  11339. * var sayHelloTo = _.partialRight(greet, 'hello', _);
  11340. * sayHelloTo('fred');
  11341. * // => 'hello fred'
  11342. */
  11343. var partialRight = baseRest(function(func, partials) {
  11344. var holders = replaceHolders(partials, getHolder(partialRight));
  11345. return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
  11346. });
  11347. /**
  11348. * Creates a function that invokes `func` with arguments arranged according
  11349. * to the specified `indexes` where the argument value at the first index is
  11350. * provided as the first argument, the argument value at the second index is
  11351. * provided as the second argument, and so on.
  11352. *
  11353. * @static
  11354. * @memberOf _
  11355. * @since 3.0.0
  11356. * @category Function
  11357. * @param {Function} func The function to rearrange arguments for.
  11358. * @param {...(number|number[])} indexes The arranged argument indexes.
  11359. * @returns {Function} Returns the new function.
  11360. * @example
  11361. *
  11362. * var rearged = _.rearg(function(a, b, c) {
  11363. * return [a, b, c];
  11364. * }, [2, 0, 1]);
  11365. *
  11366. * rearged('b', 'c', 'a')
  11367. * // => ['a', 'b', 'c']
  11368. */
  11369. var rearg = flatRest(function(func, indexes) {
  11370. return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);
  11371. });
  11372. /**
  11373. * Creates a function that invokes `func` with the `this` binding of the
  11374. * created function and arguments from `start` and beyond provided as
  11375. * an array.
  11376. *
  11377. * **Note:** This method is based on the
  11378. * [rest parameter](https://mdn.io/rest_parameters).
  11379. *
  11380. * @static
  11381. * @memberOf _
  11382. * @since 4.0.0
  11383. * @category Function
  11384. * @param {Function} func The function to apply a rest parameter to.
  11385. * @param {number} [start=func.length-1] The start position of the rest parameter.
  11386. * @returns {Function} Returns the new function.
  11387. * @example
  11388. *
  11389. * var say = _.rest(function(what, names) {
  11390. * return what + ' ' + _.initial(names).join(', ') +
  11391. * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
  11392. * });
  11393. *
  11394. * say('hello', 'fred', 'barney', 'pebbles');
  11395. * // => 'hello fred, barney, & pebbles'
  11396. */
  11397. function rest(func, start) {
  11398. if (typeof func != 'function') {
  11399. throw new TypeError(FUNC_ERROR_TEXT);
  11400. }
  11401. start = start === undefined ? start : toInteger(start);
  11402. return baseRest(func, start);
  11403. }
  11404. /**
  11405. * Creates a function that invokes `func` with the `this` binding of the
  11406. * create function and an array of arguments much like
  11407. * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).
  11408. *
  11409. * **Note:** This method is based on the
  11410. * [spread operator](https://mdn.io/spread_operator).
  11411. *
  11412. * @static
  11413. * @memberOf _
  11414. * @since 3.2.0
  11415. * @category Function
  11416. * @param {Function} func The function to spread arguments over.
  11417. * @param {number} [start=0] The start position of the spread.
  11418. * @returns {Function} Returns the new function.
  11419. * @example
  11420. *
  11421. * var say = _.spread(function(who, what) {
  11422. * return who + ' says ' + what;
  11423. * });
  11424. *
  11425. * say(['fred', 'hello']);
  11426. * // => 'fred says hello'
  11427. *
  11428. * var numbers = Promise.all([
  11429. * Promise.resolve(40),
  11430. * Promise.resolve(36)
  11431. * ]);
  11432. *
  11433. * numbers.then(_.spread(function(x, y) {
  11434. * return x + y;
  11435. * }));
  11436. * // => a Promise of 76
  11437. */
  11438. function spread(func, start) {
  11439. if (typeof func != 'function') {
  11440. throw new TypeError(FUNC_ERROR_TEXT);
  11441. }
  11442. start = start == null ? 0 : nativeMax(toInteger(start), 0);
  11443. return baseRest(function(args) {
  11444. var array = args[start],
  11445. otherArgs = castSlice(args, 0, start);
  11446. if (array) {
  11447. arrayPush(otherArgs, array);
  11448. }
  11449. return apply(func, this, otherArgs);
  11450. });
  11451. }
  11452. /**
  11453. * Creates a throttled function that only invokes `func` at most once per
  11454. * every `wait` milliseconds. The throttled function comes with a `cancel`
  11455. * method to cancel delayed `func` invocations and a `flush` method to
  11456. * immediately invoke them. Provide `options` to indicate whether `func`
  11457. * should be invoked on the leading and/or trailing edge of the `wait`
  11458. * timeout. The `func` is invoked with the last arguments provided to the
  11459. * throttled function. Subsequent calls to the throttled function return the
  11460. * result of the last `func` invocation.
  11461. *
  11462. * **Note:** If `leading` and `trailing` options are `true`, `func` is
  11463. * invoked on the trailing edge of the timeout only if the throttled function
  11464. * is invoked more than once during the `wait` timeout.
  11465. *
  11466. * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
  11467. * until to the next tick, similar to `setTimeout` with a timeout of `0`.
  11468. *
  11469. * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
  11470. * for details over the differences between `_.throttle` and `_.debounce`.
  11471. *
  11472. * @static
  11473. * @memberOf _
  11474. * @since 0.1.0
  11475. * @category Function
  11476. * @param {Function} func The function to throttle.
  11477. * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
  11478. * @param {Object} [options={}] The options object.
  11479. * @param {boolean} [options.leading=true]
  11480. * Specify invoking on the leading edge of the timeout.
  11481. * @param {boolean} [options.trailing=true]
  11482. * Specify invoking on the trailing edge of the timeout.
  11483. * @returns {Function} Returns the new throttled function.
  11484. * @example
  11485. *
  11486. * // Avoid excessively updating the position while scrolling.
  11487. * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
  11488. *
  11489. * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
  11490. * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
  11491. * jQuery(element).on('click', throttled);
  11492. *
  11493. * // Cancel the trailing throttled invocation.
  11494. * jQuery(window).on('popstate', throttled.cancel);
  11495. */
  11496. function throttle(func, wait, options) {
  11497. var leading = true,
  11498. trailing = true;
  11499. if (typeof func != 'function') {
  11500. throw new TypeError(FUNC_ERROR_TEXT);
  11501. }
  11502. if (isObject(options)) {
  11503. leading = 'leading' in options ? !!options.leading : leading;
  11504. trailing = 'trailing' in options ? !!options.trailing : trailing;
  11505. }
  11506. return debounce(func, wait, {
  11507. 'leading': leading,
  11508. 'maxWait': wait,
  11509. 'trailing': trailing
  11510. });
  11511. }
  11512. /**
  11513. * Creates a function that accepts up to one argument, ignoring any
  11514. * additional arguments.
  11515. *
  11516. * @static
  11517. * @memberOf _
  11518. * @since 4.0.0
  11519. * @category Function
  11520. * @param {Function} func The function to cap arguments for.
  11521. * @returns {Function} Returns the new capped function.
  11522. * @example
  11523. *
  11524. * _.map(['6', '8', '10'], _.unary(parseInt));
  11525. * // => [6, 8, 10]
  11526. */
  11527. function unary(func) {
  11528. return ary(func, 1);
  11529. }
  11530. /**
  11531. * Creates a function that provides `value` to `wrapper` as its first
  11532. * argument. Any additional arguments provided to the function are appended
  11533. * to those provided to the `wrapper`. The wrapper is invoked with the `this`
  11534. * binding of the created function.
  11535. *
  11536. * @static
  11537. * @memberOf _
  11538. * @since 0.1.0
  11539. * @category Function
  11540. * @param {*} value The value to wrap.
  11541. * @param {Function} [wrapper=identity] The wrapper function.
  11542. * @returns {Function} Returns the new function.
  11543. * @example
  11544. *
  11545. * var p = _.wrap(_.escape, function(func, text) {
  11546. * return '<p>' + func(text) + '</p>';
  11547. * });
  11548. *
  11549. * p('fred, barney, & pebbles');
  11550. * // => '<p>fred, barney, &amp; pebbles</p>'
  11551. */
  11552. function wrap(value, wrapper) {
  11553. return partial(castFunction(wrapper), value);
  11554. }
  11555. /*------------------------------------------------------------------------*/
  11556. /**
  11557. * Casts `value` as an array if it's not one.
  11558. *
  11559. * @static
  11560. * @memberOf _
  11561. * @since 4.4.0
  11562. * @category Lang
  11563. * @param {*} value The value to inspect.
  11564. * @returns {Array} Returns the cast array.
  11565. * @example
  11566. *
  11567. * _.castArray(1);
  11568. * // => [1]
  11569. *
  11570. * _.castArray({ 'a': 1 });
  11571. * // => [{ 'a': 1 }]
  11572. *
  11573. * _.castArray('abc');
  11574. * // => ['abc']
  11575. *
  11576. * _.castArray(null);
  11577. * // => [null]
  11578. *
  11579. * _.castArray(undefined);
  11580. * // => [undefined]
  11581. *
  11582. * _.castArray();
  11583. * // => []
  11584. *
  11585. * var array = [1, 2, 3];
  11586. * console.log(_.castArray(array) === array);
  11587. * // => true
  11588. */
  11589. function castArray() {
  11590. if (!arguments.length) {
  11591. return [];
  11592. }
  11593. var value = arguments[0];
  11594. return isArray(value) ? value : [value];
  11595. }
  11596. /**
  11597. * Creates a shallow clone of `value`.
  11598. *
  11599. * **Note:** This method is loosely based on the
  11600. * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
  11601. * and supports cloning arrays, array buffers, booleans, date objects, maps,
  11602. * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
  11603. * arrays. The own enumerable properties of `arguments` objects are cloned
  11604. * as plain objects. An empty object is returned for uncloneable values such
  11605. * as error objects, functions, DOM nodes, and WeakMaps.
  11606. *
  11607. * @static
  11608. * @memberOf _
  11609. * @since 0.1.0
  11610. * @category Lang
  11611. * @param {*} value The value to clone.
  11612. * @returns {*} Returns the cloned value.
  11613. * @see _.cloneDeep
  11614. * @example
  11615. *
  11616. * var objects = [{ 'a': 1 }, { 'b': 2 }];
  11617. *
  11618. * var shallow = _.clone(objects);
  11619. * console.log(shallow[0] === objects[0]);
  11620. * // => true
  11621. */
  11622. function clone(value) {
  11623. return baseClone(value, CLONE_SYMBOLS_FLAG);
  11624. }
  11625. /**
  11626. * This method is like `_.clone` except that it accepts `customizer` which
  11627. * is invoked to produce the cloned value. If `customizer` returns `undefined`,
  11628. * cloning is handled by the method instead. The `customizer` is invoked with
  11629. * up to four arguments; (value [, index|key, object, stack]).
  11630. *
  11631. * @static
  11632. * @memberOf _
  11633. * @since 4.0.0
  11634. * @category Lang
  11635. * @param {*} value The value to clone.
  11636. * @param {Function} [customizer] The function to customize cloning.
  11637. * @returns {*} Returns the cloned value.
  11638. * @see _.cloneDeepWith
  11639. * @example
  11640. *
  11641. * function customizer(value) {
  11642. * if (_.isElement(value)) {
  11643. * return value.cloneNode(false);
  11644. * }
  11645. * }
  11646. *
  11647. * var el = _.cloneWith(document.body, customizer);
  11648. *
  11649. * console.log(el === document.body);
  11650. * // => false
  11651. * console.log(el.nodeName);
  11652. * // => 'BODY'
  11653. * console.log(el.childNodes.length);
  11654. * // => 0
  11655. */
  11656. function cloneWith(value, customizer) {
  11657. customizer = typeof customizer == 'function' ? customizer : undefined;
  11658. return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
  11659. }
  11660. /**
  11661. * This method is like `_.clone` except that it recursively clones `value`.
  11662. *
  11663. * @static
  11664. * @memberOf _
  11665. * @since 1.0.0
  11666. * @category Lang
  11667. * @param {*} value The value to recursively clone.
  11668. * @returns {*} Returns the deep cloned value.
  11669. * @see _.clone
  11670. * @example
  11671. *
  11672. * var objects = [{ 'a': 1 }, { 'b': 2 }];
  11673. *
  11674. * var deep = _.cloneDeep(objects);
  11675. * console.log(deep[0] === objects[0]);
  11676. * // => false
  11677. */
  11678. function cloneDeep(value) {
  11679. return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
  11680. }
  11681. /**
  11682. * This method is like `_.cloneWith` except that it recursively clones `value`.
  11683. *
  11684. * @static
  11685. * @memberOf _
  11686. * @since 4.0.0
  11687. * @category Lang
  11688. * @param {*} value The value to recursively clone.
  11689. * @param {Function} [customizer] The function to customize cloning.
  11690. * @returns {*} Returns the deep cloned value.
  11691. * @see _.cloneWith
  11692. * @example
  11693. *
  11694. * function customizer(value) {
  11695. * if (_.isElement(value)) {
  11696. * return value.cloneNode(true);
  11697. * }
  11698. * }
  11699. *
  11700. * var el = _.cloneDeepWith(document.body, customizer);
  11701. *
  11702. * console.log(el === document.body);
  11703. * // => false
  11704. * console.log(el.nodeName);
  11705. * // => 'BODY'
  11706. * console.log(el.childNodes.length);
  11707. * // => 20
  11708. */
  11709. function cloneDeepWith(value, customizer) {
  11710. customizer = typeof customizer == 'function' ? customizer : undefined;
  11711. return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
  11712. }
  11713. /**
  11714. * Checks if `object` conforms to `source` by invoking the predicate
  11715. * properties of `source` with the corresponding property values of `object`.
  11716. *
  11717. * **Note:** This method is equivalent to `_.conforms` when `source` is
  11718. * partially applied.
  11719. *
  11720. * @static
  11721. * @memberOf _
  11722. * @since 4.14.0
  11723. * @category Lang
  11724. * @param {Object} object The object to inspect.
  11725. * @param {Object} source The object of property predicates to conform to.
  11726. * @returns {boolean} Returns `true` if `object` conforms, else `false`.
  11727. * @example
  11728. *
  11729. * var object = { 'a': 1, 'b': 2 };
  11730. *
  11731. * _.conformsTo(object, { 'b': function(n) { return n > 1; } });
  11732. * // => true
  11733. *
  11734. * _.conformsTo(object, { 'b': function(n) { return n > 2; } });
  11735. * // => false
  11736. */
  11737. function conformsTo(object, source) {
  11738. return source == null || baseConformsTo(object, source, keys(source));
  11739. }
  11740. /**
  11741. * Performs a
  11742. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  11743. * comparison between two values to determine if they are equivalent.
  11744. *
  11745. * @static
  11746. * @memberOf _
  11747. * @since 4.0.0
  11748. * @category Lang
  11749. * @param {*} value The value to compare.
  11750. * @param {*} other The other value to compare.
  11751. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  11752. * @example
  11753. *
  11754. * var object = { 'a': 1 };
  11755. * var other = { 'a': 1 };
  11756. *
  11757. * _.eq(object, object);
  11758. * // => true
  11759. *
  11760. * _.eq(object, other);
  11761. * // => false
  11762. *
  11763. * _.eq('a', 'a');
  11764. * // => true
  11765. *
  11766. * _.eq('a', Object('a'));
  11767. * // => false
  11768. *
  11769. * _.eq(NaN, NaN);
  11770. * // => true
  11771. */
  11772. function eq(value, other) {
  11773. return value === other || (value !== value && other !== other);
  11774. }
  11775. /**
  11776. * Checks if `value` is greater than `other`.
  11777. *
  11778. * @static
  11779. * @memberOf _
  11780. * @since 3.9.0
  11781. * @category Lang
  11782. * @param {*} value The value to compare.
  11783. * @param {*} other The other value to compare.
  11784. * @returns {boolean} Returns `true` if `value` is greater than `other`,
  11785. * else `false`.
  11786. * @see _.lt
  11787. * @example
  11788. *
  11789. * _.gt(3, 1);
  11790. * // => true
  11791. *
  11792. * _.gt(3, 3);
  11793. * // => false
  11794. *
  11795. * _.gt(1, 3);
  11796. * // => false
  11797. */
  11798. var gt = createRelationalOperation(baseGt);
  11799. /**
  11800. * Checks if `value` is greater than or equal to `other`.
  11801. *
  11802. * @static
  11803. * @memberOf _
  11804. * @since 3.9.0
  11805. * @category Lang
  11806. * @param {*} value The value to compare.
  11807. * @param {*} other The other value to compare.
  11808. * @returns {boolean} Returns `true` if `value` is greater than or equal to
  11809. * `other`, else `false`.
  11810. * @see _.lte
  11811. * @example
  11812. *
  11813. * _.gte(3, 1);
  11814. * // => true
  11815. *
  11816. * _.gte(3, 3);
  11817. * // => true
  11818. *
  11819. * _.gte(1, 3);
  11820. * // => false
  11821. */
  11822. var gte = createRelationalOperation(function(value, other) {
  11823. return value >= other;
  11824. });
  11825. /**
  11826. * Checks if `value` is likely an `arguments` object.
  11827. *
  11828. * @static
  11829. * @memberOf _
  11830. * @since 0.1.0
  11831. * @category Lang
  11832. * @param {*} value The value to check.
  11833. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  11834. * else `false`.
  11835. * @example
  11836. *
  11837. * _.isArguments(function() { return arguments; }());
  11838. * // => true
  11839. *
  11840. * _.isArguments([1, 2, 3]);
  11841. * // => false
  11842. */
  11843. var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
  11844. return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
  11845. !propertyIsEnumerable.call(value, 'callee');
  11846. };
  11847. /**
  11848. * Checks if `value` is classified as an `Array` object.
  11849. *
  11850. * @static
  11851. * @memberOf _
  11852. * @since 0.1.0
  11853. * @category Lang
  11854. * @param {*} value The value to check.
  11855. * @returns {boolean} Returns `true` if `value` is an array, else `false`.
  11856. * @example
  11857. *
  11858. * _.isArray([1, 2, 3]);
  11859. * // => true
  11860. *
  11861. * _.isArray(document.body.children);
  11862. * // => false
  11863. *
  11864. * _.isArray('abc');
  11865. * // => false
  11866. *
  11867. * _.isArray(_.noop);
  11868. * // => false
  11869. */
  11870. var isArray = Array.isArray;
  11871. /**
  11872. * Checks if `value` is classified as an `ArrayBuffer` object.
  11873. *
  11874. * @static
  11875. * @memberOf _
  11876. * @since 4.3.0
  11877. * @category Lang
  11878. * @param {*} value The value to check.
  11879. * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
  11880. * @example
  11881. *
  11882. * _.isArrayBuffer(new ArrayBuffer(2));
  11883. * // => true
  11884. *
  11885. * _.isArrayBuffer(new Array(2));
  11886. * // => false
  11887. */
  11888. var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
  11889. /**
  11890. * Checks if `value` is array-like. A value is considered array-like if it's
  11891. * not a function and has a `value.length` that's an integer greater than or
  11892. * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
  11893. *
  11894. * @static
  11895. * @memberOf _
  11896. * @since 4.0.0
  11897. * @category Lang
  11898. * @param {*} value The value to check.
  11899. * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
  11900. * @example
  11901. *
  11902. * _.isArrayLike([1, 2, 3]);
  11903. * // => true
  11904. *
  11905. * _.isArrayLike(document.body.children);
  11906. * // => true
  11907. *
  11908. * _.isArrayLike('abc');
  11909. * // => true
  11910. *
  11911. * _.isArrayLike(_.noop);
  11912. * // => false
  11913. */
  11914. function isArrayLike(value) {
  11915. return value != null && isLength(value.length) && !isFunction(value);
  11916. }
  11917. /**
  11918. * This method is like `_.isArrayLike` except that it also checks if `value`
  11919. * is an object.
  11920. *
  11921. * @static
  11922. * @memberOf _
  11923. * @since 4.0.0
  11924. * @category Lang
  11925. * @param {*} value The value to check.
  11926. * @returns {boolean} Returns `true` if `value` is an array-like object,
  11927. * else `false`.
  11928. * @example
  11929. *
  11930. * _.isArrayLikeObject([1, 2, 3]);
  11931. * // => true
  11932. *
  11933. * _.isArrayLikeObject(document.body.children);
  11934. * // => true
  11935. *
  11936. * _.isArrayLikeObject('abc');
  11937. * // => false
  11938. *
  11939. * _.isArrayLikeObject(_.noop);
  11940. * // => false
  11941. */
  11942. function isArrayLikeObject(value) {
  11943. return isObjectLike(value) && isArrayLike(value);
  11944. }
  11945. /**
  11946. * Checks if `value` is classified as a boolean primitive or object.
  11947. *
  11948. * @static
  11949. * @memberOf _
  11950. * @since 0.1.0
  11951. * @category Lang
  11952. * @param {*} value The value to check.
  11953. * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
  11954. * @example
  11955. *
  11956. * _.isBoolean(false);
  11957. * // => true
  11958. *
  11959. * _.isBoolean(null);
  11960. * // => false
  11961. */
  11962. function isBoolean(value) {
  11963. return value === true || value === false ||
  11964. (isObjectLike(value) && baseGetTag(value) == boolTag);
  11965. }
  11966. /**
  11967. * Checks if `value` is a buffer.
  11968. *
  11969. * @static
  11970. * @memberOf _
  11971. * @since 4.3.0
  11972. * @category Lang
  11973. * @param {*} value The value to check.
  11974. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
  11975. * @example
  11976. *
  11977. * _.isBuffer(new Buffer(2));
  11978. * // => true
  11979. *
  11980. * _.isBuffer(new Uint8Array(2));
  11981. * // => false
  11982. */
  11983. var isBuffer = nativeIsBuffer || stubFalse;
  11984. /**
  11985. * Checks if `value` is classified as a `Date` object.
  11986. *
  11987. * @static
  11988. * @memberOf _
  11989. * @since 0.1.0
  11990. * @category Lang
  11991. * @param {*} value The value to check.
  11992. * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
  11993. * @example
  11994. *
  11995. * _.isDate(new Date);
  11996. * // => true
  11997. *
  11998. * _.isDate('Mon April 23 2012');
  11999. * // => false
  12000. */
  12001. var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
  12002. /**
  12003. * Checks if `value` is likely a DOM element.
  12004. *
  12005. * @static
  12006. * @memberOf _
  12007. * @since 0.1.0
  12008. * @category Lang
  12009. * @param {*} value The value to check.
  12010. * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
  12011. * @example
  12012. *
  12013. * _.isElement(document.body);
  12014. * // => true
  12015. *
  12016. * _.isElement('<body>');
  12017. * // => false
  12018. */
  12019. function isElement(value) {
  12020. return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
  12021. }
  12022. /**
  12023. * Checks if `value` is an empty object, collection, map, or set.
  12024. *
  12025. * Objects are considered empty if they have no own enumerable string keyed
  12026. * properties.
  12027. *
  12028. * Array-like values such as `arguments` objects, arrays, buffers, strings, or
  12029. * jQuery-like collections are considered empty if they have a `length` of `0`.
  12030. * Similarly, maps and sets are considered empty if they have a `size` of `0`.
  12031. *
  12032. * @static
  12033. * @memberOf _
  12034. * @since 0.1.0
  12035. * @category Lang
  12036. * @param {*} value The value to check.
  12037. * @returns {boolean} Returns `true` if `value` is empty, else `false`.
  12038. * @example
  12039. *
  12040. * _.isEmpty(null);
  12041. * // => true
  12042. *
  12043. * _.isEmpty(true);
  12044. * // => true
  12045. *
  12046. * _.isEmpty(1);
  12047. * // => true
  12048. *
  12049. * _.isEmpty([1, 2, 3]);
  12050. * // => false
  12051. *
  12052. * _.isEmpty({ 'a': 1 });
  12053. * // => false
  12054. */
  12055. function isEmpty(value) {
  12056. if (value == null) {
  12057. return true;
  12058. }
  12059. if (isArrayLike(value) &&
  12060. (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
  12061. isBuffer(value) || isTypedArray(value) || isArguments(value))) {
  12062. return !value.length;
  12063. }
  12064. var tag = getTag(value);
  12065. if (tag == mapTag || tag == setTag) {
  12066. return !value.size;
  12067. }
  12068. if (isPrototype(value)) {
  12069. return !baseKeys(value).length;
  12070. }
  12071. for (var key in value) {
  12072. if (hasOwnProperty.call(value, key)) {
  12073. return false;
  12074. }
  12075. }
  12076. return true;
  12077. }
  12078. /**
  12079. * Performs a deep comparison between two values to determine if they are
  12080. * equivalent.
  12081. *
  12082. * **Note:** This method supports comparing arrays, array buffers, booleans,
  12083. * date objects, error objects, maps, numbers, `Object` objects, regexes,
  12084. * sets, strings, symbols, and typed arrays. `Object` objects are compared
  12085. * by their own, not inherited, enumerable properties. Functions and DOM
  12086. * nodes are compared by strict equality, i.e. `===`.
  12087. *
  12088. * @static
  12089. * @memberOf _
  12090. * @since 0.1.0
  12091. * @category Lang
  12092. * @param {*} value The value to compare.
  12093. * @param {*} other The other value to compare.
  12094. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  12095. * @example
  12096. *
  12097. * var object = { 'a': 1 };
  12098. * var other = { 'a': 1 };
  12099. *
  12100. * _.isEqual(object, other);
  12101. * // => true
  12102. *
  12103. * object === other;
  12104. * // => false
  12105. */
  12106. function isEqual(value, other) {
  12107. return baseIsEqual(value, other);
  12108. }
  12109. /**
  12110. * This method is like `_.isEqual` except that it accepts `customizer` which
  12111. * is invoked to compare values. If `customizer` returns `undefined`, comparisons
  12112. * are handled by the method instead. The `customizer` is invoked with up to
  12113. * six arguments: (objValue, othValue [, index|key, object, other, stack]).
  12114. *
  12115. * @static
  12116. * @memberOf _
  12117. * @since 4.0.0
  12118. * @category Lang
  12119. * @param {*} value The value to compare.
  12120. * @param {*} other The other value to compare.
  12121. * @param {Function} [customizer] The function to customize comparisons.
  12122. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  12123. * @example
  12124. *
  12125. * function isGreeting(value) {
  12126. * return /^h(?:i|ello)$/.test(value);
  12127. * }
  12128. *
  12129. * function customizer(objValue, othValue) {
  12130. * if (isGreeting(objValue) && isGreeting(othValue)) {
  12131. * return true;
  12132. * }
  12133. * }
  12134. *
  12135. * var array = ['hello', 'goodbye'];
  12136. * var other = ['hi', 'goodbye'];
  12137. *
  12138. * _.isEqualWith(array, other, customizer);
  12139. * // => true
  12140. */
  12141. function isEqualWith(value, other, customizer) {
  12142. customizer = typeof customizer == 'function' ? customizer : undefined;
  12143. var result = customizer ? customizer(value, other) : undefined;
  12144. return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
  12145. }
  12146. /**
  12147. * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
  12148. * `SyntaxError`, `TypeError`, or `URIError` object.
  12149. *
  12150. * @static
  12151. * @memberOf _
  12152. * @since 3.0.0
  12153. * @category Lang
  12154. * @param {*} value The value to check.
  12155. * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
  12156. * @example
  12157. *
  12158. * _.isError(new Error);
  12159. * // => true
  12160. *
  12161. * _.isError(Error);
  12162. * // => false
  12163. */
  12164. function isError(value) {
  12165. if (!isObjectLike(value)) {
  12166. return false;
  12167. }
  12168. var tag = baseGetTag(value);
  12169. return tag == errorTag || tag == domExcTag ||
  12170. (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
  12171. }
  12172. /**
  12173. * Checks if `value` is a finite primitive number.
  12174. *
  12175. * **Note:** This method is based on
  12176. * [`Number.isFinite`](https://mdn.io/Number/isFinite).
  12177. *
  12178. * @static
  12179. * @memberOf _
  12180. * @since 0.1.0
  12181. * @category Lang
  12182. * @param {*} value The value to check.
  12183. * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
  12184. * @example
  12185. *
  12186. * _.isFinite(3);
  12187. * // => true
  12188. *
  12189. * _.isFinite(Number.MIN_VALUE);
  12190. * // => true
  12191. *
  12192. * _.isFinite(Infinity);
  12193. * // => false
  12194. *
  12195. * _.isFinite('3');
  12196. * // => false
  12197. */
  12198. function isFinite(value) {
  12199. return typeof value == 'number' && nativeIsFinite(value);
  12200. }
  12201. /**
  12202. * Checks if `value` is classified as a `Function` object.
  12203. *
  12204. * @static
  12205. * @memberOf _
  12206. * @since 0.1.0
  12207. * @category Lang
  12208. * @param {*} value The value to check.
  12209. * @returns {boolean} Returns `true` if `value` is a function, else `false`.
  12210. * @example
  12211. *
  12212. * _.isFunction(_);
  12213. * // => true
  12214. *
  12215. * _.isFunction(/abc/);
  12216. * // => false
  12217. */
  12218. function isFunction(value) {
  12219. if (!isObject(value)) {
  12220. return false;
  12221. }
  12222. // The use of `Object#toString` avoids issues with the `typeof` operator
  12223. // in Safari 9 which returns 'object' for typed arrays and other constructors.
  12224. var tag = baseGetTag(value);
  12225. return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
  12226. }
  12227. /**
  12228. * Checks if `value` is an integer.
  12229. *
  12230. * **Note:** This method is based on
  12231. * [`Number.isInteger`](https://mdn.io/Number/isInteger).
  12232. *
  12233. * @static
  12234. * @memberOf _
  12235. * @since 4.0.0
  12236. * @category Lang
  12237. * @param {*} value The value to check.
  12238. * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
  12239. * @example
  12240. *
  12241. * _.isInteger(3);
  12242. * // => true
  12243. *
  12244. * _.isInteger(Number.MIN_VALUE);
  12245. * // => false
  12246. *
  12247. * _.isInteger(Infinity);
  12248. * // => false
  12249. *
  12250. * _.isInteger('3');
  12251. * // => false
  12252. */
  12253. function isInteger(value) {
  12254. return typeof value == 'number' && value == toInteger(value);
  12255. }
  12256. /**
  12257. * Checks if `value` is a valid array-like length.
  12258. *
  12259. * **Note:** This method is loosely based on
  12260. * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
  12261. *
  12262. * @static
  12263. * @memberOf _
  12264. * @since 4.0.0
  12265. * @category Lang
  12266. * @param {*} value The value to check.
  12267. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  12268. * @example
  12269. *
  12270. * _.isLength(3);
  12271. * // => true
  12272. *
  12273. * _.isLength(Number.MIN_VALUE);
  12274. * // => false
  12275. *
  12276. * _.isLength(Infinity);
  12277. * // => false
  12278. *
  12279. * _.isLength('3');
  12280. * // => false
  12281. */
  12282. function isLength(value) {
  12283. return typeof value == 'number' &&
  12284. value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  12285. }
  12286. /**
  12287. * Checks if `value` is the
  12288. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  12289. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  12290. *
  12291. * @static
  12292. * @memberOf _
  12293. * @since 0.1.0
  12294. * @category Lang
  12295. * @param {*} value The value to check.
  12296. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  12297. * @example
  12298. *
  12299. * _.isObject({});
  12300. * // => true
  12301. *
  12302. * _.isObject([1, 2, 3]);
  12303. * // => true
  12304. *
  12305. * _.isObject(_.noop);
  12306. * // => true
  12307. *
  12308. * _.isObject(null);
  12309. * // => false
  12310. */
  12311. function isObject(value) {
  12312. var type = typeof value;
  12313. return value != null && (type == 'object' || type == 'function');
  12314. }
  12315. /**
  12316. * Checks if `value` is object-like. A value is object-like if it's not `null`
  12317. * and has a `typeof` result of "object".
  12318. *
  12319. * @static
  12320. * @memberOf _
  12321. * @since 4.0.0
  12322. * @category Lang
  12323. * @param {*} value The value to check.
  12324. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  12325. * @example
  12326. *
  12327. * _.isObjectLike({});
  12328. * // => true
  12329. *
  12330. * _.isObjectLike([1, 2, 3]);
  12331. * // => true
  12332. *
  12333. * _.isObjectLike(_.noop);
  12334. * // => false
  12335. *
  12336. * _.isObjectLike(null);
  12337. * // => false
  12338. */
  12339. function isObjectLike(value) {
  12340. return value != null && typeof value == 'object';
  12341. }
  12342. /**
  12343. * Checks if `value` is classified as a `Map` object.
  12344. *
  12345. * @static
  12346. * @memberOf _
  12347. * @since 4.3.0
  12348. * @category Lang
  12349. * @param {*} value The value to check.
  12350. * @returns {boolean} Returns `true` if `value` is a map, else `false`.
  12351. * @example
  12352. *
  12353. * _.isMap(new Map);
  12354. * // => true
  12355. *
  12356. * _.isMap(new WeakMap);
  12357. * // => false
  12358. */
  12359. var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
  12360. /**
  12361. * Performs a partial deep comparison between `object` and `source` to
  12362. * determine if `object` contains equivalent property values.
  12363. *
  12364. * **Note:** This method is equivalent to `_.matches` when `source` is
  12365. * partially applied.
  12366. *
  12367. * Partial comparisons will match empty array and empty object `source`
  12368. * values against any array or object value, respectively. See `_.isEqual`
  12369. * for a list of supported value comparisons.
  12370. *
  12371. * @static
  12372. * @memberOf _
  12373. * @since 3.0.0
  12374. * @category Lang
  12375. * @param {Object} object The object to inspect.
  12376. * @param {Object} source The object of property values to match.
  12377. * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  12378. * @example
  12379. *
  12380. * var object = { 'a': 1, 'b': 2 };
  12381. *
  12382. * _.isMatch(object, { 'b': 2 });
  12383. * // => true
  12384. *
  12385. * _.isMatch(object, { 'b': 1 });
  12386. * // => false
  12387. */
  12388. function isMatch(object, source) {
  12389. return object === source || baseIsMatch(object, source, getMatchData(source));
  12390. }
  12391. /**
  12392. * This method is like `_.isMatch` except that it accepts `customizer` which
  12393. * is invoked to compare values. If `customizer` returns `undefined`, comparisons
  12394. * are handled by the method instead. The `customizer` is invoked with five
  12395. * arguments: (objValue, srcValue, index|key, object, source).
  12396. *
  12397. * @static
  12398. * @memberOf _
  12399. * @since 4.0.0
  12400. * @category Lang
  12401. * @param {Object} object The object to inspect.
  12402. * @param {Object} source The object of property values to match.
  12403. * @param {Function} [customizer] The function to customize comparisons.
  12404. * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  12405. * @example
  12406. *
  12407. * function isGreeting(value) {
  12408. * return /^h(?:i|ello)$/.test(value);
  12409. * }
  12410. *
  12411. * function customizer(objValue, srcValue) {
  12412. * if (isGreeting(objValue) && isGreeting(srcValue)) {
  12413. * return true;
  12414. * }
  12415. * }
  12416. *
  12417. * var object = { 'greeting': 'hello' };
  12418. * var source = { 'greeting': 'hi' };
  12419. *
  12420. * _.isMatchWith(object, source, customizer);
  12421. * // => true
  12422. */
  12423. function isMatchWith(object, source, customizer) {
  12424. customizer = typeof customizer == 'function' ? customizer : undefined;
  12425. return baseIsMatch(object, source, getMatchData(source), customizer);
  12426. }
  12427. /**
  12428. * Checks if `value` is `NaN`.
  12429. *
  12430. * **Note:** This method is based on
  12431. * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
  12432. * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
  12433. * `undefined` and other non-number values.
  12434. *
  12435. * @static
  12436. * @memberOf _
  12437. * @since 0.1.0
  12438. * @category Lang
  12439. * @param {*} value The value to check.
  12440. * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
  12441. * @example
  12442. *
  12443. * _.isNaN(NaN);
  12444. * // => true
  12445. *
  12446. * _.isNaN(new Number(NaN));
  12447. * // => true
  12448. *
  12449. * isNaN(undefined);
  12450. * // => true
  12451. *
  12452. * _.isNaN(undefined);
  12453. * // => false
  12454. */
  12455. function isNaN(value) {
  12456. // An `NaN` primitive is the only value that is not equal to itself.
  12457. // Perform the `toStringTag` check first to avoid errors with some
  12458. // ActiveX objects in IE.
  12459. return isNumber(value) && value != +value;
  12460. }
  12461. /**
  12462. * Checks if `value` is a pristine native function.
  12463. *
  12464. * **Note:** This method can't reliably detect native functions in the presence
  12465. * of the core-js package because core-js circumvents this kind of detection.
  12466. * Despite multiple requests, the core-js maintainer has made it clear: any
  12467. * attempt to fix the detection will be obstructed. As a result, we're left
  12468. * with little choice but to throw an error. Unfortunately, this also affects
  12469. * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
  12470. * which rely on core-js.
  12471. *
  12472. * @static
  12473. * @memberOf _
  12474. * @since 3.0.0
  12475. * @category Lang
  12476. * @param {*} value The value to check.
  12477. * @returns {boolean} Returns `true` if `value` is a native function,
  12478. * else `false`.
  12479. * @example
  12480. *
  12481. * _.isNative(Array.prototype.push);
  12482. * // => true
  12483. *
  12484. * _.isNative(_);
  12485. * // => false
  12486. */
  12487. function isNative(value) {
  12488. if (isMaskable(value)) {
  12489. throw new Error(CORE_ERROR_TEXT);
  12490. }
  12491. return baseIsNative(value);
  12492. }
  12493. /**
  12494. * Checks if `value` is `null`.
  12495. *
  12496. * @static
  12497. * @memberOf _
  12498. * @since 0.1.0
  12499. * @category Lang
  12500. * @param {*} value The value to check.
  12501. * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
  12502. * @example
  12503. *
  12504. * _.isNull(null);
  12505. * // => true
  12506. *
  12507. * _.isNull(void 0);
  12508. * // => false
  12509. */
  12510. function isNull(value) {
  12511. return value === null;
  12512. }
  12513. /**
  12514. * Checks if `value` is `null` or `undefined`.
  12515. *
  12516. * @static
  12517. * @memberOf _
  12518. * @since 4.0.0
  12519. * @category Lang
  12520. * @param {*} value The value to check.
  12521. * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
  12522. * @example
  12523. *
  12524. * _.isNil(null);
  12525. * // => true
  12526. *
  12527. * _.isNil(void 0);
  12528. * // => true
  12529. *
  12530. * _.isNil(NaN);
  12531. * // => false
  12532. */
  12533. function isNil(value) {
  12534. return value == null;
  12535. }
  12536. /**
  12537. * Checks if `value` is classified as a `Number` primitive or object.
  12538. *
  12539. * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
  12540. * classified as numbers, use the `_.isFinite` method.
  12541. *
  12542. * @static
  12543. * @memberOf _
  12544. * @since 0.1.0
  12545. * @category Lang
  12546. * @param {*} value The value to check.
  12547. * @returns {boolean} Returns `true` if `value` is a number, else `false`.
  12548. * @example
  12549. *
  12550. * _.isNumber(3);
  12551. * // => true
  12552. *
  12553. * _.isNumber(Number.MIN_VALUE);
  12554. * // => true
  12555. *
  12556. * _.isNumber(Infinity);
  12557. * // => true
  12558. *
  12559. * _.isNumber('3');
  12560. * // => false
  12561. */
  12562. function isNumber(value) {
  12563. return typeof value == 'number' ||
  12564. (isObjectLike(value) && baseGetTag(value) == numberTag);
  12565. }
  12566. /**
  12567. * Checks if `value` is a plain object, that is, an object created by the
  12568. * `Object` constructor or one with a `[[Prototype]]` of `null`.
  12569. *
  12570. * @static
  12571. * @memberOf _
  12572. * @since 0.8.0
  12573. * @category Lang
  12574. * @param {*} value The value to check.
  12575. * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
  12576. * @example
  12577. *
  12578. * function Foo() {
  12579. * this.a = 1;
  12580. * }
  12581. *
  12582. * _.isPlainObject(new Foo);
  12583. * // => false
  12584. *
  12585. * _.isPlainObject([1, 2, 3]);
  12586. * // => false
  12587. *
  12588. * _.isPlainObject({ 'x': 0, 'y': 0 });
  12589. * // => true
  12590. *
  12591. * _.isPlainObject(Object.create(null));
  12592. * // => true
  12593. */
  12594. function isPlainObject(value) {
  12595. if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
  12596. return false;
  12597. }
  12598. var proto = getPrototype(value);
  12599. if (proto === null) {
  12600. return true;
  12601. }
  12602. var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
  12603. return typeof Ctor == 'function' && Ctor instanceof Ctor &&
  12604. funcToString.call(Ctor) == objectCtorString;
  12605. }
  12606. /**
  12607. * Checks if `value` is classified as a `RegExp` object.
  12608. *
  12609. * @static
  12610. * @memberOf _
  12611. * @since 0.1.0
  12612. * @category Lang
  12613. * @param {*} value The value to check.
  12614. * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
  12615. * @example
  12616. *
  12617. * _.isRegExp(/abc/);
  12618. * // => true
  12619. *
  12620. * _.isRegExp('/abc/');
  12621. * // => false
  12622. */
  12623. var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
  12624. /**
  12625. * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
  12626. * double precision number which isn't the result of a rounded unsafe integer.
  12627. *
  12628. * **Note:** This method is based on
  12629. * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
  12630. *
  12631. * @static
  12632. * @memberOf _
  12633. * @since 4.0.0
  12634. * @category Lang
  12635. * @param {*} value The value to check.
  12636. * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
  12637. * @example
  12638. *
  12639. * _.isSafeInteger(3);
  12640. * // => true
  12641. *
  12642. * _.isSafeInteger(Number.MIN_VALUE);
  12643. * // => false
  12644. *
  12645. * _.isSafeInteger(Infinity);
  12646. * // => false
  12647. *
  12648. * _.isSafeInteger('3');
  12649. * // => false
  12650. */
  12651. function isSafeInteger(value) {
  12652. return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
  12653. }
  12654. /**
  12655. * Checks if `value` is classified as a `Set` object.
  12656. *
  12657. * @static
  12658. * @memberOf _
  12659. * @since 4.3.0
  12660. * @category Lang
  12661. * @param {*} value The value to check.
  12662. * @returns {boolean} Returns `true` if `value` is a set, else `false`.
  12663. * @example
  12664. *
  12665. * _.isSet(new Set);
  12666. * // => true
  12667. *
  12668. * _.isSet(new WeakSet);
  12669. * // => false
  12670. */
  12671. var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
  12672. /**
  12673. * Checks if `value` is classified as a `String` primitive or object.
  12674. *
  12675. * @static
  12676. * @since 0.1.0
  12677. * @memberOf _
  12678. * @category Lang
  12679. * @param {*} value The value to check.
  12680. * @returns {boolean} Returns `true` if `value` is a string, else `false`.
  12681. * @example
  12682. *
  12683. * _.isString('abc');
  12684. * // => true
  12685. *
  12686. * _.isString(1);
  12687. * // => false
  12688. */
  12689. function isString(value) {
  12690. return typeof value == 'string' ||
  12691. (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
  12692. }
  12693. /**
  12694. * Checks if `value` is classified as a `Symbol` primitive or object.
  12695. *
  12696. * @static
  12697. * @memberOf _
  12698. * @since 4.0.0
  12699. * @category Lang
  12700. * @param {*} value The value to check.
  12701. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  12702. * @example
  12703. *
  12704. * _.isSymbol(Symbol.iterator);
  12705. * // => true
  12706. *
  12707. * _.isSymbol('abc');
  12708. * // => false
  12709. */
  12710. function isSymbol(value) {
  12711. return typeof value == 'symbol' ||
  12712. (isObjectLike(value) && baseGetTag(value) == symbolTag);
  12713. }
  12714. /**
  12715. * Checks if `value` is classified as a typed array.
  12716. *
  12717. * @static
  12718. * @memberOf _
  12719. * @since 3.0.0
  12720. * @category Lang
  12721. * @param {*} value The value to check.
  12722. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  12723. * @example
  12724. *
  12725. * _.isTypedArray(new Uint8Array);
  12726. * // => true
  12727. *
  12728. * _.isTypedArray([]);
  12729. * // => false
  12730. */
  12731. var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
  12732. /**
  12733. * Checks if `value` is `undefined`.
  12734. *
  12735. * @static
  12736. * @since 0.1.0
  12737. * @memberOf _
  12738. * @category Lang
  12739. * @param {*} value The value to check.
  12740. * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
  12741. * @example
  12742. *
  12743. * _.isUndefined(void 0);
  12744. * // => true
  12745. *
  12746. * _.isUndefined(null);
  12747. * // => false
  12748. */
  12749. function isUndefined(value) {
  12750. return value === undefined;
  12751. }
  12752. /**
  12753. * Checks if `value` is classified as a `WeakMap` object.
  12754. *
  12755. * @static
  12756. * @memberOf _
  12757. * @since 4.3.0
  12758. * @category Lang
  12759. * @param {*} value The value to check.
  12760. * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
  12761. * @example
  12762. *
  12763. * _.isWeakMap(new WeakMap);
  12764. * // => true
  12765. *
  12766. * _.isWeakMap(new Map);
  12767. * // => false
  12768. */
  12769. function isWeakMap(value) {
  12770. return isObjectLike(value) && getTag(value) == weakMapTag;
  12771. }
  12772. /**
  12773. * Checks if `value` is classified as a `WeakSet` object.
  12774. *
  12775. * @static
  12776. * @memberOf _
  12777. * @since 4.3.0
  12778. * @category Lang
  12779. * @param {*} value The value to check.
  12780. * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.
  12781. * @example
  12782. *
  12783. * _.isWeakSet(new WeakSet);
  12784. * // => true
  12785. *
  12786. * _.isWeakSet(new Set);
  12787. * // => false
  12788. */
  12789. function isWeakSet(value) {
  12790. return isObjectLike(value) && baseGetTag(value) == weakSetTag;
  12791. }
  12792. /**
  12793. * Checks if `value` is less than `other`.
  12794. *
  12795. * @static
  12796. * @memberOf _
  12797. * @since 3.9.0
  12798. * @category Lang
  12799. * @param {*} value The value to compare.
  12800. * @param {*} other The other value to compare.
  12801. * @returns {boolean} Returns `true` if `value` is less than `other`,
  12802. * else `false`.
  12803. * @see _.gt
  12804. * @example
  12805. *
  12806. * _.lt(1, 3);
  12807. * // => true
  12808. *
  12809. * _.lt(3, 3);
  12810. * // => false
  12811. *
  12812. * _.lt(3, 1);
  12813. * // => false
  12814. */
  12815. var lt = createRelationalOperation(baseLt);
  12816. /**
  12817. * Checks if `value` is less than or equal to `other`.
  12818. *
  12819. * @static
  12820. * @memberOf _
  12821. * @since 3.9.0
  12822. * @category Lang
  12823. * @param {*} value The value to compare.
  12824. * @param {*} other The other value to compare.
  12825. * @returns {boolean} Returns `true` if `value` is less than or equal to
  12826. * `other`, else `false`.
  12827. * @see _.gte
  12828. * @example
  12829. *
  12830. * _.lte(1, 3);
  12831. * // => true
  12832. *
  12833. * _.lte(3, 3);
  12834. * // => true
  12835. *
  12836. * _.lte(3, 1);
  12837. * // => false
  12838. */
  12839. var lte = createRelationalOperation(function(value, other) {
  12840. return value <= other;
  12841. });
  12842. /**
  12843. * Converts `value` to an array.
  12844. *
  12845. * @static
  12846. * @since 0.1.0
  12847. * @memberOf _
  12848. * @category Lang
  12849. * @param {*} value The value to convert.
  12850. * @returns {Array} Returns the converted array.
  12851. * @example
  12852. *
  12853. * _.toArray({ 'a': 1, 'b': 2 });
  12854. * // => [1, 2]
  12855. *
  12856. * _.toArray('abc');
  12857. * // => ['a', 'b', 'c']
  12858. *
  12859. * _.toArray(1);
  12860. * // => []
  12861. *
  12862. * _.toArray(null);
  12863. * // => []
  12864. */
  12865. function toArray(value) {
  12866. if (!value) {
  12867. return [];
  12868. }
  12869. if (isArrayLike(value)) {
  12870. return isString(value) ? stringToArray(value) : copyArray(value);
  12871. }
  12872. if (symIterator && value[symIterator]) {
  12873. return iteratorToArray(value[symIterator]());
  12874. }
  12875. var tag = getTag(value),
  12876. func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
  12877. return func(value);
  12878. }
  12879. /**
  12880. * Converts `value` to a finite number.
  12881. *
  12882. * @static
  12883. * @memberOf _
  12884. * @since 4.12.0
  12885. * @category Lang
  12886. * @param {*} value The value to convert.
  12887. * @returns {number} Returns the converted number.
  12888. * @example
  12889. *
  12890. * _.toFinite(3.2);
  12891. * // => 3.2
  12892. *
  12893. * _.toFinite(Number.MIN_VALUE);
  12894. * // => 5e-324
  12895. *
  12896. * _.toFinite(Infinity);
  12897. * // => 1.7976931348623157e+308
  12898. *
  12899. * _.toFinite('3.2');
  12900. * // => 3.2
  12901. */
  12902. function toFinite(value) {
  12903. if (!value) {
  12904. return value === 0 ? value : 0;
  12905. }
  12906. value = toNumber(value);
  12907. if (value === INFINITY || value === -INFINITY) {
  12908. var sign = (value < 0 ? -1 : 1);
  12909. return sign * MAX_INTEGER;
  12910. }
  12911. return value === value ? value : 0;
  12912. }
  12913. /**
  12914. * Converts `value` to an integer.
  12915. *
  12916. * **Note:** This method is loosely based on
  12917. * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
  12918. *
  12919. * @static
  12920. * @memberOf _
  12921. * @since 4.0.0
  12922. * @category Lang
  12923. * @param {*} value The value to convert.
  12924. * @returns {number} Returns the converted integer.
  12925. * @example
  12926. *
  12927. * _.toInteger(3.2);
  12928. * // => 3
  12929. *
  12930. * _.toInteger(Number.MIN_VALUE);
  12931. * // => 0
  12932. *
  12933. * _.toInteger(Infinity);
  12934. * // => 1.7976931348623157e+308
  12935. *
  12936. * _.toInteger('3.2');
  12937. * // => 3
  12938. */
  12939. function toInteger(value) {
  12940. var result = toFinite(value),
  12941. remainder = result % 1;
  12942. return result === result ? (remainder ? result - remainder : result) : 0;
  12943. }
  12944. /**
  12945. * Converts `value` to an integer suitable for use as the length of an
  12946. * array-like object.
  12947. *
  12948. * **Note:** This method is based on
  12949. * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
  12950. *
  12951. * @static
  12952. * @memberOf _
  12953. * @since 4.0.0
  12954. * @category Lang
  12955. * @param {*} value The value to convert.
  12956. * @returns {number} Returns the converted integer.
  12957. * @example
  12958. *
  12959. * _.toLength(3.2);
  12960. * // => 3
  12961. *
  12962. * _.toLength(Number.MIN_VALUE);
  12963. * // => 0
  12964. *
  12965. * _.toLength(Infinity);
  12966. * // => 4294967295
  12967. *
  12968. * _.toLength('3.2');
  12969. * // => 3
  12970. */
  12971. function toLength(value) {
  12972. return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
  12973. }
  12974. /**
  12975. * Converts `value` to a number.
  12976. *
  12977. * @static
  12978. * @memberOf _
  12979. * @since 4.0.0
  12980. * @category Lang
  12981. * @param {*} value The value to process.
  12982. * @returns {number} Returns the number.
  12983. * @example
  12984. *
  12985. * _.toNumber(3.2);
  12986. * // => 3.2
  12987. *
  12988. * _.toNumber(Number.MIN_VALUE);
  12989. * // => 5e-324
  12990. *
  12991. * _.toNumber(Infinity);
  12992. * // => Infinity
  12993. *
  12994. * _.toNumber('3.2');
  12995. * // => 3.2
  12996. */
  12997. function toNumber(value) {
  12998. if (typeof value == 'number') {
  12999. return value;
  13000. }
  13001. if (isSymbol(value)) {
  13002. return NAN;
  13003. }
  13004. if (isObject(value)) {
  13005. var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
  13006. value = isObject(other) ? (other + '') : other;
  13007. }
  13008. if (typeof value != 'string') {
  13009. return value === 0 ? value : +value;
  13010. }
  13011. value = baseTrim(value);
  13012. var isBinary = reIsBinary.test(value);
  13013. return (isBinary || reIsOctal.test(value))
  13014. ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
  13015. : (reIsBadHex.test(value) ? NAN : +value);
  13016. }
  13017. /**
  13018. * Converts `value` to a plain object flattening inherited enumerable string
  13019. * keyed properties of `value` to own properties of the plain object.
  13020. *
  13021. * @static
  13022. * @memberOf _
  13023. * @since 3.0.0
  13024. * @category Lang
  13025. * @param {*} value The value to convert.
  13026. * @returns {Object} Returns the converted plain object.
  13027. * @example
  13028. *
  13029. * function Foo() {
  13030. * this.b = 2;
  13031. * }
  13032. *
  13033. * Foo.prototype.c = 3;
  13034. *
  13035. * _.assign({ 'a': 1 }, new Foo);
  13036. * // => { 'a': 1, 'b': 2 }
  13037. *
  13038. * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
  13039. * // => { 'a': 1, 'b': 2, 'c': 3 }
  13040. */
  13041. function toPlainObject(value) {
  13042. return copyObject(value, keysIn(value));
  13043. }
  13044. /**
  13045. * Converts `value` to a safe integer. A safe integer can be compared and
  13046. * represented correctly.
  13047. *
  13048. * @static
  13049. * @memberOf _
  13050. * @since 4.0.0
  13051. * @category Lang
  13052. * @param {*} value The value to convert.
  13053. * @returns {number} Returns the converted integer.
  13054. * @example
  13055. *
  13056. * _.toSafeInteger(3.2);
  13057. * // => 3
  13058. *
  13059. * _.toSafeInteger(Number.MIN_VALUE);
  13060. * // => 0
  13061. *
  13062. * _.toSafeInteger(Infinity);
  13063. * // => 9007199254740991
  13064. *
  13065. * _.toSafeInteger('3.2');
  13066. * // => 3
  13067. */
  13068. function toSafeInteger(value) {
  13069. return value
  13070. ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
  13071. : (value === 0 ? value : 0);
  13072. }
  13073. /**
  13074. * Converts `value` to a string. An empty string is returned for `null`
  13075. * and `undefined` values. The sign of `-0` is preserved.
  13076. *
  13077. * @static
  13078. * @memberOf _
  13079. * @since 4.0.0
  13080. * @category Lang
  13081. * @param {*} value The value to convert.
  13082. * @returns {string} Returns the converted string.
  13083. * @example
  13084. *
  13085. * _.toString(null);
  13086. * // => ''
  13087. *
  13088. * _.toString(-0);
  13089. * // => '-0'
  13090. *
  13091. * _.toString([1, 2, 3]);
  13092. * // => '1,2,3'
  13093. */
  13094. function toString(value) {
  13095. return value == null ? '' : baseToString(value);
  13096. }
  13097. /*------------------------------------------------------------------------*/
  13098. /**
  13099. * Assigns own enumerable string keyed properties of source objects to the
  13100. * destination object. Source objects are applied from left to right.
  13101. * Subsequent sources overwrite property assignments of previous sources.
  13102. *
  13103. * **Note:** This method mutates `object` and is loosely based on
  13104. * [`Object.assign`](https://mdn.io/Object/assign).
  13105. *
  13106. * @static
  13107. * @memberOf _
  13108. * @since 0.10.0
  13109. * @category Object
  13110. * @param {Object} object The destination object.
  13111. * @param {...Object} [sources] The source objects.
  13112. * @returns {Object} Returns `object`.
  13113. * @see _.assignIn
  13114. * @example
  13115. *
  13116. * function Foo() {
  13117. * this.a = 1;
  13118. * }
  13119. *
  13120. * function Bar() {
  13121. * this.c = 3;
  13122. * }
  13123. *
  13124. * Foo.prototype.b = 2;
  13125. * Bar.prototype.d = 4;
  13126. *
  13127. * _.assign({ 'a': 0 }, new Foo, new Bar);
  13128. * // => { 'a': 1, 'c': 3 }
  13129. */
  13130. var assign = createAssigner(function(object, source) {
  13131. if (isPrototype(source) || isArrayLike(source)) {
  13132. copyObject(source, keys(source), object);
  13133. return;
  13134. }
  13135. for (var key in source) {
  13136. if (hasOwnProperty.call(source, key)) {
  13137. assignValue(object, key, source[key]);
  13138. }
  13139. }
  13140. });
  13141. /**
  13142. * This method is like `_.assign` except that it iterates over own and
  13143. * inherited source properties.
  13144. *
  13145. * **Note:** This method mutates `object`.
  13146. *
  13147. * @static
  13148. * @memberOf _
  13149. * @since 4.0.0
  13150. * @alias extend
  13151. * @category Object
  13152. * @param {Object} object The destination object.
  13153. * @param {...Object} [sources] The source objects.
  13154. * @returns {Object} Returns `object`.
  13155. * @see _.assign
  13156. * @example
  13157. *
  13158. * function Foo() {
  13159. * this.a = 1;
  13160. * }
  13161. *
  13162. * function Bar() {
  13163. * this.c = 3;
  13164. * }
  13165. *
  13166. * Foo.prototype.b = 2;
  13167. * Bar.prototype.d = 4;
  13168. *
  13169. * _.assignIn({ 'a': 0 }, new Foo, new Bar);
  13170. * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
  13171. */
  13172. var assignIn = createAssigner(function(object, source) {
  13173. copyObject(source, keysIn(source), object);
  13174. });
  13175. /**
  13176. * This method is like `_.assignIn` except that it accepts `customizer`
  13177. * which is invoked to produce the assigned values. If `customizer` returns
  13178. * `undefined`, assignment is handled by the method instead. The `customizer`
  13179. * is invoked with five arguments: (objValue, srcValue, key, object, source).
  13180. *
  13181. * **Note:** This method mutates `object`.
  13182. *
  13183. * @static
  13184. * @memberOf _
  13185. * @since 4.0.0
  13186. * @alias extendWith
  13187. * @category Object
  13188. * @param {Object} object The destination object.
  13189. * @param {...Object} sources The source objects.
  13190. * @param {Function} [customizer] The function to customize assigned values.
  13191. * @returns {Object} Returns `object`.
  13192. * @see _.assignWith
  13193. * @example
  13194. *
  13195. * function customizer(objValue, srcValue) {
  13196. * return _.isUndefined(objValue) ? srcValue : objValue;
  13197. * }
  13198. *
  13199. * var defaults = _.partialRight(_.assignInWith, customizer);
  13200. *
  13201. * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
  13202. * // => { 'a': 1, 'b': 2 }
  13203. */
  13204. var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
  13205. copyObject(source, keysIn(source), object, customizer);
  13206. });
  13207. /**
  13208. * This method is like `_.assign` except that it accepts `customizer`
  13209. * which is invoked to produce the assigned values. If `customizer` returns
  13210. * `undefined`, assignment is handled by the method instead. The `customizer`
  13211. * is invoked with five arguments: (objValue, srcValue, key, object, source).
  13212. *
  13213. * **Note:** This method mutates `object`.
  13214. *
  13215. * @static
  13216. * @memberOf _
  13217. * @since 4.0.0
  13218. * @category Object
  13219. * @param {Object} object The destination object.
  13220. * @param {...Object} sources The source objects.
  13221. * @param {Function} [customizer] The function to customize assigned values.
  13222. * @returns {Object} Returns `object`.
  13223. * @see _.assignInWith
  13224. * @example
  13225. *
  13226. * function customizer(objValue, srcValue) {
  13227. * return _.isUndefined(objValue) ? srcValue : objValue;
  13228. * }
  13229. *
  13230. * var defaults = _.partialRight(_.assignWith, customizer);
  13231. *
  13232. * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
  13233. * // => { 'a': 1, 'b': 2 }
  13234. */
  13235. var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
  13236. copyObject(source, keys(source), object, customizer);
  13237. });
  13238. /**
  13239. * Creates an array of values corresponding to `paths` of `object`.
  13240. *
  13241. * @static
  13242. * @memberOf _
  13243. * @since 1.0.0
  13244. * @category Object
  13245. * @param {Object} object The object to iterate over.
  13246. * @param {...(string|string[])} [paths] The property paths to pick.
  13247. * @returns {Array} Returns the picked values.
  13248. * @example
  13249. *
  13250. * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
  13251. *
  13252. * _.at(object, ['a[0].b.c', 'a[1]']);
  13253. * // => [3, 4]
  13254. */
  13255. var at = flatRest(baseAt);
  13256. /**
  13257. * Creates an object that inherits from the `prototype` object. If a
  13258. * `properties` object is given, its own enumerable string keyed properties
  13259. * are assigned to the created object.
  13260. *
  13261. * @static
  13262. * @memberOf _
  13263. * @since 2.3.0
  13264. * @category Object
  13265. * @param {Object} prototype The object to inherit from.
  13266. * @param {Object} [properties] The properties to assign to the object.
  13267. * @returns {Object} Returns the new object.
  13268. * @example
  13269. *
  13270. * function Shape() {
  13271. * this.x = 0;
  13272. * this.y = 0;
  13273. * }
  13274. *
  13275. * function Circle() {
  13276. * Shape.call(this);
  13277. * }
  13278. *
  13279. * Circle.prototype = _.create(Shape.prototype, {
  13280. * 'constructor': Circle
  13281. * });
  13282. *
  13283. * var circle = new Circle;
  13284. * circle instanceof Circle;
  13285. * // => true
  13286. *
  13287. * circle instanceof Shape;
  13288. * // => true
  13289. */
  13290. function create(prototype, properties) {
  13291. var result = baseCreate(prototype);
  13292. return properties == null ? result : baseAssign(result, properties);
  13293. }
  13294. /**
  13295. * Assigns own and inherited enumerable string keyed properties of source
  13296. * objects to the destination object for all destination properties that
  13297. * resolve to `undefined`. Source objects are applied from left to right.
  13298. * Once a property is set, additional values of the same property are ignored.
  13299. *
  13300. * **Note:** This method mutates `object`.
  13301. *
  13302. * @static
  13303. * @since 0.1.0
  13304. * @memberOf _
  13305. * @category Object
  13306. * @param {Object} object The destination object.
  13307. * @param {...Object} [sources] The source objects.
  13308. * @returns {Object} Returns `object`.
  13309. * @see _.defaultsDeep
  13310. * @example
  13311. *
  13312. * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
  13313. * // => { 'a': 1, 'b': 2 }
  13314. */
  13315. var defaults = baseRest(function(object, sources) {
  13316. object = Object(object);
  13317. var index = -1;
  13318. var length = sources.length;
  13319. var guard = length > 2 ? sources[2] : undefined;
  13320. if (guard && isIterateeCall(sources[0], sources[1], guard)) {
  13321. length = 1;
  13322. }
  13323. while (++index < length) {
  13324. var source = sources[index];
  13325. var props = keysIn(source);
  13326. var propsIndex = -1;
  13327. var propsLength = props.length;
  13328. while (++propsIndex < propsLength) {
  13329. var key = props[propsIndex];
  13330. var value = object[key];
  13331. if (value === undefined ||
  13332. (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
  13333. object[key] = source[key];
  13334. }
  13335. }
  13336. }
  13337. return object;
  13338. });
  13339. /**
  13340. * This method is like `_.defaults` except that it recursively assigns
  13341. * default properties.
  13342. *
  13343. * **Note:** This method mutates `object`.
  13344. *
  13345. * @static
  13346. * @memberOf _
  13347. * @since 3.10.0
  13348. * @category Object
  13349. * @param {Object} object The destination object.
  13350. * @param {...Object} [sources] The source objects.
  13351. * @returns {Object} Returns `object`.
  13352. * @see _.defaults
  13353. * @example
  13354. *
  13355. * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });
  13356. * // => { 'a': { 'b': 2, 'c': 3 } }
  13357. */
  13358. var defaultsDeep = baseRest(function(args) {
  13359. args.push(undefined, customDefaultsMerge);
  13360. return apply(mergeWith, undefined, args);
  13361. });
  13362. /**
  13363. * This method is like `_.find` except that it returns the key of the first
  13364. * element `predicate` returns truthy for instead of the element itself.
  13365. *
  13366. * @static
  13367. * @memberOf _
  13368. * @since 1.1.0
  13369. * @category Object
  13370. * @param {Object} object The object to inspect.
  13371. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  13372. * @returns {string|undefined} Returns the key of the matched element,
  13373. * else `undefined`.
  13374. * @example
  13375. *
  13376. * var users = {
  13377. * 'barney': { 'age': 36, 'active': true },
  13378. * 'fred': { 'age': 40, 'active': false },
  13379. * 'pebbles': { 'age': 1, 'active': true }
  13380. * };
  13381. *
  13382. * _.findKey(users, function(o) { return o.age < 40; });
  13383. * // => 'barney' (iteration order is not guaranteed)
  13384. *
  13385. * // The `_.matches` iteratee shorthand.
  13386. * _.findKey(users, { 'age': 1, 'active': true });
  13387. * // => 'pebbles'
  13388. *
  13389. * // The `_.matchesProperty` iteratee shorthand.
  13390. * _.findKey(users, ['active', false]);
  13391. * // => 'fred'
  13392. *
  13393. * // The `_.property` iteratee shorthand.
  13394. * _.findKey(users, 'active');
  13395. * // => 'barney'
  13396. */
  13397. function findKey(object, predicate) {
  13398. return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
  13399. }
  13400. /**
  13401. * This method is like `_.findKey` except that it iterates over elements of
  13402. * a collection in the opposite order.
  13403. *
  13404. * @static
  13405. * @memberOf _
  13406. * @since 2.0.0
  13407. * @category Object
  13408. * @param {Object} object The object to inspect.
  13409. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  13410. * @returns {string|undefined} Returns the key of the matched element,
  13411. * else `undefined`.
  13412. * @example
  13413. *
  13414. * var users = {
  13415. * 'barney': { 'age': 36, 'active': true },
  13416. * 'fred': { 'age': 40, 'active': false },
  13417. * 'pebbles': { 'age': 1, 'active': true }
  13418. * };
  13419. *
  13420. * _.findLastKey(users, function(o) { return o.age < 40; });
  13421. * // => returns 'pebbles' assuming `_.findKey` returns 'barney'
  13422. *
  13423. * // The `_.matches` iteratee shorthand.
  13424. * _.findLastKey(users, { 'age': 36, 'active': true });
  13425. * // => 'barney'
  13426. *
  13427. * // The `_.matchesProperty` iteratee shorthand.
  13428. * _.findLastKey(users, ['active', false]);
  13429. * // => 'fred'
  13430. *
  13431. * // The `_.property` iteratee shorthand.
  13432. * _.findLastKey(users, 'active');
  13433. * // => 'pebbles'
  13434. */
  13435. function findLastKey(object, predicate) {
  13436. return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
  13437. }
  13438. /**
  13439. * Iterates over own and inherited enumerable string keyed properties of an
  13440. * object and invokes `iteratee` for each property. The iteratee is invoked
  13441. * with three arguments: (value, key, object). Iteratee functions may exit
  13442. * iteration early by explicitly returning `false`.
  13443. *
  13444. * @static
  13445. * @memberOf _
  13446. * @since 0.3.0
  13447. * @category Object
  13448. * @param {Object} object The object to iterate over.
  13449. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  13450. * @returns {Object} Returns `object`.
  13451. * @see _.forInRight
  13452. * @example
  13453. *
  13454. * function Foo() {
  13455. * this.a = 1;
  13456. * this.b = 2;
  13457. * }
  13458. *
  13459. * Foo.prototype.c = 3;
  13460. *
  13461. * _.forIn(new Foo, function(value, key) {
  13462. * console.log(key);
  13463. * });
  13464. * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
  13465. */
  13466. function forIn(object, iteratee) {
  13467. return object == null
  13468. ? object
  13469. : baseFor(object, getIteratee(iteratee, 3), keysIn);
  13470. }
  13471. /**
  13472. * This method is like `_.forIn` except that it iterates over properties of
  13473. * `object` in the opposite order.
  13474. *
  13475. * @static
  13476. * @memberOf _
  13477. * @since 2.0.0
  13478. * @category Object
  13479. * @param {Object} object The object to iterate over.
  13480. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  13481. * @returns {Object} Returns `object`.
  13482. * @see _.forIn
  13483. * @example
  13484. *
  13485. * function Foo() {
  13486. * this.a = 1;
  13487. * this.b = 2;
  13488. * }
  13489. *
  13490. * Foo.prototype.c = 3;
  13491. *
  13492. * _.forInRight(new Foo, function(value, key) {
  13493. * console.log(key);
  13494. * });
  13495. * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
  13496. */
  13497. function forInRight(object, iteratee) {
  13498. return object == null
  13499. ? object
  13500. : baseForRight(object, getIteratee(iteratee, 3), keysIn);
  13501. }
  13502. /**
  13503. * Iterates over own enumerable string keyed properties of an object and
  13504. * invokes `iteratee` for each property. The iteratee is invoked with three
  13505. * arguments: (value, key, object). Iteratee functions may exit iteration
  13506. * early by explicitly returning `false`.
  13507. *
  13508. * @static
  13509. * @memberOf _
  13510. * @since 0.3.0
  13511. * @category Object
  13512. * @param {Object} object The object to iterate over.
  13513. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  13514. * @returns {Object} Returns `object`.
  13515. * @see _.forOwnRight
  13516. * @example
  13517. *
  13518. * function Foo() {
  13519. * this.a = 1;
  13520. * this.b = 2;
  13521. * }
  13522. *
  13523. * Foo.prototype.c = 3;
  13524. *
  13525. * _.forOwn(new Foo, function(value, key) {
  13526. * console.log(key);
  13527. * });
  13528. * // => Logs 'a' then 'b' (iteration order is not guaranteed).
  13529. */
  13530. function forOwn(object, iteratee) {
  13531. return object && baseForOwn(object, getIteratee(iteratee, 3));
  13532. }
  13533. /**
  13534. * This method is like `_.forOwn` except that it iterates over properties of
  13535. * `object` in the opposite order.
  13536. *
  13537. * @static
  13538. * @memberOf _
  13539. * @since 2.0.0
  13540. * @category Object
  13541. * @param {Object} object The object to iterate over.
  13542. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  13543. * @returns {Object} Returns `object`.
  13544. * @see _.forOwn
  13545. * @example
  13546. *
  13547. * function Foo() {
  13548. * this.a = 1;
  13549. * this.b = 2;
  13550. * }
  13551. *
  13552. * Foo.prototype.c = 3;
  13553. *
  13554. * _.forOwnRight(new Foo, function(value, key) {
  13555. * console.log(key);
  13556. * });
  13557. * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
  13558. */
  13559. function forOwnRight(object, iteratee) {
  13560. return object && baseForOwnRight(object, getIteratee(iteratee, 3));
  13561. }
  13562. /**
  13563. * Creates an array of function property names from own enumerable properties
  13564. * of `object`.
  13565. *
  13566. * @static
  13567. * @since 0.1.0
  13568. * @memberOf _
  13569. * @category Object
  13570. * @param {Object} object The object to inspect.
  13571. * @returns {Array} Returns the function names.
  13572. * @see _.functionsIn
  13573. * @example
  13574. *
  13575. * function Foo() {
  13576. * this.a = _.constant('a');
  13577. * this.b = _.constant('b');
  13578. * }
  13579. *
  13580. * Foo.prototype.c = _.constant('c');
  13581. *
  13582. * _.functions(new Foo);
  13583. * // => ['a', 'b']
  13584. */
  13585. function functions(object) {
  13586. return object == null ? [] : baseFunctions(object, keys(object));
  13587. }
  13588. /**
  13589. * Creates an array of function property names from own and inherited
  13590. * enumerable properties of `object`.
  13591. *
  13592. * @static
  13593. * @memberOf _
  13594. * @since 4.0.0
  13595. * @category Object
  13596. * @param {Object} object The object to inspect.
  13597. * @returns {Array} Returns the function names.
  13598. * @see _.functions
  13599. * @example
  13600. *
  13601. * function Foo() {
  13602. * this.a = _.constant('a');
  13603. * this.b = _.constant('b');
  13604. * }
  13605. *
  13606. * Foo.prototype.c = _.constant('c');
  13607. *
  13608. * _.functionsIn(new Foo);
  13609. * // => ['a', 'b', 'c']
  13610. */
  13611. function functionsIn(object) {
  13612. return object == null ? [] : baseFunctions(object, keysIn(object));
  13613. }
  13614. /**
  13615. * Gets the value at `path` of `object`. If the resolved value is
  13616. * `undefined`, the `defaultValue` is returned in its place.
  13617. *
  13618. * @static
  13619. * @memberOf _
  13620. * @since 3.7.0
  13621. * @category Object
  13622. * @param {Object} object The object to query.
  13623. * @param {Array|string} path The path of the property to get.
  13624. * @param {*} [defaultValue] The value returned for `undefined` resolved values.
  13625. * @returns {*} Returns the resolved value.
  13626. * @example
  13627. *
  13628. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  13629. *
  13630. * _.get(object, 'a[0].b.c');
  13631. * // => 3
  13632. *
  13633. * _.get(object, ['a', '0', 'b', 'c']);
  13634. * // => 3
  13635. *
  13636. * _.get(object, 'a.b.c', 'default');
  13637. * // => 'default'
  13638. */
  13639. function get(object, path, defaultValue) {
  13640. var result = object == null ? undefined : baseGet(object, path);
  13641. return result === undefined ? defaultValue : result;
  13642. }
  13643. /**
  13644. * Checks if `path` is a direct property of `object`.
  13645. *
  13646. * @static
  13647. * @since 0.1.0
  13648. * @memberOf _
  13649. * @category Object
  13650. * @param {Object} object The object to query.
  13651. * @param {Array|string} path The path to check.
  13652. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  13653. * @example
  13654. *
  13655. * var object = { 'a': { 'b': 2 } };
  13656. * var other = _.create({ 'a': _.create({ 'b': 2 }) });
  13657. *
  13658. * _.has(object, 'a');
  13659. * // => true
  13660. *
  13661. * _.has(object, 'a.b');
  13662. * // => true
  13663. *
  13664. * _.has(object, ['a', 'b']);
  13665. * // => true
  13666. *
  13667. * _.has(other, 'a');
  13668. * // => false
  13669. */
  13670. function has(object, path) {
  13671. return object != null && hasPath(object, path, baseHas);
  13672. }
  13673. /**
  13674. * Checks if `path` is a direct or inherited property of `object`.
  13675. *
  13676. * @static
  13677. * @memberOf _
  13678. * @since 4.0.0
  13679. * @category Object
  13680. * @param {Object} object The object to query.
  13681. * @param {Array|string} path The path to check.
  13682. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  13683. * @example
  13684. *
  13685. * var object = _.create({ 'a': _.create({ 'b': 2 }) });
  13686. *
  13687. * _.hasIn(object, 'a');
  13688. * // => true
  13689. *
  13690. * _.hasIn(object, 'a.b');
  13691. * // => true
  13692. *
  13693. * _.hasIn(object, ['a', 'b']);
  13694. * // => true
  13695. *
  13696. * _.hasIn(object, 'b');
  13697. * // => false
  13698. */
  13699. function hasIn(object, path) {
  13700. return object != null && hasPath(object, path, baseHasIn);
  13701. }
  13702. /**
  13703. * Creates an object composed of the inverted keys and values of `object`.
  13704. * If `object` contains duplicate values, subsequent values overwrite
  13705. * property assignments of previous values.
  13706. *
  13707. * @static
  13708. * @memberOf _
  13709. * @since 0.7.0
  13710. * @category Object
  13711. * @param {Object} object The object to invert.
  13712. * @returns {Object} Returns the new inverted object.
  13713. * @example
  13714. *
  13715. * var object = { 'a': 1, 'b': 2, 'c': 1 };
  13716. *
  13717. * _.invert(object);
  13718. * // => { '1': 'c', '2': 'b' }
  13719. */
  13720. var invert = createInverter(function(result, value, key) {
  13721. if (value != null &&
  13722. typeof value.toString != 'function') {
  13723. value = nativeObjectToString.call(value);
  13724. }
  13725. result[value] = key;
  13726. }, constant(identity));
  13727. /**
  13728. * This method is like `_.invert` except that the inverted object is generated
  13729. * from the results of running each element of `object` thru `iteratee`. The
  13730. * corresponding inverted value of each inverted key is an array of keys
  13731. * responsible for generating the inverted value. The iteratee is invoked
  13732. * with one argument: (value).
  13733. *
  13734. * @static
  13735. * @memberOf _
  13736. * @since 4.1.0
  13737. * @category Object
  13738. * @param {Object} object The object to invert.
  13739. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  13740. * @returns {Object} Returns the new inverted object.
  13741. * @example
  13742. *
  13743. * var object = { 'a': 1, 'b': 2, 'c': 1 };
  13744. *
  13745. * _.invertBy(object);
  13746. * // => { '1': ['a', 'c'], '2': ['b'] }
  13747. *
  13748. * _.invertBy(object, function(value) {
  13749. * return 'group' + value;
  13750. * });
  13751. * // => { 'group1': ['a', 'c'], 'group2': ['b'] }
  13752. */
  13753. var invertBy = createInverter(function(result, value, key) {
  13754. if (value != null &&
  13755. typeof value.toString != 'function') {
  13756. value = nativeObjectToString.call(value);
  13757. }
  13758. if (hasOwnProperty.call(result, value)) {
  13759. result[value].push(key);
  13760. } else {
  13761. result[value] = [key];
  13762. }
  13763. }, getIteratee);
  13764. /**
  13765. * Invokes the method at `path` of `object`.
  13766. *
  13767. * @static
  13768. * @memberOf _
  13769. * @since 4.0.0
  13770. * @category Object
  13771. * @param {Object} object The object to query.
  13772. * @param {Array|string} path The path of the method to invoke.
  13773. * @param {...*} [args] The arguments to invoke the method with.
  13774. * @returns {*} Returns the result of the invoked method.
  13775. * @example
  13776. *
  13777. * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
  13778. *
  13779. * _.invoke(object, 'a[0].b.c.slice', 1, 3);
  13780. * // => [2, 3]
  13781. */
  13782. var invoke = baseRest(baseInvoke);
  13783. /**
  13784. * Creates an array of the own enumerable property names of `object`.
  13785. *
  13786. * **Note:** Non-object values are coerced to objects. See the
  13787. * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  13788. * for more details.
  13789. *
  13790. * @static
  13791. * @since 0.1.0
  13792. * @memberOf _
  13793. * @category Object
  13794. * @param {Object} object The object to query.
  13795. * @returns {Array} Returns the array of property names.
  13796. * @example
  13797. *
  13798. * function Foo() {
  13799. * this.a = 1;
  13800. * this.b = 2;
  13801. * }
  13802. *
  13803. * Foo.prototype.c = 3;
  13804. *
  13805. * _.keys(new Foo);
  13806. * // => ['a', 'b'] (iteration order is not guaranteed)
  13807. *
  13808. * _.keys('hi');
  13809. * // => ['0', '1']
  13810. */
  13811. function keys(object) {
  13812. return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
  13813. }
  13814. /**
  13815. * Creates an array of the own and inherited enumerable property names of `object`.
  13816. *
  13817. * **Note:** Non-object values are coerced to objects.
  13818. *
  13819. * @static
  13820. * @memberOf _
  13821. * @since 3.0.0
  13822. * @category Object
  13823. * @param {Object} object The object to query.
  13824. * @returns {Array} Returns the array of property names.
  13825. * @example
  13826. *
  13827. * function Foo() {
  13828. * this.a = 1;
  13829. * this.b = 2;
  13830. * }
  13831. *
  13832. * Foo.prototype.c = 3;
  13833. *
  13834. * _.keysIn(new Foo);
  13835. * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
  13836. */
  13837. function keysIn(object) {
  13838. return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
  13839. }
  13840. /**
  13841. * The opposite of `_.mapValues`; this method creates an object with the
  13842. * same values as `object` and keys generated by running each own enumerable
  13843. * string keyed property of `object` thru `iteratee`. The iteratee is invoked
  13844. * with three arguments: (value, key, object).
  13845. *
  13846. * @static
  13847. * @memberOf _
  13848. * @since 3.8.0
  13849. * @category Object
  13850. * @param {Object} object The object to iterate over.
  13851. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  13852. * @returns {Object} Returns the new mapped object.
  13853. * @see _.mapValues
  13854. * @example
  13855. *
  13856. * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
  13857. * return key + value;
  13858. * });
  13859. * // => { 'a1': 1, 'b2': 2 }
  13860. */
  13861. function mapKeys(object, iteratee) {
  13862. var result = {};
  13863. iteratee = getIteratee(iteratee, 3);
  13864. baseForOwn(object, function(value, key, object) {
  13865. baseAssignValue(result, iteratee(value, key, object), value);
  13866. });
  13867. return result;
  13868. }
  13869. /**
  13870. * Creates an object with the same keys as `object` and values generated
  13871. * by running each own enumerable string keyed property of `object` thru
  13872. * `iteratee`. The iteratee is invoked with three arguments:
  13873. * (value, key, object).
  13874. *
  13875. * @static
  13876. * @memberOf _
  13877. * @since 2.4.0
  13878. * @category Object
  13879. * @param {Object} object The object to iterate over.
  13880. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  13881. * @returns {Object} Returns the new mapped object.
  13882. * @see _.mapKeys
  13883. * @example
  13884. *
  13885. * var users = {
  13886. * 'fred': { 'user': 'fred', 'age': 40 },
  13887. * 'pebbles': { 'user': 'pebbles', 'age': 1 }
  13888. * };
  13889. *
  13890. * _.mapValues(users, function(o) { return o.age; });
  13891. * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
  13892. *
  13893. * // The `_.property` iteratee shorthand.
  13894. * _.mapValues(users, 'age');
  13895. * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
  13896. */
  13897. function mapValues(object, iteratee) {
  13898. var result = {};
  13899. iteratee = getIteratee(iteratee, 3);
  13900. baseForOwn(object, function(value, key, object) {
  13901. baseAssignValue(result, key, iteratee(value, key, object));
  13902. });
  13903. return result;
  13904. }
  13905. /**
  13906. * This method is like `_.assign` except that it recursively merges own and
  13907. * inherited enumerable string keyed properties of source objects into the
  13908. * destination object. Source properties that resolve to `undefined` are
  13909. * skipped if a destination value exists. Array and plain object properties
  13910. * are merged recursively. Other objects and value types are overridden by
  13911. * assignment. Source objects are applied from left to right. Subsequent
  13912. * sources overwrite property assignments of previous sources.
  13913. *
  13914. * **Note:** This method mutates `object`.
  13915. *
  13916. * @static
  13917. * @memberOf _
  13918. * @since 0.5.0
  13919. * @category Object
  13920. * @param {Object} object The destination object.
  13921. * @param {...Object} [sources] The source objects.
  13922. * @returns {Object} Returns `object`.
  13923. * @example
  13924. *
  13925. * var object = {
  13926. * 'a': [{ 'b': 2 }, { 'd': 4 }]
  13927. * };
  13928. *
  13929. * var other = {
  13930. * 'a': [{ 'c': 3 }, { 'e': 5 }]
  13931. * };
  13932. *
  13933. * _.merge(object, other);
  13934. * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
  13935. */
  13936. var merge = createAssigner(function(object, source, srcIndex) {
  13937. baseMerge(object, source, srcIndex);
  13938. });
  13939. /**
  13940. * This method is like `_.merge` except that it accepts `customizer` which
  13941. * is invoked to produce the merged values of the destination and source
  13942. * properties. If `customizer` returns `undefined`, merging is handled by the
  13943. * method instead. The `customizer` is invoked with six arguments:
  13944. * (objValue, srcValue, key, object, source, stack).
  13945. *
  13946. * **Note:** This method mutates `object`.
  13947. *
  13948. * @static
  13949. * @memberOf _
  13950. * @since 4.0.0
  13951. * @category Object
  13952. * @param {Object} object The destination object.
  13953. * @param {...Object} sources The source objects.
  13954. * @param {Function} customizer The function to customize assigned values.
  13955. * @returns {Object} Returns `object`.
  13956. * @example
  13957. *
  13958. * function customizer(objValue, srcValue) {
  13959. * if (_.isArray(objValue)) {
  13960. * return objValue.concat(srcValue);
  13961. * }
  13962. * }
  13963. *
  13964. * var object = { 'a': [1], 'b': [2] };
  13965. * var other = { 'a': [3], 'b': [4] };
  13966. *
  13967. * _.mergeWith(object, other, customizer);
  13968. * // => { 'a': [1, 3], 'b': [2, 4] }
  13969. */
  13970. var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
  13971. baseMerge(object, source, srcIndex, customizer);
  13972. });
  13973. /**
  13974. * The opposite of `_.pick`; this method creates an object composed of the
  13975. * own and inherited enumerable property paths of `object` that are not omitted.
  13976. *
  13977. * **Note:** This method is considerably slower than `_.pick`.
  13978. *
  13979. * @static
  13980. * @since 0.1.0
  13981. * @memberOf _
  13982. * @category Object
  13983. * @param {Object} object The source object.
  13984. * @param {...(string|string[])} [paths] The property paths to omit.
  13985. * @returns {Object} Returns the new object.
  13986. * @example
  13987. *
  13988. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  13989. *
  13990. * _.omit(object, ['a', 'c']);
  13991. * // => { 'b': '2' }
  13992. */
  13993. var omit = flatRest(function(object, paths) {
  13994. var result = {};
  13995. if (object == null) {
  13996. return result;
  13997. }
  13998. var isDeep = false;
  13999. paths = arrayMap(paths, function(path) {
  14000. path = castPath(path, object);
  14001. isDeep || (isDeep = path.length > 1);
  14002. return path;
  14003. });
  14004. copyObject(object, getAllKeysIn(object), result);
  14005. if (isDeep) {
  14006. result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
  14007. }
  14008. var length = paths.length;
  14009. while (length--) {
  14010. baseUnset(result, paths[length]);
  14011. }
  14012. return result;
  14013. });
  14014. /**
  14015. * The opposite of `_.pickBy`; this method creates an object composed of
  14016. * the own and inherited enumerable string keyed properties of `object` that
  14017. * `predicate` doesn't return truthy for. The predicate is invoked with two
  14018. * arguments: (value, key).
  14019. *
  14020. * @static
  14021. * @memberOf _
  14022. * @since 4.0.0
  14023. * @category Object
  14024. * @param {Object} object The source object.
  14025. * @param {Function} [predicate=_.identity] The function invoked per property.
  14026. * @returns {Object} Returns the new object.
  14027. * @example
  14028. *
  14029. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  14030. *
  14031. * _.omitBy(object, _.isNumber);
  14032. * // => { 'b': '2' }
  14033. */
  14034. function omitBy(object, predicate) {
  14035. return pickBy(object, negate(getIteratee(predicate)));
  14036. }
  14037. /**
  14038. * Creates an object composed of the picked `object` properties.
  14039. *
  14040. * @static
  14041. * @since 0.1.0
  14042. * @memberOf _
  14043. * @category Object
  14044. * @param {Object} object The source object.
  14045. * @param {...(string|string[])} [paths] The property paths to pick.
  14046. * @returns {Object} Returns the new object.
  14047. * @example
  14048. *
  14049. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  14050. *
  14051. * _.pick(object, ['a', 'c']);
  14052. * // => { 'a': 1, 'c': 3 }
  14053. */
  14054. var pick = flatRest(function(object, paths) {
  14055. return object == null ? {} : basePick(object, paths);
  14056. });
  14057. /**
  14058. * Creates an object composed of the `object` properties `predicate` returns
  14059. * truthy for. The predicate is invoked with two arguments: (value, key).
  14060. *
  14061. * @static
  14062. * @memberOf _
  14063. * @since 4.0.0
  14064. * @category Object
  14065. * @param {Object} object The source object.
  14066. * @param {Function} [predicate=_.identity] The function invoked per property.
  14067. * @returns {Object} Returns the new object.
  14068. * @example
  14069. *
  14070. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  14071. *
  14072. * _.pickBy(object, _.isNumber);
  14073. * // => { 'a': 1, 'c': 3 }
  14074. */
  14075. function pickBy(object, predicate) {
  14076. if (object == null) {
  14077. return {};
  14078. }
  14079. var props = arrayMap(getAllKeysIn(object), function(prop) {
  14080. return [prop];
  14081. });
  14082. predicate = getIteratee(predicate);
  14083. return basePickBy(object, props, function(value, path) {
  14084. return predicate(value, path[0]);
  14085. });
  14086. }
  14087. /**
  14088. * This method is like `_.get` except that if the resolved value is a
  14089. * function it's invoked with the `this` binding of its parent object and
  14090. * its result is returned.
  14091. *
  14092. * @static
  14093. * @since 0.1.0
  14094. * @memberOf _
  14095. * @category Object
  14096. * @param {Object} object The object to query.
  14097. * @param {Array|string} path The path of the property to resolve.
  14098. * @param {*} [defaultValue] The value returned for `undefined` resolved values.
  14099. * @returns {*} Returns the resolved value.
  14100. * @example
  14101. *
  14102. * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
  14103. *
  14104. * _.result(object, 'a[0].b.c1');
  14105. * // => 3
  14106. *
  14107. * _.result(object, 'a[0].b.c2');
  14108. * // => 4
  14109. *
  14110. * _.result(object, 'a[0].b.c3', 'default');
  14111. * // => 'default'
  14112. *
  14113. * _.result(object, 'a[0].b.c3', _.constant('default'));
  14114. * // => 'default'
  14115. */
  14116. function result(object, path, defaultValue) {
  14117. path = castPath(path, object);
  14118. var index = -1,
  14119. length = path.length;
  14120. // Ensure the loop is entered when path is empty.
  14121. if (!length) {
  14122. length = 1;
  14123. object = undefined;
  14124. }
  14125. while (++index < length) {
  14126. var value = object == null ? undefined : object[toKey(path[index])];
  14127. if (value === undefined) {
  14128. index = length;
  14129. value = defaultValue;
  14130. }
  14131. object = isFunction(value) ? value.call(object) : value;
  14132. }
  14133. return object;
  14134. }
  14135. /**
  14136. * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
  14137. * it's created. Arrays are created for missing index properties while objects
  14138. * are created for all other missing properties. Use `_.setWith` to customize
  14139. * `path` creation.
  14140. *
  14141. * **Note:** This method mutates `object`.
  14142. *
  14143. * @static
  14144. * @memberOf _
  14145. * @since 3.7.0
  14146. * @category Object
  14147. * @param {Object} object The object to modify.
  14148. * @param {Array|string} path The path of the property to set.
  14149. * @param {*} value The value to set.
  14150. * @returns {Object} Returns `object`.
  14151. * @example
  14152. *
  14153. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  14154. *
  14155. * _.set(object, 'a[0].b.c', 4);
  14156. * console.log(object.a[0].b.c);
  14157. * // => 4
  14158. *
  14159. * _.set(object, ['x', '0', 'y', 'z'], 5);
  14160. * console.log(object.x[0].y.z);
  14161. * // => 5
  14162. */
  14163. function set(object, path, value) {
  14164. return object == null ? object : baseSet(object, path, value);
  14165. }
  14166. /**
  14167. * This method is like `_.set` except that it accepts `customizer` which is
  14168. * invoked to produce the objects of `path`. If `customizer` returns `undefined`
  14169. * path creation is handled by the method instead. The `customizer` is invoked
  14170. * with three arguments: (nsValue, key, nsObject).
  14171. *
  14172. * **Note:** This method mutates `object`.
  14173. *
  14174. * @static
  14175. * @memberOf _
  14176. * @since 4.0.0
  14177. * @category Object
  14178. * @param {Object} object The object to modify.
  14179. * @param {Array|string} path The path of the property to set.
  14180. * @param {*} value The value to set.
  14181. * @param {Function} [customizer] The function to customize assigned values.
  14182. * @returns {Object} Returns `object`.
  14183. * @example
  14184. *
  14185. * var object = {};
  14186. *
  14187. * _.setWith(object, '[0][1]', 'a', Object);
  14188. * // => { '0': { '1': 'a' } }
  14189. */
  14190. function setWith(object, path, value, customizer) {
  14191. customizer = typeof customizer == 'function' ? customizer : undefined;
  14192. return object == null ? object : baseSet(object, path, value, customizer);
  14193. }
  14194. /**
  14195. * Creates an array of own enumerable string keyed-value pairs for `object`
  14196. * which can be consumed by `_.fromPairs`. If `object` is a map or set, its
  14197. * entries are returned.
  14198. *
  14199. * @static
  14200. * @memberOf _
  14201. * @since 4.0.0
  14202. * @alias entries
  14203. * @category Object
  14204. * @param {Object} object The object to query.
  14205. * @returns {Array} Returns the key-value pairs.
  14206. * @example
  14207. *
  14208. * function Foo() {
  14209. * this.a = 1;
  14210. * this.b = 2;
  14211. * }
  14212. *
  14213. * Foo.prototype.c = 3;
  14214. *
  14215. * _.toPairs(new Foo);
  14216. * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
  14217. */
  14218. var toPairs = createToPairs(keys);
  14219. /**
  14220. * Creates an array of own and inherited enumerable string keyed-value pairs
  14221. * for `object` which can be consumed by `_.fromPairs`. If `object` is a map
  14222. * or set, its entries are returned.
  14223. *
  14224. * @static
  14225. * @memberOf _
  14226. * @since 4.0.0
  14227. * @alias entriesIn
  14228. * @category Object
  14229. * @param {Object} object The object to query.
  14230. * @returns {Array} Returns the key-value pairs.
  14231. * @example
  14232. *
  14233. * function Foo() {
  14234. * this.a = 1;
  14235. * this.b = 2;
  14236. * }
  14237. *
  14238. * Foo.prototype.c = 3;
  14239. *
  14240. * _.toPairsIn(new Foo);
  14241. * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
  14242. */
  14243. var toPairsIn = createToPairs(keysIn);
  14244. /**
  14245. * An alternative to `_.reduce`; this method transforms `object` to a new
  14246. * `accumulator` object which is the result of running each of its own
  14247. * enumerable string keyed properties thru `iteratee`, with each invocation
  14248. * potentially mutating the `accumulator` object. If `accumulator` is not
  14249. * provided, a new object with the same `[[Prototype]]` will be used. The
  14250. * iteratee is invoked with four arguments: (accumulator, value, key, object).
  14251. * Iteratee functions may exit iteration early by explicitly returning `false`.
  14252. *
  14253. * @static
  14254. * @memberOf _
  14255. * @since 1.3.0
  14256. * @category Object
  14257. * @param {Object} object The object to iterate over.
  14258. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  14259. * @param {*} [accumulator] The custom accumulator value.
  14260. * @returns {*} Returns the accumulated value.
  14261. * @example
  14262. *
  14263. * _.transform([2, 3, 4], function(result, n) {
  14264. * result.push(n *= n);
  14265. * return n % 2 == 0;
  14266. * }, []);
  14267. * // => [4, 9]
  14268. *
  14269. * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
  14270. * (result[value] || (result[value] = [])).push(key);
  14271. * }, {});
  14272. * // => { '1': ['a', 'c'], '2': ['b'] }
  14273. */
  14274. function transform(object, iteratee, accumulator) {
  14275. var isArr = isArray(object),
  14276. isArrLike = isArr || isBuffer(object) || isTypedArray(object);
  14277. iteratee = getIteratee(iteratee, 4);
  14278. if (accumulator == null) {
  14279. var Ctor = object && object.constructor;
  14280. if (isArrLike) {
  14281. accumulator = isArr ? new Ctor : [];
  14282. }
  14283. else if (isObject(object)) {
  14284. accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
  14285. }
  14286. else {
  14287. accumulator = {};
  14288. }
  14289. }
  14290. (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
  14291. return iteratee(accumulator, value, index, object);
  14292. });
  14293. return accumulator;
  14294. }
  14295. /**
  14296. * Removes the property at `path` of `object`.
  14297. *
  14298. * **Note:** This method mutates `object`.
  14299. *
  14300. * @static
  14301. * @memberOf _
  14302. * @since 4.0.0
  14303. * @category Object
  14304. * @param {Object} object The object to modify.
  14305. * @param {Array|string} path The path of the property to unset.
  14306. * @returns {boolean} Returns `true` if the property is deleted, else `false`.
  14307. * @example
  14308. *
  14309. * var object = { 'a': [{ 'b': { 'c': 7 } }] };
  14310. * _.unset(object, 'a[0].b.c');
  14311. * // => true
  14312. *
  14313. * console.log(object);
  14314. * // => { 'a': [{ 'b': {} }] };
  14315. *
  14316. * _.unset(object, ['a', '0', 'b', 'c']);
  14317. * // => true
  14318. *
  14319. * console.log(object);
  14320. * // => { 'a': [{ 'b': {} }] };
  14321. */
  14322. function unset(object, path) {
  14323. return object == null ? true : baseUnset(object, path);
  14324. }
  14325. /**
  14326. * This method is like `_.set` except that accepts `updater` to produce the
  14327. * value to set. Use `_.updateWith` to customize `path` creation. The `updater`
  14328. * is invoked with one argument: (value).
  14329. *
  14330. * **Note:** This method mutates `object`.
  14331. *
  14332. * @static
  14333. * @memberOf _
  14334. * @since 4.6.0
  14335. * @category Object
  14336. * @param {Object} object The object to modify.
  14337. * @param {Array|string} path The path of the property to set.
  14338. * @param {Function} updater The function to produce the updated value.
  14339. * @returns {Object} Returns `object`.
  14340. * @example
  14341. *
  14342. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  14343. *
  14344. * _.update(object, 'a[0].b.c', function(n) { return n * n; });
  14345. * console.log(object.a[0].b.c);
  14346. * // => 9
  14347. *
  14348. * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
  14349. * console.log(object.x[0].y.z);
  14350. * // => 0
  14351. */
  14352. function update(object, path, updater) {
  14353. return object == null ? object : baseUpdate(object, path, castFunction(updater));
  14354. }
  14355. /**
  14356. * This method is like `_.update` except that it accepts `customizer` which is
  14357. * invoked to produce the objects of `path`. If `customizer` returns `undefined`
  14358. * path creation is handled by the method instead. The `customizer` is invoked
  14359. * with three arguments: (nsValue, key, nsObject).
  14360. *
  14361. * **Note:** This method mutates `object`.
  14362. *
  14363. * @static
  14364. * @memberOf _
  14365. * @since 4.6.0
  14366. * @category Object
  14367. * @param {Object} object The object to modify.
  14368. * @param {Array|string} path The path of the property to set.
  14369. * @param {Function} updater The function to produce the updated value.
  14370. * @param {Function} [customizer] The function to customize assigned values.
  14371. * @returns {Object} Returns `object`.
  14372. * @example
  14373. *
  14374. * var object = {};
  14375. *
  14376. * _.updateWith(object, '[0][1]', _.constant('a'), Object);
  14377. * // => { '0': { '1': 'a' } }
  14378. */
  14379. function updateWith(object, path, updater, customizer) {
  14380. customizer = typeof customizer == 'function' ? customizer : undefined;
  14381. return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
  14382. }
  14383. /**
  14384. * Creates an array of the own enumerable string keyed property values of `object`.
  14385. *
  14386. * **Note:** Non-object values are coerced to objects.
  14387. *
  14388. * @static
  14389. * @since 0.1.0
  14390. * @memberOf _
  14391. * @category Object
  14392. * @param {Object} object The object to query.
  14393. * @returns {Array} Returns the array of property values.
  14394. * @example
  14395. *
  14396. * function Foo() {
  14397. * this.a = 1;
  14398. * this.b = 2;
  14399. * }
  14400. *
  14401. * Foo.prototype.c = 3;
  14402. *
  14403. * _.values(new Foo);
  14404. * // => [1, 2] (iteration order is not guaranteed)
  14405. *
  14406. * _.values('hi');
  14407. * // => ['h', 'i']
  14408. */
  14409. function values(object) {
  14410. return object == null ? [] : baseValues(object, keys(object));
  14411. }
  14412. /**
  14413. * Creates an array of the own and inherited enumerable string keyed property
  14414. * values of `object`.
  14415. *
  14416. * **Note:** Non-object values are coerced to objects.
  14417. *
  14418. * @static
  14419. * @memberOf _
  14420. * @since 3.0.0
  14421. * @category Object
  14422. * @param {Object} object The object to query.
  14423. * @returns {Array} Returns the array of property values.
  14424. * @example
  14425. *
  14426. * function Foo() {
  14427. * this.a = 1;
  14428. * this.b = 2;
  14429. * }
  14430. *
  14431. * Foo.prototype.c = 3;
  14432. *
  14433. * _.valuesIn(new Foo);
  14434. * // => [1, 2, 3] (iteration order is not guaranteed)
  14435. */
  14436. function valuesIn(object) {
  14437. return object == null ? [] : baseValues(object, keysIn(object));
  14438. }
  14439. /*------------------------------------------------------------------------*/
  14440. /**
  14441. * Clamps `number` within the inclusive `lower` and `upper` bounds.
  14442. *
  14443. * @static
  14444. * @memberOf _
  14445. * @since 4.0.0
  14446. * @category Number
  14447. * @param {number} number The number to clamp.
  14448. * @param {number} [lower] The lower bound.
  14449. * @param {number} upper The upper bound.
  14450. * @returns {number} Returns the clamped number.
  14451. * @example
  14452. *
  14453. * _.clamp(-10, -5, 5);
  14454. * // => -5
  14455. *
  14456. * _.clamp(10, -5, 5);
  14457. * // => 5
  14458. */
  14459. function clamp(number, lower, upper) {
  14460. if (upper === undefined) {
  14461. upper = lower;
  14462. lower = undefined;
  14463. }
  14464. if (upper !== undefined) {
  14465. upper = toNumber(upper);
  14466. upper = upper === upper ? upper : 0;
  14467. }
  14468. if (lower !== undefined) {
  14469. lower = toNumber(lower);
  14470. lower = lower === lower ? lower : 0;
  14471. }
  14472. return baseClamp(toNumber(number), lower, upper);
  14473. }
  14474. /**
  14475. * Checks if `n` is between `start` and up to, but not including, `end`. If
  14476. * `end` is not specified, it's set to `start` with `start` then set to `0`.
  14477. * If `start` is greater than `end` the params are swapped to support
  14478. * negative ranges.
  14479. *
  14480. * @static
  14481. * @memberOf _
  14482. * @since 3.3.0
  14483. * @category Number
  14484. * @param {number} number The number to check.
  14485. * @param {number} [start=0] The start of the range.
  14486. * @param {number} end The end of the range.
  14487. * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
  14488. * @see _.range, _.rangeRight
  14489. * @example
  14490. *
  14491. * _.inRange(3, 2, 4);
  14492. * // => true
  14493. *
  14494. * _.inRange(4, 8);
  14495. * // => true
  14496. *
  14497. * _.inRange(4, 2);
  14498. * // => false
  14499. *
  14500. * _.inRange(2, 2);
  14501. * // => false
  14502. *
  14503. * _.inRange(1.2, 2);
  14504. * // => true
  14505. *
  14506. * _.inRange(5.2, 4);
  14507. * // => false
  14508. *
  14509. * _.inRange(-3, -2, -6);
  14510. * // => true
  14511. */
  14512. function inRange(number, start, end) {
  14513. start = toFinite(start);
  14514. if (end === undefined) {
  14515. end = start;
  14516. start = 0;
  14517. } else {
  14518. end = toFinite(end);
  14519. }
  14520. number = toNumber(number);
  14521. return baseInRange(number, start, end);
  14522. }
  14523. /**
  14524. * Produces a random number between the inclusive `lower` and `upper` bounds.
  14525. * If only one argument is provided a number between `0` and the given number
  14526. * is returned. If `floating` is `true`, or either `lower` or `upper` are
  14527. * floats, a floating-point number is returned instead of an integer.
  14528. *
  14529. * **Note:** JavaScript follows the IEEE-754 standard for resolving
  14530. * floating-point values which can produce unexpected results.
  14531. *
  14532. * @static
  14533. * @memberOf _
  14534. * @since 0.7.0
  14535. * @category Number
  14536. * @param {number} [lower=0] The lower bound.
  14537. * @param {number} [upper=1] The upper bound.
  14538. * @param {boolean} [floating] Specify returning a floating-point number.
  14539. * @returns {number} Returns the random number.
  14540. * @example
  14541. *
  14542. * _.random(0, 5);
  14543. * // => an integer between 0 and 5
  14544. *
  14545. * _.random(5);
  14546. * // => also an integer between 0 and 5
  14547. *
  14548. * _.random(5, true);
  14549. * // => a floating-point number between 0 and 5
  14550. *
  14551. * _.random(1.2, 5.2);
  14552. * // => a floating-point number between 1.2 and 5.2
  14553. */
  14554. function random(lower, upper, floating) {
  14555. if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
  14556. upper = floating = undefined;
  14557. }
  14558. if (floating === undefined) {
  14559. if (typeof upper == 'boolean') {
  14560. floating = upper;
  14561. upper = undefined;
  14562. }
  14563. else if (typeof lower == 'boolean') {
  14564. floating = lower;
  14565. lower = undefined;
  14566. }
  14567. }
  14568. if (lower === undefined && upper === undefined) {
  14569. lower = 0;
  14570. upper = 1;
  14571. }
  14572. else {
  14573. lower = toFinite(lower);
  14574. if (upper === undefined) {
  14575. upper = lower;
  14576. lower = 0;
  14577. } else {
  14578. upper = toFinite(upper);
  14579. }
  14580. }
  14581. if (lower > upper) {
  14582. var temp = lower;
  14583. lower = upper;
  14584. upper = temp;
  14585. }
  14586. if (floating || lower % 1 || upper % 1) {
  14587. var rand = nativeRandom();
  14588. return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
  14589. }
  14590. return baseRandom(lower, upper);
  14591. }
  14592. /*------------------------------------------------------------------------*/
  14593. /**
  14594. * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
  14595. *
  14596. * @static
  14597. * @memberOf _
  14598. * @since 3.0.0
  14599. * @category String
  14600. * @param {string} [string=''] The string to convert.
  14601. * @returns {string} Returns the camel cased string.
  14602. * @example
  14603. *
  14604. * _.camelCase('Foo Bar');
  14605. * // => 'fooBar'
  14606. *
  14607. * _.camelCase('--foo-bar--');
  14608. * // => 'fooBar'
  14609. *
  14610. * _.camelCase('__FOO_BAR__');
  14611. * // => 'fooBar'
  14612. */
  14613. var camelCase = createCompounder(function(result, word, index) {
  14614. word = word.toLowerCase();
  14615. return result + (index ? capitalize(word) : word);
  14616. });
  14617. /**
  14618. * Converts the first character of `string` to upper case and the remaining
  14619. * to lower case.
  14620. *
  14621. * @static
  14622. * @memberOf _
  14623. * @since 3.0.0
  14624. * @category String
  14625. * @param {string} [string=''] The string to capitalize.
  14626. * @returns {string} Returns the capitalized string.
  14627. * @example
  14628. *
  14629. * _.capitalize('FRED');
  14630. * // => 'Fred'
  14631. */
  14632. function capitalize(string) {
  14633. return upperFirst(toString(string).toLowerCase());
  14634. }
  14635. /**
  14636. * Deburrs `string` by converting
  14637. * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
  14638. * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
  14639. * letters to basic Latin letters and removing
  14640. * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
  14641. *
  14642. * @static
  14643. * @memberOf _
  14644. * @since 3.0.0
  14645. * @category String
  14646. * @param {string} [string=''] The string to deburr.
  14647. * @returns {string} Returns the deburred string.
  14648. * @example
  14649. *
  14650. * _.deburr('déjà vu');
  14651. * // => 'deja vu'
  14652. */
  14653. function deburr(string) {
  14654. string = toString(string);
  14655. return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
  14656. }
  14657. /**
  14658. * Checks if `string` ends with the given target string.
  14659. *
  14660. * @static
  14661. * @memberOf _
  14662. * @since 3.0.0
  14663. * @category String
  14664. * @param {string} [string=''] The string to inspect.
  14665. * @param {string} [target] The string to search for.
  14666. * @param {number} [position=string.length] The position to search up to.
  14667. * @returns {boolean} Returns `true` if `string` ends with `target`,
  14668. * else `false`.
  14669. * @example
  14670. *
  14671. * _.endsWith('abc', 'c');
  14672. * // => true
  14673. *
  14674. * _.endsWith('abc', 'b');
  14675. * // => false
  14676. *
  14677. * _.endsWith('abc', 'b', 2);
  14678. * // => true
  14679. */
  14680. function endsWith(string, target, position) {
  14681. string = toString(string);
  14682. target = baseToString(target);
  14683. var length = string.length;
  14684. position = position === undefined
  14685. ? length
  14686. : baseClamp(toInteger(position), 0, length);
  14687. var end = position;
  14688. position -= target.length;
  14689. return position >= 0 && string.slice(position, end) == target;
  14690. }
  14691. /**
  14692. * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
  14693. * corresponding HTML entities.
  14694. *
  14695. * **Note:** No other characters are escaped. To escape additional
  14696. * characters use a third-party library like [_he_](https://mths.be/he).
  14697. *
  14698. * Though the ">" character is escaped for symmetry, characters like
  14699. * ">" and "/" don't need escaping in HTML and have no special meaning
  14700. * unless they're part of a tag or unquoted attribute value. See
  14701. * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
  14702. * (under "semi-related fun fact") for more details.
  14703. *
  14704. * When working with HTML you should always
  14705. * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
  14706. * XSS vectors.
  14707. *
  14708. * @static
  14709. * @since 0.1.0
  14710. * @memberOf _
  14711. * @category String
  14712. * @param {string} [string=''] The string to escape.
  14713. * @returns {string} Returns the escaped string.
  14714. * @example
  14715. *
  14716. * _.escape('fred, barney, & pebbles');
  14717. * // => 'fred, barney, &amp; pebbles'
  14718. */
  14719. function escape(string) {
  14720. string = toString(string);
  14721. return (string && reHasUnescapedHtml.test(string))
  14722. ? string.replace(reUnescapedHtml, escapeHtmlChar)
  14723. : string;
  14724. }
  14725. /**
  14726. * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
  14727. * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
  14728. *
  14729. * @static
  14730. * @memberOf _
  14731. * @since 3.0.0
  14732. * @category String
  14733. * @param {string} [string=''] The string to escape.
  14734. * @returns {string} Returns the escaped string.
  14735. * @example
  14736. *
  14737. * _.escapeRegExp('[lodash](https://lodash.com/)');
  14738. * // => '\[lodash\]\(https://lodash\.com/\)'
  14739. */
  14740. function escapeRegExp(string) {
  14741. string = toString(string);
  14742. return (string && reHasRegExpChar.test(string))
  14743. ? string.replace(reRegExpChar, '\\$&')
  14744. : string;
  14745. }
  14746. /**
  14747. * Converts `string` to
  14748. * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
  14749. *
  14750. * @static
  14751. * @memberOf _
  14752. * @since 3.0.0
  14753. * @category String
  14754. * @param {string} [string=''] The string to convert.
  14755. * @returns {string} Returns the kebab cased string.
  14756. * @example
  14757. *
  14758. * _.kebabCase('Foo Bar');
  14759. * // => 'foo-bar'
  14760. *
  14761. * _.kebabCase('fooBar');
  14762. * // => 'foo-bar'
  14763. *
  14764. * _.kebabCase('__FOO_BAR__');
  14765. * // => 'foo-bar'
  14766. */
  14767. var kebabCase = createCompounder(function(result, word, index) {
  14768. return result + (index ? '-' : '') + word.toLowerCase();
  14769. });
  14770. /**
  14771. * Converts `string`, as space separated words, to lower case.
  14772. *
  14773. * @static
  14774. * @memberOf _
  14775. * @since 4.0.0
  14776. * @category String
  14777. * @param {string} [string=''] The string to convert.
  14778. * @returns {string} Returns the lower cased string.
  14779. * @example
  14780. *
  14781. * _.lowerCase('--Foo-Bar--');
  14782. * // => 'foo bar'
  14783. *
  14784. * _.lowerCase('fooBar');
  14785. * // => 'foo bar'
  14786. *
  14787. * _.lowerCase('__FOO_BAR__');
  14788. * // => 'foo bar'
  14789. */
  14790. var lowerCase = createCompounder(function(result, word, index) {
  14791. return result + (index ? ' ' : '') + word.toLowerCase();
  14792. });
  14793. /**
  14794. * Converts the first character of `string` to lower case.
  14795. *
  14796. * @static
  14797. * @memberOf _
  14798. * @since 4.0.0
  14799. * @category String
  14800. * @param {string} [string=''] The string to convert.
  14801. * @returns {string} Returns the converted string.
  14802. * @example
  14803. *
  14804. * _.lowerFirst('Fred');
  14805. * // => 'fred'
  14806. *
  14807. * _.lowerFirst('FRED');
  14808. * // => 'fRED'
  14809. */
  14810. var lowerFirst = createCaseFirst('toLowerCase');
  14811. /**
  14812. * Pads `string` on the left and right sides if it's shorter than `length`.
  14813. * Padding characters are truncated if they can't be evenly divided by `length`.
  14814. *
  14815. * @static
  14816. * @memberOf _
  14817. * @since 3.0.0
  14818. * @category String
  14819. * @param {string} [string=''] The string to pad.
  14820. * @param {number} [length=0] The padding length.
  14821. * @param {string} [chars=' '] The string used as padding.
  14822. * @returns {string} Returns the padded string.
  14823. * @example
  14824. *
  14825. * _.pad('abc', 8);
  14826. * // => ' abc '
  14827. *
  14828. * _.pad('abc', 8, '_-');
  14829. * // => '_-abc_-_'
  14830. *
  14831. * _.pad('abc', 3);
  14832. * // => 'abc'
  14833. */
  14834. function pad(string, length, chars) {
  14835. string = toString(string);
  14836. length = toInteger(length);
  14837. var strLength = length ? stringSize(string) : 0;
  14838. if (!length || strLength >= length) {
  14839. return string;
  14840. }
  14841. var mid = (length - strLength) / 2;
  14842. return (
  14843. createPadding(nativeFloor(mid), chars) +
  14844. string +
  14845. createPadding(nativeCeil(mid), chars)
  14846. );
  14847. }
  14848. /**
  14849. * Pads `string` on the right side if it's shorter than `length`. Padding
  14850. * characters are truncated if they exceed `length`.
  14851. *
  14852. * @static
  14853. * @memberOf _
  14854. * @since 4.0.0
  14855. * @category String
  14856. * @param {string} [string=''] The string to pad.
  14857. * @param {number} [length=0] The padding length.
  14858. * @param {string} [chars=' '] The string used as padding.
  14859. * @returns {string} Returns the padded string.
  14860. * @example
  14861. *
  14862. * _.padEnd('abc', 6);
  14863. * // => 'abc '
  14864. *
  14865. * _.padEnd('abc', 6, '_-');
  14866. * // => 'abc_-_'
  14867. *
  14868. * _.padEnd('abc', 3);
  14869. * // => 'abc'
  14870. */
  14871. function padEnd(string, length, chars) {
  14872. string = toString(string);
  14873. length = toInteger(length);
  14874. var strLength = length ? stringSize(string) : 0;
  14875. return (length && strLength < length)
  14876. ? (string + createPadding(length - strLength, chars))
  14877. : string;
  14878. }
  14879. /**
  14880. * Pads `string` on the left side if it's shorter than `length`. Padding
  14881. * characters are truncated if they exceed `length`.
  14882. *
  14883. * @static
  14884. * @memberOf _
  14885. * @since 4.0.0
  14886. * @category String
  14887. * @param {string} [string=''] The string to pad.
  14888. * @param {number} [length=0] The padding length.
  14889. * @param {string} [chars=' '] The string used as padding.
  14890. * @returns {string} Returns the padded string.
  14891. * @example
  14892. *
  14893. * _.padStart('abc', 6);
  14894. * // => ' abc'
  14895. *
  14896. * _.padStart('abc', 6, '_-');
  14897. * // => '_-_abc'
  14898. *
  14899. * _.padStart('abc', 3);
  14900. * // => 'abc'
  14901. */
  14902. function padStart(string, length, chars) {
  14903. string = toString(string);
  14904. length = toInteger(length);
  14905. var strLength = length ? stringSize(string) : 0;
  14906. return (length && strLength < length)
  14907. ? (createPadding(length - strLength, chars) + string)
  14908. : string;
  14909. }
  14910. /**
  14911. * Converts `string` to an integer of the specified radix. If `radix` is
  14912. * `undefined` or `0`, a `radix` of `10` is used unless `value` is a
  14913. * hexadecimal, in which case a `radix` of `16` is used.
  14914. *
  14915. * **Note:** This method aligns with the
  14916. * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
  14917. *
  14918. * @static
  14919. * @memberOf _
  14920. * @since 1.1.0
  14921. * @category String
  14922. * @param {string} string The string to convert.
  14923. * @param {number} [radix=10] The radix to interpret `value` by.
  14924. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  14925. * @returns {number} Returns the converted integer.
  14926. * @example
  14927. *
  14928. * _.parseInt('08');
  14929. * // => 8
  14930. *
  14931. * _.map(['6', '08', '10'], _.parseInt);
  14932. * // => [6, 8, 10]
  14933. */
  14934. function parseInt(string, radix, guard) {
  14935. if (guard || radix == null) {
  14936. radix = 0;
  14937. } else if (radix) {
  14938. radix = +radix;
  14939. }
  14940. return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
  14941. }
  14942. /**
  14943. * Repeats the given string `n` times.
  14944. *
  14945. * @static
  14946. * @memberOf _
  14947. * @since 3.0.0
  14948. * @category String
  14949. * @param {string} [string=''] The string to repeat.
  14950. * @param {number} [n=1] The number of times to repeat the string.
  14951. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  14952. * @returns {string} Returns the repeated string.
  14953. * @example
  14954. *
  14955. * _.repeat('*', 3);
  14956. * // => '***'
  14957. *
  14958. * _.repeat('abc', 2);
  14959. * // => 'abcabc'
  14960. *
  14961. * _.repeat('abc', 0);
  14962. * // => ''
  14963. */
  14964. function repeat(string, n, guard) {
  14965. if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
  14966. n = 1;
  14967. } else {
  14968. n = toInteger(n);
  14969. }
  14970. return baseRepeat(toString(string), n);
  14971. }
  14972. /**
  14973. * Replaces matches for `pattern` in `string` with `replacement`.
  14974. *
  14975. * **Note:** This method is based on
  14976. * [`String#replace`](https://mdn.io/String/replace).
  14977. *
  14978. * @static
  14979. * @memberOf _
  14980. * @since 4.0.0
  14981. * @category String
  14982. * @param {string} [string=''] The string to modify.
  14983. * @param {RegExp|string} pattern The pattern to replace.
  14984. * @param {Function|string} replacement The match replacement.
  14985. * @returns {string} Returns the modified string.
  14986. * @example
  14987. *
  14988. * _.replace('Hi Fred', 'Fred', 'Barney');
  14989. * // => 'Hi Barney'
  14990. */
  14991. function replace() {
  14992. var args = arguments,
  14993. string = toString(args[0]);
  14994. return args.length < 3 ? string : string.replace(args[1], args[2]);
  14995. }
  14996. /**
  14997. * Converts `string` to
  14998. * [snake case](https://en.wikipedia.org/wiki/Snake_case).
  14999. *
  15000. * @static
  15001. * @memberOf _
  15002. * @since 3.0.0
  15003. * @category String
  15004. * @param {string} [string=''] The string to convert.
  15005. * @returns {string} Returns the snake cased string.
  15006. * @example
  15007. *
  15008. * _.snakeCase('Foo Bar');
  15009. * // => 'foo_bar'
  15010. *
  15011. * _.snakeCase('fooBar');
  15012. * // => 'foo_bar'
  15013. *
  15014. * _.snakeCase('--FOO-BAR--');
  15015. * // => 'foo_bar'
  15016. */
  15017. var snakeCase = createCompounder(function(result, word, index) {
  15018. return result + (index ? '_' : '') + word.toLowerCase();
  15019. });
  15020. /**
  15021. * Splits `string` by `separator`.
  15022. *
  15023. * **Note:** This method is based on
  15024. * [`String#split`](https://mdn.io/String/split).
  15025. *
  15026. * @static
  15027. * @memberOf _
  15028. * @since 4.0.0
  15029. * @category String
  15030. * @param {string} [string=''] The string to split.
  15031. * @param {RegExp|string} separator The separator pattern to split by.
  15032. * @param {number} [limit] The length to truncate results to.
  15033. * @returns {Array} Returns the string segments.
  15034. * @example
  15035. *
  15036. * _.split('a-b-c', '-', 2);
  15037. * // => ['a', 'b']
  15038. */
  15039. function split(string, separator, limit) {
  15040. if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
  15041. separator = limit = undefined;
  15042. }
  15043. limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
  15044. if (!limit) {
  15045. return [];
  15046. }
  15047. string = toString(string);
  15048. if (string && (
  15049. typeof separator == 'string' ||
  15050. (separator != null && !isRegExp(separator))
  15051. )) {
  15052. separator = baseToString(separator);
  15053. if (!separator && hasUnicode(string)) {
  15054. return castSlice(stringToArray(string), 0, limit);
  15055. }
  15056. }
  15057. return string.split(separator, limit);
  15058. }
  15059. /**
  15060. * Converts `string` to
  15061. * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
  15062. *
  15063. * @static
  15064. * @memberOf _
  15065. * @since 3.1.0
  15066. * @category String
  15067. * @param {string} [string=''] The string to convert.
  15068. * @returns {string} Returns the start cased string.
  15069. * @example
  15070. *
  15071. * _.startCase('--foo-bar--');
  15072. * // => 'Foo Bar'
  15073. *
  15074. * _.startCase('fooBar');
  15075. * // => 'Foo Bar'
  15076. *
  15077. * _.startCase('__FOO_BAR__');
  15078. * // => 'FOO BAR'
  15079. */
  15080. var startCase = createCompounder(function(result, word, index) {
  15081. return result + (index ? ' ' : '') + upperFirst(word);
  15082. });
  15083. /**
  15084. * Checks if `string` starts with the given target string.
  15085. *
  15086. * @static
  15087. * @memberOf _
  15088. * @since 3.0.0
  15089. * @category String
  15090. * @param {string} [string=''] The string to inspect.
  15091. * @param {string} [target] The string to search for.
  15092. * @param {number} [position=0] The position to search from.
  15093. * @returns {boolean} Returns `true` if `string` starts with `target`,
  15094. * else `false`.
  15095. * @example
  15096. *
  15097. * _.startsWith('abc', 'a');
  15098. * // => true
  15099. *
  15100. * _.startsWith('abc', 'b');
  15101. * // => false
  15102. *
  15103. * _.startsWith('abc', 'b', 1);
  15104. * // => true
  15105. */
  15106. function startsWith(string, target, position) {
  15107. string = toString(string);
  15108. position = position == null
  15109. ? 0
  15110. : baseClamp(toInteger(position), 0, string.length);
  15111. target = baseToString(target);
  15112. return string.slice(position, position + target.length) == target;
  15113. }
  15114. /**
  15115. * Creates a compiled template function that can interpolate data properties
  15116. * in "interpolate" delimiters, HTML-escape interpolated data properties in
  15117. * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
  15118. * properties may be accessed as free variables in the template. If a setting
  15119. * object is given, it takes precedence over `_.templateSettings` values.
  15120. *
  15121. * **Note:** In the development build `_.template` utilizes
  15122. * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
  15123. * for easier debugging.
  15124. *
  15125. * For more information on precompiling templates see
  15126. * [lodash's custom builds documentation](https://lodash.com/custom-builds).
  15127. *
  15128. * For more information on Chrome extension sandboxes see
  15129. * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
  15130. *
  15131. * @static
  15132. * @since 0.1.0
  15133. * @memberOf _
  15134. * @category String
  15135. * @param {string} [string=''] The template string.
  15136. * @param {Object} [options={}] The options object.
  15137. * @param {RegExp} [options.escape=_.templateSettings.escape]
  15138. * The HTML "escape" delimiter.
  15139. * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
  15140. * The "evaluate" delimiter.
  15141. * @param {Object} [options.imports=_.templateSettings.imports]
  15142. * An object to import into the template as free variables.
  15143. * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
  15144. * The "interpolate" delimiter.
  15145. * @param {string} [options.sourceURL='lodash.templateSources[n]']
  15146. * The sourceURL of the compiled template.
  15147. * @param {string} [options.variable='obj']
  15148. * The data object variable name.
  15149. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  15150. * @returns {Function} Returns the compiled template function.
  15151. * @example
  15152. *
  15153. * // Use the "interpolate" delimiter to create a compiled template.
  15154. * var compiled = _.template('hello <%= user %>!');
  15155. * compiled({ 'user': 'fred' });
  15156. * // => 'hello fred!'
  15157. *
  15158. * // Use the HTML "escape" delimiter to escape data property values.
  15159. * var compiled = _.template('<b><%- value %></b>');
  15160. * compiled({ 'value': '<script>' });
  15161. * // => '<b>&lt;script&gt;</b>'
  15162. *
  15163. * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
  15164. * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
  15165. * compiled({ 'users': ['fred', 'barney'] });
  15166. * // => '<li>fred</li><li>barney</li>'
  15167. *
  15168. * // Use the internal `print` function in "evaluate" delimiters.
  15169. * var compiled = _.template('<% print("hello " + user); %>!');
  15170. * compiled({ 'user': 'barney' });
  15171. * // => 'hello barney!'
  15172. *
  15173. * // Use the ES template literal delimiter as an "interpolate" delimiter.
  15174. * // Disable support by replacing the "interpolate" delimiter.
  15175. * var compiled = _.template('hello ${ user }!');
  15176. * compiled({ 'user': 'pebbles' });
  15177. * // => 'hello pebbles!'
  15178. *
  15179. * // Use backslashes to treat delimiters as plain text.
  15180. * var compiled = _.template('<%= "\\<%- value %\\>" %>');
  15181. * compiled({ 'value': 'ignored' });
  15182. * // => '<%- value %>'
  15183. *
  15184. * // Use the `imports` option to import `jQuery` as `jq`.
  15185. * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
  15186. * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
  15187. * compiled({ 'users': ['fred', 'barney'] });
  15188. * // => '<li>fred</li><li>barney</li>'
  15189. *
  15190. * // Use the `sourceURL` option to specify a custom sourceURL for the template.
  15191. * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
  15192. * compiled(data);
  15193. * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
  15194. *
  15195. * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
  15196. * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
  15197. * compiled.source;
  15198. * // => function(data) {
  15199. * // var __t, __p = '';
  15200. * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
  15201. * // return __p;
  15202. * // }
  15203. *
  15204. * // Use custom template delimiters.
  15205. * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
  15206. * var compiled = _.template('hello {{ user }}!');
  15207. * compiled({ 'user': 'mustache' });
  15208. * // => 'hello mustache!'
  15209. *
  15210. * // Use the `source` property to inline compiled templates for meaningful
  15211. * // line numbers in error messages and stack traces.
  15212. * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
  15213. * var JST = {\
  15214. * "main": ' + _.template(mainText).source + '\
  15215. * };\
  15216. * ');
  15217. */
  15218. function template(string, options, guard) {
  15219. // Based on John Resig's `tmpl` implementation
  15220. // (http://ejohn.org/blog/javascript-micro-templating/)
  15221. // and Laura Doktorova's doT.js (https://github.com/olado/doT).
  15222. var settings = lodash.templateSettings;
  15223. if (guard && isIterateeCall(string, options, guard)) {
  15224. options = undefined;
  15225. }
  15226. string = toString(string);
  15227. options = assignInWith({}, options, settings, customDefaultsAssignIn);
  15228. var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
  15229. importsKeys = keys(imports),
  15230. importsValues = baseValues(imports, importsKeys);
  15231. var isEscaping,
  15232. isEvaluating,
  15233. index = 0,
  15234. interpolate = options.interpolate || reNoMatch,
  15235. source = "__p += '";
  15236. // Compile the regexp to match each delimiter.
  15237. var reDelimiters = RegExp(
  15238. (options.escape || reNoMatch).source + '|' +
  15239. interpolate.source + '|' +
  15240. (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
  15241. (options.evaluate || reNoMatch).source + '|$'
  15242. , 'g');
  15243. // Use a sourceURL for easier debugging.
  15244. // The sourceURL gets injected into the source that's eval-ed, so be careful
  15245. // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in
  15246. // and escape the comment, thus injecting code that gets evaled.
  15247. var sourceURL = '//# sourceURL=' +
  15248. (hasOwnProperty.call(options, 'sourceURL')
  15249. ? (options.sourceURL + '').replace(/\s/g, ' ')
  15250. : ('lodash.templateSources[' + (++templateCounter) + ']')
  15251. ) + '\n';
  15252. string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
  15253. interpolateValue || (interpolateValue = esTemplateValue);
  15254. // Escape characters that can't be included in string literals.
  15255. source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
  15256. // Replace delimiters with snippets.
  15257. if (escapeValue) {
  15258. isEscaping = true;
  15259. source += "' +\n__e(" + escapeValue + ") +\n'";
  15260. }
  15261. if (evaluateValue) {
  15262. isEvaluating = true;
  15263. source += "';\n" + evaluateValue + ";\n__p += '";
  15264. }
  15265. if (interpolateValue) {
  15266. source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
  15267. }
  15268. index = offset + match.length;
  15269. // The JS engine embedded in Adobe products needs `match` returned in
  15270. // order to produce the correct `offset` value.
  15271. return match;
  15272. });
  15273. source += "';\n";
  15274. // If `variable` is not specified wrap a with-statement around the generated
  15275. // code to add the data object to the top of the scope chain.
  15276. var variable = hasOwnProperty.call(options, 'variable') && options.variable;
  15277. if (!variable) {
  15278. source = 'with (obj) {\n' + source + '\n}\n';
  15279. }
  15280. // Throw an error if a forbidden character was found in `variable`, to prevent
  15281. // potential command injection attacks.
  15282. else if (reForbiddenIdentifierChars.test(variable)) {
  15283. throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);
  15284. }
  15285. // Cleanup code by stripping empty strings.
  15286. source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
  15287. .replace(reEmptyStringMiddle, '$1')
  15288. .replace(reEmptyStringTrailing, '$1;');
  15289. // Frame code as the function body.
  15290. source = 'function(' + (variable || 'obj') + ') {\n' +
  15291. (variable
  15292. ? ''
  15293. : 'obj || (obj = {});\n'
  15294. ) +
  15295. "var __t, __p = ''" +
  15296. (isEscaping
  15297. ? ', __e = _.escape'
  15298. : ''
  15299. ) +
  15300. (isEvaluating
  15301. ? ', __j = Array.prototype.join;\n' +
  15302. "function print() { __p += __j.call(arguments, '') }\n"
  15303. : ';\n'
  15304. ) +
  15305. source +
  15306. 'return __p\n}';
  15307. var result = attempt(function() {
  15308. return Function(importsKeys, sourceURL + 'return ' + source)
  15309. .apply(undefined, importsValues);
  15310. });
  15311. // Provide the compiled function's source by its `toString` method or
  15312. // the `source` property as a convenience for inlining compiled templates.
  15313. result.source = source;
  15314. if (isError(result)) {
  15315. throw result;
  15316. }
  15317. return result;
  15318. }
  15319. /**
  15320. * Converts `string`, as a whole, to lower case just like
  15321. * [String#toLowerCase](https://mdn.io/toLowerCase).
  15322. *
  15323. * @static
  15324. * @memberOf _
  15325. * @since 4.0.0
  15326. * @category String
  15327. * @param {string} [string=''] The string to convert.
  15328. * @returns {string} Returns the lower cased string.
  15329. * @example
  15330. *
  15331. * _.toLower('--Foo-Bar--');
  15332. * // => '--foo-bar--'
  15333. *
  15334. * _.toLower('fooBar');
  15335. * // => 'foobar'
  15336. *
  15337. * _.toLower('__FOO_BAR__');
  15338. * // => '__foo_bar__'
  15339. */
  15340. function toLower(value) {
  15341. return toString(value).toLowerCase();
  15342. }
  15343. /**
  15344. * Converts `string`, as a whole, to upper case just like
  15345. * [String#toUpperCase](https://mdn.io/toUpperCase).
  15346. *
  15347. * @static
  15348. * @memberOf _
  15349. * @since 4.0.0
  15350. * @category String
  15351. * @param {string} [string=''] The string to convert.
  15352. * @returns {string} Returns the upper cased string.
  15353. * @example
  15354. *
  15355. * _.toUpper('--foo-bar--');
  15356. * // => '--FOO-BAR--'
  15357. *
  15358. * _.toUpper('fooBar');
  15359. * // => 'FOOBAR'
  15360. *
  15361. * _.toUpper('__foo_bar__');
  15362. * // => '__FOO_BAR__'
  15363. */
  15364. function toUpper(value) {
  15365. return toString(value).toUpperCase();
  15366. }
  15367. /**
  15368. * Removes leading and trailing whitespace or specified characters from `string`.
  15369. *
  15370. * @static
  15371. * @memberOf _
  15372. * @since 3.0.0
  15373. * @category String
  15374. * @param {string} [string=''] The string to trim.
  15375. * @param {string} [chars=whitespace] The characters to trim.
  15376. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  15377. * @returns {string} Returns the trimmed string.
  15378. * @example
  15379. *
  15380. * _.trim(' abc ');
  15381. * // => 'abc'
  15382. *
  15383. * _.trim('-_-abc-_-', '_-');
  15384. * // => 'abc'
  15385. *
  15386. * _.map([' foo ', ' bar '], _.trim);
  15387. * // => ['foo', 'bar']
  15388. */
  15389. function trim(string, chars, guard) {
  15390. string = toString(string);
  15391. if (string && (guard || chars === undefined)) {
  15392. return baseTrim(string);
  15393. }
  15394. if (!string || !(chars = baseToString(chars))) {
  15395. return string;
  15396. }
  15397. var strSymbols = stringToArray(string),
  15398. chrSymbols = stringToArray(chars),
  15399. start = charsStartIndex(strSymbols, chrSymbols),
  15400. end = charsEndIndex(strSymbols, chrSymbols) + 1;
  15401. return castSlice(strSymbols, start, end).join('');
  15402. }
  15403. /**
  15404. * Removes trailing whitespace or specified characters from `string`.
  15405. *
  15406. * @static
  15407. * @memberOf _
  15408. * @since 4.0.0
  15409. * @category String
  15410. * @param {string} [string=''] The string to trim.
  15411. * @param {string} [chars=whitespace] The characters to trim.
  15412. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  15413. * @returns {string} Returns the trimmed string.
  15414. * @example
  15415. *
  15416. * _.trimEnd(' abc ');
  15417. * // => ' abc'
  15418. *
  15419. * _.trimEnd('-_-abc-_-', '_-');
  15420. * // => '-_-abc'
  15421. */
  15422. function trimEnd(string, chars, guard) {
  15423. string = toString(string);
  15424. if (string && (guard || chars === undefined)) {
  15425. return string.slice(0, trimmedEndIndex(string) + 1);
  15426. }
  15427. if (!string || !(chars = baseToString(chars))) {
  15428. return string;
  15429. }
  15430. var strSymbols = stringToArray(string),
  15431. end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
  15432. return castSlice(strSymbols, 0, end).join('');
  15433. }
  15434. /**
  15435. * Removes leading whitespace or specified characters from `string`.
  15436. *
  15437. * @static
  15438. * @memberOf _
  15439. * @since 4.0.0
  15440. * @category String
  15441. * @param {string} [string=''] The string to trim.
  15442. * @param {string} [chars=whitespace] The characters to trim.
  15443. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  15444. * @returns {string} Returns the trimmed string.
  15445. * @example
  15446. *
  15447. * _.trimStart(' abc ');
  15448. * // => 'abc '
  15449. *
  15450. * _.trimStart('-_-abc-_-', '_-');
  15451. * // => 'abc-_-'
  15452. */
  15453. function trimStart(string, chars, guard) {
  15454. string = toString(string);
  15455. if (string && (guard || chars === undefined)) {
  15456. return string.replace(reTrimStart, '');
  15457. }
  15458. if (!string || !(chars = baseToString(chars))) {
  15459. return string;
  15460. }
  15461. var strSymbols = stringToArray(string),
  15462. start = charsStartIndex(strSymbols, stringToArray(chars));
  15463. return castSlice(strSymbols, start).join('');
  15464. }
  15465. /**
  15466. * Truncates `string` if it's longer than the given maximum string length.
  15467. * The last characters of the truncated string are replaced with the omission
  15468. * string which defaults to "...".
  15469. *
  15470. * @static
  15471. * @memberOf _
  15472. * @since 4.0.0
  15473. * @category String
  15474. * @param {string} [string=''] The string to truncate.
  15475. * @param {Object} [options={}] The options object.
  15476. * @param {number} [options.length=30] The maximum string length.
  15477. * @param {string} [options.omission='...'] The string to indicate text is omitted.
  15478. * @param {RegExp|string} [options.separator] The separator pattern to truncate to.
  15479. * @returns {string} Returns the truncated string.
  15480. * @example
  15481. *
  15482. * _.truncate('hi-diddly-ho there, neighborino');
  15483. * // => 'hi-diddly-ho there, neighbo...'
  15484. *
  15485. * _.truncate('hi-diddly-ho there, neighborino', {
  15486. * 'length': 24,
  15487. * 'separator': ' '
  15488. * });
  15489. * // => 'hi-diddly-ho there,...'
  15490. *
  15491. * _.truncate('hi-diddly-ho there, neighborino', {
  15492. * 'length': 24,
  15493. * 'separator': /,? +/
  15494. * });
  15495. * // => 'hi-diddly-ho there...'
  15496. *
  15497. * _.truncate('hi-diddly-ho there, neighborino', {
  15498. * 'omission': ' [...]'
  15499. * });
  15500. * // => 'hi-diddly-ho there, neig [...]'
  15501. */
  15502. function truncate(string, options) {
  15503. var length = DEFAULT_TRUNC_LENGTH,
  15504. omission = DEFAULT_TRUNC_OMISSION;
  15505. if (isObject(options)) {
  15506. var separator = 'separator' in options ? options.separator : separator;
  15507. length = 'length' in options ? toInteger(options.length) : length;
  15508. omission = 'omission' in options ? baseToString(options.omission) : omission;
  15509. }
  15510. string = toString(string);
  15511. var strLength = string.length;
  15512. if (hasUnicode(string)) {
  15513. var strSymbols = stringToArray(string);
  15514. strLength = strSymbols.length;
  15515. }
  15516. if (length >= strLength) {
  15517. return string;
  15518. }
  15519. var end = length - stringSize(omission);
  15520. if (end < 1) {
  15521. return omission;
  15522. }
  15523. var result = strSymbols
  15524. ? castSlice(strSymbols, 0, end).join('')
  15525. : string.slice(0, end);
  15526. if (separator === undefined) {
  15527. return result + omission;
  15528. }
  15529. if (strSymbols) {
  15530. end += (result.length - end);
  15531. }
  15532. if (isRegExp(separator)) {
  15533. if (string.slice(end).search(separator)) {
  15534. var match,
  15535. substring = result;
  15536. if (!separator.global) {
  15537. separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
  15538. }
  15539. separator.lastIndex = 0;
  15540. while ((match = separator.exec(substring))) {
  15541. var newEnd = match.index;
  15542. }
  15543. result = result.slice(0, newEnd === undefined ? end : newEnd);
  15544. }
  15545. } else if (string.indexOf(baseToString(separator), end) != end) {
  15546. var index = result.lastIndexOf(separator);
  15547. if (index > -1) {
  15548. result = result.slice(0, index);
  15549. }
  15550. }
  15551. return result + omission;
  15552. }
  15553. /**
  15554. * The inverse of `_.escape`; this method converts the HTML entities
  15555. * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to
  15556. * their corresponding characters.
  15557. *
  15558. * **Note:** No other HTML entities are unescaped. To unescape additional
  15559. * HTML entities use a third-party library like [_he_](https://mths.be/he).
  15560. *
  15561. * @static
  15562. * @memberOf _
  15563. * @since 0.6.0
  15564. * @category String
  15565. * @param {string} [string=''] The string to unescape.
  15566. * @returns {string} Returns the unescaped string.
  15567. * @example
  15568. *
  15569. * _.unescape('fred, barney, &amp; pebbles');
  15570. * // => 'fred, barney, & pebbles'
  15571. */
  15572. function unescape(string) {
  15573. string = toString(string);
  15574. return (string && reHasEscapedHtml.test(string))
  15575. ? string.replace(reEscapedHtml, unescapeHtmlChar)
  15576. : string;
  15577. }
  15578. /**
  15579. * Converts `string`, as space separated words, to upper case.
  15580. *
  15581. * @static
  15582. * @memberOf _
  15583. * @since 4.0.0
  15584. * @category String
  15585. * @param {string} [string=''] The string to convert.
  15586. * @returns {string} Returns the upper cased string.
  15587. * @example
  15588. *
  15589. * _.upperCase('--foo-bar');
  15590. * // => 'FOO BAR'
  15591. *
  15592. * _.upperCase('fooBar');
  15593. * // => 'FOO BAR'
  15594. *
  15595. * _.upperCase('__foo_bar__');
  15596. * // => 'FOO BAR'
  15597. */
  15598. var upperCase = createCompounder(function(result, word, index) {
  15599. return result + (index ? ' ' : '') + word.toUpperCase();
  15600. });
  15601. /**
  15602. * Converts the first character of `string` to upper case.
  15603. *
  15604. * @static
  15605. * @memberOf _
  15606. * @since 4.0.0
  15607. * @category String
  15608. * @param {string} [string=''] The string to convert.
  15609. * @returns {string} Returns the converted string.
  15610. * @example
  15611. *
  15612. * _.upperFirst('fred');
  15613. * // => 'Fred'
  15614. *
  15615. * _.upperFirst('FRED');
  15616. * // => 'FRED'
  15617. */
  15618. var upperFirst = createCaseFirst('toUpperCase');
  15619. /**
  15620. * Splits `string` into an array of its words.
  15621. *
  15622. * @static
  15623. * @memberOf _
  15624. * @since 3.0.0
  15625. * @category String
  15626. * @param {string} [string=''] The string to inspect.
  15627. * @param {RegExp|string} [pattern] The pattern to match words.
  15628. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  15629. * @returns {Array} Returns the words of `string`.
  15630. * @example
  15631. *
  15632. * _.words('fred, barney, & pebbles');
  15633. * // => ['fred', 'barney', 'pebbles']
  15634. *
  15635. * _.words('fred, barney, & pebbles', /[^, ]+/g);
  15636. * // => ['fred', 'barney', '&', 'pebbles']
  15637. */
  15638. function words(string, pattern, guard) {
  15639. string = toString(string);
  15640. pattern = guard ? undefined : pattern;
  15641. if (pattern === undefined) {
  15642. return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
  15643. }
  15644. return string.match(pattern) || [];
  15645. }
  15646. /*------------------------------------------------------------------------*/
  15647. /**
  15648. * Attempts to invoke `func`, returning either the result or the caught error
  15649. * object. Any additional arguments are provided to `func` when it's invoked.
  15650. *
  15651. * @static
  15652. * @memberOf _
  15653. * @since 3.0.0
  15654. * @category Util
  15655. * @param {Function} func The function to attempt.
  15656. * @param {...*} [args] The arguments to invoke `func` with.
  15657. * @returns {*} Returns the `func` result or error object.
  15658. * @example
  15659. *
  15660. * // Avoid throwing errors for invalid selectors.
  15661. * var elements = _.attempt(function(selector) {
  15662. * return document.querySelectorAll(selector);
  15663. * }, '>_>');
  15664. *
  15665. * if (_.isError(elements)) {
  15666. * elements = [];
  15667. * }
  15668. */
  15669. var attempt = baseRest(function(func, args) {
  15670. try {
  15671. return apply(func, undefined, args);
  15672. } catch (e) {
  15673. return isError(e) ? e : new Error(e);
  15674. }
  15675. });
  15676. /**
  15677. * Binds methods of an object to the object itself, overwriting the existing
  15678. * method.
  15679. *
  15680. * **Note:** This method doesn't set the "length" property of bound functions.
  15681. *
  15682. * @static
  15683. * @since 0.1.0
  15684. * @memberOf _
  15685. * @category Util
  15686. * @param {Object} object The object to bind and assign the bound methods to.
  15687. * @param {...(string|string[])} methodNames The object method names to bind.
  15688. * @returns {Object} Returns `object`.
  15689. * @example
  15690. *
  15691. * var view = {
  15692. * 'label': 'docs',
  15693. * 'click': function() {
  15694. * console.log('clicked ' + this.label);
  15695. * }
  15696. * };
  15697. *
  15698. * _.bindAll(view, ['click']);
  15699. * jQuery(element).on('click', view.click);
  15700. * // => Logs 'clicked docs' when clicked.
  15701. */
  15702. var bindAll = flatRest(function(object, methodNames) {
  15703. arrayEach(methodNames, function(key) {
  15704. key = toKey(key);
  15705. baseAssignValue(object, key, bind(object[key], object));
  15706. });
  15707. return object;
  15708. });
  15709. /**
  15710. * Creates a function that iterates over `pairs` and invokes the corresponding
  15711. * function of the first predicate to return truthy. The predicate-function
  15712. * pairs are invoked with the `this` binding and arguments of the created
  15713. * function.
  15714. *
  15715. * @static
  15716. * @memberOf _
  15717. * @since 4.0.0
  15718. * @category Util
  15719. * @param {Array} pairs The predicate-function pairs.
  15720. * @returns {Function} Returns the new composite function.
  15721. * @example
  15722. *
  15723. * var func = _.cond([
  15724. * [_.matches({ 'a': 1 }), _.constant('matches A')],
  15725. * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
  15726. * [_.stubTrue, _.constant('no match')]
  15727. * ]);
  15728. *
  15729. * func({ 'a': 1, 'b': 2 });
  15730. * // => 'matches A'
  15731. *
  15732. * func({ 'a': 0, 'b': 1 });
  15733. * // => 'matches B'
  15734. *
  15735. * func({ 'a': '1', 'b': '2' });
  15736. * // => 'no match'
  15737. */
  15738. function cond(pairs) {
  15739. var length = pairs == null ? 0 : pairs.length,
  15740. toIteratee = getIteratee();
  15741. pairs = !length ? [] : arrayMap(pairs, function(pair) {
  15742. if (typeof pair[1] != 'function') {
  15743. throw new TypeError(FUNC_ERROR_TEXT);
  15744. }
  15745. return [toIteratee(pair[0]), pair[1]];
  15746. });
  15747. return baseRest(function(args) {
  15748. var index = -1;
  15749. while (++index < length) {
  15750. var pair = pairs[index];
  15751. if (apply(pair[0], this, args)) {
  15752. return apply(pair[1], this, args);
  15753. }
  15754. }
  15755. });
  15756. }
  15757. /**
  15758. * Creates a function that invokes the predicate properties of `source` with
  15759. * the corresponding property values of a given object, returning `true` if
  15760. * all predicates return truthy, else `false`.
  15761. *
  15762. * **Note:** The created function is equivalent to `_.conformsTo` with
  15763. * `source` partially applied.
  15764. *
  15765. * @static
  15766. * @memberOf _
  15767. * @since 4.0.0
  15768. * @category Util
  15769. * @param {Object} source The object of property predicates to conform to.
  15770. * @returns {Function} Returns the new spec function.
  15771. * @example
  15772. *
  15773. * var objects = [
  15774. * { 'a': 2, 'b': 1 },
  15775. * { 'a': 1, 'b': 2 }
  15776. * ];
  15777. *
  15778. * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));
  15779. * // => [{ 'a': 1, 'b': 2 }]
  15780. */
  15781. function conforms(source) {
  15782. return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
  15783. }
  15784. /**
  15785. * Creates a function that returns `value`.
  15786. *
  15787. * @static
  15788. * @memberOf _
  15789. * @since 2.4.0
  15790. * @category Util
  15791. * @param {*} value The value to return from the new function.
  15792. * @returns {Function} Returns the new constant function.
  15793. * @example
  15794. *
  15795. * var objects = _.times(2, _.constant({ 'a': 1 }));
  15796. *
  15797. * console.log(objects);
  15798. * // => [{ 'a': 1 }, { 'a': 1 }]
  15799. *
  15800. * console.log(objects[0] === objects[1]);
  15801. * // => true
  15802. */
  15803. function constant(value) {
  15804. return function() {
  15805. return value;
  15806. };
  15807. }
  15808. /**
  15809. * Checks `value` to determine whether a default value should be returned in
  15810. * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
  15811. * or `undefined`.
  15812. *
  15813. * @static
  15814. * @memberOf _
  15815. * @since 4.14.0
  15816. * @category Util
  15817. * @param {*} value The value to check.
  15818. * @param {*} defaultValue The default value.
  15819. * @returns {*} Returns the resolved value.
  15820. * @example
  15821. *
  15822. * _.defaultTo(1, 10);
  15823. * // => 1
  15824. *
  15825. * _.defaultTo(undefined, 10);
  15826. * // => 10
  15827. */
  15828. function defaultTo(value, defaultValue) {
  15829. return (value == null || value !== value) ? defaultValue : value;
  15830. }
  15831. /**
  15832. * Creates a function that returns the result of invoking the given functions
  15833. * with the `this` binding of the created function, where each successive
  15834. * invocation is supplied the return value of the previous.
  15835. *
  15836. * @static
  15837. * @memberOf _
  15838. * @since 3.0.0
  15839. * @category Util
  15840. * @param {...(Function|Function[])} [funcs] The functions to invoke.
  15841. * @returns {Function} Returns the new composite function.
  15842. * @see _.flowRight
  15843. * @example
  15844. *
  15845. * function square(n) {
  15846. * return n * n;
  15847. * }
  15848. *
  15849. * var addSquare = _.flow([_.add, square]);
  15850. * addSquare(1, 2);
  15851. * // => 9
  15852. */
  15853. var flow = createFlow();
  15854. /**
  15855. * This method is like `_.flow` except that it creates a function that
  15856. * invokes the given functions from right to left.
  15857. *
  15858. * @static
  15859. * @since 3.0.0
  15860. * @memberOf _
  15861. * @category Util
  15862. * @param {...(Function|Function[])} [funcs] The functions to invoke.
  15863. * @returns {Function} Returns the new composite function.
  15864. * @see _.flow
  15865. * @example
  15866. *
  15867. * function square(n) {
  15868. * return n * n;
  15869. * }
  15870. *
  15871. * var addSquare = _.flowRight([square, _.add]);
  15872. * addSquare(1, 2);
  15873. * // => 9
  15874. */
  15875. var flowRight = createFlow(true);
  15876. /**
  15877. * This method returns the first argument it receives.
  15878. *
  15879. * @static
  15880. * @since 0.1.0
  15881. * @memberOf _
  15882. * @category Util
  15883. * @param {*} value Any value.
  15884. * @returns {*} Returns `value`.
  15885. * @example
  15886. *
  15887. * var object = { 'a': 1 };
  15888. *
  15889. * console.log(_.identity(object) === object);
  15890. * // => true
  15891. */
  15892. function identity(value) {
  15893. return value;
  15894. }
  15895. /**
  15896. * Creates a function that invokes `func` with the arguments of the created
  15897. * function. If `func` is a property name, the created function returns the
  15898. * property value for a given element. If `func` is an array or object, the
  15899. * created function returns `true` for elements that contain the equivalent
  15900. * source properties, otherwise it returns `false`.
  15901. *
  15902. * @static
  15903. * @since 4.0.0
  15904. * @memberOf _
  15905. * @category Util
  15906. * @param {*} [func=_.identity] The value to convert to a callback.
  15907. * @returns {Function} Returns the callback.
  15908. * @example
  15909. *
  15910. * var users = [
  15911. * { 'user': 'barney', 'age': 36, 'active': true },
  15912. * { 'user': 'fred', 'age': 40, 'active': false }
  15913. * ];
  15914. *
  15915. * // The `_.matches` iteratee shorthand.
  15916. * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
  15917. * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
  15918. *
  15919. * // The `_.matchesProperty` iteratee shorthand.
  15920. * _.filter(users, _.iteratee(['user', 'fred']));
  15921. * // => [{ 'user': 'fred', 'age': 40 }]
  15922. *
  15923. * // The `_.property` iteratee shorthand.
  15924. * _.map(users, _.iteratee('user'));
  15925. * // => ['barney', 'fred']
  15926. *
  15927. * // Create custom iteratee shorthands.
  15928. * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
  15929. * return !_.isRegExp(func) ? iteratee(func) : function(string) {
  15930. * return func.test(string);
  15931. * };
  15932. * });
  15933. *
  15934. * _.filter(['abc', 'def'], /ef/);
  15935. * // => ['def']
  15936. */
  15937. function iteratee(func) {
  15938. return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));
  15939. }
  15940. /**
  15941. * Creates a function that performs a partial deep comparison between a given
  15942. * object and `source`, returning `true` if the given object has equivalent
  15943. * property values, else `false`.
  15944. *
  15945. * **Note:** The created function is equivalent to `_.isMatch` with `source`
  15946. * partially applied.
  15947. *
  15948. * Partial comparisons will match empty array and empty object `source`
  15949. * values against any array or object value, respectively. See `_.isEqual`
  15950. * for a list of supported value comparisons.
  15951. *
  15952. * **Note:** Multiple values can be checked by combining several matchers
  15953. * using `_.overSome`
  15954. *
  15955. * @static
  15956. * @memberOf _
  15957. * @since 3.0.0
  15958. * @category Util
  15959. * @param {Object} source The object of property values to match.
  15960. * @returns {Function} Returns the new spec function.
  15961. * @example
  15962. *
  15963. * var objects = [
  15964. * { 'a': 1, 'b': 2, 'c': 3 },
  15965. * { 'a': 4, 'b': 5, 'c': 6 }
  15966. * ];
  15967. *
  15968. * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
  15969. * // => [{ 'a': 4, 'b': 5, 'c': 6 }]
  15970. *
  15971. * // Checking for several possible values
  15972. * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));
  15973. * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
  15974. */
  15975. function matches(source) {
  15976. return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
  15977. }
  15978. /**
  15979. * Creates a function that performs a partial deep comparison between the
  15980. * value at `path` of a given object to `srcValue`, returning `true` if the
  15981. * object value is equivalent, else `false`.
  15982. *
  15983. * **Note:** Partial comparisons will match empty array and empty object
  15984. * `srcValue` values against any array or object value, respectively. See
  15985. * `_.isEqual` for a list of supported value comparisons.
  15986. *
  15987. * **Note:** Multiple values can be checked by combining several matchers
  15988. * using `_.overSome`
  15989. *
  15990. * @static
  15991. * @memberOf _
  15992. * @since 3.2.0
  15993. * @category Util
  15994. * @param {Array|string} path The path of the property to get.
  15995. * @param {*} srcValue The value to match.
  15996. * @returns {Function} Returns the new spec function.
  15997. * @example
  15998. *
  15999. * var objects = [
  16000. * { 'a': 1, 'b': 2, 'c': 3 },
  16001. * { 'a': 4, 'b': 5, 'c': 6 }
  16002. * ];
  16003. *
  16004. * _.find(objects, _.matchesProperty('a', 4));
  16005. * // => { 'a': 4, 'b': 5, 'c': 6 }
  16006. *
  16007. * // Checking for several possible values
  16008. * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));
  16009. * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
  16010. */
  16011. function matchesProperty(path, srcValue) {
  16012. return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
  16013. }
  16014. /**
  16015. * Creates a function that invokes the method at `path` of a given object.
  16016. * Any additional arguments are provided to the invoked method.
  16017. *
  16018. * @static
  16019. * @memberOf _
  16020. * @since 3.7.0
  16021. * @category Util
  16022. * @param {Array|string} path The path of the method to invoke.
  16023. * @param {...*} [args] The arguments to invoke the method with.
  16024. * @returns {Function} Returns the new invoker function.
  16025. * @example
  16026. *
  16027. * var objects = [
  16028. * { 'a': { 'b': _.constant(2) } },
  16029. * { 'a': { 'b': _.constant(1) } }
  16030. * ];
  16031. *
  16032. * _.map(objects, _.method('a.b'));
  16033. * // => [2, 1]
  16034. *
  16035. * _.map(objects, _.method(['a', 'b']));
  16036. * // => [2, 1]
  16037. */
  16038. var method = baseRest(function(path, args) {
  16039. return function(object) {
  16040. return baseInvoke(object, path, args);
  16041. };
  16042. });
  16043. /**
  16044. * The opposite of `_.method`; this method creates a function that invokes
  16045. * the method at a given path of `object`. Any additional arguments are
  16046. * provided to the invoked method.
  16047. *
  16048. * @static
  16049. * @memberOf _
  16050. * @since 3.7.0
  16051. * @category Util
  16052. * @param {Object} object The object to query.
  16053. * @param {...*} [args] The arguments to invoke the method with.
  16054. * @returns {Function} Returns the new invoker function.
  16055. * @example
  16056. *
  16057. * var array = _.times(3, _.constant),
  16058. * object = { 'a': array, 'b': array, 'c': array };
  16059. *
  16060. * _.map(['a[2]', 'c[0]'], _.methodOf(object));
  16061. * // => [2, 0]
  16062. *
  16063. * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
  16064. * // => [2, 0]
  16065. */
  16066. var methodOf = baseRest(function(object, args) {
  16067. return function(path) {
  16068. return baseInvoke(object, path, args);
  16069. };
  16070. });
  16071. /**
  16072. * Adds all own enumerable string keyed function properties of a source
  16073. * object to the destination object. If `object` is a function, then methods
  16074. * are added to its prototype as well.
  16075. *
  16076. * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
  16077. * avoid conflicts caused by modifying the original.
  16078. *
  16079. * @static
  16080. * @since 0.1.0
  16081. * @memberOf _
  16082. * @category Util
  16083. * @param {Function|Object} [object=lodash] The destination object.
  16084. * @param {Object} source The object of functions to add.
  16085. * @param {Object} [options={}] The options object.
  16086. * @param {boolean} [options.chain=true] Specify whether mixins are chainable.
  16087. * @returns {Function|Object} Returns `object`.
  16088. * @example
  16089. *
  16090. * function vowels(string) {
  16091. * return _.filter(string, function(v) {
  16092. * return /[aeiou]/i.test(v);
  16093. * });
  16094. * }
  16095. *
  16096. * _.mixin({ 'vowels': vowels });
  16097. * _.vowels('fred');
  16098. * // => ['e']
  16099. *
  16100. * _('fred').vowels().value();
  16101. * // => ['e']
  16102. *
  16103. * _.mixin({ 'vowels': vowels }, { 'chain': false });
  16104. * _('fred').vowels();
  16105. * // => ['e']
  16106. */
  16107. function mixin(object, source, options) {
  16108. var props = keys(source),
  16109. methodNames = baseFunctions(source, props);
  16110. if (options == null &&
  16111. !(isObject(source) && (methodNames.length || !props.length))) {
  16112. options = source;
  16113. source = object;
  16114. object = this;
  16115. methodNames = baseFunctions(source, keys(source));
  16116. }
  16117. var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
  16118. isFunc = isFunction(object);
  16119. arrayEach(methodNames, function(methodName) {
  16120. var func = source[methodName];
  16121. object[methodName] = func;
  16122. if (isFunc) {
  16123. object.prototype[methodName] = function() {
  16124. var chainAll = this.__chain__;
  16125. if (chain || chainAll) {
  16126. var result = object(this.__wrapped__),
  16127. actions = result.__actions__ = copyArray(this.__actions__);
  16128. actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
  16129. result.__chain__ = chainAll;
  16130. return result;
  16131. }
  16132. return func.apply(object, arrayPush([this.value()], arguments));
  16133. };
  16134. }
  16135. });
  16136. return object;
  16137. }
  16138. /**
  16139. * Reverts the `_` variable to its previous value and returns a reference to
  16140. * the `lodash` function.
  16141. *
  16142. * @static
  16143. * @since 0.1.0
  16144. * @memberOf _
  16145. * @category Util
  16146. * @returns {Function} Returns the `lodash` function.
  16147. * @example
  16148. *
  16149. * var lodash = _.noConflict();
  16150. */
  16151. function noConflict() {
  16152. if (root._ === this) {
  16153. root._ = oldDash;
  16154. }
  16155. return this;
  16156. }
  16157. /**
  16158. * This method returns `undefined`.
  16159. *
  16160. * @static
  16161. * @memberOf _
  16162. * @since 2.3.0
  16163. * @category Util
  16164. * @example
  16165. *
  16166. * _.times(2, _.noop);
  16167. * // => [undefined, undefined]
  16168. */
  16169. function noop() {
  16170. // No operation performed.
  16171. }
  16172. /**
  16173. * Creates a function that gets the argument at index `n`. If `n` is negative,
  16174. * the nth argument from the end is returned.
  16175. *
  16176. * @static
  16177. * @memberOf _
  16178. * @since 4.0.0
  16179. * @category Util
  16180. * @param {number} [n=0] The index of the argument to return.
  16181. * @returns {Function} Returns the new pass-thru function.
  16182. * @example
  16183. *
  16184. * var func = _.nthArg(1);
  16185. * func('a', 'b', 'c', 'd');
  16186. * // => 'b'
  16187. *
  16188. * var func = _.nthArg(-2);
  16189. * func('a', 'b', 'c', 'd');
  16190. * // => 'c'
  16191. */
  16192. function nthArg(n) {
  16193. n = toInteger(n);
  16194. return baseRest(function(args) {
  16195. return baseNth(args, n);
  16196. });
  16197. }
  16198. /**
  16199. * Creates a function that invokes `iteratees` with the arguments it receives
  16200. * and returns their results.
  16201. *
  16202. * @static
  16203. * @memberOf _
  16204. * @since 4.0.0
  16205. * @category Util
  16206. * @param {...(Function|Function[])} [iteratees=[_.identity]]
  16207. * The iteratees to invoke.
  16208. * @returns {Function} Returns the new function.
  16209. * @example
  16210. *
  16211. * var func = _.over([Math.max, Math.min]);
  16212. *
  16213. * func(1, 2, 3, 4);
  16214. * // => [4, 1]
  16215. */
  16216. var over = createOver(arrayMap);
  16217. /**
  16218. * Creates a function that checks if **all** of the `predicates` return
  16219. * truthy when invoked with the arguments it receives.
  16220. *
  16221. * Following shorthands are possible for providing predicates.
  16222. * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
  16223. * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
  16224. *
  16225. * @static
  16226. * @memberOf _
  16227. * @since 4.0.0
  16228. * @category Util
  16229. * @param {...(Function|Function[])} [predicates=[_.identity]]
  16230. * The predicates to check.
  16231. * @returns {Function} Returns the new function.
  16232. * @example
  16233. *
  16234. * var func = _.overEvery([Boolean, isFinite]);
  16235. *
  16236. * func('1');
  16237. * // => true
  16238. *
  16239. * func(null);
  16240. * // => false
  16241. *
  16242. * func(NaN);
  16243. * // => false
  16244. */
  16245. var overEvery = createOver(arrayEvery);
  16246. /**
  16247. * Creates a function that checks if **any** of the `predicates` return
  16248. * truthy when invoked with the arguments it receives.
  16249. *
  16250. * Following shorthands are possible for providing predicates.
  16251. * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
  16252. * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
  16253. *
  16254. * @static
  16255. * @memberOf _
  16256. * @since 4.0.0
  16257. * @category Util
  16258. * @param {...(Function|Function[])} [predicates=[_.identity]]
  16259. * The predicates to check.
  16260. * @returns {Function} Returns the new function.
  16261. * @example
  16262. *
  16263. * var func = _.overSome([Boolean, isFinite]);
  16264. *
  16265. * func('1');
  16266. * // => true
  16267. *
  16268. * func(null);
  16269. * // => true
  16270. *
  16271. * func(NaN);
  16272. * // => false
  16273. *
  16274. * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])
  16275. * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])
  16276. */
  16277. var overSome = createOver(arraySome);
  16278. /**
  16279. * Creates a function that returns the value at `path` of a given object.
  16280. *
  16281. * @static
  16282. * @memberOf _
  16283. * @since 2.4.0
  16284. * @category Util
  16285. * @param {Array|string} path The path of the property to get.
  16286. * @returns {Function} Returns the new accessor function.
  16287. * @example
  16288. *
  16289. * var objects = [
  16290. * { 'a': { 'b': 2 } },
  16291. * { 'a': { 'b': 1 } }
  16292. * ];
  16293. *
  16294. * _.map(objects, _.property('a.b'));
  16295. * // => [2, 1]
  16296. *
  16297. * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
  16298. * // => [1, 2]
  16299. */
  16300. function property(path) {
  16301. return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
  16302. }
  16303. /**
  16304. * The opposite of `_.property`; this method creates a function that returns
  16305. * the value at a given path of `object`.
  16306. *
  16307. * @static
  16308. * @memberOf _
  16309. * @since 3.0.0
  16310. * @category Util
  16311. * @param {Object} object The object to query.
  16312. * @returns {Function} Returns the new accessor function.
  16313. * @example
  16314. *
  16315. * var array = [0, 1, 2],
  16316. * object = { 'a': array, 'b': array, 'c': array };
  16317. *
  16318. * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
  16319. * // => [2, 0]
  16320. *
  16321. * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
  16322. * // => [2, 0]
  16323. */
  16324. function propertyOf(object) {
  16325. return function(path) {
  16326. return object == null ? undefined : baseGet(object, path);
  16327. };
  16328. }
  16329. /**
  16330. * Creates an array of numbers (positive and/or negative) progressing from
  16331. * `start` up to, but not including, `end`. A step of `-1` is used if a negative
  16332. * `start` is specified without an `end` or `step`. If `end` is not specified,
  16333. * it's set to `start` with `start` then set to `0`.
  16334. *
  16335. * **Note:** JavaScript follows the IEEE-754 standard for resolving
  16336. * floating-point values which can produce unexpected results.
  16337. *
  16338. * @static
  16339. * @since 0.1.0
  16340. * @memberOf _
  16341. * @category Util
  16342. * @param {number} [start=0] The start of the range.
  16343. * @param {number} end The end of the range.
  16344. * @param {number} [step=1] The value to increment or decrement by.
  16345. * @returns {Array} Returns the range of numbers.
  16346. * @see _.inRange, _.rangeRight
  16347. * @example
  16348. *
  16349. * _.range(4);
  16350. * // => [0, 1, 2, 3]
  16351. *
  16352. * _.range(-4);
  16353. * // => [0, -1, -2, -3]
  16354. *
  16355. * _.range(1, 5);
  16356. * // => [1, 2, 3, 4]
  16357. *
  16358. * _.range(0, 20, 5);
  16359. * // => [0, 5, 10, 15]
  16360. *
  16361. * _.range(0, -4, -1);
  16362. * // => [0, -1, -2, -3]
  16363. *
  16364. * _.range(1, 4, 0);
  16365. * // => [1, 1, 1]
  16366. *
  16367. * _.range(0);
  16368. * // => []
  16369. */
  16370. var range = createRange();
  16371. /**
  16372. * This method is like `_.range` except that it populates values in
  16373. * descending order.
  16374. *
  16375. * @static
  16376. * @memberOf _
  16377. * @since 4.0.0
  16378. * @category Util
  16379. * @param {number} [start=0] The start of the range.
  16380. * @param {number} end The end of the range.
  16381. * @param {number} [step=1] The value to increment or decrement by.
  16382. * @returns {Array} Returns the range of numbers.
  16383. * @see _.inRange, _.range
  16384. * @example
  16385. *
  16386. * _.rangeRight(4);
  16387. * // => [3, 2, 1, 0]
  16388. *
  16389. * _.rangeRight(-4);
  16390. * // => [-3, -2, -1, 0]
  16391. *
  16392. * _.rangeRight(1, 5);
  16393. * // => [4, 3, 2, 1]
  16394. *
  16395. * _.rangeRight(0, 20, 5);
  16396. * // => [15, 10, 5, 0]
  16397. *
  16398. * _.rangeRight(0, -4, -1);
  16399. * // => [-3, -2, -1, 0]
  16400. *
  16401. * _.rangeRight(1, 4, 0);
  16402. * // => [1, 1, 1]
  16403. *
  16404. * _.rangeRight(0);
  16405. * // => []
  16406. */
  16407. var rangeRight = createRange(true);
  16408. /**
  16409. * This method returns a new empty array.
  16410. *
  16411. * @static
  16412. * @memberOf _
  16413. * @since 4.13.0
  16414. * @category Util
  16415. * @returns {Array} Returns the new empty array.
  16416. * @example
  16417. *
  16418. * var arrays = _.times(2, _.stubArray);
  16419. *
  16420. * console.log(arrays);
  16421. * // => [[], []]
  16422. *
  16423. * console.log(arrays[0] === arrays[1]);
  16424. * // => false
  16425. */
  16426. function stubArray() {
  16427. return [];
  16428. }
  16429. /**
  16430. * This method returns `false`.
  16431. *
  16432. * @static
  16433. * @memberOf _
  16434. * @since 4.13.0
  16435. * @category Util
  16436. * @returns {boolean} Returns `false`.
  16437. * @example
  16438. *
  16439. * _.times(2, _.stubFalse);
  16440. * // => [false, false]
  16441. */
  16442. function stubFalse() {
  16443. return false;
  16444. }
  16445. /**
  16446. * This method returns a new empty object.
  16447. *
  16448. * @static
  16449. * @memberOf _
  16450. * @since 4.13.0
  16451. * @category Util
  16452. * @returns {Object} Returns the new empty object.
  16453. * @example
  16454. *
  16455. * var objects = _.times(2, _.stubObject);
  16456. *
  16457. * console.log(objects);
  16458. * // => [{}, {}]
  16459. *
  16460. * console.log(objects[0] === objects[1]);
  16461. * // => false
  16462. */
  16463. function stubObject() {
  16464. return {};
  16465. }
  16466. /**
  16467. * This method returns an empty string.
  16468. *
  16469. * @static
  16470. * @memberOf _
  16471. * @since 4.13.0
  16472. * @category Util
  16473. * @returns {string} Returns the empty string.
  16474. * @example
  16475. *
  16476. * _.times(2, _.stubString);
  16477. * // => ['', '']
  16478. */
  16479. function stubString() {
  16480. return '';
  16481. }
  16482. /**
  16483. * This method returns `true`.
  16484. *
  16485. * @static
  16486. * @memberOf _
  16487. * @since 4.13.0
  16488. * @category Util
  16489. * @returns {boolean} Returns `true`.
  16490. * @example
  16491. *
  16492. * _.times(2, _.stubTrue);
  16493. * // => [true, true]
  16494. */
  16495. function stubTrue() {
  16496. return true;
  16497. }
  16498. /**
  16499. * Invokes the iteratee `n` times, returning an array of the results of
  16500. * each invocation. The iteratee is invoked with one argument; (index).
  16501. *
  16502. * @static
  16503. * @since 0.1.0
  16504. * @memberOf _
  16505. * @category Util
  16506. * @param {number} n The number of times to invoke `iteratee`.
  16507. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  16508. * @returns {Array} Returns the array of results.
  16509. * @example
  16510. *
  16511. * _.times(3, String);
  16512. * // => ['0', '1', '2']
  16513. *
  16514. * _.times(4, _.constant(0));
  16515. * // => [0, 0, 0, 0]
  16516. */
  16517. function times(n, iteratee) {
  16518. n = toInteger(n);
  16519. if (n < 1 || n > MAX_SAFE_INTEGER) {
  16520. return [];
  16521. }
  16522. var index = MAX_ARRAY_LENGTH,
  16523. length = nativeMin(n, MAX_ARRAY_LENGTH);
  16524. iteratee = getIteratee(iteratee);
  16525. n -= MAX_ARRAY_LENGTH;
  16526. var result = baseTimes(length, iteratee);
  16527. while (++index < n) {
  16528. iteratee(index);
  16529. }
  16530. return result;
  16531. }
  16532. /**
  16533. * Converts `value` to a property path array.
  16534. *
  16535. * @static
  16536. * @memberOf _
  16537. * @since 4.0.0
  16538. * @category Util
  16539. * @param {*} value The value to convert.
  16540. * @returns {Array} Returns the new property path array.
  16541. * @example
  16542. *
  16543. * _.toPath('a.b.c');
  16544. * // => ['a', 'b', 'c']
  16545. *
  16546. * _.toPath('a[0].b.c');
  16547. * // => ['a', '0', 'b', 'c']
  16548. */
  16549. function toPath(value) {
  16550. if (isArray(value)) {
  16551. return arrayMap(value, toKey);
  16552. }
  16553. return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
  16554. }
  16555. /**
  16556. * Generates a unique ID. If `prefix` is given, the ID is appended to it.
  16557. *
  16558. * @static
  16559. * @since 0.1.0
  16560. * @memberOf _
  16561. * @category Util
  16562. * @param {string} [prefix=''] The value to prefix the ID with.
  16563. * @returns {string} Returns the unique ID.
  16564. * @example
  16565. *
  16566. * _.uniqueId('contact_');
  16567. * // => 'contact_104'
  16568. *
  16569. * _.uniqueId();
  16570. * // => '105'
  16571. */
  16572. function uniqueId(prefix) {
  16573. var id = ++idCounter;
  16574. return toString(prefix) + id;
  16575. }
  16576. /*------------------------------------------------------------------------*/
  16577. /**
  16578. * Adds two numbers.
  16579. *
  16580. * @static
  16581. * @memberOf _
  16582. * @since 3.4.0
  16583. * @category Math
  16584. * @param {number} augend The first number in an addition.
  16585. * @param {number} addend The second number in an addition.
  16586. * @returns {number} Returns the total.
  16587. * @example
  16588. *
  16589. * _.add(6, 4);
  16590. * // => 10
  16591. */
  16592. var add = createMathOperation(function(augend, addend) {
  16593. return augend + addend;
  16594. }, 0);
  16595. /**
  16596. * Computes `number` rounded up to `precision`.
  16597. *
  16598. * @static
  16599. * @memberOf _
  16600. * @since 3.10.0
  16601. * @category Math
  16602. * @param {number} number The number to round up.
  16603. * @param {number} [precision=0] The precision to round up to.
  16604. * @returns {number} Returns the rounded up number.
  16605. * @example
  16606. *
  16607. * _.ceil(4.006);
  16608. * // => 5
  16609. *
  16610. * _.ceil(6.004, 2);
  16611. * // => 6.01
  16612. *
  16613. * _.ceil(6040, -2);
  16614. * // => 6100
  16615. */
  16616. var ceil = createRound('ceil');
  16617. /**
  16618. * Divide two numbers.
  16619. *
  16620. * @static
  16621. * @memberOf _
  16622. * @since 4.7.0
  16623. * @category Math
  16624. * @param {number} dividend The first number in a division.
  16625. * @param {number} divisor The second number in a division.
  16626. * @returns {number} Returns the quotient.
  16627. * @example
  16628. *
  16629. * _.divide(6, 4);
  16630. * // => 1.5
  16631. */
  16632. var divide = createMathOperation(function(dividend, divisor) {
  16633. return dividend / divisor;
  16634. }, 1);
  16635. /**
  16636. * Computes `number` rounded down to `precision`.
  16637. *
  16638. * @static
  16639. * @memberOf _
  16640. * @since 3.10.0
  16641. * @category Math
  16642. * @param {number} number The number to round down.
  16643. * @param {number} [precision=0] The precision to round down to.
  16644. * @returns {number} Returns the rounded down number.
  16645. * @example
  16646. *
  16647. * _.floor(4.006);
  16648. * // => 4
  16649. *
  16650. * _.floor(0.046, 2);
  16651. * // => 0.04
  16652. *
  16653. * _.floor(4060, -2);
  16654. * // => 4000
  16655. */
  16656. var floor = createRound('floor');
  16657. /**
  16658. * Computes the maximum value of `array`. If `array` is empty or falsey,
  16659. * `undefined` is returned.
  16660. *
  16661. * @static
  16662. * @since 0.1.0
  16663. * @memberOf _
  16664. * @category Math
  16665. * @param {Array} array The array to iterate over.
  16666. * @returns {*} Returns the maximum value.
  16667. * @example
  16668. *
  16669. * _.max([4, 2, 8, 6]);
  16670. * // => 8
  16671. *
  16672. * _.max([]);
  16673. * // => undefined
  16674. */
  16675. function max(array) {
  16676. return (array && array.length)
  16677. ? baseExtremum(array, identity, baseGt)
  16678. : undefined;
  16679. }
  16680. /**
  16681. * This method is like `_.max` except that it accepts `iteratee` which is
  16682. * invoked for each element in `array` to generate the criterion by which
  16683. * the value is ranked. The iteratee is invoked with one argument: (value).
  16684. *
  16685. * @static
  16686. * @memberOf _
  16687. * @since 4.0.0
  16688. * @category Math
  16689. * @param {Array} array The array to iterate over.
  16690. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  16691. * @returns {*} Returns the maximum value.
  16692. * @example
  16693. *
  16694. * var objects = [{ 'n': 1 }, { 'n': 2 }];
  16695. *
  16696. * _.maxBy(objects, function(o) { return o.n; });
  16697. * // => { 'n': 2 }
  16698. *
  16699. * // The `_.property` iteratee shorthand.
  16700. * _.maxBy(objects, 'n');
  16701. * // => { 'n': 2 }
  16702. */
  16703. function maxBy(array, iteratee) {
  16704. return (array && array.length)
  16705. ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)
  16706. : undefined;
  16707. }
  16708. /**
  16709. * Computes the mean of the values in `array`.
  16710. *
  16711. * @static
  16712. * @memberOf _
  16713. * @since 4.0.0
  16714. * @category Math
  16715. * @param {Array} array The array to iterate over.
  16716. * @returns {number} Returns the mean.
  16717. * @example
  16718. *
  16719. * _.mean([4, 2, 8, 6]);
  16720. * // => 5
  16721. */
  16722. function mean(array) {
  16723. return baseMean(array, identity);
  16724. }
  16725. /**
  16726. * This method is like `_.mean` except that it accepts `iteratee` which is
  16727. * invoked for each element in `array` to generate the value to be averaged.
  16728. * The iteratee is invoked with one argument: (value).
  16729. *
  16730. * @static
  16731. * @memberOf _
  16732. * @since 4.7.0
  16733. * @category Math
  16734. * @param {Array} array The array to iterate over.
  16735. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  16736. * @returns {number} Returns the mean.
  16737. * @example
  16738. *
  16739. * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
  16740. *
  16741. * _.meanBy(objects, function(o) { return o.n; });
  16742. * // => 5
  16743. *
  16744. * // The `_.property` iteratee shorthand.
  16745. * _.meanBy(objects, 'n');
  16746. * // => 5
  16747. */
  16748. function meanBy(array, iteratee) {
  16749. return baseMean(array, getIteratee(iteratee, 2));
  16750. }
  16751. /**
  16752. * Computes the minimum value of `array`. If `array` is empty or falsey,
  16753. * `undefined` is returned.
  16754. *
  16755. * @static
  16756. * @since 0.1.0
  16757. * @memberOf _
  16758. * @category Math
  16759. * @param {Array} array The array to iterate over.
  16760. * @returns {*} Returns the minimum value.
  16761. * @example
  16762. *
  16763. * _.min([4, 2, 8, 6]);
  16764. * // => 2
  16765. *
  16766. * _.min([]);
  16767. * // => undefined
  16768. */
  16769. function min(array) {
  16770. return (array && array.length)
  16771. ? baseExtremum(array, identity, baseLt)
  16772. : undefined;
  16773. }
  16774. /**
  16775. * This method is like `_.min` except that it accepts `iteratee` which is
  16776. * invoked for each element in `array` to generate the criterion by which
  16777. * the value is ranked. The iteratee is invoked with one argument: (value).
  16778. *
  16779. * @static
  16780. * @memberOf _
  16781. * @since 4.0.0
  16782. * @category Math
  16783. * @param {Array} array The array to iterate over.
  16784. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  16785. * @returns {*} Returns the minimum value.
  16786. * @example
  16787. *
  16788. * var objects = [{ 'n': 1 }, { 'n': 2 }];
  16789. *
  16790. * _.minBy(objects, function(o) { return o.n; });
  16791. * // => { 'n': 1 }
  16792. *
  16793. * // The `_.property` iteratee shorthand.
  16794. * _.minBy(objects, 'n');
  16795. * // => { 'n': 1 }
  16796. */
  16797. function minBy(array, iteratee) {
  16798. return (array && array.length)
  16799. ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)
  16800. : undefined;
  16801. }
  16802. /**
  16803. * Multiply two numbers.
  16804. *
  16805. * @static
  16806. * @memberOf _
  16807. * @since 4.7.0
  16808. * @category Math
  16809. * @param {number} multiplier The first number in a multiplication.
  16810. * @param {number} multiplicand The second number in a multiplication.
  16811. * @returns {number} Returns the product.
  16812. * @example
  16813. *
  16814. * _.multiply(6, 4);
  16815. * // => 24
  16816. */
  16817. var multiply = createMathOperation(function(multiplier, multiplicand) {
  16818. return multiplier * multiplicand;
  16819. }, 1);
  16820. /**
  16821. * Computes `number` rounded to `precision`.
  16822. *
  16823. * @static
  16824. * @memberOf _
  16825. * @since 3.10.0
  16826. * @category Math
  16827. * @param {number} number The number to round.
  16828. * @param {number} [precision=0] The precision to round to.
  16829. * @returns {number} Returns the rounded number.
  16830. * @example
  16831. *
  16832. * _.round(4.006);
  16833. * // => 4
  16834. *
  16835. * _.round(4.006, 2);
  16836. * // => 4.01
  16837. *
  16838. * _.round(4060, -2);
  16839. * // => 4100
  16840. */
  16841. var round = createRound('round');
  16842. /**
  16843. * Subtract two numbers.
  16844. *
  16845. * @static
  16846. * @memberOf _
  16847. * @since 4.0.0
  16848. * @category Math
  16849. * @param {number} minuend The first number in a subtraction.
  16850. * @param {number} subtrahend The second number in a subtraction.
  16851. * @returns {number} Returns the difference.
  16852. * @example
  16853. *
  16854. * _.subtract(6, 4);
  16855. * // => 2
  16856. */
  16857. var subtract = createMathOperation(function(minuend, subtrahend) {
  16858. return minuend - subtrahend;
  16859. }, 0);
  16860. /**
  16861. * Computes the sum of the values in `array`.
  16862. *
  16863. * @static
  16864. * @memberOf _
  16865. * @since 3.4.0
  16866. * @category Math
  16867. * @param {Array} array The array to iterate over.
  16868. * @returns {number} Returns the sum.
  16869. * @example
  16870. *
  16871. * _.sum([4, 2, 8, 6]);
  16872. * // => 20
  16873. */
  16874. function sum(array) {
  16875. return (array && array.length)
  16876. ? baseSum(array, identity)
  16877. : 0;
  16878. }
  16879. /**
  16880. * This method is like `_.sum` except that it accepts `iteratee` which is
  16881. * invoked for each element in `array` to generate the value to be summed.
  16882. * The iteratee is invoked with one argument: (value).
  16883. *
  16884. * @static
  16885. * @memberOf _
  16886. * @since 4.0.0
  16887. * @category Math
  16888. * @param {Array} array The array to iterate over.
  16889. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  16890. * @returns {number} Returns the sum.
  16891. * @example
  16892. *
  16893. * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
  16894. *
  16895. * _.sumBy(objects, function(o) { return o.n; });
  16896. * // => 20
  16897. *
  16898. * // The `_.property` iteratee shorthand.
  16899. * _.sumBy(objects, 'n');
  16900. * // => 20
  16901. */
  16902. function sumBy(array, iteratee) {
  16903. return (array && array.length)
  16904. ? baseSum(array, getIteratee(iteratee, 2))
  16905. : 0;
  16906. }
  16907. /*------------------------------------------------------------------------*/
  16908. // Add methods that return wrapped values in chain sequences.
  16909. lodash.after = after;
  16910. lodash.ary = ary;
  16911. lodash.assign = assign;
  16912. lodash.assignIn = assignIn;
  16913. lodash.assignInWith = assignInWith;
  16914. lodash.assignWith = assignWith;
  16915. lodash.at = at;
  16916. lodash.before = before;
  16917. lodash.bind = bind;
  16918. lodash.bindAll = bindAll;
  16919. lodash.bindKey = bindKey;
  16920. lodash.castArray = castArray;
  16921. lodash.chain = chain;
  16922. lodash.chunk = chunk;
  16923. lodash.compact = compact;
  16924. lodash.concat = concat;
  16925. lodash.cond = cond;
  16926. lodash.conforms = conforms;
  16927. lodash.constant = constant;
  16928. lodash.countBy = countBy;
  16929. lodash.create = create;
  16930. lodash.curry = curry;
  16931. lodash.curryRight = curryRight;
  16932. lodash.debounce = debounce;
  16933. lodash.defaults = defaults;
  16934. lodash.defaultsDeep = defaultsDeep;
  16935. lodash.defer = defer;
  16936. lodash.delay = delay;
  16937. lodash.difference = difference;
  16938. lodash.differenceBy = differenceBy;
  16939. lodash.differenceWith = differenceWith;
  16940. lodash.drop = drop;
  16941. lodash.dropRight = dropRight;
  16942. lodash.dropRightWhile = dropRightWhile;
  16943. lodash.dropWhile = dropWhile;
  16944. lodash.fill = fill;
  16945. lodash.filter = filter;
  16946. lodash.flatMap = flatMap;
  16947. lodash.flatMapDeep = flatMapDeep;
  16948. lodash.flatMapDepth = flatMapDepth;
  16949. lodash.flatten = flatten;
  16950. lodash.flattenDeep = flattenDeep;
  16951. lodash.flattenDepth = flattenDepth;
  16952. lodash.flip = flip;
  16953. lodash.flow = flow;
  16954. lodash.flowRight = flowRight;
  16955. lodash.fromPairs = fromPairs;
  16956. lodash.functions = functions;
  16957. lodash.functionsIn = functionsIn;
  16958. lodash.groupBy = groupBy;
  16959. lodash.initial = initial;
  16960. lodash.intersection = intersection;
  16961. lodash.intersectionBy = intersectionBy;
  16962. lodash.intersectionWith = intersectionWith;
  16963. lodash.invert = invert;
  16964. lodash.invertBy = invertBy;
  16965. lodash.invokeMap = invokeMap;
  16966. lodash.iteratee = iteratee;
  16967. lodash.keyBy = keyBy;
  16968. lodash.keys = keys;
  16969. lodash.keysIn = keysIn;
  16970. lodash.map = map;
  16971. lodash.mapKeys = mapKeys;
  16972. lodash.mapValues = mapValues;
  16973. lodash.matches = matches;
  16974. lodash.matchesProperty = matchesProperty;
  16975. lodash.memoize = memoize;
  16976. lodash.merge = merge;
  16977. lodash.mergeWith = mergeWith;
  16978. lodash.method = method;
  16979. lodash.methodOf = methodOf;
  16980. lodash.mixin = mixin;
  16981. lodash.negate = negate;
  16982. lodash.nthArg = nthArg;
  16983. lodash.omit = omit;
  16984. lodash.omitBy = omitBy;
  16985. lodash.once = once;
  16986. lodash.orderBy = orderBy;
  16987. lodash.over = over;
  16988. lodash.overArgs = overArgs;
  16989. lodash.overEvery = overEvery;
  16990. lodash.overSome = overSome;
  16991. lodash.partial = partial;
  16992. lodash.partialRight = partialRight;
  16993. lodash.partition = partition;
  16994. lodash.pick = pick;
  16995. lodash.pickBy = pickBy;
  16996. lodash.property = property;
  16997. lodash.propertyOf = propertyOf;
  16998. lodash.pull = pull;
  16999. lodash.pullAll = pullAll;
  17000. lodash.pullAllBy = pullAllBy;
  17001. lodash.pullAllWith = pullAllWith;
  17002. lodash.pullAt = pullAt;
  17003. lodash.range = range;
  17004. lodash.rangeRight = rangeRight;
  17005. lodash.rearg = rearg;
  17006. lodash.reject = reject;
  17007. lodash.remove = remove;
  17008. lodash.rest = rest;
  17009. lodash.reverse = reverse;
  17010. lodash.sampleSize = sampleSize;
  17011. lodash.set = set;
  17012. lodash.setWith = setWith;
  17013. lodash.shuffle = shuffle;
  17014. lodash.slice = slice;
  17015. lodash.sortBy = sortBy;
  17016. lodash.sortedUniq = sortedUniq;
  17017. lodash.sortedUniqBy = sortedUniqBy;
  17018. lodash.split = split;
  17019. lodash.spread = spread;
  17020. lodash.tail = tail;
  17021. lodash.take = take;
  17022. lodash.takeRight = takeRight;
  17023. lodash.takeRightWhile = takeRightWhile;
  17024. lodash.takeWhile = takeWhile;
  17025. lodash.tap = tap;
  17026. lodash.throttle = throttle;
  17027. lodash.thru = thru;
  17028. lodash.toArray = toArray;
  17029. lodash.toPairs = toPairs;
  17030. lodash.toPairsIn = toPairsIn;
  17031. lodash.toPath = toPath;
  17032. lodash.toPlainObject = toPlainObject;
  17033. lodash.transform = transform;
  17034. lodash.unary = unary;
  17035. lodash.union = union;
  17036. lodash.unionBy = unionBy;
  17037. lodash.unionWith = unionWith;
  17038. lodash.uniq = uniq;
  17039. lodash.uniqBy = uniqBy;
  17040. lodash.uniqWith = uniqWith;
  17041. lodash.unset = unset;
  17042. lodash.unzip = unzip;
  17043. lodash.unzipWith = unzipWith;
  17044. lodash.update = update;
  17045. lodash.updateWith = updateWith;
  17046. lodash.values = values;
  17047. lodash.valuesIn = valuesIn;
  17048. lodash.without = without;
  17049. lodash.words = words;
  17050. lodash.wrap = wrap;
  17051. lodash.xor = xor;
  17052. lodash.xorBy = xorBy;
  17053. lodash.xorWith = xorWith;
  17054. lodash.zip = zip;
  17055. lodash.zipObject = zipObject;
  17056. lodash.zipObjectDeep = zipObjectDeep;
  17057. lodash.zipWith = zipWith;
  17058. // Add aliases.
  17059. lodash.entries = toPairs;
  17060. lodash.entriesIn = toPairsIn;
  17061. lodash.extend = assignIn;
  17062. lodash.extendWith = assignInWith;
  17063. // Add methods to `lodash.prototype`.
  17064. mixin(lodash, lodash);
  17065. /*------------------------------------------------------------------------*/
  17066. // Add methods that return unwrapped values in chain sequences.
  17067. lodash.add = add;
  17068. lodash.attempt = attempt;
  17069. lodash.camelCase = camelCase;
  17070. lodash.capitalize = capitalize;
  17071. lodash.ceil = ceil;
  17072. lodash.clamp = clamp;
  17073. lodash.clone = clone;
  17074. lodash.cloneDeep = cloneDeep;
  17075. lodash.cloneDeepWith = cloneDeepWith;
  17076. lodash.cloneWith = cloneWith;
  17077. lodash.conformsTo = conformsTo;
  17078. lodash.deburr = deburr;
  17079. lodash.defaultTo = defaultTo;
  17080. lodash.divide = divide;
  17081. lodash.endsWith = endsWith;
  17082. lodash.eq = eq;
  17083. lodash.escape = escape;
  17084. lodash.escapeRegExp = escapeRegExp;
  17085. lodash.every = every;
  17086. lodash.find = find;
  17087. lodash.findIndex = findIndex;
  17088. lodash.findKey = findKey;
  17089. lodash.findLast = findLast;
  17090. lodash.findLastIndex = findLastIndex;
  17091. lodash.findLastKey = findLastKey;
  17092. lodash.floor = floor;
  17093. lodash.forEach = forEach;
  17094. lodash.forEachRight = forEachRight;
  17095. lodash.forIn = forIn;
  17096. lodash.forInRight = forInRight;
  17097. lodash.forOwn = forOwn;
  17098. lodash.forOwnRight = forOwnRight;
  17099. lodash.get = get;
  17100. lodash.gt = gt;
  17101. lodash.gte = gte;
  17102. lodash.has = has;
  17103. lodash.hasIn = hasIn;
  17104. lodash.head = head;
  17105. lodash.identity = identity;
  17106. lodash.includes = includes;
  17107. lodash.indexOf = indexOf;
  17108. lodash.inRange = inRange;
  17109. lodash.invoke = invoke;
  17110. lodash.isArguments = isArguments;
  17111. lodash.isArray = isArray;
  17112. lodash.isArrayBuffer = isArrayBuffer;
  17113. lodash.isArrayLike = isArrayLike;
  17114. lodash.isArrayLikeObject = isArrayLikeObject;
  17115. lodash.isBoolean = isBoolean;
  17116. lodash.isBuffer = isBuffer;
  17117. lodash.isDate = isDate;
  17118. lodash.isElement = isElement;
  17119. lodash.isEmpty = isEmpty;
  17120. lodash.isEqual = isEqual;
  17121. lodash.isEqualWith = isEqualWith;
  17122. lodash.isError = isError;
  17123. lodash.isFinite = isFinite;
  17124. lodash.isFunction = isFunction;
  17125. lodash.isInteger = isInteger;
  17126. lodash.isLength = isLength;
  17127. lodash.isMap = isMap;
  17128. lodash.isMatch = isMatch;
  17129. lodash.isMatchWith = isMatchWith;
  17130. lodash.isNaN = isNaN;
  17131. lodash.isNative = isNative;
  17132. lodash.isNil = isNil;
  17133. lodash.isNull = isNull;
  17134. lodash.isNumber = isNumber;
  17135. lodash.isObject = isObject;
  17136. lodash.isObjectLike = isObjectLike;
  17137. lodash.isPlainObject = isPlainObject;
  17138. lodash.isRegExp = isRegExp;
  17139. lodash.isSafeInteger = isSafeInteger;
  17140. lodash.isSet = isSet;
  17141. lodash.isString = isString;
  17142. lodash.isSymbol = isSymbol;
  17143. lodash.isTypedArray = isTypedArray;
  17144. lodash.isUndefined = isUndefined;
  17145. lodash.isWeakMap = isWeakMap;
  17146. lodash.isWeakSet = isWeakSet;
  17147. lodash.join = join;
  17148. lodash.kebabCase = kebabCase;
  17149. lodash.last = last;
  17150. lodash.lastIndexOf = lastIndexOf;
  17151. lodash.lowerCase = lowerCase;
  17152. lodash.lowerFirst = lowerFirst;
  17153. lodash.lt = lt;
  17154. lodash.lte = lte;
  17155. lodash.max = max;
  17156. lodash.maxBy = maxBy;
  17157. lodash.mean = mean;
  17158. lodash.meanBy = meanBy;
  17159. lodash.min = min;
  17160. lodash.minBy = minBy;
  17161. lodash.stubArray = stubArray;
  17162. lodash.stubFalse = stubFalse;
  17163. lodash.stubObject = stubObject;
  17164. lodash.stubString = stubString;
  17165. lodash.stubTrue = stubTrue;
  17166. lodash.multiply = multiply;
  17167. lodash.nth = nth;
  17168. lodash.noConflict = noConflict;
  17169. lodash.noop = noop;
  17170. lodash.now = now;
  17171. lodash.pad = pad;
  17172. lodash.padEnd = padEnd;
  17173. lodash.padStart = padStart;
  17174. lodash.parseInt = parseInt;
  17175. lodash.random = random;
  17176. lodash.reduce = reduce;
  17177. lodash.reduceRight = reduceRight;
  17178. lodash.repeat = repeat;
  17179. lodash.replace = replace;
  17180. lodash.result = result;
  17181. lodash.round = round;
  17182. lodash.runInContext = runInContext;
  17183. lodash.sample = sample;
  17184. lodash.size = size;
  17185. lodash.snakeCase = snakeCase;
  17186. lodash.some = some;
  17187. lodash.sortedIndex = sortedIndex;
  17188. lodash.sortedIndexBy = sortedIndexBy;
  17189. lodash.sortedIndexOf = sortedIndexOf;
  17190. lodash.sortedLastIndex = sortedLastIndex;
  17191. lodash.sortedLastIndexBy = sortedLastIndexBy;
  17192. lodash.sortedLastIndexOf = sortedLastIndexOf;
  17193. lodash.startCase = startCase;
  17194. lodash.startsWith = startsWith;
  17195. lodash.subtract = subtract;
  17196. lodash.sum = sum;
  17197. lodash.sumBy = sumBy;
  17198. lodash.template = template;
  17199. lodash.times = times;
  17200. lodash.toFinite = toFinite;
  17201. lodash.toInteger = toInteger;
  17202. lodash.toLength = toLength;
  17203. lodash.toLower = toLower;
  17204. lodash.toNumber = toNumber;
  17205. lodash.toSafeInteger = toSafeInteger;
  17206. lodash.toString = toString;
  17207. lodash.toUpper = toUpper;
  17208. lodash.trim = trim;
  17209. lodash.trimEnd = trimEnd;
  17210. lodash.trimStart = trimStart;
  17211. lodash.truncate = truncate;
  17212. lodash.unescape = unescape;
  17213. lodash.uniqueId = uniqueId;
  17214. lodash.upperCase = upperCase;
  17215. lodash.upperFirst = upperFirst;
  17216. // Add aliases.
  17217. lodash.each = forEach;
  17218. lodash.eachRight = forEachRight;
  17219. lodash.first = head;
  17220. mixin(lodash, (function() {
  17221. var source = {};
  17222. baseForOwn(lodash, function(func, methodName) {
  17223. if (!hasOwnProperty.call(lodash.prototype, methodName)) {
  17224. source[methodName] = func;
  17225. }
  17226. });
  17227. return source;
  17228. }()), { 'chain': false });
  17229. /*------------------------------------------------------------------------*/
  17230. /**
  17231. * The semantic version number.
  17232. *
  17233. * @static
  17234. * @memberOf _
  17235. * @type {string}
  17236. */
  17237. lodash.VERSION = VERSION;
  17238. // Assign default placeholders.
  17239. arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
  17240. lodash[methodName].placeholder = lodash;
  17241. });
  17242. // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
  17243. arrayEach(['drop', 'take'], function(methodName, index) {
  17244. LazyWrapper.prototype[methodName] = function(n) {
  17245. n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
  17246. var result = (this.__filtered__ && !index)
  17247. ? new LazyWrapper(this)
  17248. : this.clone();
  17249. if (result.__filtered__) {
  17250. result.__takeCount__ = nativeMin(n, result.__takeCount__);
  17251. } else {
  17252. result.__views__.push({
  17253. 'size': nativeMin(n, MAX_ARRAY_LENGTH),
  17254. 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')
  17255. });
  17256. }
  17257. return result;
  17258. };
  17259. LazyWrapper.prototype[methodName + 'Right'] = function(n) {
  17260. return this.reverse()[methodName](n).reverse();
  17261. };
  17262. });
  17263. // Add `LazyWrapper` methods that accept an `iteratee` value.
  17264. arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
  17265. var type = index + 1,
  17266. isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
  17267. LazyWrapper.prototype[methodName] = function(iteratee) {
  17268. var result = this.clone();
  17269. result.__iteratees__.push({
  17270. 'iteratee': getIteratee(iteratee, 3),
  17271. 'type': type
  17272. });
  17273. result.__filtered__ = result.__filtered__ || isFilter;
  17274. return result;
  17275. };
  17276. });
  17277. // Add `LazyWrapper` methods for `_.head` and `_.last`.
  17278. arrayEach(['head', 'last'], function(methodName, index) {
  17279. var takeName = 'take' + (index ? 'Right' : '');
  17280. LazyWrapper.prototype[methodName] = function() {
  17281. return this[takeName](1).value()[0];
  17282. };
  17283. });
  17284. // Add `LazyWrapper` methods for `_.initial` and `_.tail`.
  17285. arrayEach(['initial', 'tail'], function(methodName, index) {
  17286. var dropName = 'drop' + (index ? '' : 'Right');
  17287. LazyWrapper.prototype[methodName] = function() {
  17288. return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
  17289. };
  17290. });
  17291. LazyWrapper.prototype.compact = function() {
  17292. return this.filter(identity);
  17293. };
  17294. LazyWrapper.prototype.find = function(predicate) {
  17295. return this.filter(predicate).head();
  17296. };
  17297. LazyWrapper.prototype.findLast = function(predicate) {
  17298. return this.reverse().find(predicate);
  17299. };
  17300. LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
  17301. if (typeof path == 'function') {
  17302. return new LazyWrapper(this);
  17303. }
  17304. return this.map(function(value) {
  17305. return baseInvoke(value, path, args);
  17306. });
  17307. });
  17308. LazyWrapper.prototype.reject = function(predicate) {
  17309. return this.filter(negate(getIteratee(predicate)));
  17310. };
  17311. LazyWrapper.prototype.slice = function(start, end) {
  17312. start = toInteger(start);
  17313. var result = this;
  17314. if (result.__filtered__ && (start > 0 || end < 0)) {
  17315. return new LazyWrapper(result);
  17316. }
  17317. if (start < 0) {
  17318. result = result.takeRight(-start);
  17319. } else if (start) {
  17320. result = result.drop(start);
  17321. }
  17322. if (end !== undefined) {
  17323. end = toInteger(end);
  17324. result = end < 0 ? result.dropRight(-end) : result.take(end - start);
  17325. }
  17326. return result;
  17327. };
  17328. LazyWrapper.prototype.takeRightWhile = function(predicate) {
  17329. return this.reverse().takeWhile(predicate).reverse();
  17330. };
  17331. LazyWrapper.prototype.toArray = function() {
  17332. return this.take(MAX_ARRAY_LENGTH);
  17333. };
  17334. // Add `LazyWrapper` methods to `lodash.prototype`.
  17335. baseForOwn(LazyWrapper.prototype, function(func, methodName) {
  17336. var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),
  17337. isTaker = /^(?:head|last)$/.test(methodName),
  17338. lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],
  17339. retUnwrapped = isTaker || /^find/.test(methodName);
  17340. if (!lodashFunc) {
  17341. return;
  17342. }
  17343. lodash.prototype[methodName] = function() {
  17344. var value = this.__wrapped__,
  17345. args = isTaker ? [1] : arguments,
  17346. isLazy = value instanceof LazyWrapper,
  17347. iteratee = args[0],
  17348. useLazy = isLazy || isArray(value);
  17349. var interceptor = function(value) {
  17350. var result = lodashFunc.apply(lodash, arrayPush([value], args));
  17351. return (isTaker && chainAll) ? result[0] : result;
  17352. };
  17353. if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
  17354. // Avoid lazy use if the iteratee has a "length" value other than `1`.
  17355. isLazy = useLazy = false;
  17356. }
  17357. var chainAll = this.__chain__,
  17358. isHybrid = !!this.__actions__.length,
  17359. isUnwrapped = retUnwrapped && !chainAll,
  17360. onlyLazy = isLazy && !isHybrid;
  17361. if (!retUnwrapped && useLazy) {
  17362. value = onlyLazy ? value : new LazyWrapper(this);
  17363. var result = func.apply(value, args);
  17364. result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
  17365. return new LodashWrapper(result, chainAll);
  17366. }
  17367. if (isUnwrapped && onlyLazy) {
  17368. return func.apply(this, args);
  17369. }
  17370. result = this.thru(interceptor);
  17371. return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;
  17372. };
  17373. });
  17374. // Add `Array` methods to `lodash.prototype`.
  17375. arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
  17376. var func = arrayProto[methodName],
  17377. chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
  17378. retUnwrapped = /^(?:pop|shift)$/.test(methodName);
  17379. lodash.prototype[methodName] = function() {
  17380. var args = arguments;
  17381. if (retUnwrapped && !this.__chain__) {
  17382. var value = this.value();
  17383. return func.apply(isArray(value) ? value : [], args);
  17384. }
  17385. return this[chainName](function(value) {
  17386. return func.apply(isArray(value) ? value : [], args);
  17387. });
  17388. };
  17389. });
  17390. // Map minified method names to their real names.
  17391. baseForOwn(LazyWrapper.prototype, function(func, methodName) {
  17392. var lodashFunc = lodash[methodName];
  17393. if (lodashFunc) {
  17394. var key = lodashFunc.name + '';
  17395. if (!hasOwnProperty.call(realNames, key)) {
  17396. realNames[key] = [];
  17397. }
  17398. realNames[key].push({ 'name': methodName, 'func': lodashFunc });
  17399. }
  17400. });
  17401. realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{
  17402. 'name': 'wrapper',
  17403. 'func': undefined
  17404. }];
  17405. // Add methods to `LazyWrapper`.
  17406. LazyWrapper.prototype.clone = lazyClone;
  17407. LazyWrapper.prototype.reverse = lazyReverse;
  17408. LazyWrapper.prototype.value = lazyValue;
  17409. // Add chain sequence methods to the `lodash` wrapper.
  17410. lodash.prototype.at = wrapperAt;
  17411. lodash.prototype.chain = wrapperChain;
  17412. lodash.prototype.commit = wrapperCommit;
  17413. lodash.prototype.next = wrapperNext;
  17414. lodash.prototype.plant = wrapperPlant;
  17415. lodash.prototype.reverse = wrapperReverse;
  17416. lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
  17417. // Add lazy aliases.
  17418. lodash.prototype.first = lodash.prototype.head;
  17419. if (symIterator) {
  17420. lodash.prototype[symIterator] = wrapperToIterator;
  17421. }
  17422. return lodash;
  17423. });
  17424. /*--------------------------------------------------------------------------*/
  17425. // Export lodash.
  17426. var _ = runInContext();
  17427. // Some AMD build optimizers, like r.js, check for condition patterns like:
  17428. if (true) {
  17429. // Expose Lodash on the global object to prevent errors when Lodash is
  17430. // loaded by a script tag in the presence of an AMD loader.
  17431. // See http://requirejs.org/docs/errors.html#mismatch for more details.
  17432. // Use `_.noConflict` to remove Lodash from the global object.
  17433. root._ = _;
  17434. // Define as an anonymous module so, through path mapping, it can be
  17435. // referenced as the "underscore" module.
  17436. !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {
  17437. return _;
  17438. }).call(exports, __webpack_require__, exports, module),
  17439. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  17440. }
  17441. // Check for `exports` after `define` in case a build optimizer adds it.
  17442. else {}
  17443. }.call(this));
  17444. /***/ }),
  17445. /***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppFooter.vue?vue&type=style&index=0&id=4ab6097e&lang=scss&scoped=true":
  17446. /*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  17447. !*** ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppFooter.vue?vue&type=style&index=0&id=4ab6097e&lang=scss&scoped=true ***!
  17448. \***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  17449. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17450. "use strict";
  17451. __webpack_require__.r(__webpack_exports__);
  17452. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17453. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17454. /* harmony export */ });
  17455. /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
  17456. /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
  17457. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppFooter_vue_vue_type_style_index_0_id_4ab6097e_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!../../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppFooter.vue?vue&type=style&index=0&id=4ab6097e&lang=scss&scoped=true */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppFooter.vue?vue&type=style&index=0&id=4ab6097e&lang=scss&scoped=true");
  17458. var options = {};
  17459. options.insert = "head";
  17460. options.singleton = false;
  17461. var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppFooter_vue_vue_type_style_index_0_id_4ab6097e_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_1__["default"], options);
  17462. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppFooter_vue_vue_type_style_index_0_id_4ab6097e_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {});
  17463. /***/ }),
  17464. /***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSidebar.vue?vue&type=style&index=0&id=22a4e926&lang=scss&scoped=true":
  17465. /*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  17466. !*** ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSidebar.vue?vue&type=style&index=0&id=22a4e926&lang=scss&scoped=true ***!
  17467. \****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  17468. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17469. "use strict";
  17470. __webpack_require__.r(__webpack_exports__);
  17471. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17472. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17473. /* harmony export */ });
  17474. /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
  17475. /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
  17476. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppSidebar_vue_vue_type_style_index_0_id_22a4e926_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!../../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppSidebar.vue?vue&type=style&index=0&id=22a4e926&lang=scss&scoped=true */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSidebar.vue?vue&type=style&index=0&id=22a4e926&lang=scss&scoped=true");
  17477. var options = {};
  17478. options.insert = "head";
  17479. options.singleton = false;
  17480. var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppSidebar_vue_vue_type_style_index_0_id_22a4e926_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_1__["default"], options);
  17481. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppSidebar_vue_vue_type_style_index_0_id_22a4e926_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {});
  17482. /***/ }),
  17483. /***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSubSidebar.vue?vue&type=style&index=0&id=0addd9bc&lang=scss&scoped=true":
  17484. /*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  17485. !*** ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSubSidebar.vue?vue&type=style&index=0&id=0addd9bc&lang=scss&scoped=true ***!
  17486. \*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  17487. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17488. "use strict";
  17489. __webpack_require__.r(__webpack_exports__);
  17490. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17491. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17492. /* harmony export */ });
  17493. /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
  17494. /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
  17495. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppSubSidebar_vue_vue_type_style_index_0_id_0addd9bc_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!../../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppSubSidebar.vue?vue&type=style&index=0&id=0addd9bc&lang=scss&scoped=true */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSubSidebar.vue?vue&type=style&index=0&id=0addd9bc&lang=scss&scoped=true");
  17496. var options = {};
  17497. options.insert = "head";
  17498. options.singleton = false;
  17499. var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppSubSidebar_vue_vue_type_style_index_0_id_0addd9bc_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_1__["default"], options);
  17500. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppSubSidebar_vue_vue_type_style_index_0_id_0addd9bc_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {});
  17501. /***/ }),
  17502. /***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppTopBar.vue?vue&type=style&index=0&id=42bf62a4&lang=scss&scoped=true":
  17503. /*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  17504. !*** ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppTopBar.vue?vue&type=style&index=0&id=42bf62a4&lang=scss&scoped=true ***!
  17505. \***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  17506. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17507. "use strict";
  17508. __webpack_require__.r(__webpack_exports__);
  17509. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17510. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17511. /* harmony export */ });
  17512. /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
  17513. /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
  17514. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppTopBar_vue_vue_type_style_index_0_id_42bf62a4_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!../../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppTopBar.vue?vue&type=style&index=0&id=42bf62a4&lang=scss&scoped=true */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppTopBar.vue?vue&type=style&index=0&id=42bf62a4&lang=scss&scoped=true");
  17515. var options = {};
  17516. options.insert = "head";
  17517. options.singleton = false;
  17518. var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppTopBar_vue_vue_type_style_index_0_id_42bf62a4_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_1__["default"], options);
  17519. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppTopBar_vue_vue_type_style_index_0_id_42bf62a4_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {});
  17520. /***/ }),
  17521. /***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/layouts/DashboardLayout.vue?vue&type=style&index=0&id=549bf5ac&lang=scss&scoped=true":
  17522. /*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  17523. !*** ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/layouts/DashboardLayout.vue?vue&type=style&index=0&id=549bf5ac&lang=scss&scoped=true ***!
  17524. \******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  17525. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17526. "use strict";
  17527. __webpack_require__.r(__webpack_exports__);
  17528. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17529. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17530. /* harmony export */ });
  17531. /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
  17532. /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
  17533. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_DashboardLayout_vue_vue_type_style_index_0_id_549bf5ac_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!../../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./DashboardLayout.vue?vue&type=style&index=0&id=549bf5ac&lang=scss&scoped=true */ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/layouts/DashboardLayout.vue?vue&type=style&index=0&id=549bf5ac&lang=scss&scoped=true");
  17534. var options = {};
  17535. options.insert = "head";
  17536. options.singleton = false;
  17537. var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_DashboardLayout_vue_vue_type_style_index_0_id_549bf5ac_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_1__["default"], options);
  17538. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_DashboardLayout_vue_vue_type_style_index_0_id_549bf5ac_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {});
  17539. /***/ }),
  17540. /***/ "./node_modules/vue-loader/dist/exportHelper.js":
  17541. /*!******************************************************!*\
  17542. !*** ./node_modules/vue-loader/dist/exportHelper.js ***!
  17543. \******************************************************/
  17544. /***/ ((__unused_webpack_module, exports) => {
  17545. "use strict";
  17546. Object.defineProperty(exports, "__esModule", ({ value: true }));
  17547. // runtime helper for setting properties on components
  17548. // in a tree-shakable way
  17549. exports["default"] = (sfc, props) => {
  17550. const target = sfc.__vccOpts || sfc;
  17551. for (const [key, val] of props) {
  17552. target[key] = val;
  17553. }
  17554. return target;
  17555. };
  17556. /***/ }),
  17557. /***/ "./resources/js/components/AppButtonLink.vue":
  17558. /*!***************************************************!*\
  17559. !*** ./resources/js/components/AppButtonLink.vue ***!
  17560. \***************************************************/
  17561. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17562. "use strict";
  17563. __webpack_require__.r(__webpack_exports__);
  17564. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17565. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17566. /* harmony export */ });
  17567. /* harmony import */ var _AppButtonLink_vue_vue_type_template_id_c3621f1c__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AppButtonLink.vue?vue&type=template&id=c3621f1c */ "./resources/js/components/AppButtonLink.vue?vue&type=template&id=c3621f1c");
  17568. /* harmony import */ var _AppButtonLink_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AppButtonLink.vue?vue&type=script&setup=true&lang=js */ "./resources/js/components/AppButtonLink.vue?vue&type=script&setup=true&lang=js");
  17569. /* harmony import */ var _media_dijitalcode_3ad9c6e0_4296_4a57_b136_144df49e7bb8_Projects_parkirin_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
  17570. ;
  17571. const __exports__ = /*#__PURE__*/(0,_media_dijitalcode_3ad9c6e0_4296_4a57_b136_144df49e7bb8_Projects_parkirin_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_AppButtonLink_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_AppButtonLink_vue_vue_type_template_id_c3621f1c__WEBPACK_IMPORTED_MODULE_0__.render],['__file',"resources/js/components/AppButtonLink.vue"]])
  17572. /* hot reload */
  17573. if (false) {}
  17574. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17575. /***/ }),
  17576. /***/ "./resources/js/components/AppFooter.vue":
  17577. /*!***********************************************!*\
  17578. !*** ./resources/js/components/AppFooter.vue ***!
  17579. \***********************************************/
  17580. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17581. "use strict";
  17582. __webpack_require__.r(__webpack_exports__);
  17583. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17584. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17585. /* harmony export */ });
  17586. /* harmony import */ var _AppFooter_vue_vue_type_template_id_4ab6097e_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AppFooter.vue?vue&type=template&id=4ab6097e&scoped=true */ "./resources/js/components/AppFooter.vue?vue&type=template&id=4ab6097e&scoped=true");
  17587. /* harmony import */ var _AppFooter_vue_vue_type_style_index_0_id_4ab6097e_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AppFooter.vue?vue&type=style&index=0&id=4ab6097e&lang=scss&scoped=true */ "./resources/js/components/AppFooter.vue?vue&type=style&index=0&id=4ab6097e&lang=scss&scoped=true");
  17588. /* harmony import */ var _media_dijitalcode_3ad9c6e0_4296_4a57_b136_144df49e7bb8_Projects_parkirin_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
  17589. const script = {}
  17590. ;
  17591. const __exports__ = /*#__PURE__*/(0,_media_dijitalcode_3ad9c6e0_4296_4a57_b136_144df49e7bb8_Projects_parkirin_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__["default"])(script, [['render',_AppFooter_vue_vue_type_template_id_4ab6097e_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render],['__scopeId',"data-v-4ab6097e"],['__file',"resources/js/components/AppFooter.vue"]])
  17592. /* hot reload */
  17593. if (false) {}
  17594. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17595. /***/ }),
  17596. /***/ "./resources/js/components/AppMessage.vue":
  17597. /*!************************************************!*\
  17598. !*** ./resources/js/components/AppMessage.vue ***!
  17599. \************************************************/
  17600. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17601. "use strict";
  17602. __webpack_require__.r(__webpack_exports__);
  17603. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17604. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17605. /* harmony export */ });
  17606. /* harmony import */ var _AppMessage_vue_vue_type_template_id_07159051__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AppMessage.vue?vue&type=template&id=07159051 */ "./resources/js/components/AppMessage.vue?vue&type=template&id=07159051");
  17607. /* harmony import */ var _AppMessage_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AppMessage.vue?vue&type=script&setup=true&lang=js */ "./resources/js/components/AppMessage.vue?vue&type=script&setup=true&lang=js");
  17608. /* harmony import */ var _media_dijitalcode_3ad9c6e0_4296_4a57_b136_144df49e7bb8_Projects_parkirin_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
  17609. ;
  17610. const __exports__ = /*#__PURE__*/(0,_media_dijitalcode_3ad9c6e0_4296_4a57_b136_144df49e7bb8_Projects_parkirin_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_AppMessage_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_AppMessage_vue_vue_type_template_id_07159051__WEBPACK_IMPORTED_MODULE_0__.render],['__file',"resources/js/components/AppMessage.vue"]])
  17611. /* hot reload */
  17612. if (false) {}
  17613. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17614. /***/ }),
  17615. /***/ "./resources/js/components/AppPagination.vue":
  17616. /*!***************************************************!*\
  17617. !*** ./resources/js/components/AppPagination.vue ***!
  17618. \***************************************************/
  17619. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17620. "use strict";
  17621. __webpack_require__.r(__webpack_exports__);
  17622. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17623. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17624. /* harmony export */ });
  17625. /* harmony import */ var _AppPagination_vue_vue_type_template_id_4da56ec0__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AppPagination.vue?vue&type=template&id=4da56ec0 */ "./resources/js/components/AppPagination.vue?vue&type=template&id=4da56ec0");
  17626. /* harmony import */ var _AppPagination_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AppPagination.vue?vue&type=script&setup=true&lang=js */ "./resources/js/components/AppPagination.vue?vue&type=script&setup=true&lang=js");
  17627. /* harmony import */ var _media_dijitalcode_3ad9c6e0_4296_4a57_b136_144df49e7bb8_Projects_parkirin_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
  17628. ;
  17629. const __exports__ = /*#__PURE__*/(0,_media_dijitalcode_3ad9c6e0_4296_4a57_b136_144df49e7bb8_Projects_parkirin_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_AppPagination_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_AppPagination_vue_vue_type_template_id_4da56ec0__WEBPACK_IMPORTED_MODULE_0__.render],['__file',"resources/js/components/AppPagination.vue"]])
  17630. /* hot reload */
  17631. if (false) {}
  17632. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17633. /***/ }),
  17634. /***/ "./resources/js/components/AppSidebar.vue":
  17635. /*!************************************************!*\
  17636. !*** ./resources/js/components/AppSidebar.vue ***!
  17637. \************************************************/
  17638. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17639. "use strict";
  17640. __webpack_require__.r(__webpack_exports__);
  17641. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17642. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17643. /* harmony export */ });
  17644. /* harmony import */ var _AppSidebar_vue_vue_type_template_id_22a4e926_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AppSidebar.vue?vue&type=template&id=22a4e926&scoped=true */ "./resources/js/components/AppSidebar.vue?vue&type=template&id=22a4e926&scoped=true");
  17645. /* harmony import */ var _AppSidebar_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AppSidebar.vue?vue&type=script&setup=true&lang=js */ "./resources/js/components/AppSidebar.vue?vue&type=script&setup=true&lang=js");
  17646. /* harmony import */ var _AppSidebar_vue_vue_type_style_index_0_id_22a4e926_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AppSidebar.vue?vue&type=style&index=0&id=22a4e926&lang=scss&scoped=true */ "./resources/js/components/AppSidebar.vue?vue&type=style&index=0&id=22a4e926&lang=scss&scoped=true");
  17647. /* harmony import */ var _media_dijitalcode_3ad9c6e0_4296_4a57_b136_144df49e7bb8_Projects_parkirin_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
  17648. ;
  17649. const __exports__ = /*#__PURE__*/(0,_media_dijitalcode_3ad9c6e0_4296_4a57_b136_144df49e7bb8_Projects_parkirin_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__["default"])(_AppSidebar_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_AppSidebar_vue_vue_type_template_id_22a4e926_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render],['__scopeId',"data-v-22a4e926"],['__file',"resources/js/components/AppSidebar.vue"]])
  17650. /* hot reload */
  17651. if (false) {}
  17652. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17653. /***/ }),
  17654. /***/ "./resources/js/components/AppSubSidebar.vue":
  17655. /*!***************************************************!*\
  17656. !*** ./resources/js/components/AppSubSidebar.vue ***!
  17657. \***************************************************/
  17658. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17659. "use strict";
  17660. __webpack_require__.r(__webpack_exports__);
  17661. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17662. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17663. /* harmony export */ });
  17664. /* harmony import */ var _AppSubSidebar_vue_vue_type_template_id_0addd9bc_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AppSubSidebar.vue?vue&type=template&id=0addd9bc&scoped=true */ "./resources/js/components/AppSubSidebar.vue?vue&type=template&id=0addd9bc&scoped=true");
  17665. /* harmony import */ var _AppSubSidebar_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AppSubSidebar.vue?vue&type=script&setup=true&lang=js */ "./resources/js/components/AppSubSidebar.vue?vue&type=script&setup=true&lang=js");
  17666. /* harmony import */ var _AppSubSidebar_vue_vue_type_style_index_0_id_0addd9bc_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AppSubSidebar.vue?vue&type=style&index=0&id=0addd9bc&lang=scss&scoped=true */ "./resources/js/components/AppSubSidebar.vue?vue&type=style&index=0&id=0addd9bc&lang=scss&scoped=true");
  17667. /* harmony import */ var _media_dijitalcode_3ad9c6e0_4296_4a57_b136_144df49e7bb8_Projects_parkirin_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
  17668. ;
  17669. const __exports__ = /*#__PURE__*/(0,_media_dijitalcode_3ad9c6e0_4296_4a57_b136_144df49e7bb8_Projects_parkirin_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__["default"])(_AppSubSidebar_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_AppSubSidebar_vue_vue_type_template_id_0addd9bc_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render],['__scopeId',"data-v-0addd9bc"],['__file',"resources/js/components/AppSubSidebar.vue"]])
  17670. /* hot reload */
  17671. if (false) {}
  17672. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17673. /***/ }),
  17674. /***/ "./resources/js/components/AppTopBar.vue":
  17675. /*!***********************************************!*\
  17676. !*** ./resources/js/components/AppTopBar.vue ***!
  17677. \***********************************************/
  17678. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17679. "use strict";
  17680. __webpack_require__.r(__webpack_exports__);
  17681. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17682. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17683. /* harmony export */ });
  17684. /* harmony import */ var _AppTopBar_vue_vue_type_template_id_42bf62a4_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AppTopBar.vue?vue&type=template&id=42bf62a4&scoped=true */ "./resources/js/components/AppTopBar.vue?vue&type=template&id=42bf62a4&scoped=true");
  17685. /* harmony import */ var _AppTopBar_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AppTopBar.vue?vue&type=script&setup=true&lang=js */ "./resources/js/components/AppTopBar.vue?vue&type=script&setup=true&lang=js");
  17686. /* harmony import */ var _AppTopBar_vue_vue_type_style_index_0_id_42bf62a4_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AppTopBar.vue?vue&type=style&index=0&id=42bf62a4&lang=scss&scoped=true */ "./resources/js/components/AppTopBar.vue?vue&type=style&index=0&id=42bf62a4&lang=scss&scoped=true");
  17687. /* harmony import */ var _media_dijitalcode_3ad9c6e0_4296_4a57_b136_144df49e7bb8_Projects_parkirin_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
  17688. ;
  17689. const __exports__ = /*#__PURE__*/(0,_media_dijitalcode_3ad9c6e0_4296_4a57_b136_144df49e7bb8_Projects_parkirin_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__["default"])(_AppTopBar_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_AppTopBar_vue_vue_type_template_id_42bf62a4_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render],['__scopeId',"data-v-42bf62a4"],['__file',"resources/js/components/AppTopBar.vue"]])
  17690. /* hot reload */
  17691. if (false) {}
  17692. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17693. /***/ }),
  17694. /***/ "./resources/js/layouts/DashboardLayout.vue":
  17695. /*!**************************************************!*\
  17696. !*** ./resources/js/layouts/DashboardLayout.vue ***!
  17697. \**************************************************/
  17698. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17699. "use strict";
  17700. __webpack_require__.r(__webpack_exports__);
  17701. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17702. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17703. /* harmony export */ });
  17704. /* harmony import */ var _DashboardLayout_vue_vue_type_template_id_549bf5ac_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DashboardLayout.vue?vue&type=template&id=549bf5ac&scoped=true */ "./resources/js/layouts/DashboardLayout.vue?vue&type=template&id=549bf5ac&scoped=true");
  17705. /* harmony import */ var _DashboardLayout_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./DashboardLayout.vue?vue&type=script&setup=true&lang=js */ "./resources/js/layouts/DashboardLayout.vue?vue&type=script&setup=true&lang=js");
  17706. /* harmony import */ var _DashboardLayout_vue_vue_type_style_index_0_id_549bf5ac_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./DashboardLayout.vue?vue&type=style&index=0&id=549bf5ac&lang=scss&scoped=true */ "./resources/js/layouts/DashboardLayout.vue?vue&type=style&index=0&id=549bf5ac&lang=scss&scoped=true");
  17707. /* harmony import */ var _media_dijitalcode_3ad9c6e0_4296_4a57_b136_144df49e7bb8_Projects_parkirin_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
  17708. ;
  17709. const __exports__ = /*#__PURE__*/(0,_media_dijitalcode_3ad9c6e0_4296_4a57_b136_144df49e7bb8_Projects_parkirin_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__["default"])(_DashboardLayout_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_DashboardLayout_vue_vue_type_template_id_549bf5ac_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render],['__scopeId',"data-v-549bf5ac"],['__file',"resources/js/layouts/DashboardLayout.vue"]])
  17710. /* hot reload */
  17711. if (false) {}
  17712. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17713. /***/ }),
  17714. /***/ "./resources/js/pages/mutation/Report.vue":
  17715. /*!************************************************!*\
  17716. !*** ./resources/js/pages/mutation/Report.vue ***!
  17717. \************************************************/
  17718. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17719. "use strict";
  17720. __webpack_require__.r(__webpack_exports__);
  17721. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17722. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17723. /* harmony export */ });
  17724. /* harmony import */ var _Report_vue_vue_type_template_id_289c9421__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Report.vue?vue&type=template&id=289c9421 */ "./resources/js/pages/mutation/Report.vue?vue&type=template&id=289c9421");
  17725. /* harmony import */ var _Report_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Report.vue?vue&type=script&setup=true&lang=js */ "./resources/js/pages/mutation/Report.vue?vue&type=script&setup=true&lang=js");
  17726. /* harmony import */ var _media_dijitalcode_3ad9c6e0_4296_4a57_b136_144df49e7bb8_Projects_parkirin_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js");
  17727. ;
  17728. const __exports__ = /*#__PURE__*/(0,_media_dijitalcode_3ad9c6e0_4296_4a57_b136_144df49e7bb8_Projects_parkirin_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_Report_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_Report_vue_vue_type_template_id_289c9421__WEBPACK_IMPORTED_MODULE_0__.render],['__file',"resources/js/pages/mutation/Report.vue"]])
  17729. /* hot reload */
  17730. if (false) {}
  17731. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17732. /***/ }),
  17733. /***/ "./resources/js/components/AppButtonLink.vue?vue&type=script&setup=true&lang=js":
  17734. /*!**************************************************************************************!*\
  17735. !*** ./resources/js/components/AppButtonLink.vue?vue&type=script&setup=true&lang=js ***!
  17736. \**************************************************************************************/
  17737. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17738. "use strict";
  17739. __webpack_require__.r(__webpack_exports__);
  17740. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17741. /* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppButtonLink_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
  17742. /* harmony export */ });
  17743. /* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppButtonLink_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppButtonLink.vue?vue&type=script&setup=true&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppButtonLink.vue?vue&type=script&setup=true&lang=js");
  17744. /***/ }),
  17745. /***/ "./resources/js/components/AppMessage.vue?vue&type=script&setup=true&lang=js":
  17746. /*!***********************************************************************************!*\
  17747. !*** ./resources/js/components/AppMessage.vue?vue&type=script&setup=true&lang=js ***!
  17748. \***********************************************************************************/
  17749. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17750. "use strict";
  17751. __webpack_require__.r(__webpack_exports__);
  17752. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17753. /* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppMessage_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
  17754. /* harmony export */ });
  17755. /* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppMessage_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppMessage.vue?vue&type=script&setup=true&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppMessage.vue?vue&type=script&setup=true&lang=js");
  17756. /***/ }),
  17757. /***/ "./resources/js/components/AppPagination.vue?vue&type=script&setup=true&lang=js":
  17758. /*!**************************************************************************************!*\
  17759. !*** ./resources/js/components/AppPagination.vue?vue&type=script&setup=true&lang=js ***!
  17760. \**************************************************************************************/
  17761. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17762. "use strict";
  17763. __webpack_require__.r(__webpack_exports__);
  17764. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17765. /* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppPagination_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
  17766. /* harmony export */ });
  17767. /* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppPagination_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppPagination.vue?vue&type=script&setup=true&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppPagination.vue?vue&type=script&setup=true&lang=js");
  17768. /***/ }),
  17769. /***/ "./resources/js/components/AppSidebar.vue?vue&type=script&setup=true&lang=js":
  17770. /*!***********************************************************************************!*\
  17771. !*** ./resources/js/components/AppSidebar.vue?vue&type=script&setup=true&lang=js ***!
  17772. \***********************************************************************************/
  17773. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17774. "use strict";
  17775. __webpack_require__.r(__webpack_exports__);
  17776. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17777. /* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppSidebar_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
  17778. /* harmony export */ });
  17779. /* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppSidebar_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppSidebar.vue?vue&type=script&setup=true&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSidebar.vue?vue&type=script&setup=true&lang=js");
  17780. /***/ }),
  17781. /***/ "./resources/js/components/AppSubSidebar.vue?vue&type=script&setup=true&lang=js":
  17782. /*!**************************************************************************************!*\
  17783. !*** ./resources/js/components/AppSubSidebar.vue?vue&type=script&setup=true&lang=js ***!
  17784. \**************************************************************************************/
  17785. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17786. "use strict";
  17787. __webpack_require__.r(__webpack_exports__);
  17788. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17789. /* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppSubSidebar_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
  17790. /* harmony export */ });
  17791. /* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppSubSidebar_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppSubSidebar.vue?vue&type=script&setup=true&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSubSidebar.vue?vue&type=script&setup=true&lang=js");
  17792. /***/ }),
  17793. /***/ "./resources/js/components/AppTopBar.vue?vue&type=script&setup=true&lang=js":
  17794. /*!**********************************************************************************!*\
  17795. !*** ./resources/js/components/AppTopBar.vue?vue&type=script&setup=true&lang=js ***!
  17796. \**********************************************************************************/
  17797. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17798. "use strict";
  17799. __webpack_require__.r(__webpack_exports__);
  17800. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17801. /* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppTopBar_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
  17802. /* harmony export */ });
  17803. /* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppTopBar_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppTopBar.vue?vue&type=script&setup=true&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppTopBar.vue?vue&type=script&setup=true&lang=js");
  17804. /***/ }),
  17805. /***/ "./resources/js/layouts/DashboardLayout.vue?vue&type=script&setup=true&lang=js":
  17806. /*!*************************************************************************************!*\
  17807. !*** ./resources/js/layouts/DashboardLayout.vue?vue&type=script&setup=true&lang=js ***!
  17808. \*************************************************************************************/
  17809. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17810. "use strict";
  17811. __webpack_require__.r(__webpack_exports__);
  17812. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17813. /* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_DashboardLayout_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
  17814. /* harmony export */ });
  17815. /* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_DashboardLayout_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./DashboardLayout.vue?vue&type=script&setup=true&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/layouts/DashboardLayout.vue?vue&type=script&setup=true&lang=js");
  17816. /***/ }),
  17817. /***/ "./resources/js/pages/mutation/Report.vue?vue&type=script&setup=true&lang=js":
  17818. /*!***********************************************************************************!*\
  17819. !*** ./resources/js/pages/mutation/Report.vue?vue&type=script&setup=true&lang=js ***!
  17820. \***********************************************************************************/
  17821. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17822. "use strict";
  17823. __webpack_require__.r(__webpack_exports__);
  17824. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17825. /* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_Report_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
  17826. /* harmony export */ });
  17827. /* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_Report_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./Report.vue?vue&type=script&setup=true&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/pages/mutation/Report.vue?vue&type=script&setup=true&lang=js");
  17828. /***/ }),
  17829. /***/ "./resources/js/components/AppButtonLink.vue?vue&type=template&id=c3621f1c":
  17830. /*!*********************************************************************************!*\
  17831. !*** ./resources/js/components/AppButtonLink.vue?vue&type=template&id=c3621f1c ***!
  17832. \*********************************************************************************/
  17833. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17834. "use strict";
  17835. __webpack_require__.r(__webpack_exports__);
  17836. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17837. /* harmony export */ "render": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppButtonLink_vue_vue_type_template_id_c3621f1c__WEBPACK_IMPORTED_MODULE_0__.render)
  17838. /* harmony export */ });
  17839. /* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppButtonLink_vue_vue_type_template_id_c3621f1c__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppButtonLink.vue?vue&type=template&id=c3621f1c */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppButtonLink.vue?vue&type=template&id=c3621f1c");
  17840. /***/ }),
  17841. /***/ "./resources/js/components/AppFooter.vue?vue&type=template&id=4ab6097e&scoped=true":
  17842. /*!*****************************************************************************************!*\
  17843. !*** ./resources/js/components/AppFooter.vue?vue&type=template&id=4ab6097e&scoped=true ***!
  17844. \*****************************************************************************************/
  17845. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17846. "use strict";
  17847. __webpack_require__.r(__webpack_exports__);
  17848. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17849. /* harmony export */ "render": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppFooter_vue_vue_type_template_id_4ab6097e_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render)
  17850. /* harmony export */ });
  17851. /* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppFooter_vue_vue_type_template_id_4ab6097e_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppFooter.vue?vue&type=template&id=4ab6097e&scoped=true */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppFooter.vue?vue&type=template&id=4ab6097e&scoped=true");
  17852. /***/ }),
  17853. /***/ "./resources/js/components/AppMessage.vue?vue&type=template&id=07159051":
  17854. /*!******************************************************************************!*\
  17855. !*** ./resources/js/components/AppMessage.vue?vue&type=template&id=07159051 ***!
  17856. \******************************************************************************/
  17857. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17858. "use strict";
  17859. __webpack_require__.r(__webpack_exports__);
  17860. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17861. /* harmony export */ "render": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppMessage_vue_vue_type_template_id_07159051__WEBPACK_IMPORTED_MODULE_0__.render)
  17862. /* harmony export */ });
  17863. /* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppMessage_vue_vue_type_template_id_07159051__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppMessage.vue?vue&type=template&id=07159051 */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppMessage.vue?vue&type=template&id=07159051");
  17864. /***/ }),
  17865. /***/ "./resources/js/components/AppPagination.vue?vue&type=template&id=4da56ec0":
  17866. /*!*********************************************************************************!*\
  17867. !*** ./resources/js/components/AppPagination.vue?vue&type=template&id=4da56ec0 ***!
  17868. \*********************************************************************************/
  17869. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17870. "use strict";
  17871. __webpack_require__.r(__webpack_exports__);
  17872. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17873. /* harmony export */ "render": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppPagination_vue_vue_type_template_id_4da56ec0__WEBPACK_IMPORTED_MODULE_0__.render)
  17874. /* harmony export */ });
  17875. /* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppPagination_vue_vue_type_template_id_4da56ec0__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppPagination.vue?vue&type=template&id=4da56ec0 */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppPagination.vue?vue&type=template&id=4da56ec0");
  17876. /***/ }),
  17877. /***/ "./resources/js/components/AppSidebar.vue?vue&type=template&id=22a4e926&scoped=true":
  17878. /*!******************************************************************************************!*\
  17879. !*** ./resources/js/components/AppSidebar.vue?vue&type=template&id=22a4e926&scoped=true ***!
  17880. \******************************************************************************************/
  17881. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17882. "use strict";
  17883. __webpack_require__.r(__webpack_exports__);
  17884. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17885. /* harmony export */ "render": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppSidebar_vue_vue_type_template_id_22a4e926_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render)
  17886. /* harmony export */ });
  17887. /* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppSidebar_vue_vue_type_template_id_22a4e926_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppSidebar.vue?vue&type=template&id=22a4e926&scoped=true */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSidebar.vue?vue&type=template&id=22a4e926&scoped=true");
  17888. /***/ }),
  17889. /***/ "./resources/js/components/AppSubSidebar.vue?vue&type=template&id=0addd9bc&scoped=true":
  17890. /*!*********************************************************************************************!*\
  17891. !*** ./resources/js/components/AppSubSidebar.vue?vue&type=template&id=0addd9bc&scoped=true ***!
  17892. \*********************************************************************************************/
  17893. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17894. "use strict";
  17895. __webpack_require__.r(__webpack_exports__);
  17896. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17897. /* harmony export */ "render": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppSubSidebar_vue_vue_type_template_id_0addd9bc_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render)
  17898. /* harmony export */ });
  17899. /* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppSubSidebar_vue_vue_type_template_id_0addd9bc_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppSubSidebar.vue?vue&type=template&id=0addd9bc&scoped=true */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSubSidebar.vue?vue&type=template&id=0addd9bc&scoped=true");
  17900. /***/ }),
  17901. /***/ "./resources/js/components/AppTopBar.vue?vue&type=template&id=42bf62a4&scoped=true":
  17902. /*!*****************************************************************************************!*\
  17903. !*** ./resources/js/components/AppTopBar.vue?vue&type=template&id=42bf62a4&scoped=true ***!
  17904. \*****************************************************************************************/
  17905. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17906. "use strict";
  17907. __webpack_require__.r(__webpack_exports__);
  17908. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17909. /* harmony export */ "render": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppTopBar_vue_vue_type_template_id_42bf62a4_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render)
  17910. /* harmony export */ });
  17911. /* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppTopBar_vue_vue_type_template_id_42bf62a4_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppTopBar.vue?vue&type=template&id=42bf62a4&scoped=true */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppTopBar.vue?vue&type=template&id=42bf62a4&scoped=true");
  17912. /***/ }),
  17913. /***/ "./resources/js/layouts/DashboardLayout.vue?vue&type=template&id=549bf5ac&scoped=true":
  17914. /*!********************************************************************************************!*\
  17915. !*** ./resources/js/layouts/DashboardLayout.vue?vue&type=template&id=549bf5ac&scoped=true ***!
  17916. \********************************************************************************************/
  17917. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17918. "use strict";
  17919. __webpack_require__.r(__webpack_exports__);
  17920. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17921. /* harmony export */ "render": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_DashboardLayout_vue_vue_type_template_id_549bf5ac_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render)
  17922. /* harmony export */ });
  17923. /* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_DashboardLayout_vue_vue_type_template_id_549bf5ac_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./DashboardLayout.vue?vue&type=template&id=549bf5ac&scoped=true */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/layouts/DashboardLayout.vue?vue&type=template&id=549bf5ac&scoped=true");
  17924. /***/ }),
  17925. /***/ "./resources/js/pages/mutation/Report.vue?vue&type=template&id=289c9421":
  17926. /*!******************************************************************************!*\
  17927. !*** ./resources/js/pages/mutation/Report.vue?vue&type=template&id=289c9421 ***!
  17928. \******************************************************************************/
  17929. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17930. "use strict";
  17931. __webpack_require__.r(__webpack_exports__);
  17932. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17933. /* harmony export */ "render": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_Report_vue_vue_type_template_id_289c9421__WEBPACK_IMPORTED_MODULE_0__.render)
  17934. /* harmony export */ });
  17935. /* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_Report_vue_vue_type_template_id_289c9421__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./Report.vue?vue&type=template&id=289c9421 */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/pages/mutation/Report.vue?vue&type=template&id=289c9421");
  17936. /***/ }),
  17937. /***/ "./resources/js/components/AppFooter.vue?vue&type=style&index=0&id=4ab6097e&lang=scss&scoped=true":
  17938. /*!********************************************************************************************************!*\
  17939. !*** ./resources/js/components/AppFooter.vue?vue&type=style&index=0&id=4ab6097e&lang=scss&scoped=true ***!
  17940. \********************************************************************************************************/
  17941. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17942. "use strict";
  17943. __webpack_require__.r(__webpack_exports__);
  17944. /* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppFooter_vue_vue_type_style_index_0_id_4ab6097e_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/style-loader/dist/cjs.js!../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!../../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppFooter.vue?vue&type=style&index=0&id=4ab6097e&lang=scss&scoped=true */ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppFooter.vue?vue&type=style&index=0&id=4ab6097e&lang=scss&scoped=true");
  17945. /***/ }),
  17946. /***/ "./resources/js/components/AppSidebar.vue?vue&type=style&index=0&id=22a4e926&lang=scss&scoped=true":
  17947. /*!*********************************************************************************************************!*\
  17948. !*** ./resources/js/components/AppSidebar.vue?vue&type=style&index=0&id=22a4e926&lang=scss&scoped=true ***!
  17949. \*********************************************************************************************************/
  17950. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17951. "use strict";
  17952. __webpack_require__.r(__webpack_exports__);
  17953. /* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppSidebar_vue_vue_type_style_index_0_id_22a4e926_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/style-loader/dist/cjs.js!../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!../../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppSidebar.vue?vue&type=style&index=0&id=22a4e926&lang=scss&scoped=true */ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSidebar.vue?vue&type=style&index=0&id=22a4e926&lang=scss&scoped=true");
  17954. /***/ }),
  17955. /***/ "./resources/js/components/AppSubSidebar.vue?vue&type=style&index=0&id=0addd9bc&lang=scss&scoped=true":
  17956. /*!************************************************************************************************************!*\
  17957. !*** ./resources/js/components/AppSubSidebar.vue?vue&type=style&index=0&id=0addd9bc&lang=scss&scoped=true ***!
  17958. \************************************************************************************************************/
  17959. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17960. "use strict";
  17961. __webpack_require__.r(__webpack_exports__);
  17962. /* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppSubSidebar_vue_vue_type_style_index_0_id_0addd9bc_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/style-loader/dist/cjs.js!../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!../../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppSubSidebar.vue?vue&type=style&index=0&id=0addd9bc&lang=scss&scoped=true */ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppSubSidebar.vue?vue&type=style&index=0&id=0addd9bc&lang=scss&scoped=true");
  17963. /***/ }),
  17964. /***/ "./resources/js/components/AppTopBar.vue?vue&type=style&index=0&id=42bf62a4&lang=scss&scoped=true":
  17965. /*!********************************************************************************************************!*\
  17966. !*** ./resources/js/components/AppTopBar.vue?vue&type=style&index=0&id=42bf62a4&lang=scss&scoped=true ***!
  17967. \********************************************************************************************************/
  17968. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17969. "use strict";
  17970. __webpack_require__.r(__webpack_exports__);
  17971. /* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_AppTopBar_vue_vue_type_style_index_0_id_42bf62a4_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/style-loader/dist/cjs.js!../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!../../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./AppTopBar.vue?vue&type=style&index=0&id=42bf62a4&lang=scss&scoped=true */ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/components/AppTopBar.vue?vue&type=style&index=0&id=42bf62a4&lang=scss&scoped=true");
  17972. /***/ }),
  17973. /***/ "./resources/js/layouts/DashboardLayout.vue?vue&type=style&index=0&id=549bf5ac&lang=scss&scoped=true":
  17974. /*!***********************************************************************************************************!*\
  17975. !*** ./resources/js/layouts/DashboardLayout.vue?vue&type=style&index=0&id=549bf5ac&lang=scss&scoped=true ***!
  17976. \***********************************************************************************************************/
  17977. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17978. "use strict";
  17979. __webpack_require__.r(__webpack_exports__);
  17980. /* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_clonedRuleSet_11_use_1_node_modules_vue_loader_dist_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_11_use_2_node_modules_sass_loader_dist_cjs_js_clonedRuleSet_11_use_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_DashboardLayout_vue_vue_type_style_index_0_id_549bf5ac_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/style-loader/dist/cjs.js!../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!../../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./DashboardLayout.vue?vue&type=style&index=0&id=549bf5ac&lang=scss&scoped=true */ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-11.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-11.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-11.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/layouts/DashboardLayout.vue?vue&type=style&index=0&id=549bf5ac&lang=scss&scoped=true");
  17981. /***/ })
  17982. }]);