resources_js_pages_member_Edit_vue.js 718KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916
  1. (self["webpackChunk"] = self["webpackChunk"] || []).push([["resources_js_pages_member_Edit_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/AppDropdown.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/AppDropdown.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 vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  13. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  14. props: {
  15. label: {
  16. type: String,
  17. required: true
  18. },
  19. disabled: {
  20. type: Boolean,
  21. "default": false
  22. },
  23. placeholder: {
  24. type: String,
  25. required: true
  26. },
  27. error: {
  28. type: String,
  29. "default": null
  30. },
  31. optionLabel: {
  32. type: String,
  33. "default": 'label'
  34. },
  35. optionValue: {
  36. type: String,
  37. "default": 'value'
  38. },
  39. optionDisabled: {
  40. type: String,
  41. "default": 'disabled'
  42. },
  43. optionGroupChildren: {
  44. type: String,
  45. "default": null
  46. },
  47. optionGroupLabel: {
  48. type: String,
  49. "default": null
  50. },
  51. options: {
  52. type: Array,
  53. required: true
  54. },
  55. modelValue: null
  56. },
  57. emits: ['update:modelValue'],
  58. setup: function setup(__props, _ref) {
  59. var expose = _ref.expose;
  60. expose();
  61. var props = __props;
  62. var isError = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(function () {
  63. return props.error ? true : false;
  64. });
  65. var forLabel = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(function () {
  66. return props.label ? props.label.toLowerCase().replace(/\s+/g, '-') : null;
  67. });
  68. var ariaDescribedbyLabel = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(function () {
  69. return props.label ? props.label.toLowerCase().replace(/\s+/g, '-') + '-help' : null;
  70. });
  71. var selectedDropdownLabel = function selectedDropdownLabel(value) {
  72. var result = props.options.find(function (option) {
  73. return option[props.optionValue] == value;
  74. });
  75. if (result) {
  76. return result[props.optionLabel];
  77. }
  78. };
  79. var __returned__ = {
  80. props: props,
  81. isError: isError,
  82. forLabel: forLabel,
  83. ariaDescribedbyLabel: ariaDescribedbyLabel,
  84. selectedDropdownLabel: selectedDropdownLabel,
  85. computed: vue__WEBPACK_IMPORTED_MODULE_0__.computed
  86. };
  87. Object.defineProperty(__returned__, '__isScriptSetup', {
  88. enumerable: false,
  89. value: true
  90. });
  91. return __returned__;
  92. }
  93. });
  94. /***/ }),
  95. /***/ "./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/AppInputText.vue?vue&type=script&setup=true&lang=js":
  96. /*!*****************************************************************************************************************************************************************************************************************!*\
  97. !*** ./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/AppInputText.vue?vue&type=script&setup=true&lang=js ***!
  98. \*****************************************************************************************************************************************************************************************************************/
  99. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  100. "use strict";
  101. __webpack_require__.r(__webpack_exports__);
  102. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  103. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  104. /* harmony export */ });
  105. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  106. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  107. props: {
  108. label: {
  109. type: String,
  110. required: true
  111. },
  112. disabled: {
  113. type: Boolean,
  114. "default": false
  115. },
  116. placeholder: {
  117. type: String,
  118. required: true
  119. },
  120. error: {
  121. type: String,
  122. "default": null
  123. },
  124. modelValue: null
  125. },
  126. emits: ['update:modelValue'],
  127. setup: function setup(__props, _ref) {
  128. var expose = _ref.expose;
  129. expose();
  130. var props = __props;
  131. var isError = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(function () {
  132. return props.error ? true : false;
  133. });
  134. var forLabel = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(function () {
  135. return props.label.toLowerCase().replace(/\s+/g, '-');
  136. });
  137. var ariaDescribedbyLabel = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(function () {
  138. return props.label.toLowerCase().replace(/\s+/g, '-') + '-help';
  139. });
  140. var __returned__ = {
  141. props: props,
  142. isError: isError,
  143. forLabel: forLabel,
  144. ariaDescribedbyLabel: ariaDescribedbyLabel,
  145. computed: vue__WEBPACK_IMPORTED_MODULE_0__.computed
  146. };
  147. Object.defineProperty(__returned__, '__isScriptSetup', {
  148. enumerable: false,
  149. value: true
  150. });
  151. return __returned__;
  152. }
  153. });
  154. /***/ }),
  155. /***/ "./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":
  156. /*!***************************************************************************************************************************************************************************************************************!*\
  157. !*** ./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 ***!
  158. \***************************************************************************************************************************************************************************************************************/
  159. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  160. "use strict";
  161. __webpack_require__.r(__webpack_exports__);
  162. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  163. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  164. /* harmony export */ });
  165. /* harmony import */ var _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @inertiajs/inertia-vue3 */ "./node_modules/@inertiajs/inertia-vue3/dist/index.js");
  166. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  167. setup: function setup(__props, _ref) {
  168. var expose = _ref.expose;
  169. expose();
  170. var onClose = function onClose() {
  171. (0,_inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_0__.usePage)().props.value.errors = {};
  172. (0,_inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_0__.usePage)().props.value.flash.success = null;
  173. (0,_inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_0__.usePage)().props.value.flash.error = null;
  174. };
  175. var __returned__ = {
  176. onClose: onClose,
  177. usePage: _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_0__.usePage
  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/components/AppSidebar.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/components/AppSidebar.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 _components_AppSubSidebar_vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/components/AppSubSidebar.vue */ "./resources/js/components/AppSubSidebar.vue");
  198. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  199. props: {
  200. menu: Array
  201. },
  202. setup: function setup(__props, _ref) {
  203. var expose = _ref.expose;
  204. expose();
  205. var __returned__ = {
  206. AppSubSidebar: _components_AppSubSidebar_vue__WEBPACK_IMPORTED_MODULE_0__["default"]
  207. };
  208. Object.defineProperty(__returned__, '__isScriptSetup', {
  209. enumerable: false,
  210. value: true
  211. });
  212. return __returned__;
  213. }
  214. });
  215. /***/ }),
  216. /***/ "./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":
  217. /*!******************************************************************************************************************************************************************************************************************!*\
  218. !*** ./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 ***!
  219. \******************************************************************************************************************************************************************************************************************/
  220. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  221. "use strict";
  222. __webpack_require__.r(__webpack_exports__);
  223. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  224. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  225. /* harmony export */ });
  226. /* harmony import */ var _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @inertiajs/inertia-vue3 */ "./node_modules/@inertiajs/inertia-vue3/dist/index.js");
  227. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  228. props: {
  229. items: Array,
  230. root: {
  231. type: Boolean,
  232. "default": false
  233. }
  234. },
  235. setup: function setup(__props, _ref) {
  236. var expose = _ref.expose;
  237. expose();
  238. var __returned__ = {
  239. Link: _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_0__.Link
  240. };
  241. Object.defineProperty(__returned__, '__isScriptSetup', {
  242. enumerable: false,
  243. value: true
  244. });
  245. return __returned__;
  246. }
  247. });
  248. /***/ }),
  249. /***/ "./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":
  250. /*!**************************************************************************************************************************************************************************************************************!*\
  251. !*** ./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 ***!
  252. \**************************************************************************************************************************************************************************************************************/
  253. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  254. "use strict";
  255. __webpack_require__.r(__webpack_exports__);
  256. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  257. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  258. /* harmony export */ });
  259. /* harmony import */ var _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @inertiajs/inertia-vue3 */ "./node_modules/@inertiajs/inertia-vue3/dist/index.js");
  260. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  261. emits: ['menu-toggle'],
  262. setup: function setup(__props, _ref) {
  263. var expose = _ref.expose;
  264. expose();
  265. var __returned__ = {
  266. Link: _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_0__.Link
  267. };
  268. Object.defineProperty(__returned__, '__isScriptSetup', {
  269. enumerable: false,
  270. value: true
  271. });
  272. return __returned__;
  273. }
  274. });
  275. /***/ }),
  276. /***/ "./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":
  277. /*!*****************************************************************************************************************************************************************************************************************!*\
  278. !*** ./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 ***!
  279. \*****************************************************************************************************************************************************************************************************************/
  280. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  281. "use strict";
  282. __webpack_require__.r(__webpack_exports__);
  283. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  284. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  285. /* harmony export */ });
  286. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  287. /* harmony import */ var _components_AppTopBar_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/components/AppTopBar.vue */ "./resources/js/components/AppTopBar.vue");
  288. /* harmony import */ var _components_AppSidebar_vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/components/AppSidebar.vue */ "./resources/js/components/AppSidebar.vue");
  289. /* harmony import */ var _components_AppFooter_vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/components/AppFooter.vue */ "./resources/js/components/AppFooter.vue");
  290. /* harmony import */ var _components_AppMessage_vue__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/components/AppMessage.vue */ "./resources/js/components/AppMessage.vue");
  291. /* harmony import */ var _utils_menu__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/utils/menu */ "./resources/js/utils/menu.js");
  292. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  293. setup: function setup(__props, _ref) {
  294. var expose = _ref.expose;
  295. expose();
  296. var mobileMenuActive = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(false);
  297. var staticMenuInactive = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(false);
  298. var menuClick = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(false);
  299. var isDesktop = function isDesktop() {
  300. return window.innerWidth >= 992;
  301. };
  302. var containerClass = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(function () {
  303. return ['layout-wrapper', {
  304. 'layout-static-sidebar-inactive': staticMenuInactive.value,
  305. 'layout-mobile-sidebar-active': mobileMenuActive.value
  306. }];
  307. });
  308. var onWrapperClick = function onWrapperClick() {
  309. if (!menuClick.value) {
  310. mobileMenuActive.value = false;
  311. }
  312. menuClick.value = false;
  313. };
  314. var onMenuToggle = function onMenuToggle(event) {
  315. menuClick.value = true;
  316. if (isDesktop()) {
  317. staticMenuInactive.value = !staticMenuInactive.value;
  318. } else {
  319. mobileMenuActive.value = !mobileMenuActive.value;
  320. }
  321. event.preventDefault();
  322. };
  323. var __returned__ = {
  324. mobileMenuActive: mobileMenuActive,
  325. staticMenuInactive: staticMenuInactive,
  326. menuClick: menuClick,
  327. isDesktop: isDesktop,
  328. containerClass: containerClass,
  329. onWrapperClick: onWrapperClick,
  330. onMenuToggle: onMenuToggle,
  331. ref: vue__WEBPACK_IMPORTED_MODULE_0__.ref,
  332. computed: vue__WEBPACK_IMPORTED_MODULE_0__.computed,
  333. AppTopBar: _components_AppTopBar_vue__WEBPACK_IMPORTED_MODULE_1__["default"],
  334. AppSidebar: _components_AppSidebar_vue__WEBPACK_IMPORTED_MODULE_2__["default"],
  335. AppFooter: _components_AppFooter_vue__WEBPACK_IMPORTED_MODULE_3__["default"],
  336. AppMessage: _components_AppMessage_vue__WEBPACK_IMPORTED_MODULE_4__["default"],
  337. menu: _utils_menu__WEBPACK_IMPORTED_MODULE_5__["default"]
  338. };
  339. Object.defineProperty(__returned__, '__isScriptSetup', {
  340. enumerable: false,
  341. value: true
  342. });
  343. return __returned__;
  344. }
  345. });
  346. /***/ }),
  347. /***/ "./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/member/Edit.vue?vue&type=script&setup=true&lang=js":
  348. /*!***********************************************************************************************************************************************************************************************************!*\
  349. !*** ./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/member/Edit.vue?vue&type=script&setup=true&lang=js ***!
  350. \***********************************************************************************************************************************************************************************************************/
  351. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  352. "use strict";
  353. __webpack_require__.r(__webpack_exports__);
  354. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  355. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  356. /* harmony export */ });
  357. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  358. /* harmony import */ var _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @inertiajs/inertia-vue3 */ "./node_modules/@inertiajs/inertia-vue3/dist/index.js");
  359. /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js");
  360. /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);
  361. /* harmony import */ var primevue_useconfirm__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! primevue/useconfirm */ "./node_modules/primevue/useconfirm/useconfirm.esm.js");
  362. /* harmony import */ var _tableHeader__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./tableHeader */ "./resources/js/pages/member/tableHeader.js");
  363. /* harmony import */ var _useVehicle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./useVehicle */ "./resources/js/pages/member/useVehicle.js");
  364. /* harmony import */ var _components_useFormErrorReset__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/components/useFormErrorReset */ "./resources/js/components/useFormErrorReset.js");
  365. /* harmony import */ var _utils_formValidationError__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/utils/formValidationError */ "./resources/js/utils/formValidationError.js");
  366. /* harmony import */ var _layouts_DashboardLayout_vue__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/layouts/DashboardLayout.vue */ "./resources/js/layouts/DashboardLayout.vue");
  367. /* harmony import */ var _components_AppDropdown_vue__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/components/AppDropdown.vue */ "./resources/js/components/AppDropdown.vue");
  368. /* harmony import */ var _components_AppInputText_vue__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/components/AppInputText.vue */ "./resources/js/components/AppInputText.vue");
  369. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  370. props: {
  371. member: Object,
  372. typeMembers: Array,
  373. typeMember: Object,
  374. initialVehicles: Object
  375. },
  376. setup: function setup(__props, _ref) {
  377. var expose = _ref.expose;
  378. expose();
  379. var props = __props;
  380. var form = (0,_inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_1__.useForm)({
  381. name: props.member.name,
  382. phone: props.member.phone,
  383. plat_number: null,
  384. max_vehicle_id: null,
  385. type_member_id: props.member.typeMemberId
  386. });
  387. (0,_components_useFormErrorReset__WEBPACK_IMPORTED_MODULE_6__.useFormErrorReset)(form);
  388. var _useVehicle = (0,_useVehicle__WEBPACK_IMPORTED_MODULE_5__.useVehicle)(form, props.typeMember.maxVehicles, props.initialVehicles),
  389. listVehicle = _useVehicle.listVehicle,
  390. vehicleOnDelete = _useVehicle.vehicleOnDelete,
  391. vehicleOnAdd = _useVehicle.vehicleOnAdd;
  392. var confirm = (0,primevue_useconfirm__WEBPACK_IMPORTED_MODULE_3__.useConfirm)();
  393. var errorSubmitVisible = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(false);
  394. var errorSubmitText = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)();
  395. var submitValidation = function submitValidation() {
  396. var listPlatNumberGroup = (0,lodash__WEBPACK_IMPORTED_MODULE_2__.groupBy)(listVehicle, 'typeVehicleId');
  397. var listVehicles = [];
  398. for (var key in listPlatNumberGroup) {
  399. listVehicles.push({
  400. typeVehicleId: listPlatNumberGroup[key][0]['typeVehicleId'],
  401. maxVehicle: listPlatNumberGroup[key][0]['maxVehicle'],
  402. count: listPlatNumberGroup[key].length
  403. });
  404. }
  405. listVehicles.forEach(function (val) {
  406. if (val.count > val.maxVehicle) {
  407. throw new _utils_formValidationError__WEBPACK_IMPORTED_MODULE_7__["default"]('Ada perubahan pada batas maksimal kendaraan');
  408. }
  409. });
  410. };
  411. var formSent = function formSent() {
  412. form.transform(function (data) {
  413. return {
  414. name: data.name,
  415. phone: data.phone,
  416. vehicles: listVehicle,
  417. type_member_id: data.type_member_id
  418. };
  419. }).put(route('members.update', props.member.id));
  420. };
  421. var onSubmit = function onSubmit() {
  422. try {
  423. submitValidation();
  424. if (props.member.typeMemberId != form.type_member_id) {
  425. confirm.require({
  426. message: "Dikenakan tagihan perubahan member sebesar ".concat(props.typeMember.price),
  427. header: 'Tagihan Perubahan Jenis Member',
  428. acceptLabel: 'Bayar dan simpan',
  429. rejectLabel: 'Batalkan',
  430. accept: function accept() {
  431. formSent();
  432. },
  433. reject: function reject() {
  434. confirm.close();
  435. }
  436. });
  437. } else {
  438. formSent();
  439. }
  440. } catch (err) {
  441. errorSubmitVisible.value = true;
  442. errorSubmitText.value = err.message;
  443. }
  444. };
  445. var __returned__ = {
  446. props: props,
  447. form: form,
  448. listVehicle: listVehicle,
  449. vehicleOnDelete: vehicleOnDelete,
  450. vehicleOnAdd: vehicleOnAdd,
  451. confirm: confirm,
  452. errorSubmitVisible: errorSubmitVisible,
  453. errorSubmitText: errorSubmitText,
  454. submitValidation: submitValidation,
  455. formSent: formSent,
  456. onSubmit: onSubmit,
  457. ref: vue__WEBPACK_IMPORTED_MODULE_0__.ref,
  458. Head: _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_1__.Head,
  459. useForm: _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_1__.useForm,
  460. groupBy: lodash__WEBPACK_IMPORTED_MODULE_2__.groupBy,
  461. useConfirm: primevue_useconfirm__WEBPACK_IMPORTED_MODULE_3__.useConfirm,
  462. platNumberTable: _tableHeader__WEBPACK_IMPORTED_MODULE_4__.platNumberTable,
  463. useVehicle: _useVehicle__WEBPACK_IMPORTED_MODULE_5__.useVehicle,
  464. useFormErrorReset: _components_useFormErrorReset__WEBPACK_IMPORTED_MODULE_6__.useFormErrorReset,
  465. FormValidationError: _utils_formValidationError__WEBPACK_IMPORTED_MODULE_7__["default"],
  466. DashboardLayout: _layouts_DashboardLayout_vue__WEBPACK_IMPORTED_MODULE_8__["default"],
  467. AppDropdown: _components_AppDropdown_vue__WEBPACK_IMPORTED_MODULE_9__["default"],
  468. AppInputText: _components_AppInputText_vue__WEBPACK_IMPORTED_MODULE_10__["default"]
  469. };
  470. Object.defineProperty(__returned__, '__isScriptSetup', {
  471. enumerable: false,
  472. value: true
  473. });
  474. return __returned__;
  475. }
  476. });
  477. /***/ }),
  478. /***/ "./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/AppDropdown.vue?vue&type=template&id=ce0d1992":
  479. /*!*********************************************************************************************************************************************************************************************************************************************************************************!*\
  480. !*** ./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/AppDropdown.vue?vue&type=template&id=ce0d1992 ***!
  481. \*********************************************************************************************************************************************************************************************************************************************************************************/
  482. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  483. "use strict";
  484. __webpack_require__.r(__webpack_exports__);
  485. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  486. /* harmony export */ "render": () => (/* binding */ render)
  487. /* harmony export */ });
  488. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  489. var _hoisted_1 = {
  490. "class": "field"
  491. };
  492. var _hoisted_2 = ["for"];
  493. var _hoisted_3 = {
  494. key: 0
  495. };
  496. var _hoisted_4 = {
  497. key: 1
  498. };
  499. var _hoisted_5 = ["id"];
  500. function render(_ctx, _cache, $props, $setup, $data, $options) {
  501. var _component_Dropdown = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Dropdown");
  502. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_1, [$props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("label", {
  503. key: 0,
  504. "for": $setup.forLabel
  505. }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 9
  506. /* TEXT, PROPS */
  507. , _hoisted_2)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Dropdown, {
  508. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["w-full", {
  509. 'p-invalid': $setup.isError
  510. }]),
  511. id: $setup.forLabel,
  512. "aria-describedby": $setup.ariaDescribedbyLabel,
  513. "option-disabled": $props.optionDisabled,
  514. "option-group-children": $props.optionGroupChildren,
  515. "option-group-label": $props.optionGroupLabel,
  516. "option-label": $props.optionLabel,
  517. "option-value": $props.optionValue,
  518. placeholder: $props.placeholder,
  519. options: $props.options,
  520. "model-value": $props.modelValue,
  521. disabled: $props.disabled,
  522. onChange: _cache[0] || (_cache[0] = function ($event) {
  523. return _ctx.$emit('update:modelValue', $event.value);
  524. })
  525. }, {
  526. value: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function (slotProps) {
  527. return [slotProps.value ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($setup.selectedDropdownLabel(slotProps.value)), 1
  528. /* TEXT */
  529. )) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_4, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(slotProps.placeholder), 1
  530. /* TEXT */
  531. ))];
  532. }),
  533. option: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function (_ref) {
  534. var option = _ref.option,
  535. index = _ref.index;
  536. return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, "option", {
  537. option: option,
  538. index: index
  539. })];
  540. }),
  541. _: 3
  542. /* FORWARDED */
  543. }, 8
  544. /* PROPS */
  545. , ["class", "id", "aria-describedby", "option-disabled", "option-group-children", "option-group-label", "option-label", "option-value", "placeholder", "options", "model-value", "disabled"]), $props.error ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("small", {
  546. key: 1,
  547. id: $setup.ariaDescribedbyLabel,
  548. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
  549. 'p-error': $setup.isError
  550. })
  551. }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.error), 11
  552. /* TEXT, CLASS, PROPS */
  553. , _hoisted_5)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)]);
  554. }
  555. /***/ }),
  556. /***/ "./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":
  557. /*!*******************************************************************************************************************************************************************************************************************************************************************************************!*\
  558. !*** ./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 ***!
  559. \*******************************************************************************************************************************************************************************************************************************************************************************************/
  560. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  561. "use strict";
  562. __webpack_require__.r(__webpack_exports__);
  563. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  564. /* harmony export */ "render": () => (/* binding */ render)
  565. /* harmony export */ });
  566. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  567. var _withScopeId = function _withScopeId(n) {
  568. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.pushScopeId)("data-v-4ab6097e"), n = n(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.popScopeId)(), n;
  569. };
  570. var _hoisted_1 = {
  571. "class": "layout-footer"
  572. };
  573. var _hoisted_2 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(" Developed by ");
  574. var _hoisted_3 = /*#__PURE__*/_withScopeId(function () {
  575. return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("a", {
  576. href: "https://dijitalcode.com",
  577. target: "_blank",
  578. "class": "font-medium ml-2"
  579. }, "DijitalCODE", -1
  580. /* HOISTED */
  581. );
  582. });
  583. var _hoisted_4 = [_hoisted_2, _hoisted_3];
  584. function render(_ctx, _cache) {
  585. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_1, _hoisted_4);
  586. }
  587. /***/ }),
  588. /***/ "./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/AppInputText.vue?vue&type=template&id=16729fe1":
  589. /*!**********************************************************************************************************************************************************************************************************************************************************************************!*\
  590. !*** ./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/AppInputText.vue?vue&type=template&id=16729fe1 ***!
  591. \**********************************************************************************************************************************************************************************************************************************************************************************/
  592. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  593. "use strict";
  594. __webpack_require__.r(__webpack_exports__);
  595. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  596. /* harmony export */ "render": () => (/* binding */ render)
  597. /* harmony export */ });
  598. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  599. var _hoisted_1 = {
  600. "class": "field"
  601. };
  602. var _hoisted_2 = ["for"];
  603. var _hoisted_3 = ["id"];
  604. function render(_ctx, _cache, $props, $setup, $data, $options) {
  605. var _component_InputText = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("InputText");
  606. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("label", {
  607. "for": $setup.forLabel
  608. }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 9
  609. /* TEXT, PROPS */
  610. , _hoisted_2), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_InputText, {
  611. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["w-full", {
  612. 'p-invalid': $setup.isError
  613. }]),
  614. type: "text",
  615. id: $setup.forLabel,
  616. "aria-describedby": $setup.ariaDescribedbyLabel,
  617. "model-value": $props.modelValue,
  618. placeholder: $props.placeholder,
  619. value: $props.modelValue,
  620. disabled: $props.disabled,
  621. onInput: _cache[0] || (_cache[0] = function ($event) {
  622. return _ctx.$emit('update:modelValue', $event.target.value);
  623. })
  624. }, null, 8
  625. /* PROPS */
  626. , ["class", "id", "aria-describedby", "model-value", "placeholder", "value", "disabled"]), $props.error ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("small", {
  627. key: 0,
  628. id: $setup.ariaDescribedbyLabel,
  629. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)({
  630. 'p-error': $setup.isError
  631. })
  632. }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.error), 11
  633. /* TEXT, CLASS, PROPS */
  634. , _hoisted_3)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)]);
  635. }
  636. /***/ }),
  637. /***/ "./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":
  638. /*!********************************************************************************************************************************************************************************************************************************************************************************!*\
  639. !*** ./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 ***!
  640. \********************************************************************************************************************************************************************************************************************************************************************************/
  641. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  642. "use strict";
  643. __webpack_require__.r(__webpack_exports__);
  644. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  645. /* harmony export */ "render": () => (/* binding */ render)
  646. /* harmony export */ });
  647. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  648. var _hoisted_1 = {
  649. key: 0
  650. };
  651. var _hoisted_2 = {
  652. key: 1
  653. };
  654. function render(_ctx, _cache, $props, $setup, $data, $options) {
  655. var _component_Message = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Message");
  656. 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, {
  657. key: 0,
  658. severity: "success",
  659. onClose: $setup.onClose
  660. }, {
  661. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  662. return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)((0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.$page.props.flash.success), 1
  663. /* TEXT */
  664. )];
  665. }),
  666. _: 1
  667. /* STABLE */
  668. })) : (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, {
  669. key: 1,
  670. severity: "error",
  671. onClose: $setup.onClose
  672. }, {
  673. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  674. return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)((0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.$page.props.flash.error), 1
  675. /* TEXT */
  676. )];
  677. }),
  678. _: 1
  679. /* STABLE */
  680. })) : (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, {
  681. key: 2,
  682. severity: "error",
  683. onClose: $setup.onClose
  684. }, {
  685. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  686. 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
  687. /* TEXT */
  688. ))];
  689. }),
  690. _: 1
  691. /* STABLE */
  692. })) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)], 64
  693. /* STABLE_FRAGMENT */
  694. );
  695. }
  696. /***/ }),
  697. /***/ "./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":
  698. /*!********************************************************************************************************************************************************************************************************************************************************************************************!*\
  699. !*** ./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 ***!
  700. \********************************************************************************************************************************************************************************************************************************************************************************************/
  701. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  702. "use strict";
  703. __webpack_require__.r(__webpack_exports__);
  704. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  705. /* harmony export */ "render": () => (/* binding */ render)
  706. /* harmony export */ });
  707. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  708. function render(_ctx, _cache, $props, $setup, $data, $options) {
  709. 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"], {
  710. "class": "layout-menu",
  711. items: $props.menu,
  712. root: true
  713. }, null, 8
  714. /* PROPS */
  715. , ["items"])]);
  716. }
  717. /***/ }),
  718. /***/ "./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":
  719. /*!***********************************************************************************************************************************************************************************************************************************************************************************************!*\
  720. !*** ./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 ***!
  721. \***********************************************************************************************************************************************************************************************************************************************************************************************/
  722. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  723. "use strict";
  724. __webpack_require__.r(__webpack_exports__);
  725. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  726. /* harmony export */ "render": () => (/* binding */ render)
  727. /* harmony export */ });
  728. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  729. var _withScopeId = function _withScopeId(n) {
  730. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.pushScopeId)("data-v-0addd9bc"), n = n(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.popScopeId)(), n;
  731. };
  732. var _hoisted_1 = {
  733. key: 0
  734. };
  735. var _hoisted_2 = ["aria-label"];
  736. var _hoisted_3 = ["aria-label"];
  737. function render(_ctx, _cache, $props, $setup, $data, $options) {
  738. var _component_AppSubSidebar = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("AppSubSidebar", true);
  739. 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) {
  740. 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", {
  741. key: i,
  742. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([{
  743. 'layout-menuitem-category': $props.root
  744. }]),
  745. role: "none"
  746. }, [$props.root ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
  747. key: 0
  748. }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", {
  749. "class": "layout-menuitem-root-text",
  750. "aria-label": item.label
  751. }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(item.label), 9
  752. /* TEXT, PROPS */
  753. , _hoisted_2), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_AppSubSidebar, {
  754. items: item.items
  755. }, null, 8
  756. /* PROPS */
  757. , ["items"])], 64
  758. /* STABLE_FRAGMENT */
  759. )) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
  760. key: 1
  761. }, [item.to ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)($setup["Link"], {
  762. key: 0,
  763. role: "menuitem",
  764. href: item.to,
  765. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([{
  766. 'router-link-active': _ctx.$page.component.startsWith(item.component) || _ctx.$page.url.startsWith(item.to),
  767. 'router-link-exact-active': _ctx.$page.component.startsWith(item.component) || _ctx.$page.url.startsWith(item.to)
  768. }]),
  769. "aria-label": item.label
  770. }, {
  771. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  772. return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("i", {
  773. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(item.icon)
  774. }, null, 2
  775. /* CLASS */
  776. ), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(item.label), 1
  777. /* TEXT */
  778. )];
  779. }),
  780. _: 2
  781. /* DYNAMIC */
  782. }, 1032
  783. /* PROPS, DYNAMIC_SLOTS */
  784. , ["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", {
  785. key: 1,
  786. href: "#",
  787. role: "menuitem",
  788. "aria-label": item.label
  789. }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("i", {
  790. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(item.icon)
  791. }, null, 2
  792. /* CLASS */
  793. ), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(item.label), 1
  794. /* TEXT */
  795. )], 8
  796. /* PROPS */
  797. , _hoisted_3)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_AppSubSidebar, {
  798. items: item.items
  799. }, null, 8
  800. /* PROPS */
  801. , ["items"])], 64
  802. /* STABLE_FRAGMENT */
  803. ))], 2
  804. /* CLASS */
  805. )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)], 64
  806. /* STABLE_FRAGMENT */
  807. );
  808. }), 256
  809. /* UNKEYED_FRAGMENT */
  810. ))])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true);
  811. }
  812. /***/ }),
  813. /***/ "./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":
  814. /*!*******************************************************************************************************************************************************************************************************************************************************************************************!*\
  815. !*** ./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 ***!
  816. \*******************************************************************************************************************************************************************************************************************************************************************************************/
  817. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  818. "use strict";
  819. __webpack_require__.r(__webpack_exports__);
  820. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  821. /* harmony export */ "render": () => (/* binding */ render)
  822. /* harmony export */ });
  823. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  824. var _withScopeId = function _withScopeId(n) {
  825. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.pushScopeId)("data-v-42bf62a4"), n = n(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.popScopeId)(), n;
  826. };
  827. var _hoisted_1 = {
  828. "class": "layout-topbar"
  829. };
  830. var _hoisted_2 = /*#__PURE__*/_withScopeId(function () {
  831. return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("img", {
  832. alt: "Logo",
  833. src: "/images/logo.svg",
  834. "class": "md:mr-3"
  835. }, null, -1
  836. /* HOISTED */
  837. );
  838. });
  839. var _hoisted_3 = /*#__PURE__*/_withScopeId(function () {
  840. return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", null, "Parkirin", -1
  841. /* HOISTED */
  842. );
  843. });
  844. var _hoisted_4 = /*#__PURE__*/_withScopeId(function () {
  845. return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("i", {
  846. "class": "pi pi-bars"
  847. }, null, -1
  848. /* HOISTED */
  849. );
  850. });
  851. var _hoisted_5 = [_hoisted_4];
  852. var _hoisted_6 = {
  853. "class": "p-link layout-topbar-menu-button layout-topbar-button"
  854. };
  855. var _hoisted_7 = /*#__PURE__*/_withScopeId(function () {
  856. return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("i", {
  857. "class": "pi pi-ellipsis-v"
  858. }, null, -1
  859. /* HOISTED */
  860. );
  861. });
  862. var _hoisted_8 = [_hoisted_7];
  863. var _hoisted_9 = {
  864. "class": "layout-topbar-menu hidden lg:flex origin-top"
  865. };
  866. var _hoisted_10 = {
  867. "class": "align-self-center"
  868. };
  869. var _hoisted_11 = {
  870. "class": "hidden lg:inline"
  871. };
  872. var _hoisted_12 = /*#__PURE__*/_withScopeId(function () {
  873. return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("i", {
  874. "class": "pi pi-user"
  875. }, null, -1
  876. /* HOISTED */
  877. );
  878. });
  879. var _hoisted_13 = /*#__PURE__*/_withScopeId(function () {
  880. return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", null, "Profil Saya", -1
  881. /* HOISTED */
  882. );
  883. });
  884. var _hoisted_14 = /*#__PURE__*/_withScopeId(function () {
  885. return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("i", {
  886. "class": "pi pi-sign-out"
  887. }, null, -1
  888. /* HOISTED */
  889. );
  890. });
  891. var _hoisted_15 = /*#__PURE__*/_withScopeId(function () {
  892. return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", null, "Sign Out", -1
  893. /* HOISTED */
  894. );
  895. });
  896. function render(_ctx, _cache, $props, $setup, $data, $options) {
  897. var _directive_styleclass = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveDirective)("styleclass");
  898. 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"], {
  899. href: "/",
  900. "class": "layout-topbar-logo"
  901. }, {
  902. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  903. return [_hoisted_2, _hoisted_3];
  904. }),
  905. _: 1
  906. /* STABLE */
  907. }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("button", {
  908. "class": "p-link layout-menu-button layout-topbar-button",
  909. onClick: _cache[0] || (_cache[0] = function ($event) {
  910. return _ctx.$emit('menu-toggle', $event);
  911. })
  912. }, _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, {
  913. selector: '@next',
  914. enterClass: 'hidden',
  915. enterActiveClass: 'scalein',
  916. leaveToClass: 'hidden',
  917. leaveActiveClass: 'fadeout',
  918. hideOnOutsideClick: true
  919. }]]), (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
  920. /* TEXT */
  921. )]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("li", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["Link"], {
  922. href: _ctx.route('users.show', _ctx.$page.props.auth.user.id),
  923. "class": "p-link layout-topbar-button"
  924. }, {
  925. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  926. return [_hoisted_12, _hoisted_13];
  927. }),
  928. _: 1
  929. /* STABLE */
  930. }, 8
  931. /* PROPS */
  932. , ["href"])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("li", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["Link"], {
  933. href: _ctx.route('logout'),
  934. as: "button",
  935. method: "post",
  936. "class": "p-link layout-topbar-button"
  937. }, {
  938. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  939. return [_hoisted_14, _hoisted_15];
  940. }),
  941. _: 1
  942. /* STABLE */
  943. }, 8
  944. /* PROPS */
  945. , ["href"])])])]);
  946. }
  947. /***/ }),
  948. /***/ "./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":
  949. /*!**********************************************************************************************************************************************************************************************************************************************************************************************!*\
  950. !*** ./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 ***!
  951. \**********************************************************************************************************************************************************************************************************************************************************************************************/
  952. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  953. "use strict";
  954. __webpack_require__.r(__webpack_exports__);
  955. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  956. /* harmony export */ "render": () => (/* binding */ render)
  957. /* harmony export */ });
  958. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  959. var _withScopeId = function _withScopeId(n) {
  960. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.pushScopeId)("data-v-549bf5ac"), n = n(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.popScopeId)(), n;
  961. };
  962. var _hoisted_1 = {
  963. "class": "layout-sidebar"
  964. };
  965. var _hoisted_2 = {
  966. "class": "layout-main-container"
  967. };
  968. var _hoisted_3 = {
  969. "class": "layout-main"
  970. };
  971. var _hoisted_4 = {
  972. key: 0,
  973. "class": "layout-mask p-component-overlay"
  974. };
  975. function render(_ctx, _cache, $props, $setup, $data, $options) {
  976. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", {
  977. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)($setup.containerClass),
  978. onClick: $setup.onWrapperClick
  979. }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["AppTopBar"], {
  980. onMenuToggle: $setup.onMenuToggle
  981. }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["AppSidebar"], {
  982. menu: $setup.menu[_ctx.$page.props.auth.user.role_id]
  983. }, null, 8
  984. /* PROPS */
  985. , ["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, {
  986. name: "layout-mask"
  987. }, {
  988. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  989. 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)];
  990. }),
  991. _: 1
  992. /* STABLE */
  993. })], 2
  994. /* CLASS */
  995. );
  996. }
  997. /***/ }),
  998. /***/ "./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/member/Edit.vue?vue&type=template&id=1a9fb226":
  999. /*!****************************************************************************************************************************************************************************************************************************************************************************!*\
  1000. !*** ./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/member/Edit.vue?vue&type=template&id=1a9fb226 ***!
  1001. \****************************************************************************************************************************************************************************************************************************************************************************/
  1002. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  1003. "use strict";
  1004. __webpack_require__.r(__webpack_exports__);
  1005. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1006. /* harmony export */ "render": () => (/* binding */ render)
  1007. /* harmony export */ });
  1008. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  1009. var _hoisted_1 = {
  1010. "class": "grid"
  1011. };
  1012. var _hoisted_2 = {
  1013. "class": "col-12 md:col-8"
  1014. };
  1015. var _hoisted_3 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(" Ubah Member ");
  1016. var _hoisted_4 = {
  1017. "class": "grid"
  1018. };
  1019. var _hoisted_5 = {
  1020. "class": "col-12 md:col-6"
  1021. };
  1022. var _hoisted_6 = {
  1023. "class": "col-12 md:col-6"
  1024. };
  1025. var _hoisted_7 = {
  1026. "class": "col-12 md:col-6"
  1027. };
  1028. var _hoisted_8 = {
  1029. "class": "grid"
  1030. };
  1031. var _hoisted_9 = {
  1032. "class": "col-12 md:col-8"
  1033. };
  1034. var _hoisted_10 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)("Detail Harga");
  1035. var _hoisted_11 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h3", {
  1036. "class": "text-base font-bold mb-0"
  1037. }, "Jenis Member", -1
  1038. /* HOISTED */
  1039. );
  1040. var _hoisted_12 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h3", {
  1041. "class": "text-base font-bold mb-0"
  1042. }, "Batas Maksimal Kendaraan", -1
  1043. /* HOISTED */
  1044. );
  1045. var _hoisted_13 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h3", {
  1046. "class": "text-base font-bold mb-0"
  1047. }, "Keterangan", -1
  1048. /* HOISTED */
  1049. );
  1050. var _hoisted_14 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("h3", {
  1051. "class": "text-base font-bold mb-0"
  1052. }, "Tarif Member", -1
  1053. /* HOISTED */
  1054. );
  1055. var _hoisted_15 = {
  1056. key: 0,
  1057. "class": "grid"
  1058. };
  1059. var _hoisted_16 = {
  1060. "class": "col-12 md:col-8"
  1061. };
  1062. var _hoisted_17 = {
  1063. "class": "grid"
  1064. };
  1065. var _hoisted_18 = {
  1066. "class": "col-12 md:col-6"
  1067. };
  1068. var _hoisted_19 = {
  1069. "class": "col-12 md:col-6"
  1070. };
  1071. var _hoisted_20 = {
  1072. "class": "col-12 mb-3 md:mb-0"
  1073. };
  1074. var _hoisted_21 = {
  1075. "class": "flex flex-column md:flex-row md:align-items-center justify-content-end"
  1076. };
  1077. var _hoisted_22 = {
  1078. "class": "col-12"
  1079. };
  1080. var _hoisted_23 = {
  1081. style: {
  1082. "color": "#b71c1c"
  1083. }
  1084. };
  1085. var _hoisted_24 = {
  1086. "class": "flex justify-content-end"
  1087. };
  1088. var _hoisted_25 = {
  1089. "class": "grid"
  1090. };
  1091. var _hoisted_26 = {
  1092. "class": "col-12 flex flex-column md:flex-row justify-content-center md:justify-content-end"
  1093. };
  1094. function render(_ctx, _cache, $props, $setup, $data, $options) {
  1095. var _component_ConfirmDialog = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("ConfirmDialog");
  1096. var _component_Dialog = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Dialog");
  1097. var _component_Card = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Card");
  1098. var _component_Button = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Button");
  1099. var _component_Column = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Column");
  1100. var _component_DataTable = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("DataTable");
  1101. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["Head"], {
  1102. title: "Ubah Member"
  1103. }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["DashboardLayout"], null, {
  1104. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  1105. return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ConfirmDialog), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Dialog, {
  1106. modal: "",
  1107. header: "Error",
  1108. visible: $setup.errorSubmitVisible,
  1109. "onUpdate:visible": _cache[0] || (_cache[0] = function ($event) {
  1110. return $setup.errorSubmitVisible = $event;
  1111. }),
  1112. contentStyle: "color: #b71c1c",
  1113. closable: false,
  1114. style: {
  1115. width: '40vw'
  1116. }
  1117. }, {
  1118. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  1119. return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($setup.errorSubmitText), 1
  1120. /* TEXT */
  1121. )];
  1122. }),
  1123. _: 1
  1124. /* STABLE */
  1125. }, 8
  1126. /* PROPS */
  1127. , ["visible"]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Card, null, {
  1128. title: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  1129. return [_hoisted_3];
  1130. }),
  1131. content: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  1132. return [(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)($setup["AppInputText"], {
  1133. modelValue: $setup.form.name,
  1134. "onUpdate:modelValue": _cache[1] || (_cache[1] = function ($event) {
  1135. return $setup.form.name = $event;
  1136. }),
  1137. label: "Nama",
  1138. placeholder: "nama",
  1139. error: $setup.form.errors.name
  1140. }, null, 8
  1141. /* PROPS */
  1142. , ["modelValue", "error"])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_6, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["AppInputText"], {
  1143. modelValue: $setup.form.phone,
  1144. "onUpdate:modelValue": _cache[2] || (_cache[2] = function ($event) {
  1145. return $setup.form.phone = $event;
  1146. }),
  1147. label: "Nomor HP",
  1148. placeholder: "nomor hp",
  1149. error: $setup.form.errors.phone
  1150. }, null, 8
  1151. /* PROPS */
  1152. , ["modelValue", "error"])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_7, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["AppDropdown"], {
  1153. label: "Jenis member",
  1154. placeholder: "pilih satu",
  1155. modelValue: $setup.form.type_member_id,
  1156. "onUpdate:modelValue": _cache[3] || (_cache[3] = function ($event) {
  1157. return $setup.form.type_member_id = $event;
  1158. }),
  1159. options: $props.typeMembers,
  1160. error: $setup.form.errors.type_member_id
  1161. }, null, 8
  1162. /* PROPS */
  1163. , ["modelValue", "options", "error"])])])];
  1164. }),
  1165. _: 1
  1166. /* STABLE */
  1167. })])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_8, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_9, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Card, {
  1168. "class": "bg-primary"
  1169. }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createSlots)({
  1170. title: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  1171. return [_hoisted_10];
  1172. }),
  1173. _: 2
  1174. /* DYNAMIC */
  1175. }, [$props.typeMember ? {
  1176. name: "content",
  1177. fn: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  1178. return [_hoisted_11, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.typeMember.type), 1
  1179. /* TEXT */
  1180. ), _hoisted_12, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.typeMember.max), 1
  1181. /* TEXT */
  1182. ), _hoisted_13, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.typeMember.description), 1
  1183. /* TEXT */
  1184. ), _hoisted_14, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.typeMember.price), 1
  1185. /* TEXT */
  1186. )];
  1187. })
  1188. } : undefined]), 1024
  1189. /* DYNAMIC_SLOTS */
  1190. )])]), $props.typeMember ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_15, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_16, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Card, null, {
  1191. content: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  1192. return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_17, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_18, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["AppInputText"], {
  1193. modelValue: $setup.form.plat_number,
  1194. "onUpdate:modelValue": _cache[4] || (_cache[4] = function ($event) {
  1195. return $setup.form.plat_number = $event;
  1196. }),
  1197. label: "Plat Kendaraan",
  1198. placeholder: "plat kendaraan",
  1199. disabled: !$setup.form.type_member_id,
  1200. error: $setup.form.errors.plat_number
  1201. }, null, 8
  1202. /* PROPS */
  1203. , ["modelValue", "disabled", "error"])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_19, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["AppDropdown"], {
  1204. modelValue: $setup.form.max_vehicle_id,
  1205. "onUpdate:modelValue": _cache[5] || (_cache[5] = function ($event) {
  1206. return $setup.form.max_vehicle_id = $event;
  1207. }),
  1208. label: "Jenis Kendaraan",
  1209. placeholder: "jenis kendaraan",
  1210. disabled: !$setup.form.type_member_id,
  1211. options: $props.typeMember.maxVehicles,
  1212. error: $setup.form.errors.max_vehicle_id
  1213. }, null, 8
  1214. /* PROPS */
  1215. , ["modelValue", "disabled", "options", "error"])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_20, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_21, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Button, {
  1216. label: "Tambah",
  1217. "class": "p-button-outlined",
  1218. icon: "pi pi-car",
  1219. disabled: !$setup.form.type_member_id,
  1220. onClick: $setup.vehicleOnAdd
  1221. }, null, 8
  1222. /* PROPS */
  1223. , ["disabled", "onClick"])])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_22, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_DataTable, {
  1224. "striped-rows": "",
  1225. "row-hover": "",
  1226. "responsive-layout": "scroll",
  1227. "column-resize-mode": "expand",
  1228. "edit-mode": "cell",
  1229. value: $setup.listVehicle
  1230. }, {
  1231. "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  1232. 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.platNumberTable, function (value) {
  1233. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_Column, {
  1234. field: value.field,
  1235. header: value.header,
  1236. key: value.field
  1237. }, null, 8
  1238. /* PROPS */
  1239. , ["field", "header"]);
  1240. }), 128
  1241. /* KEYED_FRAGMENT */
  1242. )), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Column, null, {
  1243. body: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function (_ref) {
  1244. var index = _ref.index;
  1245. return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", _hoisted_23, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.$page.props.errors["vehicles.".concat(index, ".platNumber")]), 1
  1246. /* TEXT */
  1247. )];
  1248. }),
  1249. _: 1
  1250. /* STABLE */
  1251. }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Column, null, {
  1252. body: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function (_ref2) {
  1253. var index = _ref2.index;
  1254. return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_24, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Button, {
  1255. icon: "pi pi-trash",
  1256. "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-rounded p-button-text", {
  1257. 'p-button-danger': _ctx.$page.props.errors["vehicles.".concat(index, ".platNumber")]
  1258. }]),
  1259. onClick: function onClick($event) {
  1260. return $setup.vehicleOnDelete(index);
  1261. }
  1262. }, null, 8
  1263. /* PROPS */
  1264. , ["class", "onClick"])])];
  1265. }),
  1266. _: 1
  1267. /* STABLE */
  1268. })];
  1269. }),
  1270. _: 1
  1271. /* STABLE */
  1272. }, 8
  1273. /* PROPS */
  1274. , ["value"])])])];
  1275. }),
  1276. footer: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
  1277. return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_25, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_26, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Button, {
  1278. label: "Simpan",
  1279. icon: "pi pi-check",
  1280. "class": "p-button-outlined",
  1281. disabled: $setup.form.processing || $setup.listVehicle.length === 0,
  1282. onClick: $setup.onSubmit
  1283. }, null, 8
  1284. /* PROPS */
  1285. , ["disabled"])])])];
  1286. }),
  1287. _: 1
  1288. /* STABLE */
  1289. })])])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)];
  1290. }),
  1291. _: 1
  1292. /* STABLE */
  1293. })], 64
  1294. /* STABLE_FRAGMENT */
  1295. );
  1296. }
  1297. /***/ }),
  1298. /***/ "./resources/js/components/useFormErrorReset.js":
  1299. /*!******************************************************!*\
  1300. !*** ./resources/js/components/useFormErrorReset.js ***!
  1301. \******************************************************/
  1302. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  1303. "use strict";
  1304. __webpack_require__.r(__webpack_exports__);
  1305. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1306. /* harmony export */ "useFormErrorReset": () => (/* binding */ useFormErrorReset)
  1307. /* harmony export */ });
  1308. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  1309. /* harmony import */ var _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @inertiajs/inertia-vue3 */ "./node_modules/@inertiajs/inertia-vue3/dist/index.js");
  1310. function useFormErrorReset(form) {
  1311. var errors = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(function () {
  1312. return (0,_inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_1__.usePage)().props.value.errors;
  1313. });
  1314. (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(errors, function () {
  1315. form.clearErrors();
  1316. });
  1317. }
  1318. /***/ }),
  1319. /***/ "./resources/js/pages/member/tableHeader.js":
  1320. /*!**************************************************!*\
  1321. !*** ./resources/js/pages/member/tableHeader.js ***!
  1322. \**************************************************/
  1323. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  1324. "use strict";
  1325. __webpack_require__.r(__webpack_exports__);
  1326. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1327. /* harmony export */ "indexTable": () => (/* binding */ indexTable),
  1328. /* harmony export */ "platNumberTable": () => (/* binding */ platNumberTable)
  1329. /* harmony export */ });
  1330. var indexTable = [{
  1331. field: 'updatedAt',
  1332. header: 'Diperbaharui'
  1333. }, {
  1334. field: 'name',
  1335. header: 'Nama'
  1336. }, {
  1337. field: 'phone',
  1338. header: 'Nomor HP'
  1339. }, {
  1340. field: 'platNumber',
  1341. header: 'Plat Kendaraan'
  1342. }, {
  1343. field: 'type',
  1344. header: 'Jenis Member'
  1345. }, {
  1346. field: 'price',
  1347. header: 'Tarif Member'
  1348. }, {
  1349. field: 'expDate',
  1350. header: 'Berakhir'
  1351. }];
  1352. var platNumberTable = [{
  1353. field: 'platNumber',
  1354. header: 'Plat Kendaraan'
  1355. }, {
  1356. field: 'typeVehicle',
  1357. header: 'Jenis Kendaraan'
  1358. }];
  1359. /***/ }),
  1360. /***/ "./resources/js/pages/member/useVehicle.js":
  1361. /*!*************************************************!*\
  1362. !*** ./resources/js/pages/member/useVehicle.js ***!
  1363. \*************************************************/
  1364. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  1365. "use strict";
  1366. __webpack_require__.r(__webpack_exports__);
  1367. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1368. /* harmony export */ "useVehicle": () => (/* binding */ useVehicle)
  1369. /* harmony export */ });
  1370. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  1371. /* harmony import */ var _inertiajs_inertia__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @inertiajs/inertia */ "./node_modules/@inertiajs/inertia/dist/index.js");
  1372. /* harmony import */ var _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @inertiajs/inertia-vue3 */ "./node_modules/@inertiajs/inertia-vue3/dist/index.js");
  1373. /* harmony import */ var _utils_formValidationError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/utils/formValidationError */ "./resources/js/utils/formValidationError.js");
  1374. function useVehicle(form, maxVehicles) {
  1375. var initialVehicles = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  1376. var listVehicle = (0,vue__WEBPACK_IMPORTED_MODULE_0__.reactive)([]);
  1377. (0,vue__WEBPACK_IMPORTED_MODULE_0__.onMounted)(function () {
  1378. initialVehicles.forEach(function (val) {
  1379. return listVehicle.push(val);
  1380. });
  1381. });
  1382. (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(function () {
  1383. return form.type_member_id;
  1384. }, function () {
  1385. vehicleClear();
  1386. form.reset('plat_number', 'max_vehicle_id');
  1387. _inertiajs_inertia__WEBPACK_IMPORTED_MODULE_1__.Inertia.reload({
  1388. only: ['typeMember'],
  1389. data: {
  1390. id: form.type_member_id
  1391. }
  1392. });
  1393. });
  1394. var vehicleClear = function vehicleClear() {
  1395. listVehicle.splice(0);
  1396. };
  1397. var vehicleOnDelete = function vehicleOnDelete(index) {
  1398. listVehicle.splice(index, 1);
  1399. (0,_inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_2__.usePage)().props.value.errors = {};
  1400. };
  1401. var vehicleAddValidation = function vehicleAddValidation() {
  1402. if (!form.plat_number) {
  1403. throw new _utils_formValidationError__WEBPACK_IMPORTED_MODULE_3__["default"]('Plat kendaraan tidak boleh kosong', 'plat_number');
  1404. }
  1405. if (!form.max_vehicle_id) {
  1406. throw new _utils_formValidationError__WEBPACK_IMPORTED_MODULE_3__["default"]('Tidak boleh kosong', 'max_vehicle_id');
  1407. }
  1408. var platNumberExist = listVehicle.filter(function (vehicle) {
  1409. return vehicle.platNumber === form.plat_number.toUpperCase();
  1410. });
  1411. if (platNumberExist.length) {
  1412. throw new _utils_formValidationError__WEBPACK_IMPORTED_MODULE_3__["default"]('Nomor plat kendaraan tidak boleh sama', 'plat_number');
  1413. }
  1414. var maxVehicles = listVehicle.filter(function (vehicle) {
  1415. return vehicle.maxVehicleId === form.max_vehicle_id;
  1416. });
  1417. if (maxVehicles.length) {
  1418. if (maxVehicles.length + 1 > maxVehicles[0].maxVehicle) {
  1419. throw new _utils_formValidationError__WEBPACK_IMPORTED_MODULE_3__["default"]('Melibihi batas maksimal kendaraan', 'plat_number');
  1420. }
  1421. }
  1422. };
  1423. var vehicleOnAdd = function vehicleOnAdd() {
  1424. try {
  1425. form.clearErrors('plat_number', 'max_vehicle_id');
  1426. vehicleAddValidation();
  1427. var typeVehicle = maxVehicles.filter(function (maxVehicle) {
  1428. return maxVehicle.value === form.max_vehicle_id;
  1429. })[0];
  1430. listVehicle.push({
  1431. platNumber: form.plat_number.toUpperCase(),
  1432. typeVehicle: typeVehicle.label,
  1433. typeVehicleId: typeVehicle.typeVehicleId,
  1434. maxVehicleId: typeVehicle.value,
  1435. maxVehicle: typeVehicle.maxVehicle
  1436. });
  1437. form.reset('plat_number', 'max_vehicle_id');
  1438. } catch (err) {
  1439. form.setError(err.field, err.message);
  1440. }
  1441. };
  1442. return {
  1443. listVehicle: listVehicle,
  1444. vehicleClear: vehicleClear,
  1445. vehicleOnDelete: vehicleOnDelete,
  1446. vehicleOnAdd: vehicleOnAdd
  1447. };
  1448. }
  1449. /***/ }),
  1450. /***/ "./resources/js/utils/formValidationError.js":
  1451. /*!***************************************************!*\
  1452. !*** ./resources/js/utils/formValidationError.js ***!
  1453. \***************************************************/
  1454. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  1455. "use strict";
  1456. __webpack_require__.r(__webpack_exports__);
  1457. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1458. /* harmony export */ "default": () => (/* binding */ FormValidationError)
  1459. /* harmony export */ });
  1460. function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
  1461. function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  1462. function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  1463. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  1464. function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
  1465. function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
  1466. function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
  1467. function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  1468. function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }
  1469. function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
  1470. function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
  1471. function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }
  1472. function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
  1473. function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
  1474. var FormValidationError = /*#__PURE__*/function (_Error) {
  1475. _inherits(FormValidationError, _Error);
  1476. var _super = _createSuper(FormValidationError);
  1477. function FormValidationError(message, field) {
  1478. var _this;
  1479. _classCallCheck(this, FormValidationError);
  1480. _this = _super.call(this, message);
  1481. _this.field = field;
  1482. return _this;
  1483. }
  1484. return _createClass(FormValidationError);
  1485. }( /*#__PURE__*/_wrapNativeSuper(Error));
  1486. /***/ }),
  1487. /***/ "./resources/js/utils/menu.js":
  1488. /*!************************************!*\
  1489. !*** ./resources/js/utils/menu.js ***!
  1490. \************************************/
  1491. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  1492. "use strict";
  1493. __webpack_require__.r(__webpack_exports__);
  1494. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1495. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  1496. /* harmony export */ });
  1497. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  1498. // Admin
  1499. 1: [{
  1500. label: 'Home',
  1501. items: [{
  1502. label: 'Dashboard',
  1503. icon: 'pi pi-home',
  1504. to: '/dashboards',
  1505. component: 'home/Index'
  1506. }]
  1507. }, {
  1508. label: 'Master',
  1509. items: [{
  1510. label: 'User',
  1511. icon: 'pi pi-user',
  1512. to: '/users',
  1513. component: 'user/Index'
  1514. }]
  1515. }],
  1516. // Supervisor
  1517. 2: [{
  1518. label: 'Home',
  1519. items: [{
  1520. label: 'Dashboard',
  1521. icon: 'pi pi-home',
  1522. to: '/dashboards',
  1523. component: 'home/Index'
  1524. }]
  1525. }, {
  1526. label: 'Menu',
  1527. items: [{
  1528. label: 'Pengeluaran',
  1529. icon: 'pi pi-wallet',
  1530. to: '/expenses',
  1531. component: 'expense/Index'
  1532. }, {
  1533. label: 'Laporan',
  1534. icon: 'pi pi-book',
  1535. items: [{
  1536. label: 'Mutasi',
  1537. icon: 'pi pi-circle',
  1538. to: '/reports/mutations',
  1539. component: 'mutation/Report'
  1540. }]
  1541. }]
  1542. }, {
  1543. label: 'Master',
  1544. items: [{
  1545. label: 'Jenis Kendaraan',
  1546. icon: 'pi pi-car',
  1547. to: '/type-vehicles',
  1548. component: 'typevehicle/Index'
  1549. }, {
  1550. label: 'Jenis Member',
  1551. icon: 'pi pi-id-card',
  1552. to: '/type-members',
  1553. component: 'typemember/Index'
  1554. }]
  1555. }, {
  1556. label: 'Pengaturan',
  1557. items: [{
  1558. label: 'Tarif Parkir',
  1559. icon: 'pi pi-car',
  1560. to: '/parking-fees/create',
  1561. component: 'parkingfee/Create'
  1562. }]
  1563. }],
  1564. // Operator
  1565. 3: [{
  1566. label: 'Home',
  1567. items: [{
  1568. label: 'Dashboard',
  1569. icon: 'pi pi-home',
  1570. to: '/dashboards',
  1571. component: 'home/Index'
  1572. }]
  1573. }, {
  1574. label: 'Menu',
  1575. items: [{
  1576. label: 'Pengeluaran',
  1577. icon: 'pi pi-wallet',
  1578. to: '/expenses',
  1579. component: 'expense/Index'
  1580. }, {
  1581. label: 'Member',
  1582. icon: 'pi pi-id-card',
  1583. to: '/members',
  1584. component: 'member/Index'
  1585. }, {
  1586. label: 'Top Up',
  1587. icon: 'pi pi-car',
  1588. to: '/top-ups',
  1589. component: 'topup/Index'
  1590. }]
  1591. }]
  1592. });
  1593. /***/ }),
  1594. /***/ "./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":
  1595. /*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  1596. !*** ./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 ***!
  1597. \***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  1598. /***/ ((module, __webpack_exports__, __webpack_require__) => {
  1599. "use strict";
  1600. __webpack_require__.r(__webpack_exports__);
  1601. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1602. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  1603. /* harmony export */ });
  1604. /* 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");
  1605. /* 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__);
  1606. // Imports
  1607. var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
  1608. // Module
  1609. ___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}", ""]);
  1610. // Exports
  1611. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
  1612. /***/ }),
  1613. /***/ "./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":
  1614. /*!************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  1615. !*** ./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 ***!
  1616. \************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  1617. /***/ ((module, __webpack_exports__, __webpack_require__) => {
  1618. "use strict";
  1619. __webpack_require__.r(__webpack_exports__);
  1620. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1621. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  1622. /* harmony export */ });
  1623. /* 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");
  1624. /* 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__);
  1625. // Imports
  1626. var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
  1627. // Module
  1628. ___CSS_LOADER_EXPORT___.push([module.id, ".layout-menu[data-v-22a4e926] {\n list-style-type: none;\n margin: 0;\n padding: 0;\n}", ""]);
  1629. // Exports
  1630. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
  1631. /***/ }),
  1632. /***/ "./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":
  1633. /*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  1634. !*** ./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 ***!
  1635. \***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  1636. /***/ ((module, __webpack_exports__, __webpack_require__) => {
  1637. "use strict";
  1638. __webpack_require__.r(__webpack_exports__);
  1639. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1640. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  1641. /* harmony export */ });
  1642. /* 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");
  1643. /* 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__);
  1644. // Imports
  1645. var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
  1646. // Module
  1647. ___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}", ""]);
  1648. // Exports
  1649. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
  1650. /***/ }),
  1651. /***/ "./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":
  1652. /*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  1653. !*** ./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 ***!
  1654. \***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  1655. /***/ ((module, __webpack_exports__, __webpack_require__) => {
  1656. "use strict";
  1657. __webpack_require__.r(__webpack_exports__);
  1658. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1659. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  1660. /* harmony export */ });
  1661. /* 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");
  1662. /* 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__);
  1663. // Imports
  1664. var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
  1665. // Module
  1666. ___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}", ""]);
  1667. // Exports
  1668. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
  1669. /***/ }),
  1670. /***/ "./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":
  1671. /*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  1672. !*** ./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 ***!
  1673. \**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  1674. /***/ ((module, __webpack_exports__, __webpack_require__) => {
  1675. "use strict";
  1676. __webpack_require__.r(__webpack_exports__);
  1677. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1678. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  1679. /* harmony export */ });
  1680. /* 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");
  1681. /* 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__);
  1682. // Imports
  1683. var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
  1684. // Module
  1685. ___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}", ""]);
  1686. // Exports
  1687. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
  1688. /***/ }),
  1689. /***/ "./node_modules/lodash/lodash.js":
  1690. /*!***************************************!*\
  1691. !*** ./node_modules/lodash/lodash.js ***!
  1692. \***************************************/
  1693. /***/ (function(module, exports, __webpack_require__) {
  1694. /* module decorator */ module = __webpack_require__.nmd(module);
  1695. var __WEBPACK_AMD_DEFINE_RESULT__;/**
  1696. * @license
  1697. * Lodash <https://lodash.com/>
  1698. * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
  1699. * Released under MIT license <https://lodash.com/license>
  1700. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  1701. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1702. */
  1703. ;(function() {
  1704. /** Used as a safe reference for `undefined` in pre-ES5 environments. */
  1705. var undefined;
  1706. /** Used as the semantic version number. */
  1707. var VERSION = '4.17.21';
  1708. /** Used as the size to enable large array optimizations. */
  1709. var LARGE_ARRAY_SIZE = 200;
  1710. /** Error message constants. */
  1711. var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
  1712. FUNC_ERROR_TEXT = 'Expected a function',
  1713. INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';
  1714. /** Used to stand-in for `undefined` hash values. */
  1715. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  1716. /** Used as the maximum memoize cache size. */
  1717. var MAX_MEMOIZE_SIZE = 500;
  1718. /** Used as the internal argument placeholder. */
  1719. var PLACEHOLDER = '__lodash_placeholder__';
  1720. /** Used to compose bitmasks for cloning. */
  1721. var CLONE_DEEP_FLAG = 1,
  1722. CLONE_FLAT_FLAG = 2,
  1723. CLONE_SYMBOLS_FLAG = 4;
  1724. /** Used to compose bitmasks for value comparisons. */
  1725. var COMPARE_PARTIAL_FLAG = 1,
  1726. COMPARE_UNORDERED_FLAG = 2;
  1727. /** Used to compose bitmasks for function metadata. */
  1728. var WRAP_BIND_FLAG = 1,
  1729. WRAP_BIND_KEY_FLAG = 2,
  1730. WRAP_CURRY_BOUND_FLAG = 4,
  1731. WRAP_CURRY_FLAG = 8,
  1732. WRAP_CURRY_RIGHT_FLAG = 16,
  1733. WRAP_PARTIAL_FLAG = 32,
  1734. WRAP_PARTIAL_RIGHT_FLAG = 64,
  1735. WRAP_ARY_FLAG = 128,
  1736. WRAP_REARG_FLAG = 256,
  1737. WRAP_FLIP_FLAG = 512;
  1738. /** Used as default options for `_.truncate`. */
  1739. var DEFAULT_TRUNC_LENGTH = 30,
  1740. DEFAULT_TRUNC_OMISSION = '...';
  1741. /** Used to detect hot functions by number of calls within a span of milliseconds. */
  1742. var HOT_COUNT = 800,
  1743. HOT_SPAN = 16;
  1744. /** Used to indicate the type of lazy iteratees. */
  1745. var LAZY_FILTER_FLAG = 1,
  1746. LAZY_MAP_FLAG = 2,
  1747. LAZY_WHILE_FLAG = 3;
  1748. /** Used as references for various `Number` constants. */
  1749. var INFINITY = 1 / 0,
  1750. MAX_SAFE_INTEGER = 9007199254740991,
  1751. MAX_INTEGER = 1.7976931348623157e+308,
  1752. NAN = 0 / 0;
  1753. /** Used as references for the maximum length and index of an array. */
  1754. var MAX_ARRAY_LENGTH = 4294967295,
  1755. MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
  1756. HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
  1757. /** Used to associate wrap methods with their bit flags. */
  1758. var wrapFlags = [
  1759. ['ary', WRAP_ARY_FLAG],
  1760. ['bind', WRAP_BIND_FLAG],
  1761. ['bindKey', WRAP_BIND_KEY_FLAG],
  1762. ['curry', WRAP_CURRY_FLAG],
  1763. ['curryRight', WRAP_CURRY_RIGHT_FLAG],
  1764. ['flip', WRAP_FLIP_FLAG],
  1765. ['partial', WRAP_PARTIAL_FLAG],
  1766. ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
  1767. ['rearg', WRAP_REARG_FLAG]
  1768. ];
  1769. /** `Object#toString` result references. */
  1770. var argsTag = '[object Arguments]',
  1771. arrayTag = '[object Array]',
  1772. asyncTag = '[object AsyncFunction]',
  1773. boolTag = '[object Boolean]',
  1774. dateTag = '[object Date]',
  1775. domExcTag = '[object DOMException]',
  1776. errorTag = '[object Error]',
  1777. funcTag = '[object Function]',
  1778. genTag = '[object GeneratorFunction]',
  1779. mapTag = '[object Map]',
  1780. numberTag = '[object Number]',
  1781. nullTag = '[object Null]',
  1782. objectTag = '[object Object]',
  1783. promiseTag = '[object Promise]',
  1784. proxyTag = '[object Proxy]',
  1785. regexpTag = '[object RegExp]',
  1786. setTag = '[object Set]',
  1787. stringTag = '[object String]',
  1788. symbolTag = '[object Symbol]',
  1789. undefinedTag = '[object Undefined]',
  1790. weakMapTag = '[object WeakMap]',
  1791. weakSetTag = '[object WeakSet]';
  1792. var arrayBufferTag = '[object ArrayBuffer]',
  1793. dataViewTag = '[object DataView]',
  1794. float32Tag = '[object Float32Array]',
  1795. float64Tag = '[object Float64Array]',
  1796. int8Tag = '[object Int8Array]',
  1797. int16Tag = '[object Int16Array]',
  1798. int32Tag = '[object Int32Array]',
  1799. uint8Tag = '[object Uint8Array]',
  1800. uint8ClampedTag = '[object Uint8ClampedArray]',
  1801. uint16Tag = '[object Uint16Array]',
  1802. uint32Tag = '[object Uint32Array]';
  1803. /** Used to match empty string literals in compiled template source. */
  1804. var reEmptyStringLeading = /\b__p \+= '';/g,
  1805. reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
  1806. reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
  1807. /** Used to match HTML entities and HTML characters. */
  1808. var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
  1809. reUnescapedHtml = /[&<>"']/g,
  1810. reHasEscapedHtml = RegExp(reEscapedHtml.source),
  1811. reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
  1812. /** Used to match template delimiters. */
  1813. var reEscape = /<%-([\s\S]+?)%>/g,
  1814. reEvaluate = /<%([\s\S]+?)%>/g,
  1815. reInterpolate = /<%=([\s\S]+?)%>/g;
  1816. /** Used to match property names within property paths. */
  1817. var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
  1818. reIsPlainProp = /^\w*$/,
  1819. rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
  1820. /**
  1821. * Used to match `RegExp`
  1822. * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
  1823. */
  1824. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
  1825. reHasRegExpChar = RegExp(reRegExpChar.source);
  1826. /** Used to match leading whitespace. */
  1827. var reTrimStart = /^\s+/;
  1828. /** Used to match a single whitespace character. */
  1829. var reWhitespace = /\s/;
  1830. /** Used to match wrap detail comments. */
  1831. var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
  1832. reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
  1833. reSplitDetails = /,? & /;
  1834. /** Used to match words composed of alphanumeric characters. */
  1835. var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
  1836. /**
  1837. * Used to validate the `validate` option in `_.template` variable.
  1838. *
  1839. * Forbids characters which could potentially change the meaning of the function argument definition:
  1840. * - "()," (modification of function parameters)
  1841. * - "=" (default value)
  1842. * - "[]{}" (destructuring of function parameters)
  1843. * - "/" (beginning of a comment)
  1844. * - whitespace
  1845. */
  1846. var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/;
  1847. /** Used to match backslashes in property paths. */
  1848. var reEscapeChar = /\\(\\)?/g;
  1849. /**
  1850. * Used to match
  1851. * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
  1852. */
  1853. var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
  1854. /** Used to match `RegExp` flags from their coerced string values. */
  1855. var reFlags = /\w*$/;
  1856. /** Used to detect bad signed hexadecimal string values. */
  1857. var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
  1858. /** Used to detect binary string values. */
  1859. var reIsBinary = /^0b[01]+$/i;
  1860. /** Used to detect host constructors (Safari). */
  1861. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  1862. /** Used to detect octal string values. */
  1863. var reIsOctal = /^0o[0-7]+$/i;
  1864. /** Used to detect unsigned integer values. */
  1865. var reIsUint = /^(?:0|[1-9]\d*)$/;
  1866. /** Used to match Latin Unicode letters (excluding mathematical operators). */
  1867. var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
  1868. /** Used to ensure capturing order of template delimiters. */
  1869. var reNoMatch = /($^)/;
  1870. /** Used to match unescaped characters in compiled string literals. */
  1871. var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
  1872. /** Used to compose unicode character classes. */
  1873. var rsAstralRange = '\\ud800-\\udfff',
  1874. rsComboMarksRange = '\\u0300-\\u036f',
  1875. reComboHalfMarksRange = '\\ufe20-\\ufe2f',
  1876. rsComboSymbolsRange = '\\u20d0-\\u20ff',
  1877. rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
  1878. rsDingbatRange = '\\u2700-\\u27bf',
  1879. rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
  1880. rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
  1881. rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
  1882. rsPunctuationRange = '\\u2000-\\u206f',
  1883. 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',
  1884. rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
  1885. rsVarRange = '\\ufe0e\\ufe0f',
  1886. rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
  1887. /** Used to compose unicode capture groups. */
  1888. var rsApos = "['\u2019]",
  1889. rsAstral = '[' + rsAstralRange + ']',
  1890. rsBreak = '[' + rsBreakRange + ']',
  1891. rsCombo = '[' + rsComboRange + ']',
  1892. rsDigits = '\\d+',
  1893. rsDingbat = '[' + rsDingbatRange + ']',
  1894. rsLower = '[' + rsLowerRange + ']',
  1895. rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
  1896. rsFitz = '\\ud83c[\\udffb-\\udfff]',
  1897. rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
  1898. rsNonAstral = '[^' + rsAstralRange + ']',
  1899. rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
  1900. rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
  1901. rsUpper = '[' + rsUpperRange + ']',
  1902. rsZWJ = '\\u200d';
  1903. /** Used to compose unicode regexes. */
  1904. var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
  1905. rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
  1906. rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
  1907. rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
  1908. reOptMod = rsModifier + '?',
  1909. rsOptVar = '[' + rsVarRange + ']?',
  1910. rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
  1911. rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
  1912. rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
  1913. rsSeq = rsOptVar + reOptMod + rsOptJoin,
  1914. rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
  1915. rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
  1916. /** Used to match apostrophes. */
  1917. var reApos = RegExp(rsApos, 'g');
  1918. /**
  1919. * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
  1920. * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
  1921. */
  1922. var reComboMark = RegExp(rsCombo, 'g');
  1923. /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
  1924. var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
  1925. /** Used to match complex or compound words. */
  1926. var reUnicodeWord = RegExp([
  1927. rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
  1928. rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
  1929. rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
  1930. rsUpper + '+' + rsOptContrUpper,
  1931. rsOrdUpper,
  1932. rsOrdLower,
  1933. rsDigits,
  1934. rsEmoji
  1935. ].join('|'), 'g');
  1936. /** 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/). */
  1937. var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
  1938. /** Used to detect strings that need a more robust regexp to match words. */
  1939. 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 ]/;
  1940. /** Used to assign default `context` object properties. */
  1941. var contextProps = [
  1942. 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
  1943. 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
  1944. 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',
  1945. 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
  1946. '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
  1947. ];
  1948. /** Used to make template sourceURLs easier to identify. */
  1949. var templateCounter = -1;
  1950. /** Used to identify `toStringTag` values of typed arrays. */
  1951. var typedArrayTags = {};
  1952. typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
  1953. typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
  1954. typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
  1955. typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
  1956. typedArrayTags[uint32Tag] = true;
  1957. typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
  1958. typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
  1959. typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
  1960. typedArrayTags[errorTag] = typedArrayTags[funcTag] =
  1961. typedArrayTags[mapTag] = typedArrayTags[numberTag] =
  1962. typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
  1963. typedArrayTags[setTag] = typedArrayTags[stringTag] =
  1964. typedArrayTags[weakMapTag] = false;
  1965. /** Used to identify `toStringTag` values supported by `_.clone`. */
  1966. var cloneableTags = {};
  1967. cloneableTags[argsTag] = cloneableTags[arrayTag] =
  1968. cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
  1969. cloneableTags[boolTag] = cloneableTags[dateTag] =
  1970. cloneableTags[float32Tag] = cloneableTags[float64Tag] =
  1971. cloneableTags[int8Tag] = cloneableTags[int16Tag] =
  1972. cloneableTags[int32Tag] = cloneableTags[mapTag] =
  1973. cloneableTags[numberTag] = cloneableTags[objectTag] =
  1974. cloneableTags[regexpTag] = cloneableTags[setTag] =
  1975. cloneableTags[stringTag] = cloneableTags[symbolTag] =
  1976. cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
  1977. cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
  1978. cloneableTags[errorTag] = cloneableTags[funcTag] =
  1979. cloneableTags[weakMapTag] = false;
  1980. /** Used to map Latin Unicode letters to basic Latin letters. */
  1981. var deburredLetters = {
  1982. // Latin-1 Supplement block.
  1983. '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
  1984. '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
  1985. '\xc7': 'C', '\xe7': 'c',
  1986. '\xd0': 'D', '\xf0': 'd',
  1987. '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
  1988. '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
  1989. '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
  1990. '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
  1991. '\xd1': 'N', '\xf1': 'n',
  1992. '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
  1993. '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
  1994. '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
  1995. '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
  1996. '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
  1997. '\xc6': 'Ae', '\xe6': 'ae',
  1998. '\xde': 'Th', '\xfe': 'th',
  1999. '\xdf': 'ss',
  2000. // Latin Extended-A block.
  2001. '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
  2002. '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
  2003. '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
  2004. '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
  2005. '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
  2006. '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
  2007. '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
  2008. '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
  2009. '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
  2010. '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
  2011. '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
  2012. '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
  2013. '\u0134': 'J', '\u0135': 'j',
  2014. '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
  2015. '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
  2016. '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
  2017. '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
  2018. '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
  2019. '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
  2020. '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
  2021. '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
  2022. '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
  2023. '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
  2024. '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
  2025. '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
  2026. '\u0163': 't', '\u0165': 't', '\u0167': 't',
  2027. '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
  2028. '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
  2029. '\u0174': 'W', '\u0175': 'w',
  2030. '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
  2031. '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
  2032. '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
  2033. '\u0132': 'IJ', '\u0133': 'ij',
  2034. '\u0152': 'Oe', '\u0153': 'oe',
  2035. '\u0149': "'n", '\u017f': 's'
  2036. };
  2037. /** Used to map characters to HTML entities. */
  2038. var htmlEscapes = {
  2039. '&': '&amp;',
  2040. '<': '&lt;',
  2041. '>': '&gt;',
  2042. '"': '&quot;',
  2043. "'": '&#39;'
  2044. };
  2045. /** Used to map HTML entities to characters. */
  2046. var htmlUnescapes = {
  2047. '&amp;': '&',
  2048. '&lt;': '<',
  2049. '&gt;': '>',
  2050. '&quot;': '"',
  2051. '&#39;': "'"
  2052. };
  2053. /** Used to escape characters for inclusion in compiled string literals. */
  2054. var stringEscapes = {
  2055. '\\': '\\',
  2056. "'": "'",
  2057. '\n': 'n',
  2058. '\r': 'r',
  2059. '\u2028': 'u2028',
  2060. '\u2029': 'u2029'
  2061. };
  2062. /** Built-in method references without a dependency on `root`. */
  2063. var freeParseFloat = parseFloat,
  2064. freeParseInt = parseInt;
  2065. /** Detect free variable `global` from Node.js. */
  2066. var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g;
  2067. /** Detect free variable `self`. */
  2068. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  2069. /** Used as a reference to the global object. */
  2070. var root = freeGlobal || freeSelf || Function('return this')();
  2071. /** Detect free variable `exports`. */
  2072. var freeExports = true && exports && !exports.nodeType && exports;
  2073. /** Detect free variable `module`. */
  2074. var freeModule = freeExports && "object" == 'object' && module && !module.nodeType && module;
  2075. /** Detect the popular CommonJS extension `module.exports`. */
  2076. var moduleExports = freeModule && freeModule.exports === freeExports;
  2077. /** Detect free variable `process` from Node.js. */
  2078. var freeProcess = moduleExports && freeGlobal.process;
  2079. /** Used to access faster Node.js helpers. */
  2080. var nodeUtil = (function() {
  2081. try {
  2082. // Use `util.types` for Node.js 10+.
  2083. var types = freeModule && freeModule.require && freeModule.require('util').types;
  2084. if (types) {
  2085. return types;
  2086. }
  2087. // Legacy `process.binding('util')` for Node.js < 10.
  2088. return freeProcess && freeProcess.binding && freeProcess.binding('util');
  2089. } catch (e) {}
  2090. }());
  2091. /* Node.js helper references. */
  2092. var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,
  2093. nodeIsDate = nodeUtil && nodeUtil.isDate,
  2094. nodeIsMap = nodeUtil && nodeUtil.isMap,
  2095. nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,
  2096. nodeIsSet = nodeUtil && nodeUtil.isSet,
  2097. nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
  2098. /*--------------------------------------------------------------------------*/
  2099. /**
  2100. * A faster alternative to `Function#apply`, this function invokes `func`
  2101. * with the `this` binding of `thisArg` and the arguments of `args`.
  2102. *
  2103. * @private
  2104. * @param {Function} func The function to invoke.
  2105. * @param {*} thisArg The `this` binding of `func`.
  2106. * @param {Array} args The arguments to invoke `func` with.
  2107. * @returns {*} Returns the result of `func`.
  2108. */
  2109. function apply(func, thisArg, args) {
  2110. switch (args.length) {
  2111. case 0: return func.call(thisArg);
  2112. case 1: return func.call(thisArg, args[0]);
  2113. case 2: return func.call(thisArg, args[0], args[1]);
  2114. case 3: return func.call(thisArg, args[0], args[1], args[2]);
  2115. }
  2116. return func.apply(thisArg, args);
  2117. }
  2118. /**
  2119. * A specialized version of `baseAggregator` for arrays.
  2120. *
  2121. * @private
  2122. * @param {Array} [array] The array to iterate over.
  2123. * @param {Function} setter The function to set `accumulator` values.
  2124. * @param {Function} iteratee The iteratee to transform keys.
  2125. * @param {Object} accumulator The initial aggregated object.
  2126. * @returns {Function} Returns `accumulator`.
  2127. */
  2128. function arrayAggregator(array, setter, iteratee, accumulator) {
  2129. var index = -1,
  2130. length = array == null ? 0 : array.length;
  2131. while (++index < length) {
  2132. var value = array[index];
  2133. setter(accumulator, value, iteratee(value), array);
  2134. }
  2135. return accumulator;
  2136. }
  2137. /**
  2138. * A specialized version of `_.forEach` for arrays without support for
  2139. * iteratee shorthands.
  2140. *
  2141. * @private
  2142. * @param {Array} [array] The array to iterate over.
  2143. * @param {Function} iteratee The function invoked per iteration.
  2144. * @returns {Array} Returns `array`.
  2145. */
  2146. function arrayEach(array, iteratee) {
  2147. var index = -1,
  2148. length = array == null ? 0 : array.length;
  2149. while (++index < length) {
  2150. if (iteratee(array[index], index, array) === false) {
  2151. break;
  2152. }
  2153. }
  2154. return array;
  2155. }
  2156. /**
  2157. * A specialized version of `_.forEachRight` for arrays without support for
  2158. * iteratee shorthands.
  2159. *
  2160. * @private
  2161. * @param {Array} [array] The array to iterate over.
  2162. * @param {Function} iteratee The function invoked per iteration.
  2163. * @returns {Array} Returns `array`.
  2164. */
  2165. function arrayEachRight(array, iteratee) {
  2166. var length = array == null ? 0 : array.length;
  2167. while (length--) {
  2168. if (iteratee(array[length], length, array) === false) {
  2169. break;
  2170. }
  2171. }
  2172. return array;
  2173. }
  2174. /**
  2175. * A specialized version of `_.every` for arrays without support for
  2176. * iteratee shorthands.
  2177. *
  2178. * @private
  2179. * @param {Array} [array] The array to iterate over.
  2180. * @param {Function} predicate The function invoked per iteration.
  2181. * @returns {boolean} Returns `true` if all elements pass the predicate check,
  2182. * else `false`.
  2183. */
  2184. function arrayEvery(array, predicate) {
  2185. var index = -1,
  2186. length = array == null ? 0 : array.length;
  2187. while (++index < length) {
  2188. if (!predicate(array[index], index, array)) {
  2189. return false;
  2190. }
  2191. }
  2192. return true;
  2193. }
  2194. /**
  2195. * A specialized version of `_.filter` for arrays without support for
  2196. * iteratee shorthands.
  2197. *
  2198. * @private
  2199. * @param {Array} [array] The array to iterate over.
  2200. * @param {Function} predicate The function invoked per iteration.
  2201. * @returns {Array} Returns the new filtered array.
  2202. */
  2203. function arrayFilter(array, predicate) {
  2204. var index = -1,
  2205. length = array == null ? 0 : array.length,
  2206. resIndex = 0,
  2207. result = [];
  2208. while (++index < length) {
  2209. var value = array[index];
  2210. if (predicate(value, index, array)) {
  2211. result[resIndex++] = value;
  2212. }
  2213. }
  2214. return result;
  2215. }
  2216. /**
  2217. * A specialized version of `_.includes` for arrays without support for
  2218. * specifying an index to search from.
  2219. *
  2220. * @private
  2221. * @param {Array} [array] The array to inspect.
  2222. * @param {*} target The value to search for.
  2223. * @returns {boolean} Returns `true` if `target` is found, else `false`.
  2224. */
  2225. function arrayIncludes(array, value) {
  2226. var length = array == null ? 0 : array.length;
  2227. return !!length && baseIndexOf(array, value, 0) > -1;
  2228. }
  2229. /**
  2230. * This function is like `arrayIncludes` except that it accepts a comparator.
  2231. *
  2232. * @private
  2233. * @param {Array} [array] The array to inspect.
  2234. * @param {*} target The value to search for.
  2235. * @param {Function} comparator The comparator invoked per element.
  2236. * @returns {boolean} Returns `true` if `target` is found, else `false`.
  2237. */
  2238. function arrayIncludesWith(array, value, comparator) {
  2239. var index = -1,
  2240. length = array == null ? 0 : array.length;
  2241. while (++index < length) {
  2242. if (comparator(value, array[index])) {
  2243. return true;
  2244. }
  2245. }
  2246. return false;
  2247. }
  2248. /**
  2249. * A specialized version of `_.map` for arrays without support for iteratee
  2250. * shorthands.
  2251. *
  2252. * @private
  2253. * @param {Array} [array] The array to iterate over.
  2254. * @param {Function} iteratee The function invoked per iteration.
  2255. * @returns {Array} Returns the new mapped array.
  2256. */
  2257. function arrayMap(array, iteratee) {
  2258. var index = -1,
  2259. length = array == null ? 0 : array.length,
  2260. result = Array(length);
  2261. while (++index < length) {
  2262. result[index] = iteratee(array[index], index, array);
  2263. }
  2264. return result;
  2265. }
  2266. /**
  2267. * Appends the elements of `values` to `array`.
  2268. *
  2269. * @private
  2270. * @param {Array} array The array to modify.
  2271. * @param {Array} values The values to append.
  2272. * @returns {Array} Returns `array`.
  2273. */
  2274. function arrayPush(array, values) {
  2275. var index = -1,
  2276. length = values.length,
  2277. offset = array.length;
  2278. while (++index < length) {
  2279. array[offset + index] = values[index];
  2280. }
  2281. return array;
  2282. }
  2283. /**
  2284. * A specialized version of `_.reduce` for arrays without support for
  2285. * iteratee shorthands.
  2286. *
  2287. * @private
  2288. * @param {Array} [array] The array to iterate over.
  2289. * @param {Function} iteratee The function invoked per iteration.
  2290. * @param {*} [accumulator] The initial value.
  2291. * @param {boolean} [initAccum] Specify using the first element of `array` as
  2292. * the initial value.
  2293. * @returns {*} Returns the accumulated value.
  2294. */
  2295. function arrayReduce(array, iteratee, accumulator, initAccum) {
  2296. var index = -1,
  2297. length = array == null ? 0 : array.length;
  2298. if (initAccum && length) {
  2299. accumulator = array[++index];
  2300. }
  2301. while (++index < length) {
  2302. accumulator = iteratee(accumulator, array[index], index, array);
  2303. }
  2304. return accumulator;
  2305. }
  2306. /**
  2307. * A specialized version of `_.reduceRight` for arrays without support for
  2308. * iteratee shorthands.
  2309. *
  2310. * @private
  2311. * @param {Array} [array] The array to iterate over.
  2312. * @param {Function} iteratee The function invoked per iteration.
  2313. * @param {*} [accumulator] The initial value.
  2314. * @param {boolean} [initAccum] Specify using the last element of `array` as
  2315. * the initial value.
  2316. * @returns {*} Returns the accumulated value.
  2317. */
  2318. function arrayReduceRight(array, iteratee, accumulator, initAccum) {
  2319. var length = array == null ? 0 : array.length;
  2320. if (initAccum && length) {
  2321. accumulator = array[--length];
  2322. }
  2323. while (length--) {
  2324. accumulator = iteratee(accumulator, array[length], length, array);
  2325. }
  2326. return accumulator;
  2327. }
  2328. /**
  2329. * A specialized version of `_.some` for arrays without support for iteratee
  2330. * shorthands.
  2331. *
  2332. * @private
  2333. * @param {Array} [array] The array to iterate over.
  2334. * @param {Function} predicate The function invoked per iteration.
  2335. * @returns {boolean} Returns `true` if any element passes the predicate check,
  2336. * else `false`.
  2337. */
  2338. function arraySome(array, predicate) {
  2339. var index = -1,
  2340. length = array == null ? 0 : array.length;
  2341. while (++index < length) {
  2342. if (predicate(array[index], index, array)) {
  2343. return true;
  2344. }
  2345. }
  2346. return false;
  2347. }
  2348. /**
  2349. * Gets the size of an ASCII `string`.
  2350. *
  2351. * @private
  2352. * @param {string} string The string inspect.
  2353. * @returns {number} Returns the string size.
  2354. */
  2355. var asciiSize = baseProperty('length');
  2356. /**
  2357. * Converts an ASCII `string` to an array.
  2358. *
  2359. * @private
  2360. * @param {string} string The string to convert.
  2361. * @returns {Array} Returns the converted array.
  2362. */
  2363. function asciiToArray(string) {
  2364. return string.split('');
  2365. }
  2366. /**
  2367. * Splits an ASCII `string` into an array of its words.
  2368. *
  2369. * @private
  2370. * @param {string} The string to inspect.
  2371. * @returns {Array} Returns the words of `string`.
  2372. */
  2373. function asciiWords(string) {
  2374. return string.match(reAsciiWord) || [];
  2375. }
  2376. /**
  2377. * The base implementation of methods like `_.findKey` and `_.findLastKey`,
  2378. * without support for iteratee shorthands, which iterates over `collection`
  2379. * using `eachFunc`.
  2380. *
  2381. * @private
  2382. * @param {Array|Object} collection The collection to inspect.
  2383. * @param {Function} predicate The function invoked per iteration.
  2384. * @param {Function} eachFunc The function to iterate over `collection`.
  2385. * @returns {*} Returns the found element or its key, else `undefined`.
  2386. */
  2387. function baseFindKey(collection, predicate, eachFunc) {
  2388. var result;
  2389. eachFunc(collection, function(value, key, collection) {
  2390. if (predicate(value, key, collection)) {
  2391. result = key;
  2392. return false;
  2393. }
  2394. });
  2395. return result;
  2396. }
  2397. /**
  2398. * The base implementation of `_.findIndex` and `_.findLastIndex` without
  2399. * support for iteratee shorthands.
  2400. *
  2401. * @private
  2402. * @param {Array} array The array to inspect.
  2403. * @param {Function} predicate The function invoked per iteration.
  2404. * @param {number} fromIndex The index to search from.
  2405. * @param {boolean} [fromRight] Specify iterating from right to left.
  2406. * @returns {number} Returns the index of the matched value, else `-1`.
  2407. */
  2408. function baseFindIndex(array, predicate, fromIndex, fromRight) {
  2409. var length = array.length,
  2410. index = fromIndex + (fromRight ? 1 : -1);
  2411. while ((fromRight ? index-- : ++index < length)) {
  2412. if (predicate(array[index], index, array)) {
  2413. return index;
  2414. }
  2415. }
  2416. return -1;
  2417. }
  2418. /**
  2419. * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
  2420. *
  2421. * @private
  2422. * @param {Array} array The array to inspect.
  2423. * @param {*} value The value to search for.
  2424. * @param {number} fromIndex The index to search from.
  2425. * @returns {number} Returns the index of the matched value, else `-1`.
  2426. */
  2427. function baseIndexOf(array, value, fromIndex) {
  2428. return value === value
  2429. ? strictIndexOf(array, value, fromIndex)
  2430. : baseFindIndex(array, baseIsNaN, fromIndex);
  2431. }
  2432. /**
  2433. * This function is like `baseIndexOf` except that it accepts a comparator.
  2434. *
  2435. * @private
  2436. * @param {Array} array The array to inspect.
  2437. * @param {*} value The value to search for.
  2438. * @param {number} fromIndex The index to search from.
  2439. * @param {Function} comparator The comparator invoked per element.
  2440. * @returns {number} Returns the index of the matched value, else `-1`.
  2441. */
  2442. function baseIndexOfWith(array, value, fromIndex, comparator) {
  2443. var index = fromIndex - 1,
  2444. length = array.length;
  2445. while (++index < length) {
  2446. if (comparator(array[index], value)) {
  2447. return index;
  2448. }
  2449. }
  2450. return -1;
  2451. }
  2452. /**
  2453. * The base implementation of `_.isNaN` without support for number objects.
  2454. *
  2455. * @private
  2456. * @param {*} value The value to check.
  2457. * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
  2458. */
  2459. function baseIsNaN(value) {
  2460. return value !== value;
  2461. }
  2462. /**
  2463. * The base implementation of `_.mean` and `_.meanBy` without support for
  2464. * iteratee shorthands.
  2465. *
  2466. * @private
  2467. * @param {Array} array The array to iterate over.
  2468. * @param {Function} iteratee The function invoked per iteration.
  2469. * @returns {number} Returns the mean.
  2470. */
  2471. function baseMean(array, iteratee) {
  2472. var length = array == null ? 0 : array.length;
  2473. return length ? (baseSum(array, iteratee) / length) : NAN;
  2474. }
  2475. /**
  2476. * The base implementation of `_.property` without support for deep paths.
  2477. *
  2478. * @private
  2479. * @param {string} key The key of the property to get.
  2480. * @returns {Function} Returns the new accessor function.
  2481. */
  2482. function baseProperty(key) {
  2483. return function(object) {
  2484. return object == null ? undefined : object[key];
  2485. };
  2486. }
  2487. /**
  2488. * The base implementation of `_.propertyOf` without support for deep paths.
  2489. *
  2490. * @private
  2491. * @param {Object} object The object to query.
  2492. * @returns {Function} Returns the new accessor function.
  2493. */
  2494. function basePropertyOf(object) {
  2495. return function(key) {
  2496. return object == null ? undefined : object[key];
  2497. };
  2498. }
  2499. /**
  2500. * The base implementation of `_.reduce` and `_.reduceRight`, without support
  2501. * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
  2502. *
  2503. * @private
  2504. * @param {Array|Object} collection The collection to iterate over.
  2505. * @param {Function} iteratee The function invoked per iteration.
  2506. * @param {*} accumulator The initial value.
  2507. * @param {boolean} initAccum Specify using the first or last element of
  2508. * `collection` as the initial value.
  2509. * @param {Function} eachFunc The function to iterate over `collection`.
  2510. * @returns {*} Returns the accumulated value.
  2511. */
  2512. function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
  2513. eachFunc(collection, function(value, index, collection) {
  2514. accumulator = initAccum
  2515. ? (initAccum = false, value)
  2516. : iteratee(accumulator, value, index, collection);
  2517. });
  2518. return accumulator;
  2519. }
  2520. /**
  2521. * The base implementation of `_.sortBy` which uses `comparer` to define the
  2522. * sort order of `array` and replaces criteria objects with their corresponding
  2523. * values.
  2524. *
  2525. * @private
  2526. * @param {Array} array The array to sort.
  2527. * @param {Function} comparer The function to define sort order.
  2528. * @returns {Array} Returns `array`.
  2529. */
  2530. function baseSortBy(array, comparer) {
  2531. var length = array.length;
  2532. array.sort(comparer);
  2533. while (length--) {
  2534. array[length] = array[length].value;
  2535. }
  2536. return array;
  2537. }
  2538. /**
  2539. * The base implementation of `_.sum` and `_.sumBy` without support for
  2540. * iteratee shorthands.
  2541. *
  2542. * @private
  2543. * @param {Array} array The array to iterate over.
  2544. * @param {Function} iteratee The function invoked per iteration.
  2545. * @returns {number} Returns the sum.
  2546. */
  2547. function baseSum(array, iteratee) {
  2548. var result,
  2549. index = -1,
  2550. length = array.length;
  2551. while (++index < length) {
  2552. var current = iteratee(array[index]);
  2553. if (current !== undefined) {
  2554. result = result === undefined ? current : (result + current);
  2555. }
  2556. }
  2557. return result;
  2558. }
  2559. /**
  2560. * The base implementation of `_.times` without support for iteratee shorthands
  2561. * or max array length checks.
  2562. *
  2563. * @private
  2564. * @param {number} n The number of times to invoke `iteratee`.
  2565. * @param {Function} iteratee The function invoked per iteration.
  2566. * @returns {Array} Returns the array of results.
  2567. */
  2568. function baseTimes(n, iteratee) {
  2569. var index = -1,
  2570. result = Array(n);
  2571. while (++index < n) {
  2572. result[index] = iteratee(index);
  2573. }
  2574. return result;
  2575. }
  2576. /**
  2577. * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
  2578. * of key-value pairs for `object` corresponding to the property names of `props`.
  2579. *
  2580. * @private
  2581. * @param {Object} object The object to query.
  2582. * @param {Array} props The property names to get values for.
  2583. * @returns {Object} Returns the key-value pairs.
  2584. */
  2585. function baseToPairs(object, props) {
  2586. return arrayMap(props, function(key) {
  2587. return [key, object[key]];
  2588. });
  2589. }
  2590. /**
  2591. * The base implementation of `_.trim`.
  2592. *
  2593. * @private
  2594. * @param {string} string The string to trim.
  2595. * @returns {string} Returns the trimmed string.
  2596. */
  2597. function baseTrim(string) {
  2598. return string
  2599. ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
  2600. : string;
  2601. }
  2602. /**
  2603. * The base implementation of `_.unary` without support for storing metadata.
  2604. *
  2605. * @private
  2606. * @param {Function} func The function to cap arguments for.
  2607. * @returns {Function} Returns the new capped function.
  2608. */
  2609. function baseUnary(func) {
  2610. return function(value) {
  2611. return func(value);
  2612. };
  2613. }
  2614. /**
  2615. * The base implementation of `_.values` and `_.valuesIn` which creates an
  2616. * array of `object` property values corresponding to the property names
  2617. * of `props`.
  2618. *
  2619. * @private
  2620. * @param {Object} object The object to query.
  2621. * @param {Array} props The property names to get values for.
  2622. * @returns {Object} Returns the array of property values.
  2623. */
  2624. function baseValues(object, props) {
  2625. return arrayMap(props, function(key) {
  2626. return object[key];
  2627. });
  2628. }
  2629. /**
  2630. * Checks if a `cache` value for `key` exists.
  2631. *
  2632. * @private
  2633. * @param {Object} cache The cache to query.
  2634. * @param {string} key The key of the entry to check.
  2635. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  2636. */
  2637. function cacheHas(cache, key) {
  2638. return cache.has(key);
  2639. }
  2640. /**
  2641. * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
  2642. * that is not found in the character symbols.
  2643. *
  2644. * @private
  2645. * @param {Array} strSymbols The string symbols to inspect.
  2646. * @param {Array} chrSymbols The character symbols to find.
  2647. * @returns {number} Returns the index of the first unmatched string symbol.
  2648. */
  2649. function charsStartIndex(strSymbols, chrSymbols) {
  2650. var index = -1,
  2651. length = strSymbols.length;
  2652. while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
  2653. return index;
  2654. }
  2655. /**
  2656. * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
  2657. * that is not found in the character symbols.
  2658. *
  2659. * @private
  2660. * @param {Array} strSymbols The string symbols to inspect.
  2661. * @param {Array} chrSymbols The character symbols to find.
  2662. * @returns {number} Returns the index of the last unmatched string symbol.
  2663. */
  2664. function charsEndIndex(strSymbols, chrSymbols) {
  2665. var index = strSymbols.length;
  2666. while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
  2667. return index;
  2668. }
  2669. /**
  2670. * Gets the number of `placeholder` occurrences in `array`.
  2671. *
  2672. * @private
  2673. * @param {Array} array The array to inspect.
  2674. * @param {*} placeholder The placeholder to search for.
  2675. * @returns {number} Returns the placeholder count.
  2676. */
  2677. function countHolders(array, placeholder) {
  2678. var length = array.length,
  2679. result = 0;
  2680. while (length--) {
  2681. if (array[length] === placeholder) {
  2682. ++result;
  2683. }
  2684. }
  2685. return result;
  2686. }
  2687. /**
  2688. * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
  2689. * letters to basic Latin letters.
  2690. *
  2691. * @private
  2692. * @param {string} letter The matched letter to deburr.
  2693. * @returns {string} Returns the deburred letter.
  2694. */
  2695. var deburrLetter = basePropertyOf(deburredLetters);
  2696. /**
  2697. * Used by `_.escape` to convert characters to HTML entities.
  2698. *
  2699. * @private
  2700. * @param {string} chr The matched character to escape.
  2701. * @returns {string} Returns the escaped character.
  2702. */
  2703. var escapeHtmlChar = basePropertyOf(htmlEscapes);
  2704. /**
  2705. * Used by `_.template` to escape characters for inclusion in compiled string literals.
  2706. *
  2707. * @private
  2708. * @param {string} chr The matched character to escape.
  2709. * @returns {string} Returns the escaped character.
  2710. */
  2711. function escapeStringChar(chr) {
  2712. return '\\' + stringEscapes[chr];
  2713. }
  2714. /**
  2715. * Gets the value at `key` of `object`.
  2716. *
  2717. * @private
  2718. * @param {Object} [object] The object to query.
  2719. * @param {string} key The key of the property to get.
  2720. * @returns {*} Returns the property value.
  2721. */
  2722. function getValue(object, key) {
  2723. return object == null ? undefined : object[key];
  2724. }
  2725. /**
  2726. * Checks if `string` contains Unicode symbols.
  2727. *
  2728. * @private
  2729. * @param {string} string The string to inspect.
  2730. * @returns {boolean} Returns `true` if a symbol is found, else `false`.
  2731. */
  2732. function hasUnicode(string) {
  2733. return reHasUnicode.test(string);
  2734. }
  2735. /**
  2736. * Checks if `string` contains a word composed of Unicode symbols.
  2737. *
  2738. * @private
  2739. * @param {string} string The string to inspect.
  2740. * @returns {boolean} Returns `true` if a word is found, else `false`.
  2741. */
  2742. function hasUnicodeWord(string) {
  2743. return reHasUnicodeWord.test(string);
  2744. }
  2745. /**
  2746. * Converts `iterator` to an array.
  2747. *
  2748. * @private
  2749. * @param {Object} iterator The iterator to convert.
  2750. * @returns {Array} Returns the converted array.
  2751. */
  2752. function iteratorToArray(iterator) {
  2753. var data,
  2754. result = [];
  2755. while (!(data = iterator.next()).done) {
  2756. result.push(data.value);
  2757. }
  2758. return result;
  2759. }
  2760. /**
  2761. * Converts `map` to its key-value pairs.
  2762. *
  2763. * @private
  2764. * @param {Object} map The map to convert.
  2765. * @returns {Array} Returns the key-value pairs.
  2766. */
  2767. function mapToArray(map) {
  2768. var index = -1,
  2769. result = Array(map.size);
  2770. map.forEach(function(value, key) {
  2771. result[++index] = [key, value];
  2772. });
  2773. return result;
  2774. }
  2775. /**
  2776. * Creates a unary function that invokes `func` with its argument transformed.
  2777. *
  2778. * @private
  2779. * @param {Function} func The function to wrap.
  2780. * @param {Function} transform The argument transform.
  2781. * @returns {Function} Returns the new function.
  2782. */
  2783. function overArg(func, transform) {
  2784. return function(arg) {
  2785. return func(transform(arg));
  2786. };
  2787. }
  2788. /**
  2789. * Replaces all `placeholder` elements in `array` with an internal placeholder
  2790. * and returns an array of their indexes.
  2791. *
  2792. * @private
  2793. * @param {Array} array The array to modify.
  2794. * @param {*} placeholder The placeholder to replace.
  2795. * @returns {Array} Returns the new array of placeholder indexes.
  2796. */
  2797. function replaceHolders(array, placeholder) {
  2798. var index = -1,
  2799. length = array.length,
  2800. resIndex = 0,
  2801. result = [];
  2802. while (++index < length) {
  2803. var value = array[index];
  2804. if (value === placeholder || value === PLACEHOLDER) {
  2805. array[index] = PLACEHOLDER;
  2806. result[resIndex++] = index;
  2807. }
  2808. }
  2809. return result;
  2810. }
  2811. /**
  2812. * Converts `set` to an array of its values.
  2813. *
  2814. * @private
  2815. * @param {Object} set The set to convert.
  2816. * @returns {Array} Returns the values.
  2817. */
  2818. function setToArray(set) {
  2819. var index = -1,
  2820. result = Array(set.size);
  2821. set.forEach(function(value) {
  2822. result[++index] = value;
  2823. });
  2824. return result;
  2825. }
  2826. /**
  2827. * Converts `set` to its value-value pairs.
  2828. *
  2829. * @private
  2830. * @param {Object} set The set to convert.
  2831. * @returns {Array} Returns the value-value pairs.
  2832. */
  2833. function setToPairs(set) {
  2834. var index = -1,
  2835. result = Array(set.size);
  2836. set.forEach(function(value) {
  2837. result[++index] = [value, value];
  2838. });
  2839. return result;
  2840. }
  2841. /**
  2842. * A specialized version of `_.indexOf` which performs strict equality
  2843. * comparisons of values, i.e. `===`.
  2844. *
  2845. * @private
  2846. * @param {Array} array The array to inspect.
  2847. * @param {*} value The value to search for.
  2848. * @param {number} fromIndex The index to search from.
  2849. * @returns {number} Returns the index of the matched value, else `-1`.
  2850. */
  2851. function strictIndexOf(array, value, fromIndex) {
  2852. var index = fromIndex - 1,
  2853. length = array.length;
  2854. while (++index < length) {
  2855. if (array[index] === value) {
  2856. return index;
  2857. }
  2858. }
  2859. return -1;
  2860. }
  2861. /**
  2862. * A specialized version of `_.lastIndexOf` which performs strict equality
  2863. * comparisons of values, i.e. `===`.
  2864. *
  2865. * @private
  2866. * @param {Array} array The array to inspect.
  2867. * @param {*} value The value to search for.
  2868. * @param {number} fromIndex The index to search from.
  2869. * @returns {number} Returns the index of the matched value, else `-1`.
  2870. */
  2871. function strictLastIndexOf(array, value, fromIndex) {
  2872. var index = fromIndex + 1;
  2873. while (index--) {
  2874. if (array[index] === value) {
  2875. return index;
  2876. }
  2877. }
  2878. return index;
  2879. }
  2880. /**
  2881. * Gets the number of symbols in `string`.
  2882. *
  2883. * @private
  2884. * @param {string} string The string to inspect.
  2885. * @returns {number} Returns the string size.
  2886. */
  2887. function stringSize(string) {
  2888. return hasUnicode(string)
  2889. ? unicodeSize(string)
  2890. : asciiSize(string);
  2891. }
  2892. /**
  2893. * Converts `string` to an array.
  2894. *
  2895. * @private
  2896. * @param {string} string The string to convert.
  2897. * @returns {Array} Returns the converted array.
  2898. */
  2899. function stringToArray(string) {
  2900. return hasUnicode(string)
  2901. ? unicodeToArray(string)
  2902. : asciiToArray(string);
  2903. }
  2904. /**
  2905. * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
  2906. * character of `string`.
  2907. *
  2908. * @private
  2909. * @param {string} string The string to inspect.
  2910. * @returns {number} Returns the index of the last non-whitespace character.
  2911. */
  2912. function trimmedEndIndex(string) {
  2913. var index = string.length;
  2914. while (index-- && reWhitespace.test(string.charAt(index))) {}
  2915. return index;
  2916. }
  2917. /**
  2918. * Used by `_.unescape` to convert HTML entities to characters.
  2919. *
  2920. * @private
  2921. * @param {string} chr The matched character to unescape.
  2922. * @returns {string} Returns the unescaped character.
  2923. */
  2924. var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
  2925. /**
  2926. * Gets the size of a Unicode `string`.
  2927. *
  2928. * @private
  2929. * @param {string} string The string inspect.
  2930. * @returns {number} Returns the string size.
  2931. */
  2932. function unicodeSize(string) {
  2933. var result = reUnicode.lastIndex = 0;
  2934. while (reUnicode.test(string)) {
  2935. ++result;
  2936. }
  2937. return result;
  2938. }
  2939. /**
  2940. * Converts a Unicode `string` to an array.
  2941. *
  2942. * @private
  2943. * @param {string} string The string to convert.
  2944. * @returns {Array} Returns the converted array.
  2945. */
  2946. function unicodeToArray(string) {
  2947. return string.match(reUnicode) || [];
  2948. }
  2949. /**
  2950. * Splits a Unicode `string` into an array of its words.
  2951. *
  2952. * @private
  2953. * @param {string} The string to inspect.
  2954. * @returns {Array} Returns the words of `string`.
  2955. */
  2956. function unicodeWords(string) {
  2957. return string.match(reUnicodeWord) || [];
  2958. }
  2959. /*--------------------------------------------------------------------------*/
  2960. /**
  2961. * Create a new pristine `lodash` function using the `context` object.
  2962. *
  2963. * @static
  2964. * @memberOf _
  2965. * @since 1.1.0
  2966. * @category Util
  2967. * @param {Object} [context=root] The context object.
  2968. * @returns {Function} Returns a new `lodash` function.
  2969. * @example
  2970. *
  2971. * _.mixin({ 'foo': _.constant('foo') });
  2972. *
  2973. * var lodash = _.runInContext();
  2974. * lodash.mixin({ 'bar': lodash.constant('bar') });
  2975. *
  2976. * _.isFunction(_.foo);
  2977. * // => true
  2978. * _.isFunction(_.bar);
  2979. * // => false
  2980. *
  2981. * lodash.isFunction(lodash.foo);
  2982. * // => false
  2983. * lodash.isFunction(lodash.bar);
  2984. * // => true
  2985. *
  2986. * // Create a suped-up `defer` in Node.js.
  2987. * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
  2988. */
  2989. var runInContext = (function runInContext(context) {
  2990. context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
  2991. /** Built-in constructor references. */
  2992. var Array = context.Array,
  2993. Date = context.Date,
  2994. Error = context.Error,
  2995. Function = context.Function,
  2996. Math = context.Math,
  2997. Object = context.Object,
  2998. RegExp = context.RegExp,
  2999. String = context.String,
  3000. TypeError = context.TypeError;
  3001. /** Used for built-in method references. */
  3002. var arrayProto = Array.prototype,
  3003. funcProto = Function.prototype,
  3004. objectProto = Object.prototype;
  3005. /** Used to detect overreaching core-js shims. */
  3006. var coreJsData = context['__core-js_shared__'];
  3007. /** Used to resolve the decompiled source of functions. */
  3008. var funcToString = funcProto.toString;
  3009. /** Used to check objects for own properties. */
  3010. var hasOwnProperty = objectProto.hasOwnProperty;
  3011. /** Used to generate unique IDs. */
  3012. var idCounter = 0;
  3013. /** Used to detect methods masquerading as native. */
  3014. var maskSrcKey = (function() {
  3015. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  3016. return uid ? ('Symbol(src)_1.' + uid) : '';
  3017. }());
  3018. /**
  3019. * Used to resolve the
  3020. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  3021. * of values.
  3022. */
  3023. var nativeObjectToString = objectProto.toString;
  3024. /** Used to infer the `Object` constructor. */
  3025. var objectCtorString = funcToString.call(Object);
  3026. /** Used to restore the original `_` reference in `_.noConflict`. */
  3027. var oldDash = root._;
  3028. /** Used to detect if a method is native. */
  3029. var reIsNative = RegExp('^' +
  3030. funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
  3031. .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
  3032. );
  3033. /** Built-in value references. */
  3034. var Buffer = moduleExports ? context.Buffer : undefined,
  3035. Symbol = context.Symbol,
  3036. Uint8Array = context.Uint8Array,
  3037. allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
  3038. getPrototype = overArg(Object.getPrototypeOf, Object),
  3039. objectCreate = Object.create,
  3040. propertyIsEnumerable = objectProto.propertyIsEnumerable,
  3041. splice = arrayProto.splice,
  3042. spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,
  3043. symIterator = Symbol ? Symbol.iterator : undefined,
  3044. symToStringTag = Symbol ? Symbol.toStringTag : undefined;
  3045. var defineProperty = (function() {
  3046. try {
  3047. var func = getNative(Object, 'defineProperty');
  3048. func({}, '', {});
  3049. return func;
  3050. } catch (e) {}
  3051. }());
  3052. /** Mocked built-ins. */
  3053. var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,
  3054. ctxNow = Date && Date.now !== root.Date.now && Date.now,
  3055. ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
  3056. /* Built-in method references for those with the same name as other `lodash` methods. */
  3057. var nativeCeil = Math.ceil,
  3058. nativeFloor = Math.floor,
  3059. nativeGetSymbols = Object.getOwnPropertySymbols,
  3060. nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
  3061. nativeIsFinite = context.isFinite,
  3062. nativeJoin = arrayProto.join,
  3063. nativeKeys = overArg(Object.keys, Object),
  3064. nativeMax = Math.max,
  3065. nativeMin = Math.min,
  3066. nativeNow = Date.now,
  3067. nativeParseInt = context.parseInt,
  3068. nativeRandom = Math.random,
  3069. nativeReverse = arrayProto.reverse;
  3070. /* Built-in method references that are verified to be native. */
  3071. var DataView = getNative(context, 'DataView'),
  3072. Map = getNative(context, 'Map'),
  3073. Promise = getNative(context, 'Promise'),
  3074. Set = getNative(context, 'Set'),
  3075. WeakMap = getNative(context, 'WeakMap'),
  3076. nativeCreate = getNative(Object, 'create');
  3077. /** Used to store function metadata. */
  3078. var metaMap = WeakMap && new WeakMap;
  3079. /** Used to lookup unminified function names. */
  3080. var realNames = {};
  3081. /** Used to detect maps, sets, and weakmaps. */
  3082. var dataViewCtorString = toSource(DataView),
  3083. mapCtorString = toSource(Map),
  3084. promiseCtorString = toSource(Promise),
  3085. setCtorString = toSource(Set),
  3086. weakMapCtorString = toSource(WeakMap);
  3087. /** Used to convert symbols to primitives and strings. */
  3088. var symbolProto = Symbol ? Symbol.prototype : undefined,
  3089. symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
  3090. symbolToString = symbolProto ? symbolProto.toString : undefined;
  3091. /*------------------------------------------------------------------------*/
  3092. /**
  3093. * Creates a `lodash` object which wraps `value` to enable implicit method
  3094. * chain sequences. Methods that operate on and return arrays, collections,
  3095. * and functions can be chained together. Methods that retrieve a single value
  3096. * or may return a primitive value will automatically end the chain sequence
  3097. * and return the unwrapped value. Otherwise, the value must be unwrapped
  3098. * with `_#value`.
  3099. *
  3100. * Explicit chain sequences, which must be unwrapped with `_#value`, may be
  3101. * enabled using `_.chain`.
  3102. *
  3103. * The execution of chained methods is lazy, that is, it's deferred until
  3104. * `_#value` is implicitly or explicitly called.
  3105. *
  3106. * Lazy evaluation allows several methods to support shortcut fusion.
  3107. * Shortcut fusion is an optimization to merge iteratee calls; this avoids
  3108. * the creation of intermediate arrays and can greatly reduce the number of
  3109. * iteratee executions. Sections of a chain sequence qualify for shortcut
  3110. * fusion if the section is applied to an array and iteratees accept only
  3111. * one argument. The heuristic for whether a section qualifies for shortcut
  3112. * fusion is subject to change.
  3113. *
  3114. * Chaining is supported in custom builds as long as the `_#value` method is
  3115. * directly or indirectly included in the build.
  3116. *
  3117. * In addition to lodash methods, wrappers have `Array` and `String` methods.
  3118. *
  3119. * The wrapper `Array` methods are:
  3120. * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
  3121. *
  3122. * The wrapper `String` methods are:
  3123. * `replace` and `split`
  3124. *
  3125. * The wrapper methods that support shortcut fusion are:
  3126. * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
  3127. * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
  3128. * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
  3129. *
  3130. * The chainable wrapper methods are:
  3131. * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
  3132. * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
  3133. * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
  3134. * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
  3135. * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
  3136. * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
  3137. * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
  3138. * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
  3139. * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
  3140. * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
  3141. * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
  3142. * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
  3143. * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
  3144. * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
  3145. * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
  3146. * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
  3147. * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
  3148. * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
  3149. * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
  3150. * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
  3151. * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
  3152. * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
  3153. * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
  3154. * `zipObject`, `zipObjectDeep`, and `zipWith`
  3155. *
  3156. * The wrapper methods that are **not** chainable by default are:
  3157. * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
  3158. * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
  3159. * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
  3160. * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
  3161. * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
  3162. * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
  3163. * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
  3164. * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
  3165. * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
  3166. * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
  3167. * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
  3168. * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
  3169. * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
  3170. * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
  3171. * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
  3172. * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
  3173. * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
  3174. * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
  3175. * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
  3176. * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
  3177. * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
  3178. * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
  3179. * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
  3180. * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
  3181. * `upperFirst`, `value`, and `words`
  3182. *
  3183. * @name _
  3184. * @constructor
  3185. * @category Seq
  3186. * @param {*} value The value to wrap in a `lodash` instance.
  3187. * @returns {Object} Returns the new `lodash` wrapper instance.
  3188. * @example
  3189. *
  3190. * function square(n) {
  3191. * return n * n;
  3192. * }
  3193. *
  3194. * var wrapped = _([1, 2, 3]);
  3195. *
  3196. * // Returns an unwrapped value.
  3197. * wrapped.reduce(_.add);
  3198. * // => 6
  3199. *
  3200. * // Returns a wrapped value.
  3201. * var squares = wrapped.map(square);
  3202. *
  3203. * _.isArray(squares);
  3204. * // => false
  3205. *
  3206. * _.isArray(squares.value());
  3207. * // => true
  3208. */
  3209. function lodash(value) {
  3210. if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
  3211. if (value instanceof LodashWrapper) {
  3212. return value;
  3213. }
  3214. if (hasOwnProperty.call(value, '__wrapped__')) {
  3215. return wrapperClone(value);
  3216. }
  3217. }
  3218. return new LodashWrapper(value);
  3219. }
  3220. /**
  3221. * The base implementation of `_.create` without support for assigning
  3222. * properties to the created object.
  3223. *
  3224. * @private
  3225. * @param {Object} proto The object to inherit from.
  3226. * @returns {Object} Returns the new object.
  3227. */
  3228. var baseCreate = (function() {
  3229. function object() {}
  3230. return function(proto) {
  3231. if (!isObject(proto)) {
  3232. return {};
  3233. }
  3234. if (objectCreate) {
  3235. return objectCreate(proto);
  3236. }
  3237. object.prototype = proto;
  3238. var result = new object;
  3239. object.prototype = undefined;
  3240. return result;
  3241. };
  3242. }());
  3243. /**
  3244. * The function whose prototype chain sequence wrappers inherit from.
  3245. *
  3246. * @private
  3247. */
  3248. function baseLodash() {
  3249. // No operation performed.
  3250. }
  3251. /**
  3252. * The base constructor for creating `lodash` wrapper objects.
  3253. *
  3254. * @private
  3255. * @param {*} value The value to wrap.
  3256. * @param {boolean} [chainAll] Enable explicit method chain sequences.
  3257. */
  3258. function LodashWrapper(value, chainAll) {
  3259. this.__wrapped__ = value;
  3260. this.__actions__ = [];
  3261. this.__chain__ = !!chainAll;
  3262. this.__index__ = 0;
  3263. this.__values__ = undefined;
  3264. }
  3265. /**
  3266. * By default, the template delimiters used by lodash are like those in
  3267. * embedded Ruby (ERB) as well as ES2015 template strings. Change the
  3268. * following template settings to use alternative delimiters.
  3269. *
  3270. * @static
  3271. * @memberOf _
  3272. * @type {Object}
  3273. */
  3274. lodash.templateSettings = {
  3275. /**
  3276. * Used to detect `data` property values to be HTML-escaped.
  3277. *
  3278. * @memberOf _.templateSettings
  3279. * @type {RegExp}
  3280. */
  3281. 'escape': reEscape,
  3282. /**
  3283. * Used to detect code to be evaluated.
  3284. *
  3285. * @memberOf _.templateSettings
  3286. * @type {RegExp}
  3287. */
  3288. 'evaluate': reEvaluate,
  3289. /**
  3290. * Used to detect `data` property values to inject.
  3291. *
  3292. * @memberOf _.templateSettings
  3293. * @type {RegExp}
  3294. */
  3295. 'interpolate': reInterpolate,
  3296. /**
  3297. * Used to reference the data object in the template text.
  3298. *
  3299. * @memberOf _.templateSettings
  3300. * @type {string}
  3301. */
  3302. 'variable': '',
  3303. /**
  3304. * Used to import variables into the compiled template.
  3305. *
  3306. * @memberOf _.templateSettings
  3307. * @type {Object}
  3308. */
  3309. 'imports': {
  3310. /**
  3311. * A reference to the `lodash` function.
  3312. *
  3313. * @memberOf _.templateSettings.imports
  3314. * @type {Function}
  3315. */
  3316. '_': lodash
  3317. }
  3318. };
  3319. // Ensure wrappers are instances of `baseLodash`.
  3320. lodash.prototype = baseLodash.prototype;
  3321. lodash.prototype.constructor = lodash;
  3322. LodashWrapper.prototype = baseCreate(baseLodash.prototype);
  3323. LodashWrapper.prototype.constructor = LodashWrapper;
  3324. /*------------------------------------------------------------------------*/
  3325. /**
  3326. * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
  3327. *
  3328. * @private
  3329. * @constructor
  3330. * @param {*} value The value to wrap.
  3331. */
  3332. function LazyWrapper(value) {
  3333. this.__wrapped__ = value;
  3334. this.__actions__ = [];
  3335. this.__dir__ = 1;
  3336. this.__filtered__ = false;
  3337. this.__iteratees__ = [];
  3338. this.__takeCount__ = MAX_ARRAY_LENGTH;
  3339. this.__views__ = [];
  3340. }
  3341. /**
  3342. * Creates a clone of the lazy wrapper object.
  3343. *
  3344. * @private
  3345. * @name clone
  3346. * @memberOf LazyWrapper
  3347. * @returns {Object} Returns the cloned `LazyWrapper` object.
  3348. */
  3349. function lazyClone() {
  3350. var result = new LazyWrapper(this.__wrapped__);
  3351. result.__actions__ = copyArray(this.__actions__);
  3352. result.__dir__ = this.__dir__;
  3353. result.__filtered__ = this.__filtered__;
  3354. result.__iteratees__ = copyArray(this.__iteratees__);
  3355. result.__takeCount__ = this.__takeCount__;
  3356. result.__views__ = copyArray(this.__views__);
  3357. return result;
  3358. }
  3359. /**
  3360. * Reverses the direction of lazy iteration.
  3361. *
  3362. * @private
  3363. * @name reverse
  3364. * @memberOf LazyWrapper
  3365. * @returns {Object} Returns the new reversed `LazyWrapper` object.
  3366. */
  3367. function lazyReverse() {
  3368. if (this.__filtered__) {
  3369. var result = new LazyWrapper(this);
  3370. result.__dir__ = -1;
  3371. result.__filtered__ = true;
  3372. } else {
  3373. result = this.clone();
  3374. result.__dir__ *= -1;
  3375. }
  3376. return result;
  3377. }
  3378. /**
  3379. * Extracts the unwrapped value from its lazy wrapper.
  3380. *
  3381. * @private
  3382. * @name value
  3383. * @memberOf LazyWrapper
  3384. * @returns {*} Returns the unwrapped value.
  3385. */
  3386. function lazyValue() {
  3387. var array = this.__wrapped__.value(),
  3388. dir = this.__dir__,
  3389. isArr = isArray(array),
  3390. isRight = dir < 0,
  3391. arrLength = isArr ? array.length : 0,
  3392. view = getView(0, arrLength, this.__views__),
  3393. start = view.start,
  3394. end = view.end,
  3395. length = end - start,
  3396. index = isRight ? end : (start - 1),
  3397. iteratees = this.__iteratees__,
  3398. iterLength = iteratees.length,
  3399. resIndex = 0,
  3400. takeCount = nativeMin(length, this.__takeCount__);
  3401. if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
  3402. return baseWrapperValue(array, this.__actions__);
  3403. }
  3404. var result = [];
  3405. outer:
  3406. while (length-- && resIndex < takeCount) {
  3407. index += dir;
  3408. var iterIndex = -1,
  3409. value = array[index];
  3410. while (++iterIndex < iterLength) {
  3411. var data = iteratees[iterIndex],
  3412. iteratee = data.iteratee,
  3413. type = data.type,
  3414. computed = iteratee(value);
  3415. if (type == LAZY_MAP_FLAG) {
  3416. value = computed;
  3417. } else if (!computed) {
  3418. if (type == LAZY_FILTER_FLAG) {
  3419. continue outer;
  3420. } else {
  3421. break outer;
  3422. }
  3423. }
  3424. }
  3425. result[resIndex++] = value;
  3426. }
  3427. return result;
  3428. }
  3429. // Ensure `LazyWrapper` is an instance of `baseLodash`.
  3430. LazyWrapper.prototype = baseCreate(baseLodash.prototype);
  3431. LazyWrapper.prototype.constructor = LazyWrapper;
  3432. /*------------------------------------------------------------------------*/
  3433. /**
  3434. * Creates a hash object.
  3435. *
  3436. * @private
  3437. * @constructor
  3438. * @param {Array} [entries] The key-value pairs to cache.
  3439. */
  3440. function Hash(entries) {
  3441. var index = -1,
  3442. length = entries == null ? 0 : entries.length;
  3443. this.clear();
  3444. while (++index < length) {
  3445. var entry = entries[index];
  3446. this.set(entry[0], entry[1]);
  3447. }
  3448. }
  3449. /**
  3450. * Removes all key-value entries from the hash.
  3451. *
  3452. * @private
  3453. * @name clear
  3454. * @memberOf Hash
  3455. */
  3456. function hashClear() {
  3457. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  3458. this.size = 0;
  3459. }
  3460. /**
  3461. * Removes `key` and its value from the hash.
  3462. *
  3463. * @private
  3464. * @name delete
  3465. * @memberOf Hash
  3466. * @param {Object} hash The hash to modify.
  3467. * @param {string} key The key of the value to remove.
  3468. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  3469. */
  3470. function hashDelete(key) {
  3471. var result = this.has(key) && delete this.__data__[key];
  3472. this.size -= result ? 1 : 0;
  3473. return result;
  3474. }
  3475. /**
  3476. * Gets the hash value for `key`.
  3477. *
  3478. * @private
  3479. * @name get
  3480. * @memberOf Hash
  3481. * @param {string} key The key of the value to get.
  3482. * @returns {*} Returns the entry value.
  3483. */
  3484. function hashGet(key) {
  3485. var data = this.__data__;
  3486. if (nativeCreate) {
  3487. var result = data[key];
  3488. return result === HASH_UNDEFINED ? undefined : result;
  3489. }
  3490. return hasOwnProperty.call(data, key) ? data[key] : undefined;
  3491. }
  3492. /**
  3493. * Checks if a hash value for `key` exists.
  3494. *
  3495. * @private
  3496. * @name has
  3497. * @memberOf Hash
  3498. * @param {string} key The key of the entry to check.
  3499. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  3500. */
  3501. function hashHas(key) {
  3502. var data = this.__data__;
  3503. return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
  3504. }
  3505. /**
  3506. * Sets the hash `key` to `value`.
  3507. *
  3508. * @private
  3509. * @name set
  3510. * @memberOf Hash
  3511. * @param {string} key The key of the value to set.
  3512. * @param {*} value The value to set.
  3513. * @returns {Object} Returns the hash instance.
  3514. */
  3515. function hashSet(key, value) {
  3516. var data = this.__data__;
  3517. this.size += this.has(key) ? 0 : 1;
  3518. data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
  3519. return this;
  3520. }
  3521. // Add methods to `Hash`.
  3522. Hash.prototype.clear = hashClear;
  3523. Hash.prototype['delete'] = hashDelete;
  3524. Hash.prototype.get = hashGet;
  3525. Hash.prototype.has = hashHas;
  3526. Hash.prototype.set = hashSet;
  3527. /*------------------------------------------------------------------------*/
  3528. /**
  3529. * Creates an list cache object.
  3530. *
  3531. * @private
  3532. * @constructor
  3533. * @param {Array} [entries] The key-value pairs to cache.
  3534. */
  3535. function ListCache(entries) {
  3536. var index = -1,
  3537. length = entries == null ? 0 : entries.length;
  3538. this.clear();
  3539. while (++index < length) {
  3540. var entry = entries[index];
  3541. this.set(entry[0], entry[1]);
  3542. }
  3543. }
  3544. /**
  3545. * Removes all key-value entries from the list cache.
  3546. *
  3547. * @private
  3548. * @name clear
  3549. * @memberOf ListCache
  3550. */
  3551. function listCacheClear() {
  3552. this.__data__ = [];
  3553. this.size = 0;
  3554. }
  3555. /**
  3556. * Removes `key` and its value from the list cache.
  3557. *
  3558. * @private
  3559. * @name delete
  3560. * @memberOf ListCache
  3561. * @param {string} key The key of the value to remove.
  3562. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  3563. */
  3564. function listCacheDelete(key) {
  3565. var data = this.__data__,
  3566. index = assocIndexOf(data, key);
  3567. if (index < 0) {
  3568. return false;
  3569. }
  3570. var lastIndex = data.length - 1;
  3571. if (index == lastIndex) {
  3572. data.pop();
  3573. } else {
  3574. splice.call(data, index, 1);
  3575. }
  3576. --this.size;
  3577. return true;
  3578. }
  3579. /**
  3580. * Gets the list cache value for `key`.
  3581. *
  3582. * @private
  3583. * @name get
  3584. * @memberOf ListCache
  3585. * @param {string} key The key of the value to get.
  3586. * @returns {*} Returns the entry value.
  3587. */
  3588. function listCacheGet(key) {
  3589. var data = this.__data__,
  3590. index = assocIndexOf(data, key);
  3591. return index < 0 ? undefined : data[index][1];
  3592. }
  3593. /**
  3594. * Checks if a list cache value for `key` exists.
  3595. *
  3596. * @private
  3597. * @name has
  3598. * @memberOf ListCache
  3599. * @param {string} key The key of the entry to check.
  3600. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  3601. */
  3602. function listCacheHas(key) {
  3603. return assocIndexOf(this.__data__, key) > -1;
  3604. }
  3605. /**
  3606. * Sets the list cache `key` to `value`.
  3607. *
  3608. * @private
  3609. * @name set
  3610. * @memberOf ListCache
  3611. * @param {string} key The key of the value to set.
  3612. * @param {*} value The value to set.
  3613. * @returns {Object} Returns the list cache instance.
  3614. */
  3615. function listCacheSet(key, value) {
  3616. var data = this.__data__,
  3617. index = assocIndexOf(data, key);
  3618. if (index < 0) {
  3619. ++this.size;
  3620. data.push([key, value]);
  3621. } else {
  3622. data[index][1] = value;
  3623. }
  3624. return this;
  3625. }
  3626. // Add methods to `ListCache`.
  3627. ListCache.prototype.clear = listCacheClear;
  3628. ListCache.prototype['delete'] = listCacheDelete;
  3629. ListCache.prototype.get = listCacheGet;
  3630. ListCache.prototype.has = listCacheHas;
  3631. ListCache.prototype.set = listCacheSet;
  3632. /*------------------------------------------------------------------------*/
  3633. /**
  3634. * Creates a map cache object to store key-value pairs.
  3635. *
  3636. * @private
  3637. * @constructor
  3638. * @param {Array} [entries] The key-value pairs to cache.
  3639. */
  3640. function MapCache(entries) {
  3641. var index = -1,
  3642. length = entries == null ? 0 : entries.length;
  3643. this.clear();
  3644. while (++index < length) {
  3645. var entry = entries[index];
  3646. this.set(entry[0], entry[1]);
  3647. }
  3648. }
  3649. /**
  3650. * Removes all key-value entries from the map.
  3651. *
  3652. * @private
  3653. * @name clear
  3654. * @memberOf MapCache
  3655. */
  3656. function mapCacheClear() {
  3657. this.size = 0;
  3658. this.__data__ = {
  3659. 'hash': new Hash,
  3660. 'map': new (Map || ListCache),
  3661. 'string': new Hash
  3662. };
  3663. }
  3664. /**
  3665. * Removes `key` and its value from the map.
  3666. *
  3667. * @private
  3668. * @name delete
  3669. * @memberOf MapCache
  3670. * @param {string} key The key of the value to remove.
  3671. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  3672. */
  3673. function mapCacheDelete(key) {
  3674. var result = getMapData(this, key)['delete'](key);
  3675. this.size -= result ? 1 : 0;
  3676. return result;
  3677. }
  3678. /**
  3679. * Gets the map value for `key`.
  3680. *
  3681. * @private
  3682. * @name get
  3683. * @memberOf MapCache
  3684. * @param {string} key The key of the value to get.
  3685. * @returns {*} Returns the entry value.
  3686. */
  3687. function mapCacheGet(key) {
  3688. return getMapData(this, key).get(key);
  3689. }
  3690. /**
  3691. * Checks if a map value for `key` exists.
  3692. *
  3693. * @private
  3694. * @name has
  3695. * @memberOf MapCache
  3696. * @param {string} key The key of the entry to check.
  3697. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  3698. */
  3699. function mapCacheHas(key) {
  3700. return getMapData(this, key).has(key);
  3701. }
  3702. /**
  3703. * Sets the map `key` to `value`.
  3704. *
  3705. * @private
  3706. * @name set
  3707. * @memberOf MapCache
  3708. * @param {string} key The key of the value to set.
  3709. * @param {*} value The value to set.
  3710. * @returns {Object} Returns the map cache instance.
  3711. */
  3712. function mapCacheSet(key, value) {
  3713. var data = getMapData(this, key),
  3714. size = data.size;
  3715. data.set(key, value);
  3716. this.size += data.size == size ? 0 : 1;
  3717. return this;
  3718. }
  3719. // Add methods to `MapCache`.
  3720. MapCache.prototype.clear = mapCacheClear;
  3721. MapCache.prototype['delete'] = mapCacheDelete;
  3722. MapCache.prototype.get = mapCacheGet;
  3723. MapCache.prototype.has = mapCacheHas;
  3724. MapCache.prototype.set = mapCacheSet;
  3725. /*------------------------------------------------------------------------*/
  3726. /**
  3727. *
  3728. * Creates an array cache object to store unique values.
  3729. *
  3730. * @private
  3731. * @constructor
  3732. * @param {Array} [values] The values to cache.
  3733. */
  3734. function SetCache(values) {
  3735. var index = -1,
  3736. length = values == null ? 0 : values.length;
  3737. this.__data__ = new MapCache;
  3738. while (++index < length) {
  3739. this.add(values[index]);
  3740. }
  3741. }
  3742. /**
  3743. * Adds `value` to the array cache.
  3744. *
  3745. * @private
  3746. * @name add
  3747. * @memberOf SetCache
  3748. * @alias push
  3749. * @param {*} value The value to cache.
  3750. * @returns {Object} Returns the cache instance.
  3751. */
  3752. function setCacheAdd(value) {
  3753. this.__data__.set(value, HASH_UNDEFINED);
  3754. return this;
  3755. }
  3756. /**
  3757. * Checks if `value` is in the array cache.
  3758. *
  3759. * @private
  3760. * @name has
  3761. * @memberOf SetCache
  3762. * @param {*} value The value to search for.
  3763. * @returns {number} Returns `true` if `value` is found, else `false`.
  3764. */
  3765. function setCacheHas(value) {
  3766. return this.__data__.has(value);
  3767. }
  3768. // Add methods to `SetCache`.
  3769. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
  3770. SetCache.prototype.has = setCacheHas;
  3771. /*------------------------------------------------------------------------*/
  3772. /**
  3773. * Creates a stack cache object to store key-value pairs.
  3774. *
  3775. * @private
  3776. * @constructor
  3777. * @param {Array} [entries] The key-value pairs to cache.
  3778. */
  3779. function Stack(entries) {
  3780. var data = this.__data__ = new ListCache(entries);
  3781. this.size = data.size;
  3782. }
  3783. /**
  3784. * Removes all key-value entries from the stack.
  3785. *
  3786. * @private
  3787. * @name clear
  3788. * @memberOf Stack
  3789. */
  3790. function stackClear() {
  3791. this.__data__ = new ListCache;
  3792. this.size = 0;
  3793. }
  3794. /**
  3795. * Removes `key` and its value from the stack.
  3796. *
  3797. * @private
  3798. * @name delete
  3799. * @memberOf Stack
  3800. * @param {string} key The key of the value to remove.
  3801. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  3802. */
  3803. function stackDelete(key) {
  3804. var data = this.__data__,
  3805. result = data['delete'](key);
  3806. this.size = data.size;
  3807. return result;
  3808. }
  3809. /**
  3810. * Gets the stack value for `key`.
  3811. *
  3812. * @private
  3813. * @name get
  3814. * @memberOf Stack
  3815. * @param {string} key The key of the value to get.
  3816. * @returns {*} Returns the entry value.
  3817. */
  3818. function stackGet(key) {
  3819. return this.__data__.get(key);
  3820. }
  3821. /**
  3822. * Checks if a stack value for `key` exists.
  3823. *
  3824. * @private
  3825. * @name has
  3826. * @memberOf Stack
  3827. * @param {string} key The key of the entry to check.
  3828. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  3829. */
  3830. function stackHas(key) {
  3831. return this.__data__.has(key);
  3832. }
  3833. /**
  3834. * Sets the stack `key` to `value`.
  3835. *
  3836. * @private
  3837. * @name set
  3838. * @memberOf Stack
  3839. * @param {string} key The key of the value to set.
  3840. * @param {*} value The value to set.
  3841. * @returns {Object} Returns the stack cache instance.
  3842. */
  3843. function stackSet(key, value) {
  3844. var data = this.__data__;
  3845. if (data instanceof ListCache) {
  3846. var pairs = data.__data__;
  3847. if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
  3848. pairs.push([key, value]);
  3849. this.size = ++data.size;
  3850. return this;
  3851. }
  3852. data = this.__data__ = new MapCache(pairs);
  3853. }
  3854. data.set(key, value);
  3855. this.size = data.size;
  3856. return this;
  3857. }
  3858. // Add methods to `Stack`.
  3859. Stack.prototype.clear = stackClear;
  3860. Stack.prototype['delete'] = stackDelete;
  3861. Stack.prototype.get = stackGet;
  3862. Stack.prototype.has = stackHas;
  3863. Stack.prototype.set = stackSet;
  3864. /*------------------------------------------------------------------------*/
  3865. /**
  3866. * Creates an array of the enumerable property names of the array-like `value`.
  3867. *
  3868. * @private
  3869. * @param {*} value The value to query.
  3870. * @param {boolean} inherited Specify returning inherited property names.
  3871. * @returns {Array} Returns the array of property names.
  3872. */
  3873. function arrayLikeKeys(value, inherited) {
  3874. var isArr = isArray(value),
  3875. isArg = !isArr && isArguments(value),
  3876. isBuff = !isArr && !isArg && isBuffer(value),
  3877. isType = !isArr && !isArg && !isBuff && isTypedArray(value),
  3878. skipIndexes = isArr || isArg || isBuff || isType,
  3879. result = skipIndexes ? baseTimes(value.length, String) : [],
  3880. length = result.length;
  3881. for (var key in value) {
  3882. if ((inherited || hasOwnProperty.call(value, key)) &&
  3883. !(skipIndexes && (
  3884. // Safari 9 has enumerable `arguments.length` in strict mode.
  3885. key == 'length' ||
  3886. // Node.js 0.10 has enumerable non-index properties on buffers.
  3887. (isBuff && (key == 'offset' || key == 'parent')) ||
  3888. // PhantomJS 2 has enumerable non-index properties on typed arrays.
  3889. (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
  3890. // Skip index properties.
  3891. isIndex(key, length)
  3892. ))) {
  3893. result.push(key);
  3894. }
  3895. }
  3896. return result;
  3897. }
  3898. /**
  3899. * A specialized version of `_.sample` for arrays.
  3900. *
  3901. * @private
  3902. * @param {Array} array The array to sample.
  3903. * @returns {*} Returns the random element.
  3904. */
  3905. function arraySample(array) {
  3906. var length = array.length;
  3907. return length ? array[baseRandom(0, length - 1)] : undefined;
  3908. }
  3909. /**
  3910. * A specialized version of `_.sampleSize` for arrays.
  3911. *
  3912. * @private
  3913. * @param {Array} array The array to sample.
  3914. * @param {number} n The number of elements to sample.
  3915. * @returns {Array} Returns the random elements.
  3916. */
  3917. function arraySampleSize(array, n) {
  3918. return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
  3919. }
  3920. /**
  3921. * A specialized version of `_.shuffle` for arrays.
  3922. *
  3923. * @private
  3924. * @param {Array} array The array to shuffle.
  3925. * @returns {Array} Returns the new shuffled array.
  3926. */
  3927. function arrayShuffle(array) {
  3928. return shuffleSelf(copyArray(array));
  3929. }
  3930. /**
  3931. * This function is like `assignValue` except that it doesn't assign
  3932. * `undefined` values.
  3933. *
  3934. * @private
  3935. * @param {Object} object The object to modify.
  3936. * @param {string} key The key of the property to assign.
  3937. * @param {*} value The value to assign.
  3938. */
  3939. function assignMergeValue(object, key, value) {
  3940. if ((value !== undefined && !eq(object[key], value)) ||
  3941. (value === undefined && !(key in object))) {
  3942. baseAssignValue(object, key, value);
  3943. }
  3944. }
  3945. /**
  3946. * Assigns `value` to `key` of `object` if the existing value is not equivalent
  3947. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  3948. * for equality comparisons.
  3949. *
  3950. * @private
  3951. * @param {Object} object The object to modify.
  3952. * @param {string} key The key of the property to assign.
  3953. * @param {*} value The value to assign.
  3954. */
  3955. function assignValue(object, key, value) {
  3956. var objValue = object[key];
  3957. if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
  3958. (value === undefined && !(key in object))) {
  3959. baseAssignValue(object, key, value);
  3960. }
  3961. }
  3962. /**
  3963. * Gets the index at which the `key` is found in `array` of key-value pairs.
  3964. *
  3965. * @private
  3966. * @param {Array} array The array to inspect.
  3967. * @param {*} key The key to search for.
  3968. * @returns {number} Returns the index of the matched value, else `-1`.
  3969. */
  3970. function assocIndexOf(array, key) {
  3971. var length = array.length;
  3972. while (length--) {
  3973. if (eq(array[length][0], key)) {
  3974. return length;
  3975. }
  3976. }
  3977. return -1;
  3978. }
  3979. /**
  3980. * Aggregates elements of `collection` on `accumulator` with keys transformed
  3981. * by `iteratee` and values set by `setter`.
  3982. *
  3983. * @private
  3984. * @param {Array|Object} collection The collection to iterate over.
  3985. * @param {Function} setter The function to set `accumulator` values.
  3986. * @param {Function} iteratee The iteratee to transform keys.
  3987. * @param {Object} accumulator The initial aggregated object.
  3988. * @returns {Function} Returns `accumulator`.
  3989. */
  3990. function baseAggregator(collection, setter, iteratee, accumulator) {
  3991. baseEach(collection, function(value, key, collection) {
  3992. setter(accumulator, value, iteratee(value), collection);
  3993. });
  3994. return accumulator;
  3995. }
  3996. /**
  3997. * The base implementation of `_.assign` without support for multiple sources
  3998. * or `customizer` functions.
  3999. *
  4000. * @private
  4001. * @param {Object} object The destination object.
  4002. * @param {Object} source The source object.
  4003. * @returns {Object} Returns `object`.
  4004. */
  4005. function baseAssign(object, source) {
  4006. return object && copyObject(source, keys(source), object);
  4007. }
  4008. /**
  4009. * The base implementation of `_.assignIn` without support for multiple sources
  4010. * or `customizer` functions.
  4011. *
  4012. * @private
  4013. * @param {Object} object The destination object.
  4014. * @param {Object} source The source object.
  4015. * @returns {Object} Returns `object`.
  4016. */
  4017. function baseAssignIn(object, source) {
  4018. return object && copyObject(source, keysIn(source), object);
  4019. }
  4020. /**
  4021. * The base implementation of `assignValue` and `assignMergeValue` without
  4022. * value checks.
  4023. *
  4024. * @private
  4025. * @param {Object} object The object to modify.
  4026. * @param {string} key The key of the property to assign.
  4027. * @param {*} value The value to assign.
  4028. */
  4029. function baseAssignValue(object, key, value) {
  4030. if (key == '__proto__' && defineProperty) {
  4031. defineProperty(object, key, {
  4032. 'configurable': true,
  4033. 'enumerable': true,
  4034. 'value': value,
  4035. 'writable': true
  4036. });
  4037. } else {
  4038. object[key] = value;
  4039. }
  4040. }
  4041. /**
  4042. * The base implementation of `_.at` without support for individual paths.
  4043. *
  4044. * @private
  4045. * @param {Object} object The object to iterate over.
  4046. * @param {string[]} paths The property paths to pick.
  4047. * @returns {Array} Returns the picked elements.
  4048. */
  4049. function baseAt(object, paths) {
  4050. var index = -1,
  4051. length = paths.length,
  4052. result = Array(length),
  4053. skip = object == null;
  4054. while (++index < length) {
  4055. result[index] = skip ? undefined : get(object, paths[index]);
  4056. }
  4057. return result;
  4058. }
  4059. /**
  4060. * The base implementation of `_.clamp` which doesn't coerce arguments.
  4061. *
  4062. * @private
  4063. * @param {number} number The number to clamp.
  4064. * @param {number} [lower] The lower bound.
  4065. * @param {number} upper The upper bound.
  4066. * @returns {number} Returns the clamped number.
  4067. */
  4068. function baseClamp(number, lower, upper) {
  4069. if (number === number) {
  4070. if (upper !== undefined) {
  4071. number = number <= upper ? number : upper;
  4072. }
  4073. if (lower !== undefined) {
  4074. number = number >= lower ? number : lower;
  4075. }
  4076. }
  4077. return number;
  4078. }
  4079. /**
  4080. * The base implementation of `_.clone` and `_.cloneDeep` which tracks
  4081. * traversed objects.
  4082. *
  4083. * @private
  4084. * @param {*} value The value to clone.
  4085. * @param {boolean} bitmask The bitmask flags.
  4086. * 1 - Deep clone
  4087. * 2 - Flatten inherited properties
  4088. * 4 - Clone symbols
  4089. * @param {Function} [customizer] The function to customize cloning.
  4090. * @param {string} [key] The key of `value`.
  4091. * @param {Object} [object] The parent object of `value`.
  4092. * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
  4093. * @returns {*} Returns the cloned value.
  4094. */
  4095. function baseClone(value, bitmask, customizer, key, object, stack) {
  4096. var result,
  4097. isDeep = bitmask & CLONE_DEEP_FLAG,
  4098. isFlat = bitmask & CLONE_FLAT_FLAG,
  4099. isFull = bitmask & CLONE_SYMBOLS_FLAG;
  4100. if (customizer) {
  4101. result = object ? customizer(value, key, object, stack) : customizer(value);
  4102. }
  4103. if (result !== undefined) {
  4104. return result;
  4105. }
  4106. if (!isObject(value)) {
  4107. return value;
  4108. }
  4109. var isArr = isArray(value);
  4110. if (isArr) {
  4111. result = initCloneArray(value);
  4112. if (!isDeep) {
  4113. return copyArray(value, result);
  4114. }
  4115. } else {
  4116. var tag = getTag(value),
  4117. isFunc = tag == funcTag || tag == genTag;
  4118. if (isBuffer(value)) {
  4119. return cloneBuffer(value, isDeep);
  4120. }
  4121. if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
  4122. result = (isFlat || isFunc) ? {} : initCloneObject(value);
  4123. if (!isDeep) {
  4124. return isFlat
  4125. ? copySymbolsIn(value, baseAssignIn(result, value))
  4126. : copySymbols(value, baseAssign(result, value));
  4127. }
  4128. } else {
  4129. if (!cloneableTags[tag]) {
  4130. return object ? value : {};
  4131. }
  4132. result = initCloneByTag(value, tag, isDeep);
  4133. }
  4134. }
  4135. // Check for circular references and return its corresponding clone.
  4136. stack || (stack = new Stack);
  4137. var stacked = stack.get(value);
  4138. if (stacked) {
  4139. return stacked;
  4140. }
  4141. stack.set(value, result);
  4142. if (isSet(value)) {
  4143. value.forEach(function(subValue) {
  4144. result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
  4145. });
  4146. } else if (isMap(value)) {
  4147. value.forEach(function(subValue, key) {
  4148. result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
  4149. });
  4150. }
  4151. var keysFunc = isFull
  4152. ? (isFlat ? getAllKeysIn : getAllKeys)
  4153. : (isFlat ? keysIn : keys);
  4154. var props = isArr ? undefined : keysFunc(value);
  4155. arrayEach(props || value, function(subValue, key) {
  4156. if (props) {
  4157. key = subValue;
  4158. subValue = value[key];
  4159. }
  4160. // Recursively populate clone (susceptible to call stack limits).
  4161. assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
  4162. });
  4163. return result;
  4164. }
  4165. /**
  4166. * The base implementation of `_.conforms` which doesn't clone `source`.
  4167. *
  4168. * @private
  4169. * @param {Object} source The object of property predicates to conform to.
  4170. * @returns {Function} Returns the new spec function.
  4171. */
  4172. function baseConforms(source) {
  4173. var props = keys(source);
  4174. return function(object) {
  4175. return baseConformsTo(object, source, props);
  4176. };
  4177. }
  4178. /**
  4179. * The base implementation of `_.conformsTo` which accepts `props` to check.
  4180. *
  4181. * @private
  4182. * @param {Object} object The object to inspect.
  4183. * @param {Object} source The object of property predicates to conform to.
  4184. * @returns {boolean} Returns `true` if `object` conforms, else `false`.
  4185. */
  4186. function baseConformsTo(object, source, props) {
  4187. var length = props.length;
  4188. if (object == null) {
  4189. return !length;
  4190. }
  4191. object = Object(object);
  4192. while (length--) {
  4193. var key = props[length],
  4194. predicate = source[key],
  4195. value = object[key];
  4196. if ((value === undefined && !(key in object)) || !predicate(value)) {
  4197. return false;
  4198. }
  4199. }
  4200. return true;
  4201. }
  4202. /**
  4203. * The base implementation of `_.delay` and `_.defer` which accepts `args`
  4204. * to provide to `func`.
  4205. *
  4206. * @private
  4207. * @param {Function} func The function to delay.
  4208. * @param {number} wait The number of milliseconds to delay invocation.
  4209. * @param {Array} args The arguments to provide to `func`.
  4210. * @returns {number|Object} Returns the timer id or timeout object.
  4211. */
  4212. function baseDelay(func, wait, args) {
  4213. if (typeof func != 'function') {
  4214. throw new TypeError(FUNC_ERROR_TEXT);
  4215. }
  4216. return setTimeout(function() { func.apply(undefined, args); }, wait);
  4217. }
  4218. /**
  4219. * The base implementation of methods like `_.difference` without support
  4220. * for excluding multiple arrays or iteratee shorthands.
  4221. *
  4222. * @private
  4223. * @param {Array} array The array to inspect.
  4224. * @param {Array} values The values to exclude.
  4225. * @param {Function} [iteratee] The iteratee invoked per element.
  4226. * @param {Function} [comparator] The comparator invoked per element.
  4227. * @returns {Array} Returns the new array of filtered values.
  4228. */
  4229. function baseDifference(array, values, iteratee, comparator) {
  4230. var index = -1,
  4231. includes = arrayIncludes,
  4232. isCommon = true,
  4233. length = array.length,
  4234. result = [],
  4235. valuesLength = values.length;
  4236. if (!length) {
  4237. return result;
  4238. }
  4239. if (iteratee) {
  4240. values = arrayMap(values, baseUnary(iteratee));
  4241. }
  4242. if (comparator) {
  4243. includes = arrayIncludesWith;
  4244. isCommon = false;
  4245. }
  4246. else if (values.length >= LARGE_ARRAY_SIZE) {
  4247. includes = cacheHas;
  4248. isCommon = false;
  4249. values = new SetCache(values);
  4250. }
  4251. outer:
  4252. while (++index < length) {
  4253. var value = array[index],
  4254. computed = iteratee == null ? value : iteratee(value);
  4255. value = (comparator || value !== 0) ? value : 0;
  4256. if (isCommon && computed === computed) {
  4257. var valuesIndex = valuesLength;
  4258. while (valuesIndex--) {
  4259. if (values[valuesIndex] === computed) {
  4260. continue outer;
  4261. }
  4262. }
  4263. result.push(value);
  4264. }
  4265. else if (!includes(values, computed, comparator)) {
  4266. result.push(value);
  4267. }
  4268. }
  4269. return result;
  4270. }
  4271. /**
  4272. * The base implementation of `_.forEach` without support for iteratee shorthands.
  4273. *
  4274. * @private
  4275. * @param {Array|Object} collection The collection to iterate over.
  4276. * @param {Function} iteratee The function invoked per iteration.
  4277. * @returns {Array|Object} Returns `collection`.
  4278. */
  4279. var baseEach = createBaseEach(baseForOwn);
  4280. /**
  4281. * The base implementation of `_.forEachRight` without support for iteratee shorthands.
  4282. *
  4283. * @private
  4284. * @param {Array|Object} collection The collection to iterate over.
  4285. * @param {Function} iteratee The function invoked per iteration.
  4286. * @returns {Array|Object} Returns `collection`.
  4287. */
  4288. var baseEachRight = createBaseEach(baseForOwnRight, true);
  4289. /**
  4290. * The base implementation of `_.every` without support for iteratee shorthands.
  4291. *
  4292. * @private
  4293. * @param {Array|Object} collection The collection to iterate over.
  4294. * @param {Function} predicate The function invoked per iteration.
  4295. * @returns {boolean} Returns `true` if all elements pass the predicate check,
  4296. * else `false`
  4297. */
  4298. function baseEvery(collection, predicate) {
  4299. var result = true;
  4300. baseEach(collection, function(value, index, collection) {
  4301. result = !!predicate(value, index, collection);
  4302. return result;
  4303. });
  4304. return result;
  4305. }
  4306. /**
  4307. * The base implementation of methods like `_.max` and `_.min` which accepts a
  4308. * `comparator` to determine the extremum value.
  4309. *
  4310. * @private
  4311. * @param {Array} array The array to iterate over.
  4312. * @param {Function} iteratee The iteratee invoked per iteration.
  4313. * @param {Function} comparator The comparator used to compare values.
  4314. * @returns {*} Returns the extremum value.
  4315. */
  4316. function baseExtremum(array, iteratee, comparator) {
  4317. var index = -1,
  4318. length = array.length;
  4319. while (++index < length) {
  4320. var value = array[index],
  4321. current = iteratee(value);
  4322. if (current != null && (computed === undefined
  4323. ? (current === current && !isSymbol(current))
  4324. : comparator(current, computed)
  4325. )) {
  4326. var computed = current,
  4327. result = value;
  4328. }
  4329. }
  4330. return result;
  4331. }
  4332. /**
  4333. * The base implementation of `_.fill` without an iteratee call guard.
  4334. *
  4335. * @private
  4336. * @param {Array} array The array to fill.
  4337. * @param {*} value The value to fill `array` with.
  4338. * @param {number} [start=0] The start position.
  4339. * @param {number} [end=array.length] The end position.
  4340. * @returns {Array} Returns `array`.
  4341. */
  4342. function baseFill(array, value, start, end) {
  4343. var length = array.length;
  4344. start = toInteger(start);
  4345. if (start < 0) {
  4346. start = -start > length ? 0 : (length + start);
  4347. }
  4348. end = (end === undefined || end > length) ? length : toInteger(end);
  4349. if (end < 0) {
  4350. end += length;
  4351. }
  4352. end = start > end ? 0 : toLength(end);
  4353. while (start < end) {
  4354. array[start++] = value;
  4355. }
  4356. return array;
  4357. }
  4358. /**
  4359. * The base implementation of `_.filter` without support for iteratee shorthands.
  4360. *
  4361. * @private
  4362. * @param {Array|Object} collection The collection to iterate over.
  4363. * @param {Function} predicate The function invoked per iteration.
  4364. * @returns {Array} Returns the new filtered array.
  4365. */
  4366. function baseFilter(collection, predicate) {
  4367. var result = [];
  4368. baseEach(collection, function(value, index, collection) {
  4369. if (predicate(value, index, collection)) {
  4370. result.push(value);
  4371. }
  4372. });
  4373. return result;
  4374. }
  4375. /**
  4376. * The base implementation of `_.flatten` with support for restricting flattening.
  4377. *
  4378. * @private
  4379. * @param {Array} array The array to flatten.
  4380. * @param {number} depth The maximum recursion depth.
  4381. * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
  4382. * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
  4383. * @param {Array} [result=[]] The initial result value.
  4384. * @returns {Array} Returns the new flattened array.
  4385. */
  4386. function baseFlatten(array, depth, predicate, isStrict, result) {
  4387. var index = -1,
  4388. length = array.length;
  4389. predicate || (predicate = isFlattenable);
  4390. result || (result = []);
  4391. while (++index < length) {
  4392. var value = array[index];
  4393. if (depth > 0 && predicate(value)) {
  4394. if (depth > 1) {
  4395. // Recursively flatten arrays (susceptible to call stack limits).
  4396. baseFlatten(value, depth - 1, predicate, isStrict, result);
  4397. } else {
  4398. arrayPush(result, value);
  4399. }
  4400. } else if (!isStrict) {
  4401. result[result.length] = value;
  4402. }
  4403. }
  4404. return result;
  4405. }
  4406. /**
  4407. * The base implementation of `baseForOwn` which iterates over `object`
  4408. * properties returned by `keysFunc` and invokes `iteratee` for each property.
  4409. * Iteratee functions may exit iteration early by explicitly returning `false`.
  4410. *
  4411. * @private
  4412. * @param {Object} object The object to iterate over.
  4413. * @param {Function} iteratee The function invoked per iteration.
  4414. * @param {Function} keysFunc The function to get the keys of `object`.
  4415. * @returns {Object} Returns `object`.
  4416. */
  4417. var baseFor = createBaseFor();
  4418. /**
  4419. * This function is like `baseFor` except that it iterates over properties
  4420. * in the opposite order.
  4421. *
  4422. * @private
  4423. * @param {Object} object The object to iterate over.
  4424. * @param {Function} iteratee The function invoked per iteration.
  4425. * @param {Function} keysFunc The function to get the keys of `object`.
  4426. * @returns {Object} Returns `object`.
  4427. */
  4428. var baseForRight = createBaseFor(true);
  4429. /**
  4430. * The base implementation of `_.forOwn` without support for iteratee shorthands.
  4431. *
  4432. * @private
  4433. * @param {Object} object The object to iterate over.
  4434. * @param {Function} iteratee The function invoked per iteration.
  4435. * @returns {Object} Returns `object`.
  4436. */
  4437. function baseForOwn(object, iteratee) {
  4438. return object && baseFor(object, iteratee, keys);
  4439. }
  4440. /**
  4441. * The base implementation of `_.forOwnRight` without support for iteratee shorthands.
  4442. *
  4443. * @private
  4444. * @param {Object} object The object to iterate over.
  4445. * @param {Function} iteratee The function invoked per iteration.
  4446. * @returns {Object} Returns `object`.
  4447. */
  4448. function baseForOwnRight(object, iteratee) {
  4449. return object && baseForRight(object, iteratee, keys);
  4450. }
  4451. /**
  4452. * The base implementation of `_.functions` which creates an array of
  4453. * `object` function property names filtered from `props`.
  4454. *
  4455. * @private
  4456. * @param {Object} object The object to inspect.
  4457. * @param {Array} props The property names to filter.
  4458. * @returns {Array} Returns the function names.
  4459. */
  4460. function baseFunctions(object, props) {
  4461. return arrayFilter(props, function(key) {
  4462. return isFunction(object[key]);
  4463. });
  4464. }
  4465. /**
  4466. * The base implementation of `_.get` without support for default values.
  4467. *
  4468. * @private
  4469. * @param {Object} object The object to query.
  4470. * @param {Array|string} path The path of the property to get.
  4471. * @returns {*} Returns the resolved value.
  4472. */
  4473. function baseGet(object, path) {
  4474. path = castPath(path, object);
  4475. var index = 0,
  4476. length = path.length;
  4477. while (object != null && index < length) {
  4478. object = object[toKey(path[index++])];
  4479. }
  4480. return (index && index == length) ? object : undefined;
  4481. }
  4482. /**
  4483. * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
  4484. * `keysFunc` and `symbolsFunc` to get the enumerable property names and
  4485. * symbols of `object`.
  4486. *
  4487. * @private
  4488. * @param {Object} object The object to query.
  4489. * @param {Function} keysFunc The function to get the keys of `object`.
  4490. * @param {Function} symbolsFunc The function to get the symbols of `object`.
  4491. * @returns {Array} Returns the array of property names and symbols.
  4492. */
  4493. function baseGetAllKeys(object, keysFunc, symbolsFunc) {
  4494. var result = keysFunc(object);
  4495. return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
  4496. }
  4497. /**
  4498. * The base implementation of `getTag` without fallbacks for buggy environments.
  4499. *
  4500. * @private
  4501. * @param {*} value The value to query.
  4502. * @returns {string} Returns the `toStringTag`.
  4503. */
  4504. function baseGetTag(value) {
  4505. if (value == null) {
  4506. return value === undefined ? undefinedTag : nullTag;
  4507. }
  4508. return (symToStringTag && symToStringTag in Object(value))
  4509. ? getRawTag(value)
  4510. : objectToString(value);
  4511. }
  4512. /**
  4513. * The base implementation of `_.gt` which doesn't coerce arguments.
  4514. *
  4515. * @private
  4516. * @param {*} value The value to compare.
  4517. * @param {*} other The other value to compare.
  4518. * @returns {boolean} Returns `true` if `value` is greater than `other`,
  4519. * else `false`.
  4520. */
  4521. function baseGt(value, other) {
  4522. return value > other;
  4523. }
  4524. /**
  4525. * The base implementation of `_.has` without support for deep paths.
  4526. *
  4527. * @private
  4528. * @param {Object} [object] The object to query.
  4529. * @param {Array|string} key The key to check.
  4530. * @returns {boolean} Returns `true` if `key` exists, else `false`.
  4531. */
  4532. function baseHas(object, key) {
  4533. return object != null && hasOwnProperty.call(object, key);
  4534. }
  4535. /**
  4536. * The base implementation of `_.hasIn` without support for deep paths.
  4537. *
  4538. * @private
  4539. * @param {Object} [object] The object to query.
  4540. * @param {Array|string} key The key to check.
  4541. * @returns {boolean} Returns `true` if `key` exists, else `false`.
  4542. */
  4543. function baseHasIn(object, key) {
  4544. return object != null && key in Object(object);
  4545. }
  4546. /**
  4547. * The base implementation of `_.inRange` which doesn't coerce arguments.
  4548. *
  4549. * @private
  4550. * @param {number} number The number to check.
  4551. * @param {number} start The start of the range.
  4552. * @param {number} end The end of the range.
  4553. * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
  4554. */
  4555. function baseInRange(number, start, end) {
  4556. return number >= nativeMin(start, end) && number < nativeMax(start, end);
  4557. }
  4558. /**
  4559. * The base implementation of methods like `_.intersection`, without support
  4560. * for iteratee shorthands, that accepts an array of arrays to inspect.
  4561. *
  4562. * @private
  4563. * @param {Array} arrays The arrays to inspect.
  4564. * @param {Function} [iteratee] The iteratee invoked per element.
  4565. * @param {Function} [comparator] The comparator invoked per element.
  4566. * @returns {Array} Returns the new array of shared values.
  4567. */
  4568. function baseIntersection(arrays, iteratee, comparator) {
  4569. var includes = comparator ? arrayIncludesWith : arrayIncludes,
  4570. length = arrays[0].length,
  4571. othLength = arrays.length,
  4572. othIndex = othLength,
  4573. caches = Array(othLength),
  4574. maxLength = Infinity,
  4575. result = [];
  4576. while (othIndex--) {
  4577. var array = arrays[othIndex];
  4578. if (othIndex && iteratee) {
  4579. array = arrayMap(array, baseUnary(iteratee));
  4580. }
  4581. maxLength = nativeMin(array.length, maxLength);
  4582. caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
  4583. ? new SetCache(othIndex && array)
  4584. : undefined;
  4585. }
  4586. array = arrays[0];
  4587. var index = -1,
  4588. seen = caches[0];
  4589. outer:
  4590. while (++index < length && result.length < maxLength) {
  4591. var value = array[index],
  4592. computed = iteratee ? iteratee(value) : value;
  4593. value = (comparator || value !== 0) ? value : 0;
  4594. if (!(seen
  4595. ? cacheHas(seen, computed)
  4596. : includes(result, computed, comparator)
  4597. )) {
  4598. othIndex = othLength;
  4599. while (--othIndex) {
  4600. var cache = caches[othIndex];
  4601. if (!(cache
  4602. ? cacheHas(cache, computed)
  4603. : includes(arrays[othIndex], computed, comparator))
  4604. ) {
  4605. continue outer;
  4606. }
  4607. }
  4608. if (seen) {
  4609. seen.push(computed);
  4610. }
  4611. result.push(value);
  4612. }
  4613. }
  4614. return result;
  4615. }
  4616. /**
  4617. * The base implementation of `_.invert` and `_.invertBy` which inverts
  4618. * `object` with values transformed by `iteratee` and set by `setter`.
  4619. *
  4620. * @private
  4621. * @param {Object} object The object to iterate over.
  4622. * @param {Function} setter The function to set `accumulator` values.
  4623. * @param {Function} iteratee The iteratee to transform values.
  4624. * @param {Object} accumulator The initial inverted object.
  4625. * @returns {Function} Returns `accumulator`.
  4626. */
  4627. function baseInverter(object, setter, iteratee, accumulator) {
  4628. baseForOwn(object, function(value, key, object) {
  4629. setter(accumulator, iteratee(value), key, object);
  4630. });
  4631. return accumulator;
  4632. }
  4633. /**
  4634. * The base implementation of `_.invoke` without support for individual
  4635. * method arguments.
  4636. *
  4637. * @private
  4638. * @param {Object} object The object to query.
  4639. * @param {Array|string} path The path of the method to invoke.
  4640. * @param {Array} args The arguments to invoke the method with.
  4641. * @returns {*} Returns the result of the invoked method.
  4642. */
  4643. function baseInvoke(object, path, args) {
  4644. path = castPath(path, object);
  4645. object = parent(object, path);
  4646. var func = object == null ? object : object[toKey(last(path))];
  4647. return func == null ? undefined : apply(func, object, args);
  4648. }
  4649. /**
  4650. * The base implementation of `_.isArguments`.
  4651. *
  4652. * @private
  4653. * @param {*} value The value to check.
  4654. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  4655. */
  4656. function baseIsArguments(value) {
  4657. return isObjectLike(value) && baseGetTag(value) == argsTag;
  4658. }
  4659. /**
  4660. * The base implementation of `_.isArrayBuffer` without Node.js optimizations.
  4661. *
  4662. * @private
  4663. * @param {*} value The value to check.
  4664. * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
  4665. */
  4666. function baseIsArrayBuffer(value) {
  4667. return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
  4668. }
  4669. /**
  4670. * The base implementation of `_.isDate` without Node.js optimizations.
  4671. *
  4672. * @private
  4673. * @param {*} value The value to check.
  4674. * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
  4675. */
  4676. function baseIsDate(value) {
  4677. return isObjectLike(value) && baseGetTag(value) == dateTag;
  4678. }
  4679. /**
  4680. * The base implementation of `_.isEqual` which supports partial comparisons
  4681. * and tracks traversed objects.
  4682. *
  4683. * @private
  4684. * @param {*} value The value to compare.
  4685. * @param {*} other The other value to compare.
  4686. * @param {boolean} bitmask The bitmask flags.
  4687. * 1 - Unordered comparison
  4688. * 2 - Partial comparison
  4689. * @param {Function} [customizer] The function to customize comparisons.
  4690. * @param {Object} [stack] Tracks traversed `value` and `other` objects.
  4691. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  4692. */
  4693. function baseIsEqual(value, other, bitmask, customizer, stack) {
  4694. if (value === other) {
  4695. return true;
  4696. }
  4697. if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
  4698. return value !== value && other !== other;
  4699. }
  4700. return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
  4701. }
  4702. /**
  4703. * A specialized version of `baseIsEqual` for arrays and objects which performs
  4704. * deep comparisons and tracks traversed objects enabling objects with circular
  4705. * references to be compared.
  4706. *
  4707. * @private
  4708. * @param {Object} object The object to compare.
  4709. * @param {Object} other The other object to compare.
  4710. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  4711. * @param {Function} customizer The function to customize comparisons.
  4712. * @param {Function} equalFunc The function to determine equivalents of values.
  4713. * @param {Object} [stack] Tracks traversed `object` and `other` objects.
  4714. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  4715. */
  4716. function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
  4717. var objIsArr = isArray(object),
  4718. othIsArr = isArray(other),
  4719. objTag = objIsArr ? arrayTag : getTag(object),
  4720. othTag = othIsArr ? arrayTag : getTag(other);
  4721. objTag = objTag == argsTag ? objectTag : objTag;
  4722. othTag = othTag == argsTag ? objectTag : othTag;
  4723. var objIsObj = objTag == objectTag,
  4724. othIsObj = othTag == objectTag,
  4725. isSameTag = objTag == othTag;
  4726. if (isSameTag && isBuffer(object)) {
  4727. if (!isBuffer(other)) {
  4728. return false;
  4729. }
  4730. objIsArr = true;
  4731. objIsObj = false;
  4732. }
  4733. if (isSameTag && !objIsObj) {
  4734. stack || (stack = new Stack);
  4735. return (objIsArr || isTypedArray(object))
  4736. ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
  4737. : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
  4738. }
  4739. if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
  4740. var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
  4741. othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
  4742. if (objIsWrapped || othIsWrapped) {
  4743. var objUnwrapped = objIsWrapped ? object.value() : object,
  4744. othUnwrapped = othIsWrapped ? other.value() : other;
  4745. stack || (stack = new Stack);
  4746. return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
  4747. }
  4748. }
  4749. if (!isSameTag) {
  4750. return false;
  4751. }
  4752. stack || (stack = new Stack);
  4753. return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
  4754. }
  4755. /**
  4756. * The base implementation of `_.isMap` without Node.js optimizations.
  4757. *
  4758. * @private
  4759. * @param {*} value The value to check.
  4760. * @returns {boolean} Returns `true` if `value` is a map, else `false`.
  4761. */
  4762. function baseIsMap(value) {
  4763. return isObjectLike(value) && getTag(value) == mapTag;
  4764. }
  4765. /**
  4766. * The base implementation of `_.isMatch` without support for iteratee shorthands.
  4767. *
  4768. * @private
  4769. * @param {Object} object The object to inspect.
  4770. * @param {Object} source The object of property values to match.
  4771. * @param {Array} matchData The property names, values, and compare flags to match.
  4772. * @param {Function} [customizer] The function to customize comparisons.
  4773. * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  4774. */
  4775. function baseIsMatch(object, source, matchData, customizer) {
  4776. var index = matchData.length,
  4777. length = index,
  4778. noCustomizer = !customizer;
  4779. if (object == null) {
  4780. return !length;
  4781. }
  4782. object = Object(object);
  4783. while (index--) {
  4784. var data = matchData[index];
  4785. if ((noCustomizer && data[2])
  4786. ? data[1] !== object[data[0]]
  4787. : !(data[0] in object)
  4788. ) {
  4789. return false;
  4790. }
  4791. }
  4792. while (++index < length) {
  4793. data = matchData[index];
  4794. var key = data[0],
  4795. objValue = object[key],
  4796. srcValue = data[1];
  4797. if (noCustomizer && data[2]) {
  4798. if (objValue === undefined && !(key in object)) {
  4799. return false;
  4800. }
  4801. } else {
  4802. var stack = new Stack;
  4803. if (customizer) {
  4804. var result = customizer(objValue, srcValue, key, object, source, stack);
  4805. }
  4806. if (!(result === undefined
  4807. ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
  4808. : result
  4809. )) {
  4810. return false;
  4811. }
  4812. }
  4813. }
  4814. return true;
  4815. }
  4816. /**
  4817. * The base implementation of `_.isNative` without bad shim checks.
  4818. *
  4819. * @private
  4820. * @param {*} value The value to check.
  4821. * @returns {boolean} Returns `true` if `value` is a native function,
  4822. * else `false`.
  4823. */
  4824. function baseIsNative(value) {
  4825. if (!isObject(value) || isMasked(value)) {
  4826. return false;
  4827. }
  4828. var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
  4829. return pattern.test(toSource(value));
  4830. }
  4831. /**
  4832. * The base implementation of `_.isRegExp` without Node.js optimizations.
  4833. *
  4834. * @private
  4835. * @param {*} value The value to check.
  4836. * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
  4837. */
  4838. function baseIsRegExp(value) {
  4839. return isObjectLike(value) && baseGetTag(value) == regexpTag;
  4840. }
  4841. /**
  4842. * The base implementation of `_.isSet` without Node.js optimizations.
  4843. *
  4844. * @private
  4845. * @param {*} value The value to check.
  4846. * @returns {boolean} Returns `true` if `value` is a set, else `false`.
  4847. */
  4848. function baseIsSet(value) {
  4849. return isObjectLike(value) && getTag(value) == setTag;
  4850. }
  4851. /**
  4852. * The base implementation of `_.isTypedArray` without Node.js optimizations.
  4853. *
  4854. * @private
  4855. * @param {*} value The value to check.
  4856. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  4857. */
  4858. function baseIsTypedArray(value) {
  4859. return isObjectLike(value) &&
  4860. isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
  4861. }
  4862. /**
  4863. * The base implementation of `_.iteratee`.
  4864. *
  4865. * @private
  4866. * @param {*} [value=_.identity] The value to convert to an iteratee.
  4867. * @returns {Function} Returns the iteratee.
  4868. */
  4869. function baseIteratee(value) {
  4870. // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
  4871. // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
  4872. if (typeof value == 'function') {
  4873. return value;
  4874. }
  4875. if (value == null) {
  4876. return identity;
  4877. }
  4878. if (typeof value == 'object') {
  4879. return isArray(value)
  4880. ? baseMatchesProperty(value[0], value[1])
  4881. : baseMatches(value);
  4882. }
  4883. return property(value);
  4884. }
  4885. /**
  4886. * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
  4887. *
  4888. * @private
  4889. * @param {Object} object The object to query.
  4890. * @returns {Array} Returns the array of property names.
  4891. */
  4892. function baseKeys(object) {
  4893. if (!isPrototype(object)) {
  4894. return nativeKeys(object);
  4895. }
  4896. var result = [];
  4897. for (var key in Object(object)) {
  4898. if (hasOwnProperty.call(object, key) && key != 'constructor') {
  4899. result.push(key);
  4900. }
  4901. }
  4902. return result;
  4903. }
  4904. /**
  4905. * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
  4906. *
  4907. * @private
  4908. * @param {Object} object The object to query.
  4909. * @returns {Array} Returns the array of property names.
  4910. */
  4911. function baseKeysIn(object) {
  4912. if (!isObject(object)) {
  4913. return nativeKeysIn(object);
  4914. }
  4915. var isProto = isPrototype(object),
  4916. result = [];
  4917. for (var key in object) {
  4918. if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
  4919. result.push(key);
  4920. }
  4921. }
  4922. return result;
  4923. }
  4924. /**
  4925. * The base implementation of `_.lt` which doesn't coerce arguments.
  4926. *
  4927. * @private
  4928. * @param {*} value The value to compare.
  4929. * @param {*} other The other value to compare.
  4930. * @returns {boolean} Returns `true` if `value` is less than `other`,
  4931. * else `false`.
  4932. */
  4933. function baseLt(value, other) {
  4934. return value < other;
  4935. }
  4936. /**
  4937. * The base implementation of `_.map` without support for iteratee shorthands.
  4938. *
  4939. * @private
  4940. * @param {Array|Object} collection The collection to iterate over.
  4941. * @param {Function} iteratee The function invoked per iteration.
  4942. * @returns {Array} Returns the new mapped array.
  4943. */
  4944. function baseMap(collection, iteratee) {
  4945. var index = -1,
  4946. result = isArrayLike(collection) ? Array(collection.length) : [];
  4947. baseEach(collection, function(value, key, collection) {
  4948. result[++index] = iteratee(value, key, collection);
  4949. });
  4950. return result;
  4951. }
  4952. /**
  4953. * The base implementation of `_.matches` which doesn't clone `source`.
  4954. *
  4955. * @private
  4956. * @param {Object} source The object of property values to match.
  4957. * @returns {Function} Returns the new spec function.
  4958. */
  4959. function baseMatches(source) {
  4960. var matchData = getMatchData(source);
  4961. if (matchData.length == 1 && matchData[0][2]) {
  4962. return matchesStrictComparable(matchData[0][0], matchData[0][1]);
  4963. }
  4964. return function(object) {
  4965. return object === source || baseIsMatch(object, source, matchData);
  4966. };
  4967. }
  4968. /**
  4969. * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
  4970. *
  4971. * @private
  4972. * @param {string} path The path of the property to get.
  4973. * @param {*} srcValue The value to match.
  4974. * @returns {Function} Returns the new spec function.
  4975. */
  4976. function baseMatchesProperty(path, srcValue) {
  4977. if (isKey(path) && isStrictComparable(srcValue)) {
  4978. return matchesStrictComparable(toKey(path), srcValue);
  4979. }
  4980. return function(object) {
  4981. var objValue = get(object, path);
  4982. return (objValue === undefined && objValue === srcValue)
  4983. ? hasIn(object, path)
  4984. : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
  4985. };
  4986. }
  4987. /**
  4988. * The base implementation of `_.merge` without support for multiple sources.
  4989. *
  4990. * @private
  4991. * @param {Object} object The destination object.
  4992. * @param {Object} source The source object.
  4993. * @param {number} srcIndex The index of `source`.
  4994. * @param {Function} [customizer] The function to customize merged values.
  4995. * @param {Object} [stack] Tracks traversed source values and their merged
  4996. * counterparts.
  4997. */
  4998. function baseMerge(object, source, srcIndex, customizer, stack) {
  4999. if (object === source) {
  5000. return;
  5001. }
  5002. baseFor(source, function(srcValue, key) {
  5003. stack || (stack = new Stack);
  5004. if (isObject(srcValue)) {
  5005. baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
  5006. }
  5007. else {
  5008. var newValue = customizer
  5009. ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
  5010. : undefined;
  5011. if (newValue === undefined) {
  5012. newValue = srcValue;
  5013. }
  5014. assignMergeValue(object, key, newValue);
  5015. }
  5016. }, keysIn);
  5017. }
  5018. /**
  5019. * A specialized version of `baseMerge` for arrays and objects which performs
  5020. * deep merges and tracks traversed objects enabling objects with circular
  5021. * references to be merged.
  5022. *
  5023. * @private
  5024. * @param {Object} object The destination object.
  5025. * @param {Object} source The source object.
  5026. * @param {string} key The key of the value to merge.
  5027. * @param {number} srcIndex The index of `source`.
  5028. * @param {Function} mergeFunc The function to merge values.
  5029. * @param {Function} [customizer] The function to customize assigned values.
  5030. * @param {Object} [stack] Tracks traversed source values and their merged
  5031. * counterparts.
  5032. */
  5033. function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
  5034. var objValue = safeGet(object, key),
  5035. srcValue = safeGet(source, key),
  5036. stacked = stack.get(srcValue);
  5037. if (stacked) {
  5038. assignMergeValue(object, key, stacked);
  5039. return;
  5040. }
  5041. var newValue = customizer
  5042. ? customizer(objValue, srcValue, (key + ''), object, source, stack)
  5043. : undefined;
  5044. var isCommon = newValue === undefined;
  5045. if (isCommon) {
  5046. var isArr = isArray(srcValue),
  5047. isBuff = !isArr && isBuffer(srcValue),
  5048. isTyped = !isArr && !isBuff && isTypedArray(srcValue);
  5049. newValue = srcValue;
  5050. if (isArr || isBuff || isTyped) {
  5051. if (isArray(objValue)) {
  5052. newValue = objValue;
  5053. }
  5054. else if (isArrayLikeObject(objValue)) {
  5055. newValue = copyArray(objValue);
  5056. }
  5057. else if (isBuff) {
  5058. isCommon = false;
  5059. newValue = cloneBuffer(srcValue, true);
  5060. }
  5061. else if (isTyped) {
  5062. isCommon = false;
  5063. newValue = cloneTypedArray(srcValue, true);
  5064. }
  5065. else {
  5066. newValue = [];
  5067. }
  5068. }
  5069. else if (isPlainObject(srcValue) || isArguments(srcValue)) {
  5070. newValue = objValue;
  5071. if (isArguments(objValue)) {
  5072. newValue = toPlainObject(objValue);
  5073. }
  5074. else if (!isObject(objValue) || isFunction(objValue)) {
  5075. newValue = initCloneObject(srcValue);
  5076. }
  5077. }
  5078. else {
  5079. isCommon = false;
  5080. }
  5081. }
  5082. if (isCommon) {
  5083. // Recursively merge objects and arrays (susceptible to call stack limits).
  5084. stack.set(srcValue, newValue);
  5085. mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
  5086. stack['delete'](srcValue);
  5087. }
  5088. assignMergeValue(object, key, newValue);
  5089. }
  5090. /**
  5091. * The base implementation of `_.nth` which doesn't coerce arguments.
  5092. *
  5093. * @private
  5094. * @param {Array} array The array to query.
  5095. * @param {number} n The index of the element to return.
  5096. * @returns {*} Returns the nth element of `array`.
  5097. */
  5098. function baseNth(array, n) {
  5099. var length = array.length;
  5100. if (!length) {
  5101. return;
  5102. }
  5103. n += n < 0 ? length : 0;
  5104. return isIndex(n, length) ? array[n] : undefined;
  5105. }
  5106. /**
  5107. * The base implementation of `_.orderBy` without param guards.
  5108. *
  5109. * @private
  5110. * @param {Array|Object} collection The collection to iterate over.
  5111. * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
  5112. * @param {string[]} orders The sort orders of `iteratees`.
  5113. * @returns {Array} Returns the new sorted array.
  5114. */
  5115. function baseOrderBy(collection, iteratees, orders) {
  5116. if (iteratees.length) {
  5117. iteratees = arrayMap(iteratees, function(iteratee) {
  5118. if (isArray(iteratee)) {
  5119. return function(value) {
  5120. return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
  5121. }
  5122. }
  5123. return iteratee;
  5124. });
  5125. } else {
  5126. iteratees = [identity];
  5127. }
  5128. var index = -1;
  5129. iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
  5130. var result = baseMap(collection, function(value, key, collection) {
  5131. var criteria = arrayMap(iteratees, function(iteratee) {
  5132. return iteratee(value);
  5133. });
  5134. return { 'criteria': criteria, 'index': ++index, 'value': value };
  5135. });
  5136. return baseSortBy(result, function(object, other) {
  5137. return compareMultiple(object, other, orders);
  5138. });
  5139. }
  5140. /**
  5141. * The base implementation of `_.pick` without support for individual
  5142. * property identifiers.
  5143. *
  5144. * @private
  5145. * @param {Object} object The source object.
  5146. * @param {string[]} paths The property paths to pick.
  5147. * @returns {Object} Returns the new object.
  5148. */
  5149. function basePick(object, paths) {
  5150. return basePickBy(object, paths, function(value, path) {
  5151. return hasIn(object, path);
  5152. });
  5153. }
  5154. /**
  5155. * The base implementation of `_.pickBy` without support for iteratee shorthands.
  5156. *
  5157. * @private
  5158. * @param {Object} object The source object.
  5159. * @param {string[]} paths The property paths to pick.
  5160. * @param {Function} predicate The function invoked per property.
  5161. * @returns {Object} Returns the new object.
  5162. */
  5163. function basePickBy(object, paths, predicate) {
  5164. var index = -1,
  5165. length = paths.length,
  5166. result = {};
  5167. while (++index < length) {
  5168. var path = paths[index],
  5169. value = baseGet(object, path);
  5170. if (predicate(value, path)) {
  5171. baseSet(result, castPath(path, object), value);
  5172. }
  5173. }
  5174. return result;
  5175. }
  5176. /**
  5177. * A specialized version of `baseProperty` which supports deep paths.
  5178. *
  5179. * @private
  5180. * @param {Array|string} path The path of the property to get.
  5181. * @returns {Function} Returns the new accessor function.
  5182. */
  5183. function basePropertyDeep(path) {
  5184. return function(object) {
  5185. return baseGet(object, path);
  5186. };
  5187. }
  5188. /**
  5189. * The base implementation of `_.pullAllBy` without support for iteratee
  5190. * shorthands.
  5191. *
  5192. * @private
  5193. * @param {Array} array The array to modify.
  5194. * @param {Array} values The values to remove.
  5195. * @param {Function} [iteratee] The iteratee invoked per element.
  5196. * @param {Function} [comparator] The comparator invoked per element.
  5197. * @returns {Array} Returns `array`.
  5198. */
  5199. function basePullAll(array, values, iteratee, comparator) {
  5200. var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
  5201. index = -1,
  5202. length = values.length,
  5203. seen = array;
  5204. if (array === values) {
  5205. values = copyArray(values);
  5206. }
  5207. if (iteratee) {
  5208. seen = arrayMap(array, baseUnary(iteratee));
  5209. }
  5210. while (++index < length) {
  5211. var fromIndex = 0,
  5212. value = values[index],
  5213. computed = iteratee ? iteratee(value) : value;
  5214. while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
  5215. if (seen !== array) {
  5216. splice.call(seen, fromIndex, 1);
  5217. }
  5218. splice.call(array, fromIndex, 1);
  5219. }
  5220. }
  5221. return array;
  5222. }
  5223. /**
  5224. * The base implementation of `_.pullAt` without support for individual
  5225. * indexes or capturing the removed elements.
  5226. *
  5227. * @private
  5228. * @param {Array} array The array to modify.
  5229. * @param {number[]} indexes The indexes of elements to remove.
  5230. * @returns {Array} Returns `array`.
  5231. */
  5232. function basePullAt(array, indexes) {
  5233. var length = array ? indexes.length : 0,
  5234. lastIndex = length - 1;
  5235. while (length--) {
  5236. var index = indexes[length];
  5237. if (length == lastIndex || index !== previous) {
  5238. var previous = index;
  5239. if (isIndex(index)) {
  5240. splice.call(array, index, 1);
  5241. } else {
  5242. baseUnset(array, index);
  5243. }
  5244. }
  5245. }
  5246. return array;
  5247. }
  5248. /**
  5249. * The base implementation of `_.random` without support for returning
  5250. * floating-point numbers.
  5251. *
  5252. * @private
  5253. * @param {number} lower The lower bound.
  5254. * @param {number} upper The upper bound.
  5255. * @returns {number} Returns the random number.
  5256. */
  5257. function baseRandom(lower, upper) {
  5258. return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
  5259. }
  5260. /**
  5261. * The base implementation of `_.range` and `_.rangeRight` which doesn't
  5262. * coerce arguments.
  5263. *
  5264. * @private
  5265. * @param {number} start The start of the range.
  5266. * @param {number} end The end of the range.
  5267. * @param {number} step The value to increment or decrement by.
  5268. * @param {boolean} [fromRight] Specify iterating from right to left.
  5269. * @returns {Array} Returns the range of numbers.
  5270. */
  5271. function baseRange(start, end, step, fromRight) {
  5272. var index = -1,
  5273. length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
  5274. result = Array(length);
  5275. while (length--) {
  5276. result[fromRight ? length : ++index] = start;
  5277. start += step;
  5278. }
  5279. return result;
  5280. }
  5281. /**
  5282. * The base implementation of `_.repeat` which doesn't coerce arguments.
  5283. *
  5284. * @private
  5285. * @param {string} string The string to repeat.
  5286. * @param {number} n The number of times to repeat the string.
  5287. * @returns {string} Returns the repeated string.
  5288. */
  5289. function baseRepeat(string, n) {
  5290. var result = '';
  5291. if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
  5292. return result;
  5293. }
  5294. // Leverage the exponentiation by squaring algorithm for a faster repeat.
  5295. // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
  5296. do {
  5297. if (n % 2) {
  5298. result += string;
  5299. }
  5300. n = nativeFloor(n / 2);
  5301. if (n) {
  5302. string += string;
  5303. }
  5304. } while (n);
  5305. return result;
  5306. }
  5307. /**
  5308. * The base implementation of `_.rest` which doesn't validate or coerce arguments.
  5309. *
  5310. * @private
  5311. * @param {Function} func The function to apply a rest parameter to.
  5312. * @param {number} [start=func.length-1] The start position of the rest parameter.
  5313. * @returns {Function} Returns the new function.
  5314. */
  5315. function baseRest(func, start) {
  5316. return setToString(overRest(func, start, identity), func + '');
  5317. }
  5318. /**
  5319. * The base implementation of `_.sample`.
  5320. *
  5321. * @private
  5322. * @param {Array|Object} collection The collection to sample.
  5323. * @returns {*} Returns the random element.
  5324. */
  5325. function baseSample(collection) {
  5326. return arraySample(values(collection));
  5327. }
  5328. /**
  5329. * The base implementation of `_.sampleSize` without param guards.
  5330. *
  5331. * @private
  5332. * @param {Array|Object} collection The collection to sample.
  5333. * @param {number} n The number of elements to sample.
  5334. * @returns {Array} Returns the random elements.
  5335. */
  5336. function baseSampleSize(collection, n) {
  5337. var array = values(collection);
  5338. return shuffleSelf(array, baseClamp(n, 0, array.length));
  5339. }
  5340. /**
  5341. * The base implementation of `_.set`.
  5342. *
  5343. * @private
  5344. * @param {Object} object The object to modify.
  5345. * @param {Array|string} path The path of the property to set.
  5346. * @param {*} value The value to set.
  5347. * @param {Function} [customizer] The function to customize path creation.
  5348. * @returns {Object} Returns `object`.
  5349. */
  5350. function baseSet(object, path, value, customizer) {
  5351. if (!isObject(object)) {
  5352. return object;
  5353. }
  5354. path = castPath(path, object);
  5355. var index = -1,
  5356. length = path.length,
  5357. lastIndex = length - 1,
  5358. nested = object;
  5359. while (nested != null && ++index < length) {
  5360. var key = toKey(path[index]),
  5361. newValue = value;
  5362. if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
  5363. return object;
  5364. }
  5365. if (index != lastIndex) {
  5366. var objValue = nested[key];
  5367. newValue = customizer ? customizer(objValue, key, nested) : undefined;
  5368. if (newValue === undefined) {
  5369. newValue = isObject(objValue)
  5370. ? objValue
  5371. : (isIndex(path[index + 1]) ? [] : {});
  5372. }
  5373. }
  5374. assignValue(nested, key, newValue);
  5375. nested = nested[key];
  5376. }
  5377. return object;
  5378. }
  5379. /**
  5380. * The base implementation of `setData` without support for hot loop shorting.
  5381. *
  5382. * @private
  5383. * @param {Function} func The function to associate metadata with.
  5384. * @param {*} data The metadata.
  5385. * @returns {Function} Returns `func`.
  5386. */
  5387. var baseSetData = !metaMap ? identity : function(func, data) {
  5388. metaMap.set(func, data);
  5389. return func;
  5390. };
  5391. /**
  5392. * The base implementation of `setToString` without support for hot loop shorting.
  5393. *
  5394. * @private
  5395. * @param {Function} func The function to modify.
  5396. * @param {Function} string The `toString` result.
  5397. * @returns {Function} Returns `func`.
  5398. */
  5399. var baseSetToString = !defineProperty ? identity : function(func, string) {
  5400. return defineProperty(func, 'toString', {
  5401. 'configurable': true,
  5402. 'enumerable': false,
  5403. 'value': constant(string),
  5404. 'writable': true
  5405. });
  5406. };
  5407. /**
  5408. * The base implementation of `_.shuffle`.
  5409. *
  5410. * @private
  5411. * @param {Array|Object} collection The collection to shuffle.
  5412. * @returns {Array} Returns the new shuffled array.
  5413. */
  5414. function baseShuffle(collection) {
  5415. return shuffleSelf(values(collection));
  5416. }
  5417. /**
  5418. * The base implementation of `_.slice` without an iteratee call guard.
  5419. *
  5420. * @private
  5421. * @param {Array} array The array to slice.
  5422. * @param {number} [start=0] The start position.
  5423. * @param {number} [end=array.length] The end position.
  5424. * @returns {Array} Returns the slice of `array`.
  5425. */
  5426. function baseSlice(array, start, end) {
  5427. var index = -1,
  5428. length = array.length;
  5429. if (start < 0) {
  5430. start = -start > length ? 0 : (length + start);
  5431. }
  5432. end = end > length ? length : end;
  5433. if (end < 0) {
  5434. end += length;
  5435. }
  5436. length = start > end ? 0 : ((end - start) >>> 0);
  5437. start >>>= 0;
  5438. var result = Array(length);
  5439. while (++index < length) {
  5440. result[index] = array[index + start];
  5441. }
  5442. return result;
  5443. }
  5444. /**
  5445. * The base implementation of `_.some` without support for iteratee shorthands.
  5446. *
  5447. * @private
  5448. * @param {Array|Object} collection The collection to iterate over.
  5449. * @param {Function} predicate The function invoked per iteration.
  5450. * @returns {boolean} Returns `true` if any element passes the predicate check,
  5451. * else `false`.
  5452. */
  5453. function baseSome(collection, predicate) {
  5454. var result;
  5455. baseEach(collection, function(value, index, collection) {
  5456. result = predicate(value, index, collection);
  5457. return !result;
  5458. });
  5459. return !!result;
  5460. }
  5461. /**
  5462. * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
  5463. * performs a binary search of `array` to determine the index at which `value`
  5464. * should be inserted into `array` in order to maintain its sort order.
  5465. *
  5466. * @private
  5467. * @param {Array} array The sorted array to inspect.
  5468. * @param {*} value The value to evaluate.
  5469. * @param {boolean} [retHighest] Specify returning the highest qualified index.
  5470. * @returns {number} Returns the index at which `value` should be inserted
  5471. * into `array`.
  5472. */
  5473. function baseSortedIndex(array, value, retHighest) {
  5474. var low = 0,
  5475. high = array == null ? low : array.length;
  5476. if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
  5477. while (low < high) {
  5478. var mid = (low + high) >>> 1,
  5479. computed = array[mid];
  5480. if (computed !== null && !isSymbol(computed) &&
  5481. (retHighest ? (computed <= value) : (computed < value))) {
  5482. low = mid + 1;
  5483. } else {
  5484. high = mid;
  5485. }
  5486. }
  5487. return high;
  5488. }
  5489. return baseSortedIndexBy(array, value, identity, retHighest);
  5490. }
  5491. /**
  5492. * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
  5493. * which invokes `iteratee` for `value` and each element of `array` to compute
  5494. * their sort ranking. The iteratee is invoked with one argument; (value).
  5495. *
  5496. * @private
  5497. * @param {Array} array The sorted array to inspect.
  5498. * @param {*} value The value to evaluate.
  5499. * @param {Function} iteratee The iteratee invoked per element.
  5500. * @param {boolean} [retHighest] Specify returning the highest qualified index.
  5501. * @returns {number} Returns the index at which `value` should be inserted
  5502. * into `array`.
  5503. */
  5504. function baseSortedIndexBy(array, value, iteratee, retHighest) {
  5505. var low = 0,
  5506. high = array == null ? 0 : array.length;
  5507. if (high === 0) {
  5508. return 0;
  5509. }
  5510. value = iteratee(value);
  5511. var valIsNaN = value !== value,
  5512. valIsNull = value === null,
  5513. valIsSymbol = isSymbol(value),
  5514. valIsUndefined = value === undefined;
  5515. while (low < high) {
  5516. var mid = nativeFloor((low + high) / 2),
  5517. computed = iteratee(array[mid]),
  5518. othIsDefined = computed !== undefined,
  5519. othIsNull = computed === null,
  5520. othIsReflexive = computed === computed,
  5521. othIsSymbol = isSymbol(computed);
  5522. if (valIsNaN) {
  5523. var setLow = retHighest || othIsReflexive;
  5524. } else if (valIsUndefined) {
  5525. setLow = othIsReflexive && (retHighest || othIsDefined);
  5526. } else if (valIsNull) {
  5527. setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
  5528. } else if (valIsSymbol) {
  5529. setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
  5530. } else if (othIsNull || othIsSymbol) {
  5531. setLow = false;
  5532. } else {
  5533. setLow = retHighest ? (computed <= value) : (computed < value);
  5534. }
  5535. if (setLow) {
  5536. low = mid + 1;
  5537. } else {
  5538. high = mid;
  5539. }
  5540. }
  5541. return nativeMin(high, MAX_ARRAY_INDEX);
  5542. }
  5543. /**
  5544. * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
  5545. * support for iteratee shorthands.
  5546. *
  5547. * @private
  5548. * @param {Array} array The array to inspect.
  5549. * @param {Function} [iteratee] The iteratee invoked per element.
  5550. * @returns {Array} Returns the new duplicate free array.
  5551. */
  5552. function baseSortedUniq(array, iteratee) {
  5553. var index = -1,
  5554. length = array.length,
  5555. resIndex = 0,
  5556. result = [];
  5557. while (++index < length) {
  5558. var value = array[index],
  5559. computed = iteratee ? iteratee(value) : value;
  5560. if (!index || !eq(computed, seen)) {
  5561. var seen = computed;
  5562. result[resIndex++] = value === 0 ? 0 : value;
  5563. }
  5564. }
  5565. return result;
  5566. }
  5567. /**
  5568. * The base implementation of `_.toNumber` which doesn't ensure correct
  5569. * conversions of binary, hexadecimal, or octal string values.
  5570. *
  5571. * @private
  5572. * @param {*} value The value to process.
  5573. * @returns {number} Returns the number.
  5574. */
  5575. function baseToNumber(value) {
  5576. if (typeof value == 'number') {
  5577. return value;
  5578. }
  5579. if (isSymbol(value)) {
  5580. return NAN;
  5581. }
  5582. return +value;
  5583. }
  5584. /**
  5585. * The base implementation of `_.toString` which doesn't convert nullish
  5586. * values to empty strings.
  5587. *
  5588. * @private
  5589. * @param {*} value The value to process.
  5590. * @returns {string} Returns the string.
  5591. */
  5592. function baseToString(value) {
  5593. // Exit early for strings to avoid a performance hit in some environments.
  5594. if (typeof value == 'string') {
  5595. return value;
  5596. }
  5597. if (isArray(value)) {
  5598. // Recursively convert values (susceptible to call stack limits).
  5599. return arrayMap(value, baseToString) + '';
  5600. }
  5601. if (isSymbol(value)) {
  5602. return symbolToString ? symbolToString.call(value) : '';
  5603. }
  5604. var result = (value + '');
  5605. return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
  5606. }
  5607. /**
  5608. * The base implementation of `_.uniqBy` without support for iteratee shorthands.
  5609. *
  5610. * @private
  5611. * @param {Array} array The array to inspect.
  5612. * @param {Function} [iteratee] The iteratee invoked per element.
  5613. * @param {Function} [comparator] The comparator invoked per element.
  5614. * @returns {Array} Returns the new duplicate free array.
  5615. */
  5616. function baseUniq(array, iteratee, comparator) {
  5617. var index = -1,
  5618. includes = arrayIncludes,
  5619. length = array.length,
  5620. isCommon = true,
  5621. result = [],
  5622. seen = result;
  5623. if (comparator) {
  5624. isCommon = false;
  5625. includes = arrayIncludesWith;
  5626. }
  5627. else if (length >= LARGE_ARRAY_SIZE) {
  5628. var set = iteratee ? null : createSet(array);
  5629. if (set) {
  5630. return setToArray(set);
  5631. }
  5632. isCommon = false;
  5633. includes = cacheHas;
  5634. seen = new SetCache;
  5635. }
  5636. else {
  5637. seen = iteratee ? [] : result;
  5638. }
  5639. outer:
  5640. while (++index < length) {
  5641. var value = array[index],
  5642. computed = iteratee ? iteratee(value) : value;
  5643. value = (comparator || value !== 0) ? value : 0;
  5644. if (isCommon && computed === computed) {
  5645. var seenIndex = seen.length;
  5646. while (seenIndex--) {
  5647. if (seen[seenIndex] === computed) {
  5648. continue outer;
  5649. }
  5650. }
  5651. if (iteratee) {
  5652. seen.push(computed);
  5653. }
  5654. result.push(value);
  5655. }
  5656. else if (!includes(seen, computed, comparator)) {
  5657. if (seen !== result) {
  5658. seen.push(computed);
  5659. }
  5660. result.push(value);
  5661. }
  5662. }
  5663. return result;
  5664. }
  5665. /**
  5666. * The base implementation of `_.unset`.
  5667. *
  5668. * @private
  5669. * @param {Object} object The object to modify.
  5670. * @param {Array|string} path The property path to unset.
  5671. * @returns {boolean} Returns `true` if the property is deleted, else `false`.
  5672. */
  5673. function baseUnset(object, path) {
  5674. path = castPath(path, object);
  5675. object = parent(object, path);
  5676. return object == null || delete object[toKey(last(path))];
  5677. }
  5678. /**
  5679. * The base implementation of `_.update`.
  5680. *
  5681. * @private
  5682. * @param {Object} object The object to modify.
  5683. * @param {Array|string} path The path of the property to update.
  5684. * @param {Function} updater The function to produce the updated value.
  5685. * @param {Function} [customizer] The function to customize path creation.
  5686. * @returns {Object} Returns `object`.
  5687. */
  5688. function baseUpdate(object, path, updater, customizer) {
  5689. return baseSet(object, path, updater(baseGet(object, path)), customizer);
  5690. }
  5691. /**
  5692. * The base implementation of methods like `_.dropWhile` and `_.takeWhile`
  5693. * without support for iteratee shorthands.
  5694. *
  5695. * @private
  5696. * @param {Array} array The array to query.
  5697. * @param {Function} predicate The function invoked per iteration.
  5698. * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
  5699. * @param {boolean} [fromRight] Specify iterating from right to left.
  5700. * @returns {Array} Returns the slice of `array`.
  5701. */
  5702. function baseWhile(array, predicate, isDrop, fromRight) {
  5703. var length = array.length,
  5704. index = fromRight ? length : -1;
  5705. while ((fromRight ? index-- : ++index < length) &&
  5706. predicate(array[index], index, array)) {}
  5707. return isDrop
  5708. ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
  5709. : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
  5710. }
  5711. /**
  5712. * The base implementation of `wrapperValue` which returns the result of
  5713. * performing a sequence of actions on the unwrapped `value`, where each
  5714. * successive action is supplied the return value of the previous.
  5715. *
  5716. * @private
  5717. * @param {*} value The unwrapped value.
  5718. * @param {Array} actions Actions to perform to resolve the unwrapped value.
  5719. * @returns {*} Returns the resolved value.
  5720. */
  5721. function baseWrapperValue(value, actions) {
  5722. var result = value;
  5723. if (result instanceof LazyWrapper) {
  5724. result = result.value();
  5725. }
  5726. return arrayReduce(actions, function(result, action) {
  5727. return action.func.apply(action.thisArg, arrayPush([result], action.args));
  5728. }, result);
  5729. }
  5730. /**
  5731. * The base implementation of methods like `_.xor`, without support for
  5732. * iteratee shorthands, that accepts an array of arrays to inspect.
  5733. *
  5734. * @private
  5735. * @param {Array} arrays The arrays to inspect.
  5736. * @param {Function} [iteratee] The iteratee invoked per element.
  5737. * @param {Function} [comparator] The comparator invoked per element.
  5738. * @returns {Array} Returns the new array of values.
  5739. */
  5740. function baseXor(arrays, iteratee, comparator) {
  5741. var length = arrays.length;
  5742. if (length < 2) {
  5743. return length ? baseUniq(arrays[0]) : [];
  5744. }
  5745. var index = -1,
  5746. result = Array(length);
  5747. while (++index < length) {
  5748. var array = arrays[index],
  5749. othIndex = -1;
  5750. while (++othIndex < length) {
  5751. if (othIndex != index) {
  5752. result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
  5753. }
  5754. }
  5755. }
  5756. return baseUniq(baseFlatten(result, 1), iteratee, comparator);
  5757. }
  5758. /**
  5759. * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
  5760. *
  5761. * @private
  5762. * @param {Array} props The property identifiers.
  5763. * @param {Array} values The property values.
  5764. * @param {Function} assignFunc The function to assign values.
  5765. * @returns {Object} Returns the new object.
  5766. */
  5767. function baseZipObject(props, values, assignFunc) {
  5768. var index = -1,
  5769. length = props.length,
  5770. valsLength = values.length,
  5771. result = {};
  5772. while (++index < length) {
  5773. var value = index < valsLength ? values[index] : undefined;
  5774. assignFunc(result, props[index], value);
  5775. }
  5776. return result;
  5777. }
  5778. /**
  5779. * Casts `value` to an empty array if it's not an array like object.
  5780. *
  5781. * @private
  5782. * @param {*} value The value to inspect.
  5783. * @returns {Array|Object} Returns the cast array-like object.
  5784. */
  5785. function castArrayLikeObject(value) {
  5786. return isArrayLikeObject(value) ? value : [];
  5787. }
  5788. /**
  5789. * Casts `value` to `identity` if it's not a function.
  5790. *
  5791. * @private
  5792. * @param {*} value The value to inspect.
  5793. * @returns {Function} Returns cast function.
  5794. */
  5795. function castFunction(value) {
  5796. return typeof value == 'function' ? value : identity;
  5797. }
  5798. /**
  5799. * Casts `value` to a path array if it's not one.
  5800. *
  5801. * @private
  5802. * @param {*} value The value to inspect.
  5803. * @param {Object} [object] The object to query keys on.
  5804. * @returns {Array} Returns the cast property path array.
  5805. */
  5806. function castPath(value, object) {
  5807. if (isArray(value)) {
  5808. return value;
  5809. }
  5810. return isKey(value, object) ? [value] : stringToPath(toString(value));
  5811. }
  5812. /**
  5813. * A `baseRest` alias which can be replaced with `identity` by module
  5814. * replacement plugins.
  5815. *
  5816. * @private
  5817. * @type {Function}
  5818. * @param {Function} func The function to apply a rest parameter to.
  5819. * @returns {Function} Returns the new function.
  5820. */
  5821. var castRest = baseRest;
  5822. /**
  5823. * Casts `array` to a slice if it's needed.
  5824. *
  5825. * @private
  5826. * @param {Array} array The array to inspect.
  5827. * @param {number} start The start position.
  5828. * @param {number} [end=array.length] The end position.
  5829. * @returns {Array} Returns the cast slice.
  5830. */
  5831. function castSlice(array, start, end) {
  5832. var length = array.length;
  5833. end = end === undefined ? length : end;
  5834. return (!start && end >= length) ? array : baseSlice(array, start, end);
  5835. }
  5836. /**
  5837. * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).
  5838. *
  5839. * @private
  5840. * @param {number|Object} id The timer id or timeout object of the timer to clear.
  5841. */
  5842. var clearTimeout = ctxClearTimeout || function(id) {
  5843. return root.clearTimeout(id);
  5844. };
  5845. /**
  5846. * Creates a clone of `buffer`.
  5847. *
  5848. * @private
  5849. * @param {Buffer} buffer The buffer to clone.
  5850. * @param {boolean} [isDeep] Specify a deep clone.
  5851. * @returns {Buffer} Returns the cloned buffer.
  5852. */
  5853. function cloneBuffer(buffer, isDeep) {
  5854. if (isDeep) {
  5855. return buffer.slice();
  5856. }
  5857. var length = buffer.length,
  5858. result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
  5859. buffer.copy(result);
  5860. return result;
  5861. }
  5862. /**
  5863. * Creates a clone of `arrayBuffer`.
  5864. *
  5865. * @private
  5866. * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
  5867. * @returns {ArrayBuffer} Returns the cloned array buffer.
  5868. */
  5869. function cloneArrayBuffer(arrayBuffer) {
  5870. var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
  5871. new Uint8Array(result).set(new Uint8Array(arrayBuffer));
  5872. return result;
  5873. }
  5874. /**
  5875. * Creates a clone of `dataView`.
  5876. *
  5877. * @private
  5878. * @param {Object} dataView The data view to clone.
  5879. * @param {boolean} [isDeep] Specify a deep clone.
  5880. * @returns {Object} Returns the cloned data view.
  5881. */
  5882. function cloneDataView(dataView, isDeep) {
  5883. var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
  5884. return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
  5885. }
  5886. /**
  5887. * Creates a clone of `regexp`.
  5888. *
  5889. * @private
  5890. * @param {Object} regexp The regexp to clone.
  5891. * @returns {Object} Returns the cloned regexp.
  5892. */
  5893. function cloneRegExp(regexp) {
  5894. var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
  5895. result.lastIndex = regexp.lastIndex;
  5896. return result;
  5897. }
  5898. /**
  5899. * Creates a clone of the `symbol` object.
  5900. *
  5901. * @private
  5902. * @param {Object} symbol The symbol object to clone.
  5903. * @returns {Object} Returns the cloned symbol object.
  5904. */
  5905. function cloneSymbol(symbol) {
  5906. return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
  5907. }
  5908. /**
  5909. * Creates a clone of `typedArray`.
  5910. *
  5911. * @private
  5912. * @param {Object} typedArray The typed array to clone.
  5913. * @param {boolean} [isDeep] Specify a deep clone.
  5914. * @returns {Object} Returns the cloned typed array.
  5915. */
  5916. function cloneTypedArray(typedArray, isDeep) {
  5917. var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
  5918. return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
  5919. }
  5920. /**
  5921. * Compares values to sort them in ascending order.
  5922. *
  5923. * @private
  5924. * @param {*} value The value to compare.
  5925. * @param {*} other The other value to compare.
  5926. * @returns {number} Returns the sort order indicator for `value`.
  5927. */
  5928. function compareAscending(value, other) {
  5929. if (value !== other) {
  5930. var valIsDefined = value !== undefined,
  5931. valIsNull = value === null,
  5932. valIsReflexive = value === value,
  5933. valIsSymbol = isSymbol(value);
  5934. var othIsDefined = other !== undefined,
  5935. othIsNull = other === null,
  5936. othIsReflexive = other === other,
  5937. othIsSymbol = isSymbol(other);
  5938. if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
  5939. (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
  5940. (valIsNull && othIsDefined && othIsReflexive) ||
  5941. (!valIsDefined && othIsReflexive) ||
  5942. !valIsReflexive) {
  5943. return 1;
  5944. }
  5945. if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
  5946. (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
  5947. (othIsNull && valIsDefined && valIsReflexive) ||
  5948. (!othIsDefined && valIsReflexive) ||
  5949. !othIsReflexive) {
  5950. return -1;
  5951. }
  5952. }
  5953. return 0;
  5954. }
  5955. /**
  5956. * Used by `_.orderBy` to compare multiple properties of a value to another
  5957. * and stable sort them.
  5958. *
  5959. * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
  5960. * specify an order of "desc" for descending or "asc" for ascending sort order
  5961. * of corresponding values.
  5962. *
  5963. * @private
  5964. * @param {Object} object The object to compare.
  5965. * @param {Object} other The other object to compare.
  5966. * @param {boolean[]|string[]} orders The order to sort by for each property.
  5967. * @returns {number} Returns the sort order indicator for `object`.
  5968. */
  5969. function compareMultiple(object, other, orders) {
  5970. var index = -1,
  5971. objCriteria = object.criteria,
  5972. othCriteria = other.criteria,
  5973. length = objCriteria.length,
  5974. ordersLength = orders.length;
  5975. while (++index < length) {
  5976. var result = compareAscending(objCriteria[index], othCriteria[index]);
  5977. if (result) {
  5978. if (index >= ordersLength) {
  5979. return result;
  5980. }
  5981. var order = orders[index];
  5982. return result * (order == 'desc' ? -1 : 1);
  5983. }
  5984. }
  5985. // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
  5986. // that causes it, under certain circumstances, to provide the same value for
  5987. // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
  5988. // for more details.
  5989. //
  5990. // This also ensures a stable sort in V8 and other engines.
  5991. // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
  5992. return object.index - other.index;
  5993. }
  5994. /**
  5995. * Creates an array that is the composition of partially applied arguments,
  5996. * placeholders, and provided arguments into a single array of arguments.
  5997. *
  5998. * @private
  5999. * @param {Array} args The provided arguments.
  6000. * @param {Array} partials The arguments to prepend to those provided.
  6001. * @param {Array} holders The `partials` placeholder indexes.
  6002. * @params {boolean} [isCurried] Specify composing for a curried function.
  6003. * @returns {Array} Returns the new array of composed arguments.
  6004. */
  6005. function composeArgs(args, partials, holders, isCurried) {
  6006. var argsIndex = -1,
  6007. argsLength = args.length,
  6008. holdersLength = holders.length,
  6009. leftIndex = -1,
  6010. leftLength = partials.length,
  6011. rangeLength = nativeMax(argsLength - holdersLength, 0),
  6012. result = Array(leftLength + rangeLength),
  6013. isUncurried = !isCurried;
  6014. while (++leftIndex < leftLength) {
  6015. result[leftIndex] = partials[leftIndex];
  6016. }
  6017. while (++argsIndex < holdersLength) {
  6018. if (isUncurried || argsIndex < argsLength) {
  6019. result[holders[argsIndex]] = args[argsIndex];
  6020. }
  6021. }
  6022. while (rangeLength--) {
  6023. result[leftIndex++] = args[argsIndex++];
  6024. }
  6025. return result;
  6026. }
  6027. /**
  6028. * This function is like `composeArgs` except that the arguments composition
  6029. * is tailored for `_.partialRight`.
  6030. *
  6031. * @private
  6032. * @param {Array} args The provided arguments.
  6033. * @param {Array} partials The arguments to append to those provided.
  6034. * @param {Array} holders The `partials` placeholder indexes.
  6035. * @params {boolean} [isCurried] Specify composing for a curried function.
  6036. * @returns {Array} Returns the new array of composed arguments.
  6037. */
  6038. function composeArgsRight(args, partials, holders, isCurried) {
  6039. var argsIndex = -1,
  6040. argsLength = args.length,
  6041. holdersIndex = -1,
  6042. holdersLength = holders.length,
  6043. rightIndex = -1,
  6044. rightLength = partials.length,
  6045. rangeLength = nativeMax(argsLength - holdersLength, 0),
  6046. result = Array(rangeLength + rightLength),
  6047. isUncurried = !isCurried;
  6048. while (++argsIndex < rangeLength) {
  6049. result[argsIndex] = args[argsIndex];
  6050. }
  6051. var offset = argsIndex;
  6052. while (++rightIndex < rightLength) {
  6053. result[offset + rightIndex] = partials[rightIndex];
  6054. }
  6055. while (++holdersIndex < holdersLength) {
  6056. if (isUncurried || argsIndex < argsLength) {
  6057. result[offset + holders[holdersIndex]] = args[argsIndex++];
  6058. }
  6059. }
  6060. return result;
  6061. }
  6062. /**
  6063. * Copies the values of `source` to `array`.
  6064. *
  6065. * @private
  6066. * @param {Array} source The array to copy values from.
  6067. * @param {Array} [array=[]] The array to copy values to.
  6068. * @returns {Array} Returns `array`.
  6069. */
  6070. function copyArray(source, array) {
  6071. var index = -1,
  6072. length = source.length;
  6073. array || (array = Array(length));
  6074. while (++index < length) {
  6075. array[index] = source[index];
  6076. }
  6077. return array;
  6078. }
  6079. /**
  6080. * Copies properties of `source` to `object`.
  6081. *
  6082. * @private
  6083. * @param {Object} source The object to copy properties from.
  6084. * @param {Array} props The property identifiers to copy.
  6085. * @param {Object} [object={}] The object to copy properties to.
  6086. * @param {Function} [customizer] The function to customize copied values.
  6087. * @returns {Object} Returns `object`.
  6088. */
  6089. function copyObject(source, props, object, customizer) {
  6090. var isNew = !object;
  6091. object || (object = {});
  6092. var index = -1,
  6093. length = props.length;
  6094. while (++index < length) {
  6095. var key = props[index];
  6096. var newValue = customizer
  6097. ? customizer(object[key], source[key], key, object, source)
  6098. : undefined;
  6099. if (newValue === undefined) {
  6100. newValue = source[key];
  6101. }
  6102. if (isNew) {
  6103. baseAssignValue(object, key, newValue);
  6104. } else {
  6105. assignValue(object, key, newValue);
  6106. }
  6107. }
  6108. return object;
  6109. }
  6110. /**
  6111. * Copies own symbols of `source` to `object`.
  6112. *
  6113. * @private
  6114. * @param {Object} source The object to copy symbols from.
  6115. * @param {Object} [object={}] The object to copy symbols to.
  6116. * @returns {Object} Returns `object`.
  6117. */
  6118. function copySymbols(source, object) {
  6119. return copyObject(source, getSymbols(source), object);
  6120. }
  6121. /**
  6122. * Copies own and inherited symbols of `source` to `object`.
  6123. *
  6124. * @private
  6125. * @param {Object} source The object to copy symbols from.
  6126. * @param {Object} [object={}] The object to copy symbols to.
  6127. * @returns {Object} Returns `object`.
  6128. */
  6129. function copySymbolsIn(source, object) {
  6130. return copyObject(source, getSymbolsIn(source), object);
  6131. }
  6132. /**
  6133. * Creates a function like `_.groupBy`.
  6134. *
  6135. * @private
  6136. * @param {Function} setter The function to set accumulator values.
  6137. * @param {Function} [initializer] The accumulator object initializer.
  6138. * @returns {Function} Returns the new aggregator function.
  6139. */
  6140. function createAggregator(setter, initializer) {
  6141. return function(collection, iteratee) {
  6142. var func = isArray(collection) ? arrayAggregator : baseAggregator,
  6143. accumulator = initializer ? initializer() : {};
  6144. return func(collection, setter, getIteratee(iteratee, 2), accumulator);
  6145. };
  6146. }
  6147. /**
  6148. * Creates a function like `_.assign`.
  6149. *
  6150. * @private
  6151. * @param {Function} assigner The function to assign values.
  6152. * @returns {Function} Returns the new assigner function.
  6153. */
  6154. function createAssigner(assigner) {
  6155. return baseRest(function(object, sources) {
  6156. var index = -1,
  6157. length = sources.length,
  6158. customizer = length > 1 ? sources[length - 1] : undefined,
  6159. guard = length > 2 ? sources[2] : undefined;
  6160. customizer = (assigner.length > 3 && typeof customizer == 'function')
  6161. ? (length--, customizer)
  6162. : undefined;
  6163. if (guard && isIterateeCall(sources[0], sources[1], guard)) {
  6164. customizer = length < 3 ? undefined : customizer;
  6165. length = 1;
  6166. }
  6167. object = Object(object);
  6168. while (++index < length) {
  6169. var source = sources[index];
  6170. if (source) {
  6171. assigner(object, source, index, customizer);
  6172. }
  6173. }
  6174. return object;
  6175. });
  6176. }
  6177. /**
  6178. * Creates a `baseEach` or `baseEachRight` function.
  6179. *
  6180. * @private
  6181. * @param {Function} eachFunc The function to iterate over a collection.
  6182. * @param {boolean} [fromRight] Specify iterating from right to left.
  6183. * @returns {Function} Returns the new base function.
  6184. */
  6185. function createBaseEach(eachFunc, fromRight) {
  6186. return function(collection, iteratee) {
  6187. if (collection == null) {
  6188. return collection;
  6189. }
  6190. if (!isArrayLike(collection)) {
  6191. return eachFunc(collection, iteratee);
  6192. }
  6193. var length = collection.length,
  6194. index = fromRight ? length : -1,
  6195. iterable = Object(collection);
  6196. while ((fromRight ? index-- : ++index < length)) {
  6197. if (iteratee(iterable[index], index, iterable) === false) {
  6198. break;
  6199. }
  6200. }
  6201. return collection;
  6202. };
  6203. }
  6204. /**
  6205. * Creates a base function for methods like `_.forIn` and `_.forOwn`.
  6206. *
  6207. * @private
  6208. * @param {boolean} [fromRight] Specify iterating from right to left.
  6209. * @returns {Function} Returns the new base function.
  6210. */
  6211. function createBaseFor(fromRight) {
  6212. return function(object, iteratee, keysFunc) {
  6213. var index = -1,
  6214. iterable = Object(object),
  6215. props = keysFunc(object),
  6216. length = props.length;
  6217. while (length--) {
  6218. var key = props[fromRight ? length : ++index];
  6219. if (iteratee(iterable[key], key, iterable) === false) {
  6220. break;
  6221. }
  6222. }
  6223. return object;
  6224. };
  6225. }
  6226. /**
  6227. * Creates a function that wraps `func` to invoke it with the optional `this`
  6228. * binding of `thisArg`.
  6229. *
  6230. * @private
  6231. * @param {Function} func The function to wrap.
  6232. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  6233. * @param {*} [thisArg] The `this` binding of `func`.
  6234. * @returns {Function} Returns the new wrapped function.
  6235. */
  6236. function createBind(func, bitmask, thisArg) {
  6237. var isBind = bitmask & WRAP_BIND_FLAG,
  6238. Ctor = createCtor(func);
  6239. function wrapper() {
  6240. var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
  6241. return fn.apply(isBind ? thisArg : this, arguments);
  6242. }
  6243. return wrapper;
  6244. }
  6245. /**
  6246. * Creates a function like `_.lowerFirst`.
  6247. *
  6248. * @private
  6249. * @param {string} methodName The name of the `String` case method to use.
  6250. * @returns {Function} Returns the new case function.
  6251. */
  6252. function createCaseFirst(methodName) {
  6253. return function(string) {
  6254. string = toString(string);
  6255. var strSymbols = hasUnicode(string)
  6256. ? stringToArray(string)
  6257. : undefined;
  6258. var chr = strSymbols
  6259. ? strSymbols[0]
  6260. : string.charAt(0);
  6261. var trailing = strSymbols
  6262. ? castSlice(strSymbols, 1).join('')
  6263. : string.slice(1);
  6264. return chr[methodName]() + trailing;
  6265. };
  6266. }
  6267. /**
  6268. * Creates a function like `_.camelCase`.
  6269. *
  6270. * @private
  6271. * @param {Function} callback The function to combine each word.
  6272. * @returns {Function} Returns the new compounder function.
  6273. */
  6274. function createCompounder(callback) {
  6275. return function(string) {
  6276. return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
  6277. };
  6278. }
  6279. /**
  6280. * Creates a function that produces an instance of `Ctor` regardless of
  6281. * whether it was invoked as part of a `new` expression or by `call` or `apply`.
  6282. *
  6283. * @private
  6284. * @param {Function} Ctor The constructor to wrap.
  6285. * @returns {Function} Returns the new wrapped function.
  6286. */
  6287. function createCtor(Ctor) {
  6288. return function() {
  6289. // Use a `switch` statement to work with class constructors. See
  6290. // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
  6291. // for more details.
  6292. var args = arguments;
  6293. switch (args.length) {
  6294. case 0: return new Ctor;
  6295. case 1: return new Ctor(args[0]);
  6296. case 2: return new Ctor(args[0], args[1]);
  6297. case 3: return new Ctor(args[0], args[1], args[2]);
  6298. case 4: return new Ctor(args[0], args[1], args[2], args[3]);
  6299. case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
  6300. case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
  6301. case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
  6302. }
  6303. var thisBinding = baseCreate(Ctor.prototype),
  6304. result = Ctor.apply(thisBinding, args);
  6305. // Mimic the constructor's `return` behavior.
  6306. // See https://es5.github.io/#x13.2.2 for more details.
  6307. return isObject(result) ? result : thisBinding;
  6308. };
  6309. }
  6310. /**
  6311. * Creates a function that wraps `func` to enable currying.
  6312. *
  6313. * @private
  6314. * @param {Function} func The function to wrap.
  6315. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  6316. * @param {number} arity The arity of `func`.
  6317. * @returns {Function} Returns the new wrapped function.
  6318. */
  6319. function createCurry(func, bitmask, arity) {
  6320. var Ctor = createCtor(func);
  6321. function wrapper() {
  6322. var length = arguments.length,
  6323. args = Array(length),
  6324. index = length,
  6325. placeholder = getHolder(wrapper);
  6326. while (index--) {
  6327. args[index] = arguments[index];
  6328. }
  6329. var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
  6330. ? []
  6331. : replaceHolders(args, placeholder);
  6332. length -= holders.length;
  6333. if (length < arity) {
  6334. return createRecurry(
  6335. func, bitmask, createHybrid, wrapper.placeholder, undefined,
  6336. args, holders, undefined, undefined, arity - length);
  6337. }
  6338. var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
  6339. return apply(fn, this, args);
  6340. }
  6341. return wrapper;
  6342. }
  6343. /**
  6344. * Creates a `_.find` or `_.findLast` function.
  6345. *
  6346. * @private
  6347. * @param {Function} findIndexFunc The function to find the collection index.
  6348. * @returns {Function} Returns the new find function.
  6349. */
  6350. function createFind(findIndexFunc) {
  6351. return function(collection, predicate, fromIndex) {
  6352. var iterable = Object(collection);
  6353. if (!isArrayLike(collection)) {
  6354. var iteratee = getIteratee(predicate, 3);
  6355. collection = keys(collection);
  6356. predicate = function(key) { return iteratee(iterable[key], key, iterable); };
  6357. }
  6358. var index = findIndexFunc(collection, predicate, fromIndex);
  6359. return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
  6360. };
  6361. }
  6362. /**
  6363. * Creates a `_.flow` or `_.flowRight` function.
  6364. *
  6365. * @private
  6366. * @param {boolean} [fromRight] Specify iterating from right to left.
  6367. * @returns {Function} Returns the new flow function.
  6368. */
  6369. function createFlow(fromRight) {
  6370. return flatRest(function(funcs) {
  6371. var length = funcs.length,
  6372. index = length,
  6373. prereq = LodashWrapper.prototype.thru;
  6374. if (fromRight) {
  6375. funcs.reverse();
  6376. }
  6377. while (index--) {
  6378. var func = funcs[index];
  6379. if (typeof func != 'function') {
  6380. throw new TypeError(FUNC_ERROR_TEXT);
  6381. }
  6382. if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
  6383. var wrapper = new LodashWrapper([], true);
  6384. }
  6385. }
  6386. index = wrapper ? index : length;
  6387. while (++index < length) {
  6388. func = funcs[index];
  6389. var funcName = getFuncName(func),
  6390. data = funcName == 'wrapper' ? getData(func) : undefined;
  6391. if (data && isLaziable(data[0]) &&
  6392. data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
  6393. !data[4].length && data[9] == 1
  6394. ) {
  6395. wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
  6396. } else {
  6397. wrapper = (func.length == 1 && isLaziable(func))
  6398. ? wrapper[funcName]()
  6399. : wrapper.thru(func);
  6400. }
  6401. }
  6402. return function() {
  6403. var args = arguments,
  6404. value = args[0];
  6405. if (wrapper && args.length == 1 && isArray(value)) {
  6406. return wrapper.plant(value).value();
  6407. }
  6408. var index = 0,
  6409. result = length ? funcs[index].apply(this, args) : value;
  6410. while (++index < length) {
  6411. result = funcs[index].call(this, result);
  6412. }
  6413. return result;
  6414. };
  6415. });
  6416. }
  6417. /**
  6418. * Creates a function that wraps `func` to invoke it with optional `this`
  6419. * binding of `thisArg`, partial application, and currying.
  6420. *
  6421. * @private
  6422. * @param {Function|string} func The function or method name to wrap.
  6423. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  6424. * @param {*} [thisArg] The `this` binding of `func`.
  6425. * @param {Array} [partials] The arguments to prepend to those provided to
  6426. * the new function.
  6427. * @param {Array} [holders] The `partials` placeholder indexes.
  6428. * @param {Array} [partialsRight] The arguments to append to those provided
  6429. * to the new function.
  6430. * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
  6431. * @param {Array} [argPos] The argument positions of the new function.
  6432. * @param {number} [ary] The arity cap of `func`.
  6433. * @param {number} [arity] The arity of `func`.
  6434. * @returns {Function} Returns the new wrapped function.
  6435. */
  6436. function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
  6437. var isAry = bitmask & WRAP_ARY_FLAG,
  6438. isBind = bitmask & WRAP_BIND_FLAG,
  6439. isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
  6440. isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
  6441. isFlip = bitmask & WRAP_FLIP_FLAG,
  6442. Ctor = isBindKey ? undefined : createCtor(func);
  6443. function wrapper() {
  6444. var length = arguments.length,
  6445. args = Array(length),
  6446. index = length;
  6447. while (index--) {
  6448. args[index] = arguments[index];
  6449. }
  6450. if (isCurried) {
  6451. var placeholder = getHolder(wrapper),
  6452. holdersCount = countHolders(args, placeholder);
  6453. }
  6454. if (partials) {
  6455. args = composeArgs(args, partials, holders, isCurried);
  6456. }
  6457. if (partialsRight) {
  6458. args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
  6459. }
  6460. length -= holdersCount;
  6461. if (isCurried && length < arity) {
  6462. var newHolders = replaceHolders(args, placeholder);
  6463. return createRecurry(
  6464. func, bitmask, createHybrid, wrapper.placeholder, thisArg,
  6465. args, newHolders, argPos, ary, arity - length
  6466. );
  6467. }
  6468. var thisBinding = isBind ? thisArg : this,
  6469. fn = isBindKey ? thisBinding[func] : func;
  6470. length = args.length;
  6471. if (argPos) {
  6472. args = reorder(args, argPos);
  6473. } else if (isFlip && length > 1) {
  6474. args.reverse();
  6475. }
  6476. if (isAry && ary < length) {
  6477. args.length = ary;
  6478. }
  6479. if (this && this !== root && this instanceof wrapper) {
  6480. fn = Ctor || createCtor(fn);
  6481. }
  6482. return fn.apply(thisBinding, args);
  6483. }
  6484. return wrapper;
  6485. }
  6486. /**
  6487. * Creates a function like `_.invertBy`.
  6488. *
  6489. * @private
  6490. * @param {Function} setter The function to set accumulator values.
  6491. * @param {Function} toIteratee The function to resolve iteratees.
  6492. * @returns {Function} Returns the new inverter function.
  6493. */
  6494. function createInverter(setter, toIteratee) {
  6495. return function(object, iteratee) {
  6496. return baseInverter(object, setter, toIteratee(iteratee), {});
  6497. };
  6498. }
  6499. /**
  6500. * Creates a function that performs a mathematical operation on two values.
  6501. *
  6502. * @private
  6503. * @param {Function} operator The function to perform the operation.
  6504. * @param {number} [defaultValue] The value used for `undefined` arguments.
  6505. * @returns {Function} Returns the new mathematical operation function.
  6506. */
  6507. function createMathOperation(operator, defaultValue) {
  6508. return function(value, other) {
  6509. var result;
  6510. if (value === undefined && other === undefined) {
  6511. return defaultValue;
  6512. }
  6513. if (value !== undefined) {
  6514. result = value;
  6515. }
  6516. if (other !== undefined) {
  6517. if (result === undefined) {
  6518. return other;
  6519. }
  6520. if (typeof value == 'string' || typeof other == 'string') {
  6521. value = baseToString(value);
  6522. other = baseToString(other);
  6523. } else {
  6524. value = baseToNumber(value);
  6525. other = baseToNumber(other);
  6526. }
  6527. result = operator(value, other);
  6528. }
  6529. return result;
  6530. };
  6531. }
  6532. /**
  6533. * Creates a function like `_.over`.
  6534. *
  6535. * @private
  6536. * @param {Function} arrayFunc The function to iterate over iteratees.
  6537. * @returns {Function} Returns the new over function.
  6538. */
  6539. function createOver(arrayFunc) {
  6540. return flatRest(function(iteratees) {
  6541. iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
  6542. return baseRest(function(args) {
  6543. var thisArg = this;
  6544. return arrayFunc(iteratees, function(iteratee) {
  6545. return apply(iteratee, thisArg, args);
  6546. });
  6547. });
  6548. });
  6549. }
  6550. /**
  6551. * Creates the padding for `string` based on `length`. The `chars` string
  6552. * is truncated if the number of characters exceeds `length`.
  6553. *
  6554. * @private
  6555. * @param {number} length The padding length.
  6556. * @param {string} [chars=' '] The string used as padding.
  6557. * @returns {string} Returns the padding for `string`.
  6558. */
  6559. function createPadding(length, chars) {
  6560. chars = chars === undefined ? ' ' : baseToString(chars);
  6561. var charsLength = chars.length;
  6562. if (charsLength < 2) {
  6563. return charsLength ? baseRepeat(chars, length) : chars;
  6564. }
  6565. var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
  6566. return hasUnicode(chars)
  6567. ? castSlice(stringToArray(result), 0, length).join('')
  6568. : result.slice(0, length);
  6569. }
  6570. /**
  6571. * Creates a function that wraps `func` to invoke it with the `this` binding
  6572. * of `thisArg` and `partials` prepended to the arguments it receives.
  6573. *
  6574. * @private
  6575. * @param {Function} func The function to wrap.
  6576. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  6577. * @param {*} thisArg The `this` binding of `func`.
  6578. * @param {Array} partials The arguments to prepend to those provided to
  6579. * the new function.
  6580. * @returns {Function} Returns the new wrapped function.
  6581. */
  6582. function createPartial(func, bitmask, thisArg, partials) {
  6583. var isBind = bitmask & WRAP_BIND_FLAG,
  6584. Ctor = createCtor(func);
  6585. function wrapper() {
  6586. var argsIndex = -1,
  6587. argsLength = arguments.length,
  6588. leftIndex = -1,
  6589. leftLength = partials.length,
  6590. args = Array(leftLength + argsLength),
  6591. fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
  6592. while (++leftIndex < leftLength) {
  6593. args[leftIndex] = partials[leftIndex];
  6594. }
  6595. while (argsLength--) {
  6596. args[leftIndex++] = arguments[++argsIndex];
  6597. }
  6598. return apply(fn, isBind ? thisArg : this, args);
  6599. }
  6600. return wrapper;
  6601. }
  6602. /**
  6603. * Creates a `_.range` or `_.rangeRight` function.
  6604. *
  6605. * @private
  6606. * @param {boolean} [fromRight] Specify iterating from right to left.
  6607. * @returns {Function} Returns the new range function.
  6608. */
  6609. function createRange(fromRight) {
  6610. return function(start, end, step) {
  6611. if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
  6612. end = step = undefined;
  6613. }
  6614. // Ensure the sign of `-0` is preserved.
  6615. start = toFinite(start);
  6616. if (end === undefined) {
  6617. end = start;
  6618. start = 0;
  6619. } else {
  6620. end = toFinite(end);
  6621. }
  6622. step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
  6623. return baseRange(start, end, step, fromRight);
  6624. };
  6625. }
  6626. /**
  6627. * Creates a function that performs a relational operation on two values.
  6628. *
  6629. * @private
  6630. * @param {Function} operator The function to perform the operation.
  6631. * @returns {Function} Returns the new relational operation function.
  6632. */
  6633. function createRelationalOperation(operator) {
  6634. return function(value, other) {
  6635. if (!(typeof value == 'string' && typeof other == 'string')) {
  6636. value = toNumber(value);
  6637. other = toNumber(other);
  6638. }
  6639. return operator(value, other);
  6640. };
  6641. }
  6642. /**
  6643. * Creates a function that wraps `func` to continue currying.
  6644. *
  6645. * @private
  6646. * @param {Function} func The function to wrap.
  6647. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  6648. * @param {Function} wrapFunc The function to create the `func` wrapper.
  6649. * @param {*} placeholder The placeholder value.
  6650. * @param {*} [thisArg] The `this` binding of `func`.
  6651. * @param {Array} [partials] The arguments to prepend to those provided to
  6652. * the new function.
  6653. * @param {Array} [holders] The `partials` placeholder indexes.
  6654. * @param {Array} [argPos] The argument positions of the new function.
  6655. * @param {number} [ary] The arity cap of `func`.
  6656. * @param {number} [arity] The arity of `func`.
  6657. * @returns {Function} Returns the new wrapped function.
  6658. */
  6659. function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
  6660. var isCurry = bitmask & WRAP_CURRY_FLAG,
  6661. newHolders = isCurry ? holders : undefined,
  6662. newHoldersRight = isCurry ? undefined : holders,
  6663. newPartials = isCurry ? partials : undefined,
  6664. newPartialsRight = isCurry ? undefined : partials;
  6665. bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
  6666. bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
  6667. if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
  6668. bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
  6669. }
  6670. var newData = [
  6671. func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
  6672. newHoldersRight, argPos, ary, arity
  6673. ];
  6674. var result = wrapFunc.apply(undefined, newData);
  6675. if (isLaziable(func)) {
  6676. setData(result, newData);
  6677. }
  6678. result.placeholder = placeholder;
  6679. return setWrapToString(result, func, bitmask);
  6680. }
  6681. /**
  6682. * Creates a function like `_.round`.
  6683. *
  6684. * @private
  6685. * @param {string} methodName The name of the `Math` method to use when rounding.
  6686. * @returns {Function} Returns the new round function.
  6687. */
  6688. function createRound(methodName) {
  6689. var func = Math[methodName];
  6690. return function(number, precision) {
  6691. number = toNumber(number);
  6692. precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
  6693. if (precision && nativeIsFinite(number)) {
  6694. // Shift with exponential notation to avoid floating-point issues.
  6695. // See [MDN](https://mdn.io/round#Examples) for more details.
  6696. var pair = (toString(number) + 'e').split('e'),
  6697. value = func(pair[0] + 'e' + (+pair[1] + precision));
  6698. pair = (toString(value) + 'e').split('e');
  6699. return +(pair[0] + 'e' + (+pair[1] - precision));
  6700. }
  6701. return func(number);
  6702. };
  6703. }
  6704. /**
  6705. * Creates a set object of `values`.
  6706. *
  6707. * @private
  6708. * @param {Array} values The values to add to the set.
  6709. * @returns {Object} Returns the new set.
  6710. */
  6711. var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
  6712. return new Set(values);
  6713. };
  6714. /**
  6715. * Creates a `_.toPairs` or `_.toPairsIn` function.
  6716. *
  6717. * @private
  6718. * @param {Function} keysFunc The function to get the keys of a given object.
  6719. * @returns {Function} Returns the new pairs function.
  6720. */
  6721. function createToPairs(keysFunc) {
  6722. return function(object) {
  6723. var tag = getTag(object);
  6724. if (tag == mapTag) {
  6725. return mapToArray(object);
  6726. }
  6727. if (tag == setTag) {
  6728. return setToPairs(object);
  6729. }
  6730. return baseToPairs(object, keysFunc(object));
  6731. };
  6732. }
  6733. /**
  6734. * Creates a function that either curries or invokes `func` with optional
  6735. * `this` binding and partially applied arguments.
  6736. *
  6737. * @private
  6738. * @param {Function|string} func The function or method name to wrap.
  6739. * @param {number} bitmask The bitmask flags.
  6740. * 1 - `_.bind`
  6741. * 2 - `_.bindKey`
  6742. * 4 - `_.curry` or `_.curryRight` of a bound function
  6743. * 8 - `_.curry`
  6744. * 16 - `_.curryRight`
  6745. * 32 - `_.partial`
  6746. * 64 - `_.partialRight`
  6747. * 128 - `_.rearg`
  6748. * 256 - `_.ary`
  6749. * 512 - `_.flip`
  6750. * @param {*} [thisArg] The `this` binding of `func`.
  6751. * @param {Array} [partials] The arguments to be partially applied.
  6752. * @param {Array} [holders] The `partials` placeholder indexes.
  6753. * @param {Array} [argPos] The argument positions of the new function.
  6754. * @param {number} [ary] The arity cap of `func`.
  6755. * @param {number} [arity] The arity of `func`.
  6756. * @returns {Function} Returns the new wrapped function.
  6757. */
  6758. function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
  6759. var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
  6760. if (!isBindKey && typeof func != 'function') {
  6761. throw new TypeError(FUNC_ERROR_TEXT);
  6762. }
  6763. var length = partials ? partials.length : 0;
  6764. if (!length) {
  6765. bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
  6766. partials = holders = undefined;
  6767. }
  6768. ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
  6769. arity = arity === undefined ? arity : toInteger(arity);
  6770. length -= holders ? holders.length : 0;
  6771. if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
  6772. var partialsRight = partials,
  6773. holdersRight = holders;
  6774. partials = holders = undefined;
  6775. }
  6776. var data = isBindKey ? undefined : getData(func);
  6777. var newData = [
  6778. func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
  6779. argPos, ary, arity
  6780. ];
  6781. if (data) {
  6782. mergeData(newData, data);
  6783. }
  6784. func = newData[0];
  6785. bitmask = newData[1];
  6786. thisArg = newData[2];
  6787. partials = newData[3];
  6788. holders = newData[4];
  6789. arity = newData[9] = newData[9] === undefined
  6790. ? (isBindKey ? 0 : func.length)
  6791. : nativeMax(newData[9] - length, 0);
  6792. if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
  6793. bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
  6794. }
  6795. if (!bitmask || bitmask == WRAP_BIND_FLAG) {
  6796. var result = createBind(func, bitmask, thisArg);
  6797. } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
  6798. result = createCurry(func, bitmask, arity);
  6799. } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
  6800. result = createPartial(func, bitmask, thisArg, partials);
  6801. } else {
  6802. result = createHybrid.apply(undefined, newData);
  6803. }
  6804. var setter = data ? baseSetData : setData;
  6805. return setWrapToString(setter(result, newData), func, bitmask);
  6806. }
  6807. /**
  6808. * Used by `_.defaults` to customize its `_.assignIn` use to assign properties
  6809. * of source objects to the destination object for all destination properties
  6810. * that resolve to `undefined`.
  6811. *
  6812. * @private
  6813. * @param {*} objValue The destination value.
  6814. * @param {*} srcValue The source value.
  6815. * @param {string} key The key of the property to assign.
  6816. * @param {Object} object The parent object of `objValue`.
  6817. * @returns {*} Returns the value to assign.
  6818. */
  6819. function customDefaultsAssignIn(objValue, srcValue, key, object) {
  6820. if (objValue === undefined ||
  6821. (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
  6822. return srcValue;
  6823. }
  6824. return objValue;
  6825. }
  6826. /**
  6827. * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
  6828. * objects into destination objects that are passed thru.
  6829. *
  6830. * @private
  6831. * @param {*} objValue The destination value.
  6832. * @param {*} srcValue The source value.
  6833. * @param {string} key The key of the property to merge.
  6834. * @param {Object} object The parent object of `objValue`.
  6835. * @param {Object} source The parent object of `srcValue`.
  6836. * @param {Object} [stack] Tracks traversed source values and their merged
  6837. * counterparts.
  6838. * @returns {*} Returns the value to assign.
  6839. */
  6840. function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
  6841. if (isObject(objValue) && isObject(srcValue)) {
  6842. // Recursively merge objects and arrays (susceptible to call stack limits).
  6843. stack.set(srcValue, objValue);
  6844. baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
  6845. stack['delete'](srcValue);
  6846. }
  6847. return objValue;
  6848. }
  6849. /**
  6850. * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
  6851. * objects.
  6852. *
  6853. * @private
  6854. * @param {*} value The value to inspect.
  6855. * @param {string} key The key of the property to inspect.
  6856. * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
  6857. */
  6858. function customOmitClone(value) {
  6859. return isPlainObject(value) ? undefined : value;
  6860. }
  6861. /**
  6862. * A specialized version of `baseIsEqualDeep` for arrays with support for
  6863. * partial deep comparisons.
  6864. *
  6865. * @private
  6866. * @param {Array} array The array to compare.
  6867. * @param {Array} other The other array to compare.
  6868. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  6869. * @param {Function} customizer The function to customize comparisons.
  6870. * @param {Function} equalFunc The function to determine equivalents of values.
  6871. * @param {Object} stack Tracks traversed `array` and `other` objects.
  6872. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
  6873. */
  6874. function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
  6875. var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
  6876. arrLength = array.length,
  6877. othLength = other.length;
  6878. if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
  6879. return false;
  6880. }
  6881. // Check that cyclic values are equal.
  6882. var arrStacked = stack.get(array);
  6883. var othStacked = stack.get(other);
  6884. if (arrStacked && othStacked) {
  6885. return arrStacked == other && othStacked == array;
  6886. }
  6887. var index = -1,
  6888. result = true,
  6889. seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
  6890. stack.set(array, other);
  6891. stack.set(other, array);
  6892. // Ignore non-index properties.
  6893. while (++index < arrLength) {
  6894. var arrValue = array[index],
  6895. othValue = other[index];
  6896. if (customizer) {
  6897. var compared = isPartial
  6898. ? customizer(othValue, arrValue, index, other, array, stack)
  6899. : customizer(arrValue, othValue, index, array, other, stack);
  6900. }
  6901. if (compared !== undefined) {
  6902. if (compared) {
  6903. continue;
  6904. }
  6905. result = false;
  6906. break;
  6907. }
  6908. // Recursively compare arrays (susceptible to call stack limits).
  6909. if (seen) {
  6910. if (!arraySome(other, function(othValue, othIndex) {
  6911. if (!cacheHas(seen, othIndex) &&
  6912. (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
  6913. return seen.push(othIndex);
  6914. }
  6915. })) {
  6916. result = false;
  6917. break;
  6918. }
  6919. } else if (!(
  6920. arrValue === othValue ||
  6921. equalFunc(arrValue, othValue, bitmask, customizer, stack)
  6922. )) {
  6923. result = false;
  6924. break;
  6925. }
  6926. }
  6927. stack['delete'](array);
  6928. stack['delete'](other);
  6929. return result;
  6930. }
  6931. /**
  6932. * A specialized version of `baseIsEqualDeep` for comparing objects of
  6933. * the same `toStringTag`.
  6934. *
  6935. * **Note:** This function only supports comparing values with tags of
  6936. * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
  6937. *
  6938. * @private
  6939. * @param {Object} object The object to compare.
  6940. * @param {Object} other The other object to compare.
  6941. * @param {string} tag The `toStringTag` of the objects to compare.
  6942. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  6943. * @param {Function} customizer The function to customize comparisons.
  6944. * @param {Function} equalFunc The function to determine equivalents of values.
  6945. * @param {Object} stack Tracks traversed `object` and `other` objects.
  6946. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  6947. */
  6948. function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
  6949. switch (tag) {
  6950. case dataViewTag:
  6951. if ((object.byteLength != other.byteLength) ||
  6952. (object.byteOffset != other.byteOffset)) {
  6953. return false;
  6954. }
  6955. object = object.buffer;
  6956. other = other.buffer;
  6957. case arrayBufferTag:
  6958. if ((object.byteLength != other.byteLength) ||
  6959. !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
  6960. return false;
  6961. }
  6962. return true;
  6963. case boolTag:
  6964. case dateTag:
  6965. case numberTag:
  6966. // Coerce booleans to `1` or `0` and dates to milliseconds.
  6967. // Invalid dates are coerced to `NaN`.
  6968. return eq(+object, +other);
  6969. case errorTag:
  6970. return object.name == other.name && object.message == other.message;
  6971. case regexpTag:
  6972. case stringTag:
  6973. // Coerce regexes to strings and treat strings, primitives and objects,
  6974. // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
  6975. // for more details.
  6976. return object == (other + '');
  6977. case mapTag:
  6978. var convert = mapToArray;
  6979. case setTag:
  6980. var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
  6981. convert || (convert = setToArray);
  6982. if (object.size != other.size && !isPartial) {
  6983. return false;
  6984. }
  6985. // Assume cyclic values are equal.
  6986. var stacked = stack.get(object);
  6987. if (stacked) {
  6988. return stacked == other;
  6989. }
  6990. bitmask |= COMPARE_UNORDERED_FLAG;
  6991. // Recursively compare objects (susceptible to call stack limits).
  6992. stack.set(object, other);
  6993. var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
  6994. stack['delete'](object);
  6995. return result;
  6996. case symbolTag:
  6997. if (symbolValueOf) {
  6998. return symbolValueOf.call(object) == symbolValueOf.call(other);
  6999. }
  7000. }
  7001. return false;
  7002. }
  7003. /**
  7004. * A specialized version of `baseIsEqualDeep` for objects with support for
  7005. * partial deep comparisons.
  7006. *
  7007. * @private
  7008. * @param {Object} object The object to compare.
  7009. * @param {Object} other The other object to compare.
  7010. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  7011. * @param {Function} customizer The function to customize comparisons.
  7012. * @param {Function} equalFunc The function to determine equivalents of values.
  7013. * @param {Object} stack Tracks traversed `object` and `other` objects.
  7014. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  7015. */
  7016. function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
  7017. var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
  7018. objProps = getAllKeys(object),
  7019. objLength = objProps.length,
  7020. othProps = getAllKeys(other),
  7021. othLength = othProps.length;
  7022. if (objLength != othLength && !isPartial) {
  7023. return false;
  7024. }
  7025. var index = objLength;
  7026. while (index--) {
  7027. var key = objProps[index];
  7028. if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
  7029. return false;
  7030. }
  7031. }
  7032. // Check that cyclic values are equal.
  7033. var objStacked = stack.get(object);
  7034. var othStacked = stack.get(other);
  7035. if (objStacked && othStacked) {
  7036. return objStacked == other && othStacked == object;
  7037. }
  7038. var result = true;
  7039. stack.set(object, other);
  7040. stack.set(other, object);
  7041. var skipCtor = isPartial;
  7042. while (++index < objLength) {
  7043. key = objProps[index];
  7044. var objValue = object[key],
  7045. othValue = other[key];
  7046. if (customizer) {
  7047. var compared = isPartial
  7048. ? customizer(othValue, objValue, key, other, object, stack)
  7049. : customizer(objValue, othValue, key, object, other, stack);
  7050. }
  7051. // Recursively compare objects (susceptible to call stack limits).
  7052. if (!(compared === undefined
  7053. ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
  7054. : compared
  7055. )) {
  7056. result = false;
  7057. break;
  7058. }
  7059. skipCtor || (skipCtor = key == 'constructor');
  7060. }
  7061. if (result && !skipCtor) {
  7062. var objCtor = object.constructor,
  7063. othCtor = other.constructor;
  7064. // Non `Object` object instances with different constructors are not equal.
  7065. if (objCtor != othCtor &&
  7066. ('constructor' in object && 'constructor' in other) &&
  7067. !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
  7068. typeof othCtor == 'function' && othCtor instanceof othCtor)) {
  7069. result = false;
  7070. }
  7071. }
  7072. stack['delete'](object);
  7073. stack['delete'](other);
  7074. return result;
  7075. }
  7076. /**
  7077. * A specialized version of `baseRest` which flattens the rest array.
  7078. *
  7079. * @private
  7080. * @param {Function} func The function to apply a rest parameter to.
  7081. * @returns {Function} Returns the new function.
  7082. */
  7083. function flatRest(func) {
  7084. return setToString(overRest(func, undefined, flatten), func + '');
  7085. }
  7086. /**
  7087. * Creates an array of own enumerable property names and symbols of `object`.
  7088. *
  7089. * @private
  7090. * @param {Object} object The object to query.
  7091. * @returns {Array} Returns the array of property names and symbols.
  7092. */
  7093. function getAllKeys(object) {
  7094. return baseGetAllKeys(object, keys, getSymbols);
  7095. }
  7096. /**
  7097. * Creates an array of own and inherited enumerable property names and
  7098. * symbols of `object`.
  7099. *
  7100. * @private
  7101. * @param {Object} object The object to query.
  7102. * @returns {Array} Returns the array of property names and symbols.
  7103. */
  7104. function getAllKeysIn(object) {
  7105. return baseGetAllKeys(object, keysIn, getSymbolsIn);
  7106. }
  7107. /**
  7108. * Gets metadata for `func`.
  7109. *
  7110. * @private
  7111. * @param {Function} func The function to query.
  7112. * @returns {*} Returns the metadata for `func`.
  7113. */
  7114. var getData = !metaMap ? noop : function(func) {
  7115. return metaMap.get(func);
  7116. };
  7117. /**
  7118. * Gets the name of `func`.
  7119. *
  7120. * @private
  7121. * @param {Function} func The function to query.
  7122. * @returns {string} Returns the function name.
  7123. */
  7124. function getFuncName(func) {
  7125. var result = (func.name + ''),
  7126. array = realNames[result],
  7127. length = hasOwnProperty.call(realNames, result) ? array.length : 0;
  7128. while (length--) {
  7129. var data = array[length],
  7130. otherFunc = data.func;
  7131. if (otherFunc == null || otherFunc == func) {
  7132. return data.name;
  7133. }
  7134. }
  7135. return result;
  7136. }
  7137. /**
  7138. * Gets the argument placeholder value for `func`.
  7139. *
  7140. * @private
  7141. * @param {Function} func The function to inspect.
  7142. * @returns {*} Returns the placeholder value.
  7143. */
  7144. function getHolder(func) {
  7145. var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
  7146. return object.placeholder;
  7147. }
  7148. /**
  7149. * Gets the appropriate "iteratee" function. If `_.iteratee` is customized,
  7150. * this function returns the custom method, otherwise it returns `baseIteratee`.
  7151. * If arguments are provided, the chosen function is invoked with them and
  7152. * its result is returned.
  7153. *
  7154. * @private
  7155. * @param {*} [value] The value to convert to an iteratee.
  7156. * @param {number} [arity] The arity of the created iteratee.
  7157. * @returns {Function} Returns the chosen function or its result.
  7158. */
  7159. function getIteratee() {
  7160. var result = lodash.iteratee || iteratee;
  7161. result = result === iteratee ? baseIteratee : result;
  7162. return arguments.length ? result(arguments[0], arguments[1]) : result;
  7163. }
  7164. /**
  7165. * Gets the data for `map`.
  7166. *
  7167. * @private
  7168. * @param {Object} map The map to query.
  7169. * @param {string} key The reference key.
  7170. * @returns {*} Returns the map data.
  7171. */
  7172. function getMapData(map, key) {
  7173. var data = map.__data__;
  7174. return isKeyable(key)
  7175. ? data[typeof key == 'string' ? 'string' : 'hash']
  7176. : data.map;
  7177. }
  7178. /**
  7179. * Gets the property names, values, and compare flags of `object`.
  7180. *
  7181. * @private
  7182. * @param {Object} object The object to query.
  7183. * @returns {Array} Returns the match data of `object`.
  7184. */
  7185. function getMatchData(object) {
  7186. var result = keys(object),
  7187. length = result.length;
  7188. while (length--) {
  7189. var key = result[length],
  7190. value = object[key];
  7191. result[length] = [key, value, isStrictComparable(value)];
  7192. }
  7193. return result;
  7194. }
  7195. /**
  7196. * Gets the native function at `key` of `object`.
  7197. *
  7198. * @private
  7199. * @param {Object} object The object to query.
  7200. * @param {string} key The key of the method to get.
  7201. * @returns {*} Returns the function if it's native, else `undefined`.
  7202. */
  7203. function getNative(object, key) {
  7204. var value = getValue(object, key);
  7205. return baseIsNative(value) ? value : undefined;
  7206. }
  7207. /**
  7208. * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
  7209. *
  7210. * @private
  7211. * @param {*} value The value to query.
  7212. * @returns {string} Returns the raw `toStringTag`.
  7213. */
  7214. function getRawTag(value) {
  7215. var isOwn = hasOwnProperty.call(value, symToStringTag),
  7216. tag = value[symToStringTag];
  7217. try {
  7218. value[symToStringTag] = undefined;
  7219. var unmasked = true;
  7220. } catch (e) {}
  7221. var result = nativeObjectToString.call(value);
  7222. if (unmasked) {
  7223. if (isOwn) {
  7224. value[symToStringTag] = tag;
  7225. } else {
  7226. delete value[symToStringTag];
  7227. }
  7228. }
  7229. return result;
  7230. }
  7231. /**
  7232. * Creates an array of the own enumerable symbols of `object`.
  7233. *
  7234. * @private
  7235. * @param {Object} object The object to query.
  7236. * @returns {Array} Returns the array of symbols.
  7237. */
  7238. var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
  7239. if (object == null) {
  7240. return [];
  7241. }
  7242. object = Object(object);
  7243. return arrayFilter(nativeGetSymbols(object), function(symbol) {
  7244. return propertyIsEnumerable.call(object, symbol);
  7245. });
  7246. };
  7247. /**
  7248. * Creates an array of the own and inherited enumerable symbols of `object`.
  7249. *
  7250. * @private
  7251. * @param {Object} object The object to query.
  7252. * @returns {Array} Returns the array of symbols.
  7253. */
  7254. var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
  7255. var result = [];
  7256. while (object) {
  7257. arrayPush(result, getSymbols(object));
  7258. object = getPrototype(object);
  7259. }
  7260. return result;
  7261. };
  7262. /**
  7263. * Gets the `toStringTag` of `value`.
  7264. *
  7265. * @private
  7266. * @param {*} value The value to query.
  7267. * @returns {string} Returns the `toStringTag`.
  7268. */
  7269. var getTag = baseGetTag;
  7270. // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
  7271. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
  7272. (Map && getTag(new Map) != mapTag) ||
  7273. (Promise && getTag(Promise.resolve()) != promiseTag) ||
  7274. (Set && getTag(new Set) != setTag) ||
  7275. (WeakMap && getTag(new WeakMap) != weakMapTag)) {
  7276. getTag = function(value) {
  7277. var result = baseGetTag(value),
  7278. Ctor = result == objectTag ? value.constructor : undefined,
  7279. ctorString = Ctor ? toSource(Ctor) : '';
  7280. if (ctorString) {
  7281. switch (ctorString) {
  7282. case dataViewCtorString: return dataViewTag;
  7283. case mapCtorString: return mapTag;
  7284. case promiseCtorString: return promiseTag;
  7285. case setCtorString: return setTag;
  7286. case weakMapCtorString: return weakMapTag;
  7287. }
  7288. }
  7289. return result;
  7290. };
  7291. }
  7292. /**
  7293. * Gets the view, applying any `transforms` to the `start` and `end` positions.
  7294. *
  7295. * @private
  7296. * @param {number} start The start of the view.
  7297. * @param {number} end The end of the view.
  7298. * @param {Array} transforms The transformations to apply to the view.
  7299. * @returns {Object} Returns an object containing the `start` and `end`
  7300. * positions of the view.
  7301. */
  7302. function getView(start, end, transforms) {
  7303. var index = -1,
  7304. length = transforms.length;
  7305. while (++index < length) {
  7306. var data = transforms[index],
  7307. size = data.size;
  7308. switch (data.type) {
  7309. case 'drop': start += size; break;
  7310. case 'dropRight': end -= size; break;
  7311. case 'take': end = nativeMin(end, start + size); break;
  7312. case 'takeRight': start = nativeMax(start, end - size); break;
  7313. }
  7314. }
  7315. return { 'start': start, 'end': end };
  7316. }
  7317. /**
  7318. * Extracts wrapper details from the `source` body comment.
  7319. *
  7320. * @private
  7321. * @param {string} source The source to inspect.
  7322. * @returns {Array} Returns the wrapper details.
  7323. */
  7324. function getWrapDetails(source) {
  7325. var match = source.match(reWrapDetails);
  7326. return match ? match[1].split(reSplitDetails) : [];
  7327. }
  7328. /**
  7329. * Checks if `path` exists on `object`.
  7330. *
  7331. * @private
  7332. * @param {Object} object The object to query.
  7333. * @param {Array|string} path The path to check.
  7334. * @param {Function} hasFunc The function to check properties.
  7335. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  7336. */
  7337. function hasPath(object, path, hasFunc) {
  7338. path = castPath(path, object);
  7339. var index = -1,
  7340. length = path.length,
  7341. result = false;
  7342. while (++index < length) {
  7343. var key = toKey(path[index]);
  7344. if (!(result = object != null && hasFunc(object, key))) {
  7345. break;
  7346. }
  7347. object = object[key];
  7348. }
  7349. if (result || ++index != length) {
  7350. return result;
  7351. }
  7352. length = object == null ? 0 : object.length;
  7353. return !!length && isLength(length) && isIndex(key, length) &&
  7354. (isArray(object) || isArguments(object));
  7355. }
  7356. /**
  7357. * Initializes an array clone.
  7358. *
  7359. * @private
  7360. * @param {Array} array The array to clone.
  7361. * @returns {Array} Returns the initialized clone.
  7362. */
  7363. function initCloneArray(array) {
  7364. var length = array.length,
  7365. result = new array.constructor(length);
  7366. // Add properties assigned by `RegExp#exec`.
  7367. if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
  7368. result.index = array.index;
  7369. result.input = array.input;
  7370. }
  7371. return result;
  7372. }
  7373. /**
  7374. * Initializes an object clone.
  7375. *
  7376. * @private
  7377. * @param {Object} object The object to clone.
  7378. * @returns {Object} Returns the initialized clone.
  7379. */
  7380. function initCloneObject(object) {
  7381. return (typeof object.constructor == 'function' && !isPrototype(object))
  7382. ? baseCreate(getPrototype(object))
  7383. : {};
  7384. }
  7385. /**
  7386. * Initializes an object clone based on its `toStringTag`.
  7387. *
  7388. * **Note:** This function only supports cloning values with tags of
  7389. * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
  7390. *
  7391. * @private
  7392. * @param {Object} object The object to clone.
  7393. * @param {string} tag The `toStringTag` of the object to clone.
  7394. * @param {boolean} [isDeep] Specify a deep clone.
  7395. * @returns {Object} Returns the initialized clone.
  7396. */
  7397. function initCloneByTag(object, tag, isDeep) {
  7398. var Ctor = object.constructor;
  7399. switch (tag) {
  7400. case arrayBufferTag:
  7401. return cloneArrayBuffer(object);
  7402. case boolTag:
  7403. case dateTag:
  7404. return new Ctor(+object);
  7405. case dataViewTag:
  7406. return cloneDataView(object, isDeep);
  7407. case float32Tag: case float64Tag:
  7408. case int8Tag: case int16Tag: case int32Tag:
  7409. case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
  7410. return cloneTypedArray(object, isDeep);
  7411. case mapTag:
  7412. return new Ctor;
  7413. case numberTag:
  7414. case stringTag:
  7415. return new Ctor(object);
  7416. case regexpTag:
  7417. return cloneRegExp(object);
  7418. case setTag:
  7419. return new Ctor;
  7420. case symbolTag:
  7421. return cloneSymbol(object);
  7422. }
  7423. }
  7424. /**
  7425. * Inserts wrapper `details` in a comment at the top of the `source` body.
  7426. *
  7427. * @private
  7428. * @param {string} source The source to modify.
  7429. * @returns {Array} details The details to insert.
  7430. * @returns {string} Returns the modified source.
  7431. */
  7432. function insertWrapDetails(source, details) {
  7433. var length = details.length;
  7434. if (!length) {
  7435. return source;
  7436. }
  7437. var lastIndex = length - 1;
  7438. details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
  7439. details = details.join(length > 2 ? ', ' : ' ');
  7440. return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
  7441. }
  7442. /**
  7443. * Checks if `value` is a flattenable `arguments` object or array.
  7444. *
  7445. * @private
  7446. * @param {*} value The value to check.
  7447. * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
  7448. */
  7449. function isFlattenable(value) {
  7450. return isArray(value) || isArguments(value) ||
  7451. !!(spreadableSymbol && value && value[spreadableSymbol]);
  7452. }
  7453. /**
  7454. * Checks if `value` is a valid array-like index.
  7455. *
  7456. * @private
  7457. * @param {*} value The value to check.
  7458. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
  7459. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
  7460. */
  7461. function isIndex(value, length) {
  7462. var type = typeof value;
  7463. length = length == null ? MAX_SAFE_INTEGER : length;
  7464. return !!length &&
  7465. (type == 'number' ||
  7466. (type != 'symbol' && reIsUint.test(value))) &&
  7467. (value > -1 && value % 1 == 0 && value < length);
  7468. }
  7469. /**
  7470. * Checks if the given arguments are from an iteratee call.
  7471. *
  7472. * @private
  7473. * @param {*} value The potential iteratee value argument.
  7474. * @param {*} index The potential iteratee index or key argument.
  7475. * @param {*} object The potential iteratee object argument.
  7476. * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
  7477. * else `false`.
  7478. */
  7479. function isIterateeCall(value, index, object) {
  7480. if (!isObject(object)) {
  7481. return false;
  7482. }
  7483. var type = typeof index;
  7484. if (type == 'number'
  7485. ? (isArrayLike(object) && isIndex(index, object.length))
  7486. : (type == 'string' && index in object)
  7487. ) {
  7488. return eq(object[index], value);
  7489. }
  7490. return false;
  7491. }
  7492. /**
  7493. * Checks if `value` is a property name and not a property path.
  7494. *
  7495. * @private
  7496. * @param {*} value The value to check.
  7497. * @param {Object} [object] The object to query keys on.
  7498. * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
  7499. */
  7500. function isKey(value, object) {
  7501. if (isArray(value)) {
  7502. return false;
  7503. }
  7504. var type = typeof value;
  7505. if (type == 'number' || type == 'symbol' || type == 'boolean' ||
  7506. value == null || isSymbol(value)) {
  7507. return true;
  7508. }
  7509. return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
  7510. (object != null && value in Object(object));
  7511. }
  7512. /**
  7513. * Checks if `value` is suitable for use as unique object key.
  7514. *
  7515. * @private
  7516. * @param {*} value The value to check.
  7517. * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
  7518. */
  7519. function isKeyable(value) {
  7520. var type = typeof value;
  7521. return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
  7522. ? (value !== '__proto__')
  7523. : (value === null);
  7524. }
  7525. /**
  7526. * Checks if `func` has a lazy counterpart.
  7527. *
  7528. * @private
  7529. * @param {Function} func The function to check.
  7530. * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
  7531. * else `false`.
  7532. */
  7533. function isLaziable(func) {
  7534. var funcName = getFuncName(func),
  7535. other = lodash[funcName];
  7536. if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
  7537. return false;
  7538. }
  7539. if (func === other) {
  7540. return true;
  7541. }
  7542. var data = getData(other);
  7543. return !!data && func === data[0];
  7544. }
  7545. /**
  7546. * Checks if `func` has its source masked.
  7547. *
  7548. * @private
  7549. * @param {Function} func The function to check.
  7550. * @returns {boolean} Returns `true` if `func` is masked, else `false`.
  7551. */
  7552. function isMasked(func) {
  7553. return !!maskSrcKey && (maskSrcKey in func);
  7554. }
  7555. /**
  7556. * Checks if `func` is capable of being masked.
  7557. *
  7558. * @private
  7559. * @param {*} value The value to check.
  7560. * @returns {boolean} Returns `true` if `func` is maskable, else `false`.
  7561. */
  7562. var isMaskable = coreJsData ? isFunction : stubFalse;
  7563. /**
  7564. * Checks if `value` is likely a prototype object.
  7565. *
  7566. * @private
  7567. * @param {*} value The value to check.
  7568. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
  7569. */
  7570. function isPrototype(value) {
  7571. var Ctor = value && value.constructor,
  7572. proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
  7573. return value === proto;
  7574. }
  7575. /**
  7576. * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
  7577. *
  7578. * @private
  7579. * @param {*} value The value to check.
  7580. * @returns {boolean} Returns `true` if `value` if suitable for strict
  7581. * equality comparisons, else `false`.
  7582. */
  7583. function isStrictComparable(value) {
  7584. return value === value && !isObject(value);
  7585. }
  7586. /**
  7587. * A specialized version of `matchesProperty` for source values suitable
  7588. * for strict equality comparisons, i.e. `===`.
  7589. *
  7590. * @private
  7591. * @param {string} key The key of the property to get.
  7592. * @param {*} srcValue The value to match.
  7593. * @returns {Function} Returns the new spec function.
  7594. */
  7595. function matchesStrictComparable(key, srcValue) {
  7596. return function(object) {
  7597. if (object == null) {
  7598. return false;
  7599. }
  7600. return object[key] === srcValue &&
  7601. (srcValue !== undefined || (key in Object(object)));
  7602. };
  7603. }
  7604. /**
  7605. * A specialized version of `_.memoize` which clears the memoized function's
  7606. * cache when it exceeds `MAX_MEMOIZE_SIZE`.
  7607. *
  7608. * @private
  7609. * @param {Function} func The function to have its output memoized.
  7610. * @returns {Function} Returns the new memoized function.
  7611. */
  7612. function memoizeCapped(func) {
  7613. var result = memoize(func, function(key) {
  7614. if (cache.size === MAX_MEMOIZE_SIZE) {
  7615. cache.clear();
  7616. }
  7617. return key;
  7618. });
  7619. var cache = result.cache;
  7620. return result;
  7621. }
  7622. /**
  7623. * Merges the function metadata of `source` into `data`.
  7624. *
  7625. * Merging metadata reduces the number of wrappers used to invoke a function.
  7626. * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
  7627. * may be applied regardless of execution order. Methods like `_.ary` and
  7628. * `_.rearg` modify function arguments, making the order in which they are
  7629. * executed important, preventing the merging of metadata. However, we make
  7630. * an exception for a safe combined case where curried functions have `_.ary`
  7631. * and or `_.rearg` applied.
  7632. *
  7633. * @private
  7634. * @param {Array} data The destination metadata.
  7635. * @param {Array} source The source metadata.
  7636. * @returns {Array} Returns `data`.
  7637. */
  7638. function mergeData(data, source) {
  7639. var bitmask = data[1],
  7640. srcBitmask = source[1],
  7641. newBitmask = bitmask | srcBitmask,
  7642. isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
  7643. var isCombo =
  7644. ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
  7645. ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
  7646. ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));
  7647. // Exit early if metadata can't be merged.
  7648. if (!(isCommon || isCombo)) {
  7649. return data;
  7650. }
  7651. // Use source `thisArg` if available.
  7652. if (srcBitmask & WRAP_BIND_FLAG) {
  7653. data[2] = source[2];
  7654. // Set when currying a bound function.
  7655. newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
  7656. }
  7657. // Compose partial arguments.
  7658. var value = source[3];
  7659. if (value) {
  7660. var partials = data[3];
  7661. data[3] = partials ? composeArgs(partials, value, source[4]) : value;
  7662. data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
  7663. }
  7664. // Compose partial right arguments.
  7665. value = source[5];
  7666. if (value) {
  7667. partials = data[5];
  7668. data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
  7669. data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
  7670. }
  7671. // Use source `argPos` if available.
  7672. value = source[7];
  7673. if (value) {
  7674. data[7] = value;
  7675. }
  7676. // Use source `ary` if it's smaller.
  7677. if (srcBitmask & WRAP_ARY_FLAG) {
  7678. data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
  7679. }
  7680. // Use source `arity` if one is not provided.
  7681. if (data[9] == null) {
  7682. data[9] = source[9];
  7683. }
  7684. // Use source `func` and merge bitmasks.
  7685. data[0] = source[0];
  7686. data[1] = newBitmask;
  7687. return data;
  7688. }
  7689. /**
  7690. * This function is like
  7691. * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  7692. * except that it includes inherited enumerable properties.
  7693. *
  7694. * @private
  7695. * @param {Object} object The object to query.
  7696. * @returns {Array} Returns the array of property names.
  7697. */
  7698. function nativeKeysIn(object) {
  7699. var result = [];
  7700. if (object != null) {
  7701. for (var key in Object(object)) {
  7702. result.push(key);
  7703. }
  7704. }
  7705. return result;
  7706. }
  7707. /**
  7708. * Converts `value` to a string using `Object.prototype.toString`.
  7709. *
  7710. * @private
  7711. * @param {*} value The value to convert.
  7712. * @returns {string} Returns the converted string.
  7713. */
  7714. function objectToString(value) {
  7715. return nativeObjectToString.call(value);
  7716. }
  7717. /**
  7718. * A specialized version of `baseRest` which transforms the rest array.
  7719. *
  7720. * @private
  7721. * @param {Function} func The function to apply a rest parameter to.
  7722. * @param {number} [start=func.length-1] The start position of the rest parameter.
  7723. * @param {Function} transform The rest array transform.
  7724. * @returns {Function} Returns the new function.
  7725. */
  7726. function overRest(func, start, transform) {
  7727. start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
  7728. return function() {
  7729. var args = arguments,
  7730. index = -1,
  7731. length = nativeMax(args.length - start, 0),
  7732. array = Array(length);
  7733. while (++index < length) {
  7734. array[index] = args[start + index];
  7735. }
  7736. index = -1;
  7737. var otherArgs = Array(start + 1);
  7738. while (++index < start) {
  7739. otherArgs[index] = args[index];
  7740. }
  7741. otherArgs[start] = transform(array);
  7742. return apply(func, this, otherArgs);
  7743. };
  7744. }
  7745. /**
  7746. * Gets the parent value at `path` of `object`.
  7747. *
  7748. * @private
  7749. * @param {Object} object The object to query.
  7750. * @param {Array} path The path to get the parent value of.
  7751. * @returns {*} Returns the parent value.
  7752. */
  7753. function parent(object, path) {
  7754. return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
  7755. }
  7756. /**
  7757. * Reorder `array` according to the specified indexes where the element at
  7758. * the first index is assigned as the first element, the element at
  7759. * the second index is assigned as the second element, and so on.
  7760. *
  7761. * @private
  7762. * @param {Array} array The array to reorder.
  7763. * @param {Array} indexes The arranged array indexes.
  7764. * @returns {Array} Returns `array`.
  7765. */
  7766. function reorder(array, indexes) {
  7767. var arrLength = array.length,
  7768. length = nativeMin(indexes.length, arrLength),
  7769. oldArray = copyArray(array);
  7770. while (length--) {
  7771. var index = indexes[length];
  7772. array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
  7773. }
  7774. return array;
  7775. }
  7776. /**
  7777. * Gets the value at `key`, unless `key` is "__proto__" or "constructor".
  7778. *
  7779. * @private
  7780. * @param {Object} object The object to query.
  7781. * @param {string} key The key of the property to get.
  7782. * @returns {*} Returns the property value.
  7783. */
  7784. function safeGet(object, key) {
  7785. if (key === 'constructor' && typeof object[key] === 'function') {
  7786. return;
  7787. }
  7788. if (key == '__proto__') {
  7789. return;
  7790. }
  7791. return object[key];
  7792. }
  7793. /**
  7794. * Sets metadata for `func`.
  7795. *
  7796. * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
  7797. * period of time, it will trip its breaker and transition to an identity
  7798. * function to avoid garbage collection pauses in V8. See
  7799. * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
  7800. * for more details.
  7801. *
  7802. * @private
  7803. * @param {Function} func The function to associate metadata with.
  7804. * @param {*} data The metadata.
  7805. * @returns {Function} Returns `func`.
  7806. */
  7807. var setData = shortOut(baseSetData);
  7808. /**
  7809. * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).
  7810. *
  7811. * @private
  7812. * @param {Function} func The function to delay.
  7813. * @param {number} wait The number of milliseconds to delay invocation.
  7814. * @returns {number|Object} Returns the timer id or timeout object.
  7815. */
  7816. var setTimeout = ctxSetTimeout || function(func, wait) {
  7817. return root.setTimeout(func, wait);
  7818. };
  7819. /**
  7820. * Sets the `toString` method of `func` to return `string`.
  7821. *
  7822. * @private
  7823. * @param {Function} func The function to modify.
  7824. * @param {Function} string The `toString` result.
  7825. * @returns {Function} Returns `func`.
  7826. */
  7827. var setToString = shortOut(baseSetToString);
  7828. /**
  7829. * Sets the `toString` method of `wrapper` to mimic the source of `reference`
  7830. * with wrapper details in a comment at the top of the source body.
  7831. *
  7832. * @private
  7833. * @param {Function} wrapper The function to modify.
  7834. * @param {Function} reference The reference function.
  7835. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  7836. * @returns {Function} Returns `wrapper`.
  7837. */
  7838. function setWrapToString(wrapper, reference, bitmask) {
  7839. var source = (reference + '');
  7840. return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
  7841. }
  7842. /**
  7843. * Creates a function that'll short out and invoke `identity` instead
  7844. * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
  7845. * milliseconds.
  7846. *
  7847. * @private
  7848. * @param {Function} func The function to restrict.
  7849. * @returns {Function} Returns the new shortable function.
  7850. */
  7851. function shortOut(func) {
  7852. var count = 0,
  7853. lastCalled = 0;
  7854. return function() {
  7855. var stamp = nativeNow(),
  7856. remaining = HOT_SPAN - (stamp - lastCalled);
  7857. lastCalled = stamp;
  7858. if (remaining > 0) {
  7859. if (++count >= HOT_COUNT) {
  7860. return arguments[0];
  7861. }
  7862. } else {
  7863. count = 0;
  7864. }
  7865. return func.apply(undefined, arguments);
  7866. };
  7867. }
  7868. /**
  7869. * A specialized version of `_.shuffle` which mutates and sets the size of `array`.
  7870. *
  7871. * @private
  7872. * @param {Array} array The array to shuffle.
  7873. * @param {number} [size=array.length] The size of `array`.
  7874. * @returns {Array} Returns `array`.
  7875. */
  7876. function shuffleSelf(array, size) {
  7877. var index = -1,
  7878. length = array.length,
  7879. lastIndex = length - 1;
  7880. size = size === undefined ? length : size;
  7881. while (++index < size) {
  7882. var rand = baseRandom(index, lastIndex),
  7883. value = array[rand];
  7884. array[rand] = array[index];
  7885. array[index] = value;
  7886. }
  7887. array.length = size;
  7888. return array;
  7889. }
  7890. /**
  7891. * Converts `string` to a property path array.
  7892. *
  7893. * @private
  7894. * @param {string} string The string to convert.
  7895. * @returns {Array} Returns the property path array.
  7896. */
  7897. var stringToPath = memoizeCapped(function(string) {
  7898. var result = [];
  7899. if (string.charCodeAt(0) === 46 /* . */) {
  7900. result.push('');
  7901. }
  7902. string.replace(rePropName, function(match, number, quote, subString) {
  7903. result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
  7904. });
  7905. return result;
  7906. });
  7907. /**
  7908. * Converts `value` to a string key if it's not a string or symbol.
  7909. *
  7910. * @private
  7911. * @param {*} value The value to inspect.
  7912. * @returns {string|symbol} Returns the key.
  7913. */
  7914. function toKey(value) {
  7915. if (typeof value == 'string' || isSymbol(value)) {
  7916. return value;
  7917. }
  7918. var result = (value + '');
  7919. return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
  7920. }
  7921. /**
  7922. * Converts `func` to its source code.
  7923. *
  7924. * @private
  7925. * @param {Function} func The function to convert.
  7926. * @returns {string} Returns the source code.
  7927. */
  7928. function toSource(func) {
  7929. if (func != null) {
  7930. try {
  7931. return funcToString.call(func);
  7932. } catch (e) {}
  7933. try {
  7934. return (func + '');
  7935. } catch (e) {}
  7936. }
  7937. return '';
  7938. }
  7939. /**
  7940. * Updates wrapper `details` based on `bitmask` flags.
  7941. *
  7942. * @private
  7943. * @returns {Array} details The details to modify.
  7944. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  7945. * @returns {Array} Returns `details`.
  7946. */
  7947. function updateWrapDetails(details, bitmask) {
  7948. arrayEach(wrapFlags, function(pair) {
  7949. var value = '_.' + pair[0];
  7950. if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
  7951. details.push(value);
  7952. }
  7953. });
  7954. return details.sort();
  7955. }
  7956. /**
  7957. * Creates a clone of `wrapper`.
  7958. *
  7959. * @private
  7960. * @param {Object} wrapper The wrapper to clone.
  7961. * @returns {Object} Returns the cloned wrapper.
  7962. */
  7963. function wrapperClone(wrapper) {
  7964. if (wrapper instanceof LazyWrapper) {
  7965. return wrapper.clone();
  7966. }
  7967. var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
  7968. result.__actions__ = copyArray(wrapper.__actions__);
  7969. result.__index__ = wrapper.__index__;
  7970. result.__values__ = wrapper.__values__;
  7971. return result;
  7972. }
  7973. /*------------------------------------------------------------------------*/
  7974. /**
  7975. * Creates an array of elements split into groups the length of `size`.
  7976. * If `array` can't be split evenly, the final chunk will be the remaining
  7977. * elements.
  7978. *
  7979. * @static
  7980. * @memberOf _
  7981. * @since 3.0.0
  7982. * @category Array
  7983. * @param {Array} array The array to process.
  7984. * @param {number} [size=1] The length of each chunk
  7985. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  7986. * @returns {Array} Returns the new array of chunks.
  7987. * @example
  7988. *
  7989. * _.chunk(['a', 'b', 'c', 'd'], 2);
  7990. * // => [['a', 'b'], ['c', 'd']]
  7991. *
  7992. * _.chunk(['a', 'b', 'c', 'd'], 3);
  7993. * // => [['a', 'b', 'c'], ['d']]
  7994. */
  7995. function chunk(array, size, guard) {
  7996. if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
  7997. size = 1;
  7998. } else {
  7999. size = nativeMax(toInteger(size), 0);
  8000. }
  8001. var length = array == null ? 0 : array.length;
  8002. if (!length || size < 1) {
  8003. return [];
  8004. }
  8005. var index = 0,
  8006. resIndex = 0,
  8007. result = Array(nativeCeil(length / size));
  8008. while (index < length) {
  8009. result[resIndex++] = baseSlice(array, index, (index += size));
  8010. }
  8011. return result;
  8012. }
  8013. /**
  8014. * Creates an array with all falsey values removed. The values `false`, `null`,
  8015. * `0`, `""`, `undefined`, and `NaN` are falsey.
  8016. *
  8017. * @static
  8018. * @memberOf _
  8019. * @since 0.1.0
  8020. * @category Array
  8021. * @param {Array} array The array to compact.
  8022. * @returns {Array} Returns the new array of filtered values.
  8023. * @example
  8024. *
  8025. * _.compact([0, 1, false, 2, '', 3]);
  8026. * // => [1, 2, 3]
  8027. */
  8028. function compact(array) {
  8029. var index = -1,
  8030. length = array == null ? 0 : array.length,
  8031. resIndex = 0,
  8032. result = [];
  8033. while (++index < length) {
  8034. var value = array[index];
  8035. if (value) {
  8036. result[resIndex++] = value;
  8037. }
  8038. }
  8039. return result;
  8040. }
  8041. /**
  8042. * Creates a new array concatenating `array` with any additional arrays
  8043. * and/or values.
  8044. *
  8045. * @static
  8046. * @memberOf _
  8047. * @since 4.0.0
  8048. * @category Array
  8049. * @param {Array} array The array to concatenate.
  8050. * @param {...*} [values] The values to concatenate.
  8051. * @returns {Array} Returns the new concatenated array.
  8052. * @example
  8053. *
  8054. * var array = [1];
  8055. * var other = _.concat(array, 2, [3], [[4]]);
  8056. *
  8057. * console.log(other);
  8058. * // => [1, 2, 3, [4]]
  8059. *
  8060. * console.log(array);
  8061. * // => [1]
  8062. */
  8063. function concat() {
  8064. var length = arguments.length;
  8065. if (!length) {
  8066. return [];
  8067. }
  8068. var args = Array(length - 1),
  8069. array = arguments[0],
  8070. index = length;
  8071. while (index--) {
  8072. args[index - 1] = arguments[index];
  8073. }
  8074. return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
  8075. }
  8076. /**
  8077. * Creates an array of `array` values not included in the other given arrays
  8078. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  8079. * for equality comparisons. The order and references of result values are
  8080. * determined by the first array.
  8081. *
  8082. * **Note:** Unlike `_.pullAll`, this method returns a new array.
  8083. *
  8084. * @static
  8085. * @memberOf _
  8086. * @since 0.1.0
  8087. * @category Array
  8088. * @param {Array} array The array to inspect.
  8089. * @param {...Array} [values] The values to exclude.
  8090. * @returns {Array} Returns the new array of filtered values.
  8091. * @see _.without, _.xor
  8092. * @example
  8093. *
  8094. * _.difference([2, 1], [2, 3]);
  8095. * // => [1]
  8096. */
  8097. var difference = baseRest(function(array, values) {
  8098. return isArrayLikeObject(array)
  8099. ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
  8100. : [];
  8101. });
  8102. /**
  8103. * This method is like `_.difference` except that it accepts `iteratee` which
  8104. * is invoked for each element of `array` and `values` to generate the criterion
  8105. * by which they're compared. The order and references of result values are
  8106. * determined by the first array. The iteratee is invoked with one argument:
  8107. * (value).
  8108. *
  8109. * **Note:** Unlike `_.pullAllBy`, this method returns a new array.
  8110. *
  8111. * @static
  8112. * @memberOf _
  8113. * @since 4.0.0
  8114. * @category Array
  8115. * @param {Array} array The array to inspect.
  8116. * @param {...Array} [values] The values to exclude.
  8117. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  8118. * @returns {Array} Returns the new array of filtered values.
  8119. * @example
  8120. *
  8121. * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);
  8122. * // => [1.2]
  8123. *
  8124. * // The `_.property` iteratee shorthand.
  8125. * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
  8126. * // => [{ 'x': 2 }]
  8127. */
  8128. var differenceBy = baseRest(function(array, values) {
  8129. var iteratee = last(values);
  8130. if (isArrayLikeObject(iteratee)) {
  8131. iteratee = undefined;
  8132. }
  8133. return isArrayLikeObject(array)
  8134. ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))
  8135. : [];
  8136. });
  8137. /**
  8138. * This method is like `_.difference` except that it accepts `comparator`
  8139. * which is invoked to compare elements of `array` to `values`. The order and
  8140. * references of result values are determined by the first array. The comparator
  8141. * is invoked with two arguments: (arrVal, othVal).
  8142. *
  8143. * **Note:** Unlike `_.pullAllWith`, this method returns a new array.
  8144. *
  8145. * @static
  8146. * @memberOf _
  8147. * @since 4.0.0
  8148. * @category Array
  8149. * @param {Array} array The array to inspect.
  8150. * @param {...Array} [values] The values to exclude.
  8151. * @param {Function} [comparator] The comparator invoked per element.
  8152. * @returns {Array} Returns the new array of filtered values.
  8153. * @example
  8154. *
  8155. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  8156. *
  8157. * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
  8158. * // => [{ 'x': 2, 'y': 1 }]
  8159. */
  8160. var differenceWith = baseRest(function(array, values) {
  8161. var comparator = last(values);
  8162. if (isArrayLikeObject(comparator)) {
  8163. comparator = undefined;
  8164. }
  8165. return isArrayLikeObject(array)
  8166. ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
  8167. : [];
  8168. });
  8169. /**
  8170. * Creates a slice of `array` with `n` elements dropped from the beginning.
  8171. *
  8172. * @static
  8173. * @memberOf _
  8174. * @since 0.5.0
  8175. * @category Array
  8176. * @param {Array} array The array to query.
  8177. * @param {number} [n=1] The number of elements to drop.
  8178. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  8179. * @returns {Array} Returns the slice of `array`.
  8180. * @example
  8181. *
  8182. * _.drop([1, 2, 3]);
  8183. * // => [2, 3]
  8184. *
  8185. * _.drop([1, 2, 3], 2);
  8186. * // => [3]
  8187. *
  8188. * _.drop([1, 2, 3], 5);
  8189. * // => []
  8190. *
  8191. * _.drop([1, 2, 3], 0);
  8192. * // => [1, 2, 3]
  8193. */
  8194. function drop(array, n, guard) {
  8195. var length = array == null ? 0 : array.length;
  8196. if (!length) {
  8197. return [];
  8198. }
  8199. n = (guard || n === undefined) ? 1 : toInteger(n);
  8200. return baseSlice(array, n < 0 ? 0 : n, length);
  8201. }
  8202. /**
  8203. * Creates a slice of `array` with `n` elements dropped from the end.
  8204. *
  8205. * @static
  8206. * @memberOf _
  8207. * @since 3.0.0
  8208. * @category Array
  8209. * @param {Array} array The array to query.
  8210. * @param {number} [n=1] The number of elements to drop.
  8211. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  8212. * @returns {Array} Returns the slice of `array`.
  8213. * @example
  8214. *
  8215. * _.dropRight([1, 2, 3]);
  8216. * // => [1, 2]
  8217. *
  8218. * _.dropRight([1, 2, 3], 2);
  8219. * // => [1]
  8220. *
  8221. * _.dropRight([1, 2, 3], 5);
  8222. * // => []
  8223. *
  8224. * _.dropRight([1, 2, 3], 0);
  8225. * // => [1, 2, 3]
  8226. */
  8227. function dropRight(array, n, guard) {
  8228. var length = array == null ? 0 : array.length;
  8229. if (!length) {
  8230. return [];
  8231. }
  8232. n = (guard || n === undefined) ? 1 : toInteger(n);
  8233. n = length - n;
  8234. return baseSlice(array, 0, n < 0 ? 0 : n);
  8235. }
  8236. /**
  8237. * Creates a slice of `array` excluding elements dropped from the end.
  8238. * Elements are dropped until `predicate` returns falsey. The predicate is
  8239. * invoked with three arguments: (value, index, array).
  8240. *
  8241. * @static
  8242. * @memberOf _
  8243. * @since 3.0.0
  8244. * @category Array
  8245. * @param {Array} array The array to query.
  8246. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  8247. * @returns {Array} Returns the slice of `array`.
  8248. * @example
  8249. *
  8250. * var users = [
  8251. * { 'user': 'barney', 'active': true },
  8252. * { 'user': 'fred', 'active': false },
  8253. * { 'user': 'pebbles', 'active': false }
  8254. * ];
  8255. *
  8256. * _.dropRightWhile(users, function(o) { return !o.active; });
  8257. * // => objects for ['barney']
  8258. *
  8259. * // The `_.matches` iteratee shorthand.
  8260. * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
  8261. * // => objects for ['barney', 'fred']
  8262. *
  8263. * // The `_.matchesProperty` iteratee shorthand.
  8264. * _.dropRightWhile(users, ['active', false]);
  8265. * // => objects for ['barney']
  8266. *
  8267. * // The `_.property` iteratee shorthand.
  8268. * _.dropRightWhile(users, 'active');
  8269. * // => objects for ['barney', 'fred', 'pebbles']
  8270. */
  8271. function dropRightWhile(array, predicate) {
  8272. return (array && array.length)
  8273. ? baseWhile(array, getIteratee(predicate, 3), true, true)
  8274. : [];
  8275. }
  8276. /**
  8277. * Creates a slice of `array` excluding elements dropped from the beginning.
  8278. * Elements are dropped until `predicate` returns falsey. The predicate is
  8279. * invoked with three arguments: (value, index, array).
  8280. *
  8281. * @static
  8282. * @memberOf _
  8283. * @since 3.0.0
  8284. * @category Array
  8285. * @param {Array} array The array to query.
  8286. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  8287. * @returns {Array} Returns the slice of `array`.
  8288. * @example
  8289. *
  8290. * var users = [
  8291. * { 'user': 'barney', 'active': false },
  8292. * { 'user': 'fred', 'active': false },
  8293. * { 'user': 'pebbles', 'active': true }
  8294. * ];
  8295. *
  8296. * _.dropWhile(users, function(o) { return !o.active; });
  8297. * // => objects for ['pebbles']
  8298. *
  8299. * // The `_.matches` iteratee shorthand.
  8300. * _.dropWhile(users, { 'user': 'barney', 'active': false });
  8301. * // => objects for ['fred', 'pebbles']
  8302. *
  8303. * // The `_.matchesProperty` iteratee shorthand.
  8304. * _.dropWhile(users, ['active', false]);
  8305. * // => objects for ['pebbles']
  8306. *
  8307. * // The `_.property` iteratee shorthand.
  8308. * _.dropWhile(users, 'active');
  8309. * // => objects for ['barney', 'fred', 'pebbles']
  8310. */
  8311. function dropWhile(array, predicate) {
  8312. return (array && array.length)
  8313. ? baseWhile(array, getIteratee(predicate, 3), true)
  8314. : [];
  8315. }
  8316. /**
  8317. * Fills elements of `array` with `value` from `start` up to, but not
  8318. * including, `end`.
  8319. *
  8320. * **Note:** This method mutates `array`.
  8321. *
  8322. * @static
  8323. * @memberOf _
  8324. * @since 3.2.0
  8325. * @category Array
  8326. * @param {Array} array The array to fill.
  8327. * @param {*} value The value to fill `array` with.
  8328. * @param {number} [start=0] The start position.
  8329. * @param {number} [end=array.length] The end position.
  8330. * @returns {Array} Returns `array`.
  8331. * @example
  8332. *
  8333. * var array = [1, 2, 3];
  8334. *
  8335. * _.fill(array, 'a');
  8336. * console.log(array);
  8337. * // => ['a', 'a', 'a']
  8338. *
  8339. * _.fill(Array(3), 2);
  8340. * // => [2, 2, 2]
  8341. *
  8342. * _.fill([4, 6, 8, 10], '*', 1, 3);
  8343. * // => [4, '*', '*', 10]
  8344. */
  8345. function fill(array, value, start, end) {
  8346. var length = array == null ? 0 : array.length;
  8347. if (!length) {
  8348. return [];
  8349. }
  8350. if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
  8351. start = 0;
  8352. end = length;
  8353. }
  8354. return baseFill(array, value, start, end);
  8355. }
  8356. /**
  8357. * This method is like `_.find` except that it returns the index of the first
  8358. * element `predicate` returns truthy for instead of the element itself.
  8359. *
  8360. * @static
  8361. * @memberOf _
  8362. * @since 1.1.0
  8363. * @category Array
  8364. * @param {Array} array The array to inspect.
  8365. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  8366. * @param {number} [fromIndex=0] The index to search from.
  8367. * @returns {number} Returns the index of the found element, else `-1`.
  8368. * @example
  8369. *
  8370. * var users = [
  8371. * { 'user': 'barney', 'active': false },
  8372. * { 'user': 'fred', 'active': false },
  8373. * { 'user': 'pebbles', 'active': true }
  8374. * ];
  8375. *
  8376. * _.findIndex(users, function(o) { return o.user == 'barney'; });
  8377. * // => 0
  8378. *
  8379. * // The `_.matches` iteratee shorthand.
  8380. * _.findIndex(users, { 'user': 'fred', 'active': false });
  8381. * // => 1
  8382. *
  8383. * // The `_.matchesProperty` iteratee shorthand.
  8384. * _.findIndex(users, ['active', false]);
  8385. * // => 0
  8386. *
  8387. * // The `_.property` iteratee shorthand.
  8388. * _.findIndex(users, 'active');
  8389. * // => 2
  8390. */
  8391. function findIndex(array, predicate, fromIndex) {
  8392. var length = array == null ? 0 : array.length;
  8393. if (!length) {
  8394. return -1;
  8395. }
  8396. var index = fromIndex == null ? 0 : toInteger(fromIndex);
  8397. if (index < 0) {
  8398. index = nativeMax(length + index, 0);
  8399. }
  8400. return baseFindIndex(array, getIteratee(predicate, 3), index);
  8401. }
  8402. /**
  8403. * This method is like `_.findIndex` except that it iterates over elements
  8404. * of `collection` from right to left.
  8405. *
  8406. * @static
  8407. * @memberOf _
  8408. * @since 2.0.0
  8409. * @category Array
  8410. * @param {Array} array The array to inspect.
  8411. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  8412. * @param {number} [fromIndex=array.length-1] The index to search from.
  8413. * @returns {number} Returns the index of the found element, else `-1`.
  8414. * @example
  8415. *
  8416. * var users = [
  8417. * { 'user': 'barney', 'active': true },
  8418. * { 'user': 'fred', 'active': false },
  8419. * { 'user': 'pebbles', 'active': false }
  8420. * ];
  8421. *
  8422. * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
  8423. * // => 2
  8424. *
  8425. * // The `_.matches` iteratee shorthand.
  8426. * _.findLastIndex(users, { 'user': 'barney', 'active': true });
  8427. * // => 0
  8428. *
  8429. * // The `_.matchesProperty` iteratee shorthand.
  8430. * _.findLastIndex(users, ['active', false]);
  8431. * // => 2
  8432. *
  8433. * // The `_.property` iteratee shorthand.
  8434. * _.findLastIndex(users, 'active');
  8435. * // => 0
  8436. */
  8437. function findLastIndex(array, predicate, fromIndex) {
  8438. var length = array == null ? 0 : array.length;
  8439. if (!length) {
  8440. return -1;
  8441. }
  8442. var index = length - 1;
  8443. if (fromIndex !== undefined) {
  8444. index = toInteger(fromIndex);
  8445. index = fromIndex < 0
  8446. ? nativeMax(length + index, 0)
  8447. : nativeMin(index, length - 1);
  8448. }
  8449. return baseFindIndex(array, getIteratee(predicate, 3), index, true);
  8450. }
  8451. /**
  8452. * Flattens `array` a single level deep.
  8453. *
  8454. * @static
  8455. * @memberOf _
  8456. * @since 0.1.0
  8457. * @category Array
  8458. * @param {Array} array The array to flatten.
  8459. * @returns {Array} Returns the new flattened array.
  8460. * @example
  8461. *
  8462. * _.flatten([1, [2, [3, [4]], 5]]);
  8463. * // => [1, 2, [3, [4]], 5]
  8464. */
  8465. function flatten(array) {
  8466. var length = array == null ? 0 : array.length;
  8467. return length ? baseFlatten(array, 1) : [];
  8468. }
  8469. /**
  8470. * Recursively flattens `array`.
  8471. *
  8472. * @static
  8473. * @memberOf _
  8474. * @since 3.0.0
  8475. * @category Array
  8476. * @param {Array} array The array to flatten.
  8477. * @returns {Array} Returns the new flattened array.
  8478. * @example
  8479. *
  8480. * _.flattenDeep([1, [2, [3, [4]], 5]]);
  8481. * // => [1, 2, 3, 4, 5]
  8482. */
  8483. function flattenDeep(array) {
  8484. var length = array == null ? 0 : array.length;
  8485. return length ? baseFlatten(array, INFINITY) : [];
  8486. }
  8487. /**
  8488. * Recursively flatten `array` up to `depth` times.
  8489. *
  8490. * @static
  8491. * @memberOf _
  8492. * @since 4.4.0
  8493. * @category Array
  8494. * @param {Array} array The array to flatten.
  8495. * @param {number} [depth=1] The maximum recursion depth.
  8496. * @returns {Array} Returns the new flattened array.
  8497. * @example
  8498. *
  8499. * var array = [1, [2, [3, [4]], 5]];
  8500. *
  8501. * _.flattenDepth(array, 1);
  8502. * // => [1, 2, [3, [4]], 5]
  8503. *
  8504. * _.flattenDepth(array, 2);
  8505. * // => [1, 2, 3, [4], 5]
  8506. */
  8507. function flattenDepth(array, depth) {
  8508. var length = array == null ? 0 : array.length;
  8509. if (!length) {
  8510. return [];
  8511. }
  8512. depth = depth === undefined ? 1 : toInteger(depth);
  8513. return baseFlatten(array, depth);
  8514. }
  8515. /**
  8516. * The inverse of `_.toPairs`; this method returns an object composed
  8517. * from key-value `pairs`.
  8518. *
  8519. * @static
  8520. * @memberOf _
  8521. * @since 4.0.0
  8522. * @category Array
  8523. * @param {Array} pairs The key-value pairs.
  8524. * @returns {Object} Returns the new object.
  8525. * @example
  8526. *
  8527. * _.fromPairs([['a', 1], ['b', 2]]);
  8528. * // => { 'a': 1, 'b': 2 }
  8529. */
  8530. function fromPairs(pairs) {
  8531. var index = -1,
  8532. length = pairs == null ? 0 : pairs.length,
  8533. result = {};
  8534. while (++index < length) {
  8535. var pair = pairs[index];
  8536. result[pair[0]] = pair[1];
  8537. }
  8538. return result;
  8539. }
  8540. /**
  8541. * Gets the first element of `array`.
  8542. *
  8543. * @static
  8544. * @memberOf _
  8545. * @since 0.1.0
  8546. * @alias first
  8547. * @category Array
  8548. * @param {Array} array The array to query.
  8549. * @returns {*} Returns the first element of `array`.
  8550. * @example
  8551. *
  8552. * _.head([1, 2, 3]);
  8553. * // => 1
  8554. *
  8555. * _.head([]);
  8556. * // => undefined
  8557. */
  8558. function head(array) {
  8559. return (array && array.length) ? array[0] : undefined;
  8560. }
  8561. /**
  8562. * Gets the index at which the first occurrence of `value` is found in `array`
  8563. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  8564. * for equality comparisons. If `fromIndex` is negative, it's used as the
  8565. * offset from the end of `array`.
  8566. *
  8567. * @static
  8568. * @memberOf _
  8569. * @since 0.1.0
  8570. * @category Array
  8571. * @param {Array} array The array to inspect.
  8572. * @param {*} value The value to search for.
  8573. * @param {number} [fromIndex=0] The index to search from.
  8574. * @returns {number} Returns the index of the matched value, else `-1`.
  8575. * @example
  8576. *
  8577. * _.indexOf([1, 2, 1, 2], 2);
  8578. * // => 1
  8579. *
  8580. * // Search from the `fromIndex`.
  8581. * _.indexOf([1, 2, 1, 2], 2, 2);
  8582. * // => 3
  8583. */
  8584. function indexOf(array, value, fromIndex) {
  8585. var length = array == null ? 0 : array.length;
  8586. if (!length) {
  8587. return -1;
  8588. }
  8589. var index = fromIndex == null ? 0 : toInteger(fromIndex);
  8590. if (index < 0) {
  8591. index = nativeMax(length + index, 0);
  8592. }
  8593. return baseIndexOf(array, value, index);
  8594. }
  8595. /**
  8596. * Gets all but the last element of `array`.
  8597. *
  8598. * @static
  8599. * @memberOf _
  8600. * @since 0.1.0
  8601. * @category Array
  8602. * @param {Array} array The array to query.
  8603. * @returns {Array} Returns the slice of `array`.
  8604. * @example
  8605. *
  8606. * _.initial([1, 2, 3]);
  8607. * // => [1, 2]
  8608. */
  8609. function initial(array) {
  8610. var length = array == null ? 0 : array.length;
  8611. return length ? baseSlice(array, 0, -1) : [];
  8612. }
  8613. /**
  8614. * Creates an array of unique values that are included in all given arrays
  8615. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  8616. * for equality comparisons. The order and references of result values are
  8617. * determined by the first array.
  8618. *
  8619. * @static
  8620. * @memberOf _
  8621. * @since 0.1.0
  8622. * @category Array
  8623. * @param {...Array} [arrays] The arrays to inspect.
  8624. * @returns {Array} Returns the new array of intersecting values.
  8625. * @example
  8626. *
  8627. * _.intersection([2, 1], [2, 3]);
  8628. * // => [2]
  8629. */
  8630. var intersection = baseRest(function(arrays) {
  8631. var mapped = arrayMap(arrays, castArrayLikeObject);
  8632. return (mapped.length && mapped[0] === arrays[0])
  8633. ? baseIntersection(mapped)
  8634. : [];
  8635. });
  8636. /**
  8637. * This method is like `_.intersection` except that it accepts `iteratee`
  8638. * which is invoked for each element of each `arrays` to generate the criterion
  8639. * by which they're compared. The order and references of result values are
  8640. * determined by the first array. The iteratee is invoked with one argument:
  8641. * (value).
  8642. *
  8643. * @static
  8644. * @memberOf _
  8645. * @since 4.0.0
  8646. * @category Array
  8647. * @param {...Array} [arrays] The arrays to inspect.
  8648. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  8649. * @returns {Array} Returns the new array of intersecting values.
  8650. * @example
  8651. *
  8652. * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
  8653. * // => [2.1]
  8654. *
  8655. * // The `_.property` iteratee shorthand.
  8656. * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
  8657. * // => [{ 'x': 1 }]
  8658. */
  8659. var intersectionBy = baseRest(function(arrays) {
  8660. var iteratee = last(arrays),
  8661. mapped = arrayMap(arrays, castArrayLikeObject);
  8662. if (iteratee === last(mapped)) {
  8663. iteratee = undefined;
  8664. } else {
  8665. mapped.pop();
  8666. }
  8667. return (mapped.length && mapped[0] === arrays[0])
  8668. ? baseIntersection(mapped, getIteratee(iteratee, 2))
  8669. : [];
  8670. });
  8671. /**
  8672. * This method is like `_.intersection` except that it accepts `comparator`
  8673. * which is invoked to compare elements of `arrays`. The order and references
  8674. * of result values are determined by the first array. The comparator is
  8675. * invoked with two arguments: (arrVal, othVal).
  8676. *
  8677. * @static
  8678. * @memberOf _
  8679. * @since 4.0.0
  8680. * @category Array
  8681. * @param {...Array} [arrays] The arrays to inspect.
  8682. * @param {Function} [comparator] The comparator invoked per element.
  8683. * @returns {Array} Returns the new array of intersecting values.
  8684. * @example
  8685. *
  8686. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  8687. * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
  8688. *
  8689. * _.intersectionWith(objects, others, _.isEqual);
  8690. * // => [{ 'x': 1, 'y': 2 }]
  8691. */
  8692. var intersectionWith = baseRest(function(arrays) {
  8693. var comparator = last(arrays),
  8694. mapped = arrayMap(arrays, castArrayLikeObject);
  8695. comparator = typeof comparator == 'function' ? comparator : undefined;
  8696. if (comparator) {
  8697. mapped.pop();
  8698. }
  8699. return (mapped.length && mapped[0] === arrays[0])
  8700. ? baseIntersection(mapped, undefined, comparator)
  8701. : [];
  8702. });
  8703. /**
  8704. * Converts all elements in `array` into a string separated by `separator`.
  8705. *
  8706. * @static
  8707. * @memberOf _
  8708. * @since 4.0.0
  8709. * @category Array
  8710. * @param {Array} array The array to convert.
  8711. * @param {string} [separator=','] The element separator.
  8712. * @returns {string} Returns the joined string.
  8713. * @example
  8714. *
  8715. * _.join(['a', 'b', 'c'], '~');
  8716. * // => 'a~b~c'
  8717. */
  8718. function join(array, separator) {
  8719. return array == null ? '' : nativeJoin.call(array, separator);
  8720. }
  8721. /**
  8722. * Gets the last element of `array`.
  8723. *
  8724. * @static
  8725. * @memberOf _
  8726. * @since 0.1.0
  8727. * @category Array
  8728. * @param {Array} array The array to query.
  8729. * @returns {*} Returns the last element of `array`.
  8730. * @example
  8731. *
  8732. * _.last([1, 2, 3]);
  8733. * // => 3
  8734. */
  8735. function last(array) {
  8736. var length = array == null ? 0 : array.length;
  8737. return length ? array[length - 1] : undefined;
  8738. }
  8739. /**
  8740. * This method is like `_.indexOf` except that it iterates over elements of
  8741. * `array` from right to left.
  8742. *
  8743. * @static
  8744. * @memberOf _
  8745. * @since 0.1.0
  8746. * @category Array
  8747. * @param {Array} array The array to inspect.
  8748. * @param {*} value The value to search for.
  8749. * @param {number} [fromIndex=array.length-1] The index to search from.
  8750. * @returns {number} Returns the index of the matched value, else `-1`.
  8751. * @example
  8752. *
  8753. * _.lastIndexOf([1, 2, 1, 2], 2);
  8754. * // => 3
  8755. *
  8756. * // Search from the `fromIndex`.
  8757. * _.lastIndexOf([1, 2, 1, 2], 2, 2);
  8758. * // => 1
  8759. */
  8760. function lastIndexOf(array, value, fromIndex) {
  8761. var length = array == null ? 0 : array.length;
  8762. if (!length) {
  8763. return -1;
  8764. }
  8765. var index = length;
  8766. if (fromIndex !== undefined) {
  8767. index = toInteger(fromIndex);
  8768. index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
  8769. }
  8770. return value === value
  8771. ? strictLastIndexOf(array, value, index)
  8772. : baseFindIndex(array, baseIsNaN, index, true);
  8773. }
  8774. /**
  8775. * Gets the element at index `n` of `array`. If `n` is negative, the nth
  8776. * element from the end is returned.
  8777. *
  8778. * @static
  8779. * @memberOf _
  8780. * @since 4.11.0
  8781. * @category Array
  8782. * @param {Array} array The array to query.
  8783. * @param {number} [n=0] The index of the element to return.
  8784. * @returns {*} Returns the nth element of `array`.
  8785. * @example
  8786. *
  8787. * var array = ['a', 'b', 'c', 'd'];
  8788. *
  8789. * _.nth(array, 1);
  8790. * // => 'b'
  8791. *
  8792. * _.nth(array, -2);
  8793. * // => 'c';
  8794. */
  8795. function nth(array, n) {
  8796. return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
  8797. }
  8798. /**
  8799. * Removes all given values from `array` using
  8800. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  8801. * for equality comparisons.
  8802. *
  8803. * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
  8804. * to remove elements from an array by predicate.
  8805. *
  8806. * @static
  8807. * @memberOf _
  8808. * @since 2.0.0
  8809. * @category Array
  8810. * @param {Array} array The array to modify.
  8811. * @param {...*} [values] The values to remove.
  8812. * @returns {Array} Returns `array`.
  8813. * @example
  8814. *
  8815. * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
  8816. *
  8817. * _.pull(array, 'a', 'c');
  8818. * console.log(array);
  8819. * // => ['b', 'b']
  8820. */
  8821. var pull = baseRest(pullAll);
  8822. /**
  8823. * This method is like `_.pull` except that it accepts an array of values to remove.
  8824. *
  8825. * **Note:** Unlike `_.difference`, this method mutates `array`.
  8826. *
  8827. * @static
  8828. * @memberOf _
  8829. * @since 4.0.0
  8830. * @category Array
  8831. * @param {Array} array The array to modify.
  8832. * @param {Array} values The values to remove.
  8833. * @returns {Array} Returns `array`.
  8834. * @example
  8835. *
  8836. * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
  8837. *
  8838. * _.pullAll(array, ['a', 'c']);
  8839. * console.log(array);
  8840. * // => ['b', 'b']
  8841. */
  8842. function pullAll(array, values) {
  8843. return (array && array.length && values && values.length)
  8844. ? basePullAll(array, values)
  8845. : array;
  8846. }
  8847. /**
  8848. * This method is like `_.pullAll` except that it accepts `iteratee` which is
  8849. * invoked for each element of `array` and `values` to generate the criterion
  8850. * by which they're compared. The iteratee is invoked with one argument: (value).
  8851. *
  8852. * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
  8853. *
  8854. * @static
  8855. * @memberOf _
  8856. * @since 4.0.0
  8857. * @category Array
  8858. * @param {Array} array The array to modify.
  8859. * @param {Array} values The values to remove.
  8860. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  8861. * @returns {Array} Returns `array`.
  8862. * @example
  8863. *
  8864. * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
  8865. *
  8866. * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
  8867. * console.log(array);
  8868. * // => [{ 'x': 2 }]
  8869. */
  8870. function pullAllBy(array, values, iteratee) {
  8871. return (array && array.length && values && values.length)
  8872. ? basePullAll(array, values, getIteratee(iteratee, 2))
  8873. : array;
  8874. }
  8875. /**
  8876. * This method is like `_.pullAll` except that it accepts `comparator` which
  8877. * is invoked to compare elements of `array` to `values`. The comparator is
  8878. * invoked with two arguments: (arrVal, othVal).
  8879. *
  8880. * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
  8881. *
  8882. * @static
  8883. * @memberOf _
  8884. * @since 4.6.0
  8885. * @category Array
  8886. * @param {Array} array The array to modify.
  8887. * @param {Array} values The values to remove.
  8888. * @param {Function} [comparator] The comparator invoked per element.
  8889. * @returns {Array} Returns `array`.
  8890. * @example
  8891. *
  8892. * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
  8893. *
  8894. * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
  8895. * console.log(array);
  8896. * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
  8897. */
  8898. function pullAllWith(array, values, comparator) {
  8899. return (array && array.length && values && values.length)
  8900. ? basePullAll(array, values, undefined, comparator)
  8901. : array;
  8902. }
  8903. /**
  8904. * Removes elements from `array` corresponding to `indexes` and returns an
  8905. * array of removed elements.
  8906. *
  8907. * **Note:** Unlike `_.at`, this method mutates `array`.
  8908. *
  8909. * @static
  8910. * @memberOf _
  8911. * @since 3.0.0
  8912. * @category Array
  8913. * @param {Array} array The array to modify.
  8914. * @param {...(number|number[])} [indexes] The indexes of elements to remove.
  8915. * @returns {Array} Returns the new array of removed elements.
  8916. * @example
  8917. *
  8918. * var array = ['a', 'b', 'c', 'd'];
  8919. * var pulled = _.pullAt(array, [1, 3]);
  8920. *
  8921. * console.log(array);
  8922. * // => ['a', 'c']
  8923. *
  8924. * console.log(pulled);
  8925. * // => ['b', 'd']
  8926. */
  8927. var pullAt = flatRest(function(array, indexes) {
  8928. var length = array == null ? 0 : array.length,
  8929. result = baseAt(array, indexes);
  8930. basePullAt(array, arrayMap(indexes, function(index) {
  8931. return isIndex(index, length) ? +index : index;
  8932. }).sort(compareAscending));
  8933. return result;
  8934. });
  8935. /**
  8936. * Removes all elements from `array` that `predicate` returns truthy for
  8937. * and returns an array of the removed elements. The predicate is invoked
  8938. * with three arguments: (value, index, array).
  8939. *
  8940. * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
  8941. * to pull elements from an array by value.
  8942. *
  8943. * @static
  8944. * @memberOf _
  8945. * @since 2.0.0
  8946. * @category Array
  8947. * @param {Array} array The array to modify.
  8948. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  8949. * @returns {Array} Returns the new array of removed elements.
  8950. * @example
  8951. *
  8952. * var array = [1, 2, 3, 4];
  8953. * var evens = _.remove(array, function(n) {
  8954. * return n % 2 == 0;
  8955. * });
  8956. *
  8957. * console.log(array);
  8958. * // => [1, 3]
  8959. *
  8960. * console.log(evens);
  8961. * // => [2, 4]
  8962. */
  8963. function remove(array, predicate) {
  8964. var result = [];
  8965. if (!(array && array.length)) {
  8966. return result;
  8967. }
  8968. var index = -1,
  8969. indexes = [],
  8970. length = array.length;
  8971. predicate = getIteratee(predicate, 3);
  8972. while (++index < length) {
  8973. var value = array[index];
  8974. if (predicate(value, index, array)) {
  8975. result.push(value);
  8976. indexes.push(index);
  8977. }
  8978. }
  8979. basePullAt(array, indexes);
  8980. return result;
  8981. }
  8982. /**
  8983. * Reverses `array` so that the first element becomes the last, the second
  8984. * element becomes the second to last, and so on.
  8985. *
  8986. * **Note:** This method mutates `array` and is based on
  8987. * [`Array#reverse`](https://mdn.io/Array/reverse).
  8988. *
  8989. * @static
  8990. * @memberOf _
  8991. * @since 4.0.0
  8992. * @category Array
  8993. * @param {Array} array The array to modify.
  8994. * @returns {Array} Returns `array`.
  8995. * @example
  8996. *
  8997. * var array = [1, 2, 3];
  8998. *
  8999. * _.reverse(array);
  9000. * // => [3, 2, 1]
  9001. *
  9002. * console.log(array);
  9003. * // => [3, 2, 1]
  9004. */
  9005. function reverse(array) {
  9006. return array == null ? array : nativeReverse.call(array);
  9007. }
  9008. /**
  9009. * Creates a slice of `array` from `start` up to, but not including, `end`.
  9010. *
  9011. * **Note:** This method is used instead of
  9012. * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
  9013. * returned.
  9014. *
  9015. * @static
  9016. * @memberOf _
  9017. * @since 3.0.0
  9018. * @category Array
  9019. * @param {Array} array The array to slice.
  9020. * @param {number} [start=0] The start position.
  9021. * @param {number} [end=array.length] The end position.
  9022. * @returns {Array} Returns the slice of `array`.
  9023. */
  9024. function slice(array, start, end) {
  9025. var length = array == null ? 0 : array.length;
  9026. if (!length) {
  9027. return [];
  9028. }
  9029. if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
  9030. start = 0;
  9031. end = length;
  9032. }
  9033. else {
  9034. start = start == null ? 0 : toInteger(start);
  9035. end = end === undefined ? length : toInteger(end);
  9036. }
  9037. return baseSlice(array, start, end);
  9038. }
  9039. /**
  9040. * Uses a binary search to determine the lowest index at which `value`
  9041. * should be inserted into `array` in order to maintain its sort order.
  9042. *
  9043. * @static
  9044. * @memberOf _
  9045. * @since 0.1.0
  9046. * @category Array
  9047. * @param {Array} array The sorted array to inspect.
  9048. * @param {*} value The value to evaluate.
  9049. * @returns {number} Returns the index at which `value` should be inserted
  9050. * into `array`.
  9051. * @example
  9052. *
  9053. * _.sortedIndex([30, 50], 40);
  9054. * // => 1
  9055. */
  9056. function sortedIndex(array, value) {
  9057. return baseSortedIndex(array, value);
  9058. }
  9059. /**
  9060. * This method is like `_.sortedIndex` except that it accepts `iteratee`
  9061. * which is invoked for `value` and each element of `array` to compute their
  9062. * sort ranking. The iteratee is invoked with one argument: (value).
  9063. *
  9064. * @static
  9065. * @memberOf _
  9066. * @since 4.0.0
  9067. * @category Array
  9068. * @param {Array} array The sorted array to inspect.
  9069. * @param {*} value The value to evaluate.
  9070. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  9071. * @returns {number} Returns the index at which `value` should be inserted
  9072. * into `array`.
  9073. * @example
  9074. *
  9075. * var objects = [{ 'x': 4 }, { 'x': 5 }];
  9076. *
  9077. * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
  9078. * // => 0
  9079. *
  9080. * // The `_.property` iteratee shorthand.
  9081. * _.sortedIndexBy(objects, { 'x': 4 }, 'x');
  9082. * // => 0
  9083. */
  9084. function sortedIndexBy(array, value, iteratee) {
  9085. return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));
  9086. }
  9087. /**
  9088. * This method is like `_.indexOf` except that it performs a binary
  9089. * search on a sorted `array`.
  9090. *
  9091. * @static
  9092. * @memberOf _
  9093. * @since 4.0.0
  9094. * @category Array
  9095. * @param {Array} array The array to inspect.
  9096. * @param {*} value The value to search for.
  9097. * @returns {number} Returns the index of the matched value, else `-1`.
  9098. * @example
  9099. *
  9100. * _.sortedIndexOf([4, 5, 5, 5, 6], 5);
  9101. * // => 1
  9102. */
  9103. function sortedIndexOf(array, value) {
  9104. var length = array == null ? 0 : array.length;
  9105. if (length) {
  9106. var index = baseSortedIndex(array, value);
  9107. if (index < length && eq(array[index], value)) {
  9108. return index;
  9109. }
  9110. }
  9111. return -1;
  9112. }
  9113. /**
  9114. * This method is like `_.sortedIndex` except that it returns the highest
  9115. * index at which `value` should be inserted into `array` in order to
  9116. * maintain its sort order.
  9117. *
  9118. * @static
  9119. * @memberOf _
  9120. * @since 3.0.0
  9121. * @category Array
  9122. * @param {Array} array The sorted array to inspect.
  9123. * @param {*} value The value to evaluate.
  9124. * @returns {number} Returns the index at which `value` should be inserted
  9125. * into `array`.
  9126. * @example
  9127. *
  9128. * _.sortedLastIndex([4, 5, 5, 5, 6], 5);
  9129. * // => 4
  9130. */
  9131. function sortedLastIndex(array, value) {
  9132. return baseSortedIndex(array, value, true);
  9133. }
  9134. /**
  9135. * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
  9136. * which is invoked for `value` and each element of `array` to compute their
  9137. * sort ranking. The iteratee is invoked with one argument: (value).
  9138. *
  9139. * @static
  9140. * @memberOf _
  9141. * @since 4.0.0
  9142. * @category Array
  9143. * @param {Array} array The sorted array to inspect.
  9144. * @param {*} value The value to evaluate.
  9145. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  9146. * @returns {number} Returns the index at which `value` should be inserted
  9147. * into `array`.
  9148. * @example
  9149. *
  9150. * var objects = [{ 'x': 4 }, { 'x': 5 }];
  9151. *
  9152. * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
  9153. * // => 1
  9154. *
  9155. * // The `_.property` iteratee shorthand.
  9156. * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');
  9157. * // => 1
  9158. */
  9159. function sortedLastIndexBy(array, value, iteratee) {
  9160. return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);
  9161. }
  9162. /**
  9163. * This method is like `_.lastIndexOf` except that it performs a binary
  9164. * search on a sorted `array`.
  9165. *
  9166. * @static
  9167. * @memberOf _
  9168. * @since 4.0.0
  9169. * @category Array
  9170. * @param {Array} array The array to inspect.
  9171. * @param {*} value The value to search for.
  9172. * @returns {number} Returns the index of the matched value, else `-1`.
  9173. * @example
  9174. *
  9175. * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
  9176. * // => 3
  9177. */
  9178. function sortedLastIndexOf(array, value) {
  9179. var length = array == null ? 0 : array.length;
  9180. if (length) {
  9181. var index = baseSortedIndex(array, value, true) - 1;
  9182. if (eq(array[index], value)) {
  9183. return index;
  9184. }
  9185. }
  9186. return -1;
  9187. }
  9188. /**
  9189. * This method is like `_.uniq` except that it's designed and optimized
  9190. * for sorted arrays.
  9191. *
  9192. * @static
  9193. * @memberOf _
  9194. * @since 4.0.0
  9195. * @category Array
  9196. * @param {Array} array The array to inspect.
  9197. * @returns {Array} Returns the new duplicate free array.
  9198. * @example
  9199. *
  9200. * _.sortedUniq([1, 1, 2]);
  9201. * // => [1, 2]
  9202. */
  9203. function sortedUniq(array) {
  9204. return (array && array.length)
  9205. ? baseSortedUniq(array)
  9206. : [];
  9207. }
  9208. /**
  9209. * This method is like `_.uniqBy` except that it's designed and optimized
  9210. * for sorted arrays.
  9211. *
  9212. * @static
  9213. * @memberOf _
  9214. * @since 4.0.0
  9215. * @category Array
  9216. * @param {Array} array The array to inspect.
  9217. * @param {Function} [iteratee] The iteratee invoked per element.
  9218. * @returns {Array} Returns the new duplicate free array.
  9219. * @example
  9220. *
  9221. * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
  9222. * // => [1.1, 2.3]
  9223. */
  9224. function sortedUniqBy(array, iteratee) {
  9225. return (array && array.length)
  9226. ? baseSortedUniq(array, getIteratee(iteratee, 2))
  9227. : [];
  9228. }
  9229. /**
  9230. * Gets all but the first element of `array`.
  9231. *
  9232. * @static
  9233. * @memberOf _
  9234. * @since 4.0.0
  9235. * @category Array
  9236. * @param {Array} array The array to query.
  9237. * @returns {Array} Returns the slice of `array`.
  9238. * @example
  9239. *
  9240. * _.tail([1, 2, 3]);
  9241. * // => [2, 3]
  9242. */
  9243. function tail(array) {
  9244. var length = array == null ? 0 : array.length;
  9245. return length ? baseSlice(array, 1, length) : [];
  9246. }
  9247. /**
  9248. * Creates a slice of `array` with `n` elements taken from the beginning.
  9249. *
  9250. * @static
  9251. * @memberOf _
  9252. * @since 0.1.0
  9253. * @category Array
  9254. * @param {Array} array The array to query.
  9255. * @param {number} [n=1] The number of elements to take.
  9256. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  9257. * @returns {Array} Returns the slice of `array`.
  9258. * @example
  9259. *
  9260. * _.take([1, 2, 3]);
  9261. * // => [1]
  9262. *
  9263. * _.take([1, 2, 3], 2);
  9264. * // => [1, 2]
  9265. *
  9266. * _.take([1, 2, 3], 5);
  9267. * // => [1, 2, 3]
  9268. *
  9269. * _.take([1, 2, 3], 0);
  9270. * // => []
  9271. */
  9272. function take(array, n, guard) {
  9273. if (!(array && array.length)) {
  9274. return [];
  9275. }
  9276. n = (guard || n === undefined) ? 1 : toInteger(n);
  9277. return baseSlice(array, 0, n < 0 ? 0 : n);
  9278. }
  9279. /**
  9280. * Creates a slice of `array` with `n` elements taken from the end.
  9281. *
  9282. * @static
  9283. * @memberOf _
  9284. * @since 3.0.0
  9285. * @category Array
  9286. * @param {Array} array The array to query.
  9287. * @param {number} [n=1] The number of elements to take.
  9288. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  9289. * @returns {Array} Returns the slice of `array`.
  9290. * @example
  9291. *
  9292. * _.takeRight([1, 2, 3]);
  9293. * // => [3]
  9294. *
  9295. * _.takeRight([1, 2, 3], 2);
  9296. * // => [2, 3]
  9297. *
  9298. * _.takeRight([1, 2, 3], 5);
  9299. * // => [1, 2, 3]
  9300. *
  9301. * _.takeRight([1, 2, 3], 0);
  9302. * // => []
  9303. */
  9304. function takeRight(array, n, guard) {
  9305. var length = array == null ? 0 : array.length;
  9306. if (!length) {
  9307. return [];
  9308. }
  9309. n = (guard || n === undefined) ? 1 : toInteger(n);
  9310. n = length - n;
  9311. return baseSlice(array, n < 0 ? 0 : n, length);
  9312. }
  9313. /**
  9314. * Creates a slice of `array` with elements taken from the end. Elements are
  9315. * taken until `predicate` returns falsey. The predicate is invoked with
  9316. * three arguments: (value, index, array).
  9317. *
  9318. * @static
  9319. * @memberOf _
  9320. * @since 3.0.0
  9321. * @category Array
  9322. * @param {Array} array The array to query.
  9323. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  9324. * @returns {Array} Returns the slice of `array`.
  9325. * @example
  9326. *
  9327. * var users = [
  9328. * { 'user': 'barney', 'active': true },
  9329. * { 'user': 'fred', 'active': false },
  9330. * { 'user': 'pebbles', 'active': false }
  9331. * ];
  9332. *
  9333. * _.takeRightWhile(users, function(o) { return !o.active; });
  9334. * // => objects for ['fred', 'pebbles']
  9335. *
  9336. * // The `_.matches` iteratee shorthand.
  9337. * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
  9338. * // => objects for ['pebbles']
  9339. *
  9340. * // The `_.matchesProperty` iteratee shorthand.
  9341. * _.takeRightWhile(users, ['active', false]);
  9342. * // => objects for ['fred', 'pebbles']
  9343. *
  9344. * // The `_.property` iteratee shorthand.
  9345. * _.takeRightWhile(users, 'active');
  9346. * // => []
  9347. */
  9348. function takeRightWhile(array, predicate) {
  9349. return (array && array.length)
  9350. ? baseWhile(array, getIteratee(predicate, 3), false, true)
  9351. : [];
  9352. }
  9353. /**
  9354. * Creates a slice of `array` with elements taken from the beginning. Elements
  9355. * are taken until `predicate` returns falsey. The predicate is invoked with
  9356. * three arguments: (value, index, array).
  9357. *
  9358. * @static
  9359. * @memberOf _
  9360. * @since 3.0.0
  9361. * @category Array
  9362. * @param {Array} array The array to query.
  9363. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  9364. * @returns {Array} Returns the slice of `array`.
  9365. * @example
  9366. *
  9367. * var users = [
  9368. * { 'user': 'barney', 'active': false },
  9369. * { 'user': 'fred', 'active': false },
  9370. * { 'user': 'pebbles', 'active': true }
  9371. * ];
  9372. *
  9373. * _.takeWhile(users, function(o) { return !o.active; });
  9374. * // => objects for ['barney', 'fred']
  9375. *
  9376. * // The `_.matches` iteratee shorthand.
  9377. * _.takeWhile(users, { 'user': 'barney', 'active': false });
  9378. * // => objects for ['barney']
  9379. *
  9380. * // The `_.matchesProperty` iteratee shorthand.
  9381. * _.takeWhile(users, ['active', false]);
  9382. * // => objects for ['barney', 'fred']
  9383. *
  9384. * // The `_.property` iteratee shorthand.
  9385. * _.takeWhile(users, 'active');
  9386. * // => []
  9387. */
  9388. function takeWhile(array, predicate) {
  9389. return (array && array.length)
  9390. ? baseWhile(array, getIteratee(predicate, 3))
  9391. : [];
  9392. }
  9393. /**
  9394. * Creates an array of unique values, in order, from all given arrays using
  9395. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  9396. * for equality comparisons.
  9397. *
  9398. * @static
  9399. * @memberOf _
  9400. * @since 0.1.0
  9401. * @category Array
  9402. * @param {...Array} [arrays] The arrays to inspect.
  9403. * @returns {Array} Returns the new array of combined values.
  9404. * @example
  9405. *
  9406. * _.union([2], [1, 2]);
  9407. * // => [2, 1]
  9408. */
  9409. var union = baseRest(function(arrays) {
  9410. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
  9411. });
  9412. /**
  9413. * This method is like `_.union` except that it accepts `iteratee` which is
  9414. * invoked for each element of each `arrays` to generate the criterion by
  9415. * which uniqueness is computed. Result values are chosen from the first
  9416. * array in which the value occurs. The iteratee is invoked with one argument:
  9417. * (value).
  9418. *
  9419. * @static
  9420. * @memberOf _
  9421. * @since 4.0.0
  9422. * @category Array
  9423. * @param {...Array} [arrays] The arrays to inspect.
  9424. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  9425. * @returns {Array} Returns the new array of combined values.
  9426. * @example
  9427. *
  9428. * _.unionBy([2.1], [1.2, 2.3], Math.floor);
  9429. * // => [2.1, 1.2]
  9430. *
  9431. * // The `_.property` iteratee shorthand.
  9432. * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
  9433. * // => [{ 'x': 1 }, { 'x': 2 }]
  9434. */
  9435. var unionBy = baseRest(function(arrays) {
  9436. var iteratee = last(arrays);
  9437. if (isArrayLikeObject(iteratee)) {
  9438. iteratee = undefined;
  9439. }
  9440. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));
  9441. });
  9442. /**
  9443. * This method is like `_.union` except that it accepts `comparator` which
  9444. * is invoked to compare elements of `arrays`. Result values are chosen from
  9445. * the first array in which the value occurs. The comparator is invoked
  9446. * with two arguments: (arrVal, othVal).
  9447. *
  9448. * @static
  9449. * @memberOf _
  9450. * @since 4.0.0
  9451. * @category Array
  9452. * @param {...Array} [arrays] The arrays to inspect.
  9453. * @param {Function} [comparator] The comparator invoked per element.
  9454. * @returns {Array} Returns the new array of combined values.
  9455. * @example
  9456. *
  9457. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  9458. * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
  9459. *
  9460. * _.unionWith(objects, others, _.isEqual);
  9461. * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
  9462. */
  9463. var unionWith = baseRest(function(arrays) {
  9464. var comparator = last(arrays);
  9465. comparator = typeof comparator == 'function' ? comparator : undefined;
  9466. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
  9467. });
  9468. /**
  9469. * Creates a duplicate-free version of an array, using
  9470. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  9471. * for equality comparisons, in which only the first occurrence of each element
  9472. * is kept. The order of result values is determined by the order they occur
  9473. * in the array.
  9474. *
  9475. * @static
  9476. * @memberOf _
  9477. * @since 0.1.0
  9478. * @category Array
  9479. * @param {Array} array The array to inspect.
  9480. * @returns {Array} Returns the new duplicate free array.
  9481. * @example
  9482. *
  9483. * _.uniq([2, 1, 2]);
  9484. * // => [2, 1]
  9485. */
  9486. function uniq(array) {
  9487. return (array && array.length) ? baseUniq(array) : [];
  9488. }
  9489. /**
  9490. * This method is like `_.uniq` except that it accepts `iteratee` which is
  9491. * invoked for each element in `array` to generate the criterion by which
  9492. * uniqueness is computed. The order of result values is determined by the
  9493. * order they occur in the array. The iteratee is invoked with one argument:
  9494. * (value).
  9495. *
  9496. * @static
  9497. * @memberOf _
  9498. * @since 4.0.0
  9499. * @category Array
  9500. * @param {Array} array The array to inspect.
  9501. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  9502. * @returns {Array} Returns the new duplicate free array.
  9503. * @example
  9504. *
  9505. * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
  9506. * // => [2.1, 1.2]
  9507. *
  9508. * // The `_.property` iteratee shorthand.
  9509. * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
  9510. * // => [{ 'x': 1 }, { 'x': 2 }]
  9511. */
  9512. function uniqBy(array, iteratee) {
  9513. return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];
  9514. }
  9515. /**
  9516. * This method is like `_.uniq` except that it accepts `comparator` which
  9517. * is invoked to compare elements of `array`. The order of result values is
  9518. * determined by the order they occur in the array.The comparator is invoked
  9519. * with two arguments: (arrVal, othVal).
  9520. *
  9521. * @static
  9522. * @memberOf _
  9523. * @since 4.0.0
  9524. * @category Array
  9525. * @param {Array} array The array to inspect.
  9526. * @param {Function} [comparator] The comparator invoked per element.
  9527. * @returns {Array} Returns the new duplicate free array.
  9528. * @example
  9529. *
  9530. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
  9531. *
  9532. * _.uniqWith(objects, _.isEqual);
  9533. * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
  9534. */
  9535. function uniqWith(array, comparator) {
  9536. comparator = typeof comparator == 'function' ? comparator : undefined;
  9537. return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
  9538. }
  9539. /**
  9540. * This method is like `_.zip` except that it accepts an array of grouped
  9541. * elements and creates an array regrouping the elements to their pre-zip
  9542. * configuration.
  9543. *
  9544. * @static
  9545. * @memberOf _
  9546. * @since 1.2.0
  9547. * @category Array
  9548. * @param {Array} array The array of grouped elements to process.
  9549. * @returns {Array} Returns the new array of regrouped elements.
  9550. * @example
  9551. *
  9552. * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);
  9553. * // => [['a', 1, true], ['b', 2, false]]
  9554. *
  9555. * _.unzip(zipped);
  9556. * // => [['a', 'b'], [1, 2], [true, false]]
  9557. */
  9558. function unzip(array) {
  9559. if (!(array && array.length)) {
  9560. return [];
  9561. }
  9562. var length = 0;
  9563. array = arrayFilter(array, function(group) {
  9564. if (isArrayLikeObject(group)) {
  9565. length = nativeMax(group.length, length);
  9566. return true;
  9567. }
  9568. });
  9569. return baseTimes(length, function(index) {
  9570. return arrayMap(array, baseProperty(index));
  9571. });
  9572. }
  9573. /**
  9574. * This method is like `_.unzip` except that it accepts `iteratee` to specify
  9575. * how regrouped values should be combined. The iteratee is invoked with the
  9576. * elements of each group: (...group).
  9577. *
  9578. * @static
  9579. * @memberOf _
  9580. * @since 3.8.0
  9581. * @category Array
  9582. * @param {Array} array The array of grouped elements to process.
  9583. * @param {Function} [iteratee=_.identity] The function to combine
  9584. * regrouped values.
  9585. * @returns {Array} Returns the new array of regrouped elements.
  9586. * @example
  9587. *
  9588. * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
  9589. * // => [[1, 10, 100], [2, 20, 200]]
  9590. *
  9591. * _.unzipWith(zipped, _.add);
  9592. * // => [3, 30, 300]
  9593. */
  9594. function unzipWith(array, iteratee) {
  9595. if (!(array && array.length)) {
  9596. return [];
  9597. }
  9598. var result = unzip(array);
  9599. if (iteratee == null) {
  9600. return result;
  9601. }
  9602. return arrayMap(result, function(group) {
  9603. return apply(iteratee, undefined, group);
  9604. });
  9605. }
  9606. /**
  9607. * Creates an array excluding all given values using
  9608. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  9609. * for equality comparisons.
  9610. *
  9611. * **Note:** Unlike `_.pull`, this method returns a new array.
  9612. *
  9613. * @static
  9614. * @memberOf _
  9615. * @since 0.1.0
  9616. * @category Array
  9617. * @param {Array} array The array to inspect.
  9618. * @param {...*} [values] The values to exclude.
  9619. * @returns {Array} Returns the new array of filtered values.
  9620. * @see _.difference, _.xor
  9621. * @example
  9622. *
  9623. * _.without([2, 1, 2, 3], 1, 2);
  9624. * // => [3]
  9625. */
  9626. var without = baseRest(function(array, values) {
  9627. return isArrayLikeObject(array)
  9628. ? baseDifference(array, values)
  9629. : [];
  9630. });
  9631. /**
  9632. * Creates an array of unique values that is the
  9633. * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
  9634. * of the given arrays. The order of result values is determined by the order
  9635. * they occur in the arrays.
  9636. *
  9637. * @static
  9638. * @memberOf _
  9639. * @since 2.4.0
  9640. * @category Array
  9641. * @param {...Array} [arrays] The arrays to inspect.
  9642. * @returns {Array} Returns the new array of filtered values.
  9643. * @see _.difference, _.without
  9644. * @example
  9645. *
  9646. * _.xor([2, 1], [2, 3]);
  9647. * // => [1, 3]
  9648. */
  9649. var xor = baseRest(function(arrays) {
  9650. return baseXor(arrayFilter(arrays, isArrayLikeObject));
  9651. });
  9652. /**
  9653. * This method is like `_.xor` except that it accepts `iteratee` which is
  9654. * invoked for each element of each `arrays` to generate the criterion by
  9655. * which by which they're compared. The order of result values is determined
  9656. * by the order they occur in the arrays. The iteratee is invoked with one
  9657. * argument: (value).
  9658. *
  9659. * @static
  9660. * @memberOf _
  9661. * @since 4.0.0
  9662. * @category Array
  9663. * @param {...Array} [arrays] The arrays to inspect.
  9664. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  9665. * @returns {Array} Returns the new array of filtered values.
  9666. * @example
  9667. *
  9668. * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);
  9669. * // => [1.2, 3.4]
  9670. *
  9671. * // The `_.property` iteratee shorthand.
  9672. * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
  9673. * // => [{ 'x': 2 }]
  9674. */
  9675. var xorBy = baseRest(function(arrays) {
  9676. var iteratee = last(arrays);
  9677. if (isArrayLikeObject(iteratee)) {
  9678. iteratee = undefined;
  9679. }
  9680. return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));
  9681. });
  9682. /**
  9683. * This method is like `_.xor` except that it accepts `comparator` which is
  9684. * invoked to compare elements of `arrays`. The order of result values is
  9685. * determined by the order they occur in the arrays. The comparator is invoked
  9686. * with two arguments: (arrVal, othVal).
  9687. *
  9688. * @static
  9689. * @memberOf _
  9690. * @since 4.0.0
  9691. * @category Array
  9692. * @param {...Array} [arrays] The arrays to inspect.
  9693. * @param {Function} [comparator] The comparator invoked per element.
  9694. * @returns {Array} Returns the new array of filtered values.
  9695. * @example
  9696. *
  9697. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  9698. * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
  9699. *
  9700. * _.xorWith(objects, others, _.isEqual);
  9701. * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
  9702. */
  9703. var xorWith = baseRest(function(arrays) {
  9704. var comparator = last(arrays);
  9705. comparator = typeof comparator == 'function' ? comparator : undefined;
  9706. return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
  9707. });
  9708. /**
  9709. * Creates an array of grouped elements, the first of which contains the
  9710. * first elements of the given arrays, the second of which contains the
  9711. * second elements of the given arrays, and so on.
  9712. *
  9713. * @static
  9714. * @memberOf _
  9715. * @since 0.1.0
  9716. * @category Array
  9717. * @param {...Array} [arrays] The arrays to process.
  9718. * @returns {Array} Returns the new array of grouped elements.
  9719. * @example
  9720. *
  9721. * _.zip(['a', 'b'], [1, 2], [true, false]);
  9722. * // => [['a', 1, true], ['b', 2, false]]
  9723. */
  9724. var zip = baseRest(unzip);
  9725. /**
  9726. * This method is like `_.fromPairs` except that it accepts two arrays,
  9727. * one of property identifiers and one of corresponding values.
  9728. *
  9729. * @static
  9730. * @memberOf _
  9731. * @since 0.4.0
  9732. * @category Array
  9733. * @param {Array} [props=[]] The property identifiers.
  9734. * @param {Array} [values=[]] The property values.
  9735. * @returns {Object} Returns the new object.
  9736. * @example
  9737. *
  9738. * _.zipObject(['a', 'b'], [1, 2]);
  9739. * // => { 'a': 1, 'b': 2 }
  9740. */
  9741. function zipObject(props, values) {
  9742. return baseZipObject(props || [], values || [], assignValue);
  9743. }
  9744. /**
  9745. * This method is like `_.zipObject` except that it supports property paths.
  9746. *
  9747. * @static
  9748. * @memberOf _
  9749. * @since 4.1.0
  9750. * @category Array
  9751. * @param {Array} [props=[]] The property identifiers.
  9752. * @param {Array} [values=[]] The property values.
  9753. * @returns {Object} Returns the new object.
  9754. * @example
  9755. *
  9756. * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
  9757. * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
  9758. */
  9759. function zipObjectDeep(props, values) {
  9760. return baseZipObject(props || [], values || [], baseSet);
  9761. }
  9762. /**
  9763. * This method is like `_.zip` except that it accepts `iteratee` to specify
  9764. * how grouped values should be combined. The iteratee is invoked with the
  9765. * elements of each group: (...group).
  9766. *
  9767. * @static
  9768. * @memberOf _
  9769. * @since 3.8.0
  9770. * @category Array
  9771. * @param {...Array} [arrays] The arrays to process.
  9772. * @param {Function} [iteratee=_.identity] The function to combine
  9773. * grouped values.
  9774. * @returns {Array} Returns the new array of grouped elements.
  9775. * @example
  9776. *
  9777. * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
  9778. * return a + b + c;
  9779. * });
  9780. * // => [111, 222]
  9781. */
  9782. var zipWith = baseRest(function(arrays) {
  9783. var length = arrays.length,
  9784. iteratee = length > 1 ? arrays[length - 1] : undefined;
  9785. iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
  9786. return unzipWith(arrays, iteratee);
  9787. });
  9788. /*------------------------------------------------------------------------*/
  9789. /**
  9790. * Creates a `lodash` wrapper instance that wraps `value` with explicit method
  9791. * chain sequences enabled. The result of such sequences must be unwrapped
  9792. * with `_#value`.
  9793. *
  9794. * @static
  9795. * @memberOf _
  9796. * @since 1.3.0
  9797. * @category Seq
  9798. * @param {*} value The value to wrap.
  9799. * @returns {Object} Returns the new `lodash` wrapper instance.
  9800. * @example
  9801. *
  9802. * var users = [
  9803. * { 'user': 'barney', 'age': 36 },
  9804. * { 'user': 'fred', 'age': 40 },
  9805. * { 'user': 'pebbles', 'age': 1 }
  9806. * ];
  9807. *
  9808. * var youngest = _
  9809. * .chain(users)
  9810. * .sortBy('age')
  9811. * .map(function(o) {
  9812. * return o.user + ' is ' + o.age;
  9813. * })
  9814. * .head()
  9815. * .value();
  9816. * // => 'pebbles is 1'
  9817. */
  9818. function chain(value) {
  9819. var result = lodash(value);
  9820. result.__chain__ = true;
  9821. return result;
  9822. }
  9823. /**
  9824. * This method invokes `interceptor` and returns `value`. The interceptor
  9825. * is invoked with one argument; (value). The purpose of this method is to
  9826. * "tap into" a method chain sequence in order to modify intermediate results.
  9827. *
  9828. * @static
  9829. * @memberOf _
  9830. * @since 0.1.0
  9831. * @category Seq
  9832. * @param {*} value The value to provide to `interceptor`.
  9833. * @param {Function} interceptor The function to invoke.
  9834. * @returns {*} Returns `value`.
  9835. * @example
  9836. *
  9837. * _([1, 2, 3])
  9838. * .tap(function(array) {
  9839. * // Mutate input array.
  9840. * array.pop();
  9841. * })
  9842. * .reverse()
  9843. * .value();
  9844. * // => [2, 1]
  9845. */
  9846. function tap(value, interceptor) {
  9847. interceptor(value);
  9848. return value;
  9849. }
  9850. /**
  9851. * This method is like `_.tap` except that it returns the result of `interceptor`.
  9852. * The purpose of this method is to "pass thru" values replacing intermediate
  9853. * results in a method chain sequence.
  9854. *
  9855. * @static
  9856. * @memberOf _
  9857. * @since 3.0.0
  9858. * @category Seq
  9859. * @param {*} value The value to provide to `interceptor`.
  9860. * @param {Function} interceptor The function to invoke.
  9861. * @returns {*} Returns the result of `interceptor`.
  9862. * @example
  9863. *
  9864. * _(' abc ')
  9865. * .chain()
  9866. * .trim()
  9867. * .thru(function(value) {
  9868. * return [value];
  9869. * })
  9870. * .value();
  9871. * // => ['abc']
  9872. */
  9873. function thru(value, interceptor) {
  9874. return interceptor(value);
  9875. }
  9876. /**
  9877. * This method is the wrapper version of `_.at`.
  9878. *
  9879. * @name at
  9880. * @memberOf _
  9881. * @since 1.0.0
  9882. * @category Seq
  9883. * @param {...(string|string[])} [paths] The property paths to pick.
  9884. * @returns {Object} Returns the new `lodash` wrapper instance.
  9885. * @example
  9886. *
  9887. * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
  9888. *
  9889. * _(object).at(['a[0].b.c', 'a[1]']).value();
  9890. * // => [3, 4]
  9891. */
  9892. var wrapperAt = flatRest(function(paths) {
  9893. var length = paths.length,
  9894. start = length ? paths[0] : 0,
  9895. value = this.__wrapped__,
  9896. interceptor = function(object) { return baseAt(object, paths); };
  9897. if (length > 1 || this.__actions__.length ||
  9898. !(value instanceof LazyWrapper) || !isIndex(start)) {
  9899. return this.thru(interceptor);
  9900. }
  9901. value = value.slice(start, +start + (length ? 1 : 0));
  9902. value.__actions__.push({
  9903. 'func': thru,
  9904. 'args': [interceptor],
  9905. 'thisArg': undefined
  9906. });
  9907. return new LodashWrapper(value, this.__chain__).thru(function(array) {
  9908. if (length && !array.length) {
  9909. array.push(undefined);
  9910. }
  9911. return array;
  9912. });
  9913. });
  9914. /**
  9915. * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
  9916. *
  9917. * @name chain
  9918. * @memberOf _
  9919. * @since 0.1.0
  9920. * @category Seq
  9921. * @returns {Object} Returns the new `lodash` wrapper instance.
  9922. * @example
  9923. *
  9924. * var users = [
  9925. * { 'user': 'barney', 'age': 36 },
  9926. * { 'user': 'fred', 'age': 40 }
  9927. * ];
  9928. *
  9929. * // A sequence without explicit chaining.
  9930. * _(users).head();
  9931. * // => { 'user': 'barney', 'age': 36 }
  9932. *
  9933. * // A sequence with explicit chaining.
  9934. * _(users)
  9935. * .chain()
  9936. * .head()
  9937. * .pick('user')
  9938. * .value();
  9939. * // => { 'user': 'barney' }
  9940. */
  9941. function wrapperChain() {
  9942. return chain(this);
  9943. }
  9944. /**
  9945. * Executes the chain sequence and returns the wrapped result.
  9946. *
  9947. * @name commit
  9948. * @memberOf _
  9949. * @since 3.2.0
  9950. * @category Seq
  9951. * @returns {Object} Returns the new `lodash` wrapper instance.
  9952. * @example
  9953. *
  9954. * var array = [1, 2];
  9955. * var wrapped = _(array).push(3);
  9956. *
  9957. * console.log(array);
  9958. * // => [1, 2]
  9959. *
  9960. * wrapped = wrapped.commit();
  9961. * console.log(array);
  9962. * // => [1, 2, 3]
  9963. *
  9964. * wrapped.last();
  9965. * // => 3
  9966. *
  9967. * console.log(array);
  9968. * // => [1, 2, 3]
  9969. */
  9970. function wrapperCommit() {
  9971. return new LodashWrapper(this.value(), this.__chain__);
  9972. }
  9973. /**
  9974. * Gets the next value on a wrapped object following the
  9975. * [iterator protocol](https://mdn.io/iteration_protocols#iterator).
  9976. *
  9977. * @name next
  9978. * @memberOf _
  9979. * @since 4.0.0
  9980. * @category Seq
  9981. * @returns {Object} Returns the next iterator value.
  9982. * @example
  9983. *
  9984. * var wrapped = _([1, 2]);
  9985. *
  9986. * wrapped.next();
  9987. * // => { 'done': false, 'value': 1 }
  9988. *
  9989. * wrapped.next();
  9990. * // => { 'done': false, 'value': 2 }
  9991. *
  9992. * wrapped.next();
  9993. * // => { 'done': true, 'value': undefined }
  9994. */
  9995. function wrapperNext() {
  9996. if (this.__values__ === undefined) {
  9997. this.__values__ = toArray(this.value());
  9998. }
  9999. var done = this.__index__ >= this.__values__.length,
  10000. value = done ? undefined : this.__values__[this.__index__++];
  10001. return { 'done': done, 'value': value };
  10002. }
  10003. /**
  10004. * Enables the wrapper to be iterable.
  10005. *
  10006. * @name Symbol.iterator
  10007. * @memberOf _
  10008. * @since 4.0.0
  10009. * @category Seq
  10010. * @returns {Object} Returns the wrapper object.
  10011. * @example
  10012. *
  10013. * var wrapped = _([1, 2]);
  10014. *
  10015. * wrapped[Symbol.iterator]() === wrapped;
  10016. * // => true
  10017. *
  10018. * Array.from(wrapped);
  10019. * // => [1, 2]
  10020. */
  10021. function wrapperToIterator() {
  10022. return this;
  10023. }
  10024. /**
  10025. * Creates a clone of the chain sequence planting `value` as the wrapped value.
  10026. *
  10027. * @name plant
  10028. * @memberOf _
  10029. * @since 3.2.0
  10030. * @category Seq
  10031. * @param {*} value The value to plant.
  10032. * @returns {Object} Returns the new `lodash` wrapper instance.
  10033. * @example
  10034. *
  10035. * function square(n) {
  10036. * return n * n;
  10037. * }
  10038. *
  10039. * var wrapped = _([1, 2]).map(square);
  10040. * var other = wrapped.plant([3, 4]);
  10041. *
  10042. * other.value();
  10043. * // => [9, 16]
  10044. *
  10045. * wrapped.value();
  10046. * // => [1, 4]
  10047. */
  10048. function wrapperPlant(value) {
  10049. var result,
  10050. parent = this;
  10051. while (parent instanceof baseLodash) {
  10052. var clone = wrapperClone(parent);
  10053. clone.__index__ = 0;
  10054. clone.__values__ = undefined;
  10055. if (result) {
  10056. previous.__wrapped__ = clone;
  10057. } else {
  10058. result = clone;
  10059. }
  10060. var previous = clone;
  10061. parent = parent.__wrapped__;
  10062. }
  10063. previous.__wrapped__ = value;
  10064. return result;
  10065. }
  10066. /**
  10067. * This method is the wrapper version of `_.reverse`.
  10068. *
  10069. * **Note:** This method mutates the wrapped array.
  10070. *
  10071. * @name reverse
  10072. * @memberOf _
  10073. * @since 0.1.0
  10074. * @category Seq
  10075. * @returns {Object} Returns the new `lodash` wrapper instance.
  10076. * @example
  10077. *
  10078. * var array = [1, 2, 3];
  10079. *
  10080. * _(array).reverse().value()
  10081. * // => [3, 2, 1]
  10082. *
  10083. * console.log(array);
  10084. * // => [3, 2, 1]
  10085. */
  10086. function wrapperReverse() {
  10087. var value = this.__wrapped__;
  10088. if (value instanceof LazyWrapper) {
  10089. var wrapped = value;
  10090. if (this.__actions__.length) {
  10091. wrapped = new LazyWrapper(this);
  10092. }
  10093. wrapped = wrapped.reverse();
  10094. wrapped.__actions__.push({
  10095. 'func': thru,
  10096. 'args': [reverse],
  10097. 'thisArg': undefined
  10098. });
  10099. return new LodashWrapper(wrapped, this.__chain__);
  10100. }
  10101. return this.thru(reverse);
  10102. }
  10103. /**
  10104. * Executes the chain sequence to resolve the unwrapped value.
  10105. *
  10106. * @name value
  10107. * @memberOf _
  10108. * @since 0.1.0
  10109. * @alias toJSON, valueOf
  10110. * @category Seq
  10111. * @returns {*} Returns the resolved unwrapped value.
  10112. * @example
  10113. *
  10114. * _([1, 2, 3]).value();
  10115. * // => [1, 2, 3]
  10116. */
  10117. function wrapperValue() {
  10118. return baseWrapperValue(this.__wrapped__, this.__actions__);
  10119. }
  10120. /*------------------------------------------------------------------------*/
  10121. /**
  10122. * Creates an object composed of keys generated from the results of running
  10123. * each element of `collection` thru `iteratee`. The corresponding value of
  10124. * each key is the number of times the key was returned by `iteratee`. The
  10125. * iteratee is invoked with one argument: (value).
  10126. *
  10127. * @static
  10128. * @memberOf _
  10129. * @since 0.5.0
  10130. * @category Collection
  10131. * @param {Array|Object} collection The collection to iterate over.
  10132. * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
  10133. * @returns {Object} Returns the composed aggregate object.
  10134. * @example
  10135. *
  10136. * _.countBy([6.1, 4.2, 6.3], Math.floor);
  10137. * // => { '4': 1, '6': 2 }
  10138. *
  10139. * // The `_.property` iteratee shorthand.
  10140. * _.countBy(['one', 'two', 'three'], 'length');
  10141. * // => { '3': 2, '5': 1 }
  10142. */
  10143. var countBy = createAggregator(function(result, value, key) {
  10144. if (hasOwnProperty.call(result, key)) {
  10145. ++result[key];
  10146. } else {
  10147. baseAssignValue(result, key, 1);
  10148. }
  10149. });
  10150. /**
  10151. * Checks if `predicate` returns truthy for **all** elements of `collection`.
  10152. * Iteration is stopped once `predicate` returns falsey. The predicate is
  10153. * invoked with three arguments: (value, index|key, collection).
  10154. *
  10155. * **Note:** This method returns `true` for
  10156. * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
  10157. * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
  10158. * elements of empty collections.
  10159. *
  10160. * @static
  10161. * @memberOf _
  10162. * @since 0.1.0
  10163. * @category Collection
  10164. * @param {Array|Object} collection The collection to iterate over.
  10165. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  10166. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  10167. * @returns {boolean} Returns `true` if all elements pass the predicate check,
  10168. * else `false`.
  10169. * @example
  10170. *
  10171. * _.every([true, 1, null, 'yes'], Boolean);
  10172. * // => false
  10173. *
  10174. * var users = [
  10175. * { 'user': 'barney', 'age': 36, 'active': false },
  10176. * { 'user': 'fred', 'age': 40, 'active': false }
  10177. * ];
  10178. *
  10179. * // The `_.matches` iteratee shorthand.
  10180. * _.every(users, { 'user': 'barney', 'active': false });
  10181. * // => false
  10182. *
  10183. * // The `_.matchesProperty` iteratee shorthand.
  10184. * _.every(users, ['active', false]);
  10185. * // => true
  10186. *
  10187. * // The `_.property` iteratee shorthand.
  10188. * _.every(users, 'active');
  10189. * // => false
  10190. */
  10191. function every(collection, predicate, guard) {
  10192. var func = isArray(collection) ? arrayEvery : baseEvery;
  10193. if (guard && isIterateeCall(collection, predicate, guard)) {
  10194. predicate = undefined;
  10195. }
  10196. return func(collection, getIteratee(predicate, 3));
  10197. }
  10198. /**
  10199. * Iterates over elements of `collection`, returning an array of all elements
  10200. * `predicate` returns truthy for. The predicate is invoked with three
  10201. * arguments: (value, index|key, collection).
  10202. *
  10203. * **Note:** Unlike `_.remove`, this method returns a new array.
  10204. *
  10205. * @static
  10206. * @memberOf _
  10207. * @since 0.1.0
  10208. * @category Collection
  10209. * @param {Array|Object} collection The collection to iterate over.
  10210. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  10211. * @returns {Array} Returns the new filtered array.
  10212. * @see _.reject
  10213. * @example
  10214. *
  10215. * var users = [
  10216. * { 'user': 'barney', 'age': 36, 'active': true },
  10217. * { 'user': 'fred', 'age': 40, 'active': false }
  10218. * ];
  10219. *
  10220. * _.filter(users, function(o) { return !o.active; });
  10221. * // => objects for ['fred']
  10222. *
  10223. * // The `_.matches` iteratee shorthand.
  10224. * _.filter(users, { 'age': 36, 'active': true });
  10225. * // => objects for ['barney']
  10226. *
  10227. * // The `_.matchesProperty` iteratee shorthand.
  10228. * _.filter(users, ['active', false]);
  10229. * // => objects for ['fred']
  10230. *
  10231. * // The `_.property` iteratee shorthand.
  10232. * _.filter(users, 'active');
  10233. * // => objects for ['barney']
  10234. *
  10235. * // Combining several predicates using `_.overEvery` or `_.overSome`.
  10236. * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));
  10237. * // => objects for ['fred', 'barney']
  10238. */
  10239. function filter(collection, predicate) {
  10240. var func = isArray(collection) ? arrayFilter : baseFilter;
  10241. return func(collection, getIteratee(predicate, 3));
  10242. }
  10243. /**
  10244. * Iterates over elements of `collection`, returning the first element
  10245. * `predicate` returns truthy for. The predicate is invoked with three
  10246. * arguments: (value, index|key, collection).
  10247. *
  10248. * @static
  10249. * @memberOf _
  10250. * @since 0.1.0
  10251. * @category Collection
  10252. * @param {Array|Object} collection The collection to inspect.
  10253. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  10254. * @param {number} [fromIndex=0] The index to search from.
  10255. * @returns {*} Returns the matched element, else `undefined`.
  10256. * @example
  10257. *
  10258. * var users = [
  10259. * { 'user': 'barney', 'age': 36, 'active': true },
  10260. * { 'user': 'fred', 'age': 40, 'active': false },
  10261. * { 'user': 'pebbles', 'age': 1, 'active': true }
  10262. * ];
  10263. *
  10264. * _.find(users, function(o) { return o.age < 40; });
  10265. * // => object for 'barney'
  10266. *
  10267. * // The `_.matches` iteratee shorthand.
  10268. * _.find(users, { 'age': 1, 'active': true });
  10269. * // => object for 'pebbles'
  10270. *
  10271. * // The `_.matchesProperty` iteratee shorthand.
  10272. * _.find(users, ['active', false]);
  10273. * // => object for 'fred'
  10274. *
  10275. * // The `_.property` iteratee shorthand.
  10276. * _.find(users, 'active');
  10277. * // => object for 'barney'
  10278. */
  10279. var find = createFind(findIndex);
  10280. /**
  10281. * This method is like `_.find` except that it iterates over elements of
  10282. * `collection` from right to left.
  10283. *
  10284. * @static
  10285. * @memberOf _
  10286. * @since 2.0.0
  10287. * @category Collection
  10288. * @param {Array|Object} collection The collection to inspect.
  10289. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  10290. * @param {number} [fromIndex=collection.length-1] The index to search from.
  10291. * @returns {*} Returns the matched element, else `undefined`.
  10292. * @example
  10293. *
  10294. * _.findLast([1, 2, 3, 4], function(n) {
  10295. * return n % 2 == 1;
  10296. * });
  10297. * // => 3
  10298. */
  10299. var findLast = createFind(findLastIndex);
  10300. /**
  10301. * Creates a flattened array of values by running each element in `collection`
  10302. * thru `iteratee` and flattening the mapped results. The iteratee is invoked
  10303. * with three arguments: (value, index|key, collection).
  10304. *
  10305. * @static
  10306. * @memberOf _
  10307. * @since 4.0.0
  10308. * @category Collection
  10309. * @param {Array|Object} collection The collection to iterate over.
  10310. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  10311. * @returns {Array} Returns the new flattened array.
  10312. * @example
  10313. *
  10314. * function duplicate(n) {
  10315. * return [n, n];
  10316. * }
  10317. *
  10318. * _.flatMap([1, 2], duplicate);
  10319. * // => [1, 1, 2, 2]
  10320. */
  10321. function flatMap(collection, iteratee) {
  10322. return baseFlatten(map(collection, iteratee), 1);
  10323. }
  10324. /**
  10325. * This method is like `_.flatMap` except that it recursively flattens the
  10326. * mapped results.
  10327. *
  10328. * @static
  10329. * @memberOf _
  10330. * @since 4.7.0
  10331. * @category Collection
  10332. * @param {Array|Object} collection The collection to iterate over.
  10333. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  10334. * @returns {Array} Returns the new flattened array.
  10335. * @example
  10336. *
  10337. * function duplicate(n) {
  10338. * return [[[n, n]]];
  10339. * }
  10340. *
  10341. * _.flatMapDeep([1, 2], duplicate);
  10342. * // => [1, 1, 2, 2]
  10343. */
  10344. function flatMapDeep(collection, iteratee) {
  10345. return baseFlatten(map(collection, iteratee), INFINITY);
  10346. }
  10347. /**
  10348. * This method is like `_.flatMap` except that it recursively flattens the
  10349. * mapped results up to `depth` times.
  10350. *
  10351. * @static
  10352. * @memberOf _
  10353. * @since 4.7.0
  10354. * @category Collection
  10355. * @param {Array|Object} collection The collection to iterate over.
  10356. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  10357. * @param {number} [depth=1] The maximum recursion depth.
  10358. * @returns {Array} Returns the new flattened array.
  10359. * @example
  10360. *
  10361. * function duplicate(n) {
  10362. * return [[[n, n]]];
  10363. * }
  10364. *
  10365. * _.flatMapDepth([1, 2], duplicate, 2);
  10366. * // => [[1, 1], [2, 2]]
  10367. */
  10368. function flatMapDepth(collection, iteratee, depth) {
  10369. depth = depth === undefined ? 1 : toInteger(depth);
  10370. return baseFlatten(map(collection, iteratee), depth);
  10371. }
  10372. /**
  10373. * Iterates over elements of `collection` and invokes `iteratee` for each element.
  10374. * The iteratee is invoked with three arguments: (value, index|key, collection).
  10375. * Iteratee functions may exit iteration early by explicitly returning `false`.
  10376. *
  10377. * **Note:** As with other "Collections" methods, objects with a "length"
  10378. * property are iterated like arrays. To avoid this behavior use `_.forIn`
  10379. * or `_.forOwn` for object iteration.
  10380. *
  10381. * @static
  10382. * @memberOf _
  10383. * @since 0.1.0
  10384. * @alias each
  10385. * @category Collection
  10386. * @param {Array|Object} collection The collection to iterate over.
  10387. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  10388. * @returns {Array|Object} Returns `collection`.
  10389. * @see _.forEachRight
  10390. * @example
  10391. *
  10392. * _.forEach([1, 2], function(value) {
  10393. * console.log(value);
  10394. * });
  10395. * // => Logs `1` then `2`.
  10396. *
  10397. * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
  10398. * console.log(key);
  10399. * });
  10400. * // => Logs 'a' then 'b' (iteration order is not guaranteed).
  10401. */
  10402. function forEach(collection, iteratee) {
  10403. var func = isArray(collection) ? arrayEach : baseEach;
  10404. return func(collection, getIteratee(iteratee, 3));
  10405. }
  10406. /**
  10407. * This method is like `_.forEach` except that it iterates over elements of
  10408. * `collection` from right to left.
  10409. *
  10410. * @static
  10411. * @memberOf _
  10412. * @since 2.0.0
  10413. * @alias eachRight
  10414. * @category Collection
  10415. * @param {Array|Object} collection The collection to iterate over.
  10416. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  10417. * @returns {Array|Object} Returns `collection`.
  10418. * @see _.forEach
  10419. * @example
  10420. *
  10421. * _.forEachRight([1, 2], function(value) {
  10422. * console.log(value);
  10423. * });
  10424. * // => Logs `2` then `1`.
  10425. */
  10426. function forEachRight(collection, iteratee) {
  10427. var func = isArray(collection) ? arrayEachRight : baseEachRight;
  10428. return func(collection, getIteratee(iteratee, 3));
  10429. }
  10430. /**
  10431. * Creates an object composed of keys generated from the results of running
  10432. * each element of `collection` thru `iteratee`. The order of grouped values
  10433. * is determined by the order they occur in `collection`. The corresponding
  10434. * value of each key is an array of elements responsible for generating the
  10435. * key. The iteratee is invoked with one argument: (value).
  10436. *
  10437. * @static
  10438. * @memberOf _
  10439. * @since 0.1.0
  10440. * @category Collection
  10441. * @param {Array|Object} collection The collection to iterate over.
  10442. * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
  10443. * @returns {Object} Returns the composed aggregate object.
  10444. * @example
  10445. *
  10446. * _.groupBy([6.1, 4.2, 6.3], Math.floor);
  10447. * // => { '4': [4.2], '6': [6.1, 6.3] }
  10448. *
  10449. * // The `_.property` iteratee shorthand.
  10450. * _.groupBy(['one', 'two', 'three'], 'length');
  10451. * // => { '3': ['one', 'two'], '5': ['three'] }
  10452. */
  10453. var groupBy = createAggregator(function(result, value, key) {
  10454. if (hasOwnProperty.call(result, key)) {
  10455. result[key].push(value);
  10456. } else {
  10457. baseAssignValue(result, key, [value]);
  10458. }
  10459. });
  10460. /**
  10461. * Checks if `value` is in `collection`. If `collection` is a string, it's
  10462. * checked for a substring of `value`, otherwise
  10463. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  10464. * is used for equality comparisons. If `fromIndex` is negative, it's used as
  10465. * the offset from the end of `collection`.
  10466. *
  10467. * @static
  10468. * @memberOf _
  10469. * @since 0.1.0
  10470. * @category Collection
  10471. * @param {Array|Object|string} collection The collection to inspect.
  10472. * @param {*} value The value to search for.
  10473. * @param {number} [fromIndex=0] The index to search from.
  10474. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
  10475. * @returns {boolean} Returns `true` if `value` is found, else `false`.
  10476. * @example
  10477. *
  10478. * _.includes([1, 2, 3], 1);
  10479. * // => true
  10480. *
  10481. * _.includes([1, 2, 3], 1, 2);
  10482. * // => false
  10483. *
  10484. * _.includes({ 'a': 1, 'b': 2 }, 1);
  10485. * // => true
  10486. *
  10487. * _.includes('abcd', 'bc');
  10488. * // => true
  10489. */
  10490. function includes(collection, value, fromIndex, guard) {
  10491. collection = isArrayLike(collection) ? collection : values(collection);
  10492. fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
  10493. var length = collection.length;
  10494. if (fromIndex < 0) {
  10495. fromIndex = nativeMax(length + fromIndex, 0);
  10496. }
  10497. return isString(collection)
  10498. ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
  10499. : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
  10500. }
  10501. /**
  10502. * Invokes the method at `path` of each element in `collection`, returning
  10503. * an array of the results of each invoked method. Any additional arguments
  10504. * are provided to each invoked method. If `path` is a function, it's invoked
  10505. * for, and `this` bound to, each element in `collection`.
  10506. *
  10507. * @static
  10508. * @memberOf _
  10509. * @since 4.0.0
  10510. * @category Collection
  10511. * @param {Array|Object} collection The collection to iterate over.
  10512. * @param {Array|Function|string} path The path of the method to invoke or
  10513. * the function invoked per iteration.
  10514. * @param {...*} [args] The arguments to invoke each method with.
  10515. * @returns {Array} Returns the array of results.
  10516. * @example
  10517. *
  10518. * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
  10519. * // => [[1, 5, 7], [1, 2, 3]]
  10520. *
  10521. * _.invokeMap([123, 456], String.prototype.split, '');
  10522. * // => [['1', '2', '3'], ['4', '5', '6']]
  10523. */
  10524. var invokeMap = baseRest(function(collection, path, args) {
  10525. var index = -1,
  10526. isFunc = typeof path == 'function',
  10527. result = isArrayLike(collection) ? Array(collection.length) : [];
  10528. baseEach(collection, function(value) {
  10529. result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
  10530. });
  10531. return result;
  10532. });
  10533. /**
  10534. * Creates an object composed of keys generated from the results of running
  10535. * each element of `collection` thru `iteratee`. The corresponding value of
  10536. * each key is the last element responsible for generating the key. The
  10537. * iteratee is invoked with one argument: (value).
  10538. *
  10539. * @static
  10540. * @memberOf _
  10541. * @since 4.0.0
  10542. * @category Collection
  10543. * @param {Array|Object} collection The collection to iterate over.
  10544. * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
  10545. * @returns {Object} Returns the composed aggregate object.
  10546. * @example
  10547. *
  10548. * var array = [
  10549. * { 'dir': 'left', 'code': 97 },
  10550. * { 'dir': 'right', 'code': 100 }
  10551. * ];
  10552. *
  10553. * _.keyBy(array, function(o) {
  10554. * return String.fromCharCode(o.code);
  10555. * });
  10556. * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
  10557. *
  10558. * _.keyBy(array, 'dir');
  10559. * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
  10560. */
  10561. var keyBy = createAggregator(function(result, value, key) {
  10562. baseAssignValue(result, key, value);
  10563. });
  10564. /**
  10565. * Creates an array of values by running each element in `collection` thru
  10566. * `iteratee`. The iteratee is invoked with three arguments:
  10567. * (value, index|key, collection).
  10568. *
  10569. * Many lodash methods are guarded to work as iteratees for methods like
  10570. * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
  10571. *
  10572. * The guarded methods are:
  10573. * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
  10574. * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
  10575. * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
  10576. * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
  10577. *
  10578. * @static
  10579. * @memberOf _
  10580. * @since 0.1.0
  10581. * @category Collection
  10582. * @param {Array|Object} collection The collection to iterate over.
  10583. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  10584. * @returns {Array} Returns the new mapped array.
  10585. * @example
  10586. *
  10587. * function square(n) {
  10588. * return n * n;
  10589. * }
  10590. *
  10591. * _.map([4, 8], square);
  10592. * // => [16, 64]
  10593. *
  10594. * _.map({ 'a': 4, 'b': 8 }, square);
  10595. * // => [16, 64] (iteration order is not guaranteed)
  10596. *
  10597. * var users = [
  10598. * { 'user': 'barney' },
  10599. * { 'user': 'fred' }
  10600. * ];
  10601. *
  10602. * // The `_.property` iteratee shorthand.
  10603. * _.map(users, 'user');
  10604. * // => ['barney', 'fred']
  10605. */
  10606. function map(collection, iteratee) {
  10607. var func = isArray(collection) ? arrayMap : baseMap;
  10608. return func(collection, getIteratee(iteratee, 3));
  10609. }
  10610. /**
  10611. * This method is like `_.sortBy` except that it allows specifying the sort
  10612. * orders of the iteratees to sort by. If `orders` is unspecified, all values
  10613. * are sorted in ascending order. Otherwise, specify an order of "desc" for
  10614. * descending or "asc" for ascending sort order of corresponding values.
  10615. *
  10616. * @static
  10617. * @memberOf _
  10618. * @since 4.0.0
  10619. * @category Collection
  10620. * @param {Array|Object} collection The collection to iterate over.
  10621. * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
  10622. * The iteratees to sort by.
  10623. * @param {string[]} [orders] The sort orders of `iteratees`.
  10624. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
  10625. * @returns {Array} Returns the new sorted array.
  10626. * @example
  10627. *
  10628. * var users = [
  10629. * { 'user': 'fred', 'age': 48 },
  10630. * { 'user': 'barney', 'age': 34 },
  10631. * { 'user': 'fred', 'age': 40 },
  10632. * { 'user': 'barney', 'age': 36 }
  10633. * ];
  10634. *
  10635. * // Sort by `user` in ascending order and by `age` in descending order.
  10636. * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
  10637. * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
  10638. */
  10639. function orderBy(collection, iteratees, orders, guard) {
  10640. if (collection == null) {
  10641. return [];
  10642. }
  10643. if (!isArray(iteratees)) {
  10644. iteratees = iteratees == null ? [] : [iteratees];
  10645. }
  10646. orders = guard ? undefined : orders;
  10647. if (!isArray(orders)) {
  10648. orders = orders == null ? [] : [orders];
  10649. }
  10650. return baseOrderBy(collection, iteratees, orders);
  10651. }
  10652. /**
  10653. * Creates an array of elements split into two groups, the first of which
  10654. * contains elements `predicate` returns truthy for, the second of which
  10655. * contains elements `predicate` returns falsey for. The predicate is
  10656. * invoked with one argument: (value).
  10657. *
  10658. * @static
  10659. * @memberOf _
  10660. * @since 3.0.0
  10661. * @category Collection
  10662. * @param {Array|Object} collection The collection to iterate over.
  10663. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  10664. * @returns {Array} Returns the array of grouped elements.
  10665. * @example
  10666. *
  10667. * var users = [
  10668. * { 'user': 'barney', 'age': 36, 'active': false },
  10669. * { 'user': 'fred', 'age': 40, 'active': true },
  10670. * { 'user': 'pebbles', 'age': 1, 'active': false }
  10671. * ];
  10672. *
  10673. * _.partition(users, function(o) { return o.active; });
  10674. * // => objects for [['fred'], ['barney', 'pebbles']]
  10675. *
  10676. * // The `_.matches` iteratee shorthand.
  10677. * _.partition(users, { 'age': 1, 'active': false });
  10678. * // => objects for [['pebbles'], ['barney', 'fred']]
  10679. *
  10680. * // The `_.matchesProperty` iteratee shorthand.
  10681. * _.partition(users, ['active', false]);
  10682. * // => objects for [['barney', 'pebbles'], ['fred']]
  10683. *
  10684. * // The `_.property` iteratee shorthand.
  10685. * _.partition(users, 'active');
  10686. * // => objects for [['fred'], ['barney', 'pebbles']]
  10687. */
  10688. var partition = createAggregator(function(result, value, key) {
  10689. result[key ? 0 : 1].push(value);
  10690. }, function() { return [[], []]; });
  10691. /**
  10692. * Reduces `collection` to a value which is the accumulated result of running
  10693. * each element in `collection` thru `iteratee`, where each successive
  10694. * invocation is supplied the return value of the previous. If `accumulator`
  10695. * is not given, the first element of `collection` is used as the initial
  10696. * value. The iteratee is invoked with four arguments:
  10697. * (accumulator, value, index|key, collection).
  10698. *
  10699. * Many lodash methods are guarded to work as iteratees for methods like
  10700. * `_.reduce`, `_.reduceRight`, and `_.transform`.
  10701. *
  10702. * The guarded methods are:
  10703. * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
  10704. * and `sortBy`
  10705. *
  10706. * @static
  10707. * @memberOf _
  10708. * @since 0.1.0
  10709. * @category Collection
  10710. * @param {Array|Object} collection The collection to iterate over.
  10711. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  10712. * @param {*} [accumulator] The initial value.
  10713. * @returns {*} Returns the accumulated value.
  10714. * @see _.reduceRight
  10715. * @example
  10716. *
  10717. * _.reduce([1, 2], function(sum, n) {
  10718. * return sum + n;
  10719. * }, 0);
  10720. * // => 3
  10721. *
  10722. * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
  10723. * (result[value] || (result[value] = [])).push(key);
  10724. * return result;
  10725. * }, {});
  10726. * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
  10727. */
  10728. function reduce(collection, iteratee, accumulator) {
  10729. var func = isArray(collection) ? arrayReduce : baseReduce,
  10730. initAccum = arguments.length < 3;
  10731. return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
  10732. }
  10733. /**
  10734. * This method is like `_.reduce` except that it iterates over elements of
  10735. * `collection` from right to left.
  10736. *
  10737. * @static
  10738. * @memberOf _
  10739. * @since 0.1.0
  10740. * @category Collection
  10741. * @param {Array|Object} collection The collection to iterate over.
  10742. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  10743. * @param {*} [accumulator] The initial value.
  10744. * @returns {*} Returns the accumulated value.
  10745. * @see _.reduce
  10746. * @example
  10747. *
  10748. * var array = [[0, 1], [2, 3], [4, 5]];
  10749. *
  10750. * _.reduceRight(array, function(flattened, other) {
  10751. * return flattened.concat(other);
  10752. * }, []);
  10753. * // => [4, 5, 2, 3, 0, 1]
  10754. */
  10755. function reduceRight(collection, iteratee, accumulator) {
  10756. var func = isArray(collection) ? arrayReduceRight : baseReduce,
  10757. initAccum = arguments.length < 3;
  10758. return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
  10759. }
  10760. /**
  10761. * The opposite of `_.filter`; this method returns the elements of `collection`
  10762. * that `predicate` does **not** return truthy for.
  10763. *
  10764. * @static
  10765. * @memberOf _
  10766. * @since 0.1.0
  10767. * @category Collection
  10768. * @param {Array|Object} collection The collection to iterate over.
  10769. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  10770. * @returns {Array} Returns the new filtered array.
  10771. * @see _.filter
  10772. * @example
  10773. *
  10774. * var users = [
  10775. * { 'user': 'barney', 'age': 36, 'active': false },
  10776. * { 'user': 'fred', 'age': 40, 'active': true }
  10777. * ];
  10778. *
  10779. * _.reject(users, function(o) { return !o.active; });
  10780. * // => objects for ['fred']
  10781. *
  10782. * // The `_.matches` iteratee shorthand.
  10783. * _.reject(users, { 'age': 40, 'active': true });
  10784. * // => objects for ['barney']
  10785. *
  10786. * // The `_.matchesProperty` iteratee shorthand.
  10787. * _.reject(users, ['active', false]);
  10788. * // => objects for ['fred']
  10789. *
  10790. * // The `_.property` iteratee shorthand.
  10791. * _.reject(users, 'active');
  10792. * // => objects for ['barney']
  10793. */
  10794. function reject(collection, predicate) {
  10795. var func = isArray(collection) ? arrayFilter : baseFilter;
  10796. return func(collection, negate(getIteratee(predicate, 3)));
  10797. }
  10798. /**
  10799. * Gets a random element from `collection`.
  10800. *
  10801. * @static
  10802. * @memberOf _
  10803. * @since 2.0.0
  10804. * @category Collection
  10805. * @param {Array|Object} collection The collection to sample.
  10806. * @returns {*} Returns the random element.
  10807. * @example
  10808. *
  10809. * _.sample([1, 2, 3, 4]);
  10810. * // => 2
  10811. */
  10812. function sample(collection) {
  10813. var func = isArray(collection) ? arraySample : baseSample;
  10814. return func(collection);
  10815. }
  10816. /**
  10817. * Gets `n` random elements at unique keys from `collection` up to the
  10818. * size of `collection`.
  10819. *
  10820. * @static
  10821. * @memberOf _
  10822. * @since 4.0.0
  10823. * @category Collection
  10824. * @param {Array|Object} collection The collection to sample.
  10825. * @param {number} [n=1] The number of elements to sample.
  10826. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  10827. * @returns {Array} Returns the random elements.
  10828. * @example
  10829. *
  10830. * _.sampleSize([1, 2, 3], 2);
  10831. * // => [3, 1]
  10832. *
  10833. * _.sampleSize([1, 2, 3], 4);
  10834. * // => [2, 3, 1]
  10835. */
  10836. function sampleSize(collection, n, guard) {
  10837. if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
  10838. n = 1;
  10839. } else {
  10840. n = toInteger(n);
  10841. }
  10842. var func = isArray(collection) ? arraySampleSize : baseSampleSize;
  10843. return func(collection, n);
  10844. }
  10845. /**
  10846. * Creates an array of shuffled values, using a version of the
  10847. * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
  10848. *
  10849. * @static
  10850. * @memberOf _
  10851. * @since 0.1.0
  10852. * @category Collection
  10853. * @param {Array|Object} collection The collection to shuffle.
  10854. * @returns {Array} Returns the new shuffled array.
  10855. * @example
  10856. *
  10857. * _.shuffle([1, 2, 3, 4]);
  10858. * // => [4, 1, 3, 2]
  10859. */
  10860. function shuffle(collection) {
  10861. var func = isArray(collection) ? arrayShuffle : baseShuffle;
  10862. return func(collection);
  10863. }
  10864. /**
  10865. * Gets the size of `collection` by returning its length for array-like
  10866. * values or the number of own enumerable string keyed properties for objects.
  10867. *
  10868. * @static
  10869. * @memberOf _
  10870. * @since 0.1.0
  10871. * @category Collection
  10872. * @param {Array|Object|string} collection The collection to inspect.
  10873. * @returns {number} Returns the collection size.
  10874. * @example
  10875. *
  10876. * _.size([1, 2, 3]);
  10877. * // => 3
  10878. *
  10879. * _.size({ 'a': 1, 'b': 2 });
  10880. * // => 2
  10881. *
  10882. * _.size('pebbles');
  10883. * // => 7
  10884. */
  10885. function size(collection) {
  10886. if (collection == null) {
  10887. return 0;
  10888. }
  10889. if (isArrayLike(collection)) {
  10890. return isString(collection) ? stringSize(collection) : collection.length;
  10891. }
  10892. var tag = getTag(collection);
  10893. if (tag == mapTag || tag == setTag) {
  10894. return collection.size;
  10895. }
  10896. return baseKeys(collection).length;
  10897. }
  10898. /**
  10899. * Checks if `predicate` returns truthy for **any** element of `collection`.
  10900. * Iteration is stopped once `predicate` returns truthy. The predicate is
  10901. * invoked with three arguments: (value, index|key, collection).
  10902. *
  10903. * @static
  10904. * @memberOf _
  10905. * @since 0.1.0
  10906. * @category Collection
  10907. * @param {Array|Object} collection The collection to iterate over.
  10908. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  10909. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  10910. * @returns {boolean} Returns `true` if any element passes the predicate check,
  10911. * else `false`.
  10912. * @example
  10913. *
  10914. * _.some([null, 0, 'yes', false], Boolean);
  10915. * // => true
  10916. *
  10917. * var users = [
  10918. * { 'user': 'barney', 'active': true },
  10919. * { 'user': 'fred', 'active': false }
  10920. * ];
  10921. *
  10922. * // The `_.matches` iteratee shorthand.
  10923. * _.some(users, { 'user': 'barney', 'active': false });
  10924. * // => false
  10925. *
  10926. * // The `_.matchesProperty` iteratee shorthand.
  10927. * _.some(users, ['active', false]);
  10928. * // => true
  10929. *
  10930. * // The `_.property` iteratee shorthand.
  10931. * _.some(users, 'active');
  10932. * // => true
  10933. */
  10934. function some(collection, predicate, guard) {
  10935. var func = isArray(collection) ? arraySome : baseSome;
  10936. if (guard && isIterateeCall(collection, predicate, guard)) {
  10937. predicate = undefined;
  10938. }
  10939. return func(collection, getIteratee(predicate, 3));
  10940. }
  10941. /**
  10942. * Creates an array of elements, sorted in ascending order by the results of
  10943. * running each element in a collection thru each iteratee. This method
  10944. * performs a stable sort, that is, it preserves the original sort order of
  10945. * equal elements. The iteratees are invoked with one argument: (value).
  10946. *
  10947. * @static
  10948. * @memberOf _
  10949. * @since 0.1.0
  10950. * @category Collection
  10951. * @param {Array|Object} collection The collection to iterate over.
  10952. * @param {...(Function|Function[])} [iteratees=[_.identity]]
  10953. * The iteratees to sort by.
  10954. * @returns {Array} Returns the new sorted array.
  10955. * @example
  10956. *
  10957. * var users = [
  10958. * { 'user': 'fred', 'age': 48 },
  10959. * { 'user': 'barney', 'age': 36 },
  10960. * { 'user': 'fred', 'age': 30 },
  10961. * { 'user': 'barney', 'age': 34 }
  10962. * ];
  10963. *
  10964. * _.sortBy(users, [function(o) { return o.user; }]);
  10965. * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
  10966. *
  10967. * _.sortBy(users, ['user', 'age']);
  10968. * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
  10969. */
  10970. var sortBy = baseRest(function(collection, iteratees) {
  10971. if (collection == null) {
  10972. return [];
  10973. }
  10974. var length = iteratees.length;
  10975. if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
  10976. iteratees = [];
  10977. } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
  10978. iteratees = [iteratees[0]];
  10979. }
  10980. return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
  10981. });
  10982. /*------------------------------------------------------------------------*/
  10983. /**
  10984. * Gets the timestamp of the number of milliseconds that have elapsed since
  10985. * the Unix epoch (1 January 1970 00:00:00 UTC).
  10986. *
  10987. * @static
  10988. * @memberOf _
  10989. * @since 2.4.0
  10990. * @category Date
  10991. * @returns {number} Returns the timestamp.
  10992. * @example
  10993. *
  10994. * _.defer(function(stamp) {
  10995. * console.log(_.now() - stamp);
  10996. * }, _.now());
  10997. * // => Logs the number of milliseconds it took for the deferred invocation.
  10998. */
  10999. var now = ctxNow || function() {
  11000. return root.Date.now();
  11001. };
  11002. /*------------------------------------------------------------------------*/
  11003. /**
  11004. * The opposite of `_.before`; this method creates a function that invokes
  11005. * `func` once it's called `n` or more times.
  11006. *
  11007. * @static
  11008. * @memberOf _
  11009. * @since 0.1.0
  11010. * @category Function
  11011. * @param {number} n The number of calls before `func` is invoked.
  11012. * @param {Function} func The function to restrict.
  11013. * @returns {Function} Returns the new restricted function.
  11014. * @example
  11015. *
  11016. * var saves = ['profile', 'settings'];
  11017. *
  11018. * var done = _.after(saves.length, function() {
  11019. * console.log('done saving!');
  11020. * });
  11021. *
  11022. * _.forEach(saves, function(type) {
  11023. * asyncSave({ 'type': type, 'complete': done });
  11024. * });
  11025. * // => Logs 'done saving!' after the two async saves have completed.
  11026. */
  11027. function after(n, func) {
  11028. if (typeof func != 'function') {
  11029. throw new TypeError(FUNC_ERROR_TEXT);
  11030. }
  11031. n = toInteger(n);
  11032. return function() {
  11033. if (--n < 1) {
  11034. return func.apply(this, arguments);
  11035. }
  11036. };
  11037. }
  11038. /**
  11039. * Creates a function that invokes `func`, with up to `n` arguments,
  11040. * ignoring any additional arguments.
  11041. *
  11042. * @static
  11043. * @memberOf _
  11044. * @since 3.0.0
  11045. * @category Function
  11046. * @param {Function} func The function to cap arguments for.
  11047. * @param {number} [n=func.length] The arity cap.
  11048. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  11049. * @returns {Function} Returns the new capped function.
  11050. * @example
  11051. *
  11052. * _.map(['6', '8', '10'], _.ary(parseInt, 1));
  11053. * // => [6, 8, 10]
  11054. */
  11055. function ary(func, n, guard) {
  11056. n = guard ? undefined : n;
  11057. n = (func && n == null) ? func.length : n;
  11058. return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
  11059. }
  11060. /**
  11061. * Creates a function that invokes `func`, with the `this` binding and arguments
  11062. * of the created function, while it's called less than `n` times. Subsequent
  11063. * calls to the created function return the result of the last `func` invocation.
  11064. *
  11065. * @static
  11066. * @memberOf _
  11067. * @since 3.0.0
  11068. * @category Function
  11069. * @param {number} n The number of calls at which `func` is no longer invoked.
  11070. * @param {Function} func The function to restrict.
  11071. * @returns {Function} Returns the new restricted function.
  11072. * @example
  11073. *
  11074. * jQuery(element).on('click', _.before(5, addContactToList));
  11075. * // => Allows adding up to 4 contacts to the list.
  11076. */
  11077. function before(n, func) {
  11078. var result;
  11079. if (typeof func != 'function') {
  11080. throw new TypeError(FUNC_ERROR_TEXT);
  11081. }
  11082. n = toInteger(n);
  11083. return function() {
  11084. if (--n > 0) {
  11085. result = func.apply(this, arguments);
  11086. }
  11087. if (n <= 1) {
  11088. func = undefined;
  11089. }
  11090. return result;
  11091. };
  11092. }
  11093. /**
  11094. * Creates a function that invokes `func` with the `this` binding of `thisArg`
  11095. * and `partials` prepended to the arguments it receives.
  11096. *
  11097. * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
  11098. * may be used as a placeholder for partially applied arguments.
  11099. *
  11100. * **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
  11101. * property of bound functions.
  11102. *
  11103. * @static
  11104. * @memberOf _
  11105. * @since 0.1.0
  11106. * @category Function
  11107. * @param {Function} func The function to bind.
  11108. * @param {*} thisArg The `this` binding of `func`.
  11109. * @param {...*} [partials] The arguments to be partially applied.
  11110. * @returns {Function} Returns the new bound function.
  11111. * @example
  11112. *
  11113. * function greet(greeting, punctuation) {
  11114. * return greeting + ' ' + this.user + punctuation;
  11115. * }
  11116. *
  11117. * var object = { 'user': 'fred' };
  11118. *
  11119. * var bound = _.bind(greet, object, 'hi');
  11120. * bound('!');
  11121. * // => 'hi fred!'
  11122. *
  11123. * // Bound with placeholders.
  11124. * var bound = _.bind(greet, object, _, '!');
  11125. * bound('hi');
  11126. * // => 'hi fred!'
  11127. */
  11128. var bind = baseRest(function(func, thisArg, partials) {
  11129. var bitmask = WRAP_BIND_FLAG;
  11130. if (partials.length) {
  11131. var holders = replaceHolders(partials, getHolder(bind));
  11132. bitmask |= WRAP_PARTIAL_FLAG;
  11133. }
  11134. return createWrap(func, bitmask, thisArg, partials, holders);
  11135. });
  11136. /**
  11137. * Creates a function that invokes the method at `object[key]` with `partials`
  11138. * prepended to the arguments it receives.
  11139. *
  11140. * This method differs from `_.bind` by allowing bound functions to reference
  11141. * methods that may be redefined or don't yet exist. See
  11142. * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
  11143. * for more details.
  11144. *
  11145. * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
  11146. * builds, may be used as a placeholder for partially applied arguments.
  11147. *
  11148. * @static
  11149. * @memberOf _
  11150. * @since 0.10.0
  11151. * @category Function
  11152. * @param {Object} object The object to invoke the method on.
  11153. * @param {string} key The key of the method.
  11154. * @param {...*} [partials] The arguments to be partially applied.
  11155. * @returns {Function} Returns the new bound function.
  11156. * @example
  11157. *
  11158. * var object = {
  11159. * 'user': 'fred',
  11160. * 'greet': function(greeting, punctuation) {
  11161. * return greeting + ' ' + this.user + punctuation;
  11162. * }
  11163. * };
  11164. *
  11165. * var bound = _.bindKey(object, 'greet', 'hi');
  11166. * bound('!');
  11167. * // => 'hi fred!'
  11168. *
  11169. * object.greet = function(greeting, punctuation) {
  11170. * return greeting + 'ya ' + this.user + punctuation;
  11171. * };
  11172. *
  11173. * bound('!');
  11174. * // => 'hiya fred!'
  11175. *
  11176. * // Bound with placeholders.
  11177. * var bound = _.bindKey(object, 'greet', _, '!');
  11178. * bound('hi');
  11179. * // => 'hiya fred!'
  11180. */
  11181. var bindKey = baseRest(function(object, key, partials) {
  11182. var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
  11183. if (partials.length) {
  11184. var holders = replaceHolders(partials, getHolder(bindKey));
  11185. bitmask |= WRAP_PARTIAL_FLAG;
  11186. }
  11187. return createWrap(key, bitmask, object, partials, holders);
  11188. });
  11189. /**
  11190. * Creates a function that accepts arguments of `func` and either invokes
  11191. * `func` returning its result, if at least `arity` number of arguments have
  11192. * been provided, or returns a function that accepts the remaining `func`
  11193. * arguments, and so on. The arity of `func` may be specified if `func.length`
  11194. * is not sufficient.
  11195. *
  11196. * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
  11197. * may be used as a placeholder for provided arguments.
  11198. *
  11199. * **Note:** This method doesn't set the "length" property of curried functions.
  11200. *
  11201. * @static
  11202. * @memberOf _
  11203. * @since 2.0.0
  11204. * @category Function
  11205. * @param {Function} func The function to curry.
  11206. * @param {number} [arity=func.length] The arity of `func`.
  11207. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  11208. * @returns {Function} Returns the new curried function.
  11209. * @example
  11210. *
  11211. * var abc = function(a, b, c) {
  11212. * return [a, b, c];
  11213. * };
  11214. *
  11215. * var curried = _.curry(abc);
  11216. *
  11217. * curried(1)(2)(3);
  11218. * // => [1, 2, 3]
  11219. *
  11220. * curried(1, 2)(3);
  11221. * // => [1, 2, 3]
  11222. *
  11223. * curried(1, 2, 3);
  11224. * // => [1, 2, 3]
  11225. *
  11226. * // Curried with placeholders.
  11227. * curried(1)(_, 3)(2);
  11228. * // => [1, 2, 3]
  11229. */
  11230. function curry(func, arity, guard) {
  11231. arity = guard ? undefined : arity;
  11232. var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
  11233. result.placeholder = curry.placeholder;
  11234. return result;
  11235. }
  11236. /**
  11237. * This method is like `_.curry` except that arguments are applied to `func`
  11238. * in the manner of `_.partialRight` instead of `_.partial`.
  11239. *
  11240. * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
  11241. * builds, may be used as a placeholder for provided arguments.
  11242. *
  11243. * **Note:** This method doesn't set the "length" property of curried functions.
  11244. *
  11245. * @static
  11246. * @memberOf _
  11247. * @since 3.0.0
  11248. * @category Function
  11249. * @param {Function} func The function to curry.
  11250. * @param {number} [arity=func.length] The arity of `func`.
  11251. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  11252. * @returns {Function} Returns the new curried function.
  11253. * @example
  11254. *
  11255. * var abc = function(a, b, c) {
  11256. * return [a, b, c];
  11257. * };
  11258. *
  11259. * var curried = _.curryRight(abc);
  11260. *
  11261. * curried(3)(2)(1);
  11262. * // => [1, 2, 3]
  11263. *
  11264. * curried(2, 3)(1);
  11265. * // => [1, 2, 3]
  11266. *
  11267. * curried(1, 2, 3);
  11268. * // => [1, 2, 3]
  11269. *
  11270. * // Curried with placeholders.
  11271. * curried(3)(1, _)(2);
  11272. * // => [1, 2, 3]
  11273. */
  11274. function curryRight(func, arity, guard) {
  11275. arity = guard ? undefined : arity;
  11276. var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
  11277. result.placeholder = curryRight.placeholder;
  11278. return result;
  11279. }
  11280. /**
  11281. * Creates a debounced function that delays invoking `func` until after `wait`
  11282. * milliseconds have elapsed since the last time the debounced function was
  11283. * invoked. The debounced function comes with a `cancel` method to cancel
  11284. * delayed `func` invocations and a `flush` method to immediately invoke them.
  11285. * Provide `options` to indicate whether `func` should be invoked on the
  11286. * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
  11287. * with the last arguments provided to the debounced function. Subsequent
  11288. * calls to the debounced function return the result of the last `func`
  11289. * invocation.
  11290. *
  11291. * **Note:** If `leading` and `trailing` options are `true`, `func` is
  11292. * invoked on the trailing edge of the timeout only if the debounced function
  11293. * is invoked more than once during the `wait` timeout.
  11294. *
  11295. * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
  11296. * until to the next tick, similar to `setTimeout` with a timeout of `0`.
  11297. *
  11298. * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
  11299. * for details over the differences between `_.debounce` and `_.throttle`.
  11300. *
  11301. * @static
  11302. * @memberOf _
  11303. * @since 0.1.0
  11304. * @category Function
  11305. * @param {Function} func The function to debounce.
  11306. * @param {number} [wait=0] The number of milliseconds to delay.
  11307. * @param {Object} [options={}] The options object.
  11308. * @param {boolean} [options.leading=false]
  11309. * Specify invoking on the leading edge of the timeout.
  11310. * @param {number} [options.maxWait]
  11311. * The maximum time `func` is allowed to be delayed before it's invoked.
  11312. * @param {boolean} [options.trailing=true]
  11313. * Specify invoking on the trailing edge of the timeout.
  11314. * @returns {Function} Returns the new debounced function.
  11315. * @example
  11316. *
  11317. * // Avoid costly calculations while the window size is in flux.
  11318. * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
  11319. *
  11320. * // Invoke `sendMail` when clicked, debouncing subsequent calls.
  11321. * jQuery(element).on('click', _.debounce(sendMail, 300, {
  11322. * 'leading': true,
  11323. * 'trailing': false
  11324. * }));
  11325. *
  11326. * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
  11327. * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
  11328. * var source = new EventSource('/stream');
  11329. * jQuery(source).on('message', debounced);
  11330. *
  11331. * // Cancel the trailing debounced invocation.
  11332. * jQuery(window).on('popstate', debounced.cancel);
  11333. */
  11334. function debounce(func, wait, options) {
  11335. var lastArgs,
  11336. lastThis,
  11337. maxWait,
  11338. result,
  11339. timerId,
  11340. lastCallTime,
  11341. lastInvokeTime = 0,
  11342. leading = false,
  11343. maxing = false,
  11344. trailing = true;
  11345. if (typeof func != 'function') {
  11346. throw new TypeError(FUNC_ERROR_TEXT);
  11347. }
  11348. wait = toNumber(wait) || 0;
  11349. if (isObject(options)) {
  11350. leading = !!options.leading;
  11351. maxing = 'maxWait' in options;
  11352. maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
  11353. trailing = 'trailing' in options ? !!options.trailing : trailing;
  11354. }
  11355. function invokeFunc(time) {
  11356. var args = lastArgs,
  11357. thisArg = lastThis;
  11358. lastArgs = lastThis = undefined;
  11359. lastInvokeTime = time;
  11360. result = func.apply(thisArg, args);
  11361. return result;
  11362. }
  11363. function leadingEdge(time) {
  11364. // Reset any `maxWait` timer.
  11365. lastInvokeTime = time;
  11366. // Start the timer for the trailing edge.
  11367. timerId = setTimeout(timerExpired, wait);
  11368. // Invoke the leading edge.
  11369. return leading ? invokeFunc(time) : result;
  11370. }
  11371. function remainingWait(time) {
  11372. var timeSinceLastCall = time - lastCallTime,
  11373. timeSinceLastInvoke = time - lastInvokeTime,
  11374. timeWaiting = wait - timeSinceLastCall;
  11375. return maxing
  11376. ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
  11377. : timeWaiting;
  11378. }
  11379. function shouldInvoke(time) {
  11380. var timeSinceLastCall = time - lastCallTime,
  11381. timeSinceLastInvoke = time - lastInvokeTime;
  11382. // Either this is the first call, activity has stopped and we're at the
  11383. // trailing edge, the system time has gone backwards and we're treating
  11384. // it as the trailing edge, or we've hit the `maxWait` limit.
  11385. return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
  11386. (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
  11387. }
  11388. function timerExpired() {
  11389. var time = now();
  11390. if (shouldInvoke(time)) {
  11391. return trailingEdge(time);
  11392. }
  11393. // Restart the timer.
  11394. timerId = setTimeout(timerExpired, remainingWait(time));
  11395. }
  11396. function trailingEdge(time) {
  11397. timerId = undefined;
  11398. // Only invoke if we have `lastArgs` which means `func` has been
  11399. // debounced at least once.
  11400. if (trailing && lastArgs) {
  11401. return invokeFunc(time);
  11402. }
  11403. lastArgs = lastThis = undefined;
  11404. return result;
  11405. }
  11406. function cancel() {
  11407. if (timerId !== undefined) {
  11408. clearTimeout(timerId);
  11409. }
  11410. lastInvokeTime = 0;
  11411. lastArgs = lastCallTime = lastThis = timerId = undefined;
  11412. }
  11413. function flush() {
  11414. return timerId === undefined ? result : trailingEdge(now());
  11415. }
  11416. function debounced() {
  11417. var time = now(),
  11418. isInvoking = shouldInvoke(time);
  11419. lastArgs = arguments;
  11420. lastThis = this;
  11421. lastCallTime = time;
  11422. if (isInvoking) {
  11423. if (timerId === undefined) {
  11424. return leadingEdge(lastCallTime);
  11425. }
  11426. if (maxing) {
  11427. // Handle invocations in a tight loop.
  11428. clearTimeout(timerId);
  11429. timerId = setTimeout(timerExpired, wait);
  11430. return invokeFunc(lastCallTime);
  11431. }
  11432. }
  11433. if (timerId === undefined) {
  11434. timerId = setTimeout(timerExpired, wait);
  11435. }
  11436. return result;
  11437. }
  11438. debounced.cancel = cancel;
  11439. debounced.flush = flush;
  11440. return debounced;
  11441. }
  11442. /**
  11443. * Defers invoking the `func` until the current call stack has cleared. Any
  11444. * additional arguments are provided to `func` when it's invoked.
  11445. *
  11446. * @static
  11447. * @memberOf _
  11448. * @since 0.1.0
  11449. * @category Function
  11450. * @param {Function} func The function to defer.
  11451. * @param {...*} [args] The arguments to invoke `func` with.
  11452. * @returns {number} Returns the timer id.
  11453. * @example
  11454. *
  11455. * _.defer(function(text) {
  11456. * console.log(text);
  11457. * }, 'deferred');
  11458. * // => Logs 'deferred' after one millisecond.
  11459. */
  11460. var defer = baseRest(function(func, args) {
  11461. return baseDelay(func, 1, args);
  11462. });
  11463. /**
  11464. * Invokes `func` after `wait` milliseconds. Any additional arguments are
  11465. * provided to `func` when it's invoked.
  11466. *
  11467. * @static
  11468. * @memberOf _
  11469. * @since 0.1.0
  11470. * @category Function
  11471. * @param {Function} func The function to delay.
  11472. * @param {number} wait The number of milliseconds to delay invocation.
  11473. * @param {...*} [args] The arguments to invoke `func` with.
  11474. * @returns {number} Returns the timer id.
  11475. * @example
  11476. *
  11477. * _.delay(function(text) {
  11478. * console.log(text);
  11479. * }, 1000, 'later');
  11480. * // => Logs 'later' after one second.
  11481. */
  11482. var delay = baseRest(function(func, wait, args) {
  11483. return baseDelay(func, toNumber(wait) || 0, args);
  11484. });
  11485. /**
  11486. * Creates a function that invokes `func` with arguments reversed.
  11487. *
  11488. * @static
  11489. * @memberOf _
  11490. * @since 4.0.0
  11491. * @category Function
  11492. * @param {Function} func The function to flip arguments for.
  11493. * @returns {Function} Returns the new flipped function.
  11494. * @example
  11495. *
  11496. * var flipped = _.flip(function() {
  11497. * return _.toArray(arguments);
  11498. * });
  11499. *
  11500. * flipped('a', 'b', 'c', 'd');
  11501. * // => ['d', 'c', 'b', 'a']
  11502. */
  11503. function flip(func) {
  11504. return createWrap(func, WRAP_FLIP_FLAG);
  11505. }
  11506. /**
  11507. * Creates a function that memoizes the result of `func`. If `resolver` is
  11508. * provided, it determines the cache key for storing the result based on the
  11509. * arguments provided to the memoized function. By default, the first argument
  11510. * provided to the memoized function is used as the map cache key. The `func`
  11511. * is invoked with the `this` binding of the memoized function.
  11512. *
  11513. * **Note:** The cache is exposed as the `cache` property on the memoized
  11514. * function. Its creation may be customized by replacing the `_.memoize.Cache`
  11515. * constructor with one whose instances implement the
  11516. * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
  11517. * method interface of `clear`, `delete`, `get`, `has`, and `set`.
  11518. *
  11519. * @static
  11520. * @memberOf _
  11521. * @since 0.1.0
  11522. * @category Function
  11523. * @param {Function} func The function to have its output memoized.
  11524. * @param {Function} [resolver] The function to resolve the cache key.
  11525. * @returns {Function} Returns the new memoized function.
  11526. * @example
  11527. *
  11528. * var object = { 'a': 1, 'b': 2 };
  11529. * var other = { 'c': 3, 'd': 4 };
  11530. *
  11531. * var values = _.memoize(_.values);
  11532. * values(object);
  11533. * // => [1, 2]
  11534. *
  11535. * values(other);
  11536. * // => [3, 4]
  11537. *
  11538. * object.a = 2;
  11539. * values(object);
  11540. * // => [1, 2]
  11541. *
  11542. * // Modify the result cache.
  11543. * values.cache.set(object, ['a', 'b']);
  11544. * values(object);
  11545. * // => ['a', 'b']
  11546. *
  11547. * // Replace `_.memoize.Cache`.
  11548. * _.memoize.Cache = WeakMap;
  11549. */
  11550. function memoize(func, resolver) {
  11551. if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
  11552. throw new TypeError(FUNC_ERROR_TEXT);
  11553. }
  11554. var memoized = function() {
  11555. var args = arguments,
  11556. key = resolver ? resolver.apply(this, args) : args[0],
  11557. cache = memoized.cache;
  11558. if (cache.has(key)) {
  11559. return cache.get(key);
  11560. }
  11561. var result = func.apply(this, args);
  11562. memoized.cache = cache.set(key, result) || cache;
  11563. return result;
  11564. };
  11565. memoized.cache = new (memoize.Cache || MapCache);
  11566. return memoized;
  11567. }
  11568. // Expose `MapCache`.
  11569. memoize.Cache = MapCache;
  11570. /**
  11571. * Creates a function that negates the result of the predicate `func`. The
  11572. * `func` predicate is invoked with the `this` binding and arguments of the
  11573. * created function.
  11574. *
  11575. * @static
  11576. * @memberOf _
  11577. * @since 3.0.0
  11578. * @category Function
  11579. * @param {Function} predicate The predicate to negate.
  11580. * @returns {Function} Returns the new negated function.
  11581. * @example
  11582. *
  11583. * function isEven(n) {
  11584. * return n % 2 == 0;
  11585. * }
  11586. *
  11587. * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
  11588. * // => [1, 3, 5]
  11589. */
  11590. function negate(predicate) {
  11591. if (typeof predicate != 'function') {
  11592. throw new TypeError(FUNC_ERROR_TEXT);
  11593. }
  11594. return function() {
  11595. var args = arguments;
  11596. switch (args.length) {
  11597. case 0: return !predicate.call(this);
  11598. case 1: return !predicate.call(this, args[0]);
  11599. case 2: return !predicate.call(this, args[0], args[1]);
  11600. case 3: return !predicate.call(this, args[0], args[1], args[2]);
  11601. }
  11602. return !predicate.apply(this, args);
  11603. };
  11604. }
  11605. /**
  11606. * Creates a function that is restricted to invoking `func` once. Repeat calls
  11607. * to the function return the value of the first invocation. The `func` is
  11608. * invoked with the `this` binding and arguments of the created function.
  11609. *
  11610. * @static
  11611. * @memberOf _
  11612. * @since 0.1.0
  11613. * @category Function
  11614. * @param {Function} func The function to restrict.
  11615. * @returns {Function} Returns the new restricted function.
  11616. * @example
  11617. *
  11618. * var initialize = _.once(createApplication);
  11619. * initialize();
  11620. * initialize();
  11621. * // => `createApplication` is invoked once
  11622. */
  11623. function once(func) {
  11624. return before(2, func);
  11625. }
  11626. /**
  11627. * Creates a function that invokes `func` with its arguments transformed.
  11628. *
  11629. * @static
  11630. * @since 4.0.0
  11631. * @memberOf _
  11632. * @category Function
  11633. * @param {Function} func The function to wrap.
  11634. * @param {...(Function|Function[])} [transforms=[_.identity]]
  11635. * The argument transforms.
  11636. * @returns {Function} Returns the new function.
  11637. * @example
  11638. *
  11639. * function doubled(n) {
  11640. * return n * 2;
  11641. * }
  11642. *
  11643. * function square(n) {
  11644. * return n * n;
  11645. * }
  11646. *
  11647. * var func = _.overArgs(function(x, y) {
  11648. * return [x, y];
  11649. * }, [square, doubled]);
  11650. *
  11651. * func(9, 3);
  11652. * // => [81, 6]
  11653. *
  11654. * func(10, 5);
  11655. * // => [100, 10]
  11656. */
  11657. var overArgs = castRest(function(func, transforms) {
  11658. transforms = (transforms.length == 1 && isArray(transforms[0]))
  11659. ? arrayMap(transforms[0], baseUnary(getIteratee()))
  11660. : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
  11661. var funcsLength = transforms.length;
  11662. return baseRest(function(args) {
  11663. var index = -1,
  11664. length = nativeMin(args.length, funcsLength);
  11665. while (++index < length) {
  11666. args[index] = transforms[index].call(this, args[index]);
  11667. }
  11668. return apply(func, this, args);
  11669. });
  11670. });
  11671. /**
  11672. * Creates a function that invokes `func` with `partials` prepended to the
  11673. * arguments it receives. This method is like `_.bind` except it does **not**
  11674. * alter the `this` binding.
  11675. *
  11676. * The `_.partial.placeholder` value, which defaults to `_` in monolithic
  11677. * builds, may be used as a placeholder for partially applied arguments.
  11678. *
  11679. * **Note:** This method doesn't set the "length" property of partially
  11680. * applied functions.
  11681. *
  11682. * @static
  11683. * @memberOf _
  11684. * @since 0.2.0
  11685. * @category Function
  11686. * @param {Function} func The function to partially apply arguments to.
  11687. * @param {...*} [partials] The arguments to be partially applied.
  11688. * @returns {Function} Returns the new partially applied function.
  11689. * @example
  11690. *
  11691. * function greet(greeting, name) {
  11692. * return greeting + ' ' + name;
  11693. * }
  11694. *
  11695. * var sayHelloTo = _.partial(greet, 'hello');
  11696. * sayHelloTo('fred');
  11697. * // => 'hello fred'
  11698. *
  11699. * // Partially applied with placeholders.
  11700. * var greetFred = _.partial(greet, _, 'fred');
  11701. * greetFred('hi');
  11702. * // => 'hi fred'
  11703. */
  11704. var partial = baseRest(function(func, partials) {
  11705. var holders = replaceHolders(partials, getHolder(partial));
  11706. return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
  11707. });
  11708. /**
  11709. * This method is like `_.partial` except that partially applied arguments
  11710. * are appended to the arguments it receives.
  11711. *
  11712. * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
  11713. * builds, may be used as a placeholder for partially applied arguments.
  11714. *
  11715. * **Note:** This method doesn't set the "length" property of partially
  11716. * applied functions.
  11717. *
  11718. * @static
  11719. * @memberOf _
  11720. * @since 1.0.0
  11721. * @category Function
  11722. * @param {Function} func The function to partially apply arguments to.
  11723. * @param {...*} [partials] The arguments to be partially applied.
  11724. * @returns {Function} Returns the new partially applied function.
  11725. * @example
  11726. *
  11727. * function greet(greeting, name) {
  11728. * return greeting + ' ' + name;
  11729. * }
  11730. *
  11731. * var greetFred = _.partialRight(greet, 'fred');
  11732. * greetFred('hi');
  11733. * // => 'hi fred'
  11734. *
  11735. * // Partially applied with placeholders.
  11736. * var sayHelloTo = _.partialRight(greet, 'hello', _);
  11737. * sayHelloTo('fred');
  11738. * // => 'hello fred'
  11739. */
  11740. var partialRight = baseRest(function(func, partials) {
  11741. var holders = replaceHolders(partials, getHolder(partialRight));
  11742. return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
  11743. });
  11744. /**
  11745. * Creates a function that invokes `func` with arguments arranged according
  11746. * to the specified `indexes` where the argument value at the first index is
  11747. * provided as the first argument, the argument value at the second index is
  11748. * provided as the second argument, and so on.
  11749. *
  11750. * @static
  11751. * @memberOf _
  11752. * @since 3.0.0
  11753. * @category Function
  11754. * @param {Function} func The function to rearrange arguments for.
  11755. * @param {...(number|number[])} indexes The arranged argument indexes.
  11756. * @returns {Function} Returns the new function.
  11757. * @example
  11758. *
  11759. * var rearged = _.rearg(function(a, b, c) {
  11760. * return [a, b, c];
  11761. * }, [2, 0, 1]);
  11762. *
  11763. * rearged('b', 'c', 'a')
  11764. * // => ['a', 'b', 'c']
  11765. */
  11766. var rearg = flatRest(function(func, indexes) {
  11767. return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);
  11768. });
  11769. /**
  11770. * Creates a function that invokes `func` with the `this` binding of the
  11771. * created function and arguments from `start` and beyond provided as
  11772. * an array.
  11773. *
  11774. * **Note:** This method is based on the
  11775. * [rest parameter](https://mdn.io/rest_parameters).
  11776. *
  11777. * @static
  11778. * @memberOf _
  11779. * @since 4.0.0
  11780. * @category Function
  11781. * @param {Function} func The function to apply a rest parameter to.
  11782. * @param {number} [start=func.length-1] The start position of the rest parameter.
  11783. * @returns {Function} Returns the new function.
  11784. * @example
  11785. *
  11786. * var say = _.rest(function(what, names) {
  11787. * return what + ' ' + _.initial(names).join(', ') +
  11788. * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
  11789. * });
  11790. *
  11791. * say('hello', 'fred', 'barney', 'pebbles');
  11792. * // => 'hello fred, barney, & pebbles'
  11793. */
  11794. function rest(func, start) {
  11795. if (typeof func != 'function') {
  11796. throw new TypeError(FUNC_ERROR_TEXT);
  11797. }
  11798. start = start === undefined ? start : toInteger(start);
  11799. return baseRest(func, start);
  11800. }
  11801. /**
  11802. * Creates a function that invokes `func` with the `this` binding of the
  11803. * create function and an array of arguments much like
  11804. * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).
  11805. *
  11806. * **Note:** This method is based on the
  11807. * [spread operator](https://mdn.io/spread_operator).
  11808. *
  11809. * @static
  11810. * @memberOf _
  11811. * @since 3.2.0
  11812. * @category Function
  11813. * @param {Function} func The function to spread arguments over.
  11814. * @param {number} [start=0] The start position of the spread.
  11815. * @returns {Function} Returns the new function.
  11816. * @example
  11817. *
  11818. * var say = _.spread(function(who, what) {
  11819. * return who + ' says ' + what;
  11820. * });
  11821. *
  11822. * say(['fred', 'hello']);
  11823. * // => 'fred says hello'
  11824. *
  11825. * var numbers = Promise.all([
  11826. * Promise.resolve(40),
  11827. * Promise.resolve(36)
  11828. * ]);
  11829. *
  11830. * numbers.then(_.spread(function(x, y) {
  11831. * return x + y;
  11832. * }));
  11833. * // => a Promise of 76
  11834. */
  11835. function spread(func, start) {
  11836. if (typeof func != 'function') {
  11837. throw new TypeError(FUNC_ERROR_TEXT);
  11838. }
  11839. start = start == null ? 0 : nativeMax(toInteger(start), 0);
  11840. return baseRest(function(args) {
  11841. var array = args[start],
  11842. otherArgs = castSlice(args, 0, start);
  11843. if (array) {
  11844. arrayPush(otherArgs, array);
  11845. }
  11846. return apply(func, this, otherArgs);
  11847. });
  11848. }
  11849. /**
  11850. * Creates a throttled function that only invokes `func` at most once per
  11851. * every `wait` milliseconds. The throttled function comes with a `cancel`
  11852. * method to cancel delayed `func` invocations and a `flush` method to
  11853. * immediately invoke them. Provide `options` to indicate whether `func`
  11854. * should be invoked on the leading and/or trailing edge of the `wait`
  11855. * timeout. The `func` is invoked with the last arguments provided to the
  11856. * throttled function. Subsequent calls to the throttled function return the
  11857. * result of the last `func` invocation.
  11858. *
  11859. * **Note:** If `leading` and `trailing` options are `true`, `func` is
  11860. * invoked on the trailing edge of the timeout only if the throttled function
  11861. * is invoked more than once during the `wait` timeout.
  11862. *
  11863. * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
  11864. * until to the next tick, similar to `setTimeout` with a timeout of `0`.
  11865. *
  11866. * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
  11867. * for details over the differences between `_.throttle` and `_.debounce`.
  11868. *
  11869. * @static
  11870. * @memberOf _
  11871. * @since 0.1.0
  11872. * @category Function
  11873. * @param {Function} func The function to throttle.
  11874. * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
  11875. * @param {Object} [options={}] The options object.
  11876. * @param {boolean} [options.leading=true]
  11877. * Specify invoking on the leading edge of the timeout.
  11878. * @param {boolean} [options.trailing=true]
  11879. * Specify invoking on the trailing edge of the timeout.
  11880. * @returns {Function} Returns the new throttled function.
  11881. * @example
  11882. *
  11883. * // Avoid excessively updating the position while scrolling.
  11884. * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
  11885. *
  11886. * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
  11887. * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
  11888. * jQuery(element).on('click', throttled);
  11889. *
  11890. * // Cancel the trailing throttled invocation.
  11891. * jQuery(window).on('popstate', throttled.cancel);
  11892. */
  11893. function throttle(func, wait, options) {
  11894. var leading = true,
  11895. trailing = true;
  11896. if (typeof func != 'function') {
  11897. throw new TypeError(FUNC_ERROR_TEXT);
  11898. }
  11899. if (isObject(options)) {
  11900. leading = 'leading' in options ? !!options.leading : leading;
  11901. trailing = 'trailing' in options ? !!options.trailing : trailing;
  11902. }
  11903. return debounce(func, wait, {
  11904. 'leading': leading,
  11905. 'maxWait': wait,
  11906. 'trailing': trailing
  11907. });
  11908. }
  11909. /**
  11910. * Creates a function that accepts up to one argument, ignoring any
  11911. * additional arguments.
  11912. *
  11913. * @static
  11914. * @memberOf _
  11915. * @since 4.0.0
  11916. * @category Function
  11917. * @param {Function} func The function to cap arguments for.
  11918. * @returns {Function} Returns the new capped function.
  11919. * @example
  11920. *
  11921. * _.map(['6', '8', '10'], _.unary(parseInt));
  11922. * // => [6, 8, 10]
  11923. */
  11924. function unary(func) {
  11925. return ary(func, 1);
  11926. }
  11927. /**
  11928. * Creates a function that provides `value` to `wrapper` as its first
  11929. * argument. Any additional arguments provided to the function are appended
  11930. * to those provided to the `wrapper`. The wrapper is invoked with the `this`
  11931. * binding of the created function.
  11932. *
  11933. * @static
  11934. * @memberOf _
  11935. * @since 0.1.0
  11936. * @category Function
  11937. * @param {*} value The value to wrap.
  11938. * @param {Function} [wrapper=identity] The wrapper function.
  11939. * @returns {Function} Returns the new function.
  11940. * @example
  11941. *
  11942. * var p = _.wrap(_.escape, function(func, text) {
  11943. * return '<p>' + func(text) + '</p>';
  11944. * });
  11945. *
  11946. * p('fred, barney, & pebbles');
  11947. * // => '<p>fred, barney, &amp; pebbles</p>'
  11948. */
  11949. function wrap(value, wrapper) {
  11950. return partial(castFunction(wrapper), value);
  11951. }
  11952. /*------------------------------------------------------------------------*/
  11953. /**
  11954. * Casts `value` as an array if it's not one.
  11955. *
  11956. * @static
  11957. * @memberOf _
  11958. * @since 4.4.0
  11959. * @category Lang
  11960. * @param {*} value The value to inspect.
  11961. * @returns {Array} Returns the cast array.
  11962. * @example
  11963. *
  11964. * _.castArray(1);
  11965. * // => [1]
  11966. *
  11967. * _.castArray({ 'a': 1 });
  11968. * // => [{ 'a': 1 }]
  11969. *
  11970. * _.castArray('abc');
  11971. * // => ['abc']
  11972. *
  11973. * _.castArray(null);
  11974. * // => [null]
  11975. *
  11976. * _.castArray(undefined);
  11977. * // => [undefined]
  11978. *
  11979. * _.castArray();
  11980. * // => []
  11981. *
  11982. * var array = [1, 2, 3];
  11983. * console.log(_.castArray(array) === array);
  11984. * // => true
  11985. */
  11986. function castArray() {
  11987. if (!arguments.length) {
  11988. return [];
  11989. }
  11990. var value = arguments[0];
  11991. return isArray(value) ? value : [value];
  11992. }
  11993. /**
  11994. * Creates a shallow clone of `value`.
  11995. *
  11996. * **Note:** This method is loosely based on the
  11997. * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
  11998. * and supports cloning arrays, array buffers, booleans, date objects, maps,
  11999. * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
  12000. * arrays. The own enumerable properties of `arguments` objects are cloned
  12001. * as plain objects. An empty object is returned for uncloneable values such
  12002. * as error objects, functions, DOM nodes, and WeakMaps.
  12003. *
  12004. * @static
  12005. * @memberOf _
  12006. * @since 0.1.0
  12007. * @category Lang
  12008. * @param {*} value The value to clone.
  12009. * @returns {*} Returns the cloned value.
  12010. * @see _.cloneDeep
  12011. * @example
  12012. *
  12013. * var objects = [{ 'a': 1 }, { 'b': 2 }];
  12014. *
  12015. * var shallow = _.clone(objects);
  12016. * console.log(shallow[0] === objects[0]);
  12017. * // => true
  12018. */
  12019. function clone(value) {
  12020. return baseClone(value, CLONE_SYMBOLS_FLAG);
  12021. }
  12022. /**
  12023. * This method is like `_.clone` except that it accepts `customizer` which
  12024. * is invoked to produce the cloned value. If `customizer` returns `undefined`,
  12025. * cloning is handled by the method instead. The `customizer` is invoked with
  12026. * up to four arguments; (value [, index|key, object, stack]).
  12027. *
  12028. * @static
  12029. * @memberOf _
  12030. * @since 4.0.0
  12031. * @category Lang
  12032. * @param {*} value The value to clone.
  12033. * @param {Function} [customizer] The function to customize cloning.
  12034. * @returns {*} Returns the cloned value.
  12035. * @see _.cloneDeepWith
  12036. * @example
  12037. *
  12038. * function customizer(value) {
  12039. * if (_.isElement(value)) {
  12040. * return value.cloneNode(false);
  12041. * }
  12042. * }
  12043. *
  12044. * var el = _.cloneWith(document.body, customizer);
  12045. *
  12046. * console.log(el === document.body);
  12047. * // => false
  12048. * console.log(el.nodeName);
  12049. * // => 'BODY'
  12050. * console.log(el.childNodes.length);
  12051. * // => 0
  12052. */
  12053. function cloneWith(value, customizer) {
  12054. customizer = typeof customizer == 'function' ? customizer : undefined;
  12055. return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
  12056. }
  12057. /**
  12058. * This method is like `_.clone` except that it recursively clones `value`.
  12059. *
  12060. * @static
  12061. * @memberOf _
  12062. * @since 1.0.0
  12063. * @category Lang
  12064. * @param {*} value The value to recursively clone.
  12065. * @returns {*} Returns the deep cloned value.
  12066. * @see _.clone
  12067. * @example
  12068. *
  12069. * var objects = [{ 'a': 1 }, { 'b': 2 }];
  12070. *
  12071. * var deep = _.cloneDeep(objects);
  12072. * console.log(deep[0] === objects[0]);
  12073. * // => false
  12074. */
  12075. function cloneDeep(value) {
  12076. return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
  12077. }
  12078. /**
  12079. * This method is like `_.cloneWith` except that it recursively clones `value`.
  12080. *
  12081. * @static
  12082. * @memberOf _
  12083. * @since 4.0.0
  12084. * @category Lang
  12085. * @param {*} value The value to recursively clone.
  12086. * @param {Function} [customizer] The function to customize cloning.
  12087. * @returns {*} Returns the deep cloned value.
  12088. * @see _.cloneWith
  12089. * @example
  12090. *
  12091. * function customizer(value) {
  12092. * if (_.isElement(value)) {
  12093. * return value.cloneNode(true);
  12094. * }
  12095. * }
  12096. *
  12097. * var el = _.cloneDeepWith(document.body, customizer);
  12098. *
  12099. * console.log(el === document.body);
  12100. * // => false
  12101. * console.log(el.nodeName);
  12102. * // => 'BODY'
  12103. * console.log(el.childNodes.length);
  12104. * // => 20
  12105. */
  12106. function cloneDeepWith(value, customizer) {
  12107. customizer = typeof customizer == 'function' ? customizer : undefined;
  12108. return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
  12109. }
  12110. /**
  12111. * Checks if `object` conforms to `source` by invoking the predicate
  12112. * properties of `source` with the corresponding property values of `object`.
  12113. *
  12114. * **Note:** This method is equivalent to `_.conforms` when `source` is
  12115. * partially applied.
  12116. *
  12117. * @static
  12118. * @memberOf _
  12119. * @since 4.14.0
  12120. * @category Lang
  12121. * @param {Object} object The object to inspect.
  12122. * @param {Object} source The object of property predicates to conform to.
  12123. * @returns {boolean} Returns `true` if `object` conforms, else `false`.
  12124. * @example
  12125. *
  12126. * var object = { 'a': 1, 'b': 2 };
  12127. *
  12128. * _.conformsTo(object, { 'b': function(n) { return n > 1; } });
  12129. * // => true
  12130. *
  12131. * _.conformsTo(object, { 'b': function(n) { return n > 2; } });
  12132. * // => false
  12133. */
  12134. function conformsTo(object, source) {
  12135. return source == null || baseConformsTo(object, source, keys(source));
  12136. }
  12137. /**
  12138. * Performs a
  12139. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  12140. * comparison between two values to determine if they are equivalent.
  12141. *
  12142. * @static
  12143. * @memberOf _
  12144. * @since 4.0.0
  12145. * @category Lang
  12146. * @param {*} value The value to compare.
  12147. * @param {*} other The other value to compare.
  12148. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  12149. * @example
  12150. *
  12151. * var object = { 'a': 1 };
  12152. * var other = { 'a': 1 };
  12153. *
  12154. * _.eq(object, object);
  12155. * // => true
  12156. *
  12157. * _.eq(object, other);
  12158. * // => false
  12159. *
  12160. * _.eq('a', 'a');
  12161. * // => true
  12162. *
  12163. * _.eq('a', Object('a'));
  12164. * // => false
  12165. *
  12166. * _.eq(NaN, NaN);
  12167. * // => true
  12168. */
  12169. function eq(value, other) {
  12170. return value === other || (value !== value && other !== other);
  12171. }
  12172. /**
  12173. * Checks if `value` is greater than `other`.
  12174. *
  12175. * @static
  12176. * @memberOf _
  12177. * @since 3.9.0
  12178. * @category Lang
  12179. * @param {*} value The value to compare.
  12180. * @param {*} other The other value to compare.
  12181. * @returns {boolean} Returns `true` if `value` is greater than `other`,
  12182. * else `false`.
  12183. * @see _.lt
  12184. * @example
  12185. *
  12186. * _.gt(3, 1);
  12187. * // => true
  12188. *
  12189. * _.gt(3, 3);
  12190. * // => false
  12191. *
  12192. * _.gt(1, 3);
  12193. * // => false
  12194. */
  12195. var gt = createRelationalOperation(baseGt);
  12196. /**
  12197. * Checks if `value` is greater than or equal to `other`.
  12198. *
  12199. * @static
  12200. * @memberOf _
  12201. * @since 3.9.0
  12202. * @category Lang
  12203. * @param {*} value The value to compare.
  12204. * @param {*} other The other value to compare.
  12205. * @returns {boolean} Returns `true` if `value` is greater than or equal to
  12206. * `other`, else `false`.
  12207. * @see _.lte
  12208. * @example
  12209. *
  12210. * _.gte(3, 1);
  12211. * // => true
  12212. *
  12213. * _.gte(3, 3);
  12214. * // => true
  12215. *
  12216. * _.gte(1, 3);
  12217. * // => false
  12218. */
  12219. var gte = createRelationalOperation(function(value, other) {
  12220. return value >= other;
  12221. });
  12222. /**
  12223. * Checks if `value` is likely an `arguments` object.
  12224. *
  12225. * @static
  12226. * @memberOf _
  12227. * @since 0.1.0
  12228. * @category Lang
  12229. * @param {*} value The value to check.
  12230. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  12231. * else `false`.
  12232. * @example
  12233. *
  12234. * _.isArguments(function() { return arguments; }());
  12235. * // => true
  12236. *
  12237. * _.isArguments([1, 2, 3]);
  12238. * // => false
  12239. */
  12240. var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
  12241. return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
  12242. !propertyIsEnumerable.call(value, 'callee');
  12243. };
  12244. /**
  12245. * Checks if `value` is classified as an `Array` object.
  12246. *
  12247. * @static
  12248. * @memberOf _
  12249. * @since 0.1.0
  12250. * @category Lang
  12251. * @param {*} value The value to check.
  12252. * @returns {boolean} Returns `true` if `value` is an array, else `false`.
  12253. * @example
  12254. *
  12255. * _.isArray([1, 2, 3]);
  12256. * // => true
  12257. *
  12258. * _.isArray(document.body.children);
  12259. * // => false
  12260. *
  12261. * _.isArray('abc');
  12262. * // => false
  12263. *
  12264. * _.isArray(_.noop);
  12265. * // => false
  12266. */
  12267. var isArray = Array.isArray;
  12268. /**
  12269. * Checks if `value` is classified as an `ArrayBuffer` object.
  12270. *
  12271. * @static
  12272. * @memberOf _
  12273. * @since 4.3.0
  12274. * @category Lang
  12275. * @param {*} value The value to check.
  12276. * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
  12277. * @example
  12278. *
  12279. * _.isArrayBuffer(new ArrayBuffer(2));
  12280. * // => true
  12281. *
  12282. * _.isArrayBuffer(new Array(2));
  12283. * // => false
  12284. */
  12285. var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
  12286. /**
  12287. * Checks if `value` is array-like. A value is considered array-like if it's
  12288. * not a function and has a `value.length` that's an integer greater than or
  12289. * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
  12290. *
  12291. * @static
  12292. * @memberOf _
  12293. * @since 4.0.0
  12294. * @category Lang
  12295. * @param {*} value The value to check.
  12296. * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
  12297. * @example
  12298. *
  12299. * _.isArrayLike([1, 2, 3]);
  12300. * // => true
  12301. *
  12302. * _.isArrayLike(document.body.children);
  12303. * // => true
  12304. *
  12305. * _.isArrayLike('abc');
  12306. * // => true
  12307. *
  12308. * _.isArrayLike(_.noop);
  12309. * // => false
  12310. */
  12311. function isArrayLike(value) {
  12312. return value != null && isLength(value.length) && !isFunction(value);
  12313. }
  12314. /**
  12315. * This method is like `_.isArrayLike` except that it also checks if `value`
  12316. * is an object.
  12317. *
  12318. * @static
  12319. * @memberOf _
  12320. * @since 4.0.0
  12321. * @category Lang
  12322. * @param {*} value The value to check.
  12323. * @returns {boolean} Returns `true` if `value` is an array-like object,
  12324. * else `false`.
  12325. * @example
  12326. *
  12327. * _.isArrayLikeObject([1, 2, 3]);
  12328. * // => true
  12329. *
  12330. * _.isArrayLikeObject(document.body.children);
  12331. * // => true
  12332. *
  12333. * _.isArrayLikeObject('abc');
  12334. * // => false
  12335. *
  12336. * _.isArrayLikeObject(_.noop);
  12337. * // => false
  12338. */
  12339. function isArrayLikeObject(value) {
  12340. return isObjectLike(value) && isArrayLike(value);
  12341. }
  12342. /**
  12343. * Checks if `value` is classified as a boolean primitive or object.
  12344. *
  12345. * @static
  12346. * @memberOf _
  12347. * @since 0.1.0
  12348. * @category Lang
  12349. * @param {*} value The value to check.
  12350. * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
  12351. * @example
  12352. *
  12353. * _.isBoolean(false);
  12354. * // => true
  12355. *
  12356. * _.isBoolean(null);
  12357. * // => false
  12358. */
  12359. function isBoolean(value) {
  12360. return value === true || value === false ||
  12361. (isObjectLike(value) && baseGetTag(value) == boolTag);
  12362. }
  12363. /**
  12364. * Checks if `value` is a buffer.
  12365. *
  12366. * @static
  12367. * @memberOf _
  12368. * @since 4.3.0
  12369. * @category Lang
  12370. * @param {*} value The value to check.
  12371. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
  12372. * @example
  12373. *
  12374. * _.isBuffer(new Buffer(2));
  12375. * // => true
  12376. *
  12377. * _.isBuffer(new Uint8Array(2));
  12378. * // => false
  12379. */
  12380. var isBuffer = nativeIsBuffer || stubFalse;
  12381. /**
  12382. * Checks if `value` is classified as a `Date` object.
  12383. *
  12384. * @static
  12385. * @memberOf _
  12386. * @since 0.1.0
  12387. * @category Lang
  12388. * @param {*} value The value to check.
  12389. * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
  12390. * @example
  12391. *
  12392. * _.isDate(new Date);
  12393. * // => true
  12394. *
  12395. * _.isDate('Mon April 23 2012');
  12396. * // => false
  12397. */
  12398. var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
  12399. /**
  12400. * Checks if `value` is likely a DOM element.
  12401. *
  12402. * @static
  12403. * @memberOf _
  12404. * @since 0.1.0
  12405. * @category Lang
  12406. * @param {*} value The value to check.
  12407. * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
  12408. * @example
  12409. *
  12410. * _.isElement(document.body);
  12411. * // => true
  12412. *
  12413. * _.isElement('<body>');
  12414. * // => false
  12415. */
  12416. function isElement(value) {
  12417. return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
  12418. }
  12419. /**
  12420. * Checks if `value` is an empty object, collection, map, or set.
  12421. *
  12422. * Objects are considered empty if they have no own enumerable string keyed
  12423. * properties.
  12424. *
  12425. * Array-like values such as `arguments` objects, arrays, buffers, strings, or
  12426. * jQuery-like collections are considered empty if they have a `length` of `0`.
  12427. * Similarly, maps and sets are considered empty if they have a `size` of `0`.
  12428. *
  12429. * @static
  12430. * @memberOf _
  12431. * @since 0.1.0
  12432. * @category Lang
  12433. * @param {*} value The value to check.
  12434. * @returns {boolean} Returns `true` if `value` is empty, else `false`.
  12435. * @example
  12436. *
  12437. * _.isEmpty(null);
  12438. * // => true
  12439. *
  12440. * _.isEmpty(true);
  12441. * // => true
  12442. *
  12443. * _.isEmpty(1);
  12444. * // => true
  12445. *
  12446. * _.isEmpty([1, 2, 3]);
  12447. * // => false
  12448. *
  12449. * _.isEmpty({ 'a': 1 });
  12450. * // => false
  12451. */
  12452. function isEmpty(value) {
  12453. if (value == null) {
  12454. return true;
  12455. }
  12456. if (isArrayLike(value) &&
  12457. (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
  12458. isBuffer(value) || isTypedArray(value) || isArguments(value))) {
  12459. return !value.length;
  12460. }
  12461. var tag = getTag(value);
  12462. if (tag == mapTag || tag == setTag) {
  12463. return !value.size;
  12464. }
  12465. if (isPrototype(value)) {
  12466. return !baseKeys(value).length;
  12467. }
  12468. for (var key in value) {
  12469. if (hasOwnProperty.call(value, key)) {
  12470. return false;
  12471. }
  12472. }
  12473. return true;
  12474. }
  12475. /**
  12476. * Performs a deep comparison between two values to determine if they are
  12477. * equivalent.
  12478. *
  12479. * **Note:** This method supports comparing arrays, array buffers, booleans,
  12480. * date objects, error objects, maps, numbers, `Object` objects, regexes,
  12481. * sets, strings, symbols, and typed arrays. `Object` objects are compared
  12482. * by their own, not inherited, enumerable properties. Functions and DOM
  12483. * nodes are compared by strict equality, i.e. `===`.
  12484. *
  12485. * @static
  12486. * @memberOf _
  12487. * @since 0.1.0
  12488. * @category Lang
  12489. * @param {*} value The value to compare.
  12490. * @param {*} other The other value to compare.
  12491. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  12492. * @example
  12493. *
  12494. * var object = { 'a': 1 };
  12495. * var other = { 'a': 1 };
  12496. *
  12497. * _.isEqual(object, other);
  12498. * // => true
  12499. *
  12500. * object === other;
  12501. * // => false
  12502. */
  12503. function isEqual(value, other) {
  12504. return baseIsEqual(value, other);
  12505. }
  12506. /**
  12507. * This method is like `_.isEqual` except that it accepts `customizer` which
  12508. * is invoked to compare values. If `customizer` returns `undefined`, comparisons
  12509. * are handled by the method instead. The `customizer` is invoked with up to
  12510. * six arguments: (objValue, othValue [, index|key, object, other, stack]).
  12511. *
  12512. * @static
  12513. * @memberOf _
  12514. * @since 4.0.0
  12515. * @category Lang
  12516. * @param {*} value The value to compare.
  12517. * @param {*} other The other value to compare.
  12518. * @param {Function} [customizer] The function to customize comparisons.
  12519. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  12520. * @example
  12521. *
  12522. * function isGreeting(value) {
  12523. * return /^h(?:i|ello)$/.test(value);
  12524. * }
  12525. *
  12526. * function customizer(objValue, othValue) {
  12527. * if (isGreeting(objValue) && isGreeting(othValue)) {
  12528. * return true;
  12529. * }
  12530. * }
  12531. *
  12532. * var array = ['hello', 'goodbye'];
  12533. * var other = ['hi', 'goodbye'];
  12534. *
  12535. * _.isEqualWith(array, other, customizer);
  12536. * // => true
  12537. */
  12538. function isEqualWith(value, other, customizer) {
  12539. customizer = typeof customizer == 'function' ? customizer : undefined;
  12540. var result = customizer ? customizer(value, other) : undefined;
  12541. return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
  12542. }
  12543. /**
  12544. * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
  12545. * `SyntaxError`, `TypeError`, or `URIError` object.
  12546. *
  12547. * @static
  12548. * @memberOf _
  12549. * @since 3.0.0
  12550. * @category Lang
  12551. * @param {*} value The value to check.
  12552. * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
  12553. * @example
  12554. *
  12555. * _.isError(new Error);
  12556. * // => true
  12557. *
  12558. * _.isError(Error);
  12559. * // => false
  12560. */
  12561. function isError(value) {
  12562. if (!isObjectLike(value)) {
  12563. return false;
  12564. }
  12565. var tag = baseGetTag(value);
  12566. return tag == errorTag || tag == domExcTag ||
  12567. (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
  12568. }
  12569. /**
  12570. * Checks if `value` is a finite primitive number.
  12571. *
  12572. * **Note:** This method is based on
  12573. * [`Number.isFinite`](https://mdn.io/Number/isFinite).
  12574. *
  12575. * @static
  12576. * @memberOf _
  12577. * @since 0.1.0
  12578. * @category Lang
  12579. * @param {*} value The value to check.
  12580. * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
  12581. * @example
  12582. *
  12583. * _.isFinite(3);
  12584. * // => true
  12585. *
  12586. * _.isFinite(Number.MIN_VALUE);
  12587. * // => true
  12588. *
  12589. * _.isFinite(Infinity);
  12590. * // => false
  12591. *
  12592. * _.isFinite('3');
  12593. * // => false
  12594. */
  12595. function isFinite(value) {
  12596. return typeof value == 'number' && nativeIsFinite(value);
  12597. }
  12598. /**
  12599. * Checks if `value` is classified as a `Function` object.
  12600. *
  12601. * @static
  12602. * @memberOf _
  12603. * @since 0.1.0
  12604. * @category Lang
  12605. * @param {*} value The value to check.
  12606. * @returns {boolean} Returns `true` if `value` is a function, else `false`.
  12607. * @example
  12608. *
  12609. * _.isFunction(_);
  12610. * // => true
  12611. *
  12612. * _.isFunction(/abc/);
  12613. * // => false
  12614. */
  12615. function isFunction(value) {
  12616. if (!isObject(value)) {
  12617. return false;
  12618. }
  12619. // The use of `Object#toString` avoids issues with the `typeof` operator
  12620. // in Safari 9 which returns 'object' for typed arrays and other constructors.
  12621. var tag = baseGetTag(value);
  12622. return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
  12623. }
  12624. /**
  12625. * Checks if `value` is an integer.
  12626. *
  12627. * **Note:** This method is based on
  12628. * [`Number.isInteger`](https://mdn.io/Number/isInteger).
  12629. *
  12630. * @static
  12631. * @memberOf _
  12632. * @since 4.0.0
  12633. * @category Lang
  12634. * @param {*} value The value to check.
  12635. * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
  12636. * @example
  12637. *
  12638. * _.isInteger(3);
  12639. * // => true
  12640. *
  12641. * _.isInteger(Number.MIN_VALUE);
  12642. * // => false
  12643. *
  12644. * _.isInteger(Infinity);
  12645. * // => false
  12646. *
  12647. * _.isInteger('3');
  12648. * // => false
  12649. */
  12650. function isInteger(value) {
  12651. return typeof value == 'number' && value == toInteger(value);
  12652. }
  12653. /**
  12654. * Checks if `value` is a valid array-like length.
  12655. *
  12656. * **Note:** This method is loosely based on
  12657. * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
  12658. *
  12659. * @static
  12660. * @memberOf _
  12661. * @since 4.0.0
  12662. * @category Lang
  12663. * @param {*} value The value to check.
  12664. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  12665. * @example
  12666. *
  12667. * _.isLength(3);
  12668. * // => true
  12669. *
  12670. * _.isLength(Number.MIN_VALUE);
  12671. * // => false
  12672. *
  12673. * _.isLength(Infinity);
  12674. * // => false
  12675. *
  12676. * _.isLength('3');
  12677. * // => false
  12678. */
  12679. function isLength(value) {
  12680. return typeof value == 'number' &&
  12681. value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  12682. }
  12683. /**
  12684. * Checks if `value` is the
  12685. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  12686. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  12687. *
  12688. * @static
  12689. * @memberOf _
  12690. * @since 0.1.0
  12691. * @category Lang
  12692. * @param {*} value The value to check.
  12693. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  12694. * @example
  12695. *
  12696. * _.isObject({});
  12697. * // => true
  12698. *
  12699. * _.isObject([1, 2, 3]);
  12700. * // => true
  12701. *
  12702. * _.isObject(_.noop);
  12703. * // => true
  12704. *
  12705. * _.isObject(null);
  12706. * // => false
  12707. */
  12708. function isObject(value) {
  12709. var type = typeof value;
  12710. return value != null && (type == 'object' || type == 'function');
  12711. }
  12712. /**
  12713. * Checks if `value` is object-like. A value is object-like if it's not `null`
  12714. * and has a `typeof` result of "object".
  12715. *
  12716. * @static
  12717. * @memberOf _
  12718. * @since 4.0.0
  12719. * @category Lang
  12720. * @param {*} value The value to check.
  12721. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  12722. * @example
  12723. *
  12724. * _.isObjectLike({});
  12725. * // => true
  12726. *
  12727. * _.isObjectLike([1, 2, 3]);
  12728. * // => true
  12729. *
  12730. * _.isObjectLike(_.noop);
  12731. * // => false
  12732. *
  12733. * _.isObjectLike(null);
  12734. * // => false
  12735. */
  12736. function isObjectLike(value) {
  12737. return value != null && typeof value == 'object';
  12738. }
  12739. /**
  12740. * Checks if `value` is classified as a `Map` object.
  12741. *
  12742. * @static
  12743. * @memberOf _
  12744. * @since 4.3.0
  12745. * @category Lang
  12746. * @param {*} value The value to check.
  12747. * @returns {boolean} Returns `true` if `value` is a map, else `false`.
  12748. * @example
  12749. *
  12750. * _.isMap(new Map);
  12751. * // => true
  12752. *
  12753. * _.isMap(new WeakMap);
  12754. * // => false
  12755. */
  12756. var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
  12757. /**
  12758. * Performs a partial deep comparison between `object` and `source` to
  12759. * determine if `object` contains equivalent property values.
  12760. *
  12761. * **Note:** This method is equivalent to `_.matches` when `source` is
  12762. * partially applied.
  12763. *
  12764. * Partial comparisons will match empty array and empty object `source`
  12765. * values against any array or object value, respectively. See `_.isEqual`
  12766. * for a list of supported value comparisons.
  12767. *
  12768. * @static
  12769. * @memberOf _
  12770. * @since 3.0.0
  12771. * @category Lang
  12772. * @param {Object} object The object to inspect.
  12773. * @param {Object} source The object of property values to match.
  12774. * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  12775. * @example
  12776. *
  12777. * var object = { 'a': 1, 'b': 2 };
  12778. *
  12779. * _.isMatch(object, { 'b': 2 });
  12780. * // => true
  12781. *
  12782. * _.isMatch(object, { 'b': 1 });
  12783. * // => false
  12784. */
  12785. function isMatch(object, source) {
  12786. return object === source || baseIsMatch(object, source, getMatchData(source));
  12787. }
  12788. /**
  12789. * This method is like `_.isMatch` except that it accepts `customizer` which
  12790. * is invoked to compare values. If `customizer` returns `undefined`, comparisons
  12791. * are handled by the method instead. The `customizer` is invoked with five
  12792. * arguments: (objValue, srcValue, index|key, object, source).
  12793. *
  12794. * @static
  12795. * @memberOf _
  12796. * @since 4.0.0
  12797. * @category Lang
  12798. * @param {Object} object The object to inspect.
  12799. * @param {Object} source The object of property values to match.
  12800. * @param {Function} [customizer] The function to customize comparisons.
  12801. * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  12802. * @example
  12803. *
  12804. * function isGreeting(value) {
  12805. * return /^h(?:i|ello)$/.test(value);
  12806. * }
  12807. *
  12808. * function customizer(objValue, srcValue) {
  12809. * if (isGreeting(objValue) && isGreeting(srcValue)) {
  12810. * return true;
  12811. * }
  12812. * }
  12813. *
  12814. * var object = { 'greeting': 'hello' };
  12815. * var source = { 'greeting': 'hi' };
  12816. *
  12817. * _.isMatchWith(object, source, customizer);
  12818. * // => true
  12819. */
  12820. function isMatchWith(object, source, customizer) {
  12821. customizer = typeof customizer == 'function' ? customizer : undefined;
  12822. return baseIsMatch(object, source, getMatchData(source), customizer);
  12823. }
  12824. /**
  12825. * Checks if `value` is `NaN`.
  12826. *
  12827. * **Note:** This method is based on
  12828. * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
  12829. * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
  12830. * `undefined` and other non-number values.
  12831. *
  12832. * @static
  12833. * @memberOf _
  12834. * @since 0.1.0
  12835. * @category Lang
  12836. * @param {*} value The value to check.
  12837. * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
  12838. * @example
  12839. *
  12840. * _.isNaN(NaN);
  12841. * // => true
  12842. *
  12843. * _.isNaN(new Number(NaN));
  12844. * // => true
  12845. *
  12846. * isNaN(undefined);
  12847. * // => true
  12848. *
  12849. * _.isNaN(undefined);
  12850. * // => false
  12851. */
  12852. function isNaN(value) {
  12853. // An `NaN` primitive is the only value that is not equal to itself.
  12854. // Perform the `toStringTag` check first to avoid errors with some
  12855. // ActiveX objects in IE.
  12856. return isNumber(value) && value != +value;
  12857. }
  12858. /**
  12859. * Checks if `value` is a pristine native function.
  12860. *
  12861. * **Note:** This method can't reliably detect native functions in the presence
  12862. * of the core-js package because core-js circumvents this kind of detection.
  12863. * Despite multiple requests, the core-js maintainer has made it clear: any
  12864. * attempt to fix the detection will be obstructed. As a result, we're left
  12865. * with little choice but to throw an error. Unfortunately, this also affects
  12866. * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
  12867. * which rely on core-js.
  12868. *
  12869. * @static
  12870. * @memberOf _
  12871. * @since 3.0.0
  12872. * @category Lang
  12873. * @param {*} value The value to check.
  12874. * @returns {boolean} Returns `true` if `value` is a native function,
  12875. * else `false`.
  12876. * @example
  12877. *
  12878. * _.isNative(Array.prototype.push);
  12879. * // => true
  12880. *
  12881. * _.isNative(_);
  12882. * // => false
  12883. */
  12884. function isNative(value) {
  12885. if (isMaskable(value)) {
  12886. throw new Error(CORE_ERROR_TEXT);
  12887. }
  12888. return baseIsNative(value);
  12889. }
  12890. /**
  12891. * Checks if `value` is `null`.
  12892. *
  12893. * @static
  12894. * @memberOf _
  12895. * @since 0.1.0
  12896. * @category Lang
  12897. * @param {*} value The value to check.
  12898. * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
  12899. * @example
  12900. *
  12901. * _.isNull(null);
  12902. * // => true
  12903. *
  12904. * _.isNull(void 0);
  12905. * // => false
  12906. */
  12907. function isNull(value) {
  12908. return value === null;
  12909. }
  12910. /**
  12911. * Checks if `value` is `null` or `undefined`.
  12912. *
  12913. * @static
  12914. * @memberOf _
  12915. * @since 4.0.0
  12916. * @category Lang
  12917. * @param {*} value The value to check.
  12918. * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
  12919. * @example
  12920. *
  12921. * _.isNil(null);
  12922. * // => true
  12923. *
  12924. * _.isNil(void 0);
  12925. * // => true
  12926. *
  12927. * _.isNil(NaN);
  12928. * // => false
  12929. */
  12930. function isNil(value) {
  12931. return value == null;
  12932. }
  12933. /**
  12934. * Checks if `value` is classified as a `Number` primitive or object.
  12935. *
  12936. * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
  12937. * classified as numbers, use the `_.isFinite` method.
  12938. *
  12939. * @static
  12940. * @memberOf _
  12941. * @since 0.1.0
  12942. * @category Lang
  12943. * @param {*} value The value to check.
  12944. * @returns {boolean} Returns `true` if `value` is a number, else `false`.
  12945. * @example
  12946. *
  12947. * _.isNumber(3);
  12948. * // => true
  12949. *
  12950. * _.isNumber(Number.MIN_VALUE);
  12951. * // => true
  12952. *
  12953. * _.isNumber(Infinity);
  12954. * // => true
  12955. *
  12956. * _.isNumber('3');
  12957. * // => false
  12958. */
  12959. function isNumber(value) {
  12960. return typeof value == 'number' ||
  12961. (isObjectLike(value) && baseGetTag(value) == numberTag);
  12962. }
  12963. /**
  12964. * Checks if `value` is a plain object, that is, an object created by the
  12965. * `Object` constructor or one with a `[[Prototype]]` of `null`.
  12966. *
  12967. * @static
  12968. * @memberOf _
  12969. * @since 0.8.0
  12970. * @category Lang
  12971. * @param {*} value The value to check.
  12972. * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
  12973. * @example
  12974. *
  12975. * function Foo() {
  12976. * this.a = 1;
  12977. * }
  12978. *
  12979. * _.isPlainObject(new Foo);
  12980. * // => false
  12981. *
  12982. * _.isPlainObject([1, 2, 3]);
  12983. * // => false
  12984. *
  12985. * _.isPlainObject({ 'x': 0, 'y': 0 });
  12986. * // => true
  12987. *
  12988. * _.isPlainObject(Object.create(null));
  12989. * // => true
  12990. */
  12991. function isPlainObject(value) {
  12992. if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
  12993. return false;
  12994. }
  12995. var proto = getPrototype(value);
  12996. if (proto === null) {
  12997. return true;
  12998. }
  12999. var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
  13000. return typeof Ctor == 'function' && Ctor instanceof Ctor &&
  13001. funcToString.call(Ctor) == objectCtorString;
  13002. }
  13003. /**
  13004. * Checks if `value` is classified as a `RegExp` object.
  13005. *
  13006. * @static
  13007. * @memberOf _
  13008. * @since 0.1.0
  13009. * @category Lang
  13010. * @param {*} value The value to check.
  13011. * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
  13012. * @example
  13013. *
  13014. * _.isRegExp(/abc/);
  13015. * // => true
  13016. *
  13017. * _.isRegExp('/abc/');
  13018. * // => false
  13019. */
  13020. var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
  13021. /**
  13022. * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
  13023. * double precision number which isn't the result of a rounded unsafe integer.
  13024. *
  13025. * **Note:** This method is based on
  13026. * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
  13027. *
  13028. * @static
  13029. * @memberOf _
  13030. * @since 4.0.0
  13031. * @category Lang
  13032. * @param {*} value The value to check.
  13033. * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
  13034. * @example
  13035. *
  13036. * _.isSafeInteger(3);
  13037. * // => true
  13038. *
  13039. * _.isSafeInteger(Number.MIN_VALUE);
  13040. * // => false
  13041. *
  13042. * _.isSafeInteger(Infinity);
  13043. * // => false
  13044. *
  13045. * _.isSafeInteger('3');
  13046. * // => false
  13047. */
  13048. function isSafeInteger(value) {
  13049. return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
  13050. }
  13051. /**
  13052. * Checks if `value` is classified as a `Set` object.
  13053. *
  13054. * @static
  13055. * @memberOf _
  13056. * @since 4.3.0
  13057. * @category Lang
  13058. * @param {*} value The value to check.
  13059. * @returns {boolean} Returns `true` if `value` is a set, else `false`.
  13060. * @example
  13061. *
  13062. * _.isSet(new Set);
  13063. * // => true
  13064. *
  13065. * _.isSet(new WeakSet);
  13066. * // => false
  13067. */
  13068. var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
  13069. /**
  13070. * Checks if `value` is classified as a `String` primitive or object.
  13071. *
  13072. * @static
  13073. * @since 0.1.0
  13074. * @memberOf _
  13075. * @category Lang
  13076. * @param {*} value The value to check.
  13077. * @returns {boolean} Returns `true` if `value` is a string, else `false`.
  13078. * @example
  13079. *
  13080. * _.isString('abc');
  13081. * // => true
  13082. *
  13083. * _.isString(1);
  13084. * // => false
  13085. */
  13086. function isString(value) {
  13087. return typeof value == 'string' ||
  13088. (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
  13089. }
  13090. /**
  13091. * Checks if `value` is classified as a `Symbol` primitive or object.
  13092. *
  13093. * @static
  13094. * @memberOf _
  13095. * @since 4.0.0
  13096. * @category Lang
  13097. * @param {*} value The value to check.
  13098. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  13099. * @example
  13100. *
  13101. * _.isSymbol(Symbol.iterator);
  13102. * // => true
  13103. *
  13104. * _.isSymbol('abc');
  13105. * // => false
  13106. */
  13107. function isSymbol(value) {
  13108. return typeof value == 'symbol' ||
  13109. (isObjectLike(value) && baseGetTag(value) == symbolTag);
  13110. }
  13111. /**
  13112. * Checks if `value` is classified as a typed array.
  13113. *
  13114. * @static
  13115. * @memberOf _
  13116. * @since 3.0.0
  13117. * @category Lang
  13118. * @param {*} value The value to check.
  13119. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  13120. * @example
  13121. *
  13122. * _.isTypedArray(new Uint8Array);
  13123. * // => true
  13124. *
  13125. * _.isTypedArray([]);
  13126. * // => false
  13127. */
  13128. var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
  13129. /**
  13130. * Checks if `value` is `undefined`.
  13131. *
  13132. * @static
  13133. * @since 0.1.0
  13134. * @memberOf _
  13135. * @category Lang
  13136. * @param {*} value The value to check.
  13137. * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
  13138. * @example
  13139. *
  13140. * _.isUndefined(void 0);
  13141. * // => true
  13142. *
  13143. * _.isUndefined(null);
  13144. * // => false
  13145. */
  13146. function isUndefined(value) {
  13147. return value === undefined;
  13148. }
  13149. /**
  13150. * Checks if `value` is classified as a `WeakMap` object.
  13151. *
  13152. * @static
  13153. * @memberOf _
  13154. * @since 4.3.0
  13155. * @category Lang
  13156. * @param {*} value The value to check.
  13157. * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
  13158. * @example
  13159. *
  13160. * _.isWeakMap(new WeakMap);
  13161. * // => true
  13162. *
  13163. * _.isWeakMap(new Map);
  13164. * // => false
  13165. */
  13166. function isWeakMap(value) {
  13167. return isObjectLike(value) && getTag(value) == weakMapTag;
  13168. }
  13169. /**
  13170. * Checks if `value` is classified as a `WeakSet` object.
  13171. *
  13172. * @static
  13173. * @memberOf _
  13174. * @since 4.3.0
  13175. * @category Lang
  13176. * @param {*} value The value to check.
  13177. * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.
  13178. * @example
  13179. *
  13180. * _.isWeakSet(new WeakSet);
  13181. * // => true
  13182. *
  13183. * _.isWeakSet(new Set);
  13184. * // => false
  13185. */
  13186. function isWeakSet(value) {
  13187. return isObjectLike(value) && baseGetTag(value) == weakSetTag;
  13188. }
  13189. /**
  13190. * Checks if `value` is less than `other`.
  13191. *
  13192. * @static
  13193. * @memberOf _
  13194. * @since 3.9.0
  13195. * @category Lang
  13196. * @param {*} value The value to compare.
  13197. * @param {*} other The other value to compare.
  13198. * @returns {boolean} Returns `true` if `value` is less than `other`,
  13199. * else `false`.
  13200. * @see _.gt
  13201. * @example
  13202. *
  13203. * _.lt(1, 3);
  13204. * // => true
  13205. *
  13206. * _.lt(3, 3);
  13207. * // => false
  13208. *
  13209. * _.lt(3, 1);
  13210. * // => false
  13211. */
  13212. var lt = createRelationalOperation(baseLt);
  13213. /**
  13214. * Checks if `value` is less than or equal to `other`.
  13215. *
  13216. * @static
  13217. * @memberOf _
  13218. * @since 3.9.0
  13219. * @category Lang
  13220. * @param {*} value The value to compare.
  13221. * @param {*} other The other value to compare.
  13222. * @returns {boolean} Returns `true` if `value` is less than or equal to
  13223. * `other`, else `false`.
  13224. * @see _.gte
  13225. * @example
  13226. *
  13227. * _.lte(1, 3);
  13228. * // => true
  13229. *
  13230. * _.lte(3, 3);
  13231. * // => true
  13232. *
  13233. * _.lte(3, 1);
  13234. * // => false
  13235. */
  13236. var lte = createRelationalOperation(function(value, other) {
  13237. return value <= other;
  13238. });
  13239. /**
  13240. * Converts `value` to an array.
  13241. *
  13242. * @static
  13243. * @since 0.1.0
  13244. * @memberOf _
  13245. * @category Lang
  13246. * @param {*} value The value to convert.
  13247. * @returns {Array} Returns the converted array.
  13248. * @example
  13249. *
  13250. * _.toArray({ 'a': 1, 'b': 2 });
  13251. * // => [1, 2]
  13252. *
  13253. * _.toArray('abc');
  13254. * // => ['a', 'b', 'c']
  13255. *
  13256. * _.toArray(1);
  13257. * // => []
  13258. *
  13259. * _.toArray(null);
  13260. * // => []
  13261. */
  13262. function toArray(value) {
  13263. if (!value) {
  13264. return [];
  13265. }
  13266. if (isArrayLike(value)) {
  13267. return isString(value) ? stringToArray(value) : copyArray(value);
  13268. }
  13269. if (symIterator && value[symIterator]) {
  13270. return iteratorToArray(value[symIterator]());
  13271. }
  13272. var tag = getTag(value),
  13273. func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
  13274. return func(value);
  13275. }
  13276. /**
  13277. * Converts `value` to a finite number.
  13278. *
  13279. * @static
  13280. * @memberOf _
  13281. * @since 4.12.0
  13282. * @category Lang
  13283. * @param {*} value The value to convert.
  13284. * @returns {number} Returns the converted number.
  13285. * @example
  13286. *
  13287. * _.toFinite(3.2);
  13288. * // => 3.2
  13289. *
  13290. * _.toFinite(Number.MIN_VALUE);
  13291. * // => 5e-324
  13292. *
  13293. * _.toFinite(Infinity);
  13294. * // => 1.7976931348623157e+308
  13295. *
  13296. * _.toFinite('3.2');
  13297. * // => 3.2
  13298. */
  13299. function toFinite(value) {
  13300. if (!value) {
  13301. return value === 0 ? value : 0;
  13302. }
  13303. value = toNumber(value);
  13304. if (value === INFINITY || value === -INFINITY) {
  13305. var sign = (value < 0 ? -1 : 1);
  13306. return sign * MAX_INTEGER;
  13307. }
  13308. return value === value ? value : 0;
  13309. }
  13310. /**
  13311. * Converts `value` to an integer.
  13312. *
  13313. * **Note:** This method is loosely based on
  13314. * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
  13315. *
  13316. * @static
  13317. * @memberOf _
  13318. * @since 4.0.0
  13319. * @category Lang
  13320. * @param {*} value The value to convert.
  13321. * @returns {number} Returns the converted integer.
  13322. * @example
  13323. *
  13324. * _.toInteger(3.2);
  13325. * // => 3
  13326. *
  13327. * _.toInteger(Number.MIN_VALUE);
  13328. * // => 0
  13329. *
  13330. * _.toInteger(Infinity);
  13331. * // => 1.7976931348623157e+308
  13332. *
  13333. * _.toInteger('3.2');
  13334. * // => 3
  13335. */
  13336. function toInteger(value) {
  13337. var result = toFinite(value),
  13338. remainder = result % 1;
  13339. return result === result ? (remainder ? result - remainder : result) : 0;
  13340. }
  13341. /**
  13342. * Converts `value` to an integer suitable for use as the length of an
  13343. * array-like object.
  13344. *
  13345. * **Note:** This method is based on
  13346. * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
  13347. *
  13348. * @static
  13349. * @memberOf _
  13350. * @since 4.0.0
  13351. * @category Lang
  13352. * @param {*} value The value to convert.
  13353. * @returns {number} Returns the converted integer.
  13354. * @example
  13355. *
  13356. * _.toLength(3.2);
  13357. * // => 3
  13358. *
  13359. * _.toLength(Number.MIN_VALUE);
  13360. * // => 0
  13361. *
  13362. * _.toLength(Infinity);
  13363. * // => 4294967295
  13364. *
  13365. * _.toLength('3.2');
  13366. * // => 3
  13367. */
  13368. function toLength(value) {
  13369. return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
  13370. }
  13371. /**
  13372. * Converts `value` to a number.
  13373. *
  13374. * @static
  13375. * @memberOf _
  13376. * @since 4.0.0
  13377. * @category Lang
  13378. * @param {*} value The value to process.
  13379. * @returns {number} Returns the number.
  13380. * @example
  13381. *
  13382. * _.toNumber(3.2);
  13383. * // => 3.2
  13384. *
  13385. * _.toNumber(Number.MIN_VALUE);
  13386. * // => 5e-324
  13387. *
  13388. * _.toNumber(Infinity);
  13389. * // => Infinity
  13390. *
  13391. * _.toNumber('3.2');
  13392. * // => 3.2
  13393. */
  13394. function toNumber(value) {
  13395. if (typeof value == 'number') {
  13396. return value;
  13397. }
  13398. if (isSymbol(value)) {
  13399. return NAN;
  13400. }
  13401. if (isObject(value)) {
  13402. var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
  13403. value = isObject(other) ? (other + '') : other;
  13404. }
  13405. if (typeof value != 'string') {
  13406. return value === 0 ? value : +value;
  13407. }
  13408. value = baseTrim(value);
  13409. var isBinary = reIsBinary.test(value);
  13410. return (isBinary || reIsOctal.test(value))
  13411. ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
  13412. : (reIsBadHex.test(value) ? NAN : +value);
  13413. }
  13414. /**
  13415. * Converts `value` to a plain object flattening inherited enumerable string
  13416. * keyed properties of `value` to own properties of the plain object.
  13417. *
  13418. * @static
  13419. * @memberOf _
  13420. * @since 3.0.0
  13421. * @category Lang
  13422. * @param {*} value The value to convert.
  13423. * @returns {Object} Returns the converted plain object.
  13424. * @example
  13425. *
  13426. * function Foo() {
  13427. * this.b = 2;
  13428. * }
  13429. *
  13430. * Foo.prototype.c = 3;
  13431. *
  13432. * _.assign({ 'a': 1 }, new Foo);
  13433. * // => { 'a': 1, 'b': 2 }
  13434. *
  13435. * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
  13436. * // => { 'a': 1, 'b': 2, 'c': 3 }
  13437. */
  13438. function toPlainObject(value) {
  13439. return copyObject(value, keysIn(value));
  13440. }
  13441. /**
  13442. * Converts `value` to a safe integer. A safe integer can be compared and
  13443. * represented correctly.
  13444. *
  13445. * @static
  13446. * @memberOf _
  13447. * @since 4.0.0
  13448. * @category Lang
  13449. * @param {*} value The value to convert.
  13450. * @returns {number} Returns the converted integer.
  13451. * @example
  13452. *
  13453. * _.toSafeInteger(3.2);
  13454. * // => 3
  13455. *
  13456. * _.toSafeInteger(Number.MIN_VALUE);
  13457. * // => 0
  13458. *
  13459. * _.toSafeInteger(Infinity);
  13460. * // => 9007199254740991
  13461. *
  13462. * _.toSafeInteger('3.2');
  13463. * // => 3
  13464. */
  13465. function toSafeInteger(value) {
  13466. return value
  13467. ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
  13468. : (value === 0 ? value : 0);
  13469. }
  13470. /**
  13471. * Converts `value` to a string. An empty string is returned for `null`
  13472. * and `undefined` values. The sign of `-0` is preserved.
  13473. *
  13474. * @static
  13475. * @memberOf _
  13476. * @since 4.0.0
  13477. * @category Lang
  13478. * @param {*} value The value to convert.
  13479. * @returns {string} Returns the converted string.
  13480. * @example
  13481. *
  13482. * _.toString(null);
  13483. * // => ''
  13484. *
  13485. * _.toString(-0);
  13486. * // => '-0'
  13487. *
  13488. * _.toString([1, 2, 3]);
  13489. * // => '1,2,3'
  13490. */
  13491. function toString(value) {
  13492. return value == null ? '' : baseToString(value);
  13493. }
  13494. /*------------------------------------------------------------------------*/
  13495. /**
  13496. * Assigns own enumerable string keyed properties of source objects to the
  13497. * destination object. Source objects are applied from left to right.
  13498. * Subsequent sources overwrite property assignments of previous sources.
  13499. *
  13500. * **Note:** This method mutates `object` and is loosely based on
  13501. * [`Object.assign`](https://mdn.io/Object/assign).
  13502. *
  13503. * @static
  13504. * @memberOf _
  13505. * @since 0.10.0
  13506. * @category Object
  13507. * @param {Object} object The destination object.
  13508. * @param {...Object} [sources] The source objects.
  13509. * @returns {Object} Returns `object`.
  13510. * @see _.assignIn
  13511. * @example
  13512. *
  13513. * function Foo() {
  13514. * this.a = 1;
  13515. * }
  13516. *
  13517. * function Bar() {
  13518. * this.c = 3;
  13519. * }
  13520. *
  13521. * Foo.prototype.b = 2;
  13522. * Bar.prototype.d = 4;
  13523. *
  13524. * _.assign({ 'a': 0 }, new Foo, new Bar);
  13525. * // => { 'a': 1, 'c': 3 }
  13526. */
  13527. var assign = createAssigner(function(object, source) {
  13528. if (isPrototype(source) || isArrayLike(source)) {
  13529. copyObject(source, keys(source), object);
  13530. return;
  13531. }
  13532. for (var key in source) {
  13533. if (hasOwnProperty.call(source, key)) {
  13534. assignValue(object, key, source[key]);
  13535. }
  13536. }
  13537. });
  13538. /**
  13539. * This method is like `_.assign` except that it iterates over own and
  13540. * inherited source properties.
  13541. *
  13542. * **Note:** This method mutates `object`.
  13543. *
  13544. * @static
  13545. * @memberOf _
  13546. * @since 4.0.0
  13547. * @alias extend
  13548. * @category Object
  13549. * @param {Object} object The destination object.
  13550. * @param {...Object} [sources] The source objects.
  13551. * @returns {Object} Returns `object`.
  13552. * @see _.assign
  13553. * @example
  13554. *
  13555. * function Foo() {
  13556. * this.a = 1;
  13557. * }
  13558. *
  13559. * function Bar() {
  13560. * this.c = 3;
  13561. * }
  13562. *
  13563. * Foo.prototype.b = 2;
  13564. * Bar.prototype.d = 4;
  13565. *
  13566. * _.assignIn({ 'a': 0 }, new Foo, new Bar);
  13567. * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
  13568. */
  13569. var assignIn = createAssigner(function(object, source) {
  13570. copyObject(source, keysIn(source), object);
  13571. });
  13572. /**
  13573. * This method is like `_.assignIn` except that it accepts `customizer`
  13574. * which is invoked to produce the assigned values. If `customizer` returns
  13575. * `undefined`, assignment is handled by the method instead. The `customizer`
  13576. * is invoked with five arguments: (objValue, srcValue, key, object, source).
  13577. *
  13578. * **Note:** This method mutates `object`.
  13579. *
  13580. * @static
  13581. * @memberOf _
  13582. * @since 4.0.0
  13583. * @alias extendWith
  13584. * @category Object
  13585. * @param {Object} object The destination object.
  13586. * @param {...Object} sources The source objects.
  13587. * @param {Function} [customizer] The function to customize assigned values.
  13588. * @returns {Object} Returns `object`.
  13589. * @see _.assignWith
  13590. * @example
  13591. *
  13592. * function customizer(objValue, srcValue) {
  13593. * return _.isUndefined(objValue) ? srcValue : objValue;
  13594. * }
  13595. *
  13596. * var defaults = _.partialRight(_.assignInWith, customizer);
  13597. *
  13598. * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
  13599. * // => { 'a': 1, 'b': 2 }
  13600. */
  13601. var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
  13602. copyObject(source, keysIn(source), object, customizer);
  13603. });
  13604. /**
  13605. * This method is like `_.assign` except that it accepts `customizer`
  13606. * which is invoked to produce the assigned values. If `customizer` returns
  13607. * `undefined`, assignment is handled by the method instead. The `customizer`
  13608. * is invoked with five arguments: (objValue, srcValue, key, object, source).
  13609. *
  13610. * **Note:** This method mutates `object`.
  13611. *
  13612. * @static
  13613. * @memberOf _
  13614. * @since 4.0.0
  13615. * @category Object
  13616. * @param {Object} object The destination object.
  13617. * @param {...Object} sources The source objects.
  13618. * @param {Function} [customizer] The function to customize assigned values.
  13619. * @returns {Object} Returns `object`.
  13620. * @see _.assignInWith
  13621. * @example
  13622. *
  13623. * function customizer(objValue, srcValue) {
  13624. * return _.isUndefined(objValue) ? srcValue : objValue;
  13625. * }
  13626. *
  13627. * var defaults = _.partialRight(_.assignWith, customizer);
  13628. *
  13629. * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
  13630. * // => { 'a': 1, 'b': 2 }
  13631. */
  13632. var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
  13633. copyObject(source, keys(source), object, customizer);
  13634. });
  13635. /**
  13636. * Creates an array of values corresponding to `paths` of `object`.
  13637. *
  13638. * @static
  13639. * @memberOf _
  13640. * @since 1.0.0
  13641. * @category Object
  13642. * @param {Object} object The object to iterate over.
  13643. * @param {...(string|string[])} [paths] The property paths to pick.
  13644. * @returns {Array} Returns the picked values.
  13645. * @example
  13646. *
  13647. * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
  13648. *
  13649. * _.at(object, ['a[0].b.c', 'a[1]']);
  13650. * // => [3, 4]
  13651. */
  13652. var at = flatRest(baseAt);
  13653. /**
  13654. * Creates an object that inherits from the `prototype` object. If a
  13655. * `properties` object is given, its own enumerable string keyed properties
  13656. * are assigned to the created object.
  13657. *
  13658. * @static
  13659. * @memberOf _
  13660. * @since 2.3.0
  13661. * @category Object
  13662. * @param {Object} prototype The object to inherit from.
  13663. * @param {Object} [properties] The properties to assign to the object.
  13664. * @returns {Object} Returns the new object.
  13665. * @example
  13666. *
  13667. * function Shape() {
  13668. * this.x = 0;
  13669. * this.y = 0;
  13670. * }
  13671. *
  13672. * function Circle() {
  13673. * Shape.call(this);
  13674. * }
  13675. *
  13676. * Circle.prototype = _.create(Shape.prototype, {
  13677. * 'constructor': Circle
  13678. * });
  13679. *
  13680. * var circle = new Circle;
  13681. * circle instanceof Circle;
  13682. * // => true
  13683. *
  13684. * circle instanceof Shape;
  13685. * // => true
  13686. */
  13687. function create(prototype, properties) {
  13688. var result = baseCreate(prototype);
  13689. return properties == null ? result : baseAssign(result, properties);
  13690. }
  13691. /**
  13692. * Assigns own and inherited enumerable string keyed properties of source
  13693. * objects to the destination object for all destination properties that
  13694. * resolve to `undefined`. Source objects are applied from left to right.
  13695. * Once a property is set, additional values of the same property are ignored.
  13696. *
  13697. * **Note:** This method mutates `object`.
  13698. *
  13699. * @static
  13700. * @since 0.1.0
  13701. * @memberOf _
  13702. * @category Object
  13703. * @param {Object} object The destination object.
  13704. * @param {...Object} [sources] The source objects.
  13705. * @returns {Object} Returns `object`.
  13706. * @see _.defaultsDeep
  13707. * @example
  13708. *
  13709. * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
  13710. * // => { 'a': 1, 'b': 2 }
  13711. */
  13712. var defaults = baseRest(function(object, sources) {
  13713. object = Object(object);
  13714. var index = -1;
  13715. var length = sources.length;
  13716. var guard = length > 2 ? sources[2] : undefined;
  13717. if (guard && isIterateeCall(sources[0], sources[1], guard)) {
  13718. length = 1;
  13719. }
  13720. while (++index < length) {
  13721. var source = sources[index];
  13722. var props = keysIn(source);
  13723. var propsIndex = -1;
  13724. var propsLength = props.length;
  13725. while (++propsIndex < propsLength) {
  13726. var key = props[propsIndex];
  13727. var value = object[key];
  13728. if (value === undefined ||
  13729. (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
  13730. object[key] = source[key];
  13731. }
  13732. }
  13733. }
  13734. return object;
  13735. });
  13736. /**
  13737. * This method is like `_.defaults` except that it recursively assigns
  13738. * default properties.
  13739. *
  13740. * **Note:** This method mutates `object`.
  13741. *
  13742. * @static
  13743. * @memberOf _
  13744. * @since 3.10.0
  13745. * @category Object
  13746. * @param {Object} object The destination object.
  13747. * @param {...Object} [sources] The source objects.
  13748. * @returns {Object} Returns `object`.
  13749. * @see _.defaults
  13750. * @example
  13751. *
  13752. * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });
  13753. * // => { 'a': { 'b': 2, 'c': 3 } }
  13754. */
  13755. var defaultsDeep = baseRest(function(args) {
  13756. args.push(undefined, customDefaultsMerge);
  13757. return apply(mergeWith, undefined, args);
  13758. });
  13759. /**
  13760. * This method is like `_.find` except that it returns the key of the first
  13761. * element `predicate` returns truthy for instead of the element itself.
  13762. *
  13763. * @static
  13764. * @memberOf _
  13765. * @since 1.1.0
  13766. * @category Object
  13767. * @param {Object} object The object to inspect.
  13768. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  13769. * @returns {string|undefined} Returns the key of the matched element,
  13770. * else `undefined`.
  13771. * @example
  13772. *
  13773. * var users = {
  13774. * 'barney': { 'age': 36, 'active': true },
  13775. * 'fred': { 'age': 40, 'active': false },
  13776. * 'pebbles': { 'age': 1, 'active': true }
  13777. * };
  13778. *
  13779. * _.findKey(users, function(o) { return o.age < 40; });
  13780. * // => 'barney' (iteration order is not guaranteed)
  13781. *
  13782. * // The `_.matches` iteratee shorthand.
  13783. * _.findKey(users, { 'age': 1, 'active': true });
  13784. * // => 'pebbles'
  13785. *
  13786. * // The `_.matchesProperty` iteratee shorthand.
  13787. * _.findKey(users, ['active', false]);
  13788. * // => 'fred'
  13789. *
  13790. * // The `_.property` iteratee shorthand.
  13791. * _.findKey(users, 'active');
  13792. * // => 'barney'
  13793. */
  13794. function findKey(object, predicate) {
  13795. return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
  13796. }
  13797. /**
  13798. * This method is like `_.findKey` except that it iterates over elements of
  13799. * a collection in the opposite order.
  13800. *
  13801. * @static
  13802. * @memberOf _
  13803. * @since 2.0.0
  13804. * @category Object
  13805. * @param {Object} object The object to inspect.
  13806. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  13807. * @returns {string|undefined} Returns the key of the matched element,
  13808. * else `undefined`.
  13809. * @example
  13810. *
  13811. * var users = {
  13812. * 'barney': { 'age': 36, 'active': true },
  13813. * 'fred': { 'age': 40, 'active': false },
  13814. * 'pebbles': { 'age': 1, 'active': true }
  13815. * };
  13816. *
  13817. * _.findLastKey(users, function(o) { return o.age < 40; });
  13818. * // => returns 'pebbles' assuming `_.findKey` returns 'barney'
  13819. *
  13820. * // The `_.matches` iteratee shorthand.
  13821. * _.findLastKey(users, { 'age': 36, 'active': true });
  13822. * // => 'barney'
  13823. *
  13824. * // The `_.matchesProperty` iteratee shorthand.
  13825. * _.findLastKey(users, ['active', false]);
  13826. * // => 'fred'
  13827. *
  13828. * // The `_.property` iteratee shorthand.
  13829. * _.findLastKey(users, 'active');
  13830. * // => 'pebbles'
  13831. */
  13832. function findLastKey(object, predicate) {
  13833. return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
  13834. }
  13835. /**
  13836. * Iterates over own and inherited enumerable string keyed properties of an
  13837. * object and invokes `iteratee` for each property. The iteratee is invoked
  13838. * with three arguments: (value, key, object). Iteratee functions may exit
  13839. * iteration early by explicitly returning `false`.
  13840. *
  13841. * @static
  13842. * @memberOf _
  13843. * @since 0.3.0
  13844. * @category Object
  13845. * @param {Object} object The object to iterate over.
  13846. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  13847. * @returns {Object} Returns `object`.
  13848. * @see _.forInRight
  13849. * @example
  13850. *
  13851. * function Foo() {
  13852. * this.a = 1;
  13853. * this.b = 2;
  13854. * }
  13855. *
  13856. * Foo.prototype.c = 3;
  13857. *
  13858. * _.forIn(new Foo, function(value, key) {
  13859. * console.log(key);
  13860. * });
  13861. * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
  13862. */
  13863. function forIn(object, iteratee) {
  13864. return object == null
  13865. ? object
  13866. : baseFor(object, getIteratee(iteratee, 3), keysIn);
  13867. }
  13868. /**
  13869. * This method is like `_.forIn` except that it iterates over properties of
  13870. * `object` in the opposite order.
  13871. *
  13872. * @static
  13873. * @memberOf _
  13874. * @since 2.0.0
  13875. * @category Object
  13876. * @param {Object} object The object to iterate over.
  13877. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  13878. * @returns {Object} Returns `object`.
  13879. * @see _.forIn
  13880. * @example
  13881. *
  13882. * function Foo() {
  13883. * this.a = 1;
  13884. * this.b = 2;
  13885. * }
  13886. *
  13887. * Foo.prototype.c = 3;
  13888. *
  13889. * _.forInRight(new Foo, function(value, key) {
  13890. * console.log(key);
  13891. * });
  13892. * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
  13893. */
  13894. function forInRight(object, iteratee) {
  13895. return object == null
  13896. ? object
  13897. : baseForRight(object, getIteratee(iteratee, 3), keysIn);
  13898. }
  13899. /**
  13900. * Iterates over own enumerable string keyed properties of an object and
  13901. * invokes `iteratee` for each property. The iteratee is invoked with three
  13902. * arguments: (value, key, object). Iteratee functions may exit iteration
  13903. * early by explicitly returning `false`.
  13904. *
  13905. * @static
  13906. * @memberOf _
  13907. * @since 0.3.0
  13908. * @category Object
  13909. * @param {Object} object The object to iterate over.
  13910. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  13911. * @returns {Object} Returns `object`.
  13912. * @see _.forOwnRight
  13913. * @example
  13914. *
  13915. * function Foo() {
  13916. * this.a = 1;
  13917. * this.b = 2;
  13918. * }
  13919. *
  13920. * Foo.prototype.c = 3;
  13921. *
  13922. * _.forOwn(new Foo, function(value, key) {
  13923. * console.log(key);
  13924. * });
  13925. * // => Logs 'a' then 'b' (iteration order is not guaranteed).
  13926. */
  13927. function forOwn(object, iteratee) {
  13928. return object && baseForOwn(object, getIteratee(iteratee, 3));
  13929. }
  13930. /**
  13931. * This method is like `_.forOwn` except that it iterates over properties of
  13932. * `object` in the opposite order.
  13933. *
  13934. * @static
  13935. * @memberOf _
  13936. * @since 2.0.0
  13937. * @category Object
  13938. * @param {Object} object The object to iterate over.
  13939. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  13940. * @returns {Object} Returns `object`.
  13941. * @see _.forOwn
  13942. * @example
  13943. *
  13944. * function Foo() {
  13945. * this.a = 1;
  13946. * this.b = 2;
  13947. * }
  13948. *
  13949. * Foo.prototype.c = 3;
  13950. *
  13951. * _.forOwnRight(new Foo, function(value, key) {
  13952. * console.log(key);
  13953. * });
  13954. * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
  13955. */
  13956. function forOwnRight(object, iteratee) {
  13957. return object && baseForOwnRight(object, getIteratee(iteratee, 3));
  13958. }
  13959. /**
  13960. * Creates an array of function property names from own enumerable properties
  13961. * of `object`.
  13962. *
  13963. * @static
  13964. * @since 0.1.0
  13965. * @memberOf _
  13966. * @category Object
  13967. * @param {Object} object The object to inspect.
  13968. * @returns {Array} Returns the function names.
  13969. * @see _.functionsIn
  13970. * @example
  13971. *
  13972. * function Foo() {
  13973. * this.a = _.constant('a');
  13974. * this.b = _.constant('b');
  13975. * }
  13976. *
  13977. * Foo.prototype.c = _.constant('c');
  13978. *
  13979. * _.functions(new Foo);
  13980. * // => ['a', 'b']
  13981. */
  13982. function functions(object) {
  13983. return object == null ? [] : baseFunctions(object, keys(object));
  13984. }
  13985. /**
  13986. * Creates an array of function property names from own and inherited
  13987. * enumerable properties of `object`.
  13988. *
  13989. * @static
  13990. * @memberOf _
  13991. * @since 4.0.0
  13992. * @category Object
  13993. * @param {Object} object The object to inspect.
  13994. * @returns {Array} Returns the function names.
  13995. * @see _.functions
  13996. * @example
  13997. *
  13998. * function Foo() {
  13999. * this.a = _.constant('a');
  14000. * this.b = _.constant('b');
  14001. * }
  14002. *
  14003. * Foo.prototype.c = _.constant('c');
  14004. *
  14005. * _.functionsIn(new Foo);
  14006. * // => ['a', 'b', 'c']
  14007. */
  14008. function functionsIn(object) {
  14009. return object == null ? [] : baseFunctions(object, keysIn(object));
  14010. }
  14011. /**
  14012. * Gets the value at `path` of `object`. If the resolved value is
  14013. * `undefined`, the `defaultValue` is returned in its place.
  14014. *
  14015. * @static
  14016. * @memberOf _
  14017. * @since 3.7.0
  14018. * @category Object
  14019. * @param {Object} object The object to query.
  14020. * @param {Array|string} path The path of the property to get.
  14021. * @param {*} [defaultValue] The value returned for `undefined` resolved values.
  14022. * @returns {*} Returns the resolved value.
  14023. * @example
  14024. *
  14025. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  14026. *
  14027. * _.get(object, 'a[0].b.c');
  14028. * // => 3
  14029. *
  14030. * _.get(object, ['a', '0', 'b', 'c']);
  14031. * // => 3
  14032. *
  14033. * _.get(object, 'a.b.c', 'default');
  14034. * // => 'default'
  14035. */
  14036. function get(object, path, defaultValue) {
  14037. var result = object == null ? undefined : baseGet(object, path);
  14038. return result === undefined ? defaultValue : result;
  14039. }
  14040. /**
  14041. * Checks if `path` is a direct property of `object`.
  14042. *
  14043. * @static
  14044. * @since 0.1.0
  14045. * @memberOf _
  14046. * @category Object
  14047. * @param {Object} object The object to query.
  14048. * @param {Array|string} path The path to check.
  14049. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  14050. * @example
  14051. *
  14052. * var object = { 'a': { 'b': 2 } };
  14053. * var other = _.create({ 'a': _.create({ 'b': 2 }) });
  14054. *
  14055. * _.has(object, 'a');
  14056. * // => true
  14057. *
  14058. * _.has(object, 'a.b');
  14059. * // => true
  14060. *
  14061. * _.has(object, ['a', 'b']);
  14062. * // => true
  14063. *
  14064. * _.has(other, 'a');
  14065. * // => false
  14066. */
  14067. function has(object, path) {
  14068. return object != null && hasPath(object, path, baseHas);
  14069. }
  14070. /**
  14071. * Checks if `path` is a direct or inherited property of `object`.
  14072. *
  14073. * @static
  14074. * @memberOf _
  14075. * @since 4.0.0
  14076. * @category Object
  14077. * @param {Object} object The object to query.
  14078. * @param {Array|string} path The path to check.
  14079. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  14080. * @example
  14081. *
  14082. * var object = _.create({ 'a': _.create({ 'b': 2 }) });
  14083. *
  14084. * _.hasIn(object, 'a');
  14085. * // => true
  14086. *
  14087. * _.hasIn(object, 'a.b');
  14088. * // => true
  14089. *
  14090. * _.hasIn(object, ['a', 'b']);
  14091. * // => true
  14092. *
  14093. * _.hasIn(object, 'b');
  14094. * // => false
  14095. */
  14096. function hasIn(object, path) {
  14097. return object != null && hasPath(object, path, baseHasIn);
  14098. }
  14099. /**
  14100. * Creates an object composed of the inverted keys and values of `object`.
  14101. * If `object` contains duplicate values, subsequent values overwrite
  14102. * property assignments of previous values.
  14103. *
  14104. * @static
  14105. * @memberOf _
  14106. * @since 0.7.0
  14107. * @category Object
  14108. * @param {Object} object The object to invert.
  14109. * @returns {Object} Returns the new inverted object.
  14110. * @example
  14111. *
  14112. * var object = { 'a': 1, 'b': 2, 'c': 1 };
  14113. *
  14114. * _.invert(object);
  14115. * // => { '1': 'c', '2': 'b' }
  14116. */
  14117. var invert = createInverter(function(result, value, key) {
  14118. if (value != null &&
  14119. typeof value.toString != 'function') {
  14120. value = nativeObjectToString.call(value);
  14121. }
  14122. result[value] = key;
  14123. }, constant(identity));
  14124. /**
  14125. * This method is like `_.invert` except that the inverted object is generated
  14126. * from the results of running each element of `object` thru `iteratee`. The
  14127. * corresponding inverted value of each inverted key is an array of keys
  14128. * responsible for generating the inverted value. The iteratee is invoked
  14129. * with one argument: (value).
  14130. *
  14131. * @static
  14132. * @memberOf _
  14133. * @since 4.1.0
  14134. * @category Object
  14135. * @param {Object} object The object to invert.
  14136. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  14137. * @returns {Object} Returns the new inverted object.
  14138. * @example
  14139. *
  14140. * var object = { 'a': 1, 'b': 2, 'c': 1 };
  14141. *
  14142. * _.invertBy(object);
  14143. * // => { '1': ['a', 'c'], '2': ['b'] }
  14144. *
  14145. * _.invertBy(object, function(value) {
  14146. * return 'group' + value;
  14147. * });
  14148. * // => { 'group1': ['a', 'c'], 'group2': ['b'] }
  14149. */
  14150. var invertBy = createInverter(function(result, value, key) {
  14151. if (value != null &&
  14152. typeof value.toString != 'function') {
  14153. value = nativeObjectToString.call(value);
  14154. }
  14155. if (hasOwnProperty.call(result, value)) {
  14156. result[value].push(key);
  14157. } else {
  14158. result[value] = [key];
  14159. }
  14160. }, getIteratee);
  14161. /**
  14162. * Invokes the method at `path` of `object`.
  14163. *
  14164. * @static
  14165. * @memberOf _
  14166. * @since 4.0.0
  14167. * @category Object
  14168. * @param {Object} object The object to query.
  14169. * @param {Array|string} path The path of the method to invoke.
  14170. * @param {...*} [args] The arguments to invoke the method with.
  14171. * @returns {*} Returns the result of the invoked method.
  14172. * @example
  14173. *
  14174. * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
  14175. *
  14176. * _.invoke(object, 'a[0].b.c.slice', 1, 3);
  14177. * // => [2, 3]
  14178. */
  14179. var invoke = baseRest(baseInvoke);
  14180. /**
  14181. * Creates an array of the own enumerable property names of `object`.
  14182. *
  14183. * **Note:** Non-object values are coerced to objects. See the
  14184. * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  14185. * for more details.
  14186. *
  14187. * @static
  14188. * @since 0.1.0
  14189. * @memberOf _
  14190. * @category Object
  14191. * @param {Object} object The object to query.
  14192. * @returns {Array} Returns the array of property names.
  14193. * @example
  14194. *
  14195. * function Foo() {
  14196. * this.a = 1;
  14197. * this.b = 2;
  14198. * }
  14199. *
  14200. * Foo.prototype.c = 3;
  14201. *
  14202. * _.keys(new Foo);
  14203. * // => ['a', 'b'] (iteration order is not guaranteed)
  14204. *
  14205. * _.keys('hi');
  14206. * // => ['0', '1']
  14207. */
  14208. function keys(object) {
  14209. return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
  14210. }
  14211. /**
  14212. * Creates an array of the own and inherited enumerable property names of `object`.
  14213. *
  14214. * **Note:** Non-object values are coerced to objects.
  14215. *
  14216. * @static
  14217. * @memberOf _
  14218. * @since 3.0.0
  14219. * @category Object
  14220. * @param {Object} object The object to query.
  14221. * @returns {Array} Returns the array of property names.
  14222. * @example
  14223. *
  14224. * function Foo() {
  14225. * this.a = 1;
  14226. * this.b = 2;
  14227. * }
  14228. *
  14229. * Foo.prototype.c = 3;
  14230. *
  14231. * _.keysIn(new Foo);
  14232. * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
  14233. */
  14234. function keysIn(object) {
  14235. return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
  14236. }
  14237. /**
  14238. * The opposite of `_.mapValues`; this method creates an object with the
  14239. * same values as `object` and keys generated by running each own enumerable
  14240. * string keyed property of `object` thru `iteratee`. The iteratee is invoked
  14241. * with three arguments: (value, key, object).
  14242. *
  14243. * @static
  14244. * @memberOf _
  14245. * @since 3.8.0
  14246. * @category Object
  14247. * @param {Object} object The object to iterate over.
  14248. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  14249. * @returns {Object} Returns the new mapped object.
  14250. * @see _.mapValues
  14251. * @example
  14252. *
  14253. * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
  14254. * return key + value;
  14255. * });
  14256. * // => { 'a1': 1, 'b2': 2 }
  14257. */
  14258. function mapKeys(object, iteratee) {
  14259. var result = {};
  14260. iteratee = getIteratee(iteratee, 3);
  14261. baseForOwn(object, function(value, key, object) {
  14262. baseAssignValue(result, iteratee(value, key, object), value);
  14263. });
  14264. return result;
  14265. }
  14266. /**
  14267. * Creates an object with the same keys as `object` and values generated
  14268. * by running each own enumerable string keyed property of `object` thru
  14269. * `iteratee`. The iteratee is invoked with three arguments:
  14270. * (value, key, object).
  14271. *
  14272. * @static
  14273. * @memberOf _
  14274. * @since 2.4.0
  14275. * @category Object
  14276. * @param {Object} object The object to iterate over.
  14277. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  14278. * @returns {Object} Returns the new mapped object.
  14279. * @see _.mapKeys
  14280. * @example
  14281. *
  14282. * var users = {
  14283. * 'fred': { 'user': 'fred', 'age': 40 },
  14284. * 'pebbles': { 'user': 'pebbles', 'age': 1 }
  14285. * };
  14286. *
  14287. * _.mapValues(users, function(o) { return o.age; });
  14288. * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
  14289. *
  14290. * // The `_.property` iteratee shorthand.
  14291. * _.mapValues(users, 'age');
  14292. * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
  14293. */
  14294. function mapValues(object, iteratee) {
  14295. var result = {};
  14296. iteratee = getIteratee(iteratee, 3);
  14297. baseForOwn(object, function(value, key, object) {
  14298. baseAssignValue(result, key, iteratee(value, key, object));
  14299. });
  14300. return result;
  14301. }
  14302. /**
  14303. * This method is like `_.assign` except that it recursively merges own and
  14304. * inherited enumerable string keyed properties of source objects into the
  14305. * destination object. Source properties that resolve to `undefined` are
  14306. * skipped if a destination value exists. Array and plain object properties
  14307. * are merged recursively. Other objects and value types are overridden by
  14308. * assignment. Source objects are applied from left to right. Subsequent
  14309. * sources overwrite property assignments of previous sources.
  14310. *
  14311. * **Note:** This method mutates `object`.
  14312. *
  14313. * @static
  14314. * @memberOf _
  14315. * @since 0.5.0
  14316. * @category Object
  14317. * @param {Object} object The destination object.
  14318. * @param {...Object} [sources] The source objects.
  14319. * @returns {Object} Returns `object`.
  14320. * @example
  14321. *
  14322. * var object = {
  14323. * 'a': [{ 'b': 2 }, { 'd': 4 }]
  14324. * };
  14325. *
  14326. * var other = {
  14327. * 'a': [{ 'c': 3 }, { 'e': 5 }]
  14328. * };
  14329. *
  14330. * _.merge(object, other);
  14331. * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
  14332. */
  14333. var merge = createAssigner(function(object, source, srcIndex) {
  14334. baseMerge(object, source, srcIndex);
  14335. });
  14336. /**
  14337. * This method is like `_.merge` except that it accepts `customizer` which
  14338. * is invoked to produce the merged values of the destination and source
  14339. * properties. If `customizer` returns `undefined`, merging is handled by the
  14340. * method instead. The `customizer` is invoked with six arguments:
  14341. * (objValue, srcValue, key, object, source, stack).
  14342. *
  14343. * **Note:** This method mutates `object`.
  14344. *
  14345. * @static
  14346. * @memberOf _
  14347. * @since 4.0.0
  14348. * @category Object
  14349. * @param {Object} object The destination object.
  14350. * @param {...Object} sources The source objects.
  14351. * @param {Function} customizer The function to customize assigned values.
  14352. * @returns {Object} Returns `object`.
  14353. * @example
  14354. *
  14355. * function customizer(objValue, srcValue) {
  14356. * if (_.isArray(objValue)) {
  14357. * return objValue.concat(srcValue);
  14358. * }
  14359. * }
  14360. *
  14361. * var object = { 'a': [1], 'b': [2] };
  14362. * var other = { 'a': [3], 'b': [4] };
  14363. *
  14364. * _.mergeWith(object, other, customizer);
  14365. * // => { 'a': [1, 3], 'b': [2, 4] }
  14366. */
  14367. var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
  14368. baseMerge(object, source, srcIndex, customizer);
  14369. });
  14370. /**
  14371. * The opposite of `_.pick`; this method creates an object composed of the
  14372. * own and inherited enumerable property paths of `object` that are not omitted.
  14373. *
  14374. * **Note:** This method is considerably slower than `_.pick`.
  14375. *
  14376. * @static
  14377. * @since 0.1.0
  14378. * @memberOf _
  14379. * @category Object
  14380. * @param {Object} object The source object.
  14381. * @param {...(string|string[])} [paths] The property paths to omit.
  14382. * @returns {Object} Returns the new object.
  14383. * @example
  14384. *
  14385. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  14386. *
  14387. * _.omit(object, ['a', 'c']);
  14388. * // => { 'b': '2' }
  14389. */
  14390. var omit = flatRest(function(object, paths) {
  14391. var result = {};
  14392. if (object == null) {
  14393. return result;
  14394. }
  14395. var isDeep = false;
  14396. paths = arrayMap(paths, function(path) {
  14397. path = castPath(path, object);
  14398. isDeep || (isDeep = path.length > 1);
  14399. return path;
  14400. });
  14401. copyObject(object, getAllKeysIn(object), result);
  14402. if (isDeep) {
  14403. result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
  14404. }
  14405. var length = paths.length;
  14406. while (length--) {
  14407. baseUnset(result, paths[length]);
  14408. }
  14409. return result;
  14410. });
  14411. /**
  14412. * The opposite of `_.pickBy`; this method creates an object composed of
  14413. * the own and inherited enumerable string keyed properties of `object` that
  14414. * `predicate` doesn't return truthy for. The predicate is invoked with two
  14415. * arguments: (value, key).
  14416. *
  14417. * @static
  14418. * @memberOf _
  14419. * @since 4.0.0
  14420. * @category Object
  14421. * @param {Object} object The source object.
  14422. * @param {Function} [predicate=_.identity] The function invoked per property.
  14423. * @returns {Object} Returns the new object.
  14424. * @example
  14425. *
  14426. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  14427. *
  14428. * _.omitBy(object, _.isNumber);
  14429. * // => { 'b': '2' }
  14430. */
  14431. function omitBy(object, predicate) {
  14432. return pickBy(object, negate(getIteratee(predicate)));
  14433. }
  14434. /**
  14435. * Creates an object composed of the picked `object` properties.
  14436. *
  14437. * @static
  14438. * @since 0.1.0
  14439. * @memberOf _
  14440. * @category Object
  14441. * @param {Object} object The source object.
  14442. * @param {...(string|string[])} [paths] The property paths to pick.
  14443. * @returns {Object} Returns the new object.
  14444. * @example
  14445. *
  14446. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  14447. *
  14448. * _.pick(object, ['a', 'c']);
  14449. * // => { 'a': 1, 'c': 3 }
  14450. */
  14451. var pick = flatRest(function(object, paths) {
  14452. return object == null ? {} : basePick(object, paths);
  14453. });
  14454. /**
  14455. * Creates an object composed of the `object` properties `predicate` returns
  14456. * truthy for. The predicate is invoked with two arguments: (value, key).
  14457. *
  14458. * @static
  14459. * @memberOf _
  14460. * @since 4.0.0
  14461. * @category Object
  14462. * @param {Object} object The source object.
  14463. * @param {Function} [predicate=_.identity] The function invoked per property.
  14464. * @returns {Object} Returns the new object.
  14465. * @example
  14466. *
  14467. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  14468. *
  14469. * _.pickBy(object, _.isNumber);
  14470. * // => { 'a': 1, 'c': 3 }
  14471. */
  14472. function pickBy(object, predicate) {
  14473. if (object == null) {
  14474. return {};
  14475. }
  14476. var props = arrayMap(getAllKeysIn(object), function(prop) {
  14477. return [prop];
  14478. });
  14479. predicate = getIteratee(predicate);
  14480. return basePickBy(object, props, function(value, path) {
  14481. return predicate(value, path[0]);
  14482. });
  14483. }
  14484. /**
  14485. * This method is like `_.get` except that if the resolved value is a
  14486. * function it's invoked with the `this` binding of its parent object and
  14487. * its result is returned.
  14488. *
  14489. * @static
  14490. * @since 0.1.0
  14491. * @memberOf _
  14492. * @category Object
  14493. * @param {Object} object The object to query.
  14494. * @param {Array|string} path The path of the property to resolve.
  14495. * @param {*} [defaultValue] The value returned for `undefined` resolved values.
  14496. * @returns {*} Returns the resolved value.
  14497. * @example
  14498. *
  14499. * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
  14500. *
  14501. * _.result(object, 'a[0].b.c1');
  14502. * // => 3
  14503. *
  14504. * _.result(object, 'a[0].b.c2');
  14505. * // => 4
  14506. *
  14507. * _.result(object, 'a[0].b.c3', 'default');
  14508. * // => 'default'
  14509. *
  14510. * _.result(object, 'a[0].b.c3', _.constant('default'));
  14511. * // => 'default'
  14512. */
  14513. function result(object, path, defaultValue) {
  14514. path = castPath(path, object);
  14515. var index = -1,
  14516. length = path.length;
  14517. // Ensure the loop is entered when path is empty.
  14518. if (!length) {
  14519. length = 1;
  14520. object = undefined;
  14521. }
  14522. while (++index < length) {
  14523. var value = object == null ? undefined : object[toKey(path[index])];
  14524. if (value === undefined) {
  14525. index = length;
  14526. value = defaultValue;
  14527. }
  14528. object = isFunction(value) ? value.call(object) : value;
  14529. }
  14530. return object;
  14531. }
  14532. /**
  14533. * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
  14534. * it's created. Arrays are created for missing index properties while objects
  14535. * are created for all other missing properties. Use `_.setWith` to customize
  14536. * `path` creation.
  14537. *
  14538. * **Note:** This method mutates `object`.
  14539. *
  14540. * @static
  14541. * @memberOf _
  14542. * @since 3.7.0
  14543. * @category Object
  14544. * @param {Object} object The object to modify.
  14545. * @param {Array|string} path The path of the property to set.
  14546. * @param {*} value The value to set.
  14547. * @returns {Object} Returns `object`.
  14548. * @example
  14549. *
  14550. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  14551. *
  14552. * _.set(object, 'a[0].b.c', 4);
  14553. * console.log(object.a[0].b.c);
  14554. * // => 4
  14555. *
  14556. * _.set(object, ['x', '0', 'y', 'z'], 5);
  14557. * console.log(object.x[0].y.z);
  14558. * // => 5
  14559. */
  14560. function set(object, path, value) {
  14561. return object == null ? object : baseSet(object, path, value);
  14562. }
  14563. /**
  14564. * This method is like `_.set` except that it accepts `customizer` which is
  14565. * invoked to produce the objects of `path`. If `customizer` returns `undefined`
  14566. * path creation is handled by the method instead. The `customizer` is invoked
  14567. * with three arguments: (nsValue, key, nsObject).
  14568. *
  14569. * **Note:** This method mutates `object`.
  14570. *
  14571. * @static
  14572. * @memberOf _
  14573. * @since 4.0.0
  14574. * @category Object
  14575. * @param {Object} object The object to modify.
  14576. * @param {Array|string} path The path of the property to set.
  14577. * @param {*} value The value to set.
  14578. * @param {Function} [customizer] The function to customize assigned values.
  14579. * @returns {Object} Returns `object`.
  14580. * @example
  14581. *
  14582. * var object = {};
  14583. *
  14584. * _.setWith(object, '[0][1]', 'a', Object);
  14585. * // => { '0': { '1': 'a' } }
  14586. */
  14587. function setWith(object, path, value, customizer) {
  14588. customizer = typeof customizer == 'function' ? customizer : undefined;
  14589. return object == null ? object : baseSet(object, path, value, customizer);
  14590. }
  14591. /**
  14592. * Creates an array of own enumerable string keyed-value pairs for `object`
  14593. * which can be consumed by `_.fromPairs`. If `object` is a map or set, its
  14594. * entries are returned.
  14595. *
  14596. * @static
  14597. * @memberOf _
  14598. * @since 4.0.0
  14599. * @alias entries
  14600. * @category Object
  14601. * @param {Object} object The object to query.
  14602. * @returns {Array} Returns the key-value pairs.
  14603. * @example
  14604. *
  14605. * function Foo() {
  14606. * this.a = 1;
  14607. * this.b = 2;
  14608. * }
  14609. *
  14610. * Foo.prototype.c = 3;
  14611. *
  14612. * _.toPairs(new Foo);
  14613. * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
  14614. */
  14615. var toPairs = createToPairs(keys);
  14616. /**
  14617. * Creates an array of own and inherited enumerable string keyed-value pairs
  14618. * for `object` which can be consumed by `_.fromPairs`. If `object` is a map
  14619. * or set, its entries are returned.
  14620. *
  14621. * @static
  14622. * @memberOf _
  14623. * @since 4.0.0
  14624. * @alias entriesIn
  14625. * @category Object
  14626. * @param {Object} object The object to query.
  14627. * @returns {Array} Returns the key-value pairs.
  14628. * @example
  14629. *
  14630. * function Foo() {
  14631. * this.a = 1;
  14632. * this.b = 2;
  14633. * }
  14634. *
  14635. * Foo.prototype.c = 3;
  14636. *
  14637. * _.toPairsIn(new Foo);
  14638. * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
  14639. */
  14640. var toPairsIn = createToPairs(keysIn);
  14641. /**
  14642. * An alternative to `_.reduce`; this method transforms `object` to a new
  14643. * `accumulator` object which is the result of running each of its own
  14644. * enumerable string keyed properties thru `iteratee`, with each invocation
  14645. * potentially mutating the `accumulator` object. If `accumulator` is not
  14646. * provided, a new object with the same `[[Prototype]]` will be used. The
  14647. * iteratee is invoked with four arguments: (accumulator, value, key, object).
  14648. * Iteratee functions may exit iteration early by explicitly returning `false`.
  14649. *
  14650. * @static
  14651. * @memberOf _
  14652. * @since 1.3.0
  14653. * @category Object
  14654. * @param {Object} object The object to iterate over.
  14655. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  14656. * @param {*} [accumulator] The custom accumulator value.
  14657. * @returns {*} Returns the accumulated value.
  14658. * @example
  14659. *
  14660. * _.transform([2, 3, 4], function(result, n) {
  14661. * result.push(n *= n);
  14662. * return n % 2 == 0;
  14663. * }, []);
  14664. * // => [4, 9]
  14665. *
  14666. * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
  14667. * (result[value] || (result[value] = [])).push(key);
  14668. * }, {});
  14669. * // => { '1': ['a', 'c'], '2': ['b'] }
  14670. */
  14671. function transform(object, iteratee, accumulator) {
  14672. var isArr = isArray(object),
  14673. isArrLike = isArr || isBuffer(object) || isTypedArray(object);
  14674. iteratee = getIteratee(iteratee, 4);
  14675. if (accumulator == null) {
  14676. var Ctor = object && object.constructor;
  14677. if (isArrLike) {
  14678. accumulator = isArr ? new Ctor : [];
  14679. }
  14680. else if (isObject(object)) {
  14681. accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
  14682. }
  14683. else {
  14684. accumulator = {};
  14685. }
  14686. }
  14687. (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
  14688. return iteratee(accumulator, value, index, object);
  14689. });
  14690. return accumulator;
  14691. }
  14692. /**
  14693. * Removes the property at `path` of `object`.
  14694. *
  14695. * **Note:** This method mutates `object`.
  14696. *
  14697. * @static
  14698. * @memberOf _
  14699. * @since 4.0.0
  14700. * @category Object
  14701. * @param {Object} object The object to modify.
  14702. * @param {Array|string} path The path of the property to unset.
  14703. * @returns {boolean} Returns `true` if the property is deleted, else `false`.
  14704. * @example
  14705. *
  14706. * var object = { 'a': [{ 'b': { 'c': 7 } }] };
  14707. * _.unset(object, 'a[0].b.c');
  14708. * // => true
  14709. *
  14710. * console.log(object);
  14711. * // => { 'a': [{ 'b': {} }] };
  14712. *
  14713. * _.unset(object, ['a', '0', 'b', 'c']);
  14714. * // => true
  14715. *
  14716. * console.log(object);
  14717. * // => { 'a': [{ 'b': {} }] };
  14718. */
  14719. function unset(object, path) {
  14720. return object == null ? true : baseUnset(object, path);
  14721. }
  14722. /**
  14723. * This method is like `_.set` except that accepts `updater` to produce the
  14724. * value to set. Use `_.updateWith` to customize `path` creation. The `updater`
  14725. * is invoked with one argument: (value).
  14726. *
  14727. * **Note:** This method mutates `object`.
  14728. *
  14729. * @static
  14730. * @memberOf _
  14731. * @since 4.6.0
  14732. * @category Object
  14733. * @param {Object} object The object to modify.
  14734. * @param {Array|string} path The path of the property to set.
  14735. * @param {Function} updater The function to produce the updated value.
  14736. * @returns {Object} Returns `object`.
  14737. * @example
  14738. *
  14739. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  14740. *
  14741. * _.update(object, 'a[0].b.c', function(n) { return n * n; });
  14742. * console.log(object.a[0].b.c);
  14743. * // => 9
  14744. *
  14745. * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
  14746. * console.log(object.x[0].y.z);
  14747. * // => 0
  14748. */
  14749. function update(object, path, updater) {
  14750. return object == null ? object : baseUpdate(object, path, castFunction(updater));
  14751. }
  14752. /**
  14753. * This method is like `_.update` except that it accepts `customizer` which is
  14754. * invoked to produce the objects of `path`. If `customizer` returns `undefined`
  14755. * path creation is handled by the method instead. The `customizer` is invoked
  14756. * with three arguments: (nsValue, key, nsObject).
  14757. *
  14758. * **Note:** This method mutates `object`.
  14759. *
  14760. * @static
  14761. * @memberOf _
  14762. * @since 4.6.0
  14763. * @category Object
  14764. * @param {Object} object The object to modify.
  14765. * @param {Array|string} path The path of the property to set.
  14766. * @param {Function} updater The function to produce the updated value.
  14767. * @param {Function} [customizer] The function to customize assigned values.
  14768. * @returns {Object} Returns `object`.
  14769. * @example
  14770. *
  14771. * var object = {};
  14772. *
  14773. * _.updateWith(object, '[0][1]', _.constant('a'), Object);
  14774. * // => { '0': { '1': 'a' } }
  14775. */
  14776. function updateWith(object, path, updater, customizer) {
  14777. customizer = typeof customizer == 'function' ? customizer : undefined;
  14778. return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
  14779. }
  14780. /**
  14781. * Creates an array of the own enumerable string keyed property values of `object`.
  14782. *
  14783. * **Note:** Non-object values are coerced to objects.
  14784. *
  14785. * @static
  14786. * @since 0.1.0
  14787. * @memberOf _
  14788. * @category Object
  14789. * @param {Object} object The object to query.
  14790. * @returns {Array} Returns the array of property values.
  14791. * @example
  14792. *
  14793. * function Foo() {
  14794. * this.a = 1;
  14795. * this.b = 2;
  14796. * }
  14797. *
  14798. * Foo.prototype.c = 3;
  14799. *
  14800. * _.values(new Foo);
  14801. * // => [1, 2] (iteration order is not guaranteed)
  14802. *
  14803. * _.values('hi');
  14804. * // => ['h', 'i']
  14805. */
  14806. function values(object) {
  14807. return object == null ? [] : baseValues(object, keys(object));
  14808. }
  14809. /**
  14810. * Creates an array of the own and inherited enumerable string keyed property
  14811. * values of `object`.
  14812. *
  14813. * **Note:** Non-object values are coerced to objects.
  14814. *
  14815. * @static
  14816. * @memberOf _
  14817. * @since 3.0.0
  14818. * @category Object
  14819. * @param {Object} object The object to query.
  14820. * @returns {Array} Returns the array of property values.
  14821. * @example
  14822. *
  14823. * function Foo() {
  14824. * this.a = 1;
  14825. * this.b = 2;
  14826. * }
  14827. *
  14828. * Foo.prototype.c = 3;
  14829. *
  14830. * _.valuesIn(new Foo);
  14831. * // => [1, 2, 3] (iteration order is not guaranteed)
  14832. */
  14833. function valuesIn(object) {
  14834. return object == null ? [] : baseValues(object, keysIn(object));
  14835. }
  14836. /*------------------------------------------------------------------------*/
  14837. /**
  14838. * Clamps `number` within the inclusive `lower` and `upper` bounds.
  14839. *
  14840. * @static
  14841. * @memberOf _
  14842. * @since 4.0.0
  14843. * @category Number
  14844. * @param {number} number The number to clamp.
  14845. * @param {number} [lower] The lower bound.
  14846. * @param {number} upper The upper bound.
  14847. * @returns {number} Returns the clamped number.
  14848. * @example
  14849. *
  14850. * _.clamp(-10, -5, 5);
  14851. * // => -5
  14852. *
  14853. * _.clamp(10, -5, 5);
  14854. * // => 5
  14855. */
  14856. function clamp(number, lower, upper) {
  14857. if (upper === undefined) {
  14858. upper = lower;
  14859. lower = undefined;
  14860. }
  14861. if (upper !== undefined) {
  14862. upper = toNumber(upper);
  14863. upper = upper === upper ? upper : 0;
  14864. }
  14865. if (lower !== undefined) {
  14866. lower = toNumber(lower);
  14867. lower = lower === lower ? lower : 0;
  14868. }
  14869. return baseClamp(toNumber(number), lower, upper);
  14870. }
  14871. /**
  14872. * Checks if `n` is between `start` and up to, but not including, `end`. If
  14873. * `end` is not specified, it's set to `start` with `start` then set to `0`.
  14874. * If `start` is greater than `end` the params are swapped to support
  14875. * negative ranges.
  14876. *
  14877. * @static
  14878. * @memberOf _
  14879. * @since 3.3.0
  14880. * @category Number
  14881. * @param {number} number The number to check.
  14882. * @param {number} [start=0] The start of the range.
  14883. * @param {number} end The end of the range.
  14884. * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
  14885. * @see _.range, _.rangeRight
  14886. * @example
  14887. *
  14888. * _.inRange(3, 2, 4);
  14889. * // => true
  14890. *
  14891. * _.inRange(4, 8);
  14892. * // => true
  14893. *
  14894. * _.inRange(4, 2);
  14895. * // => false
  14896. *
  14897. * _.inRange(2, 2);
  14898. * // => false
  14899. *
  14900. * _.inRange(1.2, 2);
  14901. * // => true
  14902. *
  14903. * _.inRange(5.2, 4);
  14904. * // => false
  14905. *
  14906. * _.inRange(-3, -2, -6);
  14907. * // => true
  14908. */
  14909. function inRange(number, start, end) {
  14910. start = toFinite(start);
  14911. if (end === undefined) {
  14912. end = start;
  14913. start = 0;
  14914. } else {
  14915. end = toFinite(end);
  14916. }
  14917. number = toNumber(number);
  14918. return baseInRange(number, start, end);
  14919. }
  14920. /**
  14921. * Produces a random number between the inclusive `lower` and `upper` bounds.
  14922. * If only one argument is provided a number between `0` and the given number
  14923. * is returned. If `floating` is `true`, or either `lower` or `upper` are
  14924. * floats, a floating-point number is returned instead of an integer.
  14925. *
  14926. * **Note:** JavaScript follows the IEEE-754 standard for resolving
  14927. * floating-point values which can produce unexpected results.
  14928. *
  14929. * @static
  14930. * @memberOf _
  14931. * @since 0.7.0
  14932. * @category Number
  14933. * @param {number} [lower=0] The lower bound.
  14934. * @param {number} [upper=1] The upper bound.
  14935. * @param {boolean} [floating] Specify returning a floating-point number.
  14936. * @returns {number} Returns the random number.
  14937. * @example
  14938. *
  14939. * _.random(0, 5);
  14940. * // => an integer between 0 and 5
  14941. *
  14942. * _.random(5);
  14943. * // => also an integer between 0 and 5
  14944. *
  14945. * _.random(5, true);
  14946. * // => a floating-point number between 0 and 5
  14947. *
  14948. * _.random(1.2, 5.2);
  14949. * // => a floating-point number between 1.2 and 5.2
  14950. */
  14951. function random(lower, upper, floating) {
  14952. if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
  14953. upper = floating = undefined;
  14954. }
  14955. if (floating === undefined) {
  14956. if (typeof upper == 'boolean') {
  14957. floating = upper;
  14958. upper = undefined;
  14959. }
  14960. else if (typeof lower == 'boolean') {
  14961. floating = lower;
  14962. lower = undefined;
  14963. }
  14964. }
  14965. if (lower === undefined && upper === undefined) {
  14966. lower = 0;
  14967. upper = 1;
  14968. }
  14969. else {
  14970. lower = toFinite(lower);
  14971. if (upper === undefined) {
  14972. upper = lower;
  14973. lower = 0;
  14974. } else {
  14975. upper = toFinite(upper);
  14976. }
  14977. }
  14978. if (lower > upper) {
  14979. var temp = lower;
  14980. lower = upper;
  14981. upper = temp;
  14982. }
  14983. if (floating || lower % 1 || upper % 1) {
  14984. var rand = nativeRandom();
  14985. return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
  14986. }
  14987. return baseRandom(lower, upper);
  14988. }
  14989. /*------------------------------------------------------------------------*/
  14990. /**
  14991. * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
  14992. *
  14993. * @static
  14994. * @memberOf _
  14995. * @since 3.0.0
  14996. * @category String
  14997. * @param {string} [string=''] The string to convert.
  14998. * @returns {string} Returns the camel cased string.
  14999. * @example
  15000. *
  15001. * _.camelCase('Foo Bar');
  15002. * // => 'fooBar'
  15003. *
  15004. * _.camelCase('--foo-bar--');
  15005. * // => 'fooBar'
  15006. *
  15007. * _.camelCase('__FOO_BAR__');
  15008. * // => 'fooBar'
  15009. */
  15010. var camelCase = createCompounder(function(result, word, index) {
  15011. word = word.toLowerCase();
  15012. return result + (index ? capitalize(word) : word);
  15013. });
  15014. /**
  15015. * Converts the first character of `string` to upper case and the remaining
  15016. * to lower case.
  15017. *
  15018. * @static
  15019. * @memberOf _
  15020. * @since 3.0.0
  15021. * @category String
  15022. * @param {string} [string=''] The string to capitalize.
  15023. * @returns {string} Returns the capitalized string.
  15024. * @example
  15025. *
  15026. * _.capitalize('FRED');
  15027. * // => 'Fred'
  15028. */
  15029. function capitalize(string) {
  15030. return upperFirst(toString(string).toLowerCase());
  15031. }
  15032. /**
  15033. * Deburrs `string` by converting
  15034. * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
  15035. * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
  15036. * letters to basic Latin letters and removing
  15037. * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
  15038. *
  15039. * @static
  15040. * @memberOf _
  15041. * @since 3.0.0
  15042. * @category String
  15043. * @param {string} [string=''] The string to deburr.
  15044. * @returns {string} Returns the deburred string.
  15045. * @example
  15046. *
  15047. * _.deburr('déjà vu');
  15048. * // => 'deja vu'
  15049. */
  15050. function deburr(string) {
  15051. string = toString(string);
  15052. return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
  15053. }
  15054. /**
  15055. * Checks if `string` ends with the given target string.
  15056. *
  15057. * @static
  15058. * @memberOf _
  15059. * @since 3.0.0
  15060. * @category String
  15061. * @param {string} [string=''] The string to inspect.
  15062. * @param {string} [target] The string to search for.
  15063. * @param {number} [position=string.length] The position to search up to.
  15064. * @returns {boolean} Returns `true` if `string` ends with `target`,
  15065. * else `false`.
  15066. * @example
  15067. *
  15068. * _.endsWith('abc', 'c');
  15069. * // => true
  15070. *
  15071. * _.endsWith('abc', 'b');
  15072. * // => false
  15073. *
  15074. * _.endsWith('abc', 'b', 2);
  15075. * // => true
  15076. */
  15077. function endsWith(string, target, position) {
  15078. string = toString(string);
  15079. target = baseToString(target);
  15080. var length = string.length;
  15081. position = position === undefined
  15082. ? length
  15083. : baseClamp(toInteger(position), 0, length);
  15084. var end = position;
  15085. position -= target.length;
  15086. return position >= 0 && string.slice(position, end) == target;
  15087. }
  15088. /**
  15089. * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
  15090. * corresponding HTML entities.
  15091. *
  15092. * **Note:** No other characters are escaped. To escape additional
  15093. * characters use a third-party library like [_he_](https://mths.be/he).
  15094. *
  15095. * Though the ">" character is escaped for symmetry, characters like
  15096. * ">" and "/" don't need escaping in HTML and have no special meaning
  15097. * unless they're part of a tag or unquoted attribute value. See
  15098. * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
  15099. * (under "semi-related fun fact") for more details.
  15100. *
  15101. * When working with HTML you should always
  15102. * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
  15103. * XSS vectors.
  15104. *
  15105. * @static
  15106. * @since 0.1.0
  15107. * @memberOf _
  15108. * @category String
  15109. * @param {string} [string=''] The string to escape.
  15110. * @returns {string} Returns the escaped string.
  15111. * @example
  15112. *
  15113. * _.escape('fred, barney, & pebbles');
  15114. * // => 'fred, barney, &amp; pebbles'
  15115. */
  15116. function escape(string) {
  15117. string = toString(string);
  15118. return (string && reHasUnescapedHtml.test(string))
  15119. ? string.replace(reUnescapedHtml, escapeHtmlChar)
  15120. : string;
  15121. }
  15122. /**
  15123. * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
  15124. * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
  15125. *
  15126. * @static
  15127. * @memberOf _
  15128. * @since 3.0.0
  15129. * @category String
  15130. * @param {string} [string=''] The string to escape.
  15131. * @returns {string} Returns the escaped string.
  15132. * @example
  15133. *
  15134. * _.escapeRegExp('[lodash](https://lodash.com/)');
  15135. * // => '\[lodash\]\(https://lodash\.com/\)'
  15136. */
  15137. function escapeRegExp(string) {
  15138. string = toString(string);
  15139. return (string && reHasRegExpChar.test(string))
  15140. ? string.replace(reRegExpChar, '\\$&')
  15141. : string;
  15142. }
  15143. /**
  15144. * Converts `string` to
  15145. * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
  15146. *
  15147. * @static
  15148. * @memberOf _
  15149. * @since 3.0.0
  15150. * @category String
  15151. * @param {string} [string=''] The string to convert.
  15152. * @returns {string} Returns the kebab cased string.
  15153. * @example
  15154. *
  15155. * _.kebabCase('Foo Bar');
  15156. * // => 'foo-bar'
  15157. *
  15158. * _.kebabCase('fooBar');
  15159. * // => 'foo-bar'
  15160. *
  15161. * _.kebabCase('__FOO_BAR__');
  15162. * // => 'foo-bar'
  15163. */
  15164. var kebabCase = createCompounder(function(result, word, index) {
  15165. return result + (index ? '-' : '') + word.toLowerCase();
  15166. });
  15167. /**
  15168. * Converts `string`, as space separated words, to lower case.
  15169. *
  15170. * @static
  15171. * @memberOf _
  15172. * @since 4.0.0
  15173. * @category String
  15174. * @param {string} [string=''] The string to convert.
  15175. * @returns {string} Returns the lower cased string.
  15176. * @example
  15177. *
  15178. * _.lowerCase('--Foo-Bar--');
  15179. * // => 'foo bar'
  15180. *
  15181. * _.lowerCase('fooBar');
  15182. * // => 'foo bar'
  15183. *
  15184. * _.lowerCase('__FOO_BAR__');
  15185. * // => 'foo bar'
  15186. */
  15187. var lowerCase = createCompounder(function(result, word, index) {
  15188. return result + (index ? ' ' : '') + word.toLowerCase();
  15189. });
  15190. /**
  15191. * Converts the first character of `string` to lower case.
  15192. *
  15193. * @static
  15194. * @memberOf _
  15195. * @since 4.0.0
  15196. * @category String
  15197. * @param {string} [string=''] The string to convert.
  15198. * @returns {string} Returns the converted string.
  15199. * @example
  15200. *
  15201. * _.lowerFirst('Fred');
  15202. * // => 'fred'
  15203. *
  15204. * _.lowerFirst('FRED');
  15205. * // => 'fRED'
  15206. */
  15207. var lowerFirst = createCaseFirst('toLowerCase');
  15208. /**
  15209. * Pads `string` on the left and right sides if it's shorter than `length`.
  15210. * Padding characters are truncated if they can't be evenly divided by `length`.
  15211. *
  15212. * @static
  15213. * @memberOf _
  15214. * @since 3.0.0
  15215. * @category String
  15216. * @param {string} [string=''] The string to pad.
  15217. * @param {number} [length=0] The padding length.
  15218. * @param {string} [chars=' '] The string used as padding.
  15219. * @returns {string} Returns the padded string.
  15220. * @example
  15221. *
  15222. * _.pad('abc', 8);
  15223. * // => ' abc '
  15224. *
  15225. * _.pad('abc', 8, '_-');
  15226. * // => '_-abc_-_'
  15227. *
  15228. * _.pad('abc', 3);
  15229. * // => 'abc'
  15230. */
  15231. function pad(string, length, chars) {
  15232. string = toString(string);
  15233. length = toInteger(length);
  15234. var strLength = length ? stringSize(string) : 0;
  15235. if (!length || strLength >= length) {
  15236. return string;
  15237. }
  15238. var mid = (length - strLength) / 2;
  15239. return (
  15240. createPadding(nativeFloor(mid), chars) +
  15241. string +
  15242. createPadding(nativeCeil(mid), chars)
  15243. );
  15244. }
  15245. /**
  15246. * Pads `string` on the right side if it's shorter than `length`. Padding
  15247. * characters are truncated if they exceed `length`.
  15248. *
  15249. * @static
  15250. * @memberOf _
  15251. * @since 4.0.0
  15252. * @category String
  15253. * @param {string} [string=''] The string to pad.
  15254. * @param {number} [length=0] The padding length.
  15255. * @param {string} [chars=' '] The string used as padding.
  15256. * @returns {string} Returns the padded string.
  15257. * @example
  15258. *
  15259. * _.padEnd('abc', 6);
  15260. * // => 'abc '
  15261. *
  15262. * _.padEnd('abc', 6, '_-');
  15263. * // => 'abc_-_'
  15264. *
  15265. * _.padEnd('abc', 3);
  15266. * // => 'abc'
  15267. */
  15268. function padEnd(string, length, chars) {
  15269. string = toString(string);
  15270. length = toInteger(length);
  15271. var strLength = length ? stringSize(string) : 0;
  15272. return (length && strLength < length)
  15273. ? (string + createPadding(length - strLength, chars))
  15274. : string;
  15275. }
  15276. /**
  15277. * Pads `string` on the left side if it's shorter than `length`. Padding
  15278. * characters are truncated if they exceed `length`.
  15279. *
  15280. * @static
  15281. * @memberOf _
  15282. * @since 4.0.0
  15283. * @category String
  15284. * @param {string} [string=''] The string to pad.
  15285. * @param {number} [length=0] The padding length.
  15286. * @param {string} [chars=' '] The string used as padding.
  15287. * @returns {string} Returns the padded string.
  15288. * @example
  15289. *
  15290. * _.padStart('abc', 6);
  15291. * // => ' abc'
  15292. *
  15293. * _.padStart('abc', 6, '_-');
  15294. * // => '_-_abc'
  15295. *
  15296. * _.padStart('abc', 3);
  15297. * // => 'abc'
  15298. */
  15299. function padStart(string, length, chars) {
  15300. string = toString(string);
  15301. length = toInteger(length);
  15302. var strLength = length ? stringSize(string) : 0;
  15303. return (length && strLength < length)
  15304. ? (createPadding(length - strLength, chars) + string)
  15305. : string;
  15306. }
  15307. /**
  15308. * Converts `string` to an integer of the specified radix. If `radix` is
  15309. * `undefined` or `0`, a `radix` of `10` is used unless `value` is a
  15310. * hexadecimal, in which case a `radix` of `16` is used.
  15311. *
  15312. * **Note:** This method aligns with the
  15313. * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
  15314. *
  15315. * @static
  15316. * @memberOf _
  15317. * @since 1.1.0
  15318. * @category String
  15319. * @param {string} string The string to convert.
  15320. * @param {number} [radix=10] The radix to interpret `value` by.
  15321. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  15322. * @returns {number} Returns the converted integer.
  15323. * @example
  15324. *
  15325. * _.parseInt('08');
  15326. * // => 8
  15327. *
  15328. * _.map(['6', '08', '10'], _.parseInt);
  15329. * // => [6, 8, 10]
  15330. */
  15331. function parseInt(string, radix, guard) {
  15332. if (guard || radix == null) {
  15333. radix = 0;
  15334. } else if (radix) {
  15335. radix = +radix;
  15336. }
  15337. return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
  15338. }
  15339. /**
  15340. * Repeats the given string `n` times.
  15341. *
  15342. * @static
  15343. * @memberOf _
  15344. * @since 3.0.0
  15345. * @category String
  15346. * @param {string} [string=''] The string to repeat.
  15347. * @param {number} [n=1] The number of times to repeat the string.
  15348. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  15349. * @returns {string} Returns the repeated string.
  15350. * @example
  15351. *
  15352. * _.repeat('*', 3);
  15353. * // => '***'
  15354. *
  15355. * _.repeat('abc', 2);
  15356. * // => 'abcabc'
  15357. *
  15358. * _.repeat('abc', 0);
  15359. * // => ''
  15360. */
  15361. function repeat(string, n, guard) {
  15362. if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
  15363. n = 1;
  15364. } else {
  15365. n = toInteger(n);
  15366. }
  15367. return baseRepeat(toString(string), n);
  15368. }
  15369. /**
  15370. * Replaces matches for `pattern` in `string` with `replacement`.
  15371. *
  15372. * **Note:** This method is based on
  15373. * [`String#replace`](https://mdn.io/String/replace).
  15374. *
  15375. * @static
  15376. * @memberOf _
  15377. * @since 4.0.0
  15378. * @category String
  15379. * @param {string} [string=''] The string to modify.
  15380. * @param {RegExp|string} pattern The pattern to replace.
  15381. * @param {Function|string} replacement The match replacement.
  15382. * @returns {string} Returns the modified string.
  15383. * @example
  15384. *
  15385. * _.replace('Hi Fred', 'Fred', 'Barney');
  15386. * // => 'Hi Barney'
  15387. */
  15388. function replace() {
  15389. var args = arguments,
  15390. string = toString(args[0]);
  15391. return args.length < 3 ? string : string.replace(args[1], args[2]);
  15392. }
  15393. /**
  15394. * Converts `string` to
  15395. * [snake case](https://en.wikipedia.org/wiki/Snake_case).
  15396. *
  15397. * @static
  15398. * @memberOf _
  15399. * @since 3.0.0
  15400. * @category String
  15401. * @param {string} [string=''] The string to convert.
  15402. * @returns {string} Returns the snake cased string.
  15403. * @example
  15404. *
  15405. * _.snakeCase('Foo Bar');
  15406. * // => 'foo_bar'
  15407. *
  15408. * _.snakeCase('fooBar');
  15409. * // => 'foo_bar'
  15410. *
  15411. * _.snakeCase('--FOO-BAR--');
  15412. * // => 'foo_bar'
  15413. */
  15414. var snakeCase = createCompounder(function(result, word, index) {
  15415. return result + (index ? '_' : '') + word.toLowerCase();
  15416. });
  15417. /**
  15418. * Splits `string` by `separator`.
  15419. *
  15420. * **Note:** This method is based on
  15421. * [`String#split`](https://mdn.io/String/split).
  15422. *
  15423. * @static
  15424. * @memberOf _
  15425. * @since 4.0.0
  15426. * @category String
  15427. * @param {string} [string=''] The string to split.
  15428. * @param {RegExp|string} separator The separator pattern to split by.
  15429. * @param {number} [limit] The length to truncate results to.
  15430. * @returns {Array} Returns the string segments.
  15431. * @example
  15432. *
  15433. * _.split('a-b-c', '-', 2);
  15434. * // => ['a', 'b']
  15435. */
  15436. function split(string, separator, limit) {
  15437. if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
  15438. separator = limit = undefined;
  15439. }
  15440. limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
  15441. if (!limit) {
  15442. return [];
  15443. }
  15444. string = toString(string);
  15445. if (string && (
  15446. typeof separator == 'string' ||
  15447. (separator != null && !isRegExp(separator))
  15448. )) {
  15449. separator = baseToString(separator);
  15450. if (!separator && hasUnicode(string)) {
  15451. return castSlice(stringToArray(string), 0, limit);
  15452. }
  15453. }
  15454. return string.split(separator, limit);
  15455. }
  15456. /**
  15457. * Converts `string` to
  15458. * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
  15459. *
  15460. * @static
  15461. * @memberOf _
  15462. * @since 3.1.0
  15463. * @category String
  15464. * @param {string} [string=''] The string to convert.
  15465. * @returns {string} Returns the start cased string.
  15466. * @example
  15467. *
  15468. * _.startCase('--foo-bar--');
  15469. * // => 'Foo Bar'
  15470. *
  15471. * _.startCase('fooBar');
  15472. * // => 'Foo Bar'
  15473. *
  15474. * _.startCase('__FOO_BAR__');
  15475. * // => 'FOO BAR'
  15476. */
  15477. var startCase = createCompounder(function(result, word, index) {
  15478. return result + (index ? ' ' : '') + upperFirst(word);
  15479. });
  15480. /**
  15481. * Checks if `string` starts with the given target string.
  15482. *
  15483. * @static
  15484. * @memberOf _
  15485. * @since 3.0.0
  15486. * @category String
  15487. * @param {string} [string=''] The string to inspect.
  15488. * @param {string} [target] The string to search for.
  15489. * @param {number} [position=0] The position to search from.
  15490. * @returns {boolean} Returns `true` if `string` starts with `target`,
  15491. * else `false`.
  15492. * @example
  15493. *
  15494. * _.startsWith('abc', 'a');
  15495. * // => true
  15496. *
  15497. * _.startsWith('abc', 'b');
  15498. * // => false
  15499. *
  15500. * _.startsWith('abc', 'b', 1);
  15501. * // => true
  15502. */
  15503. function startsWith(string, target, position) {
  15504. string = toString(string);
  15505. position = position == null
  15506. ? 0
  15507. : baseClamp(toInteger(position), 0, string.length);
  15508. target = baseToString(target);
  15509. return string.slice(position, position + target.length) == target;
  15510. }
  15511. /**
  15512. * Creates a compiled template function that can interpolate data properties
  15513. * in "interpolate" delimiters, HTML-escape interpolated data properties in
  15514. * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
  15515. * properties may be accessed as free variables in the template. If a setting
  15516. * object is given, it takes precedence over `_.templateSettings` values.
  15517. *
  15518. * **Note:** In the development build `_.template` utilizes
  15519. * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
  15520. * for easier debugging.
  15521. *
  15522. * For more information on precompiling templates see
  15523. * [lodash's custom builds documentation](https://lodash.com/custom-builds).
  15524. *
  15525. * For more information on Chrome extension sandboxes see
  15526. * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
  15527. *
  15528. * @static
  15529. * @since 0.1.0
  15530. * @memberOf _
  15531. * @category String
  15532. * @param {string} [string=''] The template string.
  15533. * @param {Object} [options={}] The options object.
  15534. * @param {RegExp} [options.escape=_.templateSettings.escape]
  15535. * The HTML "escape" delimiter.
  15536. * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
  15537. * The "evaluate" delimiter.
  15538. * @param {Object} [options.imports=_.templateSettings.imports]
  15539. * An object to import into the template as free variables.
  15540. * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
  15541. * The "interpolate" delimiter.
  15542. * @param {string} [options.sourceURL='lodash.templateSources[n]']
  15543. * The sourceURL of the compiled template.
  15544. * @param {string} [options.variable='obj']
  15545. * The data object variable name.
  15546. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  15547. * @returns {Function} Returns the compiled template function.
  15548. * @example
  15549. *
  15550. * // Use the "interpolate" delimiter to create a compiled template.
  15551. * var compiled = _.template('hello <%= user %>!');
  15552. * compiled({ 'user': 'fred' });
  15553. * // => 'hello fred!'
  15554. *
  15555. * // Use the HTML "escape" delimiter to escape data property values.
  15556. * var compiled = _.template('<b><%- value %></b>');
  15557. * compiled({ 'value': '<script>' });
  15558. * // => '<b>&lt;script&gt;</b>'
  15559. *
  15560. * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
  15561. * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
  15562. * compiled({ 'users': ['fred', 'barney'] });
  15563. * // => '<li>fred</li><li>barney</li>'
  15564. *
  15565. * // Use the internal `print` function in "evaluate" delimiters.
  15566. * var compiled = _.template('<% print("hello " + user); %>!');
  15567. * compiled({ 'user': 'barney' });
  15568. * // => 'hello barney!'
  15569. *
  15570. * // Use the ES template literal delimiter as an "interpolate" delimiter.
  15571. * // Disable support by replacing the "interpolate" delimiter.
  15572. * var compiled = _.template('hello ${ user }!');
  15573. * compiled({ 'user': 'pebbles' });
  15574. * // => 'hello pebbles!'
  15575. *
  15576. * // Use backslashes to treat delimiters as plain text.
  15577. * var compiled = _.template('<%= "\\<%- value %\\>" %>');
  15578. * compiled({ 'value': 'ignored' });
  15579. * // => '<%- value %>'
  15580. *
  15581. * // Use the `imports` option to import `jQuery` as `jq`.
  15582. * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
  15583. * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
  15584. * compiled({ 'users': ['fred', 'barney'] });
  15585. * // => '<li>fred</li><li>barney</li>'
  15586. *
  15587. * // Use the `sourceURL` option to specify a custom sourceURL for the template.
  15588. * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
  15589. * compiled(data);
  15590. * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
  15591. *
  15592. * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
  15593. * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
  15594. * compiled.source;
  15595. * // => function(data) {
  15596. * // var __t, __p = '';
  15597. * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
  15598. * // return __p;
  15599. * // }
  15600. *
  15601. * // Use custom template delimiters.
  15602. * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
  15603. * var compiled = _.template('hello {{ user }}!');
  15604. * compiled({ 'user': 'mustache' });
  15605. * // => 'hello mustache!'
  15606. *
  15607. * // Use the `source` property to inline compiled templates for meaningful
  15608. * // line numbers in error messages and stack traces.
  15609. * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
  15610. * var JST = {\
  15611. * "main": ' + _.template(mainText).source + '\
  15612. * };\
  15613. * ');
  15614. */
  15615. function template(string, options, guard) {
  15616. // Based on John Resig's `tmpl` implementation
  15617. // (http://ejohn.org/blog/javascript-micro-templating/)
  15618. // and Laura Doktorova's doT.js (https://github.com/olado/doT).
  15619. var settings = lodash.templateSettings;
  15620. if (guard && isIterateeCall(string, options, guard)) {
  15621. options = undefined;
  15622. }
  15623. string = toString(string);
  15624. options = assignInWith({}, options, settings, customDefaultsAssignIn);
  15625. var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
  15626. importsKeys = keys(imports),
  15627. importsValues = baseValues(imports, importsKeys);
  15628. var isEscaping,
  15629. isEvaluating,
  15630. index = 0,
  15631. interpolate = options.interpolate || reNoMatch,
  15632. source = "__p += '";
  15633. // Compile the regexp to match each delimiter.
  15634. var reDelimiters = RegExp(
  15635. (options.escape || reNoMatch).source + '|' +
  15636. interpolate.source + '|' +
  15637. (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
  15638. (options.evaluate || reNoMatch).source + '|$'
  15639. , 'g');
  15640. // Use a sourceURL for easier debugging.
  15641. // The sourceURL gets injected into the source that's eval-ed, so be careful
  15642. // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in
  15643. // and escape the comment, thus injecting code that gets evaled.
  15644. var sourceURL = '//# sourceURL=' +
  15645. (hasOwnProperty.call(options, 'sourceURL')
  15646. ? (options.sourceURL + '').replace(/\s/g, ' ')
  15647. : ('lodash.templateSources[' + (++templateCounter) + ']')
  15648. ) + '\n';
  15649. string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
  15650. interpolateValue || (interpolateValue = esTemplateValue);
  15651. // Escape characters that can't be included in string literals.
  15652. source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
  15653. // Replace delimiters with snippets.
  15654. if (escapeValue) {
  15655. isEscaping = true;
  15656. source += "' +\n__e(" + escapeValue + ") +\n'";
  15657. }
  15658. if (evaluateValue) {
  15659. isEvaluating = true;
  15660. source += "';\n" + evaluateValue + ";\n__p += '";
  15661. }
  15662. if (interpolateValue) {
  15663. source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
  15664. }
  15665. index = offset + match.length;
  15666. // The JS engine embedded in Adobe products needs `match` returned in
  15667. // order to produce the correct `offset` value.
  15668. return match;
  15669. });
  15670. source += "';\n";
  15671. // If `variable` is not specified wrap a with-statement around the generated
  15672. // code to add the data object to the top of the scope chain.
  15673. var variable = hasOwnProperty.call(options, 'variable') && options.variable;
  15674. if (!variable) {
  15675. source = 'with (obj) {\n' + source + '\n}\n';
  15676. }
  15677. // Throw an error if a forbidden character was found in `variable`, to prevent
  15678. // potential command injection attacks.
  15679. else if (reForbiddenIdentifierChars.test(variable)) {
  15680. throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);
  15681. }
  15682. // Cleanup code by stripping empty strings.
  15683. source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
  15684. .replace(reEmptyStringMiddle, '$1')
  15685. .replace(reEmptyStringTrailing, '$1;');
  15686. // Frame code as the function body.
  15687. source = 'function(' + (variable || 'obj') + ') {\n' +
  15688. (variable
  15689. ? ''
  15690. : 'obj || (obj = {});\n'
  15691. ) +
  15692. "var __t, __p = ''" +
  15693. (isEscaping
  15694. ? ', __e = _.escape'
  15695. : ''
  15696. ) +
  15697. (isEvaluating
  15698. ? ', __j = Array.prototype.join;\n' +
  15699. "function print() { __p += __j.call(arguments, '') }\n"
  15700. : ';\n'
  15701. ) +
  15702. source +
  15703. 'return __p\n}';
  15704. var result = attempt(function() {
  15705. return Function(importsKeys, sourceURL + 'return ' + source)
  15706. .apply(undefined, importsValues);
  15707. });
  15708. // Provide the compiled function's source by its `toString` method or
  15709. // the `source` property as a convenience for inlining compiled templates.
  15710. result.source = source;
  15711. if (isError(result)) {
  15712. throw result;
  15713. }
  15714. return result;
  15715. }
  15716. /**
  15717. * Converts `string`, as a whole, to lower case just like
  15718. * [String#toLowerCase](https://mdn.io/toLowerCase).
  15719. *
  15720. * @static
  15721. * @memberOf _
  15722. * @since 4.0.0
  15723. * @category String
  15724. * @param {string} [string=''] The string to convert.
  15725. * @returns {string} Returns the lower cased string.
  15726. * @example
  15727. *
  15728. * _.toLower('--Foo-Bar--');
  15729. * // => '--foo-bar--'
  15730. *
  15731. * _.toLower('fooBar');
  15732. * // => 'foobar'
  15733. *
  15734. * _.toLower('__FOO_BAR__');
  15735. * // => '__foo_bar__'
  15736. */
  15737. function toLower(value) {
  15738. return toString(value).toLowerCase();
  15739. }
  15740. /**
  15741. * Converts `string`, as a whole, to upper case just like
  15742. * [String#toUpperCase](https://mdn.io/toUpperCase).
  15743. *
  15744. * @static
  15745. * @memberOf _
  15746. * @since 4.0.0
  15747. * @category String
  15748. * @param {string} [string=''] The string to convert.
  15749. * @returns {string} Returns the upper cased string.
  15750. * @example
  15751. *
  15752. * _.toUpper('--foo-bar--');
  15753. * // => '--FOO-BAR--'
  15754. *
  15755. * _.toUpper('fooBar');
  15756. * // => 'FOOBAR'
  15757. *
  15758. * _.toUpper('__foo_bar__');
  15759. * // => '__FOO_BAR__'
  15760. */
  15761. function toUpper(value) {
  15762. return toString(value).toUpperCase();
  15763. }
  15764. /**
  15765. * Removes leading and trailing whitespace or specified characters from `string`.
  15766. *
  15767. * @static
  15768. * @memberOf _
  15769. * @since 3.0.0
  15770. * @category String
  15771. * @param {string} [string=''] The string to trim.
  15772. * @param {string} [chars=whitespace] The characters to trim.
  15773. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  15774. * @returns {string} Returns the trimmed string.
  15775. * @example
  15776. *
  15777. * _.trim(' abc ');
  15778. * // => 'abc'
  15779. *
  15780. * _.trim('-_-abc-_-', '_-');
  15781. * // => 'abc'
  15782. *
  15783. * _.map([' foo ', ' bar '], _.trim);
  15784. * // => ['foo', 'bar']
  15785. */
  15786. function trim(string, chars, guard) {
  15787. string = toString(string);
  15788. if (string && (guard || chars === undefined)) {
  15789. return baseTrim(string);
  15790. }
  15791. if (!string || !(chars = baseToString(chars))) {
  15792. return string;
  15793. }
  15794. var strSymbols = stringToArray(string),
  15795. chrSymbols = stringToArray(chars),
  15796. start = charsStartIndex(strSymbols, chrSymbols),
  15797. end = charsEndIndex(strSymbols, chrSymbols) + 1;
  15798. return castSlice(strSymbols, start, end).join('');
  15799. }
  15800. /**
  15801. * Removes trailing whitespace or specified characters from `string`.
  15802. *
  15803. * @static
  15804. * @memberOf _
  15805. * @since 4.0.0
  15806. * @category String
  15807. * @param {string} [string=''] The string to trim.
  15808. * @param {string} [chars=whitespace] The characters to trim.
  15809. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  15810. * @returns {string} Returns the trimmed string.
  15811. * @example
  15812. *
  15813. * _.trimEnd(' abc ');
  15814. * // => ' abc'
  15815. *
  15816. * _.trimEnd('-_-abc-_-', '_-');
  15817. * // => '-_-abc'
  15818. */
  15819. function trimEnd(string, chars, guard) {
  15820. string = toString(string);
  15821. if (string && (guard || chars === undefined)) {
  15822. return string.slice(0, trimmedEndIndex(string) + 1);
  15823. }
  15824. if (!string || !(chars = baseToString(chars))) {
  15825. return string;
  15826. }
  15827. var strSymbols = stringToArray(string),
  15828. end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
  15829. return castSlice(strSymbols, 0, end).join('');
  15830. }
  15831. /**
  15832. * Removes leading whitespace or specified characters from `string`.
  15833. *
  15834. * @static
  15835. * @memberOf _
  15836. * @since 4.0.0
  15837. * @category String
  15838. * @param {string} [string=''] The string to trim.
  15839. * @param {string} [chars=whitespace] The characters to trim.
  15840. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  15841. * @returns {string} Returns the trimmed string.
  15842. * @example
  15843. *
  15844. * _.trimStart(' abc ');
  15845. * // => 'abc '
  15846. *
  15847. * _.trimStart('-_-abc-_-', '_-');
  15848. * // => 'abc-_-'
  15849. */
  15850. function trimStart(string, chars, guard) {
  15851. string = toString(string);
  15852. if (string && (guard || chars === undefined)) {
  15853. return string.replace(reTrimStart, '');
  15854. }
  15855. if (!string || !(chars = baseToString(chars))) {
  15856. return string;
  15857. }
  15858. var strSymbols = stringToArray(string),
  15859. start = charsStartIndex(strSymbols, stringToArray(chars));
  15860. return castSlice(strSymbols, start).join('');
  15861. }
  15862. /**
  15863. * Truncates `string` if it's longer than the given maximum string length.
  15864. * The last characters of the truncated string are replaced with the omission
  15865. * string which defaults to "...".
  15866. *
  15867. * @static
  15868. * @memberOf _
  15869. * @since 4.0.0
  15870. * @category String
  15871. * @param {string} [string=''] The string to truncate.
  15872. * @param {Object} [options={}] The options object.
  15873. * @param {number} [options.length=30] The maximum string length.
  15874. * @param {string} [options.omission='...'] The string to indicate text is omitted.
  15875. * @param {RegExp|string} [options.separator] The separator pattern to truncate to.
  15876. * @returns {string} Returns the truncated string.
  15877. * @example
  15878. *
  15879. * _.truncate('hi-diddly-ho there, neighborino');
  15880. * // => 'hi-diddly-ho there, neighbo...'
  15881. *
  15882. * _.truncate('hi-diddly-ho there, neighborino', {
  15883. * 'length': 24,
  15884. * 'separator': ' '
  15885. * });
  15886. * // => 'hi-diddly-ho there,...'
  15887. *
  15888. * _.truncate('hi-diddly-ho there, neighborino', {
  15889. * 'length': 24,
  15890. * 'separator': /,? +/
  15891. * });
  15892. * // => 'hi-diddly-ho there...'
  15893. *
  15894. * _.truncate('hi-diddly-ho there, neighborino', {
  15895. * 'omission': ' [...]'
  15896. * });
  15897. * // => 'hi-diddly-ho there, neig [...]'
  15898. */
  15899. function truncate(string, options) {
  15900. var length = DEFAULT_TRUNC_LENGTH,
  15901. omission = DEFAULT_TRUNC_OMISSION;
  15902. if (isObject(options)) {
  15903. var separator = 'separator' in options ? options.separator : separator;
  15904. length = 'length' in options ? toInteger(options.length) : length;
  15905. omission = 'omission' in options ? baseToString(options.omission) : omission;
  15906. }
  15907. string = toString(string);
  15908. var strLength = string.length;
  15909. if (hasUnicode(string)) {
  15910. var strSymbols = stringToArray(string);
  15911. strLength = strSymbols.length;
  15912. }
  15913. if (length >= strLength) {
  15914. return string;
  15915. }
  15916. var end = length - stringSize(omission);
  15917. if (end < 1) {
  15918. return omission;
  15919. }
  15920. var result = strSymbols
  15921. ? castSlice(strSymbols, 0, end).join('')
  15922. : string.slice(0, end);
  15923. if (separator === undefined) {
  15924. return result + omission;
  15925. }
  15926. if (strSymbols) {
  15927. end += (result.length - end);
  15928. }
  15929. if (isRegExp(separator)) {
  15930. if (string.slice(end).search(separator)) {
  15931. var match,
  15932. substring = result;
  15933. if (!separator.global) {
  15934. separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
  15935. }
  15936. separator.lastIndex = 0;
  15937. while ((match = separator.exec(substring))) {
  15938. var newEnd = match.index;
  15939. }
  15940. result = result.slice(0, newEnd === undefined ? end : newEnd);
  15941. }
  15942. } else if (string.indexOf(baseToString(separator), end) != end) {
  15943. var index = result.lastIndexOf(separator);
  15944. if (index > -1) {
  15945. result = result.slice(0, index);
  15946. }
  15947. }
  15948. return result + omission;
  15949. }
  15950. /**
  15951. * The inverse of `_.escape`; this method converts the HTML entities
  15952. * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to
  15953. * their corresponding characters.
  15954. *
  15955. * **Note:** No other HTML entities are unescaped. To unescape additional
  15956. * HTML entities use a third-party library like [_he_](https://mths.be/he).
  15957. *
  15958. * @static
  15959. * @memberOf _
  15960. * @since 0.6.0
  15961. * @category String
  15962. * @param {string} [string=''] The string to unescape.
  15963. * @returns {string} Returns the unescaped string.
  15964. * @example
  15965. *
  15966. * _.unescape('fred, barney, &amp; pebbles');
  15967. * // => 'fred, barney, & pebbles'
  15968. */
  15969. function unescape(string) {
  15970. string = toString(string);
  15971. return (string && reHasEscapedHtml.test(string))
  15972. ? string.replace(reEscapedHtml, unescapeHtmlChar)
  15973. : string;
  15974. }
  15975. /**
  15976. * Converts `string`, as space separated words, to upper case.
  15977. *
  15978. * @static
  15979. * @memberOf _
  15980. * @since 4.0.0
  15981. * @category String
  15982. * @param {string} [string=''] The string to convert.
  15983. * @returns {string} Returns the upper cased string.
  15984. * @example
  15985. *
  15986. * _.upperCase('--foo-bar');
  15987. * // => 'FOO BAR'
  15988. *
  15989. * _.upperCase('fooBar');
  15990. * // => 'FOO BAR'
  15991. *
  15992. * _.upperCase('__foo_bar__');
  15993. * // => 'FOO BAR'
  15994. */
  15995. var upperCase = createCompounder(function(result, word, index) {
  15996. return result + (index ? ' ' : '') + word.toUpperCase();
  15997. });
  15998. /**
  15999. * Converts the first character of `string` to upper case.
  16000. *
  16001. * @static
  16002. * @memberOf _
  16003. * @since 4.0.0
  16004. * @category String
  16005. * @param {string} [string=''] The string to convert.
  16006. * @returns {string} Returns the converted string.
  16007. * @example
  16008. *
  16009. * _.upperFirst('fred');
  16010. * // => 'Fred'
  16011. *
  16012. * _.upperFirst('FRED');
  16013. * // => 'FRED'
  16014. */
  16015. var upperFirst = createCaseFirst('toUpperCase');
  16016. /**
  16017. * Splits `string` into an array of its words.
  16018. *
  16019. * @static
  16020. * @memberOf _
  16021. * @since 3.0.0
  16022. * @category String
  16023. * @param {string} [string=''] The string to inspect.
  16024. * @param {RegExp|string} [pattern] The pattern to match words.
  16025. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  16026. * @returns {Array} Returns the words of `string`.
  16027. * @example
  16028. *
  16029. * _.words('fred, barney, & pebbles');
  16030. * // => ['fred', 'barney', 'pebbles']
  16031. *
  16032. * _.words('fred, barney, & pebbles', /[^, ]+/g);
  16033. * // => ['fred', 'barney', '&', 'pebbles']
  16034. */
  16035. function words(string, pattern, guard) {
  16036. string = toString(string);
  16037. pattern = guard ? undefined : pattern;
  16038. if (pattern === undefined) {
  16039. return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
  16040. }
  16041. return string.match(pattern) || [];
  16042. }
  16043. /*------------------------------------------------------------------------*/
  16044. /**
  16045. * Attempts to invoke `func`, returning either the result or the caught error
  16046. * object. Any additional arguments are provided to `func` when it's invoked.
  16047. *
  16048. * @static
  16049. * @memberOf _
  16050. * @since 3.0.0
  16051. * @category Util
  16052. * @param {Function} func The function to attempt.
  16053. * @param {...*} [args] The arguments to invoke `func` with.
  16054. * @returns {*} Returns the `func` result or error object.
  16055. * @example
  16056. *
  16057. * // Avoid throwing errors for invalid selectors.
  16058. * var elements = _.attempt(function(selector) {
  16059. * return document.querySelectorAll(selector);
  16060. * }, '>_>');
  16061. *
  16062. * if (_.isError(elements)) {
  16063. * elements = [];
  16064. * }
  16065. */
  16066. var attempt = baseRest(function(func, args) {
  16067. try {
  16068. return apply(func, undefined, args);
  16069. } catch (e) {
  16070. return isError(e) ? e : new Error(e);
  16071. }
  16072. });
  16073. /**
  16074. * Binds methods of an object to the object itself, overwriting the existing
  16075. * method.
  16076. *
  16077. * **Note:** This method doesn't set the "length" property of bound functions.
  16078. *
  16079. * @static
  16080. * @since 0.1.0
  16081. * @memberOf _
  16082. * @category Util
  16083. * @param {Object} object The object to bind and assign the bound methods to.
  16084. * @param {...(string|string[])} methodNames The object method names to bind.
  16085. * @returns {Object} Returns `object`.
  16086. * @example
  16087. *
  16088. * var view = {
  16089. * 'label': 'docs',
  16090. * 'click': function() {
  16091. * console.log('clicked ' + this.label);
  16092. * }
  16093. * };
  16094. *
  16095. * _.bindAll(view, ['click']);
  16096. * jQuery(element).on('click', view.click);
  16097. * // => Logs 'clicked docs' when clicked.
  16098. */
  16099. var bindAll = flatRest(function(object, methodNames) {
  16100. arrayEach(methodNames, function(key) {
  16101. key = toKey(key);
  16102. baseAssignValue(object, key, bind(object[key], object));
  16103. });
  16104. return object;
  16105. });
  16106. /**
  16107. * Creates a function that iterates over `pairs` and invokes the corresponding
  16108. * function of the first predicate to return truthy. The predicate-function
  16109. * pairs are invoked with the `this` binding and arguments of the created
  16110. * function.
  16111. *
  16112. * @static
  16113. * @memberOf _
  16114. * @since 4.0.0
  16115. * @category Util
  16116. * @param {Array} pairs The predicate-function pairs.
  16117. * @returns {Function} Returns the new composite function.
  16118. * @example
  16119. *
  16120. * var func = _.cond([
  16121. * [_.matches({ 'a': 1 }), _.constant('matches A')],
  16122. * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
  16123. * [_.stubTrue, _.constant('no match')]
  16124. * ]);
  16125. *
  16126. * func({ 'a': 1, 'b': 2 });
  16127. * // => 'matches A'
  16128. *
  16129. * func({ 'a': 0, 'b': 1 });
  16130. * // => 'matches B'
  16131. *
  16132. * func({ 'a': '1', 'b': '2' });
  16133. * // => 'no match'
  16134. */
  16135. function cond(pairs) {
  16136. var length = pairs == null ? 0 : pairs.length,
  16137. toIteratee = getIteratee();
  16138. pairs = !length ? [] : arrayMap(pairs, function(pair) {
  16139. if (typeof pair[1] != 'function') {
  16140. throw new TypeError(FUNC_ERROR_TEXT);
  16141. }
  16142. return [toIteratee(pair[0]), pair[1]];
  16143. });
  16144. return baseRest(function(args) {
  16145. var index = -1;
  16146. while (++index < length) {
  16147. var pair = pairs[index];
  16148. if (apply(pair[0], this, args)) {
  16149. return apply(pair[1], this, args);
  16150. }
  16151. }
  16152. });
  16153. }
  16154. /**
  16155. * Creates a function that invokes the predicate properties of `source` with
  16156. * the corresponding property values of a given object, returning `true` if
  16157. * all predicates return truthy, else `false`.
  16158. *
  16159. * **Note:** The created function is equivalent to `_.conformsTo` with
  16160. * `source` partially applied.
  16161. *
  16162. * @static
  16163. * @memberOf _
  16164. * @since 4.0.0
  16165. * @category Util
  16166. * @param {Object} source The object of property predicates to conform to.
  16167. * @returns {Function} Returns the new spec function.
  16168. * @example
  16169. *
  16170. * var objects = [
  16171. * { 'a': 2, 'b': 1 },
  16172. * { 'a': 1, 'b': 2 }
  16173. * ];
  16174. *
  16175. * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));
  16176. * // => [{ 'a': 1, 'b': 2 }]
  16177. */
  16178. function conforms(source) {
  16179. return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
  16180. }
  16181. /**
  16182. * Creates a function that returns `value`.
  16183. *
  16184. * @static
  16185. * @memberOf _
  16186. * @since 2.4.0
  16187. * @category Util
  16188. * @param {*} value The value to return from the new function.
  16189. * @returns {Function} Returns the new constant function.
  16190. * @example
  16191. *
  16192. * var objects = _.times(2, _.constant({ 'a': 1 }));
  16193. *
  16194. * console.log(objects);
  16195. * // => [{ 'a': 1 }, { 'a': 1 }]
  16196. *
  16197. * console.log(objects[0] === objects[1]);
  16198. * // => true
  16199. */
  16200. function constant(value) {
  16201. return function() {
  16202. return value;
  16203. };
  16204. }
  16205. /**
  16206. * Checks `value` to determine whether a default value should be returned in
  16207. * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
  16208. * or `undefined`.
  16209. *
  16210. * @static
  16211. * @memberOf _
  16212. * @since 4.14.0
  16213. * @category Util
  16214. * @param {*} value The value to check.
  16215. * @param {*} defaultValue The default value.
  16216. * @returns {*} Returns the resolved value.
  16217. * @example
  16218. *
  16219. * _.defaultTo(1, 10);
  16220. * // => 1
  16221. *
  16222. * _.defaultTo(undefined, 10);
  16223. * // => 10
  16224. */
  16225. function defaultTo(value, defaultValue) {
  16226. return (value == null || value !== value) ? defaultValue : value;
  16227. }
  16228. /**
  16229. * Creates a function that returns the result of invoking the given functions
  16230. * with the `this` binding of the created function, where each successive
  16231. * invocation is supplied the return value of the previous.
  16232. *
  16233. * @static
  16234. * @memberOf _
  16235. * @since 3.0.0
  16236. * @category Util
  16237. * @param {...(Function|Function[])} [funcs] The functions to invoke.
  16238. * @returns {Function} Returns the new composite function.
  16239. * @see _.flowRight
  16240. * @example
  16241. *
  16242. * function square(n) {
  16243. * return n * n;
  16244. * }
  16245. *
  16246. * var addSquare = _.flow([_.add, square]);
  16247. * addSquare(1, 2);
  16248. * // => 9
  16249. */
  16250. var flow = createFlow();
  16251. /**
  16252. * This method is like `_.flow` except that it creates a function that
  16253. * invokes the given functions from right to left.
  16254. *
  16255. * @static
  16256. * @since 3.0.0
  16257. * @memberOf _
  16258. * @category Util
  16259. * @param {...(Function|Function[])} [funcs] The functions to invoke.
  16260. * @returns {Function} Returns the new composite function.
  16261. * @see _.flow
  16262. * @example
  16263. *
  16264. * function square(n) {
  16265. * return n * n;
  16266. * }
  16267. *
  16268. * var addSquare = _.flowRight([square, _.add]);
  16269. * addSquare(1, 2);
  16270. * // => 9
  16271. */
  16272. var flowRight = createFlow(true);
  16273. /**
  16274. * This method returns the first argument it receives.
  16275. *
  16276. * @static
  16277. * @since 0.1.0
  16278. * @memberOf _
  16279. * @category Util
  16280. * @param {*} value Any value.
  16281. * @returns {*} Returns `value`.
  16282. * @example
  16283. *
  16284. * var object = { 'a': 1 };
  16285. *
  16286. * console.log(_.identity(object) === object);
  16287. * // => true
  16288. */
  16289. function identity(value) {
  16290. return value;
  16291. }
  16292. /**
  16293. * Creates a function that invokes `func` with the arguments of the created
  16294. * function. If `func` is a property name, the created function returns the
  16295. * property value for a given element. If `func` is an array or object, the
  16296. * created function returns `true` for elements that contain the equivalent
  16297. * source properties, otherwise it returns `false`.
  16298. *
  16299. * @static
  16300. * @since 4.0.0
  16301. * @memberOf _
  16302. * @category Util
  16303. * @param {*} [func=_.identity] The value to convert to a callback.
  16304. * @returns {Function} Returns the callback.
  16305. * @example
  16306. *
  16307. * var users = [
  16308. * { 'user': 'barney', 'age': 36, 'active': true },
  16309. * { 'user': 'fred', 'age': 40, 'active': false }
  16310. * ];
  16311. *
  16312. * // The `_.matches` iteratee shorthand.
  16313. * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
  16314. * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
  16315. *
  16316. * // The `_.matchesProperty` iteratee shorthand.
  16317. * _.filter(users, _.iteratee(['user', 'fred']));
  16318. * // => [{ 'user': 'fred', 'age': 40 }]
  16319. *
  16320. * // The `_.property` iteratee shorthand.
  16321. * _.map(users, _.iteratee('user'));
  16322. * // => ['barney', 'fred']
  16323. *
  16324. * // Create custom iteratee shorthands.
  16325. * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
  16326. * return !_.isRegExp(func) ? iteratee(func) : function(string) {
  16327. * return func.test(string);
  16328. * };
  16329. * });
  16330. *
  16331. * _.filter(['abc', 'def'], /ef/);
  16332. * // => ['def']
  16333. */
  16334. function iteratee(func) {
  16335. return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));
  16336. }
  16337. /**
  16338. * Creates a function that performs a partial deep comparison between a given
  16339. * object and `source`, returning `true` if the given object has equivalent
  16340. * property values, else `false`.
  16341. *
  16342. * **Note:** The created function is equivalent to `_.isMatch` with `source`
  16343. * partially applied.
  16344. *
  16345. * Partial comparisons will match empty array and empty object `source`
  16346. * values against any array or object value, respectively. See `_.isEqual`
  16347. * for a list of supported value comparisons.
  16348. *
  16349. * **Note:** Multiple values can be checked by combining several matchers
  16350. * using `_.overSome`
  16351. *
  16352. * @static
  16353. * @memberOf _
  16354. * @since 3.0.0
  16355. * @category Util
  16356. * @param {Object} source The object of property values to match.
  16357. * @returns {Function} Returns the new spec function.
  16358. * @example
  16359. *
  16360. * var objects = [
  16361. * { 'a': 1, 'b': 2, 'c': 3 },
  16362. * { 'a': 4, 'b': 5, 'c': 6 }
  16363. * ];
  16364. *
  16365. * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
  16366. * // => [{ 'a': 4, 'b': 5, 'c': 6 }]
  16367. *
  16368. * // Checking for several possible values
  16369. * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));
  16370. * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
  16371. */
  16372. function matches(source) {
  16373. return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
  16374. }
  16375. /**
  16376. * Creates a function that performs a partial deep comparison between the
  16377. * value at `path` of a given object to `srcValue`, returning `true` if the
  16378. * object value is equivalent, else `false`.
  16379. *
  16380. * **Note:** Partial comparisons will match empty array and empty object
  16381. * `srcValue` values against any array or object value, respectively. See
  16382. * `_.isEqual` for a list of supported value comparisons.
  16383. *
  16384. * **Note:** Multiple values can be checked by combining several matchers
  16385. * using `_.overSome`
  16386. *
  16387. * @static
  16388. * @memberOf _
  16389. * @since 3.2.0
  16390. * @category Util
  16391. * @param {Array|string} path The path of the property to get.
  16392. * @param {*} srcValue The value to match.
  16393. * @returns {Function} Returns the new spec function.
  16394. * @example
  16395. *
  16396. * var objects = [
  16397. * { 'a': 1, 'b': 2, 'c': 3 },
  16398. * { 'a': 4, 'b': 5, 'c': 6 }
  16399. * ];
  16400. *
  16401. * _.find(objects, _.matchesProperty('a', 4));
  16402. * // => { 'a': 4, 'b': 5, 'c': 6 }
  16403. *
  16404. * // Checking for several possible values
  16405. * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));
  16406. * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
  16407. */
  16408. function matchesProperty(path, srcValue) {
  16409. return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
  16410. }
  16411. /**
  16412. * Creates a function that invokes the method at `path` of a given object.
  16413. * Any additional arguments are provided to the invoked method.
  16414. *
  16415. * @static
  16416. * @memberOf _
  16417. * @since 3.7.0
  16418. * @category Util
  16419. * @param {Array|string} path The path of the method to invoke.
  16420. * @param {...*} [args] The arguments to invoke the method with.
  16421. * @returns {Function} Returns the new invoker function.
  16422. * @example
  16423. *
  16424. * var objects = [
  16425. * { 'a': { 'b': _.constant(2) } },
  16426. * { 'a': { 'b': _.constant(1) } }
  16427. * ];
  16428. *
  16429. * _.map(objects, _.method('a.b'));
  16430. * // => [2, 1]
  16431. *
  16432. * _.map(objects, _.method(['a', 'b']));
  16433. * // => [2, 1]
  16434. */
  16435. var method = baseRest(function(path, args) {
  16436. return function(object) {
  16437. return baseInvoke(object, path, args);
  16438. };
  16439. });
  16440. /**
  16441. * The opposite of `_.method`; this method creates a function that invokes
  16442. * the method at a given path of `object`. Any additional arguments are
  16443. * provided to the invoked method.
  16444. *
  16445. * @static
  16446. * @memberOf _
  16447. * @since 3.7.0
  16448. * @category Util
  16449. * @param {Object} object The object to query.
  16450. * @param {...*} [args] The arguments to invoke the method with.
  16451. * @returns {Function} Returns the new invoker function.
  16452. * @example
  16453. *
  16454. * var array = _.times(3, _.constant),
  16455. * object = { 'a': array, 'b': array, 'c': array };
  16456. *
  16457. * _.map(['a[2]', 'c[0]'], _.methodOf(object));
  16458. * // => [2, 0]
  16459. *
  16460. * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
  16461. * // => [2, 0]
  16462. */
  16463. var methodOf = baseRest(function(object, args) {
  16464. return function(path) {
  16465. return baseInvoke(object, path, args);
  16466. };
  16467. });
  16468. /**
  16469. * Adds all own enumerable string keyed function properties of a source
  16470. * object to the destination object. If `object` is a function, then methods
  16471. * are added to its prototype as well.
  16472. *
  16473. * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
  16474. * avoid conflicts caused by modifying the original.
  16475. *
  16476. * @static
  16477. * @since 0.1.0
  16478. * @memberOf _
  16479. * @category Util
  16480. * @param {Function|Object} [object=lodash] The destination object.
  16481. * @param {Object} source The object of functions to add.
  16482. * @param {Object} [options={}] The options object.
  16483. * @param {boolean} [options.chain=true] Specify whether mixins are chainable.
  16484. * @returns {Function|Object} Returns `object`.
  16485. * @example
  16486. *
  16487. * function vowels(string) {
  16488. * return _.filter(string, function(v) {
  16489. * return /[aeiou]/i.test(v);
  16490. * });
  16491. * }
  16492. *
  16493. * _.mixin({ 'vowels': vowels });
  16494. * _.vowels('fred');
  16495. * // => ['e']
  16496. *
  16497. * _('fred').vowels().value();
  16498. * // => ['e']
  16499. *
  16500. * _.mixin({ 'vowels': vowels }, { 'chain': false });
  16501. * _('fred').vowels();
  16502. * // => ['e']
  16503. */
  16504. function mixin(object, source, options) {
  16505. var props = keys(source),
  16506. methodNames = baseFunctions(source, props);
  16507. if (options == null &&
  16508. !(isObject(source) && (methodNames.length || !props.length))) {
  16509. options = source;
  16510. source = object;
  16511. object = this;
  16512. methodNames = baseFunctions(source, keys(source));
  16513. }
  16514. var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
  16515. isFunc = isFunction(object);
  16516. arrayEach(methodNames, function(methodName) {
  16517. var func = source[methodName];
  16518. object[methodName] = func;
  16519. if (isFunc) {
  16520. object.prototype[methodName] = function() {
  16521. var chainAll = this.__chain__;
  16522. if (chain || chainAll) {
  16523. var result = object(this.__wrapped__),
  16524. actions = result.__actions__ = copyArray(this.__actions__);
  16525. actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
  16526. result.__chain__ = chainAll;
  16527. return result;
  16528. }
  16529. return func.apply(object, arrayPush([this.value()], arguments));
  16530. };
  16531. }
  16532. });
  16533. return object;
  16534. }
  16535. /**
  16536. * Reverts the `_` variable to its previous value and returns a reference to
  16537. * the `lodash` function.
  16538. *
  16539. * @static
  16540. * @since 0.1.0
  16541. * @memberOf _
  16542. * @category Util
  16543. * @returns {Function} Returns the `lodash` function.
  16544. * @example
  16545. *
  16546. * var lodash = _.noConflict();
  16547. */
  16548. function noConflict() {
  16549. if (root._ === this) {
  16550. root._ = oldDash;
  16551. }
  16552. return this;
  16553. }
  16554. /**
  16555. * This method returns `undefined`.
  16556. *
  16557. * @static
  16558. * @memberOf _
  16559. * @since 2.3.0
  16560. * @category Util
  16561. * @example
  16562. *
  16563. * _.times(2, _.noop);
  16564. * // => [undefined, undefined]
  16565. */
  16566. function noop() {
  16567. // No operation performed.
  16568. }
  16569. /**
  16570. * Creates a function that gets the argument at index `n`. If `n` is negative,
  16571. * the nth argument from the end is returned.
  16572. *
  16573. * @static
  16574. * @memberOf _
  16575. * @since 4.0.0
  16576. * @category Util
  16577. * @param {number} [n=0] The index of the argument to return.
  16578. * @returns {Function} Returns the new pass-thru function.
  16579. * @example
  16580. *
  16581. * var func = _.nthArg(1);
  16582. * func('a', 'b', 'c', 'd');
  16583. * // => 'b'
  16584. *
  16585. * var func = _.nthArg(-2);
  16586. * func('a', 'b', 'c', 'd');
  16587. * // => 'c'
  16588. */
  16589. function nthArg(n) {
  16590. n = toInteger(n);
  16591. return baseRest(function(args) {
  16592. return baseNth(args, n);
  16593. });
  16594. }
  16595. /**
  16596. * Creates a function that invokes `iteratees` with the arguments it receives
  16597. * and returns their results.
  16598. *
  16599. * @static
  16600. * @memberOf _
  16601. * @since 4.0.0
  16602. * @category Util
  16603. * @param {...(Function|Function[])} [iteratees=[_.identity]]
  16604. * The iteratees to invoke.
  16605. * @returns {Function} Returns the new function.
  16606. * @example
  16607. *
  16608. * var func = _.over([Math.max, Math.min]);
  16609. *
  16610. * func(1, 2, 3, 4);
  16611. * // => [4, 1]
  16612. */
  16613. var over = createOver(arrayMap);
  16614. /**
  16615. * Creates a function that checks if **all** of the `predicates` return
  16616. * truthy when invoked with the arguments it receives.
  16617. *
  16618. * Following shorthands are possible for providing predicates.
  16619. * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
  16620. * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
  16621. *
  16622. * @static
  16623. * @memberOf _
  16624. * @since 4.0.0
  16625. * @category Util
  16626. * @param {...(Function|Function[])} [predicates=[_.identity]]
  16627. * The predicates to check.
  16628. * @returns {Function} Returns the new function.
  16629. * @example
  16630. *
  16631. * var func = _.overEvery([Boolean, isFinite]);
  16632. *
  16633. * func('1');
  16634. * // => true
  16635. *
  16636. * func(null);
  16637. * // => false
  16638. *
  16639. * func(NaN);
  16640. * // => false
  16641. */
  16642. var overEvery = createOver(arrayEvery);
  16643. /**
  16644. * Creates a function that checks if **any** of the `predicates` return
  16645. * truthy when invoked with the arguments it receives.
  16646. *
  16647. * Following shorthands are possible for providing predicates.
  16648. * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
  16649. * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
  16650. *
  16651. * @static
  16652. * @memberOf _
  16653. * @since 4.0.0
  16654. * @category Util
  16655. * @param {...(Function|Function[])} [predicates=[_.identity]]
  16656. * The predicates to check.
  16657. * @returns {Function} Returns the new function.
  16658. * @example
  16659. *
  16660. * var func = _.overSome([Boolean, isFinite]);
  16661. *
  16662. * func('1');
  16663. * // => true
  16664. *
  16665. * func(null);
  16666. * // => true
  16667. *
  16668. * func(NaN);
  16669. * // => false
  16670. *
  16671. * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])
  16672. * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])
  16673. */
  16674. var overSome = createOver(arraySome);
  16675. /**
  16676. * Creates a function that returns the value at `path` of a given object.
  16677. *
  16678. * @static
  16679. * @memberOf _
  16680. * @since 2.4.0
  16681. * @category Util
  16682. * @param {Array|string} path The path of the property to get.
  16683. * @returns {Function} Returns the new accessor function.
  16684. * @example
  16685. *
  16686. * var objects = [
  16687. * { 'a': { 'b': 2 } },
  16688. * { 'a': { 'b': 1 } }
  16689. * ];
  16690. *
  16691. * _.map(objects, _.property('a.b'));
  16692. * // => [2, 1]
  16693. *
  16694. * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
  16695. * // => [1, 2]
  16696. */
  16697. function property(path) {
  16698. return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
  16699. }
  16700. /**
  16701. * The opposite of `_.property`; this method creates a function that returns
  16702. * the value at a given path of `object`.
  16703. *
  16704. * @static
  16705. * @memberOf _
  16706. * @since 3.0.0
  16707. * @category Util
  16708. * @param {Object} object The object to query.
  16709. * @returns {Function} Returns the new accessor function.
  16710. * @example
  16711. *
  16712. * var array = [0, 1, 2],
  16713. * object = { 'a': array, 'b': array, 'c': array };
  16714. *
  16715. * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
  16716. * // => [2, 0]
  16717. *
  16718. * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
  16719. * // => [2, 0]
  16720. */
  16721. function propertyOf(object) {
  16722. return function(path) {
  16723. return object == null ? undefined : baseGet(object, path);
  16724. };
  16725. }
  16726. /**
  16727. * Creates an array of numbers (positive and/or negative) progressing from
  16728. * `start` up to, but not including, `end`. A step of `-1` is used if a negative
  16729. * `start` is specified without an `end` or `step`. If `end` is not specified,
  16730. * it's set to `start` with `start` then set to `0`.
  16731. *
  16732. * **Note:** JavaScript follows the IEEE-754 standard for resolving
  16733. * floating-point values which can produce unexpected results.
  16734. *
  16735. * @static
  16736. * @since 0.1.0
  16737. * @memberOf _
  16738. * @category Util
  16739. * @param {number} [start=0] The start of the range.
  16740. * @param {number} end The end of the range.
  16741. * @param {number} [step=1] The value to increment or decrement by.
  16742. * @returns {Array} Returns the range of numbers.
  16743. * @see _.inRange, _.rangeRight
  16744. * @example
  16745. *
  16746. * _.range(4);
  16747. * // => [0, 1, 2, 3]
  16748. *
  16749. * _.range(-4);
  16750. * // => [0, -1, -2, -3]
  16751. *
  16752. * _.range(1, 5);
  16753. * // => [1, 2, 3, 4]
  16754. *
  16755. * _.range(0, 20, 5);
  16756. * // => [0, 5, 10, 15]
  16757. *
  16758. * _.range(0, -4, -1);
  16759. * // => [0, -1, -2, -3]
  16760. *
  16761. * _.range(1, 4, 0);
  16762. * // => [1, 1, 1]
  16763. *
  16764. * _.range(0);
  16765. * // => []
  16766. */
  16767. var range = createRange();
  16768. /**
  16769. * This method is like `_.range` except that it populates values in
  16770. * descending order.
  16771. *
  16772. * @static
  16773. * @memberOf _
  16774. * @since 4.0.0
  16775. * @category Util
  16776. * @param {number} [start=0] The start of the range.
  16777. * @param {number} end The end of the range.
  16778. * @param {number} [step=1] The value to increment or decrement by.
  16779. * @returns {Array} Returns the range of numbers.
  16780. * @see _.inRange, _.range
  16781. * @example
  16782. *
  16783. * _.rangeRight(4);
  16784. * // => [3, 2, 1, 0]
  16785. *
  16786. * _.rangeRight(-4);
  16787. * // => [-3, -2, -1, 0]
  16788. *
  16789. * _.rangeRight(1, 5);
  16790. * // => [4, 3, 2, 1]
  16791. *
  16792. * _.rangeRight(0, 20, 5);
  16793. * // => [15, 10, 5, 0]
  16794. *
  16795. * _.rangeRight(0, -4, -1);
  16796. * // => [-3, -2, -1, 0]
  16797. *
  16798. * _.rangeRight(1, 4, 0);
  16799. * // => [1, 1, 1]
  16800. *
  16801. * _.rangeRight(0);
  16802. * // => []
  16803. */
  16804. var rangeRight = createRange(true);
  16805. /**
  16806. * This method returns a new empty array.
  16807. *
  16808. * @static
  16809. * @memberOf _
  16810. * @since 4.13.0
  16811. * @category Util
  16812. * @returns {Array} Returns the new empty array.
  16813. * @example
  16814. *
  16815. * var arrays = _.times(2, _.stubArray);
  16816. *
  16817. * console.log(arrays);
  16818. * // => [[], []]
  16819. *
  16820. * console.log(arrays[0] === arrays[1]);
  16821. * // => false
  16822. */
  16823. function stubArray() {
  16824. return [];
  16825. }
  16826. /**
  16827. * This method returns `false`.
  16828. *
  16829. * @static
  16830. * @memberOf _
  16831. * @since 4.13.0
  16832. * @category Util
  16833. * @returns {boolean} Returns `false`.
  16834. * @example
  16835. *
  16836. * _.times(2, _.stubFalse);
  16837. * // => [false, false]
  16838. */
  16839. function stubFalse() {
  16840. return false;
  16841. }
  16842. /**
  16843. * This method returns a new empty object.
  16844. *
  16845. * @static
  16846. * @memberOf _
  16847. * @since 4.13.0
  16848. * @category Util
  16849. * @returns {Object} Returns the new empty object.
  16850. * @example
  16851. *
  16852. * var objects = _.times(2, _.stubObject);
  16853. *
  16854. * console.log(objects);
  16855. * // => [{}, {}]
  16856. *
  16857. * console.log(objects[0] === objects[1]);
  16858. * // => false
  16859. */
  16860. function stubObject() {
  16861. return {};
  16862. }
  16863. /**
  16864. * This method returns an empty string.
  16865. *
  16866. * @static
  16867. * @memberOf _
  16868. * @since 4.13.0
  16869. * @category Util
  16870. * @returns {string} Returns the empty string.
  16871. * @example
  16872. *
  16873. * _.times(2, _.stubString);
  16874. * // => ['', '']
  16875. */
  16876. function stubString() {
  16877. return '';
  16878. }
  16879. /**
  16880. * This method returns `true`.
  16881. *
  16882. * @static
  16883. * @memberOf _
  16884. * @since 4.13.0
  16885. * @category Util
  16886. * @returns {boolean} Returns `true`.
  16887. * @example
  16888. *
  16889. * _.times(2, _.stubTrue);
  16890. * // => [true, true]
  16891. */
  16892. function stubTrue() {
  16893. return true;
  16894. }
  16895. /**
  16896. * Invokes the iteratee `n` times, returning an array of the results of
  16897. * each invocation. The iteratee is invoked with one argument; (index).
  16898. *
  16899. * @static
  16900. * @since 0.1.0
  16901. * @memberOf _
  16902. * @category Util
  16903. * @param {number} n The number of times to invoke `iteratee`.
  16904. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  16905. * @returns {Array} Returns the array of results.
  16906. * @example
  16907. *
  16908. * _.times(3, String);
  16909. * // => ['0', '1', '2']
  16910. *
  16911. * _.times(4, _.constant(0));
  16912. * // => [0, 0, 0, 0]
  16913. */
  16914. function times(n, iteratee) {
  16915. n = toInteger(n);
  16916. if (n < 1 || n > MAX_SAFE_INTEGER) {
  16917. return [];
  16918. }
  16919. var index = MAX_ARRAY_LENGTH,
  16920. length = nativeMin(n, MAX_ARRAY_LENGTH);
  16921. iteratee = getIteratee(iteratee);
  16922. n -= MAX_ARRAY_LENGTH;
  16923. var result = baseTimes(length, iteratee);
  16924. while (++index < n) {
  16925. iteratee(index);
  16926. }
  16927. return result;
  16928. }
  16929. /**
  16930. * Converts `value` to a property path array.
  16931. *
  16932. * @static
  16933. * @memberOf _
  16934. * @since 4.0.0
  16935. * @category Util
  16936. * @param {*} value The value to convert.
  16937. * @returns {Array} Returns the new property path array.
  16938. * @example
  16939. *
  16940. * _.toPath('a.b.c');
  16941. * // => ['a', 'b', 'c']
  16942. *
  16943. * _.toPath('a[0].b.c');
  16944. * // => ['a', '0', 'b', 'c']
  16945. */
  16946. function toPath(value) {
  16947. if (isArray(value)) {
  16948. return arrayMap(value, toKey);
  16949. }
  16950. return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
  16951. }
  16952. /**
  16953. * Generates a unique ID. If `prefix` is given, the ID is appended to it.
  16954. *
  16955. * @static
  16956. * @since 0.1.0
  16957. * @memberOf _
  16958. * @category Util
  16959. * @param {string} [prefix=''] The value to prefix the ID with.
  16960. * @returns {string} Returns the unique ID.
  16961. * @example
  16962. *
  16963. * _.uniqueId('contact_');
  16964. * // => 'contact_104'
  16965. *
  16966. * _.uniqueId();
  16967. * // => '105'
  16968. */
  16969. function uniqueId(prefix) {
  16970. var id = ++idCounter;
  16971. return toString(prefix) + id;
  16972. }
  16973. /*------------------------------------------------------------------------*/
  16974. /**
  16975. * Adds two numbers.
  16976. *
  16977. * @static
  16978. * @memberOf _
  16979. * @since 3.4.0
  16980. * @category Math
  16981. * @param {number} augend The first number in an addition.
  16982. * @param {number} addend The second number in an addition.
  16983. * @returns {number} Returns the total.
  16984. * @example
  16985. *
  16986. * _.add(6, 4);
  16987. * // => 10
  16988. */
  16989. var add = createMathOperation(function(augend, addend) {
  16990. return augend + addend;
  16991. }, 0);
  16992. /**
  16993. * Computes `number` rounded up to `precision`.
  16994. *
  16995. * @static
  16996. * @memberOf _
  16997. * @since 3.10.0
  16998. * @category Math
  16999. * @param {number} number The number to round up.
  17000. * @param {number} [precision=0] The precision to round up to.
  17001. * @returns {number} Returns the rounded up number.
  17002. * @example
  17003. *
  17004. * _.ceil(4.006);
  17005. * // => 5
  17006. *
  17007. * _.ceil(6.004, 2);
  17008. * // => 6.01
  17009. *
  17010. * _.ceil(6040, -2);
  17011. * // => 6100
  17012. */
  17013. var ceil = createRound('ceil');
  17014. /**
  17015. * Divide two numbers.
  17016. *
  17017. * @static
  17018. * @memberOf _
  17019. * @since 4.7.0
  17020. * @category Math
  17021. * @param {number} dividend The first number in a division.
  17022. * @param {number} divisor The second number in a division.
  17023. * @returns {number} Returns the quotient.
  17024. * @example
  17025. *
  17026. * _.divide(6, 4);
  17027. * // => 1.5
  17028. */
  17029. var divide = createMathOperation(function(dividend, divisor) {
  17030. return dividend / divisor;
  17031. }, 1);
  17032. /**
  17033. * Computes `number` rounded down to `precision`.
  17034. *
  17035. * @static
  17036. * @memberOf _
  17037. * @since 3.10.0
  17038. * @category Math
  17039. * @param {number} number The number to round down.
  17040. * @param {number} [precision=0] The precision to round down to.
  17041. * @returns {number} Returns the rounded down number.
  17042. * @example
  17043. *
  17044. * _.floor(4.006);
  17045. * // => 4
  17046. *
  17047. * _.floor(0.046, 2);
  17048. * // => 0.04
  17049. *
  17050. * _.floor(4060, -2);
  17051. * // => 4000
  17052. */
  17053. var floor = createRound('floor');
  17054. /**
  17055. * Computes the maximum value of `array`. If `array` is empty or falsey,
  17056. * `undefined` is returned.
  17057. *
  17058. * @static
  17059. * @since 0.1.0
  17060. * @memberOf _
  17061. * @category Math
  17062. * @param {Array} array The array to iterate over.
  17063. * @returns {*} Returns the maximum value.
  17064. * @example
  17065. *
  17066. * _.max([4, 2, 8, 6]);
  17067. * // => 8
  17068. *
  17069. * _.max([]);
  17070. * // => undefined
  17071. */
  17072. function max(array) {
  17073. return (array && array.length)
  17074. ? baseExtremum(array, identity, baseGt)
  17075. : undefined;
  17076. }
  17077. /**
  17078. * This method is like `_.max` except that it accepts `iteratee` which is
  17079. * invoked for each element in `array` to generate the criterion by which
  17080. * the value is ranked. The iteratee is invoked with one argument: (value).
  17081. *
  17082. * @static
  17083. * @memberOf _
  17084. * @since 4.0.0
  17085. * @category Math
  17086. * @param {Array} array The array to iterate over.
  17087. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  17088. * @returns {*} Returns the maximum value.
  17089. * @example
  17090. *
  17091. * var objects = [{ 'n': 1 }, { 'n': 2 }];
  17092. *
  17093. * _.maxBy(objects, function(o) { return o.n; });
  17094. * // => { 'n': 2 }
  17095. *
  17096. * // The `_.property` iteratee shorthand.
  17097. * _.maxBy(objects, 'n');
  17098. * // => { 'n': 2 }
  17099. */
  17100. function maxBy(array, iteratee) {
  17101. return (array && array.length)
  17102. ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)
  17103. : undefined;
  17104. }
  17105. /**
  17106. * Computes the mean of the values in `array`.
  17107. *
  17108. * @static
  17109. * @memberOf _
  17110. * @since 4.0.0
  17111. * @category Math
  17112. * @param {Array} array The array to iterate over.
  17113. * @returns {number} Returns the mean.
  17114. * @example
  17115. *
  17116. * _.mean([4, 2, 8, 6]);
  17117. * // => 5
  17118. */
  17119. function mean(array) {
  17120. return baseMean(array, identity);
  17121. }
  17122. /**
  17123. * This method is like `_.mean` except that it accepts `iteratee` which is
  17124. * invoked for each element in `array` to generate the value to be averaged.
  17125. * The iteratee is invoked with one argument: (value).
  17126. *
  17127. * @static
  17128. * @memberOf _
  17129. * @since 4.7.0
  17130. * @category Math
  17131. * @param {Array} array The array to iterate over.
  17132. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  17133. * @returns {number} Returns the mean.
  17134. * @example
  17135. *
  17136. * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
  17137. *
  17138. * _.meanBy(objects, function(o) { return o.n; });
  17139. * // => 5
  17140. *
  17141. * // The `_.property` iteratee shorthand.
  17142. * _.meanBy(objects, 'n');
  17143. * // => 5
  17144. */
  17145. function meanBy(array, iteratee) {
  17146. return baseMean(array, getIteratee(iteratee, 2));
  17147. }
  17148. /**
  17149. * Computes the minimum value of `array`. If `array` is empty or falsey,
  17150. * `undefined` is returned.
  17151. *
  17152. * @static
  17153. * @since 0.1.0
  17154. * @memberOf _
  17155. * @category Math
  17156. * @param {Array} array The array to iterate over.
  17157. * @returns {*} Returns the minimum value.
  17158. * @example
  17159. *
  17160. * _.min([4, 2, 8, 6]);
  17161. * // => 2
  17162. *
  17163. * _.min([]);
  17164. * // => undefined
  17165. */
  17166. function min(array) {
  17167. return (array && array.length)
  17168. ? baseExtremum(array, identity, baseLt)
  17169. : undefined;
  17170. }
  17171. /**
  17172. * This method is like `_.min` except that it accepts `iteratee` which is
  17173. * invoked for each element in `array` to generate the criterion by which
  17174. * the value is ranked. The iteratee is invoked with one argument: (value).
  17175. *
  17176. * @static
  17177. * @memberOf _
  17178. * @since 4.0.0
  17179. * @category Math
  17180. * @param {Array} array The array to iterate over.
  17181. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  17182. * @returns {*} Returns the minimum value.
  17183. * @example
  17184. *
  17185. * var objects = [{ 'n': 1 }, { 'n': 2 }];
  17186. *
  17187. * _.minBy(objects, function(o) { return o.n; });
  17188. * // => { 'n': 1 }
  17189. *
  17190. * // The `_.property` iteratee shorthand.
  17191. * _.minBy(objects, 'n');
  17192. * // => { 'n': 1 }
  17193. */
  17194. function minBy(array, iteratee) {
  17195. return (array && array.length)
  17196. ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)
  17197. : undefined;
  17198. }
  17199. /**
  17200. * Multiply two numbers.
  17201. *
  17202. * @static
  17203. * @memberOf _
  17204. * @since 4.7.0
  17205. * @category Math
  17206. * @param {number} multiplier The first number in a multiplication.
  17207. * @param {number} multiplicand The second number in a multiplication.
  17208. * @returns {number} Returns the product.
  17209. * @example
  17210. *
  17211. * _.multiply(6, 4);
  17212. * // => 24
  17213. */
  17214. var multiply = createMathOperation(function(multiplier, multiplicand) {
  17215. return multiplier * multiplicand;
  17216. }, 1);
  17217. /**
  17218. * Computes `number` rounded to `precision`.
  17219. *
  17220. * @static
  17221. * @memberOf _
  17222. * @since 3.10.0
  17223. * @category Math
  17224. * @param {number} number The number to round.
  17225. * @param {number} [precision=0] The precision to round to.
  17226. * @returns {number} Returns the rounded number.
  17227. * @example
  17228. *
  17229. * _.round(4.006);
  17230. * // => 4
  17231. *
  17232. * _.round(4.006, 2);
  17233. * // => 4.01
  17234. *
  17235. * _.round(4060, -2);
  17236. * // => 4100
  17237. */
  17238. var round = createRound('round');
  17239. /**
  17240. * Subtract two numbers.
  17241. *
  17242. * @static
  17243. * @memberOf _
  17244. * @since 4.0.0
  17245. * @category Math
  17246. * @param {number} minuend The first number in a subtraction.
  17247. * @param {number} subtrahend The second number in a subtraction.
  17248. * @returns {number} Returns the difference.
  17249. * @example
  17250. *
  17251. * _.subtract(6, 4);
  17252. * // => 2
  17253. */
  17254. var subtract = createMathOperation(function(minuend, subtrahend) {
  17255. return minuend - subtrahend;
  17256. }, 0);
  17257. /**
  17258. * Computes the sum of the values in `array`.
  17259. *
  17260. * @static
  17261. * @memberOf _
  17262. * @since 3.4.0
  17263. * @category Math
  17264. * @param {Array} array The array to iterate over.
  17265. * @returns {number} Returns the sum.
  17266. * @example
  17267. *
  17268. * _.sum([4, 2, 8, 6]);
  17269. * // => 20
  17270. */
  17271. function sum(array) {
  17272. return (array && array.length)
  17273. ? baseSum(array, identity)
  17274. : 0;
  17275. }
  17276. /**
  17277. * This method is like `_.sum` except that it accepts `iteratee` which is
  17278. * invoked for each element in `array` to generate the value to be summed.
  17279. * The iteratee is invoked with one argument: (value).
  17280. *
  17281. * @static
  17282. * @memberOf _
  17283. * @since 4.0.0
  17284. * @category Math
  17285. * @param {Array} array The array to iterate over.
  17286. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  17287. * @returns {number} Returns the sum.
  17288. * @example
  17289. *
  17290. * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
  17291. *
  17292. * _.sumBy(objects, function(o) { return o.n; });
  17293. * // => 20
  17294. *
  17295. * // The `_.property` iteratee shorthand.
  17296. * _.sumBy(objects, 'n');
  17297. * // => 20
  17298. */
  17299. function sumBy(array, iteratee) {
  17300. return (array && array.length)
  17301. ? baseSum(array, getIteratee(iteratee, 2))
  17302. : 0;
  17303. }
  17304. /*------------------------------------------------------------------------*/
  17305. // Add methods that return wrapped values in chain sequences.
  17306. lodash.after = after;
  17307. lodash.ary = ary;
  17308. lodash.assign = assign;
  17309. lodash.assignIn = assignIn;
  17310. lodash.assignInWith = assignInWith;
  17311. lodash.assignWith = assignWith;
  17312. lodash.at = at;
  17313. lodash.before = before;
  17314. lodash.bind = bind;
  17315. lodash.bindAll = bindAll;
  17316. lodash.bindKey = bindKey;
  17317. lodash.castArray = castArray;
  17318. lodash.chain = chain;
  17319. lodash.chunk = chunk;
  17320. lodash.compact = compact;
  17321. lodash.concat = concat;
  17322. lodash.cond = cond;
  17323. lodash.conforms = conforms;
  17324. lodash.constant = constant;
  17325. lodash.countBy = countBy;
  17326. lodash.create = create;
  17327. lodash.curry = curry;
  17328. lodash.curryRight = curryRight;
  17329. lodash.debounce = debounce;
  17330. lodash.defaults = defaults;
  17331. lodash.defaultsDeep = defaultsDeep;
  17332. lodash.defer = defer;
  17333. lodash.delay = delay;
  17334. lodash.difference = difference;
  17335. lodash.differenceBy = differenceBy;
  17336. lodash.differenceWith = differenceWith;
  17337. lodash.drop = drop;
  17338. lodash.dropRight = dropRight;
  17339. lodash.dropRightWhile = dropRightWhile;
  17340. lodash.dropWhile = dropWhile;
  17341. lodash.fill = fill;
  17342. lodash.filter = filter;
  17343. lodash.flatMap = flatMap;
  17344. lodash.flatMapDeep = flatMapDeep;
  17345. lodash.flatMapDepth = flatMapDepth;
  17346. lodash.flatten = flatten;
  17347. lodash.flattenDeep = flattenDeep;
  17348. lodash.flattenDepth = flattenDepth;
  17349. lodash.flip = flip;
  17350. lodash.flow = flow;
  17351. lodash.flowRight = flowRight;
  17352. lodash.fromPairs = fromPairs;
  17353. lodash.functions = functions;
  17354. lodash.functionsIn = functionsIn;
  17355. lodash.groupBy = groupBy;
  17356. lodash.initial = initial;
  17357. lodash.intersection = intersection;
  17358. lodash.intersectionBy = intersectionBy;
  17359. lodash.intersectionWith = intersectionWith;
  17360. lodash.invert = invert;
  17361. lodash.invertBy = invertBy;
  17362. lodash.invokeMap = invokeMap;
  17363. lodash.iteratee = iteratee;
  17364. lodash.keyBy = keyBy;
  17365. lodash.keys = keys;
  17366. lodash.keysIn = keysIn;
  17367. lodash.map = map;
  17368. lodash.mapKeys = mapKeys;
  17369. lodash.mapValues = mapValues;
  17370. lodash.matches = matches;
  17371. lodash.matchesProperty = matchesProperty;
  17372. lodash.memoize = memoize;
  17373. lodash.merge = merge;
  17374. lodash.mergeWith = mergeWith;
  17375. lodash.method = method;
  17376. lodash.methodOf = methodOf;
  17377. lodash.mixin = mixin;
  17378. lodash.negate = negate;
  17379. lodash.nthArg = nthArg;
  17380. lodash.omit = omit;
  17381. lodash.omitBy = omitBy;
  17382. lodash.once = once;
  17383. lodash.orderBy = orderBy;
  17384. lodash.over = over;
  17385. lodash.overArgs = overArgs;
  17386. lodash.overEvery = overEvery;
  17387. lodash.overSome = overSome;
  17388. lodash.partial = partial;
  17389. lodash.partialRight = partialRight;
  17390. lodash.partition = partition;
  17391. lodash.pick = pick;
  17392. lodash.pickBy = pickBy;
  17393. lodash.property = property;
  17394. lodash.propertyOf = propertyOf;
  17395. lodash.pull = pull;
  17396. lodash.pullAll = pullAll;
  17397. lodash.pullAllBy = pullAllBy;
  17398. lodash.pullAllWith = pullAllWith;
  17399. lodash.pullAt = pullAt;
  17400. lodash.range = range;
  17401. lodash.rangeRight = rangeRight;
  17402. lodash.rearg = rearg;
  17403. lodash.reject = reject;
  17404. lodash.remove = remove;
  17405. lodash.rest = rest;
  17406. lodash.reverse = reverse;
  17407. lodash.sampleSize = sampleSize;
  17408. lodash.set = set;
  17409. lodash.setWith = setWith;
  17410. lodash.shuffle = shuffle;
  17411. lodash.slice = slice;
  17412. lodash.sortBy = sortBy;
  17413. lodash.sortedUniq = sortedUniq;
  17414. lodash.sortedUniqBy = sortedUniqBy;
  17415. lodash.split = split;
  17416. lodash.spread = spread;
  17417. lodash.tail = tail;
  17418. lodash.take = take;
  17419. lodash.takeRight = takeRight;
  17420. lodash.takeRightWhile = takeRightWhile;
  17421. lodash.takeWhile = takeWhile;
  17422. lodash.tap = tap;
  17423. lodash.throttle = throttle;
  17424. lodash.thru = thru;
  17425. lodash.toArray = toArray;
  17426. lodash.toPairs = toPairs;
  17427. lodash.toPairsIn = toPairsIn;
  17428. lodash.toPath = toPath;
  17429. lodash.toPlainObject = toPlainObject;
  17430. lodash.transform = transform;
  17431. lodash.unary = unary;
  17432. lodash.union = union;
  17433. lodash.unionBy = unionBy;
  17434. lodash.unionWith = unionWith;
  17435. lodash.uniq = uniq;
  17436. lodash.uniqBy = uniqBy;
  17437. lodash.uniqWith = uniqWith;
  17438. lodash.unset = unset;
  17439. lodash.unzip = unzip;
  17440. lodash.unzipWith = unzipWith;
  17441. lodash.update = update;
  17442. lodash.updateWith = updateWith;
  17443. lodash.values = values;
  17444. lodash.valuesIn = valuesIn;
  17445. lodash.without = without;
  17446. lodash.words = words;
  17447. lodash.wrap = wrap;
  17448. lodash.xor = xor;
  17449. lodash.xorBy = xorBy;
  17450. lodash.xorWith = xorWith;
  17451. lodash.zip = zip;
  17452. lodash.zipObject = zipObject;
  17453. lodash.zipObjectDeep = zipObjectDeep;
  17454. lodash.zipWith = zipWith;
  17455. // Add aliases.
  17456. lodash.entries = toPairs;
  17457. lodash.entriesIn = toPairsIn;
  17458. lodash.extend = assignIn;
  17459. lodash.extendWith = assignInWith;
  17460. // Add methods to `lodash.prototype`.
  17461. mixin(lodash, lodash);
  17462. /*------------------------------------------------------------------------*/
  17463. // Add methods that return unwrapped values in chain sequences.
  17464. lodash.add = add;
  17465. lodash.attempt = attempt;
  17466. lodash.camelCase = camelCase;
  17467. lodash.capitalize = capitalize;
  17468. lodash.ceil = ceil;
  17469. lodash.clamp = clamp;
  17470. lodash.clone = clone;
  17471. lodash.cloneDeep = cloneDeep;
  17472. lodash.cloneDeepWith = cloneDeepWith;
  17473. lodash.cloneWith = cloneWith;
  17474. lodash.conformsTo = conformsTo;
  17475. lodash.deburr = deburr;
  17476. lodash.defaultTo = defaultTo;
  17477. lodash.divide = divide;
  17478. lodash.endsWith = endsWith;
  17479. lodash.eq = eq;
  17480. lodash.escape = escape;
  17481. lodash.escapeRegExp = escapeRegExp;
  17482. lodash.every = every;
  17483. lodash.find = find;
  17484. lodash.findIndex = findIndex;
  17485. lodash.findKey = findKey;
  17486. lodash.findLast = findLast;
  17487. lodash.findLastIndex = findLastIndex;
  17488. lodash.findLastKey = findLastKey;
  17489. lodash.floor = floor;
  17490. lodash.forEach = forEach;
  17491. lodash.forEachRight = forEachRight;
  17492. lodash.forIn = forIn;
  17493. lodash.forInRight = forInRight;
  17494. lodash.forOwn = forOwn;
  17495. lodash.forOwnRight = forOwnRight;
  17496. lodash.get = get;
  17497. lodash.gt = gt;
  17498. lodash.gte = gte;
  17499. lodash.has = has;
  17500. lodash.hasIn = hasIn;
  17501. lodash.head = head;
  17502. lodash.identity = identity;
  17503. lodash.includes = includes;
  17504. lodash.indexOf = indexOf;
  17505. lodash.inRange = inRange;
  17506. lodash.invoke = invoke;
  17507. lodash.isArguments = isArguments;
  17508. lodash.isArray = isArray;
  17509. lodash.isArrayBuffer = isArrayBuffer;
  17510. lodash.isArrayLike = isArrayLike;
  17511. lodash.isArrayLikeObject = isArrayLikeObject;
  17512. lodash.isBoolean = isBoolean;
  17513. lodash.isBuffer = isBuffer;
  17514. lodash.isDate = isDate;
  17515. lodash.isElement = isElement;
  17516. lodash.isEmpty = isEmpty;
  17517. lodash.isEqual = isEqual;
  17518. lodash.isEqualWith = isEqualWith;
  17519. lodash.isError = isError;
  17520. lodash.isFinite = isFinite;
  17521. lodash.isFunction = isFunction;
  17522. lodash.isInteger = isInteger;
  17523. lodash.isLength = isLength;
  17524. lodash.isMap = isMap;
  17525. lodash.isMatch = isMatch;
  17526. lodash.isMatchWith = isMatchWith;
  17527. lodash.isNaN = isNaN;
  17528. lodash.isNative = isNative;
  17529. lodash.isNil = isNil;
  17530. lodash.isNull = isNull;
  17531. lodash.isNumber = isNumber;
  17532. lodash.isObject = isObject;
  17533. lodash.isObjectLike = isObjectLike;
  17534. lodash.isPlainObject = isPlainObject;
  17535. lodash.isRegExp = isRegExp;
  17536. lodash.isSafeInteger = isSafeInteger;
  17537. lodash.isSet = isSet;
  17538. lodash.isString = isString;
  17539. lodash.isSymbol = isSymbol;
  17540. lodash.isTypedArray = isTypedArray;
  17541. lodash.isUndefined = isUndefined;
  17542. lodash.isWeakMap = isWeakMap;
  17543. lodash.isWeakSet = isWeakSet;
  17544. lodash.join = join;
  17545. lodash.kebabCase = kebabCase;
  17546. lodash.last = last;
  17547. lodash.lastIndexOf = lastIndexOf;
  17548. lodash.lowerCase = lowerCase;
  17549. lodash.lowerFirst = lowerFirst;
  17550. lodash.lt = lt;
  17551. lodash.lte = lte;
  17552. lodash.max = max;
  17553. lodash.maxBy = maxBy;
  17554. lodash.mean = mean;
  17555. lodash.meanBy = meanBy;
  17556. lodash.min = min;
  17557. lodash.minBy = minBy;
  17558. lodash.stubArray = stubArray;
  17559. lodash.stubFalse = stubFalse;
  17560. lodash.stubObject = stubObject;
  17561. lodash.stubString = stubString;
  17562. lodash.stubTrue = stubTrue;
  17563. lodash.multiply = multiply;
  17564. lodash.nth = nth;
  17565. lodash.noConflict = noConflict;
  17566. lodash.noop = noop;
  17567. lodash.now = now;
  17568. lodash.pad = pad;
  17569. lodash.padEnd = padEnd;
  17570. lodash.padStart = padStart;
  17571. lodash.parseInt = parseInt;
  17572. lodash.random = random;
  17573. lodash.reduce = reduce;
  17574. lodash.reduceRight = reduceRight;
  17575. lodash.repeat = repeat;
  17576. lodash.replace = replace;
  17577. lodash.result = result;
  17578. lodash.round = round;
  17579. lodash.runInContext = runInContext;
  17580. lodash.sample = sample;
  17581. lodash.size = size;
  17582. lodash.snakeCase = snakeCase;
  17583. lodash.some = some;
  17584. lodash.sortedIndex = sortedIndex;
  17585. lodash.sortedIndexBy = sortedIndexBy;
  17586. lodash.sortedIndexOf = sortedIndexOf;
  17587. lodash.sortedLastIndex = sortedLastIndex;
  17588. lodash.sortedLastIndexBy = sortedLastIndexBy;
  17589. lodash.sortedLastIndexOf = sortedLastIndexOf;
  17590. lodash.startCase = startCase;
  17591. lodash.startsWith = startsWith;
  17592. lodash.subtract = subtract;
  17593. lodash.sum = sum;
  17594. lodash.sumBy = sumBy;
  17595. lodash.template = template;
  17596. lodash.times = times;
  17597. lodash.toFinite = toFinite;
  17598. lodash.toInteger = toInteger;
  17599. lodash.toLength = toLength;
  17600. lodash.toLower = toLower;
  17601. lodash.toNumber = toNumber;
  17602. lodash.toSafeInteger = toSafeInteger;
  17603. lodash.toString = toString;
  17604. lodash.toUpper = toUpper;
  17605. lodash.trim = trim;
  17606. lodash.trimEnd = trimEnd;
  17607. lodash.trimStart = trimStart;
  17608. lodash.truncate = truncate;
  17609. lodash.unescape = unescape;
  17610. lodash.uniqueId = uniqueId;
  17611. lodash.upperCase = upperCase;
  17612. lodash.upperFirst = upperFirst;
  17613. // Add aliases.
  17614. lodash.each = forEach;
  17615. lodash.eachRight = forEachRight;
  17616. lodash.first = head;
  17617. mixin(lodash, (function() {
  17618. var source = {};
  17619. baseForOwn(lodash, function(func, methodName) {
  17620. if (!hasOwnProperty.call(lodash.prototype, methodName)) {
  17621. source[methodName] = func;
  17622. }
  17623. });
  17624. return source;
  17625. }()), { 'chain': false });
  17626. /*------------------------------------------------------------------------*/
  17627. /**
  17628. * The semantic version number.
  17629. *
  17630. * @static
  17631. * @memberOf _
  17632. * @type {string}
  17633. */
  17634. lodash.VERSION = VERSION;
  17635. // Assign default placeholders.
  17636. arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
  17637. lodash[methodName].placeholder = lodash;
  17638. });
  17639. // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
  17640. arrayEach(['drop', 'take'], function(methodName, index) {
  17641. LazyWrapper.prototype[methodName] = function(n) {
  17642. n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
  17643. var result = (this.__filtered__ && !index)
  17644. ? new LazyWrapper(this)
  17645. : this.clone();
  17646. if (result.__filtered__) {
  17647. result.__takeCount__ = nativeMin(n, result.__takeCount__);
  17648. } else {
  17649. result.__views__.push({
  17650. 'size': nativeMin(n, MAX_ARRAY_LENGTH),
  17651. 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')
  17652. });
  17653. }
  17654. return result;
  17655. };
  17656. LazyWrapper.prototype[methodName + 'Right'] = function(n) {
  17657. return this.reverse()[methodName](n).reverse();
  17658. };
  17659. });
  17660. // Add `LazyWrapper` methods that accept an `iteratee` value.
  17661. arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
  17662. var type = index + 1,
  17663. isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
  17664. LazyWrapper.prototype[methodName] = function(iteratee) {
  17665. var result = this.clone();
  17666. result.__iteratees__.push({
  17667. 'iteratee': getIteratee(iteratee, 3),
  17668. 'type': type
  17669. });
  17670. result.__filtered__ = result.__filtered__ || isFilter;
  17671. return result;
  17672. };
  17673. });
  17674. // Add `LazyWrapper` methods for `_.head` and `_.last`.
  17675. arrayEach(['head', 'last'], function(methodName, index) {
  17676. var takeName = 'take' + (index ? 'Right' : '');
  17677. LazyWrapper.prototype[methodName] = function() {
  17678. return this[takeName](1).value()[0];
  17679. };
  17680. });
  17681. // Add `LazyWrapper` methods for `_.initial` and `_.tail`.
  17682. arrayEach(['initial', 'tail'], function(methodName, index) {
  17683. var dropName = 'drop' + (index ? '' : 'Right');
  17684. LazyWrapper.prototype[methodName] = function() {
  17685. return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
  17686. };
  17687. });
  17688. LazyWrapper.prototype.compact = function() {
  17689. return this.filter(identity);
  17690. };
  17691. LazyWrapper.prototype.find = function(predicate) {
  17692. return this.filter(predicate).head();
  17693. };
  17694. LazyWrapper.prototype.findLast = function(predicate) {
  17695. return this.reverse().find(predicate);
  17696. };
  17697. LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
  17698. if (typeof path == 'function') {
  17699. return new LazyWrapper(this);
  17700. }
  17701. return this.map(function(value) {
  17702. return baseInvoke(value, path, args);
  17703. });
  17704. });
  17705. LazyWrapper.prototype.reject = function(predicate) {
  17706. return this.filter(negate(getIteratee(predicate)));
  17707. };
  17708. LazyWrapper.prototype.slice = function(start, end) {
  17709. start = toInteger(start);
  17710. var result = this;
  17711. if (result.__filtered__ && (start > 0 || end < 0)) {
  17712. return new LazyWrapper(result);
  17713. }
  17714. if (start < 0) {
  17715. result = result.takeRight(-start);
  17716. } else if (start) {
  17717. result = result.drop(start);
  17718. }
  17719. if (end !== undefined) {
  17720. end = toInteger(end);
  17721. result = end < 0 ? result.dropRight(-end) : result.take(end - start);
  17722. }
  17723. return result;
  17724. };
  17725. LazyWrapper.prototype.takeRightWhile = function(predicate) {
  17726. return this.reverse().takeWhile(predicate).reverse();
  17727. };
  17728. LazyWrapper.prototype.toArray = function() {
  17729. return this.take(MAX_ARRAY_LENGTH);
  17730. };
  17731. // Add `LazyWrapper` methods to `lodash.prototype`.
  17732. baseForOwn(LazyWrapper.prototype, function(func, methodName) {
  17733. var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),
  17734. isTaker = /^(?:head|last)$/.test(methodName),
  17735. lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],
  17736. retUnwrapped = isTaker || /^find/.test(methodName);
  17737. if (!lodashFunc) {
  17738. return;
  17739. }
  17740. lodash.prototype[methodName] = function() {
  17741. var value = this.__wrapped__,
  17742. args = isTaker ? [1] : arguments,
  17743. isLazy = value instanceof LazyWrapper,
  17744. iteratee = args[0],
  17745. useLazy = isLazy || isArray(value);
  17746. var interceptor = function(value) {
  17747. var result = lodashFunc.apply(lodash, arrayPush([value], args));
  17748. return (isTaker && chainAll) ? result[0] : result;
  17749. };
  17750. if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
  17751. // Avoid lazy use if the iteratee has a "length" value other than `1`.
  17752. isLazy = useLazy = false;
  17753. }
  17754. var chainAll = this.__chain__,
  17755. isHybrid = !!this.__actions__.length,
  17756. isUnwrapped = retUnwrapped && !chainAll,
  17757. onlyLazy = isLazy && !isHybrid;
  17758. if (!retUnwrapped && useLazy) {
  17759. value = onlyLazy ? value : new LazyWrapper(this);
  17760. var result = func.apply(value, args);
  17761. result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
  17762. return new LodashWrapper(result, chainAll);
  17763. }
  17764. if (isUnwrapped && onlyLazy) {
  17765. return func.apply(this, args);
  17766. }
  17767. result = this.thru(interceptor);
  17768. return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;
  17769. };
  17770. });
  17771. // Add `Array` methods to `lodash.prototype`.
  17772. arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
  17773. var func = arrayProto[methodName],
  17774. chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
  17775. retUnwrapped = /^(?:pop|shift)$/.test(methodName);
  17776. lodash.prototype[methodName] = function() {
  17777. var args = arguments;
  17778. if (retUnwrapped && !this.__chain__) {
  17779. var value = this.value();
  17780. return func.apply(isArray(value) ? value : [], args);
  17781. }
  17782. return this[chainName](function(value) {
  17783. return func.apply(isArray(value) ? value : [], args);
  17784. });
  17785. };
  17786. });
  17787. // Map minified method names to their real names.
  17788. baseForOwn(LazyWrapper.prototype, function(func, methodName) {
  17789. var lodashFunc = lodash[methodName];
  17790. if (lodashFunc) {
  17791. var key = lodashFunc.name + '';
  17792. if (!hasOwnProperty.call(realNames, key)) {
  17793. realNames[key] = [];
  17794. }
  17795. realNames[key].push({ 'name': methodName, 'func': lodashFunc });
  17796. }
  17797. });
  17798. realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{
  17799. 'name': 'wrapper',
  17800. 'func': undefined
  17801. }];
  17802. // Add methods to `LazyWrapper`.
  17803. LazyWrapper.prototype.clone = lazyClone;
  17804. LazyWrapper.prototype.reverse = lazyReverse;
  17805. LazyWrapper.prototype.value = lazyValue;
  17806. // Add chain sequence methods to the `lodash` wrapper.
  17807. lodash.prototype.at = wrapperAt;
  17808. lodash.prototype.chain = wrapperChain;
  17809. lodash.prototype.commit = wrapperCommit;
  17810. lodash.prototype.next = wrapperNext;
  17811. lodash.prototype.plant = wrapperPlant;
  17812. lodash.prototype.reverse = wrapperReverse;
  17813. lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
  17814. // Add lazy aliases.
  17815. lodash.prototype.first = lodash.prototype.head;
  17816. if (symIterator) {
  17817. lodash.prototype[symIterator] = wrapperToIterator;
  17818. }
  17819. return lodash;
  17820. });
  17821. /*--------------------------------------------------------------------------*/
  17822. // Export lodash.
  17823. var _ = runInContext();
  17824. // Some AMD build optimizers, like r.js, check for condition patterns like:
  17825. if (true) {
  17826. // Expose Lodash on the global object to prevent errors when Lodash is
  17827. // loaded by a script tag in the presence of an AMD loader.
  17828. // See http://requirejs.org/docs/errors.html#mismatch for more details.
  17829. // Use `_.noConflict` to remove Lodash from the global object.
  17830. root._ = _;
  17831. // Define as an anonymous module so, through path mapping, it can be
  17832. // referenced as the "underscore" module.
  17833. !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {
  17834. return _;
  17835. }).call(exports, __webpack_require__, exports, module),
  17836. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  17837. }
  17838. // Check for `exports` after `define` in case a build optimizer adds it.
  17839. else {}
  17840. }.call(this));
  17841. /***/ }),
  17842. /***/ "./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":
  17843. /*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  17844. !*** ./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 ***!
  17845. \***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  17846. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17847. "use strict";
  17848. __webpack_require__.r(__webpack_exports__);
  17849. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17850. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17851. /* harmony export */ });
  17852. /* 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");
  17853. /* 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__);
  17854. /* 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");
  17855. var options = {};
  17856. options.insert = "head";
  17857. options.singleton = false;
  17858. 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);
  17859. /* 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 || {});
  17860. /***/ }),
  17861. /***/ "./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":
  17862. /*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  17863. !*** ./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 ***!
  17864. \****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  17865. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17866. "use strict";
  17867. __webpack_require__.r(__webpack_exports__);
  17868. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17869. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17870. /* harmony export */ });
  17871. /* 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");
  17872. /* 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__);
  17873. /* 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");
  17874. var options = {};
  17875. options.insert = "head";
  17876. options.singleton = false;
  17877. 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);
  17878. /* 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 || {});
  17879. /***/ }),
  17880. /***/ "./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":
  17881. /*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  17882. !*** ./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 ***!
  17883. \*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  17884. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17885. "use strict";
  17886. __webpack_require__.r(__webpack_exports__);
  17887. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17888. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17889. /* harmony export */ });
  17890. /* 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");
  17891. /* 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__);
  17892. /* 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");
  17893. var options = {};
  17894. options.insert = "head";
  17895. options.singleton = false;
  17896. 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);
  17897. /* 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 || {});
  17898. /***/ }),
  17899. /***/ "./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":
  17900. /*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  17901. !*** ./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 ***!
  17902. \***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  17903. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17904. "use strict";
  17905. __webpack_require__.r(__webpack_exports__);
  17906. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17907. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17908. /* harmony export */ });
  17909. /* 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");
  17910. /* 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__);
  17911. /* 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");
  17912. var options = {};
  17913. options.insert = "head";
  17914. options.singleton = false;
  17915. 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);
  17916. /* 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 || {});
  17917. /***/ }),
  17918. /***/ "./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":
  17919. /*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  17920. !*** ./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 ***!
  17921. \******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  17922. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17923. "use strict";
  17924. __webpack_require__.r(__webpack_exports__);
  17925. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17926. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17927. /* harmony export */ });
  17928. /* 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");
  17929. /* 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__);
  17930. /* 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");
  17931. var options = {};
  17932. options.insert = "head";
  17933. options.singleton = false;
  17934. 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);
  17935. /* 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 || {});
  17936. /***/ }),
  17937. /***/ "./node_modules/vue-loader/dist/exportHelper.js":
  17938. /*!******************************************************!*\
  17939. !*** ./node_modules/vue-loader/dist/exportHelper.js ***!
  17940. \******************************************************/
  17941. /***/ ((__unused_webpack_module, exports) => {
  17942. "use strict";
  17943. Object.defineProperty(exports, "__esModule", ({ value: true }));
  17944. // runtime helper for setting properties on components
  17945. // in a tree-shakable way
  17946. exports["default"] = (sfc, props) => {
  17947. const target = sfc.__vccOpts || sfc;
  17948. for (const [key, val] of props) {
  17949. target[key] = val;
  17950. }
  17951. return target;
  17952. };
  17953. /***/ }),
  17954. /***/ "./resources/js/components/AppDropdown.vue":
  17955. /*!*************************************************!*\
  17956. !*** ./resources/js/components/AppDropdown.vue ***!
  17957. \*************************************************/
  17958. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17959. "use strict";
  17960. __webpack_require__.r(__webpack_exports__);
  17961. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17962. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17963. /* harmony export */ });
  17964. /* harmony import */ var _AppDropdown_vue_vue_type_template_id_ce0d1992__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AppDropdown.vue?vue&type=template&id=ce0d1992 */ "./resources/js/components/AppDropdown.vue?vue&type=template&id=ce0d1992");
  17965. /* harmony import */ var _AppDropdown_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AppDropdown.vue?vue&type=script&setup=true&lang=js */ "./resources/js/components/AppDropdown.vue?vue&type=script&setup=true&lang=js");
  17966. /* 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");
  17967. ;
  17968. 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"])(_AppDropdown_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_AppDropdown_vue_vue_type_template_id_ce0d1992__WEBPACK_IMPORTED_MODULE_0__.render],['__file',"resources/js/components/AppDropdown.vue"]])
  17969. /* hot reload */
  17970. if (false) {}
  17971. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17972. /***/ }),
  17973. /***/ "./resources/js/components/AppFooter.vue":
  17974. /*!***********************************************!*\
  17975. !*** ./resources/js/components/AppFooter.vue ***!
  17976. \***********************************************/
  17977. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17978. "use strict";
  17979. __webpack_require__.r(__webpack_exports__);
  17980. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17981. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17982. /* harmony export */ });
  17983. /* 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");
  17984. /* 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");
  17985. /* 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");
  17986. const script = {}
  17987. ;
  17988. 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"]])
  17989. /* hot reload */
  17990. if (false) {}
  17991. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17992. /***/ }),
  17993. /***/ "./resources/js/components/AppInputText.vue":
  17994. /*!**************************************************!*\
  17995. !*** ./resources/js/components/AppInputText.vue ***!
  17996. \**************************************************/
  17997. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17998. "use strict";
  17999. __webpack_require__.r(__webpack_exports__);
  18000. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18001. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  18002. /* harmony export */ });
  18003. /* harmony import */ var _AppInputText_vue_vue_type_template_id_16729fe1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AppInputText.vue?vue&type=template&id=16729fe1 */ "./resources/js/components/AppInputText.vue?vue&type=template&id=16729fe1");
  18004. /* harmony import */ var _AppInputText_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AppInputText.vue?vue&type=script&setup=true&lang=js */ "./resources/js/components/AppInputText.vue?vue&type=script&setup=true&lang=js");
  18005. /* 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");
  18006. ;
  18007. 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"])(_AppInputText_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_AppInputText_vue_vue_type_template_id_16729fe1__WEBPACK_IMPORTED_MODULE_0__.render],['__file',"resources/js/components/AppInputText.vue"]])
  18008. /* hot reload */
  18009. if (false) {}
  18010. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  18011. /***/ }),
  18012. /***/ "./resources/js/components/AppMessage.vue":
  18013. /*!************************************************!*\
  18014. !*** ./resources/js/components/AppMessage.vue ***!
  18015. \************************************************/
  18016. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18017. "use strict";
  18018. __webpack_require__.r(__webpack_exports__);
  18019. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18020. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  18021. /* harmony export */ });
  18022. /* 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");
  18023. /* 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");
  18024. /* 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");
  18025. ;
  18026. 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"]])
  18027. /* hot reload */
  18028. if (false) {}
  18029. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  18030. /***/ }),
  18031. /***/ "./resources/js/components/AppSidebar.vue":
  18032. /*!************************************************!*\
  18033. !*** ./resources/js/components/AppSidebar.vue ***!
  18034. \************************************************/
  18035. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18036. "use strict";
  18037. __webpack_require__.r(__webpack_exports__);
  18038. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18039. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  18040. /* harmony export */ });
  18041. /* 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");
  18042. /* 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");
  18043. /* 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");
  18044. /* 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");
  18045. ;
  18046. 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"]])
  18047. /* hot reload */
  18048. if (false) {}
  18049. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  18050. /***/ }),
  18051. /***/ "./resources/js/components/AppSubSidebar.vue":
  18052. /*!***************************************************!*\
  18053. !*** ./resources/js/components/AppSubSidebar.vue ***!
  18054. \***************************************************/
  18055. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18056. "use strict";
  18057. __webpack_require__.r(__webpack_exports__);
  18058. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18059. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  18060. /* harmony export */ });
  18061. /* 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");
  18062. /* 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");
  18063. /* 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");
  18064. /* 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");
  18065. ;
  18066. 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"]])
  18067. /* hot reload */
  18068. if (false) {}
  18069. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  18070. /***/ }),
  18071. /***/ "./resources/js/components/AppTopBar.vue":
  18072. /*!***********************************************!*\
  18073. !*** ./resources/js/components/AppTopBar.vue ***!
  18074. \***********************************************/
  18075. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18076. "use strict";
  18077. __webpack_require__.r(__webpack_exports__);
  18078. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18079. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  18080. /* harmony export */ });
  18081. /* 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");
  18082. /* 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");
  18083. /* 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");
  18084. /* 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");
  18085. ;
  18086. 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"]])
  18087. /* hot reload */
  18088. if (false) {}
  18089. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  18090. /***/ }),
  18091. /***/ "./resources/js/layouts/DashboardLayout.vue":
  18092. /*!**************************************************!*\
  18093. !*** ./resources/js/layouts/DashboardLayout.vue ***!
  18094. \**************************************************/
  18095. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18096. "use strict";
  18097. __webpack_require__.r(__webpack_exports__);
  18098. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18099. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  18100. /* harmony export */ });
  18101. /* 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");
  18102. /* 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");
  18103. /* 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");
  18104. /* 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");
  18105. ;
  18106. 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"]])
  18107. /* hot reload */
  18108. if (false) {}
  18109. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  18110. /***/ }),
  18111. /***/ "./resources/js/pages/member/Edit.vue":
  18112. /*!********************************************!*\
  18113. !*** ./resources/js/pages/member/Edit.vue ***!
  18114. \********************************************/
  18115. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18116. "use strict";
  18117. __webpack_require__.r(__webpack_exports__);
  18118. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18119. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  18120. /* harmony export */ });
  18121. /* harmony import */ var _Edit_vue_vue_type_template_id_1a9fb226__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Edit.vue?vue&type=template&id=1a9fb226 */ "./resources/js/pages/member/Edit.vue?vue&type=template&id=1a9fb226");
  18122. /* harmony import */ var _Edit_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Edit.vue?vue&type=script&setup=true&lang=js */ "./resources/js/pages/member/Edit.vue?vue&type=script&setup=true&lang=js");
  18123. /* 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");
  18124. ;
  18125. 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"])(_Edit_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_Edit_vue_vue_type_template_id_1a9fb226__WEBPACK_IMPORTED_MODULE_0__.render],['__file',"resources/js/pages/member/Edit.vue"]])
  18126. /* hot reload */
  18127. if (false) {}
  18128. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  18129. /***/ }),
  18130. /***/ "./resources/js/components/AppDropdown.vue?vue&type=script&setup=true&lang=js":
  18131. /*!************************************************************************************!*\
  18132. !*** ./resources/js/components/AppDropdown.vue?vue&type=script&setup=true&lang=js ***!
  18133. \************************************************************************************/
  18134. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18135. "use strict";
  18136. __webpack_require__.r(__webpack_exports__);
  18137. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18138. /* 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_AppDropdown_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
  18139. /* harmony export */ });
  18140. /* 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_AppDropdown_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]!./AppDropdown.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/AppDropdown.vue?vue&type=script&setup=true&lang=js");
  18141. /***/ }),
  18142. /***/ "./resources/js/components/AppInputText.vue?vue&type=script&setup=true&lang=js":
  18143. /*!*************************************************************************************!*\
  18144. !*** ./resources/js/components/AppInputText.vue?vue&type=script&setup=true&lang=js ***!
  18145. \*************************************************************************************/
  18146. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18147. "use strict";
  18148. __webpack_require__.r(__webpack_exports__);
  18149. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18150. /* 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_AppInputText_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
  18151. /* harmony export */ });
  18152. /* 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_AppInputText_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]!./AppInputText.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/AppInputText.vue?vue&type=script&setup=true&lang=js");
  18153. /***/ }),
  18154. /***/ "./resources/js/components/AppMessage.vue?vue&type=script&setup=true&lang=js":
  18155. /*!***********************************************************************************!*\
  18156. !*** ./resources/js/components/AppMessage.vue?vue&type=script&setup=true&lang=js ***!
  18157. \***********************************************************************************/
  18158. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18159. "use strict";
  18160. __webpack_require__.r(__webpack_exports__);
  18161. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18162. /* 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"])
  18163. /* harmony export */ });
  18164. /* 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");
  18165. /***/ }),
  18166. /***/ "./resources/js/components/AppSidebar.vue?vue&type=script&setup=true&lang=js":
  18167. /*!***********************************************************************************!*\
  18168. !*** ./resources/js/components/AppSidebar.vue?vue&type=script&setup=true&lang=js ***!
  18169. \***********************************************************************************/
  18170. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18171. "use strict";
  18172. __webpack_require__.r(__webpack_exports__);
  18173. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18174. /* 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"])
  18175. /* harmony export */ });
  18176. /* 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");
  18177. /***/ }),
  18178. /***/ "./resources/js/components/AppSubSidebar.vue?vue&type=script&setup=true&lang=js":
  18179. /*!**************************************************************************************!*\
  18180. !*** ./resources/js/components/AppSubSidebar.vue?vue&type=script&setup=true&lang=js ***!
  18181. \**************************************************************************************/
  18182. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18183. "use strict";
  18184. __webpack_require__.r(__webpack_exports__);
  18185. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18186. /* 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"])
  18187. /* harmony export */ });
  18188. /* 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");
  18189. /***/ }),
  18190. /***/ "./resources/js/components/AppTopBar.vue?vue&type=script&setup=true&lang=js":
  18191. /*!**********************************************************************************!*\
  18192. !*** ./resources/js/components/AppTopBar.vue?vue&type=script&setup=true&lang=js ***!
  18193. \**********************************************************************************/
  18194. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18195. "use strict";
  18196. __webpack_require__.r(__webpack_exports__);
  18197. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18198. /* 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"])
  18199. /* harmony export */ });
  18200. /* 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");
  18201. /***/ }),
  18202. /***/ "./resources/js/layouts/DashboardLayout.vue?vue&type=script&setup=true&lang=js":
  18203. /*!*************************************************************************************!*\
  18204. !*** ./resources/js/layouts/DashboardLayout.vue?vue&type=script&setup=true&lang=js ***!
  18205. \*************************************************************************************/
  18206. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18207. "use strict";
  18208. __webpack_require__.r(__webpack_exports__);
  18209. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18210. /* 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"])
  18211. /* harmony export */ });
  18212. /* 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");
  18213. /***/ }),
  18214. /***/ "./resources/js/pages/member/Edit.vue?vue&type=script&setup=true&lang=js":
  18215. /*!*******************************************************************************!*\
  18216. !*** ./resources/js/pages/member/Edit.vue?vue&type=script&setup=true&lang=js ***!
  18217. \*******************************************************************************/
  18218. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18219. "use strict";
  18220. __webpack_require__.r(__webpack_exports__);
  18221. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18222. /* 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_Edit_vue_vue_type_script_setup_true_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"])
  18223. /* harmony export */ });
  18224. /* 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_Edit_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]!./Edit.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/member/Edit.vue?vue&type=script&setup=true&lang=js");
  18225. /***/ }),
  18226. /***/ "./resources/js/components/AppDropdown.vue?vue&type=template&id=ce0d1992":
  18227. /*!*******************************************************************************!*\
  18228. !*** ./resources/js/components/AppDropdown.vue?vue&type=template&id=ce0d1992 ***!
  18229. \*******************************************************************************/
  18230. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18231. "use strict";
  18232. __webpack_require__.r(__webpack_exports__);
  18233. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18234. /* 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_AppDropdown_vue_vue_type_template_id_ce0d1992__WEBPACK_IMPORTED_MODULE_0__.render)
  18235. /* harmony export */ });
  18236. /* 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_AppDropdown_vue_vue_type_template_id_ce0d1992__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]!./AppDropdown.vue?vue&type=template&id=ce0d1992 */ "./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/AppDropdown.vue?vue&type=template&id=ce0d1992");
  18237. /***/ }),
  18238. /***/ "./resources/js/components/AppFooter.vue?vue&type=template&id=4ab6097e&scoped=true":
  18239. /*!*****************************************************************************************!*\
  18240. !*** ./resources/js/components/AppFooter.vue?vue&type=template&id=4ab6097e&scoped=true ***!
  18241. \*****************************************************************************************/
  18242. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18243. "use strict";
  18244. __webpack_require__.r(__webpack_exports__);
  18245. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18246. /* 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)
  18247. /* harmony export */ });
  18248. /* 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");
  18249. /***/ }),
  18250. /***/ "./resources/js/components/AppInputText.vue?vue&type=template&id=16729fe1":
  18251. /*!********************************************************************************!*\
  18252. !*** ./resources/js/components/AppInputText.vue?vue&type=template&id=16729fe1 ***!
  18253. \********************************************************************************/
  18254. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18255. "use strict";
  18256. __webpack_require__.r(__webpack_exports__);
  18257. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18258. /* 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_AppInputText_vue_vue_type_template_id_16729fe1__WEBPACK_IMPORTED_MODULE_0__.render)
  18259. /* harmony export */ });
  18260. /* 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_AppInputText_vue_vue_type_template_id_16729fe1__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]!./AppInputText.vue?vue&type=template&id=16729fe1 */ "./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/AppInputText.vue?vue&type=template&id=16729fe1");
  18261. /***/ }),
  18262. /***/ "./resources/js/components/AppMessage.vue?vue&type=template&id=07159051":
  18263. /*!******************************************************************************!*\
  18264. !*** ./resources/js/components/AppMessage.vue?vue&type=template&id=07159051 ***!
  18265. \******************************************************************************/
  18266. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18267. "use strict";
  18268. __webpack_require__.r(__webpack_exports__);
  18269. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18270. /* 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)
  18271. /* harmony export */ });
  18272. /* 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");
  18273. /***/ }),
  18274. /***/ "./resources/js/components/AppSidebar.vue?vue&type=template&id=22a4e926&scoped=true":
  18275. /*!******************************************************************************************!*\
  18276. !*** ./resources/js/components/AppSidebar.vue?vue&type=template&id=22a4e926&scoped=true ***!
  18277. \******************************************************************************************/
  18278. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18279. "use strict";
  18280. __webpack_require__.r(__webpack_exports__);
  18281. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18282. /* 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)
  18283. /* harmony export */ });
  18284. /* 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");
  18285. /***/ }),
  18286. /***/ "./resources/js/components/AppSubSidebar.vue?vue&type=template&id=0addd9bc&scoped=true":
  18287. /*!*********************************************************************************************!*\
  18288. !*** ./resources/js/components/AppSubSidebar.vue?vue&type=template&id=0addd9bc&scoped=true ***!
  18289. \*********************************************************************************************/
  18290. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18291. "use strict";
  18292. __webpack_require__.r(__webpack_exports__);
  18293. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18294. /* 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)
  18295. /* harmony export */ });
  18296. /* 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");
  18297. /***/ }),
  18298. /***/ "./resources/js/components/AppTopBar.vue?vue&type=template&id=42bf62a4&scoped=true":
  18299. /*!*****************************************************************************************!*\
  18300. !*** ./resources/js/components/AppTopBar.vue?vue&type=template&id=42bf62a4&scoped=true ***!
  18301. \*****************************************************************************************/
  18302. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18303. "use strict";
  18304. __webpack_require__.r(__webpack_exports__);
  18305. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18306. /* 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)
  18307. /* harmony export */ });
  18308. /* 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");
  18309. /***/ }),
  18310. /***/ "./resources/js/layouts/DashboardLayout.vue?vue&type=template&id=549bf5ac&scoped=true":
  18311. /*!********************************************************************************************!*\
  18312. !*** ./resources/js/layouts/DashboardLayout.vue?vue&type=template&id=549bf5ac&scoped=true ***!
  18313. \********************************************************************************************/
  18314. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18315. "use strict";
  18316. __webpack_require__.r(__webpack_exports__);
  18317. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18318. /* 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)
  18319. /* harmony export */ });
  18320. /* 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");
  18321. /***/ }),
  18322. /***/ "./resources/js/pages/member/Edit.vue?vue&type=template&id=1a9fb226":
  18323. /*!**************************************************************************!*\
  18324. !*** ./resources/js/pages/member/Edit.vue?vue&type=template&id=1a9fb226 ***!
  18325. \**************************************************************************/
  18326. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18327. "use strict";
  18328. __webpack_require__.r(__webpack_exports__);
  18329. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18330. /* 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_Edit_vue_vue_type_template_id_1a9fb226__WEBPACK_IMPORTED_MODULE_0__.render)
  18331. /* harmony export */ });
  18332. /* 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_Edit_vue_vue_type_template_id_1a9fb226__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]!./Edit.vue?vue&type=template&id=1a9fb226 */ "./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/member/Edit.vue?vue&type=template&id=1a9fb226");
  18333. /***/ }),
  18334. /***/ "./resources/js/components/AppFooter.vue?vue&type=style&index=0&id=4ab6097e&lang=scss&scoped=true":
  18335. /*!********************************************************************************************************!*\
  18336. !*** ./resources/js/components/AppFooter.vue?vue&type=style&index=0&id=4ab6097e&lang=scss&scoped=true ***!
  18337. \********************************************************************************************************/
  18338. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18339. "use strict";
  18340. __webpack_require__.r(__webpack_exports__);
  18341. /* 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");
  18342. /***/ }),
  18343. /***/ "./resources/js/components/AppSidebar.vue?vue&type=style&index=0&id=22a4e926&lang=scss&scoped=true":
  18344. /*!*********************************************************************************************************!*\
  18345. !*** ./resources/js/components/AppSidebar.vue?vue&type=style&index=0&id=22a4e926&lang=scss&scoped=true ***!
  18346. \*********************************************************************************************************/
  18347. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18348. "use strict";
  18349. __webpack_require__.r(__webpack_exports__);
  18350. /* 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");
  18351. /***/ }),
  18352. /***/ "./resources/js/components/AppSubSidebar.vue?vue&type=style&index=0&id=0addd9bc&lang=scss&scoped=true":
  18353. /*!************************************************************************************************************!*\
  18354. !*** ./resources/js/components/AppSubSidebar.vue?vue&type=style&index=0&id=0addd9bc&lang=scss&scoped=true ***!
  18355. \************************************************************************************************************/
  18356. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18357. "use strict";
  18358. __webpack_require__.r(__webpack_exports__);
  18359. /* 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");
  18360. /***/ }),
  18361. /***/ "./resources/js/components/AppTopBar.vue?vue&type=style&index=0&id=42bf62a4&lang=scss&scoped=true":
  18362. /*!********************************************************************************************************!*\
  18363. !*** ./resources/js/components/AppTopBar.vue?vue&type=style&index=0&id=42bf62a4&lang=scss&scoped=true ***!
  18364. \********************************************************************************************************/
  18365. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18366. "use strict";
  18367. __webpack_require__.r(__webpack_exports__);
  18368. /* 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");
  18369. /***/ }),
  18370. /***/ "./resources/js/layouts/DashboardLayout.vue?vue&type=style&index=0&id=549bf5ac&lang=scss&scoped=true":
  18371. /*!***********************************************************************************************************!*\
  18372. !*** ./resources/js/layouts/DashboardLayout.vue?vue&type=style&index=0&id=549bf5ac&lang=scss&scoped=true ***!
  18373. \***********************************************************************************************************/
  18374. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18375. "use strict";
  18376. __webpack_require__.r(__webpack_exports__);
  18377. /* 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");
  18378. /***/ })
  18379. }]);