resources_js_pages_mutation_Report_vue.js 706KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469
  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. initialDateRange: 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),
  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(props) {
  1033. var dates = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null);
  1034. var startDate = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null);
  1035. var endDate = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null);
  1036. (0,vue__WEBPACK_IMPORTED_MODULE_0__.onMounted)(function () {
  1037. if (!props.initialDateRange) {
  1038. return;
  1039. }
  1040. if (props.initialDateRange[0] || props.initialDateRange[1]) {
  1041. if (props.initialDateRange[1]) {
  1042. dates.value = [new Date(props.initialDateRange[0]), new Date(props.initialDateRange[1])];
  1043. } else {
  1044. dates.value = [new Date(props.props.initialDateRange[1]), null];
  1045. }
  1046. }
  1047. });
  1048. (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(dates, function () {
  1049. if (dates.value[1]) {
  1050. startDate.value = dayjs__WEBPACK_IMPORTED_MODULE_1___default()(dates.value[0]).format('YYYY-MM-DD');
  1051. endDate.value = dayjs__WEBPACK_IMPORTED_MODULE_1___default()(dates.value[1]).format('YYYY-MM-DD');
  1052. } else if (dates.value[0]) {
  1053. startDate.value = dayjs__WEBPACK_IMPORTED_MODULE_1___default()(dates.value[0]).format('YYYY-MM-DD');
  1054. endDate.value = null;
  1055. }
  1056. });
  1057. return {
  1058. dates: dates,
  1059. startDate: startDate,
  1060. endDate: endDate
  1061. };
  1062. }
  1063. /***/ }),
  1064. /***/ "./resources/js/pages/mutation/tableHeader.js":
  1065. /*!****************************************************!*\
  1066. !*** ./resources/js/pages/mutation/tableHeader.js ***!
  1067. \****************************************************/
  1068. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  1069. "use strict";
  1070. __webpack_require__.r(__webpack_exports__);
  1071. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1072. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  1073. /* harmony export */ });
  1074. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ([{
  1075. field: 'createdAt',
  1076. header: 'Tanggal'
  1077. }, {
  1078. field: 'type',
  1079. header: 'Tipe'
  1080. }, {
  1081. field: 'amount',
  1082. header: 'Nilai'
  1083. }]);
  1084. /***/ }),
  1085. /***/ "./resources/js/utils/menu.js":
  1086. /*!************************************!*\
  1087. !*** ./resources/js/utils/menu.js ***!
  1088. \************************************/
  1089. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  1090. "use strict";
  1091. __webpack_require__.r(__webpack_exports__);
  1092. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1093. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  1094. /* harmony export */ });
  1095. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  1096. // Admin
  1097. 1: [{
  1098. label: 'Home',
  1099. items: [{
  1100. label: 'Dashboard',
  1101. icon: 'pi pi-home',
  1102. to: '/dashboards',
  1103. component: 'home/Index'
  1104. }]
  1105. }, {
  1106. label: 'Master',
  1107. items: [{
  1108. label: 'User',
  1109. icon: 'pi pi-user',
  1110. to: '/users',
  1111. component: 'user/Index'
  1112. }]
  1113. }],
  1114. // Supervisor
  1115. 2: [{
  1116. label: 'Home',
  1117. items: [{
  1118. label: 'Dashboard',
  1119. icon: 'pi pi-home',
  1120. to: '/dashboards',
  1121. component: 'home/Index'
  1122. }]
  1123. }, {
  1124. label: 'Menu',
  1125. items: [{
  1126. label: 'Pengeluaran',
  1127. icon: 'pi pi-wallet',
  1128. to: '/expenses',
  1129. component: 'expense/Index'
  1130. }, {
  1131. label: 'Laporan',
  1132. icon: 'pi pi-book',
  1133. items: [{
  1134. label: 'Mutasi',
  1135. icon: 'pi pi-circle',
  1136. to: '/reports/mutations',
  1137. component: 'mutation/Report'
  1138. }]
  1139. }]
  1140. }, {
  1141. label: 'Master',
  1142. items: [{
  1143. label: 'Jenis Kendaraan',
  1144. icon: 'pi pi-car',
  1145. to: '/type-vehicles',
  1146. component: 'typevehicle/Index'
  1147. }, {
  1148. label: 'Jenis Member',
  1149. icon: 'pi pi-id-card',
  1150. to: '/type-members',
  1151. component: 'typemember/Index'
  1152. }]
  1153. }, {
  1154. label: 'Pengaturan',
  1155. items: [{
  1156. label: 'Tarif Parkir',
  1157. icon: 'pi pi-car',
  1158. to: '/parking-fees/create',
  1159. component: 'parkingfee/Create'
  1160. }]
  1161. }],
  1162. // Operator
  1163. 3: [{
  1164. label: 'Home',
  1165. items: [{
  1166. label: 'Dashboard',
  1167. icon: 'pi pi-home',
  1168. to: '/dashboards',
  1169. component: 'home/Index'
  1170. }]
  1171. }, {
  1172. label: 'Menu',
  1173. items: [{
  1174. label: 'Pengeluaran',
  1175. icon: 'pi pi-wallet',
  1176. to: '/expenses',
  1177. component: 'expense/Index'
  1178. }, {
  1179. label: 'Member',
  1180. icon: 'pi pi-id-card',
  1181. to: '/members',
  1182. component: 'member/Index'
  1183. }, {
  1184. label: 'Top Up',
  1185. icon: 'pi pi-car',
  1186. to: '/top-ups',
  1187. component: 'topup/Index'
  1188. }]
  1189. }]
  1190. });
  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. !*** ./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 ***!
  1195. \***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  1196. /***/ ((module, __webpack_exports__, __webpack_require__) => {
  1197. "use strict";
  1198. __webpack_require__.r(__webpack_exports__);
  1199. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1200. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  1201. /* harmony export */ });
  1202. /* 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");
  1203. /* 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__);
  1204. // Imports
  1205. var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
  1206. // Module
  1207. ___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}", ""]);
  1208. // Exports
  1209. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
  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. !*** ./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 ***!
  1214. \************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  1215. /***/ ((module, __webpack_exports__, __webpack_require__) => {
  1216. "use strict";
  1217. __webpack_require__.r(__webpack_exports__);
  1218. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1219. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  1220. /* harmony export */ });
  1221. /* 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");
  1222. /* 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__);
  1223. // Imports
  1224. var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
  1225. // Module
  1226. ___CSS_LOADER_EXPORT___.push([module.id, ".layout-menu[data-v-22a4e926] {\n list-style-type: none;\n margin: 0;\n padding: 0;\n}", ""]);
  1227. // Exports
  1228. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
  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. !*** ./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 ***!
  1233. \***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  1234. /***/ ((module, __webpack_exports__, __webpack_require__) => {
  1235. "use strict";
  1236. __webpack_require__.r(__webpack_exports__);
  1237. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1238. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  1239. /* harmony export */ });
  1240. /* 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");
  1241. /* 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__);
  1242. // Imports
  1243. var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
  1244. // Module
  1245. ___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}", ""]);
  1246. // Exports
  1247. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
  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. !*** ./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 ***!
  1252. \***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  1253. /***/ ((module, __webpack_exports__, __webpack_require__) => {
  1254. "use strict";
  1255. __webpack_require__.r(__webpack_exports__);
  1256. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1257. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  1258. /* harmony export */ });
  1259. /* 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");
  1260. /* 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__);
  1261. // Imports
  1262. var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
  1263. // Module
  1264. ___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}", ""]);
  1265. // Exports
  1266. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
  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. !*** ./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 ***!
  1271. \**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  1272. /***/ ((module, __webpack_exports__, __webpack_require__) => {
  1273. "use strict";
  1274. __webpack_require__.r(__webpack_exports__);
  1275. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1276. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  1277. /* harmony export */ });
  1278. /* 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");
  1279. /* 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__);
  1280. // Imports
  1281. var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
  1282. // Module
  1283. ___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}", ""]);
  1284. // Exports
  1285. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
  1286. /***/ }),
  1287. /***/ "./node_modules/dayjs/dayjs.min.js":
  1288. /*!*****************************************!*\
  1289. !*** ./node_modules/dayjs/dayjs.min.js ***!
  1290. \*****************************************/
  1291. /***/ (function(module) {
  1292. !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}));
  1293. /***/ }),
  1294. /***/ "./node_modules/lodash/lodash.js":
  1295. /*!***************************************!*\
  1296. !*** ./node_modules/lodash/lodash.js ***!
  1297. \***************************************/
  1298. /***/ (function(module, exports, __webpack_require__) {
  1299. /* module decorator */ module = __webpack_require__.nmd(module);
  1300. var __WEBPACK_AMD_DEFINE_RESULT__;/**
  1301. * @license
  1302. * Lodash <https://lodash.com/>
  1303. * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
  1304. * Released under MIT license <https://lodash.com/license>
  1305. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  1306. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1307. */
  1308. ;(function() {
  1309. /** Used as a safe reference for `undefined` in pre-ES5 environments. */
  1310. var undefined;
  1311. /** Used as the semantic version number. */
  1312. var VERSION = '4.17.21';
  1313. /** Used as the size to enable large array optimizations. */
  1314. var LARGE_ARRAY_SIZE = 200;
  1315. /** Error message constants. */
  1316. var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
  1317. FUNC_ERROR_TEXT = 'Expected a function',
  1318. INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';
  1319. /** Used to stand-in for `undefined` hash values. */
  1320. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  1321. /** Used as the maximum memoize cache size. */
  1322. var MAX_MEMOIZE_SIZE = 500;
  1323. /** Used as the internal argument placeholder. */
  1324. var PLACEHOLDER = '__lodash_placeholder__';
  1325. /** Used to compose bitmasks for cloning. */
  1326. var CLONE_DEEP_FLAG = 1,
  1327. CLONE_FLAT_FLAG = 2,
  1328. CLONE_SYMBOLS_FLAG = 4;
  1329. /** Used to compose bitmasks for value comparisons. */
  1330. var COMPARE_PARTIAL_FLAG = 1,
  1331. COMPARE_UNORDERED_FLAG = 2;
  1332. /** Used to compose bitmasks for function metadata. */
  1333. var WRAP_BIND_FLAG = 1,
  1334. WRAP_BIND_KEY_FLAG = 2,
  1335. WRAP_CURRY_BOUND_FLAG = 4,
  1336. WRAP_CURRY_FLAG = 8,
  1337. WRAP_CURRY_RIGHT_FLAG = 16,
  1338. WRAP_PARTIAL_FLAG = 32,
  1339. WRAP_PARTIAL_RIGHT_FLAG = 64,
  1340. WRAP_ARY_FLAG = 128,
  1341. WRAP_REARG_FLAG = 256,
  1342. WRAP_FLIP_FLAG = 512;
  1343. /** Used as default options for `_.truncate`. */
  1344. var DEFAULT_TRUNC_LENGTH = 30,
  1345. DEFAULT_TRUNC_OMISSION = '...';
  1346. /** Used to detect hot functions by number of calls within a span of milliseconds. */
  1347. var HOT_COUNT = 800,
  1348. HOT_SPAN = 16;
  1349. /** Used to indicate the type of lazy iteratees. */
  1350. var LAZY_FILTER_FLAG = 1,
  1351. LAZY_MAP_FLAG = 2,
  1352. LAZY_WHILE_FLAG = 3;
  1353. /** Used as references for various `Number` constants. */
  1354. var INFINITY = 1 / 0,
  1355. MAX_SAFE_INTEGER = 9007199254740991,
  1356. MAX_INTEGER = 1.7976931348623157e+308,
  1357. NAN = 0 / 0;
  1358. /** Used as references for the maximum length and index of an array. */
  1359. var MAX_ARRAY_LENGTH = 4294967295,
  1360. MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
  1361. HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
  1362. /** Used to associate wrap methods with their bit flags. */
  1363. var wrapFlags = [
  1364. ['ary', WRAP_ARY_FLAG],
  1365. ['bind', WRAP_BIND_FLAG],
  1366. ['bindKey', WRAP_BIND_KEY_FLAG],
  1367. ['curry', WRAP_CURRY_FLAG],
  1368. ['curryRight', WRAP_CURRY_RIGHT_FLAG],
  1369. ['flip', WRAP_FLIP_FLAG],
  1370. ['partial', WRAP_PARTIAL_FLAG],
  1371. ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
  1372. ['rearg', WRAP_REARG_FLAG]
  1373. ];
  1374. /** `Object#toString` result references. */
  1375. var argsTag = '[object Arguments]',
  1376. arrayTag = '[object Array]',
  1377. asyncTag = '[object AsyncFunction]',
  1378. boolTag = '[object Boolean]',
  1379. dateTag = '[object Date]',
  1380. domExcTag = '[object DOMException]',
  1381. errorTag = '[object Error]',
  1382. funcTag = '[object Function]',
  1383. genTag = '[object GeneratorFunction]',
  1384. mapTag = '[object Map]',
  1385. numberTag = '[object Number]',
  1386. nullTag = '[object Null]',
  1387. objectTag = '[object Object]',
  1388. promiseTag = '[object Promise]',
  1389. proxyTag = '[object Proxy]',
  1390. regexpTag = '[object RegExp]',
  1391. setTag = '[object Set]',
  1392. stringTag = '[object String]',
  1393. symbolTag = '[object Symbol]',
  1394. undefinedTag = '[object Undefined]',
  1395. weakMapTag = '[object WeakMap]',
  1396. weakSetTag = '[object WeakSet]';
  1397. var arrayBufferTag = '[object ArrayBuffer]',
  1398. dataViewTag = '[object DataView]',
  1399. float32Tag = '[object Float32Array]',
  1400. float64Tag = '[object Float64Array]',
  1401. int8Tag = '[object Int8Array]',
  1402. int16Tag = '[object Int16Array]',
  1403. int32Tag = '[object Int32Array]',
  1404. uint8Tag = '[object Uint8Array]',
  1405. uint8ClampedTag = '[object Uint8ClampedArray]',
  1406. uint16Tag = '[object Uint16Array]',
  1407. uint32Tag = '[object Uint32Array]';
  1408. /** Used to match empty string literals in compiled template source. */
  1409. var reEmptyStringLeading = /\b__p \+= '';/g,
  1410. reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
  1411. reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
  1412. /** Used to match HTML entities and HTML characters. */
  1413. var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
  1414. reUnescapedHtml = /[&<>"']/g,
  1415. reHasEscapedHtml = RegExp(reEscapedHtml.source),
  1416. reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
  1417. /** Used to match template delimiters. */
  1418. var reEscape = /<%-([\s\S]+?)%>/g,
  1419. reEvaluate = /<%([\s\S]+?)%>/g,
  1420. reInterpolate = /<%=([\s\S]+?)%>/g;
  1421. /** Used to match property names within property paths. */
  1422. var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
  1423. reIsPlainProp = /^\w*$/,
  1424. rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
  1425. /**
  1426. * Used to match `RegExp`
  1427. * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
  1428. */
  1429. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
  1430. reHasRegExpChar = RegExp(reRegExpChar.source);
  1431. /** Used to match leading whitespace. */
  1432. var reTrimStart = /^\s+/;
  1433. /** Used to match a single whitespace character. */
  1434. var reWhitespace = /\s/;
  1435. /** Used to match wrap detail comments. */
  1436. var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
  1437. reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
  1438. reSplitDetails = /,? & /;
  1439. /** Used to match words composed of alphanumeric characters. */
  1440. var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
  1441. /**
  1442. * Used to validate the `validate` option in `_.template` variable.
  1443. *
  1444. * Forbids characters which could potentially change the meaning of the function argument definition:
  1445. * - "()," (modification of function parameters)
  1446. * - "=" (default value)
  1447. * - "[]{}" (destructuring of function parameters)
  1448. * - "/" (beginning of a comment)
  1449. * - whitespace
  1450. */
  1451. var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/;
  1452. /** Used to match backslashes in property paths. */
  1453. var reEscapeChar = /\\(\\)?/g;
  1454. /**
  1455. * Used to match
  1456. * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
  1457. */
  1458. var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
  1459. /** Used to match `RegExp` flags from their coerced string values. */
  1460. var reFlags = /\w*$/;
  1461. /** Used to detect bad signed hexadecimal string values. */
  1462. var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
  1463. /** Used to detect binary string values. */
  1464. var reIsBinary = /^0b[01]+$/i;
  1465. /** Used to detect host constructors (Safari). */
  1466. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  1467. /** Used to detect octal string values. */
  1468. var reIsOctal = /^0o[0-7]+$/i;
  1469. /** Used to detect unsigned integer values. */
  1470. var reIsUint = /^(?:0|[1-9]\d*)$/;
  1471. /** Used to match Latin Unicode letters (excluding mathematical operators). */
  1472. var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
  1473. /** Used to ensure capturing order of template delimiters. */
  1474. var reNoMatch = /($^)/;
  1475. /** Used to match unescaped characters in compiled string literals. */
  1476. var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
  1477. /** Used to compose unicode character classes. */
  1478. var rsAstralRange = '\\ud800-\\udfff',
  1479. rsComboMarksRange = '\\u0300-\\u036f',
  1480. reComboHalfMarksRange = '\\ufe20-\\ufe2f',
  1481. rsComboSymbolsRange = '\\u20d0-\\u20ff',
  1482. rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
  1483. rsDingbatRange = '\\u2700-\\u27bf',
  1484. rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
  1485. rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
  1486. rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
  1487. rsPunctuationRange = '\\u2000-\\u206f',
  1488. 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',
  1489. rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
  1490. rsVarRange = '\\ufe0e\\ufe0f',
  1491. rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
  1492. /** Used to compose unicode capture groups. */
  1493. var rsApos = "['\u2019]",
  1494. rsAstral = '[' + rsAstralRange + ']',
  1495. rsBreak = '[' + rsBreakRange + ']',
  1496. rsCombo = '[' + rsComboRange + ']',
  1497. rsDigits = '\\d+',
  1498. rsDingbat = '[' + rsDingbatRange + ']',
  1499. rsLower = '[' + rsLowerRange + ']',
  1500. rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
  1501. rsFitz = '\\ud83c[\\udffb-\\udfff]',
  1502. rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
  1503. rsNonAstral = '[^' + rsAstralRange + ']',
  1504. rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
  1505. rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
  1506. rsUpper = '[' + rsUpperRange + ']',
  1507. rsZWJ = '\\u200d';
  1508. /** Used to compose unicode regexes. */
  1509. var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
  1510. rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
  1511. rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
  1512. rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
  1513. reOptMod = rsModifier + '?',
  1514. rsOptVar = '[' + rsVarRange + ']?',
  1515. rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
  1516. rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
  1517. rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
  1518. rsSeq = rsOptVar + reOptMod + rsOptJoin,
  1519. rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
  1520. rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
  1521. /** Used to match apostrophes. */
  1522. var reApos = RegExp(rsApos, 'g');
  1523. /**
  1524. * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
  1525. * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
  1526. */
  1527. var reComboMark = RegExp(rsCombo, 'g');
  1528. /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
  1529. var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
  1530. /** Used to match complex or compound words. */
  1531. var reUnicodeWord = RegExp([
  1532. rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
  1533. rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
  1534. rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
  1535. rsUpper + '+' + rsOptContrUpper,
  1536. rsOrdUpper,
  1537. rsOrdLower,
  1538. rsDigits,
  1539. rsEmoji
  1540. ].join('|'), 'g');
  1541. /** 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/). */
  1542. var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
  1543. /** Used to detect strings that need a more robust regexp to match words. */
  1544. 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 ]/;
  1545. /** Used to assign default `context` object properties. */
  1546. var contextProps = [
  1547. 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
  1548. 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
  1549. 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',
  1550. 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
  1551. '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
  1552. ];
  1553. /** Used to make template sourceURLs easier to identify. */
  1554. var templateCounter = -1;
  1555. /** Used to identify `toStringTag` values of typed arrays. */
  1556. var typedArrayTags = {};
  1557. typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
  1558. typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
  1559. typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
  1560. typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
  1561. typedArrayTags[uint32Tag] = true;
  1562. typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
  1563. typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
  1564. typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
  1565. typedArrayTags[errorTag] = typedArrayTags[funcTag] =
  1566. typedArrayTags[mapTag] = typedArrayTags[numberTag] =
  1567. typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
  1568. typedArrayTags[setTag] = typedArrayTags[stringTag] =
  1569. typedArrayTags[weakMapTag] = false;
  1570. /** Used to identify `toStringTag` values supported by `_.clone`. */
  1571. var cloneableTags = {};
  1572. cloneableTags[argsTag] = cloneableTags[arrayTag] =
  1573. cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
  1574. cloneableTags[boolTag] = cloneableTags[dateTag] =
  1575. cloneableTags[float32Tag] = cloneableTags[float64Tag] =
  1576. cloneableTags[int8Tag] = cloneableTags[int16Tag] =
  1577. cloneableTags[int32Tag] = cloneableTags[mapTag] =
  1578. cloneableTags[numberTag] = cloneableTags[objectTag] =
  1579. cloneableTags[regexpTag] = cloneableTags[setTag] =
  1580. cloneableTags[stringTag] = cloneableTags[symbolTag] =
  1581. cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
  1582. cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
  1583. cloneableTags[errorTag] = cloneableTags[funcTag] =
  1584. cloneableTags[weakMapTag] = false;
  1585. /** Used to map Latin Unicode letters to basic Latin letters. */
  1586. var deburredLetters = {
  1587. // Latin-1 Supplement block.
  1588. '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
  1589. '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
  1590. '\xc7': 'C', '\xe7': 'c',
  1591. '\xd0': 'D', '\xf0': 'd',
  1592. '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
  1593. '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
  1594. '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
  1595. '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
  1596. '\xd1': 'N', '\xf1': 'n',
  1597. '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
  1598. '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
  1599. '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
  1600. '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
  1601. '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
  1602. '\xc6': 'Ae', '\xe6': 'ae',
  1603. '\xde': 'Th', '\xfe': 'th',
  1604. '\xdf': 'ss',
  1605. // Latin Extended-A block.
  1606. '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
  1607. '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
  1608. '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
  1609. '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
  1610. '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
  1611. '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
  1612. '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
  1613. '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
  1614. '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
  1615. '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
  1616. '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
  1617. '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
  1618. '\u0134': 'J', '\u0135': 'j',
  1619. '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
  1620. '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
  1621. '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
  1622. '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
  1623. '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
  1624. '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
  1625. '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
  1626. '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
  1627. '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
  1628. '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
  1629. '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
  1630. '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
  1631. '\u0163': 't', '\u0165': 't', '\u0167': 't',
  1632. '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
  1633. '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
  1634. '\u0174': 'W', '\u0175': 'w',
  1635. '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
  1636. '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
  1637. '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
  1638. '\u0132': 'IJ', '\u0133': 'ij',
  1639. '\u0152': 'Oe', '\u0153': 'oe',
  1640. '\u0149': "'n", '\u017f': 's'
  1641. };
  1642. /** Used to map characters to HTML entities. */
  1643. var htmlEscapes = {
  1644. '&': '&amp;',
  1645. '<': '&lt;',
  1646. '>': '&gt;',
  1647. '"': '&quot;',
  1648. "'": '&#39;'
  1649. };
  1650. /** Used to map HTML entities to characters. */
  1651. var htmlUnescapes = {
  1652. '&amp;': '&',
  1653. '&lt;': '<',
  1654. '&gt;': '>',
  1655. '&quot;': '"',
  1656. '&#39;': "'"
  1657. };
  1658. /** Used to escape characters for inclusion in compiled string literals. */
  1659. var stringEscapes = {
  1660. '\\': '\\',
  1661. "'": "'",
  1662. '\n': 'n',
  1663. '\r': 'r',
  1664. '\u2028': 'u2028',
  1665. '\u2029': 'u2029'
  1666. };
  1667. /** Built-in method references without a dependency on `root`. */
  1668. var freeParseFloat = parseFloat,
  1669. freeParseInt = parseInt;
  1670. /** Detect free variable `global` from Node.js. */
  1671. var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g;
  1672. /** Detect free variable `self`. */
  1673. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  1674. /** Used as a reference to the global object. */
  1675. var root = freeGlobal || freeSelf || Function('return this')();
  1676. /** Detect free variable `exports`. */
  1677. var freeExports = true && exports && !exports.nodeType && exports;
  1678. /** Detect free variable `module`. */
  1679. var freeModule = freeExports && "object" == 'object' && module && !module.nodeType && module;
  1680. /** Detect the popular CommonJS extension `module.exports`. */
  1681. var moduleExports = freeModule && freeModule.exports === freeExports;
  1682. /** Detect free variable `process` from Node.js. */
  1683. var freeProcess = moduleExports && freeGlobal.process;
  1684. /** Used to access faster Node.js helpers. */
  1685. var nodeUtil = (function() {
  1686. try {
  1687. // Use `util.types` for Node.js 10+.
  1688. var types = freeModule && freeModule.require && freeModule.require('util').types;
  1689. if (types) {
  1690. return types;
  1691. }
  1692. // Legacy `process.binding('util')` for Node.js < 10.
  1693. return freeProcess && freeProcess.binding && freeProcess.binding('util');
  1694. } catch (e) {}
  1695. }());
  1696. /* Node.js helper references. */
  1697. var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,
  1698. nodeIsDate = nodeUtil && nodeUtil.isDate,
  1699. nodeIsMap = nodeUtil && nodeUtil.isMap,
  1700. nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,
  1701. nodeIsSet = nodeUtil && nodeUtil.isSet,
  1702. nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
  1703. /*--------------------------------------------------------------------------*/
  1704. /**
  1705. * A faster alternative to `Function#apply`, this function invokes `func`
  1706. * with the `this` binding of `thisArg` and the arguments of `args`.
  1707. *
  1708. * @private
  1709. * @param {Function} func The function to invoke.
  1710. * @param {*} thisArg The `this` binding of `func`.
  1711. * @param {Array} args The arguments to invoke `func` with.
  1712. * @returns {*} Returns the result of `func`.
  1713. */
  1714. function apply(func, thisArg, args) {
  1715. switch (args.length) {
  1716. case 0: return func.call(thisArg);
  1717. case 1: return func.call(thisArg, args[0]);
  1718. case 2: return func.call(thisArg, args[0], args[1]);
  1719. case 3: return func.call(thisArg, args[0], args[1], args[2]);
  1720. }
  1721. return func.apply(thisArg, args);
  1722. }
  1723. /**
  1724. * A specialized version of `baseAggregator` for arrays.
  1725. *
  1726. * @private
  1727. * @param {Array} [array] The array to iterate over.
  1728. * @param {Function} setter The function to set `accumulator` values.
  1729. * @param {Function} iteratee The iteratee to transform keys.
  1730. * @param {Object} accumulator The initial aggregated object.
  1731. * @returns {Function} Returns `accumulator`.
  1732. */
  1733. function arrayAggregator(array, setter, iteratee, accumulator) {
  1734. var index = -1,
  1735. length = array == null ? 0 : array.length;
  1736. while (++index < length) {
  1737. var value = array[index];
  1738. setter(accumulator, value, iteratee(value), array);
  1739. }
  1740. return accumulator;
  1741. }
  1742. /**
  1743. * A specialized version of `_.forEach` for arrays without support for
  1744. * iteratee shorthands.
  1745. *
  1746. * @private
  1747. * @param {Array} [array] The array to iterate over.
  1748. * @param {Function} iteratee The function invoked per iteration.
  1749. * @returns {Array} Returns `array`.
  1750. */
  1751. function arrayEach(array, iteratee) {
  1752. var index = -1,
  1753. length = array == null ? 0 : array.length;
  1754. while (++index < length) {
  1755. if (iteratee(array[index], index, array) === false) {
  1756. break;
  1757. }
  1758. }
  1759. return array;
  1760. }
  1761. /**
  1762. * A specialized version of `_.forEachRight` for arrays without support for
  1763. * iteratee shorthands.
  1764. *
  1765. * @private
  1766. * @param {Array} [array] The array to iterate over.
  1767. * @param {Function} iteratee The function invoked per iteration.
  1768. * @returns {Array} Returns `array`.
  1769. */
  1770. function arrayEachRight(array, iteratee) {
  1771. var length = array == null ? 0 : array.length;
  1772. while (length--) {
  1773. if (iteratee(array[length], length, array) === false) {
  1774. break;
  1775. }
  1776. }
  1777. return array;
  1778. }
  1779. /**
  1780. * A specialized version of `_.every` for arrays without support for
  1781. * iteratee shorthands.
  1782. *
  1783. * @private
  1784. * @param {Array} [array] The array to iterate over.
  1785. * @param {Function} predicate The function invoked per iteration.
  1786. * @returns {boolean} Returns `true` if all elements pass the predicate check,
  1787. * else `false`.
  1788. */
  1789. function arrayEvery(array, predicate) {
  1790. var index = -1,
  1791. length = array == null ? 0 : array.length;
  1792. while (++index < length) {
  1793. if (!predicate(array[index], index, array)) {
  1794. return false;
  1795. }
  1796. }
  1797. return true;
  1798. }
  1799. /**
  1800. * A specialized version of `_.filter` for arrays without support for
  1801. * iteratee shorthands.
  1802. *
  1803. * @private
  1804. * @param {Array} [array] The array to iterate over.
  1805. * @param {Function} predicate The function invoked per iteration.
  1806. * @returns {Array} Returns the new filtered array.
  1807. */
  1808. function arrayFilter(array, predicate) {
  1809. var index = -1,
  1810. length = array == null ? 0 : array.length,
  1811. resIndex = 0,
  1812. result = [];
  1813. while (++index < length) {
  1814. var value = array[index];
  1815. if (predicate(value, index, array)) {
  1816. result[resIndex++] = value;
  1817. }
  1818. }
  1819. return result;
  1820. }
  1821. /**
  1822. * A specialized version of `_.includes` for arrays without support for
  1823. * specifying an index to search from.
  1824. *
  1825. * @private
  1826. * @param {Array} [array] The array to inspect.
  1827. * @param {*} target The value to search for.
  1828. * @returns {boolean} Returns `true` if `target` is found, else `false`.
  1829. */
  1830. function arrayIncludes(array, value) {
  1831. var length = array == null ? 0 : array.length;
  1832. return !!length && baseIndexOf(array, value, 0) > -1;
  1833. }
  1834. /**
  1835. * This function is like `arrayIncludes` except that it accepts a comparator.
  1836. *
  1837. * @private
  1838. * @param {Array} [array] The array to inspect.
  1839. * @param {*} target The value to search for.
  1840. * @param {Function} comparator The comparator invoked per element.
  1841. * @returns {boolean} Returns `true` if `target` is found, else `false`.
  1842. */
  1843. function arrayIncludesWith(array, value, comparator) {
  1844. var index = -1,
  1845. length = array == null ? 0 : array.length;
  1846. while (++index < length) {
  1847. if (comparator(value, array[index])) {
  1848. return true;
  1849. }
  1850. }
  1851. return false;
  1852. }
  1853. /**
  1854. * A specialized version of `_.map` for arrays without support for iteratee
  1855. * shorthands.
  1856. *
  1857. * @private
  1858. * @param {Array} [array] The array to iterate over.
  1859. * @param {Function} iteratee The function invoked per iteration.
  1860. * @returns {Array} Returns the new mapped array.
  1861. */
  1862. function arrayMap(array, iteratee) {
  1863. var index = -1,
  1864. length = array == null ? 0 : array.length,
  1865. result = Array(length);
  1866. while (++index < length) {
  1867. result[index] = iteratee(array[index], index, array);
  1868. }
  1869. return result;
  1870. }
  1871. /**
  1872. * Appends the elements of `values` to `array`.
  1873. *
  1874. * @private
  1875. * @param {Array} array The array to modify.
  1876. * @param {Array} values The values to append.
  1877. * @returns {Array} Returns `array`.
  1878. */
  1879. function arrayPush(array, values) {
  1880. var index = -1,
  1881. length = values.length,
  1882. offset = array.length;
  1883. while (++index < length) {
  1884. array[offset + index] = values[index];
  1885. }
  1886. return array;
  1887. }
  1888. /**
  1889. * A specialized version of `_.reduce` for arrays without support for
  1890. * iteratee shorthands.
  1891. *
  1892. * @private
  1893. * @param {Array} [array] The array to iterate over.
  1894. * @param {Function} iteratee The function invoked per iteration.
  1895. * @param {*} [accumulator] The initial value.
  1896. * @param {boolean} [initAccum] Specify using the first element of `array` as
  1897. * the initial value.
  1898. * @returns {*} Returns the accumulated value.
  1899. */
  1900. function arrayReduce(array, iteratee, accumulator, initAccum) {
  1901. var index = -1,
  1902. length = array == null ? 0 : array.length;
  1903. if (initAccum && length) {
  1904. accumulator = array[++index];
  1905. }
  1906. while (++index < length) {
  1907. accumulator = iteratee(accumulator, array[index], index, array);
  1908. }
  1909. return accumulator;
  1910. }
  1911. /**
  1912. * A specialized version of `_.reduceRight` for arrays without support for
  1913. * iteratee shorthands.
  1914. *
  1915. * @private
  1916. * @param {Array} [array] The array to iterate over.
  1917. * @param {Function} iteratee The function invoked per iteration.
  1918. * @param {*} [accumulator] The initial value.
  1919. * @param {boolean} [initAccum] Specify using the last element of `array` as
  1920. * the initial value.
  1921. * @returns {*} Returns the accumulated value.
  1922. */
  1923. function arrayReduceRight(array, iteratee, accumulator, initAccum) {
  1924. var length = array == null ? 0 : array.length;
  1925. if (initAccum && length) {
  1926. accumulator = array[--length];
  1927. }
  1928. while (length--) {
  1929. accumulator = iteratee(accumulator, array[length], length, array);
  1930. }
  1931. return accumulator;
  1932. }
  1933. /**
  1934. * A specialized version of `_.some` for arrays without support for iteratee
  1935. * shorthands.
  1936. *
  1937. * @private
  1938. * @param {Array} [array] The array to iterate over.
  1939. * @param {Function} predicate The function invoked per iteration.
  1940. * @returns {boolean} Returns `true` if any element passes the predicate check,
  1941. * else `false`.
  1942. */
  1943. function arraySome(array, predicate) {
  1944. var index = -1,
  1945. length = array == null ? 0 : array.length;
  1946. while (++index < length) {
  1947. if (predicate(array[index], index, array)) {
  1948. return true;
  1949. }
  1950. }
  1951. return false;
  1952. }
  1953. /**
  1954. * Gets the size of an ASCII `string`.
  1955. *
  1956. * @private
  1957. * @param {string} string The string inspect.
  1958. * @returns {number} Returns the string size.
  1959. */
  1960. var asciiSize = baseProperty('length');
  1961. /**
  1962. * Converts an ASCII `string` to an array.
  1963. *
  1964. * @private
  1965. * @param {string} string The string to convert.
  1966. * @returns {Array} Returns the converted array.
  1967. */
  1968. function asciiToArray(string) {
  1969. return string.split('');
  1970. }
  1971. /**
  1972. * Splits an ASCII `string` into an array of its words.
  1973. *
  1974. * @private
  1975. * @param {string} The string to inspect.
  1976. * @returns {Array} Returns the words of `string`.
  1977. */
  1978. function asciiWords(string) {
  1979. return string.match(reAsciiWord) || [];
  1980. }
  1981. /**
  1982. * The base implementation of methods like `_.findKey` and `_.findLastKey`,
  1983. * without support for iteratee shorthands, which iterates over `collection`
  1984. * using `eachFunc`.
  1985. *
  1986. * @private
  1987. * @param {Array|Object} collection The collection to inspect.
  1988. * @param {Function} predicate The function invoked per iteration.
  1989. * @param {Function} eachFunc The function to iterate over `collection`.
  1990. * @returns {*} Returns the found element or its key, else `undefined`.
  1991. */
  1992. function baseFindKey(collection, predicate, eachFunc) {
  1993. var result;
  1994. eachFunc(collection, function(value, key, collection) {
  1995. if (predicate(value, key, collection)) {
  1996. result = key;
  1997. return false;
  1998. }
  1999. });
  2000. return result;
  2001. }
  2002. /**
  2003. * The base implementation of `_.findIndex` and `_.findLastIndex` without
  2004. * support for iteratee shorthands.
  2005. *
  2006. * @private
  2007. * @param {Array} array The array to inspect.
  2008. * @param {Function} predicate The function invoked per iteration.
  2009. * @param {number} fromIndex The index to search from.
  2010. * @param {boolean} [fromRight] Specify iterating from right to left.
  2011. * @returns {number} Returns the index of the matched value, else `-1`.
  2012. */
  2013. function baseFindIndex(array, predicate, fromIndex, fromRight) {
  2014. var length = array.length,
  2015. index = fromIndex + (fromRight ? 1 : -1);
  2016. while ((fromRight ? index-- : ++index < length)) {
  2017. if (predicate(array[index], index, array)) {
  2018. return index;
  2019. }
  2020. }
  2021. return -1;
  2022. }
  2023. /**
  2024. * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
  2025. *
  2026. * @private
  2027. * @param {Array} array The array to inspect.
  2028. * @param {*} value The value to search for.
  2029. * @param {number} fromIndex The index to search from.
  2030. * @returns {number} Returns the index of the matched value, else `-1`.
  2031. */
  2032. function baseIndexOf(array, value, fromIndex) {
  2033. return value === value
  2034. ? strictIndexOf(array, value, fromIndex)
  2035. : baseFindIndex(array, baseIsNaN, fromIndex);
  2036. }
  2037. /**
  2038. * This function is like `baseIndexOf` except that it accepts a comparator.
  2039. *
  2040. * @private
  2041. * @param {Array} array The array to inspect.
  2042. * @param {*} value The value to search for.
  2043. * @param {number} fromIndex The index to search from.
  2044. * @param {Function} comparator The comparator invoked per element.
  2045. * @returns {number} Returns the index of the matched value, else `-1`.
  2046. */
  2047. function baseIndexOfWith(array, value, fromIndex, comparator) {
  2048. var index = fromIndex - 1,
  2049. length = array.length;
  2050. while (++index < length) {
  2051. if (comparator(array[index], value)) {
  2052. return index;
  2053. }
  2054. }
  2055. return -1;
  2056. }
  2057. /**
  2058. * The base implementation of `_.isNaN` without support for number objects.
  2059. *
  2060. * @private
  2061. * @param {*} value The value to check.
  2062. * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
  2063. */
  2064. function baseIsNaN(value) {
  2065. return value !== value;
  2066. }
  2067. /**
  2068. * The base implementation of `_.mean` and `_.meanBy` without support for
  2069. * iteratee shorthands.
  2070. *
  2071. * @private
  2072. * @param {Array} array The array to iterate over.
  2073. * @param {Function} iteratee The function invoked per iteration.
  2074. * @returns {number} Returns the mean.
  2075. */
  2076. function baseMean(array, iteratee) {
  2077. var length = array == null ? 0 : array.length;
  2078. return length ? (baseSum(array, iteratee) / length) : NAN;
  2079. }
  2080. /**
  2081. * The base implementation of `_.property` without support for deep paths.
  2082. *
  2083. * @private
  2084. * @param {string} key The key of the property to get.
  2085. * @returns {Function} Returns the new accessor function.
  2086. */
  2087. function baseProperty(key) {
  2088. return function(object) {
  2089. return object == null ? undefined : object[key];
  2090. };
  2091. }
  2092. /**
  2093. * The base implementation of `_.propertyOf` without support for deep paths.
  2094. *
  2095. * @private
  2096. * @param {Object} object The object to query.
  2097. * @returns {Function} Returns the new accessor function.
  2098. */
  2099. function basePropertyOf(object) {
  2100. return function(key) {
  2101. return object == null ? undefined : object[key];
  2102. };
  2103. }
  2104. /**
  2105. * The base implementation of `_.reduce` and `_.reduceRight`, without support
  2106. * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
  2107. *
  2108. * @private
  2109. * @param {Array|Object} collection The collection to iterate over.
  2110. * @param {Function} iteratee The function invoked per iteration.
  2111. * @param {*} accumulator The initial value.
  2112. * @param {boolean} initAccum Specify using the first or last element of
  2113. * `collection` as the initial value.
  2114. * @param {Function} eachFunc The function to iterate over `collection`.
  2115. * @returns {*} Returns the accumulated value.
  2116. */
  2117. function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
  2118. eachFunc(collection, function(value, index, collection) {
  2119. accumulator = initAccum
  2120. ? (initAccum = false, value)
  2121. : iteratee(accumulator, value, index, collection);
  2122. });
  2123. return accumulator;
  2124. }
  2125. /**
  2126. * The base implementation of `_.sortBy` which uses `comparer` to define the
  2127. * sort order of `array` and replaces criteria objects with their corresponding
  2128. * values.
  2129. *
  2130. * @private
  2131. * @param {Array} array The array to sort.
  2132. * @param {Function} comparer The function to define sort order.
  2133. * @returns {Array} Returns `array`.
  2134. */
  2135. function baseSortBy(array, comparer) {
  2136. var length = array.length;
  2137. array.sort(comparer);
  2138. while (length--) {
  2139. array[length] = array[length].value;
  2140. }
  2141. return array;
  2142. }
  2143. /**
  2144. * The base implementation of `_.sum` and `_.sumBy` without support for
  2145. * iteratee shorthands.
  2146. *
  2147. * @private
  2148. * @param {Array} array The array to iterate over.
  2149. * @param {Function} iteratee The function invoked per iteration.
  2150. * @returns {number} Returns the sum.
  2151. */
  2152. function baseSum(array, iteratee) {
  2153. var result,
  2154. index = -1,
  2155. length = array.length;
  2156. while (++index < length) {
  2157. var current = iteratee(array[index]);
  2158. if (current !== undefined) {
  2159. result = result === undefined ? current : (result + current);
  2160. }
  2161. }
  2162. return result;
  2163. }
  2164. /**
  2165. * The base implementation of `_.times` without support for iteratee shorthands
  2166. * or max array length checks.
  2167. *
  2168. * @private
  2169. * @param {number} n The number of times to invoke `iteratee`.
  2170. * @param {Function} iteratee The function invoked per iteration.
  2171. * @returns {Array} Returns the array of results.
  2172. */
  2173. function baseTimes(n, iteratee) {
  2174. var index = -1,
  2175. result = Array(n);
  2176. while (++index < n) {
  2177. result[index] = iteratee(index);
  2178. }
  2179. return result;
  2180. }
  2181. /**
  2182. * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
  2183. * of key-value pairs for `object` corresponding to the property names of `props`.
  2184. *
  2185. * @private
  2186. * @param {Object} object The object to query.
  2187. * @param {Array} props The property names to get values for.
  2188. * @returns {Object} Returns the key-value pairs.
  2189. */
  2190. function baseToPairs(object, props) {
  2191. return arrayMap(props, function(key) {
  2192. return [key, object[key]];
  2193. });
  2194. }
  2195. /**
  2196. * The base implementation of `_.trim`.
  2197. *
  2198. * @private
  2199. * @param {string} string The string to trim.
  2200. * @returns {string} Returns the trimmed string.
  2201. */
  2202. function baseTrim(string) {
  2203. return string
  2204. ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
  2205. : string;
  2206. }
  2207. /**
  2208. * The base implementation of `_.unary` without support for storing metadata.
  2209. *
  2210. * @private
  2211. * @param {Function} func The function to cap arguments for.
  2212. * @returns {Function} Returns the new capped function.
  2213. */
  2214. function baseUnary(func) {
  2215. return function(value) {
  2216. return func(value);
  2217. };
  2218. }
  2219. /**
  2220. * The base implementation of `_.values` and `_.valuesIn` which creates an
  2221. * array of `object` property values corresponding to the property names
  2222. * of `props`.
  2223. *
  2224. * @private
  2225. * @param {Object} object The object to query.
  2226. * @param {Array} props The property names to get values for.
  2227. * @returns {Object} Returns the array of property values.
  2228. */
  2229. function baseValues(object, props) {
  2230. return arrayMap(props, function(key) {
  2231. return object[key];
  2232. });
  2233. }
  2234. /**
  2235. * Checks if a `cache` value for `key` exists.
  2236. *
  2237. * @private
  2238. * @param {Object} cache The cache to query.
  2239. * @param {string} key The key of the entry to check.
  2240. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  2241. */
  2242. function cacheHas(cache, key) {
  2243. return cache.has(key);
  2244. }
  2245. /**
  2246. * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
  2247. * that is not found in the character symbols.
  2248. *
  2249. * @private
  2250. * @param {Array} strSymbols The string symbols to inspect.
  2251. * @param {Array} chrSymbols The character symbols to find.
  2252. * @returns {number} Returns the index of the first unmatched string symbol.
  2253. */
  2254. function charsStartIndex(strSymbols, chrSymbols) {
  2255. var index = -1,
  2256. length = strSymbols.length;
  2257. while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
  2258. return index;
  2259. }
  2260. /**
  2261. * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
  2262. * that is not found in the character symbols.
  2263. *
  2264. * @private
  2265. * @param {Array} strSymbols The string symbols to inspect.
  2266. * @param {Array} chrSymbols The character symbols to find.
  2267. * @returns {number} Returns the index of the last unmatched string symbol.
  2268. */
  2269. function charsEndIndex(strSymbols, chrSymbols) {
  2270. var index = strSymbols.length;
  2271. while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
  2272. return index;
  2273. }
  2274. /**
  2275. * Gets the number of `placeholder` occurrences in `array`.
  2276. *
  2277. * @private
  2278. * @param {Array} array The array to inspect.
  2279. * @param {*} placeholder The placeholder to search for.
  2280. * @returns {number} Returns the placeholder count.
  2281. */
  2282. function countHolders(array, placeholder) {
  2283. var length = array.length,
  2284. result = 0;
  2285. while (length--) {
  2286. if (array[length] === placeholder) {
  2287. ++result;
  2288. }
  2289. }
  2290. return result;
  2291. }
  2292. /**
  2293. * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
  2294. * letters to basic Latin letters.
  2295. *
  2296. * @private
  2297. * @param {string} letter The matched letter to deburr.
  2298. * @returns {string} Returns the deburred letter.
  2299. */
  2300. var deburrLetter = basePropertyOf(deburredLetters);
  2301. /**
  2302. * Used by `_.escape` to convert characters to HTML entities.
  2303. *
  2304. * @private
  2305. * @param {string} chr The matched character to escape.
  2306. * @returns {string} Returns the escaped character.
  2307. */
  2308. var escapeHtmlChar = basePropertyOf(htmlEscapes);
  2309. /**
  2310. * Used by `_.template` to escape characters for inclusion in compiled string literals.
  2311. *
  2312. * @private
  2313. * @param {string} chr The matched character to escape.
  2314. * @returns {string} Returns the escaped character.
  2315. */
  2316. function escapeStringChar(chr) {
  2317. return '\\' + stringEscapes[chr];
  2318. }
  2319. /**
  2320. * Gets the value at `key` of `object`.
  2321. *
  2322. * @private
  2323. * @param {Object} [object] The object to query.
  2324. * @param {string} key The key of the property to get.
  2325. * @returns {*} Returns the property value.
  2326. */
  2327. function getValue(object, key) {
  2328. return object == null ? undefined : object[key];
  2329. }
  2330. /**
  2331. * Checks if `string` contains Unicode symbols.
  2332. *
  2333. * @private
  2334. * @param {string} string The string to inspect.
  2335. * @returns {boolean} Returns `true` if a symbol is found, else `false`.
  2336. */
  2337. function hasUnicode(string) {
  2338. return reHasUnicode.test(string);
  2339. }
  2340. /**
  2341. * Checks if `string` contains a word composed of Unicode symbols.
  2342. *
  2343. * @private
  2344. * @param {string} string The string to inspect.
  2345. * @returns {boolean} Returns `true` if a word is found, else `false`.
  2346. */
  2347. function hasUnicodeWord(string) {
  2348. return reHasUnicodeWord.test(string);
  2349. }
  2350. /**
  2351. * Converts `iterator` to an array.
  2352. *
  2353. * @private
  2354. * @param {Object} iterator The iterator to convert.
  2355. * @returns {Array} Returns the converted array.
  2356. */
  2357. function iteratorToArray(iterator) {
  2358. var data,
  2359. result = [];
  2360. while (!(data = iterator.next()).done) {
  2361. result.push(data.value);
  2362. }
  2363. return result;
  2364. }
  2365. /**
  2366. * Converts `map` to its key-value pairs.
  2367. *
  2368. * @private
  2369. * @param {Object} map The map to convert.
  2370. * @returns {Array} Returns the key-value pairs.
  2371. */
  2372. function mapToArray(map) {
  2373. var index = -1,
  2374. result = Array(map.size);
  2375. map.forEach(function(value, key) {
  2376. result[++index] = [key, value];
  2377. });
  2378. return result;
  2379. }
  2380. /**
  2381. * Creates a unary function that invokes `func` with its argument transformed.
  2382. *
  2383. * @private
  2384. * @param {Function} func The function to wrap.
  2385. * @param {Function} transform The argument transform.
  2386. * @returns {Function} Returns the new function.
  2387. */
  2388. function overArg(func, transform) {
  2389. return function(arg) {
  2390. return func(transform(arg));
  2391. };
  2392. }
  2393. /**
  2394. * Replaces all `placeholder` elements in `array` with an internal placeholder
  2395. * and returns an array of their indexes.
  2396. *
  2397. * @private
  2398. * @param {Array} array The array to modify.
  2399. * @param {*} placeholder The placeholder to replace.
  2400. * @returns {Array} Returns the new array of placeholder indexes.
  2401. */
  2402. function replaceHolders(array, placeholder) {
  2403. var index = -1,
  2404. length = array.length,
  2405. resIndex = 0,
  2406. result = [];
  2407. while (++index < length) {
  2408. var value = array[index];
  2409. if (value === placeholder || value === PLACEHOLDER) {
  2410. array[index] = PLACEHOLDER;
  2411. result[resIndex++] = index;
  2412. }
  2413. }
  2414. return result;
  2415. }
  2416. /**
  2417. * Converts `set` to an array of its values.
  2418. *
  2419. * @private
  2420. * @param {Object} set The set to convert.
  2421. * @returns {Array} Returns the values.
  2422. */
  2423. function setToArray(set) {
  2424. var index = -1,
  2425. result = Array(set.size);
  2426. set.forEach(function(value) {
  2427. result[++index] = value;
  2428. });
  2429. return result;
  2430. }
  2431. /**
  2432. * Converts `set` to its value-value pairs.
  2433. *
  2434. * @private
  2435. * @param {Object} set The set to convert.
  2436. * @returns {Array} Returns the value-value pairs.
  2437. */
  2438. function setToPairs(set) {
  2439. var index = -1,
  2440. result = Array(set.size);
  2441. set.forEach(function(value) {
  2442. result[++index] = [value, value];
  2443. });
  2444. return result;
  2445. }
  2446. /**
  2447. * A specialized version of `_.indexOf` which performs strict equality
  2448. * comparisons of values, i.e. `===`.
  2449. *
  2450. * @private
  2451. * @param {Array} array The array to inspect.
  2452. * @param {*} value The value to search for.
  2453. * @param {number} fromIndex The index to search from.
  2454. * @returns {number} Returns the index of the matched value, else `-1`.
  2455. */
  2456. function strictIndexOf(array, value, fromIndex) {
  2457. var index = fromIndex - 1,
  2458. length = array.length;
  2459. while (++index < length) {
  2460. if (array[index] === value) {
  2461. return index;
  2462. }
  2463. }
  2464. return -1;
  2465. }
  2466. /**
  2467. * A specialized version of `_.lastIndexOf` which performs strict equality
  2468. * comparisons of values, i.e. `===`.
  2469. *
  2470. * @private
  2471. * @param {Array} array The array to inspect.
  2472. * @param {*} value The value to search for.
  2473. * @param {number} fromIndex The index to search from.
  2474. * @returns {number} Returns the index of the matched value, else `-1`.
  2475. */
  2476. function strictLastIndexOf(array, value, fromIndex) {
  2477. var index = fromIndex + 1;
  2478. while (index--) {
  2479. if (array[index] === value) {
  2480. return index;
  2481. }
  2482. }
  2483. return index;
  2484. }
  2485. /**
  2486. * Gets the number of symbols in `string`.
  2487. *
  2488. * @private
  2489. * @param {string} string The string to inspect.
  2490. * @returns {number} Returns the string size.
  2491. */
  2492. function stringSize(string) {
  2493. return hasUnicode(string)
  2494. ? unicodeSize(string)
  2495. : asciiSize(string);
  2496. }
  2497. /**
  2498. * Converts `string` to an array.
  2499. *
  2500. * @private
  2501. * @param {string} string The string to convert.
  2502. * @returns {Array} Returns the converted array.
  2503. */
  2504. function stringToArray(string) {
  2505. return hasUnicode(string)
  2506. ? unicodeToArray(string)
  2507. : asciiToArray(string);
  2508. }
  2509. /**
  2510. * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
  2511. * character of `string`.
  2512. *
  2513. * @private
  2514. * @param {string} string The string to inspect.
  2515. * @returns {number} Returns the index of the last non-whitespace character.
  2516. */
  2517. function trimmedEndIndex(string) {
  2518. var index = string.length;
  2519. while (index-- && reWhitespace.test(string.charAt(index))) {}
  2520. return index;
  2521. }
  2522. /**
  2523. * Used by `_.unescape` to convert HTML entities to characters.
  2524. *
  2525. * @private
  2526. * @param {string} chr The matched character to unescape.
  2527. * @returns {string} Returns the unescaped character.
  2528. */
  2529. var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
  2530. /**
  2531. * Gets the size of a Unicode `string`.
  2532. *
  2533. * @private
  2534. * @param {string} string The string inspect.
  2535. * @returns {number} Returns the string size.
  2536. */
  2537. function unicodeSize(string) {
  2538. var result = reUnicode.lastIndex = 0;
  2539. while (reUnicode.test(string)) {
  2540. ++result;
  2541. }
  2542. return result;
  2543. }
  2544. /**
  2545. * Converts a Unicode `string` to an array.
  2546. *
  2547. * @private
  2548. * @param {string} string The string to convert.
  2549. * @returns {Array} Returns the converted array.
  2550. */
  2551. function unicodeToArray(string) {
  2552. return string.match(reUnicode) || [];
  2553. }
  2554. /**
  2555. * Splits a Unicode `string` into an array of its words.
  2556. *
  2557. * @private
  2558. * @param {string} The string to inspect.
  2559. * @returns {Array} Returns the words of `string`.
  2560. */
  2561. function unicodeWords(string) {
  2562. return string.match(reUnicodeWord) || [];
  2563. }
  2564. /*--------------------------------------------------------------------------*/
  2565. /**
  2566. * Create a new pristine `lodash` function using the `context` object.
  2567. *
  2568. * @static
  2569. * @memberOf _
  2570. * @since 1.1.0
  2571. * @category Util
  2572. * @param {Object} [context=root] The context object.
  2573. * @returns {Function} Returns a new `lodash` function.
  2574. * @example
  2575. *
  2576. * _.mixin({ 'foo': _.constant('foo') });
  2577. *
  2578. * var lodash = _.runInContext();
  2579. * lodash.mixin({ 'bar': lodash.constant('bar') });
  2580. *
  2581. * _.isFunction(_.foo);
  2582. * // => true
  2583. * _.isFunction(_.bar);
  2584. * // => false
  2585. *
  2586. * lodash.isFunction(lodash.foo);
  2587. * // => false
  2588. * lodash.isFunction(lodash.bar);
  2589. * // => true
  2590. *
  2591. * // Create a suped-up `defer` in Node.js.
  2592. * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
  2593. */
  2594. var runInContext = (function runInContext(context) {
  2595. context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
  2596. /** Built-in constructor references. */
  2597. var Array = context.Array,
  2598. Date = context.Date,
  2599. Error = context.Error,
  2600. Function = context.Function,
  2601. Math = context.Math,
  2602. Object = context.Object,
  2603. RegExp = context.RegExp,
  2604. String = context.String,
  2605. TypeError = context.TypeError;
  2606. /** Used for built-in method references. */
  2607. var arrayProto = Array.prototype,
  2608. funcProto = Function.prototype,
  2609. objectProto = Object.prototype;
  2610. /** Used to detect overreaching core-js shims. */
  2611. var coreJsData = context['__core-js_shared__'];
  2612. /** Used to resolve the decompiled source of functions. */
  2613. var funcToString = funcProto.toString;
  2614. /** Used to check objects for own properties. */
  2615. var hasOwnProperty = objectProto.hasOwnProperty;
  2616. /** Used to generate unique IDs. */
  2617. var idCounter = 0;
  2618. /** Used to detect methods masquerading as native. */
  2619. var maskSrcKey = (function() {
  2620. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  2621. return uid ? ('Symbol(src)_1.' + uid) : '';
  2622. }());
  2623. /**
  2624. * Used to resolve the
  2625. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  2626. * of values.
  2627. */
  2628. var nativeObjectToString = objectProto.toString;
  2629. /** Used to infer the `Object` constructor. */
  2630. var objectCtorString = funcToString.call(Object);
  2631. /** Used to restore the original `_` reference in `_.noConflict`. */
  2632. var oldDash = root._;
  2633. /** Used to detect if a method is native. */
  2634. var reIsNative = RegExp('^' +
  2635. funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
  2636. .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
  2637. );
  2638. /** Built-in value references. */
  2639. var Buffer = moduleExports ? context.Buffer : undefined,
  2640. Symbol = context.Symbol,
  2641. Uint8Array = context.Uint8Array,
  2642. allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
  2643. getPrototype = overArg(Object.getPrototypeOf, Object),
  2644. objectCreate = Object.create,
  2645. propertyIsEnumerable = objectProto.propertyIsEnumerable,
  2646. splice = arrayProto.splice,
  2647. spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,
  2648. symIterator = Symbol ? Symbol.iterator : undefined,
  2649. symToStringTag = Symbol ? Symbol.toStringTag : undefined;
  2650. var defineProperty = (function() {
  2651. try {
  2652. var func = getNative(Object, 'defineProperty');
  2653. func({}, '', {});
  2654. return func;
  2655. } catch (e) {}
  2656. }());
  2657. /** Mocked built-ins. */
  2658. var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,
  2659. ctxNow = Date && Date.now !== root.Date.now && Date.now,
  2660. ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
  2661. /* Built-in method references for those with the same name as other `lodash` methods. */
  2662. var nativeCeil = Math.ceil,
  2663. nativeFloor = Math.floor,
  2664. nativeGetSymbols = Object.getOwnPropertySymbols,
  2665. nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
  2666. nativeIsFinite = context.isFinite,
  2667. nativeJoin = arrayProto.join,
  2668. nativeKeys = overArg(Object.keys, Object),
  2669. nativeMax = Math.max,
  2670. nativeMin = Math.min,
  2671. nativeNow = Date.now,
  2672. nativeParseInt = context.parseInt,
  2673. nativeRandom = Math.random,
  2674. nativeReverse = arrayProto.reverse;
  2675. /* Built-in method references that are verified to be native. */
  2676. var DataView = getNative(context, 'DataView'),
  2677. Map = getNative(context, 'Map'),
  2678. Promise = getNative(context, 'Promise'),
  2679. Set = getNative(context, 'Set'),
  2680. WeakMap = getNative(context, 'WeakMap'),
  2681. nativeCreate = getNative(Object, 'create');
  2682. /** Used to store function metadata. */
  2683. var metaMap = WeakMap && new WeakMap;
  2684. /** Used to lookup unminified function names. */
  2685. var realNames = {};
  2686. /** Used to detect maps, sets, and weakmaps. */
  2687. var dataViewCtorString = toSource(DataView),
  2688. mapCtorString = toSource(Map),
  2689. promiseCtorString = toSource(Promise),
  2690. setCtorString = toSource(Set),
  2691. weakMapCtorString = toSource(WeakMap);
  2692. /** Used to convert symbols to primitives and strings. */
  2693. var symbolProto = Symbol ? Symbol.prototype : undefined,
  2694. symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
  2695. symbolToString = symbolProto ? symbolProto.toString : undefined;
  2696. /*------------------------------------------------------------------------*/
  2697. /**
  2698. * Creates a `lodash` object which wraps `value` to enable implicit method
  2699. * chain sequences. Methods that operate on and return arrays, collections,
  2700. * and functions can be chained together. Methods that retrieve a single value
  2701. * or may return a primitive value will automatically end the chain sequence
  2702. * and return the unwrapped value. Otherwise, the value must be unwrapped
  2703. * with `_#value`.
  2704. *
  2705. * Explicit chain sequences, which must be unwrapped with `_#value`, may be
  2706. * enabled using `_.chain`.
  2707. *
  2708. * The execution of chained methods is lazy, that is, it's deferred until
  2709. * `_#value` is implicitly or explicitly called.
  2710. *
  2711. * Lazy evaluation allows several methods to support shortcut fusion.
  2712. * Shortcut fusion is an optimization to merge iteratee calls; this avoids
  2713. * the creation of intermediate arrays and can greatly reduce the number of
  2714. * iteratee executions. Sections of a chain sequence qualify for shortcut
  2715. * fusion if the section is applied to an array and iteratees accept only
  2716. * one argument. The heuristic for whether a section qualifies for shortcut
  2717. * fusion is subject to change.
  2718. *
  2719. * Chaining is supported in custom builds as long as the `_#value` method is
  2720. * directly or indirectly included in the build.
  2721. *
  2722. * In addition to lodash methods, wrappers have `Array` and `String` methods.
  2723. *
  2724. * The wrapper `Array` methods are:
  2725. * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
  2726. *
  2727. * The wrapper `String` methods are:
  2728. * `replace` and `split`
  2729. *
  2730. * The wrapper methods that support shortcut fusion are:
  2731. * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
  2732. * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
  2733. * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
  2734. *
  2735. * The chainable wrapper methods are:
  2736. * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
  2737. * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
  2738. * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
  2739. * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
  2740. * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
  2741. * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
  2742. * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
  2743. * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
  2744. * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
  2745. * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
  2746. * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
  2747. * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
  2748. * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
  2749. * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
  2750. * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
  2751. * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
  2752. * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
  2753. * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
  2754. * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
  2755. * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
  2756. * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
  2757. * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
  2758. * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
  2759. * `zipObject`, `zipObjectDeep`, and `zipWith`
  2760. *
  2761. * The wrapper methods that are **not** chainable by default are:
  2762. * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
  2763. * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
  2764. * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
  2765. * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
  2766. * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
  2767. * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
  2768. * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
  2769. * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
  2770. * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
  2771. * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
  2772. * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
  2773. * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
  2774. * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
  2775. * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
  2776. * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
  2777. * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
  2778. * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
  2779. * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
  2780. * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
  2781. * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
  2782. * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
  2783. * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
  2784. * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
  2785. * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
  2786. * `upperFirst`, `value`, and `words`
  2787. *
  2788. * @name _
  2789. * @constructor
  2790. * @category Seq
  2791. * @param {*} value The value to wrap in a `lodash` instance.
  2792. * @returns {Object} Returns the new `lodash` wrapper instance.
  2793. * @example
  2794. *
  2795. * function square(n) {
  2796. * return n * n;
  2797. * }
  2798. *
  2799. * var wrapped = _([1, 2, 3]);
  2800. *
  2801. * // Returns an unwrapped value.
  2802. * wrapped.reduce(_.add);
  2803. * // => 6
  2804. *
  2805. * // Returns a wrapped value.
  2806. * var squares = wrapped.map(square);
  2807. *
  2808. * _.isArray(squares);
  2809. * // => false
  2810. *
  2811. * _.isArray(squares.value());
  2812. * // => true
  2813. */
  2814. function lodash(value) {
  2815. if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
  2816. if (value instanceof LodashWrapper) {
  2817. return value;
  2818. }
  2819. if (hasOwnProperty.call(value, '__wrapped__')) {
  2820. return wrapperClone(value);
  2821. }
  2822. }
  2823. return new LodashWrapper(value);
  2824. }
  2825. /**
  2826. * The base implementation of `_.create` without support for assigning
  2827. * properties to the created object.
  2828. *
  2829. * @private
  2830. * @param {Object} proto The object to inherit from.
  2831. * @returns {Object} Returns the new object.
  2832. */
  2833. var baseCreate = (function() {
  2834. function object() {}
  2835. return function(proto) {
  2836. if (!isObject(proto)) {
  2837. return {};
  2838. }
  2839. if (objectCreate) {
  2840. return objectCreate(proto);
  2841. }
  2842. object.prototype = proto;
  2843. var result = new object;
  2844. object.prototype = undefined;
  2845. return result;
  2846. };
  2847. }());
  2848. /**
  2849. * The function whose prototype chain sequence wrappers inherit from.
  2850. *
  2851. * @private
  2852. */
  2853. function baseLodash() {
  2854. // No operation performed.
  2855. }
  2856. /**
  2857. * The base constructor for creating `lodash` wrapper objects.
  2858. *
  2859. * @private
  2860. * @param {*} value The value to wrap.
  2861. * @param {boolean} [chainAll] Enable explicit method chain sequences.
  2862. */
  2863. function LodashWrapper(value, chainAll) {
  2864. this.__wrapped__ = value;
  2865. this.__actions__ = [];
  2866. this.__chain__ = !!chainAll;
  2867. this.__index__ = 0;
  2868. this.__values__ = undefined;
  2869. }
  2870. /**
  2871. * By default, the template delimiters used by lodash are like those in
  2872. * embedded Ruby (ERB) as well as ES2015 template strings. Change the
  2873. * following template settings to use alternative delimiters.
  2874. *
  2875. * @static
  2876. * @memberOf _
  2877. * @type {Object}
  2878. */
  2879. lodash.templateSettings = {
  2880. /**
  2881. * Used to detect `data` property values to be HTML-escaped.
  2882. *
  2883. * @memberOf _.templateSettings
  2884. * @type {RegExp}
  2885. */
  2886. 'escape': reEscape,
  2887. /**
  2888. * Used to detect code to be evaluated.
  2889. *
  2890. * @memberOf _.templateSettings
  2891. * @type {RegExp}
  2892. */
  2893. 'evaluate': reEvaluate,
  2894. /**
  2895. * Used to detect `data` property values to inject.
  2896. *
  2897. * @memberOf _.templateSettings
  2898. * @type {RegExp}
  2899. */
  2900. 'interpolate': reInterpolate,
  2901. /**
  2902. * Used to reference the data object in the template text.
  2903. *
  2904. * @memberOf _.templateSettings
  2905. * @type {string}
  2906. */
  2907. 'variable': '',
  2908. /**
  2909. * Used to import variables into the compiled template.
  2910. *
  2911. * @memberOf _.templateSettings
  2912. * @type {Object}
  2913. */
  2914. 'imports': {
  2915. /**
  2916. * A reference to the `lodash` function.
  2917. *
  2918. * @memberOf _.templateSettings.imports
  2919. * @type {Function}
  2920. */
  2921. '_': lodash
  2922. }
  2923. };
  2924. // Ensure wrappers are instances of `baseLodash`.
  2925. lodash.prototype = baseLodash.prototype;
  2926. lodash.prototype.constructor = lodash;
  2927. LodashWrapper.prototype = baseCreate(baseLodash.prototype);
  2928. LodashWrapper.prototype.constructor = LodashWrapper;
  2929. /*------------------------------------------------------------------------*/
  2930. /**
  2931. * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
  2932. *
  2933. * @private
  2934. * @constructor
  2935. * @param {*} value The value to wrap.
  2936. */
  2937. function LazyWrapper(value) {
  2938. this.__wrapped__ = value;
  2939. this.__actions__ = [];
  2940. this.__dir__ = 1;
  2941. this.__filtered__ = false;
  2942. this.__iteratees__ = [];
  2943. this.__takeCount__ = MAX_ARRAY_LENGTH;
  2944. this.__views__ = [];
  2945. }
  2946. /**
  2947. * Creates a clone of the lazy wrapper object.
  2948. *
  2949. * @private
  2950. * @name clone
  2951. * @memberOf LazyWrapper
  2952. * @returns {Object} Returns the cloned `LazyWrapper` object.
  2953. */
  2954. function lazyClone() {
  2955. var result = new LazyWrapper(this.__wrapped__);
  2956. result.__actions__ = copyArray(this.__actions__);
  2957. result.__dir__ = this.__dir__;
  2958. result.__filtered__ = this.__filtered__;
  2959. result.__iteratees__ = copyArray(this.__iteratees__);
  2960. result.__takeCount__ = this.__takeCount__;
  2961. result.__views__ = copyArray(this.__views__);
  2962. return result;
  2963. }
  2964. /**
  2965. * Reverses the direction of lazy iteration.
  2966. *
  2967. * @private
  2968. * @name reverse
  2969. * @memberOf LazyWrapper
  2970. * @returns {Object} Returns the new reversed `LazyWrapper` object.
  2971. */
  2972. function lazyReverse() {
  2973. if (this.__filtered__) {
  2974. var result = new LazyWrapper(this);
  2975. result.__dir__ = -1;
  2976. result.__filtered__ = true;
  2977. } else {
  2978. result = this.clone();
  2979. result.__dir__ *= -1;
  2980. }
  2981. return result;
  2982. }
  2983. /**
  2984. * Extracts the unwrapped value from its lazy wrapper.
  2985. *
  2986. * @private
  2987. * @name value
  2988. * @memberOf LazyWrapper
  2989. * @returns {*} Returns the unwrapped value.
  2990. */
  2991. function lazyValue() {
  2992. var array = this.__wrapped__.value(),
  2993. dir = this.__dir__,
  2994. isArr = isArray(array),
  2995. isRight = dir < 0,
  2996. arrLength = isArr ? array.length : 0,
  2997. view = getView(0, arrLength, this.__views__),
  2998. start = view.start,
  2999. end = view.end,
  3000. length = end - start,
  3001. index = isRight ? end : (start - 1),
  3002. iteratees = this.__iteratees__,
  3003. iterLength = iteratees.length,
  3004. resIndex = 0,
  3005. takeCount = nativeMin(length, this.__takeCount__);
  3006. if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
  3007. return baseWrapperValue(array, this.__actions__);
  3008. }
  3009. var result = [];
  3010. outer:
  3011. while (length-- && resIndex < takeCount) {
  3012. index += dir;
  3013. var iterIndex = -1,
  3014. value = array[index];
  3015. while (++iterIndex < iterLength) {
  3016. var data = iteratees[iterIndex],
  3017. iteratee = data.iteratee,
  3018. type = data.type,
  3019. computed = iteratee(value);
  3020. if (type == LAZY_MAP_FLAG) {
  3021. value = computed;
  3022. } else if (!computed) {
  3023. if (type == LAZY_FILTER_FLAG) {
  3024. continue outer;
  3025. } else {
  3026. break outer;
  3027. }
  3028. }
  3029. }
  3030. result[resIndex++] = value;
  3031. }
  3032. return result;
  3033. }
  3034. // Ensure `LazyWrapper` is an instance of `baseLodash`.
  3035. LazyWrapper.prototype = baseCreate(baseLodash.prototype);
  3036. LazyWrapper.prototype.constructor = LazyWrapper;
  3037. /*------------------------------------------------------------------------*/
  3038. /**
  3039. * Creates a hash object.
  3040. *
  3041. * @private
  3042. * @constructor
  3043. * @param {Array} [entries] The key-value pairs to cache.
  3044. */
  3045. function Hash(entries) {
  3046. var index = -1,
  3047. length = entries == null ? 0 : entries.length;
  3048. this.clear();
  3049. while (++index < length) {
  3050. var entry = entries[index];
  3051. this.set(entry[0], entry[1]);
  3052. }
  3053. }
  3054. /**
  3055. * Removes all key-value entries from the hash.
  3056. *
  3057. * @private
  3058. * @name clear
  3059. * @memberOf Hash
  3060. */
  3061. function hashClear() {
  3062. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  3063. this.size = 0;
  3064. }
  3065. /**
  3066. * Removes `key` and its value from the hash.
  3067. *
  3068. * @private
  3069. * @name delete
  3070. * @memberOf Hash
  3071. * @param {Object} hash The hash to modify.
  3072. * @param {string} key The key of the value to remove.
  3073. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  3074. */
  3075. function hashDelete(key) {
  3076. var result = this.has(key) && delete this.__data__[key];
  3077. this.size -= result ? 1 : 0;
  3078. return result;
  3079. }
  3080. /**
  3081. * Gets the hash value for `key`.
  3082. *
  3083. * @private
  3084. * @name get
  3085. * @memberOf Hash
  3086. * @param {string} key The key of the value to get.
  3087. * @returns {*} Returns the entry value.
  3088. */
  3089. function hashGet(key) {
  3090. var data = this.__data__;
  3091. if (nativeCreate) {
  3092. var result = data[key];
  3093. return result === HASH_UNDEFINED ? undefined : result;
  3094. }
  3095. return hasOwnProperty.call(data, key) ? data[key] : undefined;
  3096. }
  3097. /**
  3098. * Checks if a hash value for `key` exists.
  3099. *
  3100. * @private
  3101. * @name has
  3102. * @memberOf Hash
  3103. * @param {string} key The key of the entry to check.
  3104. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  3105. */
  3106. function hashHas(key) {
  3107. var data = this.__data__;
  3108. return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
  3109. }
  3110. /**
  3111. * Sets the hash `key` to `value`.
  3112. *
  3113. * @private
  3114. * @name set
  3115. * @memberOf Hash
  3116. * @param {string} key The key of the value to set.
  3117. * @param {*} value The value to set.
  3118. * @returns {Object} Returns the hash instance.
  3119. */
  3120. function hashSet(key, value) {
  3121. var data = this.__data__;
  3122. this.size += this.has(key) ? 0 : 1;
  3123. data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
  3124. return this;
  3125. }
  3126. // Add methods to `Hash`.
  3127. Hash.prototype.clear = hashClear;
  3128. Hash.prototype['delete'] = hashDelete;
  3129. Hash.prototype.get = hashGet;
  3130. Hash.prototype.has = hashHas;
  3131. Hash.prototype.set = hashSet;
  3132. /*------------------------------------------------------------------------*/
  3133. /**
  3134. * Creates an list cache object.
  3135. *
  3136. * @private
  3137. * @constructor
  3138. * @param {Array} [entries] The key-value pairs to cache.
  3139. */
  3140. function ListCache(entries) {
  3141. var index = -1,
  3142. length = entries == null ? 0 : entries.length;
  3143. this.clear();
  3144. while (++index < length) {
  3145. var entry = entries[index];
  3146. this.set(entry[0], entry[1]);
  3147. }
  3148. }
  3149. /**
  3150. * Removes all key-value entries from the list cache.
  3151. *
  3152. * @private
  3153. * @name clear
  3154. * @memberOf ListCache
  3155. */
  3156. function listCacheClear() {
  3157. this.__data__ = [];
  3158. this.size = 0;
  3159. }
  3160. /**
  3161. * Removes `key` and its value from the list cache.
  3162. *
  3163. * @private
  3164. * @name delete
  3165. * @memberOf ListCache
  3166. * @param {string} key The key of the value to remove.
  3167. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  3168. */
  3169. function listCacheDelete(key) {
  3170. var data = this.__data__,
  3171. index = assocIndexOf(data, key);
  3172. if (index < 0) {
  3173. return false;
  3174. }
  3175. var lastIndex = data.length - 1;
  3176. if (index == lastIndex) {
  3177. data.pop();
  3178. } else {
  3179. splice.call(data, index, 1);
  3180. }
  3181. --this.size;
  3182. return true;
  3183. }
  3184. /**
  3185. * Gets the list cache value for `key`.
  3186. *
  3187. * @private
  3188. * @name get
  3189. * @memberOf ListCache
  3190. * @param {string} key The key of the value to get.
  3191. * @returns {*} Returns the entry value.
  3192. */
  3193. function listCacheGet(key) {
  3194. var data = this.__data__,
  3195. index = assocIndexOf(data, key);
  3196. return index < 0 ? undefined : data[index][1];
  3197. }
  3198. /**
  3199. * Checks if a list cache value for `key` exists.
  3200. *
  3201. * @private
  3202. * @name has
  3203. * @memberOf ListCache
  3204. * @param {string} key The key of the entry to check.
  3205. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  3206. */
  3207. function listCacheHas(key) {
  3208. return assocIndexOf(this.__data__, key) > -1;
  3209. }
  3210. /**
  3211. * Sets the list cache `key` to `value`.
  3212. *
  3213. * @private
  3214. * @name set
  3215. * @memberOf ListCache
  3216. * @param {string} key The key of the value to set.
  3217. * @param {*} value The value to set.
  3218. * @returns {Object} Returns the list cache instance.
  3219. */
  3220. function listCacheSet(key, value) {
  3221. var data = this.__data__,
  3222. index = assocIndexOf(data, key);
  3223. if (index < 0) {
  3224. ++this.size;
  3225. data.push([key, value]);
  3226. } else {
  3227. data[index][1] = value;
  3228. }
  3229. return this;
  3230. }
  3231. // Add methods to `ListCache`.
  3232. ListCache.prototype.clear = listCacheClear;
  3233. ListCache.prototype['delete'] = listCacheDelete;
  3234. ListCache.prototype.get = listCacheGet;
  3235. ListCache.prototype.has = listCacheHas;
  3236. ListCache.prototype.set = listCacheSet;
  3237. /*------------------------------------------------------------------------*/
  3238. /**
  3239. * Creates a map cache object to store key-value pairs.
  3240. *
  3241. * @private
  3242. * @constructor
  3243. * @param {Array} [entries] The key-value pairs to cache.
  3244. */
  3245. function MapCache(entries) {
  3246. var index = -1,
  3247. length = entries == null ? 0 : entries.length;
  3248. this.clear();
  3249. while (++index < length) {
  3250. var entry = entries[index];
  3251. this.set(entry[0], entry[1]);
  3252. }
  3253. }
  3254. /**
  3255. * Removes all key-value entries from the map.
  3256. *
  3257. * @private
  3258. * @name clear
  3259. * @memberOf MapCache
  3260. */
  3261. function mapCacheClear() {
  3262. this.size = 0;
  3263. this.__data__ = {
  3264. 'hash': new Hash,
  3265. 'map': new (Map || ListCache),
  3266. 'string': new Hash
  3267. };
  3268. }
  3269. /**
  3270. * Removes `key` and its value from the map.
  3271. *
  3272. * @private
  3273. * @name delete
  3274. * @memberOf MapCache
  3275. * @param {string} key The key of the value to remove.
  3276. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  3277. */
  3278. function mapCacheDelete(key) {
  3279. var result = getMapData(this, key)['delete'](key);
  3280. this.size -= result ? 1 : 0;
  3281. return result;
  3282. }
  3283. /**
  3284. * Gets the map value for `key`.
  3285. *
  3286. * @private
  3287. * @name get
  3288. * @memberOf MapCache
  3289. * @param {string} key The key of the value to get.
  3290. * @returns {*} Returns the entry value.
  3291. */
  3292. function mapCacheGet(key) {
  3293. return getMapData(this, key).get(key);
  3294. }
  3295. /**
  3296. * Checks if a map value for `key` exists.
  3297. *
  3298. * @private
  3299. * @name has
  3300. * @memberOf MapCache
  3301. * @param {string} key The key of the entry to check.
  3302. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  3303. */
  3304. function mapCacheHas(key) {
  3305. return getMapData(this, key).has(key);
  3306. }
  3307. /**
  3308. * Sets the map `key` to `value`.
  3309. *
  3310. * @private
  3311. * @name set
  3312. * @memberOf MapCache
  3313. * @param {string} key The key of the value to set.
  3314. * @param {*} value The value to set.
  3315. * @returns {Object} Returns the map cache instance.
  3316. */
  3317. function mapCacheSet(key, value) {
  3318. var data = getMapData(this, key),
  3319. size = data.size;
  3320. data.set(key, value);
  3321. this.size += data.size == size ? 0 : 1;
  3322. return this;
  3323. }
  3324. // Add methods to `MapCache`.
  3325. MapCache.prototype.clear = mapCacheClear;
  3326. MapCache.prototype['delete'] = mapCacheDelete;
  3327. MapCache.prototype.get = mapCacheGet;
  3328. MapCache.prototype.has = mapCacheHas;
  3329. MapCache.prototype.set = mapCacheSet;
  3330. /*------------------------------------------------------------------------*/
  3331. /**
  3332. *
  3333. * Creates an array cache object to store unique values.
  3334. *
  3335. * @private
  3336. * @constructor
  3337. * @param {Array} [values] The values to cache.
  3338. */
  3339. function SetCache(values) {
  3340. var index = -1,
  3341. length = values == null ? 0 : values.length;
  3342. this.__data__ = new MapCache;
  3343. while (++index < length) {
  3344. this.add(values[index]);
  3345. }
  3346. }
  3347. /**
  3348. * Adds `value` to the array cache.
  3349. *
  3350. * @private
  3351. * @name add
  3352. * @memberOf SetCache
  3353. * @alias push
  3354. * @param {*} value The value to cache.
  3355. * @returns {Object} Returns the cache instance.
  3356. */
  3357. function setCacheAdd(value) {
  3358. this.__data__.set(value, HASH_UNDEFINED);
  3359. return this;
  3360. }
  3361. /**
  3362. * Checks if `value` is in the array cache.
  3363. *
  3364. * @private
  3365. * @name has
  3366. * @memberOf SetCache
  3367. * @param {*} value The value to search for.
  3368. * @returns {number} Returns `true` if `value` is found, else `false`.
  3369. */
  3370. function setCacheHas(value) {
  3371. return this.__data__.has(value);
  3372. }
  3373. // Add methods to `SetCache`.
  3374. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
  3375. SetCache.prototype.has = setCacheHas;
  3376. /*------------------------------------------------------------------------*/
  3377. /**
  3378. * Creates a stack cache object to store key-value pairs.
  3379. *
  3380. * @private
  3381. * @constructor
  3382. * @param {Array} [entries] The key-value pairs to cache.
  3383. */
  3384. function Stack(entries) {
  3385. var data = this.__data__ = new ListCache(entries);
  3386. this.size = data.size;
  3387. }
  3388. /**
  3389. * Removes all key-value entries from the stack.
  3390. *
  3391. * @private
  3392. * @name clear
  3393. * @memberOf Stack
  3394. */
  3395. function stackClear() {
  3396. this.__data__ = new ListCache;
  3397. this.size = 0;
  3398. }
  3399. /**
  3400. * Removes `key` and its value from the stack.
  3401. *
  3402. * @private
  3403. * @name delete
  3404. * @memberOf Stack
  3405. * @param {string} key The key of the value to remove.
  3406. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  3407. */
  3408. function stackDelete(key) {
  3409. var data = this.__data__,
  3410. result = data['delete'](key);
  3411. this.size = data.size;
  3412. return result;
  3413. }
  3414. /**
  3415. * Gets the stack value for `key`.
  3416. *
  3417. * @private
  3418. * @name get
  3419. * @memberOf Stack
  3420. * @param {string} key The key of the value to get.
  3421. * @returns {*} Returns the entry value.
  3422. */
  3423. function stackGet(key) {
  3424. return this.__data__.get(key);
  3425. }
  3426. /**
  3427. * Checks if a stack value for `key` exists.
  3428. *
  3429. * @private
  3430. * @name has
  3431. * @memberOf Stack
  3432. * @param {string} key The key of the entry to check.
  3433. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  3434. */
  3435. function stackHas(key) {
  3436. return this.__data__.has(key);
  3437. }
  3438. /**
  3439. * Sets the stack `key` to `value`.
  3440. *
  3441. * @private
  3442. * @name set
  3443. * @memberOf Stack
  3444. * @param {string} key The key of the value to set.
  3445. * @param {*} value The value to set.
  3446. * @returns {Object} Returns the stack cache instance.
  3447. */
  3448. function stackSet(key, value) {
  3449. var data = this.__data__;
  3450. if (data instanceof ListCache) {
  3451. var pairs = data.__data__;
  3452. if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
  3453. pairs.push([key, value]);
  3454. this.size = ++data.size;
  3455. return this;
  3456. }
  3457. data = this.__data__ = new MapCache(pairs);
  3458. }
  3459. data.set(key, value);
  3460. this.size = data.size;
  3461. return this;
  3462. }
  3463. // Add methods to `Stack`.
  3464. Stack.prototype.clear = stackClear;
  3465. Stack.prototype['delete'] = stackDelete;
  3466. Stack.prototype.get = stackGet;
  3467. Stack.prototype.has = stackHas;
  3468. Stack.prototype.set = stackSet;
  3469. /*------------------------------------------------------------------------*/
  3470. /**
  3471. * Creates an array of the enumerable property names of the array-like `value`.
  3472. *
  3473. * @private
  3474. * @param {*} value The value to query.
  3475. * @param {boolean} inherited Specify returning inherited property names.
  3476. * @returns {Array} Returns the array of property names.
  3477. */
  3478. function arrayLikeKeys(value, inherited) {
  3479. var isArr = isArray(value),
  3480. isArg = !isArr && isArguments(value),
  3481. isBuff = !isArr && !isArg && isBuffer(value),
  3482. isType = !isArr && !isArg && !isBuff && isTypedArray(value),
  3483. skipIndexes = isArr || isArg || isBuff || isType,
  3484. result = skipIndexes ? baseTimes(value.length, String) : [],
  3485. length = result.length;
  3486. for (var key in value) {
  3487. if ((inherited || hasOwnProperty.call(value, key)) &&
  3488. !(skipIndexes && (
  3489. // Safari 9 has enumerable `arguments.length` in strict mode.
  3490. key == 'length' ||
  3491. // Node.js 0.10 has enumerable non-index properties on buffers.
  3492. (isBuff && (key == 'offset' || key == 'parent')) ||
  3493. // PhantomJS 2 has enumerable non-index properties on typed arrays.
  3494. (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
  3495. // Skip index properties.
  3496. isIndex(key, length)
  3497. ))) {
  3498. result.push(key);
  3499. }
  3500. }
  3501. return result;
  3502. }
  3503. /**
  3504. * A specialized version of `_.sample` for arrays.
  3505. *
  3506. * @private
  3507. * @param {Array} array The array to sample.
  3508. * @returns {*} Returns the random element.
  3509. */
  3510. function arraySample(array) {
  3511. var length = array.length;
  3512. return length ? array[baseRandom(0, length - 1)] : undefined;
  3513. }
  3514. /**
  3515. * A specialized version of `_.sampleSize` for arrays.
  3516. *
  3517. * @private
  3518. * @param {Array} array The array to sample.
  3519. * @param {number} n The number of elements to sample.
  3520. * @returns {Array} Returns the random elements.
  3521. */
  3522. function arraySampleSize(array, n) {
  3523. return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
  3524. }
  3525. /**
  3526. * A specialized version of `_.shuffle` for arrays.
  3527. *
  3528. * @private
  3529. * @param {Array} array The array to shuffle.
  3530. * @returns {Array} Returns the new shuffled array.
  3531. */
  3532. function arrayShuffle(array) {
  3533. return shuffleSelf(copyArray(array));
  3534. }
  3535. /**
  3536. * This function is like `assignValue` except that it doesn't assign
  3537. * `undefined` values.
  3538. *
  3539. * @private
  3540. * @param {Object} object The object to modify.
  3541. * @param {string} key The key of the property to assign.
  3542. * @param {*} value The value to assign.
  3543. */
  3544. function assignMergeValue(object, key, value) {
  3545. if ((value !== undefined && !eq(object[key], value)) ||
  3546. (value === undefined && !(key in object))) {
  3547. baseAssignValue(object, key, value);
  3548. }
  3549. }
  3550. /**
  3551. * Assigns `value` to `key` of `object` if the existing value is not equivalent
  3552. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  3553. * for equality comparisons.
  3554. *
  3555. * @private
  3556. * @param {Object} object The object to modify.
  3557. * @param {string} key The key of the property to assign.
  3558. * @param {*} value The value to assign.
  3559. */
  3560. function assignValue(object, key, value) {
  3561. var objValue = object[key];
  3562. if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
  3563. (value === undefined && !(key in object))) {
  3564. baseAssignValue(object, key, value);
  3565. }
  3566. }
  3567. /**
  3568. * Gets the index at which the `key` is found in `array` of key-value pairs.
  3569. *
  3570. * @private
  3571. * @param {Array} array The array to inspect.
  3572. * @param {*} key The key to search for.
  3573. * @returns {number} Returns the index of the matched value, else `-1`.
  3574. */
  3575. function assocIndexOf(array, key) {
  3576. var length = array.length;
  3577. while (length--) {
  3578. if (eq(array[length][0], key)) {
  3579. return length;
  3580. }
  3581. }
  3582. return -1;
  3583. }
  3584. /**
  3585. * Aggregates elements of `collection` on `accumulator` with keys transformed
  3586. * by `iteratee` and values set by `setter`.
  3587. *
  3588. * @private
  3589. * @param {Array|Object} collection The collection to iterate over.
  3590. * @param {Function} setter The function to set `accumulator` values.
  3591. * @param {Function} iteratee The iteratee to transform keys.
  3592. * @param {Object} accumulator The initial aggregated object.
  3593. * @returns {Function} Returns `accumulator`.
  3594. */
  3595. function baseAggregator(collection, setter, iteratee, accumulator) {
  3596. baseEach(collection, function(value, key, collection) {
  3597. setter(accumulator, value, iteratee(value), collection);
  3598. });
  3599. return accumulator;
  3600. }
  3601. /**
  3602. * The base implementation of `_.assign` without support for multiple sources
  3603. * or `customizer` functions.
  3604. *
  3605. * @private
  3606. * @param {Object} object The destination object.
  3607. * @param {Object} source The source object.
  3608. * @returns {Object} Returns `object`.
  3609. */
  3610. function baseAssign(object, source) {
  3611. return object && copyObject(source, keys(source), object);
  3612. }
  3613. /**
  3614. * The base implementation of `_.assignIn` without support for multiple sources
  3615. * or `customizer` functions.
  3616. *
  3617. * @private
  3618. * @param {Object} object The destination object.
  3619. * @param {Object} source The source object.
  3620. * @returns {Object} Returns `object`.
  3621. */
  3622. function baseAssignIn(object, source) {
  3623. return object && copyObject(source, keysIn(source), object);
  3624. }
  3625. /**
  3626. * The base implementation of `assignValue` and `assignMergeValue` without
  3627. * value checks.
  3628. *
  3629. * @private
  3630. * @param {Object} object The object to modify.
  3631. * @param {string} key The key of the property to assign.
  3632. * @param {*} value The value to assign.
  3633. */
  3634. function baseAssignValue(object, key, value) {
  3635. if (key == '__proto__' && defineProperty) {
  3636. defineProperty(object, key, {
  3637. 'configurable': true,
  3638. 'enumerable': true,
  3639. 'value': value,
  3640. 'writable': true
  3641. });
  3642. } else {
  3643. object[key] = value;
  3644. }
  3645. }
  3646. /**
  3647. * The base implementation of `_.at` without support for individual paths.
  3648. *
  3649. * @private
  3650. * @param {Object} object The object to iterate over.
  3651. * @param {string[]} paths The property paths to pick.
  3652. * @returns {Array} Returns the picked elements.
  3653. */
  3654. function baseAt(object, paths) {
  3655. var index = -1,
  3656. length = paths.length,
  3657. result = Array(length),
  3658. skip = object == null;
  3659. while (++index < length) {
  3660. result[index] = skip ? undefined : get(object, paths[index]);
  3661. }
  3662. return result;
  3663. }
  3664. /**
  3665. * The base implementation of `_.clamp` which doesn't coerce arguments.
  3666. *
  3667. * @private
  3668. * @param {number} number The number to clamp.
  3669. * @param {number} [lower] The lower bound.
  3670. * @param {number} upper The upper bound.
  3671. * @returns {number} Returns the clamped number.
  3672. */
  3673. function baseClamp(number, lower, upper) {
  3674. if (number === number) {
  3675. if (upper !== undefined) {
  3676. number = number <= upper ? number : upper;
  3677. }
  3678. if (lower !== undefined) {
  3679. number = number >= lower ? number : lower;
  3680. }
  3681. }
  3682. return number;
  3683. }
  3684. /**
  3685. * The base implementation of `_.clone` and `_.cloneDeep` which tracks
  3686. * traversed objects.
  3687. *
  3688. * @private
  3689. * @param {*} value The value to clone.
  3690. * @param {boolean} bitmask The bitmask flags.
  3691. * 1 - Deep clone
  3692. * 2 - Flatten inherited properties
  3693. * 4 - Clone symbols
  3694. * @param {Function} [customizer] The function to customize cloning.
  3695. * @param {string} [key] The key of `value`.
  3696. * @param {Object} [object] The parent object of `value`.
  3697. * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
  3698. * @returns {*} Returns the cloned value.
  3699. */
  3700. function baseClone(value, bitmask, customizer, key, object, stack) {
  3701. var result,
  3702. isDeep = bitmask & CLONE_DEEP_FLAG,
  3703. isFlat = bitmask & CLONE_FLAT_FLAG,
  3704. isFull = bitmask & CLONE_SYMBOLS_FLAG;
  3705. if (customizer) {
  3706. result = object ? customizer(value, key, object, stack) : customizer(value);
  3707. }
  3708. if (result !== undefined) {
  3709. return result;
  3710. }
  3711. if (!isObject(value)) {
  3712. return value;
  3713. }
  3714. var isArr = isArray(value);
  3715. if (isArr) {
  3716. result = initCloneArray(value);
  3717. if (!isDeep) {
  3718. return copyArray(value, result);
  3719. }
  3720. } else {
  3721. var tag = getTag(value),
  3722. isFunc = tag == funcTag || tag == genTag;
  3723. if (isBuffer(value)) {
  3724. return cloneBuffer(value, isDeep);
  3725. }
  3726. if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
  3727. result = (isFlat || isFunc) ? {} : initCloneObject(value);
  3728. if (!isDeep) {
  3729. return isFlat
  3730. ? copySymbolsIn(value, baseAssignIn(result, value))
  3731. : copySymbols(value, baseAssign(result, value));
  3732. }
  3733. } else {
  3734. if (!cloneableTags[tag]) {
  3735. return object ? value : {};
  3736. }
  3737. result = initCloneByTag(value, tag, isDeep);
  3738. }
  3739. }
  3740. // Check for circular references and return its corresponding clone.
  3741. stack || (stack = new Stack);
  3742. var stacked = stack.get(value);
  3743. if (stacked) {
  3744. return stacked;
  3745. }
  3746. stack.set(value, result);
  3747. if (isSet(value)) {
  3748. value.forEach(function(subValue) {
  3749. result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
  3750. });
  3751. } else if (isMap(value)) {
  3752. value.forEach(function(subValue, key) {
  3753. result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
  3754. });
  3755. }
  3756. var keysFunc = isFull
  3757. ? (isFlat ? getAllKeysIn : getAllKeys)
  3758. : (isFlat ? keysIn : keys);
  3759. var props = isArr ? undefined : keysFunc(value);
  3760. arrayEach(props || value, function(subValue, key) {
  3761. if (props) {
  3762. key = subValue;
  3763. subValue = value[key];
  3764. }
  3765. // Recursively populate clone (susceptible to call stack limits).
  3766. assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
  3767. });
  3768. return result;
  3769. }
  3770. /**
  3771. * The base implementation of `_.conforms` which doesn't clone `source`.
  3772. *
  3773. * @private
  3774. * @param {Object} source The object of property predicates to conform to.
  3775. * @returns {Function} Returns the new spec function.
  3776. */
  3777. function baseConforms(source) {
  3778. var props = keys(source);
  3779. return function(object) {
  3780. return baseConformsTo(object, source, props);
  3781. };
  3782. }
  3783. /**
  3784. * The base implementation of `_.conformsTo` which accepts `props` to check.
  3785. *
  3786. * @private
  3787. * @param {Object} object The object to inspect.
  3788. * @param {Object} source The object of property predicates to conform to.
  3789. * @returns {boolean} Returns `true` if `object` conforms, else `false`.
  3790. */
  3791. function baseConformsTo(object, source, props) {
  3792. var length = props.length;
  3793. if (object == null) {
  3794. return !length;
  3795. }
  3796. object = Object(object);
  3797. while (length--) {
  3798. var key = props[length],
  3799. predicate = source[key],
  3800. value = object[key];
  3801. if ((value === undefined && !(key in object)) || !predicate(value)) {
  3802. return false;
  3803. }
  3804. }
  3805. return true;
  3806. }
  3807. /**
  3808. * The base implementation of `_.delay` and `_.defer` which accepts `args`
  3809. * to provide to `func`.
  3810. *
  3811. * @private
  3812. * @param {Function} func The function to delay.
  3813. * @param {number} wait The number of milliseconds to delay invocation.
  3814. * @param {Array} args The arguments to provide to `func`.
  3815. * @returns {number|Object} Returns the timer id or timeout object.
  3816. */
  3817. function baseDelay(func, wait, args) {
  3818. if (typeof func != 'function') {
  3819. throw new TypeError(FUNC_ERROR_TEXT);
  3820. }
  3821. return setTimeout(function() { func.apply(undefined, args); }, wait);
  3822. }
  3823. /**
  3824. * The base implementation of methods like `_.difference` without support
  3825. * for excluding multiple arrays or iteratee shorthands.
  3826. *
  3827. * @private
  3828. * @param {Array} array The array to inspect.
  3829. * @param {Array} values The values to exclude.
  3830. * @param {Function} [iteratee] The iteratee invoked per element.
  3831. * @param {Function} [comparator] The comparator invoked per element.
  3832. * @returns {Array} Returns the new array of filtered values.
  3833. */
  3834. function baseDifference(array, values, iteratee, comparator) {
  3835. var index = -1,
  3836. includes = arrayIncludes,
  3837. isCommon = true,
  3838. length = array.length,
  3839. result = [],
  3840. valuesLength = values.length;
  3841. if (!length) {
  3842. return result;
  3843. }
  3844. if (iteratee) {
  3845. values = arrayMap(values, baseUnary(iteratee));
  3846. }
  3847. if (comparator) {
  3848. includes = arrayIncludesWith;
  3849. isCommon = false;
  3850. }
  3851. else if (values.length >= LARGE_ARRAY_SIZE) {
  3852. includes = cacheHas;
  3853. isCommon = false;
  3854. values = new SetCache(values);
  3855. }
  3856. outer:
  3857. while (++index < length) {
  3858. var value = array[index],
  3859. computed = iteratee == null ? value : iteratee(value);
  3860. value = (comparator || value !== 0) ? value : 0;
  3861. if (isCommon && computed === computed) {
  3862. var valuesIndex = valuesLength;
  3863. while (valuesIndex--) {
  3864. if (values[valuesIndex] === computed) {
  3865. continue outer;
  3866. }
  3867. }
  3868. result.push(value);
  3869. }
  3870. else if (!includes(values, computed, comparator)) {
  3871. result.push(value);
  3872. }
  3873. }
  3874. return result;
  3875. }
  3876. /**
  3877. * The base implementation of `_.forEach` without support for iteratee shorthands.
  3878. *
  3879. * @private
  3880. * @param {Array|Object} collection The collection to iterate over.
  3881. * @param {Function} iteratee The function invoked per iteration.
  3882. * @returns {Array|Object} Returns `collection`.
  3883. */
  3884. var baseEach = createBaseEach(baseForOwn);
  3885. /**
  3886. * The base implementation of `_.forEachRight` without support for iteratee shorthands.
  3887. *
  3888. * @private
  3889. * @param {Array|Object} collection The collection to iterate over.
  3890. * @param {Function} iteratee The function invoked per iteration.
  3891. * @returns {Array|Object} Returns `collection`.
  3892. */
  3893. var baseEachRight = createBaseEach(baseForOwnRight, true);
  3894. /**
  3895. * The base implementation of `_.every` without support for iteratee shorthands.
  3896. *
  3897. * @private
  3898. * @param {Array|Object} collection The collection to iterate over.
  3899. * @param {Function} predicate The function invoked per iteration.
  3900. * @returns {boolean} Returns `true` if all elements pass the predicate check,
  3901. * else `false`
  3902. */
  3903. function baseEvery(collection, predicate) {
  3904. var result = true;
  3905. baseEach(collection, function(value, index, collection) {
  3906. result = !!predicate(value, index, collection);
  3907. return result;
  3908. });
  3909. return result;
  3910. }
  3911. /**
  3912. * The base implementation of methods like `_.max` and `_.min` which accepts a
  3913. * `comparator` to determine the extremum value.
  3914. *
  3915. * @private
  3916. * @param {Array} array The array to iterate over.
  3917. * @param {Function} iteratee The iteratee invoked per iteration.
  3918. * @param {Function} comparator The comparator used to compare values.
  3919. * @returns {*} Returns the extremum value.
  3920. */
  3921. function baseExtremum(array, iteratee, comparator) {
  3922. var index = -1,
  3923. length = array.length;
  3924. while (++index < length) {
  3925. var value = array[index],
  3926. current = iteratee(value);
  3927. if (current != null && (computed === undefined
  3928. ? (current === current && !isSymbol(current))
  3929. : comparator(current, computed)
  3930. )) {
  3931. var computed = current,
  3932. result = value;
  3933. }
  3934. }
  3935. return result;
  3936. }
  3937. /**
  3938. * The base implementation of `_.fill` without an iteratee call guard.
  3939. *
  3940. * @private
  3941. * @param {Array} array The array to fill.
  3942. * @param {*} value The value to fill `array` with.
  3943. * @param {number} [start=0] The start position.
  3944. * @param {number} [end=array.length] The end position.
  3945. * @returns {Array} Returns `array`.
  3946. */
  3947. function baseFill(array, value, start, end) {
  3948. var length = array.length;
  3949. start = toInteger(start);
  3950. if (start < 0) {
  3951. start = -start > length ? 0 : (length + start);
  3952. }
  3953. end = (end === undefined || end > length) ? length : toInteger(end);
  3954. if (end < 0) {
  3955. end += length;
  3956. }
  3957. end = start > end ? 0 : toLength(end);
  3958. while (start < end) {
  3959. array[start++] = value;
  3960. }
  3961. return array;
  3962. }
  3963. /**
  3964. * The base implementation of `_.filter` without support for iteratee shorthands.
  3965. *
  3966. * @private
  3967. * @param {Array|Object} collection The collection to iterate over.
  3968. * @param {Function} predicate The function invoked per iteration.
  3969. * @returns {Array} Returns the new filtered array.
  3970. */
  3971. function baseFilter(collection, predicate) {
  3972. var result = [];
  3973. baseEach(collection, function(value, index, collection) {
  3974. if (predicate(value, index, collection)) {
  3975. result.push(value);
  3976. }
  3977. });
  3978. return result;
  3979. }
  3980. /**
  3981. * The base implementation of `_.flatten` with support for restricting flattening.
  3982. *
  3983. * @private
  3984. * @param {Array} array The array to flatten.
  3985. * @param {number} depth The maximum recursion depth.
  3986. * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
  3987. * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
  3988. * @param {Array} [result=[]] The initial result value.
  3989. * @returns {Array} Returns the new flattened array.
  3990. */
  3991. function baseFlatten(array, depth, predicate, isStrict, result) {
  3992. var index = -1,
  3993. length = array.length;
  3994. predicate || (predicate = isFlattenable);
  3995. result || (result = []);
  3996. while (++index < length) {
  3997. var value = array[index];
  3998. if (depth > 0 && predicate(value)) {
  3999. if (depth > 1) {
  4000. // Recursively flatten arrays (susceptible to call stack limits).
  4001. baseFlatten(value, depth - 1, predicate, isStrict, result);
  4002. } else {
  4003. arrayPush(result, value);
  4004. }
  4005. } else if (!isStrict) {
  4006. result[result.length] = value;
  4007. }
  4008. }
  4009. return result;
  4010. }
  4011. /**
  4012. * The base implementation of `baseForOwn` which iterates over `object`
  4013. * properties returned by `keysFunc` and invokes `iteratee` for each property.
  4014. * Iteratee functions may exit iteration early by explicitly returning `false`.
  4015. *
  4016. * @private
  4017. * @param {Object} object The object to iterate over.
  4018. * @param {Function} iteratee The function invoked per iteration.
  4019. * @param {Function} keysFunc The function to get the keys of `object`.
  4020. * @returns {Object} Returns `object`.
  4021. */
  4022. var baseFor = createBaseFor();
  4023. /**
  4024. * This function is like `baseFor` except that it iterates over properties
  4025. * in the opposite order.
  4026. *
  4027. * @private
  4028. * @param {Object} object The object to iterate over.
  4029. * @param {Function} iteratee The function invoked per iteration.
  4030. * @param {Function} keysFunc The function to get the keys of `object`.
  4031. * @returns {Object} Returns `object`.
  4032. */
  4033. var baseForRight = createBaseFor(true);
  4034. /**
  4035. * The base implementation of `_.forOwn` without support for iteratee shorthands.
  4036. *
  4037. * @private
  4038. * @param {Object} object The object to iterate over.
  4039. * @param {Function} iteratee The function invoked per iteration.
  4040. * @returns {Object} Returns `object`.
  4041. */
  4042. function baseForOwn(object, iteratee) {
  4043. return object && baseFor(object, iteratee, keys);
  4044. }
  4045. /**
  4046. * The base implementation of `_.forOwnRight` without support for iteratee shorthands.
  4047. *
  4048. * @private
  4049. * @param {Object} object The object to iterate over.
  4050. * @param {Function} iteratee The function invoked per iteration.
  4051. * @returns {Object} Returns `object`.
  4052. */
  4053. function baseForOwnRight(object, iteratee) {
  4054. return object && baseForRight(object, iteratee, keys);
  4055. }
  4056. /**
  4057. * The base implementation of `_.functions` which creates an array of
  4058. * `object` function property names filtered from `props`.
  4059. *
  4060. * @private
  4061. * @param {Object} object The object to inspect.
  4062. * @param {Array} props The property names to filter.
  4063. * @returns {Array} Returns the function names.
  4064. */
  4065. function baseFunctions(object, props) {
  4066. return arrayFilter(props, function(key) {
  4067. return isFunction(object[key]);
  4068. });
  4069. }
  4070. /**
  4071. * The base implementation of `_.get` without support for default values.
  4072. *
  4073. * @private
  4074. * @param {Object} object The object to query.
  4075. * @param {Array|string} path The path of the property to get.
  4076. * @returns {*} Returns the resolved value.
  4077. */
  4078. function baseGet(object, path) {
  4079. path = castPath(path, object);
  4080. var index = 0,
  4081. length = path.length;
  4082. while (object != null && index < length) {
  4083. object = object[toKey(path[index++])];
  4084. }
  4085. return (index && index == length) ? object : undefined;
  4086. }
  4087. /**
  4088. * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
  4089. * `keysFunc` and `symbolsFunc` to get the enumerable property names and
  4090. * symbols of `object`.
  4091. *
  4092. * @private
  4093. * @param {Object} object The object to query.
  4094. * @param {Function} keysFunc The function to get the keys of `object`.
  4095. * @param {Function} symbolsFunc The function to get the symbols of `object`.
  4096. * @returns {Array} Returns the array of property names and symbols.
  4097. */
  4098. function baseGetAllKeys(object, keysFunc, symbolsFunc) {
  4099. var result = keysFunc(object);
  4100. return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
  4101. }
  4102. /**
  4103. * The base implementation of `getTag` without fallbacks for buggy environments.
  4104. *
  4105. * @private
  4106. * @param {*} value The value to query.
  4107. * @returns {string} Returns the `toStringTag`.
  4108. */
  4109. function baseGetTag(value) {
  4110. if (value == null) {
  4111. return value === undefined ? undefinedTag : nullTag;
  4112. }
  4113. return (symToStringTag && symToStringTag in Object(value))
  4114. ? getRawTag(value)
  4115. : objectToString(value);
  4116. }
  4117. /**
  4118. * The base implementation of `_.gt` which doesn't coerce arguments.
  4119. *
  4120. * @private
  4121. * @param {*} value The value to compare.
  4122. * @param {*} other The other value to compare.
  4123. * @returns {boolean} Returns `true` if `value` is greater than `other`,
  4124. * else `false`.
  4125. */
  4126. function baseGt(value, other) {
  4127. return value > other;
  4128. }
  4129. /**
  4130. * The base implementation of `_.has` without support for deep paths.
  4131. *
  4132. * @private
  4133. * @param {Object} [object] The object to query.
  4134. * @param {Array|string} key The key to check.
  4135. * @returns {boolean} Returns `true` if `key` exists, else `false`.
  4136. */
  4137. function baseHas(object, key) {
  4138. return object != null && hasOwnProperty.call(object, key);
  4139. }
  4140. /**
  4141. * The base implementation of `_.hasIn` without support for deep paths.
  4142. *
  4143. * @private
  4144. * @param {Object} [object] The object to query.
  4145. * @param {Array|string} key The key to check.
  4146. * @returns {boolean} Returns `true` if `key` exists, else `false`.
  4147. */
  4148. function baseHasIn(object, key) {
  4149. return object != null && key in Object(object);
  4150. }
  4151. /**
  4152. * The base implementation of `_.inRange` which doesn't coerce arguments.
  4153. *
  4154. * @private
  4155. * @param {number} number The number to check.
  4156. * @param {number} start The start of the range.
  4157. * @param {number} end The end of the range.
  4158. * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
  4159. */
  4160. function baseInRange(number, start, end) {
  4161. return number >= nativeMin(start, end) && number < nativeMax(start, end);
  4162. }
  4163. /**
  4164. * The base implementation of methods like `_.intersection`, without support
  4165. * for iteratee shorthands, that accepts an array of arrays to inspect.
  4166. *
  4167. * @private
  4168. * @param {Array} arrays The arrays to inspect.
  4169. * @param {Function} [iteratee] The iteratee invoked per element.
  4170. * @param {Function} [comparator] The comparator invoked per element.
  4171. * @returns {Array} Returns the new array of shared values.
  4172. */
  4173. function baseIntersection(arrays, iteratee, comparator) {
  4174. var includes = comparator ? arrayIncludesWith : arrayIncludes,
  4175. length = arrays[0].length,
  4176. othLength = arrays.length,
  4177. othIndex = othLength,
  4178. caches = Array(othLength),
  4179. maxLength = Infinity,
  4180. result = [];
  4181. while (othIndex--) {
  4182. var array = arrays[othIndex];
  4183. if (othIndex && iteratee) {
  4184. array = arrayMap(array, baseUnary(iteratee));
  4185. }
  4186. maxLength = nativeMin(array.length, maxLength);
  4187. caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
  4188. ? new SetCache(othIndex && array)
  4189. : undefined;
  4190. }
  4191. array = arrays[0];
  4192. var index = -1,
  4193. seen = caches[0];
  4194. outer:
  4195. while (++index < length && result.length < maxLength) {
  4196. var value = array[index],
  4197. computed = iteratee ? iteratee(value) : value;
  4198. value = (comparator || value !== 0) ? value : 0;
  4199. if (!(seen
  4200. ? cacheHas(seen, computed)
  4201. : includes(result, computed, comparator)
  4202. )) {
  4203. othIndex = othLength;
  4204. while (--othIndex) {
  4205. var cache = caches[othIndex];
  4206. if (!(cache
  4207. ? cacheHas(cache, computed)
  4208. : includes(arrays[othIndex], computed, comparator))
  4209. ) {
  4210. continue outer;
  4211. }
  4212. }
  4213. if (seen) {
  4214. seen.push(computed);
  4215. }
  4216. result.push(value);
  4217. }
  4218. }
  4219. return result;
  4220. }
  4221. /**
  4222. * The base implementation of `_.invert` and `_.invertBy` which inverts
  4223. * `object` with values transformed by `iteratee` and set by `setter`.
  4224. *
  4225. * @private
  4226. * @param {Object} object The object to iterate over.
  4227. * @param {Function} setter The function to set `accumulator` values.
  4228. * @param {Function} iteratee The iteratee to transform values.
  4229. * @param {Object} accumulator The initial inverted object.
  4230. * @returns {Function} Returns `accumulator`.
  4231. */
  4232. function baseInverter(object, setter, iteratee, accumulator) {
  4233. baseForOwn(object, function(value, key, object) {
  4234. setter(accumulator, iteratee(value), key, object);
  4235. });
  4236. return accumulator;
  4237. }
  4238. /**
  4239. * The base implementation of `_.invoke` without support for individual
  4240. * method arguments.
  4241. *
  4242. * @private
  4243. * @param {Object} object The object to query.
  4244. * @param {Array|string} path The path of the method to invoke.
  4245. * @param {Array} args The arguments to invoke the method with.
  4246. * @returns {*} Returns the result of the invoked method.
  4247. */
  4248. function baseInvoke(object, path, args) {
  4249. path = castPath(path, object);
  4250. object = parent(object, path);
  4251. var func = object == null ? object : object[toKey(last(path))];
  4252. return func == null ? undefined : apply(func, object, args);
  4253. }
  4254. /**
  4255. * The base implementation of `_.isArguments`.
  4256. *
  4257. * @private
  4258. * @param {*} value The value to check.
  4259. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  4260. */
  4261. function baseIsArguments(value) {
  4262. return isObjectLike(value) && baseGetTag(value) == argsTag;
  4263. }
  4264. /**
  4265. * The base implementation of `_.isArrayBuffer` without Node.js optimizations.
  4266. *
  4267. * @private
  4268. * @param {*} value The value to check.
  4269. * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
  4270. */
  4271. function baseIsArrayBuffer(value) {
  4272. return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
  4273. }
  4274. /**
  4275. * The base implementation of `_.isDate` without Node.js optimizations.
  4276. *
  4277. * @private
  4278. * @param {*} value The value to check.
  4279. * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
  4280. */
  4281. function baseIsDate(value) {
  4282. return isObjectLike(value) && baseGetTag(value) == dateTag;
  4283. }
  4284. /**
  4285. * The base implementation of `_.isEqual` which supports partial comparisons
  4286. * and tracks traversed objects.
  4287. *
  4288. * @private
  4289. * @param {*} value The value to compare.
  4290. * @param {*} other The other value to compare.
  4291. * @param {boolean} bitmask The bitmask flags.
  4292. * 1 - Unordered comparison
  4293. * 2 - Partial comparison
  4294. * @param {Function} [customizer] The function to customize comparisons.
  4295. * @param {Object} [stack] Tracks traversed `value` and `other` objects.
  4296. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  4297. */
  4298. function baseIsEqual(value, other, bitmask, customizer, stack) {
  4299. if (value === other) {
  4300. return true;
  4301. }
  4302. if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
  4303. return value !== value && other !== other;
  4304. }
  4305. return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
  4306. }
  4307. /**
  4308. * A specialized version of `baseIsEqual` for arrays and objects which performs
  4309. * deep comparisons and tracks traversed objects enabling objects with circular
  4310. * references to be compared.
  4311. *
  4312. * @private
  4313. * @param {Object} object The object to compare.
  4314. * @param {Object} other The other object to compare.
  4315. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  4316. * @param {Function} customizer The function to customize comparisons.
  4317. * @param {Function} equalFunc The function to determine equivalents of values.
  4318. * @param {Object} [stack] Tracks traversed `object` and `other` objects.
  4319. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  4320. */
  4321. function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
  4322. var objIsArr = isArray(object),
  4323. othIsArr = isArray(other),
  4324. objTag = objIsArr ? arrayTag : getTag(object),
  4325. othTag = othIsArr ? arrayTag : getTag(other);
  4326. objTag = objTag == argsTag ? objectTag : objTag;
  4327. othTag = othTag == argsTag ? objectTag : othTag;
  4328. var objIsObj = objTag == objectTag,
  4329. othIsObj = othTag == objectTag,
  4330. isSameTag = objTag == othTag;
  4331. if (isSameTag && isBuffer(object)) {
  4332. if (!isBuffer(other)) {
  4333. return false;
  4334. }
  4335. objIsArr = true;
  4336. objIsObj = false;
  4337. }
  4338. if (isSameTag && !objIsObj) {
  4339. stack || (stack = new Stack);
  4340. return (objIsArr || isTypedArray(object))
  4341. ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
  4342. : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
  4343. }
  4344. if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
  4345. var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
  4346. othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
  4347. if (objIsWrapped || othIsWrapped) {
  4348. var objUnwrapped = objIsWrapped ? object.value() : object,
  4349. othUnwrapped = othIsWrapped ? other.value() : other;
  4350. stack || (stack = new Stack);
  4351. return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
  4352. }
  4353. }
  4354. if (!isSameTag) {
  4355. return false;
  4356. }
  4357. stack || (stack = new Stack);
  4358. return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
  4359. }
  4360. /**
  4361. * The base implementation of `_.isMap` without Node.js optimizations.
  4362. *
  4363. * @private
  4364. * @param {*} value The value to check.
  4365. * @returns {boolean} Returns `true` if `value` is a map, else `false`.
  4366. */
  4367. function baseIsMap(value) {
  4368. return isObjectLike(value) && getTag(value) == mapTag;
  4369. }
  4370. /**
  4371. * The base implementation of `_.isMatch` without support for iteratee shorthands.
  4372. *
  4373. * @private
  4374. * @param {Object} object The object to inspect.
  4375. * @param {Object} source The object of property values to match.
  4376. * @param {Array} matchData The property names, values, and compare flags to match.
  4377. * @param {Function} [customizer] The function to customize comparisons.
  4378. * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  4379. */
  4380. function baseIsMatch(object, source, matchData, customizer) {
  4381. var index = matchData.length,
  4382. length = index,
  4383. noCustomizer = !customizer;
  4384. if (object == null) {
  4385. return !length;
  4386. }
  4387. object = Object(object);
  4388. while (index--) {
  4389. var data = matchData[index];
  4390. if ((noCustomizer && data[2])
  4391. ? data[1] !== object[data[0]]
  4392. : !(data[0] in object)
  4393. ) {
  4394. return false;
  4395. }
  4396. }
  4397. while (++index < length) {
  4398. data = matchData[index];
  4399. var key = data[0],
  4400. objValue = object[key],
  4401. srcValue = data[1];
  4402. if (noCustomizer && data[2]) {
  4403. if (objValue === undefined && !(key in object)) {
  4404. return false;
  4405. }
  4406. } else {
  4407. var stack = new Stack;
  4408. if (customizer) {
  4409. var result = customizer(objValue, srcValue, key, object, source, stack);
  4410. }
  4411. if (!(result === undefined
  4412. ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
  4413. : result
  4414. )) {
  4415. return false;
  4416. }
  4417. }
  4418. }
  4419. return true;
  4420. }
  4421. /**
  4422. * The base implementation of `_.isNative` without bad shim checks.
  4423. *
  4424. * @private
  4425. * @param {*} value The value to check.
  4426. * @returns {boolean} Returns `true` if `value` is a native function,
  4427. * else `false`.
  4428. */
  4429. function baseIsNative(value) {
  4430. if (!isObject(value) || isMasked(value)) {
  4431. return false;
  4432. }
  4433. var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
  4434. return pattern.test(toSource(value));
  4435. }
  4436. /**
  4437. * The base implementation of `_.isRegExp` without Node.js optimizations.
  4438. *
  4439. * @private
  4440. * @param {*} value The value to check.
  4441. * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
  4442. */
  4443. function baseIsRegExp(value) {
  4444. return isObjectLike(value) && baseGetTag(value) == regexpTag;
  4445. }
  4446. /**
  4447. * The base implementation of `_.isSet` without Node.js optimizations.
  4448. *
  4449. * @private
  4450. * @param {*} value The value to check.
  4451. * @returns {boolean} Returns `true` if `value` is a set, else `false`.
  4452. */
  4453. function baseIsSet(value) {
  4454. return isObjectLike(value) && getTag(value) == setTag;
  4455. }
  4456. /**
  4457. * The base implementation of `_.isTypedArray` without Node.js optimizations.
  4458. *
  4459. * @private
  4460. * @param {*} value The value to check.
  4461. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  4462. */
  4463. function baseIsTypedArray(value) {
  4464. return isObjectLike(value) &&
  4465. isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
  4466. }
  4467. /**
  4468. * The base implementation of `_.iteratee`.
  4469. *
  4470. * @private
  4471. * @param {*} [value=_.identity] The value to convert to an iteratee.
  4472. * @returns {Function} Returns the iteratee.
  4473. */
  4474. function baseIteratee(value) {
  4475. // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
  4476. // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
  4477. if (typeof value == 'function') {
  4478. return value;
  4479. }
  4480. if (value == null) {
  4481. return identity;
  4482. }
  4483. if (typeof value == 'object') {
  4484. return isArray(value)
  4485. ? baseMatchesProperty(value[0], value[1])
  4486. : baseMatches(value);
  4487. }
  4488. return property(value);
  4489. }
  4490. /**
  4491. * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
  4492. *
  4493. * @private
  4494. * @param {Object} object The object to query.
  4495. * @returns {Array} Returns the array of property names.
  4496. */
  4497. function baseKeys(object) {
  4498. if (!isPrototype(object)) {
  4499. return nativeKeys(object);
  4500. }
  4501. var result = [];
  4502. for (var key in Object(object)) {
  4503. if (hasOwnProperty.call(object, key) && key != 'constructor') {
  4504. result.push(key);
  4505. }
  4506. }
  4507. return result;
  4508. }
  4509. /**
  4510. * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
  4511. *
  4512. * @private
  4513. * @param {Object} object The object to query.
  4514. * @returns {Array} Returns the array of property names.
  4515. */
  4516. function baseKeysIn(object) {
  4517. if (!isObject(object)) {
  4518. return nativeKeysIn(object);
  4519. }
  4520. var isProto = isPrototype(object),
  4521. result = [];
  4522. for (var key in object) {
  4523. if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
  4524. result.push(key);
  4525. }
  4526. }
  4527. return result;
  4528. }
  4529. /**
  4530. * The base implementation of `_.lt` which doesn't coerce arguments.
  4531. *
  4532. * @private
  4533. * @param {*} value The value to compare.
  4534. * @param {*} other The other value to compare.
  4535. * @returns {boolean} Returns `true` if `value` is less than `other`,
  4536. * else `false`.
  4537. */
  4538. function baseLt(value, other) {
  4539. return value < other;
  4540. }
  4541. /**
  4542. * The base implementation of `_.map` without support for iteratee shorthands.
  4543. *
  4544. * @private
  4545. * @param {Array|Object} collection The collection to iterate over.
  4546. * @param {Function} iteratee The function invoked per iteration.
  4547. * @returns {Array} Returns the new mapped array.
  4548. */
  4549. function baseMap(collection, iteratee) {
  4550. var index = -1,
  4551. result = isArrayLike(collection) ? Array(collection.length) : [];
  4552. baseEach(collection, function(value, key, collection) {
  4553. result[++index] = iteratee(value, key, collection);
  4554. });
  4555. return result;
  4556. }
  4557. /**
  4558. * The base implementation of `_.matches` which doesn't clone `source`.
  4559. *
  4560. * @private
  4561. * @param {Object} source The object of property values to match.
  4562. * @returns {Function} Returns the new spec function.
  4563. */
  4564. function baseMatches(source) {
  4565. var matchData = getMatchData(source);
  4566. if (matchData.length == 1 && matchData[0][2]) {
  4567. return matchesStrictComparable(matchData[0][0], matchData[0][1]);
  4568. }
  4569. return function(object) {
  4570. return object === source || baseIsMatch(object, source, matchData);
  4571. };
  4572. }
  4573. /**
  4574. * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
  4575. *
  4576. * @private
  4577. * @param {string} path The path of the property to get.
  4578. * @param {*} srcValue The value to match.
  4579. * @returns {Function} Returns the new spec function.
  4580. */
  4581. function baseMatchesProperty(path, srcValue) {
  4582. if (isKey(path) && isStrictComparable(srcValue)) {
  4583. return matchesStrictComparable(toKey(path), srcValue);
  4584. }
  4585. return function(object) {
  4586. var objValue = get(object, path);
  4587. return (objValue === undefined && objValue === srcValue)
  4588. ? hasIn(object, path)
  4589. : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
  4590. };
  4591. }
  4592. /**
  4593. * The base implementation of `_.merge` without support for multiple sources.
  4594. *
  4595. * @private
  4596. * @param {Object} object The destination object.
  4597. * @param {Object} source The source object.
  4598. * @param {number} srcIndex The index of `source`.
  4599. * @param {Function} [customizer] The function to customize merged values.
  4600. * @param {Object} [stack] Tracks traversed source values and their merged
  4601. * counterparts.
  4602. */
  4603. function baseMerge(object, source, srcIndex, customizer, stack) {
  4604. if (object === source) {
  4605. return;
  4606. }
  4607. baseFor(source, function(srcValue, key) {
  4608. stack || (stack = new Stack);
  4609. if (isObject(srcValue)) {
  4610. baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
  4611. }
  4612. else {
  4613. var newValue = customizer
  4614. ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
  4615. : undefined;
  4616. if (newValue === undefined) {
  4617. newValue = srcValue;
  4618. }
  4619. assignMergeValue(object, key, newValue);
  4620. }
  4621. }, keysIn);
  4622. }
  4623. /**
  4624. * A specialized version of `baseMerge` for arrays and objects which performs
  4625. * deep merges and tracks traversed objects enabling objects with circular
  4626. * references to be merged.
  4627. *
  4628. * @private
  4629. * @param {Object} object The destination object.
  4630. * @param {Object} source The source object.
  4631. * @param {string} key The key of the value to merge.
  4632. * @param {number} srcIndex The index of `source`.
  4633. * @param {Function} mergeFunc The function to merge values.
  4634. * @param {Function} [customizer] The function to customize assigned values.
  4635. * @param {Object} [stack] Tracks traversed source values and their merged
  4636. * counterparts.
  4637. */
  4638. function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
  4639. var objValue = safeGet(object, key),
  4640. srcValue = safeGet(source, key),
  4641. stacked = stack.get(srcValue);
  4642. if (stacked) {
  4643. assignMergeValue(object, key, stacked);
  4644. return;
  4645. }
  4646. var newValue = customizer
  4647. ? customizer(objValue, srcValue, (key + ''), object, source, stack)
  4648. : undefined;
  4649. var isCommon = newValue === undefined;
  4650. if (isCommon) {
  4651. var isArr = isArray(srcValue),
  4652. isBuff = !isArr && isBuffer(srcValue),
  4653. isTyped = !isArr && !isBuff && isTypedArray(srcValue);
  4654. newValue = srcValue;
  4655. if (isArr || isBuff || isTyped) {
  4656. if (isArray(objValue)) {
  4657. newValue = objValue;
  4658. }
  4659. else if (isArrayLikeObject(objValue)) {
  4660. newValue = copyArray(objValue);
  4661. }
  4662. else if (isBuff) {
  4663. isCommon = false;
  4664. newValue = cloneBuffer(srcValue, true);
  4665. }
  4666. else if (isTyped) {
  4667. isCommon = false;
  4668. newValue = cloneTypedArray(srcValue, true);
  4669. }
  4670. else {
  4671. newValue = [];
  4672. }
  4673. }
  4674. else if (isPlainObject(srcValue) || isArguments(srcValue)) {
  4675. newValue = objValue;
  4676. if (isArguments(objValue)) {
  4677. newValue = toPlainObject(objValue);
  4678. }
  4679. else if (!isObject(objValue) || isFunction(objValue)) {
  4680. newValue = initCloneObject(srcValue);
  4681. }
  4682. }
  4683. else {
  4684. isCommon = false;
  4685. }
  4686. }
  4687. if (isCommon) {
  4688. // Recursively merge objects and arrays (susceptible to call stack limits).
  4689. stack.set(srcValue, newValue);
  4690. mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
  4691. stack['delete'](srcValue);
  4692. }
  4693. assignMergeValue(object, key, newValue);
  4694. }
  4695. /**
  4696. * The base implementation of `_.nth` which doesn't coerce arguments.
  4697. *
  4698. * @private
  4699. * @param {Array} array The array to query.
  4700. * @param {number} n The index of the element to return.
  4701. * @returns {*} Returns the nth element of `array`.
  4702. */
  4703. function baseNth(array, n) {
  4704. var length = array.length;
  4705. if (!length) {
  4706. return;
  4707. }
  4708. n += n < 0 ? length : 0;
  4709. return isIndex(n, length) ? array[n] : undefined;
  4710. }
  4711. /**
  4712. * The base implementation of `_.orderBy` without param guards.
  4713. *
  4714. * @private
  4715. * @param {Array|Object} collection The collection to iterate over.
  4716. * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
  4717. * @param {string[]} orders The sort orders of `iteratees`.
  4718. * @returns {Array} Returns the new sorted array.
  4719. */
  4720. function baseOrderBy(collection, iteratees, orders) {
  4721. if (iteratees.length) {
  4722. iteratees = arrayMap(iteratees, function(iteratee) {
  4723. if (isArray(iteratee)) {
  4724. return function(value) {
  4725. return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
  4726. }
  4727. }
  4728. return iteratee;
  4729. });
  4730. } else {
  4731. iteratees = [identity];
  4732. }
  4733. var index = -1;
  4734. iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
  4735. var result = baseMap(collection, function(value, key, collection) {
  4736. var criteria = arrayMap(iteratees, function(iteratee) {
  4737. return iteratee(value);
  4738. });
  4739. return { 'criteria': criteria, 'index': ++index, 'value': value };
  4740. });
  4741. return baseSortBy(result, function(object, other) {
  4742. return compareMultiple(object, other, orders);
  4743. });
  4744. }
  4745. /**
  4746. * The base implementation of `_.pick` without support for individual
  4747. * property identifiers.
  4748. *
  4749. * @private
  4750. * @param {Object} object The source object.
  4751. * @param {string[]} paths The property paths to pick.
  4752. * @returns {Object} Returns the new object.
  4753. */
  4754. function basePick(object, paths) {
  4755. return basePickBy(object, paths, function(value, path) {
  4756. return hasIn(object, path);
  4757. });
  4758. }
  4759. /**
  4760. * The base implementation of `_.pickBy` without support for iteratee shorthands.
  4761. *
  4762. * @private
  4763. * @param {Object} object The source object.
  4764. * @param {string[]} paths The property paths to pick.
  4765. * @param {Function} predicate The function invoked per property.
  4766. * @returns {Object} Returns the new object.
  4767. */
  4768. function basePickBy(object, paths, predicate) {
  4769. var index = -1,
  4770. length = paths.length,
  4771. result = {};
  4772. while (++index < length) {
  4773. var path = paths[index],
  4774. value = baseGet(object, path);
  4775. if (predicate(value, path)) {
  4776. baseSet(result, castPath(path, object), value);
  4777. }
  4778. }
  4779. return result;
  4780. }
  4781. /**
  4782. * A specialized version of `baseProperty` which supports deep paths.
  4783. *
  4784. * @private
  4785. * @param {Array|string} path The path of the property to get.
  4786. * @returns {Function} Returns the new accessor function.
  4787. */
  4788. function basePropertyDeep(path) {
  4789. return function(object) {
  4790. return baseGet(object, path);
  4791. };
  4792. }
  4793. /**
  4794. * The base implementation of `_.pullAllBy` without support for iteratee
  4795. * shorthands.
  4796. *
  4797. * @private
  4798. * @param {Array} array The array to modify.
  4799. * @param {Array} values The values to remove.
  4800. * @param {Function} [iteratee] The iteratee invoked per element.
  4801. * @param {Function} [comparator] The comparator invoked per element.
  4802. * @returns {Array} Returns `array`.
  4803. */
  4804. function basePullAll(array, values, iteratee, comparator) {
  4805. var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
  4806. index = -1,
  4807. length = values.length,
  4808. seen = array;
  4809. if (array === values) {
  4810. values = copyArray(values);
  4811. }
  4812. if (iteratee) {
  4813. seen = arrayMap(array, baseUnary(iteratee));
  4814. }
  4815. while (++index < length) {
  4816. var fromIndex = 0,
  4817. value = values[index],
  4818. computed = iteratee ? iteratee(value) : value;
  4819. while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
  4820. if (seen !== array) {
  4821. splice.call(seen, fromIndex, 1);
  4822. }
  4823. splice.call(array, fromIndex, 1);
  4824. }
  4825. }
  4826. return array;
  4827. }
  4828. /**
  4829. * The base implementation of `_.pullAt` without support for individual
  4830. * indexes or capturing the removed elements.
  4831. *
  4832. * @private
  4833. * @param {Array} array The array to modify.
  4834. * @param {number[]} indexes The indexes of elements to remove.
  4835. * @returns {Array} Returns `array`.
  4836. */
  4837. function basePullAt(array, indexes) {
  4838. var length = array ? indexes.length : 0,
  4839. lastIndex = length - 1;
  4840. while (length--) {
  4841. var index = indexes[length];
  4842. if (length == lastIndex || index !== previous) {
  4843. var previous = index;
  4844. if (isIndex(index)) {
  4845. splice.call(array, index, 1);
  4846. } else {
  4847. baseUnset(array, index);
  4848. }
  4849. }
  4850. }
  4851. return array;
  4852. }
  4853. /**
  4854. * The base implementation of `_.random` without support for returning
  4855. * floating-point numbers.
  4856. *
  4857. * @private
  4858. * @param {number} lower The lower bound.
  4859. * @param {number} upper The upper bound.
  4860. * @returns {number} Returns the random number.
  4861. */
  4862. function baseRandom(lower, upper) {
  4863. return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
  4864. }
  4865. /**
  4866. * The base implementation of `_.range` and `_.rangeRight` which doesn't
  4867. * coerce arguments.
  4868. *
  4869. * @private
  4870. * @param {number} start The start of the range.
  4871. * @param {number} end The end of the range.
  4872. * @param {number} step The value to increment or decrement by.
  4873. * @param {boolean} [fromRight] Specify iterating from right to left.
  4874. * @returns {Array} Returns the range of numbers.
  4875. */
  4876. function baseRange(start, end, step, fromRight) {
  4877. var index = -1,
  4878. length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
  4879. result = Array(length);
  4880. while (length--) {
  4881. result[fromRight ? length : ++index] = start;
  4882. start += step;
  4883. }
  4884. return result;
  4885. }
  4886. /**
  4887. * The base implementation of `_.repeat` which doesn't coerce arguments.
  4888. *
  4889. * @private
  4890. * @param {string} string The string to repeat.
  4891. * @param {number} n The number of times to repeat the string.
  4892. * @returns {string} Returns the repeated string.
  4893. */
  4894. function baseRepeat(string, n) {
  4895. var result = '';
  4896. if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
  4897. return result;
  4898. }
  4899. // Leverage the exponentiation by squaring algorithm for a faster repeat.
  4900. // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
  4901. do {
  4902. if (n % 2) {
  4903. result += string;
  4904. }
  4905. n = nativeFloor(n / 2);
  4906. if (n) {
  4907. string += string;
  4908. }
  4909. } while (n);
  4910. return result;
  4911. }
  4912. /**
  4913. * The base implementation of `_.rest` which doesn't validate or coerce arguments.
  4914. *
  4915. * @private
  4916. * @param {Function} func The function to apply a rest parameter to.
  4917. * @param {number} [start=func.length-1] The start position of the rest parameter.
  4918. * @returns {Function} Returns the new function.
  4919. */
  4920. function baseRest(func, start) {
  4921. return setToString(overRest(func, start, identity), func + '');
  4922. }
  4923. /**
  4924. * The base implementation of `_.sample`.
  4925. *
  4926. * @private
  4927. * @param {Array|Object} collection The collection to sample.
  4928. * @returns {*} Returns the random element.
  4929. */
  4930. function baseSample(collection) {
  4931. return arraySample(values(collection));
  4932. }
  4933. /**
  4934. * The base implementation of `_.sampleSize` without param guards.
  4935. *
  4936. * @private
  4937. * @param {Array|Object} collection The collection to sample.
  4938. * @param {number} n The number of elements to sample.
  4939. * @returns {Array} Returns the random elements.
  4940. */
  4941. function baseSampleSize(collection, n) {
  4942. var array = values(collection);
  4943. return shuffleSelf(array, baseClamp(n, 0, array.length));
  4944. }
  4945. /**
  4946. * The base implementation of `_.set`.
  4947. *
  4948. * @private
  4949. * @param {Object} object The object to modify.
  4950. * @param {Array|string} path The path of the property to set.
  4951. * @param {*} value The value to set.
  4952. * @param {Function} [customizer] The function to customize path creation.
  4953. * @returns {Object} Returns `object`.
  4954. */
  4955. function baseSet(object, path, value, customizer) {
  4956. if (!isObject(object)) {
  4957. return object;
  4958. }
  4959. path = castPath(path, object);
  4960. var index = -1,
  4961. length = path.length,
  4962. lastIndex = length - 1,
  4963. nested = object;
  4964. while (nested != null && ++index < length) {
  4965. var key = toKey(path[index]),
  4966. newValue = value;
  4967. if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
  4968. return object;
  4969. }
  4970. if (index != lastIndex) {
  4971. var objValue = nested[key];
  4972. newValue = customizer ? customizer(objValue, key, nested) : undefined;
  4973. if (newValue === undefined) {
  4974. newValue = isObject(objValue)
  4975. ? objValue
  4976. : (isIndex(path[index + 1]) ? [] : {});
  4977. }
  4978. }
  4979. assignValue(nested, key, newValue);
  4980. nested = nested[key];
  4981. }
  4982. return object;
  4983. }
  4984. /**
  4985. * The base implementation of `setData` without support for hot loop shorting.
  4986. *
  4987. * @private
  4988. * @param {Function} func The function to associate metadata with.
  4989. * @param {*} data The metadata.
  4990. * @returns {Function} Returns `func`.
  4991. */
  4992. var baseSetData = !metaMap ? identity : function(func, data) {
  4993. metaMap.set(func, data);
  4994. return func;
  4995. };
  4996. /**
  4997. * The base implementation of `setToString` without support for hot loop shorting.
  4998. *
  4999. * @private
  5000. * @param {Function} func The function to modify.
  5001. * @param {Function} string The `toString` result.
  5002. * @returns {Function} Returns `func`.
  5003. */
  5004. var baseSetToString = !defineProperty ? identity : function(func, string) {
  5005. return defineProperty(func, 'toString', {
  5006. 'configurable': true,
  5007. 'enumerable': false,
  5008. 'value': constant(string),
  5009. 'writable': true
  5010. });
  5011. };
  5012. /**
  5013. * The base implementation of `_.shuffle`.
  5014. *
  5015. * @private
  5016. * @param {Array|Object} collection The collection to shuffle.
  5017. * @returns {Array} Returns the new shuffled array.
  5018. */
  5019. function baseShuffle(collection) {
  5020. return shuffleSelf(values(collection));
  5021. }
  5022. /**
  5023. * The base implementation of `_.slice` without an iteratee call guard.
  5024. *
  5025. * @private
  5026. * @param {Array} array The array to slice.
  5027. * @param {number} [start=0] The start position.
  5028. * @param {number} [end=array.length] The end position.
  5029. * @returns {Array} Returns the slice of `array`.
  5030. */
  5031. function baseSlice(array, start, end) {
  5032. var index = -1,
  5033. length = array.length;
  5034. if (start < 0) {
  5035. start = -start > length ? 0 : (length + start);
  5036. }
  5037. end = end > length ? length : end;
  5038. if (end < 0) {
  5039. end += length;
  5040. }
  5041. length = start > end ? 0 : ((end - start) >>> 0);
  5042. start >>>= 0;
  5043. var result = Array(length);
  5044. while (++index < length) {
  5045. result[index] = array[index + start];
  5046. }
  5047. return result;
  5048. }
  5049. /**
  5050. * The base implementation of `_.some` without support for iteratee shorthands.
  5051. *
  5052. * @private
  5053. * @param {Array|Object} collection The collection to iterate over.
  5054. * @param {Function} predicate The function invoked per iteration.
  5055. * @returns {boolean} Returns `true` if any element passes the predicate check,
  5056. * else `false`.
  5057. */
  5058. function baseSome(collection, predicate) {
  5059. var result;
  5060. baseEach(collection, function(value, index, collection) {
  5061. result = predicate(value, index, collection);
  5062. return !result;
  5063. });
  5064. return !!result;
  5065. }
  5066. /**
  5067. * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
  5068. * performs a binary search of `array` to determine the index at which `value`
  5069. * should be inserted into `array` in order to maintain its sort order.
  5070. *
  5071. * @private
  5072. * @param {Array} array The sorted array to inspect.
  5073. * @param {*} value The value to evaluate.
  5074. * @param {boolean} [retHighest] Specify returning the highest qualified index.
  5075. * @returns {number} Returns the index at which `value` should be inserted
  5076. * into `array`.
  5077. */
  5078. function baseSortedIndex(array, value, retHighest) {
  5079. var low = 0,
  5080. high = array == null ? low : array.length;
  5081. if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
  5082. while (low < high) {
  5083. var mid = (low + high) >>> 1,
  5084. computed = array[mid];
  5085. if (computed !== null && !isSymbol(computed) &&
  5086. (retHighest ? (computed <= value) : (computed < value))) {
  5087. low = mid + 1;
  5088. } else {
  5089. high = mid;
  5090. }
  5091. }
  5092. return high;
  5093. }
  5094. return baseSortedIndexBy(array, value, identity, retHighest);
  5095. }
  5096. /**
  5097. * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
  5098. * which invokes `iteratee` for `value` and each element of `array` to compute
  5099. * their sort ranking. The iteratee is invoked with one argument; (value).
  5100. *
  5101. * @private
  5102. * @param {Array} array The sorted array to inspect.
  5103. * @param {*} value The value to evaluate.
  5104. * @param {Function} iteratee The iteratee invoked per element.
  5105. * @param {boolean} [retHighest] Specify returning the highest qualified index.
  5106. * @returns {number} Returns the index at which `value` should be inserted
  5107. * into `array`.
  5108. */
  5109. function baseSortedIndexBy(array, value, iteratee, retHighest) {
  5110. var low = 0,
  5111. high = array == null ? 0 : array.length;
  5112. if (high === 0) {
  5113. return 0;
  5114. }
  5115. value = iteratee(value);
  5116. var valIsNaN = value !== value,
  5117. valIsNull = value === null,
  5118. valIsSymbol = isSymbol(value),
  5119. valIsUndefined = value === undefined;
  5120. while (low < high) {
  5121. var mid = nativeFloor((low + high) / 2),
  5122. computed = iteratee(array[mid]),
  5123. othIsDefined = computed !== undefined,
  5124. othIsNull = computed === null,
  5125. othIsReflexive = computed === computed,
  5126. othIsSymbol = isSymbol(computed);
  5127. if (valIsNaN) {
  5128. var setLow = retHighest || othIsReflexive;
  5129. } else if (valIsUndefined) {
  5130. setLow = othIsReflexive && (retHighest || othIsDefined);
  5131. } else if (valIsNull) {
  5132. setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
  5133. } else if (valIsSymbol) {
  5134. setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
  5135. } else if (othIsNull || othIsSymbol) {
  5136. setLow = false;
  5137. } else {
  5138. setLow = retHighest ? (computed <= value) : (computed < value);
  5139. }
  5140. if (setLow) {
  5141. low = mid + 1;
  5142. } else {
  5143. high = mid;
  5144. }
  5145. }
  5146. return nativeMin(high, MAX_ARRAY_INDEX);
  5147. }
  5148. /**
  5149. * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
  5150. * support for iteratee shorthands.
  5151. *
  5152. * @private
  5153. * @param {Array} array The array to inspect.
  5154. * @param {Function} [iteratee] The iteratee invoked per element.
  5155. * @returns {Array} Returns the new duplicate free array.
  5156. */
  5157. function baseSortedUniq(array, iteratee) {
  5158. var index = -1,
  5159. length = array.length,
  5160. resIndex = 0,
  5161. result = [];
  5162. while (++index < length) {
  5163. var value = array[index],
  5164. computed = iteratee ? iteratee(value) : value;
  5165. if (!index || !eq(computed, seen)) {
  5166. var seen = computed;
  5167. result[resIndex++] = value === 0 ? 0 : value;
  5168. }
  5169. }
  5170. return result;
  5171. }
  5172. /**
  5173. * The base implementation of `_.toNumber` which doesn't ensure correct
  5174. * conversions of binary, hexadecimal, or octal string values.
  5175. *
  5176. * @private
  5177. * @param {*} value The value to process.
  5178. * @returns {number} Returns the number.
  5179. */
  5180. function baseToNumber(value) {
  5181. if (typeof value == 'number') {
  5182. return value;
  5183. }
  5184. if (isSymbol(value)) {
  5185. return NAN;
  5186. }
  5187. return +value;
  5188. }
  5189. /**
  5190. * The base implementation of `_.toString` which doesn't convert nullish
  5191. * values to empty strings.
  5192. *
  5193. * @private
  5194. * @param {*} value The value to process.
  5195. * @returns {string} Returns the string.
  5196. */
  5197. function baseToString(value) {
  5198. // Exit early for strings to avoid a performance hit in some environments.
  5199. if (typeof value == 'string') {
  5200. return value;
  5201. }
  5202. if (isArray(value)) {
  5203. // Recursively convert values (susceptible to call stack limits).
  5204. return arrayMap(value, baseToString) + '';
  5205. }
  5206. if (isSymbol(value)) {
  5207. return symbolToString ? symbolToString.call(value) : '';
  5208. }
  5209. var result = (value + '');
  5210. return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
  5211. }
  5212. /**
  5213. * The base implementation of `_.uniqBy` without support for iteratee shorthands.
  5214. *
  5215. * @private
  5216. * @param {Array} array The array to inspect.
  5217. * @param {Function} [iteratee] The iteratee invoked per element.
  5218. * @param {Function} [comparator] The comparator invoked per element.
  5219. * @returns {Array} Returns the new duplicate free array.
  5220. */
  5221. function baseUniq(array, iteratee, comparator) {
  5222. var index = -1,
  5223. includes = arrayIncludes,
  5224. length = array.length,
  5225. isCommon = true,
  5226. result = [],
  5227. seen = result;
  5228. if (comparator) {
  5229. isCommon = false;
  5230. includes = arrayIncludesWith;
  5231. }
  5232. else if (length >= LARGE_ARRAY_SIZE) {
  5233. var set = iteratee ? null : createSet(array);
  5234. if (set) {
  5235. return setToArray(set);
  5236. }
  5237. isCommon = false;
  5238. includes = cacheHas;
  5239. seen = new SetCache;
  5240. }
  5241. else {
  5242. seen = iteratee ? [] : result;
  5243. }
  5244. outer:
  5245. while (++index < length) {
  5246. var value = array[index],
  5247. computed = iteratee ? iteratee(value) : value;
  5248. value = (comparator || value !== 0) ? value : 0;
  5249. if (isCommon && computed === computed) {
  5250. var seenIndex = seen.length;
  5251. while (seenIndex--) {
  5252. if (seen[seenIndex] === computed) {
  5253. continue outer;
  5254. }
  5255. }
  5256. if (iteratee) {
  5257. seen.push(computed);
  5258. }
  5259. result.push(value);
  5260. }
  5261. else if (!includes(seen, computed, comparator)) {
  5262. if (seen !== result) {
  5263. seen.push(computed);
  5264. }
  5265. result.push(value);
  5266. }
  5267. }
  5268. return result;
  5269. }
  5270. /**
  5271. * The base implementation of `_.unset`.
  5272. *
  5273. * @private
  5274. * @param {Object} object The object to modify.
  5275. * @param {Array|string} path The property path to unset.
  5276. * @returns {boolean} Returns `true` if the property is deleted, else `false`.
  5277. */
  5278. function baseUnset(object, path) {
  5279. path = castPath(path, object);
  5280. object = parent(object, path);
  5281. return object == null || delete object[toKey(last(path))];
  5282. }
  5283. /**
  5284. * The base implementation of `_.update`.
  5285. *
  5286. * @private
  5287. * @param {Object} object The object to modify.
  5288. * @param {Array|string} path The path of the property to update.
  5289. * @param {Function} updater The function to produce the updated value.
  5290. * @param {Function} [customizer] The function to customize path creation.
  5291. * @returns {Object} Returns `object`.
  5292. */
  5293. function baseUpdate(object, path, updater, customizer) {
  5294. return baseSet(object, path, updater(baseGet(object, path)), customizer);
  5295. }
  5296. /**
  5297. * The base implementation of methods like `_.dropWhile` and `_.takeWhile`
  5298. * without support for iteratee shorthands.
  5299. *
  5300. * @private
  5301. * @param {Array} array The array to query.
  5302. * @param {Function} predicate The function invoked per iteration.
  5303. * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
  5304. * @param {boolean} [fromRight] Specify iterating from right to left.
  5305. * @returns {Array} Returns the slice of `array`.
  5306. */
  5307. function baseWhile(array, predicate, isDrop, fromRight) {
  5308. var length = array.length,
  5309. index = fromRight ? length : -1;
  5310. while ((fromRight ? index-- : ++index < length) &&
  5311. predicate(array[index], index, array)) {}
  5312. return isDrop
  5313. ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
  5314. : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
  5315. }
  5316. /**
  5317. * The base implementation of `wrapperValue` which returns the result of
  5318. * performing a sequence of actions on the unwrapped `value`, where each
  5319. * successive action is supplied the return value of the previous.
  5320. *
  5321. * @private
  5322. * @param {*} value The unwrapped value.
  5323. * @param {Array} actions Actions to perform to resolve the unwrapped value.
  5324. * @returns {*} Returns the resolved value.
  5325. */
  5326. function baseWrapperValue(value, actions) {
  5327. var result = value;
  5328. if (result instanceof LazyWrapper) {
  5329. result = result.value();
  5330. }
  5331. return arrayReduce(actions, function(result, action) {
  5332. return action.func.apply(action.thisArg, arrayPush([result], action.args));
  5333. }, result);
  5334. }
  5335. /**
  5336. * The base implementation of methods like `_.xor`, without support for
  5337. * iteratee shorthands, that accepts an array of arrays to inspect.
  5338. *
  5339. * @private
  5340. * @param {Array} arrays The arrays to inspect.
  5341. * @param {Function} [iteratee] The iteratee invoked per element.
  5342. * @param {Function} [comparator] The comparator invoked per element.
  5343. * @returns {Array} Returns the new array of values.
  5344. */
  5345. function baseXor(arrays, iteratee, comparator) {
  5346. var length = arrays.length;
  5347. if (length < 2) {
  5348. return length ? baseUniq(arrays[0]) : [];
  5349. }
  5350. var index = -1,
  5351. result = Array(length);
  5352. while (++index < length) {
  5353. var array = arrays[index],
  5354. othIndex = -1;
  5355. while (++othIndex < length) {
  5356. if (othIndex != index) {
  5357. result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
  5358. }
  5359. }
  5360. }
  5361. return baseUniq(baseFlatten(result, 1), iteratee, comparator);
  5362. }
  5363. /**
  5364. * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
  5365. *
  5366. * @private
  5367. * @param {Array} props The property identifiers.
  5368. * @param {Array} values The property values.
  5369. * @param {Function} assignFunc The function to assign values.
  5370. * @returns {Object} Returns the new object.
  5371. */
  5372. function baseZipObject(props, values, assignFunc) {
  5373. var index = -1,
  5374. length = props.length,
  5375. valsLength = values.length,
  5376. result = {};
  5377. while (++index < length) {
  5378. var value = index < valsLength ? values[index] : undefined;
  5379. assignFunc(result, props[index], value);
  5380. }
  5381. return result;
  5382. }
  5383. /**
  5384. * Casts `value` to an empty array if it's not an array like object.
  5385. *
  5386. * @private
  5387. * @param {*} value The value to inspect.
  5388. * @returns {Array|Object} Returns the cast array-like object.
  5389. */
  5390. function castArrayLikeObject(value) {
  5391. return isArrayLikeObject(value) ? value : [];
  5392. }
  5393. /**
  5394. * Casts `value` to `identity` if it's not a function.
  5395. *
  5396. * @private
  5397. * @param {*} value The value to inspect.
  5398. * @returns {Function} Returns cast function.
  5399. */
  5400. function castFunction(value) {
  5401. return typeof value == 'function' ? value : identity;
  5402. }
  5403. /**
  5404. * Casts `value` to a path array if it's not one.
  5405. *
  5406. * @private
  5407. * @param {*} value The value to inspect.
  5408. * @param {Object} [object] The object to query keys on.
  5409. * @returns {Array} Returns the cast property path array.
  5410. */
  5411. function castPath(value, object) {
  5412. if (isArray(value)) {
  5413. return value;
  5414. }
  5415. return isKey(value, object) ? [value] : stringToPath(toString(value));
  5416. }
  5417. /**
  5418. * A `baseRest` alias which can be replaced with `identity` by module
  5419. * replacement plugins.
  5420. *
  5421. * @private
  5422. * @type {Function}
  5423. * @param {Function} func The function to apply a rest parameter to.
  5424. * @returns {Function} Returns the new function.
  5425. */
  5426. var castRest = baseRest;
  5427. /**
  5428. * Casts `array` to a slice if it's needed.
  5429. *
  5430. * @private
  5431. * @param {Array} array The array to inspect.
  5432. * @param {number} start The start position.
  5433. * @param {number} [end=array.length] The end position.
  5434. * @returns {Array} Returns the cast slice.
  5435. */
  5436. function castSlice(array, start, end) {
  5437. var length = array.length;
  5438. end = end === undefined ? length : end;
  5439. return (!start && end >= length) ? array : baseSlice(array, start, end);
  5440. }
  5441. /**
  5442. * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).
  5443. *
  5444. * @private
  5445. * @param {number|Object} id The timer id or timeout object of the timer to clear.
  5446. */
  5447. var clearTimeout = ctxClearTimeout || function(id) {
  5448. return root.clearTimeout(id);
  5449. };
  5450. /**
  5451. * Creates a clone of `buffer`.
  5452. *
  5453. * @private
  5454. * @param {Buffer} buffer The buffer to clone.
  5455. * @param {boolean} [isDeep] Specify a deep clone.
  5456. * @returns {Buffer} Returns the cloned buffer.
  5457. */
  5458. function cloneBuffer(buffer, isDeep) {
  5459. if (isDeep) {
  5460. return buffer.slice();
  5461. }
  5462. var length = buffer.length,
  5463. result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
  5464. buffer.copy(result);
  5465. return result;
  5466. }
  5467. /**
  5468. * Creates a clone of `arrayBuffer`.
  5469. *
  5470. * @private
  5471. * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
  5472. * @returns {ArrayBuffer} Returns the cloned array buffer.
  5473. */
  5474. function cloneArrayBuffer(arrayBuffer) {
  5475. var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
  5476. new Uint8Array(result).set(new Uint8Array(arrayBuffer));
  5477. return result;
  5478. }
  5479. /**
  5480. * Creates a clone of `dataView`.
  5481. *
  5482. * @private
  5483. * @param {Object} dataView The data view to clone.
  5484. * @param {boolean} [isDeep] Specify a deep clone.
  5485. * @returns {Object} Returns the cloned data view.
  5486. */
  5487. function cloneDataView(dataView, isDeep) {
  5488. var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
  5489. return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
  5490. }
  5491. /**
  5492. * Creates a clone of `regexp`.
  5493. *
  5494. * @private
  5495. * @param {Object} regexp The regexp to clone.
  5496. * @returns {Object} Returns the cloned regexp.
  5497. */
  5498. function cloneRegExp(regexp) {
  5499. var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
  5500. result.lastIndex = regexp.lastIndex;
  5501. return result;
  5502. }
  5503. /**
  5504. * Creates a clone of the `symbol` object.
  5505. *
  5506. * @private
  5507. * @param {Object} symbol The symbol object to clone.
  5508. * @returns {Object} Returns the cloned symbol object.
  5509. */
  5510. function cloneSymbol(symbol) {
  5511. return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
  5512. }
  5513. /**
  5514. * Creates a clone of `typedArray`.
  5515. *
  5516. * @private
  5517. * @param {Object} typedArray The typed array to clone.
  5518. * @param {boolean} [isDeep] Specify a deep clone.
  5519. * @returns {Object} Returns the cloned typed array.
  5520. */
  5521. function cloneTypedArray(typedArray, isDeep) {
  5522. var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
  5523. return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
  5524. }
  5525. /**
  5526. * Compares values to sort them in ascending order.
  5527. *
  5528. * @private
  5529. * @param {*} value The value to compare.
  5530. * @param {*} other The other value to compare.
  5531. * @returns {number} Returns the sort order indicator for `value`.
  5532. */
  5533. function compareAscending(value, other) {
  5534. if (value !== other) {
  5535. var valIsDefined = value !== undefined,
  5536. valIsNull = value === null,
  5537. valIsReflexive = value === value,
  5538. valIsSymbol = isSymbol(value);
  5539. var othIsDefined = other !== undefined,
  5540. othIsNull = other === null,
  5541. othIsReflexive = other === other,
  5542. othIsSymbol = isSymbol(other);
  5543. if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
  5544. (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
  5545. (valIsNull && othIsDefined && othIsReflexive) ||
  5546. (!valIsDefined && othIsReflexive) ||
  5547. !valIsReflexive) {
  5548. return 1;
  5549. }
  5550. if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
  5551. (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
  5552. (othIsNull && valIsDefined && valIsReflexive) ||
  5553. (!othIsDefined && valIsReflexive) ||
  5554. !othIsReflexive) {
  5555. return -1;
  5556. }
  5557. }
  5558. return 0;
  5559. }
  5560. /**
  5561. * Used by `_.orderBy` to compare multiple properties of a value to another
  5562. * and stable sort them.
  5563. *
  5564. * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
  5565. * specify an order of "desc" for descending or "asc" for ascending sort order
  5566. * of corresponding values.
  5567. *
  5568. * @private
  5569. * @param {Object} object The object to compare.
  5570. * @param {Object} other The other object to compare.
  5571. * @param {boolean[]|string[]} orders The order to sort by for each property.
  5572. * @returns {number} Returns the sort order indicator for `object`.
  5573. */
  5574. function compareMultiple(object, other, orders) {
  5575. var index = -1,
  5576. objCriteria = object.criteria,
  5577. othCriteria = other.criteria,
  5578. length = objCriteria.length,
  5579. ordersLength = orders.length;
  5580. while (++index < length) {
  5581. var result = compareAscending(objCriteria[index], othCriteria[index]);
  5582. if (result) {
  5583. if (index >= ordersLength) {
  5584. return result;
  5585. }
  5586. var order = orders[index];
  5587. return result * (order == 'desc' ? -1 : 1);
  5588. }
  5589. }
  5590. // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
  5591. // that causes it, under certain circumstances, to provide the same value for
  5592. // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
  5593. // for more details.
  5594. //
  5595. // This also ensures a stable sort in V8 and other engines.
  5596. // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
  5597. return object.index - other.index;
  5598. }
  5599. /**
  5600. * Creates an array that is the composition of partially applied arguments,
  5601. * placeholders, and provided arguments into a single array of arguments.
  5602. *
  5603. * @private
  5604. * @param {Array} args The provided arguments.
  5605. * @param {Array} partials The arguments to prepend to those provided.
  5606. * @param {Array} holders The `partials` placeholder indexes.
  5607. * @params {boolean} [isCurried] Specify composing for a curried function.
  5608. * @returns {Array} Returns the new array of composed arguments.
  5609. */
  5610. function composeArgs(args, partials, holders, isCurried) {
  5611. var argsIndex = -1,
  5612. argsLength = args.length,
  5613. holdersLength = holders.length,
  5614. leftIndex = -1,
  5615. leftLength = partials.length,
  5616. rangeLength = nativeMax(argsLength - holdersLength, 0),
  5617. result = Array(leftLength + rangeLength),
  5618. isUncurried = !isCurried;
  5619. while (++leftIndex < leftLength) {
  5620. result[leftIndex] = partials[leftIndex];
  5621. }
  5622. while (++argsIndex < holdersLength) {
  5623. if (isUncurried || argsIndex < argsLength) {
  5624. result[holders[argsIndex]] = args[argsIndex];
  5625. }
  5626. }
  5627. while (rangeLength--) {
  5628. result[leftIndex++] = args[argsIndex++];
  5629. }
  5630. return result;
  5631. }
  5632. /**
  5633. * This function is like `composeArgs` except that the arguments composition
  5634. * is tailored for `_.partialRight`.
  5635. *
  5636. * @private
  5637. * @param {Array} args The provided arguments.
  5638. * @param {Array} partials The arguments to append to those provided.
  5639. * @param {Array} holders The `partials` placeholder indexes.
  5640. * @params {boolean} [isCurried] Specify composing for a curried function.
  5641. * @returns {Array} Returns the new array of composed arguments.
  5642. */
  5643. function composeArgsRight(args, partials, holders, isCurried) {
  5644. var argsIndex = -1,
  5645. argsLength = args.length,
  5646. holdersIndex = -1,
  5647. holdersLength = holders.length,
  5648. rightIndex = -1,
  5649. rightLength = partials.length,
  5650. rangeLength = nativeMax(argsLength - holdersLength, 0),
  5651. result = Array(rangeLength + rightLength),
  5652. isUncurried = !isCurried;
  5653. while (++argsIndex < rangeLength) {
  5654. result[argsIndex] = args[argsIndex];
  5655. }
  5656. var offset = argsIndex;
  5657. while (++rightIndex < rightLength) {
  5658. result[offset + rightIndex] = partials[rightIndex];
  5659. }
  5660. while (++holdersIndex < holdersLength) {
  5661. if (isUncurried || argsIndex < argsLength) {
  5662. result[offset + holders[holdersIndex]] = args[argsIndex++];
  5663. }
  5664. }
  5665. return result;
  5666. }
  5667. /**
  5668. * Copies the values of `source` to `array`.
  5669. *
  5670. * @private
  5671. * @param {Array} source The array to copy values from.
  5672. * @param {Array} [array=[]] The array to copy values to.
  5673. * @returns {Array} Returns `array`.
  5674. */
  5675. function copyArray(source, array) {
  5676. var index = -1,
  5677. length = source.length;
  5678. array || (array = Array(length));
  5679. while (++index < length) {
  5680. array[index] = source[index];
  5681. }
  5682. return array;
  5683. }
  5684. /**
  5685. * Copies properties of `source` to `object`.
  5686. *
  5687. * @private
  5688. * @param {Object} source The object to copy properties from.
  5689. * @param {Array} props The property identifiers to copy.
  5690. * @param {Object} [object={}] The object to copy properties to.
  5691. * @param {Function} [customizer] The function to customize copied values.
  5692. * @returns {Object} Returns `object`.
  5693. */
  5694. function copyObject(source, props, object, customizer) {
  5695. var isNew = !object;
  5696. object || (object = {});
  5697. var index = -1,
  5698. length = props.length;
  5699. while (++index < length) {
  5700. var key = props[index];
  5701. var newValue = customizer
  5702. ? customizer(object[key], source[key], key, object, source)
  5703. : undefined;
  5704. if (newValue === undefined) {
  5705. newValue = source[key];
  5706. }
  5707. if (isNew) {
  5708. baseAssignValue(object, key, newValue);
  5709. } else {
  5710. assignValue(object, key, newValue);
  5711. }
  5712. }
  5713. return object;
  5714. }
  5715. /**
  5716. * Copies own symbols of `source` to `object`.
  5717. *
  5718. * @private
  5719. * @param {Object} source The object to copy symbols from.
  5720. * @param {Object} [object={}] The object to copy symbols to.
  5721. * @returns {Object} Returns `object`.
  5722. */
  5723. function copySymbols(source, object) {
  5724. return copyObject(source, getSymbols(source), object);
  5725. }
  5726. /**
  5727. * Copies own and inherited symbols of `source` to `object`.
  5728. *
  5729. * @private
  5730. * @param {Object} source The object to copy symbols from.
  5731. * @param {Object} [object={}] The object to copy symbols to.
  5732. * @returns {Object} Returns `object`.
  5733. */
  5734. function copySymbolsIn(source, object) {
  5735. return copyObject(source, getSymbolsIn(source), object);
  5736. }
  5737. /**
  5738. * Creates a function like `_.groupBy`.
  5739. *
  5740. * @private
  5741. * @param {Function} setter The function to set accumulator values.
  5742. * @param {Function} [initializer] The accumulator object initializer.
  5743. * @returns {Function} Returns the new aggregator function.
  5744. */
  5745. function createAggregator(setter, initializer) {
  5746. return function(collection, iteratee) {
  5747. var func = isArray(collection) ? arrayAggregator : baseAggregator,
  5748. accumulator = initializer ? initializer() : {};
  5749. return func(collection, setter, getIteratee(iteratee, 2), accumulator);
  5750. };
  5751. }
  5752. /**
  5753. * Creates a function like `_.assign`.
  5754. *
  5755. * @private
  5756. * @param {Function} assigner The function to assign values.
  5757. * @returns {Function} Returns the new assigner function.
  5758. */
  5759. function createAssigner(assigner) {
  5760. return baseRest(function(object, sources) {
  5761. var index = -1,
  5762. length = sources.length,
  5763. customizer = length > 1 ? sources[length - 1] : undefined,
  5764. guard = length > 2 ? sources[2] : undefined;
  5765. customizer = (assigner.length > 3 && typeof customizer == 'function')
  5766. ? (length--, customizer)
  5767. : undefined;
  5768. if (guard && isIterateeCall(sources[0], sources[1], guard)) {
  5769. customizer = length < 3 ? undefined : customizer;
  5770. length = 1;
  5771. }
  5772. object = Object(object);
  5773. while (++index < length) {
  5774. var source = sources[index];
  5775. if (source) {
  5776. assigner(object, source, index, customizer);
  5777. }
  5778. }
  5779. return object;
  5780. });
  5781. }
  5782. /**
  5783. * Creates a `baseEach` or `baseEachRight` function.
  5784. *
  5785. * @private
  5786. * @param {Function} eachFunc The function to iterate over a collection.
  5787. * @param {boolean} [fromRight] Specify iterating from right to left.
  5788. * @returns {Function} Returns the new base function.
  5789. */
  5790. function createBaseEach(eachFunc, fromRight) {
  5791. return function(collection, iteratee) {
  5792. if (collection == null) {
  5793. return collection;
  5794. }
  5795. if (!isArrayLike(collection)) {
  5796. return eachFunc(collection, iteratee);
  5797. }
  5798. var length = collection.length,
  5799. index = fromRight ? length : -1,
  5800. iterable = Object(collection);
  5801. while ((fromRight ? index-- : ++index < length)) {
  5802. if (iteratee(iterable[index], index, iterable) === false) {
  5803. break;
  5804. }
  5805. }
  5806. return collection;
  5807. };
  5808. }
  5809. /**
  5810. * Creates a base function for methods like `_.forIn` and `_.forOwn`.
  5811. *
  5812. * @private
  5813. * @param {boolean} [fromRight] Specify iterating from right to left.
  5814. * @returns {Function} Returns the new base function.
  5815. */
  5816. function createBaseFor(fromRight) {
  5817. return function(object, iteratee, keysFunc) {
  5818. var index = -1,
  5819. iterable = Object(object),
  5820. props = keysFunc(object),
  5821. length = props.length;
  5822. while (length--) {
  5823. var key = props[fromRight ? length : ++index];
  5824. if (iteratee(iterable[key], key, iterable) === false) {
  5825. break;
  5826. }
  5827. }
  5828. return object;
  5829. };
  5830. }
  5831. /**
  5832. * Creates a function that wraps `func` to invoke it with the optional `this`
  5833. * binding of `thisArg`.
  5834. *
  5835. * @private
  5836. * @param {Function} func The function to wrap.
  5837. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  5838. * @param {*} [thisArg] The `this` binding of `func`.
  5839. * @returns {Function} Returns the new wrapped function.
  5840. */
  5841. function createBind(func, bitmask, thisArg) {
  5842. var isBind = bitmask & WRAP_BIND_FLAG,
  5843. Ctor = createCtor(func);
  5844. function wrapper() {
  5845. var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
  5846. return fn.apply(isBind ? thisArg : this, arguments);
  5847. }
  5848. return wrapper;
  5849. }
  5850. /**
  5851. * Creates a function like `_.lowerFirst`.
  5852. *
  5853. * @private
  5854. * @param {string} methodName The name of the `String` case method to use.
  5855. * @returns {Function} Returns the new case function.
  5856. */
  5857. function createCaseFirst(methodName) {
  5858. return function(string) {
  5859. string = toString(string);
  5860. var strSymbols = hasUnicode(string)
  5861. ? stringToArray(string)
  5862. : undefined;
  5863. var chr = strSymbols
  5864. ? strSymbols[0]
  5865. : string.charAt(0);
  5866. var trailing = strSymbols
  5867. ? castSlice(strSymbols, 1).join('')
  5868. : string.slice(1);
  5869. return chr[methodName]() + trailing;
  5870. };
  5871. }
  5872. /**
  5873. * Creates a function like `_.camelCase`.
  5874. *
  5875. * @private
  5876. * @param {Function} callback The function to combine each word.
  5877. * @returns {Function} Returns the new compounder function.
  5878. */
  5879. function createCompounder(callback) {
  5880. return function(string) {
  5881. return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
  5882. };
  5883. }
  5884. /**
  5885. * Creates a function that produces an instance of `Ctor` regardless of
  5886. * whether it was invoked as part of a `new` expression or by `call` or `apply`.
  5887. *
  5888. * @private
  5889. * @param {Function} Ctor The constructor to wrap.
  5890. * @returns {Function} Returns the new wrapped function.
  5891. */
  5892. function createCtor(Ctor) {
  5893. return function() {
  5894. // Use a `switch` statement to work with class constructors. See
  5895. // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
  5896. // for more details.
  5897. var args = arguments;
  5898. switch (args.length) {
  5899. case 0: return new Ctor;
  5900. case 1: return new Ctor(args[0]);
  5901. case 2: return new Ctor(args[0], args[1]);
  5902. case 3: return new Ctor(args[0], args[1], args[2]);
  5903. case 4: return new Ctor(args[0], args[1], args[2], args[3]);
  5904. case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
  5905. case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
  5906. case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
  5907. }
  5908. var thisBinding = baseCreate(Ctor.prototype),
  5909. result = Ctor.apply(thisBinding, args);
  5910. // Mimic the constructor's `return` behavior.
  5911. // See https://es5.github.io/#x13.2.2 for more details.
  5912. return isObject(result) ? result : thisBinding;
  5913. };
  5914. }
  5915. /**
  5916. * Creates a function that wraps `func` to enable currying.
  5917. *
  5918. * @private
  5919. * @param {Function} func The function to wrap.
  5920. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  5921. * @param {number} arity The arity of `func`.
  5922. * @returns {Function} Returns the new wrapped function.
  5923. */
  5924. function createCurry(func, bitmask, arity) {
  5925. var Ctor = createCtor(func);
  5926. function wrapper() {
  5927. var length = arguments.length,
  5928. args = Array(length),
  5929. index = length,
  5930. placeholder = getHolder(wrapper);
  5931. while (index--) {
  5932. args[index] = arguments[index];
  5933. }
  5934. var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
  5935. ? []
  5936. : replaceHolders(args, placeholder);
  5937. length -= holders.length;
  5938. if (length < arity) {
  5939. return createRecurry(
  5940. func, bitmask, createHybrid, wrapper.placeholder, undefined,
  5941. args, holders, undefined, undefined, arity - length);
  5942. }
  5943. var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
  5944. return apply(fn, this, args);
  5945. }
  5946. return wrapper;
  5947. }
  5948. /**
  5949. * Creates a `_.find` or `_.findLast` function.
  5950. *
  5951. * @private
  5952. * @param {Function} findIndexFunc The function to find the collection index.
  5953. * @returns {Function} Returns the new find function.
  5954. */
  5955. function createFind(findIndexFunc) {
  5956. return function(collection, predicate, fromIndex) {
  5957. var iterable = Object(collection);
  5958. if (!isArrayLike(collection)) {
  5959. var iteratee = getIteratee(predicate, 3);
  5960. collection = keys(collection);
  5961. predicate = function(key) { return iteratee(iterable[key], key, iterable); };
  5962. }
  5963. var index = findIndexFunc(collection, predicate, fromIndex);
  5964. return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
  5965. };
  5966. }
  5967. /**
  5968. * Creates a `_.flow` or `_.flowRight` function.
  5969. *
  5970. * @private
  5971. * @param {boolean} [fromRight] Specify iterating from right to left.
  5972. * @returns {Function} Returns the new flow function.
  5973. */
  5974. function createFlow(fromRight) {
  5975. return flatRest(function(funcs) {
  5976. var length = funcs.length,
  5977. index = length,
  5978. prereq = LodashWrapper.prototype.thru;
  5979. if (fromRight) {
  5980. funcs.reverse();
  5981. }
  5982. while (index--) {
  5983. var func = funcs[index];
  5984. if (typeof func != 'function') {
  5985. throw new TypeError(FUNC_ERROR_TEXT);
  5986. }
  5987. if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
  5988. var wrapper = new LodashWrapper([], true);
  5989. }
  5990. }
  5991. index = wrapper ? index : length;
  5992. while (++index < length) {
  5993. func = funcs[index];
  5994. var funcName = getFuncName(func),
  5995. data = funcName == 'wrapper' ? getData(func) : undefined;
  5996. if (data && isLaziable(data[0]) &&
  5997. data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
  5998. !data[4].length && data[9] == 1
  5999. ) {
  6000. wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
  6001. } else {
  6002. wrapper = (func.length == 1 && isLaziable(func))
  6003. ? wrapper[funcName]()
  6004. : wrapper.thru(func);
  6005. }
  6006. }
  6007. return function() {
  6008. var args = arguments,
  6009. value = args[0];
  6010. if (wrapper && args.length == 1 && isArray(value)) {
  6011. return wrapper.plant(value).value();
  6012. }
  6013. var index = 0,
  6014. result = length ? funcs[index].apply(this, args) : value;
  6015. while (++index < length) {
  6016. result = funcs[index].call(this, result);
  6017. }
  6018. return result;
  6019. };
  6020. });
  6021. }
  6022. /**
  6023. * Creates a function that wraps `func` to invoke it with optional `this`
  6024. * binding of `thisArg`, partial application, and currying.
  6025. *
  6026. * @private
  6027. * @param {Function|string} func The function or method name to wrap.
  6028. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  6029. * @param {*} [thisArg] The `this` binding of `func`.
  6030. * @param {Array} [partials] The arguments to prepend to those provided to
  6031. * the new function.
  6032. * @param {Array} [holders] The `partials` placeholder indexes.
  6033. * @param {Array} [partialsRight] The arguments to append to those provided
  6034. * to the new function.
  6035. * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
  6036. * @param {Array} [argPos] The argument positions of the new function.
  6037. * @param {number} [ary] The arity cap of `func`.
  6038. * @param {number} [arity] The arity of `func`.
  6039. * @returns {Function} Returns the new wrapped function.
  6040. */
  6041. function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
  6042. var isAry = bitmask & WRAP_ARY_FLAG,
  6043. isBind = bitmask & WRAP_BIND_FLAG,
  6044. isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
  6045. isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
  6046. isFlip = bitmask & WRAP_FLIP_FLAG,
  6047. Ctor = isBindKey ? undefined : createCtor(func);
  6048. function wrapper() {
  6049. var length = arguments.length,
  6050. args = Array(length),
  6051. index = length;
  6052. while (index--) {
  6053. args[index] = arguments[index];
  6054. }
  6055. if (isCurried) {
  6056. var placeholder = getHolder(wrapper),
  6057. holdersCount = countHolders(args, placeholder);
  6058. }
  6059. if (partials) {
  6060. args = composeArgs(args, partials, holders, isCurried);
  6061. }
  6062. if (partialsRight) {
  6063. args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
  6064. }
  6065. length -= holdersCount;
  6066. if (isCurried && length < arity) {
  6067. var newHolders = replaceHolders(args, placeholder);
  6068. return createRecurry(
  6069. func, bitmask, createHybrid, wrapper.placeholder, thisArg,
  6070. args, newHolders, argPos, ary, arity - length
  6071. );
  6072. }
  6073. var thisBinding = isBind ? thisArg : this,
  6074. fn = isBindKey ? thisBinding[func] : func;
  6075. length = args.length;
  6076. if (argPos) {
  6077. args = reorder(args, argPos);
  6078. } else if (isFlip && length > 1) {
  6079. args.reverse();
  6080. }
  6081. if (isAry && ary < length) {
  6082. args.length = ary;
  6083. }
  6084. if (this && this !== root && this instanceof wrapper) {
  6085. fn = Ctor || createCtor(fn);
  6086. }
  6087. return fn.apply(thisBinding, args);
  6088. }
  6089. return wrapper;
  6090. }
  6091. /**
  6092. * Creates a function like `_.invertBy`.
  6093. *
  6094. * @private
  6095. * @param {Function} setter The function to set accumulator values.
  6096. * @param {Function} toIteratee The function to resolve iteratees.
  6097. * @returns {Function} Returns the new inverter function.
  6098. */
  6099. function createInverter(setter, toIteratee) {
  6100. return function(object, iteratee) {
  6101. return baseInverter(object, setter, toIteratee(iteratee), {});
  6102. };
  6103. }
  6104. /**
  6105. * Creates a function that performs a mathematical operation on two values.
  6106. *
  6107. * @private
  6108. * @param {Function} operator The function to perform the operation.
  6109. * @param {number} [defaultValue] The value used for `undefined` arguments.
  6110. * @returns {Function} Returns the new mathematical operation function.
  6111. */
  6112. function createMathOperation(operator, defaultValue) {
  6113. return function(value, other) {
  6114. var result;
  6115. if (value === undefined && other === undefined) {
  6116. return defaultValue;
  6117. }
  6118. if (value !== undefined) {
  6119. result = value;
  6120. }
  6121. if (other !== undefined) {
  6122. if (result === undefined) {
  6123. return other;
  6124. }
  6125. if (typeof value == 'string' || typeof other == 'string') {
  6126. value = baseToString(value);
  6127. other = baseToString(other);
  6128. } else {
  6129. value = baseToNumber(value);
  6130. other = baseToNumber(other);
  6131. }
  6132. result = operator(value, other);
  6133. }
  6134. return result;
  6135. };
  6136. }
  6137. /**
  6138. * Creates a function like `_.over`.
  6139. *
  6140. * @private
  6141. * @param {Function} arrayFunc The function to iterate over iteratees.
  6142. * @returns {Function} Returns the new over function.
  6143. */
  6144. function createOver(arrayFunc) {
  6145. return flatRest(function(iteratees) {
  6146. iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
  6147. return baseRest(function(args) {
  6148. var thisArg = this;
  6149. return arrayFunc(iteratees, function(iteratee) {
  6150. return apply(iteratee, thisArg, args);
  6151. });
  6152. });
  6153. });
  6154. }
  6155. /**
  6156. * Creates the padding for `string` based on `length`. The `chars` string
  6157. * is truncated if the number of characters exceeds `length`.
  6158. *
  6159. * @private
  6160. * @param {number} length The padding length.
  6161. * @param {string} [chars=' '] The string used as padding.
  6162. * @returns {string} Returns the padding for `string`.
  6163. */
  6164. function createPadding(length, chars) {
  6165. chars = chars === undefined ? ' ' : baseToString(chars);
  6166. var charsLength = chars.length;
  6167. if (charsLength < 2) {
  6168. return charsLength ? baseRepeat(chars, length) : chars;
  6169. }
  6170. var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
  6171. return hasUnicode(chars)
  6172. ? castSlice(stringToArray(result), 0, length).join('')
  6173. : result.slice(0, length);
  6174. }
  6175. /**
  6176. * Creates a function that wraps `func` to invoke it with the `this` binding
  6177. * of `thisArg` and `partials` prepended to the arguments it receives.
  6178. *
  6179. * @private
  6180. * @param {Function} func The function to wrap.
  6181. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  6182. * @param {*} thisArg The `this` binding of `func`.
  6183. * @param {Array} partials The arguments to prepend to those provided to
  6184. * the new function.
  6185. * @returns {Function} Returns the new wrapped function.
  6186. */
  6187. function createPartial(func, bitmask, thisArg, partials) {
  6188. var isBind = bitmask & WRAP_BIND_FLAG,
  6189. Ctor = createCtor(func);
  6190. function wrapper() {
  6191. var argsIndex = -1,
  6192. argsLength = arguments.length,
  6193. leftIndex = -1,
  6194. leftLength = partials.length,
  6195. args = Array(leftLength + argsLength),
  6196. fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
  6197. while (++leftIndex < leftLength) {
  6198. args[leftIndex] = partials[leftIndex];
  6199. }
  6200. while (argsLength--) {
  6201. args[leftIndex++] = arguments[++argsIndex];
  6202. }
  6203. return apply(fn, isBind ? thisArg : this, args);
  6204. }
  6205. return wrapper;
  6206. }
  6207. /**
  6208. * Creates a `_.range` or `_.rangeRight` function.
  6209. *
  6210. * @private
  6211. * @param {boolean} [fromRight] Specify iterating from right to left.
  6212. * @returns {Function} Returns the new range function.
  6213. */
  6214. function createRange(fromRight) {
  6215. return function(start, end, step) {
  6216. if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
  6217. end = step = undefined;
  6218. }
  6219. // Ensure the sign of `-0` is preserved.
  6220. start = toFinite(start);
  6221. if (end === undefined) {
  6222. end = start;
  6223. start = 0;
  6224. } else {
  6225. end = toFinite(end);
  6226. }
  6227. step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
  6228. return baseRange(start, end, step, fromRight);
  6229. };
  6230. }
  6231. /**
  6232. * Creates a function that performs a relational operation on two values.
  6233. *
  6234. * @private
  6235. * @param {Function} operator The function to perform the operation.
  6236. * @returns {Function} Returns the new relational operation function.
  6237. */
  6238. function createRelationalOperation(operator) {
  6239. return function(value, other) {
  6240. if (!(typeof value == 'string' && typeof other == 'string')) {
  6241. value = toNumber(value);
  6242. other = toNumber(other);
  6243. }
  6244. return operator(value, other);
  6245. };
  6246. }
  6247. /**
  6248. * Creates a function that wraps `func` to continue currying.
  6249. *
  6250. * @private
  6251. * @param {Function} func The function to wrap.
  6252. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  6253. * @param {Function} wrapFunc The function to create the `func` wrapper.
  6254. * @param {*} placeholder The placeholder value.
  6255. * @param {*} [thisArg] The `this` binding of `func`.
  6256. * @param {Array} [partials] The arguments to prepend to those provided to
  6257. * the new function.
  6258. * @param {Array} [holders] The `partials` placeholder indexes.
  6259. * @param {Array} [argPos] The argument positions of the new function.
  6260. * @param {number} [ary] The arity cap of `func`.
  6261. * @param {number} [arity] The arity of `func`.
  6262. * @returns {Function} Returns the new wrapped function.
  6263. */
  6264. function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
  6265. var isCurry = bitmask & WRAP_CURRY_FLAG,
  6266. newHolders = isCurry ? holders : undefined,
  6267. newHoldersRight = isCurry ? undefined : holders,
  6268. newPartials = isCurry ? partials : undefined,
  6269. newPartialsRight = isCurry ? undefined : partials;
  6270. bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
  6271. bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
  6272. if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
  6273. bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
  6274. }
  6275. var newData = [
  6276. func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
  6277. newHoldersRight, argPos, ary, arity
  6278. ];
  6279. var result = wrapFunc.apply(undefined, newData);
  6280. if (isLaziable(func)) {
  6281. setData(result, newData);
  6282. }
  6283. result.placeholder = placeholder;
  6284. return setWrapToString(result, func, bitmask);
  6285. }
  6286. /**
  6287. * Creates a function like `_.round`.
  6288. *
  6289. * @private
  6290. * @param {string} methodName The name of the `Math` method to use when rounding.
  6291. * @returns {Function} Returns the new round function.
  6292. */
  6293. function createRound(methodName) {
  6294. var func = Math[methodName];
  6295. return function(number, precision) {
  6296. number = toNumber(number);
  6297. precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
  6298. if (precision && nativeIsFinite(number)) {
  6299. // Shift with exponential notation to avoid floating-point issues.
  6300. // See [MDN](https://mdn.io/round#Examples) for more details.
  6301. var pair = (toString(number) + 'e').split('e'),
  6302. value = func(pair[0] + 'e' + (+pair[1] + precision));
  6303. pair = (toString(value) + 'e').split('e');
  6304. return +(pair[0] + 'e' + (+pair[1] - precision));
  6305. }
  6306. return func(number);
  6307. };
  6308. }
  6309. /**
  6310. * Creates a set object of `values`.
  6311. *
  6312. * @private
  6313. * @param {Array} values The values to add to the set.
  6314. * @returns {Object} Returns the new set.
  6315. */
  6316. var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
  6317. return new Set(values);
  6318. };
  6319. /**
  6320. * Creates a `_.toPairs` or `_.toPairsIn` function.
  6321. *
  6322. * @private
  6323. * @param {Function} keysFunc The function to get the keys of a given object.
  6324. * @returns {Function} Returns the new pairs function.
  6325. */
  6326. function createToPairs(keysFunc) {
  6327. return function(object) {
  6328. var tag = getTag(object);
  6329. if (tag == mapTag) {
  6330. return mapToArray(object);
  6331. }
  6332. if (tag == setTag) {
  6333. return setToPairs(object);
  6334. }
  6335. return baseToPairs(object, keysFunc(object));
  6336. };
  6337. }
  6338. /**
  6339. * Creates a function that either curries or invokes `func` with optional
  6340. * `this` binding and partially applied arguments.
  6341. *
  6342. * @private
  6343. * @param {Function|string} func The function or method name to wrap.
  6344. * @param {number} bitmask The bitmask flags.
  6345. * 1 - `_.bind`
  6346. * 2 - `_.bindKey`
  6347. * 4 - `_.curry` or `_.curryRight` of a bound function
  6348. * 8 - `_.curry`
  6349. * 16 - `_.curryRight`
  6350. * 32 - `_.partial`
  6351. * 64 - `_.partialRight`
  6352. * 128 - `_.rearg`
  6353. * 256 - `_.ary`
  6354. * 512 - `_.flip`
  6355. * @param {*} [thisArg] The `this` binding of `func`.
  6356. * @param {Array} [partials] The arguments to be partially applied.
  6357. * @param {Array} [holders] The `partials` placeholder indexes.
  6358. * @param {Array} [argPos] The argument positions of the new function.
  6359. * @param {number} [ary] The arity cap of `func`.
  6360. * @param {number} [arity] The arity of `func`.
  6361. * @returns {Function} Returns the new wrapped function.
  6362. */
  6363. function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
  6364. var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
  6365. if (!isBindKey && typeof func != 'function') {
  6366. throw new TypeError(FUNC_ERROR_TEXT);
  6367. }
  6368. var length = partials ? partials.length : 0;
  6369. if (!length) {
  6370. bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
  6371. partials = holders = undefined;
  6372. }
  6373. ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
  6374. arity = arity === undefined ? arity : toInteger(arity);
  6375. length -= holders ? holders.length : 0;
  6376. if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
  6377. var partialsRight = partials,
  6378. holdersRight = holders;
  6379. partials = holders = undefined;
  6380. }
  6381. var data = isBindKey ? undefined : getData(func);
  6382. var newData = [
  6383. func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
  6384. argPos, ary, arity
  6385. ];
  6386. if (data) {
  6387. mergeData(newData, data);
  6388. }
  6389. func = newData[0];
  6390. bitmask = newData[1];
  6391. thisArg = newData[2];
  6392. partials = newData[3];
  6393. holders = newData[4];
  6394. arity = newData[9] = newData[9] === undefined
  6395. ? (isBindKey ? 0 : func.length)
  6396. : nativeMax(newData[9] - length, 0);
  6397. if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
  6398. bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
  6399. }
  6400. if (!bitmask || bitmask == WRAP_BIND_FLAG) {
  6401. var result = createBind(func, bitmask, thisArg);
  6402. } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
  6403. result = createCurry(func, bitmask, arity);
  6404. } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
  6405. result = createPartial(func, bitmask, thisArg, partials);
  6406. } else {
  6407. result = createHybrid.apply(undefined, newData);
  6408. }
  6409. var setter = data ? baseSetData : setData;
  6410. return setWrapToString(setter(result, newData), func, bitmask);
  6411. }
  6412. /**
  6413. * Used by `_.defaults` to customize its `_.assignIn` use to assign properties
  6414. * of source objects to the destination object for all destination properties
  6415. * that resolve to `undefined`.
  6416. *
  6417. * @private
  6418. * @param {*} objValue The destination value.
  6419. * @param {*} srcValue The source value.
  6420. * @param {string} key The key of the property to assign.
  6421. * @param {Object} object The parent object of `objValue`.
  6422. * @returns {*} Returns the value to assign.
  6423. */
  6424. function customDefaultsAssignIn(objValue, srcValue, key, object) {
  6425. if (objValue === undefined ||
  6426. (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
  6427. return srcValue;
  6428. }
  6429. return objValue;
  6430. }
  6431. /**
  6432. * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
  6433. * objects into destination objects that are passed thru.
  6434. *
  6435. * @private
  6436. * @param {*} objValue The destination value.
  6437. * @param {*} srcValue The source value.
  6438. * @param {string} key The key of the property to merge.
  6439. * @param {Object} object The parent object of `objValue`.
  6440. * @param {Object} source The parent object of `srcValue`.
  6441. * @param {Object} [stack] Tracks traversed source values and their merged
  6442. * counterparts.
  6443. * @returns {*} Returns the value to assign.
  6444. */
  6445. function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
  6446. if (isObject(objValue) && isObject(srcValue)) {
  6447. // Recursively merge objects and arrays (susceptible to call stack limits).
  6448. stack.set(srcValue, objValue);
  6449. baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
  6450. stack['delete'](srcValue);
  6451. }
  6452. return objValue;
  6453. }
  6454. /**
  6455. * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
  6456. * objects.
  6457. *
  6458. * @private
  6459. * @param {*} value The value to inspect.
  6460. * @param {string} key The key of the property to inspect.
  6461. * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
  6462. */
  6463. function customOmitClone(value) {
  6464. return isPlainObject(value) ? undefined : value;
  6465. }
  6466. /**
  6467. * A specialized version of `baseIsEqualDeep` for arrays with support for
  6468. * partial deep comparisons.
  6469. *
  6470. * @private
  6471. * @param {Array} array The array to compare.
  6472. * @param {Array} other The other array to compare.
  6473. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  6474. * @param {Function} customizer The function to customize comparisons.
  6475. * @param {Function} equalFunc The function to determine equivalents of values.
  6476. * @param {Object} stack Tracks traversed `array` and `other` objects.
  6477. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
  6478. */
  6479. function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
  6480. var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
  6481. arrLength = array.length,
  6482. othLength = other.length;
  6483. if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
  6484. return false;
  6485. }
  6486. // Check that cyclic values are equal.
  6487. var arrStacked = stack.get(array);
  6488. var othStacked = stack.get(other);
  6489. if (arrStacked && othStacked) {
  6490. return arrStacked == other && othStacked == array;
  6491. }
  6492. var index = -1,
  6493. result = true,
  6494. seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
  6495. stack.set(array, other);
  6496. stack.set(other, array);
  6497. // Ignore non-index properties.
  6498. while (++index < arrLength) {
  6499. var arrValue = array[index],
  6500. othValue = other[index];
  6501. if (customizer) {
  6502. var compared = isPartial
  6503. ? customizer(othValue, arrValue, index, other, array, stack)
  6504. : customizer(arrValue, othValue, index, array, other, stack);
  6505. }
  6506. if (compared !== undefined) {
  6507. if (compared) {
  6508. continue;
  6509. }
  6510. result = false;
  6511. break;
  6512. }
  6513. // Recursively compare arrays (susceptible to call stack limits).
  6514. if (seen) {
  6515. if (!arraySome(other, function(othValue, othIndex) {
  6516. if (!cacheHas(seen, othIndex) &&
  6517. (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
  6518. return seen.push(othIndex);
  6519. }
  6520. })) {
  6521. result = false;
  6522. break;
  6523. }
  6524. } else if (!(
  6525. arrValue === othValue ||
  6526. equalFunc(arrValue, othValue, bitmask, customizer, stack)
  6527. )) {
  6528. result = false;
  6529. break;
  6530. }
  6531. }
  6532. stack['delete'](array);
  6533. stack['delete'](other);
  6534. return result;
  6535. }
  6536. /**
  6537. * A specialized version of `baseIsEqualDeep` for comparing objects of
  6538. * the same `toStringTag`.
  6539. *
  6540. * **Note:** This function only supports comparing values with tags of
  6541. * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
  6542. *
  6543. * @private
  6544. * @param {Object} object The object to compare.
  6545. * @param {Object} other The other object to compare.
  6546. * @param {string} tag The `toStringTag` of the objects to compare.
  6547. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  6548. * @param {Function} customizer The function to customize comparisons.
  6549. * @param {Function} equalFunc The function to determine equivalents of values.
  6550. * @param {Object} stack Tracks traversed `object` and `other` objects.
  6551. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  6552. */
  6553. function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
  6554. switch (tag) {
  6555. case dataViewTag:
  6556. if ((object.byteLength != other.byteLength) ||
  6557. (object.byteOffset != other.byteOffset)) {
  6558. return false;
  6559. }
  6560. object = object.buffer;
  6561. other = other.buffer;
  6562. case arrayBufferTag:
  6563. if ((object.byteLength != other.byteLength) ||
  6564. !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
  6565. return false;
  6566. }
  6567. return true;
  6568. case boolTag:
  6569. case dateTag:
  6570. case numberTag:
  6571. // Coerce booleans to `1` or `0` and dates to milliseconds.
  6572. // Invalid dates are coerced to `NaN`.
  6573. return eq(+object, +other);
  6574. case errorTag:
  6575. return object.name == other.name && object.message == other.message;
  6576. case regexpTag:
  6577. case stringTag:
  6578. // Coerce regexes to strings and treat strings, primitives and objects,
  6579. // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
  6580. // for more details.
  6581. return object == (other + '');
  6582. case mapTag:
  6583. var convert = mapToArray;
  6584. case setTag:
  6585. var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
  6586. convert || (convert = setToArray);
  6587. if (object.size != other.size && !isPartial) {
  6588. return false;
  6589. }
  6590. // Assume cyclic values are equal.
  6591. var stacked = stack.get(object);
  6592. if (stacked) {
  6593. return stacked == other;
  6594. }
  6595. bitmask |= COMPARE_UNORDERED_FLAG;
  6596. // Recursively compare objects (susceptible to call stack limits).
  6597. stack.set(object, other);
  6598. var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
  6599. stack['delete'](object);
  6600. return result;
  6601. case symbolTag:
  6602. if (symbolValueOf) {
  6603. return symbolValueOf.call(object) == symbolValueOf.call(other);
  6604. }
  6605. }
  6606. return false;
  6607. }
  6608. /**
  6609. * A specialized version of `baseIsEqualDeep` for objects with support for
  6610. * partial deep comparisons.
  6611. *
  6612. * @private
  6613. * @param {Object} object The object to compare.
  6614. * @param {Object} other The other object to compare.
  6615. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  6616. * @param {Function} customizer The function to customize comparisons.
  6617. * @param {Function} equalFunc The function to determine equivalents of values.
  6618. * @param {Object} stack Tracks traversed `object` and `other` objects.
  6619. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  6620. */
  6621. function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
  6622. var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
  6623. objProps = getAllKeys(object),
  6624. objLength = objProps.length,
  6625. othProps = getAllKeys(other),
  6626. othLength = othProps.length;
  6627. if (objLength != othLength && !isPartial) {
  6628. return false;
  6629. }
  6630. var index = objLength;
  6631. while (index--) {
  6632. var key = objProps[index];
  6633. if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
  6634. return false;
  6635. }
  6636. }
  6637. // Check that cyclic values are equal.
  6638. var objStacked = stack.get(object);
  6639. var othStacked = stack.get(other);
  6640. if (objStacked && othStacked) {
  6641. return objStacked == other && othStacked == object;
  6642. }
  6643. var result = true;
  6644. stack.set(object, other);
  6645. stack.set(other, object);
  6646. var skipCtor = isPartial;
  6647. while (++index < objLength) {
  6648. key = objProps[index];
  6649. var objValue = object[key],
  6650. othValue = other[key];
  6651. if (customizer) {
  6652. var compared = isPartial
  6653. ? customizer(othValue, objValue, key, other, object, stack)
  6654. : customizer(objValue, othValue, key, object, other, stack);
  6655. }
  6656. // Recursively compare objects (susceptible to call stack limits).
  6657. if (!(compared === undefined
  6658. ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
  6659. : compared
  6660. )) {
  6661. result = false;
  6662. break;
  6663. }
  6664. skipCtor || (skipCtor = key == 'constructor');
  6665. }
  6666. if (result && !skipCtor) {
  6667. var objCtor = object.constructor,
  6668. othCtor = other.constructor;
  6669. // Non `Object` object instances with different constructors are not equal.
  6670. if (objCtor != othCtor &&
  6671. ('constructor' in object && 'constructor' in other) &&
  6672. !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
  6673. typeof othCtor == 'function' && othCtor instanceof othCtor)) {
  6674. result = false;
  6675. }
  6676. }
  6677. stack['delete'](object);
  6678. stack['delete'](other);
  6679. return result;
  6680. }
  6681. /**
  6682. * A specialized version of `baseRest` which flattens the rest array.
  6683. *
  6684. * @private
  6685. * @param {Function} func The function to apply a rest parameter to.
  6686. * @returns {Function} Returns the new function.
  6687. */
  6688. function flatRest(func) {
  6689. return setToString(overRest(func, undefined, flatten), func + '');
  6690. }
  6691. /**
  6692. * Creates an array of own enumerable property names and symbols of `object`.
  6693. *
  6694. * @private
  6695. * @param {Object} object The object to query.
  6696. * @returns {Array} Returns the array of property names and symbols.
  6697. */
  6698. function getAllKeys(object) {
  6699. return baseGetAllKeys(object, keys, getSymbols);
  6700. }
  6701. /**
  6702. * Creates an array of own and inherited enumerable property names and
  6703. * symbols of `object`.
  6704. *
  6705. * @private
  6706. * @param {Object} object The object to query.
  6707. * @returns {Array} Returns the array of property names and symbols.
  6708. */
  6709. function getAllKeysIn(object) {
  6710. return baseGetAllKeys(object, keysIn, getSymbolsIn);
  6711. }
  6712. /**
  6713. * Gets metadata for `func`.
  6714. *
  6715. * @private
  6716. * @param {Function} func The function to query.
  6717. * @returns {*} Returns the metadata for `func`.
  6718. */
  6719. var getData = !metaMap ? noop : function(func) {
  6720. return metaMap.get(func);
  6721. };
  6722. /**
  6723. * Gets the name of `func`.
  6724. *
  6725. * @private
  6726. * @param {Function} func The function to query.
  6727. * @returns {string} Returns the function name.
  6728. */
  6729. function getFuncName(func) {
  6730. var result = (func.name + ''),
  6731. array = realNames[result],
  6732. length = hasOwnProperty.call(realNames, result) ? array.length : 0;
  6733. while (length--) {
  6734. var data = array[length],
  6735. otherFunc = data.func;
  6736. if (otherFunc == null || otherFunc == func) {
  6737. return data.name;
  6738. }
  6739. }
  6740. return result;
  6741. }
  6742. /**
  6743. * Gets the argument placeholder value for `func`.
  6744. *
  6745. * @private
  6746. * @param {Function} func The function to inspect.
  6747. * @returns {*} Returns the placeholder value.
  6748. */
  6749. function getHolder(func) {
  6750. var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
  6751. return object.placeholder;
  6752. }
  6753. /**
  6754. * Gets the appropriate "iteratee" function. If `_.iteratee` is customized,
  6755. * this function returns the custom method, otherwise it returns `baseIteratee`.
  6756. * If arguments are provided, the chosen function is invoked with them and
  6757. * its result is returned.
  6758. *
  6759. * @private
  6760. * @param {*} [value] The value to convert to an iteratee.
  6761. * @param {number} [arity] The arity of the created iteratee.
  6762. * @returns {Function} Returns the chosen function or its result.
  6763. */
  6764. function getIteratee() {
  6765. var result = lodash.iteratee || iteratee;
  6766. result = result === iteratee ? baseIteratee : result;
  6767. return arguments.length ? result(arguments[0], arguments[1]) : result;
  6768. }
  6769. /**
  6770. * Gets the data for `map`.
  6771. *
  6772. * @private
  6773. * @param {Object} map The map to query.
  6774. * @param {string} key The reference key.
  6775. * @returns {*} Returns the map data.
  6776. */
  6777. function getMapData(map, key) {
  6778. var data = map.__data__;
  6779. return isKeyable(key)
  6780. ? data[typeof key == 'string' ? 'string' : 'hash']
  6781. : data.map;
  6782. }
  6783. /**
  6784. * Gets the property names, values, and compare flags of `object`.
  6785. *
  6786. * @private
  6787. * @param {Object} object The object to query.
  6788. * @returns {Array} Returns the match data of `object`.
  6789. */
  6790. function getMatchData(object) {
  6791. var result = keys(object),
  6792. length = result.length;
  6793. while (length--) {
  6794. var key = result[length],
  6795. value = object[key];
  6796. result[length] = [key, value, isStrictComparable(value)];
  6797. }
  6798. return result;
  6799. }
  6800. /**
  6801. * Gets the native function at `key` of `object`.
  6802. *
  6803. * @private
  6804. * @param {Object} object The object to query.
  6805. * @param {string} key The key of the method to get.
  6806. * @returns {*} Returns the function if it's native, else `undefined`.
  6807. */
  6808. function getNative(object, key) {
  6809. var value = getValue(object, key);
  6810. return baseIsNative(value) ? value : undefined;
  6811. }
  6812. /**
  6813. * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
  6814. *
  6815. * @private
  6816. * @param {*} value The value to query.
  6817. * @returns {string} Returns the raw `toStringTag`.
  6818. */
  6819. function getRawTag(value) {
  6820. var isOwn = hasOwnProperty.call(value, symToStringTag),
  6821. tag = value[symToStringTag];
  6822. try {
  6823. value[symToStringTag] = undefined;
  6824. var unmasked = true;
  6825. } catch (e) {}
  6826. var result = nativeObjectToString.call(value);
  6827. if (unmasked) {
  6828. if (isOwn) {
  6829. value[symToStringTag] = tag;
  6830. } else {
  6831. delete value[symToStringTag];
  6832. }
  6833. }
  6834. return result;
  6835. }
  6836. /**
  6837. * Creates an array of the own enumerable symbols of `object`.
  6838. *
  6839. * @private
  6840. * @param {Object} object The object to query.
  6841. * @returns {Array} Returns the array of symbols.
  6842. */
  6843. var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
  6844. if (object == null) {
  6845. return [];
  6846. }
  6847. object = Object(object);
  6848. return arrayFilter(nativeGetSymbols(object), function(symbol) {
  6849. return propertyIsEnumerable.call(object, symbol);
  6850. });
  6851. };
  6852. /**
  6853. * Creates an array of the own and inherited enumerable symbols of `object`.
  6854. *
  6855. * @private
  6856. * @param {Object} object The object to query.
  6857. * @returns {Array} Returns the array of symbols.
  6858. */
  6859. var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
  6860. var result = [];
  6861. while (object) {
  6862. arrayPush(result, getSymbols(object));
  6863. object = getPrototype(object);
  6864. }
  6865. return result;
  6866. };
  6867. /**
  6868. * Gets the `toStringTag` of `value`.
  6869. *
  6870. * @private
  6871. * @param {*} value The value to query.
  6872. * @returns {string} Returns the `toStringTag`.
  6873. */
  6874. var getTag = baseGetTag;
  6875. // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
  6876. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
  6877. (Map && getTag(new Map) != mapTag) ||
  6878. (Promise && getTag(Promise.resolve()) != promiseTag) ||
  6879. (Set && getTag(new Set) != setTag) ||
  6880. (WeakMap && getTag(new WeakMap) != weakMapTag)) {
  6881. getTag = function(value) {
  6882. var result = baseGetTag(value),
  6883. Ctor = result == objectTag ? value.constructor : undefined,
  6884. ctorString = Ctor ? toSource(Ctor) : '';
  6885. if (ctorString) {
  6886. switch (ctorString) {
  6887. case dataViewCtorString: return dataViewTag;
  6888. case mapCtorString: return mapTag;
  6889. case promiseCtorString: return promiseTag;
  6890. case setCtorString: return setTag;
  6891. case weakMapCtorString: return weakMapTag;
  6892. }
  6893. }
  6894. return result;
  6895. };
  6896. }
  6897. /**
  6898. * Gets the view, applying any `transforms` to the `start` and `end` positions.
  6899. *
  6900. * @private
  6901. * @param {number} start The start of the view.
  6902. * @param {number} end The end of the view.
  6903. * @param {Array} transforms The transformations to apply to the view.
  6904. * @returns {Object} Returns an object containing the `start` and `end`
  6905. * positions of the view.
  6906. */
  6907. function getView(start, end, transforms) {
  6908. var index = -1,
  6909. length = transforms.length;
  6910. while (++index < length) {
  6911. var data = transforms[index],
  6912. size = data.size;
  6913. switch (data.type) {
  6914. case 'drop': start += size; break;
  6915. case 'dropRight': end -= size; break;
  6916. case 'take': end = nativeMin(end, start + size); break;
  6917. case 'takeRight': start = nativeMax(start, end - size); break;
  6918. }
  6919. }
  6920. return { 'start': start, 'end': end };
  6921. }
  6922. /**
  6923. * Extracts wrapper details from the `source` body comment.
  6924. *
  6925. * @private
  6926. * @param {string} source The source to inspect.
  6927. * @returns {Array} Returns the wrapper details.
  6928. */
  6929. function getWrapDetails(source) {
  6930. var match = source.match(reWrapDetails);
  6931. return match ? match[1].split(reSplitDetails) : [];
  6932. }
  6933. /**
  6934. * Checks if `path` exists on `object`.
  6935. *
  6936. * @private
  6937. * @param {Object} object The object to query.
  6938. * @param {Array|string} path The path to check.
  6939. * @param {Function} hasFunc The function to check properties.
  6940. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  6941. */
  6942. function hasPath(object, path, hasFunc) {
  6943. path = castPath(path, object);
  6944. var index = -1,
  6945. length = path.length,
  6946. result = false;
  6947. while (++index < length) {
  6948. var key = toKey(path[index]);
  6949. if (!(result = object != null && hasFunc(object, key))) {
  6950. break;
  6951. }
  6952. object = object[key];
  6953. }
  6954. if (result || ++index != length) {
  6955. return result;
  6956. }
  6957. length = object == null ? 0 : object.length;
  6958. return !!length && isLength(length) && isIndex(key, length) &&
  6959. (isArray(object) || isArguments(object));
  6960. }
  6961. /**
  6962. * Initializes an array clone.
  6963. *
  6964. * @private
  6965. * @param {Array} array The array to clone.
  6966. * @returns {Array} Returns the initialized clone.
  6967. */
  6968. function initCloneArray(array) {
  6969. var length = array.length,
  6970. result = new array.constructor(length);
  6971. // Add properties assigned by `RegExp#exec`.
  6972. if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
  6973. result.index = array.index;
  6974. result.input = array.input;
  6975. }
  6976. return result;
  6977. }
  6978. /**
  6979. * Initializes an object clone.
  6980. *
  6981. * @private
  6982. * @param {Object} object The object to clone.
  6983. * @returns {Object} Returns the initialized clone.
  6984. */
  6985. function initCloneObject(object) {
  6986. return (typeof object.constructor == 'function' && !isPrototype(object))
  6987. ? baseCreate(getPrototype(object))
  6988. : {};
  6989. }
  6990. /**
  6991. * Initializes an object clone based on its `toStringTag`.
  6992. *
  6993. * **Note:** This function only supports cloning values with tags of
  6994. * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
  6995. *
  6996. * @private
  6997. * @param {Object} object The object to clone.
  6998. * @param {string} tag The `toStringTag` of the object to clone.
  6999. * @param {boolean} [isDeep] Specify a deep clone.
  7000. * @returns {Object} Returns the initialized clone.
  7001. */
  7002. function initCloneByTag(object, tag, isDeep) {
  7003. var Ctor = object.constructor;
  7004. switch (tag) {
  7005. case arrayBufferTag:
  7006. return cloneArrayBuffer(object);
  7007. case boolTag:
  7008. case dateTag:
  7009. return new Ctor(+object);
  7010. case dataViewTag:
  7011. return cloneDataView(object, isDeep);
  7012. case float32Tag: case float64Tag:
  7013. case int8Tag: case int16Tag: case int32Tag:
  7014. case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
  7015. return cloneTypedArray(object, isDeep);
  7016. case mapTag:
  7017. return new Ctor;
  7018. case numberTag:
  7019. case stringTag:
  7020. return new Ctor(object);
  7021. case regexpTag:
  7022. return cloneRegExp(object);
  7023. case setTag:
  7024. return new Ctor;
  7025. case symbolTag:
  7026. return cloneSymbol(object);
  7027. }
  7028. }
  7029. /**
  7030. * Inserts wrapper `details` in a comment at the top of the `source` body.
  7031. *
  7032. * @private
  7033. * @param {string} source The source to modify.
  7034. * @returns {Array} details The details to insert.
  7035. * @returns {string} Returns the modified source.
  7036. */
  7037. function insertWrapDetails(source, details) {
  7038. var length = details.length;
  7039. if (!length) {
  7040. return source;
  7041. }
  7042. var lastIndex = length - 1;
  7043. details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
  7044. details = details.join(length > 2 ? ', ' : ' ');
  7045. return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
  7046. }
  7047. /**
  7048. * Checks if `value` is a flattenable `arguments` object or array.
  7049. *
  7050. * @private
  7051. * @param {*} value The value to check.
  7052. * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
  7053. */
  7054. function isFlattenable(value) {
  7055. return isArray(value) || isArguments(value) ||
  7056. !!(spreadableSymbol && value && value[spreadableSymbol]);
  7057. }
  7058. /**
  7059. * Checks if `value` is a valid array-like index.
  7060. *
  7061. * @private
  7062. * @param {*} value The value to check.
  7063. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
  7064. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
  7065. */
  7066. function isIndex(value, length) {
  7067. var type = typeof value;
  7068. length = length == null ? MAX_SAFE_INTEGER : length;
  7069. return !!length &&
  7070. (type == 'number' ||
  7071. (type != 'symbol' && reIsUint.test(value))) &&
  7072. (value > -1 && value % 1 == 0 && value < length);
  7073. }
  7074. /**
  7075. * Checks if the given arguments are from an iteratee call.
  7076. *
  7077. * @private
  7078. * @param {*} value The potential iteratee value argument.
  7079. * @param {*} index The potential iteratee index or key argument.
  7080. * @param {*} object The potential iteratee object argument.
  7081. * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
  7082. * else `false`.
  7083. */
  7084. function isIterateeCall(value, index, object) {
  7085. if (!isObject(object)) {
  7086. return false;
  7087. }
  7088. var type = typeof index;
  7089. if (type == 'number'
  7090. ? (isArrayLike(object) && isIndex(index, object.length))
  7091. : (type == 'string' && index in object)
  7092. ) {
  7093. return eq(object[index], value);
  7094. }
  7095. return false;
  7096. }
  7097. /**
  7098. * Checks if `value` is a property name and not a property path.
  7099. *
  7100. * @private
  7101. * @param {*} value The value to check.
  7102. * @param {Object} [object] The object to query keys on.
  7103. * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
  7104. */
  7105. function isKey(value, object) {
  7106. if (isArray(value)) {
  7107. return false;
  7108. }
  7109. var type = typeof value;
  7110. if (type == 'number' || type == 'symbol' || type == 'boolean' ||
  7111. value == null || isSymbol(value)) {
  7112. return true;
  7113. }
  7114. return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
  7115. (object != null && value in Object(object));
  7116. }
  7117. /**
  7118. * Checks if `value` is suitable for use as unique object key.
  7119. *
  7120. * @private
  7121. * @param {*} value The value to check.
  7122. * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
  7123. */
  7124. function isKeyable(value) {
  7125. var type = typeof value;
  7126. return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
  7127. ? (value !== '__proto__')
  7128. : (value === null);
  7129. }
  7130. /**
  7131. * Checks if `func` has a lazy counterpart.
  7132. *
  7133. * @private
  7134. * @param {Function} func The function to check.
  7135. * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
  7136. * else `false`.
  7137. */
  7138. function isLaziable(func) {
  7139. var funcName = getFuncName(func),
  7140. other = lodash[funcName];
  7141. if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
  7142. return false;
  7143. }
  7144. if (func === other) {
  7145. return true;
  7146. }
  7147. var data = getData(other);
  7148. return !!data && func === data[0];
  7149. }
  7150. /**
  7151. * Checks if `func` has its source masked.
  7152. *
  7153. * @private
  7154. * @param {Function} func The function to check.
  7155. * @returns {boolean} Returns `true` if `func` is masked, else `false`.
  7156. */
  7157. function isMasked(func) {
  7158. return !!maskSrcKey && (maskSrcKey in func);
  7159. }
  7160. /**
  7161. * Checks if `func` is capable of being masked.
  7162. *
  7163. * @private
  7164. * @param {*} value The value to check.
  7165. * @returns {boolean} Returns `true` if `func` is maskable, else `false`.
  7166. */
  7167. var isMaskable = coreJsData ? isFunction : stubFalse;
  7168. /**
  7169. * Checks if `value` is likely a prototype object.
  7170. *
  7171. * @private
  7172. * @param {*} value The value to check.
  7173. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
  7174. */
  7175. function isPrototype(value) {
  7176. var Ctor = value && value.constructor,
  7177. proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
  7178. return value === proto;
  7179. }
  7180. /**
  7181. * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
  7182. *
  7183. * @private
  7184. * @param {*} value The value to check.
  7185. * @returns {boolean} Returns `true` if `value` if suitable for strict
  7186. * equality comparisons, else `false`.
  7187. */
  7188. function isStrictComparable(value) {
  7189. return value === value && !isObject(value);
  7190. }
  7191. /**
  7192. * A specialized version of `matchesProperty` for source values suitable
  7193. * for strict equality comparisons, i.e. `===`.
  7194. *
  7195. * @private
  7196. * @param {string} key The key of the property to get.
  7197. * @param {*} srcValue The value to match.
  7198. * @returns {Function} Returns the new spec function.
  7199. */
  7200. function matchesStrictComparable(key, srcValue) {
  7201. return function(object) {
  7202. if (object == null) {
  7203. return false;
  7204. }
  7205. return object[key] === srcValue &&
  7206. (srcValue !== undefined || (key in Object(object)));
  7207. };
  7208. }
  7209. /**
  7210. * A specialized version of `_.memoize` which clears the memoized function's
  7211. * cache when it exceeds `MAX_MEMOIZE_SIZE`.
  7212. *
  7213. * @private
  7214. * @param {Function} func The function to have its output memoized.
  7215. * @returns {Function} Returns the new memoized function.
  7216. */
  7217. function memoizeCapped(func) {
  7218. var result = memoize(func, function(key) {
  7219. if (cache.size === MAX_MEMOIZE_SIZE) {
  7220. cache.clear();
  7221. }
  7222. return key;
  7223. });
  7224. var cache = result.cache;
  7225. return result;
  7226. }
  7227. /**
  7228. * Merges the function metadata of `source` into `data`.
  7229. *
  7230. * Merging metadata reduces the number of wrappers used to invoke a function.
  7231. * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
  7232. * may be applied regardless of execution order. Methods like `_.ary` and
  7233. * `_.rearg` modify function arguments, making the order in which they are
  7234. * executed important, preventing the merging of metadata. However, we make
  7235. * an exception for a safe combined case where curried functions have `_.ary`
  7236. * and or `_.rearg` applied.
  7237. *
  7238. * @private
  7239. * @param {Array} data The destination metadata.
  7240. * @param {Array} source The source metadata.
  7241. * @returns {Array} Returns `data`.
  7242. */
  7243. function mergeData(data, source) {
  7244. var bitmask = data[1],
  7245. srcBitmask = source[1],
  7246. newBitmask = bitmask | srcBitmask,
  7247. isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
  7248. var isCombo =
  7249. ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
  7250. ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
  7251. ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));
  7252. // Exit early if metadata can't be merged.
  7253. if (!(isCommon || isCombo)) {
  7254. return data;
  7255. }
  7256. // Use source `thisArg` if available.
  7257. if (srcBitmask & WRAP_BIND_FLAG) {
  7258. data[2] = source[2];
  7259. // Set when currying a bound function.
  7260. newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
  7261. }
  7262. // Compose partial arguments.
  7263. var value = source[3];
  7264. if (value) {
  7265. var partials = data[3];
  7266. data[3] = partials ? composeArgs(partials, value, source[4]) : value;
  7267. data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
  7268. }
  7269. // Compose partial right arguments.
  7270. value = source[5];
  7271. if (value) {
  7272. partials = data[5];
  7273. data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
  7274. data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
  7275. }
  7276. // Use source `argPos` if available.
  7277. value = source[7];
  7278. if (value) {
  7279. data[7] = value;
  7280. }
  7281. // Use source `ary` if it's smaller.
  7282. if (srcBitmask & WRAP_ARY_FLAG) {
  7283. data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
  7284. }
  7285. // Use source `arity` if one is not provided.
  7286. if (data[9] == null) {
  7287. data[9] = source[9];
  7288. }
  7289. // Use source `func` and merge bitmasks.
  7290. data[0] = source[0];
  7291. data[1] = newBitmask;
  7292. return data;
  7293. }
  7294. /**
  7295. * This function is like
  7296. * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  7297. * except that it includes inherited enumerable properties.
  7298. *
  7299. * @private
  7300. * @param {Object} object The object to query.
  7301. * @returns {Array} Returns the array of property names.
  7302. */
  7303. function nativeKeysIn(object) {
  7304. var result = [];
  7305. if (object != null) {
  7306. for (var key in Object(object)) {
  7307. result.push(key);
  7308. }
  7309. }
  7310. return result;
  7311. }
  7312. /**
  7313. * Converts `value` to a string using `Object.prototype.toString`.
  7314. *
  7315. * @private
  7316. * @param {*} value The value to convert.
  7317. * @returns {string} Returns the converted string.
  7318. */
  7319. function objectToString(value) {
  7320. return nativeObjectToString.call(value);
  7321. }
  7322. /**
  7323. * A specialized version of `baseRest` which transforms the rest array.
  7324. *
  7325. * @private
  7326. * @param {Function} func The function to apply a rest parameter to.
  7327. * @param {number} [start=func.length-1] The start position of the rest parameter.
  7328. * @param {Function} transform The rest array transform.
  7329. * @returns {Function} Returns the new function.
  7330. */
  7331. function overRest(func, start, transform) {
  7332. start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
  7333. return function() {
  7334. var args = arguments,
  7335. index = -1,
  7336. length = nativeMax(args.length - start, 0),
  7337. array = Array(length);
  7338. while (++index < length) {
  7339. array[index] = args[start + index];
  7340. }
  7341. index = -1;
  7342. var otherArgs = Array(start + 1);
  7343. while (++index < start) {
  7344. otherArgs[index] = args[index];
  7345. }
  7346. otherArgs[start] = transform(array);
  7347. return apply(func, this, otherArgs);
  7348. };
  7349. }
  7350. /**
  7351. * Gets the parent value at `path` of `object`.
  7352. *
  7353. * @private
  7354. * @param {Object} object The object to query.
  7355. * @param {Array} path The path to get the parent value of.
  7356. * @returns {*} Returns the parent value.
  7357. */
  7358. function parent(object, path) {
  7359. return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
  7360. }
  7361. /**
  7362. * Reorder `array` according to the specified indexes where the element at
  7363. * the first index is assigned as the first element, the element at
  7364. * the second index is assigned as the second element, and so on.
  7365. *
  7366. * @private
  7367. * @param {Array} array The array to reorder.
  7368. * @param {Array} indexes The arranged array indexes.
  7369. * @returns {Array} Returns `array`.
  7370. */
  7371. function reorder(array, indexes) {
  7372. var arrLength = array.length,
  7373. length = nativeMin(indexes.length, arrLength),
  7374. oldArray = copyArray(array);
  7375. while (length--) {
  7376. var index = indexes[length];
  7377. array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
  7378. }
  7379. return array;
  7380. }
  7381. /**
  7382. * Gets the value at `key`, unless `key` is "__proto__" or "constructor".
  7383. *
  7384. * @private
  7385. * @param {Object} object The object to query.
  7386. * @param {string} key The key of the property to get.
  7387. * @returns {*} Returns the property value.
  7388. */
  7389. function safeGet(object, key) {
  7390. if (key === 'constructor' && typeof object[key] === 'function') {
  7391. return;
  7392. }
  7393. if (key == '__proto__') {
  7394. return;
  7395. }
  7396. return object[key];
  7397. }
  7398. /**
  7399. * Sets metadata for `func`.
  7400. *
  7401. * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
  7402. * period of time, it will trip its breaker and transition to an identity
  7403. * function to avoid garbage collection pauses in V8. See
  7404. * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
  7405. * for more details.
  7406. *
  7407. * @private
  7408. * @param {Function} func The function to associate metadata with.
  7409. * @param {*} data The metadata.
  7410. * @returns {Function} Returns `func`.
  7411. */
  7412. var setData = shortOut(baseSetData);
  7413. /**
  7414. * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).
  7415. *
  7416. * @private
  7417. * @param {Function} func The function to delay.
  7418. * @param {number} wait The number of milliseconds to delay invocation.
  7419. * @returns {number|Object} Returns the timer id or timeout object.
  7420. */
  7421. var setTimeout = ctxSetTimeout || function(func, wait) {
  7422. return root.setTimeout(func, wait);
  7423. };
  7424. /**
  7425. * Sets the `toString` method of `func` to return `string`.
  7426. *
  7427. * @private
  7428. * @param {Function} func The function to modify.
  7429. * @param {Function} string The `toString` result.
  7430. * @returns {Function} Returns `func`.
  7431. */
  7432. var setToString = shortOut(baseSetToString);
  7433. /**
  7434. * Sets the `toString` method of `wrapper` to mimic the source of `reference`
  7435. * with wrapper details in a comment at the top of the source body.
  7436. *
  7437. * @private
  7438. * @param {Function} wrapper The function to modify.
  7439. * @param {Function} reference The reference function.
  7440. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  7441. * @returns {Function} Returns `wrapper`.
  7442. */
  7443. function setWrapToString(wrapper, reference, bitmask) {
  7444. var source = (reference + '');
  7445. return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
  7446. }
  7447. /**
  7448. * Creates a function that'll short out and invoke `identity` instead
  7449. * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
  7450. * milliseconds.
  7451. *
  7452. * @private
  7453. * @param {Function} func The function to restrict.
  7454. * @returns {Function} Returns the new shortable function.
  7455. */
  7456. function shortOut(func) {
  7457. var count = 0,
  7458. lastCalled = 0;
  7459. return function() {
  7460. var stamp = nativeNow(),
  7461. remaining = HOT_SPAN - (stamp - lastCalled);
  7462. lastCalled = stamp;
  7463. if (remaining > 0) {
  7464. if (++count >= HOT_COUNT) {
  7465. return arguments[0];
  7466. }
  7467. } else {
  7468. count = 0;
  7469. }
  7470. return func.apply(undefined, arguments);
  7471. };
  7472. }
  7473. /**
  7474. * A specialized version of `_.shuffle` which mutates and sets the size of `array`.
  7475. *
  7476. * @private
  7477. * @param {Array} array The array to shuffle.
  7478. * @param {number} [size=array.length] The size of `array`.
  7479. * @returns {Array} Returns `array`.
  7480. */
  7481. function shuffleSelf(array, size) {
  7482. var index = -1,
  7483. length = array.length,
  7484. lastIndex = length - 1;
  7485. size = size === undefined ? length : size;
  7486. while (++index < size) {
  7487. var rand = baseRandom(index, lastIndex),
  7488. value = array[rand];
  7489. array[rand] = array[index];
  7490. array[index] = value;
  7491. }
  7492. array.length = size;
  7493. return array;
  7494. }
  7495. /**
  7496. * Converts `string` to a property path array.
  7497. *
  7498. * @private
  7499. * @param {string} string The string to convert.
  7500. * @returns {Array} Returns the property path array.
  7501. */
  7502. var stringToPath = memoizeCapped(function(string) {
  7503. var result = [];
  7504. if (string.charCodeAt(0) === 46 /* . */) {
  7505. result.push('');
  7506. }
  7507. string.replace(rePropName, function(match, number, quote, subString) {
  7508. result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
  7509. });
  7510. return result;
  7511. });
  7512. /**
  7513. * Converts `value` to a string key if it's not a string or symbol.
  7514. *
  7515. * @private
  7516. * @param {*} value The value to inspect.
  7517. * @returns {string|symbol} Returns the key.
  7518. */
  7519. function toKey(value) {
  7520. if (typeof value == 'string' || isSymbol(value)) {
  7521. return value;
  7522. }
  7523. var result = (value + '');
  7524. return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
  7525. }
  7526. /**
  7527. * Converts `func` to its source code.
  7528. *
  7529. * @private
  7530. * @param {Function} func The function to convert.
  7531. * @returns {string} Returns the source code.
  7532. */
  7533. function toSource(func) {
  7534. if (func != null) {
  7535. try {
  7536. return funcToString.call(func);
  7537. } catch (e) {}
  7538. try {
  7539. return (func + '');
  7540. } catch (e) {}
  7541. }
  7542. return '';
  7543. }
  7544. /**
  7545. * Updates wrapper `details` based on `bitmask` flags.
  7546. *
  7547. * @private
  7548. * @returns {Array} details The details to modify.
  7549. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  7550. * @returns {Array} Returns `details`.
  7551. */
  7552. function updateWrapDetails(details, bitmask) {
  7553. arrayEach(wrapFlags, function(pair) {
  7554. var value = '_.' + pair[0];
  7555. if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
  7556. details.push(value);
  7557. }
  7558. });
  7559. return details.sort();
  7560. }
  7561. /**
  7562. * Creates a clone of `wrapper`.
  7563. *
  7564. * @private
  7565. * @param {Object} wrapper The wrapper to clone.
  7566. * @returns {Object} Returns the cloned wrapper.
  7567. */
  7568. function wrapperClone(wrapper) {
  7569. if (wrapper instanceof LazyWrapper) {
  7570. return wrapper.clone();
  7571. }
  7572. var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
  7573. result.__actions__ = copyArray(wrapper.__actions__);
  7574. result.__index__ = wrapper.__index__;
  7575. result.__values__ = wrapper.__values__;
  7576. return result;
  7577. }
  7578. /*------------------------------------------------------------------------*/
  7579. /**
  7580. * Creates an array of elements split into groups the length of `size`.
  7581. * If `array` can't be split evenly, the final chunk will be the remaining
  7582. * elements.
  7583. *
  7584. * @static
  7585. * @memberOf _
  7586. * @since 3.0.0
  7587. * @category Array
  7588. * @param {Array} array The array to process.
  7589. * @param {number} [size=1] The length of each chunk
  7590. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  7591. * @returns {Array} Returns the new array of chunks.
  7592. * @example
  7593. *
  7594. * _.chunk(['a', 'b', 'c', 'd'], 2);
  7595. * // => [['a', 'b'], ['c', 'd']]
  7596. *
  7597. * _.chunk(['a', 'b', 'c', 'd'], 3);
  7598. * // => [['a', 'b', 'c'], ['d']]
  7599. */
  7600. function chunk(array, size, guard) {
  7601. if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
  7602. size = 1;
  7603. } else {
  7604. size = nativeMax(toInteger(size), 0);
  7605. }
  7606. var length = array == null ? 0 : array.length;
  7607. if (!length || size < 1) {
  7608. return [];
  7609. }
  7610. var index = 0,
  7611. resIndex = 0,
  7612. result = Array(nativeCeil(length / size));
  7613. while (index < length) {
  7614. result[resIndex++] = baseSlice(array, index, (index += size));
  7615. }
  7616. return result;
  7617. }
  7618. /**
  7619. * Creates an array with all falsey values removed. The values `false`, `null`,
  7620. * `0`, `""`, `undefined`, and `NaN` are falsey.
  7621. *
  7622. * @static
  7623. * @memberOf _
  7624. * @since 0.1.0
  7625. * @category Array
  7626. * @param {Array} array The array to compact.
  7627. * @returns {Array} Returns the new array of filtered values.
  7628. * @example
  7629. *
  7630. * _.compact([0, 1, false, 2, '', 3]);
  7631. * // => [1, 2, 3]
  7632. */
  7633. function compact(array) {
  7634. var index = -1,
  7635. length = array == null ? 0 : array.length,
  7636. resIndex = 0,
  7637. result = [];
  7638. while (++index < length) {
  7639. var value = array[index];
  7640. if (value) {
  7641. result[resIndex++] = value;
  7642. }
  7643. }
  7644. return result;
  7645. }
  7646. /**
  7647. * Creates a new array concatenating `array` with any additional arrays
  7648. * and/or values.
  7649. *
  7650. * @static
  7651. * @memberOf _
  7652. * @since 4.0.0
  7653. * @category Array
  7654. * @param {Array} array The array to concatenate.
  7655. * @param {...*} [values] The values to concatenate.
  7656. * @returns {Array} Returns the new concatenated array.
  7657. * @example
  7658. *
  7659. * var array = [1];
  7660. * var other = _.concat(array, 2, [3], [[4]]);
  7661. *
  7662. * console.log(other);
  7663. * // => [1, 2, 3, [4]]
  7664. *
  7665. * console.log(array);
  7666. * // => [1]
  7667. */
  7668. function concat() {
  7669. var length = arguments.length;
  7670. if (!length) {
  7671. return [];
  7672. }
  7673. var args = Array(length - 1),
  7674. array = arguments[0],
  7675. index = length;
  7676. while (index--) {
  7677. args[index - 1] = arguments[index];
  7678. }
  7679. return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
  7680. }
  7681. /**
  7682. * Creates an array of `array` values not included in the other given arrays
  7683. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  7684. * for equality comparisons. The order and references of result values are
  7685. * determined by the first array.
  7686. *
  7687. * **Note:** Unlike `_.pullAll`, this method returns a new array.
  7688. *
  7689. * @static
  7690. * @memberOf _
  7691. * @since 0.1.0
  7692. * @category Array
  7693. * @param {Array} array The array to inspect.
  7694. * @param {...Array} [values] The values to exclude.
  7695. * @returns {Array} Returns the new array of filtered values.
  7696. * @see _.without, _.xor
  7697. * @example
  7698. *
  7699. * _.difference([2, 1], [2, 3]);
  7700. * // => [1]
  7701. */
  7702. var difference = baseRest(function(array, values) {
  7703. return isArrayLikeObject(array)
  7704. ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
  7705. : [];
  7706. });
  7707. /**
  7708. * This method is like `_.difference` except that it accepts `iteratee` which
  7709. * is invoked for each element of `array` and `values` to generate the criterion
  7710. * by which they're compared. The order and references of result values are
  7711. * determined by the first array. The iteratee is invoked with one argument:
  7712. * (value).
  7713. *
  7714. * **Note:** Unlike `_.pullAllBy`, this method returns a new array.
  7715. *
  7716. * @static
  7717. * @memberOf _
  7718. * @since 4.0.0
  7719. * @category Array
  7720. * @param {Array} array The array to inspect.
  7721. * @param {...Array} [values] The values to exclude.
  7722. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  7723. * @returns {Array} Returns the new array of filtered values.
  7724. * @example
  7725. *
  7726. * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);
  7727. * // => [1.2]
  7728. *
  7729. * // The `_.property` iteratee shorthand.
  7730. * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
  7731. * // => [{ 'x': 2 }]
  7732. */
  7733. var differenceBy = baseRest(function(array, values) {
  7734. var iteratee = last(values);
  7735. if (isArrayLikeObject(iteratee)) {
  7736. iteratee = undefined;
  7737. }
  7738. return isArrayLikeObject(array)
  7739. ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))
  7740. : [];
  7741. });
  7742. /**
  7743. * This method is like `_.difference` except that it accepts `comparator`
  7744. * which is invoked to compare elements of `array` to `values`. The order and
  7745. * references of result values are determined by the first array. The comparator
  7746. * is invoked with two arguments: (arrVal, othVal).
  7747. *
  7748. * **Note:** Unlike `_.pullAllWith`, this method returns a new array.
  7749. *
  7750. * @static
  7751. * @memberOf _
  7752. * @since 4.0.0
  7753. * @category Array
  7754. * @param {Array} array The array to inspect.
  7755. * @param {...Array} [values] The values to exclude.
  7756. * @param {Function} [comparator] The comparator invoked per element.
  7757. * @returns {Array} Returns the new array of filtered values.
  7758. * @example
  7759. *
  7760. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  7761. *
  7762. * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
  7763. * // => [{ 'x': 2, 'y': 1 }]
  7764. */
  7765. var differenceWith = baseRest(function(array, values) {
  7766. var comparator = last(values);
  7767. if (isArrayLikeObject(comparator)) {
  7768. comparator = undefined;
  7769. }
  7770. return isArrayLikeObject(array)
  7771. ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
  7772. : [];
  7773. });
  7774. /**
  7775. * Creates a slice of `array` with `n` elements dropped from the beginning.
  7776. *
  7777. * @static
  7778. * @memberOf _
  7779. * @since 0.5.0
  7780. * @category Array
  7781. * @param {Array} array The array to query.
  7782. * @param {number} [n=1] The number of elements to drop.
  7783. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  7784. * @returns {Array} Returns the slice of `array`.
  7785. * @example
  7786. *
  7787. * _.drop([1, 2, 3]);
  7788. * // => [2, 3]
  7789. *
  7790. * _.drop([1, 2, 3], 2);
  7791. * // => [3]
  7792. *
  7793. * _.drop([1, 2, 3], 5);
  7794. * // => []
  7795. *
  7796. * _.drop([1, 2, 3], 0);
  7797. * // => [1, 2, 3]
  7798. */
  7799. function drop(array, n, guard) {
  7800. var length = array == null ? 0 : array.length;
  7801. if (!length) {
  7802. return [];
  7803. }
  7804. n = (guard || n === undefined) ? 1 : toInteger(n);
  7805. return baseSlice(array, n < 0 ? 0 : n, length);
  7806. }
  7807. /**
  7808. * Creates a slice of `array` with `n` elements dropped from the end.
  7809. *
  7810. * @static
  7811. * @memberOf _
  7812. * @since 3.0.0
  7813. * @category Array
  7814. * @param {Array} array The array to query.
  7815. * @param {number} [n=1] The number of elements to drop.
  7816. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  7817. * @returns {Array} Returns the slice of `array`.
  7818. * @example
  7819. *
  7820. * _.dropRight([1, 2, 3]);
  7821. * // => [1, 2]
  7822. *
  7823. * _.dropRight([1, 2, 3], 2);
  7824. * // => [1]
  7825. *
  7826. * _.dropRight([1, 2, 3], 5);
  7827. * // => []
  7828. *
  7829. * _.dropRight([1, 2, 3], 0);
  7830. * // => [1, 2, 3]
  7831. */
  7832. function dropRight(array, n, guard) {
  7833. var length = array == null ? 0 : array.length;
  7834. if (!length) {
  7835. return [];
  7836. }
  7837. n = (guard || n === undefined) ? 1 : toInteger(n);
  7838. n = length - n;
  7839. return baseSlice(array, 0, n < 0 ? 0 : n);
  7840. }
  7841. /**
  7842. * Creates a slice of `array` excluding elements dropped from the end.
  7843. * Elements are dropped until `predicate` returns falsey. The predicate is
  7844. * invoked with three arguments: (value, index, array).
  7845. *
  7846. * @static
  7847. * @memberOf _
  7848. * @since 3.0.0
  7849. * @category Array
  7850. * @param {Array} array The array to query.
  7851. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  7852. * @returns {Array} Returns the slice of `array`.
  7853. * @example
  7854. *
  7855. * var users = [
  7856. * { 'user': 'barney', 'active': true },
  7857. * { 'user': 'fred', 'active': false },
  7858. * { 'user': 'pebbles', 'active': false }
  7859. * ];
  7860. *
  7861. * _.dropRightWhile(users, function(o) { return !o.active; });
  7862. * // => objects for ['barney']
  7863. *
  7864. * // The `_.matches` iteratee shorthand.
  7865. * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
  7866. * // => objects for ['barney', 'fred']
  7867. *
  7868. * // The `_.matchesProperty` iteratee shorthand.
  7869. * _.dropRightWhile(users, ['active', false]);
  7870. * // => objects for ['barney']
  7871. *
  7872. * // The `_.property` iteratee shorthand.
  7873. * _.dropRightWhile(users, 'active');
  7874. * // => objects for ['barney', 'fred', 'pebbles']
  7875. */
  7876. function dropRightWhile(array, predicate) {
  7877. return (array && array.length)
  7878. ? baseWhile(array, getIteratee(predicate, 3), true, true)
  7879. : [];
  7880. }
  7881. /**
  7882. * Creates a slice of `array` excluding elements dropped from the beginning.
  7883. * Elements are dropped until `predicate` returns falsey. The predicate is
  7884. * invoked with three arguments: (value, index, array).
  7885. *
  7886. * @static
  7887. * @memberOf _
  7888. * @since 3.0.0
  7889. * @category Array
  7890. * @param {Array} array The array to query.
  7891. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  7892. * @returns {Array} Returns the slice of `array`.
  7893. * @example
  7894. *
  7895. * var users = [
  7896. * { 'user': 'barney', 'active': false },
  7897. * { 'user': 'fred', 'active': false },
  7898. * { 'user': 'pebbles', 'active': true }
  7899. * ];
  7900. *
  7901. * _.dropWhile(users, function(o) { return !o.active; });
  7902. * // => objects for ['pebbles']
  7903. *
  7904. * // The `_.matches` iteratee shorthand.
  7905. * _.dropWhile(users, { 'user': 'barney', 'active': false });
  7906. * // => objects for ['fred', 'pebbles']
  7907. *
  7908. * // The `_.matchesProperty` iteratee shorthand.
  7909. * _.dropWhile(users, ['active', false]);
  7910. * // => objects for ['pebbles']
  7911. *
  7912. * // The `_.property` iteratee shorthand.
  7913. * _.dropWhile(users, 'active');
  7914. * // => objects for ['barney', 'fred', 'pebbles']
  7915. */
  7916. function dropWhile(array, predicate) {
  7917. return (array && array.length)
  7918. ? baseWhile(array, getIteratee(predicate, 3), true)
  7919. : [];
  7920. }
  7921. /**
  7922. * Fills elements of `array` with `value` from `start` up to, but not
  7923. * including, `end`.
  7924. *
  7925. * **Note:** This method mutates `array`.
  7926. *
  7927. * @static
  7928. * @memberOf _
  7929. * @since 3.2.0
  7930. * @category Array
  7931. * @param {Array} array The array to fill.
  7932. * @param {*} value The value to fill `array` with.
  7933. * @param {number} [start=0] The start position.
  7934. * @param {number} [end=array.length] The end position.
  7935. * @returns {Array} Returns `array`.
  7936. * @example
  7937. *
  7938. * var array = [1, 2, 3];
  7939. *
  7940. * _.fill(array, 'a');
  7941. * console.log(array);
  7942. * // => ['a', 'a', 'a']
  7943. *
  7944. * _.fill(Array(3), 2);
  7945. * // => [2, 2, 2]
  7946. *
  7947. * _.fill([4, 6, 8, 10], '*', 1, 3);
  7948. * // => [4, '*', '*', 10]
  7949. */
  7950. function fill(array, value, start, end) {
  7951. var length = array == null ? 0 : array.length;
  7952. if (!length) {
  7953. return [];
  7954. }
  7955. if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
  7956. start = 0;
  7957. end = length;
  7958. }
  7959. return baseFill(array, value, start, end);
  7960. }
  7961. /**
  7962. * This method is like `_.find` except that it returns the index of the first
  7963. * element `predicate` returns truthy for instead of the element itself.
  7964. *
  7965. * @static
  7966. * @memberOf _
  7967. * @since 1.1.0
  7968. * @category Array
  7969. * @param {Array} array The array to inspect.
  7970. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  7971. * @param {number} [fromIndex=0] The index to search from.
  7972. * @returns {number} Returns the index of the found element, else `-1`.
  7973. * @example
  7974. *
  7975. * var users = [
  7976. * { 'user': 'barney', 'active': false },
  7977. * { 'user': 'fred', 'active': false },
  7978. * { 'user': 'pebbles', 'active': true }
  7979. * ];
  7980. *
  7981. * _.findIndex(users, function(o) { return o.user == 'barney'; });
  7982. * // => 0
  7983. *
  7984. * // The `_.matches` iteratee shorthand.
  7985. * _.findIndex(users, { 'user': 'fred', 'active': false });
  7986. * // => 1
  7987. *
  7988. * // The `_.matchesProperty` iteratee shorthand.
  7989. * _.findIndex(users, ['active', false]);
  7990. * // => 0
  7991. *
  7992. * // The `_.property` iteratee shorthand.
  7993. * _.findIndex(users, 'active');
  7994. * // => 2
  7995. */
  7996. function findIndex(array, predicate, fromIndex) {
  7997. var length = array == null ? 0 : array.length;
  7998. if (!length) {
  7999. return -1;
  8000. }
  8001. var index = fromIndex == null ? 0 : toInteger(fromIndex);
  8002. if (index < 0) {
  8003. index = nativeMax(length + index, 0);
  8004. }
  8005. return baseFindIndex(array, getIteratee(predicate, 3), index);
  8006. }
  8007. /**
  8008. * This method is like `_.findIndex` except that it iterates over elements
  8009. * of `collection` from right to left.
  8010. *
  8011. * @static
  8012. * @memberOf _
  8013. * @since 2.0.0
  8014. * @category Array
  8015. * @param {Array} array The array to inspect.
  8016. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  8017. * @param {number} [fromIndex=array.length-1] The index to search from.
  8018. * @returns {number} Returns the index of the found element, else `-1`.
  8019. * @example
  8020. *
  8021. * var users = [
  8022. * { 'user': 'barney', 'active': true },
  8023. * { 'user': 'fred', 'active': false },
  8024. * { 'user': 'pebbles', 'active': false }
  8025. * ];
  8026. *
  8027. * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
  8028. * // => 2
  8029. *
  8030. * // The `_.matches` iteratee shorthand.
  8031. * _.findLastIndex(users, { 'user': 'barney', 'active': true });
  8032. * // => 0
  8033. *
  8034. * // The `_.matchesProperty` iteratee shorthand.
  8035. * _.findLastIndex(users, ['active', false]);
  8036. * // => 2
  8037. *
  8038. * // The `_.property` iteratee shorthand.
  8039. * _.findLastIndex(users, 'active');
  8040. * // => 0
  8041. */
  8042. function findLastIndex(array, predicate, fromIndex) {
  8043. var length = array == null ? 0 : array.length;
  8044. if (!length) {
  8045. return -1;
  8046. }
  8047. var index = length - 1;
  8048. if (fromIndex !== undefined) {
  8049. index = toInteger(fromIndex);
  8050. index = fromIndex < 0
  8051. ? nativeMax(length + index, 0)
  8052. : nativeMin(index, length - 1);
  8053. }
  8054. return baseFindIndex(array, getIteratee(predicate, 3), index, true);
  8055. }
  8056. /**
  8057. * Flattens `array` a single level deep.
  8058. *
  8059. * @static
  8060. * @memberOf _
  8061. * @since 0.1.0
  8062. * @category Array
  8063. * @param {Array} array The array to flatten.
  8064. * @returns {Array} Returns the new flattened array.
  8065. * @example
  8066. *
  8067. * _.flatten([1, [2, [3, [4]], 5]]);
  8068. * // => [1, 2, [3, [4]], 5]
  8069. */
  8070. function flatten(array) {
  8071. var length = array == null ? 0 : array.length;
  8072. return length ? baseFlatten(array, 1) : [];
  8073. }
  8074. /**
  8075. * Recursively flattens `array`.
  8076. *
  8077. * @static
  8078. * @memberOf _
  8079. * @since 3.0.0
  8080. * @category Array
  8081. * @param {Array} array The array to flatten.
  8082. * @returns {Array} Returns the new flattened array.
  8083. * @example
  8084. *
  8085. * _.flattenDeep([1, [2, [3, [4]], 5]]);
  8086. * // => [1, 2, 3, 4, 5]
  8087. */
  8088. function flattenDeep(array) {
  8089. var length = array == null ? 0 : array.length;
  8090. return length ? baseFlatten(array, INFINITY) : [];
  8091. }
  8092. /**
  8093. * Recursively flatten `array` up to `depth` times.
  8094. *
  8095. * @static
  8096. * @memberOf _
  8097. * @since 4.4.0
  8098. * @category Array
  8099. * @param {Array} array The array to flatten.
  8100. * @param {number} [depth=1] The maximum recursion depth.
  8101. * @returns {Array} Returns the new flattened array.
  8102. * @example
  8103. *
  8104. * var array = [1, [2, [3, [4]], 5]];
  8105. *
  8106. * _.flattenDepth(array, 1);
  8107. * // => [1, 2, [3, [4]], 5]
  8108. *
  8109. * _.flattenDepth(array, 2);
  8110. * // => [1, 2, 3, [4], 5]
  8111. */
  8112. function flattenDepth(array, depth) {
  8113. var length = array == null ? 0 : array.length;
  8114. if (!length) {
  8115. return [];
  8116. }
  8117. depth = depth === undefined ? 1 : toInteger(depth);
  8118. return baseFlatten(array, depth);
  8119. }
  8120. /**
  8121. * The inverse of `_.toPairs`; this method returns an object composed
  8122. * from key-value `pairs`.
  8123. *
  8124. * @static
  8125. * @memberOf _
  8126. * @since 4.0.0
  8127. * @category Array
  8128. * @param {Array} pairs The key-value pairs.
  8129. * @returns {Object} Returns the new object.
  8130. * @example
  8131. *
  8132. * _.fromPairs([['a', 1], ['b', 2]]);
  8133. * // => { 'a': 1, 'b': 2 }
  8134. */
  8135. function fromPairs(pairs) {
  8136. var index = -1,
  8137. length = pairs == null ? 0 : pairs.length,
  8138. result = {};
  8139. while (++index < length) {
  8140. var pair = pairs[index];
  8141. result[pair[0]] = pair[1];
  8142. }
  8143. return result;
  8144. }
  8145. /**
  8146. * Gets the first element of `array`.
  8147. *
  8148. * @static
  8149. * @memberOf _
  8150. * @since 0.1.0
  8151. * @alias first
  8152. * @category Array
  8153. * @param {Array} array The array to query.
  8154. * @returns {*} Returns the first element of `array`.
  8155. * @example
  8156. *
  8157. * _.head([1, 2, 3]);
  8158. * // => 1
  8159. *
  8160. * _.head([]);
  8161. * // => undefined
  8162. */
  8163. function head(array) {
  8164. return (array && array.length) ? array[0] : undefined;
  8165. }
  8166. /**
  8167. * Gets the index at which the first occurrence of `value` is found in `array`
  8168. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  8169. * for equality comparisons. If `fromIndex` is negative, it's used as the
  8170. * offset from the end of `array`.
  8171. *
  8172. * @static
  8173. * @memberOf _
  8174. * @since 0.1.0
  8175. * @category Array
  8176. * @param {Array} array The array to inspect.
  8177. * @param {*} value The value to search for.
  8178. * @param {number} [fromIndex=0] The index to search from.
  8179. * @returns {number} Returns the index of the matched value, else `-1`.
  8180. * @example
  8181. *
  8182. * _.indexOf([1, 2, 1, 2], 2);
  8183. * // => 1
  8184. *
  8185. * // Search from the `fromIndex`.
  8186. * _.indexOf([1, 2, 1, 2], 2, 2);
  8187. * // => 3
  8188. */
  8189. function indexOf(array, value, fromIndex) {
  8190. var length = array == null ? 0 : array.length;
  8191. if (!length) {
  8192. return -1;
  8193. }
  8194. var index = fromIndex == null ? 0 : toInteger(fromIndex);
  8195. if (index < 0) {
  8196. index = nativeMax(length + index, 0);
  8197. }
  8198. return baseIndexOf(array, value, index);
  8199. }
  8200. /**
  8201. * Gets all but the last element of `array`.
  8202. *
  8203. * @static
  8204. * @memberOf _
  8205. * @since 0.1.0
  8206. * @category Array
  8207. * @param {Array} array The array to query.
  8208. * @returns {Array} Returns the slice of `array`.
  8209. * @example
  8210. *
  8211. * _.initial([1, 2, 3]);
  8212. * // => [1, 2]
  8213. */
  8214. function initial(array) {
  8215. var length = array == null ? 0 : array.length;
  8216. return length ? baseSlice(array, 0, -1) : [];
  8217. }
  8218. /**
  8219. * Creates an array of unique values that are included in all given arrays
  8220. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  8221. * for equality comparisons. The order and references of result values are
  8222. * determined by the first array.
  8223. *
  8224. * @static
  8225. * @memberOf _
  8226. * @since 0.1.0
  8227. * @category Array
  8228. * @param {...Array} [arrays] The arrays to inspect.
  8229. * @returns {Array} Returns the new array of intersecting values.
  8230. * @example
  8231. *
  8232. * _.intersection([2, 1], [2, 3]);
  8233. * // => [2]
  8234. */
  8235. var intersection = baseRest(function(arrays) {
  8236. var mapped = arrayMap(arrays, castArrayLikeObject);
  8237. return (mapped.length && mapped[0] === arrays[0])
  8238. ? baseIntersection(mapped)
  8239. : [];
  8240. });
  8241. /**
  8242. * This method is like `_.intersection` except that it accepts `iteratee`
  8243. * which is invoked for each element of each `arrays` to generate the criterion
  8244. * by which they're compared. The order and references of result values are
  8245. * determined by the first array. The iteratee is invoked with one argument:
  8246. * (value).
  8247. *
  8248. * @static
  8249. * @memberOf _
  8250. * @since 4.0.0
  8251. * @category Array
  8252. * @param {...Array} [arrays] The arrays to inspect.
  8253. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  8254. * @returns {Array} Returns the new array of intersecting values.
  8255. * @example
  8256. *
  8257. * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
  8258. * // => [2.1]
  8259. *
  8260. * // The `_.property` iteratee shorthand.
  8261. * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
  8262. * // => [{ 'x': 1 }]
  8263. */
  8264. var intersectionBy = baseRest(function(arrays) {
  8265. var iteratee = last(arrays),
  8266. mapped = arrayMap(arrays, castArrayLikeObject);
  8267. if (iteratee === last(mapped)) {
  8268. iteratee = undefined;
  8269. } else {
  8270. mapped.pop();
  8271. }
  8272. return (mapped.length && mapped[0] === arrays[0])
  8273. ? baseIntersection(mapped, getIteratee(iteratee, 2))
  8274. : [];
  8275. });
  8276. /**
  8277. * This method is like `_.intersection` except that it accepts `comparator`
  8278. * which is invoked to compare elements of `arrays`. The order and references
  8279. * of result values are determined by the first array. The comparator is
  8280. * invoked with two arguments: (arrVal, othVal).
  8281. *
  8282. * @static
  8283. * @memberOf _
  8284. * @since 4.0.0
  8285. * @category Array
  8286. * @param {...Array} [arrays] The arrays to inspect.
  8287. * @param {Function} [comparator] The comparator invoked per element.
  8288. * @returns {Array} Returns the new array of intersecting values.
  8289. * @example
  8290. *
  8291. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  8292. * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
  8293. *
  8294. * _.intersectionWith(objects, others, _.isEqual);
  8295. * // => [{ 'x': 1, 'y': 2 }]
  8296. */
  8297. var intersectionWith = baseRest(function(arrays) {
  8298. var comparator = last(arrays),
  8299. mapped = arrayMap(arrays, castArrayLikeObject);
  8300. comparator = typeof comparator == 'function' ? comparator : undefined;
  8301. if (comparator) {
  8302. mapped.pop();
  8303. }
  8304. return (mapped.length && mapped[0] === arrays[0])
  8305. ? baseIntersection(mapped, undefined, comparator)
  8306. : [];
  8307. });
  8308. /**
  8309. * Converts all elements in `array` into a string separated by `separator`.
  8310. *
  8311. * @static
  8312. * @memberOf _
  8313. * @since 4.0.0
  8314. * @category Array
  8315. * @param {Array} array The array to convert.
  8316. * @param {string} [separator=','] The element separator.
  8317. * @returns {string} Returns the joined string.
  8318. * @example
  8319. *
  8320. * _.join(['a', 'b', 'c'], '~');
  8321. * // => 'a~b~c'
  8322. */
  8323. function join(array, separator) {
  8324. return array == null ? '' : nativeJoin.call(array, separator);
  8325. }
  8326. /**
  8327. * Gets the last element of `array`.
  8328. *
  8329. * @static
  8330. * @memberOf _
  8331. * @since 0.1.0
  8332. * @category Array
  8333. * @param {Array} array The array to query.
  8334. * @returns {*} Returns the last element of `array`.
  8335. * @example
  8336. *
  8337. * _.last([1, 2, 3]);
  8338. * // => 3
  8339. */
  8340. function last(array) {
  8341. var length = array == null ? 0 : array.length;
  8342. return length ? array[length - 1] : undefined;
  8343. }
  8344. /**
  8345. * This method is like `_.indexOf` except that it iterates over elements of
  8346. * `array` from right to left.
  8347. *
  8348. * @static
  8349. * @memberOf _
  8350. * @since 0.1.0
  8351. * @category Array
  8352. * @param {Array} array The array to inspect.
  8353. * @param {*} value The value to search for.
  8354. * @param {number} [fromIndex=array.length-1] The index to search from.
  8355. * @returns {number} Returns the index of the matched value, else `-1`.
  8356. * @example
  8357. *
  8358. * _.lastIndexOf([1, 2, 1, 2], 2);
  8359. * // => 3
  8360. *
  8361. * // Search from the `fromIndex`.
  8362. * _.lastIndexOf([1, 2, 1, 2], 2, 2);
  8363. * // => 1
  8364. */
  8365. function lastIndexOf(array, value, fromIndex) {
  8366. var length = array == null ? 0 : array.length;
  8367. if (!length) {
  8368. return -1;
  8369. }
  8370. var index = length;
  8371. if (fromIndex !== undefined) {
  8372. index = toInteger(fromIndex);
  8373. index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
  8374. }
  8375. return value === value
  8376. ? strictLastIndexOf(array, value, index)
  8377. : baseFindIndex(array, baseIsNaN, index, true);
  8378. }
  8379. /**
  8380. * Gets the element at index `n` of `array`. If `n` is negative, the nth
  8381. * element from the end is returned.
  8382. *
  8383. * @static
  8384. * @memberOf _
  8385. * @since 4.11.0
  8386. * @category Array
  8387. * @param {Array} array The array to query.
  8388. * @param {number} [n=0] The index of the element to return.
  8389. * @returns {*} Returns the nth element of `array`.
  8390. * @example
  8391. *
  8392. * var array = ['a', 'b', 'c', 'd'];
  8393. *
  8394. * _.nth(array, 1);
  8395. * // => 'b'
  8396. *
  8397. * _.nth(array, -2);
  8398. * // => 'c';
  8399. */
  8400. function nth(array, n) {
  8401. return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
  8402. }
  8403. /**
  8404. * Removes all given values from `array` using
  8405. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  8406. * for equality comparisons.
  8407. *
  8408. * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
  8409. * to remove elements from an array by predicate.
  8410. *
  8411. * @static
  8412. * @memberOf _
  8413. * @since 2.0.0
  8414. * @category Array
  8415. * @param {Array} array The array to modify.
  8416. * @param {...*} [values] The values to remove.
  8417. * @returns {Array} Returns `array`.
  8418. * @example
  8419. *
  8420. * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
  8421. *
  8422. * _.pull(array, 'a', 'c');
  8423. * console.log(array);
  8424. * // => ['b', 'b']
  8425. */
  8426. var pull = baseRest(pullAll);
  8427. /**
  8428. * This method is like `_.pull` except that it accepts an array of values to remove.
  8429. *
  8430. * **Note:** Unlike `_.difference`, this method mutates `array`.
  8431. *
  8432. * @static
  8433. * @memberOf _
  8434. * @since 4.0.0
  8435. * @category Array
  8436. * @param {Array} array The array to modify.
  8437. * @param {Array} values The values to remove.
  8438. * @returns {Array} Returns `array`.
  8439. * @example
  8440. *
  8441. * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
  8442. *
  8443. * _.pullAll(array, ['a', 'c']);
  8444. * console.log(array);
  8445. * // => ['b', 'b']
  8446. */
  8447. function pullAll(array, values) {
  8448. return (array && array.length && values && values.length)
  8449. ? basePullAll(array, values)
  8450. : array;
  8451. }
  8452. /**
  8453. * This method is like `_.pullAll` except that it accepts `iteratee` which is
  8454. * invoked for each element of `array` and `values` to generate the criterion
  8455. * by which they're compared. The iteratee is invoked with one argument: (value).
  8456. *
  8457. * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
  8458. *
  8459. * @static
  8460. * @memberOf _
  8461. * @since 4.0.0
  8462. * @category Array
  8463. * @param {Array} array The array to modify.
  8464. * @param {Array} values The values to remove.
  8465. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  8466. * @returns {Array} Returns `array`.
  8467. * @example
  8468. *
  8469. * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
  8470. *
  8471. * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
  8472. * console.log(array);
  8473. * // => [{ 'x': 2 }]
  8474. */
  8475. function pullAllBy(array, values, iteratee) {
  8476. return (array && array.length && values && values.length)
  8477. ? basePullAll(array, values, getIteratee(iteratee, 2))
  8478. : array;
  8479. }
  8480. /**
  8481. * This method is like `_.pullAll` except that it accepts `comparator` which
  8482. * is invoked to compare elements of `array` to `values`. The comparator is
  8483. * invoked with two arguments: (arrVal, othVal).
  8484. *
  8485. * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
  8486. *
  8487. * @static
  8488. * @memberOf _
  8489. * @since 4.6.0
  8490. * @category Array
  8491. * @param {Array} array The array to modify.
  8492. * @param {Array} values The values to remove.
  8493. * @param {Function} [comparator] The comparator invoked per element.
  8494. * @returns {Array} Returns `array`.
  8495. * @example
  8496. *
  8497. * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
  8498. *
  8499. * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
  8500. * console.log(array);
  8501. * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
  8502. */
  8503. function pullAllWith(array, values, comparator) {
  8504. return (array && array.length && values && values.length)
  8505. ? basePullAll(array, values, undefined, comparator)
  8506. : array;
  8507. }
  8508. /**
  8509. * Removes elements from `array` corresponding to `indexes` and returns an
  8510. * array of removed elements.
  8511. *
  8512. * **Note:** Unlike `_.at`, this method mutates `array`.
  8513. *
  8514. * @static
  8515. * @memberOf _
  8516. * @since 3.0.0
  8517. * @category Array
  8518. * @param {Array} array The array to modify.
  8519. * @param {...(number|number[])} [indexes] The indexes of elements to remove.
  8520. * @returns {Array} Returns the new array of removed elements.
  8521. * @example
  8522. *
  8523. * var array = ['a', 'b', 'c', 'd'];
  8524. * var pulled = _.pullAt(array, [1, 3]);
  8525. *
  8526. * console.log(array);
  8527. * // => ['a', 'c']
  8528. *
  8529. * console.log(pulled);
  8530. * // => ['b', 'd']
  8531. */
  8532. var pullAt = flatRest(function(array, indexes) {
  8533. var length = array == null ? 0 : array.length,
  8534. result = baseAt(array, indexes);
  8535. basePullAt(array, arrayMap(indexes, function(index) {
  8536. return isIndex(index, length) ? +index : index;
  8537. }).sort(compareAscending));
  8538. return result;
  8539. });
  8540. /**
  8541. * Removes all elements from `array` that `predicate` returns truthy for
  8542. * and returns an array of the removed elements. The predicate is invoked
  8543. * with three arguments: (value, index, array).
  8544. *
  8545. * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
  8546. * to pull elements from an array by value.
  8547. *
  8548. * @static
  8549. * @memberOf _
  8550. * @since 2.0.0
  8551. * @category Array
  8552. * @param {Array} array The array to modify.
  8553. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  8554. * @returns {Array} Returns the new array of removed elements.
  8555. * @example
  8556. *
  8557. * var array = [1, 2, 3, 4];
  8558. * var evens = _.remove(array, function(n) {
  8559. * return n % 2 == 0;
  8560. * });
  8561. *
  8562. * console.log(array);
  8563. * // => [1, 3]
  8564. *
  8565. * console.log(evens);
  8566. * // => [2, 4]
  8567. */
  8568. function remove(array, predicate) {
  8569. var result = [];
  8570. if (!(array && array.length)) {
  8571. return result;
  8572. }
  8573. var index = -1,
  8574. indexes = [],
  8575. length = array.length;
  8576. predicate = getIteratee(predicate, 3);
  8577. while (++index < length) {
  8578. var value = array[index];
  8579. if (predicate(value, index, array)) {
  8580. result.push(value);
  8581. indexes.push(index);
  8582. }
  8583. }
  8584. basePullAt(array, indexes);
  8585. return result;
  8586. }
  8587. /**
  8588. * Reverses `array` so that the first element becomes the last, the second
  8589. * element becomes the second to last, and so on.
  8590. *
  8591. * **Note:** This method mutates `array` and is based on
  8592. * [`Array#reverse`](https://mdn.io/Array/reverse).
  8593. *
  8594. * @static
  8595. * @memberOf _
  8596. * @since 4.0.0
  8597. * @category Array
  8598. * @param {Array} array The array to modify.
  8599. * @returns {Array} Returns `array`.
  8600. * @example
  8601. *
  8602. * var array = [1, 2, 3];
  8603. *
  8604. * _.reverse(array);
  8605. * // => [3, 2, 1]
  8606. *
  8607. * console.log(array);
  8608. * // => [3, 2, 1]
  8609. */
  8610. function reverse(array) {
  8611. return array == null ? array : nativeReverse.call(array);
  8612. }
  8613. /**
  8614. * Creates a slice of `array` from `start` up to, but not including, `end`.
  8615. *
  8616. * **Note:** This method is used instead of
  8617. * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
  8618. * returned.
  8619. *
  8620. * @static
  8621. * @memberOf _
  8622. * @since 3.0.0
  8623. * @category Array
  8624. * @param {Array} array The array to slice.
  8625. * @param {number} [start=0] The start position.
  8626. * @param {number} [end=array.length] The end position.
  8627. * @returns {Array} Returns the slice of `array`.
  8628. */
  8629. function slice(array, start, end) {
  8630. var length = array == null ? 0 : array.length;
  8631. if (!length) {
  8632. return [];
  8633. }
  8634. if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
  8635. start = 0;
  8636. end = length;
  8637. }
  8638. else {
  8639. start = start == null ? 0 : toInteger(start);
  8640. end = end === undefined ? length : toInteger(end);
  8641. }
  8642. return baseSlice(array, start, end);
  8643. }
  8644. /**
  8645. * Uses a binary search to determine the lowest index at which `value`
  8646. * should be inserted into `array` in order to maintain its sort order.
  8647. *
  8648. * @static
  8649. * @memberOf _
  8650. * @since 0.1.0
  8651. * @category Array
  8652. * @param {Array} array The sorted array to inspect.
  8653. * @param {*} value The value to evaluate.
  8654. * @returns {number} Returns the index at which `value` should be inserted
  8655. * into `array`.
  8656. * @example
  8657. *
  8658. * _.sortedIndex([30, 50], 40);
  8659. * // => 1
  8660. */
  8661. function sortedIndex(array, value) {
  8662. return baseSortedIndex(array, value);
  8663. }
  8664. /**
  8665. * This method is like `_.sortedIndex` except that it accepts `iteratee`
  8666. * which is invoked for `value` and each element of `array` to compute their
  8667. * sort ranking. The iteratee is invoked with one argument: (value).
  8668. *
  8669. * @static
  8670. * @memberOf _
  8671. * @since 4.0.0
  8672. * @category Array
  8673. * @param {Array} array The sorted array to inspect.
  8674. * @param {*} value The value to evaluate.
  8675. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  8676. * @returns {number} Returns the index at which `value` should be inserted
  8677. * into `array`.
  8678. * @example
  8679. *
  8680. * var objects = [{ 'x': 4 }, { 'x': 5 }];
  8681. *
  8682. * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
  8683. * // => 0
  8684. *
  8685. * // The `_.property` iteratee shorthand.
  8686. * _.sortedIndexBy(objects, { 'x': 4 }, 'x');
  8687. * // => 0
  8688. */
  8689. function sortedIndexBy(array, value, iteratee) {
  8690. return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));
  8691. }
  8692. /**
  8693. * This method is like `_.indexOf` except that it performs a binary
  8694. * search on a sorted `array`.
  8695. *
  8696. * @static
  8697. * @memberOf _
  8698. * @since 4.0.0
  8699. * @category Array
  8700. * @param {Array} array The array to inspect.
  8701. * @param {*} value The value to search for.
  8702. * @returns {number} Returns the index of the matched value, else `-1`.
  8703. * @example
  8704. *
  8705. * _.sortedIndexOf([4, 5, 5, 5, 6], 5);
  8706. * // => 1
  8707. */
  8708. function sortedIndexOf(array, value) {
  8709. var length = array == null ? 0 : array.length;
  8710. if (length) {
  8711. var index = baseSortedIndex(array, value);
  8712. if (index < length && eq(array[index], value)) {
  8713. return index;
  8714. }
  8715. }
  8716. return -1;
  8717. }
  8718. /**
  8719. * This method is like `_.sortedIndex` except that it returns the highest
  8720. * index at which `value` should be inserted into `array` in order to
  8721. * maintain its sort order.
  8722. *
  8723. * @static
  8724. * @memberOf _
  8725. * @since 3.0.0
  8726. * @category Array
  8727. * @param {Array} array The sorted array to inspect.
  8728. * @param {*} value The value to evaluate.
  8729. * @returns {number} Returns the index at which `value` should be inserted
  8730. * into `array`.
  8731. * @example
  8732. *
  8733. * _.sortedLastIndex([4, 5, 5, 5, 6], 5);
  8734. * // => 4
  8735. */
  8736. function sortedLastIndex(array, value) {
  8737. return baseSortedIndex(array, value, true);
  8738. }
  8739. /**
  8740. * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
  8741. * which is invoked for `value` and each element of `array` to compute their
  8742. * sort ranking. The iteratee is invoked with one argument: (value).
  8743. *
  8744. * @static
  8745. * @memberOf _
  8746. * @since 4.0.0
  8747. * @category Array
  8748. * @param {Array} array The sorted array to inspect.
  8749. * @param {*} value The value to evaluate.
  8750. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  8751. * @returns {number} Returns the index at which `value` should be inserted
  8752. * into `array`.
  8753. * @example
  8754. *
  8755. * var objects = [{ 'x': 4 }, { 'x': 5 }];
  8756. *
  8757. * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
  8758. * // => 1
  8759. *
  8760. * // The `_.property` iteratee shorthand.
  8761. * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');
  8762. * // => 1
  8763. */
  8764. function sortedLastIndexBy(array, value, iteratee) {
  8765. return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);
  8766. }
  8767. /**
  8768. * This method is like `_.lastIndexOf` except that it performs a binary
  8769. * search on a sorted `array`.
  8770. *
  8771. * @static
  8772. * @memberOf _
  8773. * @since 4.0.0
  8774. * @category Array
  8775. * @param {Array} array The array to inspect.
  8776. * @param {*} value The value to search for.
  8777. * @returns {number} Returns the index of the matched value, else `-1`.
  8778. * @example
  8779. *
  8780. * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
  8781. * // => 3
  8782. */
  8783. function sortedLastIndexOf(array, value) {
  8784. var length = array == null ? 0 : array.length;
  8785. if (length) {
  8786. var index = baseSortedIndex(array, value, true) - 1;
  8787. if (eq(array[index], value)) {
  8788. return index;
  8789. }
  8790. }
  8791. return -1;
  8792. }
  8793. /**
  8794. * This method is like `_.uniq` except that it's designed and optimized
  8795. * for sorted arrays.
  8796. *
  8797. * @static
  8798. * @memberOf _
  8799. * @since 4.0.0
  8800. * @category Array
  8801. * @param {Array} array The array to inspect.
  8802. * @returns {Array} Returns the new duplicate free array.
  8803. * @example
  8804. *
  8805. * _.sortedUniq([1, 1, 2]);
  8806. * // => [1, 2]
  8807. */
  8808. function sortedUniq(array) {
  8809. return (array && array.length)
  8810. ? baseSortedUniq(array)
  8811. : [];
  8812. }
  8813. /**
  8814. * This method is like `_.uniqBy` except that it's designed and optimized
  8815. * for sorted arrays.
  8816. *
  8817. * @static
  8818. * @memberOf _
  8819. * @since 4.0.0
  8820. * @category Array
  8821. * @param {Array} array The array to inspect.
  8822. * @param {Function} [iteratee] The iteratee invoked per element.
  8823. * @returns {Array} Returns the new duplicate free array.
  8824. * @example
  8825. *
  8826. * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
  8827. * // => [1.1, 2.3]
  8828. */
  8829. function sortedUniqBy(array, iteratee) {
  8830. return (array && array.length)
  8831. ? baseSortedUniq(array, getIteratee(iteratee, 2))
  8832. : [];
  8833. }
  8834. /**
  8835. * Gets all but the first element of `array`.
  8836. *
  8837. * @static
  8838. * @memberOf _
  8839. * @since 4.0.0
  8840. * @category Array
  8841. * @param {Array} array The array to query.
  8842. * @returns {Array} Returns the slice of `array`.
  8843. * @example
  8844. *
  8845. * _.tail([1, 2, 3]);
  8846. * // => [2, 3]
  8847. */
  8848. function tail(array) {
  8849. var length = array == null ? 0 : array.length;
  8850. return length ? baseSlice(array, 1, length) : [];
  8851. }
  8852. /**
  8853. * Creates a slice of `array` with `n` elements taken from the beginning.
  8854. *
  8855. * @static
  8856. * @memberOf _
  8857. * @since 0.1.0
  8858. * @category Array
  8859. * @param {Array} array The array to query.
  8860. * @param {number} [n=1] The number of elements to take.
  8861. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  8862. * @returns {Array} Returns the slice of `array`.
  8863. * @example
  8864. *
  8865. * _.take([1, 2, 3]);
  8866. * // => [1]
  8867. *
  8868. * _.take([1, 2, 3], 2);
  8869. * // => [1, 2]
  8870. *
  8871. * _.take([1, 2, 3], 5);
  8872. * // => [1, 2, 3]
  8873. *
  8874. * _.take([1, 2, 3], 0);
  8875. * // => []
  8876. */
  8877. function take(array, n, guard) {
  8878. if (!(array && array.length)) {
  8879. return [];
  8880. }
  8881. n = (guard || n === undefined) ? 1 : toInteger(n);
  8882. return baseSlice(array, 0, n < 0 ? 0 : n);
  8883. }
  8884. /**
  8885. * Creates a slice of `array` with `n` elements taken from the end.
  8886. *
  8887. * @static
  8888. * @memberOf _
  8889. * @since 3.0.0
  8890. * @category Array
  8891. * @param {Array} array The array to query.
  8892. * @param {number} [n=1] The number of elements to take.
  8893. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  8894. * @returns {Array} Returns the slice of `array`.
  8895. * @example
  8896. *
  8897. * _.takeRight([1, 2, 3]);
  8898. * // => [3]
  8899. *
  8900. * _.takeRight([1, 2, 3], 2);
  8901. * // => [2, 3]
  8902. *
  8903. * _.takeRight([1, 2, 3], 5);
  8904. * // => [1, 2, 3]
  8905. *
  8906. * _.takeRight([1, 2, 3], 0);
  8907. * // => []
  8908. */
  8909. function takeRight(array, n, guard) {
  8910. var length = array == null ? 0 : array.length;
  8911. if (!length) {
  8912. return [];
  8913. }
  8914. n = (guard || n === undefined) ? 1 : toInteger(n);
  8915. n = length - n;
  8916. return baseSlice(array, n < 0 ? 0 : n, length);
  8917. }
  8918. /**
  8919. * Creates a slice of `array` with elements taken from the end. Elements are
  8920. * taken until `predicate` returns falsey. The predicate is invoked with
  8921. * three arguments: (value, index, array).
  8922. *
  8923. * @static
  8924. * @memberOf _
  8925. * @since 3.0.0
  8926. * @category Array
  8927. * @param {Array} array The array to query.
  8928. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  8929. * @returns {Array} Returns the slice of `array`.
  8930. * @example
  8931. *
  8932. * var users = [
  8933. * { 'user': 'barney', 'active': true },
  8934. * { 'user': 'fred', 'active': false },
  8935. * { 'user': 'pebbles', 'active': false }
  8936. * ];
  8937. *
  8938. * _.takeRightWhile(users, function(o) { return !o.active; });
  8939. * // => objects for ['fred', 'pebbles']
  8940. *
  8941. * // The `_.matches` iteratee shorthand.
  8942. * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
  8943. * // => objects for ['pebbles']
  8944. *
  8945. * // The `_.matchesProperty` iteratee shorthand.
  8946. * _.takeRightWhile(users, ['active', false]);
  8947. * // => objects for ['fred', 'pebbles']
  8948. *
  8949. * // The `_.property` iteratee shorthand.
  8950. * _.takeRightWhile(users, 'active');
  8951. * // => []
  8952. */
  8953. function takeRightWhile(array, predicate) {
  8954. return (array && array.length)
  8955. ? baseWhile(array, getIteratee(predicate, 3), false, true)
  8956. : [];
  8957. }
  8958. /**
  8959. * Creates a slice of `array` with elements taken from the beginning. Elements
  8960. * are taken until `predicate` returns falsey. The predicate is invoked with
  8961. * three arguments: (value, index, array).
  8962. *
  8963. * @static
  8964. * @memberOf _
  8965. * @since 3.0.0
  8966. * @category Array
  8967. * @param {Array} array The array to query.
  8968. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  8969. * @returns {Array} Returns the slice of `array`.
  8970. * @example
  8971. *
  8972. * var users = [
  8973. * { 'user': 'barney', 'active': false },
  8974. * { 'user': 'fred', 'active': false },
  8975. * { 'user': 'pebbles', 'active': true }
  8976. * ];
  8977. *
  8978. * _.takeWhile(users, function(o) { return !o.active; });
  8979. * // => objects for ['barney', 'fred']
  8980. *
  8981. * // The `_.matches` iteratee shorthand.
  8982. * _.takeWhile(users, { 'user': 'barney', 'active': false });
  8983. * // => objects for ['barney']
  8984. *
  8985. * // The `_.matchesProperty` iteratee shorthand.
  8986. * _.takeWhile(users, ['active', false]);
  8987. * // => objects for ['barney', 'fred']
  8988. *
  8989. * // The `_.property` iteratee shorthand.
  8990. * _.takeWhile(users, 'active');
  8991. * // => []
  8992. */
  8993. function takeWhile(array, predicate) {
  8994. return (array && array.length)
  8995. ? baseWhile(array, getIteratee(predicate, 3))
  8996. : [];
  8997. }
  8998. /**
  8999. * Creates an array of unique values, in order, from all given arrays using
  9000. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  9001. * for equality comparisons.
  9002. *
  9003. * @static
  9004. * @memberOf _
  9005. * @since 0.1.0
  9006. * @category Array
  9007. * @param {...Array} [arrays] The arrays to inspect.
  9008. * @returns {Array} Returns the new array of combined values.
  9009. * @example
  9010. *
  9011. * _.union([2], [1, 2]);
  9012. * // => [2, 1]
  9013. */
  9014. var union = baseRest(function(arrays) {
  9015. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
  9016. });
  9017. /**
  9018. * This method is like `_.union` except that it accepts `iteratee` which is
  9019. * invoked for each element of each `arrays` to generate the criterion by
  9020. * which uniqueness is computed. Result values are chosen from the first
  9021. * array in which the value occurs. The iteratee is invoked with one argument:
  9022. * (value).
  9023. *
  9024. * @static
  9025. * @memberOf _
  9026. * @since 4.0.0
  9027. * @category Array
  9028. * @param {...Array} [arrays] The arrays to inspect.
  9029. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  9030. * @returns {Array} Returns the new array of combined values.
  9031. * @example
  9032. *
  9033. * _.unionBy([2.1], [1.2, 2.3], Math.floor);
  9034. * // => [2.1, 1.2]
  9035. *
  9036. * // The `_.property` iteratee shorthand.
  9037. * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
  9038. * // => [{ 'x': 1 }, { 'x': 2 }]
  9039. */
  9040. var unionBy = baseRest(function(arrays) {
  9041. var iteratee = last(arrays);
  9042. if (isArrayLikeObject(iteratee)) {
  9043. iteratee = undefined;
  9044. }
  9045. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));
  9046. });
  9047. /**
  9048. * This method is like `_.union` except that it accepts `comparator` which
  9049. * is invoked to compare elements of `arrays`. Result values are chosen from
  9050. * the first array in which the value occurs. The comparator is invoked
  9051. * with two arguments: (arrVal, othVal).
  9052. *
  9053. * @static
  9054. * @memberOf _
  9055. * @since 4.0.0
  9056. * @category Array
  9057. * @param {...Array} [arrays] The arrays to inspect.
  9058. * @param {Function} [comparator] The comparator invoked per element.
  9059. * @returns {Array} Returns the new array of combined values.
  9060. * @example
  9061. *
  9062. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  9063. * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
  9064. *
  9065. * _.unionWith(objects, others, _.isEqual);
  9066. * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
  9067. */
  9068. var unionWith = baseRest(function(arrays) {
  9069. var comparator = last(arrays);
  9070. comparator = typeof comparator == 'function' ? comparator : undefined;
  9071. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
  9072. });
  9073. /**
  9074. * Creates a duplicate-free version of an array, using
  9075. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  9076. * for equality comparisons, in which only the first occurrence of each element
  9077. * is kept. The order of result values is determined by the order they occur
  9078. * in the array.
  9079. *
  9080. * @static
  9081. * @memberOf _
  9082. * @since 0.1.0
  9083. * @category Array
  9084. * @param {Array} array The array to inspect.
  9085. * @returns {Array} Returns the new duplicate free array.
  9086. * @example
  9087. *
  9088. * _.uniq([2, 1, 2]);
  9089. * // => [2, 1]
  9090. */
  9091. function uniq(array) {
  9092. return (array && array.length) ? baseUniq(array) : [];
  9093. }
  9094. /**
  9095. * This method is like `_.uniq` except that it accepts `iteratee` which is
  9096. * invoked for each element in `array` to generate the criterion by which
  9097. * uniqueness is computed. The order of result values is determined by the
  9098. * order they occur in the array. The iteratee is invoked with one argument:
  9099. * (value).
  9100. *
  9101. * @static
  9102. * @memberOf _
  9103. * @since 4.0.0
  9104. * @category Array
  9105. * @param {Array} array The array to inspect.
  9106. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  9107. * @returns {Array} Returns the new duplicate free array.
  9108. * @example
  9109. *
  9110. * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
  9111. * // => [2.1, 1.2]
  9112. *
  9113. * // The `_.property` iteratee shorthand.
  9114. * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
  9115. * // => [{ 'x': 1 }, { 'x': 2 }]
  9116. */
  9117. function uniqBy(array, iteratee) {
  9118. return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];
  9119. }
  9120. /**
  9121. * This method is like `_.uniq` except that it accepts `comparator` which
  9122. * is invoked to compare elements of `array`. The order of result values is
  9123. * determined by the order they occur in the array.The comparator is invoked
  9124. * with two arguments: (arrVal, othVal).
  9125. *
  9126. * @static
  9127. * @memberOf _
  9128. * @since 4.0.0
  9129. * @category Array
  9130. * @param {Array} array The array to inspect.
  9131. * @param {Function} [comparator] The comparator invoked per element.
  9132. * @returns {Array} Returns the new duplicate free array.
  9133. * @example
  9134. *
  9135. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
  9136. *
  9137. * _.uniqWith(objects, _.isEqual);
  9138. * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
  9139. */
  9140. function uniqWith(array, comparator) {
  9141. comparator = typeof comparator == 'function' ? comparator : undefined;
  9142. return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
  9143. }
  9144. /**
  9145. * This method is like `_.zip` except that it accepts an array of grouped
  9146. * elements and creates an array regrouping the elements to their pre-zip
  9147. * configuration.
  9148. *
  9149. * @static
  9150. * @memberOf _
  9151. * @since 1.2.0
  9152. * @category Array
  9153. * @param {Array} array The array of grouped elements to process.
  9154. * @returns {Array} Returns the new array of regrouped elements.
  9155. * @example
  9156. *
  9157. * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);
  9158. * // => [['a', 1, true], ['b', 2, false]]
  9159. *
  9160. * _.unzip(zipped);
  9161. * // => [['a', 'b'], [1, 2], [true, false]]
  9162. */
  9163. function unzip(array) {
  9164. if (!(array && array.length)) {
  9165. return [];
  9166. }
  9167. var length = 0;
  9168. array = arrayFilter(array, function(group) {
  9169. if (isArrayLikeObject(group)) {
  9170. length = nativeMax(group.length, length);
  9171. return true;
  9172. }
  9173. });
  9174. return baseTimes(length, function(index) {
  9175. return arrayMap(array, baseProperty(index));
  9176. });
  9177. }
  9178. /**
  9179. * This method is like `_.unzip` except that it accepts `iteratee` to specify
  9180. * how regrouped values should be combined. The iteratee is invoked with the
  9181. * elements of each group: (...group).
  9182. *
  9183. * @static
  9184. * @memberOf _
  9185. * @since 3.8.0
  9186. * @category Array
  9187. * @param {Array} array The array of grouped elements to process.
  9188. * @param {Function} [iteratee=_.identity] The function to combine
  9189. * regrouped values.
  9190. * @returns {Array} Returns the new array of regrouped elements.
  9191. * @example
  9192. *
  9193. * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
  9194. * // => [[1, 10, 100], [2, 20, 200]]
  9195. *
  9196. * _.unzipWith(zipped, _.add);
  9197. * // => [3, 30, 300]
  9198. */
  9199. function unzipWith(array, iteratee) {
  9200. if (!(array && array.length)) {
  9201. return [];
  9202. }
  9203. var result = unzip(array);
  9204. if (iteratee == null) {
  9205. return result;
  9206. }
  9207. return arrayMap(result, function(group) {
  9208. return apply(iteratee, undefined, group);
  9209. });
  9210. }
  9211. /**
  9212. * Creates an array excluding all given values using
  9213. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  9214. * for equality comparisons.
  9215. *
  9216. * **Note:** Unlike `_.pull`, this method returns a new array.
  9217. *
  9218. * @static
  9219. * @memberOf _
  9220. * @since 0.1.0
  9221. * @category Array
  9222. * @param {Array} array The array to inspect.
  9223. * @param {...*} [values] The values to exclude.
  9224. * @returns {Array} Returns the new array of filtered values.
  9225. * @see _.difference, _.xor
  9226. * @example
  9227. *
  9228. * _.without([2, 1, 2, 3], 1, 2);
  9229. * // => [3]
  9230. */
  9231. var without = baseRest(function(array, values) {
  9232. return isArrayLikeObject(array)
  9233. ? baseDifference(array, values)
  9234. : [];
  9235. });
  9236. /**
  9237. * Creates an array of unique values that is the
  9238. * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
  9239. * of the given arrays. The order of result values is determined by the order
  9240. * they occur in the arrays.
  9241. *
  9242. * @static
  9243. * @memberOf _
  9244. * @since 2.4.0
  9245. * @category Array
  9246. * @param {...Array} [arrays] The arrays to inspect.
  9247. * @returns {Array} Returns the new array of filtered values.
  9248. * @see _.difference, _.without
  9249. * @example
  9250. *
  9251. * _.xor([2, 1], [2, 3]);
  9252. * // => [1, 3]
  9253. */
  9254. var xor = baseRest(function(arrays) {
  9255. return baseXor(arrayFilter(arrays, isArrayLikeObject));
  9256. });
  9257. /**
  9258. * This method is like `_.xor` except that it accepts `iteratee` which is
  9259. * invoked for each element of each `arrays` to generate the criterion by
  9260. * which by which they're compared. The order of result values is determined
  9261. * by the order they occur in the arrays. The iteratee is invoked with one
  9262. * argument: (value).
  9263. *
  9264. * @static
  9265. * @memberOf _
  9266. * @since 4.0.0
  9267. * @category Array
  9268. * @param {...Array} [arrays] The arrays to inspect.
  9269. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  9270. * @returns {Array} Returns the new array of filtered values.
  9271. * @example
  9272. *
  9273. * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);
  9274. * // => [1.2, 3.4]
  9275. *
  9276. * // The `_.property` iteratee shorthand.
  9277. * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
  9278. * // => [{ 'x': 2 }]
  9279. */
  9280. var xorBy = baseRest(function(arrays) {
  9281. var iteratee = last(arrays);
  9282. if (isArrayLikeObject(iteratee)) {
  9283. iteratee = undefined;
  9284. }
  9285. return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));
  9286. });
  9287. /**
  9288. * This method is like `_.xor` except that it accepts `comparator` which is
  9289. * invoked to compare elements of `arrays`. The order of result values is
  9290. * determined by the order they occur in the arrays. The comparator is invoked
  9291. * with two arguments: (arrVal, othVal).
  9292. *
  9293. * @static
  9294. * @memberOf _
  9295. * @since 4.0.0
  9296. * @category Array
  9297. * @param {...Array} [arrays] The arrays to inspect.
  9298. * @param {Function} [comparator] The comparator invoked per element.
  9299. * @returns {Array} Returns the new array of filtered values.
  9300. * @example
  9301. *
  9302. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  9303. * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
  9304. *
  9305. * _.xorWith(objects, others, _.isEqual);
  9306. * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
  9307. */
  9308. var xorWith = baseRest(function(arrays) {
  9309. var comparator = last(arrays);
  9310. comparator = typeof comparator == 'function' ? comparator : undefined;
  9311. return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
  9312. });
  9313. /**
  9314. * Creates an array of grouped elements, the first of which contains the
  9315. * first elements of the given arrays, the second of which contains the
  9316. * second elements of the given arrays, and so on.
  9317. *
  9318. * @static
  9319. * @memberOf _
  9320. * @since 0.1.0
  9321. * @category Array
  9322. * @param {...Array} [arrays] The arrays to process.
  9323. * @returns {Array} Returns the new array of grouped elements.
  9324. * @example
  9325. *
  9326. * _.zip(['a', 'b'], [1, 2], [true, false]);
  9327. * // => [['a', 1, true], ['b', 2, false]]
  9328. */
  9329. var zip = baseRest(unzip);
  9330. /**
  9331. * This method is like `_.fromPairs` except that it accepts two arrays,
  9332. * one of property identifiers and one of corresponding values.
  9333. *
  9334. * @static
  9335. * @memberOf _
  9336. * @since 0.4.0
  9337. * @category Array
  9338. * @param {Array} [props=[]] The property identifiers.
  9339. * @param {Array} [values=[]] The property values.
  9340. * @returns {Object} Returns the new object.
  9341. * @example
  9342. *
  9343. * _.zipObject(['a', 'b'], [1, 2]);
  9344. * // => { 'a': 1, 'b': 2 }
  9345. */
  9346. function zipObject(props, values) {
  9347. return baseZipObject(props || [], values || [], assignValue);
  9348. }
  9349. /**
  9350. * This method is like `_.zipObject` except that it supports property paths.
  9351. *
  9352. * @static
  9353. * @memberOf _
  9354. * @since 4.1.0
  9355. * @category Array
  9356. * @param {Array} [props=[]] The property identifiers.
  9357. * @param {Array} [values=[]] The property values.
  9358. * @returns {Object} Returns the new object.
  9359. * @example
  9360. *
  9361. * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
  9362. * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
  9363. */
  9364. function zipObjectDeep(props, values) {
  9365. return baseZipObject(props || [], values || [], baseSet);
  9366. }
  9367. /**
  9368. * This method is like `_.zip` except that it accepts `iteratee` to specify
  9369. * how grouped values should be combined. The iteratee is invoked with the
  9370. * elements of each group: (...group).
  9371. *
  9372. * @static
  9373. * @memberOf _
  9374. * @since 3.8.0
  9375. * @category Array
  9376. * @param {...Array} [arrays] The arrays to process.
  9377. * @param {Function} [iteratee=_.identity] The function to combine
  9378. * grouped values.
  9379. * @returns {Array} Returns the new array of grouped elements.
  9380. * @example
  9381. *
  9382. * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
  9383. * return a + b + c;
  9384. * });
  9385. * // => [111, 222]
  9386. */
  9387. var zipWith = baseRest(function(arrays) {
  9388. var length = arrays.length,
  9389. iteratee = length > 1 ? arrays[length - 1] : undefined;
  9390. iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
  9391. return unzipWith(arrays, iteratee);
  9392. });
  9393. /*------------------------------------------------------------------------*/
  9394. /**
  9395. * Creates a `lodash` wrapper instance that wraps `value` with explicit method
  9396. * chain sequences enabled. The result of such sequences must be unwrapped
  9397. * with `_#value`.
  9398. *
  9399. * @static
  9400. * @memberOf _
  9401. * @since 1.3.0
  9402. * @category Seq
  9403. * @param {*} value The value to wrap.
  9404. * @returns {Object} Returns the new `lodash` wrapper instance.
  9405. * @example
  9406. *
  9407. * var users = [
  9408. * { 'user': 'barney', 'age': 36 },
  9409. * { 'user': 'fred', 'age': 40 },
  9410. * { 'user': 'pebbles', 'age': 1 }
  9411. * ];
  9412. *
  9413. * var youngest = _
  9414. * .chain(users)
  9415. * .sortBy('age')
  9416. * .map(function(o) {
  9417. * return o.user + ' is ' + o.age;
  9418. * })
  9419. * .head()
  9420. * .value();
  9421. * // => 'pebbles is 1'
  9422. */
  9423. function chain(value) {
  9424. var result = lodash(value);
  9425. result.__chain__ = true;
  9426. return result;
  9427. }
  9428. /**
  9429. * This method invokes `interceptor` and returns `value`. The interceptor
  9430. * is invoked with one argument; (value). The purpose of this method is to
  9431. * "tap into" a method chain sequence in order to modify intermediate results.
  9432. *
  9433. * @static
  9434. * @memberOf _
  9435. * @since 0.1.0
  9436. * @category Seq
  9437. * @param {*} value The value to provide to `interceptor`.
  9438. * @param {Function} interceptor The function to invoke.
  9439. * @returns {*} Returns `value`.
  9440. * @example
  9441. *
  9442. * _([1, 2, 3])
  9443. * .tap(function(array) {
  9444. * // Mutate input array.
  9445. * array.pop();
  9446. * })
  9447. * .reverse()
  9448. * .value();
  9449. * // => [2, 1]
  9450. */
  9451. function tap(value, interceptor) {
  9452. interceptor(value);
  9453. return value;
  9454. }
  9455. /**
  9456. * This method is like `_.tap` except that it returns the result of `interceptor`.
  9457. * The purpose of this method is to "pass thru" values replacing intermediate
  9458. * results in a method chain sequence.
  9459. *
  9460. * @static
  9461. * @memberOf _
  9462. * @since 3.0.0
  9463. * @category Seq
  9464. * @param {*} value The value to provide to `interceptor`.
  9465. * @param {Function} interceptor The function to invoke.
  9466. * @returns {*} Returns the result of `interceptor`.
  9467. * @example
  9468. *
  9469. * _(' abc ')
  9470. * .chain()
  9471. * .trim()
  9472. * .thru(function(value) {
  9473. * return [value];
  9474. * })
  9475. * .value();
  9476. * // => ['abc']
  9477. */
  9478. function thru(value, interceptor) {
  9479. return interceptor(value);
  9480. }
  9481. /**
  9482. * This method is the wrapper version of `_.at`.
  9483. *
  9484. * @name at
  9485. * @memberOf _
  9486. * @since 1.0.0
  9487. * @category Seq
  9488. * @param {...(string|string[])} [paths] The property paths to pick.
  9489. * @returns {Object} Returns the new `lodash` wrapper instance.
  9490. * @example
  9491. *
  9492. * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
  9493. *
  9494. * _(object).at(['a[0].b.c', 'a[1]']).value();
  9495. * // => [3, 4]
  9496. */
  9497. var wrapperAt = flatRest(function(paths) {
  9498. var length = paths.length,
  9499. start = length ? paths[0] : 0,
  9500. value = this.__wrapped__,
  9501. interceptor = function(object) { return baseAt(object, paths); };
  9502. if (length > 1 || this.__actions__.length ||
  9503. !(value instanceof LazyWrapper) || !isIndex(start)) {
  9504. return this.thru(interceptor);
  9505. }
  9506. value = value.slice(start, +start + (length ? 1 : 0));
  9507. value.__actions__.push({
  9508. 'func': thru,
  9509. 'args': [interceptor],
  9510. 'thisArg': undefined
  9511. });
  9512. return new LodashWrapper(value, this.__chain__).thru(function(array) {
  9513. if (length && !array.length) {
  9514. array.push(undefined);
  9515. }
  9516. return array;
  9517. });
  9518. });
  9519. /**
  9520. * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
  9521. *
  9522. * @name chain
  9523. * @memberOf _
  9524. * @since 0.1.0
  9525. * @category Seq
  9526. * @returns {Object} Returns the new `lodash` wrapper instance.
  9527. * @example
  9528. *
  9529. * var users = [
  9530. * { 'user': 'barney', 'age': 36 },
  9531. * { 'user': 'fred', 'age': 40 }
  9532. * ];
  9533. *
  9534. * // A sequence without explicit chaining.
  9535. * _(users).head();
  9536. * // => { 'user': 'barney', 'age': 36 }
  9537. *
  9538. * // A sequence with explicit chaining.
  9539. * _(users)
  9540. * .chain()
  9541. * .head()
  9542. * .pick('user')
  9543. * .value();
  9544. * // => { 'user': 'barney' }
  9545. */
  9546. function wrapperChain() {
  9547. return chain(this);
  9548. }
  9549. /**
  9550. * Executes the chain sequence and returns the wrapped result.
  9551. *
  9552. * @name commit
  9553. * @memberOf _
  9554. * @since 3.2.0
  9555. * @category Seq
  9556. * @returns {Object} Returns the new `lodash` wrapper instance.
  9557. * @example
  9558. *
  9559. * var array = [1, 2];
  9560. * var wrapped = _(array).push(3);
  9561. *
  9562. * console.log(array);
  9563. * // => [1, 2]
  9564. *
  9565. * wrapped = wrapped.commit();
  9566. * console.log(array);
  9567. * // => [1, 2, 3]
  9568. *
  9569. * wrapped.last();
  9570. * // => 3
  9571. *
  9572. * console.log(array);
  9573. * // => [1, 2, 3]
  9574. */
  9575. function wrapperCommit() {
  9576. return new LodashWrapper(this.value(), this.__chain__);
  9577. }
  9578. /**
  9579. * Gets the next value on a wrapped object following the
  9580. * [iterator protocol](https://mdn.io/iteration_protocols#iterator).
  9581. *
  9582. * @name next
  9583. * @memberOf _
  9584. * @since 4.0.0
  9585. * @category Seq
  9586. * @returns {Object} Returns the next iterator value.
  9587. * @example
  9588. *
  9589. * var wrapped = _([1, 2]);
  9590. *
  9591. * wrapped.next();
  9592. * // => { 'done': false, 'value': 1 }
  9593. *
  9594. * wrapped.next();
  9595. * // => { 'done': false, 'value': 2 }
  9596. *
  9597. * wrapped.next();
  9598. * // => { 'done': true, 'value': undefined }
  9599. */
  9600. function wrapperNext() {
  9601. if (this.__values__ === undefined) {
  9602. this.__values__ = toArray(this.value());
  9603. }
  9604. var done = this.__index__ >= this.__values__.length,
  9605. value = done ? undefined : this.__values__[this.__index__++];
  9606. return { 'done': done, 'value': value };
  9607. }
  9608. /**
  9609. * Enables the wrapper to be iterable.
  9610. *
  9611. * @name Symbol.iterator
  9612. * @memberOf _
  9613. * @since 4.0.0
  9614. * @category Seq
  9615. * @returns {Object} Returns the wrapper object.
  9616. * @example
  9617. *
  9618. * var wrapped = _([1, 2]);
  9619. *
  9620. * wrapped[Symbol.iterator]() === wrapped;
  9621. * // => true
  9622. *
  9623. * Array.from(wrapped);
  9624. * // => [1, 2]
  9625. */
  9626. function wrapperToIterator() {
  9627. return this;
  9628. }
  9629. /**
  9630. * Creates a clone of the chain sequence planting `value` as the wrapped value.
  9631. *
  9632. * @name plant
  9633. * @memberOf _
  9634. * @since 3.2.0
  9635. * @category Seq
  9636. * @param {*} value The value to plant.
  9637. * @returns {Object} Returns the new `lodash` wrapper instance.
  9638. * @example
  9639. *
  9640. * function square(n) {
  9641. * return n * n;
  9642. * }
  9643. *
  9644. * var wrapped = _([1, 2]).map(square);
  9645. * var other = wrapped.plant([3, 4]);
  9646. *
  9647. * other.value();
  9648. * // => [9, 16]
  9649. *
  9650. * wrapped.value();
  9651. * // => [1, 4]
  9652. */
  9653. function wrapperPlant(value) {
  9654. var result,
  9655. parent = this;
  9656. while (parent instanceof baseLodash) {
  9657. var clone = wrapperClone(parent);
  9658. clone.__index__ = 0;
  9659. clone.__values__ = undefined;
  9660. if (result) {
  9661. previous.__wrapped__ = clone;
  9662. } else {
  9663. result = clone;
  9664. }
  9665. var previous = clone;
  9666. parent = parent.__wrapped__;
  9667. }
  9668. previous.__wrapped__ = value;
  9669. return result;
  9670. }
  9671. /**
  9672. * This method is the wrapper version of `_.reverse`.
  9673. *
  9674. * **Note:** This method mutates the wrapped array.
  9675. *
  9676. * @name reverse
  9677. * @memberOf _
  9678. * @since 0.1.0
  9679. * @category Seq
  9680. * @returns {Object} Returns the new `lodash` wrapper instance.
  9681. * @example
  9682. *
  9683. * var array = [1, 2, 3];
  9684. *
  9685. * _(array).reverse().value()
  9686. * // => [3, 2, 1]
  9687. *
  9688. * console.log(array);
  9689. * // => [3, 2, 1]
  9690. */
  9691. function wrapperReverse() {
  9692. var value = this.__wrapped__;
  9693. if (value instanceof LazyWrapper) {
  9694. var wrapped = value;
  9695. if (this.__actions__.length) {
  9696. wrapped = new LazyWrapper(this);
  9697. }
  9698. wrapped = wrapped.reverse();
  9699. wrapped.__actions__.push({
  9700. 'func': thru,
  9701. 'args': [reverse],
  9702. 'thisArg': undefined
  9703. });
  9704. return new LodashWrapper(wrapped, this.__chain__);
  9705. }
  9706. return this.thru(reverse);
  9707. }
  9708. /**
  9709. * Executes the chain sequence to resolve the unwrapped value.
  9710. *
  9711. * @name value
  9712. * @memberOf _
  9713. * @since 0.1.0
  9714. * @alias toJSON, valueOf
  9715. * @category Seq
  9716. * @returns {*} Returns the resolved unwrapped value.
  9717. * @example
  9718. *
  9719. * _([1, 2, 3]).value();
  9720. * // => [1, 2, 3]
  9721. */
  9722. function wrapperValue() {
  9723. return baseWrapperValue(this.__wrapped__, this.__actions__);
  9724. }
  9725. /*------------------------------------------------------------------------*/
  9726. /**
  9727. * Creates an object composed of keys generated from the results of running
  9728. * each element of `collection` thru `iteratee`. The corresponding value of
  9729. * each key is the number of times the key was returned by `iteratee`. The
  9730. * iteratee is invoked with one argument: (value).
  9731. *
  9732. * @static
  9733. * @memberOf _
  9734. * @since 0.5.0
  9735. * @category Collection
  9736. * @param {Array|Object} collection The collection to iterate over.
  9737. * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
  9738. * @returns {Object} Returns the composed aggregate object.
  9739. * @example
  9740. *
  9741. * _.countBy([6.1, 4.2, 6.3], Math.floor);
  9742. * // => { '4': 1, '6': 2 }
  9743. *
  9744. * // The `_.property` iteratee shorthand.
  9745. * _.countBy(['one', 'two', 'three'], 'length');
  9746. * // => { '3': 2, '5': 1 }
  9747. */
  9748. var countBy = createAggregator(function(result, value, key) {
  9749. if (hasOwnProperty.call(result, key)) {
  9750. ++result[key];
  9751. } else {
  9752. baseAssignValue(result, key, 1);
  9753. }
  9754. });
  9755. /**
  9756. * Checks if `predicate` returns truthy for **all** elements of `collection`.
  9757. * Iteration is stopped once `predicate` returns falsey. The predicate is
  9758. * invoked with three arguments: (value, index|key, collection).
  9759. *
  9760. * **Note:** This method returns `true` for
  9761. * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
  9762. * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
  9763. * elements of empty collections.
  9764. *
  9765. * @static
  9766. * @memberOf _
  9767. * @since 0.1.0
  9768. * @category Collection
  9769. * @param {Array|Object} collection The collection to iterate over.
  9770. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  9771. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  9772. * @returns {boolean} Returns `true` if all elements pass the predicate check,
  9773. * else `false`.
  9774. * @example
  9775. *
  9776. * _.every([true, 1, null, 'yes'], Boolean);
  9777. * // => false
  9778. *
  9779. * var users = [
  9780. * { 'user': 'barney', 'age': 36, 'active': false },
  9781. * { 'user': 'fred', 'age': 40, 'active': false }
  9782. * ];
  9783. *
  9784. * // The `_.matches` iteratee shorthand.
  9785. * _.every(users, { 'user': 'barney', 'active': false });
  9786. * // => false
  9787. *
  9788. * // The `_.matchesProperty` iteratee shorthand.
  9789. * _.every(users, ['active', false]);
  9790. * // => true
  9791. *
  9792. * // The `_.property` iteratee shorthand.
  9793. * _.every(users, 'active');
  9794. * // => false
  9795. */
  9796. function every(collection, predicate, guard) {
  9797. var func = isArray(collection) ? arrayEvery : baseEvery;
  9798. if (guard && isIterateeCall(collection, predicate, guard)) {
  9799. predicate = undefined;
  9800. }
  9801. return func(collection, getIteratee(predicate, 3));
  9802. }
  9803. /**
  9804. * Iterates over elements of `collection`, returning an array of all elements
  9805. * `predicate` returns truthy for. The predicate is invoked with three
  9806. * arguments: (value, index|key, collection).
  9807. *
  9808. * **Note:** Unlike `_.remove`, this method returns a new array.
  9809. *
  9810. * @static
  9811. * @memberOf _
  9812. * @since 0.1.0
  9813. * @category Collection
  9814. * @param {Array|Object} collection The collection to iterate over.
  9815. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  9816. * @returns {Array} Returns the new filtered array.
  9817. * @see _.reject
  9818. * @example
  9819. *
  9820. * var users = [
  9821. * { 'user': 'barney', 'age': 36, 'active': true },
  9822. * { 'user': 'fred', 'age': 40, 'active': false }
  9823. * ];
  9824. *
  9825. * _.filter(users, function(o) { return !o.active; });
  9826. * // => objects for ['fred']
  9827. *
  9828. * // The `_.matches` iteratee shorthand.
  9829. * _.filter(users, { 'age': 36, 'active': true });
  9830. * // => objects for ['barney']
  9831. *
  9832. * // The `_.matchesProperty` iteratee shorthand.
  9833. * _.filter(users, ['active', false]);
  9834. * // => objects for ['fred']
  9835. *
  9836. * // The `_.property` iteratee shorthand.
  9837. * _.filter(users, 'active');
  9838. * // => objects for ['barney']
  9839. *
  9840. * // Combining several predicates using `_.overEvery` or `_.overSome`.
  9841. * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));
  9842. * // => objects for ['fred', 'barney']
  9843. */
  9844. function filter(collection, predicate) {
  9845. var func = isArray(collection) ? arrayFilter : baseFilter;
  9846. return func(collection, getIteratee(predicate, 3));
  9847. }
  9848. /**
  9849. * Iterates over elements of `collection`, returning the first element
  9850. * `predicate` returns truthy for. The predicate is invoked with three
  9851. * arguments: (value, index|key, collection).
  9852. *
  9853. * @static
  9854. * @memberOf _
  9855. * @since 0.1.0
  9856. * @category Collection
  9857. * @param {Array|Object} collection The collection to inspect.
  9858. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  9859. * @param {number} [fromIndex=0] The index to search from.
  9860. * @returns {*} Returns the matched element, else `undefined`.
  9861. * @example
  9862. *
  9863. * var users = [
  9864. * { 'user': 'barney', 'age': 36, 'active': true },
  9865. * { 'user': 'fred', 'age': 40, 'active': false },
  9866. * { 'user': 'pebbles', 'age': 1, 'active': true }
  9867. * ];
  9868. *
  9869. * _.find(users, function(o) { return o.age < 40; });
  9870. * // => object for 'barney'
  9871. *
  9872. * // The `_.matches` iteratee shorthand.
  9873. * _.find(users, { 'age': 1, 'active': true });
  9874. * // => object for 'pebbles'
  9875. *
  9876. * // The `_.matchesProperty` iteratee shorthand.
  9877. * _.find(users, ['active', false]);
  9878. * // => object for 'fred'
  9879. *
  9880. * // The `_.property` iteratee shorthand.
  9881. * _.find(users, 'active');
  9882. * // => object for 'barney'
  9883. */
  9884. var find = createFind(findIndex);
  9885. /**
  9886. * This method is like `_.find` except that it iterates over elements of
  9887. * `collection` from right to left.
  9888. *
  9889. * @static
  9890. * @memberOf _
  9891. * @since 2.0.0
  9892. * @category Collection
  9893. * @param {Array|Object} collection The collection to inspect.
  9894. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  9895. * @param {number} [fromIndex=collection.length-1] The index to search from.
  9896. * @returns {*} Returns the matched element, else `undefined`.
  9897. * @example
  9898. *
  9899. * _.findLast([1, 2, 3, 4], function(n) {
  9900. * return n % 2 == 1;
  9901. * });
  9902. * // => 3
  9903. */
  9904. var findLast = createFind(findLastIndex);
  9905. /**
  9906. * Creates a flattened array of values by running each element in `collection`
  9907. * thru `iteratee` and flattening the mapped results. The iteratee is invoked
  9908. * with three arguments: (value, index|key, collection).
  9909. *
  9910. * @static
  9911. * @memberOf _
  9912. * @since 4.0.0
  9913. * @category Collection
  9914. * @param {Array|Object} collection The collection to iterate over.
  9915. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  9916. * @returns {Array} Returns the new flattened array.
  9917. * @example
  9918. *
  9919. * function duplicate(n) {
  9920. * return [n, n];
  9921. * }
  9922. *
  9923. * _.flatMap([1, 2], duplicate);
  9924. * // => [1, 1, 2, 2]
  9925. */
  9926. function flatMap(collection, iteratee) {
  9927. return baseFlatten(map(collection, iteratee), 1);
  9928. }
  9929. /**
  9930. * This method is like `_.flatMap` except that it recursively flattens the
  9931. * mapped results.
  9932. *
  9933. * @static
  9934. * @memberOf _
  9935. * @since 4.7.0
  9936. * @category Collection
  9937. * @param {Array|Object} collection The collection to iterate over.
  9938. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  9939. * @returns {Array} Returns the new flattened array.
  9940. * @example
  9941. *
  9942. * function duplicate(n) {
  9943. * return [[[n, n]]];
  9944. * }
  9945. *
  9946. * _.flatMapDeep([1, 2], duplicate);
  9947. * // => [1, 1, 2, 2]
  9948. */
  9949. function flatMapDeep(collection, iteratee) {
  9950. return baseFlatten(map(collection, iteratee), INFINITY);
  9951. }
  9952. /**
  9953. * This method is like `_.flatMap` except that it recursively flattens the
  9954. * mapped results up to `depth` times.
  9955. *
  9956. * @static
  9957. * @memberOf _
  9958. * @since 4.7.0
  9959. * @category Collection
  9960. * @param {Array|Object} collection The collection to iterate over.
  9961. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  9962. * @param {number} [depth=1] The maximum recursion depth.
  9963. * @returns {Array} Returns the new flattened array.
  9964. * @example
  9965. *
  9966. * function duplicate(n) {
  9967. * return [[[n, n]]];
  9968. * }
  9969. *
  9970. * _.flatMapDepth([1, 2], duplicate, 2);
  9971. * // => [[1, 1], [2, 2]]
  9972. */
  9973. function flatMapDepth(collection, iteratee, depth) {
  9974. depth = depth === undefined ? 1 : toInteger(depth);
  9975. return baseFlatten(map(collection, iteratee), depth);
  9976. }
  9977. /**
  9978. * Iterates over elements of `collection` and invokes `iteratee` for each element.
  9979. * The iteratee is invoked with three arguments: (value, index|key, collection).
  9980. * Iteratee functions may exit iteration early by explicitly returning `false`.
  9981. *
  9982. * **Note:** As with other "Collections" methods, objects with a "length"
  9983. * property are iterated like arrays. To avoid this behavior use `_.forIn`
  9984. * or `_.forOwn` for object iteration.
  9985. *
  9986. * @static
  9987. * @memberOf _
  9988. * @since 0.1.0
  9989. * @alias each
  9990. * @category Collection
  9991. * @param {Array|Object} collection The collection to iterate over.
  9992. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  9993. * @returns {Array|Object} Returns `collection`.
  9994. * @see _.forEachRight
  9995. * @example
  9996. *
  9997. * _.forEach([1, 2], function(value) {
  9998. * console.log(value);
  9999. * });
  10000. * // => Logs `1` then `2`.
  10001. *
  10002. * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
  10003. * console.log(key);
  10004. * });
  10005. * // => Logs 'a' then 'b' (iteration order is not guaranteed).
  10006. */
  10007. function forEach(collection, iteratee) {
  10008. var func = isArray(collection) ? arrayEach : baseEach;
  10009. return func(collection, getIteratee(iteratee, 3));
  10010. }
  10011. /**
  10012. * This method is like `_.forEach` except that it iterates over elements of
  10013. * `collection` from right to left.
  10014. *
  10015. * @static
  10016. * @memberOf _
  10017. * @since 2.0.0
  10018. * @alias eachRight
  10019. * @category Collection
  10020. * @param {Array|Object} collection The collection to iterate over.
  10021. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  10022. * @returns {Array|Object} Returns `collection`.
  10023. * @see _.forEach
  10024. * @example
  10025. *
  10026. * _.forEachRight([1, 2], function(value) {
  10027. * console.log(value);
  10028. * });
  10029. * // => Logs `2` then `1`.
  10030. */
  10031. function forEachRight(collection, iteratee) {
  10032. var func = isArray(collection) ? arrayEachRight : baseEachRight;
  10033. return func(collection, getIteratee(iteratee, 3));
  10034. }
  10035. /**
  10036. * Creates an object composed of keys generated from the results of running
  10037. * each element of `collection` thru `iteratee`. The order of grouped values
  10038. * is determined by the order they occur in `collection`. The corresponding
  10039. * value of each key is an array of elements responsible for generating the
  10040. * key. The iteratee is invoked with one argument: (value).
  10041. *
  10042. * @static
  10043. * @memberOf _
  10044. * @since 0.1.0
  10045. * @category Collection
  10046. * @param {Array|Object} collection The collection to iterate over.
  10047. * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
  10048. * @returns {Object} Returns the composed aggregate object.
  10049. * @example
  10050. *
  10051. * _.groupBy([6.1, 4.2, 6.3], Math.floor);
  10052. * // => { '4': [4.2], '6': [6.1, 6.3] }
  10053. *
  10054. * // The `_.property` iteratee shorthand.
  10055. * _.groupBy(['one', 'two', 'three'], 'length');
  10056. * // => { '3': ['one', 'two'], '5': ['three'] }
  10057. */
  10058. var groupBy = createAggregator(function(result, value, key) {
  10059. if (hasOwnProperty.call(result, key)) {
  10060. result[key].push(value);
  10061. } else {
  10062. baseAssignValue(result, key, [value]);
  10063. }
  10064. });
  10065. /**
  10066. * Checks if `value` is in `collection`. If `collection` is a string, it's
  10067. * checked for a substring of `value`, otherwise
  10068. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  10069. * is used for equality comparisons. If `fromIndex` is negative, it's used as
  10070. * the offset from the end of `collection`.
  10071. *
  10072. * @static
  10073. * @memberOf _
  10074. * @since 0.1.0
  10075. * @category Collection
  10076. * @param {Array|Object|string} collection The collection to inspect.
  10077. * @param {*} value The value to search for.
  10078. * @param {number} [fromIndex=0] The index to search from.
  10079. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
  10080. * @returns {boolean} Returns `true` if `value` is found, else `false`.
  10081. * @example
  10082. *
  10083. * _.includes([1, 2, 3], 1);
  10084. * // => true
  10085. *
  10086. * _.includes([1, 2, 3], 1, 2);
  10087. * // => false
  10088. *
  10089. * _.includes({ 'a': 1, 'b': 2 }, 1);
  10090. * // => true
  10091. *
  10092. * _.includes('abcd', 'bc');
  10093. * // => true
  10094. */
  10095. function includes(collection, value, fromIndex, guard) {
  10096. collection = isArrayLike(collection) ? collection : values(collection);
  10097. fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
  10098. var length = collection.length;
  10099. if (fromIndex < 0) {
  10100. fromIndex = nativeMax(length + fromIndex, 0);
  10101. }
  10102. return isString(collection)
  10103. ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
  10104. : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
  10105. }
  10106. /**
  10107. * Invokes the method at `path` of each element in `collection`, returning
  10108. * an array of the results of each invoked method. Any additional arguments
  10109. * are provided to each invoked method. If `path` is a function, it's invoked
  10110. * for, and `this` bound to, each element in `collection`.
  10111. *
  10112. * @static
  10113. * @memberOf _
  10114. * @since 4.0.0
  10115. * @category Collection
  10116. * @param {Array|Object} collection The collection to iterate over.
  10117. * @param {Array|Function|string} path The path of the method to invoke or
  10118. * the function invoked per iteration.
  10119. * @param {...*} [args] The arguments to invoke each method with.
  10120. * @returns {Array} Returns the array of results.
  10121. * @example
  10122. *
  10123. * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
  10124. * // => [[1, 5, 7], [1, 2, 3]]
  10125. *
  10126. * _.invokeMap([123, 456], String.prototype.split, '');
  10127. * // => [['1', '2', '3'], ['4', '5', '6']]
  10128. */
  10129. var invokeMap = baseRest(function(collection, path, args) {
  10130. var index = -1,
  10131. isFunc = typeof path == 'function',
  10132. result = isArrayLike(collection) ? Array(collection.length) : [];
  10133. baseEach(collection, function(value) {
  10134. result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
  10135. });
  10136. return result;
  10137. });
  10138. /**
  10139. * Creates an object composed of keys generated from the results of running
  10140. * each element of `collection` thru `iteratee`. The corresponding value of
  10141. * each key is the last element responsible for generating the key. The
  10142. * iteratee is invoked with one argument: (value).
  10143. *
  10144. * @static
  10145. * @memberOf _
  10146. * @since 4.0.0
  10147. * @category Collection
  10148. * @param {Array|Object} collection The collection to iterate over.
  10149. * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
  10150. * @returns {Object} Returns the composed aggregate object.
  10151. * @example
  10152. *
  10153. * var array = [
  10154. * { 'dir': 'left', 'code': 97 },
  10155. * { 'dir': 'right', 'code': 100 }
  10156. * ];
  10157. *
  10158. * _.keyBy(array, function(o) {
  10159. * return String.fromCharCode(o.code);
  10160. * });
  10161. * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
  10162. *
  10163. * _.keyBy(array, 'dir');
  10164. * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
  10165. */
  10166. var keyBy = createAggregator(function(result, value, key) {
  10167. baseAssignValue(result, key, value);
  10168. });
  10169. /**
  10170. * Creates an array of values by running each element in `collection` thru
  10171. * `iteratee`. The iteratee is invoked with three arguments:
  10172. * (value, index|key, collection).
  10173. *
  10174. * Many lodash methods are guarded to work as iteratees for methods like
  10175. * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
  10176. *
  10177. * The guarded methods are:
  10178. * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
  10179. * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
  10180. * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
  10181. * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
  10182. *
  10183. * @static
  10184. * @memberOf _
  10185. * @since 0.1.0
  10186. * @category Collection
  10187. * @param {Array|Object} collection The collection to iterate over.
  10188. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  10189. * @returns {Array} Returns the new mapped array.
  10190. * @example
  10191. *
  10192. * function square(n) {
  10193. * return n * n;
  10194. * }
  10195. *
  10196. * _.map([4, 8], square);
  10197. * // => [16, 64]
  10198. *
  10199. * _.map({ 'a': 4, 'b': 8 }, square);
  10200. * // => [16, 64] (iteration order is not guaranteed)
  10201. *
  10202. * var users = [
  10203. * { 'user': 'barney' },
  10204. * { 'user': 'fred' }
  10205. * ];
  10206. *
  10207. * // The `_.property` iteratee shorthand.
  10208. * _.map(users, 'user');
  10209. * // => ['barney', 'fred']
  10210. */
  10211. function map(collection, iteratee) {
  10212. var func = isArray(collection) ? arrayMap : baseMap;
  10213. return func(collection, getIteratee(iteratee, 3));
  10214. }
  10215. /**
  10216. * This method is like `_.sortBy` except that it allows specifying the sort
  10217. * orders of the iteratees to sort by. If `orders` is unspecified, all values
  10218. * are sorted in ascending order. Otherwise, specify an order of "desc" for
  10219. * descending or "asc" for ascending sort order of corresponding values.
  10220. *
  10221. * @static
  10222. * @memberOf _
  10223. * @since 4.0.0
  10224. * @category Collection
  10225. * @param {Array|Object} collection The collection to iterate over.
  10226. * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
  10227. * The iteratees to sort by.
  10228. * @param {string[]} [orders] The sort orders of `iteratees`.
  10229. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
  10230. * @returns {Array} Returns the new sorted array.
  10231. * @example
  10232. *
  10233. * var users = [
  10234. * { 'user': 'fred', 'age': 48 },
  10235. * { 'user': 'barney', 'age': 34 },
  10236. * { 'user': 'fred', 'age': 40 },
  10237. * { 'user': 'barney', 'age': 36 }
  10238. * ];
  10239. *
  10240. * // Sort by `user` in ascending order and by `age` in descending order.
  10241. * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
  10242. * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
  10243. */
  10244. function orderBy(collection, iteratees, orders, guard) {
  10245. if (collection == null) {
  10246. return [];
  10247. }
  10248. if (!isArray(iteratees)) {
  10249. iteratees = iteratees == null ? [] : [iteratees];
  10250. }
  10251. orders = guard ? undefined : orders;
  10252. if (!isArray(orders)) {
  10253. orders = orders == null ? [] : [orders];
  10254. }
  10255. return baseOrderBy(collection, iteratees, orders);
  10256. }
  10257. /**
  10258. * Creates an array of elements split into two groups, the first of which
  10259. * contains elements `predicate` returns truthy for, the second of which
  10260. * contains elements `predicate` returns falsey for. The predicate is
  10261. * invoked with one argument: (value).
  10262. *
  10263. * @static
  10264. * @memberOf _
  10265. * @since 3.0.0
  10266. * @category Collection
  10267. * @param {Array|Object} collection The collection to iterate over.
  10268. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  10269. * @returns {Array} Returns the array of grouped elements.
  10270. * @example
  10271. *
  10272. * var users = [
  10273. * { 'user': 'barney', 'age': 36, 'active': false },
  10274. * { 'user': 'fred', 'age': 40, 'active': true },
  10275. * { 'user': 'pebbles', 'age': 1, 'active': false }
  10276. * ];
  10277. *
  10278. * _.partition(users, function(o) { return o.active; });
  10279. * // => objects for [['fred'], ['barney', 'pebbles']]
  10280. *
  10281. * // The `_.matches` iteratee shorthand.
  10282. * _.partition(users, { 'age': 1, 'active': false });
  10283. * // => objects for [['pebbles'], ['barney', 'fred']]
  10284. *
  10285. * // The `_.matchesProperty` iteratee shorthand.
  10286. * _.partition(users, ['active', false]);
  10287. * // => objects for [['barney', 'pebbles'], ['fred']]
  10288. *
  10289. * // The `_.property` iteratee shorthand.
  10290. * _.partition(users, 'active');
  10291. * // => objects for [['fred'], ['barney', 'pebbles']]
  10292. */
  10293. var partition = createAggregator(function(result, value, key) {
  10294. result[key ? 0 : 1].push(value);
  10295. }, function() { return [[], []]; });
  10296. /**
  10297. * Reduces `collection` to a value which is the accumulated result of running
  10298. * each element in `collection` thru `iteratee`, where each successive
  10299. * invocation is supplied the return value of the previous. If `accumulator`
  10300. * is not given, the first element of `collection` is used as the initial
  10301. * value. The iteratee is invoked with four arguments:
  10302. * (accumulator, value, index|key, collection).
  10303. *
  10304. * Many lodash methods are guarded to work as iteratees for methods like
  10305. * `_.reduce`, `_.reduceRight`, and `_.transform`.
  10306. *
  10307. * The guarded methods are:
  10308. * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
  10309. * and `sortBy`
  10310. *
  10311. * @static
  10312. * @memberOf _
  10313. * @since 0.1.0
  10314. * @category Collection
  10315. * @param {Array|Object} collection The collection to iterate over.
  10316. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  10317. * @param {*} [accumulator] The initial value.
  10318. * @returns {*} Returns the accumulated value.
  10319. * @see _.reduceRight
  10320. * @example
  10321. *
  10322. * _.reduce([1, 2], function(sum, n) {
  10323. * return sum + n;
  10324. * }, 0);
  10325. * // => 3
  10326. *
  10327. * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
  10328. * (result[value] || (result[value] = [])).push(key);
  10329. * return result;
  10330. * }, {});
  10331. * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
  10332. */
  10333. function reduce(collection, iteratee, accumulator) {
  10334. var func = isArray(collection) ? arrayReduce : baseReduce,
  10335. initAccum = arguments.length < 3;
  10336. return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
  10337. }
  10338. /**
  10339. * This method is like `_.reduce` except that it iterates over elements of
  10340. * `collection` from right to left.
  10341. *
  10342. * @static
  10343. * @memberOf _
  10344. * @since 0.1.0
  10345. * @category Collection
  10346. * @param {Array|Object} collection The collection to iterate over.
  10347. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  10348. * @param {*} [accumulator] The initial value.
  10349. * @returns {*} Returns the accumulated value.
  10350. * @see _.reduce
  10351. * @example
  10352. *
  10353. * var array = [[0, 1], [2, 3], [4, 5]];
  10354. *
  10355. * _.reduceRight(array, function(flattened, other) {
  10356. * return flattened.concat(other);
  10357. * }, []);
  10358. * // => [4, 5, 2, 3, 0, 1]
  10359. */
  10360. function reduceRight(collection, iteratee, accumulator) {
  10361. var func = isArray(collection) ? arrayReduceRight : baseReduce,
  10362. initAccum = arguments.length < 3;
  10363. return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
  10364. }
  10365. /**
  10366. * The opposite of `_.filter`; this method returns the elements of `collection`
  10367. * that `predicate` does **not** return truthy for.
  10368. *
  10369. * @static
  10370. * @memberOf _
  10371. * @since 0.1.0
  10372. * @category Collection
  10373. * @param {Array|Object} collection The collection to iterate over.
  10374. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  10375. * @returns {Array} Returns the new filtered array.
  10376. * @see _.filter
  10377. * @example
  10378. *
  10379. * var users = [
  10380. * { 'user': 'barney', 'age': 36, 'active': false },
  10381. * { 'user': 'fred', 'age': 40, 'active': true }
  10382. * ];
  10383. *
  10384. * _.reject(users, function(o) { return !o.active; });
  10385. * // => objects for ['fred']
  10386. *
  10387. * // The `_.matches` iteratee shorthand.
  10388. * _.reject(users, { 'age': 40, 'active': true });
  10389. * // => objects for ['barney']
  10390. *
  10391. * // The `_.matchesProperty` iteratee shorthand.
  10392. * _.reject(users, ['active', false]);
  10393. * // => objects for ['fred']
  10394. *
  10395. * // The `_.property` iteratee shorthand.
  10396. * _.reject(users, 'active');
  10397. * // => objects for ['barney']
  10398. */
  10399. function reject(collection, predicate) {
  10400. var func = isArray(collection) ? arrayFilter : baseFilter;
  10401. return func(collection, negate(getIteratee(predicate, 3)));
  10402. }
  10403. /**
  10404. * Gets a random element from `collection`.
  10405. *
  10406. * @static
  10407. * @memberOf _
  10408. * @since 2.0.0
  10409. * @category Collection
  10410. * @param {Array|Object} collection The collection to sample.
  10411. * @returns {*} Returns the random element.
  10412. * @example
  10413. *
  10414. * _.sample([1, 2, 3, 4]);
  10415. * // => 2
  10416. */
  10417. function sample(collection) {
  10418. var func = isArray(collection) ? arraySample : baseSample;
  10419. return func(collection);
  10420. }
  10421. /**
  10422. * Gets `n` random elements at unique keys from `collection` up to the
  10423. * size of `collection`.
  10424. *
  10425. * @static
  10426. * @memberOf _
  10427. * @since 4.0.0
  10428. * @category Collection
  10429. * @param {Array|Object} collection The collection to sample.
  10430. * @param {number} [n=1] The number of elements to sample.
  10431. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  10432. * @returns {Array} Returns the random elements.
  10433. * @example
  10434. *
  10435. * _.sampleSize([1, 2, 3], 2);
  10436. * // => [3, 1]
  10437. *
  10438. * _.sampleSize([1, 2, 3], 4);
  10439. * // => [2, 3, 1]
  10440. */
  10441. function sampleSize(collection, n, guard) {
  10442. if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
  10443. n = 1;
  10444. } else {
  10445. n = toInteger(n);
  10446. }
  10447. var func = isArray(collection) ? arraySampleSize : baseSampleSize;
  10448. return func(collection, n);
  10449. }
  10450. /**
  10451. * Creates an array of shuffled values, using a version of the
  10452. * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
  10453. *
  10454. * @static
  10455. * @memberOf _
  10456. * @since 0.1.0
  10457. * @category Collection
  10458. * @param {Array|Object} collection The collection to shuffle.
  10459. * @returns {Array} Returns the new shuffled array.
  10460. * @example
  10461. *
  10462. * _.shuffle([1, 2, 3, 4]);
  10463. * // => [4, 1, 3, 2]
  10464. */
  10465. function shuffle(collection) {
  10466. var func = isArray(collection) ? arrayShuffle : baseShuffle;
  10467. return func(collection);
  10468. }
  10469. /**
  10470. * Gets the size of `collection` by returning its length for array-like
  10471. * values or the number of own enumerable string keyed properties for objects.
  10472. *
  10473. * @static
  10474. * @memberOf _
  10475. * @since 0.1.0
  10476. * @category Collection
  10477. * @param {Array|Object|string} collection The collection to inspect.
  10478. * @returns {number} Returns the collection size.
  10479. * @example
  10480. *
  10481. * _.size([1, 2, 3]);
  10482. * // => 3
  10483. *
  10484. * _.size({ 'a': 1, 'b': 2 });
  10485. * // => 2
  10486. *
  10487. * _.size('pebbles');
  10488. * // => 7
  10489. */
  10490. function size(collection) {
  10491. if (collection == null) {
  10492. return 0;
  10493. }
  10494. if (isArrayLike(collection)) {
  10495. return isString(collection) ? stringSize(collection) : collection.length;
  10496. }
  10497. var tag = getTag(collection);
  10498. if (tag == mapTag || tag == setTag) {
  10499. return collection.size;
  10500. }
  10501. return baseKeys(collection).length;
  10502. }
  10503. /**
  10504. * Checks if `predicate` returns truthy for **any** element of `collection`.
  10505. * Iteration is stopped once `predicate` returns truthy. The predicate is
  10506. * invoked with three arguments: (value, index|key, collection).
  10507. *
  10508. * @static
  10509. * @memberOf _
  10510. * @since 0.1.0
  10511. * @category Collection
  10512. * @param {Array|Object} collection The collection to iterate over.
  10513. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  10514. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  10515. * @returns {boolean} Returns `true` if any element passes the predicate check,
  10516. * else `false`.
  10517. * @example
  10518. *
  10519. * _.some([null, 0, 'yes', false], Boolean);
  10520. * // => true
  10521. *
  10522. * var users = [
  10523. * { 'user': 'barney', 'active': true },
  10524. * { 'user': 'fred', 'active': false }
  10525. * ];
  10526. *
  10527. * // The `_.matches` iteratee shorthand.
  10528. * _.some(users, { 'user': 'barney', 'active': false });
  10529. * // => false
  10530. *
  10531. * // The `_.matchesProperty` iteratee shorthand.
  10532. * _.some(users, ['active', false]);
  10533. * // => true
  10534. *
  10535. * // The `_.property` iteratee shorthand.
  10536. * _.some(users, 'active');
  10537. * // => true
  10538. */
  10539. function some(collection, predicate, guard) {
  10540. var func = isArray(collection) ? arraySome : baseSome;
  10541. if (guard && isIterateeCall(collection, predicate, guard)) {
  10542. predicate = undefined;
  10543. }
  10544. return func(collection, getIteratee(predicate, 3));
  10545. }
  10546. /**
  10547. * Creates an array of elements, sorted in ascending order by the results of
  10548. * running each element in a collection thru each iteratee. This method
  10549. * performs a stable sort, that is, it preserves the original sort order of
  10550. * equal elements. The iteratees are invoked with one argument: (value).
  10551. *
  10552. * @static
  10553. * @memberOf _
  10554. * @since 0.1.0
  10555. * @category Collection
  10556. * @param {Array|Object} collection The collection to iterate over.
  10557. * @param {...(Function|Function[])} [iteratees=[_.identity]]
  10558. * The iteratees to sort by.
  10559. * @returns {Array} Returns the new sorted array.
  10560. * @example
  10561. *
  10562. * var users = [
  10563. * { 'user': 'fred', 'age': 48 },
  10564. * { 'user': 'barney', 'age': 36 },
  10565. * { 'user': 'fred', 'age': 30 },
  10566. * { 'user': 'barney', 'age': 34 }
  10567. * ];
  10568. *
  10569. * _.sortBy(users, [function(o) { return o.user; }]);
  10570. * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
  10571. *
  10572. * _.sortBy(users, ['user', 'age']);
  10573. * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
  10574. */
  10575. var sortBy = baseRest(function(collection, iteratees) {
  10576. if (collection == null) {
  10577. return [];
  10578. }
  10579. var length = iteratees.length;
  10580. if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
  10581. iteratees = [];
  10582. } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
  10583. iteratees = [iteratees[0]];
  10584. }
  10585. return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
  10586. });
  10587. /*------------------------------------------------------------------------*/
  10588. /**
  10589. * Gets the timestamp of the number of milliseconds that have elapsed since
  10590. * the Unix epoch (1 January 1970 00:00:00 UTC).
  10591. *
  10592. * @static
  10593. * @memberOf _
  10594. * @since 2.4.0
  10595. * @category Date
  10596. * @returns {number} Returns the timestamp.
  10597. * @example
  10598. *
  10599. * _.defer(function(stamp) {
  10600. * console.log(_.now() - stamp);
  10601. * }, _.now());
  10602. * // => Logs the number of milliseconds it took for the deferred invocation.
  10603. */
  10604. var now = ctxNow || function() {
  10605. return root.Date.now();
  10606. };
  10607. /*------------------------------------------------------------------------*/
  10608. /**
  10609. * The opposite of `_.before`; this method creates a function that invokes
  10610. * `func` once it's called `n` or more times.
  10611. *
  10612. * @static
  10613. * @memberOf _
  10614. * @since 0.1.0
  10615. * @category Function
  10616. * @param {number} n The number of calls before `func` is invoked.
  10617. * @param {Function} func The function to restrict.
  10618. * @returns {Function} Returns the new restricted function.
  10619. * @example
  10620. *
  10621. * var saves = ['profile', 'settings'];
  10622. *
  10623. * var done = _.after(saves.length, function() {
  10624. * console.log('done saving!');
  10625. * });
  10626. *
  10627. * _.forEach(saves, function(type) {
  10628. * asyncSave({ 'type': type, 'complete': done });
  10629. * });
  10630. * // => Logs 'done saving!' after the two async saves have completed.
  10631. */
  10632. function after(n, func) {
  10633. if (typeof func != 'function') {
  10634. throw new TypeError(FUNC_ERROR_TEXT);
  10635. }
  10636. n = toInteger(n);
  10637. return function() {
  10638. if (--n < 1) {
  10639. return func.apply(this, arguments);
  10640. }
  10641. };
  10642. }
  10643. /**
  10644. * Creates a function that invokes `func`, with up to `n` arguments,
  10645. * ignoring any additional arguments.
  10646. *
  10647. * @static
  10648. * @memberOf _
  10649. * @since 3.0.0
  10650. * @category Function
  10651. * @param {Function} func The function to cap arguments for.
  10652. * @param {number} [n=func.length] The arity cap.
  10653. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  10654. * @returns {Function} Returns the new capped function.
  10655. * @example
  10656. *
  10657. * _.map(['6', '8', '10'], _.ary(parseInt, 1));
  10658. * // => [6, 8, 10]
  10659. */
  10660. function ary(func, n, guard) {
  10661. n = guard ? undefined : n;
  10662. n = (func && n == null) ? func.length : n;
  10663. return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
  10664. }
  10665. /**
  10666. * Creates a function that invokes `func`, with the `this` binding and arguments
  10667. * of the created function, while it's called less than `n` times. Subsequent
  10668. * calls to the created function return the result of the last `func` invocation.
  10669. *
  10670. * @static
  10671. * @memberOf _
  10672. * @since 3.0.0
  10673. * @category Function
  10674. * @param {number} n The number of calls at which `func` is no longer invoked.
  10675. * @param {Function} func The function to restrict.
  10676. * @returns {Function} Returns the new restricted function.
  10677. * @example
  10678. *
  10679. * jQuery(element).on('click', _.before(5, addContactToList));
  10680. * // => Allows adding up to 4 contacts to the list.
  10681. */
  10682. function before(n, func) {
  10683. var result;
  10684. if (typeof func != 'function') {
  10685. throw new TypeError(FUNC_ERROR_TEXT);
  10686. }
  10687. n = toInteger(n);
  10688. return function() {
  10689. if (--n > 0) {
  10690. result = func.apply(this, arguments);
  10691. }
  10692. if (n <= 1) {
  10693. func = undefined;
  10694. }
  10695. return result;
  10696. };
  10697. }
  10698. /**
  10699. * Creates a function that invokes `func` with the `this` binding of `thisArg`
  10700. * and `partials` prepended to the arguments it receives.
  10701. *
  10702. * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
  10703. * may be used as a placeholder for partially applied arguments.
  10704. *
  10705. * **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
  10706. * property of bound functions.
  10707. *
  10708. * @static
  10709. * @memberOf _
  10710. * @since 0.1.0
  10711. * @category Function
  10712. * @param {Function} func The function to bind.
  10713. * @param {*} thisArg The `this` binding of `func`.
  10714. * @param {...*} [partials] The arguments to be partially applied.
  10715. * @returns {Function} Returns the new bound function.
  10716. * @example
  10717. *
  10718. * function greet(greeting, punctuation) {
  10719. * return greeting + ' ' + this.user + punctuation;
  10720. * }
  10721. *
  10722. * var object = { 'user': 'fred' };
  10723. *
  10724. * var bound = _.bind(greet, object, 'hi');
  10725. * bound('!');
  10726. * // => 'hi fred!'
  10727. *
  10728. * // Bound with placeholders.
  10729. * var bound = _.bind(greet, object, _, '!');
  10730. * bound('hi');
  10731. * // => 'hi fred!'
  10732. */
  10733. var bind = baseRest(function(func, thisArg, partials) {
  10734. var bitmask = WRAP_BIND_FLAG;
  10735. if (partials.length) {
  10736. var holders = replaceHolders(partials, getHolder(bind));
  10737. bitmask |= WRAP_PARTIAL_FLAG;
  10738. }
  10739. return createWrap(func, bitmask, thisArg, partials, holders);
  10740. });
  10741. /**
  10742. * Creates a function that invokes the method at `object[key]` with `partials`
  10743. * prepended to the arguments it receives.
  10744. *
  10745. * This method differs from `_.bind` by allowing bound functions to reference
  10746. * methods that may be redefined or don't yet exist. See
  10747. * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
  10748. * for more details.
  10749. *
  10750. * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
  10751. * builds, may be used as a placeholder for partially applied arguments.
  10752. *
  10753. * @static
  10754. * @memberOf _
  10755. * @since 0.10.0
  10756. * @category Function
  10757. * @param {Object} object The object to invoke the method on.
  10758. * @param {string} key The key of the method.
  10759. * @param {...*} [partials] The arguments to be partially applied.
  10760. * @returns {Function} Returns the new bound function.
  10761. * @example
  10762. *
  10763. * var object = {
  10764. * 'user': 'fred',
  10765. * 'greet': function(greeting, punctuation) {
  10766. * return greeting + ' ' + this.user + punctuation;
  10767. * }
  10768. * };
  10769. *
  10770. * var bound = _.bindKey(object, 'greet', 'hi');
  10771. * bound('!');
  10772. * // => 'hi fred!'
  10773. *
  10774. * object.greet = function(greeting, punctuation) {
  10775. * return greeting + 'ya ' + this.user + punctuation;
  10776. * };
  10777. *
  10778. * bound('!');
  10779. * // => 'hiya fred!'
  10780. *
  10781. * // Bound with placeholders.
  10782. * var bound = _.bindKey(object, 'greet', _, '!');
  10783. * bound('hi');
  10784. * // => 'hiya fred!'
  10785. */
  10786. var bindKey = baseRest(function(object, key, partials) {
  10787. var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
  10788. if (partials.length) {
  10789. var holders = replaceHolders(partials, getHolder(bindKey));
  10790. bitmask |= WRAP_PARTIAL_FLAG;
  10791. }
  10792. return createWrap(key, bitmask, object, partials, holders);
  10793. });
  10794. /**
  10795. * Creates a function that accepts arguments of `func` and either invokes
  10796. * `func` returning its result, if at least `arity` number of arguments have
  10797. * been provided, or returns a function that accepts the remaining `func`
  10798. * arguments, and so on. The arity of `func` may be specified if `func.length`
  10799. * is not sufficient.
  10800. *
  10801. * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
  10802. * may be used as a placeholder for provided arguments.
  10803. *
  10804. * **Note:** This method doesn't set the "length" property of curried functions.
  10805. *
  10806. * @static
  10807. * @memberOf _
  10808. * @since 2.0.0
  10809. * @category Function
  10810. * @param {Function} func The function to curry.
  10811. * @param {number} [arity=func.length] The arity of `func`.
  10812. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  10813. * @returns {Function} Returns the new curried function.
  10814. * @example
  10815. *
  10816. * var abc = function(a, b, c) {
  10817. * return [a, b, c];
  10818. * };
  10819. *
  10820. * var curried = _.curry(abc);
  10821. *
  10822. * curried(1)(2)(3);
  10823. * // => [1, 2, 3]
  10824. *
  10825. * curried(1, 2)(3);
  10826. * // => [1, 2, 3]
  10827. *
  10828. * curried(1, 2, 3);
  10829. * // => [1, 2, 3]
  10830. *
  10831. * // Curried with placeholders.
  10832. * curried(1)(_, 3)(2);
  10833. * // => [1, 2, 3]
  10834. */
  10835. function curry(func, arity, guard) {
  10836. arity = guard ? undefined : arity;
  10837. var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
  10838. result.placeholder = curry.placeholder;
  10839. return result;
  10840. }
  10841. /**
  10842. * This method is like `_.curry` except that arguments are applied to `func`
  10843. * in the manner of `_.partialRight` instead of `_.partial`.
  10844. *
  10845. * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
  10846. * builds, may be used as a placeholder for provided arguments.
  10847. *
  10848. * **Note:** This method doesn't set the "length" property of curried functions.
  10849. *
  10850. * @static
  10851. * @memberOf _
  10852. * @since 3.0.0
  10853. * @category Function
  10854. * @param {Function} func The function to curry.
  10855. * @param {number} [arity=func.length] The arity of `func`.
  10856. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  10857. * @returns {Function} Returns the new curried function.
  10858. * @example
  10859. *
  10860. * var abc = function(a, b, c) {
  10861. * return [a, b, c];
  10862. * };
  10863. *
  10864. * var curried = _.curryRight(abc);
  10865. *
  10866. * curried(3)(2)(1);
  10867. * // => [1, 2, 3]
  10868. *
  10869. * curried(2, 3)(1);
  10870. * // => [1, 2, 3]
  10871. *
  10872. * curried(1, 2, 3);
  10873. * // => [1, 2, 3]
  10874. *
  10875. * // Curried with placeholders.
  10876. * curried(3)(1, _)(2);
  10877. * // => [1, 2, 3]
  10878. */
  10879. function curryRight(func, arity, guard) {
  10880. arity = guard ? undefined : arity;
  10881. var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
  10882. result.placeholder = curryRight.placeholder;
  10883. return result;
  10884. }
  10885. /**
  10886. * Creates a debounced function that delays invoking `func` until after `wait`
  10887. * milliseconds have elapsed since the last time the debounced function was
  10888. * invoked. The debounced function comes with a `cancel` method to cancel
  10889. * delayed `func` invocations and a `flush` method to immediately invoke them.
  10890. * Provide `options` to indicate whether `func` should be invoked on the
  10891. * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
  10892. * with the last arguments provided to the debounced function. Subsequent
  10893. * calls to the debounced function return the result of the last `func`
  10894. * invocation.
  10895. *
  10896. * **Note:** If `leading` and `trailing` options are `true`, `func` is
  10897. * invoked on the trailing edge of the timeout only if the debounced function
  10898. * is invoked more than once during the `wait` timeout.
  10899. *
  10900. * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
  10901. * until to the next tick, similar to `setTimeout` with a timeout of `0`.
  10902. *
  10903. * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
  10904. * for details over the differences between `_.debounce` and `_.throttle`.
  10905. *
  10906. * @static
  10907. * @memberOf _
  10908. * @since 0.1.0
  10909. * @category Function
  10910. * @param {Function} func The function to debounce.
  10911. * @param {number} [wait=0] The number of milliseconds to delay.
  10912. * @param {Object} [options={}] The options object.
  10913. * @param {boolean} [options.leading=false]
  10914. * Specify invoking on the leading edge of the timeout.
  10915. * @param {number} [options.maxWait]
  10916. * The maximum time `func` is allowed to be delayed before it's invoked.
  10917. * @param {boolean} [options.trailing=true]
  10918. * Specify invoking on the trailing edge of the timeout.
  10919. * @returns {Function} Returns the new debounced function.
  10920. * @example
  10921. *
  10922. * // Avoid costly calculations while the window size is in flux.
  10923. * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
  10924. *
  10925. * // Invoke `sendMail` when clicked, debouncing subsequent calls.
  10926. * jQuery(element).on('click', _.debounce(sendMail, 300, {
  10927. * 'leading': true,
  10928. * 'trailing': false
  10929. * }));
  10930. *
  10931. * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
  10932. * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
  10933. * var source = new EventSource('/stream');
  10934. * jQuery(source).on('message', debounced);
  10935. *
  10936. * // Cancel the trailing debounced invocation.
  10937. * jQuery(window).on('popstate', debounced.cancel);
  10938. */
  10939. function debounce(func, wait, options) {
  10940. var lastArgs,
  10941. lastThis,
  10942. maxWait,
  10943. result,
  10944. timerId,
  10945. lastCallTime,
  10946. lastInvokeTime = 0,
  10947. leading = false,
  10948. maxing = false,
  10949. trailing = true;
  10950. if (typeof func != 'function') {
  10951. throw new TypeError(FUNC_ERROR_TEXT);
  10952. }
  10953. wait = toNumber(wait) || 0;
  10954. if (isObject(options)) {
  10955. leading = !!options.leading;
  10956. maxing = 'maxWait' in options;
  10957. maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
  10958. trailing = 'trailing' in options ? !!options.trailing : trailing;
  10959. }
  10960. function invokeFunc(time) {
  10961. var args = lastArgs,
  10962. thisArg = lastThis;
  10963. lastArgs = lastThis = undefined;
  10964. lastInvokeTime = time;
  10965. result = func.apply(thisArg, args);
  10966. return result;
  10967. }
  10968. function leadingEdge(time) {
  10969. // Reset any `maxWait` timer.
  10970. lastInvokeTime = time;
  10971. // Start the timer for the trailing edge.
  10972. timerId = setTimeout(timerExpired, wait);
  10973. // Invoke the leading edge.
  10974. return leading ? invokeFunc(time) : result;
  10975. }
  10976. function remainingWait(time) {
  10977. var timeSinceLastCall = time - lastCallTime,
  10978. timeSinceLastInvoke = time - lastInvokeTime,
  10979. timeWaiting = wait - timeSinceLastCall;
  10980. return maxing
  10981. ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
  10982. : timeWaiting;
  10983. }
  10984. function shouldInvoke(time) {
  10985. var timeSinceLastCall = time - lastCallTime,
  10986. timeSinceLastInvoke = time - lastInvokeTime;
  10987. // Either this is the first call, activity has stopped and we're at the
  10988. // trailing edge, the system time has gone backwards and we're treating
  10989. // it as the trailing edge, or we've hit the `maxWait` limit.
  10990. return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
  10991. (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
  10992. }
  10993. function timerExpired() {
  10994. var time = now();
  10995. if (shouldInvoke(time)) {
  10996. return trailingEdge(time);
  10997. }
  10998. // Restart the timer.
  10999. timerId = setTimeout(timerExpired, remainingWait(time));
  11000. }
  11001. function trailingEdge(time) {
  11002. timerId = undefined;
  11003. // Only invoke if we have `lastArgs` which means `func` has been
  11004. // debounced at least once.
  11005. if (trailing && lastArgs) {
  11006. return invokeFunc(time);
  11007. }
  11008. lastArgs = lastThis = undefined;
  11009. return result;
  11010. }
  11011. function cancel() {
  11012. if (timerId !== undefined) {
  11013. clearTimeout(timerId);
  11014. }
  11015. lastInvokeTime = 0;
  11016. lastArgs = lastCallTime = lastThis = timerId = undefined;
  11017. }
  11018. function flush() {
  11019. return timerId === undefined ? result : trailingEdge(now());
  11020. }
  11021. function debounced() {
  11022. var time = now(),
  11023. isInvoking = shouldInvoke(time);
  11024. lastArgs = arguments;
  11025. lastThis = this;
  11026. lastCallTime = time;
  11027. if (isInvoking) {
  11028. if (timerId === undefined) {
  11029. return leadingEdge(lastCallTime);
  11030. }
  11031. if (maxing) {
  11032. // Handle invocations in a tight loop.
  11033. clearTimeout(timerId);
  11034. timerId = setTimeout(timerExpired, wait);
  11035. return invokeFunc(lastCallTime);
  11036. }
  11037. }
  11038. if (timerId === undefined) {
  11039. timerId = setTimeout(timerExpired, wait);
  11040. }
  11041. return result;
  11042. }
  11043. debounced.cancel = cancel;
  11044. debounced.flush = flush;
  11045. return debounced;
  11046. }
  11047. /**
  11048. * Defers invoking the `func` until the current call stack has cleared. Any
  11049. * additional arguments are provided to `func` when it's invoked.
  11050. *
  11051. * @static
  11052. * @memberOf _
  11053. * @since 0.1.0
  11054. * @category Function
  11055. * @param {Function} func The function to defer.
  11056. * @param {...*} [args] The arguments to invoke `func` with.
  11057. * @returns {number} Returns the timer id.
  11058. * @example
  11059. *
  11060. * _.defer(function(text) {
  11061. * console.log(text);
  11062. * }, 'deferred');
  11063. * // => Logs 'deferred' after one millisecond.
  11064. */
  11065. var defer = baseRest(function(func, args) {
  11066. return baseDelay(func, 1, args);
  11067. });
  11068. /**
  11069. * Invokes `func` after `wait` milliseconds. Any additional arguments are
  11070. * provided to `func` when it's invoked.
  11071. *
  11072. * @static
  11073. * @memberOf _
  11074. * @since 0.1.0
  11075. * @category Function
  11076. * @param {Function} func The function to delay.
  11077. * @param {number} wait The number of milliseconds to delay invocation.
  11078. * @param {...*} [args] The arguments to invoke `func` with.
  11079. * @returns {number} Returns the timer id.
  11080. * @example
  11081. *
  11082. * _.delay(function(text) {
  11083. * console.log(text);
  11084. * }, 1000, 'later');
  11085. * // => Logs 'later' after one second.
  11086. */
  11087. var delay = baseRest(function(func, wait, args) {
  11088. return baseDelay(func, toNumber(wait) || 0, args);
  11089. });
  11090. /**
  11091. * Creates a function that invokes `func` with arguments reversed.
  11092. *
  11093. * @static
  11094. * @memberOf _
  11095. * @since 4.0.0
  11096. * @category Function
  11097. * @param {Function} func The function to flip arguments for.
  11098. * @returns {Function} Returns the new flipped function.
  11099. * @example
  11100. *
  11101. * var flipped = _.flip(function() {
  11102. * return _.toArray(arguments);
  11103. * });
  11104. *
  11105. * flipped('a', 'b', 'c', 'd');
  11106. * // => ['d', 'c', 'b', 'a']
  11107. */
  11108. function flip(func) {
  11109. return createWrap(func, WRAP_FLIP_FLAG);
  11110. }
  11111. /**
  11112. * Creates a function that memoizes the result of `func`. If `resolver` is
  11113. * provided, it determines the cache key for storing the result based on the
  11114. * arguments provided to the memoized function. By default, the first argument
  11115. * provided to the memoized function is used as the map cache key. The `func`
  11116. * is invoked with the `this` binding of the memoized function.
  11117. *
  11118. * **Note:** The cache is exposed as the `cache` property on the memoized
  11119. * function. Its creation may be customized by replacing the `_.memoize.Cache`
  11120. * constructor with one whose instances implement the
  11121. * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
  11122. * method interface of `clear`, `delete`, `get`, `has`, and `set`.
  11123. *
  11124. * @static
  11125. * @memberOf _
  11126. * @since 0.1.0
  11127. * @category Function
  11128. * @param {Function} func The function to have its output memoized.
  11129. * @param {Function} [resolver] The function to resolve the cache key.
  11130. * @returns {Function} Returns the new memoized function.
  11131. * @example
  11132. *
  11133. * var object = { 'a': 1, 'b': 2 };
  11134. * var other = { 'c': 3, 'd': 4 };
  11135. *
  11136. * var values = _.memoize(_.values);
  11137. * values(object);
  11138. * // => [1, 2]
  11139. *
  11140. * values(other);
  11141. * // => [3, 4]
  11142. *
  11143. * object.a = 2;
  11144. * values(object);
  11145. * // => [1, 2]
  11146. *
  11147. * // Modify the result cache.
  11148. * values.cache.set(object, ['a', 'b']);
  11149. * values(object);
  11150. * // => ['a', 'b']
  11151. *
  11152. * // Replace `_.memoize.Cache`.
  11153. * _.memoize.Cache = WeakMap;
  11154. */
  11155. function memoize(func, resolver) {
  11156. if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
  11157. throw new TypeError(FUNC_ERROR_TEXT);
  11158. }
  11159. var memoized = function() {
  11160. var args = arguments,
  11161. key = resolver ? resolver.apply(this, args) : args[0],
  11162. cache = memoized.cache;
  11163. if (cache.has(key)) {
  11164. return cache.get(key);
  11165. }
  11166. var result = func.apply(this, args);
  11167. memoized.cache = cache.set(key, result) || cache;
  11168. return result;
  11169. };
  11170. memoized.cache = new (memoize.Cache || MapCache);
  11171. return memoized;
  11172. }
  11173. // Expose `MapCache`.
  11174. memoize.Cache = MapCache;
  11175. /**
  11176. * Creates a function that negates the result of the predicate `func`. The
  11177. * `func` predicate is invoked with the `this` binding and arguments of the
  11178. * created function.
  11179. *
  11180. * @static
  11181. * @memberOf _
  11182. * @since 3.0.0
  11183. * @category Function
  11184. * @param {Function} predicate The predicate to negate.
  11185. * @returns {Function} Returns the new negated function.
  11186. * @example
  11187. *
  11188. * function isEven(n) {
  11189. * return n % 2 == 0;
  11190. * }
  11191. *
  11192. * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
  11193. * // => [1, 3, 5]
  11194. */
  11195. function negate(predicate) {
  11196. if (typeof predicate != 'function') {
  11197. throw new TypeError(FUNC_ERROR_TEXT);
  11198. }
  11199. return function() {
  11200. var args = arguments;
  11201. switch (args.length) {
  11202. case 0: return !predicate.call(this);
  11203. case 1: return !predicate.call(this, args[0]);
  11204. case 2: return !predicate.call(this, args[0], args[1]);
  11205. case 3: return !predicate.call(this, args[0], args[1], args[2]);
  11206. }
  11207. return !predicate.apply(this, args);
  11208. };
  11209. }
  11210. /**
  11211. * Creates a function that is restricted to invoking `func` once. Repeat calls
  11212. * to the function return the value of the first invocation. The `func` is
  11213. * invoked with the `this` binding and arguments of the created function.
  11214. *
  11215. * @static
  11216. * @memberOf _
  11217. * @since 0.1.0
  11218. * @category Function
  11219. * @param {Function} func The function to restrict.
  11220. * @returns {Function} Returns the new restricted function.
  11221. * @example
  11222. *
  11223. * var initialize = _.once(createApplication);
  11224. * initialize();
  11225. * initialize();
  11226. * // => `createApplication` is invoked once
  11227. */
  11228. function once(func) {
  11229. return before(2, func);
  11230. }
  11231. /**
  11232. * Creates a function that invokes `func` with its arguments transformed.
  11233. *
  11234. * @static
  11235. * @since 4.0.0
  11236. * @memberOf _
  11237. * @category Function
  11238. * @param {Function} func The function to wrap.
  11239. * @param {...(Function|Function[])} [transforms=[_.identity]]
  11240. * The argument transforms.
  11241. * @returns {Function} Returns the new function.
  11242. * @example
  11243. *
  11244. * function doubled(n) {
  11245. * return n * 2;
  11246. * }
  11247. *
  11248. * function square(n) {
  11249. * return n * n;
  11250. * }
  11251. *
  11252. * var func = _.overArgs(function(x, y) {
  11253. * return [x, y];
  11254. * }, [square, doubled]);
  11255. *
  11256. * func(9, 3);
  11257. * // => [81, 6]
  11258. *
  11259. * func(10, 5);
  11260. * // => [100, 10]
  11261. */
  11262. var overArgs = castRest(function(func, transforms) {
  11263. transforms = (transforms.length == 1 && isArray(transforms[0]))
  11264. ? arrayMap(transforms[0], baseUnary(getIteratee()))
  11265. : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
  11266. var funcsLength = transforms.length;
  11267. return baseRest(function(args) {
  11268. var index = -1,
  11269. length = nativeMin(args.length, funcsLength);
  11270. while (++index < length) {
  11271. args[index] = transforms[index].call(this, args[index]);
  11272. }
  11273. return apply(func, this, args);
  11274. });
  11275. });
  11276. /**
  11277. * Creates a function that invokes `func` with `partials` prepended to the
  11278. * arguments it receives. This method is like `_.bind` except it does **not**
  11279. * alter the `this` binding.
  11280. *
  11281. * The `_.partial.placeholder` value, which defaults to `_` in monolithic
  11282. * builds, may be used as a placeholder for partially applied arguments.
  11283. *
  11284. * **Note:** This method doesn't set the "length" property of partially
  11285. * applied functions.
  11286. *
  11287. * @static
  11288. * @memberOf _
  11289. * @since 0.2.0
  11290. * @category Function
  11291. * @param {Function} func The function to partially apply arguments to.
  11292. * @param {...*} [partials] The arguments to be partially applied.
  11293. * @returns {Function} Returns the new partially applied function.
  11294. * @example
  11295. *
  11296. * function greet(greeting, name) {
  11297. * return greeting + ' ' + name;
  11298. * }
  11299. *
  11300. * var sayHelloTo = _.partial(greet, 'hello');
  11301. * sayHelloTo('fred');
  11302. * // => 'hello fred'
  11303. *
  11304. * // Partially applied with placeholders.
  11305. * var greetFred = _.partial(greet, _, 'fred');
  11306. * greetFred('hi');
  11307. * // => 'hi fred'
  11308. */
  11309. var partial = baseRest(function(func, partials) {
  11310. var holders = replaceHolders(partials, getHolder(partial));
  11311. return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
  11312. });
  11313. /**
  11314. * This method is like `_.partial` except that partially applied arguments
  11315. * are appended to the arguments it receives.
  11316. *
  11317. * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
  11318. * builds, may be used as a placeholder for partially applied arguments.
  11319. *
  11320. * **Note:** This method doesn't set the "length" property of partially
  11321. * applied functions.
  11322. *
  11323. * @static
  11324. * @memberOf _
  11325. * @since 1.0.0
  11326. * @category Function
  11327. * @param {Function} func The function to partially apply arguments to.
  11328. * @param {...*} [partials] The arguments to be partially applied.
  11329. * @returns {Function} Returns the new partially applied function.
  11330. * @example
  11331. *
  11332. * function greet(greeting, name) {
  11333. * return greeting + ' ' + name;
  11334. * }
  11335. *
  11336. * var greetFred = _.partialRight(greet, 'fred');
  11337. * greetFred('hi');
  11338. * // => 'hi fred'
  11339. *
  11340. * // Partially applied with placeholders.
  11341. * var sayHelloTo = _.partialRight(greet, 'hello', _);
  11342. * sayHelloTo('fred');
  11343. * // => 'hello fred'
  11344. */
  11345. var partialRight = baseRest(function(func, partials) {
  11346. var holders = replaceHolders(partials, getHolder(partialRight));
  11347. return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
  11348. });
  11349. /**
  11350. * Creates a function that invokes `func` with arguments arranged according
  11351. * to the specified `indexes` where the argument value at the first index is
  11352. * provided as the first argument, the argument value at the second index is
  11353. * provided as the second argument, and so on.
  11354. *
  11355. * @static
  11356. * @memberOf _
  11357. * @since 3.0.0
  11358. * @category Function
  11359. * @param {Function} func The function to rearrange arguments for.
  11360. * @param {...(number|number[])} indexes The arranged argument indexes.
  11361. * @returns {Function} Returns the new function.
  11362. * @example
  11363. *
  11364. * var rearged = _.rearg(function(a, b, c) {
  11365. * return [a, b, c];
  11366. * }, [2, 0, 1]);
  11367. *
  11368. * rearged('b', 'c', 'a')
  11369. * // => ['a', 'b', 'c']
  11370. */
  11371. var rearg = flatRest(function(func, indexes) {
  11372. return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);
  11373. });
  11374. /**
  11375. * Creates a function that invokes `func` with the `this` binding of the
  11376. * created function and arguments from `start` and beyond provided as
  11377. * an array.
  11378. *
  11379. * **Note:** This method is based on the
  11380. * [rest parameter](https://mdn.io/rest_parameters).
  11381. *
  11382. * @static
  11383. * @memberOf _
  11384. * @since 4.0.0
  11385. * @category Function
  11386. * @param {Function} func The function to apply a rest parameter to.
  11387. * @param {number} [start=func.length-1] The start position of the rest parameter.
  11388. * @returns {Function} Returns the new function.
  11389. * @example
  11390. *
  11391. * var say = _.rest(function(what, names) {
  11392. * return what + ' ' + _.initial(names).join(', ') +
  11393. * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
  11394. * });
  11395. *
  11396. * say('hello', 'fred', 'barney', 'pebbles');
  11397. * // => 'hello fred, barney, & pebbles'
  11398. */
  11399. function rest(func, start) {
  11400. if (typeof func != 'function') {
  11401. throw new TypeError(FUNC_ERROR_TEXT);
  11402. }
  11403. start = start === undefined ? start : toInteger(start);
  11404. return baseRest(func, start);
  11405. }
  11406. /**
  11407. * Creates a function that invokes `func` with the `this` binding of the
  11408. * create function and an array of arguments much like
  11409. * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).
  11410. *
  11411. * **Note:** This method is based on the
  11412. * [spread operator](https://mdn.io/spread_operator).
  11413. *
  11414. * @static
  11415. * @memberOf _
  11416. * @since 3.2.0
  11417. * @category Function
  11418. * @param {Function} func The function to spread arguments over.
  11419. * @param {number} [start=0] The start position of the spread.
  11420. * @returns {Function} Returns the new function.
  11421. * @example
  11422. *
  11423. * var say = _.spread(function(who, what) {
  11424. * return who + ' says ' + what;
  11425. * });
  11426. *
  11427. * say(['fred', 'hello']);
  11428. * // => 'fred says hello'
  11429. *
  11430. * var numbers = Promise.all([
  11431. * Promise.resolve(40),
  11432. * Promise.resolve(36)
  11433. * ]);
  11434. *
  11435. * numbers.then(_.spread(function(x, y) {
  11436. * return x + y;
  11437. * }));
  11438. * // => a Promise of 76
  11439. */
  11440. function spread(func, start) {
  11441. if (typeof func != 'function') {
  11442. throw new TypeError(FUNC_ERROR_TEXT);
  11443. }
  11444. start = start == null ? 0 : nativeMax(toInteger(start), 0);
  11445. return baseRest(function(args) {
  11446. var array = args[start],
  11447. otherArgs = castSlice(args, 0, start);
  11448. if (array) {
  11449. arrayPush(otherArgs, array);
  11450. }
  11451. return apply(func, this, otherArgs);
  11452. });
  11453. }
  11454. /**
  11455. * Creates a throttled function that only invokes `func` at most once per
  11456. * every `wait` milliseconds. The throttled function comes with a `cancel`
  11457. * method to cancel delayed `func` invocations and a `flush` method to
  11458. * immediately invoke them. Provide `options` to indicate whether `func`
  11459. * should be invoked on the leading and/or trailing edge of the `wait`
  11460. * timeout. The `func` is invoked with the last arguments provided to the
  11461. * throttled function. Subsequent calls to the throttled function return the
  11462. * result of the last `func` invocation.
  11463. *
  11464. * **Note:** If `leading` and `trailing` options are `true`, `func` is
  11465. * invoked on the trailing edge of the timeout only if the throttled function
  11466. * is invoked more than once during the `wait` timeout.
  11467. *
  11468. * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
  11469. * until to the next tick, similar to `setTimeout` with a timeout of `0`.
  11470. *
  11471. * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
  11472. * for details over the differences between `_.throttle` and `_.debounce`.
  11473. *
  11474. * @static
  11475. * @memberOf _
  11476. * @since 0.1.0
  11477. * @category Function
  11478. * @param {Function} func The function to throttle.
  11479. * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
  11480. * @param {Object} [options={}] The options object.
  11481. * @param {boolean} [options.leading=true]
  11482. * Specify invoking on the leading edge of the timeout.
  11483. * @param {boolean} [options.trailing=true]
  11484. * Specify invoking on the trailing edge of the timeout.
  11485. * @returns {Function} Returns the new throttled function.
  11486. * @example
  11487. *
  11488. * // Avoid excessively updating the position while scrolling.
  11489. * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
  11490. *
  11491. * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
  11492. * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
  11493. * jQuery(element).on('click', throttled);
  11494. *
  11495. * // Cancel the trailing throttled invocation.
  11496. * jQuery(window).on('popstate', throttled.cancel);
  11497. */
  11498. function throttle(func, wait, options) {
  11499. var leading = true,
  11500. trailing = true;
  11501. if (typeof func != 'function') {
  11502. throw new TypeError(FUNC_ERROR_TEXT);
  11503. }
  11504. if (isObject(options)) {
  11505. leading = 'leading' in options ? !!options.leading : leading;
  11506. trailing = 'trailing' in options ? !!options.trailing : trailing;
  11507. }
  11508. return debounce(func, wait, {
  11509. 'leading': leading,
  11510. 'maxWait': wait,
  11511. 'trailing': trailing
  11512. });
  11513. }
  11514. /**
  11515. * Creates a function that accepts up to one argument, ignoring any
  11516. * additional arguments.
  11517. *
  11518. * @static
  11519. * @memberOf _
  11520. * @since 4.0.0
  11521. * @category Function
  11522. * @param {Function} func The function to cap arguments for.
  11523. * @returns {Function} Returns the new capped function.
  11524. * @example
  11525. *
  11526. * _.map(['6', '8', '10'], _.unary(parseInt));
  11527. * // => [6, 8, 10]
  11528. */
  11529. function unary(func) {
  11530. return ary(func, 1);
  11531. }
  11532. /**
  11533. * Creates a function that provides `value` to `wrapper` as its first
  11534. * argument. Any additional arguments provided to the function are appended
  11535. * to those provided to the `wrapper`. The wrapper is invoked with the `this`
  11536. * binding of the created function.
  11537. *
  11538. * @static
  11539. * @memberOf _
  11540. * @since 0.1.0
  11541. * @category Function
  11542. * @param {*} value The value to wrap.
  11543. * @param {Function} [wrapper=identity] The wrapper function.
  11544. * @returns {Function} Returns the new function.
  11545. * @example
  11546. *
  11547. * var p = _.wrap(_.escape, function(func, text) {
  11548. * return '<p>' + func(text) + '</p>';
  11549. * });
  11550. *
  11551. * p('fred, barney, & pebbles');
  11552. * // => '<p>fred, barney, &amp; pebbles</p>'
  11553. */
  11554. function wrap(value, wrapper) {
  11555. return partial(castFunction(wrapper), value);
  11556. }
  11557. /*------------------------------------------------------------------------*/
  11558. /**
  11559. * Casts `value` as an array if it's not one.
  11560. *
  11561. * @static
  11562. * @memberOf _
  11563. * @since 4.4.0
  11564. * @category Lang
  11565. * @param {*} value The value to inspect.
  11566. * @returns {Array} Returns the cast array.
  11567. * @example
  11568. *
  11569. * _.castArray(1);
  11570. * // => [1]
  11571. *
  11572. * _.castArray({ 'a': 1 });
  11573. * // => [{ 'a': 1 }]
  11574. *
  11575. * _.castArray('abc');
  11576. * // => ['abc']
  11577. *
  11578. * _.castArray(null);
  11579. * // => [null]
  11580. *
  11581. * _.castArray(undefined);
  11582. * // => [undefined]
  11583. *
  11584. * _.castArray();
  11585. * // => []
  11586. *
  11587. * var array = [1, 2, 3];
  11588. * console.log(_.castArray(array) === array);
  11589. * // => true
  11590. */
  11591. function castArray() {
  11592. if (!arguments.length) {
  11593. return [];
  11594. }
  11595. var value = arguments[0];
  11596. return isArray(value) ? value : [value];
  11597. }
  11598. /**
  11599. * Creates a shallow clone of `value`.
  11600. *
  11601. * **Note:** This method is loosely based on the
  11602. * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
  11603. * and supports cloning arrays, array buffers, booleans, date objects, maps,
  11604. * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
  11605. * arrays. The own enumerable properties of `arguments` objects are cloned
  11606. * as plain objects. An empty object is returned for uncloneable values such
  11607. * as error objects, functions, DOM nodes, and WeakMaps.
  11608. *
  11609. * @static
  11610. * @memberOf _
  11611. * @since 0.1.0
  11612. * @category Lang
  11613. * @param {*} value The value to clone.
  11614. * @returns {*} Returns the cloned value.
  11615. * @see _.cloneDeep
  11616. * @example
  11617. *
  11618. * var objects = [{ 'a': 1 }, { 'b': 2 }];
  11619. *
  11620. * var shallow = _.clone(objects);
  11621. * console.log(shallow[0] === objects[0]);
  11622. * // => true
  11623. */
  11624. function clone(value) {
  11625. return baseClone(value, CLONE_SYMBOLS_FLAG);
  11626. }
  11627. /**
  11628. * This method is like `_.clone` except that it accepts `customizer` which
  11629. * is invoked to produce the cloned value. If `customizer` returns `undefined`,
  11630. * cloning is handled by the method instead. The `customizer` is invoked with
  11631. * up to four arguments; (value [, index|key, object, stack]).
  11632. *
  11633. * @static
  11634. * @memberOf _
  11635. * @since 4.0.0
  11636. * @category Lang
  11637. * @param {*} value The value to clone.
  11638. * @param {Function} [customizer] The function to customize cloning.
  11639. * @returns {*} Returns the cloned value.
  11640. * @see _.cloneDeepWith
  11641. * @example
  11642. *
  11643. * function customizer(value) {
  11644. * if (_.isElement(value)) {
  11645. * return value.cloneNode(false);
  11646. * }
  11647. * }
  11648. *
  11649. * var el = _.cloneWith(document.body, customizer);
  11650. *
  11651. * console.log(el === document.body);
  11652. * // => false
  11653. * console.log(el.nodeName);
  11654. * // => 'BODY'
  11655. * console.log(el.childNodes.length);
  11656. * // => 0
  11657. */
  11658. function cloneWith(value, customizer) {
  11659. customizer = typeof customizer == 'function' ? customizer : undefined;
  11660. return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
  11661. }
  11662. /**
  11663. * This method is like `_.clone` except that it recursively clones `value`.
  11664. *
  11665. * @static
  11666. * @memberOf _
  11667. * @since 1.0.0
  11668. * @category Lang
  11669. * @param {*} value The value to recursively clone.
  11670. * @returns {*} Returns the deep cloned value.
  11671. * @see _.clone
  11672. * @example
  11673. *
  11674. * var objects = [{ 'a': 1 }, { 'b': 2 }];
  11675. *
  11676. * var deep = _.cloneDeep(objects);
  11677. * console.log(deep[0] === objects[0]);
  11678. * // => false
  11679. */
  11680. function cloneDeep(value) {
  11681. return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
  11682. }
  11683. /**
  11684. * This method is like `_.cloneWith` except that it recursively clones `value`.
  11685. *
  11686. * @static
  11687. * @memberOf _
  11688. * @since 4.0.0
  11689. * @category Lang
  11690. * @param {*} value The value to recursively clone.
  11691. * @param {Function} [customizer] The function to customize cloning.
  11692. * @returns {*} Returns the deep cloned value.
  11693. * @see _.cloneWith
  11694. * @example
  11695. *
  11696. * function customizer(value) {
  11697. * if (_.isElement(value)) {
  11698. * return value.cloneNode(true);
  11699. * }
  11700. * }
  11701. *
  11702. * var el = _.cloneDeepWith(document.body, customizer);
  11703. *
  11704. * console.log(el === document.body);
  11705. * // => false
  11706. * console.log(el.nodeName);
  11707. * // => 'BODY'
  11708. * console.log(el.childNodes.length);
  11709. * // => 20
  11710. */
  11711. function cloneDeepWith(value, customizer) {
  11712. customizer = typeof customizer == 'function' ? customizer : undefined;
  11713. return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
  11714. }
  11715. /**
  11716. * Checks if `object` conforms to `source` by invoking the predicate
  11717. * properties of `source` with the corresponding property values of `object`.
  11718. *
  11719. * **Note:** This method is equivalent to `_.conforms` when `source` is
  11720. * partially applied.
  11721. *
  11722. * @static
  11723. * @memberOf _
  11724. * @since 4.14.0
  11725. * @category Lang
  11726. * @param {Object} object The object to inspect.
  11727. * @param {Object} source The object of property predicates to conform to.
  11728. * @returns {boolean} Returns `true` if `object` conforms, else `false`.
  11729. * @example
  11730. *
  11731. * var object = { 'a': 1, 'b': 2 };
  11732. *
  11733. * _.conformsTo(object, { 'b': function(n) { return n > 1; } });
  11734. * // => true
  11735. *
  11736. * _.conformsTo(object, { 'b': function(n) { return n > 2; } });
  11737. * // => false
  11738. */
  11739. function conformsTo(object, source) {
  11740. return source == null || baseConformsTo(object, source, keys(source));
  11741. }
  11742. /**
  11743. * Performs a
  11744. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  11745. * comparison between two values to determine if they are equivalent.
  11746. *
  11747. * @static
  11748. * @memberOf _
  11749. * @since 4.0.0
  11750. * @category Lang
  11751. * @param {*} value The value to compare.
  11752. * @param {*} other The other value to compare.
  11753. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  11754. * @example
  11755. *
  11756. * var object = { 'a': 1 };
  11757. * var other = { 'a': 1 };
  11758. *
  11759. * _.eq(object, object);
  11760. * // => true
  11761. *
  11762. * _.eq(object, other);
  11763. * // => false
  11764. *
  11765. * _.eq('a', 'a');
  11766. * // => true
  11767. *
  11768. * _.eq('a', Object('a'));
  11769. * // => false
  11770. *
  11771. * _.eq(NaN, NaN);
  11772. * // => true
  11773. */
  11774. function eq(value, other) {
  11775. return value === other || (value !== value && other !== other);
  11776. }
  11777. /**
  11778. * Checks if `value` is greater than `other`.
  11779. *
  11780. * @static
  11781. * @memberOf _
  11782. * @since 3.9.0
  11783. * @category Lang
  11784. * @param {*} value The value to compare.
  11785. * @param {*} other The other value to compare.
  11786. * @returns {boolean} Returns `true` if `value` is greater than `other`,
  11787. * else `false`.
  11788. * @see _.lt
  11789. * @example
  11790. *
  11791. * _.gt(3, 1);
  11792. * // => true
  11793. *
  11794. * _.gt(3, 3);
  11795. * // => false
  11796. *
  11797. * _.gt(1, 3);
  11798. * // => false
  11799. */
  11800. var gt = createRelationalOperation(baseGt);
  11801. /**
  11802. * Checks if `value` is greater than or equal to `other`.
  11803. *
  11804. * @static
  11805. * @memberOf _
  11806. * @since 3.9.0
  11807. * @category Lang
  11808. * @param {*} value The value to compare.
  11809. * @param {*} other The other value to compare.
  11810. * @returns {boolean} Returns `true` if `value` is greater than or equal to
  11811. * `other`, else `false`.
  11812. * @see _.lte
  11813. * @example
  11814. *
  11815. * _.gte(3, 1);
  11816. * // => true
  11817. *
  11818. * _.gte(3, 3);
  11819. * // => true
  11820. *
  11821. * _.gte(1, 3);
  11822. * // => false
  11823. */
  11824. var gte = createRelationalOperation(function(value, other) {
  11825. return value >= other;
  11826. });
  11827. /**
  11828. * Checks if `value` is likely an `arguments` object.
  11829. *
  11830. * @static
  11831. * @memberOf _
  11832. * @since 0.1.0
  11833. * @category Lang
  11834. * @param {*} value The value to check.
  11835. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  11836. * else `false`.
  11837. * @example
  11838. *
  11839. * _.isArguments(function() { return arguments; }());
  11840. * // => true
  11841. *
  11842. * _.isArguments([1, 2, 3]);
  11843. * // => false
  11844. */
  11845. var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
  11846. return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
  11847. !propertyIsEnumerable.call(value, 'callee');
  11848. };
  11849. /**
  11850. * Checks if `value` is classified as an `Array` object.
  11851. *
  11852. * @static
  11853. * @memberOf _
  11854. * @since 0.1.0
  11855. * @category Lang
  11856. * @param {*} value The value to check.
  11857. * @returns {boolean} Returns `true` if `value` is an array, else `false`.
  11858. * @example
  11859. *
  11860. * _.isArray([1, 2, 3]);
  11861. * // => true
  11862. *
  11863. * _.isArray(document.body.children);
  11864. * // => false
  11865. *
  11866. * _.isArray('abc');
  11867. * // => false
  11868. *
  11869. * _.isArray(_.noop);
  11870. * // => false
  11871. */
  11872. var isArray = Array.isArray;
  11873. /**
  11874. * Checks if `value` is classified as an `ArrayBuffer` object.
  11875. *
  11876. * @static
  11877. * @memberOf _
  11878. * @since 4.3.0
  11879. * @category Lang
  11880. * @param {*} value The value to check.
  11881. * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
  11882. * @example
  11883. *
  11884. * _.isArrayBuffer(new ArrayBuffer(2));
  11885. * // => true
  11886. *
  11887. * _.isArrayBuffer(new Array(2));
  11888. * // => false
  11889. */
  11890. var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
  11891. /**
  11892. * Checks if `value` is array-like. A value is considered array-like if it's
  11893. * not a function and has a `value.length` that's an integer greater than or
  11894. * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
  11895. *
  11896. * @static
  11897. * @memberOf _
  11898. * @since 4.0.0
  11899. * @category Lang
  11900. * @param {*} value The value to check.
  11901. * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
  11902. * @example
  11903. *
  11904. * _.isArrayLike([1, 2, 3]);
  11905. * // => true
  11906. *
  11907. * _.isArrayLike(document.body.children);
  11908. * // => true
  11909. *
  11910. * _.isArrayLike('abc');
  11911. * // => true
  11912. *
  11913. * _.isArrayLike(_.noop);
  11914. * // => false
  11915. */
  11916. function isArrayLike(value) {
  11917. return value != null && isLength(value.length) && !isFunction(value);
  11918. }
  11919. /**
  11920. * This method is like `_.isArrayLike` except that it also checks if `value`
  11921. * is an object.
  11922. *
  11923. * @static
  11924. * @memberOf _
  11925. * @since 4.0.0
  11926. * @category Lang
  11927. * @param {*} value The value to check.
  11928. * @returns {boolean} Returns `true` if `value` is an array-like object,
  11929. * else `false`.
  11930. * @example
  11931. *
  11932. * _.isArrayLikeObject([1, 2, 3]);
  11933. * // => true
  11934. *
  11935. * _.isArrayLikeObject(document.body.children);
  11936. * // => true
  11937. *
  11938. * _.isArrayLikeObject('abc');
  11939. * // => false
  11940. *
  11941. * _.isArrayLikeObject(_.noop);
  11942. * // => false
  11943. */
  11944. function isArrayLikeObject(value) {
  11945. return isObjectLike(value) && isArrayLike(value);
  11946. }
  11947. /**
  11948. * Checks if `value` is classified as a boolean primitive or object.
  11949. *
  11950. * @static
  11951. * @memberOf _
  11952. * @since 0.1.0
  11953. * @category Lang
  11954. * @param {*} value The value to check.
  11955. * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
  11956. * @example
  11957. *
  11958. * _.isBoolean(false);
  11959. * // => true
  11960. *
  11961. * _.isBoolean(null);
  11962. * // => false
  11963. */
  11964. function isBoolean(value) {
  11965. return value === true || value === false ||
  11966. (isObjectLike(value) && baseGetTag(value) == boolTag);
  11967. }
  11968. /**
  11969. * Checks if `value` is a buffer.
  11970. *
  11971. * @static
  11972. * @memberOf _
  11973. * @since 4.3.0
  11974. * @category Lang
  11975. * @param {*} value The value to check.
  11976. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
  11977. * @example
  11978. *
  11979. * _.isBuffer(new Buffer(2));
  11980. * // => true
  11981. *
  11982. * _.isBuffer(new Uint8Array(2));
  11983. * // => false
  11984. */
  11985. var isBuffer = nativeIsBuffer || stubFalse;
  11986. /**
  11987. * Checks if `value` is classified as a `Date` object.
  11988. *
  11989. * @static
  11990. * @memberOf _
  11991. * @since 0.1.0
  11992. * @category Lang
  11993. * @param {*} value The value to check.
  11994. * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
  11995. * @example
  11996. *
  11997. * _.isDate(new Date);
  11998. * // => true
  11999. *
  12000. * _.isDate('Mon April 23 2012');
  12001. * // => false
  12002. */
  12003. var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
  12004. /**
  12005. * Checks if `value` is likely a DOM element.
  12006. *
  12007. * @static
  12008. * @memberOf _
  12009. * @since 0.1.0
  12010. * @category Lang
  12011. * @param {*} value The value to check.
  12012. * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
  12013. * @example
  12014. *
  12015. * _.isElement(document.body);
  12016. * // => true
  12017. *
  12018. * _.isElement('<body>');
  12019. * // => false
  12020. */
  12021. function isElement(value) {
  12022. return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
  12023. }
  12024. /**
  12025. * Checks if `value` is an empty object, collection, map, or set.
  12026. *
  12027. * Objects are considered empty if they have no own enumerable string keyed
  12028. * properties.
  12029. *
  12030. * Array-like values such as `arguments` objects, arrays, buffers, strings, or
  12031. * jQuery-like collections are considered empty if they have a `length` of `0`.
  12032. * Similarly, maps and sets are considered empty if they have a `size` of `0`.
  12033. *
  12034. * @static
  12035. * @memberOf _
  12036. * @since 0.1.0
  12037. * @category Lang
  12038. * @param {*} value The value to check.
  12039. * @returns {boolean} Returns `true` if `value` is empty, else `false`.
  12040. * @example
  12041. *
  12042. * _.isEmpty(null);
  12043. * // => true
  12044. *
  12045. * _.isEmpty(true);
  12046. * // => true
  12047. *
  12048. * _.isEmpty(1);
  12049. * // => true
  12050. *
  12051. * _.isEmpty([1, 2, 3]);
  12052. * // => false
  12053. *
  12054. * _.isEmpty({ 'a': 1 });
  12055. * // => false
  12056. */
  12057. function isEmpty(value) {
  12058. if (value == null) {
  12059. return true;
  12060. }
  12061. if (isArrayLike(value) &&
  12062. (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
  12063. isBuffer(value) || isTypedArray(value) || isArguments(value))) {
  12064. return !value.length;
  12065. }
  12066. var tag = getTag(value);
  12067. if (tag == mapTag || tag == setTag) {
  12068. return !value.size;
  12069. }
  12070. if (isPrototype(value)) {
  12071. return !baseKeys(value).length;
  12072. }
  12073. for (var key in value) {
  12074. if (hasOwnProperty.call(value, key)) {
  12075. return false;
  12076. }
  12077. }
  12078. return true;
  12079. }
  12080. /**
  12081. * Performs a deep comparison between two values to determine if they are
  12082. * equivalent.
  12083. *
  12084. * **Note:** This method supports comparing arrays, array buffers, booleans,
  12085. * date objects, error objects, maps, numbers, `Object` objects, regexes,
  12086. * sets, strings, symbols, and typed arrays. `Object` objects are compared
  12087. * by their own, not inherited, enumerable properties. Functions and DOM
  12088. * nodes are compared by strict equality, i.e. `===`.
  12089. *
  12090. * @static
  12091. * @memberOf _
  12092. * @since 0.1.0
  12093. * @category Lang
  12094. * @param {*} value The value to compare.
  12095. * @param {*} other The other value to compare.
  12096. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  12097. * @example
  12098. *
  12099. * var object = { 'a': 1 };
  12100. * var other = { 'a': 1 };
  12101. *
  12102. * _.isEqual(object, other);
  12103. * // => true
  12104. *
  12105. * object === other;
  12106. * // => false
  12107. */
  12108. function isEqual(value, other) {
  12109. return baseIsEqual(value, other);
  12110. }
  12111. /**
  12112. * This method is like `_.isEqual` except that it accepts `customizer` which
  12113. * is invoked to compare values. If `customizer` returns `undefined`, comparisons
  12114. * are handled by the method instead. The `customizer` is invoked with up to
  12115. * six arguments: (objValue, othValue [, index|key, object, other, stack]).
  12116. *
  12117. * @static
  12118. * @memberOf _
  12119. * @since 4.0.0
  12120. * @category Lang
  12121. * @param {*} value The value to compare.
  12122. * @param {*} other The other value to compare.
  12123. * @param {Function} [customizer] The function to customize comparisons.
  12124. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  12125. * @example
  12126. *
  12127. * function isGreeting(value) {
  12128. * return /^h(?:i|ello)$/.test(value);
  12129. * }
  12130. *
  12131. * function customizer(objValue, othValue) {
  12132. * if (isGreeting(objValue) && isGreeting(othValue)) {
  12133. * return true;
  12134. * }
  12135. * }
  12136. *
  12137. * var array = ['hello', 'goodbye'];
  12138. * var other = ['hi', 'goodbye'];
  12139. *
  12140. * _.isEqualWith(array, other, customizer);
  12141. * // => true
  12142. */
  12143. function isEqualWith(value, other, customizer) {
  12144. customizer = typeof customizer == 'function' ? customizer : undefined;
  12145. var result = customizer ? customizer(value, other) : undefined;
  12146. return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
  12147. }
  12148. /**
  12149. * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
  12150. * `SyntaxError`, `TypeError`, or `URIError` object.
  12151. *
  12152. * @static
  12153. * @memberOf _
  12154. * @since 3.0.0
  12155. * @category Lang
  12156. * @param {*} value The value to check.
  12157. * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
  12158. * @example
  12159. *
  12160. * _.isError(new Error);
  12161. * // => true
  12162. *
  12163. * _.isError(Error);
  12164. * // => false
  12165. */
  12166. function isError(value) {
  12167. if (!isObjectLike(value)) {
  12168. return false;
  12169. }
  12170. var tag = baseGetTag(value);
  12171. return tag == errorTag || tag == domExcTag ||
  12172. (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
  12173. }
  12174. /**
  12175. * Checks if `value` is a finite primitive number.
  12176. *
  12177. * **Note:** This method is based on
  12178. * [`Number.isFinite`](https://mdn.io/Number/isFinite).
  12179. *
  12180. * @static
  12181. * @memberOf _
  12182. * @since 0.1.0
  12183. * @category Lang
  12184. * @param {*} value The value to check.
  12185. * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
  12186. * @example
  12187. *
  12188. * _.isFinite(3);
  12189. * // => true
  12190. *
  12191. * _.isFinite(Number.MIN_VALUE);
  12192. * // => true
  12193. *
  12194. * _.isFinite(Infinity);
  12195. * // => false
  12196. *
  12197. * _.isFinite('3');
  12198. * // => false
  12199. */
  12200. function isFinite(value) {
  12201. return typeof value == 'number' && nativeIsFinite(value);
  12202. }
  12203. /**
  12204. * Checks if `value` is classified as a `Function` object.
  12205. *
  12206. * @static
  12207. * @memberOf _
  12208. * @since 0.1.0
  12209. * @category Lang
  12210. * @param {*} value The value to check.
  12211. * @returns {boolean} Returns `true` if `value` is a function, else `false`.
  12212. * @example
  12213. *
  12214. * _.isFunction(_);
  12215. * // => true
  12216. *
  12217. * _.isFunction(/abc/);
  12218. * // => false
  12219. */
  12220. function isFunction(value) {
  12221. if (!isObject(value)) {
  12222. return false;
  12223. }
  12224. // The use of `Object#toString` avoids issues with the `typeof` operator
  12225. // in Safari 9 which returns 'object' for typed arrays and other constructors.
  12226. var tag = baseGetTag(value);
  12227. return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
  12228. }
  12229. /**
  12230. * Checks if `value` is an integer.
  12231. *
  12232. * **Note:** This method is based on
  12233. * [`Number.isInteger`](https://mdn.io/Number/isInteger).
  12234. *
  12235. * @static
  12236. * @memberOf _
  12237. * @since 4.0.0
  12238. * @category Lang
  12239. * @param {*} value The value to check.
  12240. * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
  12241. * @example
  12242. *
  12243. * _.isInteger(3);
  12244. * // => true
  12245. *
  12246. * _.isInteger(Number.MIN_VALUE);
  12247. * // => false
  12248. *
  12249. * _.isInteger(Infinity);
  12250. * // => false
  12251. *
  12252. * _.isInteger('3');
  12253. * // => false
  12254. */
  12255. function isInteger(value) {
  12256. return typeof value == 'number' && value == toInteger(value);
  12257. }
  12258. /**
  12259. * Checks if `value` is a valid array-like length.
  12260. *
  12261. * **Note:** This method is loosely based on
  12262. * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
  12263. *
  12264. * @static
  12265. * @memberOf _
  12266. * @since 4.0.0
  12267. * @category Lang
  12268. * @param {*} value The value to check.
  12269. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  12270. * @example
  12271. *
  12272. * _.isLength(3);
  12273. * // => true
  12274. *
  12275. * _.isLength(Number.MIN_VALUE);
  12276. * // => false
  12277. *
  12278. * _.isLength(Infinity);
  12279. * // => false
  12280. *
  12281. * _.isLength('3');
  12282. * // => false
  12283. */
  12284. function isLength(value) {
  12285. return typeof value == 'number' &&
  12286. value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  12287. }
  12288. /**
  12289. * Checks if `value` is the
  12290. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  12291. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  12292. *
  12293. * @static
  12294. * @memberOf _
  12295. * @since 0.1.0
  12296. * @category Lang
  12297. * @param {*} value The value to check.
  12298. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  12299. * @example
  12300. *
  12301. * _.isObject({});
  12302. * // => true
  12303. *
  12304. * _.isObject([1, 2, 3]);
  12305. * // => true
  12306. *
  12307. * _.isObject(_.noop);
  12308. * // => true
  12309. *
  12310. * _.isObject(null);
  12311. * // => false
  12312. */
  12313. function isObject(value) {
  12314. var type = typeof value;
  12315. return value != null && (type == 'object' || type == 'function');
  12316. }
  12317. /**
  12318. * Checks if `value` is object-like. A value is object-like if it's not `null`
  12319. * and has a `typeof` result of "object".
  12320. *
  12321. * @static
  12322. * @memberOf _
  12323. * @since 4.0.0
  12324. * @category Lang
  12325. * @param {*} value The value to check.
  12326. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  12327. * @example
  12328. *
  12329. * _.isObjectLike({});
  12330. * // => true
  12331. *
  12332. * _.isObjectLike([1, 2, 3]);
  12333. * // => true
  12334. *
  12335. * _.isObjectLike(_.noop);
  12336. * // => false
  12337. *
  12338. * _.isObjectLike(null);
  12339. * // => false
  12340. */
  12341. function isObjectLike(value) {
  12342. return value != null && typeof value == 'object';
  12343. }
  12344. /**
  12345. * Checks if `value` is classified as a `Map` object.
  12346. *
  12347. * @static
  12348. * @memberOf _
  12349. * @since 4.3.0
  12350. * @category Lang
  12351. * @param {*} value The value to check.
  12352. * @returns {boolean} Returns `true` if `value` is a map, else `false`.
  12353. * @example
  12354. *
  12355. * _.isMap(new Map);
  12356. * // => true
  12357. *
  12358. * _.isMap(new WeakMap);
  12359. * // => false
  12360. */
  12361. var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
  12362. /**
  12363. * Performs a partial deep comparison between `object` and `source` to
  12364. * determine if `object` contains equivalent property values.
  12365. *
  12366. * **Note:** This method is equivalent to `_.matches` when `source` is
  12367. * partially applied.
  12368. *
  12369. * Partial comparisons will match empty array and empty object `source`
  12370. * values against any array or object value, respectively. See `_.isEqual`
  12371. * for a list of supported value comparisons.
  12372. *
  12373. * @static
  12374. * @memberOf _
  12375. * @since 3.0.0
  12376. * @category Lang
  12377. * @param {Object} object The object to inspect.
  12378. * @param {Object} source The object of property values to match.
  12379. * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  12380. * @example
  12381. *
  12382. * var object = { 'a': 1, 'b': 2 };
  12383. *
  12384. * _.isMatch(object, { 'b': 2 });
  12385. * // => true
  12386. *
  12387. * _.isMatch(object, { 'b': 1 });
  12388. * // => false
  12389. */
  12390. function isMatch(object, source) {
  12391. return object === source || baseIsMatch(object, source, getMatchData(source));
  12392. }
  12393. /**
  12394. * This method is like `_.isMatch` except that it accepts `customizer` which
  12395. * is invoked to compare values. If `customizer` returns `undefined`, comparisons
  12396. * are handled by the method instead. The `customizer` is invoked with five
  12397. * arguments: (objValue, srcValue, index|key, object, source).
  12398. *
  12399. * @static
  12400. * @memberOf _
  12401. * @since 4.0.0
  12402. * @category Lang
  12403. * @param {Object} object The object to inspect.
  12404. * @param {Object} source The object of property values to match.
  12405. * @param {Function} [customizer] The function to customize comparisons.
  12406. * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  12407. * @example
  12408. *
  12409. * function isGreeting(value) {
  12410. * return /^h(?:i|ello)$/.test(value);
  12411. * }
  12412. *
  12413. * function customizer(objValue, srcValue) {
  12414. * if (isGreeting(objValue) && isGreeting(srcValue)) {
  12415. * return true;
  12416. * }
  12417. * }
  12418. *
  12419. * var object = { 'greeting': 'hello' };
  12420. * var source = { 'greeting': 'hi' };
  12421. *
  12422. * _.isMatchWith(object, source, customizer);
  12423. * // => true
  12424. */
  12425. function isMatchWith(object, source, customizer) {
  12426. customizer = typeof customizer == 'function' ? customizer : undefined;
  12427. return baseIsMatch(object, source, getMatchData(source), customizer);
  12428. }
  12429. /**
  12430. * Checks if `value` is `NaN`.
  12431. *
  12432. * **Note:** This method is based on
  12433. * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
  12434. * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
  12435. * `undefined` and other non-number values.
  12436. *
  12437. * @static
  12438. * @memberOf _
  12439. * @since 0.1.0
  12440. * @category Lang
  12441. * @param {*} value The value to check.
  12442. * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
  12443. * @example
  12444. *
  12445. * _.isNaN(NaN);
  12446. * // => true
  12447. *
  12448. * _.isNaN(new Number(NaN));
  12449. * // => true
  12450. *
  12451. * isNaN(undefined);
  12452. * // => true
  12453. *
  12454. * _.isNaN(undefined);
  12455. * // => false
  12456. */
  12457. function isNaN(value) {
  12458. // An `NaN` primitive is the only value that is not equal to itself.
  12459. // Perform the `toStringTag` check first to avoid errors with some
  12460. // ActiveX objects in IE.
  12461. return isNumber(value) && value != +value;
  12462. }
  12463. /**
  12464. * Checks if `value` is a pristine native function.
  12465. *
  12466. * **Note:** This method can't reliably detect native functions in the presence
  12467. * of the core-js package because core-js circumvents this kind of detection.
  12468. * Despite multiple requests, the core-js maintainer has made it clear: any
  12469. * attempt to fix the detection will be obstructed. As a result, we're left
  12470. * with little choice but to throw an error. Unfortunately, this also affects
  12471. * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
  12472. * which rely on core-js.
  12473. *
  12474. * @static
  12475. * @memberOf _
  12476. * @since 3.0.0
  12477. * @category Lang
  12478. * @param {*} value The value to check.
  12479. * @returns {boolean} Returns `true` if `value` is a native function,
  12480. * else `false`.
  12481. * @example
  12482. *
  12483. * _.isNative(Array.prototype.push);
  12484. * // => true
  12485. *
  12486. * _.isNative(_);
  12487. * // => false
  12488. */
  12489. function isNative(value) {
  12490. if (isMaskable(value)) {
  12491. throw new Error(CORE_ERROR_TEXT);
  12492. }
  12493. return baseIsNative(value);
  12494. }
  12495. /**
  12496. * Checks if `value` is `null`.
  12497. *
  12498. * @static
  12499. * @memberOf _
  12500. * @since 0.1.0
  12501. * @category Lang
  12502. * @param {*} value The value to check.
  12503. * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
  12504. * @example
  12505. *
  12506. * _.isNull(null);
  12507. * // => true
  12508. *
  12509. * _.isNull(void 0);
  12510. * // => false
  12511. */
  12512. function isNull(value) {
  12513. return value === null;
  12514. }
  12515. /**
  12516. * Checks if `value` is `null` or `undefined`.
  12517. *
  12518. * @static
  12519. * @memberOf _
  12520. * @since 4.0.0
  12521. * @category Lang
  12522. * @param {*} value The value to check.
  12523. * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
  12524. * @example
  12525. *
  12526. * _.isNil(null);
  12527. * // => true
  12528. *
  12529. * _.isNil(void 0);
  12530. * // => true
  12531. *
  12532. * _.isNil(NaN);
  12533. * // => false
  12534. */
  12535. function isNil(value) {
  12536. return value == null;
  12537. }
  12538. /**
  12539. * Checks if `value` is classified as a `Number` primitive or object.
  12540. *
  12541. * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
  12542. * classified as numbers, use the `_.isFinite` method.
  12543. *
  12544. * @static
  12545. * @memberOf _
  12546. * @since 0.1.0
  12547. * @category Lang
  12548. * @param {*} value The value to check.
  12549. * @returns {boolean} Returns `true` if `value` is a number, else `false`.
  12550. * @example
  12551. *
  12552. * _.isNumber(3);
  12553. * // => true
  12554. *
  12555. * _.isNumber(Number.MIN_VALUE);
  12556. * // => true
  12557. *
  12558. * _.isNumber(Infinity);
  12559. * // => true
  12560. *
  12561. * _.isNumber('3');
  12562. * // => false
  12563. */
  12564. function isNumber(value) {
  12565. return typeof value == 'number' ||
  12566. (isObjectLike(value) && baseGetTag(value) == numberTag);
  12567. }
  12568. /**
  12569. * Checks if `value` is a plain object, that is, an object created by the
  12570. * `Object` constructor or one with a `[[Prototype]]` of `null`.
  12571. *
  12572. * @static
  12573. * @memberOf _
  12574. * @since 0.8.0
  12575. * @category Lang
  12576. * @param {*} value The value to check.
  12577. * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
  12578. * @example
  12579. *
  12580. * function Foo() {
  12581. * this.a = 1;
  12582. * }
  12583. *
  12584. * _.isPlainObject(new Foo);
  12585. * // => false
  12586. *
  12587. * _.isPlainObject([1, 2, 3]);
  12588. * // => false
  12589. *
  12590. * _.isPlainObject({ 'x': 0, 'y': 0 });
  12591. * // => true
  12592. *
  12593. * _.isPlainObject(Object.create(null));
  12594. * // => true
  12595. */
  12596. function isPlainObject(value) {
  12597. if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
  12598. return false;
  12599. }
  12600. var proto = getPrototype(value);
  12601. if (proto === null) {
  12602. return true;
  12603. }
  12604. var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
  12605. return typeof Ctor == 'function' && Ctor instanceof Ctor &&
  12606. funcToString.call(Ctor) == objectCtorString;
  12607. }
  12608. /**
  12609. * Checks if `value` is classified as a `RegExp` object.
  12610. *
  12611. * @static
  12612. * @memberOf _
  12613. * @since 0.1.0
  12614. * @category Lang
  12615. * @param {*} value The value to check.
  12616. * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
  12617. * @example
  12618. *
  12619. * _.isRegExp(/abc/);
  12620. * // => true
  12621. *
  12622. * _.isRegExp('/abc/');
  12623. * // => false
  12624. */
  12625. var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
  12626. /**
  12627. * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
  12628. * double precision number which isn't the result of a rounded unsafe integer.
  12629. *
  12630. * **Note:** This method is based on
  12631. * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
  12632. *
  12633. * @static
  12634. * @memberOf _
  12635. * @since 4.0.0
  12636. * @category Lang
  12637. * @param {*} value The value to check.
  12638. * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
  12639. * @example
  12640. *
  12641. * _.isSafeInteger(3);
  12642. * // => true
  12643. *
  12644. * _.isSafeInteger(Number.MIN_VALUE);
  12645. * // => false
  12646. *
  12647. * _.isSafeInteger(Infinity);
  12648. * // => false
  12649. *
  12650. * _.isSafeInteger('3');
  12651. * // => false
  12652. */
  12653. function isSafeInteger(value) {
  12654. return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
  12655. }
  12656. /**
  12657. * Checks if `value` is classified as a `Set` object.
  12658. *
  12659. * @static
  12660. * @memberOf _
  12661. * @since 4.3.0
  12662. * @category Lang
  12663. * @param {*} value The value to check.
  12664. * @returns {boolean} Returns `true` if `value` is a set, else `false`.
  12665. * @example
  12666. *
  12667. * _.isSet(new Set);
  12668. * // => true
  12669. *
  12670. * _.isSet(new WeakSet);
  12671. * // => false
  12672. */
  12673. var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
  12674. /**
  12675. * Checks if `value` is classified as a `String` primitive or object.
  12676. *
  12677. * @static
  12678. * @since 0.1.0
  12679. * @memberOf _
  12680. * @category Lang
  12681. * @param {*} value The value to check.
  12682. * @returns {boolean} Returns `true` if `value` is a string, else `false`.
  12683. * @example
  12684. *
  12685. * _.isString('abc');
  12686. * // => true
  12687. *
  12688. * _.isString(1);
  12689. * // => false
  12690. */
  12691. function isString(value) {
  12692. return typeof value == 'string' ||
  12693. (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
  12694. }
  12695. /**
  12696. * Checks if `value` is classified as a `Symbol` primitive or object.
  12697. *
  12698. * @static
  12699. * @memberOf _
  12700. * @since 4.0.0
  12701. * @category Lang
  12702. * @param {*} value The value to check.
  12703. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  12704. * @example
  12705. *
  12706. * _.isSymbol(Symbol.iterator);
  12707. * // => true
  12708. *
  12709. * _.isSymbol('abc');
  12710. * // => false
  12711. */
  12712. function isSymbol(value) {
  12713. return typeof value == 'symbol' ||
  12714. (isObjectLike(value) && baseGetTag(value) == symbolTag);
  12715. }
  12716. /**
  12717. * Checks if `value` is classified as a typed array.
  12718. *
  12719. * @static
  12720. * @memberOf _
  12721. * @since 3.0.0
  12722. * @category Lang
  12723. * @param {*} value The value to check.
  12724. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  12725. * @example
  12726. *
  12727. * _.isTypedArray(new Uint8Array);
  12728. * // => true
  12729. *
  12730. * _.isTypedArray([]);
  12731. * // => false
  12732. */
  12733. var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
  12734. /**
  12735. * Checks if `value` is `undefined`.
  12736. *
  12737. * @static
  12738. * @since 0.1.0
  12739. * @memberOf _
  12740. * @category Lang
  12741. * @param {*} value The value to check.
  12742. * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
  12743. * @example
  12744. *
  12745. * _.isUndefined(void 0);
  12746. * // => true
  12747. *
  12748. * _.isUndefined(null);
  12749. * // => false
  12750. */
  12751. function isUndefined(value) {
  12752. return value === undefined;
  12753. }
  12754. /**
  12755. * Checks if `value` is classified as a `WeakMap` object.
  12756. *
  12757. * @static
  12758. * @memberOf _
  12759. * @since 4.3.0
  12760. * @category Lang
  12761. * @param {*} value The value to check.
  12762. * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
  12763. * @example
  12764. *
  12765. * _.isWeakMap(new WeakMap);
  12766. * // => true
  12767. *
  12768. * _.isWeakMap(new Map);
  12769. * // => false
  12770. */
  12771. function isWeakMap(value) {
  12772. return isObjectLike(value) && getTag(value) == weakMapTag;
  12773. }
  12774. /**
  12775. * Checks if `value` is classified as a `WeakSet` object.
  12776. *
  12777. * @static
  12778. * @memberOf _
  12779. * @since 4.3.0
  12780. * @category Lang
  12781. * @param {*} value The value to check.
  12782. * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.
  12783. * @example
  12784. *
  12785. * _.isWeakSet(new WeakSet);
  12786. * // => true
  12787. *
  12788. * _.isWeakSet(new Set);
  12789. * // => false
  12790. */
  12791. function isWeakSet(value) {
  12792. return isObjectLike(value) && baseGetTag(value) == weakSetTag;
  12793. }
  12794. /**
  12795. * Checks if `value` is less than `other`.
  12796. *
  12797. * @static
  12798. * @memberOf _
  12799. * @since 3.9.0
  12800. * @category Lang
  12801. * @param {*} value The value to compare.
  12802. * @param {*} other The other value to compare.
  12803. * @returns {boolean} Returns `true` if `value` is less than `other`,
  12804. * else `false`.
  12805. * @see _.gt
  12806. * @example
  12807. *
  12808. * _.lt(1, 3);
  12809. * // => true
  12810. *
  12811. * _.lt(3, 3);
  12812. * // => false
  12813. *
  12814. * _.lt(3, 1);
  12815. * // => false
  12816. */
  12817. var lt = createRelationalOperation(baseLt);
  12818. /**
  12819. * Checks if `value` is less than or equal to `other`.
  12820. *
  12821. * @static
  12822. * @memberOf _
  12823. * @since 3.9.0
  12824. * @category Lang
  12825. * @param {*} value The value to compare.
  12826. * @param {*} other The other value to compare.
  12827. * @returns {boolean} Returns `true` if `value` is less than or equal to
  12828. * `other`, else `false`.
  12829. * @see _.gte
  12830. * @example
  12831. *
  12832. * _.lte(1, 3);
  12833. * // => true
  12834. *
  12835. * _.lte(3, 3);
  12836. * // => true
  12837. *
  12838. * _.lte(3, 1);
  12839. * // => false
  12840. */
  12841. var lte = createRelationalOperation(function(value, other) {
  12842. return value <= other;
  12843. });
  12844. /**
  12845. * Converts `value` to an array.
  12846. *
  12847. * @static
  12848. * @since 0.1.0
  12849. * @memberOf _
  12850. * @category Lang
  12851. * @param {*} value The value to convert.
  12852. * @returns {Array} Returns the converted array.
  12853. * @example
  12854. *
  12855. * _.toArray({ 'a': 1, 'b': 2 });
  12856. * // => [1, 2]
  12857. *
  12858. * _.toArray('abc');
  12859. * // => ['a', 'b', 'c']
  12860. *
  12861. * _.toArray(1);
  12862. * // => []
  12863. *
  12864. * _.toArray(null);
  12865. * // => []
  12866. */
  12867. function toArray(value) {
  12868. if (!value) {
  12869. return [];
  12870. }
  12871. if (isArrayLike(value)) {
  12872. return isString(value) ? stringToArray(value) : copyArray(value);
  12873. }
  12874. if (symIterator && value[symIterator]) {
  12875. return iteratorToArray(value[symIterator]());
  12876. }
  12877. var tag = getTag(value),
  12878. func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
  12879. return func(value);
  12880. }
  12881. /**
  12882. * Converts `value` to a finite number.
  12883. *
  12884. * @static
  12885. * @memberOf _
  12886. * @since 4.12.0
  12887. * @category Lang
  12888. * @param {*} value The value to convert.
  12889. * @returns {number} Returns the converted number.
  12890. * @example
  12891. *
  12892. * _.toFinite(3.2);
  12893. * // => 3.2
  12894. *
  12895. * _.toFinite(Number.MIN_VALUE);
  12896. * // => 5e-324
  12897. *
  12898. * _.toFinite(Infinity);
  12899. * // => 1.7976931348623157e+308
  12900. *
  12901. * _.toFinite('3.2');
  12902. * // => 3.2
  12903. */
  12904. function toFinite(value) {
  12905. if (!value) {
  12906. return value === 0 ? value : 0;
  12907. }
  12908. value = toNumber(value);
  12909. if (value === INFINITY || value === -INFINITY) {
  12910. var sign = (value < 0 ? -1 : 1);
  12911. return sign * MAX_INTEGER;
  12912. }
  12913. return value === value ? value : 0;
  12914. }
  12915. /**
  12916. * Converts `value` to an integer.
  12917. *
  12918. * **Note:** This method is loosely based on
  12919. * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
  12920. *
  12921. * @static
  12922. * @memberOf _
  12923. * @since 4.0.0
  12924. * @category Lang
  12925. * @param {*} value The value to convert.
  12926. * @returns {number} Returns the converted integer.
  12927. * @example
  12928. *
  12929. * _.toInteger(3.2);
  12930. * // => 3
  12931. *
  12932. * _.toInteger(Number.MIN_VALUE);
  12933. * // => 0
  12934. *
  12935. * _.toInteger(Infinity);
  12936. * // => 1.7976931348623157e+308
  12937. *
  12938. * _.toInteger('3.2');
  12939. * // => 3
  12940. */
  12941. function toInteger(value) {
  12942. var result = toFinite(value),
  12943. remainder = result % 1;
  12944. return result === result ? (remainder ? result - remainder : result) : 0;
  12945. }
  12946. /**
  12947. * Converts `value` to an integer suitable for use as the length of an
  12948. * array-like object.
  12949. *
  12950. * **Note:** This method is based on
  12951. * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
  12952. *
  12953. * @static
  12954. * @memberOf _
  12955. * @since 4.0.0
  12956. * @category Lang
  12957. * @param {*} value The value to convert.
  12958. * @returns {number} Returns the converted integer.
  12959. * @example
  12960. *
  12961. * _.toLength(3.2);
  12962. * // => 3
  12963. *
  12964. * _.toLength(Number.MIN_VALUE);
  12965. * // => 0
  12966. *
  12967. * _.toLength(Infinity);
  12968. * // => 4294967295
  12969. *
  12970. * _.toLength('3.2');
  12971. * // => 3
  12972. */
  12973. function toLength(value) {
  12974. return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
  12975. }
  12976. /**
  12977. * Converts `value` to a number.
  12978. *
  12979. * @static
  12980. * @memberOf _
  12981. * @since 4.0.0
  12982. * @category Lang
  12983. * @param {*} value The value to process.
  12984. * @returns {number} Returns the number.
  12985. * @example
  12986. *
  12987. * _.toNumber(3.2);
  12988. * // => 3.2
  12989. *
  12990. * _.toNumber(Number.MIN_VALUE);
  12991. * // => 5e-324
  12992. *
  12993. * _.toNumber(Infinity);
  12994. * // => Infinity
  12995. *
  12996. * _.toNumber('3.2');
  12997. * // => 3.2
  12998. */
  12999. function toNumber(value) {
  13000. if (typeof value == 'number') {
  13001. return value;
  13002. }
  13003. if (isSymbol(value)) {
  13004. return NAN;
  13005. }
  13006. if (isObject(value)) {
  13007. var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
  13008. value = isObject(other) ? (other + '') : other;
  13009. }
  13010. if (typeof value != 'string') {
  13011. return value === 0 ? value : +value;
  13012. }
  13013. value = baseTrim(value);
  13014. var isBinary = reIsBinary.test(value);
  13015. return (isBinary || reIsOctal.test(value))
  13016. ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
  13017. : (reIsBadHex.test(value) ? NAN : +value);
  13018. }
  13019. /**
  13020. * Converts `value` to a plain object flattening inherited enumerable string
  13021. * keyed properties of `value` to own properties of the plain object.
  13022. *
  13023. * @static
  13024. * @memberOf _
  13025. * @since 3.0.0
  13026. * @category Lang
  13027. * @param {*} value The value to convert.
  13028. * @returns {Object} Returns the converted plain object.
  13029. * @example
  13030. *
  13031. * function Foo() {
  13032. * this.b = 2;
  13033. * }
  13034. *
  13035. * Foo.prototype.c = 3;
  13036. *
  13037. * _.assign({ 'a': 1 }, new Foo);
  13038. * // => { 'a': 1, 'b': 2 }
  13039. *
  13040. * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
  13041. * // => { 'a': 1, 'b': 2, 'c': 3 }
  13042. */
  13043. function toPlainObject(value) {
  13044. return copyObject(value, keysIn(value));
  13045. }
  13046. /**
  13047. * Converts `value` to a safe integer. A safe integer can be compared and
  13048. * represented correctly.
  13049. *
  13050. * @static
  13051. * @memberOf _
  13052. * @since 4.0.0
  13053. * @category Lang
  13054. * @param {*} value The value to convert.
  13055. * @returns {number} Returns the converted integer.
  13056. * @example
  13057. *
  13058. * _.toSafeInteger(3.2);
  13059. * // => 3
  13060. *
  13061. * _.toSafeInteger(Number.MIN_VALUE);
  13062. * // => 0
  13063. *
  13064. * _.toSafeInteger(Infinity);
  13065. * // => 9007199254740991
  13066. *
  13067. * _.toSafeInteger('3.2');
  13068. * // => 3
  13069. */
  13070. function toSafeInteger(value) {
  13071. return value
  13072. ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
  13073. : (value === 0 ? value : 0);
  13074. }
  13075. /**
  13076. * Converts `value` to a string. An empty string is returned for `null`
  13077. * and `undefined` values. The sign of `-0` is preserved.
  13078. *
  13079. * @static
  13080. * @memberOf _
  13081. * @since 4.0.0
  13082. * @category Lang
  13083. * @param {*} value The value to convert.
  13084. * @returns {string} Returns the converted string.
  13085. * @example
  13086. *
  13087. * _.toString(null);
  13088. * // => ''
  13089. *
  13090. * _.toString(-0);
  13091. * // => '-0'
  13092. *
  13093. * _.toString([1, 2, 3]);
  13094. * // => '1,2,3'
  13095. */
  13096. function toString(value) {
  13097. return value == null ? '' : baseToString(value);
  13098. }
  13099. /*------------------------------------------------------------------------*/
  13100. /**
  13101. * Assigns own enumerable string keyed properties of source objects to the
  13102. * destination object. Source objects are applied from left to right.
  13103. * Subsequent sources overwrite property assignments of previous sources.
  13104. *
  13105. * **Note:** This method mutates `object` and is loosely based on
  13106. * [`Object.assign`](https://mdn.io/Object/assign).
  13107. *
  13108. * @static
  13109. * @memberOf _
  13110. * @since 0.10.0
  13111. * @category Object
  13112. * @param {Object} object The destination object.
  13113. * @param {...Object} [sources] The source objects.
  13114. * @returns {Object} Returns `object`.
  13115. * @see _.assignIn
  13116. * @example
  13117. *
  13118. * function Foo() {
  13119. * this.a = 1;
  13120. * }
  13121. *
  13122. * function Bar() {
  13123. * this.c = 3;
  13124. * }
  13125. *
  13126. * Foo.prototype.b = 2;
  13127. * Bar.prototype.d = 4;
  13128. *
  13129. * _.assign({ 'a': 0 }, new Foo, new Bar);
  13130. * // => { 'a': 1, 'c': 3 }
  13131. */
  13132. var assign = createAssigner(function(object, source) {
  13133. if (isPrototype(source) || isArrayLike(source)) {
  13134. copyObject(source, keys(source), object);
  13135. return;
  13136. }
  13137. for (var key in source) {
  13138. if (hasOwnProperty.call(source, key)) {
  13139. assignValue(object, key, source[key]);
  13140. }
  13141. }
  13142. });
  13143. /**
  13144. * This method is like `_.assign` except that it iterates over own and
  13145. * inherited source properties.
  13146. *
  13147. * **Note:** This method mutates `object`.
  13148. *
  13149. * @static
  13150. * @memberOf _
  13151. * @since 4.0.0
  13152. * @alias extend
  13153. * @category Object
  13154. * @param {Object} object The destination object.
  13155. * @param {...Object} [sources] The source objects.
  13156. * @returns {Object} Returns `object`.
  13157. * @see _.assign
  13158. * @example
  13159. *
  13160. * function Foo() {
  13161. * this.a = 1;
  13162. * }
  13163. *
  13164. * function Bar() {
  13165. * this.c = 3;
  13166. * }
  13167. *
  13168. * Foo.prototype.b = 2;
  13169. * Bar.prototype.d = 4;
  13170. *
  13171. * _.assignIn({ 'a': 0 }, new Foo, new Bar);
  13172. * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
  13173. */
  13174. var assignIn = createAssigner(function(object, source) {
  13175. copyObject(source, keysIn(source), object);
  13176. });
  13177. /**
  13178. * This method is like `_.assignIn` except that it accepts `customizer`
  13179. * which is invoked to produce the assigned values. If `customizer` returns
  13180. * `undefined`, assignment is handled by the method instead. The `customizer`
  13181. * is invoked with five arguments: (objValue, srcValue, key, object, source).
  13182. *
  13183. * **Note:** This method mutates `object`.
  13184. *
  13185. * @static
  13186. * @memberOf _
  13187. * @since 4.0.0
  13188. * @alias extendWith
  13189. * @category Object
  13190. * @param {Object} object The destination object.
  13191. * @param {...Object} sources The source objects.
  13192. * @param {Function} [customizer] The function to customize assigned values.
  13193. * @returns {Object} Returns `object`.
  13194. * @see _.assignWith
  13195. * @example
  13196. *
  13197. * function customizer(objValue, srcValue) {
  13198. * return _.isUndefined(objValue) ? srcValue : objValue;
  13199. * }
  13200. *
  13201. * var defaults = _.partialRight(_.assignInWith, customizer);
  13202. *
  13203. * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
  13204. * // => { 'a': 1, 'b': 2 }
  13205. */
  13206. var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
  13207. copyObject(source, keysIn(source), object, customizer);
  13208. });
  13209. /**
  13210. * This method is like `_.assign` except that it accepts `customizer`
  13211. * which is invoked to produce the assigned values. If `customizer` returns
  13212. * `undefined`, assignment is handled by the method instead. The `customizer`
  13213. * is invoked with five arguments: (objValue, srcValue, key, object, source).
  13214. *
  13215. * **Note:** This method mutates `object`.
  13216. *
  13217. * @static
  13218. * @memberOf _
  13219. * @since 4.0.0
  13220. * @category Object
  13221. * @param {Object} object The destination object.
  13222. * @param {...Object} sources The source objects.
  13223. * @param {Function} [customizer] The function to customize assigned values.
  13224. * @returns {Object} Returns `object`.
  13225. * @see _.assignInWith
  13226. * @example
  13227. *
  13228. * function customizer(objValue, srcValue) {
  13229. * return _.isUndefined(objValue) ? srcValue : objValue;
  13230. * }
  13231. *
  13232. * var defaults = _.partialRight(_.assignWith, customizer);
  13233. *
  13234. * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
  13235. * // => { 'a': 1, 'b': 2 }
  13236. */
  13237. var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
  13238. copyObject(source, keys(source), object, customizer);
  13239. });
  13240. /**
  13241. * Creates an array of values corresponding to `paths` of `object`.
  13242. *
  13243. * @static
  13244. * @memberOf _
  13245. * @since 1.0.0
  13246. * @category Object
  13247. * @param {Object} object The object to iterate over.
  13248. * @param {...(string|string[])} [paths] The property paths to pick.
  13249. * @returns {Array} Returns the picked values.
  13250. * @example
  13251. *
  13252. * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
  13253. *
  13254. * _.at(object, ['a[0].b.c', 'a[1]']);
  13255. * // => [3, 4]
  13256. */
  13257. var at = flatRest(baseAt);
  13258. /**
  13259. * Creates an object that inherits from the `prototype` object. If a
  13260. * `properties` object is given, its own enumerable string keyed properties
  13261. * are assigned to the created object.
  13262. *
  13263. * @static
  13264. * @memberOf _
  13265. * @since 2.3.0
  13266. * @category Object
  13267. * @param {Object} prototype The object to inherit from.
  13268. * @param {Object} [properties] The properties to assign to the object.
  13269. * @returns {Object} Returns the new object.
  13270. * @example
  13271. *
  13272. * function Shape() {
  13273. * this.x = 0;
  13274. * this.y = 0;
  13275. * }
  13276. *
  13277. * function Circle() {
  13278. * Shape.call(this);
  13279. * }
  13280. *
  13281. * Circle.prototype = _.create(Shape.prototype, {
  13282. * 'constructor': Circle
  13283. * });
  13284. *
  13285. * var circle = new Circle;
  13286. * circle instanceof Circle;
  13287. * // => true
  13288. *
  13289. * circle instanceof Shape;
  13290. * // => true
  13291. */
  13292. function create(prototype, properties) {
  13293. var result = baseCreate(prototype);
  13294. return properties == null ? result : baseAssign(result, properties);
  13295. }
  13296. /**
  13297. * Assigns own and inherited enumerable string keyed properties of source
  13298. * objects to the destination object for all destination properties that
  13299. * resolve to `undefined`. Source objects are applied from left to right.
  13300. * Once a property is set, additional values of the same property are ignored.
  13301. *
  13302. * **Note:** This method mutates `object`.
  13303. *
  13304. * @static
  13305. * @since 0.1.0
  13306. * @memberOf _
  13307. * @category Object
  13308. * @param {Object} object The destination object.
  13309. * @param {...Object} [sources] The source objects.
  13310. * @returns {Object} Returns `object`.
  13311. * @see _.defaultsDeep
  13312. * @example
  13313. *
  13314. * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
  13315. * // => { 'a': 1, 'b': 2 }
  13316. */
  13317. var defaults = baseRest(function(object, sources) {
  13318. object = Object(object);
  13319. var index = -1;
  13320. var length = sources.length;
  13321. var guard = length > 2 ? sources[2] : undefined;
  13322. if (guard && isIterateeCall(sources[0], sources[1], guard)) {
  13323. length = 1;
  13324. }
  13325. while (++index < length) {
  13326. var source = sources[index];
  13327. var props = keysIn(source);
  13328. var propsIndex = -1;
  13329. var propsLength = props.length;
  13330. while (++propsIndex < propsLength) {
  13331. var key = props[propsIndex];
  13332. var value = object[key];
  13333. if (value === undefined ||
  13334. (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
  13335. object[key] = source[key];
  13336. }
  13337. }
  13338. }
  13339. return object;
  13340. });
  13341. /**
  13342. * This method is like `_.defaults` except that it recursively assigns
  13343. * default properties.
  13344. *
  13345. * **Note:** This method mutates `object`.
  13346. *
  13347. * @static
  13348. * @memberOf _
  13349. * @since 3.10.0
  13350. * @category Object
  13351. * @param {Object} object The destination object.
  13352. * @param {...Object} [sources] The source objects.
  13353. * @returns {Object} Returns `object`.
  13354. * @see _.defaults
  13355. * @example
  13356. *
  13357. * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });
  13358. * // => { 'a': { 'b': 2, 'c': 3 } }
  13359. */
  13360. var defaultsDeep = baseRest(function(args) {
  13361. args.push(undefined, customDefaultsMerge);
  13362. return apply(mergeWith, undefined, args);
  13363. });
  13364. /**
  13365. * This method is like `_.find` except that it returns the key of the first
  13366. * element `predicate` returns truthy for instead of the element itself.
  13367. *
  13368. * @static
  13369. * @memberOf _
  13370. * @since 1.1.0
  13371. * @category Object
  13372. * @param {Object} object The object to inspect.
  13373. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  13374. * @returns {string|undefined} Returns the key of the matched element,
  13375. * else `undefined`.
  13376. * @example
  13377. *
  13378. * var users = {
  13379. * 'barney': { 'age': 36, 'active': true },
  13380. * 'fred': { 'age': 40, 'active': false },
  13381. * 'pebbles': { 'age': 1, 'active': true }
  13382. * };
  13383. *
  13384. * _.findKey(users, function(o) { return o.age < 40; });
  13385. * // => 'barney' (iteration order is not guaranteed)
  13386. *
  13387. * // The `_.matches` iteratee shorthand.
  13388. * _.findKey(users, { 'age': 1, 'active': true });
  13389. * // => 'pebbles'
  13390. *
  13391. * // The `_.matchesProperty` iteratee shorthand.
  13392. * _.findKey(users, ['active', false]);
  13393. * // => 'fred'
  13394. *
  13395. * // The `_.property` iteratee shorthand.
  13396. * _.findKey(users, 'active');
  13397. * // => 'barney'
  13398. */
  13399. function findKey(object, predicate) {
  13400. return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
  13401. }
  13402. /**
  13403. * This method is like `_.findKey` except that it iterates over elements of
  13404. * a collection in the opposite order.
  13405. *
  13406. * @static
  13407. * @memberOf _
  13408. * @since 2.0.0
  13409. * @category Object
  13410. * @param {Object} object The object to inspect.
  13411. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  13412. * @returns {string|undefined} Returns the key of the matched element,
  13413. * else `undefined`.
  13414. * @example
  13415. *
  13416. * var users = {
  13417. * 'barney': { 'age': 36, 'active': true },
  13418. * 'fred': { 'age': 40, 'active': false },
  13419. * 'pebbles': { 'age': 1, 'active': true }
  13420. * };
  13421. *
  13422. * _.findLastKey(users, function(o) { return o.age < 40; });
  13423. * // => returns 'pebbles' assuming `_.findKey` returns 'barney'
  13424. *
  13425. * // The `_.matches` iteratee shorthand.
  13426. * _.findLastKey(users, { 'age': 36, 'active': true });
  13427. * // => 'barney'
  13428. *
  13429. * // The `_.matchesProperty` iteratee shorthand.
  13430. * _.findLastKey(users, ['active', false]);
  13431. * // => 'fred'
  13432. *
  13433. * // The `_.property` iteratee shorthand.
  13434. * _.findLastKey(users, 'active');
  13435. * // => 'pebbles'
  13436. */
  13437. function findLastKey(object, predicate) {
  13438. return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
  13439. }
  13440. /**
  13441. * Iterates over own and inherited enumerable string keyed properties of an
  13442. * object and invokes `iteratee` for each property. The iteratee is invoked
  13443. * with three arguments: (value, key, object). Iteratee functions may exit
  13444. * iteration early by explicitly returning `false`.
  13445. *
  13446. * @static
  13447. * @memberOf _
  13448. * @since 0.3.0
  13449. * @category Object
  13450. * @param {Object} object The object to iterate over.
  13451. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  13452. * @returns {Object} Returns `object`.
  13453. * @see _.forInRight
  13454. * @example
  13455. *
  13456. * function Foo() {
  13457. * this.a = 1;
  13458. * this.b = 2;
  13459. * }
  13460. *
  13461. * Foo.prototype.c = 3;
  13462. *
  13463. * _.forIn(new Foo, function(value, key) {
  13464. * console.log(key);
  13465. * });
  13466. * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
  13467. */
  13468. function forIn(object, iteratee) {
  13469. return object == null
  13470. ? object
  13471. : baseFor(object, getIteratee(iteratee, 3), keysIn);
  13472. }
  13473. /**
  13474. * This method is like `_.forIn` except that it iterates over properties of
  13475. * `object` in the opposite order.
  13476. *
  13477. * @static
  13478. * @memberOf _
  13479. * @since 2.0.0
  13480. * @category Object
  13481. * @param {Object} object The object to iterate over.
  13482. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  13483. * @returns {Object} Returns `object`.
  13484. * @see _.forIn
  13485. * @example
  13486. *
  13487. * function Foo() {
  13488. * this.a = 1;
  13489. * this.b = 2;
  13490. * }
  13491. *
  13492. * Foo.prototype.c = 3;
  13493. *
  13494. * _.forInRight(new Foo, function(value, key) {
  13495. * console.log(key);
  13496. * });
  13497. * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
  13498. */
  13499. function forInRight(object, iteratee) {
  13500. return object == null
  13501. ? object
  13502. : baseForRight(object, getIteratee(iteratee, 3), keysIn);
  13503. }
  13504. /**
  13505. * Iterates over own enumerable string keyed properties of an object and
  13506. * invokes `iteratee` for each property. The iteratee is invoked with three
  13507. * arguments: (value, key, object). Iteratee functions may exit iteration
  13508. * early by explicitly returning `false`.
  13509. *
  13510. * @static
  13511. * @memberOf _
  13512. * @since 0.3.0
  13513. * @category Object
  13514. * @param {Object} object The object to iterate over.
  13515. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  13516. * @returns {Object} Returns `object`.
  13517. * @see _.forOwnRight
  13518. * @example
  13519. *
  13520. * function Foo() {
  13521. * this.a = 1;
  13522. * this.b = 2;
  13523. * }
  13524. *
  13525. * Foo.prototype.c = 3;
  13526. *
  13527. * _.forOwn(new Foo, function(value, key) {
  13528. * console.log(key);
  13529. * });
  13530. * // => Logs 'a' then 'b' (iteration order is not guaranteed).
  13531. */
  13532. function forOwn(object, iteratee) {
  13533. return object && baseForOwn(object, getIteratee(iteratee, 3));
  13534. }
  13535. /**
  13536. * This method is like `_.forOwn` except that it iterates over properties of
  13537. * `object` in the opposite order.
  13538. *
  13539. * @static
  13540. * @memberOf _
  13541. * @since 2.0.0
  13542. * @category Object
  13543. * @param {Object} object The object to iterate over.
  13544. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  13545. * @returns {Object} Returns `object`.
  13546. * @see _.forOwn
  13547. * @example
  13548. *
  13549. * function Foo() {
  13550. * this.a = 1;
  13551. * this.b = 2;
  13552. * }
  13553. *
  13554. * Foo.prototype.c = 3;
  13555. *
  13556. * _.forOwnRight(new Foo, function(value, key) {
  13557. * console.log(key);
  13558. * });
  13559. * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
  13560. */
  13561. function forOwnRight(object, iteratee) {
  13562. return object && baseForOwnRight(object, getIteratee(iteratee, 3));
  13563. }
  13564. /**
  13565. * Creates an array of function property names from own enumerable properties
  13566. * of `object`.
  13567. *
  13568. * @static
  13569. * @since 0.1.0
  13570. * @memberOf _
  13571. * @category Object
  13572. * @param {Object} object The object to inspect.
  13573. * @returns {Array} Returns the function names.
  13574. * @see _.functionsIn
  13575. * @example
  13576. *
  13577. * function Foo() {
  13578. * this.a = _.constant('a');
  13579. * this.b = _.constant('b');
  13580. * }
  13581. *
  13582. * Foo.prototype.c = _.constant('c');
  13583. *
  13584. * _.functions(new Foo);
  13585. * // => ['a', 'b']
  13586. */
  13587. function functions(object) {
  13588. return object == null ? [] : baseFunctions(object, keys(object));
  13589. }
  13590. /**
  13591. * Creates an array of function property names from own and inherited
  13592. * enumerable properties of `object`.
  13593. *
  13594. * @static
  13595. * @memberOf _
  13596. * @since 4.0.0
  13597. * @category Object
  13598. * @param {Object} object The object to inspect.
  13599. * @returns {Array} Returns the function names.
  13600. * @see _.functions
  13601. * @example
  13602. *
  13603. * function Foo() {
  13604. * this.a = _.constant('a');
  13605. * this.b = _.constant('b');
  13606. * }
  13607. *
  13608. * Foo.prototype.c = _.constant('c');
  13609. *
  13610. * _.functionsIn(new Foo);
  13611. * // => ['a', 'b', 'c']
  13612. */
  13613. function functionsIn(object) {
  13614. return object == null ? [] : baseFunctions(object, keysIn(object));
  13615. }
  13616. /**
  13617. * Gets the value at `path` of `object`. If the resolved value is
  13618. * `undefined`, the `defaultValue` is returned in its place.
  13619. *
  13620. * @static
  13621. * @memberOf _
  13622. * @since 3.7.0
  13623. * @category Object
  13624. * @param {Object} object The object to query.
  13625. * @param {Array|string} path The path of the property to get.
  13626. * @param {*} [defaultValue] The value returned for `undefined` resolved values.
  13627. * @returns {*} Returns the resolved value.
  13628. * @example
  13629. *
  13630. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  13631. *
  13632. * _.get(object, 'a[0].b.c');
  13633. * // => 3
  13634. *
  13635. * _.get(object, ['a', '0', 'b', 'c']);
  13636. * // => 3
  13637. *
  13638. * _.get(object, 'a.b.c', 'default');
  13639. * // => 'default'
  13640. */
  13641. function get(object, path, defaultValue) {
  13642. var result = object == null ? undefined : baseGet(object, path);
  13643. return result === undefined ? defaultValue : result;
  13644. }
  13645. /**
  13646. * Checks if `path` is a direct property of `object`.
  13647. *
  13648. * @static
  13649. * @since 0.1.0
  13650. * @memberOf _
  13651. * @category Object
  13652. * @param {Object} object The object to query.
  13653. * @param {Array|string} path The path to check.
  13654. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  13655. * @example
  13656. *
  13657. * var object = { 'a': { 'b': 2 } };
  13658. * var other = _.create({ 'a': _.create({ 'b': 2 }) });
  13659. *
  13660. * _.has(object, 'a');
  13661. * // => true
  13662. *
  13663. * _.has(object, 'a.b');
  13664. * // => true
  13665. *
  13666. * _.has(object, ['a', 'b']);
  13667. * // => true
  13668. *
  13669. * _.has(other, 'a');
  13670. * // => false
  13671. */
  13672. function has(object, path) {
  13673. return object != null && hasPath(object, path, baseHas);
  13674. }
  13675. /**
  13676. * Checks if `path` is a direct or inherited property of `object`.
  13677. *
  13678. * @static
  13679. * @memberOf _
  13680. * @since 4.0.0
  13681. * @category Object
  13682. * @param {Object} object The object to query.
  13683. * @param {Array|string} path The path to check.
  13684. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  13685. * @example
  13686. *
  13687. * var object = _.create({ 'a': _.create({ 'b': 2 }) });
  13688. *
  13689. * _.hasIn(object, 'a');
  13690. * // => true
  13691. *
  13692. * _.hasIn(object, 'a.b');
  13693. * // => true
  13694. *
  13695. * _.hasIn(object, ['a', 'b']);
  13696. * // => true
  13697. *
  13698. * _.hasIn(object, 'b');
  13699. * // => false
  13700. */
  13701. function hasIn(object, path) {
  13702. return object != null && hasPath(object, path, baseHasIn);
  13703. }
  13704. /**
  13705. * Creates an object composed of the inverted keys and values of `object`.
  13706. * If `object` contains duplicate values, subsequent values overwrite
  13707. * property assignments of previous values.
  13708. *
  13709. * @static
  13710. * @memberOf _
  13711. * @since 0.7.0
  13712. * @category Object
  13713. * @param {Object} object The object to invert.
  13714. * @returns {Object} Returns the new inverted object.
  13715. * @example
  13716. *
  13717. * var object = { 'a': 1, 'b': 2, 'c': 1 };
  13718. *
  13719. * _.invert(object);
  13720. * // => { '1': 'c', '2': 'b' }
  13721. */
  13722. var invert = createInverter(function(result, value, key) {
  13723. if (value != null &&
  13724. typeof value.toString != 'function') {
  13725. value = nativeObjectToString.call(value);
  13726. }
  13727. result[value] = key;
  13728. }, constant(identity));
  13729. /**
  13730. * This method is like `_.invert` except that the inverted object is generated
  13731. * from the results of running each element of `object` thru `iteratee`. The
  13732. * corresponding inverted value of each inverted key is an array of keys
  13733. * responsible for generating the inverted value. The iteratee is invoked
  13734. * with one argument: (value).
  13735. *
  13736. * @static
  13737. * @memberOf _
  13738. * @since 4.1.0
  13739. * @category Object
  13740. * @param {Object} object The object to invert.
  13741. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  13742. * @returns {Object} Returns the new inverted object.
  13743. * @example
  13744. *
  13745. * var object = { 'a': 1, 'b': 2, 'c': 1 };
  13746. *
  13747. * _.invertBy(object);
  13748. * // => { '1': ['a', 'c'], '2': ['b'] }
  13749. *
  13750. * _.invertBy(object, function(value) {
  13751. * return 'group' + value;
  13752. * });
  13753. * // => { 'group1': ['a', 'c'], 'group2': ['b'] }
  13754. */
  13755. var invertBy = createInverter(function(result, value, key) {
  13756. if (value != null &&
  13757. typeof value.toString != 'function') {
  13758. value = nativeObjectToString.call(value);
  13759. }
  13760. if (hasOwnProperty.call(result, value)) {
  13761. result[value].push(key);
  13762. } else {
  13763. result[value] = [key];
  13764. }
  13765. }, getIteratee);
  13766. /**
  13767. * Invokes the method at `path` of `object`.
  13768. *
  13769. * @static
  13770. * @memberOf _
  13771. * @since 4.0.0
  13772. * @category Object
  13773. * @param {Object} object The object to query.
  13774. * @param {Array|string} path The path of the method to invoke.
  13775. * @param {...*} [args] The arguments to invoke the method with.
  13776. * @returns {*} Returns the result of the invoked method.
  13777. * @example
  13778. *
  13779. * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
  13780. *
  13781. * _.invoke(object, 'a[0].b.c.slice', 1, 3);
  13782. * // => [2, 3]
  13783. */
  13784. var invoke = baseRest(baseInvoke);
  13785. /**
  13786. * Creates an array of the own enumerable property names of `object`.
  13787. *
  13788. * **Note:** Non-object values are coerced to objects. See the
  13789. * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  13790. * for more details.
  13791. *
  13792. * @static
  13793. * @since 0.1.0
  13794. * @memberOf _
  13795. * @category Object
  13796. * @param {Object} object The object to query.
  13797. * @returns {Array} Returns the array of property names.
  13798. * @example
  13799. *
  13800. * function Foo() {
  13801. * this.a = 1;
  13802. * this.b = 2;
  13803. * }
  13804. *
  13805. * Foo.prototype.c = 3;
  13806. *
  13807. * _.keys(new Foo);
  13808. * // => ['a', 'b'] (iteration order is not guaranteed)
  13809. *
  13810. * _.keys('hi');
  13811. * // => ['0', '1']
  13812. */
  13813. function keys(object) {
  13814. return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
  13815. }
  13816. /**
  13817. * Creates an array of the own and inherited enumerable property names of `object`.
  13818. *
  13819. * **Note:** Non-object values are coerced to objects.
  13820. *
  13821. * @static
  13822. * @memberOf _
  13823. * @since 3.0.0
  13824. * @category Object
  13825. * @param {Object} object The object to query.
  13826. * @returns {Array} Returns the array of property names.
  13827. * @example
  13828. *
  13829. * function Foo() {
  13830. * this.a = 1;
  13831. * this.b = 2;
  13832. * }
  13833. *
  13834. * Foo.prototype.c = 3;
  13835. *
  13836. * _.keysIn(new Foo);
  13837. * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
  13838. */
  13839. function keysIn(object) {
  13840. return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
  13841. }
  13842. /**
  13843. * The opposite of `_.mapValues`; this method creates an object with the
  13844. * same values as `object` and keys generated by running each own enumerable
  13845. * string keyed property of `object` thru `iteratee`. The iteratee is invoked
  13846. * with three arguments: (value, key, object).
  13847. *
  13848. * @static
  13849. * @memberOf _
  13850. * @since 3.8.0
  13851. * @category Object
  13852. * @param {Object} object The object to iterate over.
  13853. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  13854. * @returns {Object} Returns the new mapped object.
  13855. * @see _.mapValues
  13856. * @example
  13857. *
  13858. * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
  13859. * return key + value;
  13860. * });
  13861. * // => { 'a1': 1, 'b2': 2 }
  13862. */
  13863. function mapKeys(object, iteratee) {
  13864. var result = {};
  13865. iteratee = getIteratee(iteratee, 3);
  13866. baseForOwn(object, function(value, key, object) {
  13867. baseAssignValue(result, iteratee(value, key, object), value);
  13868. });
  13869. return result;
  13870. }
  13871. /**
  13872. * Creates an object with the same keys as `object` and values generated
  13873. * by running each own enumerable string keyed property of `object` thru
  13874. * `iteratee`. The iteratee is invoked with three arguments:
  13875. * (value, key, object).
  13876. *
  13877. * @static
  13878. * @memberOf _
  13879. * @since 2.4.0
  13880. * @category Object
  13881. * @param {Object} object The object to iterate over.
  13882. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  13883. * @returns {Object} Returns the new mapped object.
  13884. * @see _.mapKeys
  13885. * @example
  13886. *
  13887. * var users = {
  13888. * 'fred': { 'user': 'fred', 'age': 40 },
  13889. * 'pebbles': { 'user': 'pebbles', 'age': 1 }
  13890. * };
  13891. *
  13892. * _.mapValues(users, function(o) { return o.age; });
  13893. * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
  13894. *
  13895. * // The `_.property` iteratee shorthand.
  13896. * _.mapValues(users, 'age');
  13897. * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
  13898. */
  13899. function mapValues(object, iteratee) {
  13900. var result = {};
  13901. iteratee = getIteratee(iteratee, 3);
  13902. baseForOwn(object, function(value, key, object) {
  13903. baseAssignValue(result, key, iteratee(value, key, object));
  13904. });
  13905. return result;
  13906. }
  13907. /**
  13908. * This method is like `_.assign` except that it recursively merges own and
  13909. * inherited enumerable string keyed properties of source objects into the
  13910. * destination object. Source properties that resolve to `undefined` are
  13911. * skipped if a destination value exists. Array and plain object properties
  13912. * are merged recursively. Other objects and value types are overridden by
  13913. * assignment. Source objects are applied from left to right. Subsequent
  13914. * sources overwrite property assignments of previous sources.
  13915. *
  13916. * **Note:** This method mutates `object`.
  13917. *
  13918. * @static
  13919. * @memberOf _
  13920. * @since 0.5.0
  13921. * @category Object
  13922. * @param {Object} object The destination object.
  13923. * @param {...Object} [sources] The source objects.
  13924. * @returns {Object} Returns `object`.
  13925. * @example
  13926. *
  13927. * var object = {
  13928. * 'a': [{ 'b': 2 }, { 'd': 4 }]
  13929. * };
  13930. *
  13931. * var other = {
  13932. * 'a': [{ 'c': 3 }, { 'e': 5 }]
  13933. * };
  13934. *
  13935. * _.merge(object, other);
  13936. * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
  13937. */
  13938. var merge = createAssigner(function(object, source, srcIndex) {
  13939. baseMerge(object, source, srcIndex);
  13940. });
  13941. /**
  13942. * This method is like `_.merge` except that it accepts `customizer` which
  13943. * is invoked to produce the merged values of the destination and source
  13944. * properties. If `customizer` returns `undefined`, merging is handled by the
  13945. * method instead. The `customizer` is invoked with six arguments:
  13946. * (objValue, srcValue, key, object, source, stack).
  13947. *
  13948. * **Note:** This method mutates `object`.
  13949. *
  13950. * @static
  13951. * @memberOf _
  13952. * @since 4.0.0
  13953. * @category Object
  13954. * @param {Object} object The destination object.
  13955. * @param {...Object} sources The source objects.
  13956. * @param {Function} customizer The function to customize assigned values.
  13957. * @returns {Object} Returns `object`.
  13958. * @example
  13959. *
  13960. * function customizer(objValue, srcValue) {
  13961. * if (_.isArray(objValue)) {
  13962. * return objValue.concat(srcValue);
  13963. * }
  13964. * }
  13965. *
  13966. * var object = { 'a': [1], 'b': [2] };
  13967. * var other = { 'a': [3], 'b': [4] };
  13968. *
  13969. * _.mergeWith(object, other, customizer);
  13970. * // => { 'a': [1, 3], 'b': [2, 4] }
  13971. */
  13972. var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
  13973. baseMerge(object, source, srcIndex, customizer);
  13974. });
  13975. /**
  13976. * The opposite of `_.pick`; this method creates an object composed of the
  13977. * own and inherited enumerable property paths of `object` that are not omitted.
  13978. *
  13979. * **Note:** This method is considerably slower than `_.pick`.
  13980. *
  13981. * @static
  13982. * @since 0.1.0
  13983. * @memberOf _
  13984. * @category Object
  13985. * @param {Object} object The source object.
  13986. * @param {...(string|string[])} [paths] The property paths to omit.
  13987. * @returns {Object} Returns the new object.
  13988. * @example
  13989. *
  13990. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  13991. *
  13992. * _.omit(object, ['a', 'c']);
  13993. * // => { 'b': '2' }
  13994. */
  13995. var omit = flatRest(function(object, paths) {
  13996. var result = {};
  13997. if (object == null) {
  13998. return result;
  13999. }
  14000. var isDeep = false;
  14001. paths = arrayMap(paths, function(path) {
  14002. path = castPath(path, object);
  14003. isDeep || (isDeep = path.length > 1);
  14004. return path;
  14005. });
  14006. copyObject(object, getAllKeysIn(object), result);
  14007. if (isDeep) {
  14008. result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
  14009. }
  14010. var length = paths.length;
  14011. while (length--) {
  14012. baseUnset(result, paths[length]);
  14013. }
  14014. return result;
  14015. });
  14016. /**
  14017. * The opposite of `_.pickBy`; this method creates an object composed of
  14018. * the own and inherited enumerable string keyed properties of `object` that
  14019. * `predicate` doesn't return truthy for. The predicate is invoked with two
  14020. * arguments: (value, key).
  14021. *
  14022. * @static
  14023. * @memberOf _
  14024. * @since 4.0.0
  14025. * @category Object
  14026. * @param {Object} object The source object.
  14027. * @param {Function} [predicate=_.identity] The function invoked per property.
  14028. * @returns {Object} Returns the new object.
  14029. * @example
  14030. *
  14031. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  14032. *
  14033. * _.omitBy(object, _.isNumber);
  14034. * // => { 'b': '2' }
  14035. */
  14036. function omitBy(object, predicate) {
  14037. return pickBy(object, negate(getIteratee(predicate)));
  14038. }
  14039. /**
  14040. * Creates an object composed of the picked `object` properties.
  14041. *
  14042. * @static
  14043. * @since 0.1.0
  14044. * @memberOf _
  14045. * @category Object
  14046. * @param {Object} object The source object.
  14047. * @param {...(string|string[])} [paths] The property paths to pick.
  14048. * @returns {Object} Returns the new object.
  14049. * @example
  14050. *
  14051. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  14052. *
  14053. * _.pick(object, ['a', 'c']);
  14054. * // => { 'a': 1, 'c': 3 }
  14055. */
  14056. var pick = flatRest(function(object, paths) {
  14057. return object == null ? {} : basePick(object, paths);
  14058. });
  14059. /**
  14060. * Creates an object composed of the `object` properties `predicate` returns
  14061. * truthy for. The predicate is invoked with two arguments: (value, key).
  14062. *
  14063. * @static
  14064. * @memberOf _
  14065. * @since 4.0.0
  14066. * @category Object
  14067. * @param {Object} object The source object.
  14068. * @param {Function} [predicate=_.identity] The function invoked per property.
  14069. * @returns {Object} Returns the new object.
  14070. * @example
  14071. *
  14072. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  14073. *
  14074. * _.pickBy(object, _.isNumber);
  14075. * // => { 'a': 1, 'c': 3 }
  14076. */
  14077. function pickBy(object, predicate) {
  14078. if (object == null) {
  14079. return {};
  14080. }
  14081. var props = arrayMap(getAllKeysIn(object), function(prop) {
  14082. return [prop];
  14083. });
  14084. predicate = getIteratee(predicate);
  14085. return basePickBy(object, props, function(value, path) {
  14086. return predicate(value, path[0]);
  14087. });
  14088. }
  14089. /**
  14090. * This method is like `_.get` except that if the resolved value is a
  14091. * function it's invoked with the `this` binding of its parent object and
  14092. * its result is returned.
  14093. *
  14094. * @static
  14095. * @since 0.1.0
  14096. * @memberOf _
  14097. * @category Object
  14098. * @param {Object} object The object to query.
  14099. * @param {Array|string} path The path of the property to resolve.
  14100. * @param {*} [defaultValue] The value returned for `undefined` resolved values.
  14101. * @returns {*} Returns the resolved value.
  14102. * @example
  14103. *
  14104. * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
  14105. *
  14106. * _.result(object, 'a[0].b.c1');
  14107. * // => 3
  14108. *
  14109. * _.result(object, 'a[0].b.c2');
  14110. * // => 4
  14111. *
  14112. * _.result(object, 'a[0].b.c3', 'default');
  14113. * // => 'default'
  14114. *
  14115. * _.result(object, 'a[0].b.c3', _.constant('default'));
  14116. * // => 'default'
  14117. */
  14118. function result(object, path, defaultValue) {
  14119. path = castPath(path, object);
  14120. var index = -1,
  14121. length = path.length;
  14122. // Ensure the loop is entered when path is empty.
  14123. if (!length) {
  14124. length = 1;
  14125. object = undefined;
  14126. }
  14127. while (++index < length) {
  14128. var value = object == null ? undefined : object[toKey(path[index])];
  14129. if (value === undefined) {
  14130. index = length;
  14131. value = defaultValue;
  14132. }
  14133. object = isFunction(value) ? value.call(object) : value;
  14134. }
  14135. return object;
  14136. }
  14137. /**
  14138. * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
  14139. * it's created. Arrays are created for missing index properties while objects
  14140. * are created for all other missing properties. Use `_.setWith` to customize
  14141. * `path` creation.
  14142. *
  14143. * **Note:** This method mutates `object`.
  14144. *
  14145. * @static
  14146. * @memberOf _
  14147. * @since 3.7.0
  14148. * @category Object
  14149. * @param {Object} object The object to modify.
  14150. * @param {Array|string} path The path of the property to set.
  14151. * @param {*} value The value to set.
  14152. * @returns {Object} Returns `object`.
  14153. * @example
  14154. *
  14155. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  14156. *
  14157. * _.set(object, 'a[0].b.c', 4);
  14158. * console.log(object.a[0].b.c);
  14159. * // => 4
  14160. *
  14161. * _.set(object, ['x', '0', 'y', 'z'], 5);
  14162. * console.log(object.x[0].y.z);
  14163. * // => 5
  14164. */
  14165. function set(object, path, value) {
  14166. return object == null ? object : baseSet(object, path, value);
  14167. }
  14168. /**
  14169. * This method is like `_.set` except that it accepts `customizer` which is
  14170. * invoked to produce the objects of `path`. If `customizer` returns `undefined`
  14171. * path creation is handled by the method instead. The `customizer` is invoked
  14172. * with three arguments: (nsValue, key, nsObject).
  14173. *
  14174. * **Note:** This method mutates `object`.
  14175. *
  14176. * @static
  14177. * @memberOf _
  14178. * @since 4.0.0
  14179. * @category Object
  14180. * @param {Object} object The object to modify.
  14181. * @param {Array|string} path The path of the property to set.
  14182. * @param {*} value The value to set.
  14183. * @param {Function} [customizer] The function to customize assigned values.
  14184. * @returns {Object} Returns `object`.
  14185. * @example
  14186. *
  14187. * var object = {};
  14188. *
  14189. * _.setWith(object, '[0][1]', 'a', Object);
  14190. * // => { '0': { '1': 'a' } }
  14191. */
  14192. function setWith(object, path, value, customizer) {
  14193. customizer = typeof customizer == 'function' ? customizer : undefined;
  14194. return object == null ? object : baseSet(object, path, value, customizer);
  14195. }
  14196. /**
  14197. * Creates an array of own enumerable string keyed-value pairs for `object`
  14198. * which can be consumed by `_.fromPairs`. If `object` is a map or set, its
  14199. * entries are returned.
  14200. *
  14201. * @static
  14202. * @memberOf _
  14203. * @since 4.0.0
  14204. * @alias entries
  14205. * @category Object
  14206. * @param {Object} object The object to query.
  14207. * @returns {Array} Returns the key-value pairs.
  14208. * @example
  14209. *
  14210. * function Foo() {
  14211. * this.a = 1;
  14212. * this.b = 2;
  14213. * }
  14214. *
  14215. * Foo.prototype.c = 3;
  14216. *
  14217. * _.toPairs(new Foo);
  14218. * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
  14219. */
  14220. var toPairs = createToPairs(keys);
  14221. /**
  14222. * Creates an array of own and inherited enumerable string keyed-value pairs
  14223. * for `object` which can be consumed by `_.fromPairs`. If `object` is a map
  14224. * or set, its entries are returned.
  14225. *
  14226. * @static
  14227. * @memberOf _
  14228. * @since 4.0.0
  14229. * @alias entriesIn
  14230. * @category Object
  14231. * @param {Object} object The object to query.
  14232. * @returns {Array} Returns the key-value pairs.
  14233. * @example
  14234. *
  14235. * function Foo() {
  14236. * this.a = 1;
  14237. * this.b = 2;
  14238. * }
  14239. *
  14240. * Foo.prototype.c = 3;
  14241. *
  14242. * _.toPairsIn(new Foo);
  14243. * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
  14244. */
  14245. var toPairsIn = createToPairs(keysIn);
  14246. /**
  14247. * An alternative to `_.reduce`; this method transforms `object` to a new
  14248. * `accumulator` object which is the result of running each of its own
  14249. * enumerable string keyed properties thru `iteratee`, with each invocation
  14250. * potentially mutating the `accumulator` object. If `accumulator` is not
  14251. * provided, a new object with the same `[[Prototype]]` will be used. The
  14252. * iteratee is invoked with four arguments: (accumulator, value, key, object).
  14253. * Iteratee functions may exit iteration early by explicitly returning `false`.
  14254. *
  14255. * @static
  14256. * @memberOf _
  14257. * @since 1.3.0
  14258. * @category Object
  14259. * @param {Object} object The object to iterate over.
  14260. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  14261. * @param {*} [accumulator] The custom accumulator value.
  14262. * @returns {*} Returns the accumulated value.
  14263. * @example
  14264. *
  14265. * _.transform([2, 3, 4], function(result, n) {
  14266. * result.push(n *= n);
  14267. * return n % 2 == 0;
  14268. * }, []);
  14269. * // => [4, 9]
  14270. *
  14271. * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
  14272. * (result[value] || (result[value] = [])).push(key);
  14273. * }, {});
  14274. * // => { '1': ['a', 'c'], '2': ['b'] }
  14275. */
  14276. function transform(object, iteratee, accumulator) {
  14277. var isArr = isArray(object),
  14278. isArrLike = isArr || isBuffer(object) || isTypedArray(object);
  14279. iteratee = getIteratee(iteratee, 4);
  14280. if (accumulator == null) {
  14281. var Ctor = object && object.constructor;
  14282. if (isArrLike) {
  14283. accumulator = isArr ? new Ctor : [];
  14284. }
  14285. else if (isObject(object)) {
  14286. accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
  14287. }
  14288. else {
  14289. accumulator = {};
  14290. }
  14291. }
  14292. (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
  14293. return iteratee(accumulator, value, index, object);
  14294. });
  14295. return accumulator;
  14296. }
  14297. /**
  14298. * Removes the property at `path` of `object`.
  14299. *
  14300. * **Note:** This method mutates `object`.
  14301. *
  14302. * @static
  14303. * @memberOf _
  14304. * @since 4.0.0
  14305. * @category Object
  14306. * @param {Object} object The object to modify.
  14307. * @param {Array|string} path The path of the property to unset.
  14308. * @returns {boolean} Returns `true` if the property is deleted, else `false`.
  14309. * @example
  14310. *
  14311. * var object = { 'a': [{ 'b': { 'c': 7 } }] };
  14312. * _.unset(object, 'a[0].b.c');
  14313. * // => true
  14314. *
  14315. * console.log(object);
  14316. * // => { 'a': [{ 'b': {} }] };
  14317. *
  14318. * _.unset(object, ['a', '0', 'b', 'c']);
  14319. * // => true
  14320. *
  14321. * console.log(object);
  14322. * // => { 'a': [{ 'b': {} }] };
  14323. */
  14324. function unset(object, path) {
  14325. return object == null ? true : baseUnset(object, path);
  14326. }
  14327. /**
  14328. * This method is like `_.set` except that accepts `updater` to produce the
  14329. * value to set. Use `_.updateWith` to customize `path` creation. The `updater`
  14330. * is invoked with one argument: (value).
  14331. *
  14332. * **Note:** This method mutates `object`.
  14333. *
  14334. * @static
  14335. * @memberOf _
  14336. * @since 4.6.0
  14337. * @category Object
  14338. * @param {Object} object The object to modify.
  14339. * @param {Array|string} path The path of the property to set.
  14340. * @param {Function} updater The function to produce the updated value.
  14341. * @returns {Object} Returns `object`.
  14342. * @example
  14343. *
  14344. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  14345. *
  14346. * _.update(object, 'a[0].b.c', function(n) { return n * n; });
  14347. * console.log(object.a[0].b.c);
  14348. * // => 9
  14349. *
  14350. * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
  14351. * console.log(object.x[0].y.z);
  14352. * // => 0
  14353. */
  14354. function update(object, path, updater) {
  14355. return object == null ? object : baseUpdate(object, path, castFunction(updater));
  14356. }
  14357. /**
  14358. * This method is like `_.update` except that it accepts `customizer` which is
  14359. * invoked to produce the objects of `path`. If `customizer` returns `undefined`
  14360. * path creation is handled by the method instead. The `customizer` is invoked
  14361. * with three arguments: (nsValue, key, nsObject).
  14362. *
  14363. * **Note:** This method mutates `object`.
  14364. *
  14365. * @static
  14366. * @memberOf _
  14367. * @since 4.6.0
  14368. * @category Object
  14369. * @param {Object} object The object to modify.
  14370. * @param {Array|string} path The path of the property to set.
  14371. * @param {Function} updater The function to produce the updated value.
  14372. * @param {Function} [customizer] The function to customize assigned values.
  14373. * @returns {Object} Returns `object`.
  14374. * @example
  14375. *
  14376. * var object = {};
  14377. *
  14378. * _.updateWith(object, '[0][1]', _.constant('a'), Object);
  14379. * // => { '0': { '1': 'a' } }
  14380. */
  14381. function updateWith(object, path, updater, customizer) {
  14382. customizer = typeof customizer == 'function' ? customizer : undefined;
  14383. return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
  14384. }
  14385. /**
  14386. * Creates an array of the own enumerable string keyed property values of `object`.
  14387. *
  14388. * **Note:** Non-object values are coerced to objects.
  14389. *
  14390. * @static
  14391. * @since 0.1.0
  14392. * @memberOf _
  14393. * @category Object
  14394. * @param {Object} object The object to query.
  14395. * @returns {Array} Returns the array of property values.
  14396. * @example
  14397. *
  14398. * function Foo() {
  14399. * this.a = 1;
  14400. * this.b = 2;
  14401. * }
  14402. *
  14403. * Foo.prototype.c = 3;
  14404. *
  14405. * _.values(new Foo);
  14406. * // => [1, 2] (iteration order is not guaranteed)
  14407. *
  14408. * _.values('hi');
  14409. * // => ['h', 'i']
  14410. */
  14411. function values(object) {
  14412. return object == null ? [] : baseValues(object, keys(object));
  14413. }
  14414. /**
  14415. * Creates an array of the own and inherited enumerable string keyed property
  14416. * values of `object`.
  14417. *
  14418. * **Note:** Non-object values are coerced to objects.
  14419. *
  14420. * @static
  14421. * @memberOf _
  14422. * @since 3.0.0
  14423. * @category Object
  14424. * @param {Object} object The object to query.
  14425. * @returns {Array} Returns the array of property values.
  14426. * @example
  14427. *
  14428. * function Foo() {
  14429. * this.a = 1;
  14430. * this.b = 2;
  14431. * }
  14432. *
  14433. * Foo.prototype.c = 3;
  14434. *
  14435. * _.valuesIn(new Foo);
  14436. * // => [1, 2, 3] (iteration order is not guaranteed)
  14437. */
  14438. function valuesIn(object) {
  14439. return object == null ? [] : baseValues(object, keysIn(object));
  14440. }
  14441. /*------------------------------------------------------------------------*/
  14442. /**
  14443. * Clamps `number` within the inclusive `lower` and `upper` bounds.
  14444. *
  14445. * @static
  14446. * @memberOf _
  14447. * @since 4.0.0
  14448. * @category Number
  14449. * @param {number} number The number to clamp.
  14450. * @param {number} [lower] The lower bound.
  14451. * @param {number} upper The upper bound.
  14452. * @returns {number} Returns the clamped number.
  14453. * @example
  14454. *
  14455. * _.clamp(-10, -5, 5);
  14456. * // => -5
  14457. *
  14458. * _.clamp(10, -5, 5);
  14459. * // => 5
  14460. */
  14461. function clamp(number, lower, upper) {
  14462. if (upper === undefined) {
  14463. upper = lower;
  14464. lower = undefined;
  14465. }
  14466. if (upper !== undefined) {
  14467. upper = toNumber(upper);
  14468. upper = upper === upper ? upper : 0;
  14469. }
  14470. if (lower !== undefined) {
  14471. lower = toNumber(lower);
  14472. lower = lower === lower ? lower : 0;
  14473. }
  14474. return baseClamp(toNumber(number), lower, upper);
  14475. }
  14476. /**
  14477. * Checks if `n` is between `start` and up to, but not including, `end`. If
  14478. * `end` is not specified, it's set to `start` with `start` then set to `0`.
  14479. * If `start` is greater than `end` the params are swapped to support
  14480. * negative ranges.
  14481. *
  14482. * @static
  14483. * @memberOf _
  14484. * @since 3.3.0
  14485. * @category Number
  14486. * @param {number} number The number to check.
  14487. * @param {number} [start=0] The start of the range.
  14488. * @param {number} end The end of the range.
  14489. * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
  14490. * @see _.range, _.rangeRight
  14491. * @example
  14492. *
  14493. * _.inRange(3, 2, 4);
  14494. * // => true
  14495. *
  14496. * _.inRange(4, 8);
  14497. * // => true
  14498. *
  14499. * _.inRange(4, 2);
  14500. * // => false
  14501. *
  14502. * _.inRange(2, 2);
  14503. * // => false
  14504. *
  14505. * _.inRange(1.2, 2);
  14506. * // => true
  14507. *
  14508. * _.inRange(5.2, 4);
  14509. * // => false
  14510. *
  14511. * _.inRange(-3, -2, -6);
  14512. * // => true
  14513. */
  14514. function inRange(number, start, end) {
  14515. start = toFinite(start);
  14516. if (end === undefined) {
  14517. end = start;
  14518. start = 0;
  14519. } else {
  14520. end = toFinite(end);
  14521. }
  14522. number = toNumber(number);
  14523. return baseInRange(number, start, end);
  14524. }
  14525. /**
  14526. * Produces a random number between the inclusive `lower` and `upper` bounds.
  14527. * If only one argument is provided a number between `0` and the given number
  14528. * is returned. If `floating` is `true`, or either `lower` or `upper` are
  14529. * floats, a floating-point number is returned instead of an integer.
  14530. *
  14531. * **Note:** JavaScript follows the IEEE-754 standard for resolving
  14532. * floating-point values which can produce unexpected results.
  14533. *
  14534. * @static
  14535. * @memberOf _
  14536. * @since 0.7.0
  14537. * @category Number
  14538. * @param {number} [lower=0] The lower bound.
  14539. * @param {number} [upper=1] The upper bound.
  14540. * @param {boolean} [floating] Specify returning a floating-point number.
  14541. * @returns {number} Returns the random number.
  14542. * @example
  14543. *
  14544. * _.random(0, 5);
  14545. * // => an integer between 0 and 5
  14546. *
  14547. * _.random(5);
  14548. * // => also an integer between 0 and 5
  14549. *
  14550. * _.random(5, true);
  14551. * // => a floating-point number between 0 and 5
  14552. *
  14553. * _.random(1.2, 5.2);
  14554. * // => a floating-point number between 1.2 and 5.2
  14555. */
  14556. function random(lower, upper, floating) {
  14557. if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
  14558. upper = floating = undefined;
  14559. }
  14560. if (floating === undefined) {
  14561. if (typeof upper == 'boolean') {
  14562. floating = upper;
  14563. upper = undefined;
  14564. }
  14565. else if (typeof lower == 'boolean') {
  14566. floating = lower;
  14567. lower = undefined;
  14568. }
  14569. }
  14570. if (lower === undefined && upper === undefined) {
  14571. lower = 0;
  14572. upper = 1;
  14573. }
  14574. else {
  14575. lower = toFinite(lower);
  14576. if (upper === undefined) {
  14577. upper = lower;
  14578. lower = 0;
  14579. } else {
  14580. upper = toFinite(upper);
  14581. }
  14582. }
  14583. if (lower > upper) {
  14584. var temp = lower;
  14585. lower = upper;
  14586. upper = temp;
  14587. }
  14588. if (floating || lower % 1 || upper % 1) {
  14589. var rand = nativeRandom();
  14590. return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
  14591. }
  14592. return baseRandom(lower, upper);
  14593. }
  14594. /*------------------------------------------------------------------------*/
  14595. /**
  14596. * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
  14597. *
  14598. * @static
  14599. * @memberOf _
  14600. * @since 3.0.0
  14601. * @category String
  14602. * @param {string} [string=''] The string to convert.
  14603. * @returns {string} Returns the camel cased string.
  14604. * @example
  14605. *
  14606. * _.camelCase('Foo Bar');
  14607. * // => 'fooBar'
  14608. *
  14609. * _.camelCase('--foo-bar--');
  14610. * // => 'fooBar'
  14611. *
  14612. * _.camelCase('__FOO_BAR__');
  14613. * // => 'fooBar'
  14614. */
  14615. var camelCase = createCompounder(function(result, word, index) {
  14616. word = word.toLowerCase();
  14617. return result + (index ? capitalize(word) : word);
  14618. });
  14619. /**
  14620. * Converts the first character of `string` to upper case and the remaining
  14621. * to lower case.
  14622. *
  14623. * @static
  14624. * @memberOf _
  14625. * @since 3.0.0
  14626. * @category String
  14627. * @param {string} [string=''] The string to capitalize.
  14628. * @returns {string} Returns the capitalized string.
  14629. * @example
  14630. *
  14631. * _.capitalize('FRED');
  14632. * // => 'Fred'
  14633. */
  14634. function capitalize(string) {
  14635. return upperFirst(toString(string).toLowerCase());
  14636. }
  14637. /**
  14638. * Deburrs `string` by converting
  14639. * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
  14640. * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
  14641. * letters to basic Latin letters and removing
  14642. * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
  14643. *
  14644. * @static
  14645. * @memberOf _
  14646. * @since 3.0.0
  14647. * @category String
  14648. * @param {string} [string=''] The string to deburr.
  14649. * @returns {string} Returns the deburred string.
  14650. * @example
  14651. *
  14652. * _.deburr('déjà vu');
  14653. * // => 'deja vu'
  14654. */
  14655. function deburr(string) {
  14656. string = toString(string);
  14657. return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
  14658. }
  14659. /**
  14660. * Checks if `string` ends with the given target string.
  14661. *
  14662. * @static
  14663. * @memberOf _
  14664. * @since 3.0.0
  14665. * @category String
  14666. * @param {string} [string=''] The string to inspect.
  14667. * @param {string} [target] The string to search for.
  14668. * @param {number} [position=string.length] The position to search up to.
  14669. * @returns {boolean} Returns `true` if `string` ends with `target`,
  14670. * else `false`.
  14671. * @example
  14672. *
  14673. * _.endsWith('abc', 'c');
  14674. * // => true
  14675. *
  14676. * _.endsWith('abc', 'b');
  14677. * // => false
  14678. *
  14679. * _.endsWith('abc', 'b', 2);
  14680. * // => true
  14681. */
  14682. function endsWith(string, target, position) {
  14683. string = toString(string);
  14684. target = baseToString(target);
  14685. var length = string.length;
  14686. position = position === undefined
  14687. ? length
  14688. : baseClamp(toInteger(position), 0, length);
  14689. var end = position;
  14690. position -= target.length;
  14691. return position >= 0 && string.slice(position, end) == target;
  14692. }
  14693. /**
  14694. * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
  14695. * corresponding HTML entities.
  14696. *
  14697. * **Note:** No other characters are escaped. To escape additional
  14698. * characters use a third-party library like [_he_](https://mths.be/he).
  14699. *
  14700. * Though the ">" character is escaped for symmetry, characters like
  14701. * ">" and "/" don't need escaping in HTML and have no special meaning
  14702. * unless they're part of a tag or unquoted attribute value. See
  14703. * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
  14704. * (under "semi-related fun fact") for more details.
  14705. *
  14706. * When working with HTML you should always
  14707. * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
  14708. * XSS vectors.
  14709. *
  14710. * @static
  14711. * @since 0.1.0
  14712. * @memberOf _
  14713. * @category String
  14714. * @param {string} [string=''] The string to escape.
  14715. * @returns {string} Returns the escaped string.
  14716. * @example
  14717. *
  14718. * _.escape('fred, barney, & pebbles');
  14719. * // => 'fred, barney, &amp; pebbles'
  14720. */
  14721. function escape(string) {
  14722. string = toString(string);
  14723. return (string && reHasUnescapedHtml.test(string))
  14724. ? string.replace(reUnescapedHtml, escapeHtmlChar)
  14725. : string;
  14726. }
  14727. /**
  14728. * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
  14729. * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
  14730. *
  14731. * @static
  14732. * @memberOf _
  14733. * @since 3.0.0
  14734. * @category String
  14735. * @param {string} [string=''] The string to escape.
  14736. * @returns {string} Returns the escaped string.
  14737. * @example
  14738. *
  14739. * _.escapeRegExp('[lodash](https://lodash.com/)');
  14740. * // => '\[lodash\]\(https://lodash\.com/\)'
  14741. */
  14742. function escapeRegExp(string) {
  14743. string = toString(string);
  14744. return (string && reHasRegExpChar.test(string))
  14745. ? string.replace(reRegExpChar, '\\$&')
  14746. : string;
  14747. }
  14748. /**
  14749. * Converts `string` to
  14750. * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
  14751. *
  14752. * @static
  14753. * @memberOf _
  14754. * @since 3.0.0
  14755. * @category String
  14756. * @param {string} [string=''] The string to convert.
  14757. * @returns {string} Returns the kebab cased string.
  14758. * @example
  14759. *
  14760. * _.kebabCase('Foo Bar');
  14761. * // => 'foo-bar'
  14762. *
  14763. * _.kebabCase('fooBar');
  14764. * // => 'foo-bar'
  14765. *
  14766. * _.kebabCase('__FOO_BAR__');
  14767. * // => 'foo-bar'
  14768. */
  14769. var kebabCase = createCompounder(function(result, word, index) {
  14770. return result + (index ? '-' : '') + word.toLowerCase();
  14771. });
  14772. /**
  14773. * Converts `string`, as space separated words, to lower case.
  14774. *
  14775. * @static
  14776. * @memberOf _
  14777. * @since 4.0.0
  14778. * @category String
  14779. * @param {string} [string=''] The string to convert.
  14780. * @returns {string} Returns the lower cased string.
  14781. * @example
  14782. *
  14783. * _.lowerCase('--Foo-Bar--');
  14784. * // => 'foo bar'
  14785. *
  14786. * _.lowerCase('fooBar');
  14787. * // => 'foo bar'
  14788. *
  14789. * _.lowerCase('__FOO_BAR__');
  14790. * // => 'foo bar'
  14791. */
  14792. var lowerCase = createCompounder(function(result, word, index) {
  14793. return result + (index ? ' ' : '') + word.toLowerCase();
  14794. });
  14795. /**
  14796. * Converts the first character of `string` to lower case.
  14797. *
  14798. * @static
  14799. * @memberOf _
  14800. * @since 4.0.0
  14801. * @category String
  14802. * @param {string} [string=''] The string to convert.
  14803. * @returns {string} Returns the converted string.
  14804. * @example
  14805. *
  14806. * _.lowerFirst('Fred');
  14807. * // => 'fred'
  14808. *
  14809. * _.lowerFirst('FRED');
  14810. * // => 'fRED'
  14811. */
  14812. var lowerFirst = createCaseFirst('toLowerCase');
  14813. /**
  14814. * Pads `string` on the left and right sides if it's shorter than `length`.
  14815. * Padding characters are truncated if they can't be evenly divided by `length`.
  14816. *
  14817. * @static
  14818. * @memberOf _
  14819. * @since 3.0.0
  14820. * @category String
  14821. * @param {string} [string=''] The string to pad.
  14822. * @param {number} [length=0] The padding length.
  14823. * @param {string} [chars=' '] The string used as padding.
  14824. * @returns {string} Returns the padded string.
  14825. * @example
  14826. *
  14827. * _.pad('abc', 8);
  14828. * // => ' abc '
  14829. *
  14830. * _.pad('abc', 8, '_-');
  14831. * // => '_-abc_-_'
  14832. *
  14833. * _.pad('abc', 3);
  14834. * // => 'abc'
  14835. */
  14836. function pad(string, length, chars) {
  14837. string = toString(string);
  14838. length = toInteger(length);
  14839. var strLength = length ? stringSize(string) : 0;
  14840. if (!length || strLength >= length) {
  14841. return string;
  14842. }
  14843. var mid = (length - strLength) / 2;
  14844. return (
  14845. createPadding(nativeFloor(mid), chars) +
  14846. string +
  14847. createPadding(nativeCeil(mid), chars)
  14848. );
  14849. }
  14850. /**
  14851. * Pads `string` on the right side if it's shorter than `length`. Padding
  14852. * characters are truncated if they exceed `length`.
  14853. *
  14854. * @static
  14855. * @memberOf _
  14856. * @since 4.0.0
  14857. * @category String
  14858. * @param {string} [string=''] The string to pad.
  14859. * @param {number} [length=0] The padding length.
  14860. * @param {string} [chars=' '] The string used as padding.
  14861. * @returns {string} Returns the padded string.
  14862. * @example
  14863. *
  14864. * _.padEnd('abc', 6);
  14865. * // => 'abc '
  14866. *
  14867. * _.padEnd('abc', 6, '_-');
  14868. * // => 'abc_-_'
  14869. *
  14870. * _.padEnd('abc', 3);
  14871. * // => 'abc'
  14872. */
  14873. function padEnd(string, length, chars) {
  14874. string = toString(string);
  14875. length = toInteger(length);
  14876. var strLength = length ? stringSize(string) : 0;
  14877. return (length && strLength < length)
  14878. ? (string + createPadding(length - strLength, chars))
  14879. : string;
  14880. }
  14881. /**
  14882. * Pads `string` on the left side if it's shorter than `length`. Padding
  14883. * characters are truncated if they exceed `length`.
  14884. *
  14885. * @static
  14886. * @memberOf _
  14887. * @since 4.0.0
  14888. * @category String
  14889. * @param {string} [string=''] The string to pad.
  14890. * @param {number} [length=0] The padding length.
  14891. * @param {string} [chars=' '] The string used as padding.
  14892. * @returns {string} Returns the padded string.
  14893. * @example
  14894. *
  14895. * _.padStart('abc', 6);
  14896. * // => ' abc'
  14897. *
  14898. * _.padStart('abc', 6, '_-');
  14899. * // => '_-_abc'
  14900. *
  14901. * _.padStart('abc', 3);
  14902. * // => 'abc'
  14903. */
  14904. function padStart(string, length, chars) {
  14905. string = toString(string);
  14906. length = toInteger(length);
  14907. var strLength = length ? stringSize(string) : 0;
  14908. return (length && strLength < length)
  14909. ? (createPadding(length - strLength, chars) + string)
  14910. : string;
  14911. }
  14912. /**
  14913. * Converts `string` to an integer of the specified radix. If `radix` is
  14914. * `undefined` or `0`, a `radix` of `10` is used unless `value` is a
  14915. * hexadecimal, in which case a `radix` of `16` is used.
  14916. *
  14917. * **Note:** This method aligns with the
  14918. * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
  14919. *
  14920. * @static
  14921. * @memberOf _
  14922. * @since 1.1.0
  14923. * @category String
  14924. * @param {string} string The string to convert.
  14925. * @param {number} [radix=10] The radix to interpret `value` by.
  14926. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  14927. * @returns {number} Returns the converted integer.
  14928. * @example
  14929. *
  14930. * _.parseInt('08');
  14931. * // => 8
  14932. *
  14933. * _.map(['6', '08', '10'], _.parseInt);
  14934. * // => [6, 8, 10]
  14935. */
  14936. function parseInt(string, radix, guard) {
  14937. if (guard || radix == null) {
  14938. radix = 0;
  14939. } else if (radix) {
  14940. radix = +radix;
  14941. }
  14942. return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
  14943. }
  14944. /**
  14945. * Repeats the given string `n` times.
  14946. *
  14947. * @static
  14948. * @memberOf _
  14949. * @since 3.0.0
  14950. * @category String
  14951. * @param {string} [string=''] The string to repeat.
  14952. * @param {number} [n=1] The number of times to repeat the string.
  14953. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  14954. * @returns {string} Returns the repeated string.
  14955. * @example
  14956. *
  14957. * _.repeat('*', 3);
  14958. * // => '***'
  14959. *
  14960. * _.repeat('abc', 2);
  14961. * // => 'abcabc'
  14962. *
  14963. * _.repeat('abc', 0);
  14964. * // => ''
  14965. */
  14966. function repeat(string, n, guard) {
  14967. if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
  14968. n = 1;
  14969. } else {
  14970. n = toInteger(n);
  14971. }
  14972. return baseRepeat(toString(string), n);
  14973. }
  14974. /**
  14975. * Replaces matches for `pattern` in `string` with `replacement`.
  14976. *
  14977. * **Note:** This method is based on
  14978. * [`String#replace`](https://mdn.io/String/replace).
  14979. *
  14980. * @static
  14981. * @memberOf _
  14982. * @since 4.0.0
  14983. * @category String
  14984. * @param {string} [string=''] The string to modify.
  14985. * @param {RegExp|string} pattern The pattern to replace.
  14986. * @param {Function|string} replacement The match replacement.
  14987. * @returns {string} Returns the modified string.
  14988. * @example
  14989. *
  14990. * _.replace('Hi Fred', 'Fred', 'Barney');
  14991. * // => 'Hi Barney'
  14992. */
  14993. function replace() {
  14994. var args = arguments,
  14995. string = toString(args[0]);
  14996. return args.length < 3 ? string : string.replace(args[1], args[2]);
  14997. }
  14998. /**
  14999. * Converts `string` to
  15000. * [snake case](https://en.wikipedia.org/wiki/Snake_case).
  15001. *
  15002. * @static
  15003. * @memberOf _
  15004. * @since 3.0.0
  15005. * @category String
  15006. * @param {string} [string=''] The string to convert.
  15007. * @returns {string} Returns the snake cased string.
  15008. * @example
  15009. *
  15010. * _.snakeCase('Foo Bar');
  15011. * // => 'foo_bar'
  15012. *
  15013. * _.snakeCase('fooBar');
  15014. * // => 'foo_bar'
  15015. *
  15016. * _.snakeCase('--FOO-BAR--');
  15017. * // => 'foo_bar'
  15018. */
  15019. var snakeCase = createCompounder(function(result, word, index) {
  15020. return result + (index ? '_' : '') + word.toLowerCase();
  15021. });
  15022. /**
  15023. * Splits `string` by `separator`.
  15024. *
  15025. * **Note:** This method is based on
  15026. * [`String#split`](https://mdn.io/String/split).
  15027. *
  15028. * @static
  15029. * @memberOf _
  15030. * @since 4.0.0
  15031. * @category String
  15032. * @param {string} [string=''] The string to split.
  15033. * @param {RegExp|string} separator The separator pattern to split by.
  15034. * @param {number} [limit] The length to truncate results to.
  15035. * @returns {Array} Returns the string segments.
  15036. * @example
  15037. *
  15038. * _.split('a-b-c', '-', 2);
  15039. * // => ['a', 'b']
  15040. */
  15041. function split(string, separator, limit) {
  15042. if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
  15043. separator = limit = undefined;
  15044. }
  15045. limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
  15046. if (!limit) {
  15047. return [];
  15048. }
  15049. string = toString(string);
  15050. if (string && (
  15051. typeof separator == 'string' ||
  15052. (separator != null && !isRegExp(separator))
  15053. )) {
  15054. separator = baseToString(separator);
  15055. if (!separator && hasUnicode(string)) {
  15056. return castSlice(stringToArray(string), 0, limit);
  15057. }
  15058. }
  15059. return string.split(separator, limit);
  15060. }
  15061. /**
  15062. * Converts `string` to
  15063. * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
  15064. *
  15065. * @static
  15066. * @memberOf _
  15067. * @since 3.1.0
  15068. * @category String
  15069. * @param {string} [string=''] The string to convert.
  15070. * @returns {string} Returns the start cased string.
  15071. * @example
  15072. *
  15073. * _.startCase('--foo-bar--');
  15074. * // => 'Foo Bar'
  15075. *
  15076. * _.startCase('fooBar');
  15077. * // => 'Foo Bar'
  15078. *
  15079. * _.startCase('__FOO_BAR__');
  15080. * // => 'FOO BAR'
  15081. */
  15082. var startCase = createCompounder(function(result, word, index) {
  15083. return result + (index ? ' ' : '') + upperFirst(word);
  15084. });
  15085. /**
  15086. * Checks if `string` starts with the given target string.
  15087. *
  15088. * @static
  15089. * @memberOf _
  15090. * @since 3.0.0
  15091. * @category String
  15092. * @param {string} [string=''] The string to inspect.
  15093. * @param {string} [target] The string to search for.
  15094. * @param {number} [position=0] The position to search from.
  15095. * @returns {boolean} Returns `true` if `string` starts with `target`,
  15096. * else `false`.
  15097. * @example
  15098. *
  15099. * _.startsWith('abc', 'a');
  15100. * // => true
  15101. *
  15102. * _.startsWith('abc', 'b');
  15103. * // => false
  15104. *
  15105. * _.startsWith('abc', 'b', 1);
  15106. * // => true
  15107. */
  15108. function startsWith(string, target, position) {
  15109. string = toString(string);
  15110. position = position == null
  15111. ? 0
  15112. : baseClamp(toInteger(position), 0, string.length);
  15113. target = baseToString(target);
  15114. return string.slice(position, position + target.length) == target;
  15115. }
  15116. /**
  15117. * Creates a compiled template function that can interpolate data properties
  15118. * in "interpolate" delimiters, HTML-escape interpolated data properties in
  15119. * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
  15120. * properties may be accessed as free variables in the template. If a setting
  15121. * object is given, it takes precedence over `_.templateSettings` values.
  15122. *
  15123. * **Note:** In the development build `_.template` utilizes
  15124. * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
  15125. * for easier debugging.
  15126. *
  15127. * For more information on precompiling templates see
  15128. * [lodash's custom builds documentation](https://lodash.com/custom-builds).
  15129. *
  15130. * For more information on Chrome extension sandboxes see
  15131. * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
  15132. *
  15133. * @static
  15134. * @since 0.1.0
  15135. * @memberOf _
  15136. * @category String
  15137. * @param {string} [string=''] The template string.
  15138. * @param {Object} [options={}] The options object.
  15139. * @param {RegExp} [options.escape=_.templateSettings.escape]
  15140. * The HTML "escape" delimiter.
  15141. * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
  15142. * The "evaluate" delimiter.
  15143. * @param {Object} [options.imports=_.templateSettings.imports]
  15144. * An object to import into the template as free variables.
  15145. * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
  15146. * The "interpolate" delimiter.
  15147. * @param {string} [options.sourceURL='lodash.templateSources[n]']
  15148. * The sourceURL of the compiled template.
  15149. * @param {string} [options.variable='obj']
  15150. * The data object variable name.
  15151. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  15152. * @returns {Function} Returns the compiled template function.
  15153. * @example
  15154. *
  15155. * // Use the "interpolate" delimiter to create a compiled template.
  15156. * var compiled = _.template('hello <%= user %>!');
  15157. * compiled({ 'user': 'fred' });
  15158. * // => 'hello fred!'
  15159. *
  15160. * // Use the HTML "escape" delimiter to escape data property values.
  15161. * var compiled = _.template('<b><%- value %></b>');
  15162. * compiled({ 'value': '<script>' });
  15163. * // => '<b>&lt;script&gt;</b>'
  15164. *
  15165. * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
  15166. * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
  15167. * compiled({ 'users': ['fred', 'barney'] });
  15168. * // => '<li>fred</li><li>barney</li>'
  15169. *
  15170. * // Use the internal `print` function in "evaluate" delimiters.
  15171. * var compiled = _.template('<% print("hello " + user); %>!');
  15172. * compiled({ 'user': 'barney' });
  15173. * // => 'hello barney!'
  15174. *
  15175. * // Use the ES template literal delimiter as an "interpolate" delimiter.
  15176. * // Disable support by replacing the "interpolate" delimiter.
  15177. * var compiled = _.template('hello ${ user }!');
  15178. * compiled({ 'user': 'pebbles' });
  15179. * // => 'hello pebbles!'
  15180. *
  15181. * // Use backslashes to treat delimiters as plain text.
  15182. * var compiled = _.template('<%= "\\<%- value %\\>" %>');
  15183. * compiled({ 'value': 'ignored' });
  15184. * // => '<%- value %>'
  15185. *
  15186. * // Use the `imports` option to import `jQuery` as `jq`.
  15187. * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
  15188. * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
  15189. * compiled({ 'users': ['fred', 'barney'] });
  15190. * // => '<li>fred</li><li>barney</li>'
  15191. *
  15192. * // Use the `sourceURL` option to specify a custom sourceURL for the template.
  15193. * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
  15194. * compiled(data);
  15195. * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
  15196. *
  15197. * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
  15198. * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
  15199. * compiled.source;
  15200. * // => function(data) {
  15201. * // var __t, __p = '';
  15202. * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
  15203. * // return __p;
  15204. * // }
  15205. *
  15206. * // Use custom template delimiters.
  15207. * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
  15208. * var compiled = _.template('hello {{ user }}!');
  15209. * compiled({ 'user': 'mustache' });
  15210. * // => 'hello mustache!'
  15211. *
  15212. * // Use the `source` property to inline compiled templates for meaningful
  15213. * // line numbers in error messages and stack traces.
  15214. * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
  15215. * var JST = {\
  15216. * "main": ' + _.template(mainText).source + '\
  15217. * };\
  15218. * ');
  15219. */
  15220. function template(string, options, guard) {
  15221. // Based on John Resig's `tmpl` implementation
  15222. // (http://ejohn.org/blog/javascript-micro-templating/)
  15223. // and Laura Doktorova's doT.js (https://github.com/olado/doT).
  15224. var settings = lodash.templateSettings;
  15225. if (guard && isIterateeCall(string, options, guard)) {
  15226. options = undefined;
  15227. }
  15228. string = toString(string);
  15229. options = assignInWith({}, options, settings, customDefaultsAssignIn);
  15230. var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
  15231. importsKeys = keys(imports),
  15232. importsValues = baseValues(imports, importsKeys);
  15233. var isEscaping,
  15234. isEvaluating,
  15235. index = 0,
  15236. interpolate = options.interpolate || reNoMatch,
  15237. source = "__p += '";
  15238. // Compile the regexp to match each delimiter.
  15239. var reDelimiters = RegExp(
  15240. (options.escape || reNoMatch).source + '|' +
  15241. interpolate.source + '|' +
  15242. (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
  15243. (options.evaluate || reNoMatch).source + '|$'
  15244. , 'g');
  15245. // Use a sourceURL for easier debugging.
  15246. // The sourceURL gets injected into the source that's eval-ed, so be careful
  15247. // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in
  15248. // and escape the comment, thus injecting code that gets evaled.
  15249. var sourceURL = '//# sourceURL=' +
  15250. (hasOwnProperty.call(options, 'sourceURL')
  15251. ? (options.sourceURL + '').replace(/\s/g, ' ')
  15252. : ('lodash.templateSources[' + (++templateCounter) + ']')
  15253. ) + '\n';
  15254. string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
  15255. interpolateValue || (interpolateValue = esTemplateValue);
  15256. // Escape characters that can't be included in string literals.
  15257. source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
  15258. // Replace delimiters with snippets.
  15259. if (escapeValue) {
  15260. isEscaping = true;
  15261. source += "' +\n__e(" + escapeValue + ") +\n'";
  15262. }
  15263. if (evaluateValue) {
  15264. isEvaluating = true;
  15265. source += "';\n" + evaluateValue + ";\n__p += '";
  15266. }
  15267. if (interpolateValue) {
  15268. source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
  15269. }
  15270. index = offset + match.length;
  15271. // The JS engine embedded in Adobe products needs `match` returned in
  15272. // order to produce the correct `offset` value.
  15273. return match;
  15274. });
  15275. source += "';\n";
  15276. // If `variable` is not specified wrap a with-statement around the generated
  15277. // code to add the data object to the top of the scope chain.
  15278. var variable = hasOwnProperty.call(options, 'variable') && options.variable;
  15279. if (!variable) {
  15280. source = 'with (obj) {\n' + source + '\n}\n';
  15281. }
  15282. // Throw an error if a forbidden character was found in `variable`, to prevent
  15283. // potential command injection attacks.
  15284. else if (reForbiddenIdentifierChars.test(variable)) {
  15285. throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);
  15286. }
  15287. // Cleanup code by stripping empty strings.
  15288. source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
  15289. .replace(reEmptyStringMiddle, '$1')
  15290. .replace(reEmptyStringTrailing, '$1;');
  15291. // Frame code as the function body.
  15292. source = 'function(' + (variable || 'obj') + ') {\n' +
  15293. (variable
  15294. ? ''
  15295. : 'obj || (obj = {});\n'
  15296. ) +
  15297. "var __t, __p = ''" +
  15298. (isEscaping
  15299. ? ', __e = _.escape'
  15300. : ''
  15301. ) +
  15302. (isEvaluating
  15303. ? ', __j = Array.prototype.join;\n' +
  15304. "function print() { __p += __j.call(arguments, '') }\n"
  15305. : ';\n'
  15306. ) +
  15307. source +
  15308. 'return __p\n}';
  15309. var result = attempt(function() {
  15310. return Function(importsKeys, sourceURL + 'return ' + source)
  15311. .apply(undefined, importsValues);
  15312. });
  15313. // Provide the compiled function's source by its `toString` method or
  15314. // the `source` property as a convenience for inlining compiled templates.
  15315. result.source = source;
  15316. if (isError(result)) {
  15317. throw result;
  15318. }
  15319. return result;
  15320. }
  15321. /**
  15322. * Converts `string`, as a whole, to lower case just like
  15323. * [String#toLowerCase](https://mdn.io/toLowerCase).
  15324. *
  15325. * @static
  15326. * @memberOf _
  15327. * @since 4.0.0
  15328. * @category String
  15329. * @param {string} [string=''] The string to convert.
  15330. * @returns {string} Returns the lower cased string.
  15331. * @example
  15332. *
  15333. * _.toLower('--Foo-Bar--');
  15334. * // => '--foo-bar--'
  15335. *
  15336. * _.toLower('fooBar');
  15337. * // => 'foobar'
  15338. *
  15339. * _.toLower('__FOO_BAR__');
  15340. * // => '__foo_bar__'
  15341. */
  15342. function toLower(value) {
  15343. return toString(value).toLowerCase();
  15344. }
  15345. /**
  15346. * Converts `string`, as a whole, to upper case just like
  15347. * [String#toUpperCase](https://mdn.io/toUpperCase).
  15348. *
  15349. * @static
  15350. * @memberOf _
  15351. * @since 4.0.0
  15352. * @category String
  15353. * @param {string} [string=''] The string to convert.
  15354. * @returns {string} Returns the upper cased string.
  15355. * @example
  15356. *
  15357. * _.toUpper('--foo-bar--');
  15358. * // => '--FOO-BAR--'
  15359. *
  15360. * _.toUpper('fooBar');
  15361. * // => 'FOOBAR'
  15362. *
  15363. * _.toUpper('__foo_bar__');
  15364. * // => '__FOO_BAR__'
  15365. */
  15366. function toUpper(value) {
  15367. return toString(value).toUpperCase();
  15368. }
  15369. /**
  15370. * Removes leading and trailing whitespace or specified characters from `string`.
  15371. *
  15372. * @static
  15373. * @memberOf _
  15374. * @since 3.0.0
  15375. * @category String
  15376. * @param {string} [string=''] The string to trim.
  15377. * @param {string} [chars=whitespace] The characters to trim.
  15378. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  15379. * @returns {string} Returns the trimmed string.
  15380. * @example
  15381. *
  15382. * _.trim(' abc ');
  15383. * // => 'abc'
  15384. *
  15385. * _.trim('-_-abc-_-', '_-');
  15386. * // => 'abc'
  15387. *
  15388. * _.map([' foo ', ' bar '], _.trim);
  15389. * // => ['foo', 'bar']
  15390. */
  15391. function trim(string, chars, guard) {
  15392. string = toString(string);
  15393. if (string && (guard || chars === undefined)) {
  15394. return baseTrim(string);
  15395. }
  15396. if (!string || !(chars = baseToString(chars))) {
  15397. return string;
  15398. }
  15399. var strSymbols = stringToArray(string),
  15400. chrSymbols = stringToArray(chars),
  15401. start = charsStartIndex(strSymbols, chrSymbols),
  15402. end = charsEndIndex(strSymbols, chrSymbols) + 1;
  15403. return castSlice(strSymbols, start, end).join('');
  15404. }
  15405. /**
  15406. * Removes trailing whitespace or specified characters from `string`.
  15407. *
  15408. * @static
  15409. * @memberOf _
  15410. * @since 4.0.0
  15411. * @category String
  15412. * @param {string} [string=''] The string to trim.
  15413. * @param {string} [chars=whitespace] The characters to trim.
  15414. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  15415. * @returns {string} Returns the trimmed string.
  15416. * @example
  15417. *
  15418. * _.trimEnd(' abc ');
  15419. * // => ' abc'
  15420. *
  15421. * _.trimEnd('-_-abc-_-', '_-');
  15422. * // => '-_-abc'
  15423. */
  15424. function trimEnd(string, chars, guard) {
  15425. string = toString(string);
  15426. if (string && (guard || chars === undefined)) {
  15427. return string.slice(0, trimmedEndIndex(string) + 1);
  15428. }
  15429. if (!string || !(chars = baseToString(chars))) {
  15430. return string;
  15431. }
  15432. var strSymbols = stringToArray(string),
  15433. end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
  15434. return castSlice(strSymbols, 0, end).join('');
  15435. }
  15436. /**
  15437. * Removes leading whitespace or specified characters from `string`.
  15438. *
  15439. * @static
  15440. * @memberOf _
  15441. * @since 4.0.0
  15442. * @category String
  15443. * @param {string} [string=''] The string to trim.
  15444. * @param {string} [chars=whitespace] The characters to trim.
  15445. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  15446. * @returns {string} Returns the trimmed string.
  15447. * @example
  15448. *
  15449. * _.trimStart(' abc ');
  15450. * // => 'abc '
  15451. *
  15452. * _.trimStart('-_-abc-_-', '_-');
  15453. * // => 'abc-_-'
  15454. */
  15455. function trimStart(string, chars, guard) {
  15456. string = toString(string);
  15457. if (string && (guard || chars === undefined)) {
  15458. return string.replace(reTrimStart, '');
  15459. }
  15460. if (!string || !(chars = baseToString(chars))) {
  15461. return string;
  15462. }
  15463. var strSymbols = stringToArray(string),
  15464. start = charsStartIndex(strSymbols, stringToArray(chars));
  15465. return castSlice(strSymbols, start).join('');
  15466. }
  15467. /**
  15468. * Truncates `string` if it's longer than the given maximum string length.
  15469. * The last characters of the truncated string are replaced with the omission
  15470. * string which defaults to "...".
  15471. *
  15472. * @static
  15473. * @memberOf _
  15474. * @since 4.0.0
  15475. * @category String
  15476. * @param {string} [string=''] The string to truncate.
  15477. * @param {Object} [options={}] The options object.
  15478. * @param {number} [options.length=30] The maximum string length.
  15479. * @param {string} [options.omission='...'] The string to indicate text is omitted.
  15480. * @param {RegExp|string} [options.separator] The separator pattern to truncate to.
  15481. * @returns {string} Returns the truncated string.
  15482. * @example
  15483. *
  15484. * _.truncate('hi-diddly-ho there, neighborino');
  15485. * // => 'hi-diddly-ho there, neighbo...'
  15486. *
  15487. * _.truncate('hi-diddly-ho there, neighborino', {
  15488. * 'length': 24,
  15489. * 'separator': ' '
  15490. * });
  15491. * // => 'hi-diddly-ho there,...'
  15492. *
  15493. * _.truncate('hi-diddly-ho there, neighborino', {
  15494. * 'length': 24,
  15495. * 'separator': /,? +/
  15496. * });
  15497. * // => 'hi-diddly-ho there...'
  15498. *
  15499. * _.truncate('hi-diddly-ho there, neighborino', {
  15500. * 'omission': ' [...]'
  15501. * });
  15502. * // => 'hi-diddly-ho there, neig [...]'
  15503. */
  15504. function truncate(string, options) {
  15505. var length = DEFAULT_TRUNC_LENGTH,
  15506. omission = DEFAULT_TRUNC_OMISSION;
  15507. if (isObject(options)) {
  15508. var separator = 'separator' in options ? options.separator : separator;
  15509. length = 'length' in options ? toInteger(options.length) : length;
  15510. omission = 'omission' in options ? baseToString(options.omission) : omission;
  15511. }
  15512. string = toString(string);
  15513. var strLength = string.length;
  15514. if (hasUnicode(string)) {
  15515. var strSymbols = stringToArray(string);
  15516. strLength = strSymbols.length;
  15517. }
  15518. if (length >= strLength) {
  15519. return string;
  15520. }
  15521. var end = length - stringSize(omission);
  15522. if (end < 1) {
  15523. return omission;
  15524. }
  15525. var result = strSymbols
  15526. ? castSlice(strSymbols, 0, end).join('')
  15527. : string.slice(0, end);
  15528. if (separator === undefined) {
  15529. return result + omission;
  15530. }
  15531. if (strSymbols) {
  15532. end += (result.length - end);
  15533. }
  15534. if (isRegExp(separator)) {
  15535. if (string.slice(end).search(separator)) {
  15536. var match,
  15537. substring = result;
  15538. if (!separator.global) {
  15539. separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
  15540. }
  15541. separator.lastIndex = 0;
  15542. while ((match = separator.exec(substring))) {
  15543. var newEnd = match.index;
  15544. }
  15545. result = result.slice(0, newEnd === undefined ? end : newEnd);
  15546. }
  15547. } else if (string.indexOf(baseToString(separator), end) != end) {
  15548. var index = result.lastIndexOf(separator);
  15549. if (index > -1) {
  15550. result = result.slice(0, index);
  15551. }
  15552. }
  15553. return result + omission;
  15554. }
  15555. /**
  15556. * The inverse of `_.escape`; this method converts the HTML entities
  15557. * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to
  15558. * their corresponding characters.
  15559. *
  15560. * **Note:** No other HTML entities are unescaped. To unescape additional
  15561. * HTML entities use a third-party library like [_he_](https://mths.be/he).
  15562. *
  15563. * @static
  15564. * @memberOf _
  15565. * @since 0.6.0
  15566. * @category String
  15567. * @param {string} [string=''] The string to unescape.
  15568. * @returns {string} Returns the unescaped string.
  15569. * @example
  15570. *
  15571. * _.unescape('fred, barney, &amp; pebbles');
  15572. * // => 'fred, barney, & pebbles'
  15573. */
  15574. function unescape(string) {
  15575. string = toString(string);
  15576. return (string && reHasEscapedHtml.test(string))
  15577. ? string.replace(reEscapedHtml, unescapeHtmlChar)
  15578. : string;
  15579. }
  15580. /**
  15581. * Converts `string`, as space separated words, to upper case.
  15582. *
  15583. * @static
  15584. * @memberOf _
  15585. * @since 4.0.0
  15586. * @category String
  15587. * @param {string} [string=''] The string to convert.
  15588. * @returns {string} Returns the upper cased string.
  15589. * @example
  15590. *
  15591. * _.upperCase('--foo-bar');
  15592. * // => 'FOO BAR'
  15593. *
  15594. * _.upperCase('fooBar');
  15595. * // => 'FOO BAR'
  15596. *
  15597. * _.upperCase('__foo_bar__');
  15598. * // => 'FOO BAR'
  15599. */
  15600. var upperCase = createCompounder(function(result, word, index) {
  15601. return result + (index ? ' ' : '') + word.toUpperCase();
  15602. });
  15603. /**
  15604. * Converts the first character of `string` to upper case.
  15605. *
  15606. * @static
  15607. * @memberOf _
  15608. * @since 4.0.0
  15609. * @category String
  15610. * @param {string} [string=''] The string to convert.
  15611. * @returns {string} Returns the converted string.
  15612. * @example
  15613. *
  15614. * _.upperFirst('fred');
  15615. * // => 'Fred'
  15616. *
  15617. * _.upperFirst('FRED');
  15618. * // => 'FRED'
  15619. */
  15620. var upperFirst = createCaseFirst('toUpperCase');
  15621. /**
  15622. * Splits `string` into an array of its words.
  15623. *
  15624. * @static
  15625. * @memberOf _
  15626. * @since 3.0.0
  15627. * @category String
  15628. * @param {string} [string=''] The string to inspect.
  15629. * @param {RegExp|string} [pattern] The pattern to match words.
  15630. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  15631. * @returns {Array} Returns the words of `string`.
  15632. * @example
  15633. *
  15634. * _.words('fred, barney, & pebbles');
  15635. * // => ['fred', 'barney', 'pebbles']
  15636. *
  15637. * _.words('fred, barney, & pebbles', /[^, ]+/g);
  15638. * // => ['fred', 'barney', '&', 'pebbles']
  15639. */
  15640. function words(string, pattern, guard) {
  15641. string = toString(string);
  15642. pattern = guard ? undefined : pattern;
  15643. if (pattern === undefined) {
  15644. return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
  15645. }
  15646. return string.match(pattern) || [];
  15647. }
  15648. /*------------------------------------------------------------------------*/
  15649. /**
  15650. * Attempts to invoke `func`, returning either the result or the caught error
  15651. * object. Any additional arguments are provided to `func` when it's invoked.
  15652. *
  15653. * @static
  15654. * @memberOf _
  15655. * @since 3.0.0
  15656. * @category Util
  15657. * @param {Function} func The function to attempt.
  15658. * @param {...*} [args] The arguments to invoke `func` with.
  15659. * @returns {*} Returns the `func` result or error object.
  15660. * @example
  15661. *
  15662. * // Avoid throwing errors for invalid selectors.
  15663. * var elements = _.attempt(function(selector) {
  15664. * return document.querySelectorAll(selector);
  15665. * }, '>_>');
  15666. *
  15667. * if (_.isError(elements)) {
  15668. * elements = [];
  15669. * }
  15670. */
  15671. var attempt = baseRest(function(func, args) {
  15672. try {
  15673. return apply(func, undefined, args);
  15674. } catch (e) {
  15675. return isError(e) ? e : new Error(e);
  15676. }
  15677. });
  15678. /**
  15679. * Binds methods of an object to the object itself, overwriting the existing
  15680. * method.
  15681. *
  15682. * **Note:** This method doesn't set the "length" property of bound functions.
  15683. *
  15684. * @static
  15685. * @since 0.1.0
  15686. * @memberOf _
  15687. * @category Util
  15688. * @param {Object} object The object to bind and assign the bound methods to.
  15689. * @param {...(string|string[])} methodNames The object method names to bind.
  15690. * @returns {Object} Returns `object`.
  15691. * @example
  15692. *
  15693. * var view = {
  15694. * 'label': 'docs',
  15695. * 'click': function() {
  15696. * console.log('clicked ' + this.label);
  15697. * }
  15698. * };
  15699. *
  15700. * _.bindAll(view, ['click']);
  15701. * jQuery(element).on('click', view.click);
  15702. * // => Logs 'clicked docs' when clicked.
  15703. */
  15704. var bindAll = flatRest(function(object, methodNames) {
  15705. arrayEach(methodNames, function(key) {
  15706. key = toKey(key);
  15707. baseAssignValue(object, key, bind(object[key], object));
  15708. });
  15709. return object;
  15710. });
  15711. /**
  15712. * Creates a function that iterates over `pairs` and invokes the corresponding
  15713. * function of the first predicate to return truthy. The predicate-function
  15714. * pairs are invoked with the `this` binding and arguments of the created
  15715. * function.
  15716. *
  15717. * @static
  15718. * @memberOf _
  15719. * @since 4.0.0
  15720. * @category Util
  15721. * @param {Array} pairs The predicate-function pairs.
  15722. * @returns {Function} Returns the new composite function.
  15723. * @example
  15724. *
  15725. * var func = _.cond([
  15726. * [_.matches({ 'a': 1 }), _.constant('matches A')],
  15727. * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
  15728. * [_.stubTrue, _.constant('no match')]
  15729. * ]);
  15730. *
  15731. * func({ 'a': 1, 'b': 2 });
  15732. * // => 'matches A'
  15733. *
  15734. * func({ 'a': 0, 'b': 1 });
  15735. * // => 'matches B'
  15736. *
  15737. * func({ 'a': '1', 'b': '2' });
  15738. * // => 'no match'
  15739. */
  15740. function cond(pairs) {
  15741. var length = pairs == null ? 0 : pairs.length,
  15742. toIteratee = getIteratee();
  15743. pairs = !length ? [] : arrayMap(pairs, function(pair) {
  15744. if (typeof pair[1] != 'function') {
  15745. throw new TypeError(FUNC_ERROR_TEXT);
  15746. }
  15747. return [toIteratee(pair[0]), pair[1]];
  15748. });
  15749. return baseRest(function(args) {
  15750. var index = -1;
  15751. while (++index < length) {
  15752. var pair = pairs[index];
  15753. if (apply(pair[0], this, args)) {
  15754. return apply(pair[1], this, args);
  15755. }
  15756. }
  15757. });
  15758. }
  15759. /**
  15760. * Creates a function that invokes the predicate properties of `source` with
  15761. * the corresponding property values of a given object, returning `true` if
  15762. * all predicates return truthy, else `false`.
  15763. *
  15764. * **Note:** The created function is equivalent to `_.conformsTo` with
  15765. * `source` partially applied.
  15766. *
  15767. * @static
  15768. * @memberOf _
  15769. * @since 4.0.0
  15770. * @category Util
  15771. * @param {Object} source The object of property predicates to conform to.
  15772. * @returns {Function} Returns the new spec function.
  15773. * @example
  15774. *
  15775. * var objects = [
  15776. * { 'a': 2, 'b': 1 },
  15777. * { 'a': 1, 'b': 2 }
  15778. * ];
  15779. *
  15780. * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));
  15781. * // => [{ 'a': 1, 'b': 2 }]
  15782. */
  15783. function conforms(source) {
  15784. return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
  15785. }
  15786. /**
  15787. * Creates a function that returns `value`.
  15788. *
  15789. * @static
  15790. * @memberOf _
  15791. * @since 2.4.0
  15792. * @category Util
  15793. * @param {*} value The value to return from the new function.
  15794. * @returns {Function} Returns the new constant function.
  15795. * @example
  15796. *
  15797. * var objects = _.times(2, _.constant({ 'a': 1 }));
  15798. *
  15799. * console.log(objects);
  15800. * // => [{ 'a': 1 }, { 'a': 1 }]
  15801. *
  15802. * console.log(objects[0] === objects[1]);
  15803. * // => true
  15804. */
  15805. function constant(value) {
  15806. return function() {
  15807. return value;
  15808. };
  15809. }
  15810. /**
  15811. * Checks `value` to determine whether a default value should be returned in
  15812. * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
  15813. * or `undefined`.
  15814. *
  15815. * @static
  15816. * @memberOf _
  15817. * @since 4.14.0
  15818. * @category Util
  15819. * @param {*} value The value to check.
  15820. * @param {*} defaultValue The default value.
  15821. * @returns {*} Returns the resolved value.
  15822. * @example
  15823. *
  15824. * _.defaultTo(1, 10);
  15825. * // => 1
  15826. *
  15827. * _.defaultTo(undefined, 10);
  15828. * // => 10
  15829. */
  15830. function defaultTo(value, defaultValue) {
  15831. return (value == null || value !== value) ? defaultValue : value;
  15832. }
  15833. /**
  15834. * Creates a function that returns the result of invoking the given functions
  15835. * with the `this` binding of the created function, where each successive
  15836. * invocation is supplied the return value of the previous.
  15837. *
  15838. * @static
  15839. * @memberOf _
  15840. * @since 3.0.0
  15841. * @category Util
  15842. * @param {...(Function|Function[])} [funcs] The functions to invoke.
  15843. * @returns {Function} Returns the new composite function.
  15844. * @see _.flowRight
  15845. * @example
  15846. *
  15847. * function square(n) {
  15848. * return n * n;
  15849. * }
  15850. *
  15851. * var addSquare = _.flow([_.add, square]);
  15852. * addSquare(1, 2);
  15853. * // => 9
  15854. */
  15855. var flow = createFlow();
  15856. /**
  15857. * This method is like `_.flow` except that it creates a function that
  15858. * invokes the given functions from right to left.
  15859. *
  15860. * @static
  15861. * @since 3.0.0
  15862. * @memberOf _
  15863. * @category Util
  15864. * @param {...(Function|Function[])} [funcs] The functions to invoke.
  15865. * @returns {Function} Returns the new composite function.
  15866. * @see _.flow
  15867. * @example
  15868. *
  15869. * function square(n) {
  15870. * return n * n;
  15871. * }
  15872. *
  15873. * var addSquare = _.flowRight([square, _.add]);
  15874. * addSquare(1, 2);
  15875. * // => 9
  15876. */
  15877. var flowRight = createFlow(true);
  15878. /**
  15879. * This method returns the first argument it receives.
  15880. *
  15881. * @static
  15882. * @since 0.1.0
  15883. * @memberOf _
  15884. * @category Util
  15885. * @param {*} value Any value.
  15886. * @returns {*} Returns `value`.
  15887. * @example
  15888. *
  15889. * var object = { 'a': 1 };
  15890. *
  15891. * console.log(_.identity(object) === object);
  15892. * // => true
  15893. */
  15894. function identity(value) {
  15895. return value;
  15896. }
  15897. /**
  15898. * Creates a function that invokes `func` with the arguments of the created
  15899. * function. If `func` is a property name, the created function returns the
  15900. * property value for a given element. If `func` is an array or object, the
  15901. * created function returns `true` for elements that contain the equivalent
  15902. * source properties, otherwise it returns `false`.
  15903. *
  15904. * @static
  15905. * @since 4.0.0
  15906. * @memberOf _
  15907. * @category Util
  15908. * @param {*} [func=_.identity] The value to convert to a callback.
  15909. * @returns {Function} Returns the callback.
  15910. * @example
  15911. *
  15912. * var users = [
  15913. * { 'user': 'barney', 'age': 36, 'active': true },
  15914. * { 'user': 'fred', 'age': 40, 'active': false }
  15915. * ];
  15916. *
  15917. * // The `_.matches` iteratee shorthand.
  15918. * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
  15919. * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
  15920. *
  15921. * // The `_.matchesProperty` iteratee shorthand.
  15922. * _.filter(users, _.iteratee(['user', 'fred']));
  15923. * // => [{ 'user': 'fred', 'age': 40 }]
  15924. *
  15925. * // The `_.property` iteratee shorthand.
  15926. * _.map(users, _.iteratee('user'));
  15927. * // => ['barney', 'fred']
  15928. *
  15929. * // Create custom iteratee shorthands.
  15930. * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
  15931. * return !_.isRegExp(func) ? iteratee(func) : function(string) {
  15932. * return func.test(string);
  15933. * };
  15934. * });
  15935. *
  15936. * _.filter(['abc', 'def'], /ef/);
  15937. * // => ['def']
  15938. */
  15939. function iteratee(func) {
  15940. return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));
  15941. }
  15942. /**
  15943. * Creates a function that performs a partial deep comparison between a given
  15944. * object and `source`, returning `true` if the given object has equivalent
  15945. * property values, else `false`.
  15946. *
  15947. * **Note:** The created function is equivalent to `_.isMatch` with `source`
  15948. * partially applied.
  15949. *
  15950. * Partial comparisons will match empty array and empty object `source`
  15951. * values against any array or object value, respectively. See `_.isEqual`
  15952. * for a list of supported value comparisons.
  15953. *
  15954. * **Note:** Multiple values can be checked by combining several matchers
  15955. * using `_.overSome`
  15956. *
  15957. * @static
  15958. * @memberOf _
  15959. * @since 3.0.0
  15960. * @category Util
  15961. * @param {Object} source The object of property values to match.
  15962. * @returns {Function} Returns the new spec function.
  15963. * @example
  15964. *
  15965. * var objects = [
  15966. * { 'a': 1, 'b': 2, 'c': 3 },
  15967. * { 'a': 4, 'b': 5, 'c': 6 }
  15968. * ];
  15969. *
  15970. * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
  15971. * // => [{ 'a': 4, 'b': 5, 'c': 6 }]
  15972. *
  15973. * // Checking for several possible values
  15974. * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));
  15975. * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
  15976. */
  15977. function matches(source) {
  15978. return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
  15979. }
  15980. /**
  15981. * Creates a function that performs a partial deep comparison between the
  15982. * value at `path` of a given object to `srcValue`, returning `true` if the
  15983. * object value is equivalent, else `false`.
  15984. *
  15985. * **Note:** Partial comparisons will match empty array and empty object
  15986. * `srcValue` values against any array or object value, respectively. See
  15987. * `_.isEqual` for a list of supported value comparisons.
  15988. *
  15989. * **Note:** Multiple values can be checked by combining several matchers
  15990. * using `_.overSome`
  15991. *
  15992. * @static
  15993. * @memberOf _
  15994. * @since 3.2.0
  15995. * @category Util
  15996. * @param {Array|string} path The path of the property to get.
  15997. * @param {*} srcValue The value to match.
  15998. * @returns {Function} Returns the new spec function.
  15999. * @example
  16000. *
  16001. * var objects = [
  16002. * { 'a': 1, 'b': 2, 'c': 3 },
  16003. * { 'a': 4, 'b': 5, 'c': 6 }
  16004. * ];
  16005. *
  16006. * _.find(objects, _.matchesProperty('a', 4));
  16007. * // => { 'a': 4, 'b': 5, 'c': 6 }
  16008. *
  16009. * // Checking for several possible values
  16010. * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));
  16011. * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
  16012. */
  16013. function matchesProperty(path, srcValue) {
  16014. return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
  16015. }
  16016. /**
  16017. * Creates a function that invokes the method at `path` of a given object.
  16018. * Any additional arguments are provided to the invoked method.
  16019. *
  16020. * @static
  16021. * @memberOf _
  16022. * @since 3.7.0
  16023. * @category Util
  16024. * @param {Array|string} path The path of the method to invoke.
  16025. * @param {...*} [args] The arguments to invoke the method with.
  16026. * @returns {Function} Returns the new invoker function.
  16027. * @example
  16028. *
  16029. * var objects = [
  16030. * { 'a': { 'b': _.constant(2) } },
  16031. * { 'a': { 'b': _.constant(1) } }
  16032. * ];
  16033. *
  16034. * _.map(objects, _.method('a.b'));
  16035. * // => [2, 1]
  16036. *
  16037. * _.map(objects, _.method(['a', 'b']));
  16038. * // => [2, 1]
  16039. */
  16040. var method = baseRest(function(path, args) {
  16041. return function(object) {
  16042. return baseInvoke(object, path, args);
  16043. };
  16044. });
  16045. /**
  16046. * The opposite of `_.method`; this method creates a function that invokes
  16047. * the method at a given path of `object`. Any additional arguments are
  16048. * provided to the invoked method.
  16049. *
  16050. * @static
  16051. * @memberOf _
  16052. * @since 3.7.0
  16053. * @category Util
  16054. * @param {Object} object The object to query.
  16055. * @param {...*} [args] The arguments to invoke the method with.
  16056. * @returns {Function} Returns the new invoker function.
  16057. * @example
  16058. *
  16059. * var array = _.times(3, _.constant),
  16060. * object = { 'a': array, 'b': array, 'c': array };
  16061. *
  16062. * _.map(['a[2]', 'c[0]'], _.methodOf(object));
  16063. * // => [2, 0]
  16064. *
  16065. * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
  16066. * // => [2, 0]
  16067. */
  16068. var methodOf = baseRest(function(object, args) {
  16069. return function(path) {
  16070. return baseInvoke(object, path, args);
  16071. };
  16072. });
  16073. /**
  16074. * Adds all own enumerable string keyed function properties of a source
  16075. * object to the destination object. If `object` is a function, then methods
  16076. * are added to its prototype as well.
  16077. *
  16078. * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
  16079. * avoid conflicts caused by modifying the original.
  16080. *
  16081. * @static
  16082. * @since 0.1.0
  16083. * @memberOf _
  16084. * @category Util
  16085. * @param {Function|Object} [object=lodash] The destination object.
  16086. * @param {Object} source The object of functions to add.
  16087. * @param {Object} [options={}] The options object.
  16088. * @param {boolean} [options.chain=true] Specify whether mixins are chainable.
  16089. * @returns {Function|Object} Returns `object`.
  16090. * @example
  16091. *
  16092. * function vowels(string) {
  16093. * return _.filter(string, function(v) {
  16094. * return /[aeiou]/i.test(v);
  16095. * });
  16096. * }
  16097. *
  16098. * _.mixin({ 'vowels': vowels });
  16099. * _.vowels('fred');
  16100. * // => ['e']
  16101. *
  16102. * _('fred').vowels().value();
  16103. * // => ['e']
  16104. *
  16105. * _.mixin({ 'vowels': vowels }, { 'chain': false });
  16106. * _('fred').vowels();
  16107. * // => ['e']
  16108. */
  16109. function mixin(object, source, options) {
  16110. var props = keys(source),
  16111. methodNames = baseFunctions(source, props);
  16112. if (options == null &&
  16113. !(isObject(source) && (methodNames.length || !props.length))) {
  16114. options = source;
  16115. source = object;
  16116. object = this;
  16117. methodNames = baseFunctions(source, keys(source));
  16118. }
  16119. var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
  16120. isFunc = isFunction(object);
  16121. arrayEach(methodNames, function(methodName) {
  16122. var func = source[methodName];
  16123. object[methodName] = func;
  16124. if (isFunc) {
  16125. object.prototype[methodName] = function() {
  16126. var chainAll = this.__chain__;
  16127. if (chain || chainAll) {
  16128. var result = object(this.__wrapped__),
  16129. actions = result.__actions__ = copyArray(this.__actions__);
  16130. actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
  16131. result.__chain__ = chainAll;
  16132. return result;
  16133. }
  16134. return func.apply(object, arrayPush([this.value()], arguments));
  16135. };
  16136. }
  16137. });
  16138. return object;
  16139. }
  16140. /**
  16141. * Reverts the `_` variable to its previous value and returns a reference to
  16142. * the `lodash` function.
  16143. *
  16144. * @static
  16145. * @since 0.1.0
  16146. * @memberOf _
  16147. * @category Util
  16148. * @returns {Function} Returns the `lodash` function.
  16149. * @example
  16150. *
  16151. * var lodash = _.noConflict();
  16152. */
  16153. function noConflict() {
  16154. if (root._ === this) {
  16155. root._ = oldDash;
  16156. }
  16157. return this;
  16158. }
  16159. /**
  16160. * This method returns `undefined`.
  16161. *
  16162. * @static
  16163. * @memberOf _
  16164. * @since 2.3.0
  16165. * @category Util
  16166. * @example
  16167. *
  16168. * _.times(2, _.noop);
  16169. * // => [undefined, undefined]
  16170. */
  16171. function noop() {
  16172. // No operation performed.
  16173. }
  16174. /**
  16175. * Creates a function that gets the argument at index `n`. If `n` is negative,
  16176. * the nth argument from the end is returned.
  16177. *
  16178. * @static
  16179. * @memberOf _
  16180. * @since 4.0.0
  16181. * @category Util
  16182. * @param {number} [n=0] The index of the argument to return.
  16183. * @returns {Function} Returns the new pass-thru function.
  16184. * @example
  16185. *
  16186. * var func = _.nthArg(1);
  16187. * func('a', 'b', 'c', 'd');
  16188. * // => 'b'
  16189. *
  16190. * var func = _.nthArg(-2);
  16191. * func('a', 'b', 'c', 'd');
  16192. * // => 'c'
  16193. */
  16194. function nthArg(n) {
  16195. n = toInteger(n);
  16196. return baseRest(function(args) {
  16197. return baseNth(args, n);
  16198. });
  16199. }
  16200. /**
  16201. * Creates a function that invokes `iteratees` with the arguments it receives
  16202. * and returns their results.
  16203. *
  16204. * @static
  16205. * @memberOf _
  16206. * @since 4.0.0
  16207. * @category Util
  16208. * @param {...(Function|Function[])} [iteratees=[_.identity]]
  16209. * The iteratees to invoke.
  16210. * @returns {Function} Returns the new function.
  16211. * @example
  16212. *
  16213. * var func = _.over([Math.max, Math.min]);
  16214. *
  16215. * func(1, 2, 3, 4);
  16216. * // => [4, 1]
  16217. */
  16218. var over = createOver(arrayMap);
  16219. /**
  16220. * Creates a function that checks if **all** of the `predicates` return
  16221. * truthy when invoked with the arguments it receives.
  16222. *
  16223. * Following shorthands are possible for providing predicates.
  16224. * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
  16225. * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
  16226. *
  16227. * @static
  16228. * @memberOf _
  16229. * @since 4.0.0
  16230. * @category Util
  16231. * @param {...(Function|Function[])} [predicates=[_.identity]]
  16232. * The predicates to check.
  16233. * @returns {Function} Returns the new function.
  16234. * @example
  16235. *
  16236. * var func = _.overEvery([Boolean, isFinite]);
  16237. *
  16238. * func('1');
  16239. * // => true
  16240. *
  16241. * func(null);
  16242. * // => false
  16243. *
  16244. * func(NaN);
  16245. * // => false
  16246. */
  16247. var overEvery = createOver(arrayEvery);
  16248. /**
  16249. * Creates a function that checks if **any** of the `predicates` return
  16250. * truthy when invoked with the arguments it receives.
  16251. *
  16252. * Following shorthands are possible for providing predicates.
  16253. * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
  16254. * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
  16255. *
  16256. * @static
  16257. * @memberOf _
  16258. * @since 4.0.0
  16259. * @category Util
  16260. * @param {...(Function|Function[])} [predicates=[_.identity]]
  16261. * The predicates to check.
  16262. * @returns {Function} Returns the new function.
  16263. * @example
  16264. *
  16265. * var func = _.overSome([Boolean, isFinite]);
  16266. *
  16267. * func('1');
  16268. * // => true
  16269. *
  16270. * func(null);
  16271. * // => true
  16272. *
  16273. * func(NaN);
  16274. * // => false
  16275. *
  16276. * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])
  16277. * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])
  16278. */
  16279. var overSome = createOver(arraySome);
  16280. /**
  16281. * Creates a function that returns the value at `path` of a given object.
  16282. *
  16283. * @static
  16284. * @memberOf _
  16285. * @since 2.4.0
  16286. * @category Util
  16287. * @param {Array|string} path The path of the property to get.
  16288. * @returns {Function} Returns the new accessor function.
  16289. * @example
  16290. *
  16291. * var objects = [
  16292. * { 'a': { 'b': 2 } },
  16293. * { 'a': { 'b': 1 } }
  16294. * ];
  16295. *
  16296. * _.map(objects, _.property('a.b'));
  16297. * // => [2, 1]
  16298. *
  16299. * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
  16300. * // => [1, 2]
  16301. */
  16302. function property(path) {
  16303. return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
  16304. }
  16305. /**
  16306. * The opposite of `_.property`; this method creates a function that returns
  16307. * the value at a given path of `object`.
  16308. *
  16309. * @static
  16310. * @memberOf _
  16311. * @since 3.0.0
  16312. * @category Util
  16313. * @param {Object} object The object to query.
  16314. * @returns {Function} Returns the new accessor function.
  16315. * @example
  16316. *
  16317. * var array = [0, 1, 2],
  16318. * object = { 'a': array, 'b': array, 'c': array };
  16319. *
  16320. * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
  16321. * // => [2, 0]
  16322. *
  16323. * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
  16324. * // => [2, 0]
  16325. */
  16326. function propertyOf(object) {
  16327. return function(path) {
  16328. return object == null ? undefined : baseGet(object, path);
  16329. };
  16330. }
  16331. /**
  16332. * Creates an array of numbers (positive and/or negative) progressing from
  16333. * `start` up to, but not including, `end`. A step of `-1` is used if a negative
  16334. * `start` is specified without an `end` or `step`. If `end` is not specified,
  16335. * it's set to `start` with `start` then set to `0`.
  16336. *
  16337. * **Note:** JavaScript follows the IEEE-754 standard for resolving
  16338. * floating-point values which can produce unexpected results.
  16339. *
  16340. * @static
  16341. * @since 0.1.0
  16342. * @memberOf _
  16343. * @category Util
  16344. * @param {number} [start=0] The start of the range.
  16345. * @param {number} end The end of the range.
  16346. * @param {number} [step=1] The value to increment or decrement by.
  16347. * @returns {Array} Returns the range of numbers.
  16348. * @see _.inRange, _.rangeRight
  16349. * @example
  16350. *
  16351. * _.range(4);
  16352. * // => [0, 1, 2, 3]
  16353. *
  16354. * _.range(-4);
  16355. * // => [0, -1, -2, -3]
  16356. *
  16357. * _.range(1, 5);
  16358. * // => [1, 2, 3, 4]
  16359. *
  16360. * _.range(0, 20, 5);
  16361. * // => [0, 5, 10, 15]
  16362. *
  16363. * _.range(0, -4, -1);
  16364. * // => [0, -1, -2, -3]
  16365. *
  16366. * _.range(1, 4, 0);
  16367. * // => [1, 1, 1]
  16368. *
  16369. * _.range(0);
  16370. * // => []
  16371. */
  16372. var range = createRange();
  16373. /**
  16374. * This method is like `_.range` except that it populates values in
  16375. * descending order.
  16376. *
  16377. * @static
  16378. * @memberOf _
  16379. * @since 4.0.0
  16380. * @category Util
  16381. * @param {number} [start=0] The start of the range.
  16382. * @param {number} end The end of the range.
  16383. * @param {number} [step=1] The value to increment or decrement by.
  16384. * @returns {Array} Returns the range of numbers.
  16385. * @see _.inRange, _.range
  16386. * @example
  16387. *
  16388. * _.rangeRight(4);
  16389. * // => [3, 2, 1, 0]
  16390. *
  16391. * _.rangeRight(-4);
  16392. * // => [-3, -2, -1, 0]
  16393. *
  16394. * _.rangeRight(1, 5);
  16395. * // => [4, 3, 2, 1]
  16396. *
  16397. * _.rangeRight(0, 20, 5);
  16398. * // => [15, 10, 5, 0]
  16399. *
  16400. * _.rangeRight(0, -4, -1);
  16401. * // => [-3, -2, -1, 0]
  16402. *
  16403. * _.rangeRight(1, 4, 0);
  16404. * // => [1, 1, 1]
  16405. *
  16406. * _.rangeRight(0);
  16407. * // => []
  16408. */
  16409. var rangeRight = createRange(true);
  16410. /**
  16411. * This method returns a new empty array.
  16412. *
  16413. * @static
  16414. * @memberOf _
  16415. * @since 4.13.0
  16416. * @category Util
  16417. * @returns {Array} Returns the new empty array.
  16418. * @example
  16419. *
  16420. * var arrays = _.times(2, _.stubArray);
  16421. *
  16422. * console.log(arrays);
  16423. * // => [[], []]
  16424. *
  16425. * console.log(arrays[0] === arrays[1]);
  16426. * // => false
  16427. */
  16428. function stubArray() {
  16429. return [];
  16430. }
  16431. /**
  16432. * This method returns `false`.
  16433. *
  16434. * @static
  16435. * @memberOf _
  16436. * @since 4.13.0
  16437. * @category Util
  16438. * @returns {boolean} Returns `false`.
  16439. * @example
  16440. *
  16441. * _.times(2, _.stubFalse);
  16442. * // => [false, false]
  16443. */
  16444. function stubFalse() {
  16445. return false;
  16446. }
  16447. /**
  16448. * This method returns a new empty object.
  16449. *
  16450. * @static
  16451. * @memberOf _
  16452. * @since 4.13.0
  16453. * @category Util
  16454. * @returns {Object} Returns the new empty object.
  16455. * @example
  16456. *
  16457. * var objects = _.times(2, _.stubObject);
  16458. *
  16459. * console.log(objects);
  16460. * // => [{}, {}]
  16461. *
  16462. * console.log(objects[0] === objects[1]);
  16463. * // => false
  16464. */
  16465. function stubObject() {
  16466. return {};
  16467. }
  16468. /**
  16469. * This method returns an empty string.
  16470. *
  16471. * @static
  16472. * @memberOf _
  16473. * @since 4.13.0
  16474. * @category Util
  16475. * @returns {string} Returns the empty string.
  16476. * @example
  16477. *
  16478. * _.times(2, _.stubString);
  16479. * // => ['', '']
  16480. */
  16481. function stubString() {
  16482. return '';
  16483. }
  16484. /**
  16485. * This method returns `true`.
  16486. *
  16487. * @static
  16488. * @memberOf _
  16489. * @since 4.13.0
  16490. * @category Util
  16491. * @returns {boolean} Returns `true`.
  16492. * @example
  16493. *
  16494. * _.times(2, _.stubTrue);
  16495. * // => [true, true]
  16496. */
  16497. function stubTrue() {
  16498. return true;
  16499. }
  16500. /**
  16501. * Invokes the iteratee `n` times, returning an array of the results of
  16502. * each invocation. The iteratee is invoked with one argument; (index).
  16503. *
  16504. * @static
  16505. * @since 0.1.0
  16506. * @memberOf _
  16507. * @category Util
  16508. * @param {number} n The number of times to invoke `iteratee`.
  16509. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  16510. * @returns {Array} Returns the array of results.
  16511. * @example
  16512. *
  16513. * _.times(3, String);
  16514. * // => ['0', '1', '2']
  16515. *
  16516. * _.times(4, _.constant(0));
  16517. * // => [0, 0, 0, 0]
  16518. */
  16519. function times(n, iteratee) {
  16520. n = toInteger(n);
  16521. if (n < 1 || n > MAX_SAFE_INTEGER) {
  16522. return [];
  16523. }
  16524. var index = MAX_ARRAY_LENGTH,
  16525. length = nativeMin(n, MAX_ARRAY_LENGTH);
  16526. iteratee = getIteratee(iteratee);
  16527. n -= MAX_ARRAY_LENGTH;
  16528. var result = baseTimes(length, iteratee);
  16529. while (++index < n) {
  16530. iteratee(index);
  16531. }
  16532. return result;
  16533. }
  16534. /**
  16535. * Converts `value` to a property path array.
  16536. *
  16537. * @static
  16538. * @memberOf _
  16539. * @since 4.0.0
  16540. * @category Util
  16541. * @param {*} value The value to convert.
  16542. * @returns {Array} Returns the new property path array.
  16543. * @example
  16544. *
  16545. * _.toPath('a.b.c');
  16546. * // => ['a', 'b', 'c']
  16547. *
  16548. * _.toPath('a[0].b.c');
  16549. * // => ['a', '0', 'b', 'c']
  16550. */
  16551. function toPath(value) {
  16552. if (isArray(value)) {
  16553. return arrayMap(value, toKey);
  16554. }
  16555. return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
  16556. }
  16557. /**
  16558. * Generates a unique ID. If `prefix` is given, the ID is appended to it.
  16559. *
  16560. * @static
  16561. * @since 0.1.0
  16562. * @memberOf _
  16563. * @category Util
  16564. * @param {string} [prefix=''] The value to prefix the ID with.
  16565. * @returns {string} Returns the unique ID.
  16566. * @example
  16567. *
  16568. * _.uniqueId('contact_');
  16569. * // => 'contact_104'
  16570. *
  16571. * _.uniqueId();
  16572. * // => '105'
  16573. */
  16574. function uniqueId(prefix) {
  16575. var id = ++idCounter;
  16576. return toString(prefix) + id;
  16577. }
  16578. /*------------------------------------------------------------------------*/
  16579. /**
  16580. * Adds two numbers.
  16581. *
  16582. * @static
  16583. * @memberOf _
  16584. * @since 3.4.0
  16585. * @category Math
  16586. * @param {number} augend The first number in an addition.
  16587. * @param {number} addend The second number in an addition.
  16588. * @returns {number} Returns the total.
  16589. * @example
  16590. *
  16591. * _.add(6, 4);
  16592. * // => 10
  16593. */
  16594. var add = createMathOperation(function(augend, addend) {
  16595. return augend + addend;
  16596. }, 0);
  16597. /**
  16598. * Computes `number` rounded up to `precision`.
  16599. *
  16600. * @static
  16601. * @memberOf _
  16602. * @since 3.10.0
  16603. * @category Math
  16604. * @param {number} number The number to round up.
  16605. * @param {number} [precision=0] The precision to round up to.
  16606. * @returns {number} Returns the rounded up number.
  16607. * @example
  16608. *
  16609. * _.ceil(4.006);
  16610. * // => 5
  16611. *
  16612. * _.ceil(6.004, 2);
  16613. * // => 6.01
  16614. *
  16615. * _.ceil(6040, -2);
  16616. * // => 6100
  16617. */
  16618. var ceil = createRound('ceil');
  16619. /**
  16620. * Divide two numbers.
  16621. *
  16622. * @static
  16623. * @memberOf _
  16624. * @since 4.7.0
  16625. * @category Math
  16626. * @param {number} dividend The first number in a division.
  16627. * @param {number} divisor The second number in a division.
  16628. * @returns {number} Returns the quotient.
  16629. * @example
  16630. *
  16631. * _.divide(6, 4);
  16632. * // => 1.5
  16633. */
  16634. var divide = createMathOperation(function(dividend, divisor) {
  16635. return dividend / divisor;
  16636. }, 1);
  16637. /**
  16638. * Computes `number` rounded down to `precision`.
  16639. *
  16640. * @static
  16641. * @memberOf _
  16642. * @since 3.10.0
  16643. * @category Math
  16644. * @param {number} number The number to round down.
  16645. * @param {number} [precision=0] The precision to round down to.
  16646. * @returns {number} Returns the rounded down number.
  16647. * @example
  16648. *
  16649. * _.floor(4.006);
  16650. * // => 4
  16651. *
  16652. * _.floor(0.046, 2);
  16653. * // => 0.04
  16654. *
  16655. * _.floor(4060, -2);
  16656. * // => 4000
  16657. */
  16658. var floor = createRound('floor');
  16659. /**
  16660. * Computes the maximum value of `array`. If `array` is empty or falsey,
  16661. * `undefined` is returned.
  16662. *
  16663. * @static
  16664. * @since 0.1.0
  16665. * @memberOf _
  16666. * @category Math
  16667. * @param {Array} array The array to iterate over.
  16668. * @returns {*} Returns the maximum value.
  16669. * @example
  16670. *
  16671. * _.max([4, 2, 8, 6]);
  16672. * // => 8
  16673. *
  16674. * _.max([]);
  16675. * // => undefined
  16676. */
  16677. function max(array) {
  16678. return (array && array.length)
  16679. ? baseExtremum(array, identity, baseGt)
  16680. : undefined;
  16681. }
  16682. /**
  16683. * This method is like `_.max` except that it accepts `iteratee` which is
  16684. * invoked for each element in `array` to generate the criterion by which
  16685. * the value is ranked. The iteratee is invoked with one argument: (value).
  16686. *
  16687. * @static
  16688. * @memberOf _
  16689. * @since 4.0.0
  16690. * @category Math
  16691. * @param {Array} array The array to iterate over.
  16692. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  16693. * @returns {*} Returns the maximum value.
  16694. * @example
  16695. *
  16696. * var objects = [{ 'n': 1 }, { 'n': 2 }];
  16697. *
  16698. * _.maxBy(objects, function(o) { return o.n; });
  16699. * // => { 'n': 2 }
  16700. *
  16701. * // The `_.property` iteratee shorthand.
  16702. * _.maxBy(objects, 'n');
  16703. * // => { 'n': 2 }
  16704. */
  16705. function maxBy(array, iteratee) {
  16706. return (array && array.length)
  16707. ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)
  16708. : undefined;
  16709. }
  16710. /**
  16711. * Computes the mean of the values in `array`.
  16712. *
  16713. * @static
  16714. * @memberOf _
  16715. * @since 4.0.0
  16716. * @category Math
  16717. * @param {Array} array The array to iterate over.
  16718. * @returns {number} Returns the mean.
  16719. * @example
  16720. *
  16721. * _.mean([4, 2, 8, 6]);
  16722. * // => 5
  16723. */
  16724. function mean(array) {
  16725. return baseMean(array, identity);
  16726. }
  16727. /**
  16728. * This method is like `_.mean` except that it accepts `iteratee` which is
  16729. * invoked for each element in `array` to generate the value to be averaged.
  16730. * The iteratee is invoked with one argument: (value).
  16731. *
  16732. * @static
  16733. * @memberOf _
  16734. * @since 4.7.0
  16735. * @category Math
  16736. * @param {Array} array The array to iterate over.
  16737. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  16738. * @returns {number} Returns the mean.
  16739. * @example
  16740. *
  16741. * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
  16742. *
  16743. * _.meanBy(objects, function(o) { return o.n; });
  16744. * // => 5
  16745. *
  16746. * // The `_.property` iteratee shorthand.
  16747. * _.meanBy(objects, 'n');
  16748. * // => 5
  16749. */
  16750. function meanBy(array, iteratee) {
  16751. return baseMean(array, getIteratee(iteratee, 2));
  16752. }
  16753. /**
  16754. * Computes the minimum value of `array`. If `array` is empty or falsey,
  16755. * `undefined` is returned.
  16756. *
  16757. * @static
  16758. * @since 0.1.0
  16759. * @memberOf _
  16760. * @category Math
  16761. * @param {Array} array The array to iterate over.
  16762. * @returns {*} Returns the minimum value.
  16763. * @example
  16764. *
  16765. * _.min([4, 2, 8, 6]);
  16766. * // => 2
  16767. *
  16768. * _.min([]);
  16769. * // => undefined
  16770. */
  16771. function min(array) {
  16772. return (array && array.length)
  16773. ? baseExtremum(array, identity, baseLt)
  16774. : undefined;
  16775. }
  16776. /**
  16777. * This method is like `_.min` except that it accepts `iteratee` which is
  16778. * invoked for each element in `array` to generate the criterion by which
  16779. * the value is ranked. The iteratee is invoked with one argument: (value).
  16780. *
  16781. * @static
  16782. * @memberOf _
  16783. * @since 4.0.0
  16784. * @category Math
  16785. * @param {Array} array The array to iterate over.
  16786. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  16787. * @returns {*} Returns the minimum value.
  16788. * @example
  16789. *
  16790. * var objects = [{ 'n': 1 }, { 'n': 2 }];
  16791. *
  16792. * _.minBy(objects, function(o) { return o.n; });
  16793. * // => { 'n': 1 }
  16794. *
  16795. * // The `_.property` iteratee shorthand.
  16796. * _.minBy(objects, 'n');
  16797. * // => { 'n': 1 }
  16798. */
  16799. function minBy(array, iteratee) {
  16800. return (array && array.length)
  16801. ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)
  16802. : undefined;
  16803. }
  16804. /**
  16805. * Multiply two numbers.
  16806. *
  16807. * @static
  16808. * @memberOf _
  16809. * @since 4.7.0
  16810. * @category Math
  16811. * @param {number} multiplier The first number in a multiplication.
  16812. * @param {number} multiplicand The second number in a multiplication.
  16813. * @returns {number} Returns the product.
  16814. * @example
  16815. *
  16816. * _.multiply(6, 4);
  16817. * // => 24
  16818. */
  16819. var multiply = createMathOperation(function(multiplier, multiplicand) {
  16820. return multiplier * multiplicand;
  16821. }, 1);
  16822. /**
  16823. * Computes `number` rounded to `precision`.
  16824. *
  16825. * @static
  16826. * @memberOf _
  16827. * @since 3.10.0
  16828. * @category Math
  16829. * @param {number} number The number to round.
  16830. * @param {number} [precision=0] The precision to round to.
  16831. * @returns {number} Returns the rounded number.
  16832. * @example
  16833. *
  16834. * _.round(4.006);
  16835. * // => 4
  16836. *
  16837. * _.round(4.006, 2);
  16838. * // => 4.01
  16839. *
  16840. * _.round(4060, -2);
  16841. * // => 4100
  16842. */
  16843. var round = createRound('round');
  16844. /**
  16845. * Subtract two numbers.
  16846. *
  16847. * @static
  16848. * @memberOf _
  16849. * @since 4.0.0
  16850. * @category Math
  16851. * @param {number} minuend The first number in a subtraction.
  16852. * @param {number} subtrahend The second number in a subtraction.
  16853. * @returns {number} Returns the difference.
  16854. * @example
  16855. *
  16856. * _.subtract(6, 4);
  16857. * // => 2
  16858. */
  16859. var subtract = createMathOperation(function(minuend, subtrahend) {
  16860. return minuend - subtrahend;
  16861. }, 0);
  16862. /**
  16863. * Computes the sum of the values in `array`.
  16864. *
  16865. * @static
  16866. * @memberOf _
  16867. * @since 3.4.0
  16868. * @category Math
  16869. * @param {Array} array The array to iterate over.
  16870. * @returns {number} Returns the sum.
  16871. * @example
  16872. *
  16873. * _.sum([4, 2, 8, 6]);
  16874. * // => 20
  16875. */
  16876. function sum(array) {
  16877. return (array && array.length)
  16878. ? baseSum(array, identity)
  16879. : 0;
  16880. }
  16881. /**
  16882. * This method is like `_.sum` except that it accepts `iteratee` which is
  16883. * invoked for each element in `array` to generate the value to be summed.
  16884. * The iteratee is invoked with one argument: (value).
  16885. *
  16886. * @static
  16887. * @memberOf _
  16888. * @since 4.0.0
  16889. * @category Math
  16890. * @param {Array} array The array to iterate over.
  16891. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  16892. * @returns {number} Returns the sum.
  16893. * @example
  16894. *
  16895. * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
  16896. *
  16897. * _.sumBy(objects, function(o) { return o.n; });
  16898. * // => 20
  16899. *
  16900. * // The `_.property` iteratee shorthand.
  16901. * _.sumBy(objects, 'n');
  16902. * // => 20
  16903. */
  16904. function sumBy(array, iteratee) {
  16905. return (array && array.length)
  16906. ? baseSum(array, getIteratee(iteratee, 2))
  16907. : 0;
  16908. }
  16909. /*------------------------------------------------------------------------*/
  16910. // Add methods that return wrapped values in chain sequences.
  16911. lodash.after = after;
  16912. lodash.ary = ary;
  16913. lodash.assign = assign;
  16914. lodash.assignIn = assignIn;
  16915. lodash.assignInWith = assignInWith;
  16916. lodash.assignWith = assignWith;
  16917. lodash.at = at;
  16918. lodash.before = before;
  16919. lodash.bind = bind;
  16920. lodash.bindAll = bindAll;
  16921. lodash.bindKey = bindKey;
  16922. lodash.castArray = castArray;
  16923. lodash.chain = chain;
  16924. lodash.chunk = chunk;
  16925. lodash.compact = compact;
  16926. lodash.concat = concat;
  16927. lodash.cond = cond;
  16928. lodash.conforms = conforms;
  16929. lodash.constant = constant;
  16930. lodash.countBy = countBy;
  16931. lodash.create = create;
  16932. lodash.curry = curry;
  16933. lodash.curryRight = curryRight;
  16934. lodash.debounce = debounce;
  16935. lodash.defaults = defaults;
  16936. lodash.defaultsDeep = defaultsDeep;
  16937. lodash.defer = defer;
  16938. lodash.delay = delay;
  16939. lodash.difference = difference;
  16940. lodash.differenceBy = differenceBy;
  16941. lodash.differenceWith = differenceWith;
  16942. lodash.drop = drop;
  16943. lodash.dropRight = dropRight;
  16944. lodash.dropRightWhile = dropRightWhile;
  16945. lodash.dropWhile = dropWhile;
  16946. lodash.fill = fill;
  16947. lodash.filter = filter;
  16948. lodash.flatMap = flatMap;
  16949. lodash.flatMapDeep = flatMapDeep;
  16950. lodash.flatMapDepth = flatMapDepth;
  16951. lodash.flatten = flatten;
  16952. lodash.flattenDeep = flattenDeep;
  16953. lodash.flattenDepth = flattenDepth;
  16954. lodash.flip = flip;
  16955. lodash.flow = flow;
  16956. lodash.flowRight = flowRight;
  16957. lodash.fromPairs = fromPairs;
  16958. lodash.functions = functions;
  16959. lodash.functionsIn = functionsIn;
  16960. lodash.groupBy = groupBy;
  16961. lodash.initial = initial;
  16962. lodash.intersection = intersection;
  16963. lodash.intersectionBy = intersectionBy;
  16964. lodash.intersectionWith = intersectionWith;
  16965. lodash.invert = invert;
  16966. lodash.invertBy = invertBy;
  16967. lodash.invokeMap = invokeMap;
  16968. lodash.iteratee = iteratee;
  16969. lodash.keyBy = keyBy;
  16970. lodash.keys = keys;
  16971. lodash.keysIn = keysIn;
  16972. lodash.map = map;
  16973. lodash.mapKeys = mapKeys;
  16974. lodash.mapValues = mapValues;
  16975. lodash.matches = matches;
  16976. lodash.matchesProperty = matchesProperty;
  16977. lodash.memoize = memoize;
  16978. lodash.merge = merge;
  16979. lodash.mergeWith = mergeWith;
  16980. lodash.method = method;
  16981. lodash.methodOf = methodOf;
  16982. lodash.mixin = mixin;
  16983. lodash.negate = negate;
  16984. lodash.nthArg = nthArg;
  16985. lodash.omit = omit;
  16986. lodash.omitBy = omitBy;
  16987. lodash.once = once;
  16988. lodash.orderBy = orderBy;
  16989. lodash.over = over;
  16990. lodash.overArgs = overArgs;
  16991. lodash.overEvery = overEvery;
  16992. lodash.overSome = overSome;
  16993. lodash.partial = partial;
  16994. lodash.partialRight = partialRight;
  16995. lodash.partition = partition;
  16996. lodash.pick = pick;
  16997. lodash.pickBy = pickBy;
  16998. lodash.property = property;
  16999. lodash.propertyOf = propertyOf;
  17000. lodash.pull = pull;
  17001. lodash.pullAll = pullAll;
  17002. lodash.pullAllBy = pullAllBy;
  17003. lodash.pullAllWith = pullAllWith;
  17004. lodash.pullAt = pullAt;
  17005. lodash.range = range;
  17006. lodash.rangeRight = rangeRight;
  17007. lodash.rearg = rearg;
  17008. lodash.reject = reject;
  17009. lodash.remove = remove;
  17010. lodash.rest = rest;
  17011. lodash.reverse = reverse;
  17012. lodash.sampleSize = sampleSize;
  17013. lodash.set = set;
  17014. lodash.setWith = setWith;
  17015. lodash.shuffle = shuffle;
  17016. lodash.slice = slice;
  17017. lodash.sortBy = sortBy;
  17018. lodash.sortedUniq = sortedUniq;
  17019. lodash.sortedUniqBy = sortedUniqBy;
  17020. lodash.split = split;
  17021. lodash.spread = spread;
  17022. lodash.tail = tail;
  17023. lodash.take = take;
  17024. lodash.takeRight = takeRight;
  17025. lodash.takeRightWhile = takeRightWhile;
  17026. lodash.takeWhile = takeWhile;
  17027. lodash.tap = tap;
  17028. lodash.throttle = throttle;
  17029. lodash.thru = thru;
  17030. lodash.toArray = toArray;
  17031. lodash.toPairs = toPairs;
  17032. lodash.toPairsIn = toPairsIn;
  17033. lodash.toPath = toPath;
  17034. lodash.toPlainObject = toPlainObject;
  17035. lodash.transform = transform;
  17036. lodash.unary = unary;
  17037. lodash.union = union;
  17038. lodash.unionBy = unionBy;
  17039. lodash.unionWith = unionWith;
  17040. lodash.uniq = uniq;
  17041. lodash.uniqBy = uniqBy;
  17042. lodash.uniqWith = uniqWith;
  17043. lodash.unset = unset;
  17044. lodash.unzip = unzip;
  17045. lodash.unzipWith = unzipWith;
  17046. lodash.update = update;
  17047. lodash.updateWith = updateWith;
  17048. lodash.values = values;
  17049. lodash.valuesIn = valuesIn;
  17050. lodash.without = without;
  17051. lodash.words = words;
  17052. lodash.wrap = wrap;
  17053. lodash.xor = xor;
  17054. lodash.xorBy = xorBy;
  17055. lodash.xorWith = xorWith;
  17056. lodash.zip = zip;
  17057. lodash.zipObject = zipObject;
  17058. lodash.zipObjectDeep = zipObjectDeep;
  17059. lodash.zipWith = zipWith;
  17060. // Add aliases.
  17061. lodash.entries = toPairs;
  17062. lodash.entriesIn = toPairsIn;
  17063. lodash.extend = assignIn;
  17064. lodash.extendWith = assignInWith;
  17065. // Add methods to `lodash.prototype`.
  17066. mixin(lodash, lodash);
  17067. /*------------------------------------------------------------------------*/
  17068. // Add methods that return unwrapped values in chain sequences.
  17069. lodash.add = add;
  17070. lodash.attempt = attempt;
  17071. lodash.camelCase = camelCase;
  17072. lodash.capitalize = capitalize;
  17073. lodash.ceil = ceil;
  17074. lodash.clamp = clamp;
  17075. lodash.clone = clone;
  17076. lodash.cloneDeep = cloneDeep;
  17077. lodash.cloneDeepWith = cloneDeepWith;
  17078. lodash.cloneWith = cloneWith;
  17079. lodash.conformsTo = conformsTo;
  17080. lodash.deburr = deburr;
  17081. lodash.defaultTo = defaultTo;
  17082. lodash.divide = divide;
  17083. lodash.endsWith = endsWith;
  17084. lodash.eq = eq;
  17085. lodash.escape = escape;
  17086. lodash.escapeRegExp = escapeRegExp;
  17087. lodash.every = every;
  17088. lodash.find = find;
  17089. lodash.findIndex = findIndex;
  17090. lodash.findKey = findKey;
  17091. lodash.findLast = findLast;
  17092. lodash.findLastIndex = findLastIndex;
  17093. lodash.findLastKey = findLastKey;
  17094. lodash.floor = floor;
  17095. lodash.forEach = forEach;
  17096. lodash.forEachRight = forEachRight;
  17097. lodash.forIn = forIn;
  17098. lodash.forInRight = forInRight;
  17099. lodash.forOwn = forOwn;
  17100. lodash.forOwnRight = forOwnRight;
  17101. lodash.get = get;
  17102. lodash.gt = gt;
  17103. lodash.gte = gte;
  17104. lodash.has = has;
  17105. lodash.hasIn = hasIn;
  17106. lodash.head = head;
  17107. lodash.identity = identity;
  17108. lodash.includes = includes;
  17109. lodash.indexOf = indexOf;
  17110. lodash.inRange = inRange;
  17111. lodash.invoke = invoke;
  17112. lodash.isArguments = isArguments;
  17113. lodash.isArray = isArray;
  17114. lodash.isArrayBuffer = isArrayBuffer;
  17115. lodash.isArrayLike = isArrayLike;
  17116. lodash.isArrayLikeObject = isArrayLikeObject;
  17117. lodash.isBoolean = isBoolean;
  17118. lodash.isBuffer = isBuffer;
  17119. lodash.isDate = isDate;
  17120. lodash.isElement = isElement;
  17121. lodash.isEmpty = isEmpty;
  17122. lodash.isEqual = isEqual;
  17123. lodash.isEqualWith = isEqualWith;
  17124. lodash.isError = isError;
  17125. lodash.isFinite = isFinite;
  17126. lodash.isFunction = isFunction;
  17127. lodash.isInteger = isInteger;
  17128. lodash.isLength = isLength;
  17129. lodash.isMap = isMap;
  17130. lodash.isMatch = isMatch;
  17131. lodash.isMatchWith = isMatchWith;
  17132. lodash.isNaN = isNaN;
  17133. lodash.isNative = isNative;
  17134. lodash.isNil = isNil;
  17135. lodash.isNull = isNull;
  17136. lodash.isNumber = isNumber;
  17137. lodash.isObject = isObject;
  17138. lodash.isObjectLike = isObjectLike;
  17139. lodash.isPlainObject = isPlainObject;
  17140. lodash.isRegExp = isRegExp;
  17141. lodash.isSafeInteger = isSafeInteger;
  17142. lodash.isSet = isSet;
  17143. lodash.isString = isString;
  17144. lodash.isSymbol = isSymbol;
  17145. lodash.isTypedArray = isTypedArray;
  17146. lodash.isUndefined = isUndefined;
  17147. lodash.isWeakMap = isWeakMap;
  17148. lodash.isWeakSet = isWeakSet;
  17149. lodash.join = join;
  17150. lodash.kebabCase = kebabCase;
  17151. lodash.last = last;
  17152. lodash.lastIndexOf = lastIndexOf;
  17153. lodash.lowerCase = lowerCase;
  17154. lodash.lowerFirst = lowerFirst;
  17155. lodash.lt = lt;
  17156. lodash.lte = lte;
  17157. lodash.max = max;
  17158. lodash.maxBy = maxBy;
  17159. lodash.mean = mean;
  17160. lodash.meanBy = meanBy;
  17161. lodash.min = min;
  17162. lodash.minBy = minBy;
  17163. lodash.stubArray = stubArray;
  17164. lodash.stubFalse = stubFalse;
  17165. lodash.stubObject = stubObject;
  17166. lodash.stubString = stubString;
  17167. lodash.stubTrue = stubTrue;
  17168. lodash.multiply = multiply;
  17169. lodash.nth = nth;
  17170. lodash.noConflict = noConflict;
  17171. lodash.noop = noop;
  17172. lodash.now = now;
  17173. lodash.pad = pad;
  17174. lodash.padEnd = padEnd;
  17175. lodash.padStart = padStart;
  17176. lodash.parseInt = parseInt;
  17177. lodash.random = random;
  17178. lodash.reduce = reduce;
  17179. lodash.reduceRight = reduceRight;
  17180. lodash.repeat = repeat;
  17181. lodash.replace = replace;
  17182. lodash.result = result;
  17183. lodash.round = round;
  17184. lodash.runInContext = runInContext;
  17185. lodash.sample = sample;
  17186. lodash.size = size;
  17187. lodash.snakeCase = snakeCase;
  17188. lodash.some = some;
  17189. lodash.sortedIndex = sortedIndex;
  17190. lodash.sortedIndexBy = sortedIndexBy;
  17191. lodash.sortedIndexOf = sortedIndexOf;
  17192. lodash.sortedLastIndex = sortedLastIndex;
  17193. lodash.sortedLastIndexBy = sortedLastIndexBy;
  17194. lodash.sortedLastIndexOf = sortedLastIndexOf;
  17195. lodash.startCase = startCase;
  17196. lodash.startsWith = startsWith;
  17197. lodash.subtract = subtract;
  17198. lodash.sum = sum;
  17199. lodash.sumBy = sumBy;
  17200. lodash.template = template;
  17201. lodash.times = times;
  17202. lodash.toFinite = toFinite;
  17203. lodash.toInteger = toInteger;
  17204. lodash.toLength = toLength;
  17205. lodash.toLower = toLower;
  17206. lodash.toNumber = toNumber;
  17207. lodash.toSafeInteger = toSafeInteger;
  17208. lodash.toString = toString;
  17209. lodash.toUpper = toUpper;
  17210. lodash.trim = trim;
  17211. lodash.trimEnd = trimEnd;
  17212. lodash.trimStart = trimStart;
  17213. lodash.truncate = truncate;
  17214. lodash.unescape = unescape;
  17215. lodash.uniqueId = uniqueId;
  17216. lodash.upperCase = upperCase;
  17217. lodash.upperFirst = upperFirst;
  17218. // Add aliases.
  17219. lodash.each = forEach;
  17220. lodash.eachRight = forEachRight;
  17221. lodash.first = head;
  17222. mixin(lodash, (function() {
  17223. var source = {};
  17224. baseForOwn(lodash, function(func, methodName) {
  17225. if (!hasOwnProperty.call(lodash.prototype, methodName)) {
  17226. source[methodName] = func;
  17227. }
  17228. });
  17229. return source;
  17230. }()), { 'chain': false });
  17231. /*------------------------------------------------------------------------*/
  17232. /**
  17233. * The semantic version number.
  17234. *
  17235. * @static
  17236. * @memberOf _
  17237. * @type {string}
  17238. */
  17239. lodash.VERSION = VERSION;
  17240. // Assign default placeholders.
  17241. arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
  17242. lodash[methodName].placeholder = lodash;
  17243. });
  17244. // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
  17245. arrayEach(['drop', 'take'], function(methodName, index) {
  17246. LazyWrapper.prototype[methodName] = function(n) {
  17247. n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
  17248. var result = (this.__filtered__ && !index)
  17249. ? new LazyWrapper(this)
  17250. : this.clone();
  17251. if (result.__filtered__) {
  17252. result.__takeCount__ = nativeMin(n, result.__takeCount__);
  17253. } else {
  17254. result.__views__.push({
  17255. 'size': nativeMin(n, MAX_ARRAY_LENGTH),
  17256. 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')
  17257. });
  17258. }
  17259. return result;
  17260. };
  17261. LazyWrapper.prototype[methodName + 'Right'] = function(n) {
  17262. return this.reverse()[methodName](n).reverse();
  17263. };
  17264. });
  17265. // Add `LazyWrapper` methods that accept an `iteratee` value.
  17266. arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
  17267. var type = index + 1,
  17268. isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
  17269. LazyWrapper.prototype[methodName] = function(iteratee) {
  17270. var result = this.clone();
  17271. result.__iteratees__.push({
  17272. 'iteratee': getIteratee(iteratee, 3),
  17273. 'type': type
  17274. });
  17275. result.__filtered__ = result.__filtered__ || isFilter;
  17276. return result;
  17277. };
  17278. });
  17279. // Add `LazyWrapper` methods for `_.head` and `_.last`.
  17280. arrayEach(['head', 'last'], function(methodName, index) {
  17281. var takeName = 'take' + (index ? 'Right' : '');
  17282. LazyWrapper.prototype[methodName] = function() {
  17283. return this[takeName](1).value()[0];
  17284. };
  17285. });
  17286. // Add `LazyWrapper` methods for `_.initial` and `_.tail`.
  17287. arrayEach(['initial', 'tail'], function(methodName, index) {
  17288. var dropName = 'drop' + (index ? '' : 'Right');
  17289. LazyWrapper.prototype[methodName] = function() {
  17290. return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
  17291. };
  17292. });
  17293. LazyWrapper.prototype.compact = function() {
  17294. return this.filter(identity);
  17295. };
  17296. LazyWrapper.prototype.find = function(predicate) {
  17297. return this.filter(predicate).head();
  17298. };
  17299. LazyWrapper.prototype.findLast = function(predicate) {
  17300. return this.reverse().find(predicate);
  17301. };
  17302. LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
  17303. if (typeof path == 'function') {
  17304. return new LazyWrapper(this);
  17305. }
  17306. return this.map(function(value) {
  17307. return baseInvoke(value, path, args);
  17308. });
  17309. });
  17310. LazyWrapper.prototype.reject = function(predicate) {
  17311. return this.filter(negate(getIteratee(predicate)));
  17312. };
  17313. LazyWrapper.prototype.slice = function(start, end) {
  17314. start = toInteger(start);
  17315. var result = this;
  17316. if (result.__filtered__ && (start > 0 || end < 0)) {
  17317. return new LazyWrapper(result);
  17318. }
  17319. if (start < 0) {
  17320. result = result.takeRight(-start);
  17321. } else if (start) {
  17322. result = result.drop(start);
  17323. }
  17324. if (end !== undefined) {
  17325. end = toInteger(end);
  17326. result = end < 0 ? result.dropRight(-end) : result.take(end - start);
  17327. }
  17328. return result;
  17329. };
  17330. LazyWrapper.prototype.takeRightWhile = function(predicate) {
  17331. return this.reverse().takeWhile(predicate).reverse();
  17332. };
  17333. LazyWrapper.prototype.toArray = function() {
  17334. return this.take(MAX_ARRAY_LENGTH);
  17335. };
  17336. // Add `LazyWrapper` methods to `lodash.prototype`.
  17337. baseForOwn(LazyWrapper.prototype, function(func, methodName) {
  17338. var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),
  17339. isTaker = /^(?:head|last)$/.test(methodName),
  17340. lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],
  17341. retUnwrapped = isTaker || /^find/.test(methodName);
  17342. if (!lodashFunc) {
  17343. return;
  17344. }
  17345. lodash.prototype[methodName] = function() {
  17346. var value = this.__wrapped__,
  17347. args = isTaker ? [1] : arguments,
  17348. isLazy = value instanceof LazyWrapper,
  17349. iteratee = args[0],
  17350. useLazy = isLazy || isArray(value);
  17351. var interceptor = function(value) {
  17352. var result = lodashFunc.apply(lodash, arrayPush([value], args));
  17353. return (isTaker && chainAll) ? result[0] : result;
  17354. };
  17355. if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
  17356. // Avoid lazy use if the iteratee has a "length" value other than `1`.
  17357. isLazy = useLazy = false;
  17358. }
  17359. var chainAll = this.__chain__,
  17360. isHybrid = !!this.__actions__.length,
  17361. isUnwrapped = retUnwrapped && !chainAll,
  17362. onlyLazy = isLazy && !isHybrid;
  17363. if (!retUnwrapped && useLazy) {
  17364. value = onlyLazy ? value : new LazyWrapper(this);
  17365. var result = func.apply(value, args);
  17366. result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
  17367. return new LodashWrapper(result, chainAll);
  17368. }
  17369. if (isUnwrapped && onlyLazy) {
  17370. return func.apply(this, args);
  17371. }
  17372. result = this.thru(interceptor);
  17373. return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;
  17374. };
  17375. });
  17376. // Add `Array` methods to `lodash.prototype`.
  17377. arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
  17378. var func = arrayProto[methodName],
  17379. chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
  17380. retUnwrapped = /^(?:pop|shift)$/.test(methodName);
  17381. lodash.prototype[methodName] = function() {
  17382. var args = arguments;
  17383. if (retUnwrapped && !this.__chain__) {
  17384. var value = this.value();
  17385. return func.apply(isArray(value) ? value : [], args);
  17386. }
  17387. return this[chainName](function(value) {
  17388. return func.apply(isArray(value) ? value : [], args);
  17389. });
  17390. };
  17391. });
  17392. // Map minified method names to their real names.
  17393. baseForOwn(LazyWrapper.prototype, function(func, methodName) {
  17394. var lodashFunc = lodash[methodName];
  17395. if (lodashFunc) {
  17396. var key = lodashFunc.name + '';
  17397. if (!hasOwnProperty.call(realNames, key)) {
  17398. realNames[key] = [];
  17399. }
  17400. realNames[key].push({ 'name': methodName, 'func': lodashFunc });
  17401. }
  17402. });
  17403. realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{
  17404. 'name': 'wrapper',
  17405. 'func': undefined
  17406. }];
  17407. // Add methods to `LazyWrapper`.
  17408. LazyWrapper.prototype.clone = lazyClone;
  17409. LazyWrapper.prototype.reverse = lazyReverse;
  17410. LazyWrapper.prototype.value = lazyValue;
  17411. // Add chain sequence methods to the `lodash` wrapper.
  17412. lodash.prototype.at = wrapperAt;
  17413. lodash.prototype.chain = wrapperChain;
  17414. lodash.prototype.commit = wrapperCommit;
  17415. lodash.prototype.next = wrapperNext;
  17416. lodash.prototype.plant = wrapperPlant;
  17417. lodash.prototype.reverse = wrapperReverse;
  17418. lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
  17419. // Add lazy aliases.
  17420. lodash.prototype.first = lodash.prototype.head;
  17421. if (symIterator) {
  17422. lodash.prototype[symIterator] = wrapperToIterator;
  17423. }
  17424. return lodash;
  17425. });
  17426. /*--------------------------------------------------------------------------*/
  17427. // Export lodash.
  17428. var _ = runInContext();
  17429. // Some AMD build optimizers, like r.js, check for condition patterns like:
  17430. if (true) {
  17431. // Expose Lodash on the global object to prevent errors when Lodash is
  17432. // loaded by a script tag in the presence of an AMD loader.
  17433. // See http://requirejs.org/docs/errors.html#mismatch for more details.
  17434. // Use `_.noConflict` to remove Lodash from the global object.
  17435. root._ = _;
  17436. // Define as an anonymous module so, through path mapping, it can be
  17437. // referenced as the "underscore" module.
  17438. !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {
  17439. return _;
  17440. }).call(exports, __webpack_require__, exports, module),
  17441. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  17442. }
  17443. // Check for `exports` after `define` in case a build optimizer adds it.
  17444. else {}
  17445. }.call(this));
  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. !*** ./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 ***!
  17450. \***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  17451. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17452. "use strict";
  17453. __webpack_require__.r(__webpack_exports__);
  17454. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17455. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17456. /* harmony export */ });
  17457. /* 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");
  17458. /* 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__);
  17459. /* 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");
  17460. var options = {};
  17461. options.insert = "head";
  17462. options.singleton = false;
  17463. 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);
  17464. /* 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 || {});
  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. !*** ./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 ***!
  17469. \****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  17470. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17471. "use strict";
  17472. __webpack_require__.r(__webpack_exports__);
  17473. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17474. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17475. /* harmony export */ });
  17476. /* 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");
  17477. /* 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__);
  17478. /* 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");
  17479. var options = {};
  17480. options.insert = "head";
  17481. options.singleton = false;
  17482. 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);
  17483. /* 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 || {});
  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. !*** ./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 ***!
  17488. \*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  17489. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17490. "use strict";
  17491. __webpack_require__.r(__webpack_exports__);
  17492. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17493. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17494. /* harmony export */ });
  17495. /* 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");
  17496. /* 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__);
  17497. /* 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");
  17498. var options = {};
  17499. options.insert = "head";
  17500. options.singleton = false;
  17501. 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);
  17502. /* 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 || {});
  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. !*** ./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 ***!
  17507. \***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  17508. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17509. "use strict";
  17510. __webpack_require__.r(__webpack_exports__);
  17511. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17512. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17513. /* harmony export */ });
  17514. /* 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");
  17515. /* 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__);
  17516. /* 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");
  17517. var options = {};
  17518. options.insert = "head";
  17519. options.singleton = false;
  17520. 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);
  17521. /* 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 || {});
  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. !*** ./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 ***!
  17526. \******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  17527. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17528. "use strict";
  17529. __webpack_require__.r(__webpack_exports__);
  17530. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17531. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17532. /* harmony export */ });
  17533. /* 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");
  17534. /* 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__);
  17535. /* 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");
  17536. var options = {};
  17537. options.insert = "head";
  17538. options.singleton = false;
  17539. 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);
  17540. /* 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 || {});
  17541. /***/ }),
  17542. /***/ "./node_modules/vue-loader/dist/exportHelper.js":
  17543. /*!******************************************************!*\
  17544. !*** ./node_modules/vue-loader/dist/exportHelper.js ***!
  17545. \******************************************************/
  17546. /***/ ((__unused_webpack_module, exports) => {
  17547. "use strict";
  17548. Object.defineProperty(exports, "__esModule", ({ value: true }));
  17549. // runtime helper for setting properties on components
  17550. // in a tree-shakable way
  17551. exports["default"] = (sfc, props) => {
  17552. const target = sfc.__vccOpts || sfc;
  17553. for (const [key, val] of props) {
  17554. target[key] = val;
  17555. }
  17556. return target;
  17557. };
  17558. /***/ }),
  17559. /***/ "./resources/js/components/AppButtonLink.vue":
  17560. /*!***************************************************!*\
  17561. !*** ./resources/js/components/AppButtonLink.vue ***!
  17562. \***************************************************/
  17563. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17564. "use strict";
  17565. __webpack_require__.r(__webpack_exports__);
  17566. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17567. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17568. /* harmony export */ });
  17569. /* 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");
  17570. /* 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");
  17571. /* 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");
  17572. ;
  17573. 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"]])
  17574. /* hot reload */
  17575. if (false) {}
  17576. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17577. /***/ }),
  17578. /***/ "./resources/js/components/AppFooter.vue":
  17579. /*!***********************************************!*\
  17580. !*** ./resources/js/components/AppFooter.vue ***!
  17581. \***********************************************/
  17582. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17583. "use strict";
  17584. __webpack_require__.r(__webpack_exports__);
  17585. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17586. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17587. /* harmony export */ });
  17588. /* 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");
  17589. /* 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");
  17590. /* 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");
  17591. const script = {}
  17592. ;
  17593. 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"]])
  17594. /* hot reload */
  17595. if (false) {}
  17596. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17597. /***/ }),
  17598. /***/ "./resources/js/components/AppMessage.vue":
  17599. /*!************************************************!*\
  17600. !*** ./resources/js/components/AppMessage.vue ***!
  17601. \************************************************/
  17602. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17603. "use strict";
  17604. __webpack_require__.r(__webpack_exports__);
  17605. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17606. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17607. /* harmony export */ });
  17608. /* 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");
  17609. /* 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");
  17610. /* 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");
  17611. ;
  17612. 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"]])
  17613. /* hot reload */
  17614. if (false) {}
  17615. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17616. /***/ }),
  17617. /***/ "./resources/js/components/AppPagination.vue":
  17618. /*!***************************************************!*\
  17619. !*** ./resources/js/components/AppPagination.vue ***!
  17620. \***************************************************/
  17621. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17622. "use strict";
  17623. __webpack_require__.r(__webpack_exports__);
  17624. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17625. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17626. /* harmony export */ });
  17627. /* 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");
  17628. /* 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");
  17629. /* 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");
  17630. ;
  17631. 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"]])
  17632. /* hot reload */
  17633. if (false) {}
  17634. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17635. /***/ }),
  17636. /***/ "./resources/js/components/AppSidebar.vue":
  17637. /*!************************************************!*\
  17638. !*** ./resources/js/components/AppSidebar.vue ***!
  17639. \************************************************/
  17640. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17641. "use strict";
  17642. __webpack_require__.r(__webpack_exports__);
  17643. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17644. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17645. /* harmony export */ });
  17646. /* 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");
  17647. /* 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");
  17648. /* 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");
  17649. /* 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");
  17650. ;
  17651. 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"]])
  17652. /* hot reload */
  17653. if (false) {}
  17654. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17655. /***/ }),
  17656. /***/ "./resources/js/components/AppSubSidebar.vue":
  17657. /*!***************************************************!*\
  17658. !*** ./resources/js/components/AppSubSidebar.vue ***!
  17659. \***************************************************/
  17660. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17661. "use strict";
  17662. __webpack_require__.r(__webpack_exports__);
  17663. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17664. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17665. /* harmony export */ });
  17666. /* 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");
  17667. /* 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");
  17668. /* 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");
  17669. /* 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");
  17670. ;
  17671. 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"]])
  17672. /* hot reload */
  17673. if (false) {}
  17674. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17675. /***/ }),
  17676. /***/ "./resources/js/components/AppTopBar.vue":
  17677. /*!***********************************************!*\
  17678. !*** ./resources/js/components/AppTopBar.vue ***!
  17679. \***********************************************/
  17680. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17681. "use strict";
  17682. __webpack_require__.r(__webpack_exports__);
  17683. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17684. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17685. /* harmony export */ });
  17686. /* 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");
  17687. /* 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");
  17688. /* 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");
  17689. /* 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");
  17690. ;
  17691. 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"]])
  17692. /* hot reload */
  17693. if (false) {}
  17694. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17695. /***/ }),
  17696. /***/ "./resources/js/layouts/DashboardLayout.vue":
  17697. /*!**************************************************!*\
  17698. !*** ./resources/js/layouts/DashboardLayout.vue ***!
  17699. \**************************************************/
  17700. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17701. "use strict";
  17702. __webpack_require__.r(__webpack_exports__);
  17703. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17704. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17705. /* harmony export */ });
  17706. /* 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");
  17707. /* 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");
  17708. /* 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");
  17709. /* 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");
  17710. ;
  17711. 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"]])
  17712. /* hot reload */
  17713. if (false) {}
  17714. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17715. /***/ }),
  17716. /***/ "./resources/js/pages/mutation/Report.vue":
  17717. /*!************************************************!*\
  17718. !*** ./resources/js/pages/mutation/Report.vue ***!
  17719. \************************************************/
  17720. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17721. "use strict";
  17722. __webpack_require__.r(__webpack_exports__);
  17723. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17724. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17725. /* harmony export */ });
  17726. /* 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");
  17727. /* 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");
  17728. /* 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");
  17729. ;
  17730. 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"]])
  17731. /* hot reload */
  17732. if (false) {}
  17733. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17734. /***/ }),
  17735. /***/ "./resources/js/components/AppButtonLink.vue?vue&type=script&setup=true&lang=js":
  17736. /*!**************************************************************************************!*\
  17737. !*** ./resources/js/components/AppButtonLink.vue?vue&type=script&setup=true&lang=js ***!
  17738. \**************************************************************************************/
  17739. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17740. "use strict";
  17741. __webpack_require__.r(__webpack_exports__);
  17742. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17743. /* 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"])
  17744. /* harmony export */ });
  17745. /* 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");
  17746. /***/ }),
  17747. /***/ "./resources/js/components/AppMessage.vue?vue&type=script&setup=true&lang=js":
  17748. /*!***********************************************************************************!*\
  17749. !*** ./resources/js/components/AppMessage.vue?vue&type=script&setup=true&lang=js ***!
  17750. \***********************************************************************************/
  17751. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17752. "use strict";
  17753. __webpack_require__.r(__webpack_exports__);
  17754. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17755. /* 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"])
  17756. /* harmony export */ });
  17757. /* 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");
  17758. /***/ }),
  17759. /***/ "./resources/js/components/AppPagination.vue?vue&type=script&setup=true&lang=js":
  17760. /*!**************************************************************************************!*\
  17761. !*** ./resources/js/components/AppPagination.vue?vue&type=script&setup=true&lang=js ***!
  17762. \**************************************************************************************/
  17763. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17764. "use strict";
  17765. __webpack_require__.r(__webpack_exports__);
  17766. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17767. /* 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"])
  17768. /* harmony export */ });
  17769. /* 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");
  17770. /***/ }),
  17771. /***/ "./resources/js/components/AppSidebar.vue?vue&type=script&setup=true&lang=js":
  17772. /*!***********************************************************************************!*\
  17773. !*** ./resources/js/components/AppSidebar.vue?vue&type=script&setup=true&lang=js ***!
  17774. \***********************************************************************************/
  17775. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17776. "use strict";
  17777. __webpack_require__.r(__webpack_exports__);
  17778. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17779. /* 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"])
  17780. /* harmony export */ });
  17781. /* 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");
  17782. /***/ }),
  17783. /***/ "./resources/js/components/AppSubSidebar.vue?vue&type=script&setup=true&lang=js":
  17784. /*!**************************************************************************************!*\
  17785. !*** ./resources/js/components/AppSubSidebar.vue?vue&type=script&setup=true&lang=js ***!
  17786. \**************************************************************************************/
  17787. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17788. "use strict";
  17789. __webpack_require__.r(__webpack_exports__);
  17790. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17791. /* 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"])
  17792. /* harmony export */ });
  17793. /* 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");
  17794. /***/ }),
  17795. /***/ "./resources/js/components/AppTopBar.vue?vue&type=script&setup=true&lang=js":
  17796. /*!**********************************************************************************!*\
  17797. !*** ./resources/js/components/AppTopBar.vue?vue&type=script&setup=true&lang=js ***!
  17798. \**********************************************************************************/
  17799. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17800. "use strict";
  17801. __webpack_require__.r(__webpack_exports__);
  17802. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17803. /* 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"])
  17804. /* harmony export */ });
  17805. /* 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");
  17806. /***/ }),
  17807. /***/ "./resources/js/layouts/DashboardLayout.vue?vue&type=script&setup=true&lang=js":
  17808. /*!*************************************************************************************!*\
  17809. !*** ./resources/js/layouts/DashboardLayout.vue?vue&type=script&setup=true&lang=js ***!
  17810. \*************************************************************************************/
  17811. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17812. "use strict";
  17813. __webpack_require__.r(__webpack_exports__);
  17814. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17815. /* 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"])
  17816. /* harmony export */ });
  17817. /* 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");
  17818. /***/ }),
  17819. /***/ "./resources/js/pages/mutation/Report.vue?vue&type=script&setup=true&lang=js":
  17820. /*!***********************************************************************************!*\
  17821. !*** ./resources/js/pages/mutation/Report.vue?vue&type=script&setup=true&lang=js ***!
  17822. \***********************************************************************************/
  17823. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17824. "use strict";
  17825. __webpack_require__.r(__webpack_exports__);
  17826. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17827. /* 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"])
  17828. /* harmony export */ });
  17829. /* 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");
  17830. /***/ }),
  17831. /***/ "./resources/js/components/AppButtonLink.vue?vue&type=template&id=c3621f1c":
  17832. /*!*********************************************************************************!*\
  17833. !*** ./resources/js/components/AppButtonLink.vue?vue&type=template&id=c3621f1c ***!
  17834. \*********************************************************************************/
  17835. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17836. "use strict";
  17837. __webpack_require__.r(__webpack_exports__);
  17838. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17839. /* 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)
  17840. /* harmony export */ });
  17841. /* 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");
  17842. /***/ }),
  17843. /***/ "./resources/js/components/AppFooter.vue?vue&type=template&id=4ab6097e&scoped=true":
  17844. /*!*****************************************************************************************!*\
  17845. !*** ./resources/js/components/AppFooter.vue?vue&type=template&id=4ab6097e&scoped=true ***!
  17846. \*****************************************************************************************/
  17847. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17848. "use strict";
  17849. __webpack_require__.r(__webpack_exports__);
  17850. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17851. /* 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)
  17852. /* harmony export */ });
  17853. /* 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");
  17854. /***/ }),
  17855. /***/ "./resources/js/components/AppMessage.vue?vue&type=template&id=07159051":
  17856. /*!******************************************************************************!*\
  17857. !*** ./resources/js/components/AppMessage.vue?vue&type=template&id=07159051 ***!
  17858. \******************************************************************************/
  17859. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17860. "use strict";
  17861. __webpack_require__.r(__webpack_exports__);
  17862. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17863. /* 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)
  17864. /* harmony export */ });
  17865. /* 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");
  17866. /***/ }),
  17867. /***/ "./resources/js/components/AppPagination.vue?vue&type=template&id=4da56ec0":
  17868. /*!*********************************************************************************!*\
  17869. !*** ./resources/js/components/AppPagination.vue?vue&type=template&id=4da56ec0 ***!
  17870. \*********************************************************************************/
  17871. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17872. "use strict";
  17873. __webpack_require__.r(__webpack_exports__);
  17874. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17875. /* 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)
  17876. /* harmony export */ });
  17877. /* 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");
  17878. /***/ }),
  17879. /***/ "./resources/js/components/AppSidebar.vue?vue&type=template&id=22a4e926&scoped=true":
  17880. /*!******************************************************************************************!*\
  17881. !*** ./resources/js/components/AppSidebar.vue?vue&type=template&id=22a4e926&scoped=true ***!
  17882. \******************************************************************************************/
  17883. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17884. "use strict";
  17885. __webpack_require__.r(__webpack_exports__);
  17886. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17887. /* 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)
  17888. /* harmony export */ });
  17889. /* 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");
  17890. /***/ }),
  17891. /***/ "./resources/js/components/AppSubSidebar.vue?vue&type=template&id=0addd9bc&scoped=true":
  17892. /*!*********************************************************************************************!*\
  17893. !*** ./resources/js/components/AppSubSidebar.vue?vue&type=template&id=0addd9bc&scoped=true ***!
  17894. \*********************************************************************************************/
  17895. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17896. "use strict";
  17897. __webpack_require__.r(__webpack_exports__);
  17898. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17899. /* 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)
  17900. /* harmony export */ });
  17901. /* 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");
  17902. /***/ }),
  17903. /***/ "./resources/js/components/AppTopBar.vue?vue&type=template&id=42bf62a4&scoped=true":
  17904. /*!*****************************************************************************************!*\
  17905. !*** ./resources/js/components/AppTopBar.vue?vue&type=template&id=42bf62a4&scoped=true ***!
  17906. \*****************************************************************************************/
  17907. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17908. "use strict";
  17909. __webpack_require__.r(__webpack_exports__);
  17910. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17911. /* 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)
  17912. /* harmony export */ });
  17913. /* 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");
  17914. /***/ }),
  17915. /***/ "./resources/js/layouts/DashboardLayout.vue?vue&type=template&id=549bf5ac&scoped=true":
  17916. /*!********************************************************************************************!*\
  17917. !*** ./resources/js/layouts/DashboardLayout.vue?vue&type=template&id=549bf5ac&scoped=true ***!
  17918. \********************************************************************************************/
  17919. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17920. "use strict";
  17921. __webpack_require__.r(__webpack_exports__);
  17922. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17923. /* 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)
  17924. /* harmony export */ });
  17925. /* 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");
  17926. /***/ }),
  17927. /***/ "./resources/js/pages/mutation/Report.vue?vue&type=template&id=289c9421":
  17928. /*!******************************************************************************!*\
  17929. !*** ./resources/js/pages/mutation/Report.vue?vue&type=template&id=289c9421 ***!
  17930. \******************************************************************************/
  17931. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17932. "use strict";
  17933. __webpack_require__.r(__webpack_exports__);
  17934. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17935. /* 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)
  17936. /* harmony export */ });
  17937. /* 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");
  17938. /***/ }),
  17939. /***/ "./resources/js/components/AppFooter.vue?vue&type=style&index=0&id=4ab6097e&lang=scss&scoped=true":
  17940. /*!********************************************************************************************************!*\
  17941. !*** ./resources/js/components/AppFooter.vue?vue&type=style&index=0&id=4ab6097e&lang=scss&scoped=true ***!
  17942. \********************************************************************************************************/
  17943. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17944. "use strict";
  17945. __webpack_require__.r(__webpack_exports__);
  17946. /* 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");
  17947. /***/ }),
  17948. /***/ "./resources/js/components/AppSidebar.vue?vue&type=style&index=0&id=22a4e926&lang=scss&scoped=true":
  17949. /*!*********************************************************************************************************!*\
  17950. !*** ./resources/js/components/AppSidebar.vue?vue&type=style&index=0&id=22a4e926&lang=scss&scoped=true ***!
  17951. \*********************************************************************************************************/
  17952. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17953. "use strict";
  17954. __webpack_require__.r(__webpack_exports__);
  17955. /* 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");
  17956. /***/ }),
  17957. /***/ "./resources/js/components/AppSubSidebar.vue?vue&type=style&index=0&id=0addd9bc&lang=scss&scoped=true":
  17958. /*!************************************************************************************************************!*\
  17959. !*** ./resources/js/components/AppSubSidebar.vue?vue&type=style&index=0&id=0addd9bc&lang=scss&scoped=true ***!
  17960. \************************************************************************************************************/
  17961. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17962. "use strict";
  17963. __webpack_require__.r(__webpack_exports__);
  17964. /* 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");
  17965. /***/ }),
  17966. /***/ "./resources/js/components/AppTopBar.vue?vue&type=style&index=0&id=42bf62a4&lang=scss&scoped=true":
  17967. /*!********************************************************************************************************!*\
  17968. !*** ./resources/js/components/AppTopBar.vue?vue&type=style&index=0&id=42bf62a4&lang=scss&scoped=true ***!
  17969. \********************************************************************************************************/
  17970. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17971. "use strict";
  17972. __webpack_require__.r(__webpack_exports__);
  17973. /* 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");
  17974. /***/ }),
  17975. /***/ "./resources/js/layouts/DashboardLayout.vue?vue&type=style&index=0&id=549bf5ac&lang=scss&scoped=true":
  17976. /*!***********************************************************************************************************!*\
  17977. !*** ./resources/js/layouts/DashboardLayout.vue?vue&type=style&index=0&id=549bf5ac&lang=scss&scoped=true ***!
  17978. \***********************************************************************************************************/
  17979. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17980. "use strict";
  17981. __webpack_require__.r(__webpack_exports__);
  17982. /* 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");
  17983. /***/ })
  17984. }]);