resources_js_pages_member_Edit_vue.js 718KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917
  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)(props, form),
  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(props, form) {
  1375. var listVehicle = (0,vue__WEBPACK_IMPORTED_MODULE_0__.reactive)([]);
  1376. (0,vue__WEBPACK_IMPORTED_MODULE_0__.onMounted)(function () {
  1377. if (props.initialVehicles) {
  1378. props.initialVehicles.forEach(function (val) {
  1379. return listVehicle.push(val);
  1380. });
  1381. }
  1382. });
  1383. (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(function () {
  1384. return form.type_member_id;
  1385. }, function () {
  1386. vehicleClear();
  1387. form.reset('plat_number', 'max_vehicle_id');
  1388. _inertiajs_inertia__WEBPACK_IMPORTED_MODULE_1__.Inertia.reload({
  1389. only: ['typeMember'],
  1390. data: {
  1391. id: form.type_member_id
  1392. }
  1393. });
  1394. });
  1395. var vehicleClear = function vehicleClear() {
  1396. listVehicle.splice(0);
  1397. };
  1398. var vehicleOnDelete = function vehicleOnDelete(index) {
  1399. listVehicle.splice(index, 1);
  1400. (0,_inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_2__.usePage)().props.value.errors = {};
  1401. };
  1402. var vehicleAddValidation = function vehicleAddValidation() {
  1403. if (!form.plat_number) {
  1404. throw new _utils_formValidationError__WEBPACK_IMPORTED_MODULE_3__["default"]('Plat kendaraan tidak boleh kosong', 'plat_number');
  1405. }
  1406. if (!form.max_vehicle_id) {
  1407. throw new _utils_formValidationError__WEBPACK_IMPORTED_MODULE_3__["default"]('Tidak boleh kosong', 'max_vehicle_id');
  1408. }
  1409. var platNumberExist = listVehicle.filter(function (vehicle) {
  1410. return vehicle.platNumber === form.plat_number.toUpperCase();
  1411. });
  1412. if (platNumberExist.length) {
  1413. throw new _utils_formValidationError__WEBPACK_IMPORTED_MODULE_3__["default"]('Nomor plat kendaraan tidak boleh sama', 'plat_number');
  1414. }
  1415. var maxVehicles = listVehicle.filter(function (vehicle) {
  1416. return vehicle.maxVehicleId === form.max_vehicle_id;
  1417. });
  1418. if (maxVehicles.length) {
  1419. if (maxVehicles.length + 1 > maxVehicles[0].maxVehicle) {
  1420. throw new _utils_formValidationError__WEBPACK_IMPORTED_MODULE_3__["default"]('Melibihi batas maksimal kendaraan', 'plat_number');
  1421. }
  1422. }
  1423. };
  1424. var vehicleOnAdd = function vehicleOnAdd() {
  1425. try {
  1426. form.clearErrors('plat_number', 'max_vehicle_id');
  1427. vehicleAddValidation();
  1428. var typeVehicle = props.typeMember.maxVehicles.filter(function (maxVehicle) {
  1429. return maxVehicle.value === form.max_vehicle_id;
  1430. })[0];
  1431. listVehicle.push({
  1432. platNumber: form.plat_number.toUpperCase(),
  1433. typeVehicle: typeVehicle.label,
  1434. typeVehicleId: typeVehicle.typeVehicleId,
  1435. maxVehicleId: typeVehicle.value,
  1436. maxVehicle: typeVehicle.maxVehicle
  1437. });
  1438. form.reset('plat_number', 'max_vehicle_id');
  1439. } catch (err) {
  1440. form.setError(err.field, err.message);
  1441. }
  1442. };
  1443. return {
  1444. listVehicle: listVehicle,
  1445. vehicleClear: vehicleClear,
  1446. vehicleOnDelete: vehicleOnDelete,
  1447. vehicleOnAdd: vehicleOnAdd
  1448. };
  1449. }
  1450. /***/ }),
  1451. /***/ "./resources/js/utils/formValidationError.js":
  1452. /*!***************************************************!*\
  1453. !*** ./resources/js/utils/formValidationError.js ***!
  1454. \***************************************************/
  1455. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  1456. "use strict";
  1457. __webpack_require__.r(__webpack_exports__);
  1458. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1459. /* harmony export */ "default": () => (/* binding */ FormValidationError)
  1460. /* harmony export */ });
  1461. 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); }
  1462. 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); } }
  1463. function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  1464. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  1465. 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); }
  1466. 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); }; }
  1467. 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); }
  1468. function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  1469. 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); }
  1470. 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); }
  1471. 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; } }
  1472. function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }
  1473. function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
  1474. function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
  1475. var FormValidationError = /*#__PURE__*/function (_Error) {
  1476. _inherits(FormValidationError, _Error);
  1477. var _super = _createSuper(FormValidationError);
  1478. function FormValidationError(message, field) {
  1479. var _this;
  1480. _classCallCheck(this, FormValidationError);
  1481. _this = _super.call(this, message);
  1482. _this.field = field;
  1483. return _this;
  1484. }
  1485. return _createClass(FormValidationError);
  1486. }( /*#__PURE__*/_wrapNativeSuper(Error));
  1487. /***/ }),
  1488. /***/ "./resources/js/utils/menu.js":
  1489. /*!************************************!*\
  1490. !*** ./resources/js/utils/menu.js ***!
  1491. \************************************/
  1492. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  1493. "use strict";
  1494. __webpack_require__.r(__webpack_exports__);
  1495. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1496. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  1497. /* harmony export */ });
  1498. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  1499. // Admin
  1500. 1: [{
  1501. label: 'Home',
  1502. items: [{
  1503. label: 'Dashboard',
  1504. icon: 'pi pi-home',
  1505. to: '/dashboards',
  1506. component: 'home/Index'
  1507. }]
  1508. }, {
  1509. label: 'Master',
  1510. items: [{
  1511. label: 'User',
  1512. icon: 'pi pi-user',
  1513. to: '/users',
  1514. component: 'user/Index'
  1515. }]
  1516. }],
  1517. // Supervisor
  1518. 2: [{
  1519. label: 'Home',
  1520. items: [{
  1521. label: 'Dashboard',
  1522. icon: 'pi pi-home',
  1523. to: '/dashboards',
  1524. component: 'home/Index'
  1525. }]
  1526. }, {
  1527. label: 'Menu',
  1528. items: [{
  1529. label: 'Pengeluaran',
  1530. icon: 'pi pi-wallet',
  1531. to: '/expenses',
  1532. component: 'expense/Index'
  1533. }, {
  1534. label: 'Laporan',
  1535. icon: 'pi pi-book',
  1536. items: [{
  1537. label: 'Mutasi',
  1538. icon: 'pi pi-circle',
  1539. to: '/reports/mutations',
  1540. component: 'mutation/Report'
  1541. }]
  1542. }]
  1543. }, {
  1544. label: 'Master',
  1545. items: [{
  1546. label: 'Jenis Kendaraan',
  1547. icon: 'pi pi-car',
  1548. to: '/type-vehicles',
  1549. component: 'typevehicle/Index'
  1550. }, {
  1551. label: 'Jenis Member',
  1552. icon: 'pi pi-id-card',
  1553. to: '/type-members',
  1554. component: 'typemember/Index'
  1555. }]
  1556. }, {
  1557. label: 'Pengaturan',
  1558. items: [{
  1559. label: 'Tarif Parkir',
  1560. icon: 'pi pi-car',
  1561. to: '/parking-fees/create',
  1562. component: 'parkingfee/Create'
  1563. }]
  1564. }],
  1565. // Operator
  1566. 3: [{
  1567. label: 'Home',
  1568. items: [{
  1569. label: 'Dashboard',
  1570. icon: 'pi pi-home',
  1571. to: '/dashboards',
  1572. component: 'home/Index'
  1573. }]
  1574. }, {
  1575. label: 'Menu',
  1576. items: [{
  1577. label: 'Pengeluaran',
  1578. icon: 'pi pi-wallet',
  1579. to: '/expenses',
  1580. component: 'expense/Index'
  1581. }, {
  1582. label: 'Member',
  1583. icon: 'pi pi-id-card',
  1584. to: '/members',
  1585. component: 'member/Index'
  1586. }, {
  1587. label: 'Top Up',
  1588. icon: 'pi pi-car',
  1589. to: '/top-ups',
  1590. component: 'topup/Index'
  1591. }]
  1592. }]
  1593. });
  1594. /***/ }),
  1595. /***/ "./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":
  1596. /*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  1597. !*** ./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 ***!
  1598. \***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  1599. /***/ ((module, __webpack_exports__, __webpack_require__) => {
  1600. "use strict";
  1601. __webpack_require__.r(__webpack_exports__);
  1602. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1603. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  1604. /* harmony export */ });
  1605. /* 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");
  1606. /* 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__);
  1607. // Imports
  1608. var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
  1609. // Module
  1610. ___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}", ""]);
  1611. // Exports
  1612. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
  1613. /***/ }),
  1614. /***/ "./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":
  1615. /*!************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  1616. !*** ./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 ***!
  1617. \************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  1618. /***/ ((module, __webpack_exports__, __webpack_require__) => {
  1619. "use strict";
  1620. __webpack_require__.r(__webpack_exports__);
  1621. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1622. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  1623. /* harmony export */ });
  1624. /* 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");
  1625. /* 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__);
  1626. // Imports
  1627. var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
  1628. // Module
  1629. ___CSS_LOADER_EXPORT___.push([module.id, ".layout-menu[data-v-22a4e926] {\n list-style-type: none;\n margin: 0;\n padding: 0;\n}", ""]);
  1630. // Exports
  1631. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
  1632. /***/ }),
  1633. /***/ "./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":
  1634. /*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  1635. !*** ./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 ***!
  1636. \***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  1637. /***/ ((module, __webpack_exports__, __webpack_require__) => {
  1638. "use strict";
  1639. __webpack_require__.r(__webpack_exports__);
  1640. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1641. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  1642. /* harmony export */ });
  1643. /* 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");
  1644. /* 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__);
  1645. // Imports
  1646. var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
  1647. // Module
  1648. ___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}", ""]);
  1649. // Exports
  1650. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
  1651. /***/ }),
  1652. /***/ "./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":
  1653. /*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  1654. !*** ./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 ***!
  1655. \***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  1656. /***/ ((module, __webpack_exports__, __webpack_require__) => {
  1657. "use strict";
  1658. __webpack_require__.r(__webpack_exports__);
  1659. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1660. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  1661. /* harmony export */ });
  1662. /* 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");
  1663. /* 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__);
  1664. // Imports
  1665. var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
  1666. // Module
  1667. ___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}", ""]);
  1668. // Exports
  1669. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
  1670. /***/ }),
  1671. /***/ "./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":
  1672. /*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  1673. !*** ./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 ***!
  1674. \**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  1675. /***/ ((module, __webpack_exports__, __webpack_require__) => {
  1676. "use strict";
  1677. __webpack_require__.r(__webpack_exports__);
  1678. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1679. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  1680. /* harmony export */ });
  1681. /* 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");
  1682. /* 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__);
  1683. // Imports
  1684. var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
  1685. // Module
  1686. ___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}", ""]);
  1687. // Exports
  1688. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
  1689. /***/ }),
  1690. /***/ "./node_modules/lodash/lodash.js":
  1691. /*!***************************************!*\
  1692. !*** ./node_modules/lodash/lodash.js ***!
  1693. \***************************************/
  1694. /***/ (function(module, exports, __webpack_require__) {
  1695. /* module decorator */ module = __webpack_require__.nmd(module);
  1696. var __WEBPACK_AMD_DEFINE_RESULT__;/**
  1697. * @license
  1698. * Lodash <https://lodash.com/>
  1699. * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
  1700. * Released under MIT license <https://lodash.com/license>
  1701. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  1702. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1703. */
  1704. ;(function() {
  1705. /** Used as a safe reference for `undefined` in pre-ES5 environments. */
  1706. var undefined;
  1707. /** Used as the semantic version number. */
  1708. var VERSION = '4.17.21';
  1709. /** Used as the size to enable large array optimizations. */
  1710. var LARGE_ARRAY_SIZE = 200;
  1711. /** Error message constants. */
  1712. var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
  1713. FUNC_ERROR_TEXT = 'Expected a function',
  1714. INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';
  1715. /** Used to stand-in for `undefined` hash values. */
  1716. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  1717. /** Used as the maximum memoize cache size. */
  1718. var MAX_MEMOIZE_SIZE = 500;
  1719. /** Used as the internal argument placeholder. */
  1720. var PLACEHOLDER = '__lodash_placeholder__';
  1721. /** Used to compose bitmasks for cloning. */
  1722. var CLONE_DEEP_FLAG = 1,
  1723. CLONE_FLAT_FLAG = 2,
  1724. CLONE_SYMBOLS_FLAG = 4;
  1725. /** Used to compose bitmasks for value comparisons. */
  1726. var COMPARE_PARTIAL_FLAG = 1,
  1727. COMPARE_UNORDERED_FLAG = 2;
  1728. /** Used to compose bitmasks for function metadata. */
  1729. var WRAP_BIND_FLAG = 1,
  1730. WRAP_BIND_KEY_FLAG = 2,
  1731. WRAP_CURRY_BOUND_FLAG = 4,
  1732. WRAP_CURRY_FLAG = 8,
  1733. WRAP_CURRY_RIGHT_FLAG = 16,
  1734. WRAP_PARTIAL_FLAG = 32,
  1735. WRAP_PARTIAL_RIGHT_FLAG = 64,
  1736. WRAP_ARY_FLAG = 128,
  1737. WRAP_REARG_FLAG = 256,
  1738. WRAP_FLIP_FLAG = 512;
  1739. /** Used as default options for `_.truncate`. */
  1740. var DEFAULT_TRUNC_LENGTH = 30,
  1741. DEFAULT_TRUNC_OMISSION = '...';
  1742. /** Used to detect hot functions by number of calls within a span of milliseconds. */
  1743. var HOT_COUNT = 800,
  1744. HOT_SPAN = 16;
  1745. /** Used to indicate the type of lazy iteratees. */
  1746. var LAZY_FILTER_FLAG = 1,
  1747. LAZY_MAP_FLAG = 2,
  1748. LAZY_WHILE_FLAG = 3;
  1749. /** Used as references for various `Number` constants. */
  1750. var INFINITY = 1 / 0,
  1751. MAX_SAFE_INTEGER = 9007199254740991,
  1752. MAX_INTEGER = 1.7976931348623157e+308,
  1753. NAN = 0 / 0;
  1754. /** Used as references for the maximum length and index of an array. */
  1755. var MAX_ARRAY_LENGTH = 4294967295,
  1756. MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
  1757. HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
  1758. /** Used to associate wrap methods with their bit flags. */
  1759. var wrapFlags = [
  1760. ['ary', WRAP_ARY_FLAG],
  1761. ['bind', WRAP_BIND_FLAG],
  1762. ['bindKey', WRAP_BIND_KEY_FLAG],
  1763. ['curry', WRAP_CURRY_FLAG],
  1764. ['curryRight', WRAP_CURRY_RIGHT_FLAG],
  1765. ['flip', WRAP_FLIP_FLAG],
  1766. ['partial', WRAP_PARTIAL_FLAG],
  1767. ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
  1768. ['rearg', WRAP_REARG_FLAG]
  1769. ];
  1770. /** `Object#toString` result references. */
  1771. var argsTag = '[object Arguments]',
  1772. arrayTag = '[object Array]',
  1773. asyncTag = '[object AsyncFunction]',
  1774. boolTag = '[object Boolean]',
  1775. dateTag = '[object Date]',
  1776. domExcTag = '[object DOMException]',
  1777. errorTag = '[object Error]',
  1778. funcTag = '[object Function]',
  1779. genTag = '[object GeneratorFunction]',
  1780. mapTag = '[object Map]',
  1781. numberTag = '[object Number]',
  1782. nullTag = '[object Null]',
  1783. objectTag = '[object Object]',
  1784. promiseTag = '[object Promise]',
  1785. proxyTag = '[object Proxy]',
  1786. regexpTag = '[object RegExp]',
  1787. setTag = '[object Set]',
  1788. stringTag = '[object String]',
  1789. symbolTag = '[object Symbol]',
  1790. undefinedTag = '[object Undefined]',
  1791. weakMapTag = '[object WeakMap]',
  1792. weakSetTag = '[object WeakSet]';
  1793. var arrayBufferTag = '[object ArrayBuffer]',
  1794. dataViewTag = '[object DataView]',
  1795. float32Tag = '[object Float32Array]',
  1796. float64Tag = '[object Float64Array]',
  1797. int8Tag = '[object Int8Array]',
  1798. int16Tag = '[object Int16Array]',
  1799. int32Tag = '[object Int32Array]',
  1800. uint8Tag = '[object Uint8Array]',
  1801. uint8ClampedTag = '[object Uint8ClampedArray]',
  1802. uint16Tag = '[object Uint16Array]',
  1803. uint32Tag = '[object Uint32Array]';
  1804. /** Used to match empty string literals in compiled template source. */
  1805. var reEmptyStringLeading = /\b__p \+= '';/g,
  1806. reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
  1807. reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
  1808. /** Used to match HTML entities and HTML characters. */
  1809. var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
  1810. reUnescapedHtml = /[&<>"']/g,
  1811. reHasEscapedHtml = RegExp(reEscapedHtml.source),
  1812. reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
  1813. /** Used to match template delimiters. */
  1814. var reEscape = /<%-([\s\S]+?)%>/g,
  1815. reEvaluate = /<%([\s\S]+?)%>/g,
  1816. reInterpolate = /<%=([\s\S]+?)%>/g;
  1817. /** Used to match property names within property paths. */
  1818. var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
  1819. reIsPlainProp = /^\w*$/,
  1820. rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
  1821. /**
  1822. * Used to match `RegExp`
  1823. * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
  1824. */
  1825. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
  1826. reHasRegExpChar = RegExp(reRegExpChar.source);
  1827. /** Used to match leading whitespace. */
  1828. var reTrimStart = /^\s+/;
  1829. /** Used to match a single whitespace character. */
  1830. var reWhitespace = /\s/;
  1831. /** Used to match wrap detail comments. */
  1832. var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
  1833. reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
  1834. reSplitDetails = /,? & /;
  1835. /** Used to match words composed of alphanumeric characters. */
  1836. var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
  1837. /**
  1838. * Used to validate the `validate` option in `_.template` variable.
  1839. *
  1840. * Forbids characters which could potentially change the meaning of the function argument definition:
  1841. * - "()," (modification of function parameters)
  1842. * - "=" (default value)
  1843. * - "[]{}" (destructuring of function parameters)
  1844. * - "/" (beginning of a comment)
  1845. * - whitespace
  1846. */
  1847. var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/;
  1848. /** Used to match backslashes in property paths. */
  1849. var reEscapeChar = /\\(\\)?/g;
  1850. /**
  1851. * Used to match
  1852. * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
  1853. */
  1854. var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
  1855. /** Used to match `RegExp` flags from their coerced string values. */
  1856. var reFlags = /\w*$/;
  1857. /** Used to detect bad signed hexadecimal string values. */
  1858. var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
  1859. /** Used to detect binary string values. */
  1860. var reIsBinary = /^0b[01]+$/i;
  1861. /** Used to detect host constructors (Safari). */
  1862. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  1863. /** Used to detect octal string values. */
  1864. var reIsOctal = /^0o[0-7]+$/i;
  1865. /** Used to detect unsigned integer values. */
  1866. var reIsUint = /^(?:0|[1-9]\d*)$/;
  1867. /** Used to match Latin Unicode letters (excluding mathematical operators). */
  1868. var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
  1869. /** Used to ensure capturing order of template delimiters. */
  1870. var reNoMatch = /($^)/;
  1871. /** Used to match unescaped characters in compiled string literals. */
  1872. var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
  1873. /** Used to compose unicode character classes. */
  1874. var rsAstralRange = '\\ud800-\\udfff',
  1875. rsComboMarksRange = '\\u0300-\\u036f',
  1876. reComboHalfMarksRange = '\\ufe20-\\ufe2f',
  1877. rsComboSymbolsRange = '\\u20d0-\\u20ff',
  1878. rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
  1879. rsDingbatRange = '\\u2700-\\u27bf',
  1880. rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
  1881. rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
  1882. rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
  1883. rsPunctuationRange = '\\u2000-\\u206f',
  1884. 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',
  1885. rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
  1886. rsVarRange = '\\ufe0e\\ufe0f',
  1887. rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
  1888. /** Used to compose unicode capture groups. */
  1889. var rsApos = "['\u2019]",
  1890. rsAstral = '[' + rsAstralRange + ']',
  1891. rsBreak = '[' + rsBreakRange + ']',
  1892. rsCombo = '[' + rsComboRange + ']',
  1893. rsDigits = '\\d+',
  1894. rsDingbat = '[' + rsDingbatRange + ']',
  1895. rsLower = '[' + rsLowerRange + ']',
  1896. rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
  1897. rsFitz = '\\ud83c[\\udffb-\\udfff]',
  1898. rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
  1899. rsNonAstral = '[^' + rsAstralRange + ']',
  1900. rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
  1901. rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
  1902. rsUpper = '[' + rsUpperRange + ']',
  1903. rsZWJ = '\\u200d';
  1904. /** Used to compose unicode regexes. */
  1905. var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
  1906. rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
  1907. rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
  1908. rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
  1909. reOptMod = rsModifier + '?',
  1910. rsOptVar = '[' + rsVarRange + ']?',
  1911. rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
  1912. rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
  1913. rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
  1914. rsSeq = rsOptVar + reOptMod + rsOptJoin,
  1915. rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
  1916. rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
  1917. /** Used to match apostrophes. */
  1918. var reApos = RegExp(rsApos, 'g');
  1919. /**
  1920. * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
  1921. * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
  1922. */
  1923. var reComboMark = RegExp(rsCombo, 'g');
  1924. /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
  1925. var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
  1926. /** Used to match complex or compound words. */
  1927. var reUnicodeWord = RegExp([
  1928. rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
  1929. rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
  1930. rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
  1931. rsUpper + '+' + rsOptContrUpper,
  1932. rsOrdUpper,
  1933. rsOrdLower,
  1934. rsDigits,
  1935. rsEmoji
  1936. ].join('|'), 'g');
  1937. /** 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/). */
  1938. var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
  1939. /** Used to detect strings that need a more robust regexp to match words. */
  1940. 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 ]/;
  1941. /** Used to assign default `context` object properties. */
  1942. var contextProps = [
  1943. 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
  1944. 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
  1945. 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',
  1946. 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
  1947. '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
  1948. ];
  1949. /** Used to make template sourceURLs easier to identify. */
  1950. var templateCounter = -1;
  1951. /** Used to identify `toStringTag` values of typed arrays. */
  1952. var typedArrayTags = {};
  1953. typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
  1954. typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
  1955. typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
  1956. typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
  1957. typedArrayTags[uint32Tag] = true;
  1958. typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
  1959. typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
  1960. typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
  1961. typedArrayTags[errorTag] = typedArrayTags[funcTag] =
  1962. typedArrayTags[mapTag] = typedArrayTags[numberTag] =
  1963. typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
  1964. typedArrayTags[setTag] = typedArrayTags[stringTag] =
  1965. typedArrayTags[weakMapTag] = false;
  1966. /** Used to identify `toStringTag` values supported by `_.clone`. */
  1967. var cloneableTags = {};
  1968. cloneableTags[argsTag] = cloneableTags[arrayTag] =
  1969. cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
  1970. cloneableTags[boolTag] = cloneableTags[dateTag] =
  1971. cloneableTags[float32Tag] = cloneableTags[float64Tag] =
  1972. cloneableTags[int8Tag] = cloneableTags[int16Tag] =
  1973. cloneableTags[int32Tag] = cloneableTags[mapTag] =
  1974. cloneableTags[numberTag] = cloneableTags[objectTag] =
  1975. cloneableTags[regexpTag] = cloneableTags[setTag] =
  1976. cloneableTags[stringTag] = cloneableTags[symbolTag] =
  1977. cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
  1978. cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
  1979. cloneableTags[errorTag] = cloneableTags[funcTag] =
  1980. cloneableTags[weakMapTag] = false;
  1981. /** Used to map Latin Unicode letters to basic Latin letters. */
  1982. var deburredLetters = {
  1983. // Latin-1 Supplement block.
  1984. '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
  1985. '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
  1986. '\xc7': 'C', '\xe7': 'c',
  1987. '\xd0': 'D', '\xf0': 'd',
  1988. '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
  1989. '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
  1990. '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
  1991. '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
  1992. '\xd1': 'N', '\xf1': 'n',
  1993. '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
  1994. '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
  1995. '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
  1996. '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
  1997. '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
  1998. '\xc6': 'Ae', '\xe6': 'ae',
  1999. '\xde': 'Th', '\xfe': 'th',
  2000. '\xdf': 'ss',
  2001. // Latin Extended-A block.
  2002. '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
  2003. '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
  2004. '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
  2005. '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
  2006. '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
  2007. '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
  2008. '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
  2009. '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
  2010. '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
  2011. '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
  2012. '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
  2013. '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
  2014. '\u0134': 'J', '\u0135': 'j',
  2015. '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
  2016. '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
  2017. '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
  2018. '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
  2019. '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
  2020. '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
  2021. '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
  2022. '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
  2023. '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
  2024. '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
  2025. '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
  2026. '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
  2027. '\u0163': 't', '\u0165': 't', '\u0167': 't',
  2028. '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
  2029. '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
  2030. '\u0174': 'W', '\u0175': 'w',
  2031. '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
  2032. '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
  2033. '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
  2034. '\u0132': 'IJ', '\u0133': 'ij',
  2035. '\u0152': 'Oe', '\u0153': 'oe',
  2036. '\u0149': "'n", '\u017f': 's'
  2037. };
  2038. /** Used to map characters to HTML entities. */
  2039. var htmlEscapes = {
  2040. '&': '&amp;',
  2041. '<': '&lt;',
  2042. '>': '&gt;',
  2043. '"': '&quot;',
  2044. "'": '&#39;'
  2045. };
  2046. /** Used to map HTML entities to characters. */
  2047. var htmlUnescapes = {
  2048. '&amp;': '&',
  2049. '&lt;': '<',
  2050. '&gt;': '>',
  2051. '&quot;': '"',
  2052. '&#39;': "'"
  2053. };
  2054. /** Used to escape characters for inclusion in compiled string literals. */
  2055. var stringEscapes = {
  2056. '\\': '\\',
  2057. "'": "'",
  2058. '\n': 'n',
  2059. '\r': 'r',
  2060. '\u2028': 'u2028',
  2061. '\u2029': 'u2029'
  2062. };
  2063. /** Built-in method references without a dependency on `root`. */
  2064. var freeParseFloat = parseFloat,
  2065. freeParseInt = parseInt;
  2066. /** Detect free variable `global` from Node.js. */
  2067. var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g;
  2068. /** Detect free variable `self`. */
  2069. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  2070. /** Used as a reference to the global object. */
  2071. var root = freeGlobal || freeSelf || Function('return this')();
  2072. /** Detect free variable `exports`. */
  2073. var freeExports = true && exports && !exports.nodeType && exports;
  2074. /** Detect free variable `module`. */
  2075. var freeModule = freeExports && "object" == 'object' && module && !module.nodeType && module;
  2076. /** Detect the popular CommonJS extension `module.exports`. */
  2077. var moduleExports = freeModule && freeModule.exports === freeExports;
  2078. /** Detect free variable `process` from Node.js. */
  2079. var freeProcess = moduleExports && freeGlobal.process;
  2080. /** Used to access faster Node.js helpers. */
  2081. var nodeUtil = (function() {
  2082. try {
  2083. // Use `util.types` for Node.js 10+.
  2084. var types = freeModule && freeModule.require && freeModule.require('util').types;
  2085. if (types) {
  2086. return types;
  2087. }
  2088. // Legacy `process.binding('util')` for Node.js < 10.
  2089. return freeProcess && freeProcess.binding && freeProcess.binding('util');
  2090. } catch (e) {}
  2091. }());
  2092. /* Node.js helper references. */
  2093. var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,
  2094. nodeIsDate = nodeUtil && nodeUtil.isDate,
  2095. nodeIsMap = nodeUtil && nodeUtil.isMap,
  2096. nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,
  2097. nodeIsSet = nodeUtil && nodeUtil.isSet,
  2098. nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
  2099. /*--------------------------------------------------------------------------*/
  2100. /**
  2101. * A faster alternative to `Function#apply`, this function invokes `func`
  2102. * with the `this` binding of `thisArg` and the arguments of `args`.
  2103. *
  2104. * @private
  2105. * @param {Function} func The function to invoke.
  2106. * @param {*} thisArg The `this` binding of `func`.
  2107. * @param {Array} args The arguments to invoke `func` with.
  2108. * @returns {*} Returns the result of `func`.
  2109. */
  2110. function apply(func, thisArg, args) {
  2111. switch (args.length) {
  2112. case 0: return func.call(thisArg);
  2113. case 1: return func.call(thisArg, args[0]);
  2114. case 2: return func.call(thisArg, args[0], args[1]);
  2115. case 3: return func.call(thisArg, args[0], args[1], args[2]);
  2116. }
  2117. return func.apply(thisArg, args);
  2118. }
  2119. /**
  2120. * A specialized version of `baseAggregator` for arrays.
  2121. *
  2122. * @private
  2123. * @param {Array} [array] The array to iterate over.
  2124. * @param {Function} setter The function to set `accumulator` values.
  2125. * @param {Function} iteratee The iteratee to transform keys.
  2126. * @param {Object} accumulator The initial aggregated object.
  2127. * @returns {Function} Returns `accumulator`.
  2128. */
  2129. function arrayAggregator(array, setter, iteratee, accumulator) {
  2130. var index = -1,
  2131. length = array == null ? 0 : array.length;
  2132. while (++index < length) {
  2133. var value = array[index];
  2134. setter(accumulator, value, iteratee(value), array);
  2135. }
  2136. return accumulator;
  2137. }
  2138. /**
  2139. * A specialized version of `_.forEach` for arrays without support for
  2140. * iteratee shorthands.
  2141. *
  2142. * @private
  2143. * @param {Array} [array] The array to iterate over.
  2144. * @param {Function} iteratee The function invoked per iteration.
  2145. * @returns {Array} Returns `array`.
  2146. */
  2147. function arrayEach(array, iteratee) {
  2148. var index = -1,
  2149. length = array == null ? 0 : array.length;
  2150. while (++index < length) {
  2151. if (iteratee(array[index], index, array) === false) {
  2152. break;
  2153. }
  2154. }
  2155. return array;
  2156. }
  2157. /**
  2158. * A specialized version of `_.forEachRight` for arrays without support for
  2159. * iteratee shorthands.
  2160. *
  2161. * @private
  2162. * @param {Array} [array] The array to iterate over.
  2163. * @param {Function} iteratee The function invoked per iteration.
  2164. * @returns {Array} Returns `array`.
  2165. */
  2166. function arrayEachRight(array, iteratee) {
  2167. var length = array == null ? 0 : array.length;
  2168. while (length--) {
  2169. if (iteratee(array[length], length, array) === false) {
  2170. break;
  2171. }
  2172. }
  2173. return array;
  2174. }
  2175. /**
  2176. * A specialized version of `_.every` for arrays without support for
  2177. * iteratee shorthands.
  2178. *
  2179. * @private
  2180. * @param {Array} [array] The array to iterate over.
  2181. * @param {Function} predicate The function invoked per iteration.
  2182. * @returns {boolean} Returns `true` if all elements pass the predicate check,
  2183. * else `false`.
  2184. */
  2185. function arrayEvery(array, predicate) {
  2186. var index = -1,
  2187. length = array == null ? 0 : array.length;
  2188. while (++index < length) {
  2189. if (!predicate(array[index], index, array)) {
  2190. return false;
  2191. }
  2192. }
  2193. return true;
  2194. }
  2195. /**
  2196. * A specialized version of `_.filter` for arrays without support for
  2197. * iteratee shorthands.
  2198. *
  2199. * @private
  2200. * @param {Array} [array] The array to iterate over.
  2201. * @param {Function} predicate The function invoked per iteration.
  2202. * @returns {Array} Returns the new filtered array.
  2203. */
  2204. function arrayFilter(array, predicate) {
  2205. var index = -1,
  2206. length = array == null ? 0 : array.length,
  2207. resIndex = 0,
  2208. result = [];
  2209. while (++index < length) {
  2210. var value = array[index];
  2211. if (predicate(value, index, array)) {
  2212. result[resIndex++] = value;
  2213. }
  2214. }
  2215. return result;
  2216. }
  2217. /**
  2218. * A specialized version of `_.includes` for arrays without support for
  2219. * specifying an index to search from.
  2220. *
  2221. * @private
  2222. * @param {Array} [array] The array to inspect.
  2223. * @param {*} target The value to search for.
  2224. * @returns {boolean} Returns `true` if `target` is found, else `false`.
  2225. */
  2226. function arrayIncludes(array, value) {
  2227. var length = array == null ? 0 : array.length;
  2228. return !!length && baseIndexOf(array, value, 0) > -1;
  2229. }
  2230. /**
  2231. * This function is like `arrayIncludes` except that it accepts a comparator.
  2232. *
  2233. * @private
  2234. * @param {Array} [array] The array to inspect.
  2235. * @param {*} target The value to search for.
  2236. * @param {Function} comparator The comparator invoked per element.
  2237. * @returns {boolean} Returns `true` if `target` is found, else `false`.
  2238. */
  2239. function arrayIncludesWith(array, value, comparator) {
  2240. var index = -1,
  2241. length = array == null ? 0 : array.length;
  2242. while (++index < length) {
  2243. if (comparator(value, array[index])) {
  2244. return true;
  2245. }
  2246. }
  2247. return false;
  2248. }
  2249. /**
  2250. * A specialized version of `_.map` for arrays without support for iteratee
  2251. * shorthands.
  2252. *
  2253. * @private
  2254. * @param {Array} [array] The array to iterate over.
  2255. * @param {Function} iteratee The function invoked per iteration.
  2256. * @returns {Array} Returns the new mapped array.
  2257. */
  2258. function arrayMap(array, iteratee) {
  2259. var index = -1,
  2260. length = array == null ? 0 : array.length,
  2261. result = Array(length);
  2262. while (++index < length) {
  2263. result[index] = iteratee(array[index], index, array);
  2264. }
  2265. return result;
  2266. }
  2267. /**
  2268. * Appends the elements of `values` to `array`.
  2269. *
  2270. * @private
  2271. * @param {Array} array The array to modify.
  2272. * @param {Array} values The values to append.
  2273. * @returns {Array} Returns `array`.
  2274. */
  2275. function arrayPush(array, values) {
  2276. var index = -1,
  2277. length = values.length,
  2278. offset = array.length;
  2279. while (++index < length) {
  2280. array[offset + index] = values[index];
  2281. }
  2282. return array;
  2283. }
  2284. /**
  2285. * A specialized version of `_.reduce` for arrays without support for
  2286. * iteratee shorthands.
  2287. *
  2288. * @private
  2289. * @param {Array} [array] The array to iterate over.
  2290. * @param {Function} iteratee The function invoked per iteration.
  2291. * @param {*} [accumulator] The initial value.
  2292. * @param {boolean} [initAccum] Specify using the first element of `array` as
  2293. * the initial value.
  2294. * @returns {*} Returns the accumulated value.
  2295. */
  2296. function arrayReduce(array, iteratee, accumulator, initAccum) {
  2297. var index = -1,
  2298. length = array == null ? 0 : array.length;
  2299. if (initAccum && length) {
  2300. accumulator = array[++index];
  2301. }
  2302. while (++index < length) {
  2303. accumulator = iteratee(accumulator, array[index], index, array);
  2304. }
  2305. return accumulator;
  2306. }
  2307. /**
  2308. * A specialized version of `_.reduceRight` for arrays without support for
  2309. * iteratee shorthands.
  2310. *
  2311. * @private
  2312. * @param {Array} [array] The array to iterate over.
  2313. * @param {Function} iteratee The function invoked per iteration.
  2314. * @param {*} [accumulator] The initial value.
  2315. * @param {boolean} [initAccum] Specify using the last element of `array` as
  2316. * the initial value.
  2317. * @returns {*} Returns the accumulated value.
  2318. */
  2319. function arrayReduceRight(array, iteratee, accumulator, initAccum) {
  2320. var length = array == null ? 0 : array.length;
  2321. if (initAccum && length) {
  2322. accumulator = array[--length];
  2323. }
  2324. while (length--) {
  2325. accumulator = iteratee(accumulator, array[length], length, array);
  2326. }
  2327. return accumulator;
  2328. }
  2329. /**
  2330. * A specialized version of `_.some` for arrays without support for iteratee
  2331. * shorthands.
  2332. *
  2333. * @private
  2334. * @param {Array} [array] The array to iterate over.
  2335. * @param {Function} predicate The function invoked per iteration.
  2336. * @returns {boolean} Returns `true` if any element passes the predicate check,
  2337. * else `false`.
  2338. */
  2339. function arraySome(array, predicate) {
  2340. var index = -1,
  2341. length = array == null ? 0 : array.length;
  2342. while (++index < length) {
  2343. if (predicate(array[index], index, array)) {
  2344. return true;
  2345. }
  2346. }
  2347. return false;
  2348. }
  2349. /**
  2350. * Gets the size of an ASCII `string`.
  2351. *
  2352. * @private
  2353. * @param {string} string The string inspect.
  2354. * @returns {number} Returns the string size.
  2355. */
  2356. var asciiSize = baseProperty('length');
  2357. /**
  2358. * Converts an ASCII `string` to an array.
  2359. *
  2360. * @private
  2361. * @param {string} string The string to convert.
  2362. * @returns {Array} Returns the converted array.
  2363. */
  2364. function asciiToArray(string) {
  2365. return string.split('');
  2366. }
  2367. /**
  2368. * Splits an ASCII `string` into an array of its words.
  2369. *
  2370. * @private
  2371. * @param {string} The string to inspect.
  2372. * @returns {Array} Returns the words of `string`.
  2373. */
  2374. function asciiWords(string) {
  2375. return string.match(reAsciiWord) || [];
  2376. }
  2377. /**
  2378. * The base implementation of methods like `_.findKey` and `_.findLastKey`,
  2379. * without support for iteratee shorthands, which iterates over `collection`
  2380. * using `eachFunc`.
  2381. *
  2382. * @private
  2383. * @param {Array|Object} collection The collection to inspect.
  2384. * @param {Function} predicate The function invoked per iteration.
  2385. * @param {Function} eachFunc The function to iterate over `collection`.
  2386. * @returns {*} Returns the found element or its key, else `undefined`.
  2387. */
  2388. function baseFindKey(collection, predicate, eachFunc) {
  2389. var result;
  2390. eachFunc(collection, function(value, key, collection) {
  2391. if (predicate(value, key, collection)) {
  2392. result = key;
  2393. return false;
  2394. }
  2395. });
  2396. return result;
  2397. }
  2398. /**
  2399. * The base implementation of `_.findIndex` and `_.findLastIndex` without
  2400. * support for iteratee shorthands.
  2401. *
  2402. * @private
  2403. * @param {Array} array The array to inspect.
  2404. * @param {Function} predicate The function invoked per iteration.
  2405. * @param {number} fromIndex The index to search from.
  2406. * @param {boolean} [fromRight] Specify iterating from right to left.
  2407. * @returns {number} Returns the index of the matched value, else `-1`.
  2408. */
  2409. function baseFindIndex(array, predicate, fromIndex, fromRight) {
  2410. var length = array.length,
  2411. index = fromIndex + (fromRight ? 1 : -1);
  2412. while ((fromRight ? index-- : ++index < length)) {
  2413. if (predicate(array[index], index, array)) {
  2414. return index;
  2415. }
  2416. }
  2417. return -1;
  2418. }
  2419. /**
  2420. * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
  2421. *
  2422. * @private
  2423. * @param {Array} array The array to inspect.
  2424. * @param {*} value The value to search for.
  2425. * @param {number} fromIndex The index to search from.
  2426. * @returns {number} Returns the index of the matched value, else `-1`.
  2427. */
  2428. function baseIndexOf(array, value, fromIndex) {
  2429. return value === value
  2430. ? strictIndexOf(array, value, fromIndex)
  2431. : baseFindIndex(array, baseIsNaN, fromIndex);
  2432. }
  2433. /**
  2434. * This function is like `baseIndexOf` except that it accepts a comparator.
  2435. *
  2436. * @private
  2437. * @param {Array} array The array to inspect.
  2438. * @param {*} value The value to search for.
  2439. * @param {number} fromIndex The index to search from.
  2440. * @param {Function} comparator The comparator invoked per element.
  2441. * @returns {number} Returns the index of the matched value, else `-1`.
  2442. */
  2443. function baseIndexOfWith(array, value, fromIndex, comparator) {
  2444. var index = fromIndex - 1,
  2445. length = array.length;
  2446. while (++index < length) {
  2447. if (comparator(array[index], value)) {
  2448. return index;
  2449. }
  2450. }
  2451. return -1;
  2452. }
  2453. /**
  2454. * The base implementation of `_.isNaN` without support for number objects.
  2455. *
  2456. * @private
  2457. * @param {*} value The value to check.
  2458. * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
  2459. */
  2460. function baseIsNaN(value) {
  2461. return value !== value;
  2462. }
  2463. /**
  2464. * The base implementation of `_.mean` and `_.meanBy` without support for
  2465. * iteratee shorthands.
  2466. *
  2467. * @private
  2468. * @param {Array} array The array to iterate over.
  2469. * @param {Function} iteratee The function invoked per iteration.
  2470. * @returns {number} Returns the mean.
  2471. */
  2472. function baseMean(array, iteratee) {
  2473. var length = array == null ? 0 : array.length;
  2474. return length ? (baseSum(array, iteratee) / length) : NAN;
  2475. }
  2476. /**
  2477. * The base implementation of `_.property` without support for deep paths.
  2478. *
  2479. * @private
  2480. * @param {string} key The key of the property to get.
  2481. * @returns {Function} Returns the new accessor function.
  2482. */
  2483. function baseProperty(key) {
  2484. return function(object) {
  2485. return object == null ? undefined : object[key];
  2486. };
  2487. }
  2488. /**
  2489. * The base implementation of `_.propertyOf` without support for deep paths.
  2490. *
  2491. * @private
  2492. * @param {Object} object The object to query.
  2493. * @returns {Function} Returns the new accessor function.
  2494. */
  2495. function basePropertyOf(object) {
  2496. return function(key) {
  2497. return object == null ? undefined : object[key];
  2498. };
  2499. }
  2500. /**
  2501. * The base implementation of `_.reduce` and `_.reduceRight`, without support
  2502. * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
  2503. *
  2504. * @private
  2505. * @param {Array|Object} collection The collection to iterate over.
  2506. * @param {Function} iteratee The function invoked per iteration.
  2507. * @param {*} accumulator The initial value.
  2508. * @param {boolean} initAccum Specify using the first or last element of
  2509. * `collection` as the initial value.
  2510. * @param {Function} eachFunc The function to iterate over `collection`.
  2511. * @returns {*} Returns the accumulated value.
  2512. */
  2513. function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
  2514. eachFunc(collection, function(value, index, collection) {
  2515. accumulator = initAccum
  2516. ? (initAccum = false, value)
  2517. : iteratee(accumulator, value, index, collection);
  2518. });
  2519. return accumulator;
  2520. }
  2521. /**
  2522. * The base implementation of `_.sortBy` which uses `comparer` to define the
  2523. * sort order of `array` and replaces criteria objects with their corresponding
  2524. * values.
  2525. *
  2526. * @private
  2527. * @param {Array} array The array to sort.
  2528. * @param {Function} comparer The function to define sort order.
  2529. * @returns {Array} Returns `array`.
  2530. */
  2531. function baseSortBy(array, comparer) {
  2532. var length = array.length;
  2533. array.sort(comparer);
  2534. while (length--) {
  2535. array[length] = array[length].value;
  2536. }
  2537. return array;
  2538. }
  2539. /**
  2540. * The base implementation of `_.sum` and `_.sumBy` without support for
  2541. * iteratee shorthands.
  2542. *
  2543. * @private
  2544. * @param {Array} array The array to iterate over.
  2545. * @param {Function} iteratee The function invoked per iteration.
  2546. * @returns {number} Returns the sum.
  2547. */
  2548. function baseSum(array, iteratee) {
  2549. var result,
  2550. index = -1,
  2551. length = array.length;
  2552. while (++index < length) {
  2553. var current = iteratee(array[index]);
  2554. if (current !== undefined) {
  2555. result = result === undefined ? current : (result + current);
  2556. }
  2557. }
  2558. return result;
  2559. }
  2560. /**
  2561. * The base implementation of `_.times` without support for iteratee shorthands
  2562. * or max array length checks.
  2563. *
  2564. * @private
  2565. * @param {number} n The number of times to invoke `iteratee`.
  2566. * @param {Function} iteratee The function invoked per iteration.
  2567. * @returns {Array} Returns the array of results.
  2568. */
  2569. function baseTimes(n, iteratee) {
  2570. var index = -1,
  2571. result = Array(n);
  2572. while (++index < n) {
  2573. result[index] = iteratee(index);
  2574. }
  2575. return result;
  2576. }
  2577. /**
  2578. * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
  2579. * of key-value pairs for `object` corresponding to the property names of `props`.
  2580. *
  2581. * @private
  2582. * @param {Object} object The object to query.
  2583. * @param {Array} props The property names to get values for.
  2584. * @returns {Object} Returns the key-value pairs.
  2585. */
  2586. function baseToPairs(object, props) {
  2587. return arrayMap(props, function(key) {
  2588. return [key, object[key]];
  2589. });
  2590. }
  2591. /**
  2592. * The base implementation of `_.trim`.
  2593. *
  2594. * @private
  2595. * @param {string} string The string to trim.
  2596. * @returns {string} Returns the trimmed string.
  2597. */
  2598. function baseTrim(string) {
  2599. return string
  2600. ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
  2601. : string;
  2602. }
  2603. /**
  2604. * The base implementation of `_.unary` without support for storing metadata.
  2605. *
  2606. * @private
  2607. * @param {Function} func The function to cap arguments for.
  2608. * @returns {Function} Returns the new capped function.
  2609. */
  2610. function baseUnary(func) {
  2611. return function(value) {
  2612. return func(value);
  2613. };
  2614. }
  2615. /**
  2616. * The base implementation of `_.values` and `_.valuesIn` which creates an
  2617. * array of `object` property values corresponding to the property names
  2618. * of `props`.
  2619. *
  2620. * @private
  2621. * @param {Object} object The object to query.
  2622. * @param {Array} props The property names to get values for.
  2623. * @returns {Object} Returns the array of property values.
  2624. */
  2625. function baseValues(object, props) {
  2626. return arrayMap(props, function(key) {
  2627. return object[key];
  2628. });
  2629. }
  2630. /**
  2631. * Checks if a `cache` value for `key` exists.
  2632. *
  2633. * @private
  2634. * @param {Object} cache The cache to query.
  2635. * @param {string} key The key of the entry to check.
  2636. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  2637. */
  2638. function cacheHas(cache, key) {
  2639. return cache.has(key);
  2640. }
  2641. /**
  2642. * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
  2643. * that is not found in the character symbols.
  2644. *
  2645. * @private
  2646. * @param {Array} strSymbols The string symbols to inspect.
  2647. * @param {Array} chrSymbols The character symbols to find.
  2648. * @returns {number} Returns the index of the first unmatched string symbol.
  2649. */
  2650. function charsStartIndex(strSymbols, chrSymbols) {
  2651. var index = -1,
  2652. length = strSymbols.length;
  2653. while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
  2654. return index;
  2655. }
  2656. /**
  2657. * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
  2658. * that is not found in the character symbols.
  2659. *
  2660. * @private
  2661. * @param {Array} strSymbols The string symbols to inspect.
  2662. * @param {Array} chrSymbols The character symbols to find.
  2663. * @returns {number} Returns the index of the last unmatched string symbol.
  2664. */
  2665. function charsEndIndex(strSymbols, chrSymbols) {
  2666. var index = strSymbols.length;
  2667. while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
  2668. return index;
  2669. }
  2670. /**
  2671. * Gets the number of `placeholder` occurrences in `array`.
  2672. *
  2673. * @private
  2674. * @param {Array} array The array to inspect.
  2675. * @param {*} placeholder The placeholder to search for.
  2676. * @returns {number} Returns the placeholder count.
  2677. */
  2678. function countHolders(array, placeholder) {
  2679. var length = array.length,
  2680. result = 0;
  2681. while (length--) {
  2682. if (array[length] === placeholder) {
  2683. ++result;
  2684. }
  2685. }
  2686. return result;
  2687. }
  2688. /**
  2689. * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
  2690. * letters to basic Latin letters.
  2691. *
  2692. * @private
  2693. * @param {string} letter The matched letter to deburr.
  2694. * @returns {string} Returns the deburred letter.
  2695. */
  2696. var deburrLetter = basePropertyOf(deburredLetters);
  2697. /**
  2698. * Used by `_.escape` to convert characters to HTML entities.
  2699. *
  2700. * @private
  2701. * @param {string} chr The matched character to escape.
  2702. * @returns {string} Returns the escaped character.
  2703. */
  2704. var escapeHtmlChar = basePropertyOf(htmlEscapes);
  2705. /**
  2706. * Used by `_.template` to escape characters for inclusion in compiled string literals.
  2707. *
  2708. * @private
  2709. * @param {string} chr The matched character to escape.
  2710. * @returns {string} Returns the escaped character.
  2711. */
  2712. function escapeStringChar(chr) {
  2713. return '\\' + stringEscapes[chr];
  2714. }
  2715. /**
  2716. * Gets the value at `key` of `object`.
  2717. *
  2718. * @private
  2719. * @param {Object} [object] The object to query.
  2720. * @param {string} key The key of the property to get.
  2721. * @returns {*} Returns the property value.
  2722. */
  2723. function getValue(object, key) {
  2724. return object == null ? undefined : object[key];
  2725. }
  2726. /**
  2727. * Checks if `string` contains Unicode symbols.
  2728. *
  2729. * @private
  2730. * @param {string} string The string to inspect.
  2731. * @returns {boolean} Returns `true` if a symbol is found, else `false`.
  2732. */
  2733. function hasUnicode(string) {
  2734. return reHasUnicode.test(string);
  2735. }
  2736. /**
  2737. * Checks if `string` contains a word composed of Unicode symbols.
  2738. *
  2739. * @private
  2740. * @param {string} string The string to inspect.
  2741. * @returns {boolean} Returns `true` if a word is found, else `false`.
  2742. */
  2743. function hasUnicodeWord(string) {
  2744. return reHasUnicodeWord.test(string);
  2745. }
  2746. /**
  2747. * Converts `iterator` to an array.
  2748. *
  2749. * @private
  2750. * @param {Object} iterator The iterator to convert.
  2751. * @returns {Array} Returns the converted array.
  2752. */
  2753. function iteratorToArray(iterator) {
  2754. var data,
  2755. result = [];
  2756. while (!(data = iterator.next()).done) {
  2757. result.push(data.value);
  2758. }
  2759. return result;
  2760. }
  2761. /**
  2762. * Converts `map` to its key-value pairs.
  2763. *
  2764. * @private
  2765. * @param {Object} map The map to convert.
  2766. * @returns {Array} Returns the key-value pairs.
  2767. */
  2768. function mapToArray(map) {
  2769. var index = -1,
  2770. result = Array(map.size);
  2771. map.forEach(function(value, key) {
  2772. result[++index] = [key, value];
  2773. });
  2774. return result;
  2775. }
  2776. /**
  2777. * Creates a unary function that invokes `func` with its argument transformed.
  2778. *
  2779. * @private
  2780. * @param {Function} func The function to wrap.
  2781. * @param {Function} transform The argument transform.
  2782. * @returns {Function} Returns the new function.
  2783. */
  2784. function overArg(func, transform) {
  2785. return function(arg) {
  2786. return func(transform(arg));
  2787. };
  2788. }
  2789. /**
  2790. * Replaces all `placeholder` elements in `array` with an internal placeholder
  2791. * and returns an array of their indexes.
  2792. *
  2793. * @private
  2794. * @param {Array} array The array to modify.
  2795. * @param {*} placeholder The placeholder to replace.
  2796. * @returns {Array} Returns the new array of placeholder indexes.
  2797. */
  2798. function replaceHolders(array, placeholder) {
  2799. var index = -1,
  2800. length = array.length,
  2801. resIndex = 0,
  2802. result = [];
  2803. while (++index < length) {
  2804. var value = array[index];
  2805. if (value === placeholder || value === PLACEHOLDER) {
  2806. array[index] = PLACEHOLDER;
  2807. result[resIndex++] = index;
  2808. }
  2809. }
  2810. return result;
  2811. }
  2812. /**
  2813. * Converts `set` to an array of its values.
  2814. *
  2815. * @private
  2816. * @param {Object} set The set to convert.
  2817. * @returns {Array} Returns the values.
  2818. */
  2819. function setToArray(set) {
  2820. var index = -1,
  2821. result = Array(set.size);
  2822. set.forEach(function(value) {
  2823. result[++index] = value;
  2824. });
  2825. return result;
  2826. }
  2827. /**
  2828. * Converts `set` to its value-value pairs.
  2829. *
  2830. * @private
  2831. * @param {Object} set The set to convert.
  2832. * @returns {Array} Returns the value-value pairs.
  2833. */
  2834. function setToPairs(set) {
  2835. var index = -1,
  2836. result = Array(set.size);
  2837. set.forEach(function(value) {
  2838. result[++index] = [value, value];
  2839. });
  2840. return result;
  2841. }
  2842. /**
  2843. * A specialized version of `_.indexOf` which performs strict equality
  2844. * comparisons of values, i.e. `===`.
  2845. *
  2846. * @private
  2847. * @param {Array} array The array to inspect.
  2848. * @param {*} value The value to search for.
  2849. * @param {number} fromIndex The index to search from.
  2850. * @returns {number} Returns the index of the matched value, else `-1`.
  2851. */
  2852. function strictIndexOf(array, value, fromIndex) {
  2853. var index = fromIndex - 1,
  2854. length = array.length;
  2855. while (++index < length) {
  2856. if (array[index] === value) {
  2857. return index;
  2858. }
  2859. }
  2860. return -1;
  2861. }
  2862. /**
  2863. * A specialized version of `_.lastIndexOf` which performs strict equality
  2864. * comparisons of values, i.e. `===`.
  2865. *
  2866. * @private
  2867. * @param {Array} array The array to inspect.
  2868. * @param {*} value The value to search for.
  2869. * @param {number} fromIndex The index to search from.
  2870. * @returns {number} Returns the index of the matched value, else `-1`.
  2871. */
  2872. function strictLastIndexOf(array, value, fromIndex) {
  2873. var index = fromIndex + 1;
  2874. while (index--) {
  2875. if (array[index] === value) {
  2876. return index;
  2877. }
  2878. }
  2879. return index;
  2880. }
  2881. /**
  2882. * Gets the number of symbols in `string`.
  2883. *
  2884. * @private
  2885. * @param {string} string The string to inspect.
  2886. * @returns {number} Returns the string size.
  2887. */
  2888. function stringSize(string) {
  2889. return hasUnicode(string)
  2890. ? unicodeSize(string)
  2891. : asciiSize(string);
  2892. }
  2893. /**
  2894. * Converts `string` to an array.
  2895. *
  2896. * @private
  2897. * @param {string} string The string to convert.
  2898. * @returns {Array} Returns the converted array.
  2899. */
  2900. function stringToArray(string) {
  2901. return hasUnicode(string)
  2902. ? unicodeToArray(string)
  2903. : asciiToArray(string);
  2904. }
  2905. /**
  2906. * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
  2907. * character of `string`.
  2908. *
  2909. * @private
  2910. * @param {string} string The string to inspect.
  2911. * @returns {number} Returns the index of the last non-whitespace character.
  2912. */
  2913. function trimmedEndIndex(string) {
  2914. var index = string.length;
  2915. while (index-- && reWhitespace.test(string.charAt(index))) {}
  2916. return index;
  2917. }
  2918. /**
  2919. * Used by `_.unescape` to convert HTML entities to characters.
  2920. *
  2921. * @private
  2922. * @param {string} chr The matched character to unescape.
  2923. * @returns {string} Returns the unescaped character.
  2924. */
  2925. var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
  2926. /**
  2927. * Gets the size of a Unicode `string`.
  2928. *
  2929. * @private
  2930. * @param {string} string The string inspect.
  2931. * @returns {number} Returns the string size.
  2932. */
  2933. function unicodeSize(string) {
  2934. var result = reUnicode.lastIndex = 0;
  2935. while (reUnicode.test(string)) {
  2936. ++result;
  2937. }
  2938. return result;
  2939. }
  2940. /**
  2941. * Converts a Unicode `string` to an array.
  2942. *
  2943. * @private
  2944. * @param {string} string The string to convert.
  2945. * @returns {Array} Returns the converted array.
  2946. */
  2947. function unicodeToArray(string) {
  2948. return string.match(reUnicode) || [];
  2949. }
  2950. /**
  2951. * Splits a Unicode `string` into an array of its words.
  2952. *
  2953. * @private
  2954. * @param {string} The string to inspect.
  2955. * @returns {Array} Returns the words of `string`.
  2956. */
  2957. function unicodeWords(string) {
  2958. return string.match(reUnicodeWord) || [];
  2959. }
  2960. /*--------------------------------------------------------------------------*/
  2961. /**
  2962. * Create a new pristine `lodash` function using the `context` object.
  2963. *
  2964. * @static
  2965. * @memberOf _
  2966. * @since 1.1.0
  2967. * @category Util
  2968. * @param {Object} [context=root] The context object.
  2969. * @returns {Function} Returns a new `lodash` function.
  2970. * @example
  2971. *
  2972. * _.mixin({ 'foo': _.constant('foo') });
  2973. *
  2974. * var lodash = _.runInContext();
  2975. * lodash.mixin({ 'bar': lodash.constant('bar') });
  2976. *
  2977. * _.isFunction(_.foo);
  2978. * // => true
  2979. * _.isFunction(_.bar);
  2980. * // => false
  2981. *
  2982. * lodash.isFunction(lodash.foo);
  2983. * // => false
  2984. * lodash.isFunction(lodash.bar);
  2985. * // => true
  2986. *
  2987. * // Create a suped-up `defer` in Node.js.
  2988. * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
  2989. */
  2990. var runInContext = (function runInContext(context) {
  2991. context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
  2992. /** Built-in constructor references. */
  2993. var Array = context.Array,
  2994. Date = context.Date,
  2995. Error = context.Error,
  2996. Function = context.Function,
  2997. Math = context.Math,
  2998. Object = context.Object,
  2999. RegExp = context.RegExp,
  3000. String = context.String,
  3001. TypeError = context.TypeError;
  3002. /** Used for built-in method references. */
  3003. var arrayProto = Array.prototype,
  3004. funcProto = Function.prototype,
  3005. objectProto = Object.prototype;
  3006. /** Used to detect overreaching core-js shims. */
  3007. var coreJsData = context['__core-js_shared__'];
  3008. /** Used to resolve the decompiled source of functions. */
  3009. var funcToString = funcProto.toString;
  3010. /** Used to check objects for own properties. */
  3011. var hasOwnProperty = objectProto.hasOwnProperty;
  3012. /** Used to generate unique IDs. */
  3013. var idCounter = 0;
  3014. /** Used to detect methods masquerading as native. */
  3015. var maskSrcKey = (function() {
  3016. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  3017. return uid ? ('Symbol(src)_1.' + uid) : '';
  3018. }());
  3019. /**
  3020. * Used to resolve the
  3021. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  3022. * of values.
  3023. */
  3024. var nativeObjectToString = objectProto.toString;
  3025. /** Used to infer the `Object` constructor. */
  3026. var objectCtorString = funcToString.call(Object);
  3027. /** Used to restore the original `_` reference in `_.noConflict`. */
  3028. var oldDash = root._;
  3029. /** Used to detect if a method is native. */
  3030. var reIsNative = RegExp('^' +
  3031. funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
  3032. .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
  3033. );
  3034. /** Built-in value references. */
  3035. var Buffer = moduleExports ? context.Buffer : undefined,
  3036. Symbol = context.Symbol,
  3037. Uint8Array = context.Uint8Array,
  3038. allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
  3039. getPrototype = overArg(Object.getPrototypeOf, Object),
  3040. objectCreate = Object.create,
  3041. propertyIsEnumerable = objectProto.propertyIsEnumerable,
  3042. splice = arrayProto.splice,
  3043. spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,
  3044. symIterator = Symbol ? Symbol.iterator : undefined,
  3045. symToStringTag = Symbol ? Symbol.toStringTag : undefined;
  3046. var defineProperty = (function() {
  3047. try {
  3048. var func = getNative(Object, 'defineProperty');
  3049. func({}, '', {});
  3050. return func;
  3051. } catch (e) {}
  3052. }());
  3053. /** Mocked built-ins. */
  3054. var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,
  3055. ctxNow = Date && Date.now !== root.Date.now && Date.now,
  3056. ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
  3057. /* Built-in method references for those with the same name as other `lodash` methods. */
  3058. var nativeCeil = Math.ceil,
  3059. nativeFloor = Math.floor,
  3060. nativeGetSymbols = Object.getOwnPropertySymbols,
  3061. nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
  3062. nativeIsFinite = context.isFinite,
  3063. nativeJoin = arrayProto.join,
  3064. nativeKeys = overArg(Object.keys, Object),
  3065. nativeMax = Math.max,
  3066. nativeMin = Math.min,
  3067. nativeNow = Date.now,
  3068. nativeParseInt = context.parseInt,
  3069. nativeRandom = Math.random,
  3070. nativeReverse = arrayProto.reverse;
  3071. /* Built-in method references that are verified to be native. */
  3072. var DataView = getNative(context, 'DataView'),
  3073. Map = getNative(context, 'Map'),
  3074. Promise = getNative(context, 'Promise'),
  3075. Set = getNative(context, 'Set'),
  3076. WeakMap = getNative(context, 'WeakMap'),
  3077. nativeCreate = getNative(Object, 'create');
  3078. /** Used to store function metadata. */
  3079. var metaMap = WeakMap && new WeakMap;
  3080. /** Used to lookup unminified function names. */
  3081. var realNames = {};
  3082. /** Used to detect maps, sets, and weakmaps. */
  3083. var dataViewCtorString = toSource(DataView),
  3084. mapCtorString = toSource(Map),
  3085. promiseCtorString = toSource(Promise),
  3086. setCtorString = toSource(Set),
  3087. weakMapCtorString = toSource(WeakMap);
  3088. /** Used to convert symbols to primitives and strings. */
  3089. var symbolProto = Symbol ? Symbol.prototype : undefined,
  3090. symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
  3091. symbolToString = symbolProto ? symbolProto.toString : undefined;
  3092. /*------------------------------------------------------------------------*/
  3093. /**
  3094. * Creates a `lodash` object which wraps `value` to enable implicit method
  3095. * chain sequences. Methods that operate on and return arrays, collections,
  3096. * and functions can be chained together. Methods that retrieve a single value
  3097. * or may return a primitive value will automatically end the chain sequence
  3098. * and return the unwrapped value. Otherwise, the value must be unwrapped
  3099. * with `_#value`.
  3100. *
  3101. * Explicit chain sequences, which must be unwrapped with `_#value`, may be
  3102. * enabled using `_.chain`.
  3103. *
  3104. * The execution of chained methods is lazy, that is, it's deferred until
  3105. * `_#value` is implicitly or explicitly called.
  3106. *
  3107. * Lazy evaluation allows several methods to support shortcut fusion.
  3108. * Shortcut fusion is an optimization to merge iteratee calls; this avoids
  3109. * the creation of intermediate arrays and can greatly reduce the number of
  3110. * iteratee executions. Sections of a chain sequence qualify for shortcut
  3111. * fusion if the section is applied to an array and iteratees accept only
  3112. * one argument. The heuristic for whether a section qualifies for shortcut
  3113. * fusion is subject to change.
  3114. *
  3115. * Chaining is supported in custom builds as long as the `_#value` method is
  3116. * directly or indirectly included in the build.
  3117. *
  3118. * In addition to lodash methods, wrappers have `Array` and `String` methods.
  3119. *
  3120. * The wrapper `Array` methods are:
  3121. * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
  3122. *
  3123. * The wrapper `String` methods are:
  3124. * `replace` and `split`
  3125. *
  3126. * The wrapper methods that support shortcut fusion are:
  3127. * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
  3128. * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
  3129. * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
  3130. *
  3131. * The chainable wrapper methods are:
  3132. * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
  3133. * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
  3134. * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
  3135. * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
  3136. * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
  3137. * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
  3138. * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
  3139. * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
  3140. * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
  3141. * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
  3142. * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
  3143. * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
  3144. * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
  3145. * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
  3146. * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
  3147. * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
  3148. * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
  3149. * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
  3150. * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
  3151. * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
  3152. * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
  3153. * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
  3154. * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
  3155. * `zipObject`, `zipObjectDeep`, and `zipWith`
  3156. *
  3157. * The wrapper methods that are **not** chainable by default are:
  3158. * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
  3159. * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
  3160. * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
  3161. * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
  3162. * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
  3163. * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
  3164. * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
  3165. * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
  3166. * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
  3167. * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
  3168. * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
  3169. * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
  3170. * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
  3171. * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
  3172. * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
  3173. * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
  3174. * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
  3175. * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
  3176. * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
  3177. * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
  3178. * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
  3179. * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
  3180. * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
  3181. * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
  3182. * `upperFirst`, `value`, and `words`
  3183. *
  3184. * @name _
  3185. * @constructor
  3186. * @category Seq
  3187. * @param {*} value The value to wrap in a `lodash` instance.
  3188. * @returns {Object} Returns the new `lodash` wrapper instance.
  3189. * @example
  3190. *
  3191. * function square(n) {
  3192. * return n * n;
  3193. * }
  3194. *
  3195. * var wrapped = _([1, 2, 3]);
  3196. *
  3197. * // Returns an unwrapped value.
  3198. * wrapped.reduce(_.add);
  3199. * // => 6
  3200. *
  3201. * // Returns a wrapped value.
  3202. * var squares = wrapped.map(square);
  3203. *
  3204. * _.isArray(squares);
  3205. * // => false
  3206. *
  3207. * _.isArray(squares.value());
  3208. * // => true
  3209. */
  3210. function lodash(value) {
  3211. if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
  3212. if (value instanceof LodashWrapper) {
  3213. return value;
  3214. }
  3215. if (hasOwnProperty.call(value, '__wrapped__')) {
  3216. return wrapperClone(value);
  3217. }
  3218. }
  3219. return new LodashWrapper(value);
  3220. }
  3221. /**
  3222. * The base implementation of `_.create` without support for assigning
  3223. * properties to the created object.
  3224. *
  3225. * @private
  3226. * @param {Object} proto The object to inherit from.
  3227. * @returns {Object} Returns the new object.
  3228. */
  3229. var baseCreate = (function() {
  3230. function object() {}
  3231. return function(proto) {
  3232. if (!isObject(proto)) {
  3233. return {};
  3234. }
  3235. if (objectCreate) {
  3236. return objectCreate(proto);
  3237. }
  3238. object.prototype = proto;
  3239. var result = new object;
  3240. object.prototype = undefined;
  3241. return result;
  3242. };
  3243. }());
  3244. /**
  3245. * The function whose prototype chain sequence wrappers inherit from.
  3246. *
  3247. * @private
  3248. */
  3249. function baseLodash() {
  3250. // No operation performed.
  3251. }
  3252. /**
  3253. * The base constructor for creating `lodash` wrapper objects.
  3254. *
  3255. * @private
  3256. * @param {*} value The value to wrap.
  3257. * @param {boolean} [chainAll] Enable explicit method chain sequences.
  3258. */
  3259. function LodashWrapper(value, chainAll) {
  3260. this.__wrapped__ = value;
  3261. this.__actions__ = [];
  3262. this.__chain__ = !!chainAll;
  3263. this.__index__ = 0;
  3264. this.__values__ = undefined;
  3265. }
  3266. /**
  3267. * By default, the template delimiters used by lodash are like those in
  3268. * embedded Ruby (ERB) as well as ES2015 template strings. Change the
  3269. * following template settings to use alternative delimiters.
  3270. *
  3271. * @static
  3272. * @memberOf _
  3273. * @type {Object}
  3274. */
  3275. lodash.templateSettings = {
  3276. /**
  3277. * Used to detect `data` property values to be HTML-escaped.
  3278. *
  3279. * @memberOf _.templateSettings
  3280. * @type {RegExp}
  3281. */
  3282. 'escape': reEscape,
  3283. /**
  3284. * Used to detect code to be evaluated.
  3285. *
  3286. * @memberOf _.templateSettings
  3287. * @type {RegExp}
  3288. */
  3289. 'evaluate': reEvaluate,
  3290. /**
  3291. * Used to detect `data` property values to inject.
  3292. *
  3293. * @memberOf _.templateSettings
  3294. * @type {RegExp}
  3295. */
  3296. 'interpolate': reInterpolate,
  3297. /**
  3298. * Used to reference the data object in the template text.
  3299. *
  3300. * @memberOf _.templateSettings
  3301. * @type {string}
  3302. */
  3303. 'variable': '',
  3304. /**
  3305. * Used to import variables into the compiled template.
  3306. *
  3307. * @memberOf _.templateSettings
  3308. * @type {Object}
  3309. */
  3310. 'imports': {
  3311. /**
  3312. * A reference to the `lodash` function.
  3313. *
  3314. * @memberOf _.templateSettings.imports
  3315. * @type {Function}
  3316. */
  3317. '_': lodash
  3318. }
  3319. };
  3320. // Ensure wrappers are instances of `baseLodash`.
  3321. lodash.prototype = baseLodash.prototype;
  3322. lodash.prototype.constructor = lodash;
  3323. LodashWrapper.prototype = baseCreate(baseLodash.prototype);
  3324. LodashWrapper.prototype.constructor = LodashWrapper;
  3325. /*------------------------------------------------------------------------*/
  3326. /**
  3327. * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
  3328. *
  3329. * @private
  3330. * @constructor
  3331. * @param {*} value The value to wrap.
  3332. */
  3333. function LazyWrapper(value) {
  3334. this.__wrapped__ = value;
  3335. this.__actions__ = [];
  3336. this.__dir__ = 1;
  3337. this.__filtered__ = false;
  3338. this.__iteratees__ = [];
  3339. this.__takeCount__ = MAX_ARRAY_LENGTH;
  3340. this.__views__ = [];
  3341. }
  3342. /**
  3343. * Creates a clone of the lazy wrapper object.
  3344. *
  3345. * @private
  3346. * @name clone
  3347. * @memberOf LazyWrapper
  3348. * @returns {Object} Returns the cloned `LazyWrapper` object.
  3349. */
  3350. function lazyClone() {
  3351. var result = new LazyWrapper(this.__wrapped__);
  3352. result.__actions__ = copyArray(this.__actions__);
  3353. result.__dir__ = this.__dir__;
  3354. result.__filtered__ = this.__filtered__;
  3355. result.__iteratees__ = copyArray(this.__iteratees__);
  3356. result.__takeCount__ = this.__takeCount__;
  3357. result.__views__ = copyArray(this.__views__);
  3358. return result;
  3359. }
  3360. /**
  3361. * Reverses the direction of lazy iteration.
  3362. *
  3363. * @private
  3364. * @name reverse
  3365. * @memberOf LazyWrapper
  3366. * @returns {Object} Returns the new reversed `LazyWrapper` object.
  3367. */
  3368. function lazyReverse() {
  3369. if (this.__filtered__) {
  3370. var result = new LazyWrapper(this);
  3371. result.__dir__ = -1;
  3372. result.__filtered__ = true;
  3373. } else {
  3374. result = this.clone();
  3375. result.__dir__ *= -1;
  3376. }
  3377. return result;
  3378. }
  3379. /**
  3380. * Extracts the unwrapped value from its lazy wrapper.
  3381. *
  3382. * @private
  3383. * @name value
  3384. * @memberOf LazyWrapper
  3385. * @returns {*} Returns the unwrapped value.
  3386. */
  3387. function lazyValue() {
  3388. var array = this.__wrapped__.value(),
  3389. dir = this.__dir__,
  3390. isArr = isArray(array),
  3391. isRight = dir < 0,
  3392. arrLength = isArr ? array.length : 0,
  3393. view = getView(0, arrLength, this.__views__),
  3394. start = view.start,
  3395. end = view.end,
  3396. length = end - start,
  3397. index = isRight ? end : (start - 1),
  3398. iteratees = this.__iteratees__,
  3399. iterLength = iteratees.length,
  3400. resIndex = 0,
  3401. takeCount = nativeMin(length, this.__takeCount__);
  3402. if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
  3403. return baseWrapperValue(array, this.__actions__);
  3404. }
  3405. var result = [];
  3406. outer:
  3407. while (length-- && resIndex < takeCount) {
  3408. index += dir;
  3409. var iterIndex = -1,
  3410. value = array[index];
  3411. while (++iterIndex < iterLength) {
  3412. var data = iteratees[iterIndex],
  3413. iteratee = data.iteratee,
  3414. type = data.type,
  3415. computed = iteratee(value);
  3416. if (type == LAZY_MAP_FLAG) {
  3417. value = computed;
  3418. } else if (!computed) {
  3419. if (type == LAZY_FILTER_FLAG) {
  3420. continue outer;
  3421. } else {
  3422. break outer;
  3423. }
  3424. }
  3425. }
  3426. result[resIndex++] = value;
  3427. }
  3428. return result;
  3429. }
  3430. // Ensure `LazyWrapper` is an instance of `baseLodash`.
  3431. LazyWrapper.prototype = baseCreate(baseLodash.prototype);
  3432. LazyWrapper.prototype.constructor = LazyWrapper;
  3433. /*------------------------------------------------------------------------*/
  3434. /**
  3435. * Creates a hash object.
  3436. *
  3437. * @private
  3438. * @constructor
  3439. * @param {Array} [entries] The key-value pairs to cache.
  3440. */
  3441. function Hash(entries) {
  3442. var index = -1,
  3443. length = entries == null ? 0 : entries.length;
  3444. this.clear();
  3445. while (++index < length) {
  3446. var entry = entries[index];
  3447. this.set(entry[0], entry[1]);
  3448. }
  3449. }
  3450. /**
  3451. * Removes all key-value entries from the hash.
  3452. *
  3453. * @private
  3454. * @name clear
  3455. * @memberOf Hash
  3456. */
  3457. function hashClear() {
  3458. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  3459. this.size = 0;
  3460. }
  3461. /**
  3462. * Removes `key` and its value from the hash.
  3463. *
  3464. * @private
  3465. * @name delete
  3466. * @memberOf Hash
  3467. * @param {Object} hash The hash to modify.
  3468. * @param {string} key The key of the value to remove.
  3469. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  3470. */
  3471. function hashDelete(key) {
  3472. var result = this.has(key) && delete this.__data__[key];
  3473. this.size -= result ? 1 : 0;
  3474. return result;
  3475. }
  3476. /**
  3477. * Gets the hash value for `key`.
  3478. *
  3479. * @private
  3480. * @name get
  3481. * @memberOf Hash
  3482. * @param {string} key The key of the value to get.
  3483. * @returns {*} Returns the entry value.
  3484. */
  3485. function hashGet(key) {
  3486. var data = this.__data__;
  3487. if (nativeCreate) {
  3488. var result = data[key];
  3489. return result === HASH_UNDEFINED ? undefined : result;
  3490. }
  3491. return hasOwnProperty.call(data, key) ? data[key] : undefined;
  3492. }
  3493. /**
  3494. * Checks if a hash value for `key` exists.
  3495. *
  3496. * @private
  3497. * @name has
  3498. * @memberOf Hash
  3499. * @param {string} key The key of the entry to check.
  3500. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  3501. */
  3502. function hashHas(key) {
  3503. var data = this.__data__;
  3504. return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
  3505. }
  3506. /**
  3507. * Sets the hash `key` to `value`.
  3508. *
  3509. * @private
  3510. * @name set
  3511. * @memberOf Hash
  3512. * @param {string} key The key of the value to set.
  3513. * @param {*} value The value to set.
  3514. * @returns {Object} Returns the hash instance.
  3515. */
  3516. function hashSet(key, value) {
  3517. var data = this.__data__;
  3518. this.size += this.has(key) ? 0 : 1;
  3519. data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
  3520. return this;
  3521. }
  3522. // Add methods to `Hash`.
  3523. Hash.prototype.clear = hashClear;
  3524. Hash.prototype['delete'] = hashDelete;
  3525. Hash.prototype.get = hashGet;
  3526. Hash.prototype.has = hashHas;
  3527. Hash.prototype.set = hashSet;
  3528. /*------------------------------------------------------------------------*/
  3529. /**
  3530. * Creates an list cache object.
  3531. *
  3532. * @private
  3533. * @constructor
  3534. * @param {Array} [entries] The key-value pairs to cache.
  3535. */
  3536. function ListCache(entries) {
  3537. var index = -1,
  3538. length = entries == null ? 0 : entries.length;
  3539. this.clear();
  3540. while (++index < length) {
  3541. var entry = entries[index];
  3542. this.set(entry[0], entry[1]);
  3543. }
  3544. }
  3545. /**
  3546. * Removes all key-value entries from the list cache.
  3547. *
  3548. * @private
  3549. * @name clear
  3550. * @memberOf ListCache
  3551. */
  3552. function listCacheClear() {
  3553. this.__data__ = [];
  3554. this.size = 0;
  3555. }
  3556. /**
  3557. * Removes `key` and its value from the list cache.
  3558. *
  3559. * @private
  3560. * @name delete
  3561. * @memberOf ListCache
  3562. * @param {string} key The key of the value to remove.
  3563. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  3564. */
  3565. function listCacheDelete(key) {
  3566. var data = this.__data__,
  3567. index = assocIndexOf(data, key);
  3568. if (index < 0) {
  3569. return false;
  3570. }
  3571. var lastIndex = data.length - 1;
  3572. if (index == lastIndex) {
  3573. data.pop();
  3574. } else {
  3575. splice.call(data, index, 1);
  3576. }
  3577. --this.size;
  3578. return true;
  3579. }
  3580. /**
  3581. * Gets the list cache value for `key`.
  3582. *
  3583. * @private
  3584. * @name get
  3585. * @memberOf ListCache
  3586. * @param {string} key The key of the value to get.
  3587. * @returns {*} Returns the entry value.
  3588. */
  3589. function listCacheGet(key) {
  3590. var data = this.__data__,
  3591. index = assocIndexOf(data, key);
  3592. return index < 0 ? undefined : data[index][1];
  3593. }
  3594. /**
  3595. * Checks if a list cache value for `key` exists.
  3596. *
  3597. * @private
  3598. * @name has
  3599. * @memberOf ListCache
  3600. * @param {string} key The key of the entry to check.
  3601. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  3602. */
  3603. function listCacheHas(key) {
  3604. return assocIndexOf(this.__data__, key) > -1;
  3605. }
  3606. /**
  3607. * Sets the list cache `key` to `value`.
  3608. *
  3609. * @private
  3610. * @name set
  3611. * @memberOf ListCache
  3612. * @param {string} key The key of the value to set.
  3613. * @param {*} value The value to set.
  3614. * @returns {Object} Returns the list cache instance.
  3615. */
  3616. function listCacheSet(key, value) {
  3617. var data = this.__data__,
  3618. index = assocIndexOf(data, key);
  3619. if (index < 0) {
  3620. ++this.size;
  3621. data.push([key, value]);
  3622. } else {
  3623. data[index][1] = value;
  3624. }
  3625. return this;
  3626. }
  3627. // Add methods to `ListCache`.
  3628. ListCache.prototype.clear = listCacheClear;
  3629. ListCache.prototype['delete'] = listCacheDelete;
  3630. ListCache.prototype.get = listCacheGet;
  3631. ListCache.prototype.has = listCacheHas;
  3632. ListCache.prototype.set = listCacheSet;
  3633. /*------------------------------------------------------------------------*/
  3634. /**
  3635. * Creates a map cache object to store key-value pairs.
  3636. *
  3637. * @private
  3638. * @constructor
  3639. * @param {Array} [entries] The key-value pairs to cache.
  3640. */
  3641. function MapCache(entries) {
  3642. var index = -1,
  3643. length = entries == null ? 0 : entries.length;
  3644. this.clear();
  3645. while (++index < length) {
  3646. var entry = entries[index];
  3647. this.set(entry[0], entry[1]);
  3648. }
  3649. }
  3650. /**
  3651. * Removes all key-value entries from the map.
  3652. *
  3653. * @private
  3654. * @name clear
  3655. * @memberOf MapCache
  3656. */
  3657. function mapCacheClear() {
  3658. this.size = 0;
  3659. this.__data__ = {
  3660. 'hash': new Hash,
  3661. 'map': new (Map || ListCache),
  3662. 'string': new Hash
  3663. };
  3664. }
  3665. /**
  3666. * Removes `key` and its value from the map.
  3667. *
  3668. * @private
  3669. * @name delete
  3670. * @memberOf MapCache
  3671. * @param {string} key The key of the value to remove.
  3672. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  3673. */
  3674. function mapCacheDelete(key) {
  3675. var result = getMapData(this, key)['delete'](key);
  3676. this.size -= result ? 1 : 0;
  3677. return result;
  3678. }
  3679. /**
  3680. * Gets the map value for `key`.
  3681. *
  3682. * @private
  3683. * @name get
  3684. * @memberOf MapCache
  3685. * @param {string} key The key of the value to get.
  3686. * @returns {*} Returns the entry value.
  3687. */
  3688. function mapCacheGet(key) {
  3689. return getMapData(this, key).get(key);
  3690. }
  3691. /**
  3692. * Checks if a map value for `key` exists.
  3693. *
  3694. * @private
  3695. * @name has
  3696. * @memberOf MapCache
  3697. * @param {string} key The key of the entry to check.
  3698. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  3699. */
  3700. function mapCacheHas(key) {
  3701. return getMapData(this, key).has(key);
  3702. }
  3703. /**
  3704. * Sets the map `key` to `value`.
  3705. *
  3706. * @private
  3707. * @name set
  3708. * @memberOf MapCache
  3709. * @param {string} key The key of the value to set.
  3710. * @param {*} value The value to set.
  3711. * @returns {Object} Returns the map cache instance.
  3712. */
  3713. function mapCacheSet(key, value) {
  3714. var data = getMapData(this, key),
  3715. size = data.size;
  3716. data.set(key, value);
  3717. this.size += data.size == size ? 0 : 1;
  3718. return this;
  3719. }
  3720. // Add methods to `MapCache`.
  3721. MapCache.prototype.clear = mapCacheClear;
  3722. MapCache.prototype['delete'] = mapCacheDelete;
  3723. MapCache.prototype.get = mapCacheGet;
  3724. MapCache.prototype.has = mapCacheHas;
  3725. MapCache.prototype.set = mapCacheSet;
  3726. /*------------------------------------------------------------------------*/
  3727. /**
  3728. *
  3729. * Creates an array cache object to store unique values.
  3730. *
  3731. * @private
  3732. * @constructor
  3733. * @param {Array} [values] The values to cache.
  3734. */
  3735. function SetCache(values) {
  3736. var index = -1,
  3737. length = values == null ? 0 : values.length;
  3738. this.__data__ = new MapCache;
  3739. while (++index < length) {
  3740. this.add(values[index]);
  3741. }
  3742. }
  3743. /**
  3744. * Adds `value` to the array cache.
  3745. *
  3746. * @private
  3747. * @name add
  3748. * @memberOf SetCache
  3749. * @alias push
  3750. * @param {*} value The value to cache.
  3751. * @returns {Object} Returns the cache instance.
  3752. */
  3753. function setCacheAdd(value) {
  3754. this.__data__.set(value, HASH_UNDEFINED);
  3755. return this;
  3756. }
  3757. /**
  3758. * Checks if `value` is in the array cache.
  3759. *
  3760. * @private
  3761. * @name has
  3762. * @memberOf SetCache
  3763. * @param {*} value The value to search for.
  3764. * @returns {number} Returns `true` if `value` is found, else `false`.
  3765. */
  3766. function setCacheHas(value) {
  3767. return this.__data__.has(value);
  3768. }
  3769. // Add methods to `SetCache`.
  3770. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
  3771. SetCache.prototype.has = setCacheHas;
  3772. /*------------------------------------------------------------------------*/
  3773. /**
  3774. * Creates a stack cache object to store key-value pairs.
  3775. *
  3776. * @private
  3777. * @constructor
  3778. * @param {Array} [entries] The key-value pairs to cache.
  3779. */
  3780. function Stack(entries) {
  3781. var data = this.__data__ = new ListCache(entries);
  3782. this.size = data.size;
  3783. }
  3784. /**
  3785. * Removes all key-value entries from the stack.
  3786. *
  3787. * @private
  3788. * @name clear
  3789. * @memberOf Stack
  3790. */
  3791. function stackClear() {
  3792. this.__data__ = new ListCache;
  3793. this.size = 0;
  3794. }
  3795. /**
  3796. * Removes `key` and its value from the stack.
  3797. *
  3798. * @private
  3799. * @name delete
  3800. * @memberOf Stack
  3801. * @param {string} key The key of the value to remove.
  3802. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  3803. */
  3804. function stackDelete(key) {
  3805. var data = this.__data__,
  3806. result = data['delete'](key);
  3807. this.size = data.size;
  3808. return result;
  3809. }
  3810. /**
  3811. * Gets the stack value for `key`.
  3812. *
  3813. * @private
  3814. * @name get
  3815. * @memberOf Stack
  3816. * @param {string} key The key of the value to get.
  3817. * @returns {*} Returns the entry value.
  3818. */
  3819. function stackGet(key) {
  3820. return this.__data__.get(key);
  3821. }
  3822. /**
  3823. * Checks if a stack value for `key` exists.
  3824. *
  3825. * @private
  3826. * @name has
  3827. * @memberOf Stack
  3828. * @param {string} key The key of the entry to check.
  3829. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  3830. */
  3831. function stackHas(key) {
  3832. return this.__data__.has(key);
  3833. }
  3834. /**
  3835. * Sets the stack `key` to `value`.
  3836. *
  3837. * @private
  3838. * @name set
  3839. * @memberOf Stack
  3840. * @param {string} key The key of the value to set.
  3841. * @param {*} value The value to set.
  3842. * @returns {Object} Returns the stack cache instance.
  3843. */
  3844. function stackSet(key, value) {
  3845. var data = this.__data__;
  3846. if (data instanceof ListCache) {
  3847. var pairs = data.__data__;
  3848. if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
  3849. pairs.push([key, value]);
  3850. this.size = ++data.size;
  3851. return this;
  3852. }
  3853. data = this.__data__ = new MapCache(pairs);
  3854. }
  3855. data.set(key, value);
  3856. this.size = data.size;
  3857. return this;
  3858. }
  3859. // Add methods to `Stack`.
  3860. Stack.prototype.clear = stackClear;
  3861. Stack.prototype['delete'] = stackDelete;
  3862. Stack.prototype.get = stackGet;
  3863. Stack.prototype.has = stackHas;
  3864. Stack.prototype.set = stackSet;
  3865. /*------------------------------------------------------------------------*/
  3866. /**
  3867. * Creates an array of the enumerable property names of the array-like `value`.
  3868. *
  3869. * @private
  3870. * @param {*} value The value to query.
  3871. * @param {boolean} inherited Specify returning inherited property names.
  3872. * @returns {Array} Returns the array of property names.
  3873. */
  3874. function arrayLikeKeys(value, inherited) {
  3875. var isArr = isArray(value),
  3876. isArg = !isArr && isArguments(value),
  3877. isBuff = !isArr && !isArg && isBuffer(value),
  3878. isType = !isArr && !isArg && !isBuff && isTypedArray(value),
  3879. skipIndexes = isArr || isArg || isBuff || isType,
  3880. result = skipIndexes ? baseTimes(value.length, String) : [],
  3881. length = result.length;
  3882. for (var key in value) {
  3883. if ((inherited || hasOwnProperty.call(value, key)) &&
  3884. !(skipIndexes && (
  3885. // Safari 9 has enumerable `arguments.length` in strict mode.
  3886. key == 'length' ||
  3887. // Node.js 0.10 has enumerable non-index properties on buffers.
  3888. (isBuff && (key == 'offset' || key == 'parent')) ||
  3889. // PhantomJS 2 has enumerable non-index properties on typed arrays.
  3890. (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
  3891. // Skip index properties.
  3892. isIndex(key, length)
  3893. ))) {
  3894. result.push(key);
  3895. }
  3896. }
  3897. return result;
  3898. }
  3899. /**
  3900. * A specialized version of `_.sample` for arrays.
  3901. *
  3902. * @private
  3903. * @param {Array} array The array to sample.
  3904. * @returns {*} Returns the random element.
  3905. */
  3906. function arraySample(array) {
  3907. var length = array.length;
  3908. return length ? array[baseRandom(0, length - 1)] : undefined;
  3909. }
  3910. /**
  3911. * A specialized version of `_.sampleSize` for arrays.
  3912. *
  3913. * @private
  3914. * @param {Array} array The array to sample.
  3915. * @param {number} n The number of elements to sample.
  3916. * @returns {Array} Returns the random elements.
  3917. */
  3918. function arraySampleSize(array, n) {
  3919. return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
  3920. }
  3921. /**
  3922. * A specialized version of `_.shuffle` for arrays.
  3923. *
  3924. * @private
  3925. * @param {Array} array The array to shuffle.
  3926. * @returns {Array} Returns the new shuffled array.
  3927. */
  3928. function arrayShuffle(array) {
  3929. return shuffleSelf(copyArray(array));
  3930. }
  3931. /**
  3932. * This function is like `assignValue` except that it doesn't assign
  3933. * `undefined` values.
  3934. *
  3935. * @private
  3936. * @param {Object} object The object to modify.
  3937. * @param {string} key The key of the property to assign.
  3938. * @param {*} value The value to assign.
  3939. */
  3940. function assignMergeValue(object, key, value) {
  3941. if ((value !== undefined && !eq(object[key], value)) ||
  3942. (value === undefined && !(key in object))) {
  3943. baseAssignValue(object, key, value);
  3944. }
  3945. }
  3946. /**
  3947. * Assigns `value` to `key` of `object` if the existing value is not equivalent
  3948. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  3949. * for equality comparisons.
  3950. *
  3951. * @private
  3952. * @param {Object} object The object to modify.
  3953. * @param {string} key The key of the property to assign.
  3954. * @param {*} value The value to assign.
  3955. */
  3956. function assignValue(object, key, value) {
  3957. var objValue = object[key];
  3958. if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
  3959. (value === undefined && !(key in object))) {
  3960. baseAssignValue(object, key, value);
  3961. }
  3962. }
  3963. /**
  3964. * Gets the index at which the `key` is found in `array` of key-value pairs.
  3965. *
  3966. * @private
  3967. * @param {Array} array The array to inspect.
  3968. * @param {*} key The key to search for.
  3969. * @returns {number} Returns the index of the matched value, else `-1`.
  3970. */
  3971. function assocIndexOf(array, key) {
  3972. var length = array.length;
  3973. while (length--) {
  3974. if (eq(array[length][0], key)) {
  3975. return length;
  3976. }
  3977. }
  3978. return -1;
  3979. }
  3980. /**
  3981. * Aggregates elements of `collection` on `accumulator` with keys transformed
  3982. * by `iteratee` and values set by `setter`.
  3983. *
  3984. * @private
  3985. * @param {Array|Object} collection The collection to iterate over.
  3986. * @param {Function} setter The function to set `accumulator` values.
  3987. * @param {Function} iteratee The iteratee to transform keys.
  3988. * @param {Object} accumulator The initial aggregated object.
  3989. * @returns {Function} Returns `accumulator`.
  3990. */
  3991. function baseAggregator(collection, setter, iteratee, accumulator) {
  3992. baseEach(collection, function(value, key, collection) {
  3993. setter(accumulator, value, iteratee(value), collection);
  3994. });
  3995. return accumulator;
  3996. }
  3997. /**
  3998. * The base implementation of `_.assign` without support for multiple sources
  3999. * or `customizer` functions.
  4000. *
  4001. * @private
  4002. * @param {Object} object The destination object.
  4003. * @param {Object} source The source object.
  4004. * @returns {Object} Returns `object`.
  4005. */
  4006. function baseAssign(object, source) {
  4007. return object && copyObject(source, keys(source), object);
  4008. }
  4009. /**
  4010. * The base implementation of `_.assignIn` without support for multiple sources
  4011. * or `customizer` functions.
  4012. *
  4013. * @private
  4014. * @param {Object} object The destination object.
  4015. * @param {Object} source The source object.
  4016. * @returns {Object} Returns `object`.
  4017. */
  4018. function baseAssignIn(object, source) {
  4019. return object && copyObject(source, keysIn(source), object);
  4020. }
  4021. /**
  4022. * The base implementation of `assignValue` and `assignMergeValue` without
  4023. * value checks.
  4024. *
  4025. * @private
  4026. * @param {Object} object The object to modify.
  4027. * @param {string} key The key of the property to assign.
  4028. * @param {*} value The value to assign.
  4029. */
  4030. function baseAssignValue(object, key, value) {
  4031. if (key == '__proto__' && defineProperty) {
  4032. defineProperty(object, key, {
  4033. 'configurable': true,
  4034. 'enumerable': true,
  4035. 'value': value,
  4036. 'writable': true
  4037. });
  4038. } else {
  4039. object[key] = value;
  4040. }
  4041. }
  4042. /**
  4043. * The base implementation of `_.at` without support for individual paths.
  4044. *
  4045. * @private
  4046. * @param {Object} object The object to iterate over.
  4047. * @param {string[]} paths The property paths to pick.
  4048. * @returns {Array} Returns the picked elements.
  4049. */
  4050. function baseAt(object, paths) {
  4051. var index = -1,
  4052. length = paths.length,
  4053. result = Array(length),
  4054. skip = object == null;
  4055. while (++index < length) {
  4056. result[index] = skip ? undefined : get(object, paths[index]);
  4057. }
  4058. return result;
  4059. }
  4060. /**
  4061. * The base implementation of `_.clamp` which doesn't coerce arguments.
  4062. *
  4063. * @private
  4064. * @param {number} number The number to clamp.
  4065. * @param {number} [lower] The lower bound.
  4066. * @param {number} upper The upper bound.
  4067. * @returns {number} Returns the clamped number.
  4068. */
  4069. function baseClamp(number, lower, upper) {
  4070. if (number === number) {
  4071. if (upper !== undefined) {
  4072. number = number <= upper ? number : upper;
  4073. }
  4074. if (lower !== undefined) {
  4075. number = number >= lower ? number : lower;
  4076. }
  4077. }
  4078. return number;
  4079. }
  4080. /**
  4081. * The base implementation of `_.clone` and `_.cloneDeep` which tracks
  4082. * traversed objects.
  4083. *
  4084. * @private
  4085. * @param {*} value The value to clone.
  4086. * @param {boolean} bitmask The bitmask flags.
  4087. * 1 - Deep clone
  4088. * 2 - Flatten inherited properties
  4089. * 4 - Clone symbols
  4090. * @param {Function} [customizer] The function to customize cloning.
  4091. * @param {string} [key] The key of `value`.
  4092. * @param {Object} [object] The parent object of `value`.
  4093. * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
  4094. * @returns {*} Returns the cloned value.
  4095. */
  4096. function baseClone(value, bitmask, customizer, key, object, stack) {
  4097. var result,
  4098. isDeep = bitmask & CLONE_DEEP_FLAG,
  4099. isFlat = bitmask & CLONE_FLAT_FLAG,
  4100. isFull = bitmask & CLONE_SYMBOLS_FLAG;
  4101. if (customizer) {
  4102. result = object ? customizer(value, key, object, stack) : customizer(value);
  4103. }
  4104. if (result !== undefined) {
  4105. return result;
  4106. }
  4107. if (!isObject(value)) {
  4108. return value;
  4109. }
  4110. var isArr = isArray(value);
  4111. if (isArr) {
  4112. result = initCloneArray(value);
  4113. if (!isDeep) {
  4114. return copyArray(value, result);
  4115. }
  4116. } else {
  4117. var tag = getTag(value),
  4118. isFunc = tag == funcTag || tag == genTag;
  4119. if (isBuffer(value)) {
  4120. return cloneBuffer(value, isDeep);
  4121. }
  4122. if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
  4123. result = (isFlat || isFunc) ? {} : initCloneObject(value);
  4124. if (!isDeep) {
  4125. return isFlat
  4126. ? copySymbolsIn(value, baseAssignIn(result, value))
  4127. : copySymbols(value, baseAssign(result, value));
  4128. }
  4129. } else {
  4130. if (!cloneableTags[tag]) {
  4131. return object ? value : {};
  4132. }
  4133. result = initCloneByTag(value, tag, isDeep);
  4134. }
  4135. }
  4136. // Check for circular references and return its corresponding clone.
  4137. stack || (stack = new Stack);
  4138. var stacked = stack.get(value);
  4139. if (stacked) {
  4140. return stacked;
  4141. }
  4142. stack.set(value, result);
  4143. if (isSet(value)) {
  4144. value.forEach(function(subValue) {
  4145. result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
  4146. });
  4147. } else if (isMap(value)) {
  4148. value.forEach(function(subValue, key) {
  4149. result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
  4150. });
  4151. }
  4152. var keysFunc = isFull
  4153. ? (isFlat ? getAllKeysIn : getAllKeys)
  4154. : (isFlat ? keysIn : keys);
  4155. var props = isArr ? undefined : keysFunc(value);
  4156. arrayEach(props || value, function(subValue, key) {
  4157. if (props) {
  4158. key = subValue;
  4159. subValue = value[key];
  4160. }
  4161. // Recursively populate clone (susceptible to call stack limits).
  4162. assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
  4163. });
  4164. return result;
  4165. }
  4166. /**
  4167. * The base implementation of `_.conforms` which doesn't clone `source`.
  4168. *
  4169. * @private
  4170. * @param {Object} source The object of property predicates to conform to.
  4171. * @returns {Function} Returns the new spec function.
  4172. */
  4173. function baseConforms(source) {
  4174. var props = keys(source);
  4175. return function(object) {
  4176. return baseConformsTo(object, source, props);
  4177. };
  4178. }
  4179. /**
  4180. * The base implementation of `_.conformsTo` which accepts `props` to check.
  4181. *
  4182. * @private
  4183. * @param {Object} object The object to inspect.
  4184. * @param {Object} source The object of property predicates to conform to.
  4185. * @returns {boolean} Returns `true` if `object` conforms, else `false`.
  4186. */
  4187. function baseConformsTo(object, source, props) {
  4188. var length = props.length;
  4189. if (object == null) {
  4190. return !length;
  4191. }
  4192. object = Object(object);
  4193. while (length--) {
  4194. var key = props[length],
  4195. predicate = source[key],
  4196. value = object[key];
  4197. if ((value === undefined && !(key in object)) || !predicate(value)) {
  4198. return false;
  4199. }
  4200. }
  4201. return true;
  4202. }
  4203. /**
  4204. * The base implementation of `_.delay` and `_.defer` which accepts `args`
  4205. * to provide to `func`.
  4206. *
  4207. * @private
  4208. * @param {Function} func The function to delay.
  4209. * @param {number} wait The number of milliseconds to delay invocation.
  4210. * @param {Array} args The arguments to provide to `func`.
  4211. * @returns {number|Object} Returns the timer id or timeout object.
  4212. */
  4213. function baseDelay(func, wait, args) {
  4214. if (typeof func != 'function') {
  4215. throw new TypeError(FUNC_ERROR_TEXT);
  4216. }
  4217. return setTimeout(function() { func.apply(undefined, args); }, wait);
  4218. }
  4219. /**
  4220. * The base implementation of methods like `_.difference` without support
  4221. * for excluding multiple arrays or iteratee shorthands.
  4222. *
  4223. * @private
  4224. * @param {Array} array The array to inspect.
  4225. * @param {Array} values The values to exclude.
  4226. * @param {Function} [iteratee] The iteratee invoked per element.
  4227. * @param {Function} [comparator] The comparator invoked per element.
  4228. * @returns {Array} Returns the new array of filtered values.
  4229. */
  4230. function baseDifference(array, values, iteratee, comparator) {
  4231. var index = -1,
  4232. includes = arrayIncludes,
  4233. isCommon = true,
  4234. length = array.length,
  4235. result = [],
  4236. valuesLength = values.length;
  4237. if (!length) {
  4238. return result;
  4239. }
  4240. if (iteratee) {
  4241. values = arrayMap(values, baseUnary(iteratee));
  4242. }
  4243. if (comparator) {
  4244. includes = arrayIncludesWith;
  4245. isCommon = false;
  4246. }
  4247. else if (values.length >= LARGE_ARRAY_SIZE) {
  4248. includes = cacheHas;
  4249. isCommon = false;
  4250. values = new SetCache(values);
  4251. }
  4252. outer:
  4253. while (++index < length) {
  4254. var value = array[index],
  4255. computed = iteratee == null ? value : iteratee(value);
  4256. value = (comparator || value !== 0) ? value : 0;
  4257. if (isCommon && computed === computed) {
  4258. var valuesIndex = valuesLength;
  4259. while (valuesIndex--) {
  4260. if (values[valuesIndex] === computed) {
  4261. continue outer;
  4262. }
  4263. }
  4264. result.push(value);
  4265. }
  4266. else if (!includes(values, computed, comparator)) {
  4267. result.push(value);
  4268. }
  4269. }
  4270. return result;
  4271. }
  4272. /**
  4273. * The base implementation of `_.forEach` without support for iteratee shorthands.
  4274. *
  4275. * @private
  4276. * @param {Array|Object} collection The collection to iterate over.
  4277. * @param {Function} iteratee The function invoked per iteration.
  4278. * @returns {Array|Object} Returns `collection`.
  4279. */
  4280. var baseEach = createBaseEach(baseForOwn);
  4281. /**
  4282. * The base implementation of `_.forEachRight` without support for iteratee shorthands.
  4283. *
  4284. * @private
  4285. * @param {Array|Object} collection The collection to iterate over.
  4286. * @param {Function} iteratee The function invoked per iteration.
  4287. * @returns {Array|Object} Returns `collection`.
  4288. */
  4289. var baseEachRight = createBaseEach(baseForOwnRight, true);
  4290. /**
  4291. * The base implementation of `_.every` without support for iteratee shorthands.
  4292. *
  4293. * @private
  4294. * @param {Array|Object} collection The collection to iterate over.
  4295. * @param {Function} predicate The function invoked per iteration.
  4296. * @returns {boolean} Returns `true` if all elements pass the predicate check,
  4297. * else `false`
  4298. */
  4299. function baseEvery(collection, predicate) {
  4300. var result = true;
  4301. baseEach(collection, function(value, index, collection) {
  4302. result = !!predicate(value, index, collection);
  4303. return result;
  4304. });
  4305. return result;
  4306. }
  4307. /**
  4308. * The base implementation of methods like `_.max` and `_.min` which accepts a
  4309. * `comparator` to determine the extremum value.
  4310. *
  4311. * @private
  4312. * @param {Array} array The array to iterate over.
  4313. * @param {Function} iteratee The iteratee invoked per iteration.
  4314. * @param {Function} comparator The comparator used to compare values.
  4315. * @returns {*} Returns the extremum value.
  4316. */
  4317. function baseExtremum(array, iteratee, comparator) {
  4318. var index = -1,
  4319. length = array.length;
  4320. while (++index < length) {
  4321. var value = array[index],
  4322. current = iteratee(value);
  4323. if (current != null && (computed === undefined
  4324. ? (current === current && !isSymbol(current))
  4325. : comparator(current, computed)
  4326. )) {
  4327. var computed = current,
  4328. result = value;
  4329. }
  4330. }
  4331. return result;
  4332. }
  4333. /**
  4334. * The base implementation of `_.fill` without an iteratee call guard.
  4335. *
  4336. * @private
  4337. * @param {Array} array The array to fill.
  4338. * @param {*} value The value to fill `array` with.
  4339. * @param {number} [start=0] The start position.
  4340. * @param {number} [end=array.length] The end position.
  4341. * @returns {Array} Returns `array`.
  4342. */
  4343. function baseFill(array, value, start, end) {
  4344. var length = array.length;
  4345. start = toInteger(start);
  4346. if (start < 0) {
  4347. start = -start > length ? 0 : (length + start);
  4348. }
  4349. end = (end === undefined || end > length) ? length : toInteger(end);
  4350. if (end < 0) {
  4351. end += length;
  4352. }
  4353. end = start > end ? 0 : toLength(end);
  4354. while (start < end) {
  4355. array[start++] = value;
  4356. }
  4357. return array;
  4358. }
  4359. /**
  4360. * The base implementation of `_.filter` without support for iteratee shorthands.
  4361. *
  4362. * @private
  4363. * @param {Array|Object} collection The collection to iterate over.
  4364. * @param {Function} predicate The function invoked per iteration.
  4365. * @returns {Array} Returns the new filtered array.
  4366. */
  4367. function baseFilter(collection, predicate) {
  4368. var result = [];
  4369. baseEach(collection, function(value, index, collection) {
  4370. if (predicate(value, index, collection)) {
  4371. result.push(value);
  4372. }
  4373. });
  4374. return result;
  4375. }
  4376. /**
  4377. * The base implementation of `_.flatten` with support for restricting flattening.
  4378. *
  4379. * @private
  4380. * @param {Array} array The array to flatten.
  4381. * @param {number} depth The maximum recursion depth.
  4382. * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
  4383. * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
  4384. * @param {Array} [result=[]] The initial result value.
  4385. * @returns {Array} Returns the new flattened array.
  4386. */
  4387. function baseFlatten(array, depth, predicate, isStrict, result) {
  4388. var index = -1,
  4389. length = array.length;
  4390. predicate || (predicate = isFlattenable);
  4391. result || (result = []);
  4392. while (++index < length) {
  4393. var value = array[index];
  4394. if (depth > 0 && predicate(value)) {
  4395. if (depth > 1) {
  4396. // Recursively flatten arrays (susceptible to call stack limits).
  4397. baseFlatten(value, depth - 1, predicate, isStrict, result);
  4398. } else {
  4399. arrayPush(result, value);
  4400. }
  4401. } else if (!isStrict) {
  4402. result[result.length] = value;
  4403. }
  4404. }
  4405. return result;
  4406. }
  4407. /**
  4408. * The base implementation of `baseForOwn` which iterates over `object`
  4409. * properties returned by `keysFunc` and invokes `iteratee` for each property.
  4410. * Iteratee functions may exit iteration early by explicitly returning `false`.
  4411. *
  4412. * @private
  4413. * @param {Object} object The object to iterate over.
  4414. * @param {Function} iteratee The function invoked per iteration.
  4415. * @param {Function} keysFunc The function to get the keys of `object`.
  4416. * @returns {Object} Returns `object`.
  4417. */
  4418. var baseFor = createBaseFor();
  4419. /**
  4420. * This function is like `baseFor` except that it iterates over properties
  4421. * in the opposite order.
  4422. *
  4423. * @private
  4424. * @param {Object} object The object to iterate over.
  4425. * @param {Function} iteratee The function invoked per iteration.
  4426. * @param {Function} keysFunc The function to get the keys of `object`.
  4427. * @returns {Object} Returns `object`.
  4428. */
  4429. var baseForRight = createBaseFor(true);
  4430. /**
  4431. * The base implementation of `_.forOwn` without support for iteratee shorthands.
  4432. *
  4433. * @private
  4434. * @param {Object} object The object to iterate over.
  4435. * @param {Function} iteratee The function invoked per iteration.
  4436. * @returns {Object} Returns `object`.
  4437. */
  4438. function baseForOwn(object, iteratee) {
  4439. return object && baseFor(object, iteratee, keys);
  4440. }
  4441. /**
  4442. * The base implementation of `_.forOwnRight` without support for iteratee shorthands.
  4443. *
  4444. * @private
  4445. * @param {Object} object The object to iterate over.
  4446. * @param {Function} iteratee The function invoked per iteration.
  4447. * @returns {Object} Returns `object`.
  4448. */
  4449. function baseForOwnRight(object, iteratee) {
  4450. return object && baseForRight(object, iteratee, keys);
  4451. }
  4452. /**
  4453. * The base implementation of `_.functions` which creates an array of
  4454. * `object` function property names filtered from `props`.
  4455. *
  4456. * @private
  4457. * @param {Object} object The object to inspect.
  4458. * @param {Array} props The property names to filter.
  4459. * @returns {Array} Returns the function names.
  4460. */
  4461. function baseFunctions(object, props) {
  4462. return arrayFilter(props, function(key) {
  4463. return isFunction(object[key]);
  4464. });
  4465. }
  4466. /**
  4467. * The base implementation of `_.get` without support for default values.
  4468. *
  4469. * @private
  4470. * @param {Object} object The object to query.
  4471. * @param {Array|string} path The path of the property to get.
  4472. * @returns {*} Returns the resolved value.
  4473. */
  4474. function baseGet(object, path) {
  4475. path = castPath(path, object);
  4476. var index = 0,
  4477. length = path.length;
  4478. while (object != null && index < length) {
  4479. object = object[toKey(path[index++])];
  4480. }
  4481. return (index && index == length) ? object : undefined;
  4482. }
  4483. /**
  4484. * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
  4485. * `keysFunc` and `symbolsFunc` to get the enumerable property names and
  4486. * symbols of `object`.
  4487. *
  4488. * @private
  4489. * @param {Object} object The object to query.
  4490. * @param {Function} keysFunc The function to get the keys of `object`.
  4491. * @param {Function} symbolsFunc The function to get the symbols of `object`.
  4492. * @returns {Array} Returns the array of property names and symbols.
  4493. */
  4494. function baseGetAllKeys(object, keysFunc, symbolsFunc) {
  4495. var result = keysFunc(object);
  4496. return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
  4497. }
  4498. /**
  4499. * The base implementation of `getTag` without fallbacks for buggy environments.
  4500. *
  4501. * @private
  4502. * @param {*} value The value to query.
  4503. * @returns {string} Returns the `toStringTag`.
  4504. */
  4505. function baseGetTag(value) {
  4506. if (value == null) {
  4507. return value === undefined ? undefinedTag : nullTag;
  4508. }
  4509. return (symToStringTag && symToStringTag in Object(value))
  4510. ? getRawTag(value)
  4511. : objectToString(value);
  4512. }
  4513. /**
  4514. * The base implementation of `_.gt` which doesn't coerce arguments.
  4515. *
  4516. * @private
  4517. * @param {*} value The value to compare.
  4518. * @param {*} other The other value to compare.
  4519. * @returns {boolean} Returns `true` if `value` is greater than `other`,
  4520. * else `false`.
  4521. */
  4522. function baseGt(value, other) {
  4523. return value > other;
  4524. }
  4525. /**
  4526. * The base implementation of `_.has` without support for deep paths.
  4527. *
  4528. * @private
  4529. * @param {Object} [object] The object to query.
  4530. * @param {Array|string} key The key to check.
  4531. * @returns {boolean} Returns `true` if `key` exists, else `false`.
  4532. */
  4533. function baseHas(object, key) {
  4534. return object != null && hasOwnProperty.call(object, key);
  4535. }
  4536. /**
  4537. * The base implementation of `_.hasIn` without support for deep paths.
  4538. *
  4539. * @private
  4540. * @param {Object} [object] The object to query.
  4541. * @param {Array|string} key The key to check.
  4542. * @returns {boolean} Returns `true` if `key` exists, else `false`.
  4543. */
  4544. function baseHasIn(object, key) {
  4545. return object != null && key in Object(object);
  4546. }
  4547. /**
  4548. * The base implementation of `_.inRange` which doesn't coerce arguments.
  4549. *
  4550. * @private
  4551. * @param {number} number The number to check.
  4552. * @param {number} start The start of the range.
  4553. * @param {number} end The end of the range.
  4554. * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
  4555. */
  4556. function baseInRange(number, start, end) {
  4557. return number >= nativeMin(start, end) && number < nativeMax(start, end);
  4558. }
  4559. /**
  4560. * The base implementation of methods like `_.intersection`, without support
  4561. * for iteratee shorthands, that accepts an array of arrays to inspect.
  4562. *
  4563. * @private
  4564. * @param {Array} arrays The arrays to inspect.
  4565. * @param {Function} [iteratee] The iteratee invoked per element.
  4566. * @param {Function} [comparator] The comparator invoked per element.
  4567. * @returns {Array} Returns the new array of shared values.
  4568. */
  4569. function baseIntersection(arrays, iteratee, comparator) {
  4570. var includes = comparator ? arrayIncludesWith : arrayIncludes,
  4571. length = arrays[0].length,
  4572. othLength = arrays.length,
  4573. othIndex = othLength,
  4574. caches = Array(othLength),
  4575. maxLength = Infinity,
  4576. result = [];
  4577. while (othIndex--) {
  4578. var array = arrays[othIndex];
  4579. if (othIndex && iteratee) {
  4580. array = arrayMap(array, baseUnary(iteratee));
  4581. }
  4582. maxLength = nativeMin(array.length, maxLength);
  4583. caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
  4584. ? new SetCache(othIndex && array)
  4585. : undefined;
  4586. }
  4587. array = arrays[0];
  4588. var index = -1,
  4589. seen = caches[0];
  4590. outer:
  4591. while (++index < length && result.length < maxLength) {
  4592. var value = array[index],
  4593. computed = iteratee ? iteratee(value) : value;
  4594. value = (comparator || value !== 0) ? value : 0;
  4595. if (!(seen
  4596. ? cacheHas(seen, computed)
  4597. : includes(result, computed, comparator)
  4598. )) {
  4599. othIndex = othLength;
  4600. while (--othIndex) {
  4601. var cache = caches[othIndex];
  4602. if (!(cache
  4603. ? cacheHas(cache, computed)
  4604. : includes(arrays[othIndex], computed, comparator))
  4605. ) {
  4606. continue outer;
  4607. }
  4608. }
  4609. if (seen) {
  4610. seen.push(computed);
  4611. }
  4612. result.push(value);
  4613. }
  4614. }
  4615. return result;
  4616. }
  4617. /**
  4618. * The base implementation of `_.invert` and `_.invertBy` which inverts
  4619. * `object` with values transformed by `iteratee` and set by `setter`.
  4620. *
  4621. * @private
  4622. * @param {Object} object The object to iterate over.
  4623. * @param {Function} setter The function to set `accumulator` values.
  4624. * @param {Function} iteratee The iteratee to transform values.
  4625. * @param {Object} accumulator The initial inverted object.
  4626. * @returns {Function} Returns `accumulator`.
  4627. */
  4628. function baseInverter(object, setter, iteratee, accumulator) {
  4629. baseForOwn(object, function(value, key, object) {
  4630. setter(accumulator, iteratee(value), key, object);
  4631. });
  4632. return accumulator;
  4633. }
  4634. /**
  4635. * The base implementation of `_.invoke` without support for individual
  4636. * method arguments.
  4637. *
  4638. * @private
  4639. * @param {Object} object The object to query.
  4640. * @param {Array|string} path The path of the method to invoke.
  4641. * @param {Array} args The arguments to invoke the method with.
  4642. * @returns {*} Returns the result of the invoked method.
  4643. */
  4644. function baseInvoke(object, path, args) {
  4645. path = castPath(path, object);
  4646. object = parent(object, path);
  4647. var func = object == null ? object : object[toKey(last(path))];
  4648. return func == null ? undefined : apply(func, object, args);
  4649. }
  4650. /**
  4651. * The base implementation of `_.isArguments`.
  4652. *
  4653. * @private
  4654. * @param {*} value The value to check.
  4655. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  4656. */
  4657. function baseIsArguments(value) {
  4658. return isObjectLike(value) && baseGetTag(value) == argsTag;
  4659. }
  4660. /**
  4661. * The base implementation of `_.isArrayBuffer` without Node.js optimizations.
  4662. *
  4663. * @private
  4664. * @param {*} value The value to check.
  4665. * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
  4666. */
  4667. function baseIsArrayBuffer(value) {
  4668. return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
  4669. }
  4670. /**
  4671. * The base implementation of `_.isDate` without Node.js optimizations.
  4672. *
  4673. * @private
  4674. * @param {*} value The value to check.
  4675. * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
  4676. */
  4677. function baseIsDate(value) {
  4678. return isObjectLike(value) && baseGetTag(value) == dateTag;
  4679. }
  4680. /**
  4681. * The base implementation of `_.isEqual` which supports partial comparisons
  4682. * and tracks traversed objects.
  4683. *
  4684. * @private
  4685. * @param {*} value The value to compare.
  4686. * @param {*} other The other value to compare.
  4687. * @param {boolean} bitmask The bitmask flags.
  4688. * 1 - Unordered comparison
  4689. * 2 - Partial comparison
  4690. * @param {Function} [customizer] The function to customize comparisons.
  4691. * @param {Object} [stack] Tracks traversed `value` and `other` objects.
  4692. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  4693. */
  4694. function baseIsEqual(value, other, bitmask, customizer, stack) {
  4695. if (value === other) {
  4696. return true;
  4697. }
  4698. if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
  4699. return value !== value && other !== other;
  4700. }
  4701. return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
  4702. }
  4703. /**
  4704. * A specialized version of `baseIsEqual` for arrays and objects which performs
  4705. * deep comparisons and tracks traversed objects enabling objects with circular
  4706. * references to be compared.
  4707. *
  4708. * @private
  4709. * @param {Object} object The object to compare.
  4710. * @param {Object} other The other object to compare.
  4711. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  4712. * @param {Function} customizer The function to customize comparisons.
  4713. * @param {Function} equalFunc The function to determine equivalents of values.
  4714. * @param {Object} [stack] Tracks traversed `object` and `other` objects.
  4715. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  4716. */
  4717. function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
  4718. var objIsArr = isArray(object),
  4719. othIsArr = isArray(other),
  4720. objTag = objIsArr ? arrayTag : getTag(object),
  4721. othTag = othIsArr ? arrayTag : getTag(other);
  4722. objTag = objTag == argsTag ? objectTag : objTag;
  4723. othTag = othTag == argsTag ? objectTag : othTag;
  4724. var objIsObj = objTag == objectTag,
  4725. othIsObj = othTag == objectTag,
  4726. isSameTag = objTag == othTag;
  4727. if (isSameTag && isBuffer(object)) {
  4728. if (!isBuffer(other)) {
  4729. return false;
  4730. }
  4731. objIsArr = true;
  4732. objIsObj = false;
  4733. }
  4734. if (isSameTag && !objIsObj) {
  4735. stack || (stack = new Stack);
  4736. return (objIsArr || isTypedArray(object))
  4737. ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
  4738. : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
  4739. }
  4740. if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
  4741. var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
  4742. othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
  4743. if (objIsWrapped || othIsWrapped) {
  4744. var objUnwrapped = objIsWrapped ? object.value() : object,
  4745. othUnwrapped = othIsWrapped ? other.value() : other;
  4746. stack || (stack = new Stack);
  4747. return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
  4748. }
  4749. }
  4750. if (!isSameTag) {
  4751. return false;
  4752. }
  4753. stack || (stack = new Stack);
  4754. return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
  4755. }
  4756. /**
  4757. * The base implementation of `_.isMap` without Node.js optimizations.
  4758. *
  4759. * @private
  4760. * @param {*} value The value to check.
  4761. * @returns {boolean} Returns `true` if `value` is a map, else `false`.
  4762. */
  4763. function baseIsMap(value) {
  4764. return isObjectLike(value) && getTag(value) == mapTag;
  4765. }
  4766. /**
  4767. * The base implementation of `_.isMatch` without support for iteratee shorthands.
  4768. *
  4769. * @private
  4770. * @param {Object} object The object to inspect.
  4771. * @param {Object} source The object of property values to match.
  4772. * @param {Array} matchData The property names, values, and compare flags to match.
  4773. * @param {Function} [customizer] The function to customize comparisons.
  4774. * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  4775. */
  4776. function baseIsMatch(object, source, matchData, customizer) {
  4777. var index = matchData.length,
  4778. length = index,
  4779. noCustomizer = !customizer;
  4780. if (object == null) {
  4781. return !length;
  4782. }
  4783. object = Object(object);
  4784. while (index--) {
  4785. var data = matchData[index];
  4786. if ((noCustomizer && data[2])
  4787. ? data[1] !== object[data[0]]
  4788. : !(data[0] in object)
  4789. ) {
  4790. return false;
  4791. }
  4792. }
  4793. while (++index < length) {
  4794. data = matchData[index];
  4795. var key = data[0],
  4796. objValue = object[key],
  4797. srcValue = data[1];
  4798. if (noCustomizer && data[2]) {
  4799. if (objValue === undefined && !(key in object)) {
  4800. return false;
  4801. }
  4802. } else {
  4803. var stack = new Stack;
  4804. if (customizer) {
  4805. var result = customizer(objValue, srcValue, key, object, source, stack);
  4806. }
  4807. if (!(result === undefined
  4808. ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
  4809. : result
  4810. )) {
  4811. return false;
  4812. }
  4813. }
  4814. }
  4815. return true;
  4816. }
  4817. /**
  4818. * The base implementation of `_.isNative` without bad shim checks.
  4819. *
  4820. * @private
  4821. * @param {*} value The value to check.
  4822. * @returns {boolean} Returns `true` if `value` is a native function,
  4823. * else `false`.
  4824. */
  4825. function baseIsNative(value) {
  4826. if (!isObject(value) || isMasked(value)) {
  4827. return false;
  4828. }
  4829. var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
  4830. return pattern.test(toSource(value));
  4831. }
  4832. /**
  4833. * The base implementation of `_.isRegExp` without Node.js optimizations.
  4834. *
  4835. * @private
  4836. * @param {*} value The value to check.
  4837. * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
  4838. */
  4839. function baseIsRegExp(value) {
  4840. return isObjectLike(value) && baseGetTag(value) == regexpTag;
  4841. }
  4842. /**
  4843. * The base implementation of `_.isSet` without Node.js optimizations.
  4844. *
  4845. * @private
  4846. * @param {*} value The value to check.
  4847. * @returns {boolean} Returns `true` if `value` is a set, else `false`.
  4848. */
  4849. function baseIsSet(value) {
  4850. return isObjectLike(value) && getTag(value) == setTag;
  4851. }
  4852. /**
  4853. * The base implementation of `_.isTypedArray` without Node.js optimizations.
  4854. *
  4855. * @private
  4856. * @param {*} value The value to check.
  4857. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  4858. */
  4859. function baseIsTypedArray(value) {
  4860. return isObjectLike(value) &&
  4861. isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
  4862. }
  4863. /**
  4864. * The base implementation of `_.iteratee`.
  4865. *
  4866. * @private
  4867. * @param {*} [value=_.identity] The value to convert to an iteratee.
  4868. * @returns {Function} Returns the iteratee.
  4869. */
  4870. function baseIteratee(value) {
  4871. // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
  4872. // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
  4873. if (typeof value == 'function') {
  4874. return value;
  4875. }
  4876. if (value == null) {
  4877. return identity;
  4878. }
  4879. if (typeof value == 'object') {
  4880. return isArray(value)
  4881. ? baseMatchesProperty(value[0], value[1])
  4882. : baseMatches(value);
  4883. }
  4884. return property(value);
  4885. }
  4886. /**
  4887. * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
  4888. *
  4889. * @private
  4890. * @param {Object} object The object to query.
  4891. * @returns {Array} Returns the array of property names.
  4892. */
  4893. function baseKeys(object) {
  4894. if (!isPrototype(object)) {
  4895. return nativeKeys(object);
  4896. }
  4897. var result = [];
  4898. for (var key in Object(object)) {
  4899. if (hasOwnProperty.call(object, key) && key != 'constructor') {
  4900. result.push(key);
  4901. }
  4902. }
  4903. return result;
  4904. }
  4905. /**
  4906. * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
  4907. *
  4908. * @private
  4909. * @param {Object} object The object to query.
  4910. * @returns {Array} Returns the array of property names.
  4911. */
  4912. function baseKeysIn(object) {
  4913. if (!isObject(object)) {
  4914. return nativeKeysIn(object);
  4915. }
  4916. var isProto = isPrototype(object),
  4917. result = [];
  4918. for (var key in object) {
  4919. if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
  4920. result.push(key);
  4921. }
  4922. }
  4923. return result;
  4924. }
  4925. /**
  4926. * The base implementation of `_.lt` which doesn't coerce arguments.
  4927. *
  4928. * @private
  4929. * @param {*} value The value to compare.
  4930. * @param {*} other The other value to compare.
  4931. * @returns {boolean} Returns `true` if `value` is less than `other`,
  4932. * else `false`.
  4933. */
  4934. function baseLt(value, other) {
  4935. return value < other;
  4936. }
  4937. /**
  4938. * The base implementation of `_.map` without support for iteratee shorthands.
  4939. *
  4940. * @private
  4941. * @param {Array|Object} collection The collection to iterate over.
  4942. * @param {Function} iteratee The function invoked per iteration.
  4943. * @returns {Array} Returns the new mapped array.
  4944. */
  4945. function baseMap(collection, iteratee) {
  4946. var index = -1,
  4947. result = isArrayLike(collection) ? Array(collection.length) : [];
  4948. baseEach(collection, function(value, key, collection) {
  4949. result[++index] = iteratee(value, key, collection);
  4950. });
  4951. return result;
  4952. }
  4953. /**
  4954. * The base implementation of `_.matches` which doesn't clone `source`.
  4955. *
  4956. * @private
  4957. * @param {Object} source The object of property values to match.
  4958. * @returns {Function} Returns the new spec function.
  4959. */
  4960. function baseMatches(source) {
  4961. var matchData = getMatchData(source);
  4962. if (matchData.length == 1 && matchData[0][2]) {
  4963. return matchesStrictComparable(matchData[0][0], matchData[0][1]);
  4964. }
  4965. return function(object) {
  4966. return object === source || baseIsMatch(object, source, matchData);
  4967. };
  4968. }
  4969. /**
  4970. * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
  4971. *
  4972. * @private
  4973. * @param {string} path The path of the property to get.
  4974. * @param {*} srcValue The value to match.
  4975. * @returns {Function} Returns the new spec function.
  4976. */
  4977. function baseMatchesProperty(path, srcValue) {
  4978. if (isKey(path) && isStrictComparable(srcValue)) {
  4979. return matchesStrictComparable(toKey(path), srcValue);
  4980. }
  4981. return function(object) {
  4982. var objValue = get(object, path);
  4983. return (objValue === undefined && objValue === srcValue)
  4984. ? hasIn(object, path)
  4985. : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
  4986. };
  4987. }
  4988. /**
  4989. * The base implementation of `_.merge` without support for multiple sources.
  4990. *
  4991. * @private
  4992. * @param {Object} object The destination object.
  4993. * @param {Object} source The source object.
  4994. * @param {number} srcIndex The index of `source`.
  4995. * @param {Function} [customizer] The function to customize merged values.
  4996. * @param {Object} [stack] Tracks traversed source values and their merged
  4997. * counterparts.
  4998. */
  4999. function baseMerge(object, source, srcIndex, customizer, stack) {
  5000. if (object === source) {
  5001. return;
  5002. }
  5003. baseFor(source, function(srcValue, key) {
  5004. stack || (stack = new Stack);
  5005. if (isObject(srcValue)) {
  5006. baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
  5007. }
  5008. else {
  5009. var newValue = customizer
  5010. ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
  5011. : undefined;
  5012. if (newValue === undefined) {
  5013. newValue = srcValue;
  5014. }
  5015. assignMergeValue(object, key, newValue);
  5016. }
  5017. }, keysIn);
  5018. }
  5019. /**
  5020. * A specialized version of `baseMerge` for arrays and objects which performs
  5021. * deep merges and tracks traversed objects enabling objects with circular
  5022. * references to be merged.
  5023. *
  5024. * @private
  5025. * @param {Object} object The destination object.
  5026. * @param {Object} source The source object.
  5027. * @param {string} key The key of the value to merge.
  5028. * @param {number} srcIndex The index of `source`.
  5029. * @param {Function} mergeFunc The function to merge values.
  5030. * @param {Function} [customizer] The function to customize assigned values.
  5031. * @param {Object} [stack] Tracks traversed source values and their merged
  5032. * counterparts.
  5033. */
  5034. function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
  5035. var objValue = safeGet(object, key),
  5036. srcValue = safeGet(source, key),
  5037. stacked = stack.get(srcValue);
  5038. if (stacked) {
  5039. assignMergeValue(object, key, stacked);
  5040. return;
  5041. }
  5042. var newValue = customizer
  5043. ? customizer(objValue, srcValue, (key + ''), object, source, stack)
  5044. : undefined;
  5045. var isCommon = newValue === undefined;
  5046. if (isCommon) {
  5047. var isArr = isArray(srcValue),
  5048. isBuff = !isArr && isBuffer(srcValue),
  5049. isTyped = !isArr && !isBuff && isTypedArray(srcValue);
  5050. newValue = srcValue;
  5051. if (isArr || isBuff || isTyped) {
  5052. if (isArray(objValue)) {
  5053. newValue = objValue;
  5054. }
  5055. else if (isArrayLikeObject(objValue)) {
  5056. newValue = copyArray(objValue);
  5057. }
  5058. else if (isBuff) {
  5059. isCommon = false;
  5060. newValue = cloneBuffer(srcValue, true);
  5061. }
  5062. else if (isTyped) {
  5063. isCommon = false;
  5064. newValue = cloneTypedArray(srcValue, true);
  5065. }
  5066. else {
  5067. newValue = [];
  5068. }
  5069. }
  5070. else if (isPlainObject(srcValue) || isArguments(srcValue)) {
  5071. newValue = objValue;
  5072. if (isArguments(objValue)) {
  5073. newValue = toPlainObject(objValue);
  5074. }
  5075. else if (!isObject(objValue) || isFunction(objValue)) {
  5076. newValue = initCloneObject(srcValue);
  5077. }
  5078. }
  5079. else {
  5080. isCommon = false;
  5081. }
  5082. }
  5083. if (isCommon) {
  5084. // Recursively merge objects and arrays (susceptible to call stack limits).
  5085. stack.set(srcValue, newValue);
  5086. mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
  5087. stack['delete'](srcValue);
  5088. }
  5089. assignMergeValue(object, key, newValue);
  5090. }
  5091. /**
  5092. * The base implementation of `_.nth` which doesn't coerce arguments.
  5093. *
  5094. * @private
  5095. * @param {Array} array The array to query.
  5096. * @param {number} n The index of the element to return.
  5097. * @returns {*} Returns the nth element of `array`.
  5098. */
  5099. function baseNth(array, n) {
  5100. var length = array.length;
  5101. if (!length) {
  5102. return;
  5103. }
  5104. n += n < 0 ? length : 0;
  5105. return isIndex(n, length) ? array[n] : undefined;
  5106. }
  5107. /**
  5108. * The base implementation of `_.orderBy` without param guards.
  5109. *
  5110. * @private
  5111. * @param {Array|Object} collection The collection to iterate over.
  5112. * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
  5113. * @param {string[]} orders The sort orders of `iteratees`.
  5114. * @returns {Array} Returns the new sorted array.
  5115. */
  5116. function baseOrderBy(collection, iteratees, orders) {
  5117. if (iteratees.length) {
  5118. iteratees = arrayMap(iteratees, function(iteratee) {
  5119. if (isArray(iteratee)) {
  5120. return function(value) {
  5121. return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
  5122. }
  5123. }
  5124. return iteratee;
  5125. });
  5126. } else {
  5127. iteratees = [identity];
  5128. }
  5129. var index = -1;
  5130. iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
  5131. var result = baseMap(collection, function(value, key, collection) {
  5132. var criteria = arrayMap(iteratees, function(iteratee) {
  5133. return iteratee(value);
  5134. });
  5135. return { 'criteria': criteria, 'index': ++index, 'value': value };
  5136. });
  5137. return baseSortBy(result, function(object, other) {
  5138. return compareMultiple(object, other, orders);
  5139. });
  5140. }
  5141. /**
  5142. * The base implementation of `_.pick` without support for individual
  5143. * property identifiers.
  5144. *
  5145. * @private
  5146. * @param {Object} object The source object.
  5147. * @param {string[]} paths The property paths to pick.
  5148. * @returns {Object} Returns the new object.
  5149. */
  5150. function basePick(object, paths) {
  5151. return basePickBy(object, paths, function(value, path) {
  5152. return hasIn(object, path);
  5153. });
  5154. }
  5155. /**
  5156. * The base implementation of `_.pickBy` without support for iteratee shorthands.
  5157. *
  5158. * @private
  5159. * @param {Object} object The source object.
  5160. * @param {string[]} paths The property paths to pick.
  5161. * @param {Function} predicate The function invoked per property.
  5162. * @returns {Object} Returns the new object.
  5163. */
  5164. function basePickBy(object, paths, predicate) {
  5165. var index = -1,
  5166. length = paths.length,
  5167. result = {};
  5168. while (++index < length) {
  5169. var path = paths[index],
  5170. value = baseGet(object, path);
  5171. if (predicate(value, path)) {
  5172. baseSet(result, castPath(path, object), value);
  5173. }
  5174. }
  5175. return result;
  5176. }
  5177. /**
  5178. * A specialized version of `baseProperty` which supports deep paths.
  5179. *
  5180. * @private
  5181. * @param {Array|string} path The path of the property to get.
  5182. * @returns {Function} Returns the new accessor function.
  5183. */
  5184. function basePropertyDeep(path) {
  5185. return function(object) {
  5186. return baseGet(object, path);
  5187. };
  5188. }
  5189. /**
  5190. * The base implementation of `_.pullAllBy` without support for iteratee
  5191. * shorthands.
  5192. *
  5193. * @private
  5194. * @param {Array} array The array to modify.
  5195. * @param {Array} values The values to remove.
  5196. * @param {Function} [iteratee] The iteratee invoked per element.
  5197. * @param {Function} [comparator] The comparator invoked per element.
  5198. * @returns {Array} Returns `array`.
  5199. */
  5200. function basePullAll(array, values, iteratee, comparator) {
  5201. var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
  5202. index = -1,
  5203. length = values.length,
  5204. seen = array;
  5205. if (array === values) {
  5206. values = copyArray(values);
  5207. }
  5208. if (iteratee) {
  5209. seen = arrayMap(array, baseUnary(iteratee));
  5210. }
  5211. while (++index < length) {
  5212. var fromIndex = 0,
  5213. value = values[index],
  5214. computed = iteratee ? iteratee(value) : value;
  5215. while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
  5216. if (seen !== array) {
  5217. splice.call(seen, fromIndex, 1);
  5218. }
  5219. splice.call(array, fromIndex, 1);
  5220. }
  5221. }
  5222. return array;
  5223. }
  5224. /**
  5225. * The base implementation of `_.pullAt` without support for individual
  5226. * indexes or capturing the removed elements.
  5227. *
  5228. * @private
  5229. * @param {Array} array The array to modify.
  5230. * @param {number[]} indexes The indexes of elements to remove.
  5231. * @returns {Array} Returns `array`.
  5232. */
  5233. function basePullAt(array, indexes) {
  5234. var length = array ? indexes.length : 0,
  5235. lastIndex = length - 1;
  5236. while (length--) {
  5237. var index = indexes[length];
  5238. if (length == lastIndex || index !== previous) {
  5239. var previous = index;
  5240. if (isIndex(index)) {
  5241. splice.call(array, index, 1);
  5242. } else {
  5243. baseUnset(array, index);
  5244. }
  5245. }
  5246. }
  5247. return array;
  5248. }
  5249. /**
  5250. * The base implementation of `_.random` without support for returning
  5251. * floating-point numbers.
  5252. *
  5253. * @private
  5254. * @param {number} lower The lower bound.
  5255. * @param {number} upper The upper bound.
  5256. * @returns {number} Returns the random number.
  5257. */
  5258. function baseRandom(lower, upper) {
  5259. return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
  5260. }
  5261. /**
  5262. * The base implementation of `_.range` and `_.rangeRight` which doesn't
  5263. * coerce arguments.
  5264. *
  5265. * @private
  5266. * @param {number} start The start of the range.
  5267. * @param {number} end The end of the range.
  5268. * @param {number} step The value to increment or decrement by.
  5269. * @param {boolean} [fromRight] Specify iterating from right to left.
  5270. * @returns {Array} Returns the range of numbers.
  5271. */
  5272. function baseRange(start, end, step, fromRight) {
  5273. var index = -1,
  5274. length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
  5275. result = Array(length);
  5276. while (length--) {
  5277. result[fromRight ? length : ++index] = start;
  5278. start += step;
  5279. }
  5280. return result;
  5281. }
  5282. /**
  5283. * The base implementation of `_.repeat` which doesn't coerce arguments.
  5284. *
  5285. * @private
  5286. * @param {string} string The string to repeat.
  5287. * @param {number} n The number of times to repeat the string.
  5288. * @returns {string} Returns the repeated string.
  5289. */
  5290. function baseRepeat(string, n) {
  5291. var result = '';
  5292. if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
  5293. return result;
  5294. }
  5295. // Leverage the exponentiation by squaring algorithm for a faster repeat.
  5296. // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
  5297. do {
  5298. if (n % 2) {
  5299. result += string;
  5300. }
  5301. n = nativeFloor(n / 2);
  5302. if (n) {
  5303. string += string;
  5304. }
  5305. } while (n);
  5306. return result;
  5307. }
  5308. /**
  5309. * The base implementation of `_.rest` which doesn't validate or coerce arguments.
  5310. *
  5311. * @private
  5312. * @param {Function} func The function to apply a rest parameter to.
  5313. * @param {number} [start=func.length-1] The start position of the rest parameter.
  5314. * @returns {Function} Returns the new function.
  5315. */
  5316. function baseRest(func, start) {
  5317. return setToString(overRest(func, start, identity), func + '');
  5318. }
  5319. /**
  5320. * The base implementation of `_.sample`.
  5321. *
  5322. * @private
  5323. * @param {Array|Object} collection The collection to sample.
  5324. * @returns {*} Returns the random element.
  5325. */
  5326. function baseSample(collection) {
  5327. return arraySample(values(collection));
  5328. }
  5329. /**
  5330. * The base implementation of `_.sampleSize` without param guards.
  5331. *
  5332. * @private
  5333. * @param {Array|Object} collection The collection to sample.
  5334. * @param {number} n The number of elements to sample.
  5335. * @returns {Array} Returns the random elements.
  5336. */
  5337. function baseSampleSize(collection, n) {
  5338. var array = values(collection);
  5339. return shuffleSelf(array, baseClamp(n, 0, array.length));
  5340. }
  5341. /**
  5342. * The base implementation of `_.set`.
  5343. *
  5344. * @private
  5345. * @param {Object} object The object to modify.
  5346. * @param {Array|string} path The path of the property to set.
  5347. * @param {*} value The value to set.
  5348. * @param {Function} [customizer] The function to customize path creation.
  5349. * @returns {Object} Returns `object`.
  5350. */
  5351. function baseSet(object, path, value, customizer) {
  5352. if (!isObject(object)) {
  5353. return object;
  5354. }
  5355. path = castPath(path, object);
  5356. var index = -1,
  5357. length = path.length,
  5358. lastIndex = length - 1,
  5359. nested = object;
  5360. while (nested != null && ++index < length) {
  5361. var key = toKey(path[index]),
  5362. newValue = value;
  5363. if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
  5364. return object;
  5365. }
  5366. if (index != lastIndex) {
  5367. var objValue = nested[key];
  5368. newValue = customizer ? customizer(objValue, key, nested) : undefined;
  5369. if (newValue === undefined) {
  5370. newValue = isObject(objValue)
  5371. ? objValue
  5372. : (isIndex(path[index + 1]) ? [] : {});
  5373. }
  5374. }
  5375. assignValue(nested, key, newValue);
  5376. nested = nested[key];
  5377. }
  5378. return object;
  5379. }
  5380. /**
  5381. * The base implementation of `setData` without support for hot loop shorting.
  5382. *
  5383. * @private
  5384. * @param {Function} func The function to associate metadata with.
  5385. * @param {*} data The metadata.
  5386. * @returns {Function} Returns `func`.
  5387. */
  5388. var baseSetData = !metaMap ? identity : function(func, data) {
  5389. metaMap.set(func, data);
  5390. return func;
  5391. };
  5392. /**
  5393. * The base implementation of `setToString` without support for hot loop shorting.
  5394. *
  5395. * @private
  5396. * @param {Function} func The function to modify.
  5397. * @param {Function} string The `toString` result.
  5398. * @returns {Function} Returns `func`.
  5399. */
  5400. var baseSetToString = !defineProperty ? identity : function(func, string) {
  5401. return defineProperty(func, 'toString', {
  5402. 'configurable': true,
  5403. 'enumerable': false,
  5404. 'value': constant(string),
  5405. 'writable': true
  5406. });
  5407. };
  5408. /**
  5409. * The base implementation of `_.shuffle`.
  5410. *
  5411. * @private
  5412. * @param {Array|Object} collection The collection to shuffle.
  5413. * @returns {Array} Returns the new shuffled array.
  5414. */
  5415. function baseShuffle(collection) {
  5416. return shuffleSelf(values(collection));
  5417. }
  5418. /**
  5419. * The base implementation of `_.slice` without an iteratee call guard.
  5420. *
  5421. * @private
  5422. * @param {Array} array The array to slice.
  5423. * @param {number} [start=0] The start position.
  5424. * @param {number} [end=array.length] The end position.
  5425. * @returns {Array} Returns the slice of `array`.
  5426. */
  5427. function baseSlice(array, start, end) {
  5428. var index = -1,
  5429. length = array.length;
  5430. if (start < 0) {
  5431. start = -start > length ? 0 : (length + start);
  5432. }
  5433. end = end > length ? length : end;
  5434. if (end < 0) {
  5435. end += length;
  5436. }
  5437. length = start > end ? 0 : ((end - start) >>> 0);
  5438. start >>>= 0;
  5439. var result = Array(length);
  5440. while (++index < length) {
  5441. result[index] = array[index + start];
  5442. }
  5443. return result;
  5444. }
  5445. /**
  5446. * The base implementation of `_.some` without support for iteratee shorthands.
  5447. *
  5448. * @private
  5449. * @param {Array|Object} collection The collection to iterate over.
  5450. * @param {Function} predicate The function invoked per iteration.
  5451. * @returns {boolean} Returns `true` if any element passes the predicate check,
  5452. * else `false`.
  5453. */
  5454. function baseSome(collection, predicate) {
  5455. var result;
  5456. baseEach(collection, function(value, index, collection) {
  5457. result = predicate(value, index, collection);
  5458. return !result;
  5459. });
  5460. return !!result;
  5461. }
  5462. /**
  5463. * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
  5464. * performs a binary search of `array` to determine the index at which `value`
  5465. * should be inserted into `array` in order to maintain its sort order.
  5466. *
  5467. * @private
  5468. * @param {Array} array The sorted array to inspect.
  5469. * @param {*} value The value to evaluate.
  5470. * @param {boolean} [retHighest] Specify returning the highest qualified index.
  5471. * @returns {number} Returns the index at which `value` should be inserted
  5472. * into `array`.
  5473. */
  5474. function baseSortedIndex(array, value, retHighest) {
  5475. var low = 0,
  5476. high = array == null ? low : array.length;
  5477. if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
  5478. while (low < high) {
  5479. var mid = (low + high) >>> 1,
  5480. computed = array[mid];
  5481. if (computed !== null && !isSymbol(computed) &&
  5482. (retHighest ? (computed <= value) : (computed < value))) {
  5483. low = mid + 1;
  5484. } else {
  5485. high = mid;
  5486. }
  5487. }
  5488. return high;
  5489. }
  5490. return baseSortedIndexBy(array, value, identity, retHighest);
  5491. }
  5492. /**
  5493. * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
  5494. * which invokes `iteratee` for `value` and each element of `array` to compute
  5495. * their sort ranking. The iteratee is invoked with one argument; (value).
  5496. *
  5497. * @private
  5498. * @param {Array} array The sorted array to inspect.
  5499. * @param {*} value The value to evaluate.
  5500. * @param {Function} iteratee The iteratee invoked per element.
  5501. * @param {boolean} [retHighest] Specify returning the highest qualified index.
  5502. * @returns {number} Returns the index at which `value` should be inserted
  5503. * into `array`.
  5504. */
  5505. function baseSortedIndexBy(array, value, iteratee, retHighest) {
  5506. var low = 0,
  5507. high = array == null ? 0 : array.length;
  5508. if (high === 0) {
  5509. return 0;
  5510. }
  5511. value = iteratee(value);
  5512. var valIsNaN = value !== value,
  5513. valIsNull = value === null,
  5514. valIsSymbol = isSymbol(value),
  5515. valIsUndefined = value === undefined;
  5516. while (low < high) {
  5517. var mid = nativeFloor((low + high) / 2),
  5518. computed = iteratee(array[mid]),
  5519. othIsDefined = computed !== undefined,
  5520. othIsNull = computed === null,
  5521. othIsReflexive = computed === computed,
  5522. othIsSymbol = isSymbol(computed);
  5523. if (valIsNaN) {
  5524. var setLow = retHighest || othIsReflexive;
  5525. } else if (valIsUndefined) {
  5526. setLow = othIsReflexive && (retHighest || othIsDefined);
  5527. } else if (valIsNull) {
  5528. setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
  5529. } else if (valIsSymbol) {
  5530. setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
  5531. } else if (othIsNull || othIsSymbol) {
  5532. setLow = false;
  5533. } else {
  5534. setLow = retHighest ? (computed <= value) : (computed < value);
  5535. }
  5536. if (setLow) {
  5537. low = mid + 1;
  5538. } else {
  5539. high = mid;
  5540. }
  5541. }
  5542. return nativeMin(high, MAX_ARRAY_INDEX);
  5543. }
  5544. /**
  5545. * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
  5546. * support for iteratee shorthands.
  5547. *
  5548. * @private
  5549. * @param {Array} array The array to inspect.
  5550. * @param {Function} [iteratee] The iteratee invoked per element.
  5551. * @returns {Array} Returns the new duplicate free array.
  5552. */
  5553. function baseSortedUniq(array, iteratee) {
  5554. var index = -1,
  5555. length = array.length,
  5556. resIndex = 0,
  5557. result = [];
  5558. while (++index < length) {
  5559. var value = array[index],
  5560. computed = iteratee ? iteratee(value) : value;
  5561. if (!index || !eq(computed, seen)) {
  5562. var seen = computed;
  5563. result[resIndex++] = value === 0 ? 0 : value;
  5564. }
  5565. }
  5566. return result;
  5567. }
  5568. /**
  5569. * The base implementation of `_.toNumber` which doesn't ensure correct
  5570. * conversions of binary, hexadecimal, or octal string values.
  5571. *
  5572. * @private
  5573. * @param {*} value The value to process.
  5574. * @returns {number} Returns the number.
  5575. */
  5576. function baseToNumber(value) {
  5577. if (typeof value == 'number') {
  5578. return value;
  5579. }
  5580. if (isSymbol(value)) {
  5581. return NAN;
  5582. }
  5583. return +value;
  5584. }
  5585. /**
  5586. * The base implementation of `_.toString` which doesn't convert nullish
  5587. * values to empty strings.
  5588. *
  5589. * @private
  5590. * @param {*} value The value to process.
  5591. * @returns {string} Returns the string.
  5592. */
  5593. function baseToString(value) {
  5594. // Exit early for strings to avoid a performance hit in some environments.
  5595. if (typeof value == 'string') {
  5596. return value;
  5597. }
  5598. if (isArray(value)) {
  5599. // Recursively convert values (susceptible to call stack limits).
  5600. return arrayMap(value, baseToString) + '';
  5601. }
  5602. if (isSymbol(value)) {
  5603. return symbolToString ? symbolToString.call(value) : '';
  5604. }
  5605. var result = (value + '');
  5606. return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
  5607. }
  5608. /**
  5609. * The base implementation of `_.uniqBy` without support for iteratee shorthands.
  5610. *
  5611. * @private
  5612. * @param {Array} array The array to inspect.
  5613. * @param {Function} [iteratee] The iteratee invoked per element.
  5614. * @param {Function} [comparator] The comparator invoked per element.
  5615. * @returns {Array} Returns the new duplicate free array.
  5616. */
  5617. function baseUniq(array, iteratee, comparator) {
  5618. var index = -1,
  5619. includes = arrayIncludes,
  5620. length = array.length,
  5621. isCommon = true,
  5622. result = [],
  5623. seen = result;
  5624. if (comparator) {
  5625. isCommon = false;
  5626. includes = arrayIncludesWith;
  5627. }
  5628. else if (length >= LARGE_ARRAY_SIZE) {
  5629. var set = iteratee ? null : createSet(array);
  5630. if (set) {
  5631. return setToArray(set);
  5632. }
  5633. isCommon = false;
  5634. includes = cacheHas;
  5635. seen = new SetCache;
  5636. }
  5637. else {
  5638. seen = iteratee ? [] : result;
  5639. }
  5640. outer:
  5641. while (++index < length) {
  5642. var value = array[index],
  5643. computed = iteratee ? iteratee(value) : value;
  5644. value = (comparator || value !== 0) ? value : 0;
  5645. if (isCommon && computed === computed) {
  5646. var seenIndex = seen.length;
  5647. while (seenIndex--) {
  5648. if (seen[seenIndex] === computed) {
  5649. continue outer;
  5650. }
  5651. }
  5652. if (iteratee) {
  5653. seen.push(computed);
  5654. }
  5655. result.push(value);
  5656. }
  5657. else if (!includes(seen, computed, comparator)) {
  5658. if (seen !== result) {
  5659. seen.push(computed);
  5660. }
  5661. result.push(value);
  5662. }
  5663. }
  5664. return result;
  5665. }
  5666. /**
  5667. * The base implementation of `_.unset`.
  5668. *
  5669. * @private
  5670. * @param {Object} object The object to modify.
  5671. * @param {Array|string} path The property path to unset.
  5672. * @returns {boolean} Returns `true` if the property is deleted, else `false`.
  5673. */
  5674. function baseUnset(object, path) {
  5675. path = castPath(path, object);
  5676. object = parent(object, path);
  5677. return object == null || delete object[toKey(last(path))];
  5678. }
  5679. /**
  5680. * The base implementation of `_.update`.
  5681. *
  5682. * @private
  5683. * @param {Object} object The object to modify.
  5684. * @param {Array|string} path The path of the property to update.
  5685. * @param {Function} updater The function to produce the updated value.
  5686. * @param {Function} [customizer] The function to customize path creation.
  5687. * @returns {Object} Returns `object`.
  5688. */
  5689. function baseUpdate(object, path, updater, customizer) {
  5690. return baseSet(object, path, updater(baseGet(object, path)), customizer);
  5691. }
  5692. /**
  5693. * The base implementation of methods like `_.dropWhile` and `_.takeWhile`
  5694. * without support for iteratee shorthands.
  5695. *
  5696. * @private
  5697. * @param {Array} array The array to query.
  5698. * @param {Function} predicate The function invoked per iteration.
  5699. * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
  5700. * @param {boolean} [fromRight] Specify iterating from right to left.
  5701. * @returns {Array} Returns the slice of `array`.
  5702. */
  5703. function baseWhile(array, predicate, isDrop, fromRight) {
  5704. var length = array.length,
  5705. index = fromRight ? length : -1;
  5706. while ((fromRight ? index-- : ++index < length) &&
  5707. predicate(array[index], index, array)) {}
  5708. return isDrop
  5709. ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
  5710. : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
  5711. }
  5712. /**
  5713. * The base implementation of `wrapperValue` which returns the result of
  5714. * performing a sequence of actions on the unwrapped `value`, where each
  5715. * successive action is supplied the return value of the previous.
  5716. *
  5717. * @private
  5718. * @param {*} value The unwrapped value.
  5719. * @param {Array} actions Actions to perform to resolve the unwrapped value.
  5720. * @returns {*} Returns the resolved value.
  5721. */
  5722. function baseWrapperValue(value, actions) {
  5723. var result = value;
  5724. if (result instanceof LazyWrapper) {
  5725. result = result.value();
  5726. }
  5727. return arrayReduce(actions, function(result, action) {
  5728. return action.func.apply(action.thisArg, arrayPush([result], action.args));
  5729. }, result);
  5730. }
  5731. /**
  5732. * The base implementation of methods like `_.xor`, without support for
  5733. * iteratee shorthands, that accepts an array of arrays to inspect.
  5734. *
  5735. * @private
  5736. * @param {Array} arrays The arrays to inspect.
  5737. * @param {Function} [iteratee] The iteratee invoked per element.
  5738. * @param {Function} [comparator] The comparator invoked per element.
  5739. * @returns {Array} Returns the new array of values.
  5740. */
  5741. function baseXor(arrays, iteratee, comparator) {
  5742. var length = arrays.length;
  5743. if (length < 2) {
  5744. return length ? baseUniq(arrays[0]) : [];
  5745. }
  5746. var index = -1,
  5747. result = Array(length);
  5748. while (++index < length) {
  5749. var array = arrays[index],
  5750. othIndex = -1;
  5751. while (++othIndex < length) {
  5752. if (othIndex != index) {
  5753. result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
  5754. }
  5755. }
  5756. }
  5757. return baseUniq(baseFlatten(result, 1), iteratee, comparator);
  5758. }
  5759. /**
  5760. * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
  5761. *
  5762. * @private
  5763. * @param {Array} props The property identifiers.
  5764. * @param {Array} values The property values.
  5765. * @param {Function} assignFunc The function to assign values.
  5766. * @returns {Object} Returns the new object.
  5767. */
  5768. function baseZipObject(props, values, assignFunc) {
  5769. var index = -1,
  5770. length = props.length,
  5771. valsLength = values.length,
  5772. result = {};
  5773. while (++index < length) {
  5774. var value = index < valsLength ? values[index] : undefined;
  5775. assignFunc(result, props[index], value);
  5776. }
  5777. return result;
  5778. }
  5779. /**
  5780. * Casts `value` to an empty array if it's not an array like object.
  5781. *
  5782. * @private
  5783. * @param {*} value The value to inspect.
  5784. * @returns {Array|Object} Returns the cast array-like object.
  5785. */
  5786. function castArrayLikeObject(value) {
  5787. return isArrayLikeObject(value) ? value : [];
  5788. }
  5789. /**
  5790. * Casts `value` to `identity` if it's not a function.
  5791. *
  5792. * @private
  5793. * @param {*} value The value to inspect.
  5794. * @returns {Function} Returns cast function.
  5795. */
  5796. function castFunction(value) {
  5797. return typeof value == 'function' ? value : identity;
  5798. }
  5799. /**
  5800. * Casts `value` to a path array if it's not one.
  5801. *
  5802. * @private
  5803. * @param {*} value The value to inspect.
  5804. * @param {Object} [object] The object to query keys on.
  5805. * @returns {Array} Returns the cast property path array.
  5806. */
  5807. function castPath(value, object) {
  5808. if (isArray(value)) {
  5809. return value;
  5810. }
  5811. return isKey(value, object) ? [value] : stringToPath(toString(value));
  5812. }
  5813. /**
  5814. * A `baseRest` alias which can be replaced with `identity` by module
  5815. * replacement plugins.
  5816. *
  5817. * @private
  5818. * @type {Function}
  5819. * @param {Function} func The function to apply a rest parameter to.
  5820. * @returns {Function} Returns the new function.
  5821. */
  5822. var castRest = baseRest;
  5823. /**
  5824. * Casts `array` to a slice if it's needed.
  5825. *
  5826. * @private
  5827. * @param {Array} array The array to inspect.
  5828. * @param {number} start The start position.
  5829. * @param {number} [end=array.length] The end position.
  5830. * @returns {Array} Returns the cast slice.
  5831. */
  5832. function castSlice(array, start, end) {
  5833. var length = array.length;
  5834. end = end === undefined ? length : end;
  5835. return (!start && end >= length) ? array : baseSlice(array, start, end);
  5836. }
  5837. /**
  5838. * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).
  5839. *
  5840. * @private
  5841. * @param {number|Object} id The timer id or timeout object of the timer to clear.
  5842. */
  5843. var clearTimeout = ctxClearTimeout || function(id) {
  5844. return root.clearTimeout(id);
  5845. };
  5846. /**
  5847. * Creates a clone of `buffer`.
  5848. *
  5849. * @private
  5850. * @param {Buffer} buffer The buffer to clone.
  5851. * @param {boolean} [isDeep] Specify a deep clone.
  5852. * @returns {Buffer} Returns the cloned buffer.
  5853. */
  5854. function cloneBuffer(buffer, isDeep) {
  5855. if (isDeep) {
  5856. return buffer.slice();
  5857. }
  5858. var length = buffer.length,
  5859. result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
  5860. buffer.copy(result);
  5861. return result;
  5862. }
  5863. /**
  5864. * Creates a clone of `arrayBuffer`.
  5865. *
  5866. * @private
  5867. * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
  5868. * @returns {ArrayBuffer} Returns the cloned array buffer.
  5869. */
  5870. function cloneArrayBuffer(arrayBuffer) {
  5871. var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
  5872. new Uint8Array(result).set(new Uint8Array(arrayBuffer));
  5873. return result;
  5874. }
  5875. /**
  5876. * Creates a clone of `dataView`.
  5877. *
  5878. * @private
  5879. * @param {Object} dataView The data view to clone.
  5880. * @param {boolean} [isDeep] Specify a deep clone.
  5881. * @returns {Object} Returns the cloned data view.
  5882. */
  5883. function cloneDataView(dataView, isDeep) {
  5884. var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
  5885. return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
  5886. }
  5887. /**
  5888. * Creates a clone of `regexp`.
  5889. *
  5890. * @private
  5891. * @param {Object} regexp The regexp to clone.
  5892. * @returns {Object} Returns the cloned regexp.
  5893. */
  5894. function cloneRegExp(regexp) {
  5895. var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
  5896. result.lastIndex = regexp.lastIndex;
  5897. return result;
  5898. }
  5899. /**
  5900. * Creates a clone of the `symbol` object.
  5901. *
  5902. * @private
  5903. * @param {Object} symbol The symbol object to clone.
  5904. * @returns {Object} Returns the cloned symbol object.
  5905. */
  5906. function cloneSymbol(symbol) {
  5907. return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
  5908. }
  5909. /**
  5910. * Creates a clone of `typedArray`.
  5911. *
  5912. * @private
  5913. * @param {Object} typedArray The typed array to clone.
  5914. * @param {boolean} [isDeep] Specify a deep clone.
  5915. * @returns {Object} Returns the cloned typed array.
  5916. */
  5917. function cloneTypedArray(typedArray, isDeep) {
  5918. var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
  5919. return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
  5920. }
  5921. /**
  5922. * Compares values to sort them in ascending order.
  5923. *
  5924. * @private
  5925. * @param {*} value The value to compare.
  5926. * @param {*} other The other value to compare.
  5927. * @returns {number} Returns the sort order indicator for `value`.
  5928. */
  5929. function compareAscending(value, other) {
  5930. if (value !== other) {
  5931. var valIsDefined = value !== undefined,
  5932. valIsNull = value === null,
  5933. valIsReflexive = value === value,
  5934. valIsSymbol = isSymbol(value);
  5935. var othIsDefined = other !== undefined,
  5936. othIsNull = other === null,
  5937. othIsReflexive = other === other,
  5938. othIsSymbol = isSymbol(other);
  5939. if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
  5940. (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
  5941. (valIsNull && othIsDefined && othIsReflexive) ||
  5942. (!valIsDefined && othIsReflexive) ||
  5943. !valIsReflexive) {
  5944. return 1;
  5945. }
  5946. if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
  5947. (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
  5948. (othIsNull && valIsDefined && valIsReflexive) ||
  5949. (!othIsDefined && valIsReflexive) ||
  5950. !othIsReflexive) {
  5951. return -1;
  5952. }
  5953. }
  5954. return 0;
  5955. }
  5956. /**
  5957. * Used by `_.orderBy` to compare multiple properties of a value to another
  5958. * and stable sort them.
  5959. *
  5960. * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
  5961. * specify an order of "desc" for descending or "asc" for ascending sort order
  5962. * of corresponding values.
  5963. *
  5964. * @private
  5965. * @param {Object} object The object to compare.
  5966. * @param {Object} other The other object to compare.
  5967. * @param {boolean[]|string[]} orders The order to sort by for each property.
  5968. * @returns {number} Returns the sort order indicator for `object`.
  5969. */
  5970. function compareMultiple(object, other, orders) {
  5971. var index = -1,
  5972. objCriteria = object.criteria,
  5973. othCriteria = other.criteria,
  5974. length = objCriteria.length,
  5975. ordersLength = orders.length;
  5976. while (++index < length) {
  5977. var result = compareAscending(objCriteria[index], othCriteria[index]);
  5978. if (result) {
  5979. if (index >= ordersLength) {
  5980. return result;
  5981. }
  5982. var order = orders[index];
  5983. return result * (order == 'desc' ? -1 : 1);
  5984. }
  5985. }
  5986. // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
  5987. // that causes it, under certain circumstances, to provide the same value for
  5988. // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
  5989. // for more details.
  5990. //
  5991. // This also ensures a stable sort in V8 and other engines.
  5992. // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
  5993. return object.index - other.index;
  5994. }
  5995. /**
  5996. * Creates an array that is the composition of partially applied arguments,
  5997. * placeholders, and provided arguments into a single array of arguments.
  5998. *
  5999. * @private
  6000. * @param {Array} args The provided arguments.
  6001. * @param {Array} partials The arguments to prepend to those provided.
  6002. * @param {Array} holders The `partials` placeholder indexes.
  6003. * @params {boolean} [isCurried] Specify composing for a curried function.
  6004. * @returns {Array} Returns the new array of composed arguments.
  6005. */
  6006. function composeArgs(args, partials, holders, isCurried) {
  6007. var argsIndex = -1,
  6008. argsLength = args.length,
  6009. holdersLength = holders.length,
  6010. leftIndex = -1,
  6011. leftLength = partials.length,
  6012. rangeLength = nativeMax(argsLength - holdersLength, 0),
  6013. result = Array(leftLength + rangeLength),
  6014. isUncurried = !isCurried;
  6015. while (++leftIndex < leftLength) {
  6016. result[leftIndex] = partials[leftIndex];
  6017. }
  6018. while (++argsIndex < holdersLength) {
  6019. if (isUncurried || argsIndex < argsLength) {
  6020. result[holders[argsIndex]] = args[argsIndex];
  6021. }
  6022. }
  6023. while (rangeLength--) {
  6024. result[leftIndex++] = args[argsIndex++];
  6025. }
  6026. return result;
  6027. }
  6028. /**
  6029. * This function is like `composeArgs` except that the arguments composition
  6030. * is tailored for `_.partialRight`.
  6031. *
  6032. * @private
  6033. * @param {Array} args The provided arguments.
  6034. * @param {Array} partials The arguments to append to those provided.
  6035. * @param {Array} holders The `partials` placeholder indexes.
  6036. * @params {boolean} [isCurried] Specify composing for a curried function.
  6037. * @returns {Array} Returns the new array of composed arguments.
  6038. */
  6039. function composeArgsRight(args, partials, holders, isCurried) {
  6040. var argsIndex = -1,
  6041. argsLength = args.length,
  6042. holdersIndex = -1,
  6043. holdersLength = holders.length,
  6044. rightIndex = -1,
  6045. rightLength = partials.length,
  6046. rangeLength = nativeMax(argsLength - holdersLength, 0),
  6047. result = Array(rangeLength + rightLength),
  6048. isUncurried = !isCurried;
  6049. while (++argsIndex < rangeLength) {
  6050. result[argsIndex] = args[argsIndex];
  6051. }
  6052. var offset = argsIndex;
  6053. while (++rightIndex < rightLength) {
  6054. result[offset + rightIndex] = partials[rightIndex];
  6055. }
  6056. while (++holdersIndex < holdersLength) {
  6057. if (isUncurried || argsIndex < argsLength) {
  6058. result[offset + holders[holdersIndex]] = args[argsIndex++];
  6059. }
  6060. }
  6061. return result;
  6062. }
  6063. /**
  6064. * Copies the values of `source` to `array`.
  6065. *
  6066. * @private
  6067. * @param {Array} source The array to copy values from.
  6068. * @param {Array} [array=[]] The array to copy values to.
  6069. * @returns {Array} Returns `array`.
  6070. */
  6071. function copyArray(source, array) {
  6072. var index = -1,
  6073. length = source.length;
  6074. array || (array = Array(length));
  6075. while (++index < length) {
  6076. array[index] = source[index];
  6077. }
  6078. return array;
  6079. }
  6080. /**
  6081. * Copies properties of `source` to `object`.
  6082. *
  6083. * @private
  6084. * @param {Object} source The object to copy properties from.
  6085. * @param {Array} props The property identifiers to copy.
  6086. * @param {Object} [object={}] The object to copy properties to.
  6087. * @param {Function} [customizer] The function to customize copied values.
  6088. * @returns {Object} Returns `object`.
  6089. */
  6090. function copyObject(source, props, object, customizer) {
  6091. var isNew = !object;
  6092. object || (object = {});
  6093. var index = -1,
  6094. length = props.length;
  6095. while (++index < length) {
  6096. var key = props[index];
  6097. var newValue = customizer
  6098. ? customizer(object[key], source[key], key, object, source)
  6099. : undefined;
  6100. if (newValue === undefined) {
  6101. newValue = source[key];
  6102. }
  6103. if (isNew) {
  6104. baseAssignValue(object, key, newValue);
  6105. } else {
  6106. assignValue(object, key, newValue);
  6107. }
  6108. }
  6109. return object;
  6110. }
  6111. /**
  6112. * Copies own symbols of `source` to `object`.
  6113. *
  6114. * @private
  6115. * @param {Object} source The object to copy symbols from.
  6116. * @param {Object} [object={}] The object to copy symbols to.
  6117. * @returns {Object} Returns `object`.
  6118. */
  6119. function copySymbols(source, object) {
  6120. return copyObject(source, getSymbols(source), object);
  6121. }
  6122. /**
  6123. * Copies own and inherited symbols of `source` to `object`.
  6124. *
  6125. * @private
  6126. * @param {Object} source The object to copy symbols from.
  6127. * @param {Object} [object={}] The object to copy symbols to.
  6128. * @returns {Object} Returns `object`.
  6129. */
  6130. function copySymbolsIn(source, object) {
  6131. return copyObject(source, getSymbolsIn(source), object);
  6132. }
  6133. /**
  6134. * Creates a function like `_.groupBy`.
  6135. *
  6136. * @private
  6137. * @param {Function} setter The function to set accumulator values.
  6138. * @param {Function} [initializer] The accumulator object initializer.
  6139. * @returns {Function} Returns the new aggregator function.
  6140. */
  6141. function createAggregator(setter, initializer) {
  6142. return function(collection, iteratee) {
  6143. var func = isArray(collection) ? arrayAggregator : baseAggregator,
  6144. accumulator = initializer ? initializer() : {};
  6145. return func(collection, setter, getIteratee(iteratee, 2), accumulator);
  6146. };
  6147. }
  6148. /**
  6149. * Creates a function like `_.assign`.
  6150. *
  6151. * @private
  6152. * @param {Function} assigner The function to assign values.
  6153. * @returns {Function} Returns the new assigner function.
  6154. */
  6155. function createAssigner(assigner) {
  6156. return baseRest(function(object, sources) {
  6157. var index = -1,
  6158. length = sources.length,
  6159. customizer = length > 1 ? sources[length - 1] : undefined,
  6160. guard = length > 2 ? sources[2] : undefined;
  6161. customizer = (assigner.length > 3 && typeof customizer == 'function')
  6162. ? (length--, customizer)
  6163. : undefined;
  6164. if (guard && isIterateeCall(sources[0], sources[1], guard)) {
  6165. customizer = length < 3 ? undefined : customizer;
  6166. length = 1;
  6167. }
  6168. object = Object(object);
  6169. while (++index < length) {
  6170. var source = sources[index];
  6171. if (source) {
  6172. assigner(object, source, index, customizer);
  6173. }
  6174. }
  6175. return object;
  6176. });
  6177. }
  6178. /**
  6179. * Creates a `baseEach` or `baseEachRight` function.
  6180. *
  6181. * @private
  6182. * @param {Function} eachFunc The function to iterate over a collection.
  6183. * @param {boolean} [fromRight] Specify iterating from right to left.
  6184. * @returns {Function} Returns the new base function.
  6185. */
  6186. function createBaseEach(eachFunc, fromRight) {
  6187. return function(collection, iteratee) {
  6188. if (collection == null) {
  6189. return collection;
  6190. }
  6191. if (!isArrayLike(collection)) {
  6192. return eachFunc(collection, iteratee);
  6193. }
  6194. var length = collection.length,
  6195. index = fromRight ? length : -1,
  6196. iterable = Object(collection);
  6197. while ((fromRight ? index-- : ++index < length)) {
  6198. if (iteratee(iterable[index], index, iterable) === false) {
  6199. break;
  6200. }
  6201. }
  6202. return collection;
  6203. };
  6204. }
  6205. /**
  6206. * Creates a base function for methods like `_.forIn` and `_.forOwn`.
  6207. *
  6208. * @private
  6209. * @param {boolean} [fromRight] Specify iterating from right to left.
  6210. * @returns {Function} Returns the new base function.
  6211. */
  6212. function createBaseFor(fromRight) {
  6213. return function(object, iteratee, keysFunc) {
  6214. var index = -1,
  6215. iterable = Object(object),
  6216. props = keysFunc(object),
  6217. length = props.length;
  6218. while (length--) {
  6219. var key = props[fromRight ? length : ++index];
  6220. if (iteratee(iterable[key], key, iterable) === false) {
  6221. break;
  6222. }
  6223. }
  6224. return object;
  6225. };
  6226. }
  6227. /**
  6228. * Creates a function that wraps `func` to invoke it with the optional `this`
  6229. * binding of `thisArg`.
  6230. *
  6231. * @private
  6232. * @param {Function} func The function to wrap.
  6233. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  6234. * @param {*} [thisArg] The `this` binding of `func`.
  6235. * @returns {Function} Returns the new wrapped function.
  6236. */
  6237. function createBind(func, bitmask, thisArg) {
  6238. var isBind = bitmask & WRAP_BIND_FLAG,
  6239. Ctor = createCtor(func);
  6240. function wrapper() {
  6241. var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
  6242. return fn.apply(isBind ? thisArg : this, arguments);
  6243. }
  6244. return wrapper;
  6245. }
  6246. /**
  6247. * Creates a function like `_.lowerFirst`.
  6248. *
  6249. * @private
  6250. * @param {string} methodName The name of the `String` case method to use.
  6251. * @returns {Function} Returns the new case function.
  6252. */
  6253. function createCaseFirst(methodName) {
  6254. return function(string) {
  6255. string = toString(string);
  6256. var strSymbols = hasUnicode(string)
  6257. ? stringToArray(string)
  6258. : undefined;
  6259. var chr = strSymbols
  6260. ? strSymbols[0]
  6261. : string.charAt(0);
  6262. var trailing = strSymbols
  6263. ? castSlice(strSymbols, 1).join('')
  6264. : string.slice(1);
  6265. return chr[methodName]() + trailing;
  6266. };
  6267. }
  6268. /**
  6269. * Creates a function like `_.camelCase`.
  6270. *
  6271. * @private
  6272. * @param {Function} callback The function to combine each word.
  6273. * @returns {Function} Returns the new compounder function.
  6274. */
  6275. function createCompounder(callback) {
  6276. return function(string) {
  6277. return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
  6278. };
  6279. }
  6280. /**
  6281. * Creates a function that produces an instance of `Ctor` regardless of
  6282. * whether it was invoked as part of a `new` expression or by `call` or `apply`.
  6283. *
  6284. * @private
  6285. * @param {Function} Ctor The constructor to wrap.
  6286. * @returns {Function} Returns the new wrapped function.
  6287. */
  6288. function createCtor(Ctor) {
  6289. return function() {
  6290. // Use a `switch` statement to work with class constructors. See
  6291. // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
  6292. // for more details.
  6293. var args = arguments;
  6294. switch (args.length) {
  6295. case 0: return new Ctor;
  6296. case 1: return new Ctor(args[0]);
  6297. case 2: return new Ctor(args[0], args[1]);
  6298. case 3: return new Ctor(args[0], args[1], args[2]);
  6299. case 4: return new Ctor(args[0], args[1], args[2], args[3]);
  6300. case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
  6301. case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
  6302. case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
  6303. }
  6304. var thisBinding = baseCreate(Ctor.prototype),
  6305. result = Ctor.apply(thisBinding, args);
  6306. // Mimic the constructor's `return` behavior.
  6307. // See https://es5.github.io/#x13.2.2 for more details.
  6308. return isObject(result) ? result : thisBinding;
  6309. };
  6310. }
  6311. /**
  6312. * Creates a function that wraps `func` to enable currying.
  6313. *
  6314. * @private
  6315. * @param {Function} func The function to wrap.
  6316. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  6317. * @param {number} arity The arity of `func`.
  6318. * @returns {Function} Returns the new wrapped function.
  6319. */
  6320. function createCurry(func, bitmask, arity) {
  6321. var Ctor = createCtor(func);
  6322. function wrapper() {
  6323. var length = arguments.length,
  6324. args = Array(length),
  6325. index = length,
  6326. placeholder = getHolder(wrapper);
  6327. while (index--) {
  6328. args[index] = arguments[index];
  6329. }
  6330. var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
  6331. ? []
  6332. : replaceHolders(args, placeholder);
  6333. length -= holders.length;
  6334. if (length < arity) {
  6335. return createRecurry(
  6336. func, bitmask, createHybrid, wrapper.placeholder, undefined,
  6337. args, holders, undefined, undefined, arity - length);
  6338. }
  6339. var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
  6340. return apply(fn, this, args);
  6341. }
  6342. return wrapper;
  6343. }
  6344. /**
  6345. * Creates a `_.find` or `_.findLast` function.
  6346. *
  6347. * @private
  6348. * @param {Function} findIndexFunc The function to find the collection index.
  6349. * @returns {Function} Returns the new find function.
  6350. */
  6351. function createFind(findIndexFunc) {
  6352. return function(collection, predicate, fromIndex) {
  6353. var iterable = Object(collection);
  6354. if (!isArrayLike(collection)) {
  6355. var iteratee = getIteratee(predicate, 3);
  6356. collection = keys(collection);
  6357. predicate = function(key) { return iteratee(iterable[key], key, iterable); };
  6358. }
  6359. var index = findIndexFunc(collection, predicate, fromIndex);
  6360. return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
  6361. };
  6362. }
  6363. /**
  6364. * Creates a `_.flow` or `_.flowRight` function.
  6365. *
  6366. * @private
  6367. * @param {boolean} [fromRight] Specify iterating from right to left.
  6368. * @returns {Function} Returns the new flow function.
  6369. */
  6370. function createFlow(fromRight) {
  6371. return flatRest(function(funcs) {
  6372. var length = funcs.length,
  6373. index = length,
  6374. prereq = LodashWrapper.prototype.thru;
  6375. if (fromRight) {
  6376. funcs.reverse();
  6377. }
  6378. while (index--) {
  6379. var func = funcs[index];
  6380. if (typeof func != 'function') {
  6381. throw new TypeError(FUNC_ERROR_TEXT);
  6382. }
  6383. if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
  6384. var wrapper = new LodashWrapper([], true);
  6385. }
  6386. }
  6387. index = wrapper ? index : length;
  6388. while (++index < length) {
  6389. func = funcs[index];
  6390. var funcName = getFuncName(func),
  6391. data = funcName == 'wrapper' ? getData(func) : undefined;
  6392. if (data && isLaziable(data[0]) &&
  6393. data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
  6394. !data[4].length && data[9] == 1
  6395. ) {
  6396. wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
  6397. } else {
  6398. wrapper = (func.length == 1 && isLaziable(func))
  6399. ? wrapper[funcName]()
  6400. : wrapper.thru(func);
  6401. }
  6402. }
  6403. return function() {
  6404. var args = arguments,
  6405. value = args[0];
  6406. if (wrapper && args.length == 1 && isArray(value)) {
  6407. return wrapper.plant(value).value();
  6408. }
  6409. var index = 0,
  6410. result = length ? funcs[index].apply(this, args) : value;
  6411. while (++index < length) {
  6412. result = funcs[index].call(this, result);
  6413. }
  6414. return result;
  6415. };
  6416. });
  6417. }
  6418. /**
  6419. * Creates a function that wraps `func` to invoke it with optional `this`
  6420. * binding of `thisArg`, partial application, and currying.
  6421. *
  6422. * @private
  6423. * @param {Function|string} func The function or method name to wrap.
  6424. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  6425. * @param {*} [thisArg] The `this` binding of `func`.
  6426. * @param {Array} [partials] The arguments to prepend to those provided to
  6427. * the new function.
  6428. * @param {Array} [holders] The `partials` placeholder indexes.
  6429. * @param {Array} [partialsRight] The arguments to append to those provided
  6430. * to the new function.
  6431. * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
  6432. * @param {Array} [argPos] The argument positions of the new function.
  6433. * @param {number} [ary] The arity cap of `func`.
  6434. * @param {number} [arity] The arity of `func`.
  6435. * @returns {Function} Returns the new wrapped function.
  6436. */
  6437. function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
  6438. var isAry = bitmask & WRAP_ARY_FLAG,
  6439. isBind = bitmask & WRAP_BIND_FLAG,
  6440. isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
  6441. isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
  6442. isFlip = bitmask & WRAP_FLIP_FLAG,
  6443. Ctor = isBindKey ? undefined : createCtor(func);
  6444. function wrapper() {
  6445. var length = arguments.length,
  6446. args = Array(length),
  6447. index = length;
  6448. while (index--) {
  6449. args[index] = arguments[index];
  6450. }
  6451. if (isCurried) {
  6452. var placeholder = getHolder(wrapper),
  6453. holdersCount = countHolders(args, placeholder);
  6454. }
  6455. if (partials) {
  6456. args = composeArgs(args, partials, holders, isCurried);
  6457. }
  6458. if (partialsRight) {
  6459. args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
  6460. }
  6461. length -= holdersCount;
  6462. if (isCurried && length < arity) {
  6463. var newHolders = replaceHolders(args, placeholder);
  6464. return createRecurry(
  6465. func, bitmask, createHybrid, wrapper.placeholder, thisArg,
  6466. args, newHolders, argPos, ary, arity - length
  6467. );
  6468. }
  6469. var thisBinding = isBind ? thisArg : this,
  6470. fn = isBindKey ? thisBinding[func] : func;
  6471. length = args.length;
  6472. if (argPos) {
  6473. args = reorder(args, argPos);
  6474. } else if (isFlip && length > 1) {
  6475. args.reverse();
  6476. }
  6477. if (isAry && ary < length) {
  6478. args.length = ary;
  6479. }
  6480. if (this && this !== root && this instanceof wrapper) {
  6481. fn = Ctor || createCtor(fn);
  6482. }
  6483. return fn.apply(thisBinding, args);
  6484. }
  6485. return wrapper;
  6486. }
  6487. /**
  6488. * Creates a function like `_.invertBy`.
  6489. *
  6490. * @private
  6491. * @param {Function} setter The function to set accumulator values.
  6492. * @param {Function} toIteratee The function to resolve iteratees.
  6493. * @returns {Function} Returns the new inverter function.
  6494. */
  6495. function createInverter(setter, toIteratee) {
  6496. return function(object, iteratee) {
  6497. return baseInverter(object, setter, toIteratee(iteratee), {});
  6498. };
  6499. }
  6500. /**
  6501. * Creates a function that performs a mathematical operation on two values.
  6502. *
  6503. * @private
  6504. * @param {Function} operator The function to perform the operation.
  6505. * @param {number} [defaultValue] The value used for `undefined` arguments.
  6506. * @returns {Function} Returns the new mathematical operation function.
  6507. */
  6508. function createMathOperation(operator, defaultValue) {
  6509. return function(value, other) {
  6510. var result;
  6511. if (value === undefined && other === undefined) {
  6512. return defaultValue;
  6513. }
  6514. if (value !== undefined) {
  6515. result = value;
  6516. }
  6517. if (other !== undefined) {
  6518. if (result === undefined) {
  6519. return other;
  6520. }
  6521. if (typeof value == 'string' || typeof other == 'string') {
  6522. value = baseToString(value);
  6523. other = baseToString(other);
  6524. } else {
  6525. value = baseToNumber(value);
  6526. other = baseToNumber(other);
  6527. }
  6528. result = operator(value, other);
  6529. }
  6530. return result;
  6531. };
  6532. }
  6533. /**
  6534. * Creates a function like `_.over`.
  6535. *
  6536. * @private
  6537. * @param {Function} arrayFunc The function to iterate over iteratees.
  6538. * @returns {Function} Returns the new over function.
  6539. */
  6540. function createOver(arrayFunc) {
  6541. return flatRest(function(iteratees) {
  6542. iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
  6543. return baseRest(function(args) {
  6544. var thisArg = this;
  6545. return arrayFunc(iteratees, function(iteratee) {
  6546. return apply(iteratee, thisArg, args);
  6547. });
  6548. });
  6549. });
  6550. }
  6551. /**
  6552. * Creates the padding for `string` based on `length`. The `chars` string
  6553. * is truncated if the number of characters exceeds `length`.
  6554. *
  6555. * @private
  6556. * @param {number} length The padding length.
  6557. * @param {string} [chars=' '] The string used as padding.
  6558. * @returns {string} Returns the padding for `string`.
  6559. */
  6560. function createPadding(length, chars) {
  6561. chars = chars === undefined ? ' ' : baseToString(chars);
  6562. var charsLength = chars.length;
  6563. if (charsLength < 2) {
  6564. return charsLength ? baseRepeat(chars, length) : chars;
  6565. }
  6566. var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
  6567. return hasUnicode(chars)
  6568. ? castSlice(stringToArray(result), 0, length).join('')
  6569. : result.slice(0, length);
  6570. }
  6571. /**
  6572. * Creates a function that wraps `func` to invoke it with the `this` binding
  6573. * of `thisArg` and `partials` prepended to the arguments it receives.
  6574. *
  6575. * @private
  6576. * @param {Function} func The function to wrap.
  6577. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  6578. * @param {*} thisArg The `this` binding of `func`.
  6579. * @param {Array} partials The arguments to prepend to those provided to
  6580. * the new function.
  6581. * @returns {Function} Returns the new wrapped function.
  6582. */
  6583. function createPartial(func, bitmask, thisArg, partials) {
  6584. var isBind = bitmask & WRAP_BIND_FLAG,
  6585. Ctor = createCtor(func);
  6586. function wrapper() {
  6587. var argsIndex = -1,
  6588. argsLength = arguments.length,
  6589. leftIndex = -1,
  6590. leftLength = partials.length,
  6591. args = Array(leftLength + argsLength),
  6592. fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
  6593. while (++leftIndex < leftLength) {
  6594. args[leftIndex] = partials[leftIndex];
  6595. }
  6596. while (argsLength--) {
  6597. args[leftIndex++] = arguments[++argsIndex];
  6598. }
  6599. return apply(fn, isBind ? thisArg : this, args);
  6600. }
  6601. return wrapper;
  6602. }
  6603. /**
  6604. * Creates a `_.range` or `_.rangeRight` function.
  6605. *
  6606. * @private
  6607. * @param {boolean} [fromRight] Specify iterating from right to left.
  6608. * @returns {Function} Returns the new range function.
  6609. */
  6610. function createRange(fromRight) {
  6611. return function(start, end, step) {
  6612. if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
  6613. end = step = undefined;
  6614. }
  6615. // Ensure the sign of `-0` is preserved.
  6616. start = toFinite(start);
  6617. if (end === undefined) {
  6618. end = start;
  6619. start = 0;
  6620. } else {
  6621. end = toFinite(end);
  6622. }
  6623. step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
  6624. return baseRange(start, end, step, fromRight);
  6625. };
  6626. }
  6627. /**
  6628. * Creates a function that performs a relational operation on two values.
  6629. *
  6630. * @private
  6631. * @param {Function} operator The function to perform the operation.
  6632. * @returns {Function} Returns the new relational operation function.
  6633. */
  6634. function createRelationalOperation(operator) {
  6635. return function(value, other) {
  6636. if (!(typeof value == 'string' && typeof other == 'string')) {
  6637. value = toNumber(value);
  6638. other = toNumber(other);
  6639. }
  6640. return operator(value, other);
  6641. };
  6642. }
  6643. /**
  6644. * Creates a function that wraps `func` to continue currying.
  6645. *
  6646. * @private
  6647. * @param {Function} func The function to wrap.
  6648. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  6649. * @param {Function} wrapFunc The function to create the `func` wrapper.
  6650. * @param {*} placeholder The placeholder value.
  6651. * @param {*} [thisArg] The `this` binding of `func`.
  6652. * @param {Array} [partials] The arguments to prepend to those provided to
  6653. * the new function.
  6654. * @param {Array} [holders] The `partials` placeholder indexes.
  6655. * @param {Array} [argPos] The argument positions of the new function.
  6656. * @param {number} [ary] The arity cap of `func`.
  6657. * @param {number} [arity] The arity of `func`.
  6658. * @returns {Function} Returns the new wrapped function.
  6659. */
  6660. function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
  6661. var isCurry = bitmask & WRAP_CURRY_FLAG,
  6662. newHolders = isCurry ? holders : undefined,
  6663. newHoldersRight = isCurry ? undefined : holders,
  6664. newPartials = isCurry ? partials : undefined,
  6665. newPartialsRight = isCurry ? undefined : partials;
  6666. bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
  6667. bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
  6668. if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
  6669. bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
  6670. }
  6671. var newData = [
  6672. func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
  6673. newHoldersRight, argPos, ary, arity
  6674. ];
  6675. var result = wrapFunc.apply(undefined, newData);
  6676. if (isLaziable(func)) {
  6677. setData(result, newData);
  6678. }
  6679. result.placeholder = placeholder;
  6680. return setWrapToString(result, func, bitmask);
  6681. }
  6682. /**
  6683. * Creates a function like `_.round`.
  6684. *
  6685. * @private
  6686. * @param {string} methodName The name of the `Math` method to use when rounding.
  6687. * @returns {Function} Returns the new round function.
  6688. */
  6689. function createRound(methodName) {
  6690. var func = Math[methodName];
  6691. return function(number, precision) {
  6692. number = toNumber(number);
  6693. precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
  6694. if (precision && nativeIsFinite(number)) {
  6695. // Shift with exponential notation to avoid floating-point issues.
  6696. // See [MDN](https://mdn.io/round#Examples) for more details.
  6697. var pair = (toString(number) + 'e').split('e'),
  6698. value = func(pair[0] + 'e' + (+pair[1] + precision));
  6699. pair = (toString(value) + 'e').split('e');
  6700. return +(pair[0] + 'e' + (+pair[1] - precision));
  6701. }
  6702. return func(number);
  6703. };
  6704. }
  6705. /**
  6706. * Creates a set object of `values`.
  6707. *
  6708. * @private
  6709. * @param {Array} values The values to add to the set.
  6710. * @returns {Object} Returns the new set.
  6711. */
  6712. var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
  6713. return new Set(values);
  6714. };
  6715. /**
  6716. * Creates a `_.toPairs` or `_.toPairsIn` function.
  6717. *
  6718. * @private
  6719. * @param {Function} keysFunc The function to get the keys of a given object.
  6720. * @returns {Function} Returns the new pairs function.
  6721. */
  6722. function createToPairs(keysFunc) {
  6723. return function(object) {
  6724. var tag = getTag(object);
  6725. if (tag == mapTag) {
  6726. return mapToArray(object);
  6727. }
  6728. if (tag == setTag) {
  6729. return setToPairs(object);
  6730. }
  6731. return baseToPairs(object, keysFunc(object));
  6732. };
  6733. }
  6734. /**
  6735. * Creates a function that either curries or invokes `func` with optional
  6736. * `this` binding and partially applied arguments.
  6737. *
  6738. * @private
  6739. * @param {Function|string} func The function or method name to wrap.
  6740. * @param {number} bitmask The bitmask flags.
  6741. * 1 - `_.bind`
  6742. * 2 - `_.bindKey`
  6743. * 4 - `_.curry` or `_.curryRight` of a bound function
  6744. * 8 - `_.curry`
  6745. * 16 - `_.curryRight`
  6746. * 32 - `_.partial`
  6747. * 64 - `_.partialRight`
  6748. * 128 - `_.rearg`
  6749. * 256 - `_.ary`
  6750. * 512 - `_.flip`
  6751. * @param {*} [thisArg] The `this` binding of `func`.
  6752. * @param {Array} [partials] The arguments to be partially applied.
  6753. * @param {Array} [holders] The `partials` placeholder indexes.
  6754. * @param {Array} [argPos] The argument positions of the new function.
  6755. * @param {number} [ary] The arity cap of `func`.
  6756. * @param {number} [arity] The arity of `func`.
  6757. * @returns {Function} Returns the new wrapped function.
  6758. */
  6759. function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
  6760. var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
  6761. if (!isBindKey && typeof func != 'function') {
  6762. throw new TypeError(FUNC_ERROR_TEXT);
  6763. }
  6764. var length = partials ? partials.length : 0;
  6765. if (!length) {
  6766. bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
  6767. partials = holders = undefined;
  6768. }
  6769. ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
  6770. arity = arity === undefined ? arity : toInteger(arity);
  6771. length -= holders ? holders.length : 0;
  6772. if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
  6773. var partialsRight = partials,
  6774. holdersRight = holders;
  6775. partials = holders = undefined;
  6776. }
  6777. var data = isBindKey ? undefined : getData(func);
  6778. var newData = [
  6779. func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
  6780. argPos, ary, arity
  6781. ];
  6782. if (data) {
  6783. mergeData(newData, data);
  6784. }
  6785. func = newData[0];
  6786. bitmask = newData[1];
  6787. thisArg = newData[2];
  6788. partials = newData[3];
  6789. holders = newData[4];
  6790. arity = newData[9] = newData[9] === undefined
  6791. ? (isBindKey ? 0 : func.length)
  6792. : nativeMax(newData[9] - length, 0);
  6793. if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
  6794. bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
  6795. }
  6796. if (!bitmask || bitmask == WRAP_BIND_FLAG) {
  6797. var result = createBind(func, bitmask, thisArg);
  6798. } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
  6799. result = createCurry(func, bitmask, arity);
  6800. } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
  6801. result = createPartial(func, bitmask, thisArg, partials);
  6802. } else {
  6803. result = createHybrid.apply(undefined, newData);
  6804. }
  6805. var setter = data ? baseSetData : setData;
  6806. return setWrapToString(setter(result, newData), func, bitmask);
  6807. }
  6808. /**
  6809. * Used by `_.defaults` to customize its `_.assignIn` use to assign properties
  6810. * of source objects to the destination object for all destination properties
  6811. * that resolve to `undefined`.
  6812. *
  6813. * @private
  6814. * @param {*} objValue The destination value.
  6815. * @param {*} srcValue The source value.
  6816. * @param {string} key The key of the property to assign.
  6817. * @param {Object} object The parent object of `objValue`.
  6818. * @returns {*} Returns the value to assign.
  6819. */
  6820. function customDefaultsAssignIn(objValue, srcValue, key, object) {
  6821. if (objValue === undefined ||
  6822. (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
  6823. return srcValue;
  6824. }
  6825. return objValue;
  6826. }
  6827. /**
  6828. * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
  6829. * objects into destination objects that are passed thru.
  6830. *
  6831. * @private
  6832. * @param {*} objValue The destination value.
  6833. * @param {*} srcValue The source value.
  6834. * @param {string} key The key of the property to merge.
  6835. * @param {Object} object The parent object of `objValue`.
  6836. * @param {Object} source The parent object of `srcValue`.
  6837. * @param {Object} [stack] Tracks traversed source values and their merged
  6838. * counterparts.
  6839. * @returns {*} Returns the value to assign.
  6840. */
  6841. function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
  6842. if (isObject(objValue) && isObject(srcValue)) {
  6843. // Recursively merge objects and arrays (susceptible to call stack limits).
  6844. stack.set(srcValue, objValue);
  6845. baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
  6846. stack['delete'](srcValue);
  6847. }
  6848. return objValue;
  6849. }
  6850. /**
  6851. * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
  6852. * objects.
  6853. *
  6854. * @private
  6855. * @param {*} value The value to inspect.
  6856. * @param {string} key The key of the property to inspect.
  6857. * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
  6858. */
  6859. function customOmitClone(value) {
  6860. return isPlainObject(value) ? undefined : value;
  6861. }
  6862. /**
  6863. * A specialized version of `baseIsEqualDeep` for arrays with support for
  6864. * partial deep comparisons.
  6865. *
  6866. * @private
  6867. * @param {Array} array The array to compare.
  6868. * @param {Array} other The other array to compare.
  6869. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  6870. * @param {Function} customizer The function to customize comparisons.
  6871. * @param {Function} equalFunc The function to determine equivalents of values.
  6872. * @param {Object} stack Tracks traversed `array` and `other` objects.
  6873. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
  6874. */
  6875. function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
  6876. var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
  6877. arrLength = array.length,
  6878. othLength = other.length;
  6879. if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
  6880. return false;
  6881. }
  6882. // Check that cyclic values are equal.
  6883. var arrStacked = stack.get(array);
  6884. var othStacked = stack.get(other);
  6885. if (arrStacked && othStacked) {
  6886. return arrStacked == other && othStacked == array;
  6887. }
  6888. var index = -1,
  6889. result = true,
  6890. seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
  6891. stack.set(array, other);
  6892. stack.set(other, array);
  6893. // Ignore non-index properties.
  6894. while (++index < arrLength) {
  6895. var arrValue = array[index],
  6896. othValue = other[index];
  6897. if (customizer) {
  6898. var compared = isPartial
  6899. ? customizer(othValue, arrValue, index, other, array, stack)
  6900. : customizer(arrValue, othValue, index, array, other, stack);
  6901. }
  6902. if (compared !== undefined) {
  6903. if (compared) {
  6904. continue;
  6905. }
  6906. result = false;
  6907. break;
  6908. }
  6909. // Recursively compare arrays (susceptible to call stack limits).
  6910. if (seen) {
  6911. if (!arraySome(other, function(othValue, othIndex) {
  6912. if (!cacheHas(seen, othIndex) &&
  6913. (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
  6914. return seen.push(othIndex);
  6915. }
  6916. })) {
  6917. result = false;
  6918. break;
  6919. }
  6920. } else if (!(
  6921. arrValue === othValue ||
  6922. equalFunc(arrValue, othValue, bitmask, customizer, stack)
  6923. )) {
  6924. result = false;
  6925. break;
  6926. }
  6927. }
  6928. stack['delete'](array);
  6929. stack['delete'](other);
  6930. return result;
  6931. }
  6932. /**
  6933. * A specialized version of `baseIsEqualDeep` for comparing objects of
  6934. * the same `toStringTag`.
  6935. *
  6936. * **Note:** This function only supports comparing values with tags of
  6937. * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
  6938. *
  6939. * @private
  6940. * @param {Object} object The object to compare.
  6941. * @param {Object} other The other object to compare.
  6942. * @param {string} tag The `toStringTag` of the objects to compare.
  6943. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  6944. * @param {Function} customizer The function to customize comparisons.
  6945. * @param {Function} equalFunc The function to determine equivalents of values.
  6946. * @param {Object} stack Tracks traversed `object` and `other` objects.
  6947. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  6948. */
  6949. function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
  6950. switch (tag) {
  6951. case dataViewTag:
  6952. if ((object.byteLength != other.byteLength) ||
  6953. (object.byteOffset != other.byteOffset)) {
  6954. return false;
  6955. }
  6956. object = object.buffer;
  6957. other = other.buffer;
  6958. case arrayBufferTag:
  6959. if ((object.byteLength != other.byteLength) ||
  6960. !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
  6961. return false;
  6962. }
  6963. return true;
  6964. case boolTag:
  6965. case dateTag:
  6966. case numberTag:
  6967. // Coerce booleans to `1` or `0` and dates to milliseconds.
  6968. // Invalid dates are coerced to `NaN`.
  6969. return eq(+object, +other);
  6970. case errorTag:
  6971. return object.name == other.name && object.message == other.message;
  6972. case regexpTag:
  6973. case stringTag:
  6974. // Coerce regexes to strings and treat strings, primitives and objects,
  6975. // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
  6976. // for more details.
  6977. return object == (other + '');
  6978. case mapTag:
  6979. var convert = mapToArray;
  6980. case setTag:
  6981. var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
  6982. convert || (convert = setToArray);
  6983. if (object.size != other.size && !isPartial) {
  6984. return false;
  6985. }
  6986. // Assume cyclic values are equal.
  6987. var stacked = stack.get(object);
  6988. if (stacked) {
  6989. return stacked == other;
  6990. }
  6991. bitmask |= COMPARE_UNORDERED_FLAG;
  6992. // Recursively compare objects (susceptible to call stack limits).
  6993. stack.set(object, other);
  6994. var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
  6995. stack['delete'](object);
  6996. return result;
  6997. case symbolTag:
  6998. if (symbolValueOf) {
  6999. return symbolValueOf.call(object) == symbolValueOf.call(other);
  7000. }
  7001. }
  7002. return false;
  7003. }
  7004. /**
  7005. * A specialized version of `baseIsEqualDeep` for objects with support for
  7006. * partial deep comparisons.
  7007. *
  7008. * @private
  7009. * @param {Object} object The object to compare.
  7010. * @param {Object} other The other object to compare.
  7011. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  7012. * @param {Function} customizer The function to customize comparisons.
  7013. * @param {Function} equalFunc The function to determine equivalents of values.
  7014. * @param {Object} stack Tracks traversed `object` and `other` objects.
  7015. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  7016. */
  7017. function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
  7018. var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
  7019. objProps = getAllKeys(object),
  7020. objLength = objProps.length,
  7021. othProps = getAllKeys(other),
  7022. othLength = othProps.length;
  7023. if (objLength != othLength && !isPartial) {
  7024. return false;
  7025. }
  7026. var index = objLength;
  7027. while (index--) {
  7028. var key = objProps[index];
  7029. if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
  7030. return false;
  7031. }
  7032. }
  7033. // Check that cyclic values are equal.
  7034. var objStacked = stack.get(object);
  7035. var othStacked = stack.get(other);
  7036. if (objStacked && othStacked) {
  7037. return objStacked == other && othStacked == object;
  7038. }
  7039. var result = true;
  7040. stack.set(object, other);
  7041. stack.set(other, object);
  7042. var skipCtor = isPartial;
  7043. while (++index < objLength) {
  7044. key = objProps[index];
  7045. var objValue = object[key],
  7046. othValue = other[key];
  7047. if (customizer) {
  7048. var compared = isPartial
  7049. ? customizer(othValue, objValue, key, other, object, stack)
  7050. : customizer(objValue, othValue, key, object, other, stack);
  7051. }
  7052. // Recursively compare objects (susceptible to call stack limits).
  7053. if (!(compared === undefined
  7054. ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
  7055. : compared
  7056. )) {
  7057. result = false;
  7058. break;
  7059. }
  7060. skipCtor || (skipCtor = key == 'constructor');
  7061. }
  7062. if (result && !skipCtor) {
  7063. var objCtor = object.constructor,
  7064. othCtor = other.constructor;
  7065. // Non `Object` object instances with different constructors are not equal.
  7066. if (objCtor != othCtor &&
  7067. ('constructor' in object && 'constructor' in other) &&
  7068. !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
  7069. typeof othCtor == 'function' && othCtor instanceof othCtor)) {
  7070. result = false;
  7071. }
  7072. }
  7073. stack['delete'](object);
  7074. stack['delete'](other);
  7075. return result;
  7076. }
  7077. /**
  7078. * A specialized version of `baseRest` which flattens the rest array.
  7079. *
  7080. * @private
  7081. * @param {Function} func The function to apply a rest parameter to.
  7082. * @returns {Function} Returns the new function.
  7083. */
  7084. function flatRest(func) {
  7085. return setToString(overRest(func, undefined, flatten), func + '');
  7086. }
  7087. /**
  7088. * Creates an array of own enumerable property names and symbols of `object`.
  7089. *
  7090. * @private
  7091. * @param {Object} object The object to query.
  7092. * @returns {Array} Returns the array of property names and symbols.
  7093. */
  7094. function getAllKeys(object) {
  7095. return baseGetAllKeys(object, keys, getSymbols);
  7096. }
  7097. /**
  7098. * Creates an array of own and inherited enumerable property names and
  7099. * symbols of `object`.
  7100. *
  7101. * @private
  7102. * @param {Object} object The object to query.
  7103. * @returns {Array} Returns the array of property names and symbols.
  7104. */
  7105. function getAllKeysIn(object) {
  7106. return baseGetAllKeys(object, keysIn, getSymbolsIn);
  7107. }
  7108. /**
  7109. * Gets metadata for `func`.
  7110. *
  7111. * @private
  7112. * @param {Function} func The function to query.
  7113. * @returns {*} Returns the metadata for `func`.
  7114. */
  7115. var getData = !metaMap ? noop : function(func) {
  7116. return metaMap.get(func);
  7117. };
  7118. /**
  7119. * Gets the name of `func`.
  7120. *
  7121. * @private
  7122. * @param {Function} func The function to query.
  7123. * @returns {string} Returns the function name.
  7124. */
  7125. function getFuncName(func) {
  7126. var result = (func.name + ''),
  7127. array = realNames[result],
  7128. length = hasOwnProperty.call(realNames, result) ? array.length : 0;
  7129. while (length--) {
  7130. var data = array[length],
  7131. otherFunc = data.func;
  7132. if (otherFunc == null || otherFunc == func) {
  7133. return data.name;
  7134. }
  7135. }
  7136. return result;
  7137. }
  7138. /**
  7139. * Gets the argument placeholder value for `func`.
  7140. *
  7141. * @private
  7142. * @param {Function} func The function to inspect.
  7143. * @returns {*} Returns the placeholder value.
  7144. */
  7145. function getHolder(func) {
  7146. var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
  7147. return object.placeholder;
  7148. }
  7149. /**
  7150. * Gets the appropriate "iteratee" function. If `_.iteratee` is customized,
  7151. * this function returns the custom method, otherwise it returns `baseIteratee`.
  7152. * If arguments are provided, the chosen function is invoked with them and
  7153. * its result is returned.
  7154. *
  7155. * @private
  7156. * @param {*} [value] The value to convert to an iteratee.
  7157. * @param {number} [arity] The arity of the created iteratee.
  7158. * @returns {Function} Returns the chosen function or its result.
  7159. */
  7160. function getIteratee() {
  7161. var result = lodash.iteratee || iteratee;
  7162. result = result === iteratee ? baseIteratee : result;
  7163. return arguments.length ? result(arguments[0], arguments[1]) : result;
  7164. }
  7165. /**
  7166. * Gets the data for `map`.
  7167. *
  7168. * @private
  7169. * @param {Object} map The map to query.
  7170. * @param {string} key The reference key.
  7171. * @returns {*} Returns the map data.
  7172. */
  7173. function getMapData(map, key) {
  7174. var data = map.__data__;
  7175. return isKeyable(key)
  7176. ? data[typeof key == 'string' ? 'string' : 'hash']
  7177. : data.map;
  7178. }
  7179. /**
  7180. * Gets the property names, values, and compare flags of `object`.
  7181. *
  7182. * @private
  7183. * @param {Object} object The object to query.
  7184. * @returns {Array} Returns the match data of `object`.
  7185. */
  7186. function getMatchData(object) {
  7187. var result = keys(object),
  7188. length = result.length;
  7189. while (length--) {
  7190. var key = result[length],
  7191. value = object[key];
  7192. result[length] = [key, value, isStrictComparable(value)];
  7193. }
  7194. return result;
  7195. }
  7196. /**
  7197. * Gets the native function at `key` of `object`.
  7198. *
  7199. * @private
  7200. * @param {Object} object The object to query.
  7201. * @param {string} key The key of the method to get.
  7202. * @returns {*} Returns the function if it's native, else `undefined`.
  7203. */
  7204. function getNative(object, key) {
  7205. var value = getValue(object, key);
  7206. return baseIsNative(value) ? value : undefined;
  7207. }
  7208. /**
  7209. * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
  7210. *
  7211. * @private
  7212. * @param {*} value The value to query.
  7213. * @returns {string} Returns the raw `toStringTag`.
  7214. */
  7215. function getRawTag(value) {
  7216. var isOwn = hasOwnProperty.call(value, symToStringTag),
  7217. tag = value[symToStringTag];
  7218. try {
  7219. value[symToStringTag] = undefined;
  7220. var unmasked = true;
  7221. } catch (e) {}
  7222. var result = nativeObjectToString.call(value);
  7223. if (unmasked) {
  7224. if (isOwn) {
  7225. value[symToStringTag] = tag;
  7226. } else {
  7227. delete value[symToStringTag];
  7228. }
  7229. }
  7230. return result;
  7231. }
  7232. /**
  7233. * Creates an array of the own enumerable symbols of `object`.
  7234. *
  7235. * @private
  7236. * @param {Object} object The object to query.
  7237. * @returns {Array} Returns the array of symbols.
  7238. */
  7239. var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
  7240. if (object == null) {
  7241. return [];
  7242. }
  7243. object = Object(object);
  7244. return arrayFilter(nativeGetSymbols(object), function(symbol) {
  7245. return propertyIsEnumerable.call(object, symbol);
  7246. });
  7247. };
  7248. /**
  7249. * Creates an array of the own and inherited enumerable symbols of `object`.
  7250. *
  7251. * @private
  7252. * @param {Object} object The object to query.
  7253. * @returns {Array} Returns the array of symbols.
  7254. */
  7255. var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
  7256. var result = [];
  7257. while (object) {
  7258. arrayPush(result, getSymbols(object));
  7259. object = getPrototype(object);
  7260. }
  7261. return result;
  7262. };
  7263. /**
  7264. * Gets the `toStringTag` of `value`.
  7265. *
  7266. * @private
  7267. * @param {*} value The value to query.
  7268. * @returns {string} Returns the `toStringTag`.
  7269. */
  7270. var getTag = baseGetTag;
  7271. // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
  7272. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
  7273. (Map && getTag(new Map) != mapTag) ||
  7274. (Promise && getTag(Promise.resolve()) != promiseTag) ||
  7275. (Set && getTag(new Set) != setTag) ||
  7276. (WeakMap && getTag(new WeakMap) != weakMapTag)) {
  7277. getTag = function(value) {
  7278. var result = baseGetTag(value),
  7279. Ctor = result == objectTag ? value.constructor : undefined,
  7280. ctorString = Ctor ? toSource(Ctor) : '';
  7281. if (ctorString) {
  7282. switch (ctorString) {
  7283. case dataViewCtorString: return dataViewTag;
  7284. case mapCtorString: return mapTag;
  7285. case promiseCtorString: return promiseTag;
  7286. case setCtorString: return setTag;
  7287. case weakMapCtorString: return weakMapTag;
  7288. }
  7289. }
  7290. return result;
  7291. };
  7292. }
  7293. /**
  7294. * Gets the view, applying any `transforms` to the `start` and `end` positions.
  7295. *
  7296. * @private
  7297. * @param {number} start The start of the view.
  7298. * @param {number} end The end of the view.
  7299. * @param {Array} transforms The transformations to apply to the view.
  7300. * @returns {Object} Returns an object containing the `start` and `end`
  7301. * positions of the view.
  7302. */
  7303. function getView(start, end, transforms) {
  7304. var index = -1,
  7305. length = transforms.length;
  7306. while (++index < length) {
  7307. var data = transforms[index],
  7308. size = data.size;
  7309. switch (data.type) {
  7310. case 'drop': start += size; break;
  7311. case 'dropRight': end -= size; break;
  7312. case 'take': end = nativeMin(end, start + size); break;
  7313. case 'takeRight': start = nativeMax(start, end - size); break;
  7314. }
  7315. }
  7316. return { 'start': start, 'end': end };
  7317. }
  7318. /**
  7319. * Extracts wrapper details from the `source` body comment.
  7320. *
  7321. * @private
  7322. * @param {string} source The source to inspect.
  7323. * @returns {Array} Returns the wrapper details.
  7324. */
  7325. function getWrapDetails(source) {
  7326. var match = source.match(reWrapDetails);
  7327. return match ? match[1].split(reSplitDetails) : [];
  7328. }
  7329. /**
  7330. * Checks if `path` exists on `object`.
  7331. *
  7332. * @private
  7333. * @param {Object} object The object to query.
  7334. * @param {Array|string} path The path to check.
  7335. * @param {Function} hasFunc The function to check properties.
  7336. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  7337. */
  7338. function hasPath(object, path, hasFunc) {
  7339. path = castPath(path, object);
  7340. var index = -1,
  7341. length = path.length,
  7342. result = false;
  7343. while (++index < length) {
  7344. var key = toKey(path[index]);
  7345. if (!(result = object != null && hasFunc(object, key))) {
  7346. break;
  7347. }
  7348. object = object[key];
  7349. }
  7350. if (result || ++index != length) {
  7351. return result;
  7352. }
  7353. length = object == null ? 0 : object.length;
  7354. return !!length && isLength(length) && isIndex(key, length) &&
  7355. (isArray(object) || isArguments(object));
  7356. }
  7357. /**
  7358. * Initializes an array clone.
  7359. *
  7360. * @private
  7361. * @param {Array} array The array to clone.
  7362. * @returns {Array} Returns the initialized clone.
  7363. */
  7364. function initCloneArray(array) {
  7365. var length = array.length,
  7366. result = new array.constructor(length);
  7367. // Add properties assigned by `RegExp#exec`.
  7368. if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
  7369. result.index = array.index;
  7370. result.input = array.input;
  7371. }
  7372. return result;
  7373. }
  7374. /**
  7375. * Initializes an object clone.
  7376. *
  7377. * @private
  7378. * @param {Object} object The object to clone.
  7379. * @returns {Object} Returns the initialized clone.
  7380. */
  7381. function initCloneObject(object) {
  7382. return (typeof object.constructor == 'function' && !isPrototype(object))
  7383. ? baseCreate(getPrototype(object))
  7384. : {};
  7385. }
  7386. /**
  7387. * Initializes an object clone based on its `toStringTag`.
  7388. *
  7389. * **Note:** This function only supports cloning values with tags of
  7390. * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
  7391. *
  7392. * @private
  7393. * @param {Object} object The object to clone.
  7394. * @param {string} tag The `toStringTag` of the object to clone.
  7395. * @param {boolean} [isDeep] Specify a deep clone.
  7396. * @returns {Object} Returns the initialized clone.
  7397. */
  7398. function initCloneByTag(object, tag, isDeep) {
  7399. var Ctor = object.constructor;
  7400. switch (tag) {
  7401. case arrayBufferTag:
  7402. return cloneArrayBuffer(object);
  7403. case boolTag:
  7404. case dateTag:
  7405. return new Ctor(+object);
  7406. case dataViewTag:
  7407. return cloneDataView(object, isDeep);
  7408. case float32Tag: case float64Tag:
  7409. case int8Tag: case int16Tag: case int32Tag:
  7410. case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
  7411. return cloneTypedArray(object, isDeep);
  7412. case mapTag:
  7413. return new Ctor;
  7414. case numberTag:
  7415. case stringTag:
  7416. return new Ctor(object);
  7417. case regexpTag:
  7418. return cloneRegExp(object);
  7419. case setTag:
  7420. return new Ctor;
  7421. case symbolTag:
  7422. return cloneSymbol(object);
  7423. }
  7424. }
  7425. /**
  7426. * Inserts wrapper `details` in a comment at the top of the `source` body.
  7427. *
  7428. * @private
  7429. * @param {string} source The source to modify.
  7430. * @returns {Array} details The details to insert.
  7431. * @returns {string} Returns the modified source.
  7432. */
  7433. function insertWrapDetails(source, details) {
  7434. var length = details.length;
  7435. if (!length) {
  7436. return source;
  7437. }
  7438. var lastIndex = length - 1;
  7439. details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
  7440. details = details.join(length > 2 ? ', ' : ' ');
  7441. return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
  7442. }
  7443. /**
  7444. * Checks if `value` is a flattenable `arguments` object or array.
  7445. *
  7446. * @private
  7447. * @param {*} value The value to check.
  7448. * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
  7449. */
  7450. function isFlattenable(value) {
  7451. return isArray(value) || isArguments(value) ||
  7452. !!(spreadableSymbol && value && value[spreadableSymbol]);
  7453. }
  7454. /**
  7455. * Checks if `value` is a valid array-like index.
  7456. *
  7457. * @private
  7458. * @param {*} value The value to check.
  7459. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
  7460. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
  7461. */
  7462. function isIndex(value, length) {
  7463. var type = typeof value;
  7464. length = length == null ? MAX_SAFE_INTEGER : length;
  7465. return !!length &&
  7466. (type == 'number' ||
  7467. (type != 'symbol' && reIsUint.test(value))) &&
  7468. (value > -1 && value % 1 == 0 && value < length);
  7469. }
  7470. /**
  7471. * Checks if the given arguments are from an iteratee call.
  7472. *
  7473. * @private
  7474. * @param {*} value The potential iteratee value argument.
  7475. * @param {*} index The potential iteratee index or key argument.
  7476. * @param {*} object The potential iteratee object argument.
  7477. * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
  7478. * else `false`.
  7479. */
  7480. function isIterateeCall(value, index, object) {
  7481. if (!isObject(object)) {
  7482. return false;
  7483. }
  7484. var type = typeof index;
  7485. if (type == 'number'
  7486. ? (isArrayLike(object) && isIndex(index, object.length))
  7487. : (type == 'string' && index in object)
  7488. ) {
  7489. return eq(object[index], value);
  7490. }
  7491. return false;
  7492. }
  7493. /**
  7494. * Checks if `value` is a property name and not a property path.
  7495. *
  7496. * @private
  7497. * @param {*} value The value to check.
  7498. * @param {Object} [object] The object to query keys on.
  7499. * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
  7500. */
  7501. function isKey(value, object) {
  7502. if (isArray(value)) {
  7503. return false;
  7504. }
  7505. var type = typeof value;
  7506. if (type == 'number' || type == 'symbol' || type == 'boolean' ||
  7507. value == null || isSymbol(value)) {
  7508. return true;
  7509. }
  7510. return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
  7511. (object != null && value in Object(object));
  7512. }
  7513. /**
  7514. * Checks if `value` is suitable for use as unique object key.
  7515. *
  7516. * @private
  7517. * @param {*} value The value to check.
  7518. * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
  7519. */
  7520. function isKeyable(value) {
  7521. var type = typeof value;
  7522. return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
  7523. ? (value !== '__proto__')
  7524. : (value === null);
  7525. }
  7526. /**
  7527. * Checks if `func` has a lazy counterpart.
  7528. *
  7529. * @private
  7530. * @param {Function} func The function to check.
  7531. * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
  7532. * else `false`.
  7533. */
  7534. function isLaziable(func) {
  7535. var funcName = getFuncName(func),
  7536. other = lodash[funcName];
  7537. if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
  7538. return false;
  7539. }
  7540. if (func === other) {
  7541. return true;
  7542. }
  7543. var data = getData(other);
  7544. return !!data && func === data[0];
  7545. }
  7546. /**
  7547. * Checks if `func` has its source masked.
  7548. *
  7549. * @private
  7550. * @param {Function} func The function to check.
  7551. * @returns {boolean} Returns `true` if `func` is masked, else `false`.
  7552. */
  7553. function isMasked(func) {
  7554. return !!maskSrcKey && (maskSrcKey in func);
  7555. }
  7556. /**
  7557. * Checks if `func` is capable of being masked.
  7558. *
  7559. * @private
  7560. * @param {*} value The value to check.
  7561. * @returns {boolean} Returns `true` if `func` is maskable, else `false`.
  7562. */
  7563. var isMaskable = coreJsData ? isFunction : stubFalse;
  7564. /**
  7565. * Checks if `value` is likely a prototype object.
  7566. *
  7567. * @private
  7568. * @param {*} value The value to check.
  7569. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
  7570. */
  7571. function isPrototype(value) {
  7572. var Ctor = value && value.constructor,
  7573. proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
  7574. return value === proto;
  7575. }
  7576. /**
  7577. * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
  7578. *
  7579. * @private
  7580. * @param {*} value The value to check.
  7581. * @returns {boolean} Returns `true` if `value` if suitable for strict
  7582. * equality comparisons, else `false`.
  7583. */
  7584. function isStrictComparable(value) {
  7585. return value === value && !isObject(value);
  7586. }
  7587. /**
  7588. * A specialized version of `matchesProperty` for source values suitable
  7589. * for strict equality comparisons, i.e. `===`.
  7590. *
  7591. * @private
  7592. * @param {string} key The key of the property to get.
  7593. * @param {*} srcValue The value to match.
  7594. * @returns {Function} Returns the new spec function.
  7595. */
  7596. function matchesStrictComparable(key, srcValue) {
  7597. return function(object) {
  7598. if (object == null) {
  7599. return false;
  7600. }
  7601. return object[key] === srcValue &&
  7602. (srcValue !== undefined || (key in Object(object)));
  7603. };
  7604. }
  7605. /**
  7606. * A specialized version of `_.memoize` which clears the memoized function's
  7607. * cache when it exceeds `MAX_MEMOIZE_SIZE`.
  7608. *
  7609. * @private
  7610. * @param {Function} func The function to have its output memoized.
  7611. * @returns {Function} Returns the new memoized function.
  7612. */
  7613. function memoizeCapped(func) {
  7614. var result = memoize(func, function(key) {
  7615. if (cache.size === MAX_MEMOIZE_SIZE) {
  7616. cache.clear();
  7617. }
  7618. return key;
  7619. });
  7620. var cache = result.cache;
  7621. return result;
  7622. }
  7623. /**
  7624. * Merges the function metadata of `source` into `data`.
  7625. *
  7626. * Merging metadata reduces the number of wrappers used to invoke a function.
  7627. * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
  7628. * may be applied regardless of execution order. Methods like `_.ary` and
  7629. * `_.rearg` modify function arguments, making the order in which they are
  7630. * executed important, preventing the merging of metadata. However, we make
  7631. * an exception for a safe combined case where curried functions have `_.ary`
  7632. * and or `_.rearg` applied.
  7633. *
  7634. * @private
  7635. * @param {Array} data The destination metadata.
  7636. * @param {Array} source The source metadata.
  7637. * @returns {Array} Returns `data`.
  7638. */
  7639. function mergeData(data, source) {
  7640. var bitmask = data[1],
  7641. srcBitmask = source[1],
  7642. newBitmask = bitmask | srcBitmask,
  7643. isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
  7644. var isCombo =
  7645. ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
  7646. ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
  7647. ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));
  7648. // Exit early if metadata can't be merged.
  7649. if (!(isCommon || isCombo)) {
  7650. return data;
  7651. }
  7652. // Use source `thisArg` if available.
  7653. if (srcBitmask & WRAP_BIND_FLAG) {
  7654. data[2] = source[2];
  7655. // Set when currying a bound function.
  7656. newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
  7657. }
  7658. // Compose partial arguments.
  7659. var value = source[3];
  7660. if (value) {
  7661. var partials = data[3];
  7662. data[3] = partials ? composeArgs(partials, value, source[4]) : value;
  7663. data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
  7664. }
  7665. // Compose partial right arguments.
  7666. value = source[5];
  7667. if (value) {
  7668. partials = data[5];
  7669. data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
  7670. data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
  7671. }
  7672. // Use source `argPos` if available.
  7673. value = source[7];
  7674. if (value) {
  7675. data[7] = value;
  7676. }
  7677. // Use source `ary` if it's smaller.
  7678. if (srcBitmask & WRAP_ARY_FLAG) {
  7679. data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
  7680. }
  7681. // Use source `arity` if one is not provided.
  7682. if (data[9] == null) {
  7683. data[9] = source[9];
  7684. }
  7685. // Use source `func` and merge bitmasks.
  7686. data[0] = source[0];
  7687. data[1] = newBitmask;
  7688. return data;
  7689. }
  7690. /**
  7691. * This function is like
  7692. * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  7693. * except that it includes inherited enumerable properties.
  7694. *
  7695. * @private
  7696. * @param {Object} object The object to query.
  7697. * @returns {Array} Returns the array of property names.
  7698. */
  7699. function nativeKeysIn(object) {
  7700. var result = [];
  7701. if (object != null) {
  7702. for (var key in Object(object)) {
  7703. result.push(key);
  7704. }
  7705. }
  7706. return result;
  7707. }
  7708. /**
  7709. * Converts `value` to a string using `Object.prototype.toString`.
  7710. *
  7711. * @private
  7712. * @param {*} value The value to convert.
  7713. * @returns {string} Returns the converted string.
  7714. */
  7715. function objectToString(value) {
  7716. return nativeObjectToString.call(value);
  7717. }
  7718. /**
  7719. * A specialized version of `baseRest` which transforms the rest array.
  7720. *
  7721. * @private
  7722. * @param {Function} func The function to apply a rest parameter to.
  7723. * @param {number} [start=func.length-1] The start position of the rest parameter.
  7724. * @param {Function} transform The rest array transform.
  7725. * @returns {Function} Returns the new function.
  7726. */
  7727. function overRest(func, start, transform) {
  7728. start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
  7729. return function() {
  7730. var args = arguments,
  7731. index = -1,
  7732. length = nativeMax(args.length - start, 0),
  7733. array = Array(length);
  7734. while (++index < length) {
  7735. array[index] = args[start + index];
  7736. }
  7737. index = -1;
  7738. var otherArgs = Array(start + 1);
  7739. while (++index < start) {
  7740. otherArgs[index] = args[index];
  7741. }
  7742. otherArgs[start] = transform(array);
  7743. return apply(func, this, otherArgs);
  7744. };
  7745. }
  7746. /**
  7747. * Gets the parent value at `path` of `object`.
  7748. *
  7749. * @private
  7750. * @param {Object} object The object to query.
  7751. * @param {Array} path The path to get the parent value of.
  7752. * @returns {*} Returns the parent value.
  7753. */
  7754. function parent(object, path) {
  7755. return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
  7756. }
  7757. /**
  7758. * Reorder `array` according to the specified indexes where the element at
  7759. * the first index is assigned as the first element, the element at
  7760. * the second index is assigned as the second element, and so on.
  7761. *
  7762. * @private
  7763. * @param {Array} array The array to reorder.
  7764. * @param {Array} indexes The arranged array indexes.
  7765. * @returns {Array} Returns `array`.
  7766. */
  7767. function reorder(array, indexes) {
  7768. var arrLength = array.length,
  7769. length = nativeMin(indexes.length, arrLength),
  7770. oldArray = copyArray(array);
  7771. while (length--) {
  7772. var index = indexes[length];
  7773. array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
  7774. }
  7775. return array;
  7776. }
  7777. /**
  7778. * Gets the value at `key`, unless `key` is "__proto__" or "constructor".
  7779. *
  7780. * @private
  7781. * @param {Object} object The object to query.
  7782. * @param {string} key The key of the property to get.
  7783. * @returns {*} Returns the property value.
  7784. */
  7785. function safeGet(object, key) {
  7786. if (key === 'constructor' && typeof object[key] === 'function') {
  7787. return;
  7788. }
  7789. if (key == '__proto__') {
  7790. return;
  7791. }
  7792. return object[key];
  7793. }
  7794. /**
  7795. * Sets metadata for `func`.
  7796. *
  7797. * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
  7798. * period of time, it will trip its breaker and transition to an identity
  7799. * function to avoid garbage collection pauses in V8. See
  7800. * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
  7801. * for more details.
  7802. *
  7803. * @private
  7804. * @param {Function} func The function to associate metadata with.
  7805. * @param {*} data The metadata.
  7806. * @returns {Function} Returns `func`.
  7807. */
  7808. var setData = shortOut(baseSetData);
  7809. /**
  7810. * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).
  7811. *
  7812. * @private
  7813. * @param {Function} func The function to delay.
  7814. * @param {number} wait The number of milliseconds to delay invocation.
  7815. * @returns {number|Object} Returns the timer id or timeout object.
  7816. */
  7817. var setTimeout = ctxSetTimeout || function(func, wait) {
  7818. return root.setTimeout(func, wait);
  7819. };
  7820. /**
  7821. * Sets the `toString` method of `func` to return `string`.
  7822. *
  7823. * @private
  7824. * @param {Function} func The function to modify.
  7825. * @param {Function} string The `toString` result.
  7826. * @returns {Function} Returns `func`.
  7827. */
  7828. var setToString = shortOut(baseSetToString);
  7829. /**
  7830. * Sets the `toString` method of `wrapper` to mimic the source of `reference`
  7831. * with wrapper details in a comment at the top of the source body.
  7832. *
  7833. * @private
  7834. * @param {Function} wrapper The function to modify.
  7835. * @param {Function} reference The reference function.
  7836. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  7837. * @returns {Function} Returns `wrapper`.
  7838. */
  7839. function setWrapToString(wrapper, reference, bitmask) {
  7840. var source = (reference + '');
  7841. return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
  7842. }
  7843. /**
  7844. * Creates a function that'll short out and invoke `identity` instead
  7845. * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
  7846. * milliseconds.
  7847. *
  7848. * @private
  7849. * @param {Function} func The function to restrict.
  7850. * @returns {Function} Returns the new shortable function.
  7851. */
  7852. function shortOut(func) {
  7853. var count = 0,
  7854. lastCalled = 0;
  7855. return function() {
  7856. var stamp = nativeNow(),
  7857. remaining = HOT_SPAN - (stamp - lastCalled);
  7858. lastCalled = stamp;
  7859. if (remaining > 0) {
  7860. if (++count >= HOT_COUNT) {
  7861. return arguments[0];
  7862. }
  7863. } else {
  7864. count = 0;
  7865. }
  7866. return func.apply(undefined, arguments);
  7867. };
  7868. }
  7869. /**
  7870. * A specialized version of `_.shuffle` which mutates and sets the size of `array`.
  7871. *
  7872. * @private
  7873. * @param {Array} array The array to shuffle.
  7874. * @param {number} [size=array.length] The size of `array`.
  7875. * @returns {Array} Returns `array`.
  7876. */
  7877. function shuffleSelf(array, size) {
  7878. var index = -1,
  7879. length = array.length,
  7880. lastIndex = length - 1;
  7881. size = size === undefined ? length : size;
  7882. while (++index < size) {
  7883. var rand = baseRandom(index, lastIndex),
  7884. value = array[rand];
  7885. array[rand] = array[index];
  7886. array[index] = value;
  7887. }
  7888. array.length = size;
  7889. return array;
  7890. }
  7891. /**
  7892. * Converts `string` to a property path array.
  7893. *
  7894. * @private
  7895. * @param {string} string The string to convert.
  7896. * @returns {Array} Returns the property path array.
  7897. */
  7898. var stringToPath = memoizeCapped(function(string) {
  7899. var result = [];
  7900. if (string.charCodeAt(0) === 46 /* . */) {
  7901. result.push('');
  7902. }
  7903. string.replace(rePropName, function(match, number, quote, subString) {
  7904. result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
  7905. });
  7906. return result;
  7907. });
  7908. /**
  7909. * Converts `value` to a string key if it's not a string or symbol.
  7910. *
  7911. * @private
  7912. * @param {*} value The value to inspect.
  7913. * @returns {string|symbol} Returns the key.
  7914. */
  7915. function toKey(value) {
  7916. if (typeof value == 'string' || isSymbol(value)) {
  7917. return value;
  7918. }
  7919. var result = (value + '');
  7920. return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
  7921. }
  7922. /**
  7923. * Converts `func` to its source code.
  7924. *
  7925. * @private
  7926. * @param {Function} func The function to convert.
  7927. * @returns {string} Returns the source code.
  7928. */
  7929. function toSource(func) {
  7930. if (func != null) {
  7931. try {
  7932. return funcToString.call(func);
  7933. } catch (e) {}
  7934. try {
  7935. return (func + '');
  7936. } catch (e) {}
  7937. }
  7938. return '';
  7939. }
  7940. /**
  7941. * Updates wrapper `details` based on `bitmask` flags.
  7942. *
  7943. * @private
  7944. * @returns {Array} details The details to modify.
  7945. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  7946. * @returns {Array} Returns `details`.
  7947. */
  7948. function updateWrapDetails(details, bitmask) {
  7949. arrayEach(wrapFlags, function(pair) {
  7950. var value = '_.' + pair[0];
  7951. if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
  7952. details.push(value);
  7953. }
  7954. });
  7955. return details.sort();
  7956. }
  7957. /**
  7958. * Creates a clone of `wrapper`.
  7959. *
  7960. * @private
  7961. * @param {Object} wrapper The wrapper to clone.
  7962. * @returns {Object} Returns the cloned wrapper.
  7963. */
  7964. function wrapperClone(wrapper) {
  7965. if (wrapper instanceof LazyWrapper) {
  7966. return wrapper.clone();
  7967. }
  7968. var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
  7969. result.__actions__ = copyArray(wrapper.__actions__);
  7970. result.__index__ = wrapper.__index__;
  7971. result.__values__ = wrapper.__values__;
  7972. return result;
  7973. }
  7974. /*------------------------------------------------------------------------*/
  7975. /**
  7976. * Creates an array of elements split into groups the length of `size`.
  7977. * If `array` can't be split evenly, the final chunk will be the remaining
  7978. * elements.
  7979. *
  7980. * @static
  7981. * @memberOf _
  7982. * @since 3.0.0
  7983. * @category Array
  7984. * @param {Array} array The array to process.
  7985. * @param {number} [size=1] The length of each chunk
  7986. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  7987. * @returns {Array} Returns the new array of chunks.
  7988. * @example
  7989. *
  7990. * _.chunk(['a', 'b', 'c', 'd'], 2);
  7991. * // => [['a', 'b'], ['c', 'd']]
  7992. *
  7993. * _.chunk(['a', 'b', 'c', 'd'], 3);
  7994. * // => [['a', 'b', 'c'], ['d']]
  7995. */
  7996. function chunk(array, size, guard) {
  7997. if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
  7998. size = 1;
  7999. } else {
  8000. size = nativeMax(toInteger(size), 0);
  8001. }
  8002. var length = array == null ? 0 : array.length;
  8003. if (!length || size < 1) {
  8004. return [];
  8005. }
  8006. var index = 0,
  8007. resIndex = 0,
  8008. result = Array(nativeCeil(length / size));
  8009. while (index < length) {
  8010. result[resIndex++] = baseSlice(array, index, (index += size));
  8011. }
  8012. return result;
  8013. }
  8014. /**
  8015. * Creates an array with all falsey values removed. The values `false`, `null`,
  8016. * `0`, `""`, `undefined`, and `NaN` are falsey.
  8017. *
  8018. * @static
  8019. * @memberOf _
  8020. * @since 0.1.0
  8021. * @category Array
  8022. * @param {Array} array The array to compact.
  8023. * @returns {Array} Returns the new array of filtered values.
  8024. * @example
  8025. *
  8026. * _.compact([0, 1, false, 2, '', 3]);
  8027. * // => [1, 2, 3]
  8028. */
  8029. function compact(array) {
  8030. var index = -1,
  8031. length = array == null ? 0 : array.length,
  8032. resIndex = 0,
  8033. result = [];
  8034. while (++index < length) {
  8035. var value = array[index];
  8036. if (value) {
  8037. result[resIndex++] = value;
  8038. }
  8039. }
  8040. return result;
  8041. }
  8042. /**
  8043. * Creates a new array concatenating `array` with any additional arrays
  8044. * and/or values.
  8045. *
  8046. * @static
  8047. * @memberOf _
  8048. * @since 4.0.0
  8049. * @category Array
  8050. * @param {Array} array The array to concatenate.
  8051. * @param {...*} [values] The values to concatenate.
  8052. * @returns {Array} Returns the new concatenated array.
  8053. * @example
  8054. *
  8055. * var array = [1];
  8056. * var other = _.concat(array, 2, [3], [[4]]);
  8057. *
  8058. * console.log(other);
  8059. * // => [1, 2, 3, [4]]
  8060. *
  8061. * console.log(array);
  8062. * // => [1]
  8063. */
  8064. function concat() {
  8065. var length = arguments.length;
  8066. if (!length) {
  8067. return [];
  8068. }
  8069. var args = Array(length - 1),
  8070. array = arguments[0],
  8071. index = length;
  8072. while (index--) {
  8073. args[index - 1] = arguments[index];
  8074. }
  8075. return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
  8076. }
  8077. /**
  8078. * Creates an array of `array` values not included in the other given arrays
  8079. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  8080. * for equality comparisons. The order and references of result values are
  8081. * determined by the first array.
  8082. *
  8083. * **Note:** Unlike `_.pullAll`, this method returns a new array.
  8084. *
  8085. * @static
  8086. * @memberOf _
  8087. * @since 0.1.0
  8088. * @category Array
  8089. * @param {Array} array The array to inspect.
  8090. * @param {...Array} [values] The values to exclude.
  8091. * @returns {Array} Returns the new array of filtered values.
  8092. * @see _.without, _.xor
  8093. * @example
  8094. *
  8095. * _.difference([2, 1], [2, 3]);
  8096. * // => [1]
  8097. */
  8098. var difference = baseRest(function(array, values) {
  8099. return isArrayLikeObject(array)
  8100. ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
  8101. : [];
  8102. });
  8103. /**
  8104. * This method is like `_.difference` except that it accepts `iteratee` which
  8105. * is invoked for each element of `array` and `values` to generate the criterion
  8106. * by which they're compared. The order and references of result values are
  8107. * determined by the first array. The iteratee is invoked with one argument:
  8108. * (value).
  8109. *
  8110. * **Note:** Unlike `_.pullAllBy`, this method returns a new array.
  8111. *
  8112. * @static
  8113. * @memberOf _
  8114. * @since 4.0.0
  8115. * @category Array
  8116. * @param {Array} array The array to inspect.
  8117. * @param {...Array} [values] The values to exclude.
  8118. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  8119. * @returns {Array} Returns the new array of filtered values.
  8120. * @example
  8121. *
  8122. * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);
  8123. * // => [1.2]
  8124. *
  8125. * // The `_.property` iteratee shorthand.
  8126. * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
  8127. * // => [{ 'x': 2 }]
  8128. */
  8129. var differenceBy = baseRest(function(array, values) {
  8130. var iteratee = last(values);
  8131. if (isArrayLikeObject(iteratee)) {
  8132. iteratee = undefined;
  8133. }
  8134. return isArrayLikeObject(array)
  8135. ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))
  8136. : [];
  8137. });
  8138. /**
  8139. * This method is like `_.difference` except that it accepts `comparator`
  8140. * which is invoked to compare elements of `array` to `values`. The order and
  8141. * references of result values are determined by the first array. The comparator
  8142. * is invoked with two arguments: (arrVal, othVal).
  8143. *
  8144. * **Note:** Unlike `_.pullAllWith`, this method returns a new array.
  8145. *
  8146. * @static
  8147. * @memberOf _
  8148. * @since 4.0.0
  8149. * @category Array
  8150. * @param {Array} array The array to inspect.
  8151. * @param {...Array} [values] The values to exclude.
  8152. * @param {Function} [comparator] The comparator invoked per element.
  8153. * @returns {Array} Returns the new array of filtered values.
  8154. * @example
  8155. *
  8156. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  8157. *
  8158. * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
  8159. * // => [{ 'x': 2, 'y': 1 }]
  8160. */
  8161. var differenceWith = baseRest(function(array, values) {
  8162. var comparator = last(values);
  8163. if (isArrayLikeObject(comparator)) {
  8164. comparator = undefined;
  8165. }
  8166. return isArrayLikeObject(array)
  8167. ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
  8168. : [];
  8169. });
  8170. /**
  8171. * Creates a slice of `array` with `n` elements dropped from the beginning.
  8172. *
  8173. * @static
  8174. * @memberOf _
  8175. * @since 0.5.0
  8176. * @category Array
  8177. * @param {Array} array The array to query.
  8178. * @param {number} [n=1] The number of elements to drop.
  8179. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  8180. * @returns {Array} Returns the slice of `array`.
  8181. * @example
  8182. *
  8183. * _.drop([1, 2, 3]);
  8184. * // => [2, 3]
  8185. *
  8186. * _.drop([1, 2, 3], 2);
  8187. * // => [3]
  8188. *
  8189. * _.drop([1, 2, 3], 5);
  8190. * // => []
  8191. *
  8192. * _.drop([1, 2, 3], 0);
  8193. * // => [1, 2, 3]
  8194. */
  8195. function drop(array, n, guard) {
  8196. var length = array == null ? 0 : array.length;
  8197. if (!length) {
  8198. return [];
  8199. }
  8200. n = (guard || n === undefined) ? 1 : toInteger(n);
  8201. return baseSlice(array, n < 0 ? 0 : n, length);
  8202. }
  8203. /**
  8204. * Creates a slice of `array` with `n` elements dropped from the end.
  8205. *
  8206. * @static
  8207. * @memberOf _
  8208. * @since 3.0.0
  8209. * @category Array
  8210. * @param {Array} array The array to query.
  8211. * @param {number} [n=1] The number of elements to drop.
  8212. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  8213. * @returns {Array} Returns the slice of `array`.
  8214. * @example
  8215. *
  8216. * _.dropRight([1, 2, 3]);
  8217. * // => [1, 2]
  8218. *
  8219. * _.dropRight([1, 2, 3], 2);
  8220. * // => [1]
  8221. *
  8222. * _.dropRight([1, 2, 3], 5);
  8223. * // => []
  8224. *
  8225. * _.dropRight([1, 2, 3], 0);
  8226. * // => [1, 2, 3]
  8227. */
  8228. function dropRight(array, n, guard) {
  8229. var length = array == null ? 0 : array.length;
  8230. if (!length) {
  8231. return [];
  8232. }
  8233. n = (guard || n === undefined) ? 1 : toInteger(n);
  8234. n = length - n;
  8235. return baseSlice(array, 0, n < 0 ? 0 : n);
  8236. }
  8237. /**
  8238. * Creates a slice of `array` excluding elements dropped from the end.
  8239. * Elements are dropped until `predicate` returns falsey. The predicate is
  8240. * invoked with three arguments: (value, index, array).
  8241. *
  8242. * @static
  8243. * @memberOf _
  8244. * @since 3.0.0
  8245. * @category Array
  8246. * @param {Array} array The array to query.
  8247. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  8248. * @returns {Array} Returns the slice of `array`.
  8249. * @example
  8250. *
  8251. * var users = [
  8252. * { 'user': 'barney', 'active': true },
  8253. * { 'user': 'fred', 'active': false },
  8254. * { 'user': 'pebbles', 'active': false }
  8255. * ];
  8256. *
  8257. * _.dropRightWhile(users, function(o) { return !o.active; });
  8258. * // => objects for ['barney']
  8259. *
  8260. * // The `_.matches` iteratee shorthand.
  8261. * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
  8262. * // => objects for ['barney', 'fred']
  8263. *
  8264. * // The `_.matchesProperty` iteratee shorthand.
  8265. * _.dropRightWhile(users, ['active', false]);
  8266. * // => objects for ['barney']
  8267. *
  8268. * // The `_.property` iteratee shorthand.
  8269. * _.dropRightWhile(users, 'active');
  8270. * // => objects for ['barney', 'fred', 'pebbles']
  8271. */
  8272. function dropRightWhile(array, predicate) {
  8273. return (array && array.length)
  8274. ? baseWhile(array, getIteratee(predicate, 3), true, true)
  8275. : [];
  8276. }
  8277. /**
  8278. * Creates a slice of `array` excluding elements dropped from the beginning.
  8279. * Elements are dropped until `predicate` returns falsey. The predicate is
  8280. * invoked with three arguments: (value, index, array).
  8281. *
  8282. * @static
  8283. * @memberOf _
  8284. * @since 3.0.0
  8285. * @category Array
  8286. * @param {Array} array The array to query.
  8287. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  8288. * @returns {Array} Returns the slice of `array`.
  8289. * @example
  8290. *
  8291. * var users = [
  8292. * { 'user': 'barney', 'active': false },
  8293. * { 'user': 'fred', 'active': false },
  8294. * { 'user': 'pebbles', 'active': true }
  8295. * ];
  8296. *
  8297. * _.dropWhile(users, function(o) { return !o.active; });
  8298. * // => objects for ['pebbles']
  8299. *
  8300. * // The `_.matches` iteratee shorthand.
  8301. * _.dropWhile(users, { 'user': 'barney', 'active': false });
  8302. * // => objects for ['fred', 'pebbles']
  8303. *
  8304. * // The `_.matchesProperty` iteratee shorthand.
  8305. * _.dropWhile(users, ['active', false]);
  8306. * // => objects for ['pebbles']
  8307. *
  8308. * // The `_.property` iteratee shorthand.
  8309. * _.dropWhile(users, 'active');
  8310. * // => objects for ['barney', 'fred', 'pebbles']
  8311. */
  8312. function dropWhile(array, predicate) {
  8313. return (array && array.length)
  8314. ? baseWhile(array, getIteratee(predicate, 3), true)
  8315. : [];
  8316. }
  8317. /**
  8318. * Fills elements of `array` with `value` from `start` up to, but not
  8319. * including, `end`.
  8320. *
  8321. * **Note:** This method mutates `array`.
  8322. *
  8323. * @static
  8324. * @memberOf _
  8325. * @since 3.2.0
  8326. * @category Array
  8327. * @param {Array} array The array to fill.
  8328. * @param {*} value The value to fill `array` with.
  8329. * @param {number} [start=0] The start position.
  8330. * @param {number} [end=array.length] The end position.
  8331. * @returns {Array} Returns `array`.
  8332. * @example
  8333. *
  8334. * var array = [1, 2, 3];
  8335. *
  8336. * _.fill(array, 'a');
  8337. * console.log(array);
  8338. * // => ['a', 'a', 'a']
  8339. *
  8340. * _.fill(Array(3), 2);
  8341. * // => [2, 2, 2]
  8342. *
  8343. * _.fill([4, 6, 8, 10], '*', 1, 3);
  8344. * // => [4, '*', '*', 10]
  8345. */
  8346. function fill(array, value, start, end) {
  8347. var length = array == null ? 0 : array.length;
  8348. if (!length) {
  8349. return [];
  8350. }
  8351. if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
  8352. start = 0;
  8353. end = length;
  8354. }
  8355. return baseFill(array, value, start, end);
  8356. }
  8357. /**
  8358. * This method is like `_.find` except that it returns the index of the first
  8359. * element `predicate` returns truthy for instead of the element itself.
  8360. *
  8361. * @static
  8362. * @memberOf _
  8363. * @since 1.1.0
  8364. * @category Array
  8365. * @param {Array} array The array to inspect.
  8366. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  8367. * @param {number} [fromIndex=0] The index to search from.
  8368. * @returns {number} Returns the index of the found element, else `-1`.
  8369. * @example
  8370. *
  8371. * var users = [
  8372. * { 'user': 'barney', 'active': false },
  8373. * { 'user': 'fred', 'active': false },
  8374. * { 'user': 'pebbles', 'active': true }
  8375. * ];
  8376. *
  8377. * _.findIndex(users, function(o) { return o.user == 'barney'; });
  8378. * // => 0
  8379. *
  8380. * // The `_.matches` iteratee shorthand.
  8381. * _.findIndex(users, { 'user': 'fred', 'active': false });
  8382. * // => 1
  8383. *
  8384. * // The `_.matchesProperty` iteratee shorthand.
  8385. * _.findIndex(users, ['active', false]);
  8386. * // => 0
  8387. *
  8388. * // The `_.property` iteratee shorthand.
  8389. * _.findIndex(users, 'active');
  8390. * // => 2
  8391. */
  8392. function findIndex(array, predicate, fromIndex) {
  8393. var length = array == null ? 0 : array.length;
  8394. if (!length) {
  8395. return -1;
  8396. }
  8397. var index = fromIndex == null ? 0 : toInteger(fromIndex);
  8398. if (index < 0) {
  8399. index = nativeMax(length + index, 0);
  8400. }
  8401. return baseFindIndex(array, getIteratee(predicate, 3), index);
  8402. }
  8403. /**
  8404. * This method is like `_.findIndex` except that it iterates over elements
  8405. * of `collection` from right to left.
  8406. *
  8407. * @static
  8408. * @memberOf _
  8409. * @since 2.0.0
  8410. * @category Array
  8411. * @param {Array} array The array to inspect.
  8412. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  8413. * @param {number} [fromIndex=array.length-1] The index to search from.
  8414. * @returns {number} Returns the index of the found element, else `-1`.
  8415. * @example
  8416. *
  8417. * var users = [
  8418. * { 'user': 'barney', 'active': true },
  8419. * { 'user': 'fred', 'active': false },
  8420. * { 'user': 'pebbles', 'active': false }
  8421. * ];
  8422. *
  8423. * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
  8424. * // => 2
  8425. *
  8426. * // The `_.matches` iteratee shorthand.
  8427. * _.findLastIndex(users, { 'user': 'barney', 'active': true });
  8428. * // => 0
  8429. *
  8430. * // The `_.matchesProperty` iteratee shorthand.
  8431. * _.findLastIndex(users, ['active', false]);
  8432. * // => 2
  8433. *
  8434. * // The `_.property` iteratee shorthand.
  8435. * _.findLastIndex(users, 'active');
  8436. * // => 0
  8437. */
  8438. function findLastIndex(array, predicate, fromIndex) {
  8439. var length = array == null ? 0 : array.length;
  8440. if (!length) {
  8441. return -1;
  8442. }
  8443. var index = length - 1;
  8444. if (fromIndex !== undefined) {
  8445. index = toInteger(fromIndex);
  8446. index = fromIndex < 0
  8447. ? nativeMax(length + index, 0)
  8448. : nativeMin(index, length - 1);
  8449. }
  8450. return baseFindIndex(array, getIteratee(predicate, 3), index, true);
  8451. }
  8452. /**
  8453. * Flattens `array` a single level deep.
  8454. *
  8455. * @static
  8456. * @memberOf _
  8457. * @since 0.1.0
  8458. * @category Array
  8459. * @param {Array} array The array to flatten.
  8460. * @returns {Array} Returns the new flattened array.
  8461. * @example
  8462. *
  8463. * _.flatten([1, [2, [3, [4]], 5]]);
  8464. * // => [1, 2, [3, [4]], 5]
  8465. */
  8466. function flatten(array) {
  8467. var length = array == null ? 0 : array.length;
  8468. return length ? baseFlatten(array, 1) : [];
  8469. }
  8470. /**
  8471. * Recursively flattens `array`.
  8472. *
  8473. * @static
  8474. * @memberOf _
  8475. * @since 3.0.0
  8476. * @category Array
  8477. * @param {Array} array The array to flatten.
  8478. * @returns {Array} Returns the new flattened array.
  8479. * @example
  8480. *
  8481. * _.flattenDeep([1, [2, [3, [4]], 5]]);
  8482. * // => [1, 2, 3, 4, 5]
  8483. */
  8484. function flattenDeep(array) {
  8485. var length = array == null ? 0 : array.length;
  8486. return length ? baseFlatten(array, INFINITY) : [];
  8487. }
  8488. /**
  8489. * Recursively flatten `array` up to `depth` times.
  8490. *
  8491. * @static
  8492. * @memberOf _
  8493. * @since 4.4.0
  8494. * @category Array
  8495. * @param {Array} array The array to flatten.
  8496. * @param {number} [depth=1] The maximum recursion depth.
  8497. * @returns {Array} Returns the new flattened array.
  8498. * @example
  8499. *
  8500. * var array = [1, [2, [3, [4]], 5]];
  8501. *
  8502. * _.flattenDepth(array, 1);
  8503. * // => [1, 2, [3, [4]], 5]
  8504. *
  8505. * _.flattenDepth(array, 2);
  8506. * // => [1, 2, 3, [4], 5]
  8507. */
  8508. function flattenDepth(array, depth) {
  8509. var length = array == null ? 0 : array.length;
  8510. if (!length) {
  8511. return [];
  8512. }
  8513. depth = depth === undefined ? 1 : toInteger(depth);
  8514. return baseFlatten(array, depth);
  8515. }
  8516. /**
  8517. * The inverse of `_.toPairs`; this method returns an object composed
  8518. * from key-value `pairs`.
  8519. *
  8520. * @static
  8521. * @memberOf _
  8522. * @since 4.0.0
  8523. * @category Array
  8524. * @param {Array} pairs The key-value pairs.
  8525. * @returns {Object} Returns the new object.
  8526. * @example
  8527. *
  8528. * _.fromPairs([['a', 1], ['b', 2]]);
  8529. * // => { 'a': 1, 'b': 2 }
  8530. */
  8531. function fromPairs(pairs) {
  8532. var index = -1,
  8533. length = pairs == null ? 0 : pairs.length,
  8534. result = {};
  8535. while (++index < length) {
  8536. var pair = pairs[index];
  8537. result[pair[0]] = pair[1];
  8538. }
  8539. return result;
  8540. }
  8541. /**
  8542. * Gets the first element of `array`.
  8543. *
  8544. * @static
  8545. * @memberOf _
  8546. * @since 0.1.0
  8547. * @alias first
  8548. * @category Array
  8549. * @param {Array} array The array to query.
  8550. * @returns {*} Returns the first element of `array`.
  8551. * @example
  8552. *
  8553. * _.head([1, 2, 3]);
  8554. * // => 1
  8555. *
  8556. * _.head([]);
  8557. * // => undefined
  8558. */
  8559. function head(array) {
  8560. return (array && array.length) ? array[0] : undefined;
  8561. }
  8562. /**
  8563. * Gets the index at which the first occurrence of `value` is found in `array`
  8564. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  8565. * for equality comparisons. If `fromIndex` is negative, it's used as the
  8566. * offset from the end of `array`.
  8567. *
  8568. * @static
  8569. * @memberOf _
  8570. * @since 0.1.0
  8571. * @category Array
  8572. * @param {Array} array The array to inspect.
  8573. * @param {*} value The value to search for.
  8574. * @param {number} [fromIndex=0] The index to search from.
  8575. * @returns {number} Returns the index of the matched value, else `-1`.
  8576. * @example
  8577. *
  8578. * _.indexOf([1, 2, 1, 2], 2);
  8579. * // => 1
  8580. *
  8581. * // Search from the `fromIndex`.
  8582. * _.indexOf([1, 2, 1, 2], 2, 2);
  8583. * // => 3
  8584. */
  8585. function indexOf(array, value, fromIndex) {
  8586. var length = array == null ? 0 : array.length;
  8587. if (!length) {
  8588. return -1;
  8589. }
  8590. var index = fromIndex == null ? 0 : toInteger(fromIndex);
  8591. if (index < 0) {
  8592. index = nativeMax(length + index, 0);
  8593. }
  8594. return baseIndexOf(array, value, index);
  8595. }
  8596. /**
  8597. * Gets all but the last element of `array`.
  8598. *
  8599. * @static
  8600. * @memberOf _
  8601. * @since 0.1.0
  8602. * @category Array
  8603. * @param {Array} array The array to query.
  8604. * @returns {Array} Returns the slice of `array`.
  8605. * @example
  8606. *
  8607. * _.initial([1, 2, 3]);
  8608. * // => [1, 2]
  8609. */
  8610. function initial(array) {
  8611. var length = array == null ? 0 : array.length;
  8612. return length ? baseSlice(array, 0, -1) : [];
  8613. }
  8614. /**
  8615. * Creates an array of unique values that are included in all given arrays
  8616. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  8617. * for equality comparisons. The order and references of result values are
  8618. * determined by the first array.
  8619. *
  8620. * @static
  8621. * @memberOf _
  8622. * @since 0.1.0
  8623. * @category Array
  8624. * @param {...Array} [arrays] The arrays to inspect.
  8625. * @returns {Array} Returns the new array of intersecting values.
  8626. * @example
  8627. *
  8628. * _.intersection([2, 1], [2, 3]);
  8629. * // => [2]
  8630. */
  8631. var intersection = baseRest(function(arrays) {
  8632. var mapped = arrayMap(arrays, castArrayLikeObject);
  8633. return (mapped.length && mapped[0] === arrays[0])
  8634. ? baseIntersection(mapped)
  8635. : [];
  8636. });
  8637. /**
  8638. * This method is like `_.intersection` except that it accepts `iteratee`
  8639. * which is invoked for each element of each `arrays` to generate the criterion
  8640. * by which they're compared. The order and references of result values are
  8641. * determined by the first array. The iteratee is invoked with one argument:
  8642. * (value).
  8643. *
  8644. * @static
  8645. * @memberOf _
  8646. * @since 4.0.0
  8647. * @category Array
  8648. * @param {...Array} [arrays] The arrays to inspect.
  8649. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  8650. * @returns {Array} Returns the new array of intersecting values.
  8651. * @example
  8652. *
  8653. * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
  8654. * // => [2.1]
  8655. *
  8656. * // The `_.property` iteratee shorthand.
  8657. * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
  8658. * // => [{ 'x': 1 }]
  8659. */
  8660. var intersectionBy = baseRest(function(arrays) {
  8661. var iteratee = last(arrays),
  8662. mapped = arrayMap(arrays, castArrayLikeObject);
  8663. if (iteratee === last(mapped)) {
  8664. iteratee = undefined;
  8665. } else {
  8666. mapped.pop();
  8667. }
  8668. return (mapped.length && mapped[0] === arrays[0])
  8669. ? baseIntersection(mapped, getIteratee(iteratee, 2))
  8670. : [];
  8671. });
  8672. /**
  8673. * This method is like `_.intersection` except that it accepts `comparator`
  8674. * which is invoked to compare elements of `arrays`. The order and references
  8675. * of result values are determined by the first array. The comparator is
  8676. * invoked with two arguments: (arrVal, othVal).
  8677. *
  8678. * @static
  8679. * @memberOf _
  8680. * @since 4.0.0
  8681. * @category Array
  8682. * @param {...Array} [arrays] The arrays to inspect.
  8683. * @param {Function} [comparator] The comparator invoked per element.
  8684. * @returns {Array} Returns the new array of intersecting values.
  8685. * @example
  8686. *
  8687. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  8688. * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
  8689. *
  8690. * _.intersectionWith(objects, others, _.isEqual);
  8691. * // => [{ 'x': 1, 'y': 2 }]
  8692. */
  8693. var intersectionWith = baseRest(function(arrays) {
  8694. var comparator = last(arrays),
  8695. mapped = arrayMap(arrays, castArrayLikeObject);
  8696. comparator = typeof comparator == 'function' ? comparator : undefined;
  8697. if (comparator) {
  8698. mapped.pop();
  8699. }
  8700. return (mapped.length && mapped[0] === arrays[0])
  8701. ? baseIntersection(mapped, undefined, comparator)
  8702. : [];
  8703. });
  8704. /**
  8705. * Converts all elements in `array` into a string separated by `separator`.
  8706. *
  8707. * @static
  8708. * @memberOf _
  8709. * @since 4.0.0
  8710. * @category Array
  8711. * @param {Array} array The array to convert.
  8712. * @param {string} [separator=','] The element separator.
  8713. * @returns {string} Returns the joined string.
  8714. * @example
  8715. *
  8716. * _.join(['a', 'b', 'c'], '~');
  8717. * // => 'a~b~c'
  8718. */
  8719. function join(array, separator) {
  8720. return array == null ? '' : nativeJoin.call(array, separator);
  8721. }
  8722. /**
  8723. * Gets the last element of `array`.
  8724. *
  8725. * @static
  8726. * @memberOf _
  8727. * @since 0.1.0
  8728. * @category Array
  8729. * @param {Array} array The array to query.
  8730. * @returns {*} Returns the last element of `array`.
  8731. * @example
  8732. *
  8733. * _.last([1, 2, 3]);
  8734. * // => 3
  8735. */
  8736. function last(array) {
  8737. var length = array == null ? 0 : array.length;
  8738. return length ? array[length - 1] : undefined;
  8739. }
  8740. /**
  8741. * This method is like `_.indexOf` except that it iterates over elements of
  8742. * `array` from right to left.
  8743. *
  8744. * @static
  8745. * @memberOf _
  8746. * @since 0.1.0
  8747. * @category Array
  8748. * @param {Array} array The array to inspect.
  8749. * @param {*} value The value to search for.
  8750. * @param {number} [fromIndex=array.length-1] The index to search from.
  8751. * @returns {number} Returns the index of the matched value, else `-1`.
  8752. * @example
  8753. *
  8754. * _.lastIndexOf([1, 2, 1, 2], 2);
  8755. * // => 3
  8756. *
  8757. * // Search from the `fromIndex`.
  8758. * _.lastIndexOf([1, 2, 1, 2], 2, 2);
  8759. * // => 1
  8760. */
  8761. function lastIndexOf(array, value, fromIndex) {
  8762. var length = array == null ? 0 : array.length;
  8763. if (!length) {
  8764. return -1;
  8765. }
  8766. var index = length;
  8767. if (fromIndex !== undefined) {
  8768. index = toInteger(fromIndex);
  8769. index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
  8770. }
  8771. return value === value
  8772. ? strictLastIndexOf(array, value, index)
  8773. : baseFindIndex(array, baseIsNaN, index, true);
  8774. }
  8775. /**
  8776. * Gets the element at index `n` of `array`. If `n` is negative, the nth
  8777. * element from the end is returned.
  8778. *
  8779. * @static
  8780. * @memberOf _
  8781. * @since 4.11.0
  8782. * @category Array
  8783. * @param {Array} array The array to query.
  8784. * @param {number} [n=0] The index of the element to return.
  8785. * @returns {*} Returns the nth element of `array`.
  8786. * @example
  8787. *
  8788. * var array = ['a', 'b', 'c', 'd'];
  8789. *
  8790. * _.nth(array, 1);
  8791. * // => 'b'
  8792. *
  8793. * _.nth(array, -2);
  8794. * // => 'c';
  8795. */
  8796. function nth(array, n) {
  8797. return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
  8798. }
  8799. /**
  8800. * Removes all given values from `array` using
  8801. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  8802. * for equality comparisons.
  8803. *
  8804. * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
  8805. * to remove elements from an array by predicate.
  8806. *
  8807. * @static
  8808. * @memberOf _
  8809. * @since 2.0.0
  8810. * @category Array
  8811. * @param {Array} array The array to modify.
  8812. * @param {...*} [values] The values to remove.
  8813. * @returns {Array} Returns `array`.
  8814. * @example
  8815. *
  8816. * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
  8817. *
  8818. * _.pull(array, 'a', 'c');
  8819. * console.log(array);
  8820. * // => ['b', 'b']
  8821. */
  8822. var pull = baseRest(pullAll);
  8823. /**
  8824. * This method is like `_.pull` except that it accepts an array of values to remove.
  8825. *
  8826. * **Note:** Unlike `_.difference`, this method mutates `array`.
  8827. *
  8828. * @static
  8829. * @memberOf _
  8830. * @since 4.0.0
  8831. * @category Array
  8832. * @param {Array} array The array to modify.
  8833. * @param {Array} values The values to remove.
  8834. * @returns {Array} Returns `array`.
  8835. * @example
  8836. *
  8837. * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
  8838. *
  8839. * _.pullAll(array, ['a', 'c']);
  8840. * console.log(array);
  8841. * // => ['b', 'b']
  8842. */
  8843. function pullAll(array, values) {
  8844. return (array && array.length && values && values.length)
  8845. ? basePullAll(array, values)
  8846. : array;
  8847. }
  8848. /**
  8849. * This method is like `_.pullAll` except that it accepts `iteratee` which is
  8850. * invoked for each element of `array` and `values` to generate the criterion
  8851. * by which they're compared. The iteratee is invoked with one argument: (value).
  8852. *
  8853. * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
  8854. *
  8855. * @static
  8856. * @memberOf _
  8857. * @since 4.0.0
  8858. * @category Array
  8859. * @param {Array} array The array to modify.
  8860. * @param {Array} values The values to remove.
  8861. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  8862. * @returns {Array} Returns `array`.
  8863. * @example
  8864. *
  8865. * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
  8866. *
  8867. * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
  8868. * console.log(array);
  8869. * // => [{ 'x': 2 }]
  8870. */
  8871. function pullAllBy(array, values, iteratee) {
  8872. return (array && array.length && values && values.length)
  8873. ? basePullAll(array, values, getIteratee(iteratee, 2))
  8874. : array;
  8875. }
  8876. /**
  8877. * This method is like `_.pullAll` except that it accepts `comparator` which
  8878. * is invoked to compare elements of `array` to `values`. The comparator is
  8879. * invoked with two arguments: (arrVal, othVal).
  8880. *
  8881. * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
  8882. *
  8883. * @static
  8884. * @memberOf _
  8885. * @since 4.6.0
  8886. * @category Array
  8887. * @param {Array} array The array to modify.
  8888. * @param {Array} values The values to remove.
  8889. * @param {Function} [comparator] The comparator invoked per element.
  8890. * @returns {Array} Returns `array`.
  8891. * @example
  8892. *
  8893. * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
  8894. *
  8895. * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
  8896. * console.log(array);
  8897. * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
  8898. */
  8899. function pullAllWith(array, values, comparator) {
  8900. return (array && array.length && values && values.length)
  8901. ? basePullAll(array, values, undefined, comparator)
  8902. : array;
  8903. }
  8904. /**
  8905. * Removes elements from `array` corresponding to `indexes` and returns an
  8906. * array of removed elements.
  8907. *
  8908. * **Note:** Unlike `_.at`, this method mutates `array`.
  8909. *
  8910. * @static
  8911. * @memberOf _
  8912. * @since 3.0.0
  8913. * @category Array
  8914. * @param {Array} array The array to modify.
  8915. * @param {...(number|number[])} [indexes] The indexes of elements to remove.
  8916. * @returns {Array} Returns the new array of removed elements.
  8917. * @example
  8918. *
  8919. * var array = ['a', 'b', 'c', 'd'];
  8920. * var pulled = _.pullAt(array, [1, 3]);
  8921. *
  8922. * console.log(array);
  8923. * // => ['a', 'c']
  8924. *
  8925. * console.log(pulled);
  8926. * // => ['b', 'd']
  8927. */
  8928. var pullAt = flatRest(function(array, indexes) {
  8929. var length = array == null ? 0 : array.length,
  8930. result = baseAt(array, indexes);
  8931. basePullAt(array, arrayMap(indexes, function(index) {
  8932. return isIndex(index, length) ? +index : index;
  8933. }).sort(compareAscending));
  8934. return result;
  8935. });
  8936. /**
  8937. * Removes all elements from `array` that `predicate` returns truthy for
  8938. * and returns an array of the removed elements. The predicate is invoked
  8939. * with three arguments: (value, index, array).
  8940. *
  8941. * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
  8942. * to pull elements from an array by value.
  8943. *
  8944. * @static
  8945. * @memberOf _
  8946. * @since 2.0.0
  8947. * @category Array
  8948. * @param {Array} array The array to modify.
  8949. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  8950. * @returns {Array} Returns the new array of removed elements.
  8951. * @example
  8952. *
  8953. * var array = [1, 2, 3, 4];
  8954. * var evens = _.remove(array, function(n) {
  8955. * return n % 2 == 0;
  8956. * });
  8957. *
  8958. * console.log(array);
  8959. * // => [1, 3]
  8960. *
  8961. * console.log(evens);
  8962. * // => [2, 4]
  8963. */
  8964. function remove(array, predicate) {
  8965. var result = [];
  8966. if (!(array && array.length)) {
  8967. return result;
  8968. }
  8969. var index = -1,
  8970. indexes = [],
  8971. length = array.length;
  8972. predicate = getIteratee(predicate, 3);
  8973. while (++index < length) {
  8974. var value = array[index];
  8975. if (predicate(value, index, array)) {
  8976. result.push(value);
  8977. indexes.push(index);
  8978. }
  8979. }
  8980. basePullAt(array, indexes);
  8981. return result;
  8982. }
  8983. /**
  8984. * Reverses `array` so that the first element becomes the last, the second
  8985. * element becomes the second to last, and so on.
  8986. *
  8987. * **Note:** This method mutates `array` and is based on
  8988. * [`Array#reverse`](https://mdn.io/Array/reverse).
  8989. *
  8990. * @static
  8991. * @memberOf _
  8992. * @since 4.0.0
  8993. * @category Array
  8994. * @param {Array} array The array to modify.
  8995. * @returns {Array} Returns `array`.
  8996. * @example
  8997. *
  8998. * var array = [1, 2, 3];
  8999. *
  9000. * _.reverse(array);
  9001. * // => [3, 2, 1]
  9002. *
  9003. * console.log(array);
  9004. * // => [3, 2, 1]
  9005. */
  9006. function reverse(array) {
  9007. return array == null ? array : nativeReverse.call(array);
  9008. }
  9009. /**
  9010. * Creates a slice of `array` from `start` up to, but not including, `end`.
  9011. *
  9012. * **Note:** This method is used instead of
  9013. * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
  9014. * returned.
  9015. *
  9016. * @static
  9017. * @memberOf _
  9018. * @since 3.0.0
  9019. * @category Array
  9020. * @param {Array} array The array to slice.
  9021. * @param {number} [start=0] The start position.
  9022. * @param {number} [end=array.length] The end position.
  9023. * @returns {Array} Returns the slice of `array`.
  9024. */
  9025. function slice(array, start, end) {
  9026. var length = array == null ? 0 : array.length;
  9027. if (!length) {
  9028. return [];
  9029. }
  9030. if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
  9031. start = 0;
  9032. end = length;
  9033. }
  9034. else {
  9035. start = start == null ? 0 : toInteger(start);
  9036. end = end === undefined ? length : toInteger(end);
  9037. }
  9038. return baseSlice(array, start, end);
  9039. }
  9040. /**
  9041. * Uses a binary search to determine the lowest index at which `value`
  9042. * should be inserted into `array` in order to maintain its sort order.
  9043. *
  9044. * @static
  9045. * @memberOf _
  9046. * @since 0.1.0
  9047. * @category Array
  9048. * @param {Array} array The sorted array to inspect.
  9049. * @param {*} value The value to evaluate.
  9050. * @returns {number} Returns the index at which `value` should be inserted
  9051. * into `array`.
  9052. * @example
  9053. *
  9054. * _.sortedIndex([30, 50], 40);
  9055. * // => 1
  9056. */
  9057. function sortedIndex(array, value) {
  9058. return baseSortedIndex(array, value);
  9059. }
  9060. /**
  9061. * This method is like `_.sortedIndex` except that it accepts `iteratee`
  9062. * which is invoked for `value` and each element of `array` to compute their
  9063. * sort ranking. The iteratee is invoked with one argument: (value).
  9064. *
  9065. * @static
  9066. * @memberOf _
  9067. * @since 4.0.0
  9068. * @category Array
  9069. * @param {Array} array The sorted array to inspect.
  9070. * @param {*} value The value to evaluate.
  9071. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  9072. * @returns {number} Returns the index at which `value` should be inserted
  9073. * into `array`.
  9074. * @example
  9075. *
  9076. * var objects = [{ 'x': 4 }, { 'x': 5 }];
  9077. *
  9078. * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
  9079. * // => 0
  9080. *
  9081. * // The `_.property` iteratee shorthand.
  9082. * _.sortedIndexBy(objects, { 'x': 4 }, 'x');
  9083. * // => 0
  9084. */
  9085. function sortedIndexBy(array, value, iteratee) {
  9086. return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));
  9087. }
  9088. /**
  9089. * This method is like `_.indexOf` except that it performs a binary
  9090. * search on a sorted `array`.
  9091. *
  9092. * @static
  9093. * @memberOf _
  9094. * @since 4.0.0
  9095. * @category Array
  9096. * @param {Array} array The array to inspect.
  9097. * @param {*} value The value to search for.
  9098. * @returns {number} Returns the index of the matched value, else `-1`.
  9099. * @example
  9100. *
  9101. * _.sortedIndexOf([4, 5, 5, 5, 6], 5);
  9102. * // => 1
  9103. */
  9104. function sortedIndexOf(array, value) {
  9105. var length = array == null ? 0 : array.length;
  9106. if (length) {
  9107. var index = baseSortedIndex(array, value);
  9108. if (index < length && eq(array[index], value)) {
  9109. return index;
  9110. }
  9111. }
  9112. return -1;
  9113. }
  9114. /**
  9115. * This method is like `_.sortedIndex` except that it returns the highest
  9116. * index at which `value` should be inserted into `array` in order to
  9117. * maintain its sort order.
  9118. *
  9119. * @static
  9120. * @memberOf _
  9121. * @since 3.0.0
  9122. * @category Array
  9123. * @param {Array} array The sorted array to inspect.
  9124. * @param {*} value The value to evaluate.
  9125. * @returns {number} Returns the index at which `value` should be inserted
  9126. * into `array`.
  9127. * @example
  9128. *
  9129. * _.sortedLastIndex([4, 5, 5, 5, 6], 5);
  9130. * // => 4
  9131. */
  9132. function sortedLastIndex(array, value) {
  9133. return baseSortedIndex(array, value, true);
  9134. }
  9135. /**
  9136. * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
  9137. * which is invoked for `value` and each element of `array` to compute their
  9138. * sort ranking. The iteratee is invoked with one argument: (value).
  9139. *
  9140. * @static
  9141. * @memberOf _
  9142. * @since 4.0.0
  9143. * @category Array
  9144. * @param {Array} array The sorted array to inspect.
  9145. * @param {*} value The value to evaluate.
  9146. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  9147. * @returns {number} Returns the index at which `value` should be inserted
  9148. * into `array`.
  9149. * @example
  9150. *
  9151. * var objects = [{ 'x': 4 }, { 'x': 5 }];
  9152. *
  9153. * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
  9154. * // => 1
  9155. *
  9156. * // The `_.property` iteratee shorthand.
  9157. * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');
  9158. * // => 1
  9159. */
  9160. function sortedLastIndexBy(array, value, iteratee) {
  9161. return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);
  9162. }
  9163. /**
  9164. * This method is like `_.lastIndexOf` except that it performs a binary
  9165. * search on a sorted `array`.
  9166. *
  9167. * @static
  9168. * @memberOf _
  9169. * @since 4.0.0
  9170. * @category Array
  9171. * @param {Array} array The array to inspect.
  9172. * @param {*} value The value to search for.
  9173. * @returns {number} Returns the index of the matched value, else `-1`.
  9174. * @example
  9175. *
  9176. * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
  9177. * // => 3
  9178. */
  9179. function sortedLastIndexOf(array, value) {
  9180. var length = array == null ? 0 : array.length;
  9181. if (length) {
  9182. var index = baseSortedIndex(array, value, true) - 1;
  9183. if (eq(array[index], value)) {
  9184. return index;
  9185. }
  9186. }
  9187. return -1;
  9188. }
  9189. /**
  9190. * This method is like `_.uniq` except that it's designed and optimized
  9191. * for sorted arrays.
  9192. *
  9193. * @static
  9194. * @memberOf _
  9195. * @since 4.0.0
  9196. * @category Array
  9197. * @param {Array} array The array to inspect.
  9198. * @returns {Array} Returns the new duplicate free array.
  9199. * @example
  9200. *
  9201. * _.sortedUniq([1, 1, 2]);
  9202. * // => [1, 2]
  9203. */
  9204. function sortedUniq(array) {
  9205. return (array && array.length)
  9206. ? baseSortedUniq(array)
  9207. : [];
  9208. }
  9209. /**
  9210. * This method is like `_.uniqBy` except that it's designed and optimized
  9211. * for sorted arrays.
  9212. *
  9213. * @static
  9214. * @memberOf _
  9215. * @since 4.0.0
  9216. * @category Array
  9217. * @param {Array} array The array to inspect.
  9218. * @param {Function} [iteratee] The iteratee invoked per element.
  9219. * @returns {Array} Returns the new duplicate free array.
  9220. * @example
  9221. *
  9222. * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
  9223. * // => [1.1, 2.3]
  9224. */
  9225. function sortedUniqBy(array, iteratee) {
  9226. return (array && array.length)
  9227. ? baseSortedUniq(array, getIteratee(iteratee, 2))
  9228. : [];
  9229. }
  9230. /**
  9231. * Gets all but the first element of `array`.
  9232. *
  9233. * @static
  9234. * @memberOf _
  9235. * @since 4.0.0
  9236. * @category Array
  9237. * @param {Array} array The array to query.
  9238. * @returns {Array} Returns the slice of `array`.
  9239. * @example
  9240. *
  9241. * _.tail([1, 2, 3]);
  9242. * // => [2, 3]
  9243. */
  9244. function tail(array) {
  9245. var length = array == null ? 0 : array.length;
  9246. return length ? baseSlice(array, 1, length) : [];
  9247. }
  9248. /**
  9249. * Creates a slice of `array` with `n` elements taken from the beginning.
  9250. *
  9251. * @static
  9252. * @memberOf _
  9253. * @since 0.1.0
  9254. * @category Array
  9255. * @param {Array} array The array to query.
  9256. * @param {number} [n=1] The number of elements to take.
  9257. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  9258. * @returns {Array} Returns the slice of `array`.
  9259. * @example
  9260. *
  9261. * _.take([1, 2, 3]);
  9262. * // => [1]
  9263. *
  9264. * _.take([1, 2, 3], 2);
  9265. * // => [1, 2]
  9266. *
  9267. * _.take([1, 2, 3], 5);
  9268. * // => [1, 2, 3]
  9269. *
  9270. * _.take([1, 2, 3], 0);
  9271. * // => []
  9272. */
  9273. function take(array, n, guard) {
  9274. if (!(array && array.length)) {
  9275. return [];
  9276. }
  9277. n = (guard || n === undefined) ? 1 : toInteger(n);
  9278. return baseSlice(array, 0, n < 0 ? 0 : n);
  9279. }
  9280. /**
  9281. * Creates a slice of `array` with `n` elements taken from the end.
  9282. *
  9283. * @static
  9284. * @memberOf _
  9285. * @since 3.0.0
  9286. * @category Array
  9287. * @param {Array} array The array to query.
  9288. * @param {number} [n=1] The number of elements to take.
  9289. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  9290. * @returns {Array} Returns the slice of `array`.
  9291. * @example
  9292. *
  9293. * _.takeRight([1, 2, 3]);
  9294. * // => [3]
  9295. *
  9296. * _.takeRight([1, 2, 3], 2);
  9297. * // => [2, 3]
  9298. *
  9299. * _.takeRight([1, 2, 3], 5);
  9300. * // => [1, 2, 3]
  9301. *
  9302. * _.takeRight([1, 2, 3], 0);
  9303. * // => []
  9304. */
  9305. function takeRight(array, n, guard) {
  9306. var length = array == null ? 0 : array.length;
  9307. if (!length) {
  9308. return [];
  9309. }
  9310. n = (guard || n === undefined) ? 1 : toInteger(n);
  9311. n = length - n;
  9312. return baseSlice(array, n < 0 ? 0 : n, length);
  9313. }
  9314. /**
  9315. * Creates a slice of `array` with elements taken from the end. Elements are
  9316. * taken until `predicate` returns falsey. The predicate is invoked with
  9317. * three arguments: (value, index, array).
  9318. *
  9319. * @static
  9320. * @memberOf _
  9321. * @since 3.0.0
  9322. * @category Array
  9323. * @param {Array} array The array to query.
  9324. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  9325. * @returns {Array} Returns the slice of `array`.
  9326. * @example
  9327. *
  9328. * var users = [
  9329. * { 'user': 'barney', 'active': true },
  9330. * { 'user': 'fred', 'active': false },
  9331. * { 'user': 'pebbles', 'active': false }
  9332. * ];
  9333. *
  9334. * _.takeRightWhile(users, function(o) { return !o.active; });
  9335. * // => objects for ['fred', 'pebbles']
  9336. *
  9337. * // The `_.matches` iteratee shorthand.
  9338. * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
  9339. * // => objects for ['pebbles']
  9340. *
  9341. * // The `_.matchesProperty` iteratee shorthand.
  9342. * _.takeRightWhile(users, ['active', false]);
  9343. * // => objects for ['fred', 'pebbles']
  9344. *
  9345. * // The `_.property` iteratee shorthand.
  9346. * _.takeRightWhile(users, 'active');
  9347. * // => []
  9348. */
  9349. function takeRightWhile(array, predicate) {
  9350. return (array && array.length)
  9351. ? baseWhile(array, getIteratee(predicate, 3), false, true)
  9352. : [];
  9353. }
  9354. /**
  9355. * Creates a slice of `array` with elements taken from the beginning. Elements
  9356. * are taken until `predicate` returns falsey. The predicate is invoked with
  9357. * three arguments: (value, index, array).
  9358. *
  9359. * @static
  9360. * @memberOf _
  9361. * @since 3.0.0
  9362. * @category Array
  9363. * @param {Array} array The array to query.
  9364. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  9365. * @returns {Array} Returns the slice of `array`.
  9366. * @example
  9367. *
  9368. * var users = [
  9369. * { 'user': 'barney', 'active': false },
  9370. * { 'user': 'fred', 'active': false },
  9371. * { 'user': 'pebbles', 'active': true }
  9372. * ];
  9373. *
  9374. * _.takeWhile(users, function(o) { return !o.active; });
  9375. * // => objects for ['barney', 'fred']
  9376. *
  9377. * // The `_.matches` iteratee shorthand.
  9378. * _.takeWhile(users, { 'user': 'barney', 'active': false });
  9379. * // => objects for ['barney']
  9380. *
  9381. * // The `_.matchesProperty` iteratee shorthand.
  9382. * _.takeWhile(users, ['active', false]);
  9383. * // => objects for ['barney', 'fred']
  9384. *
  9385. * // The `_.property` iteratee shorthand.
  9386. * _.takeWhile(users, 'active');
  9387. * // => []
  9388. */
  9389. function takeWhile(array, predicate) {
  9390. return (array && array.length)
  9391. ? baseWhile(array, getIteratee(predicate, 3))
  9392. : [];
  9393. }
  9394. /**
  9395. * Creates an array of unique values, in order, from all given arrays using
  9396. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  9397. * for equality comparisons.
  9398. *
  9399. * @static
  9400. * @memberOf _
  9401. * @since 0.1.0
  9402. * @category Array
  9403. * @param {...Array} [arrays] The arrays to inspect.
  9404. * @returns {Array} Returns the new array of combined values.
  9405. * @example
  9406. *
  9407. * _.union([2], [1, 2]);
  9408. * // => [2, 1]
  9409. */
  9410. var union = baseRest(function(arrays) {
  9411. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
  9412. });
  9413. /**
  9414. * This method is like `_.union` except that it accepts `iteratee` which is
  9415. * invoked for each element of each `arrays` to generate the criterion by
  9416. * which uniqueness is computed. Result values are chosen from the first
  9417. * array in which the value occurs. The iteratee is invoked with one argument:
  9418. * (value).
  9419. *
  9420. * @static
  9421. * @memberOf _
  9422. * @since 4.0.0
  9423. * @category Array
  9424. * @param {...Array} [arrays] The arrays to inspect.
  9425. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  9426. * @returns {Array} Returns the new array of combined values.
  9427. * @example
  9428. *
  9429. * _.unionBy([2.1], [1.2, 2.3], Math.floor);
  9430. * // => [2.1, 1.2]
  9431. *
  9432. * // The `_.property` iteratee shorthand.
  9433. * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
  9434. * // => [{ 'x': 1 }, { 'x': 2 }]
  9435. */
  9436. var unionBy = baseRest(function(arrays) {
  9437. var iteratee = last(arrays);
  9438. if (isArrayLikeObject(iteratee)) {
  9439. iteratee = undefined;
  9440. }
  9441. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));
  9442. });
  9443. /**
  9444. * This method is like `_.union` except that it accepts `comparator` which
  9445. * is invoked to compare elements of `arrays`. Result values are chosen from
  9446. * the first array in which the value occurs. The comparator is invoked
  9447. * with two arguments: (arrVal, othVal).
  9448. *
  9449. * @static
  9450. * @memberOf _
  9451. * @since 4.0.0
  9452. * @category Array
  9453. * @param {...Array} [arrays] The arrays to inspect.
  9454. * @param {Function} [comparator] The comparator invoked per element.
  9455. * @returns {Array} Returns the new array of combined values.
  9456. * @example
  9457. *
  9458. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  9459. * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
  9460. *
  9461. * _.unionWith(objects, others, _.isEqual);
  9462. * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
  9463. */
  9464. var unionWith = baseRest(function(arrays) {
  9465. var comparator = last(arrays);
  9466. comparator = typeof comparator == 'function' ? comparator : undefined;
  9467. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
  9468. });
  9469. /**
  9470. * Creates a duplicate-free version of an array, using
  9471. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  9472. * for equality comparisons, in which only the first occurrence of each element
  9473. * is kept. The order of result values is determined by the order they occur
  9474. * in the array.
  9475. *
  9476. * @static
  9477. * @memberOf _
  9478. * @since 0.1.0
  9479. * @category Array
  9480. * @param {Array} array The array to inspect.
  9481. * @returns {Array} Returns the new duplicate free array.
  9482. * @example
  9483. *
  9484. * _.uniq([2, 1, 2]);
  9485. * // => [2, 1]
  9486. */
  9487. function uniq(array) {
  9488. return (array && array.length) ? baseUniq(array) : [];
  9489. }
  9490. /**
  9491. * This method is like `_.uniq` except that it accepts `iteratee` which is
  9492. * invoked for each element in `array` to generate the criterion by which
  9493. * uniqueness is computed. The order of result values is determined by the
  9494. * order they occur in the array. The iteratee is invoked with one argument:
  9495. * (value).
  9496. *
  9497. * @static
  9498. * @memberOf _
  9499. * @since 4.0.0
  9500. * @category Array
  9501. * @param {Array} array The array to inspect.
  9502. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  9503. * @returns {Array} Returns the new duplicate free array.
  9504. * @example
  9505. *
  9506. * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
  9507. * // => [2.1, 1.2]
  9508. *
  9509. * // The `_.property` iteratee shorthand.
  9510. * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
  9511. * // => [{ 'x': 1 }, { 'x': 2 }]
  9512. */
  9513. function uniqBy(array, iteratee) {
  9514. return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];
  9515. }
  9516. /**
  9517. * This method is like `_.uniq` except that it accepts `comparator` which
  9518. * is invoked to compare elements of `array`. The order of result values is
  9519. * determined by the order they occur in the array.The comparator is invoked
  9520. * with two arguments: (arrVal, othVal).
  9521. *
  9522. * @static
  9523. * @memberOf _
  9524. * @since 4.0.0
  9525. * @category Array
  9526. * @param {Array} array The array to inspect.
  9527. * @param {Function} [comparator] The comparator invoked per element.
  9528. * @returns {Array} Returns the new duplicate free array.
  9529. * @example
  9530. *
  9531. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
  9532. *
  9533. * _.uniqWith(objects, _.isEqual);
  9534. * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
  9535. */
  9536. function uniqWith(array, comparator) {
  9537. comparator = typeof comparator == 'function' ? comparator : undefined;
  9538. return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
  9539. }
  9540. /**
  9541. * This method is like `_.zip` except that it accepts an array of grouped
  9542. * elements and creates an array regrouping the elements to their pre-zip
  9543. * configuration.
  9544. *
  9545. * @static
  9546. * @memberOf _
  9547. * @since 1.2.0
  9548. * @category Array
  9549. * @param {Array} array The array of grouped elements to process.
  9550. * @returns {Array} Returns the new array of regrouped elements.
  9551. * @example
  9552. *
  9553. * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);
  9554. * // => [['a', 1, true], ['b', 2, false]]
  9555. *
  9556. * _.unzip(zipped);
  9557. * // => [['a', 'b'], [1, 2], [true, false]]
  9558. */
  9559. function unzip(array) {
  9560. if (!(array && array.length)) {
  9561. return [];
  9562. }
  9563. var length = 0;
  9564. array = arrayFilter(array, function(group) {
  9565. if (isArrayLikeObject(group)) {
  9566. length = nativeMax(group.length, length);
  9567. return true;
  9568. }
  9569. });
  9570. return baseTimes(length, function(index) {
  9571. return arrayMap(array, baseProperty(index));
  9572. });
  9573. }
  9574. /**
  9575. * This method is like `_.unzip` except that it accepts `iteratee` to specify
  9576. * how regrouped values should be combined. The iteratee is invoked with the
  9577. * elements of each group: (...group).
  9578. *
  9579. * @static
  9580. * @memberOf _
  9581. * @since 3.8.0
  9582. * @category Array
  9583. * @param {Array} array The array of grouped elements to process.
  9584. * @param {Function} [iteratee=_.identity] The function to combine
  9585. * regrouped values.
  9586. * @returns {Array} Returns the new array of regrouped elements.
  9587. * @example
  9588. *
  9589. * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
  9590. * // => [[1, 10, 100], [2, 20, 200]]
  9591. *
  9592. * _.unzipWith(zipped, _.add);
  9593. * // => [3, 30, 300]
  9594. */
  9595. function unzipWith(array, iteratee) {
  9596. if (!(array && array.length)) {
  9597. return [];
  9598. }
  9599. var result = unzip(array);
  9600. if (iteratee == null) {
  9601. return result;
  9602. }
  9603. return arrayMap(result, function(group) {
  9604. return apply(iteratee, undefined, group);
  9605. });
  9606. }
  9607. /**
  9608. * Creates an array excluding all given values using
  9609. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  9610. * for equality comparisons.
  9611. *
  9612. * **Note:** Unlike `_.pull`, this method returns a new array.
  9613. *
  9614. * @static
  9615. * @memberOf _
  9616. * @since 0.1.0
  9617. * @category Array
  9618. * @param {Array} array The array to inspect.
  9619. * @param {...*} [values] The values to exclude.
  9620. * @returns {Array} Returns the new array of filtered values.
  9621. * @see _.difference, _.xor
  9622. * @example
  9623. *
  9624. * _.without([2, 1, 2, 3], 1, 2);
  9625. * // => [3]
  9626. */
  9627. var without = baseRest(function(array, values) {
  9628. return isArrayLikeObject(array)
  9629. ? baseDifference(array, values)
  9630. : [];
  9631. });
  9632. /**
  9633. * Creates an array of unique values that is the
  9634. * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
  9635. * of the given arrays. The order of result values is determined by the order
  9636. * they occur in the arrays.
  9637. *
  9638. * @static
  9639. * @memberOf _
  9640. * @since 2.4.0
  9641. * @category Array
  9642. * @param {...Array} [arrays] The arrays to inspect.
  9643. * @returns {Array} Returns the new array of filtered values.
  9644. * @see _.difference, _.without
  9645. * @example
  9646. *
  9647. * _.xor([2, 1], [2, 3]);
  9648. * // => [1, 3]
  9649. */
  9650. var xor = baseRest(function(arrays) {
  9651. return baseXor(arrayFilter(arrays, isArrayLikeObject));
  9652. });
  9653. /**
  9654. * This method is like `_.xor` except that it accepts `iteratee` which is
  9655. * invoked for each element of each `arrays` to generate the criterion by
  9656. * which by which they're compared. The order of result values is determined
  9657. * by the order they occur in the arrays. The iteratee is invoked with one
  9658. * argument: (value).
  9659. *
  9660. * @static
  9661. * @memberOf _
  9662. * @since 4.0.0
  9663. * @category Array
  9664. * @param {...Array} [arrays] The arrays to inspect.
  9665. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  9666. * @returns {Array} Returns the new array of filtered values.
  9667. * @example
  9668. *
  9669. * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);
  9670. * // => [1.2, 3.4]
  9671. *
  9672. * // The `_.property` iteratee shorthand.
  9673. * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
  9674. * // => [{ 'x': 2 }]
  9675. */
  9676. var xorBy = baseRest(function(arrays) {
  9677. var iteratee = last(arrays);
  9678. if (isArrayLikeObject(iteratee)) {
  9679. iteratee = undefined;
  9680. }
  9681. return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));
  9682. });
  9683. /**
  9684. * This method is like `_.xor` except that it accepts `comparator` which is
  9685. * invoked to compare elements of `arrays`. The order of result values is
  9686. * determined by the order they occur in the arrays. The comparator is invoked
  9687. * with two arguments: (arrVal, othVal).
  9688. *
  9689. * @static
  9690. * @memberOf _
  9691. * @since 4.0.0
  9692. * @category Array
  9693. * @param {...Array} [arrays] The arrays to inspect.
  9694. * @param {Function} [comparator] The comparator invoked per element.
  9695. * @returns {Array} Returns the new array of filtered values.
  9696. * @example
  9697. *
  9698. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  9699. * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
  9700. *
  9701. * _.xorWith(objects, others, _.isEqual);
  9702. * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
  9703. */
  9704. var xorWith = baseRest(function(arrays) {
  9705. var comparator = last(arrays);
  9706. comparator = typeof comparator == 'function' ? comparator : undefined;
  9707. return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
  9708. });
  9709. /**
  9710. * Creates an array of grouped elements, the first of which contains the
  9711. * first elements of the given arrays, the second of which contains the
  9712. * second elements of the given arrays, and so on.
  9713. *
  9714. * @static
  9715. * @memberOf _
  9716. * @since 0.1.0
  9717. * @category Array
  9718. * @param {...Array} [arrays] The arrays to process.
  9719. * @returns {Array} Returns the new array of grouped elements.
  9720. * @example
  9721. *
  9722. * _.zip(['a', 'b'], [1, 2], [true, false]);
  9723. * // => [['a', 1, true], ['b', 2, false]]
  9724. */
  9725. var zip = baseRest(unzip);
  9726. /**
  9727. * This method is like `_.fromPairs` except that it accepts two arrays,
  9728. * one of property identifiers and one of corresponding values.
  9729. *
  9730. * @static
  9731. * @memberOf _
  9732. * @since 0.4.0
  9733. * @category Array
  9734. * @param {Array} [props=[]] The property identifiers.
  9735. * @param {Array} [values=[]] The property values.
  9736. * @returns {Object} Returns the new object.
  9737. * @example
  9738. *
  9739. * _.zipObject(['a', 'b'], [1, 2]);
  9740. * // => { 'a': 1, 'b': 2 }
  9741. */
  9742. function zipObject(props, values) {
  9743. return baseZipObject(props || [], values || [], assignValue);
  9744. }
  9745. /**
  9746. * This method is like `_.zipObject` except that it supports property paths.
  9747. *
  9748. * @static
  9749. * @memberOf _
  9750. * @since 4.1.0
  9751. * @category Array
  9752. * @param {Array} [props=[]] The property identifiers.
  9753. * @param {Array} [values=[]] The property values.
  9754. * @returns {Object} Returns the new object.
  9755. * @example
  9756. *
  9757. * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
  9758. * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
  9759. */
  9760. function zipObjectDeep(props, values) {
  9761. return baseZipObject(props || [], values || [], baseSet);
  9762. }
  9763. /**
  9764. * This method is like `_.zip` except that it accepts `iteratee` to specify
  9765. * how grouped values should be combined. The iteratee is invoked with the
  9766. * elements of each group: (...group).
  9767. *
  9768. * @static
  9769. * @memberOf _
  9770. * @since 3.8.0
  9771. * @category Array
  9772. * @param {...Array} [arrays] The arrays to process.
  9773. * @param {Function} [iteratee=_.identity] The function to combine
  9774. * grouped values.
  9775. * @returns {Array} Returns the new array of grouped elements.
  9776. * @example
  9777. *
  9778. * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
  9779. * return a + b + c;
  9780. * });
  9781. * // => [111, 222]
  9782. */
  9783. var zipWith = baseRest(function(arrays) {
  9784. var length = arrays.length,
  9785. iteratee = length > 1 ? arrays[length - 1] : undefined;
  9786. iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
  9787. return unzipWith(arrays, iteratee);
  9788. });
  9789. /*------------------------------------------------------------------------*/
  9790. /**
  9791. * Creates a `lodash` wrapper instance that wraps `value` with explicit method
  9792. * chain sequences enabled. The result of such sequences must be unwrapped
  9793. * with `_#value`.
  9794. *
  9795. * @static
  9796. * @memberOf _
  9797. * @since 1.3.0
  9798. * @category Seq
  9799. * @param {*} value The value to wrap.
  9800. * @returns {Object} Returns the new `lodash` wrapper instance.
  9801. * @example
  9802. *
  9803. * var users = [
  9804. * { 'user': 'barney', 'age': 36 },
  9805. * { 'user': 'fred', 'age': 40 },
  9806. * { 'user': 'pebbles', 'age': 1 }
  9807. * ];
  9808. *
  9809. * var youngest = _
  9810. * .chain(users)
  9811. * .sortBy('age')
  9812. * .map(function(o) {
  9813. * return o.user + ' is ' + o.age;
  9814. * })
  9815. * .head()
  9816. * .value();
  9817. * // => 'pebbles is 1'
  9818. */
  9819. function chain(value) {
  9820. var result = lodash(value);
  9821. result.__chain__ = true;
  9822. return result;
  9823. }
  9824. /**
  9825. * This method invokes `interceptor` and returns `value`. The interceptor
  9826. * is invoked with one argument; (value). The purpose of this method is to
  9827. * "tap into" a method chain sequence in order to modify intermediate results.
  9828. *
  9829. * @static
  9830. * @memberOf _
  9831. * @since 0.1.0
  9832. * @category Seq
  9833. * @param {*} value The value to provide to `interceptor`.
  9834. * @param {Function} interceptor The function to invoke.
  9835. * @returns {*} Returns `value`.
  9836. * @example
  9837. *
  9838. * _([1, 2, 3])
  9839. * .tap(function(array) {
  9840. * // Mutate input array.
  9841. * array.pop();
  9842. * })
  9843. * .reverse()
  9844. * .value();
  9845. * // => [2, 1]
  9846. */
  9847. function tap(value, interceptor) {
  9848. interceptor(value);
  9849. return value;
  9850. }
  9851. /**
  9852. * This method is like `_.tap` except that it returns the result of `interceptor`.
  9853. * The purpose of this method is to "pass thru" values replacing intermediate
  9854. * results in a method chain sequence.
  9855. *
  9856. * @static
  9857. * @memberOf _
  9858. * @since 3.0.0
  9859. * @category Seq
  9860. * @param {*} value The value to provide to `interceptor`.
  9861. * @param {Function} interceptor The function to invoke.
  9862. * @returns {*} Returns the result of `interceptor`.
  9863. * @example
  9864. *
  9865. * _(' abc ')
  9866. * .chain()
  9867. * .trim()
  9868. * .thru(function(value) {
  9869. * return [value];
  9870. * })
  9871. * .value();
  9872. * // => ['abc']
  9873. */
  9874. function thru(value, interceptor) {
  9875. return interceptor(value);
  9876. }
  9877. /**
  9878. * This method is the wrapper version of `_.at`.
  9879. *
  9880. * @name at
  9881. * @memberOf _
  9882. * @since 1.0.0
  9883. * @category Seq
  9884. * @param {...(string|string[])} [paths] The property paths to pick.
  9885. * @returns {Object} Returns the new `lodash` wrapper instance.
  9886. * @example
  9887. *
  9888. * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
  9889. *
  9890. * _(object).at(['a[0].b.c', 'a[1]']).value();
  9891. * // => [3, 4]
  9892. */
  9893. var wrapperAt = flatRest(function(paths) {
  9894. var length = paths.length,
  9895. start = length ? paths[0] : 0,
  9896. value = this.__wrapped__,
  9897. interceptor = function(object) { return baseAt(object, paths); };
  9898. if (length > 1 || this.__actions__.length ||
  9899. !(value instanceof LazyWrapper) || !isIndex(start)) {
  9900. return this.thru(interceptor);
  9901. }
  9902. value = value.slice(start, +start + (length ? 1 : 0));
  9903. value.__actions__.push({
  9904. 'func': thru,
  9905. 'args': [interceptor],
  9906. 'thisArg': undefined
  9907. });
  9908. return new LodashWrapper(value, this.__chain__).thru(function(array) {
  9909. if (length && !array.length) {
  9910. array.push(undefined);
  9911. }
  9912. return array;
  9913. });
  9914. });
  9915. /**
  9916. * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
  9917. *
  9918. * @name chain
  9919. * @memberOf _
  9920. * @since 0.1.0
  9921. * @category Seq
  9922. * @returns {Object} Returns the new `lodash` wrapper instance.
  9923. * @example
  9924. *
  9925. * var users = [
  9926. * { 'user': 'barney', 'age': 36 },
  9927. * { 'user': 'fred', 'age': 40 }
  9928. * ];
  9929. *
  9930. * // A sequence without explicit chaining.
  9931. * _(users).head();
  9932. * // => { 'user': 'barney', 'age': 36 }
  9933. *
  9934. * // A sequence with explicit chaining.
  9935. * _(users)
  9936. * .chain()
  9937. * .head()
  9938. * .pick('user')
  9939. * .value();
  9940. * // => { 'user': 'barney' }
  9941. */
  9942. function wrapperChain() {
  9943. return chain(this);
  9944. }
  9945. /**
  9946. * Executes the chain sequence and returns the wrapped result.
  9947. *
  9948. * @name commit
  9949. * @memberOf _
  9950. * @since 3.2.0
  9951. * @category Seq
  9952. * @returns {Object} Returns the new `lodash` wrapper instance.
  9953. * @example
  9954. *
  9955. * var array = [1, 2];
  9956. * var wrapped = _(array).push(3);
  9957. *
  9958. * console.log(array);
  9959. * // => [1, 2]
  9960. *
  9961. * wrapped = wrapped.commit();
  9962. * console.log(array);
  9963. * // => [1, 2, 3]
  9964. *
  9965. * wrapped.last();
  9966. * // => 3
  9967. *
  9968. * console.log(array);
  9969. * // => [1, 2, 3]
  9970. */
  9971. function wrapperCommit() {
  9972. return new LodashWrapper(this.value(), this.__chain__);
  9973. }
  9974. /**
  9975. * Gets the next value on a wrapped object following the
  9976. * [iterator protocol](https://mdn.io/iteration_protocols#iterator).
  9977. *
  9978. * @name next
  9979. * @memberOf _
  9980. * @since 4.0.0
  9981. * @category Seq
  9982. * @returns {Object} Returns the next iterator value.
  9983. * @example
  9984. *
  9985. * var wrapped = _([1, 2]);
  9986. *
  9987. * wrapped.next();
  9988. * // => { 'done': false, 'value': 1 }
  9989. *
  9990. * wrapped.next();
  9991. * // => { 'done': false, 'value': 2 }
  9992. *
  9993. * wrapped.next();
  9994. * // => { 'done': true, 'value': undefined }
  9995. */
  9996. function wrapperNext() {
  9997. if (this.__values__ === undefined) {
  9998. this.__values__ = toArray(this.value());
  9999. }
  10000. var done = this.__index__ >= this.__values__.length,
  10001. value = done ? undefined : this.__values__[this.__index__++];
  10002. return { 'done': done, 'value': value };
  10003. }
  10004. /**
  10005. * Enables the wrapper to be iterable.
  10006. *
  10007. * @name Symbol.iterator
  10008. * @memberOf _
  10009. * @since 4.0.0
  10010. * @category Seq
  10011. * @returns {Object} Returns the wrapper object.
  10012. * @example
  10013. *
  10014. * var wrapped = _([1, 2]);
  10015. *
  10016. * wrapped[Symbol.iterator]() === wrapped;
  10017. * // => true
  10018. *
  10019. * Array.from(wrapped);
  10020. * // => [1, 2]
  10021. */
  10022. function wrapperToIterator() {
  10023. return this;
  10024. }
  10025. /**
  10026. * Creates a clone of the chain sequence planting `value` as the wrapped value.
  10027. *
  10028. * @name plant
  10029. * @memberOf _
  10030. * @since 3.2.0
  10031. * @category Seq
  10032. * @param {*} value The value to plant.
  10033. * @returns {Object} Returns the new `lodash` wrapper instance.
  10034. * @example
  10035. *
  10036. * function square(n) {
  10037. * return n * n;
  10038. * }
  10039. *
  10040. * var wrapped = _([1, 2]).map(square);
  10041. * var other = wrapped.plant([3, 4]);
  10042. *
  10043. * other.value();
  10044. * // => [9, 16]
  10045. *
  10046. * wrapped.value();
  10047. * // => [1, 4]
  10048. */
  10049. function wrapperPlant(value) {
  10050. var result,
  10051. parent = this;
  10052. while (parent instanceof baseLodash) {
  10053. var clone = wrapperClone(parent);
  10054. clone.__index__ = 0;
  10055. clone.__values__ = undefined;
  10056. if (result) {
  10057. previous.__wrapped__ = clone;
  10058. } else {
  10059. result = clone;
  10060. }
  10061. var previous = clone;
  10062. parent = parent.__wrapped__;
  10063. }
  10064. previous.__wrapped__ = value;
  10065. return result;
  10066. }
  10067. /**
  10068. * This method is the wrapper version of `_.reverse`.
  10069. *
  10070. * **Note:** This method mutates the wrapped array.
  10071. *
  10072. * @name reverse
  10073. * @memberOf _
  10074. * @since 0.1.0
  10075. * @category Seq
  10076. * @returns {Object} Returns the new `lodash` wrapper instance.
  10077. * @example
  10078. *
  10079. * var array = [1, 2, 3];
  10080. *
  10081. * _(array).reverse().value()
  10082. * // => [3, 2, 1]
  10083. *
  10084. * console.log(array);
  10085. * // => [3, 2, 1]
  10086. */
  10087. function wrapperReverse() {
  10088. var value = this.__wrapped__;
  10089. if (value instanceof LazyWrapper) {
  10090. var wrapped = value;
  10091. if (this.__actions__.length) {
  10092. wrapped = new LazyWrapper(this);
  10093. }
  10094. wrapped = wrapped.reverse();
  10095. wrapped.__actions__.push({
  10096. 'func': thru,
  10097. 'args': [reverse],
  10098. 'thisArg': undefined
  10099. });
  10100. return new LodashWrapper(wrapped, this.__chain__);
  10101. }
  10102. return this.thru(reverse);
  10103. }
  10104. /**
  10105. * Executes the chain sequence to resolve the unwrapped value.
  10106. *
  10107. * @name value
  10108. * @memberOf _
  10109. * @since 0.1.0
  10110. * @alias toJSON, valueOf
  10111. * @category Seq
  10112. * @returns {*} Returns the resolved unwrapped value.
  10113. * @example
  10114. *
  10115. * _([1, 2, 3]).value();
  10116. * // => [1, 2, 3]
  10117. */
  10118. function wrapperValue() {
  10119. return baseWrapperValue(this.__wrapped__, this.__actions__);
  10120. }
  10121. /*------------------------------------------------------------------------*/
  10122. /**
  10123. * Creates an object composed of keys generated from the results of running
  10124. * each element of `collection` thru `iteratee`. The corresponding value of
  10125. * each key is the number of times the key was returned by `iteratee`. The
  10126. * iteratee is invoked with one argument: (value).
  10127. *
  10128. * @static
  10129. * @memberOf _
  10130. * @since 0.5.0
  10131. * @category Collection
  10132. * @param {Array|Object} collection The collection to iterate over.
  10133. * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
  10134. * @returns {Object} Returns the composed aggregate object.
  10135. * @example
  10136. *
  10137. * _.countBy([6.1, 4.2, 6.3], Math.floor);
  10138. * // => { '4': 1, '6': 2 }
  10139. *
  10140. * // The `_.property` iteratee shorthand.
  10141. * _.countBy(['one', 'two', 'three'], 'length');
  10142. * // => { '3': 2, '5': 1 }
  10143. */
  10144. var countBy = createAggregator(function(result, value, key) {
  10145. if (hasOwnProperty.call(result, key)) {
  10146. ++result[key];
  10147. } else {
  10148. baseAssignValue(result, key, 1);
  10149. }
  10150. });
  10151. /**
  10152. * Checks if `predicate` returns truthy for **all** elements of `collection`.
  10153. * Iteration is stopped once `predicate` returns falsey. The predicate is
  10154. * invoked with three arguments: (value, index|key, collection).
  10155. *
  10156. * **Note:** This method returns `true` for
  10157. * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
  10158. * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
  10159. * elements of empty collections.
  10160. *
  10161. * @static
  10162. * @memberOf _
  10163. * @since 0.1.0
  10164. * @category Collection
  10165. * @param {Array|Object} collection The collection to iterate over.
  10166. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  10167. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  10168. * @returns {boolean} Returns `true` if all elements pass the predicate check,
  10169. * else `false`.
  10170. * @example
  10171. *
  10172. * _.every([true, 1, null, 'yes'], Boolean);
  10173. * // => false
  10174. *
  10175. * var users = [
  10176. * { 'user': 'barney', 'age': 36, 'active': false },
  10177. * { 'user': 'fred', 'age': 40, 'active': false }
  10178. * ];
  10179. *
  10180. * // The `_.matches` iteratee shorthand.
  10181. * _.every(users, { 'user': 'barney', 'active': false });
  10182. * // => false
  10183. *
  10184. * // The `_.matchesProperty` iteratee shorthand.
  10185. * _.every(users, ['active', false]);
  10186. * // => true
  10187. *
  10188. * // The `_.property` iteratee shorthand.
  10189. * _.every(users, 'active');
  10190. * // => false
  10191. */
  10192. function every(collection, predicate, guard) {
  10193. var func = isArray(collection) ? arrayEvery : baseEvery;
  10194. if (guard && isIterateeCall(collection, predicate, guard)) {
  10195. predicate = undefined;
  10196. }
  10197. return func(collection, getIteratee(predicate, 3));
  10198. }
  10199. /**
  10200. * Iterates over elements of `collection`, returning an array of all elements
  10201. * `predicate` returns truthy for. The predicate is invoked with three
  10202. * arguments: (value, index|key, collection).
  10203. *
  10204. * **Note:** Unlike `_.remove`, this method returns a new array.
  10205. *
  10206. * @static
  10207. * @memberOf _
  10208. * @since 0.1.0
  10209. * @category Collection
  10210. * @param {Array|Object} collection The collection to iterate over.
  10211. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  10212. * @returns {Array} Returns the new filtered array.
  10213. * @see _.reject
  10214. * @example
  10215. *
  10216. * var users = [
  10217. * { 'user': 'barney', 'age': 36, 'active': true },
  10218. * { 'user': 'fred', 'age': 40, 'active': false }
  10219. * ];
  10220. *
  10221. * _.filter(users, function(o) { return !o.active; });
  10222. * // => objects for ['fred']
  10223. *
  10224. * // The `_.matches` iteratee shorthand.
  10225. * _.filter(users, { 'age': 36, 'active': true });
  10226. * // => objects for ['barney']
  10227. *
  10228. * // The `_.matchesProperty` iteratee shorthand.
  10229. * _.filter(users, ['active', false]);
  10230. * // => objects for ['fred']
  10231. *
  10232. * // The `_.property` iteratee shorthand.
  10233. * _.filter(users, 'active');
  10234. * // => objects for ['barney']
  10235. *
  10236. * // Combining several predicates using `_.overEvery` or `_.overSome`.
  10237. * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));
  10238. * // => objects for ['fred', 'barney']
  10239. */
  10240. function filter(collection, predicate) {
  10241. var func = isArray(collection) ? arrayFilter : baseFilter;
  10242. return func(collection, getIteratee(predicate, 3));
  10243. }
  10244. /**
  10245. * Iterates over elements of `collection`, returning the first element
  10246. * `predicate` returns truthy for. The predicate is invoked with three
  10247. * arguments: (value, index|key, collection).
  10248. *
  10249. * @static
  10250. * @memberOf _
  10251. * @since 0.1.0
  10252. * @category Collection
  10253. * @param {Array|Object} collection The collection to inspect.
  10254. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  10255. * @param {number} [fromIndex=0] The index to search from.
  10256. * @returns {*} Returns the matched element, else `undefined`.
  10257. * @example
  10258. *
  10259. * var users = [
  10260. * { 'user': 'barney', 'age': 36, 'active': true },
  10261. * { 'user': 'fred', 'age': 40, 'active': false },
  10262. * { 'user': 'pebbles', 'age': 1, 'active': true }
  10263. * ];
  10264. *
  10265. * _.find(users, function(o) { return o.age < 40; });
  10266. * // => object for 'barney'
  10267. *
  10268. * // The `_.matches` iteratee shorthand.
  10269. * _.find(users, { 'age': 1, 'active': true });
  10270. * // => object for 'pebbles'
  10271. *
  10272. * // The `_.matchesProperty` iteratee shorthand.
  10273. * _.find(users, ['active', false]);
  10274. * // => object for 'fred'
  10275. *
  10276. * // The `_.property` iteratee shorthand.
  10277. * _.find(users, 'active');
  10278. * // => object for 'barney'
  10279. */
  10280. var find = createFind(findIndex);
  10281. /**
  10282. * This method is like `_.find` except that it iterates over elements of
  10283. * `collection` from right to left.
  10284. *
  10285. * @static
  10286. * @memberOf _
  10287. * @since 2.0.0
  10288. * @category Collection
  10289. * @param {Array|Object} collection The collection to inspect.
  10290. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  10291. * @param {number} [fromIndex=collection.length-1] The index to search from.
  10292. * @returns {*} Returns the matched element, else `undefined`.
  10293. * @example
  10294. *
  10295. * _.findLast([1, 2, 3, 4], function(n) {
  10296. * return n % 2 == 1;
  10297. * });
  10298. * // => 3
  10299. */
  10300. var findLast = createFind(findLastIndex);
  10301. /**
  10302. * Creates a flattened array of values by running each element in `collection`
  10303. * thru `iteratee` and flattening the mapped results. The iteratee is invoked
  10304. * with three arguments: (value, index|key, collection).
  10305. *
  10306. * @static
  10307. * @memberOf _
  10308. * @since 4.0.0
  10309. * @category Collection
  10310. * @param {Array|Object} collection The collection to iterate over.
  10311. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  10312. * @returns {Array} Returns the new flattened array.
  10313. * @example
  10314. *
  10315. * function duplicate(n) {
  10316. * return [n, n];
  10317. * }
  10318. *
  10319. * _.flatMap([1, 2], duplicate);
  10320. * // => [1, 1, 2, 2]
  10321. */
  10322. function flatMap(collection, iteratee) {
  10323. return baseFlatten(map(collection, iteratee), 1);
  10324. }
  10325. /**
  10326. * This method is like `_.flatMap` except that it recursively flattens the
  10327. * mapped results.
  10328. *
  10329. * @static
  10330. * @memberOf _
  10331. * @since 4.7.0
  10332. * @category Collection
  10333. * @param {Array|Object} collection The collection to iterate over.
  10334. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  10335. * @returns {Array} Returns the new flattened array.
  10336. * @example
  10337. *
  10338. * function duplicate(n) {
  10339. * return [[[n, n]]];
  10340. * }
  10341. *
  10342. * _.flatMapDeep([1, 2], duplicate);
  10343. * // => [1, 1, 2, 2]
  10344. */
  10345. function flatMapDeep(collection, iteratee) {
  10346. return baseFlatten(map(collection, iteratee), INFINITY);
  10347. }
  10348. /**
  10349. * This method is like `_.flatMap` except that it recursively flattens the
  10350. * mapped results up to `depth` times.
  10351. *
  10352. * @static
  10353. * @memberOf _
  10354. * @since 4.7.0
  10355. * @category Collection
  10356. * @param {Array|Object} collection The collection to iterate over.
  10357. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  10358. * @param {number} [depth=1] The maximum recursion depth.
  10359. * @returns {Array} Returns the new flattened array.
  10360. * @example
  10361. *
  10362. * function duplicate(n) {
  10363. * return [[[n, n]]];
  10364. * }
  10365. *
  10366. * _.flatMapDepth([1, 2], duplicate, 2);
  10367. * // => [[1, 1], [2, 2]]
  10368. */
  10369. function flatMapDepth(collection, iteratee, depth) {
  10370. depth = depth === undefined ? 1 : toInteger(depth);
  10371. return baseFlatten(map(collection, iteratee), depth);
  10372. }
  10373. /**
  10374. * Iterates over elements of `collection` and invokes `iteratee` for each element.
  10375. * The iteratee is invoked with three arguments: (value, index|key, collection).
  10376. * Iteratee functions may exit iteration early by explicitly returning `false`.
  10377. *
  10378. * **Note:** As with other "Collections" methods, objects with a "length"
  10379. * property are iterated like arrays. To avoid this behavior use `_.forIn`
  10380. * or `_.forOwn` for object iteration.
  10381. *
  10382. * @static
  10383. * @memberOf _
  10384. * @since 0.1.0
  10385. * @alias each
  10386. * @category Collection
  10387. * @param {Array|Object} collection The collection to iterate over.
  10388. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  10389. * @returns {Array|Object} Returns `collection`.
  10390. * @see _.forEachRight
  10391. * @example
  10392. *
  10393. * _.forEach([1, 2], function(value) {
  10394. * console.log(value);
  10395. * });
  10396. * // => Logs `1` then `2`.
  10397. *
  10398. * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
  10399. * console.log(key);
  10400. * });
  10401. * // => Logs 'a' then 'b' (iteration order is not guaranteed).
  10402. */
  10403. function forEach(collection, iteratee) {
  10404. var func = isArray(collection) ? arrayEach : baseEach;
  10405. return func(collection, getIteratee(iteratee, 3));
  10406. }
  10407. /**
  10408. * This method is like `_.forEach` except that it iterates over elements of
  10409. * `collection` from right to left.
  10410. *
  10411. * @static
  10412. * @memberOf _
  10413. * @since 2.0.0
  10414. * @alias eachRight
  10415. * @category Collection
  10416. * @param {Array|Object} collection The collection to iterate over.
  10417. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  10418. * @returns {Array|Object} Returns `collection`.
  10419. * @see _.forEach
  10420. * @example
  10421. *
  10422. * _.forEachRight([1, 2], function(value) {
  10423. * console.log(value);
  10424. * });
  10425. * // => Logs `2` then `1`.
  10426. */
  10427. function forEachRight(collection, iteratee) {
  10428. var func = isArray(collection) ? arrayEachRight : baseEachRight;
  10429. return func(collection, getIteratee(iteratee, 3));
  10430. }
  10431. /**
  10432. * Creates an object composed of keys generated from the results of running
  10433. * each element of `collection` thru `iteratee`. The order of grouped values
  10434. * is determined by the order they occur in `collection`. The corresponding
  10435. * value of each key is an array of elements responsible for generating the
  10436. * key. The iteratee is invoked with one argument: (value).
  10437. *
  10438. * @static
  10439. * @memberOf _
  10440. * @since 0.1.0
  10441. * @category Collection
  10442. * @param {Array|Object} collection The collection to iterate over.
  10443. * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
  10444. * @returns {Object} Returns the composed aggregate object.
  10445. * @example
  10446. *
  10447. * _.groupBy([6.1, 4.2, 6.3], Math.floor);
  10448. * // => { '4': [4.2], '6': [6.1, 6.3] }
  10449. *
  10450. * // The `_.property` iteratee shorthand.
  10451. * _.groupBy(['one', 'two', 'three'], 'length');
  10452. * // => { '3': ['one', 'two'], '5': ['three'] }
  10453. */
  10454. var groupBy = createAggregator(function(result, value, key) {
  10455. if (hasOwnProperty.call(result, key)) {
  10456. result[key].push(value);
  10457. } else {
  10458. baseAssignValue(result, key, [value]);
  10459. }
  10460. });
  10461. /**
  10462. * Checks if `value` is in `collection`. If `collection` is a string, it's
  10463. * checked for a substring of `value`, otherwise
  10464. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  10465. * is used for equality comparisons. If `fromIndex` is negative, it's used as
  10466. * the offset from the end of `collection`.
  10467. *
  10468. * @static
  10469. * @memberOf _
  10470. * @since 0.1.0
  10471. * @category Collection
  10472. * @param {Array|Object|string} collection The collection to inspect.
  10473. * @param {*} value The value to search for.
  10474. * @param {number} [fromIndex=0] The index to search from.
  10475. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
  10476. * @returns {boolean} Returns `true` if `value` is found, else `false`.
  10477. * @example
  10478. *
  10479. * _.includes([1, 2, 3], 1);
  10480. * // => true
  10481. *
  10482. * _.includes([1, 2, 3], 1, 2);
  10483. * // => false
  10484. *
  10485. * _.includes({ 'a': 1, 'b': 2 }, 1);
  10486. * // => true
  10487. *
  10488. * _.includes('abcd', 'bc');
  10489. * // => true
  10490. */
  10491. function includes(collection, value, fromIndex, guard) {
  10492. collection = isArrayLike(collection) ? collection : values(collection);
  10493. fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
  10494. var length = collection.length;
  10495. if (fromIndex < 0) {
  10496. fromIndex = nativeMax(length + fromIndex, 0);
  10497. }
  10498. return isString(collection)
  10499. ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
  10500. : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
  10501. }
  10502. /**
  10503. * Invokes the method at `path` of each element in `collection`, returning
  10504. * an array of the results of each invoked method. Any additional arguments
  10505. * are provided to each invoked method. If `path` is a function, it's invoked
  10506. * for, and `this` bound to, each element in `collection`.
  10507. *
  10508. * @static
  10509. * @memberOf _
  10510. * @since 4.0.0
  10511. * @category Collection
  10512. * @param {Array|Object} collection The collection to iterate over.
  10513. * @param {Array|Function|string} path The path of the method to invoke or
  10514. * the function invoked per iteration.
  10515. * @param {...*} [args] The arguments to invoke each method with.
  10516. * @returns {Array} Returns the array of results.
  10517. * @example
  10518. *
  10519. * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
  10520. * // => [[1, 5, 7], [1, 2, 3]]
  10521. *
  10522. * _.invokeMap([123, 456], String.prototype.split, '');
  10523. * // => [['1', '2', '3'], ['4', '5', '6']]
  10524. */
  10525. var invokeMap = baseRest(function(collection, path, args) {
  10526. var index = -1,
  10527. isFunc = typeof path == 'function',
  10528. result = isArrayLike(collection) ? Array(collection.length) : [];
  10529. baseEach(collection, function(value) {
  10530. result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
  10531. });
  10532. return result;
  10533. });
  10534. /**
  10535. * Creates an object composed of keys generated from the results of running
  10536. * each element of `collection` thru `iteratee`. The corresponding value of
  10537. * each key is the last element responsible for generating the key. The
  10538. * iteratee is invoked with one argument: (value).
  10539. *
  10540. * @static
  10541. * @memberOf _
  10542. * @since 4.0.0
  10543. * @category Collection
  10544. * @param {Array|Object} collection The collection to iterate over.
  10545. * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
  10546. * @returns {Object} Returns the composed aggregate object.
  10547. * @example
  10548. *
  10549. * var array = [
  10550. * { 'dir': 'left', 'code': 97 },
  10551. * { 'dir': 'right', 'code': 100 }
  10552. * ];
  10553. *
  10554. * _.keyBy(array, function(o) {
  10555. * return String.fromCharCode(o.code);
  10556. * });
  10557. * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
  10558. *
  10559. * _.keyBy(array, 'dir');
  10560. * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
  10561. */
  10562. var keyBy = createAggregator(function(result, value, key) {
  10563. baseAssignValue(result, key, value);
  10564. });
  10565. /**
  10566. * Creates an array of values by running each element in `collection` thru
  10567. * `iteratee`. The iteratee is invoked with three arguments:
  10568. * (value, index|key, collection).
  10569. *
  10570. * Many lodash methods are guarded to work as iteratees for methods like
  10571. * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
  10572. *
  10573. * The guarded methods are:
  10574. * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
  10575. * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
  10576. * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
  10577. * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
  10578. *
  10579. * @static
  10580. * @memberOf _
  10581. * @since 0.1.0
  10582. * @category Collection
  10583. * @param {Array|Object} collection The collection to iterate over.
  10584. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  10585. * @returns {Array} Returns the new mapped array.
  10586. * @example
  10587. *
  10588. * function square(n) {
  10589. * return n * n;
  10590. * }
  10591. *
  10592. * _.map([4, 8], square);
  10593. * // => [16, 64]
  10594. *
  10595. * _.map({ 'a': 4, 'b': 8 }, square);
  10596. * // => [16, 64] (iteration order is not guaranteed)
  10597. *
  10598. * var users = [
  10599. * { 'user': 'barney' },
  10600. * { 'user': 'fred' }
  10601. * ];
  10602. *
  10603. * // The `_.property` iteratee shorthand.
  10604. * _.map(users, 'user');
  10605. * // => ['barney', 'fred']
  10606. */
  10607. function map(collection, iteratee) {
  10608. var func = isArray(collection) ? arrayMap : baseMap;
  10609. return func(collection, getIteratee(iteratee, 3));
  10610. }
  10611. /**
  10612. * This method is like `_.sortBy` except that it allows specifying the sort
  10613. * orders of the iteratees to sort by. If `orders` is unspecified, all values
  10614. * are sorted in ascending order. Otherwise, specify an order of "desc" for
  10615. * descending or "asc" for ascending sort order of corresponding values.
  10616. *
  10617. * @static
  10618. * @memberOf _
  10619. * @since 4.0.0
  10620. * @category Collection
  10621. * @param {Array|Object} collection The collection to iterate over.
  10622. * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
  10623. * The iteratees to sort by.
  10624. * @param {string[]} [orders] The sort orders of `iteratees`.
  10625. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
  10626. * @returns {Array} Returns the new sorted array.
  10627. * @example
  10628. *
  10629. * var users = [
  10630. * { 'user': 'fred', 'age': 48 },
  10631. * { 'user': 'barney', 'age': 34 },
  10632. * { 'user': 'fred', 'age': 40 },
  10633. * { 'user': 'barney', 'age': 36 }
  10634. * ];
  10635. *
  10636. * // Sort by `user` in ascending order and by `age` in descending order.
  10637. * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
  10638. * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
  10639. */
  10640. function orderBy(collection, iteratees, orders, guard) {
  10641. if (collection == null) {
  10642. return [];
  10643. }
  10644. if (!isArray(iteratees)) {
  10645. iteratees = iteratees == null ? [] : [iteratees];
  10646. }
  10647. orders = guard ? undefined : orders;
  10648. if (!isArray(orders)) {
  10649. orders = orders == null ? [] : [orders];
  10650. }
  10651. return baseOrderBy(collection, iteratees, orders);
  10652. }
  10653. /**
  10654. * Creates an array of elements split into two groups, the first of which
  10655. * contains elements `predicate` returns truthy for, the second of which
  10656. * contains elements `predicate` returns falsey for. The predicate is
  10657. * invoked with one argument: (value).
  10658. *
  10659. * @static
  10660. * @memberOf _
  10661. * @since 3.0.0
  10662. * @category Collection
  10663. * @param {Array|Object} collection The collection to iterate over.
  10664. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  10665. * @returns {Array} Returns the array of grouped elements.
  10666. * @example
  10667. *
  10668. * var users = [
  10669. * { 'user': 'barney', 'age': 36, 'active': false },
  10670. * { 'user': 'fred', 'age': 40, 'active': true },
  10671. * { 'user': 'pebbles', 'age': 1, 'active': false }
  10672. * ];
  10673. *
  10674. * _.partition(users, function(o) { return o.active; });
  10675. * // => objects for [['fred'], ['barney', 'pebbles']]
  10676. *
  10677. * // The `_.matches` iteratee shorthand.
  10678. * _.partition(users, { 'age': 1, 'active': false });
  10679. * // => objects for [['pebbles'], ['barney', 'fred']]
  10680. *
  10681. * // The `_.matchesProperty` iteratee shorthand.
  10682. * _.partition(users, ['active', false]);
  10683. * // => objects for [['barney', 'pebbles'], ['fred']]
  10684. *
  10685. * // The `_.property` iteratee shorthand.
  10686. * _.partition(users, 'active');
  10687. * // => objects for [['fred'], ['barney', 'pebbles']]
  10688. */
  10689. var partition = createAggregator(function(result, value, key) {
  10690. result[key ? 0 : 1].push(value);
  10691. }, function() { return [[], []]; });
  10692. /**
  10693. * Reduces `collection` to a value which is the accumulated result of running
  10694. * each element in `collection` thru `iteratee`, where each successive
  10695. * invocation is supplied the return value of the previous. If `accumulator`
  10696. * is not given, the first element of `collection` is used as the initial
  10697. * value. The iteratee is invoked with four arguments:
  10698. * (accumulator, value, index|key, collection).
  10699. *
  10700. * Many lodash methods are guarded to work as iteratees for methods like
  10701. * `_.reduce`, `_.reduceRight`, and `_.transform`.
  10702. *
  10703. * The guarded methods are:
  10704. * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
  10705. * and `sortBy`
  10706. *
  10707. * @static
  10708. * @memberOf _
  10709. * @since 0.1.0
  10710. * @category Collection
  10711. * @param {Array|Object} collection The collection to iterate over.
  10712. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  10713. * @param {*} [accumulator] The initial value.
  10714. * @returns {*} Returns the accumulated value.
  10715. * @see _.reduceRight
  10716. * @example
  10717. *
  10718. * _.reduce([1, 2], function(sum, n) {
  10719. * return sum + n;
  10720. * }, 0);
  10721. * // => 3
  10722. *
  10723. * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
  10724. * (result[value] || (result[value] = [])).push(key);
  10725. * return result;
  10726. * }, {});
  10727. * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
  10728. */
  10729. function reduce(collection, iteratee, accumulator) {
  10730. var func = isArray(collection) ? arrayReduce : baseReduce,
  10731. initAccum = arguments.length < 3;
  10732. return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
  10733. }
  10734. /**
  10735. * This method is like `_.reduce` except that it iterates over elements of
  10736. * `collection` from right to left.
  10737. *
  10738. * @static
  10739. * @memberOf _
  10740. * @since 0.1.0
  10741. * @category Collection
  10742. * @param {Array|Object} collection The collection to iterate over.
  10743. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  10744. * @param {*} [accumulator] The initial value.
  10745. * @returns {*} Returns the accumulated value.
  10746. * @see _.reduce
  10747. * @example
  10748. *
  10749. * var array = [[0, 1], [2, 3], [4, 5]];
  10750. *
  10751. * _.reduceRight(array, function(flattened, other) {
  10752. * return flattened.concat(other);
  10753. * }, []);
  10754. * // => [4, 5, 2, 3, 0, 1]
  10755. */
  10756. function reduceRight(collection, iteratee, accumulator) {
  10757. var func = isArray(collection) ? arrayReduceRight : baseReduce,
  10758. initAccum = arguments.length < 3;
  10759. return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
  10760. }
  10761. /**
  10762. * The opposite of `_.filter`; this method returns the elements of `collection`
  10763. * that `predicate` does **not** return truthy for.
  10764. *
  10765. * @static
  10766. * @memberOf _
  10767. * @since 0.1.0
  10768. * @category Collection
  10769. * @param {Array|Object} collection The collection to iterate over.
  10770. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  10771. * @returns {Array} Returns the new filtered array.
  10772. * @see _.filter
  10773. * @example
  10774. *
  10775. * var users = [
  10776. * { 'user': 'barney', 'age': 36, 'active': false },
  10777. * { 'user': 'fred', 'age': 40, 'active': true }
  10778. * ];
  10779. *
  10780. * _.reject(users, function(o) { return !o.active; });
  10781. * // => objects for ['fred']
  10782. *
  10783. * // The `_.matches` iteratee shorthand.
  10784. * _.reject(users, { 'age': 40, 'active': true });
  10785. * // => objects for ['barney']
  10786. *
  10787. * // The `_.matchesProperty` iteratee shorthand.
  10788. * _.reject(users, ['active', false]);
  10789. * // => objects for ['fred']
  10790. *
  10791. * // The `_.property` iteratee shorthand.
  10792. * _.reject(users, 'active');
  10793. * // => objects for ['barney']
  10794. */
  10795. function reject(collection, predicate) {
  10796. var func = isArray(collection) ? arrayFilter : baseFilter;
  10797. return func(collection, negate(getIteratee(predicate, 3)));
  10798. }
  10799. /**
  10800. * Gets a random element from `collection`.
  10801. *
  10802. * @static
  10803. * @memberOf _
  10804. * @since 2.0.0
  10805. * @category Collection
  10806. * @param {Array|Object} collection The collection to sample.
  10807. * @returns {*} Returns the random element.
  10808. * @example
  10809. *
  10810. * _.sample([1, 2, 3, 4]);
  10811. * // => 2
  10812. */
  10813. function sample(collection) {
  10814. var func = isArray(collection) ? arraySample : baseSample;
  10815. return func(collection);
  10816. }
  10817. /**
  10818. * Gets `n` random elements at unique keys from `collection` up to the
  10819. * size of `collection`.
  10820. *
  10821. * @static
  10822. * @memberOf _
  10823. * @since 4.0.0
  10824. * @category Collection
  10825. * @param {Array|Object} collection The collection to sample.
  10826. * @param {number} [n=1] The number of elements to sample.
  10827. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  10828. * @returns {Array} Returns the random elements.
  10829. * @example
  10830. *
  10831. * _.sampleSize([1, 2, 3], 2);
  10832. * // => [3, 1]
  10833. *
  10834. * _.sampleSize([1, 2, 3], 4);
  10835. * // => [2, 3, 1]
  10836. */
  10837. function sampleSize(collection, n, guard) {
  10838. if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
  10839. n = 1;
  10840. } else {
  10841. n = toInteger(n);
  10842. }
  10843. var func = isArray(collection) ? arraySampleSize : baseSampleSize;
  10844. return func(collection, n);
  10845. }
  10846. /**
  10847. * Creates an array of shuffled values, using a version of the
  10848. * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
  10849. *
  10850. * @static
  10851. * @memberOf _
  10852. * @since 0.1.0
  10853. * @category Collection
  10854. * @param {Array|Object} collection The collection to shuffle.
  10855. * @returns {Array} Returns the new shuffled array.
  10856. * @example
  10857. *
  10858. * _.shuffle([1, 2, 3, 4]);
  10859. * // => [4, 1, 3, 2]
  10860. */
  10861. function shuffle(collection) {
  10862. var func = isArray(collection) ? arrayShuffle : baseShuffle;
  10863. return func(collection);
  10864. }
  10865. /**
  10866. * Gets the size of `collection` by returning its length for array-like
  10867. * values or the number of own enumerable string keyed properties for objects.
  10868. *
  10869. * @static
  10870. * @memberOf _
  10871. * @since 0.1.0
  10872. * @category Collection
  10873. * @param {Array|Object|string} collection The collection to inspect.
  10874. * @returns {number} Returns the collection size.
  10875. * @example
  10876. *
  10877. * _.size([1, 2, 3]);
  10878. * // => 3
  10879. *
  10880. * _.size({ 'a': 1, 'b': 2 });
  10881. * // => 2
  10882. *
  10883. * _.size('pebbles');
  10884. * // => 7
  10885. */
  10886. function size(collection) {
  10887. if (collection == null) {
  10888. return 0;
  10889. }
  10890. if (isArrayLike(collection)) {
  10891. return isString(collection) ? stringSize(collection) : collection.length;
  10892. }
  10893. var tag = getTag(collection);
  10894. if (tag == mapTag || tag == setTag) {
  10895. return collection.size;
  10896. }
  10897. return baseKeys(collection).length;
  10898. }
  10899. /**
  10900. * Checks if `predicate` returns truthy for **any** element of `collection`.
  10901. * Iteration is stopped once `predicate` returns truthy. The predicate is
  10902. * invoked with three arguments: (value, index|key, collection).
  10903. *
  10904. * @static
  10905. * @memberOf _
  10906. * @since 0.1.0
  10907. * @category Collection
  10908. * @param {Array|Object} collection The collection to iterate over.
  10909. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  10910. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  10911. * @returns {boolean} Returns `true` if any element passes the predicate check,
  10912. * else `false`.
  10913. * @example
  10914. *
  10915. * _.some([null, 0, 'yes', false], Boolean);
  10916. * // => true
  10917. *
  10918. * var users = [
  10919. * { 'user': 'barney', 'active': true },
  10920. * { 'user': 'fred', 'active': false }
  10921. * ];
  10922. *
  10923. * // The `_.matches` iteratee shorthand.
  10924. * _.some(users, { 'user': 'barney', 'active': false });
  10925. * // => false
  10926. *
  10927. * // The `_.matchesProperty` iteratee shorthand.
  10928. * _.some(users, ['active', false]);
  10929. * // => true
  10930. *
  10931. * // The `_.property` iteratee shorthand.
  10932. * _.some(users, 'active');
  10933. * // => true
  10934. */
  10935. function some(collection, predicate, guard) {
  10936. var func = isArray(collection) ? arraySome : baseSome;
  10937. if (guard && isIterateeCall(collection, predicate, guard)) {
  10938. predicate = undefined;
  10939. }
  10940. return func(collection, getIteratee(predicate, 3));
  10941. }
  10942. /**
  10943. * Creates an array of elements, sorted in ascending order by the results of
  10944. * running each element in a collection thru each iteratee. This method
  10945. * performs a stable sort, that is, it preserves the original sort order of
  10946. * equal elements. The iteratees are invoked with one argument: (value).
  10947. *
  10948. * @static
  10949. * @memberOf _
  10950. * @since 0.1.0
  10951. * @category Collection
  10952. * @param {Array|Object} collection The collection to iterate over.
  10953. * @param {...(Function|Function[])} [iteratees=[_.identity]]
  10954. * The iteratees to sort by.
  10955. * @returns {Array} Returns the new sorted array.
  10956. * @example
  10957. *
  10958. * var users = [
  10959. * { 'user': 'fred', 'age': 48 },
  10960. * { 'user': 'barney', 'age': 36 },
  10961. * { 'user': 'fred', 'age': 30 },
  10962. * { 'user': 'barney', 'age': 34 }
  10963. * ];
  10964. *
  10965. * _.sortBy(users, [function(o) { return o.user; }]);
  10966. * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
  10967. *
  10968. * _.sortBy(users, ['user', 'age']);
  10969. * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
  10970. */
  10971. var sortBy = baseRest(function(collection, iteratees) {
  10972. if (collection == null) {
  10973. return [];
  10974. }
  10975. var length = iteratees.length;
  10976. if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
  10977. iteratees = [];
  10978. } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
  10979. iteratees = [iteratees[0]];
  10980. }
  10981. return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
  10982. });
  10983. /*------------------------------------------------------------------------*/
  10984. /**
  10985. * Gets the timestamp of the number of milliseconds that have elapsed since
  10986. * the Unix epoch (1 January 1970 00:00:00 UTC).
  10987. *
  10988. * @static
  10989. * @memberOf _
  10990. * @since 2.4.0
  10991. * @category Date
  10992. * @returns {number} Returns the timestamp.
  10993. * @example
  10994. *
  10995. * _.defer(function(stamp) {
  10996. * console.log(_.now() - stamp);
  10997. * }, _.now());
  10998. * // => Logs the number of milliseconds it took for the deferred invocation.
  10999. */
  11000. var now = ctxNow || function() {
  11001. return root.Date.now();
  11002. };
  11003. /*------------------------------------------------------------------------*/
  11004. /**
  11005. * The opposite of `_.before`; this method creates a function that invokes
  11006. * `func` once it's called `n` or more times.
  11007. *
  11008. * @static
  11009. * @memberOf _
  11010. * @since 0.1.0
  11011. * @category Function
  11012. * @param {number} n The number of calls before `func` is invoked.
  11013. * @param {Function} func The function to restrict.
  11014. * @returns {Function} Returns the new restricted function.
  11015. * @example
  11016. *
  11017. * var saves = ['profile', 'settings'];
  11018. *
  11019. * var done = _.after(saves.length, function() {
  11020. * console.log('done saving!');
  11021. * });
  11022. *
  11023. * _.forEach(saves, function(type) {
  11024. * asyncSave({ 'type': type, 'complete': done });
  11025. * });
  11026. * // => Logs 'done saving!' after the two async saves have completed.
  11027. */
  11028. function after(n, func) {
  11029. if (typeof func != 'function') {
  11030. throw new TypeError(FUNC_ERROR_TEXT);
  11031. }
  11032. n = toInteger(n);
  11033. return function() {
  11034. if (--n < 1) {
  11035. return func.apply(this, arguments);
  11036. }
  11037. };
  11038. }
  11039. /**
  11040. * Creates a function that invokes `func`, with up to `n` arguments,
  11041. * ignoring any additional arguments.
  11042. *
  11043. * @static
  11044. * @memberOf _
  11045. * @since 3.0.0
  11046. * @category Function
  11047. * @param {Function} func The function to cap arguments for.
  11048. * @param {number} [n=func.length] The arity cap.
  11049. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  11050. * @returns {Function} Returns the new capped function.
  11051. * @example
  11052. *
  11053. * _.map(['6', '8', '10'], _.ary(parseInt, 1));
  11054. * // => [6, 8, 10]
  11055. */
  11056. function ary(func, n, guard) {
  11057. n = guard ? undefined : n;
  11058. n = (func && n == null) ? func.length : n;
  11059. return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
  11060. }
  11061. /**
  11062. * Creates a function that invokes `func`, with the `this` binding and arguments
  11063. * of the created function, while it's called less than `n` times. Subsequent
  11064. * calls to the created function return the result of the last `func` invocation.
  11065. *
  11066. * @static
  11067. * @memberOf _
  11068. * @since 3.0.0
  11069. * @category Function
  11070. * @param {number} n The number of calls at which `func` is no longer invoked.
  11071. * @param {Function} func The function to restrict.
  11072. * @returns {Function} Returns the new restricted function.
  11073. * @example
  11074. *
  11075. * jQuery(element).on('click', _.before(5, addContactToList));
  11076. * // => Allows adding up to 4 contacts to the list.
  11077. */
  11078. function before(n, func) {
  11079. var result;
  11080. if (typeof func != 'function') {
  11081. throw new TypeError(FUNC_ERROR_TEXT);
  11082. }
  11083. n = toInteger(n);
  11084. return function() {
  11085. if (--n > 0) {
  11086. result = func.apply(this, arguments);
  11087. }
  11088. if (n <= 1) {
  11089. func = undefined;
  11090. }
  11091. return result;
  11092. };
  11093. }
  11094. /**
  11095. * Creates a function that invokes `func` with the `this` binding of `thisArg`
  11096. * and `partials` prepended to the arguments it receives.
  11097. *
  11098. * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
  11099. * may be used as a placeholder for partially applied arguments.
  11100. *
  11101. * **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
  11102. * property of bound functions.
  11103. *
  11104. * @static
  11105. * @memberOf _
  11106. * @since 0.1.0
  11107. * @category Function
  11108. * @param {Function} func The function to bind.
  11109. * @param {*} thisArg The `this` binding of `func`.
  11110. * @param {...*} [partials] The arguments to be partially applied.
  11111. * @returns {Function} Returns the new bound function.
  11112. * @example
  11113. *
  11114. * function greet(greeting, punctuation) {
  11115. * return greeting + ' ' + this.user + punctuation;
  11116. * }
  11117. *
  11118. * var object = { 'user': 'fred' };
  11119. *
  11120. * var bound = _.bind(greet, object, 'hi');
  11121. * bound('!');
  11122. * // => 'hi fred!'
  11123. *
  11124. * // Bound with placeholders.
  11125. * var bound = _.bind(greet, object, _, '!');
  11126. * bound('hi');
  11127. * // => 'hi fred!'
  11128. */
  11129. var bind = baseRest(function(func, thisArg, partials) {
  11130. var bitmask = WRAP_BIND_FLAG;
  11131. if (partials.length) {
  11132. var holders = replaceHolders(partials, getHolder(bind));
  11133. bitmask |= WRAP_PARTIAL_FLAG;
  11134. }
  11135. return createWrap(func, bitmask, thisArg, partials, holders);
  11136. });
  11137. /**
  11138. * Creates a function that invokes the method at `object[key]` with `partials`
  11139. * prepended to the arguments it receives.
  11140. *
  11141. * This method differs from `_.bind` by allowing bound functions to reference
  11142. * methods that may be redefined or don't yet exist. See
  11143. * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
  11144. * for more details.
  11145. *
  11146. * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
  11147. * builds, may be used as a placeholder for partially applied arguments.
  11148. *
  11149. * @static
  11150. * @memberOf _
  11151. * @since 0.10.0
  11152. * @category Function
  11153. * @param {Object} object The object to invoke the method on.
  11154. * @param {string} key The key of the method.
  11155. * @param {...*} [partials] The arguments to be partially applied.
  11156. * @returns {Function} Returns the new bound function.
  11157. * @example
  11158. *
  11159. * var object = {
  11160. * 'user': 'fred',
  11161. * 'greet': function(greeting, punctuation) {
  11162. * return greeting + ' ' + this.user + punctuation;
  11163. * }
  11164. * };
  11165. *
  11166. * var bound = _.bindKey(object, 'greet', 'hi');
  11167. * bound('!');
  11168. * // => 'hi fred!'
  11169. *
  11170. * object.greet = function(greeting, punctuation) {
  11171. * return greeting + 'ya ' + this.user + punctuation;
  11172. * };
  11173. *
  11174. * bound('!');
  11175. * // => 'hiya fred!'
  11176. *
  11177. * // Bound with placeholders.
  11178. * var bound = _.bindKey(object, 'greet', _, '!');
  11179. * bound('hi');
  11180. * // => 'hiya fred!'
  11181. */
  11182. var bindKey = baseRest(function(object, key, partials) {
  11183. var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
  11184. if (partials.length) {
  11185. var holders = replaceHolders(partials, getHolder(bindKey));
  11186. bitmask |= WRAP_PARTIAL_FLAG;
  11187. }
  11188. return createWrap(key, bitmask, object, partials, holders);
  11189. });
  11190. /**
  11191. * Creates a function that accepts arguments of `func` and either invokes
  11192. * `func` returning its result, if at least `arity` number of arguments have
  11193. * been provided, or returns a function that accepts the remaining `func`
  11194. * arguments, and so on. The arity of `func` may be specified if `func.length`
  11195. * is not sufficient.
  11196. *
  11197. * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
  11198. * may be used as a placeholder for provided arguments.
  11199. *
  11200. * **Note:** This method doesn't set the "length" property of curried functions.
  11201. *
  11202. * @static
  11203. * @memberOf _
  11204. * @since 2.0.0
  11205. * @category Function
  11206. * @param {Function} func The function to curry.
  11207. * @param {number} [arity=func.length] The arity of `func`.
  11208. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  11209. * @returns {Function} Returns the new curried function.
  11210. * @example
  11211. *
  11212. * var abc = function(a, b, c) {
  11213. * return [a, b, c];
  11214. * };
  11215. *
  11216. * var curried = _.curry(abc);
  11217. *
  11218. * curried(1)(2)(3);
  11219. * // => [1, 2, 3]
  11220. *
  11221. * curried(1, 2)(3);
  11222. * // => [1, 2, 3]
  11223. *
  11224. * curried(1, 2, 3);
  11225. * // => [1, 2, 3]
  11226. *
  11227. * // Curried with placeholders.
  11228. * curried(1)(_, 3)(2);
  11229. * // => [1, 2, 3]
  11230. */
  11231. function curry(func, arity, guard) {
  11232. arity = guard ? undefined : arity;
  11233. var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
  11234. result.placeholder = curry.placeholder;
  11235. return result;
  11236. }
  11237. /**
  11238. * This method is like `_.curry` except that arguments are applied to `func`
  11239. * in the manner of `_.partialRight` instead of `_.partial`.
  11240. *
  11241. * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
  11242. * builds, may be used as a placeholder for provided arguments.
  11243. *
  11244. * **Note:** This method doesn't set the "length" property of curried functions.
  11245. *
  11246. * @static
  11247. * @memberOf _
  11248. * @since 3.0.0
  11249. * @category Function
  11250. * @param {Function} func The function to curry.
  11251. * @param {number} [arity=func.length] The arity of `func`.
  11252. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  11253. * @returns {Function} Returns the new curried function.
  11254. * @example
  11255. *
  11256. * var abc = function(a, b, c) {
  11257. * return [a, b, c];
  11258. * };
  11259. *
  11260. * var curried = _.curryRight(abc);
  11261. *
  11262. * curried(3)(2)(1);
  11263. * // => [1, 2, 3]
  11264. *
  11265. * curried(2, 3)(1);
  11266. * // => [1, 2, 3]
  11267. *
  11268. * curried(1, 2, 3);
  11269. * // => [1, 2, 3]
  11270. *
  11271. * // Curried with placeholders.
  11272. * curried(3)(1, _)(2);
  11273. * // => [1, 2, 3]
  11274. */
  11275. function curryRight(func, arity, guard) {
  11276. arity = guard ? undefined : arity;
  11277. var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
  11278. result.placeholder = curryRight.placeholder;
  11279. return result;
  11280. }
  11281. /**
  11282. * Creates a debounced function that delays invoking `func` until after `wait`
  11283. * milliseconds have elapsed since the last time the debounced function was
  11284. * invoked. The debounced function comes with a `cancel` method to cancel
  11285. * delayed `func` invocations and a `flush` method to immediately invoke them.
  11286. * Provide `options` to indicate whether `func` should be invoked on the
  11287. * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
  11288. * with the last arguments provided to the debounced function. Subsequent
  11289. * calls to the debounced function return the result of the last `func`
  11290. * invocation.
  11291. *
  11292. * **Note:** If `leading` and `trailing` options are `true`, `func` is
  11293. * invoked on the trailing edge of the timeout only if the debounced function
  11294. * is invoked more than once during the `wait` timeout.
  11295. *
  11296. * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
  11297. * until to the next tick, similar to `setTimeout` with a timeout of `0`.
  11298. *
  11299. * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
  11300. * for details over the differences between `_.debounce` and `_.throttle`.
  11301. *
  11302. * @static
  11303. * @memberOf _
  11304. * @since 0.1.0
  11305. * @category Function
  11306. * @param {Function} func The function to debounce.
  11307. * @param {number} [wait=0] The number of milliseconds to delay.
  11308. * @param {Object} [options={}] The options object.
  11309. * @param {boolean} [options.leading=false]
  11310. * Specify invoking on the leading edge of the timeout.
  11311. * @param {number} [options.maxWait]
  11312. * The maximum time `func` is allowed to be delayed before it's invoked.
  11313. * @param {boolean} [options.trailing=true]
  11314. * Specify invoking on the trailing edge of the timeout.
  11315. * @returns {Function} Returns the new debounced function.
  11316. * @example
  11317. *
  11318. * // Avoid costly calculations while the window size is in flux.
  11319. * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
  11320. *
  11321. * // Invoke `sendMail` when clicked, debouncing subsequent calls.
  11322. * jQuery(element).on('click', _.debounce(sendMail, 300, {
  11323. * 'leading': true,
  11324. * 'trailing': false
  11325. * }));
  11326. *
  11327. * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
  11328. * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
  11329. * var source = new EventSource('/stream');
  11330. * jQuery(source).on('message', debounced);
  11331. *
  11332. * // Cancel the trailing debounced invocation.
  11333. * jQuery(window).on('popstate', debounced.cancel);
  11334. */
  11335. function debounce(func, wait, options) {
  11336. var lastArgs,
  11337. lastThis,
  11338. maxWait,
  11339. result,
  11340. timerId,
  11341. lastCallTime,
  11342. lastInvokeTime = 0,
  11343. leading = false,
  11344. maxing = false,
  11345. trailing = true;
  11346. if (typeof func != 'function') {
  11347. throw new TypeError(FUNC_ERROR_TEXT);
  11348. }
  11349. wait = toNumber(wait) || 0;
  11350. if (isObject(options)) {
  11351. leading = !!options.leading;
  11352. maxing = 'maxWait' in options;
  11353. maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
  11354. trailing = 'trailing' in options ? !!options.trailing : trailing;
  11355. }
  11356. function invokeFunc(time) {
  11357. var args = lastArgs,
  11358. thisArg = lastThis;
  11359. lastArgs = lastThis = undefined;
  11360. lastInvokeTime = time;
  11361. result = func.apply(thisArg, args);
  11362. return result;
  11363. }
  11364. function leadingEdge(time) {
  11365. // Reset any `maxWait` timer.
  11366. lastInvokeTime = time;
  11367. // Start the timer for the trailing edge.
  11368. timerId = setTimeout(timerExpired, wait);
  11369. // Invoke the leading edge.
  11370. return leading ? invokeFunc(time) : result;
  11371. }
  11372. function remainingWait(time) {
  11373. var timeSinceLastCall = time - lastCallTime,
  11374. timeSinceLastInvoke = time - lastInvokeTime,
  11375. timeWaiting = wait - timeSinceLastCall;
  11376. return maxing
  11377. ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
  11378. : timeWaiting;
  11379. }
  11380. function shouldInvoke(time) {
  11381. var timeSinceLastCall = time - lastCallTime,
  11382. timeSinceLastInvoke = time - lastInvokeTime;
  11383. // Either this is the first call, activity has stopped and we're at the
  11384. // trailing edge, the system time has gone backwards and we're treating
  11385. // it as the trailing edge, or we've hit the `maxWait` limit.
  11386. return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
  11387. (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
  11388. }
  11389. function timerExpired() {
  11390. var time = now();
  11391. if (shouldInvoke(time)) {
  11392. return trailingEdge(time);
  11393. }
  11394. // Restart the timer.
  11395. timerId = setTimeout(timerExpired, remainingWait(time));
  11396. }
  11397. function trailingEdge(time) {
  11398. timerId = undefined;
  11399. // Only invoke if we have `lastArgs` which means `func` has been
  11400. // debounced at least once.
  11401. if (trailing && lastArgs) {
  11402. return invokeFunc(time);
  11403. }
  11404. lastArgs = lastThis = undefined;
  11405. return result;
  11406. }
  11407. function cancel() {
  11408. if (timerId !== undefined) {
  11409. clearTimeout(timerId);
  11410. }
  11411. lastInvokeTime = 0;
  11412. lastArgs = lastCallTime = lastThis = timerId = undefined;
  11413. }
  11414. function flush() {
  11415. return timerId === undefined ? result : trailingEdge(now());
  11416. }
  11417. function debounced() {
  11418. var time = now(),
  11419. isInvoking = shouldInvoke(time);
  11420. lastArgs = arguments;
  11421. lastThis = this;
  11422. lastCallTime = time;
  11423. if (isInvoking) {
  11424. if (timerId === undefined) {
  11425. return leadingEdge(lastCallTime);
  11426. }
  11427. if (maxing) {
  11428. // Handle invocations in a tight loop.
  11429. clearTimeout(timerId);
  11430. timerId = setTimeout(timerExpired, wait);
  11431. return invokeFunc(lastCallTime);
  11432. }
  11433. }
  11434. if (timerId === undefined) {
  11435. timerId = setTimeout(timerExpired, wait);
  11436. }
  11437. return result;
  11438. }
  11439. debounced.cancel = cancel;
  11440. debounced.flush = flush;
  11441. return debounced;
  11442. }
  11443. /**
  11444. * Defers invoking the `func` until the current call stack has cleared. Any
  11445. * additional arguments are provided to `func` when it's invoked.
  11446. *
  11447. * @static
  11448. * @memberOf _
  11449. * @since 0.1.0
  11450. * @category Function
  11451. * @param {Function} func The function to defer.
  11452. * @param {...*} [args] The arguments to invoke `func` with.
  11453. * @returns {number} Returns the timer id.
  11454. * @example
  11455. *
  11456. * _.defer(function(text) {
  11457. * console.log(text);
  11458. * }, 'deferred');
  11459. * // => Logs 'deferred' after one millisecond.
  11460. */
  11461. var defer = baseRest(function(func, args) {
  11462. return baseDelay(func, 1, args);
  11463. });
  11464. /**
  11465. * Invokes `func` after `wait` milliseconds. Any additional arguments are
  11466. * provided to `func` when it's invoked.
  11467. *
  11468. * @static
  11469. * @memberOf _
  11470. * @since 0.1.0
  11471. * @category Function
  11472. * @param {Function} func The function to delay.
  11473. * @param {number} wait The number of milliseconds to delay invocation.
  11474. * @param {...*} [args] The arguments to invoke `func` with.
  11475. * @returns {number} Returns the timer id.
  11476. * @example
  11477. *
  11478. * _.delay(function(text) {
  11479. * console.log(text);
  11480. * }, 1000, 'later');
  11481. * // => Logs 'later' after one second.
  11482. */
  11483. var delay = baseRest(function(func, wait, args) {
  11484. return baseDelay(func, toNumber(wait) || 0, args);
  11485. });
  11486. /**
  11487. * Creates a function that invokes `func` with arguments reversed.
  11488. *
  11489. * @static
  11490. * @memberOf _
  11491. * @since 4.0.0
  11492. * @category Function
  11493. * @param {Function} func The function to flip arguments for.
  11494. * @returns {Function} Returns the new flipped function.
  11495. * @example
  11496. *
  11497. * var flipped = _.flip(function() {
  11498. * return _.toArray(arguments);
  11499. * });
  11500. *
  11501. * flipped('a', 'b', 'c', 'd');
  11502. * // => ['d', 'c', 'b', 'a']
  11503. */
  11504. function flip(func) {
  11505. return createWrap(func, WRAP_FLIP_FLAG);
  11506. }
  11507. /**
  11508. * Creates a function that memoizes the result of `func`. If `resolver` is
  11509. * provided, it determines the cache key for storing the result based on the
  11510. * arguments provided to the memoized function. By default, the first argument
  11511. * provided to the memoized function is used as the map cache key. The `func`
  11512. * is invoked with the `this` binding of the memoized function.
  11513. *
  11514. * **Note:** The cache is exposed as the `cache` property on the memoized
  11515. * function. Its creation may be customized by replacing the `_.memoize.Cache`
  11516. * constructor with one whose instances implement the
  11517. * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
  11518. * method interface of `clear`, `delete`, `get`, `has`, and `set`.
  11519. *
  11520. * @static
  11521. * @memberOf _
  11522. * @since 0.1.0
  11523. * @category Function
  11524. * @param {Function} func The function to have its output memoized.
  11525. * @param {Function} [resolver] The function to resolve the cache key.
  11526. * @returns {Function} Returns the new memoized function.
  11527. * @example
  11528. *
  11529. * var object = { 'a': 1, 'b': 2 };
  11530. * var other = { 'c': 3, 'd': 4 };
  11531. *
  11532. * var values = _.memoize(_.values);
  11533. * values(object);
  11534. * // => [1, 2]
  11535. *
  11536. * values(other);
  11537. * // => [3, 4]
  11538. *
  11539. * object.a = 2;
  11540. * values(object);
  11541. * // => [1, 2]
  11542. *
  11543. * // Modify the result cache.
  11544. * values.cache.set(object, ['a', 'b']);
  11545. * values(object);
  11546. * // => ['a', 'b']
  11547. *
  11548. * // Replace `_.memoize.Cache`.
  11549. * _.memoize.Cache = WeakMap;
  11550. */
  11551. function memoize(func, resolver) {
  11552. if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
  11553. throw new TypeError(FUNC_ERROR_TEXT);
  11554. }
  11555. var memoized = function() {
  11556. var args = arguments,
  11557. key = resolver ? resolver.apply(this, args) : args[0],
  11558. cache = memoized.cache;
  11559. if (cache.has(key)) {
  11560. return cache.get(key);
  11561. }
  11562. var result = func.apply(this, args);
  11563. memoized.cache = cache.set(key, result) || cache;
  11564. return result;
  11565. };
  11566. memoized.cache = new (memoize.Cache || MapCache);
  11567. return memoized;
  11568. }
  11569. // Expose `MapCache`.
  11570. memoize.Cache = MapCache;
  11571. /**
  11572. * Creates a function that negates the result of the predicate `func`. The
  11573. * `func` predicate is invoked with the `this` binding and arguments of the
  11574. * created function.
  11575. *
  11576. * @static
  11577. * @memberOf _
  11578. * @since 3.0.0
  11579. * @category Function
  11580. * @param {Function} predicate The predicate to negate.
  11581. * @returns {Function} Returns the new negated function.
  11582. * @example
  11583. *
  11584. * function isEven(n) {
  11585. * return n % 2 == 0;
  11586. * }
  11587. *
  11588. * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
  11589. * // => [1, 3, 5]
  11590. */
  11591. function negate(predicate) {
  11592. if (typeof predicate != 'function') {
  11593. throw new TypeError(FUNC_ERROR_TEXT);
  11594. }
  11595. return function() {
  11596. var args = arguments;
  11597. switch (args.length) {
  11598. case 0: return !predicate.call(this);
  11599. case 1: return !predicate.call(this, args[0]);
  11600. case 2: return !predicate.call(this, args[0], args[1]);
  11601. case 3: return !predicate.call(this, args[0], args[1], args[2]);
  11602. }
  11603. return !predicate.apply(this, args);
  11604. };
  11605. }
  11606. /**
  11607. * Creates a function that is restricted to invoking `func` once. Repeat calls
  11608. * to the function return the value of the first invocation. The `func` is
  11609. * invoked with the `this` binding and arguments of the created function.
  11610. *
  11611. * @static
  11612. * @memberOf _
  11613. * @since 0.1.0
  11614. * @category Function
  11615. * @param {Function} func The function to restrict.
  11616. * @returns {Function} Returns the new restricted function.
  11617. * @example
  11618. *
  11619. * var initialize = _.once(createApplication);
  11620. * initialize();
  11621. * initialize();
  11622. * // => `createApplication` is invoked once
  11623. */
  11624. function once(func) {
  11625. return before(2, func);
  11626. }
  11627. /**
  11628. * Creates a function that invokes `func` with its arguments transformed.
  11629. *
  11630. * @static
  11631. * @since 4.0.0
  11632. * @memberOf _
  11633. * @category Function
  11634. * @param {Function} func The function to wrap.
  11635. * @param {...(Function|Function[])} [transforms=[_.identity]]
  11636. * The argument transforms.
  11637. * @returns {Function} Returns the new function.
  11638. * @example
  11639. *
  11640. * function doubled(n) {
  11641. * return n * 2;
  11642. * }
  11643. *
  11644. * function square(n) {
  11645. * return n * n;
  11646. * }
  11647. *
  11648. * var func = _.overArgs(function(x, y) {
  11649. * return [x, y];
  11650. * }, [square, doubled]);
  11651. *
  11652. * func(9, 3);
  11653. * // => [81, 6]
  11654. *
  11655. * func(10, 5);
  11656. * // => [100, 10]
  11657. */
  11658. var overArgs = castRest(function(func, transforms) {
  11659. transforms = (transforms.length == 1 && isArray(transforms[0]))
  11660. ? arrayMap(transforms[0], baseUnary(getIteratee()))
  11661. : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
  11662. var funcsLength = transforms.length;
  11663. return baseRest(function(args) {
  11664. var index = -1,
  11665. length = nativeMin(args.length, funcsLength);
  11666. while (++index < length) {
  11667. args[index] = transforms[index].call(this, args[index]);
  11668. }
  11669. return apply(func, this, args);
  11670. });
  11671. });
  11672. /**
  11673. * Creates a function that invokes `func` with `partials` prepended to the
  11674. * arguments it receives. This method is like `_.bind` except it does **not**
  11675. * alter the `this` binding.
  11676. *
  11677. * The `_.partial.placeholder` value, which defaults to `_` in monolithic
  11678. * builds, may be used as a placeholder for partially applied arguments.
  11679. *
  11680. * **Note:** This method doesn't set the "length" property of partially
  11681. * applied functions.
  11682. *
  11683. * @static
  11684. * @memberOf _
  11685. * @since 0.2.0
  11686. * @category Function
  11687. * @param {Function} func The function to partially apply arguments to.
  11688. * @param {...*} [partials] The arguments to be partially applied.
  11689. * @returns {Function} Returns the new partially applied function.
  11690. * @example
  11691. *
  11692. * function greet(greeting, name) {
  11693. * return greeting + ' ' + name;
  11694. * }
  11695. *
  11696. * var sayHelloTo = _.partial(greet, 'hello');
  11697. * sayHelloTo('fred');
  11698. * // => 'hello fred'
  11699. *
  11700. * // Partially applied with placeholders.
  11701. * var greetFred = _.partial(greet, _, 'fred');
  11702. * greetFred('hi');
  11703. * // => 'hi fred'
  11704. */
  11705. var partial = baseRest(function(func, partials) {
  11706. var holders = replaceHolders(partials, getHolder(partial));
  11707. return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
  11708. });
  11709. /**
  11710. * This method is like `_.partial` except that partially applied arguments
  11711. * are appended to the arguments it receives.
  11712. *
  11713. * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
  11714. * builds, may be used as a placeholder for partially applied arguments.
  11715. *
  11716. * **Note:** This method doesn't set the "length" property of partially
  11717. * applied functions.
  11718. *
  11719. * @static
  11720. * @memberOf _
  11721. * @since 1.0.0
  11722. * @category Function
  11723. * @param {Function} func The function to partially apply arguments to.
  11724. * @param {...*} [partials] The arguments to be partially applied.
  11725. * @returns {Function} Returns the new partially applied function.
  11726. * @example
  11727. *
  11728. * function greet(greeting, name) {
  11729. * return greeting + ' ' + name;
  11730. * }
  11731. *
  11732. * var greetFred = _.partialRight(greet, 'fred');
  11733. * greetFred('hi');
  11734. * // => 'hi fred'
  11735. *
  11736. * // Partially applied with placeholders.
  11737. * var sayHelloTo = _.partialRight(greet, 'hello', _);
  11738. * sayHelloTo('fred');
  11739. * // => 'hello fred'
  11740. */
  11741. var partialRight = baseRest(function(func, partials) {
  11742. var holders = replaceHolders(partials, getHolder(partialRight));
  11743. return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
  11744. });
  11745. /**
  11746. * Creates a function that invokes `func` with arguments arranged according
  11747. * to the specified `indexes` where the argument value at the first index is
  11748. * provided as the first argument, the argument value at the second index is
  11749. * provided as the second argument, and so on.
  11750. *
  11751. * @static
  11752. * @memberOf _
  11753. * @since 3.0.0
  11754. * @category Function
  11755. * @param {Function} func The function to rearrange arguments for.
  11756. * @param {...(number|number[])} indexes The arranged argument indexes.
  11757. * @returns {Function} Returns the new function.
  11758. * @example
  11759. *
  11760. * var rearged = _.rearg(function(a, b, c) {
  11761. * return [a, b, c];
  11762. * }, [2, 0, 1]);
  11763. *
  11764. * rearged('b', 'c', 'a')
  11765. * // => ['a', 'b', 'c']
  11766. */
  11767. var rearg = flatRest(function(func, indexes) {
  11768. return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);
  11769. });
  11770. /**
  11771. * Creates a function that invokes `func` with the `this` binding of the
  11772. * created function and arguments from `start` and beyond provided as
  11773. * an array.
  11774. *
  11775. * **Note:** This method is based on the
  11776. * [rest parameter](https://mdn.io/rest_parameters).
  11777. *
  11778. * @static
  11779. * @memberOf _
  11780. * @since 4.0.0
  11781. * @category Function
  11782. * @param {Function} func The function to apply a rest parameter to.
  11783. * @param {number} [start=func.length-1] The start position of the rest parameter.
  11784. * @returns {Function} Returns the new function.
  11785. * @example
  11786. *
  11787. * var say = _.rest(function(what, names) {
  11788. * return what + ' ' + _.initial(names).join(', ') +
  11789. * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
  11790. * });
  11791. *
  11792. * say('hello', 'fred', 'barney', 'pebbles');
  11793. * // => 'hello fred, barney, & pebbles'
  11794. */
  11795. function rest(func, start) {
  11796. if (typeof func != 'function') {
  11797. throw new TypeError(FUNC_ERROR_TEXT);
  11798. }
  11799. start = start === undefined ? start : toInteger(start);
  11800. return baseRest(func, start);
  11801. }
  11802. /**
  11803. * Creates a function that invokes `func` with the `this` binding of the
  11804. * create function and an array of arguments much like
  11805. * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).
  11806. *
  11807. * **Note:** This method is based on the
  11808. * [spread operator](https://mdn.io/spread_operator).
  11809. *
  11810. * @static
  11811. * @memberOf _
  11812. * @since 3.2.0
  11813. * @category Function
  11814. * @param {Function} func The function to spread arguments over.
  11815. * @param {number} [start=0] The start position of the spread.
  11816. * @returns {Function} Returns the new function.
  11817. * @example
  11818. *
  11819. * var say = _.spread(function(who, what) {
  11820. * return who + ' says ' + what;
  11821. * });
  11822. *
  11823. * say(['fred', 'hello']);
  11824. * // => 'fred says hello'
  11825. *
  11826. * var numbers = Promise.all([
  11827. * Promise.resolve(40),
  11828. * Promise.resolve(36)
  11829. * ]);
  11830. *
  11831. * numbers.then(_.spread(function(x, y) {
  11832. * return x + y;
  11833. * }));
  11834. * // => a Promise of 76
  11835. */
  11836. function spread(func, start) {
  11837. if (typeof func != 'function') {
  11838. throw new TypeError(FUNC_ERROR_TEXT);
  11839. }
  11840. start = start == null ? 0 : nativeMax(toInteger(start), 0);
  11841. return baseRest(function(args) {
  11842. var array = args[start],
  11843. otherArgs = castSlice(args, 0, start);
  11844. if (array) {
  11845. arrayPush(otherArgs, array);
  11846. }
  11847. return apply(func, this, otherArgs);
  11848. });
  11849. }
  11850. /**
  11851. * Creates a throttled function that only invokes `func` at most once per
  11852. * every `wait` milliseconds. The throttled function comes with a `cancel`
  11853. * method to cancel delayed `func` invocations and a `flush` method to
  11854. * immediately invoke them. Provide `options` to indicate whether `func`
  11855. * should be invoked on the leading and/or trailing edge of the `wait`
  11856. * timeout. The `func` is invoked with the last arguments provided to the
  11857. * throttled function. Subsequent calls to the throttled function return the
  11858. * result of the last `func` invocation.
  11859. *
  11860. * **Note:** If `leading` and `trailing` options are `true`, `func` is
  11861. * invoked on the trailing edge of the timeout only if the throttled function
  11862. * is invoked more than once during the `wait` timeout.
  11863. *
  11864. * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
  11865. * until to the next tick, similar to `setTimeout` with a timeout of `0`.
  11866. *
  11867. * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
  11868. * for details over the differences between `_.throttle` and `_.debounce`.
  11869. *
  11870. * @static
  11871. * @memberOf _
  11872. * @since 0.1.0
  11873. * @category Function
  11874. * @param {Function} func The function to throttle.
  11875. * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
  11876. * @param {Object} [options={}] The options object.
  11877. * @param {boolean} [options.leading=true]
  11878. * Specify invoking on the leading edge of the timeout.
  11879. * @param {boolean} [options.trailing=true]
  11880. * Specify invoking on the trailing edge of the timeout.
  11881. * @returns {Function} Returns the new throttled function.
  11882. * @example
  11883. *
  11884. * // Avoid excessively updating the position while scrolling.
  11885. * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
  11886. *
  11887. * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
  11888. * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
  11889. * jQuery(element).on('click', throttled);
  11890. *
  11891. * // Cancel the trailing throttled invocation.
  11892. * jQuery(window).on('popstate', throttled.cancel);
  11893. */
  11894. function throttle(func, wait, options) {
  11895. var leading = true,
  11896. trailing = true;
  11897. if (typeof func != 'function') {
  11898. throw new TypeError(FUNC_ERROR_TEXT);
  11899. }
  11900. if (isObject(options)) {
  11901. leading = 'leading' in options ? !!options.leading : leading;
  11902. trailing = 'trailing' in options ? !!options.trailing : trailing;
  11903. }
  11904. return debounce(func, wait, {
  11905. 'leading': leading,
  11906. 'maxWait': wait,
  11907. 'trailing': trailing
  11908. });
  11909. }
  11910. /**
  11911. * Creates a function that accepts up to one argument, ignoring any
  11912. * additional arguments.
  11913. *
  11914. * @static
  11915. * @memberOf _
  11916. * @since 4.0.0
  11917. * @category Function
  11918. * @param {Function} func The function to cap arguments for.
  11919. * @returns {Function} Returns the new capped function.
  11920. * @example
  11921. *
  11922. * _.map(['6', '8', '10'], _.unary(parseInt));
  11923. * // => [6, 8, 10]
  11924. */
  11925. function unary(func) {
  11926. return ary(func, 1);
  11927. }
  11928. /**
  11929. * Creates a function that provides `value` to `wrapper` as its first
  11930. * argument. Any additional arguments provided to the function are appended
  11931. * to those provided to the `wrapper`. The wrapper is invoked with the `this`
  11932. * binding of the created function.
  11933. *
  11934. * @static
  11935. * @memberOf _
  11936. * @since 0.1.0
  11937. * @category Function
  11938. * @param {*} value The value to wrap.
  11939. * @param {Function} [wrapper=identity] The wrapper function.
  11940. * @returns {Function} Returns the new function.
  11941. * @example
  11942. *
  11943. * var p = _.wrap(_.escape, function(func, text) {
  11944. * return '<p>' + func(text) + '</p>';
  11945. * });
  11946. *
  11947. * p('fred, barney, & pebbles');
  11948. * // => '<p>fred, barney, &amp; pebbles</p>'
  11949. */
  11950. function wrap(value, wrapper) {
  11951. return partial(castFunction(wrapper), value);
  11952. }
  11953. /*------------------------------------------------------------------------*/
  11954. /**
  11955. * Casts `value` as an array if it's not one.
  11956. *
  11957. * @static
  11958. * @memberOf _
  11959. * @since 4.4.0
  11960. * @category Lang
  11961. * @param {*} value The value to inspect.
  11962. * @returns {Array} Returns the cast array.
  11963. * @example
  11964. *
  11965. * _.castArray(1);
  11966. * // => [1]
  11967. *
  11968. * _.castArray({ 'a': 1 });
  11969. * // => [{ 'a': 1 }]
  11970. *
  11971. * _.castArray('abc');
  11972. * // => ['abc']
  11973. *
  11974. * _.castArray(null);
  11975. * // => [null]
  11976. *
  11977. * _.castArray(undefined);
  11978. * // => [undefined]
  11979. *
  11980. * _.castArray();
  11981. * // => []
  11982. *
  11983. * var array = [1, 2, 3];
  11984. * console.log(_.castArray(array) === array);
  11985. * // => true
  11986. */
  11987. function castArray() {
  11988. if (!arguments.length) {
  11989. return [];
  11990. }
  11991. var value = arguments[0];
  11992. return isArray(value) ? value : [value];
  11993. }
  11994. /**
  11995. * Creates a shallow clone of `value`.
  11996. *
  11997. * **Note:** This method is loosely based on the
  11998. * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
  11999. * and supports cloning arrays, array buffers, booleans, date objects, maps,
  12000. * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
  12001. * arrays. The own enumerable properties of `arguments` objects are cloned
  12002. * as plain objects. An empty object is returned for uncloneable values such
  12003. * as error objects, functions, DOM nodes, and WeakMaps.
  12004. *
  12005. * @static
  12006. * @memberOf _
  12007. * @since 0.1.0
  12008. * @category Lang
  12009. * @param {*} value The value to clone.
  12010. * @returns {*} Returns the cloned value.
  12011. * @see _.cloneDeep
  12012. * @example
  12013. *
  12014. * var objects = [{ 'a': 1 }, { 'b': 2 }];
  12015. *
  12016. * var shallow = _.clone(objects);
  12017. * console.log(shallow[0] === objects[0]);
  12018. * // => true
  12019. */
  12020. function clone(value) {
  12021. return baseClone(value, CLONE_SYMBOLS_FLAG);
  12022. }
  12023. /**
  12024. * This method is like `_.clone` except that it accepts `customizer` which
  12025. * is invoked to produce the cloned value. If `customizer` returns `undefined`,
  12026. * cloning is handled by the method instead. The `customizer` is invoked with
  12027. * up to four arguments; (value [, index|key, object, stack]).
  12028. *
  12029. * @static
  12030. * @memberOf _
  12031. * @since 4.0.0
  12032. * @category Lang
  12033. * @param {*} value The value to clone.
  12034. * @param {Function} [customizer] The function to customize cloning.
  12035. * @returns {*} Returns the cloned value.
  12036. * @see _.cloneDeepWith
  12037. * @example
  12038. *
  12039. * function customizer(value) {
  12040. * if (_.isElement(value)) {
  12041. * return value.cloneNode(false);
  12042. * }
  12043. * }
  12044. *
  12045. * var el = _.cloneWith(document.body, customizer);
  12046. *
  12047. * console.log(el === document.body);
  12048. * // => false
  12049. * console.log(el.nodeName);
  12050. * // => 'BODY'
  12051. * console.log(el.childNodes.length);
  12052. * // => 0
  12053. */
  12054. function cloneWith(value, customizer) {
  12055. customizer = typeof customizer == 'function' ? customizer : undefined;
  12056. return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
  12057. }
  12058. /**
  12059. * This method is like `_.clone` except that it recursively clones `value`.
  12060. *
  12061. * @static
  12062. * @memberOf _
  12063. * @since 1.0.0
  12064. * @category Lang
  12065. * @param {*} value The value to recursively clone.
  12066. * @returns {*} Returns the deep cloned value.
  12067. * @see _.clone
  12068. * @example
  12069. *
  12070. * var objects = [{ 'a': 1 }, { 'b': 2 }];
  12071. *
  12072. * var deep = _.cloneDeep(objects);
  12073. * console.log(deep[0] === objects[0]);
  12074. * // => false
  12075. */
  12076. function cloneDeep(value) {
  12077. return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
  12078. }
  12079. /**
  12080. * This method is like `_.cloneWith` except that it recursively clones `value`.
  12081. *
  12082. * @static
  12083. * @memberOf _
  12084. * @since 4.0.0
  12085. * @category Lang
  12086. * @param {*} value The value to recursively clone.
  12087. * @param {Function} [customizer] The function to customize cloning.
  12088. * @returns {*} Returns the deep cloned value.
  12089. * @see _.cloneWith
  12090. * @example
  12091. *
  12092. * function customizer(value) {
  12093. * if (_.isElement(value)) {
  12094. * return value.cloneNode(true);
  12095. * }
  12096. * }
  12097. *
  12098. * var el = _.cloneDeepWith(document.body, customizer);
  12099. *
  12100. * console.log(el === document.body);
  12101. * // => false
  12102. * console.log(el.nodeName);
  12103. * // => 'BODY'
  12104. * console.log(el.childNodes.length);
  12105. * // => 20
  12106. */
  12107. function cloneDeepWith(value, customizer) {
  12108. customizer = typeof customizer == 'function' ? customizer : undefined;
  12109. return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
  12110. }
  12111. /**
  12112. * Checks if `object` conforms to `source` by invoking the predicate
  12113. * properties of `source` with the corresponding property values of `object`.
  12114. *
  12115. * **Note:** This method is equivalent to `_.conforms` when `source` is
  12116. * partially applied.
  12117. *
  12118. * @static
  12119. * @memberOf _
  12120. * @since 4.14.0
  12121. * @category Lang
  12122. * @param {Object} object The object to inspect.
  12123. * @param {Object} source The object of property predicates to conform to.
  12124. * @returns {boolean} Returns `true` if `object` conforms, else `false`.
  12125. * @example
  12126. *
  12127. * var object = { 'a': 1, 'b': 2 };
  12128. *
  12129. * _.conformsTo(object, { 'b': function(n) { return n > 1; } });
  12130. * // => true
  12131. *
  12132. * _.conformsTo(object, { 'b': function(n) { return n > 2; } });
  12133. * // => false
  12134. */
  12135. function conformsTo(object, source) {
  12136. return source == null || baseConformsTo(object, source, keys(source));
  12137. }
  12138. /**
  12139. * Performs a
  12140. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  12141. * comparison between two values to determine if they are equivalent.
  12142. *
  12143. * @static
  12144. * @memberOf _
  12145. * @since 4.0.0
  12146. * @category Lang
  12147. * @param {*} value The value to compare.
  12148. * @param {*} other The other value to compare.
  12149. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  12150. * @example
  12151. *
  12152. * var object = { 'a': 1 };
  12153. * var other = { 'a': 1 };
  12154. *
  12155. * _.eq(object, object);
  12156. * // => true
  12157. *
  12158. * _.eq(object, other);
  12159. * // => false
  12160. *
  12161. * _.eq('a', 'a');
  12162. * // => true
  12163. *
  12164. * _.eq('a', Object('a'));
  12165. * // => false
  12166. *
  12167. * _.eq(NaN, NaN);
  12168. * // => true
  12169. */
  12170. function eq(value, other) {
  12171. return value === other || (value !== value && other !== other);
  12172. }
  12173. /**
  12174. * Checks if `value` is greater than `other`.
  12175. *
  12176. * @static
  12177. * @memberOf _
  12178. * @since 3.9.0
  12179. * @category Lang
  12180. * @param {*} value The value to compare.
  12181. * @param {*} other The other value to compare.
  12182. * @returns {boolean} Returns `true` if `value` is greater than `other`,
  12183. * else `false`.
  12184. * @see _.lt
  12185. * @example
  12186. *
  12187. * _.gt(3, 1);
  12188. * // => true
  12189. *
  12190. * _.gt(3, 3);
  12191. * // => false
  12192. *
  12193. * _.gt(1, 3);
  12194. * // => false
  12195. */
  12196. var gt = createRelationalOperation(baseGt);
  12197. /**
  12198. * Checks if `value` is greater than or equal to `other`.
  12199. *
  12200. * @static
  12201. * @memberOf _
  12202. * @since 3.9.0
  12203. * @category Lang
  12204. * @param {*} value The value to compare.
  12205. * @param {*} other The other value to compare.
  12206. * @returns {boolean} Returns `true` if `value` is greater than or equal to
  12207. * `other`, else `false`.
  12208. * @see _.lte
  12209. * @example
  12210. *
  12211. * _.gte(3, 1);
  12212. * // => true
  12213. *
  12214. * _.gte(3, 3);
  12215. * // => true
  12216. *
  12217. * _.gte(1, 3);
  12218. * // => false
  12219. */
  12220. var gte = createRelationalOperation(function(value, other) {
  12221. return value >= other;
  12222. });
  12223. /**
  12224. * Checks if `value` is likely an `arguments` object.
  12225. *
  12226. * @static
  12227. * @memberOf _
  12228. * @since 0.1.0
  12229. * @category Lang
  12230. * @param {*} value The value to check.
  12231. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  12232. * else `false`.
  12233. * @example
  12234. *
  12235. * _.isArguments(function() { return arguments; }());
  12236. * // => true
  12237. *
  12238. * _.isArguments([1, 2, 3]);
  12239. * // => false
  12240. */
  12241. var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
  12242. return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
  12243. !propertyIsEnumerable.call(value, 'callee');
  12244. };
  12245. /**
  12246. * Checks if `value` is classified as an `Array` object.
  12247. *
  12248. * @static
  12249. * @memberOf _
  12250. * @since 0.1.0
  12251. * @category Lang
  12252. * @param {*} value The value to check.
  12253. * @returns {boolean} Returns `true` if `value` is an array, else `false`.
  12254. * @example
  12255. *
  12256. * _.isArray([1, 2, 3]);
  12257. * // => true
  12258. *
  12259. * _.isArray(document.body.children);
  12260. * // => false
  12261. *
  12262. * _.isArray('abc');
  12263. * // => false
  12264. *
  12265. * _.isArray(_.noop);
  12266. * // => false
  12267. */
  12268. var isArray = Array.isArray;
  12269. /**
  12270. * Checks if `value` is classified as an `ArrayBuffer` object.
  12271. *
  12272. * @static
  12273. * @memberOf _
  12274. * @since 4.3.0
  12275. * @category Lang
  12276. * @param {*} value The value to check.
  12277. * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
  12278. * @example
  12279. *
  12280. * _.isArrayBuffer(new ArrayBuffer(2));
  12281. * // => true
  12282. *
  12283. * _.isArrayBuffer(new Array(2));
  12284. * // => false
  12285. */
  12286. var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
  12287. /**
  12288. * Checks if `value` is array-like. A value is considered array-like if it's
  12289. * not a function and has a `value.length` that's an integer greater than or
  12290. * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
  12291. *
  12292. * @static
  12293. * @memberOf _
  12294. * @since 4.0.0
  12295. * @category Lang
  12296. * @param {*} value The value to check.
  12297. * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
  12298. * @example
  12299. *
  12300. * _.isArrayLike([1, 2, 3]);
  12301. * // => true
  12302. *
  12303. * _.isArrayLike(document.body.children);
  12304. * // => true
  12305. *
  12306. * _.isArrayLike('abc');
  12307. * // => true
  12308. *
  12309. * _.isArrayLike(_.noop);
  12310. * // => false
  12311. */
  12312. function isArrayLike(value) {
  12313. return value != null && isLength(value.length) && !isFunction(value);
  12314. }
  12315. /**
  12316. * This method is like `_.isArrayLike` except that it also checks if `value`
  12317. * is an object.
  12318. *
  12319. * @static
  12320. * @memberOf _
  12321. * @since 4.0.0
  12322. * @category Lang
  12323. * @param {*} value The value to check.
  12324. * @returns {boolean} Returns `true` if `value` is an array-like object,
  12325. * else `false`.
  12326. * @example
  12327. *
  12328. * _.isArrayLikeObject([1, 2, 3]);
  12329. * // => true
  12330. *
  12331. * _.isArrayLikeObject(document.body.children);
  12332. * // => true
  12333. *
  12334. * _.isArrayLikeObject('abc');
  12335. * // => false
  12336. *
  12337. * _.isArrayLikeObject(_.noop);
  12338. * // => false
  12339. */
  12340. function isArrayLikeObject(value) {
  12341. return isObjectLike(value) && isArrayLike(value);
  12342. }
  12343. /**
  12344. * Checks if `value` is classified as a boolean primitive or object.
  12345. *
  12346. * @static
  12347. * @memberOf _
  12348. * @since 0.1.0
  12349. * @category Lang
  12350. * @param {*} value The value to check.
  12351. * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
  12352. * @example
  12353. *
  12354. * _.isBoolean(false);
  12355. * // => true
  12356. *
  12357. * _.isBoolean(null);
  12358. * // => false
  12359. */
  12360. function isBoolean(value) {
  12361. return value === true || value === false ||
  12362. (isObjectLike(value) && baseGetTag(value) == boolTag);
  12363. }
  12364. /**
  12365. * Checks if `value` is a buffer.
  12366. *
  12367. * @static
  12368. * @memberOf _
  12369. * @since 4.3.0
  12370. * @category Lang
  12371. * @param {*} value The value to check.
  12372. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
  12373. * @example
  12374. *
  12375. * _.isBuffer(new Buffer(2));
  12376. * // => true
  12377. *
  12378. * _.isBuffer(new Uint8Array(2));
  12379. * // => false
  12380. */
  12381. var isBuffer = nativeIsBuffer || stubFalse;
  12382. /**
  12383. * Checks if `value` is classified as a `Date` object.
  12384. *
  12385. * @static
  12386. * @memberOf _
  12387. * @since 0.1.0
  12388. * @category Lang
  12389. * @param {*} value The value to check.
  12390. * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
  12391. * @example
  12392. *
  12393. * _.isDate(new Date);
  12394. * // => true
  12395. *
  12396. * _.isDate('Mon April 23 2012');
  12397. * // => false
  12398. */
  12399. var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
  12400. /**
  12401. * Checks if `value` is likely a DOM element.
  12402. *
  12403. * @static
  12404. * @memberOf _
  12405. * @since 0.1.0
  12406. * @category Lang
  12407. * @param {*} value The value to check.
  12408. * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
  12409. * @example
  12410. *
  12411. * _.isElement(document.body);
  12412. * // => true
  12413. *
  12414. * _.isElement('<body>');
  12415. * // => false
  12416. */
  12417. function isElement(value) {
  12418. return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
  12419. }
  12420. /**
  12421. * Checks if `value` is an empty object, collection, map, or set.
  12422. *
  12423. * Objects are considered empty if they have no own enumerable string keyed
  12424. * properties.
  12425. *
  12426. * Array-like values such as `arguments` objects, arrays, buffers, strings, or
  12427. * jQuery-like collections are considered empty if they have a `length` of `0`.
  12428. * Similarly, maps and sets are considered empty if they have a `size` of `0`.
  12429. *
  12430. * @static
  12431. * @memberOf _
  12432. * @since 0.1.0
  12433. * @category Lang
  12434. * @param {*} value The value to check.
  12435. * @returns {boolean} Returns `true` if `value` is empty, else `false`.
  12436. * @example
  12437. *
  12438. * _.isEmpty(null);
  12439. * // => true
  12440. *
  12441. * _.isEmpty(true);
  12442. * // => true
  12443. *
  12444. * _.isEmpty(1);
  12445. * // => true
  12446. *
  12447. * _.isEmpty([1, 2, 3]);
  12448. * // => false
  12449. *
  12450. * _.isEmpty({ 'a': 1 });
  12451. * // => false
  12452. */
  12453. function isEmpty(value) {
  12454. if (value == null) {
  12455. return true;
  12456. }
  12457. if (isArrayLike(value) &&
  12458. (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
  12459. isBuffer(value) || isTypedArray(value) || isArguments(value))) {
  12460. return !value.length;
  12461. }
  12462. var tag = getTag(value);
  12463. if (tag == mapTag || tag == setTag) {
  12464. return !value.size;
  12465. }
  12466. if (isPrototype(value)) {
  12467. return !baseKeys(value).length;
  12468. }
  12469. for (var key in value) {
  12470. if (hasOwnProperty.call(value, key)) {
  12471. return false;
  12472. }
  12473. }
  12474. return true;
  12475. }
  12476. /**
  12477. * Performs a deep comparison between two values to determine if they are
  12478. * equivalent.
  12479. *
  12480. * **Note:** This method supports comparing arrays, array buffers, booleans,
  12481. * date objects, error objects, maps, numbers, `Object` objects, regexes,
  12482. * sets, strings, symbols, and typed arrays. `Object` objects are compared
  12483. * by their own, not inherited, enumerable properties. Functions and DOM
  12484. * nodes are compared by strict equality, i.e. `===`.
  12485. *
  12486. * @static
  12487. * @memberOf _
  12488. * @since 0.1.0
  12489. * @category Lang
  12490. * @param {*} value The value to compare.
  12491. * @param {*} other The other value to compare.
  12492. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  12493. * @example
  12494. *
  12495. * var object = { 'a': 1 };
  12496. * var other = { 'a': 1 };
  12497. *
  12498. * _.isEqual(object, other);
  12499. * // => true
  12500. *
  12501. * object === other;
  12502. * // => false
  12503. */
  12504. function isEqual(value, other) {
  12505. return baseIsEqual(value, other);
  12506. }
  12507. /**
  12508. * This method is like `_.isEqual` except that it accepts `customizer` which
  12509. * is invoked to compare values. If `customizer` returns `undefined`, comparisons
  12510. * are handled by the method instead. The `customizer` is invoked with up to
  12511. * six arguments: (objValue, othValue [, index|key, object, other, stack]).
  12512. *
  12513. * @static
  12514. * @memberOf _
  12515. * @since 4.0.0
  12516. * @category Lang
  12517. * @param {*} value The value to compare.
  12518. * @param {*} other The other value to compare.
  12519. * @param {Function} [customizer] The function to customize comparisons.
  12520. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  12521. * @example
  12522. *
  12523. * function isGreeting(value) {
  12524. * return /^h(?:i|ello)$/.test(value);
  12525. * }
  12526. *
  12527. * function customizer(objValue, othValue) {
  12528. * if (isGreeting(objValue) && isGreeting(othValue)) {
  12529. * return true;
  12530. * }
  12531. * }
  12532. *
  12533. * var array = ['hello', 'goodbye'];
  12534. * var other = ['hi', 'goodbye'];
  12535. *
  12536. * _.isEqualWith(array, other, customizer);
  12537. * // => true
  12538. */
  12539. function isEqualWith(value, other, customizer) {
  12540. customizer = typeof customizer == 'function' ? customizer : undefined;
  12541. var result = customizer ? customizer(value, other) : undefined;
  12542. return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
  12543. }
  12544. /**
  12545. * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
  12546. * `SyntaxError`, `TypeError`, or `URIError` object.
  12547. *
  12548. * @static
  12549. * @memberOf _
  12550. * @since 3.0.0
  12551. * @category Lang
  12552. * @param {*} value The value to check.
  12553. * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
  12554. * @example
  12555. *
  12556. * _.isError(new Error);
  12557. * // => true
  12558. *
  12559. * _.isError(Error);
  12560. * // => false
  12561. */
  12562. function isError(value) {
  12563. if (!isObjectLike(value)) {
  12564. return false;
  12565. }
  12566. var tag = baseGetTag(value);
  12567. return tag == errorTag || tag == domExcTag ||
  12568. (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
  12569. }
  12570. /**
  12571. * Checks if `value` is a finite primitive number.
  12572. *
  12573. * **Note:** This method is based on
  12574. * [`Number.isFinite`](https://mdn.io/Number/isFinite).
  12575. *
  12576. * @static
  12577. * @memberOf _
  12578. * @since 0.1.0
  12579. * @category Lang
  12580. * @param {*} value The value to check.
  12581. * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
  12582. * @example
  12583. *
  12584. * _.isFinite(3);
  12585. * // => true
  12586. *
  12587. * _.isFinite(Number.MIN_VALUE);
  12588. * // => true
  12589. *
  12590. * _.isFinite(Infinity);
  12591. * // => false
  12592. *
  12593. * _.isFinite('3');
  12594. * // => false
  12595. */
  12596. function isFinite(value) {
  12597. return typeof value == 'number' && nativeIsFinite(value);
  12598. }
  12599. /**
  12600. * Checks if `value` is classified as a `Function` object.
  12601. *
  12602. * @static
  12603. * @memberOf _
  12604. * @since 0.1.0
  12605. * @category Lang
  12606. * @param {*} value The value to check.
  12607. * @returns {boolean} Returns `true` if `value` is a function, else `false`.
  12608. * @example
  12609. *
  12610. * _.isFunction(_);
  12611. * // => true
  12612. *
  12613. * _.isFunction(/abc/);
  12614. * // => false
  12615. */
  12616. function isFunction(value) {
  12617. if (!isObject(value)) {
  12618. return false;
  12619. }
  12620. // The use of `Object#toString` avoids issues with the `typeof` operator
  12621. // in Safari 9 which returns 'object' for typed arrays and other constructors.
  12622. var tag = baseGetTag(value);
  12623. return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
  12624. }
  12625. /**
  12626. * Checks if `value` is an integer.
  12627. *
  12628. * **Note:** This method is based on
  12629. * [`Number.isInteger`](https://mdn.io/Number/isInteger).
  12630. *
  12631. * @static
  12632. * @memberOf _
  12633. * @since 4.0.0
  12634. * @category Lang
  12635. * @param {*} value The value to check.
  12636. * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
  12637. * @example
  12638. *
  12639. * _.isInteger(3);
  12640. * // => true
  12641. *
  12642. * _.isInteger(Number.MIN_VALUE);
  12643. * // => false
  12644. *
  12645. * _.isInteger(Infinity);
  12646. * // => false
  12647. *
  12648. * _.isInteger('3');
  12649. * // => false
  12650. */
  12651. function isInteger(value) {
  12652. return typeof value == 'number' && value == toInteger(value);
  12653. }
  12654. /**
  12655. * Checks if `value` is a valid array-like length.
  12656. *
  12657. * **Note:** This method is loosely based on
  12658. * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
  12659. *
  12660. * @static
  12661. * @memberOf _
  12662. * @since 4.0.0
  12663. * @category Lang
  12664. * @param {*} value The value to check.
  12665. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  12666. * @example
  12667. *
  12668. * _.isLength(3);
  12669. * // => true
  12670. *
  12671. * _.isLength(Number.MIN_VALUE);
  12672. * // => false
  12673. *
  12674. * _.isLength(Infinity);
  12675. * // => false
  12676. *
  12677. * _.isLength('3');
  12678. * // => false
  12679. */
  12680. function isLength(value) {
  12681. return typeof value == 'number' &&
  12682. value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  12683. }
  12684. /**
  12685. * Checks if `value` is the
  12686. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  12687. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  12688. *
  12689. * @static
  12690. * @memberOf _
  12691. * @since 0.1.0
  12692. * @category Lang
  12693. * @param {*} value The value to check.
  12694. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  12695. * @example
  12696. *
  12697. * _.isObject({});
  12698. * // => true
  12699. *
  12700. * _.isObject([1, 2, 3]);
  12701. * // => true
  12702. *
  12703. * _.isObject(_.noop);
  12704. * // => true
  12705. *
  12706. * _.isObject(null);
  12707. * // => false
  12708. */
  12709. function isObject(value) {
  12710. var type = typeof value;
  12711. return value != null && (type == 'object' || type == 'function');
  12712. }
  12713. /**
  12714. * Checks if `value` is object-like. A value is object-like if it's not `null`
  12715. * and has a `typeof` result of "object".
  12716. *
  12717. * @static
  12718. * @memberOf _
  12719. * @since 4.0.0
  12720. * @category Lang
  12721. * @param {*} value The value to check.
  12722. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  12723. * @example
  12724. *
  12725. * _.isObjectLike({});
  12726. * // => true
  12727. *
  12728. * _.isObjectLike([1, 2, 3]);
  12729. * // => true
  12730. *
  12731. * _.isObjectLike(_.noop);
  12732. * // => false
  12733. *
  12734. * _.isObjectLike(null);
  12735. * // => false
  12736. */
  12737. function isObjectLike(value) {
  12738. return value != null && typeof value == 'object';
  12739. }
  12740. /**
  12741. * Checks if `value` is classified as a `Map` object.
  12742. *
  12743. * @static
  12744. * @memberOf _
  12745. * @since 4.3.0
  12746. * @category Lang
  12747. * @param {*} value The value to check.
  12748. * @returns {boolean} Returns `true` if `value` is a map, else `false`.
  12749. * @example
  12750. *
  12751. * _.isMap(new Map);
  12752. * // => true
  12753. *
  12754. * _.isMap(new WeakMap);
  12755. * // => false
  12756. */
  12757. var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
  12758. /**
  12759. * Performs a partial deep comparison between `object` and `source` to
  12760. * determine if `object` contains equivalent property values.
  12761. *
  12762. * **Note:** This method is equivalent to `_.matches` when `source` is
  12763. * partially applied.
  12764. *
  12765. * Partial comparisons will match empty array and empty object `source`
  12766. * values against any array or object value, respectively. See `_.isEqual`
  12767. * for a list of supported value comparisons.
  12768. *
  12769. * @static
  12770. * @memberOf _
  12771. * @since 3.0.0
  12772. * @category Lang
  12773. * @param {Object} object The object to inspect.
  12774. * @param {Object} source The object of property values to match.
  12775. * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  12776. * @example
  12777. *
  12778. * var object = { 'a': 1, 'b': 2 };
  12779. *
  12780. * _.isMatch(object, { 'b': 2 });
  12781. * // => true
  12782. *
  12783. * _.isMatch(object, { 'b': 1 });
  12784. * // => false
  12785. */
  12786. function isMatch(object, source) {
  12787. return object === source || baseIsMatch(object, source, getMatchData(source));
  12788. }
  12789. /**
  12790. * This method is like `_.isMatch` except that it accepts `customizer` which
  12791. * is invoked to compare values. If `customizer` returns `undefined`, comparisons
  12792. * are handled by the method instead. The `customizer` is invoked with five
  12793. * arguments: (objValue, srcValue, index|key, object, source).
  12794. *
  12795. * @static
  12796. * @memberOf _
  12797. * @since 4.0.0
  12798. * @category Lang
  12799. * @param {Object} object The object to inspect.
  12800. * @param {Object} source The object of property values to match.
  12801. * @param {Function} [customizer] The function to customize comparisons.
  12802. * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  12803. * @example
  12804. *
  12805. * function isGreeting(value) {
  12806. * return /^h(?:i|ello)$/.test(value);
  12807. * }
  12808. *
  12809. * function customizer(objValue, srcValue) {
  12810. * if (isGreeting(objValue) && isGreeting(srcValue)) {
  12811. * return true;
  12812. * }
  12813. * }
  12814. *
  12815. * var object = { 'greeting': 'hello' };
  12816. * var source = { 'greeting': 'hi' };
  12817. *
  12818. * _.isMatchWith(object, source, customizer);
  12819. * // => true
  12820. */
  12821. function isMatchWith(object, source, customizer) {
  12822. customizer = typeof customizer == 'function' ? customizer : undefined;
  12823. return baseIsMatch(object, source, getMatchData(source), customizer);
  12824. }
  12825. /**
  12826. * Checks if `value` is `NaN`.
  12827. *
  12828. * **Note:** This method is based on
  12829. * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
  12830. * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
  12831. * `undefined` and other non-number values.
  12832. *
  12833. * @static
  12834. * @memberOf _
  12835. * @since 0.1.0
  12836. * @category Lang
  12837. * @param {*} value The value to check.
  12838. * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
  12839. * @example
  12840. *
  12841. * _.isNaN(NaN);
  12842. * // => true
  12843. *
  12844. * _.isNaN(new Number(NaN));
  12845. * // => true
  12846. *
  12847. * isNaN(undefined);
  12848. * // => true
  12849. *
  12850. * _.isNaN(undefined);
  12851. * // => false
  12852. */
  12853. function isNaN(value) {
  12854. // An `NaN` primitive is the only value that is not equal to itself.
  12855. // Perform the `toStringTag` check first to avoid errors with some
  12856. // ActiveX objects in IE.
  12857. return isNumber(value) && value != +value;
  12858. }
  12859. /**
  12860. * Checks if `value` is a pristine native function.
  12861. *
  12862. * **Note:** This method can't reliably detect native functions in the presence
  12863. * of the core-js package because core-js circumvents this kind of detection.
  12864. * Despite multiple requests, the core-js maintainer has made it clear: any
  12865. * attempt to fix the detection will be obstructed. As a result, we're left
  12866. * with little choice but to throw an error. Unfortunately, this also affects
  12867. * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
  12868. * which rely on core-js.
  12869. *
  12870. * @static
  12871. * @memberOf _
  12872. * @since 3.0.0
  12873. * @category Lang
  12874. * @param {*} value The value to check.
  12875. * @returns {boolean} Returns `true` if `value` is a native function,
  12876. * else `false`.
  12877. * @example
  12878. *
  12879. * _.isNative(Array.prototype.push);
  12880. * // => true
  12881. *
  12882. * _.isNative(_);
  12883. * // => false
  12884. */
  12885. function isNative(value) {
  12886. if (isMaskable(value)) {
  12887. throw new Error(CORE_ERROR_TEXT);
  12888. }
  12889. return baseIsNative(value);
  12890. }
  12891. /**
  12892. * Checks if `value` is `null`.
  12893. *
  12894. * @static
  12895. * @memberOf _
  12896. * @since 0.1.0
  12897. * @category Lang
  12898. * @param {*} value The value to check.
  12899. * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
  12900. * @example
  12901. *
  12902. * _.isNull(null);
  12903. * // => true
  12904. *
  12905. * _.isNull(void 0);
  12906. * // => false
  12907. */
  12908. function isNull(value) {
  12909. return value === null;
  12910. }
  12911. /**
  12912. * Checks if `value` is `null` or `undefined`.
  12913. *
  12914. * @static
  12915. * @memberOf _
  12916. * @since 4.0.0
  12917. * @category Lang
  12918. * @param {*} value The value to check.
  12919. * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
  12920. * @example
  12921. *
  12922. * _.isNil(null);
  12923. * // => true
  12924. *
  12925. * _.isNil(void 0);
  12926. * // => true
  12927. *
  12928. * _.isNil(NaN);
  12929. * // => false
  12930. */
  12931. function isNil(value) {
  12932. return value == null;
  12933. }
  12934. /**
  12935. * Checks if `value` is classified as a `Number` primitive or object.
  12936. *
  12937. * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
  12938. * classified as numbers, use the `_.isFinite` method.
  12939. *
  12940. * @static
  12941. * @memberOf _
  12942. * @since 0.1.0
  12943. * @category Lang
  12944. * @param {*} value The value to check.
  12945. * @returns {boolean} Returns `true` if `value` is a number, else `false`.
  12946. * @example
  12947. *
  12948. * _.isNumber(3);
  12949. * // => true
  12950. *
  12951. * _.isNumber(Number.MIN_VALUE);
  12952. * // => true
  12953. *
  12954. * _.isNumber(Infinity);
  12955. * // => true
  12956. *
  12957. * _.isNumber('3');
  12958. * // => false
  12959. */
  12960. function isNumber(value) {
  12961. return typeof value == 'number' ||
  12962. (isObjectLike(value) && baseGetTag(value) == numberTag);
  12963. }
  12964. /**
  12965. * Checks if `value` is a plain object, that is, an object created by the
  12966. * `Object` constructor or one with a `[[Prototype]]` of `null`.
  12967. *
  12968. * @static
  12969. * @memberOf _
  12970. * @since 0.8.0
  12971. * @category Lang
  12972. * @param {*} value The value to check.
  12973. * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
  12974. * @example
  12975. *
  12976. * function Foo() {
  12977. * this.a = 1;
  12978. * }
  12979. *
  12980. * _.isPlainObject(new Foo);
  12981. * // => false
  12982. *
  12983. * _.isPlainObject([1, 2, 3]);
  12984. * // => false
  12985. *
  12986. * _.isPlainObject({ 'x': 0, 'y': 0 });
  12987. * // => true
  12988. *
  12989. * _.isPlainObject(Object.create(null));
  12990. * // => true
  12991. */
  12992. function isPlainObject(value) {
  12993. if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
  12994. return false;
  12995. }
  12996. var proto = getPrototype(value);
  12997. if (proto === null) {
  12998. return true;
  12999. }
  13000. var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
  13001. return typeof Ctor == 'function' && Ctor instanceof Ctor &&
  13002. funcToString.call(Ctor) == objectCtorString;
  13003. }
  13004. /**
  13005. * Checks if `value` is classified as a `RegExp` object.
  13006. *
  13007. * @static
  13008. * @memberOf _
  13009. * @since 0.1.0
  13010. * @category Lang
  13011. * @param {*} value The value to check.
  13012. * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
  13013. * @example
  13014. *
  13015. * _.isRegExp(/abc/);
  13016. * // => true
  13017. *
  13018. * _.isRegExp('/abc/');
  13019. * // => false
  13020. */
  13021. var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
  13022. /**
  13023. * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
  13024. * double precision number which isn't the result of a rounded unsafe integer.
  13025. *
  13026. * **Note:** This method is based on
  13027. * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
  13028. *
  13029. * @static
  13030. * @memberOf _
  13031. * @since 4.0.0
  13032. * @category Lang
  13033. * @param {*} value The value to check.
  13034. * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
  13035. * @example
  13036. *
  13037. * _.isSafeInteger(3);
  13038. * // => true
  13039. *
  13040. * _.isSafeInteger(Number.MIN_VALUE);
  13041. * // => false
  13042. *
  13043. * _.isSafeInteger(Infinity);
  13044. * // => false
  13045. *
  13046. * _.isSafeInteger('3');
  13047. * // => false
  13048. */
  13049. function isSafeInteger(value) {
  13050. return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
  13051. }
  13052. /**
  13053. * Checks if `value` is classified as a `Set` object.
  13054. *
  13055. * @static
  13056. * @memberOf _
  13057. * @since 4.3.0
  13058. * @category Lang
  13059. * @param {*} value The value to check.
  13060. * @returns {boolean} Returns `true` if `value` is a set, else `false`.
  13061. * @example
  13062. *
  13063. * _.isSet(new Set);
  13064. * // => true
  13065. *
  13066. * _.isSet(new WeakSet);
  13067. * // => false
  13068. */
  13069. var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
  13070. /**
  13071. * Checks if `value` is classified as a `String` primitive or object.
  13072. *
  13073. * @static
  13074. * @since 0.1.0
  13075. * @memberOf _
  13076. * @category Lang
  13077. * @param {*} value The value to check.
  13078. * @returns {boolean} Returns `true` if `value` is a string, else `false`.
  13079. * @example
  13080. *
  13081. * _.isString('abc');
  13082. * // => true
  13083. *
  13084. * _.isString(1);
  13085. * // => false
  13086. */
  13087. function isString(value) {
  13088. return typeof value == 'string' ||
  13089. (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
  13090. }
  13091. /**
  13092. * Checks if `value` is classified as a `Symbol` primitive or object.
  13093. *
  13094. * @static
  13095. * @memberOf _
  13096. * @since 4.0.0
  13097. * @category Lang
  13098. * @param {*} value The value to check.
  13099. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  13100. * @example
  13101. *
  13102. * _.isSymbol(Symbol.iterator);
  13103. * // => true
  13104. *
  13105. * _.isSymbol('abc');
  13106. * // => false
  13107. */
  13108. function isSymbol(value) {
  13109. return typeof value == 'symbol' ||
  13110. (isObjectLike(value) && baseGetTag(value) == symbolTag);
  13111. }
  13112. /**
  13113. * Checks if `value` is classified as a typed array.
  13114. *
  13115. * @static
  13116. * @memberOf _
  13117. * @since 3.0.0
  13118. * @category Lang
  13119. * @param {*} value The value to check.
  13120. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  13121. * @example
  13122. *
  13123. * _.isTypedArray(new Uint8Array);
  13124. * // => true
  13125. *
  13126. * _.isTypedArray([]);
  13127. * // => false
  13128. */
  13129. var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
  13130. /**
  13131. * Checks if `value` is `undefined`.
  13132. *
  13133. * @static
  13134. * @since 0.1.0
  13135. * @memberOf _
  13136. * @category Lang
  13137. * @param {*} value The value to check.
  13138. * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
  13139. * @example
  13140. *
  13141. * _.isUndefined(void 0);
  13142. * // => true
  13143. *
  13144. * _.isUndefined(null);
  13145. * // => false
  13146. */
  13147. function isUndefined(value) {
  13148. return value === undefined;
  13149. }
  13150. /**
  13151. * Checks if `value` is classified as a `WeakMap` object.
  13152. *
  13153. * @static
  13154. * @memberOf _
  13155. * @since 4.3.0
  13156. * @category Lang
  13157. * @param {*} value The value to check.
  13158. * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
  13159. * @example
  13160. *
  13161. * _.isWeakMap(new WeakMap);
  13162. * // => true
  13163. *
  13164. * _.isWeakMap(new Map);
  13165. * // => false
  13166. */
  13167. function isWeakMap(value) {
  13168. return isObjectLike(value) && getTag(value) == weakMapTag;
  13169. }
  13170. /**
  13171. * Checks if `value` is classified as a `WeakSet` object.
  13172. *
  13173. * @static
  13174. * @memberOf _
  13175. * @since 4.3.0
  13176. * @category Lang
  13177. * @param {*} value The value to check.
  13178. * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.
  13179. * @example
  13180. *
  13181. * _.isWeakSet(new WeakSet);
  13182. * // => true
  13183. *
  13184. * _.isWeakSet(new Set);
  13185. * // => false
  13186. */
  13187. function isWeakSet(value) {
  13188. return isObjectLike(value) && baseGetTag(value) == weakSetTag;
  13189. }
  13190. /**
  13191. * Checks if `value` is less than `other`.
  13192. *
  13193. * @static
  13194. * @memberOf _
  13195. * @since 3.9.0
  13196. * @category Lang
  13197. * @param {*} value The value to compare.
  13198. * @param {*} other The other value to compare.
  13199. * @returns {boolean} Returns `true` if `value` is less than `other`,
  13200. * else `false`.
  13201. * @see _.gt
  13202. * @example
  13203. *
  13204. * _.lt(1, 3);
  13205. * // => true
  13206. *
  13207. * _.lt(3, 3);
  13208. * // => false
  13209. *
  13210. * _.lt(3, 1);
  13211. * // => false
  13212. */
  13213. var lt = createRelationalOperation(baseLt);
  13214. /**
  13215. * Checks if `value` is less than or equal to `other`.
  13216. *
  13217. * @static
  13218. * @memberOf _
  13219. * @since 3.9.0
  13220. * @category Lang
  13221. * @param {*} value The value to compare.
  13222. * @param {*} other The other value to compare.
  13223. * @returns {boolean} Returns `true` if `value` is less than or equal to
  13224. * `other`, else `false`.
  13225. * @see _.gte
  13226. * @example
  13227. *
  13228. * _.lte(1, 3);
  13229. * // => true
  13230. *
  13231. * _.lte(3, 3);
  13232. * // => true
  13233. *
  13234. * _.lte(3, 1);
  13235. * // => false
  13236. */
  13237. var lte = createRelationalOperation(function(value, other) {
  13238. return value <= other;
  13239. });
  13240. /**
  13241. * Converts `value` to an array.
  13242. *
  13243. * @static
  13244. * @since 0.1.0
  13245. * @memberOf _
  13246. * @category Lang
  13247. * @param {*} value The value to convert.
  13248. * @returns {Array} Returns the converted array.
  13249. * @example
  13250. *
  13251. * _.toArray({ 'a': 1, 'b': 2 });
  13252. * // => [1, 2]
  13253. *
  13254. * _.toArray('abc');
  13255. * // => ['a', 'b', 'c']
  13256. *
  13257. * _.toArray(1);
  13258. * // => []
  13259. *
  13260. * _.toArray(null);
  13261. * // => []
  13262. */
  13263. function toArray(value) {
  13264. if (!value) {
  13265. return [];
  13266. }
  13267. if (isArrayLike(value)) {
  13268. return isString(value) ? stringToArray(value) : copyArray(value);
  13269. }
  13270. if (symIterator && value[symIterator]) {
  13271. return iteratorToArray(value[symIterator]());
  13272. }
  13273. var tag = getTag(value),
  13274. func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
  13275. return func(value);
  13276. }
  13277. /**
  13278. * Converts `value` to a finite number.
  13279. *
  13280. * @static
  13281. * @memberOf _
  13282. * @since 4.12.0
  13283. * @category Lang
  13284. * @param {*} value The value to convert.
  13285. * @returns {number} Returns the converted number.
  13286. * @example
  13287. *
  13288. * _.toFinite(3.2);
  13289. * // => 3.2
  13290. *
  13291. * _.toFinite(Number.MIN_VALUE);
  13292. * // => 5e-324
  13293. *
  13294. * _.toFinite(Infinity);
  13295. * // => 1.7976931348623157e+308
  13296. *
  13297. * _.toFinite('3.2');
  13298. * // => 3.2
  13299. */
  13300. function toFinite(value) {
  13301. if (!value) {
  13302. return value === 0 ? value : 0;
  13303. }
  13304. value = toNumber(value);
  13305. if (value === INFINITY || value === -INFINITY) {
  13306. var sign = (value < 0 ? -1 : 1);
  13307. return sign * MAX_INTEGER;
  13308. }
  13309. return value === value ? value : 0;
  13310. }
  13311. /**
  13312. * Converts `value` to an integer.
  13313. *
  13314. * **Note:** This method is loosely based on
  13315. * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
  13316. *
  13317. * @static
  13318. * @memberOf _
  13319. * @since 4.0.0
  13320. * @category Lang
  13321. * @param {*} value The value to convert.
  13322. * @returns {number} Returns the converted integer.
  13323. * @example
  13324. *
  13325. * _.toInteger(3.2);
  13326. * // => 3
  13327. *
  13328. * _.toInteger(Number.MIN_VALUE);
  13329. * // => 0
  13330. *
  13331. * _.toInteger(Infinity);
  13332. * // => 1.7976931348623157e+308
  13333. *
  13334. * _.toInteger('3.2');
  13335. * // => 3
  13336. */
  13337. function toInteger(value) {
  13338. var result = toFinite(value),
  13339. remainder = result % 1;
  13340. return result === result ? (remainder ? result - remainder : result) : 0;
  13341. }
  13342. /**
  13343. * Converts `value` to an integer suitable for use as the length of an
  13344. * array-like object.
  13345. *
  13346. * **Note:** This method is based on
  13347. * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
  13348. *
  13349. * @static
  13350. * @memberOf _
  13351. * @since 4.0.0
  13352. * @category Lang
  13353. * @param {*} value The value to convert.
  13354. * @returns {number} Returns the converted integer.
  13355. * @example
  13356. *
  13357. * _.toLength(3.2);
  13358. * // => 3
  13359. *
  13360. * _.toLength(Number.MIN_VALUE);
  13361. * // => 0
  13362. *
  13363. * _.toLength(Infinity);
  13364. * // => 4294967295
  13365. *
  13366. * _.toLength('3.2');
  13367. * // => 3
  13368. */
  13369. function toLength(value) {
  13370. return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
  13371. }
  13372. /**
  13373. * Converts `value` to a number.
  13374. *
  13375. * @static
  13376. * @memberOf _
  13377. * @since 4.0.0
  13378. * @category Lang
  13379. * @param {*} value The value to process.
  13380. * @returns {number} Returns the number.
  13381. * @example
  13382. *
  13383. * _.toNumber(3.2);
  13384. * // => 3.2
  13385. *
  13386. * _.toNumber(Number.MIN_VALUE);
  13387. * // => 5e-324
  13388. *
  13389. * _.toNumber(Infinity);
  13390. * // => Infinity
  13391. *
  13392. * _.toNumber('3.2');
  13393. * // => 3.2
  13394. */
  13395. function toNumber(value) {
  13396. if (typeof value == 'number') {
  13397. return value;
  13398. }
  13399. if (isSymbol(value)) {
  13400. return NAN;
  13401. }
  13402. if (isObject(value)) {
  13403. var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
  13404. value = isObject(other) ? (other + '') : other;
  13405. }
  13406. if (typeof value != 'string') {
  13407. return value === 0 ? value : +value;
  13408. }
  13409. value = baseTrim(value);
  13410. var isBinary = reIsBinary.test(value);
  13411. return (isBinary || reIsOctal.test(value))
  13412. ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
  13413. : (reIsBadHex.test(value) ? NAN : +value);
  13414. }
  13415. /**
  13416. * Converts `value` to a plain object flattening inherited enumerable string
  13417. * keyed properties of `value` to own properties of the plain object.
  13418. *
  13419. * @static
  13420. * @memberOf _
  13421. * @since 3.0.0
  13422. * @category Lang
  13423. * @param {*} value The value to convert.
  13424. * @returns {Object} Returns the converted plain object.
  13425. * @example
  13426. *
  13427. * function Foo() {
  13428. * this.b = 2;
  13429. * }
  13430. *
  13431. * Foo.prototype.c = 3;
  13432. *
  13433. * _.assign({ 'a': 1 }, new Foo);
  13434. * // => { 'a': 1, 'b': 2 }
  13435. *
  13436. * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
  13437. * // => { 'a': 1, 'b': 2, 'c': 3 }
  13438. */
  13439. function toPlainObject(value) {
  13440. return copyObject(value, keysIn(value));
  13441. }
  13442. /**
  13443. * Converts `value` to a safe integer. A safe integer can be compared and
  13444. * represented correctly.
  13445. *
  13446. * @static
  13447. * @memberOf _
  13448. * @since 4.0.0
  13449. * @category Lang
  13450. * @param {*} value The value to convert.
  13451. * @returns {number} Returns the converted integer.
  13452. * @example
  13453. *
  13454. * _.toSafeInteger(3.2);
  13455. * // => 3
  13456. *
  13457. * _.toSafeInteger(Number.MIN_VALUE);
  13458. * // => 0
  13459. *
  13460. * _.toSafeInteger(Infinity);
  13461. * // => 9007199254740991
  13462. *
  13463. * _.toSafeInteger('3.2');
  13464. * // => 3
  13465. */
  13466. function toSafeInteger(value) {
  13467. return value
  13468. ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
  13469. : (value === 0 ? value : 0);
  13470. }
  13471. /**
  13472. * Converts `value` to a string. An empty string is returned for `null`
  13473. * and `undefined` values. The sign of `-0` is preserved.
  13474. *
  13475. * @static
  13476. * @memberOf _
  13477. * @since 4.0.0
  13478. * @category Lang
  13479. * @param {*} value The value to convert.
  13480. * @returns {string} Returns the converted string.
  13481. * @example
  13482. *
  13483. * _.toString(null);
  13484. * // => ''
  13485. *
  13486. * _.toString(-0);
  13487. * // => '-0'
  13488. *
  13489. * _.toString([1, 2, 3]);
  13490. * // => '1,2,3'
  13491. */
  13492. function toString(value) {
  13493. return value == null ? '' : baseToString(value);
  13494. }
  13495. /*------------------------------------------------------------------------*/
  13496. /**
  13497. * Assigns own enumerable string keyed properties of source objects to the
  13498. * destination object. Source objects are applied from left to right.
  13499. * Subsequent sources overwrite property assignments of previous sources.
  13500. *
  13501. * **Note:** This method mutates `object` and is loosely based on
  13502. * [`Object.assign`](https://mdn.io/Object/assign).
  13503. *
  13504. * @static
  13505. * @memberOf _
  13506. * @since 0.10.0
  13507. * @category Object
  13508. * @param {Object} object The destination object.
  13509. * @param {...Object} [sources] The source objects.
  13510. * @returns {Object} Returns `object`.
  13511. * @see _.assignIn
  13512. * @example
  13513. *
  13514. * function Foo() {
  13515. * this.a = 1;
  13516. * }
  13517. *
  13518. * function Bar() {
  13519. * this.c = 3;
  13520. * }
  13521. *
  13522. * Foo.prototype.b = 2;
  13523. * Bar.prototype.d = 4;
  13524. *
  13525. * _.assign({ 'a': 0 }, new Foo, new Bar);
  13526. * // => { 'a': 1, 'c': 3 }
  13527. */
  13528. var assign = createAssigner(function(object, source) {
  13529. if (isPrototype(source) || isArrayLike(source)) {
  13530. copyObject(source, keys(source), object);
  13531. return;
  13532. }
  13533. for (var key in source) {
  13534. if (hasOwnProperty.call(source, key)) {
  13535. assignValue(object, key, source[key]);
  13536. }
  13537. }
  13538. });
  13539. /**
  13540. * This method is like `_.assign` except that it iterates over own and
  13541. * inherited source properties.
  13542. *
  13543. * **Note:** This method mutates `object`.
  13544. *
  13545. * @static
  13546. * @memberOf _
  13547. * @since 4.0.0
  13548. * @alias extend
  13549. * @category Object
  13550. * @param {Object} object The destination object.
  13551. * @param {...Object} [sources] The source objects.
  13552. * @returns {Object} Returns `object`.
  13553. * @see _.assign
  13554. * @example
  13555. *
  13556. * function Foo() {
  13557. * this.a = 1;
  13558. * }
  13559. *
  13560. * function Bar() {
  13561. * this.c = 3;
  13562. * }
  13563. *
  13564. * Foo.prototype.b = 2;
  13565. * Bar.prototype.d = 4;
  13566. *
  13567. * _.assignIn({ 'a': 0 }, new Foo, new Bar);
  13568. * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
  13569. */
  13570. var assignIn = createAssigner(function(object, source) {
  13571. copyObject(source, keysIn(source), object);
  13572. });
  13573. /**
  13574. * This method is like `_.assignIn` except that it accepts `customizer`
  13575. * which is invoked to produce the assigned values. If `customizer` returns
  13576. * `undefined`, assignment is handled by the method instead. The `customizer`
  13577. * is invoked with five arguments: (objValue, srcValue, key, object, source).
  13578. *
  13579. * **Note:** This method mutates `object`.
  13580. *
  13581. * @static
  13582. * @memberOf _
  13583. * @since 4.0.0
  13584. * @alias extendWith
  13585. * @category Object
  13586. * @param {Object} object The destination object.
  13587. * @param {...Object} sources The source objects.
  13588. * @param {Function} [customizer] The function to customize assigned values.
  13589. * @returns {Object} Returns `object`.
  13590. * @see _.assignWith
  13591. * @example
  13592. *
  13593. * function customizer(objValue, srcValue) {
  13594. * return _.isUndefined(objValue) ? srcValue : objValue;
  13595. * }
  13596. *
  13597. * var defaults = _.partialRight(_.assignInWith, customizer);
  13598. *
  13599. * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
  13600. * // => { 'a': 1, 'b': 2 }
  13601. */
  13602. var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
  13603. copyObject(source, keysIn(source), object, customizer);
  13604. });
  13605. /**
  13606. * This method is like `_.assign` except that it accepts `customizer`
  13607. * which is invoked to produce the assigned values. If `customizer` returns
  13608. * `undefined`, assignment is handled by the method instead. The `customizer`
  13609. * is invoked with five arguments: (objValue, srcValue, key, object, source).
  13610. *
  13611. * **Note:** This method mutates `object`.
  13612. *
  13613. * @static
  13614. * @memberOf _
  13615. * @since 4.0.0
  13616. * @category Object
  13617. * @param {Object} object The destination object.
  13618. * @param {...Object} sources The source objects.
  13619. * @param {Function} [customizer] The function to customize assigned values.
  13620. * @returns {Object} Returns `object`.
  13621. * @see _.assignInWith
  13622. * @example
  13623. *
  13624. * function customizer(objValue, srcValue) {
  13625. * return _.isUndefined(objValue) ? srcValue : objValue;
  13626. * }
  13627. *
  13628. * var defaults = _.partialRight(_.assignWith, customizer);
  13629. *
  13630. * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
  13631. * // => { 'a': 1, 'b': 2 }
  13632. */
  13633. var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
  13634. copyObject(source, keys(source), object, customizer);
  13635. });
  13636. /**
  13637. * Creates an array of values corresponding to `paths` of `object`.
  13638. *
  13639. * @static
  13640. * @memberOf _
  13641. * @since 1.0.0
  13642. * @category Object
  13643. * @param {Object} object The object to iterate over.
  13644. * @param {...(string|string[])} [paths] The property paths to pick.
  13645. * @returns {Array} Returns the picked values.
  13646. * @example
  13647. *
  13648. * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
  13649. *
  13650. * _.at(object, ['a[0].b.c', 'a[1]']);
  13651. * // => [3, 4]
  13652. */
  13653. var at = flatRest(baseAt);
  13654. /**
  13655. * Creates an object that inherits from the `prototype` object. If a
  13656. * `properties` object is given, its own enumerable string keyed properties
  13657. * are assigned to the created object.
  13658. *
  13659. * @static
  13660. * @memberOf _
  13661. * @since 2.3.0
  13662. * @category Object
  13663. * @param {Object} prototype The object to inherit from.
  13664. * @param {Object} [properties] The properties to assign to the object.
  13665. * @returns {Object} Returns the new object.
  13666. * @example
  13667. *
  13668. * function Shape() {
  13669. * this.x = 0;
  13670. * this.y = 0;
  13671. * }
  13672. *
  13673. * function Circle() {
  13674. * Shape.call(this);
  13675. * }
  13676. *
  13677. * Circle.prototype = _.create(Shape.prototype, {
  13678. * 'constructor': Circle
  13679. * });
  13680. *
  13681. * var circle = new Circle;
  13682. * circle instanceof Circle;
  13683. * // => true
  13684. *
  13685. * circle instanceof Shape;
  13686. * // => true
  13687. */
  13688. function create(prototype, properties) {
  13689. var result = baseCreate(prototype);
  13690. return properties == null ? result : baseAssign(result, properties);
  13691. }
  13692. /**
  13693. * Assigns own and inherited enumerable string keyed properties of source
  13694. * objects to the destination object for all destination properties that
  13695. * resolve to `undefined`. Source objects are applied from left to right.
  13696. * Once a property is set, additional values of the same property are ignored.
  13697. *
  13698. * **Note:** This method mutates `object`.
  13699. *
  13700. * @static
  13701. * @since 0.1.0
  13702. * @memberOf _
  13703. * @category Object
  13704. * @param {Object} object The destination object.
  13705. * @param {...Object} [sources] The source objects.
  13706. * @returns {Object} Returns `object`.
  13707. * @see _.defaultsDeep
  13708. * @example
  13709. *
  13710. * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
  13711. * // => { 'a': 1, 'b': 2 }
  13712. */
  13713. var defaults = baseRest(function(object, sources) {
  13714. object = Object(object);
  13715. var index = -1;
  13716. var length = sources.length;
  13717. var guard = length > 2 ? sources[2] : undefined;
  13718. if (guard && isIterateeCall(sources[0], sources[1], guard)) {
  13719. length = 1;
  13720. }
  13721. while (++index < length) {
  13722. var source = sources[index];
  13723. var props = keysIn(source);
  13724. var propsIndex = -1;
  13725. var propsLength = props.length;
  13726. while (++propsIndex < propsLength) {
  13727. var key = props[propsIndex];
  13728. var value = object[key];
  13729. if (value === undefined ||
  13730. (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
  13731. object[key] = source[key];
  13732. }
  13733. }
  13734. }
  13735. return object;
  13736. });
  13737. /**
  13738. * This method is like `_.defaults` except that it recursively assigns
  13739. * default properties.
  13740. *
  13741. * **Note:** This method mutates `object`.
  13742. *
  13743. * @static
  13744. * @memberOf _
  13745. * @since 3.10.0
  13746. * @category Object
  13747. * @param {Object} object The destination object.
  13748. * @param {...Object} [sources] The source objects.
  13749. * @returns {Object} Returns `object`.
  13750. * @see _.defaults
  13751. * @example
  13752. *
  13753. * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });
  13754. * // => { 'a': { 'b': 2, 'c': 3 } }
  13755. */
  13756. var defaultsDeep = baseRest(function(args) {
  13757. args.push(undefined, customDefaultsMerge);
  13758. return apply(mergeWith, undefined, args);
  13759. });
  13760. /**
  13761. * This method is like `_.find` except that it returns the key of the first
  13762. * element `predicate` returns truthy for instead of the element itself.
  13763. *
  13764. * @static
  13765. * @memberOf _
  13766. * @since 1.1.0
  13767. * @category Object
  13768. * @param {Object} object The object to inspect.
  13769. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  13770. * @returns {string|undefined} Returns the key of the matched element,
  13771. * else `undefined`.
  13772. * @example
  13773. *
  13774. * var users = {
  13775. * 'barney': { 'age': 36, 'active': true },
  13776. * 'fred': { 'age': 40, 'active': false },
  13777. * 'pebbles': { 'age': 1, 'active': true }
  13778. * };
  13779. *
  13780. * _.findKey(users, function(o) { return o.age < 40; });
  13781. * // => 'barney' (iteration order is not guaranteed)
  13782. *
  13783. * // The `_.matches` iteratee shorthand.
  13784. * _.findKey(users, { 'age': 1, 'active': true });
  13785. * // => 'pebbles'
  13786. *
  13787. * // The `_.matchesProperty` iteratee shorthand.
  13788. * _.findKey(users, ['active', false]);
  13789. * // => 'fred'
  13790. *
  13791. * // The `_.property` iteratee shorthand.
  13792. * _.findKey(users, 'active');
  13793. * // => 'barney'
  13794. */
  13795. function findKey(object, predicate) {
  13796. return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
  13797. }
  13798. /**
  13799. * This method is like `_.findKey` except that it iterates over elements of
  13800. * a collection in the opposite order.
  13801. *
  13802. * @static
  13803. * @memberOf _
  13804. * @since 2.0.0
  13805. * @category Object
  13806. * @param {Object} object The object to inspect.
  13807. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  13808. * @returns {string|undefined} Returns the key of the matched element,
  13809. * else `undefined`.
  13810. * @example
  13811. *
  13812. * var users = {
  13813. * 'barney': { 'age': 36, 'active': true },
  13814. * 'fred': { 'age': 40, 'active': false },
  13815. * 'pebbles': { 'age': 1, 'active': true }
  13816. * };
  13817. *
  13818. * _.findLastKey(users, function(o) { return o.age < 40; });
  13819. * // => returns 'pebbles' assuming `_.findKey` returns 'barney'
  13820. *
  13821. * // The `_.matches` iteratee shorthand.
  13822. * _.findLastKey(users, { 'age': 36, 'active': true });
  13823. * // => 'barney'
  13824. *
  13825. * // The `_.matchesProperty` iteratee shorthand.
  13826. * _.findLastKey(users, ['active', false]);
  13827. * // => 'fred'
  13828. *
  13829. * // The `_.property` iteratee shorthand.
  13830. * _.findLastKey(users, 'active');
  13831. * // => 'pebbles'
  13832. */
  13833. function findLastKey(object, predicate) {
  13834. return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
  13835. }
  13836. /**
  13837. * Iterates over own and inherited enumerable string keyed properties of an
  13838. * object and invokes `iteratee` for each property. The iteratee is invoked
  13839. * with three arguments: (value, key, object). Iteratee functions may exit
  13840. * iteration early by explicitly returning `false`.
  13841. *
  13842. * @static
  13843. * @memberOf _
  13844. * @since 0.3.0
  13845. * @category Object
  13846. * @param {Object} object The object to iterate over.
  13847. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  13848. * @returns {Object} Returns `object`.
  13849. * @see _.forInRight
  13850. * @example
  13851. *
  13852. * function Foo() {
  13853. * this.a = 1;
  13854. * this.b = 2;
  13855. * }
  13856. *
  13857. * Foo.prototype.c = 3;
  13858. *
  13859. * _.forIn(new Foo, function(value, key) {
  13860. * console.log(key);
  13861. * });
  13862. * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
  13863. */
  13864. function forIn(object, iteratee) {
  13865. return object == null
  13866. ? object
  13867. : baseFor(object, getIteratee(iteratee, 3), keysIn);
  13868. }
  13869. /**
  13870. * This method is like `_.forIn` except that it iterates over properties of
  13871. * `object` in the opposite order.
  13872. *
  13873. * @static
  13874. * @memberOf _
  13875. * @since 2.0.0
  13876. * @category Object
  13877. * @param {Object} object The object to iterate over.
  13878. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  13879. * @returns {Object} Returns `object`.
  13880. * @see _.forIn
  13881. * @example
  13882. *
  13883. * function Foo() {
  13884. * this.a = 1;
  13885. * this.b = 2;
  13886. * }
  13887. *
  13888. * Foo.prototype.c = 3;
  13889. *
  13890. * _.forInRight(new Foo, function(value, key) {
  13891. * console.log(key);
  13892. * });
  13893. * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
  13894. */
  13895. function forInRight(object, iteratee) {
  13896. return object == null
  13897. ? object
  13898. : baseForRight(object, getIteratee(iteratee, 3), keysIn);
  13899. }
  13900. /**
  13901. * Iterates over own enumerable string keyed properties of an object and
  13902. * invokes `iteratee` for each property. The iteratee is invoked with three
  13903. * arguments: (value, key, object). Iteratee functions may exit iteration
  13904. * early by explicitly returning `false`.
  13905. *
  13906. * @static
  13907. * @memberOf _
  13908. * @since 0.3.0
  13909. * @category Object
  13910. * @param {Object} object The object to iterate over.
  13911. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  13912. * @returns {Object} Returns `object`.
  13913. * @see _.forOwnRight
  13914. * @example
  13915. *
  13916. * function Foo() {
  13917. * this.a = 1;
  13918. * this.b = 2;
  13919. * }
  13920. *
  13921. * Foo.prototype.c = 3;
  13922. *
  13923. * _.forOwn(new Foo, function(value, key) {
  13924. * console.log(key);
  13925. * });
  13926. * // => Logs 'a' then 'b' (iteration order is not guaranteed).
  13927. */
  13928. function forOwn(object, iteratee) {
  13929. return object && baseForOwn(object, getIteratee(iteratee, 3));
  13930. }
  13931. /**
  13932. * This method is like `_.forOwn` except that it iterates over properties of
  13933. * `object` in the opposite order.
  13934. *
  13935. * @static
  13936. * @memberOf _
  13937. * @since 2.0.0
  13938. * @category Object
  13939. * @param {Object} object The object to iterate over.
  13940. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  13941. * @returns {Object} Returns `object`.
  13942. * @see _.forOwn
  13943. * @example
  13944. *
  13945. * function Foo() {
  13946. * this.a = 1;
  13947. * this.b = 2;
  13948. * }
  13949. *
  13950. * Foo.prototype.c = 3;
  13951. *
  13952. * _.forOwnRight(new Foo, function(value, key) {
  13953. * console.log(key);
  13954. * });
  13955. * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
  13956. */
  13957. function forOwnRight(object, iteratee) {
  13958. return object && baseForOwnRight(object, getIteratee(iteratee, 3));
  13959. }
  13960. /**
  13961. * Creates an array of function property names from own enumerable properties
  13962. * of `object`.
  13963. *
  13964. * @static
  13965. * @since 0.1.0
  13966. * @memberOf _
  13967. * @category Object
  13968. * @param {Object} object The object to inspect.
  13969. * @returns {Array} Returns the function names.
  13970. * @see _.functionsIn
  13971. * @example
  13972. *
  13973. * function Foo() {
  13974. * this.a = _.constant('a');
  13975. * this.b = _.constant('b');
  13976. * }
  13977. *
  13978. * Foo.prototype.c = _.constant('c');
  13979. *
  13980. * _.functions(new Foo);
  13981. * // => ['a', 'b']
  13982. */
  13983. function functions(object) {
  13984. return object == null ? [] : baseFunctions(object, keys(object));
  13985. }
  13986. /**
  13987. * Creates an array of function property names from own and inherited
  13988. * enumerable properties of `object`.
  13989. *
  13990. * @static
  13991. * @memberOf _
  13992. * @since 4.0.0
  13993. * @category Object
  13994. * @param {Object} object The object to inspect.
  13995. * @returns {Array} Returns the function names.
  13996. * @see _.functions
  13997. * @example
  13998. *
  13999. * function Foo() {
  14000. * this.a = _.constant('a');
  14001. * this.b = _.constant('b');
  14002. * }
  14003. *
  14004. * Foo.prototype.c = _.constant('c');
  14005. *
  14006. * _.functionsIn(new Foo);
  14007. * // => ['a', 'b', 'c']
  14008. */
  14009. function functionsIn(object) {
  14010. return object == null ? [] : baseFunctions(object, keysIn(object));
  14011. }
  14012. /**
  14013. * Gets the value at `path` of `object`. If the resolved value is
  14014. * `undefined`, the `defaultValue` is returned in its place.
  14015. *
  14016. * @static
  14017. * @memberOf _
  14018. * @since 3.7.0
  14019. * @category Object
  14020. * @param {Object} object The object to query.
  14021. * @param {Array|string} path The path of the property to get.
  14022. * @param {*} [defaultValue] The value returned for `undefined` resolved values.
  14023. * @returns {*} Returns the resolved value.
  14024. * @example
  14025. *
  14026. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  14027. *
  14028. * _.get(object, 'a[0].b.c');
  14029. * // => 3
  14030. *
  14031. * _.get(object, ['a', '0', 'b', 'c']);
  14032. * // => 3
  14033. *
  14034. * _.get(object, 'a.b.c', 'default');
  14035. * // => 'default'
  14036. */
  14037. function get(object, path, defaultValue) {
  14038. var result = object == null ? undefined : baseGet(object, path);
  14039. return result === undefined ? defaultValue : result;
  14040. }
  14041. /**
  14042. * Checks if `path` is a direct property of `object`.
  14043. *
  14044. * @static
  14045. * @since 0.1.0
  14046. * @memberOf _
  14047. * @category Object
  14048. * @param {Object} object The object to query.
  14049. * @param {Array|string} path The path to check.
  14050. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  14051. * @example
  14052. *
  14053. * var object = { 'a': { 'b': 2 } };
  14054. * var other = _.create({ 'a': _.create({ 'b': 2 }) });
  14055. *
  14056. * _.has(object, 'a');
  14057. * // => true
  14058. *
  14059. * _.has(object, 'a.b');
  14060. * // => true
  14061. *
  14062. * _.has(object, ['a', 'b']);
  14063. * // => true
  14064. *
  14065. * _.has(other, 'a');
  14066. * // => false
  14067. */
  14068. function has(object, path) {
  14069. return object != null && hasPath(object, path, baseHas);
  14070. }
  14071. /**
  14072. * Checks if `path` is a direct or inherited property of `object`.
  14073. *
  14074. * @static
  14075. * @memberOf _
  14076. * @since 4.0.0
  14077. * @category Object
  14078. * @param {Object} object The object to query.
  14079. * @param {Array|string} path The path to check.
  14080. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  14081. * @example
  14082. *
  14083. * var object = _.create({ 'a': _.create({ 'b': 2 }) });
  14084. *
  14085. * _.hasIn(object, 'a');
  14086. * // => true
  14087. *
  14088. * _.hasIn(object, 'a.b');
  14089. * // => true
  14090. *
  14091. * _.hasIn(object, ['a', 'b']);
  14092. * // => true
  14093. *
  14094. * _.hasIn(object, 'b');
  14095. * // => false
  14096. */
  14097. function hasIn(object, path) {
  14098. return object != null && hasPath(object, path, baseHasIn);
  14099. }
  14100. /**
  14101. * Creates an object composed of the inverted keys and values of `object`.
  14102. * If `object` contains duplicate values, subsequent values overwrite
  14103. * property assignments of previous values.
  14104. *
  14105. * @static
  14106. * @memberOf _
  14107. * @since 0.7.0
  14108. * @category Object
  14109. * @param {Object} object The object to invert.
  14110. * @returns {Object} Returns the new inverted object.
  14111. * @example
  14112. *
  14113. * var object = { 'a': 1, 'b': 2, 'c': 1 };
  14114. *
  14115. * _.invert(object);
  14116. * // => { '1': 'c', '2': 'b' }
  14117. */
  14118. var invert = createInverter(function(result, value, key) {
  14119. if (value != null &&
  14120. typeof value.toString != 'function') {
  14121. value = nativeObjectToString.call(value);
  14122. }
  14123. result[value] = key;
  14124. }, constant(identity));
  14125. /**
  14126. * This method is like `_.invert` except that the inverted object is generated
  14127. * from the results of running each element of `object` thru `iteratee`. The
  14128. * corresponding inverted value of each inverted key is an array of keys
  14129. * responsible for generating the inverted value. The iteratee is invoked
  14130. * with one argument: (value).
  14131. *
  14132. * @static
  14133. * @memberOf _
  14134. * @since 4.1.0
  14135. * @category Object
  14136. * @param {Object} object The object to invert.
  14137. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  14138. * @returns {Object} Returns the new inverted object.
  14139. * @example
  14140. *
  14141. * var object = { 'a': 1, 'b': 2, 'c': 1 };
  14142. *
  14143. * _.invertBy(object);
  14144. * // => { '1': ['a', 'c'], '2': ['b'] }
  14145. *
  14146. * _.invertBy(object, function(value) {
  14147. * return 'group' + value;
  14148. * });
  14149. * // => { 'group1': ['a', 'c'], 'group2': ['b'] }
  14150. */
  14151. var invertBy = createInverter(function(result, value, key) {
  14152. if (value != null &&
  14153. typeof value.toString != 'function') {
  14154. value = nativeObjectToString.call(value);
  14155. }
  14156. if (hasOwnProperty.call(result, value)) {
  14157. result[value].push(key);
  14158. } else {
  14159. result[value] = [key];
  14160. }
  14161. }, getIteratee);
  14162. /**
  14163. * Invokes the method at `path` of `object`.
  14164. *
  14165. * @static
  14166. * @memberOf _
  14167. * @since 4.0.0
  14168. * @category Object
  14169. * @param {Object} object The object to query.
  14170. * @param {Array|string} path The path of the method to invoke.
  14171. * @param {...*} [args] The arguments to invoke the method with.
  14172. * @returns {*} Returns the result of the invoked method.
  14173. * @example
  14174. *
  14175. * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
  14176. *
  14177. * _.invoke(object, 'a[0].b.c.slice', 1, 3);
  14178. * // => [2, 3]
  14179. */
  14180. var invoke = baseRest(baseInvoke);
  14181. /**
  14182. * Creates an array of the own enumerable property names of `object`.
  14183. *
  14184. * **Note:** Non-object values are coerced to objects. See the
  14185. * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  14186. * for more details.
  14187. *
  14188. * @static
  14189. * @since 0.1.0
  14190. * @memberOf _
  14191. * @category Object
  14192. * @param {Object} object The object to query.
  14193. * @returns {Array} Returns the array of property names.
  14194. * @example
  14195. *
  14196. * function Foo() {
  14197. * this.a = 1;
  14198. * this.b = 2;
  14199. * }
  14200. *
  14201. * Foo.prototype.c = 3;
  14202. *
  14203. * _.keys(new Foo);
  14204. * // => ['a', 'b'] (iteration order is not guaranteed)
  14205. *
  14206. * _.keys('hi');
  14207. * // => ['0', '1']
  14208. */
  14209. function keys(object) {
  14210. return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
  14211. }
  14212. /**
  14213. * Creates an array of the own and inherited enumerable property names of `object`.
  14214. *
  14215. * **Note:** Non-object values are coerced to objects.
  14216. *
  14217. * @static
  14218. * @memberOf _
  14219. * @since 3.0.0
  14220. * @category Object
  14221. * @param {Object} object The object to query.
  14222. * @returns {Array} Returns the array of property names.
  14223. * @example
  14224. *
  14225. * function Foo() {
  14226. * this.a = 1;
  14227. * this.b = 2;
  14228. * }
  14229. *
  14230. * Foo.prototype.c = 3;
  14231. *
  14232. * _.keysIn(new Foo);
  14233. * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
  14234. */
  14235. function keysIn(object) {
  14236. return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
  14237. }
  14238. /**
  14239. * The opposite of `_.mapValues`; this method creates an object with the
  14240. * same values as `object` and keys generated by running each own enumerable
  14241. * string keyed property of `object` thru `iteratee`. The iteratee is invoked
  14242. * with three arguments: (value, key, object).
  14243. *
  14244. * @static
  14245. * @memberOf _
  14246. * @since 3.8.0
  14247. * @category Object
  14248. * @param {Object} object The object to iterate over.
  14249. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  14250. * @returns {Object} Returns the new mapped object.
  14251. * @see _.mapValues
  14252. * @example
  14253. *
  14254. * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
  14255. * return key + value;
  14256. * });
  14257. * // => { 'a1': 1, 'b2': 2 }
  14258. */
  14259. function mapKeys(object, iteratee) {
  14260. var result = {};
  14261. iteratee = getIteratee(iteratee, 3);
  14262. baseForOwn(object, function(value, key, object) {
  14263. baseAssignValue(result, iteratee(value, key, object), value);
  14264. });
  14265. return result;
  14266. }
  14267. /**
  14268. * Creates an object with the same keys as `object` and values generated
  14269. * by running each own enumerable string keyed property of `object` thru
  14270. * `iteratee`. The iteratee is invoked with three arguments:
  14271. * (value, key, object).
  14272. *
  14273. * @static
  14274. * @memberOf _
  14275. * @since 2.4.0
  14276. * @category Object
  14277. * @param {Object} object The object to iterate over.
  14278. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  14279. * @returns {Object} Returns the new mapped object.
  14280. * @see _.mapKeys
  14281. * @example
  14282. *
  14283. * var users = {
  14284. * 'fred': { 'user': 'fred', 'age': 40 },
  14285. * 'pebbles': { 'user': 'pebbles', 'age': 1 }
  14286. * };
  14287. *
  14288. * _.mapValues(users, function(o) { return o.age; });
  14289. * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
  14290. *
  14291. * // The `_.property` iteratee shorthand.
  14292. * _.mapValues(users, 'age');
  14293. * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
  14294. */
  14295. function mapValues(object, iteratee) {
  14296. var result = {};
  14297. iteratee = getIteratee(iteratee, 3);
  14298. baseForOwn(object, function(value, key, object) {
  14299. baseAssignValue(result, key, iteratee(value, key, object));
  14300. });
  14301. return result;
  14302. }
  14303. /**
  14304. * This method is like `_.assign` except that it recursively merges own and
  14305. * inherited enumerable string keyed properties of source objects into the
  14306. * destination object. Source properties that resolve to `undefined` are
  14307. * skipped if a destination value exists. Array and plain object properties
  14308. * are merged recursively. Other objects and value types are overridden by
  14309. * assignment. Source objects are applied from left to right. Subsequent
  14310. * sources overwrite property assignments of previous sources.
  14311. *
  14312. * **Note:** This method mutates `object`.
  14313. *
  14314. * @static
  14315. * @memberOf _
  14316. * @since 0.5.0
  14317. * @category Object
  14318. * @param {Object} object The destination object.
  14319. * @param {...Object} [sources] The source objects.
  14320. * @returns {Object} Returns `object`.
  14321. * @example
  14322. *
  14323. * var object = {
  14324. * 'a': [{ 'b': 2 }, { 'd': 4 }]
  14325. * };
  14326. *
  14327. * var other = {
  14328. * 'a': [{ 'c': 3 }, { 'e': 5 }]
  14329. * };
  14330. *
  14331. * _.merge(object, other);
  14332. * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
  14333. */
  14334. var merge = createAssigner(function(object, source, srcIndex) {
  14335. baseMerge(object, source, srcIndex);
  14336. });
  14337. /**
  14338. * This method is like `_.merge` except that it accepts `customizer` which
  14339. * is invoked to produce the merged values of the destination and source
  14340. * properties. If `customizer` returns `undefined`, merging is handled by the
  14341. * method instead. The `customizer` is invoked with six arguments:
  14342. * (objValue, srcValue, key, object, source, stack).
  14343. *
  14344. * **Note:** This method mutates `object`.
  14345. *
  14346. * @static
  14347. * @memberOf _
  14348. * @since 4.0.0
  14349. * @category Object
  14350. * @param {Object} object The destination object.
  14351. * @param {...Object} sources The source objects.
  14352. * @param {Function} customizer The function to customize assigned values.
  14353. * @returns {Object} Returns `object`.
  14354. * @example
  14355. *
  14356. * function customizer(objValue, srcValue) {
  14357. * if (_.isArray(objValue)) {
  14358. * return objValue.concat(srcValue);
  14359. * }
  14360. * }
  14361. *
  14362. * var object = { 'a': [1], 'b': [2] };
  14363. * var other = { 'a': [3], 'b': [4] };
  14364. *
  14365. * _.mergeWith(object, other, customizer);
  14366. * // => { 'a': [1, 3], 'b': [2, 4] }
  14367. */
  14368. var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
  14369. baseMerge(object, source, srcIndex, customizer);
  14370. });
  14371. /**
  14372. * The opposite of `_.pick`; this method creates an object composed of the
  14373. * own and inherited enumerable property paths of `object` that are not omitted.
  14374. *
  14375. * **Note:** This method is considerably slower than `_.pick`.
  14376. *
  14377. * @static
  14378. * @since 0.1.0
  14379. * @memberOf _
  14380. * @category Object
  14381. * @param {Object} object The source object.
  14382. * @param {...(string|string[])} [paths] The property paths to omit.
  14383. * @returns {Object} Returns the new object.
  14384. * @example
  14385. *
  14386. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  14387. *
  14388. * _.omit(object, ['a', 'c']);
  14389. * // => { 'b': '2' }
  14390. */
  14391. var omit = flatRest(function(object, paths) {
  14392. var result = {};
  14393. if (object == null) {
  14394. return result;
  14395. }
  14396. var isDeep = false;
  14397. paths = arrayMap(paths, function(path) {
  14398. path = castPath(path, object);
  14399. isDeep || (isDeep = path.length > 1);
  14400. return path;
  14401. });
  14402. copyObject(object, getAllKeysIn(object), result);
  14403. if (isDeep) {
  14404. result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
  14405. }
  14406. var length = paths.length;
  14407. while (length--) {
  14408. baseUnset(result, paths[length]);
  14409. }
  14410. return result;
  14411. });
  14412. /**
  14413. * The opposite of `_.pickBy`; this method creates an object composed of
  14414. * the own and inherited enumerable string keyed properties of `object` that
  14415. * `predicate` doesn't return truthy for. The predicate is invoked with two
  14416. * arguments: (value, key).
  14417. *
  14418. * @static
  14419. * @memberOf _
  14420. * @since 4.0.0
  14421. * @category Object
  14422. * @param {Object} object The source object.
  14423. * @param {Function} [predicate=_.identity] The function invoked per property.
  14424. * @returns {Object} Returns the new object.
  14425. * @example
  14426. *
  14427. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  14428. *
  14429. * _.omitBy(object, _.isNumber);
  14430. * // => { 'b': '2' }
  14431. */
  14432. function omitBy(object, predicate) {
  14433. return pickBy(object, negate(getIteratee(predicate)));
  14434. }
  14435. /**
  14436. * Creates an object composed of the picked `object` properties.
  14437. *
  14438. * @static
  14439. * @since 0.1.0
  14440. * @memberOf _
  14441. * @category Object
  14442. * @param {Object} object The source object.
  14443. * @param {...(string|string[])} [paths] The property paths to pick.
  14444. * @returns {Object} Returns the new object.
  14445. * @example
  14446. *
  14447. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  14448. *
  14449. * _.pick(object, ['a', 'c']);
  14450. * // => { 'a': 1, 'c': 3 }
  14451. */
  14452. var pick = flatRest(function(object, paths) {
  14453. return object == null ? {} : basePick(object, paths);
  14454. });
  14455. /**
  14456. * Creates an object composed of the `object` properties `predicate` returns
  14457. * truthy for. The predicate is invoked with two arguments: (value, key).
  14458. *
  14459. * @static
  14460. * @memberOf _
  14461. * @since 4.0.0
  14462. * @category Object
  14463. * @param {Object} object The source object.
  14464. * @param {Function} [predicate=_.identity] The function invoked per property.
  14465. * @returns {Object} Returns the new object.
  14466. * @example
  14467. *
  14468. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  14469. *
  14470. * _.pickBy(object, _.isNumber);
  14471. * // => { 'a': 1, 'c': 3 }
  14472. */
  14473. function pickBy(object, predicate) {
  14474. if (object == null) {
  14475. return {};
  14476. }
  14477. var props = arrayMap(getAllKeysIn(object), function(prop) {
  14478. return [prop];
  14479. });
  14480. predicate = getIteratee(predicate);
  14481. return basePickBy(object, props, function(value, path) {
  14482. return predicate(value, path[0]);
  14483. });
  14484. }
  14485. /**
  14486. * This method is like `_.get` except that if the resolved value is a
  14487. * function it's invoked with the `this` binding of its parent object and
  14488. * its result is returned.
  14489. *
  14490. * @static
  14491. * @since 0.1.0
  14492. * @memberOf _
  14493. * @category Object
  14494. * @param {Object} object The object to query.
  14495. * @param {Array|string} path The path of the property to resolve.
  14496. * @param {*} [defaultValue] The value returned for `undefined` resolved values.
  14497. * @returns {*} Returns the resolved value.
  14498. * @example
  14499. *
  14500. * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
  14501. *
  14502. * _.result(object, 'a[0].b.c1');
  14503. * // => 3
  14504. *
  14505. * _.result(object, 'a[0].b.c2');
  14506. * // => 4
  14507. *
  14508. * _.result(object, 'a[0].b.c3', 'default');
  14509. * // => 'default'
  14510. *
  14511. * _.result(object, 'a[0].b.c3', _.constant('default'));
  14512. * // => 'default'
  14513. */
  14514. function result(object, path, defaultValue) {
  14515. path = castPath(path, object);
  14516. var index = -1,
  14517. length = path.length;
  14518. // Ensure the loop is entered when path is empty.
  14519. if (!length) {
  14520. length = 1;
  14521. object = undefined;
  14522. }
  14523. while (++index < length) {
  14524. var value = object == null ? undefined : object[toKey(path[index])];
  14525. if (value === undefined) {
  14526. index = length;
  14527. value = defaultValue;
  14528. }
  14529. object = isFunction(value) ? value.call(object) : value;
  14530. }
  14531. return object;
  14532. }
  14533. /**
  14534. * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
  14535. * it's created. Arrays are created for missing index properties while objects
  14536. * are created for all other missing properties. Use `_.setWith` to customize
  14537. * `path` creation.
  14538. *
  14539. * **Note:** This method mutates `object`.
  14540. *
  14541. * @static
  14542. * @memberOf _
  14543. * @since 3.7.0
  14544. * @category Object
  14545. * @param {Object} object The object to modify.
  14546. * @param {Array|string} path The path of the property to set.
  14547. * @param {*} value The value to set.
  14548. * @returns {Object} Returns `object`.
  14549. * @example
  14550. *
  14551. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  14552. *
  14553. * _.set(object, 'a[0].b.c', 4);
  14554. * console.log(object.a[0].b.c);
  14555. * // => 4
  14556. *
  14557. * _.set(object, ['x', '0', 'y', 'z'], 5);
  14558. * console.log(object.x[0].y.z);
  14559. * // => 5
  14560. */
  14561. function set(object, path, value) {
  14562. return object == null ? object : baseSet(object, path, value);
  14563. }
  14564. /**
  14565. * This method is like `_.set` except that it accepts `customizer` which is
  14566. * invoked to produce the objects of `path`. If `customizer` returns `undefined`
  14567. * path creation is handled by the method instead. The `customizer` is invoked
  14568. * with three arguments: (nsValue, key, nsObject).
  14569. *
  14570. * **Note:** This method mutates `object`.
  14571. *
  14572. * @static
  14573. * @memberOf _
  14574. * @since 4.0.0
  14575. * @category Object
  14576. * @param {Object} object The object to modify.
  14577. * @param {Array|string} path The path of the property to set.
  14578. * @param {*} value The value to set.
  14579. * @param {Function} [customizer] The function to customize assigned values.
  14580. * @returns {Object} Returns `object`.
  14581. * @example
  14582. *
  14583. * var object = {};
  14584. *
  14585. * _.setWith(object, '[0][1]', 'a', Object);
  14586. * // => { '0': { '1': 'a' } }
  14587. */
  14588. function setWith(object, path, value, customizer) {
  14589. customizer = typeof customizer == 'function' ? customizer : undefined;
  14590. return object == null ? object : baseSet(object, path, value, customizer);
  14591. }
  14592. /**
  14593. * Creates an array of own enumerable string keyed-value pairs for `object`
  14594. * which can be consumed by `_.fromPairs`. If `object` is a map or set, its
  14595. * entries are returned.
  14596. *
  14597. * @static
  14598. * @memberOf _
  14599. * @since 4.0.0
  14600. * @alias entries
  14601. * @category Object
  14602. * @param {Object} object The object to query.
  14603. * @returns {Array} Returns the key-value pairs.
  14604. * @example
  14605. *
  14606. * function Foo() {
  14607. * this.a = 1;
  14608. * this.b = 2;
  14609. * }
  14610. *
  14611. * Foo.prototype.c = 3;
  14612. *
  14613. * _.toPairs(new Foo);
  14614. * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
  14615. */
  14616. var toPairs = createToPairs(keys);
  14617. /**
  14618. * Creates an array of own and inherited enumerable string keyed-value pairs
  14619. * for `object` which can be consumed by `_.fromPairs`. If `object` is a map
  14620. * or set, its entries are returned.
  14621. *
  14622. * @static
  14623. * @memberOf _
  14624. * @since 4.0.0
  14625. * @alias entriesIn
  14626. * @category Object
  14627. * @param {Object} object The object to query.
  14628. * @returns {Array} Returns the key-value pairs.
  14629. * @example
  14630. *
  14631. * function Foo() {
  14632. * this.a = 1;
  14633. * this.b = 2;
  14634. * }
  14635. *
  14636. * Foo.prototype.c = 3;
  14637. *
  14638. * _.toPairsIn(new Foo);
  14639. * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
  14640. */
  14641. var toPairsIn = createToPairs(keysIn);
  14642. /**
  14643. * An alternative to `_.reduce`; this method transforms `object` to a new
  14644. * `accumulator` object which is the result of running each of its own
  14645. * enumerable string keyed properties thru `iteratee`, with each invocation
  14646. * potentially mutating the `accumulator` object. If `accumulator` is not
  14647. * provided, a new object with the same `[[Prototype]]` will be used. The
  14648. * iteratee is invoked with four arguments: (accumulator, value, key, object).
  14649. * Iteratee functions may exit iteration early by explicitly returning `false`.
  14650. *
  14651. * @static
  14652. * @memberOf _
  14653. * @since 1.3.0
  14654. * @category Object
  14655. * @param {Object} object The object to iterate over.
  14656. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  14657. * @param {*} [accumulator] The custom accumulator value.
  14658. * @returns {*} Returns the accumulated value.
  14659. * @example
  14660. *
  14661. * _.transform([2, 3, 4], function(result, n) {
  14662. * result.push(n *= n);
  14663. * return n % 2 == 0;
  14664. * }, []);
  14665. * // => [4, 9]
  14666. *
  14667. * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
  14668. * (result[value] || (result[value] = [])).push(key);
  14669. * }, {});
  14670. * // => { '1': ['a', 'c'], '2': ['b'] }
  14671. */
  14672. function transform(object, iteratee, accumulator) {
  14673. var isArr = isArray(object),
  14674. isArrLike = isArr || isBuffer(object) || isTypedArray(object);
  14675. iteratee = getIteratee(iteratee, 4);
  14676. if (accumulator == null) {
  14677. var Ctor = object && object.constructor;
  14678. if (isArrLike) {
  14679. accumulator = isArr ? new Ctor : [];
  14680. }
  14681. else if (isObject(object)) {
  14682. accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
  14683. }
  14684. else {
  14685. accumulator = {};
  14686. }
  14687. }
  14688. (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
  14689. return iteratee(accumulator, value, index, object);
  14690. });
  14691. return accumulator;
  14692. }
  14693. /**
  14694. * Removes the property at `path` of `object`.
  14695. *
  14696. * **Note:** This method mutates `object`.
  14697. *
  14698. * @static
  14699. * @memberOf _
  14700. * @since 4.0.0
  14701. * @category Object
  14702. * @param {Object} object The object to modify.
  14703. * @param {Array|string} path The path of the property to unset.
  14704. * @returns {boolean} Returns `true` if the property is deleted, else `false`.
  14705. * @example
  14706. *
  14707. * var object = { 'a': [{ 'b': { 'c': 7 } }] };
  14708. * _.unset(object, 'a[0].b.c');
  14709. * // => true
  14710. *
  14711. * console.log(object);
  14712. * // => { 'a': [{ 'b': {} }] };
  14713. *
  14714. * _.unset(object, ['a', '0', 'b', 'c']);
  14715. * // => true
  14716. *
  14717. * console.log(object);
  14718. * // => { 'a': [{ 'b': {} }] };
  14719. */
  14720. function unset(object, path) {
  14721. return object == null ? true : baseUnset(object, path);
  14722. }
  14723. /**
  14724. * This method is like `_.set` except that accepts `updater` to produce the
  14725. * value to set. Use `_.updateWith` to customize `path` creation. The `updater`
  14726. * is invoked with one argument: (value).
  14727. *
  14728. * **Note:** This method mutates `object`.
  14729. *
  14730. * @static
  14731. * @memberOf _
  14732. * @since 4.6.0
  14733. * @category Object
  14734. * @param {Object} object The object to modify.
  14735. * @param {Array|string} path The path of the property to set.
  14736. * @param {Function} updater The function to produce the updated value.
  14737. * @returns {Object} Returns `object`.
  14738. * @example
  14739. *
  14740. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  14741. *
  14742. * _.update(object, 'a[0].b.c', function(n) { return n * n; });
  14743. * console.log(object.a[0].b.c);
  14744. * // => 9
  14745. *
  14746. * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
  14747. * console.log(object.x[0].y.z);
  14748. * // => 0
  14749. */
  14750. function update(object, path, updater) {
  14751. return object == null ? object : baseUpdate(object, path, castFunction(updater));
  14752. }
  14753. /**
  14754. * This method is like `_.update` except that it accepts `customizer` which is
  14755. * invoked to produce the objects of `path`. If `customizer` returns `undefined`
  14756. * path creation is handled by the method instead. The `customizer` is invoked
  14757. * with three arguments: (nsValue, key, nsObject).
  14758. *
  14759. * **Note:** This method mutates `object`.
  14760. *
  14761. * @static
  14762. * @memberOf _
  14763. * @since 4.6.0
  14764. * @category Object
  14765. * @param {Object} object The object to modify.
  14766. * @param {Array|string} path The path of the property to set.
  14767. * @param {Function} updater The function to produce the updated value.
  14768. * @param {Function} [customizer] The function to customize assigned values.
  14769. * @returns {Object} Returns `object`.
  14770. * @example
  14771. *
  14772. * var object = {};
  14773. *
  14774. * _.updateWith(object, '[0][1]', _.constant('a'), Object);
  14775. * // => { '0': { '1': 'a' } }
  14776. */
  14777. function updateWith(object, path, updater, customizer) {
  14778. customizer = typeof customizer == 'function' ? customizer : undefined;
  14779. return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
  14780. }
  14781. /**
  14782. * Creates an array of the own enumerable string keyed property values of `object`.
  14783. *
  14784. * **Note:** Non-object values are coerced to objects.
  14785. *
  14786. * @static
  14787. * @since 0.1.0
  14788. * @memberOf _
  14789. * @category Object
  14790. * @param {Object} object The object to query.
  14791. * @returns {Array} Returns the array of property values.
  14792. * @example
  14793. *
  14794. * function Foo() {
  14795. * this.a = 1;
  14796. * this.b = 2;
  14797. * }
  14798. *
  14799. * Foo.prototype.c = 3;
  14800. *
  14801. * _.values(new Foo);
  14802. * // => [1, 2] (iteration order is not guaranteed)
  14803. *
  14804. * _.values('hi');
  14805. * // => ['h', 'i']
  14806. */
  14807. function values(object) {
  14808. return object == null ? [] : baseValues(object, keys(object));
  14809. }
  14810. /**
  14811. * Creates an array of the own and inherited enumerable string keyed property
  14812. * values of `object`.
  14813. *
  14814. * **Note:** Non-object values are coerced to objects.
  14815. *
  14816. * @static
  14817. * @memberOf _
  14818. * @since 3.0.0
  14819. * @category Object
  14820. * @param {Object} object The object to query.
  14821. * @returns {Array} Returns the array of property values.
  14822. * @example
  14823. *
  14824. * function Foo() {
  14825. * this.a = 1;
  14826. * this.b = 2;
  14827. * }
  14828. *
  14829. * Foo.prototype.c = 3;
  14830. *
  14831. * _.valuesIn(new Foo);
  14832. * // => [1, 2, 3] (iteration order is not guaranteed)
  14833. */
  14834. function valuesIn(object) {
  14835. return object == null ? [] : baseValues(object, keysIn(object));
  14836. }
  14837. /*------------------------------------------------------------------------*/
  14838. /**
  14839. * Clamps `number` within the inclusive `lower` and `upper` bounds.
  14840. *
  14841. * @static
  14842. * @memberOf _
  14843. * @since 4.0.0
  14844. * @category Number
  14845. * @param {number} number The number to clamp.
  14846. * @param {number} [lower] The lower bound.
  14847. * @param {number} upper The upper bound.
  14848. * @returns {number} Returns the clamped number.
  14849. * @example
  14850. *
  14851. * _.clamp(-10, -5, 5);
  14852. * // => -5
  14853. *
  14854. * _.clamp(10, -5, 5);
  14855. * // => 5
  14856. */
  14857. function clamp(number, lower, upper) {
  14858. if (upper === undefined) {
  14859. upper = lower;
  14860. lower = undefined;
  14861. }
  14862. if (upper !== undefined) {
  14863. upper = toNumber(upper);
  14864. upper = upper === upper ? upper : 0;
  14865. }
  14866. if (lower !== undefined) {
  14867. lower = toNumber(lower);
  14868. lower = lower === lower ? lower : 0;
  14869. }
  14870. return baseClamp(toNumber(number), lower, upper);
  14871. }
  14872. /**
  14873. * Checks if `n` is between `start` and up to, but not including, `end`. If
  14874. * `end` is not specified, it's set to `start` with `start` then set to `0`.
  14875. * If `start` is greater than `end` the params are swapped to support
  14876. * negative ranges.
  14877. *
  14878. * @static
  14879. * @memberOf _
  14880. * @since 3.3.0
  14881. * @category Number
  14882. * @param {number} number The number to check.
  14883. * @param {number} [start=0] The start of the range.
  14884. * @param {number} end The end of the range.
  14885. * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
  14886. * @see _.range, _.rangeRight
  14887. * @example
  14888. *
  14889. * _.inRange(3, 2, 4);
  14890. * // => true
  14891. *
  14892. * _.inRange(4, 8);
  14893. * // => true
  14894. *
  14895. * _.inRange(4, 2);
  14896. * // => false
  14897. *
  14898. * _.inRange(2, 2);
  14899. * // => false
  14900. *
  14901. * _.inRange(1.2, 2);
  14902. * // => true
  14903. *
  14904. * _.inRange(5.2, 4);
  14905. * // => false
  14906. *
  14907. * _.inRange(-3, -2, -6);
  14908. * // => true
  14909. */
  14910. function inRange(number, start, end) {
  14911. start = toFinite(start);
  14912. if (end === undefined) {
  14913. end = start;
  14914. start = 0;
  14915. } else {
  14916. end = toFinite(end);
  14917. }
  14918. number = toNumber(number);
  14919. return baseInRange(number, start, end);
  14920. }
  14921. /**
  14922. * Produces a random number between the inclusive `lower` and `upper` bounds.
  14923. * If only one argument is provided a number between `0` and the given number
  14924. * is returned. If `floating` is `true`, or either `lower` or `upper` are
  14925. * floats, a floating-point number is returned instead of an integer.
  14926. *
  14927. * **Note:** JavaScript follows the IEEE-754 standard for resolving
  14928. * floating-point values which can produce unexpected results.
  14929. *
  14930. * @static
  14931. * @memberOf _
  14932. * @since 0.7.0
  14933. * @category Number
  14934. * @param {number} [lower=0] The lower bound.
  14935. * @param {number} [upper=1] The upper bound.
  14936. * @param {boolean} [floating] Specify returning a floating-point number.
  14937. * @returns {number} Returns the random number.
  14938. * @example
  14939. *
  14940. * _.random(0, 5);
  14941. * // => an integer between 0 and 5
  14942. *
  14943. * _.random(5);
  14944. * // => also an integer between 0 and 5
  14945. *
  14946. * _.random(5, true);
  14947. * // => a floating-point number between 0 and 5
  14948. *
  14949. * _.random(1.2, 5.2);
  14950. * // => a floating-point number between 1.2 and 5.2
  14951. */
  14952. function random(lower, upper, floating) {
  14953. if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
  14954. upper = floating = undefined;
  14955. }
  14956. if (floating === undefined) {
  14957. if (typeof upper == 'boolean') {
  14958. floating = upper;
  14959. upper = undefined;
  14960. }
  14961. else if (typeof lower == 'boolean') {
  14962. floating = lower;
  14963. lower = undefined;
  14964. }
  14965. }
  14966. if (lower === undefined && upper === undefined) {
  14967. lower = 0;
  14968. upper = 1;
  14969. }
  14970. else {
  14971. lower = toFinite(lower);
  14972. if (upper === undefined) {
  14973. upper = lower;
  14974. lower = 0;
  14975. } else {
  14976. upper = toFinite(upper);
  14977. }
  14978. }
  14979. if (lower > upper) {
  14980. var temp = lower;
  14981. lower = upper;
  14982. upper = temp;
  14983. }
  14984. if (floating || lower % 1 || upper % 1) {
  14985. var rand = nativeRandom();
  14986. return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
  14987. }
  14988. return baseRandom(lower, upper);
  14989. }
  14990. /*------------------------------------------------------------------------*/
  14991. /**
  14992. * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
  14993. *
  14994. * @static
  14995. * @memberOf _
  14996. * @since 3.0.0
  14997. * @category String
  14998. * @param {string} [string=''] The string to convert.
  14999. * @returns {string} Returns the camel cased string.
  15000. * @example
  15001. *
  15002. * _.camelCase('Foo Bar');
  15003. * // => 'fooBar'
  15004. *
  15005. * _.camelCase('--foo-bar--');
  15006. * // => 'fooBar'
  15007. *
  15008. * _.camelCase('__FOO_BAR__');
  15009. * // => 'fooBar'
  15010. */
  15011. var camelCase = createCompounder(function(result, word, index) {
  15012. word = word.toLowerCase();
  15013. return result + (index ? capitalize(word) : word);
  15014. });
  15015. /**
  15016. * Converts the first character of `string` to upper case and the remaining
  15017. * to lower case.
  15018. *
  15019. * @static
  15020. * @memberOf _
  15021. * @since 3.0.0
  15022. * @category String
  15023. * @param {string} [string=''] The string to capitalize.
  15024. * @returns {string} Returns the capitalized string.
  15025. * @example
  15026. *
  15027. * _.capitalize('FRED');
  15028. * // => 'Fred'
  15029. */
  15030. function capitalize(string) {
  15031. return upperFirst(toString(string).toLowerCase());
  15032. }
  15033. /**
  15034. * Deburrs `string` by converting
  15035. * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
  15036. * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
  15037. * letters to basic Latin letters and removing
  15038. * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
  15039. *
  15040. * @static
  15041. * @memberOf _
  15042. * @since 3.0.0
  15043. * @category String
  15044. * @param {string} [string=''] The string to deburr.
  15045. * @returns {string} Returns the deburred string.
  15046. * @example
  15047. *
  15048. * _.deburr('déjà vu');
  15049. * // => 'deja vu'
  15050. */
  15051. function deburr(string) {
  15052. string = toString(string);
  15053. return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
  15054. }
  15055. /**
  15056. * Checks if `string` ends with the given target string.
  15057. *
  15058. * @static
  15059. * @memberOf _
  15060. * @since 3.0.0
  15061. * @category String
  15062. * @param {string} [string=''] The string to inspect.
  15063. * @param {string} [target] The string to search for.
  15064. * @param {number} [position=string.length] The position to search up to.
  15065. * @returns {boolean} Returns `true` if `string` ends with `target`,
  15066. * else `false`.
  15067. * @example
  15068. *
  15069. * _.endsWith('abc', 'c');
  15070. * // => true
  15071. *
  15072. * _.endsWith('abc', 'b');
  15073. * // => false
  15074. *
  15075. * _.endsWith('abc', 'b', 2);
  15076. * // => true
  15077. */
  15078. function endsWith(string, target, position) {
  15079. string = toString(string);
  15080. target = baseToString(target);
  15081. var length = string.length;
  15082. position = position === undefined
  15083. ? length
  15084. : baseClamp(toInteger(position), 0, length);
  15085. var end = position;
  15086. position -= target.length;
  15087. return position >= 0 && string.slice(position, end) == target;
  15088. }
  15089. /**
  15090. * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
  15091. * corresponding HTML entities.
  15092. *
  15093. * **Note:** No other characters are escaped. To escape additional
  15094. * characters use a third-party library like [_he_](https://mths.be/he).
  15095. *
  15096. * Though the ">" character is escaped for symmetry, characters like
  15097. * ">" and "/" don't need escaping in HTML and have no special meaning
  15098. * unless they're part of a tag or unquoted attribute value. See
  15099. * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
  15100. * (under "semi-related fun fact") for more details.
  15101. *
  15102. * When working with HTML you should always
  15103. * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
  15104. * XSS vectors.
  15105. *
  15106. * @static
  15107. * @since 0.1.0
  15108. * @memberOf _
  15109. * @category String
  15110. * @param {string} [string=''] The string to escape.
  15111. * @returns {string} Returns the escaped string.
  15112. * @example
  15113. *
  15114. * _.escape('fred, barney, & pebbles');
  15115. * // => 'fred, barney, &amp; pebbles'
  15116. */
  15117. function escape(string) {
  15118. string = toString(string);
  15119. return (string && reHasUnescapedHtml.test(string))
  15120. ? string.replace(reUnescapedHtml, escapeHtmlChar)
  15121. : string;
  15122. }
  15123. /**
  15124. * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
  15125. * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
  15126. *
  15127. * @static
  15128. * @memberOf _
  15129. * @since 3.0.0
  15130. * @category String
  15131. * @param {string} [string=''] The string to escape.
  15132. * @returns {string} Returns the escaped string.
  15133. * @example
  15134. *
  15135. * _.escapeRegExp('[lodash](https://lodash.com/)');
  15136. * // => '\[lodash\]\(https://lodash\.com/\)'
  15137. */
  15138. function escapeRegExp(string) {
  15139. string = toString(string);
  15140. return (string && reHasRegExpChar.test(string))
  15141. ? string.replace(reRegExpChar, '\\$&')
  15142. : string;
  15143. }
  15144. /**
  15145. * Converts `string` to
  15146. * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
  15147. *
  15148. * @static
  15149. * @memberOf _
  15150. * @since 3.0.0
  15151. * @category String
  15152. * @param {string} [string=''] The string to convert.
  15153. * @returns {string} Returns the kebab cased string.
  15154. * @example
  15155. *
  15156. * _.kebabCase('Foo Bar');
  15157. * // => 'foo-bar'
  15158. *
  15159. * _.kebabCase('fooBar');
  15160. * // => 'foo-bar'
  15161. *
  15162. * _.kebabCase('__FOO_BAR__');
  15163. * // => 'foo-bar'
  15164. */
  15165. var kebabCase = createCompounder(function(result, word, index) {
  15166. return result + (index ? '-' : '') + word.toLowerCase();
  15167. });
  15168. /**
  15169. * Converts `string`, as space separated words, to lower case.
  15170. *
  15171. * @static
  15172. * @memberOf _
  15173. * @since 4.0.0
  15174. * @category String
  15175. * @param {string} [string=''] The string to convert.
  15176. * @returns {string} Returns the lower cased string.
  15177. * @example
  15178. *
  15179. * _.lowerCase('--Foo-Bar--');
  15180. * // => 'foo bar'
  15181. *
  15182. * _.lowerCase('fooBar');
  15183. * // => 'foo bar'
  15184. *
  15185. * _.lowerCase('__FOO_BAR__');
  15186. * // => 'foo bar'
  15187. */
  15188. var lowerCase = createCompounder(function(result, word, index) {
  15189. return result + (index ? ' ' : '') + word.toLowerCase();
  15190. });
  15191. /**
  15192. * Converts the first character of `string` to lower case.
  15193. *
  15194. * @static
  15195. * @memberOf _
  15196. * @since 4.0.0
  15197. * @category String
  15198. * @param {string} [string=''] The string to convert.
  15199. * @returns {string} Returns the converted string.
  15200. * @example
  15201. *
  15202. * _.lowerFirst('Fred');
  15203. * // => 'fred'
  15204. *
  15205. * _.lowerFirst('FRED');
  15206. * // => 'fRED'
  15207. */
  15208. var lowerFirst = createCaseFirst('toLowerCase');
  15209. /**
  15210. * Pads `string` on the left and right sides if it's shorter than `length`.
  15211. * Padding characters are truncated if they can't be evenly divided by `length`.
  15212. *
  15213. * @static
  15214. * @memberOf _
  15215. * @since 3.0.0
  15216. * @category String
  15217. * @param {string} [string=''] The string to pad.
  15218. * @param {number} [length=0] The padding length.
  15219. * @param {string} [chars=' '] The string used as padding.
  15220. * @returns {string} Returns the padded string.
  15221. * @example
  15222. *
  15223. * _.pad('abc', 8);
  15224. * // => ' abc '
  15225. *
  15226. * _.pad('abc', 8, '_-');
  15227. * // => '_-abc_-_'
  15228. *
  15229. * _.pad('abc', 3);
  15230. * // => 'abc'
  15231. */
  15232. function pad(string, length, chars) {
  15233. string = toString(string);
  15234. length = toInteger(length);
  15235. var strLength = length ? stringSize(string) : 0;
  15236. if (!length || strLength >= length) {
  15237. return string;
  15238. }
  15239. var mid = (length - strLength) / 2;
  15240. return (
  15241. createPadding(nativeFloor(mid), chars) +
  15242. string +
  15243. createPadding(nativeCeil(mid), chars)
  15244. );
  15245. }
  15246. /**
  15247. * Pads `string` on the right side if it's shorter than `length`. Padding
  15248. * characters are truncated if they exceed `length`.
  15249. *
  15250. * @static
  15251. * @memberOf _
  15252. * @since 4.0.0
  15253. * @category String
  15254. * @param {string} [string=''] The string to pad.
  15255. * @param {number} [length=0] The padding length.
  15256. * @param {string} [chars=' '] The string used as padding.
  15257. * @returns {string} Returns the padded string.
  15258. * @example
  15259. *
  15260. * _.padEnd('abc', 6);
  15261. * // => 'abc '
  15262. *
  15263. * _.padEnd('abc', 6, '_-');
  15264. * // => 'abc_-_'
  15265. *
  15266. * _.padEnd('abc', 3);
  15267. * // => 'abc'
  15268. */
  15269. function padEnd(string, length, chars) {
  15270. string = toString(string);
  15271. length = toInteger(length);
  15272. var strLength = length ? stringSize(string) : 0;
  15273. return (length && strLength < length)
  15274. ? (string + createPadding(length - strLength, chars))
  15275. : string;
  15276. }
  15277. /**
  15278. * Pads `string` on the left side if it's shorter than `length`. Padding
  15279. * characters are truncated if they exceed `length`.
  15280. *
  15281. * @static
  15282. * @memberOf _
  15283. * @since 4.0.0
  15284. * @category String
  15285. * @param {string} [string=''] The string to pad.
  15286. * @param {number} [length=0] The padding length.
  15287. * @param {string} [chars=' '] The string used as padding.
  15288. * @returns {string} Returns the padded string.
  15289. * @example
  15290. *
  15291. * _.padStart('abc', 6);
  15292. * // => ' abc'
  15293. *
  15294. * _.padStart('abc', 6, '_-');
  15295. * // => '_-_abc'
  15296. *
  15297. * _.padStart('abc', 3);
  15298. * // => 'abc'
  15299. */
  15300. function padStart(string, length, chars) {
  15301. string = toString(string);
  15302. length = toInteger(length);
  15303. var strLength = length ? stringSize(string) : 0;
  15304. return (length && strLength < length)
  15305. ? (createPadding(length - strLength, chars) + string)
  15306. : string;
  15307. }
  15308. /**
  15309. * Converts `string` to an integer of the specified radix. If `radix` is
  15310. * `undefined` or `0`, a `radix` of `10` is used unless `value` is a
  15311. * hexadecimal, in which case a `radix` of `16` is used.
  15312. *
  15313. * **Note:** This method aligns with the
  15314. * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
  15315. *
  15316. * @static
  15317. * @memberOf _
  15318. * @since 1.1.0
  15319. * @category String
  15320. * @param {string} string The string to convert.
  15321. * @param {number} [radix=10] The radix to interpret `value` by.
  15322. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  15323. * @returns {number} Returns the converted integer.
  15324. * @example
  15325. *
  15326. * _.parseInt('08');
  15327. * // => 8
  15328. *
  15329. * _.map(['6', '08', '10'], _.parseInt);
  15330. * // => [6, 8, 10]
  15331. */
  15332. function parseInt(string, radix, guard) {
  15333. if (guard || radix == null) {
  15334. radix = 0;
  15335. } else if (radix) {
  15336. radix = +radix;
  15337. }
  15338. return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
  15339. }
  15340. /**
  15341. * Repeats the given string `n` times.
  15342. *
  15343. * @static
  15344. * @memberOf _
  15345. * @since 3.0.0
  15346. * @category String
  15347. * @param {string} [string=''] The string to repeat.
  15348. * @param {number} [n=1] The number of times to repeat the string.
  15349. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  15350. * @returns {string} Returns the repeated string.
  15351. * @example
  15352. *
  15353. * _.repeat('*', 3);
  15354. * // => '***'
  15355. *
  15356. * _.repeat('abc', 2);
  15357. * // => 'abcabc'
  15358. *
  15359. * _.repeat('abc', 0);
  15360. * // => ''
  15361. */
  15362. function repeat(string, n, guard) {
  15363. if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
  15364. n = 1;
  15365. } else {
  15366. n = toInteger(n);
  15367. }
  15368. return baseRepeat(toString(string), n);
  15369. }
  15370. /**
  15371. * Replaces matches for `pattern` in `string` with `replacement`.
  15372. *
  15373. * **Note:** This method is based on
  15374. * [`String#replace`](https://mdn.io/String/replace).
  15375. *
  15376. * @static
  15377. * @memberOf _
  15378. * @since 4.0.0
  15379. * @category String
  15380. * @param {string} [string=''] The string to modify.
  15381. * @param {RegExp|string} pattern The pattern to replace.
  15382. * @param {Function|string} replacement The match replacement.
  15383. * @returns {string} Returns the modified string.
  15384. * @example
  15385. *
  15386. * _.replace('Hi Fred', 'Fred', 'Barney');
  15387. * // => 'Hi Barney'
  15388. */
  15389. function replace() {
  15390. var args = arguments,
  15391. string = toString(args[0]);
  15392. return args.length < 3 ? string : string.replace(args[1], args[2]);
  15393. }
  15394. /**
  15395. * Converts `string` to
  15396. * [snake case](https://en.wikipedia.org/wiki/Snake_case).
  15397. *
  15398. * @static
  15399. * @memberOf _
  15400. * @since 3.0.0
  15401. * @category String
  15402. * @param {string} [string=''] The string to convert.
  15403. * @returns {string} Returns the snake cased string.
  15404. * @example
  15405. *
  15406. * _.snakeCase('Foo Bar');
  15407. * // => 'foo_bar'
  15408. *
  15409. * _.snakeCase('fooBar');
  15410. * // => 'foo_bar'
  15411. *
  15412. * _.snakeCase('--FOO-BAR--');
  15413. * // => 'foo_bar'
  15414. */
  15415. var snakeCase = createCompounder(function(result, word, index) {
  15416. return result + (index ? '_' : '') + word.toLowerCase();
  15417. });
  15418. /**
  15419. * Splits `string` by `separator`.
  15420. *
  15421. * **Note:** This method is based on
  15422. * [`String#split`](https://mdn.io/String/split).
  15423. *
  15424. * @static
  15425. * @memberOf _
  15426. * @since 4.0.0
  15427. * @category String
  15428. * @param {string} [string=''] The string to split.
  15429. * @param {RegExp|string} separator The separator pattern to split by.
  15430. * @param {number} [limit] The length to truncate results to.
  15431. * @returns {Array} Returns the string segments.
  15432. * @example
  15433. *
  15434. * _.split('a-b-c', '-', 2);
  15435. * // => ['a', 'b']
  15436. */
  15437. function split(string, separator, limit) {
  15438. if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
  15439. separator = limit = undefined;
  15440. }
  15441. limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
  15442. if (!limit) {
  15443. return [];
  15444. }
  15445. string = toString(string);
  15446. if (string && (
  15447. typeof separator == 'string' ||
  15448. (separator != null && !isRegExp(separator))
  15449. )) {
  15450. separator = baseToString(separator);
  15451. if (!separator && hasUnicode(string)) {
  15452. return castSlice(stringToArray(string), 0, limit);
  15453. }
  15454. }
  15455. return string.split(separator, limit);
  15456. }
  15457. /**
  15458. * Converts `string` to
  15459. * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
  15460. *
  15461. * @static
  15462. * @memberOf _
  15463. * @since 3.1.0
  15464. * @category String
  15465. * @param {string} [string=''] The string to convert.
  15466. * @returns {string} Returns the start cased string.
  15467. * @example
  15468. *
  15469. * _.startCase('--foo-bar--');
  15470. * // => 'Foo Bar'
  15471. *
  15472. * _.startCase('fooBar');
  15473. * // => 'Foo Bar'
  15474. *
  15475. * _.startCase('__FOO_BAR__');
  15476. * // => 'FOO BAR'
  15477. */
  15478. var startCase = createCompounder(function(result, word, index) {
  15479. return result + (index ? ' ' : '') + upperFirst(word);
  15480. });
  15481. /**
  15482. * Checks if `string` starts with the given target string.
  15483. *
  15484. * @static
  15485. * @memberOf _
  15486. * @since 3.0.0
  15487. * @category String
  15488. * @param {string} [string=''] The string to inspect.
  15489. * @param {string} [target] The string to search for.
  15490. * @param {number} [position=0] The position to search from.
  15491. * @returns {boolean} Returns `true` if `string` starts with `target`,
  15492. * else `false`.
  15493. * @example
  15494. *
  15495. * _.startsWith('abc', 'a');
  15496. * // => true
  15497. *
  15498. * _.startsWith('abc', 'b');
  15499. * // => false
  15500. *
  15501. * _.startsWith('abc', 'b', 1);
  15502. * // => true
  15503. */
  15504. function startsWith(string, target, position) {
  15505. string = toString(string);
  15506. position = position == null
  15507. ? 0
  15508. : baseClamp(toInteger(position), 0, string.length);
  15509. target = baseToString(target);
  15510. return string.slice(position, position + target.length) == target;
  15511. }
  15512. /**
  15513. * Creates a compiled template function that can interpolate data properties
  15514. * in "interpolate" delimiters, HTML-escape interpolated data properties in
  15515. * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
  15516. * properties may be accessed as free variables in the template. If a setting
  15517. * object is given, it takes precedence over `_.templateSettings` values.
  15518. *
  15519. * **Note:** In the development build `_.template` utilizes
  15520. * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
  15521. * for easier debugging.
  15522. *
  15523. * For more information on precompiling templates see
  15524. * [lodash's custom builds documentation](https://lodash.com/custom-builds).
  15525. *
  15526. * For more information on Chrome extension sandboxes see
  15527. * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
  15528. *
  15529. * @static
  15530. * @since 0.1.0
  15531. * @memberOf _
  15532. * @category String
  15533. * @param {string} [string=''] The template string.
  15534. * @param {Object} [options={}] The options object.
  15535. * @param {RegExp} [options.escape=_.templateSettings.escape]
  15536. * The HTML "escape" delimiter.
  15537. * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
  15538. * The "evaluate" delimiter.
  15539. * @param {Object} [options.imports=_.templateSettings.imports]
  15540. * An object to import into the template as free variables.
  15541. * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
  15542. * The "interpolate" delimiter.
  15543. * @param {string} [options.sourceURL='lodash.templateSources[n]']
  15544. * The sourceURL of the compiled template.
  15545. * @param {string} [options.variable='obj']
  15546. * The data object variable name.
  15547. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  15548. * @returns {Function} Returns the compiled template function.
  15549. * @example
  15550. *
  15551. * // Use the "interpolate" delimiter to create a compiled template.
  15552. * var compiled = _.template('hello <%= user %>!');
  15553. * compiled({ 'user': 'fred' });
  15554. * // => 'hello fred!'
  15555. *
  15556. * // Use the HTML "escape" delimiter to escape data property values.
  15557. * var compiled = _.template('<b><%- value %></b>');
  15558. * compiled({ 'value': '<script>' });
  15559. * // => '<b>&lt;script&gt;</b>'
  15560. *
  15561. * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
  15562. * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
  15563. * compiled({ 'users': ['fred', 'barney'] });
  15564. * // => '<li>fred</li><li>barney</li>'
  15565. *
  15566. * // Use the internal `print` function in "evaluate" delimiters.
  15567. * var compiled = _.template('<% print("hello " + user); %>!');
  15568. * compiled({ 'user': 'barney' });
  15569. * // => 'hello barney!'
  15570. *
  15571. * // Use the ES template literal delimiter as an "interpolate" delimiter.
  15572. * // Disable support by replacing the "interpolate" delimiter.
  15573. * var compiled = _.template('hello ${ user }!');
  15574. * compiled({ 'user': 'pebbles' });
  15575. * // => 'hello pebbles!'
  15576. *
  15577. * // Use backslashes to treat delimiters as plain text.
  15578. * var compiled = _.template('<%= "\\<%- value %\\>" %>');
  15579. * compiled({ 'value': 'ignored' });
  15580. * // => '<%- value %>'
  15581. *
  15582. * // Use the `imports` option to import `jQuery` as `jq`.
  15583. * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
  15584. * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
  15585. * compiled({ 'users': ['fred', 'barney'] });
  15586. * // => '<li>fred</li><li>barney</li>'
  15587. *
  15588. * // Use the `sourceURL` option to specify a custom sourceURL for the template.
  15589. * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
  15590. * compiled(data);
  15591. * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
  15592. *
  15593. * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
  15594. * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
  15595. * compiled.source;
  15596. * // => function(data) {
  15597. * // var __t, __p = '';
  15598. * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
  15599. * // return __p;
  15600. * // }
  15601. *
  15602. * // Use custom template delimiters.
  15603. * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
  15604. * var compiled = _.template('hello {{ user }}!');
  15605. * compiled({ 'user': 'mustache' });
  15606. * // => 'hello mustache!'
  15607. *
  15608. * // Use the `source` property to inline compiled templates for meaningful
  15609. * // line numbers in error messages and stack traces.
  15610. * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
  15611. * var JST = {\
  15612. * "main": ' + _.template(mainText).source + '\
  15613. * };\
  15614. * ');
  15615. */
  15616. function template(string, options, guard) {
  15617. // Based on John Resig's `tmpl` implementation
  15618. // (http://ejohn.org/blog/javascript-micro-templating/)
  15619. // and Laura Doktorova's doT.js (https://github.com/olado/doT).
  15620. var settings = lodash.templateSettings;
  15621. if (guard && isIterateeCall(string, options, guard)) {
  15622. options = undefined;
  15623. }
  15624. string = toString(string);
  15625. options = assignInWith({}, options, settings, customDefaultsAssignIn);
  15626. var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
  15627. importsKeys = keys(imports),
  15628. importsValues = baseValues(imports, importsKeys);
  15629. var isEscaping,
  15630. isEvaluating,
  15631. index = 0,
  15632. interpolate = options.interpolate || reNoMatch,
  15633. source = "__p += '";
  15634. // Compile the regexp to match each delimiter.
  15635. var reDelimiters = RegExp(
  15636. (options.escape || reNoMatch).source + '|' +
  15637. interpolate.source + '|' +
  15638. (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
  15639. (options.evaluate || reNoMatch).source + '|$'
  15640. , 'g');
  15641. // Use a sourceURL for easier debugging.
  15642. // The sourceURL gets injected into the source that's eval-ed, so be careful
  15643. // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in
  15644. // and escape the comment, thus injecting code that gets evaled.
  15645. var sourceURL = '//# sourceURL=' +
  15646. (hasOwnProperty.call(options, 'sourceURL')
  15647. ? (options.sourceURL + '').replace(/\s/g, ' ')
  15648. : ('lodash.templateSources[' + (++templateCounter) + ']')
  15649. ) + '\n';
  15650. string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
  15651. interpolateValue || (interpolateValue = esTemplateValue);
  15652. // Escape characters that can't be included in string literals.
  15653. source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
  15654. // Replace delimiters with snippets.
  15655. if (escapeValue) {
  15656. isEscaping = true;
  15657. source += "' +\n__e(" + escapeValue + ") +\n'";
  15658. }
  15659. if (evaluateValue) {
  15660. isEvaluating = true;
  15661. source += "';\n" + evaluateValue + ";\n__p += '";
  15662. }
  15663. if (interpolateValue) {
  15664. source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
  15665. }
  15666. index = offset + match.length;
  15667. // The JS engine embedded in Adobe products needs `match` returned in
  15668. // order to produce the correct `offset` value.
  15669. return match;
  15670. });
  15671. source += "';\n";
  15672. // If `variable` is not specified wrap a with-statement around the generated
  15673. // code to add the data object to the top of the scope chain.
  15674. var variable = hasOwnProperty.call(options, 'variable') && options.variable;
  15675. if (!variable) {
  15676. source = 'with (obj) {\n' + source + '\n}\n';
  15677. }
  15678. // Throw an error if a forbidden character was found in `variable`, to prevent
  15679. // potential command injection attacks.
  15680. else if (reForbiddenIdentifierChars.test(variable)) {
  15681. throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);
  15682. }
  15683. // Cleanup code by stripping empty strings.
  15684. source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
  15685. .replace(reEmptyStringMiddle, '$1')
  15686. .replace(reEmptyStringTrailing, '$1;');
  15687. // Frame code as the function body.
  15688. source = 'function(' + (variable || 'obj') + ') {\n' +
  15689. (variable
  15690. ? ''
  15691. : 'obj || (obj = {});\n'
  15692. ) +
  15693. "var __t, __p = ''" +
  15694. (isEscaping
  15695. ? ', __e = _.escape'
  15696. : ''
  15697. ) +
  15698. (isEvaluating
  15699. ? ', __j = Array.prototype.join;\n' +
  15700. "function print() { __p += __j.call(arguments, '') }\n"
  15701. : ';\n'
  15702. ) +
  15703. source +
  15704. 'return __p\n}';
  15705. var result = attempt(function() {
  15706. return Function(importsKeys, sourceURL + 'return ' + source)
  15707. .apply(undefined, importsValues);
  15708. });
  15709. // Provide the compiled function's source by its `toString` method or
  15710. // the `source` property as a convenience for inlining compiled templates.
  15711. result.source = source;
  15712. if (isError(result)) {
  15713. throw result;
  15714. }
  15715. return result;
  15716. }
  15717. /**
  15718. * Converts `string`, as a whole, to lower case just like
  15719. * [String#toLowerCase](https://mdn.io/toLowerCase).
  15720. *
  15721. * @static
  15722. * @memberOf _
  15723. * @since 4.0.0
  15724. * @category String
  15725. * @param {string} [string=''] The string to convert.
  15726. * @returns {string} Returns the lower cased string.
  15727. * @example
  15728. *
  15729. * _.toLower('--Foo-Bar--');
  15730. * // => '--foo-bar--'
  15731. *
  15732. * _.toLower('fooBar');
  15733. * // => 'foobar'
  15734. *
  15735. * _.toLower('__FOO_BAR__');
  15736. * // => '__foo_bar__'
  15737. */
  15738. function toLower(value) {
  15739. return toString(value).toLowerCase();
  15740. }
  15741. /**
  15742. * Converts `string`, as a whole, to upper case just like
  15743. * [String#toUpperCase](https://mdn.io/toUpperCase).
  15744. *
  15745. * @static
  15746. * @memberOf _
  15747. * @since 4.0.0
  15748. * @category String
  15749. * @param {string} [string=''] The string to convert.
  15750. * @returns {string} Returns the upper cased string.
  15751. * @example
  15752. *
  15753. * _.toUpper('--foo-bar--');
  15754. * // => '--FOO-BAR--'
  15755. *
  15756. * _.toUpper('fooBar');
  15757. * // => 'FOOBAR'
  15758. *
  15759. * _.toUpper('__foo_bar__');
  15760. * // => '__FOO_BAR__'
  15761. */
  15762. function toUpper(value) {
  15763. return toString(value).toUpperCase();
  15764. }
  15765. /**
  15766. * Removes leading and trailing whitespace or specified characters from `string`.
  15767. *
  15768. * @static
  15769. * @memberOf _
  15770. * @since 3.0.0
  15771. * @category String
  15772. * @param {string} [string=''] The string to trim.
  15773. * @param {string} [chars=whitespace] The characters to trim.
  15774. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  15775. * @returns {string} Returns the trimmed string.
  15776. * @example
  15777. *
  15778. * _.trim(' abc ');
  15779. * // => 'abc'
  15780. *
  15781. * _.trim('-_-abc-_-', '_-');
  15782. * // => 'abc'
  15783. *
  15784. * _.map([' foo ', ' bar '], _.trim);
  15785. * // => ['foo', 'bar']
  15786. */
  15787. function trim(string, chars, guard) {
  15788. string = toString(string);
  15789. if (string && (guard || chars === undefined)) {
  15790. return baseTrim(string);
  15791. }
  15792. if (!string || !(chars = baseToString(chars))) {
  15793. return string;
  15794. }
  15795. var strSymbols = stringToArray(string),
  15796. chrSymbols = stringToArray(chars),
  15797. start = charsStartIndex(strSymbols, chrSymbols),
  15798. end = charsEndIndex(strSymbols, chrSymbols) + 1;
  15799. return castSlice(strSymbols, start, end).join('');
  15800. }
  15801. /**
  15802. * Removes trailing whitespace or specified characters from `string`.
  15803. *
  15804. * @static
  15805. * @memberOf _
  15806. * @since 4.0.0
  15807. * @category String
  15808. * @param {string} [string=''] The string to trim.
  15809. * @param {string} [chars=whitespace] The characters to trim.
  15810. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  15811. * @returns {string} Returns the trimmed string.
  15812. * @example
  15813. *
  15814. * _.trimEnd(' abc ');
  15815. * // => ' abc'
  15816. *
  15817. * _.trimEnd('-_-abc-_-', '_-');
  15818. * // => '-_-abc'
  15819. */
  15820. function trimEnd(string, chars, guard) {
  15821. string = toString(string);
  15822. if (string && (guard || chars === undefined)) {
  15823. return string.slice(0, trimmedEndIndex(string) + 1);
  15824. }
  15825. if (!string || !(chars = baseToString(chars))) {
  15826. return string;
  15827. }
  15828. var strSymbols = stringToArray(string),
  15829. end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
  15830. return castSlice(strSymbols, 0, end).join('');
  15831. }
  15832. /**
  15833. * Removes leading whitespace or specified characters from `string`.
  15834. *
  15835. * @static
  15836. * @memberOf _
  15837. * @since 4.0.0
  15838. * @category String
  15839. * @param {string} [string=''] The string to trim.
  15840. * @param {string} [chars=whitespace] The characters to trim.
  15841. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  15842. * @returns {string} Returns the trimmed string.
  15843. * @example
  15844. *
  15845. * _.trimStart(' abc ');
  15846. * // => 'abc '
  15847. *
  15848. * _.trimStart('-_-abc-_-', '_-');
  15849. * // => 'abc-_-'
  15850. */
  15851. function trimStart(string, chars, guard) {
  15852. string = toString(string);
  15853. if (string && (guard || chars === undefined)) {
  15854. return string.replace(reTrimStart, '');
  15855. }
  15856. if (!string || !(chars = baseToString(chars))) {
  15857. return string;
  15858. }
  15859. var strSymbols = stringToArray(string),
  15860. start = charsStartIndex(strSymbols, stringToArray(chars));
  15861. return castSlice(strSymbols, start).join('');
  15862. }
  15863. /**
  15864. * Truncates `string` if it's longer than the given maximum string length.
  15865. * The last characters of the truncated string are replaced with the omission
  15866. * string which defaults to "...".
  15867. *
  15868. * @static
  15869. * @memberOf _
  15870. * @since 4.0.0
  15871. * @category String
  15872. * @param {string} [string=''] The string to truncate.
  15873. * @param {Object} [options={}] The options object.
  15874. * @param {number} [options.length=30] The maximum string length.
  15875. * @param {string} [options.omission='...'] The string to indicate text is omitted.
  15876. * @param {RegExp|string} [options.separator] The separator pattern to truncate to.
  15877. * @returns {string} Returns the truncated string.
  15878. * @example
  15879. *
  15880. * _.truncate('hi-diddly-ho there, neighborino');
  15881. * // => 'hi-diddly-ho there, neighbo...'
  15882. *
  15883. * _.truncate('hi-diddly-ho there, neighborino', {
  15884. * 'length': 24,
  15885. * 'separator': ' '
  15886. * });
  15887. * // => 'hi-diddly-ho there,...'
  15888. *
  15889. * _.truncate('hi-diddly-ho there, neighborino', {
  15890. * 'length': 24,
  15891. * 'separator': /,? +/
  15892. * });
  15893. * // => 'hi-diddly-ho there...'
  15894. *
  15895. * _.truncate('hi-diddly-ho there, neighborino', {
  15896. * 'omission': ' [...]'
  15897. * });
  15898. * // => 'hi-diddly-ho there, neig [...]'
  15899. */
  15900. function truncate(string, options) {
  15901. var length = DEFAULT_TRUNC_LENGTH,
  15902. omission = DEFAULT_TRUNC_OMISSION;
  15903. if (isObject(options)) {
  15904. var separator = 'separator' in options ? options.separator : separator;
  15905. length = 'length' in options ? toInteger(options.length) : length;
  15906. omission = 'omission' in options ? baseToString(options.omission) : omission;
  15907. }
  15908. string = toString(string);
  15909. var strLength = string.length;
  15910. if (hasUnicode(string)) {
  15911. var strSymbols = stringToArray(string);
  15912. strLength = strSymbols.length;
  15913. }
  15914. if (length >= strLength) {
  15915. return string;
  15916. }
  15917. var end = length - stringSize(omission);
  15918. if (end < 1) {
  15919. return omission;
  15920. }
  15921. var result = strSymbols
  15922. ? castSlice(strSymbols, 0, end).join('')
  15923. : string.slice(0, end);
  15924. if (separator === undefined) {
  15925. return result + omission;
  15926. }
  15927. if (strSymbols) {
  15928. end += (result.length - end);
  15929. }
  15930. if (isRegExp(separator)) {
  15931. if (string.slice(end).search(separator)) {
  15932. var match,
  15933. substring = result;
  15934. if (!separator.global) {
  15935. separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
  15936. }
  15937. separator.lastIndex = 0;
  15938. while ((match = separator.exec(substring))) {
  15939. var newEnd = match.index;
  15940. }
  15941. result = result.slice(0, newEnd === undefined ? end : newEnd);
  15942. }
  15943. } else if (string.indexOf(baseToString(separator), end) != end) {
  15944. var index = result.lastIndexOf(separator);
  15945. if (index > -1) {
  15946. result = result.slice(0, index);
  15947. }
  15948. }
  15949. return result + omission;
  15950. }
  15951. /**
  15952. * The inverse of `_.escape`; this method converts the HTML entities
  15953. * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to
  15954. * their corresponding characters.
  15955. *
  15956. * **Note:** No other HTML entities are unescaped. To unescape additional
  15957. * HTML entities use a third-party library like [_he_](https://mths.be/he).
  15958. *
  15959. * @static
  15960. * @memberOf _
  15961. * @since 0.6.0
  15962. * @category String
  15963. * @param {string} [string=''] The string to unescape.
  15964. * @returns {string} Returns the unescaped string.
  15965. * @example
  15966. *
  15967. * _.unescape('fred, barney, &amp; pebbles');
  15968. * // => 'fred, barney, & pebbles'
  15969. */
  15970. function unescape(string) {
  15971. string = toString(string);
  15972. return (string && reHasEscapedHtml.test(string))
  15973. ? string.replace(reEscapedHtml, unescapeHtmlChar)
  15974. : string;
  15975. }
  15976. /**
  15977. * Converts `string`, as space separated words, to upper case.
  15978. *
  15979. * @static
  15980. * @memberOf _
  15981. * @since 4.0.0
  15982. * @category String
  15983. * @param {string} [string=''] The string to convert.
  15984. * @returns {string} Returns the upper cased string.
  15985. * @example
  15986. *
  15987. * _.upperCase('--foo-bar');
  15988. * // => 'FOO BAR'
  15989. *
  15990. * _.upperCase('fooBar');
  15991. * // => 'FOO BAR'
  15992. *
  15993. * _.upperCase('__foo_bar__');
  15994. * // => 'FOO BAR'
  15995. */
  15996. var upperCase = createCompounder(function(result, word, index) {
  15997. return result + (index ? ' ' : '') + word.toUpperCase();
  15998. });
  15999. /**
  16000. * Converts the first character of `string` to upper case.
  16001. *
  16002. * @static
  16003. * @memberOf _
  16004. * @since 4.0.0
  16005. * @category String
  16006. * @param {string} [string=''] The string to convert.
  16007. * @returns {string} Returns the converted string.
  16008. * @example
  16009. *
  16010. * _.upperFirst('fred');
  16011. * // => 'Fred'
  16012. *
  16013. * _.upperFirst('FRED');
  16014. * // => 'FRED'
  16015. */
  16016. var upperFirst = createCaseFirst('toUpperCase');
  16017. /**
  16018. * Splits `string` into an array of its words.
  16019. *
  16020. * @static
  16021. * @memberOf _
  16022. * @since 3.0.0
  16023. * @category String
  16024. * @param {string} [string=''] The string to inspect.
  16025. * @param {RegExp|string} [pattern] The pattern to match words.
  16026. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  16027. * @returns {Array} Returns the words of `string`.
  16028. * @example
  16029. *
  16030. * _.words('fred, barney, & pebbles');
  16031. * // => ['fred', 'barney', 'pebbles']
  16032. *
  16033. * _.words('fred, barney, & pebbles', /[^, ]+/g);
  16034. * // => ['fred', 'barney', '&', 'pebbles']
  16035. */
  16036. function words(string, pattern, guard) {
  16037. string = toString(string);
  16038. pattern = guard ? undefined : pattern;
  16039. if (pattern === undefined) {
  16040. return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
  16041. }
  16042. return string.match(pattern) || [];
  16043. }
  16044. /*------------------------------------------------------------------------*/
  16045. /**
  16046. * Attempts to invoke `func`, returning either the result or the caught error
  16047. * object. Any additional arguments are provided to `func` when it's invoked.
  16048. *
  16049. * @static
  16050. * @memberOf _
  16051. * @since 3.0.0
  16052. * @category Util
  16053. * @param {Function} func The function to attempt.
  16054. * @param {...*} [args] The arguments to invoke `func` with.
  16055. * @returns {*} Returns the `func` result or error object.
  16056. * @example
  16057. *
  16058. * // Avoid throwing errors for invalid selectors.
  16059. * var elements = _.attempt(function(selector) {
  16060. * return document.querySelectorAll(selector);
  16061. * }, '>_>');
  16062. *
  16063. * if (_.isError(elements)) {
  16064. * elements = [];
  16065. * }
  16066. */
  16067. var attempt = baseRest(function(func, args) {
  16068. try {
  16069. return apply(func, undefined, args);
  16070. } catch (e) {
  16071. return isError(e) ? e : new Error(e);
  16072. }
  16073. });
  16074. /**
  16075. * Binds methods of an object to the object itself, overwriting the existing
  16076. * method.
  16077. *
  16078. * **Note:** This method doesn't set the "length" property of bound functions.
  16079. *
  16080. * @static
  16081. * @since 0.1.0
  16082. * @memberOf _
  16083. * @category Util
  16084. * @param {Object} object The object to bind and assign the bound methods to.
  16085. * @param {...(string|string[])} methodNames The object method names to bind.
  16086. * @returns {Object} Returns `object`.
  16087. * @example
  16088. *
  16089. * var view = {
  16090. * 'label': 'docs',
  16091. * 'click': function() {
  16092. * console.log('clicked ' + this.label);
  16093. * }
  16094. * };
  16095. *
  16096. * _.bindAll(view, ['click']);
  16097. * jQuery(element).on('click', view.click);
  16098. * // => Logs 'clicked docs' when clicked.
  16099. */
  16100. var bindAll = flatRest(function(object, methodNames) {
  16101. arrayEach(methodNames, function(key) {
  16102. key = toKey(key);
  16103. baseAssignValue(object, key, bind(object[key], object));
  16104. });
  16105. return object;
  16106. });
  16107. /**
  16108. * Creates a function that iterates over `pairs` and invokes the corresponding
  16109. * function of the first predicate to return truthy. The predicate-function
  16110. * pairs are invoked with the `this` binding and arguments of the created
  16111. * function.
  16112. *
  16113. * @static
  16114. * @memberOf _
  16115. * @since 4.0.0
  16116. * @category Util
  16117. * @param {Array} pairs The predicate-function pairs.
  16118. * @returns {Function} Returns the new composite function.
  16119. * @example
  16120. *
  16121. * var func = _.cond([
  16122. * [_.matches({ 'a': 1 }), _.constant('matches A')],
  16123. * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
  16124. * [_.stubTrue, _.constant('no match')]
  16125. * ]);
  16126. *
  16127. * func({ 'a': 1, 'b': 2 });
  16128. * // => 'matches A'
  16129. *
  16130. * func({ 'a': 0, 'b': 1 });
  16131. * // => 'matches B'
  16132. *
  16133. * func({ 'a': '1', 'b': '2' });
  16134. * // => 'no match'
  16135. */
  16136. function cond(pairs) {
  16137. var length = pairs == null ? 0 : pairs.length,
  16138. toIteratee = getIteratee();
  16139. pairs = !length ? [] : arrayMap(pairs, function(pair) {
  16140. if (typeof pair[1] != 'function') {
  16141. throw new TypeError(FUNC_ERROR_TEXT);
  16142. }
  16143. return [toIteratee(pair[0]), pair[1]];
  16144. });
  16145. return baseRest(function(args) {
  16146. var index = -1;
  16147. while (++index < length) {
  16148. var pair = pairs[index];
  16149. if (apply(pair[0], this, args)) {
  16150. return apply(pair[1], this, args);
  16151. }
  16152. }
  16153. });
  16154. }
  16155. /**
  16156. * Creates a function that invokes the predicate properties of `source` with
  16157. * the corresponding property values of a given object, returning `true` if
  16158. * all predicates return truthy, else `false`.
  16159. *
  16160. * **Note:** The created function is equivalent to `_.conformsTo` with
  16161. * `source` partially applied.
  16162. *
  16163. * @static
  16164. * @memberOf _
  16165. * @since 4.0.0
  16166. * @category Util
  16167. * @param {Object} source The object of property predicates to conform to.
  16168. * @returns {Function} Returns the new spec function.
  16169. * @example
  16170. *
  16171. * var objects = [
  16172. * { 'a': 2, 'b': 1 },
  16173. * { 'a': 1, 'b': 2 }
  16174. * ];
  16175. *
  16176. * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));
  16177. * // => [{ 'a': 1, 'b': 2 }]
  16178. */
  16179. function conforms(source) {
  16180. return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
  16181. }
  16182. /**
  16183. * Creates a function that returns `value`.
  16184. *
  16185. * @static
  16186. * @memberOf _
  16187. * @since 2.4.0
  16188. * @category Util
  16189. * @param {*} value The value to return from the new function.
  16190. * @returns {Function} Returns the new constant function.
  16191. * @example
  16192. *
  16193. * var objects = _.times(2, _.constant({ 'a': 1 }));
  16194. *
  16195. * console.log(objects);
  16196. * // => [{ 'a': 1 }, { 'a': 1 }]
  16197. *
  16198. * console.log(objects[0] === objects[1]);
  16199. * // => true
  16200. */
  16201. function constant(value) {
  16202. return function() {
  16203. return value;
  16204. };
  16205. }
  16206. /**
  16207. * Checks `value` to determine whether a default value should be returned in
  16208. * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
  16209. * or `undefined`.
  16210. *
  16211. * @static
  16212. * @memberOf _
  16213. * @since 4.14.0
  16214. * @category Util
  16215. * @param {*} value The value to check.
  16216. * @param {*} defaultValue The default value.
  16217. * @returns {*} Returns the resolved value.
  16218. * @example
  16219. *
  16220. * _.defaultTo(1, 10);
  16221. * // => 1
  16222. *
  16223. * _.defaultTo(undefined, 10);
  16224. * // => 10
  16225. */
  16226. function defaultTo(value, defaultValue) {
  16227. return (value == null || value !== value) ? defaultValue : value;
  16228. }
  16229. /**
  16230. * Creates a function that returns the result of invoking the given functions
  16231. * with the `this` binding of the created function, where each successive
  16232. * invocation is supplied the return value of the previous.
  16233. *
  16234. * @static
  16235. * @memberOf _
  16236. * @since 3.0.0
  16237. * @category Util
  16238. * @param {...(Function|Function[])} [funcs] The functions to invoke.
  16239. * @returns {Function} Returns the new composite function.
  16240. * @see _.flowRight
  16241. * @example
  16242. *
  16243. * function square(n) {
  16244. * return n * n;
  16245. * }
  16246. *
  16247. * var addSquare = _.flow([_.add, square]);
  16248. * addSquare(1, 2);
  16249. * // => 9
  16250. */
  16251. var flow = createFlow();
  16252. /**
  16253. * This method is like `_.flow` except that it creates a function that
  16254. * invokes the given functions from right to left.
  16255. *
  16256. * @static
  16257. * @since 3.0.0
  16258. * @memberOf _
  16259. * @category Util
  16260. * @param {...(Function|Function[])} [funcs] The functions to invoke.
  16261. * @returns {Function} Returns the new composite function.
  16262. * @see _.flow
  16263. * @example
  16264. *
  16265. * function square(n) {
  16266. * return n * n;
  16267. * }
  16268. *
  16269. * var addSquare = _.flowRight([square, _.add]);
  16270. * addSquare(1, 2);
  16271. * // => 9
  16272. */
  16273. var flowRight = createFlow(true);
  16274. /**
  16275. * This method returns the first argument it receives.
  16276. *
  16277. * @static
  16278. * @since 0.1.0
  16279. * @memberOf _
  16280. * @category Util
  16281. * @param {*} value Any value.
  16282. * @returns {*} Returns `value`.
  16283. * @example
  16284. *
  16285. * var object = { 'a': 1 };
  16286. *
  16287. * console.log(_.identity(object) === object);
  16288. * // => true
  16289. */
  16290. function identity(value) {
  16291. return value;
  16292. }
  16293. /**
  16294. * Creates a function that invokes `func` with the arguments of the created
  16295. * function. If `func` is a property name, the created function returns the
  16296. * property value for a given element. If `func` is an array or object, the
  16297. * created function returns `true` for elements that contain the equivalent
  16298. * source properties, otherwise it returns `false`.
  16299. *
  16300. * @static
  16301. * @since 4.0.0
  16302. * @memberOf _
  16303. * @category Util
  16304. * @param {*} [func=_.identity] The value to convert to a callback.
  16305. * @returns {Function} Returns the callback.
  16306. * @example
  16307. *
  16308. * var users = [
  16309. * { 'user': 'barney', 'age': 36, 'active': true },
  16310. * { 'user': 'fred', 'age': 40, 'active': false }
  16311. * ];
  16312. *
  16313. * // The `_.matches` iteratee shorthand.
  16314. * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
  16315. * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
  16316. *
  16317. * // The `_.matchesProperty` iteratee shorthand.
  16318. * _.filter(users, _.iteratee(['user', 'fred']));
  16319. * // => [{ 'user': 'fred', 'age': 40 }]
  16320. *
  16321. * // The `_.property` iteratee shorthand.
  16322. * _.map(users, _.iteratee('user'));
  16323. * // => ['barney', 'fred']
  16324. *
  16325. * // Create custom iteratee shorthands.
  16326. * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
  16327. * return !_.isRegExp(func) ? iteratee(func) : function(string) {
  16328. * return func.test(string);
  16329. * };
  16330. * });
  16331. *
  16332. * _.filter(['abc', 'def'], /ef/);
  16333. * // => ['def']
  16334. */
  16335. function iteratee(func) {
  16336. return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));
  16337. }
  16338. /**
  16339. * Creates a function that performs a partial deep comparison between a given
  16340. * object and `source`, returning `true` if the given object has equivalent
  16341. * property values, else `false`.
  16342. *
  16343. * **Note:** The created function is equivalent to `_.isMatch` with `source`
  16344. * partially applied.
  16345. *
  16346. * Partial comparisons will match empty array and empty object `source`
  16347. * values against any array or object value, respectively. See `_.isEqual`
  16348. * for a list of supported value comparisons.
  16349. *
  16350. * **Note:** Multiple values can be checked by combining several matchers
  16351. * using `_.overSome`
  16352. *
  16353. * @static
  16354. * @memberOf _
  16355. * @since 3.0.0
  16356. * @category Util
  16357. * @param {Object} source The object of property values to match.
  16358. * @returns {Function} Returns the new spec function.
  16359. * @example
  16360. *
  16361. * var objects = [
  16362. * { 'a': 1, 'b': 2, 'c': 3 },
  16363. * { 'a': 4, 'b': 5, 'c': 6 }
  16364. * ];
  16365. *
  16366. * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
  16367. * // => [{ 'a': 4, 'b': 5, 'c': 6 }]
  16368. *
  16369. * // Checking for several possible values
  16370. * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));
  16371. * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
  16372. */
  16373. function matches(source) {
  16374. return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
  16375. }
  16376. /**
  16377. * Creates a function that performs a partial deep comparison between the
  16378. * value at `path` of a given object to `srcValue`, returning `true` if the
  16379. * object value is equivalent, else `false`.
  16380. *
  16381. * **Note:** Partial comparisons will match empty array and empty object
  16382. * `srcValue` values against any array or object value, respectively. See
  16383. * `_.isEqual` for a list of supported value comparisons.
  16384. *
  16385. * **Note:** Multiple values can be checked by combining several matchers
  16386. * using `_.overSome`
  16387. *
  16388. * @static
  16389. * @memberOf _
  16390. * @since 3.2.0
  16391. * @category Util
  16392. * @param {Array|string} path The path of the property to get.
  16393. * @param {*} srcValue The value to match.
  16394. * @returns {Function} Returns the new spec function.
  16395. * @example
  16396. *
  16397. * var objects = [
  16398. * { 'a': 1, 'b': 2, 'c': 3 },
  16399. * { 'a': 4, 'b': 5, 'c': 6 }
  16400. * ];
  16401. *
  16402. * _.find(objects, _.matchesProperty('a', 4));
  16403. * // => { 'a': 4, 'b': 5, 'c': 6 }
  16404. *
  16405. * // Checking for several possible values
  16406. * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));
  16407. * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
  16408. */
  16409. function matchesProperty(path, srcValue) {
  16410. return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
  16411. }
  16412. /**
  16413. * Creates a function that invokes the method at `path` of a given object.
  16414. * Any additional arguments are provided to the invoked method.
  16415. *
  16416. * @static
  16417. * @memberOf _
  16418. * @since 3.7.0
  16419. * @category Util
  16420. * @param {Array|string} path The path of the method to invoke.
  16421. * @param {...*} [args] The arguments to invoke the method with.
  16422. * @returns {Function} Returns the new invoker function.
  16423. * @example
  16424. *
  16425. * var objects = [
  16426. * { 'a': { 'b': _.constant(2) } },
  16427. * { 'a': { 'b': _.constant(1) } }
  16428. * ];
  16429. *
  16430. * _.map(objects, _.method('a.b'));
  16431. * // => [2, 1]
  16432. *
  16433. * _.map(objects, _.method(['a', 'b']));
  16434. * // => [2, 1]
  16435. */
  16436. var method = baseRest(function(path, args) {
  16437. return function(object) {
  16438. return baseInvoke(object, path, args);
  16439. };
  16440. });
  16441. /**
  16442. * The opposite of `_.method`; this method creates a function that invokes
  16443. * the method at a given path of `object`. Any additional arguments are
  16444. * provided to the invoked method.
  16445. *
  16446. * @static
  16447. * @memberOf _
  16448. * @since 3.7.0
  16449. * @category Util
  16450. * @param {Object} object The object to query.
  16451. * @param {...*} [args] The arguments to invoke the method with.
  16452. * @returns {Function} Returns the new invoker function.
  16453. * @example
  16454. *
  16455. * var array = _.times(3, _.constant),
  16456. * object = { 'a': array, 'b': array, 'c': array };
  16457. *
  16458. * _.map(['a[2]', 'c[0]'], _.methodOf(object));
  16459. * // => [2, 0]
  16460. *
  16461. * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
  16462. * // => [2, 0]
  16463. */
  16464. var methodOf = baseRest(function(object, args) {
  16465. return function(path) {
  16466. return baseInvoke(object, path, args);
  16467. };
  16468. });
  16469. /**
  16470. * Adds all own enumerable string keyed function properties of a source
  16471. * object to the destination object. If `object` is a function, then methods
  16472. * are added to its prototype as well.
  16473. *
  16474. * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
  16475. * avoid conflicts caused by modifying the original.
  16476. *
  16477. * @static
  16478. * @since 0.1.0
  16479. * @memberOf _
  16480. * @category Util
  16481. * @param {Function|Object} [object=lodash] The destination object.
  16482. * @param {Object} source The object of functions to add.
  16483. * @param {Object} [options={}] The options object.
  16484. * @param {boolean} [options.chain=true] Specify whether mixins are chainable.
  16485. * @returns {Function|Object} Returns `object`.
  16486. * @example
  16487. *
  16488. * function vowels(string) {
  16489. * return _.filter(string, function(v) {
  16490. * return /[aeiou]/i.test(v);
  16491. * });
  16492. * }
  16493. *
  16494. * _.mixin({ 'vowels': vowels });
  16495. * _.vowels('fred');
  16496. * // => ['e']
  16497. *
  16498. * _('fred').vowels().value();
  16499. * // => ['e']
  16500. *
  16501. * _.mixin({ 'vowels': vowels }, { 'chain': false });
  16502. * _('fred').vowels();
  16503. * // => ['e']
  16504. */
  16505. function mixin(object, source, options) {
  16506. var props = keys(source),
  16507. methodNames = baseFunctions(source, props);
  16508. if (options == null &&
  16509. !(isObject(source) && (methodNames.length || !props.length))) {
  16510. options = source;
  16511. source = object;
  16512. object = this;
  16513. methodNames = baseFunctions(source, keys(source));
  16514. }
  16515. var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
  16516. isFunc = isFunction(object);
  16517. arrayEach(methodNames, function(methodName) {
  16518. var func = source[methodName];
  16519. object[methodName] = func;
  16520. if (isFunc) {
  16521. object.prototype[methodName] = function() {
  16522. var chainAll = this.__chain__;
  16523. if (chain || chainAll) {
  16524. var result = object(this.__wrapped__),
  16525. actions = result.__actions__ = copyArray(this.__actions__);
  16526. actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
  16527. result.__chain__ = chainAll;
  16528. return result;
  16529. }
  16530. return func.apply(object, arrayPush([this.value()], arguments));
  16531. };
  16532. }
  16533. });
  16534. return object;
  16535. }
  16536. /**
  16537. * Reverts the `_` variable to its previous value and returns a reference to
  16538. * the `lodash` function.
  16539. *
  16540. * @static
  16541. * @since 0.1.0
  16542. * @memberOf _
  16543. * @category Util
  16544. * @returns {Function} Returns the `lodash` function.
  16545. * @example
  16546. *
  16547. * var lodash = _.noConflict();
  16548. */
  16549. function noConflict() {
  16550. if (root._ === this) {
  16551. root._ = oldDash;
  16552. }
  16553. return this;
  16554. }
  16555. /**
  16556. * This method returns `undefined`.
  16557. *
  16558. * @static
  16559. * @memberOf _
  16560. * @since 2.3.0
  16561. * @category Util
  16562. * @example
  16563. *
  16564. * _.times(2, _.noop);
  16565. * // => [undefined, undefined]
  16566. */
  16567. function noop() {
  16568. // No operation performed.
  16569. }
  16570. /**
  16571. * Creates a function that gets the argument at index `n`. If `n` is negative,
  16572. * the nth argument from the end is returned.
  16573. *
  16574. * @static
  16575. * @memberOf _
  16576. * @since 4.0.0
  16577. * @category Util
  16578. * @param {number} [n=0] The index of the argument to return.
  16579. * @returns {Function} Returns the new pass-thru function.
  16580. * @example
  16581. *
  16582. * var func = _.nthArg(1);
  16583. * func('a', 'b', 'c', 'd');
  16584. * // => 'b'
  16585. *
  16586. * var func = _.nthArg(-2);
  16587. * func('a', 'b', 'c', 'd');
  16588. * // => 'c'
  16589. */
  16590. function nthArg(n) {
  16591. n = toInteger(n);
  16592. return baseRest(function(args) {
  16593. return baseNth(args, n);
  16594. });
  16595. }
  16596. /**
  16597. * Creates a function that invokes `iteratees` with the arguments it receives
  16598. * and returns their results.
  16599. *
  16600. * @static
  16601. * @memberOf _
  16602. * @since 4.0.0
  16603. * @category Util
  16604. * @param {...(Function|Function[])} [iteratees=[_.identity]]
  16605. * The iteratees to invoke.
  16606. * @returns {Function} Returns the new function.
  16607. * @example
  16608. *
  16609. * var func = _.over([Math.max, Math.min]);
  16610. *
  16611. * func(1, 2, 3, 4);
  16612. * // => [4, 1]
  16613. */
  16614. var over = createOver(arrayMap);
  16615. /**
  16616. * Creates a function that checks if **all** of the `predicates` return
  16617. * truthy when invoked with the arguments it receives.
  16618. *
  16619. * Following shorthands are possible for providing predicates.
  16620. * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
  16621. * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
  16622. *
  16623. * @static
  16624. * @memberOf _
  16625. * @since 4.0.0
  16626. * @category Util
  16627. * @param {...(Function|Function[])} [predicates=[_.identity]]
  16628. * The predicates to check.
  16629. * @returns {Function} Returns the new function.
  16630. * @example
  16631. *
  16632. * var func = _.overEvery([Boolean, isFinite]);
  16633. *
  16634. * func('1');
  16635. * // => true
  16636. *
  16637. * func(null);
  16638. * // => false
  16639. *
  16640. * func(NaN);
  16641. * // => false
  16642. */
  16643. var overEvery = createOver(arrayEvery);
  16644. /**
  16645. * Creates a function that checks if **any** of the `predicates` return
  16646. * truthy when invoked with the arguments it receives.
  16647. *
  16648. * Following shorthands are possible for providing predicates.
  16649. * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
  16650. * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
  16651. *
  16652. * @static
  16653. * @memberOf _
  16654. * @since 4.0.0
  16655. * @category Util
  16656. * @param {...(Function|Function[])} [predicates=[_.identity]]
  16657. * The predicates to check.
  16658. * @returns {Function} Returns the new function.
  16659. * @example
  16660. *
  16661. * var func = _.overSome([Boolean, isFinite]);
  16662. *
  16663. * func('1');
  16664. * // => true
  16665. *
  16666. * func(null);
  16667. * // => true
  16668. *
  16669. * func(NaN);
  16670. * // => false
  16671. *
  16672. * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])
  16673. * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])
  16674. */
  16675. var overSome = createOver(arraySome);
  16676. /**
  16677. * Creates a function that returns the value at `path` of a given object.
  16678. *
  16679. * @static
  16680. * @memberOf _
  16681. * @since 2.4.0
  16682. * @category Util
  16683. * @param {Array|string} path The path of the property to get.
  16684. * @returns {Function} Returns the new accessor function.
  16685. * @example
  16686. *
  16687. * var objects = [
  16688. * { 'a': { 'b': 2 } },
  16689. * { 'a': { 'b': 1 } }
  16690. * ];
  16691. *
  16692. * _.map(objects, _.property('a.b'));
  16693. * // => [2, 1]
  16694. *
  16695. * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
  16696. * // => [1, 2]
  16697. */
  16698. function property(path) {
  16699. return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
  16700. }
  16701. /**
  16702. * The opposite of `_.property`; this method creates a function that returns
  16703. * the value at a given path of `object`.
  16704. *
  16705. * @static
  16706. * @memberOf _
  16707. * @since 3.0.0
  16708. * @category Util
  16709. * @param {Object} object The object to query.
  16710. * @returns {Function} Returns the new accessor function.
  16711. * @example
  16712. *
  16713. * var array = [0, 1, 2],
  16714. * object = { 'a': array, 'b': array, 'c': array };
  16715. *
  16716. * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
  16717. * // => [2, 0]
  16718. *
  16719. * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
  16720. * // => [2, 0]
  16721. */
  16722. function propertyOf(object) {
  16723. return function(path) {
  16724. return object == null ? undefined : baseGet(object, path);
  16725. };
  16726. }
  16727. /**
  16728. * Creates an array of numbers (positive and/or negative) progressing from
  16729. * `start` up to, but not including, `end`. A step of `-1` is used if a negative
  16730. * `start` is specified without an `end` or `step`. If `end` is not specified,
  16731. * it's set to `start` with `start` then set to `0`.
  16732. *
  16733. * **Note:** JavaScript follows the IEEE-754 standard for resolving
  16734. * floating-point values which can produce unexpected results.
  16735. *
  16736. * @static
  16737. * @since 0.1.0
  16738. * @memberOf _
  16739. * @category Util
  16740. * @param {number} [start=0] The start of the range.
  16741. * @param {number} end The end of the range.
  16742. * @param {number} [step=1] The value to increment or decrement by.
  16743. * @returns {Array} Returns the range of numbers.
  16744. * @see _.inRange, _.rangeRight
  16745. * @example
  16746. *
  16747. * _.range(4);
  16748. * // => [0, 1, 2, 3]
  16749. *
  16750. * _.range(-4);
  16751. * // => [0, -1, -2, -3]
  16752. *
  16753. * _.range(1, 5);
  16754. * // => [1, 2, 3, 4]
  16755. *
  16756. * _.range(0, 20, 5);
  16757. * // => [0, 5, 10, 15]
  16758. *
  16759. * _.range(0, -4, -1);
  16760. * // => [0, -1, -2, -3]
  16761. *
  16762. * _.range(1, 4, 0);
  16763. * // => [1, 1, 1]
  16764. *
  16765. * _.range(0);
  16766. * // => []
  16767. */
  16768. var range = createRange();
  16769. /**
  16770. * This method is like `_.range` except that it populates values in
  16771. * descending order.
  16772. *
  16773. * @static
  16774. * @memberOf _
  16775. * @since 4.0.0
  16776. * @category Util
  16777. * @param {number} [start=0] The start of the range.
  16778. * @param {number} end The end of the range.
  16779. * @param {number} [step=1] The value to increment or decrement by.
  16780. * @returns {Array} Returns the range of numbers.
  16781. * @see _.inRange, _.range
  16782. * @example
  16783. *
  16784. * _.rangeRight(4);
  16785. * // => [3, 2, 1, 0]
  16786. *
  16787. * _.rangeRight(-4);
  16788. * // => [-3, -2, -1, 0]
  16789. *
  16790. * _.rangeRight(1, 5);
  16791. * // => [4, 3, 2, 1]
  16792. *
  16793. * _.rangeRight(0, 20, 5);
  16794. * // => [15, 10, 5, 0]
  16795. *
  16796. * _.rangeRight(0, -4, -1);
  16797. * // => [-3, -2, -1, 0]
  16798. *
  16799. * _.rangeRight(1, 4, 0);
  16800. * // => [1, 1, 1]
  16801. *
  16802. * _.rangeRight(0);
  16803. * // => []
  16804. */
  16805. var rangeRight = createRange(true);
  16806. /**
  16807. * This method returns a new empty array.
  16808. *
  16809. * @static
  16810. * @memberOf _
  16811. * @since 4.13.0
  16812. * @category Util
  16813. * @returns {Array} Returns the new empty array.
  16814. * @example
  16815. *
  16816. * var arrays = _.times(2, _.stubArray);
  16817. *
  16818. * console.log(arrays);
  16819. * // => [[], []]
  16820. *
  16821. * console.log(arrays[0] === arrays[1]);
  16822. * // => false
  16823. */
  16824. function stubArray() {
  16825. return [];
  16826. }
  16827. /**
  16828. * This method returns `false`.
  16829. *
  16830. * @static
  16831. * @memberOf _
  16832. * @since 4.13.0
  16833. * @category Util
  16834. * @returns {boolean} Returns `false`.
  16835. * @example
  16836. *
  16837. * _.times(2, _.stubFalse);
  16838. * // => [false, false]
  16839. */
  16840. function stubFalse() {
  16841. return false;
  16842. }
  16843. /**
  16844. * This method returns a new empty object.
  16845. *
  16846. * @static
  16847. * @memberOf _
  16848. * @since 4.13.0
  16849. * @category Util
  16850. * @returns {Object} Returns the new empty object.
  16851. * @example
  16852. *
  16853. * var objects = _.times(2, _.stubObject);
  16854. *
  16855. * console.log(objects);
  16856. * // => [{}, {}]
  16857. *
  16858. * console.log(objects[0] === objects[1]);
  16859. * // => false
  16860. */
  16861. function stubObject() {
  16862. return {};
  16863. }
  16864. /**
  16865. * This method returns an empty string.
  16866. *
  16867. * @static
  16868. * @memberOf _
  16869. * @since 4.13.0
  16870. * @category Util
  16871. * @returns {string} Returns the empty string.
  16872. * @example
  16873. *
  16874. * _.times(2, _.stubString);
  16875. * // => ['', '']
  16876. */
  16877. function stubString() {
  16878. return '';
  16879. }
  16880. /**
  16881. * This method returns `true`.
  16882. *
  16883. * @static
  16884. * @memberOf _
  16885. * @since 4.13.0
  16886. * @category Util
  16887. * @returns {boolean} Returns `true`.
  16888. * @example
  16889. *
  16890. * _.times(2, _.stubTrue);
  16891. * // => [true, true]
  16892. */
  16893. function stubTrue() {
  16894. return true;
  16895. }
  16896. /**
  16897. * Invokes the iteratee `n` times, returning an array of the results of
  16898. * each invocation. The iteratee is invoked with one argument; (index).
  16899. *
  16900. * @static
  16901. * @since 0.1.0
  16902. * @memberOf _
  16903. * @category Util
  16904. * @param {number} n The number of times to invoke `iteratee`.
  16905. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  16906. * @returns {Array} Returns the array of results.
  16907. * @example
  16908. *
  16909. * _.times(3, String);
  16910. * // => ['0', '1', '2']
  16911. *
  16912. * _.times(4, _.constant(0));
  16913. * // => [0, 0, 0, 0]
  16914. */
  16915. function times(n, iteratee) {
  16916. n = toInteger(n);
  16917. if (n < 1 || n > MAX_SAFE_INTEGER) {
  16918. return [];
  16919. }
  16920. var index = MAX_ARRAY_LENGTH,
  16921. length = nativeMin(n, MAX_ARRAY_LENGTH);
  16922. iteratee = getIteratee(iteratee);
  16923. n -= MAX_ARRAY_LENGTH;
  16924. var result = baseTimes(length, iteratee);
  16925. while (++index < n) {
  16926. iteratee(index);
  16927. }
  16928. return result;
  16929. }
  16930. /**
  16931. * Converts `value` to a property path array.
  16932. *
  16933. * @static
  16934. * @memberOf _
  16935. * @since 4.0.0
  16936. * @category Util
  16937. * @param {*} value The value to convert.
  16938. * @returns {Array} Returns the new property path array.
  16939. * @example
  16940. *
  16941. * _.toPath('a.b.c');
  16942. * // => ['a', 'b', 'c']
  16943. *
  16944. * _.toPath('a[0].b.c');
  16945. * // => ['a', '0', 'b', 'c']
  16946. */
  16947. function toPath(value) {
  16948. if (isArray(value)) {
  16949. return arrayMap(value, toKey);
  16950. }
  16951. return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
  16952. }
  16953. /**
  16954. * Generates a unique ID. If `prefix` is given, the ID is appended to it.
  16955. *
  16956. * @static
  16957. * @since 0.1.0
  16958. * @memberOf _
  16959. * @category Util
  16960. * @param {string} [prefix=''] The value to prefix the ID with.
  16961. * @returns {string} Returns the unique ID.
  16962. * @example
  16963. *
  16964. * _.uniqueId('contact_');
  16965. * // => 'contact_104'
  16966. *
  16967. * _.uniqueId();
  16968. * // => '105'
  16969. */
  16970. function uniqueId(prefix) {
  16971. var id = ++idCounter;
  16972. return toString(prefix) + id;
  16973. }
  16974. /*------------------------------------------------------------------------*/
  16975. /**
  16976. * Adds two numbers.
  16977. *
  16978. * @static
  16979. * @memberOf _
  16980. * @since 3.4.0
  16981. * @category Math
  16982. * @param {number} augend The first number in an addition.
  16983. * @param {number} addend The second number in an addition.
  16984. * @returns {number} Returns the total.
  16985. * @example
  16986. *
  16987. * _.add(6, 4);
  16988. * // => 10
  16989. */
  16990. var add = createMathOperation(function(augend, addend) {
  16991. return augend + addend;
  16992. }, 0);
  16993. /**
  16994. * Computes `number` rounded up to `precision`.
  16995. *
  16996. * @static
  16997. * @memberOf _
  16998. * @since 3.10.0
  16999. * @category Math
  17000. * @param {number} number The number to round up.
  17001. * @param {number} [precision=0] The precision to round up to.
  17002. * @returns {number} Returns the rounded up number.
  17003. * @example
  17004. *
  17005. * _.ceil(4.006);
  17006. * // => 5
  17007. *
  17008. * _.ceil(6.004, 2);
  17009. * // => 6.01
  17010. *
  17011. * _.ceil(6040, -2);
  17012. * // => 6100
  17013. */
  17014. var ceil = createRound('ceil');
  17015. /**
  17016. * Divide two numbers.
  17017. *
  17018. * @static
  17019. * @memberOf _
  17020. * @since 4.7.0
  17021. * @category Math
  17022. * @param {number} dividend The first number in a division.
  17023. * @param {number} divisor The second number in a division.
  17024. * @returns {number} Returns the quotient.
  17025. * @example
  17026. *
  17027. * _.divide(6, 4);
  17028. * // => 1.5
  17029. */
  17030. var divide = createMathOperation(function(dividend, divisor) {
  17031. return dividend / divisor;
  17032. }, 1);
  17033. /**
  17034. * Computes `number` rounded down to `precision`.
  17035. *
  17036. * @static
  17037. * @memberOf _
  17038. * @since 3.10.0
  17039. * @category Math
  17040. * @param {number} number The number to round down.
  17041. * @param {number} [precision=0] The precision to round down to.
  17042. * @returns {number} Returns the rounded down number.
  17043. * @example
  17044. *
  17045. * _.floor(4.006);
  17046. * // => 4
  17047. *
  17048. * _.floor(0.046, 2);
  17049. * // => 0.04
  17050. *
  17051. * _.floor(4060, -2);
  17052. * // => 4000
  17053. */
  17054. var floor = createRound('floor');
  17055. /**
  17056. * Computes the maximum value of `array`. If `array` is empty or falsey,
  17057. * `undefined` is returned.
  17058. *
  17059. * @static
  17060. * @since 0.1.0
  17061. * @memberOf _
  17062. * @category Math
  17063. * @param {Array} array The array to iterate over.
  17064. * @returns {*} Returns the maximum value.
  17065. * @example
  17066. *
  17067. * _.max([4, 2, 8, 6]);
  17068. * // => 8
  17069. *
  17070. * _.max([]);
  17071. * // => undefined
  17072. */
  17073. function max(array) {
  17074. return (array && array.length)
  17075. ? baseExtremum(array, identity, baseGt)
  17076. : undefined;
  17077. }
  17078. /**
  17079. * This method is like `_.max` except that it accepts `iteratee` which is
  17080. * invoked for each element in `array` to generate the criterion by which
  17081. * the value is ranked. The iteratee is invoked with one argument: (value).
  17082. *
  17083. * @static
  17084. * @memberOf _
  17085. * @since 4.0.0
  17086. * @category Math
  17087. * @param {Array} array The array to iterate over.
  17088. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  17089. * @returns {*} Returns the maximum value.
  17090. * @example
  17091. *
  17092. * var objects = [{ 'n': 1 }, { 'n': 2 }];
  17093. *
  17094. * _.maxBy(objects, function(o) { return o.n; });
  17095. * // => { 'n': 2 }
  17096. *
  17097. * // The `_.property` iteratee shorthand.
  17098. * _.maxBy(objects, 'n');
  17099. * // => { 'n': 2 }
  17100. */
  17101. function maxBy(array, iteratee) {
  17102. return (array && array.length)
  17103. ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)
  17104. : undefined;
  17105. }
  17106. /**
  17107. * Computes the mean of the values in `array`.
  17108. *
  17109. * @static
  17110. * @memberOf _
  17111. * @since 4.0.0
  17112. * @category Math
  17113. * @param {Array} array The array to iterate over.
  17114. * @returns {number} Returns the mean.
  17115. * @example
  17116. *
  17117. * _.mean([4, 2, 8, 6]);
  17118. * // => 5
  17119. */
  17120. function mean(array) {
  17121. return baseMean(array, identity);
  17122. }
  17123. /**
  17124. * This method is like `_.mean` except that it accepts `iteratee` which is
  17125. * invoked for each element in `array` to generate the value to be averaged.
  17126. * The iteratee is invoked with one argument: (value).
  17127. *
  17128. * @static
  17129. * @memberOf _
  17130. * @since 4.7.0
  17131. * @category Math
  17132. * @param {Array} array The array to iterate over.
  17133. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  17134. * @returns {number} Returns the mean.
  17135. * @example
  17136. *
  17137. * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
  17138. *
  17139. * _.meanBy(objects, function(o) { return o.n; });
  17140. * // => 5
  17141. *
  17142. * // The `_.property` iteratee shorthand.
  17143. * _.meanBy(objects, 'n');
  17144. * // => 5
  17145. */
  17146. function meanBy(array, iteratee) {
  17147. return baseMean(array, getIteratee(iteratee, 2));
  17148. }
  17149. /**
  17150. * Computes the minimum value of `array`. If `array` is empty or falsey,
  17151. * `undefined` is returned.
  17152. *
  17153. * @static
  17154. * @since 0.1.0
  17155. * @memberOf _
  17156. * @category Math
  17157. * @param {Array} array The array to iterate over.
  17158. * @returns {*} Returns the minimum value.
  17159. * @example
  17160. *
  17161. * _.min([4, 2, 8, 6]);
  17162. * // => 2
  17163. *
  17164. * _.min([]);
  17165. * // => undefined
  17166. */
  17167. function min(array) {
  17168. return (array && array.length)
  17169. ? baseExtremum(array, identity, baseLt)
  17170. : undefined;
  17171. }
  17172. /**
  17173. * This method is like `_.min` except that it accepts `iteratee` which is
  17174. * invoked for each element in `array` to generate the criterion by which
  17175. * the value is ranked. The iteratee is invoked with one argument: (value).
  17176. *
  17177. * @static
  17178. * @memberOf _
  17179. * @since 4.0.0
  17180. * @category Math
  17181. * @param {Array} array The array to iterate over.
  17182. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  17183. * @returns {*} Returns the minimum value.
  17184. * @example
  17185. *
  17186. * var objects = [{ 'n': 1 }, { 'n': 2 }];
  17187. *
  17188. * _.minBy(objects, function(o) { return o.n; });
  17189. * // => { 'n': 1 }
  17190. *
  17191. * // The `_.property` iteratee shorthand.
  17192. * _.minBy(objects, 'n');
  17193. * // => { 'n': 1 }
  17194. */
  17195. function minBy(array, iteratee) {
  17196. return (array && array.length)
  17197. ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)
  17198. : undefined;
  17199. }
  17200. /**
  17201. * Multiply two numbers.
  17202. *
  17203. * @static
  17204. * @memberOf _
  17205. * @since 4.7.0
  17206. * @category Math
  17207. * @param {number} multiplier The first number in a multiplication.
  17208. * @param {number} multiplicand The second number in a multiplication.
  17209. * @returns {number} Returns the product.
  17210. * @example
  17211. *
  17212. * _.multiply(6, 4);
  17213. * // => 24
  17214. */
  17215. var multiply = createMathOperation(function(multiplier, multiplicand) {
  17216. return multiplier * multiplicand;
  17217. }, 1);
  17218. /**
  17219. * Computes `number` rounded to `precision`.
  17220. *
  17221. * @static
  17222. * @memberOf _
  17223. * @since 3.10.0
  17224. * @category Math
  17225. * @param {number} number The number to round.
  17226. * @param {number} [precision=0] The precision to round to.
  17227. * @returns {number} Returns the rounded number.
  17228. * @example
  17229. *
  17230. * _.round(4.006);
  17231. * // => 4
  17232. *
  17233. * _.round(4.006, 2);
  17234. * // => 4.01
  17235. *
  17236. * _.round(4060, -2);
  17237. * // => 4100
  17238. */
  17239. var round = createRound('round');
  17240. /**
  17241. * Subtract two numbers.
  17242. *
  17243. * @static
  17244. * @memberOf _
  17245. * @since 4.0.0
  17246. * @category Math
  17247. * @param {number} minuend The first number in a subtraction.
  17248. * @param {number} subtrahend The second number in a subtraction.
  17249. * @returns {number} Returns the difference.
  17250. * @example
  17251. *
  17252. * _.subtract(6, 4);
  17253. * // => 2
  17254. */
  17255. var subtract = createMathOperation(function(minuend, subtrahend) {
  17256. return minuend - subtrahend;
  17257. }, 0);
  17258. /**
  17259. * Computes the sum of the values in `array`.
  17260. *
  17261. * @static
  17262. * @memberOf _
  17263. * @since 3.4.0
  17264. * @category Math
  17265. * @param {Array} array The array to iterate over.
  17266. * @returns {number} Returns the sum.
  17267. * @example
  17268. *
  17269. * _.sum([4, 2, 8, 6]);
  17270. * // => 20
  17271. */
  17272. function sum(array) {
  17273. return (array && array.length)
  17274. ? baseSum(array, identity)
  17275. : 0;
  17276. }
  17277. /**
  17278. * This method is like `_.sum` except that it accepts `iteratee` which is
  17279. * invoked for each element in `array` to generate the value to be summed.
  17280. * The iteratee is invoked with one argument: (value).
  17281. *
  17282. * @static
  17283. * @memberOf _
  17284. * @since 4.0.0
  17285. * @category Math
  17286. * @param {Array} array The array to iterate over.
  17287. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  17288. * @returns {number} Returns the sum.
  17289. * @example
  17290. *
  17291. * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
  17292. *
  17293. * _.sumBy(objects, function(o) { return o.n; });
  17294. * // => 20
  17295. *
  17296. * // The `_.property` iteratee shorthand.
  17297. * _.sumBy(objects, 'n');
  17298. * // => 20
  17299. */
  17300. function sumBy(array, iteratee) {
  17301. return (array && array.length)
  17302. ? baseSum(array, getIteratee(iteratee, 2))
  17303. : 0;
  17304. }
  17305. /*------------------------------------------------------------------------*/
  17306. // Add methods that return wrapped values in chain sequences.
  17307. lodash.after = after;
  17308. lodash.ary = ary;
  17309. lodash.assign = assign;
  17310. lodash.assignIn = assignIn;
  17311. lodash.assignInWith = assignInWith;
  17312. lodash.assignWith = assignWith;
  17313. lodash.at = at;
  17314. lodash.before = before;
  17315. lodash.bind = bind;
  17316. lodash.bindAll = bindAll;
  17317. lodash.bindKey = bindKey;
  17318. lodash.castArray = castArray;
  17319. lodash.chain = chain;
  17320. lodash.chunk = chunk;
  17321. lodash.compact = compact;
  17322. lodash.concat = concat;
  17323. lodash.cond = cond;
  17324. lodash.conforms = conforms;
  17325. lodash.constant = constant;
  17326. lodash.countBy = countBy;
  17327. lodash.create = create;
  17328. lodash.curry = curry;
  17329. lodash.curryRight = curryRight;
  17330. lodash.debounce = debounce;
  17331. lodash.defaults = defaults;
  17332. lodash.defaultsDeep = defaultsDeep;
  17333. lodash.defer = defer;
  17334. lodash.delay = delay;
  17335. lodash.difference = difference;
  17336. lodash.differenceBy = differenceBy;
  17337. lodash.differenceWith = differenceWith;
  17338. lodash.drop = drop;
  17339. lodash.dropRight = dropRight;
  17340. lodash.dropRightWhile = dropRightWhile;
  17341. lodash.dropWhile = dropWhile;
  17342. lodash.fill = fill;
  17343. lodash.filter = filter;
  17344. lodash.flatMap = flatMap;
  17345. lodash.flatMapDeep = flatMapDeep;
  17346. lodash.flatMapDepth = flatMapDepth;
  17347. lodash.flatten = flatten;
  17348. lodash.flattenDeep = flattenDeep;
  17349. lodash.flattenDepth = flattenDepth;
  17350. lodash.flip = flip;
  17351. lodash.flow = flow;
  17352. lodash.flowRight = flowRight;
  17353. lodash.fromPairs = fromPairs;
  17354. lodash.functions = functions;
  17355. lodash.functionsIn = functionsIn;
  17356. lodash.groupBy = groupBy;
  17357. lodash.initial = initial;
  17358. lodash.intersection = intersection;
  17359. lodash.intersectionBy = intersectionBy;
  17360. lodash.intersectionWith = intersectionWith;
  17361. lodash.invert = invert;
  17362. lodash.invertBy = invertBy;
  17363. lodash.invokeMap = invokeMap;
  17364. lodash.iteratee = iteratee;
  17365. lodash.keyBy = keyBy;
  17366. lodash.keys = keys;
  17367. lodash.keysIn = keysIn;
  17368. lodash.map = map;
  17369. lodash.mapKeys = mapKeys;
  17370. lodash.mapValues = mapValues;
  17371. lodash.matches = matches;
  17372. lodash.matchesProperty = matchesProperty;
  17373. lodash.memoize = memoize;
  17374. lodash.merge = merge;
  17375. lodash.mergeWith = mergeWith;
  17376. lodash.method = method;
  17377. lodash.methodOf = methodOf;
  17378. lodash.mixin = mixin;
  17379. lodash.negate = negate;
  17380. lodash.nthArg = nthArg;
  17381. lodash.omit = omit;
  17382. lodash.omitBy = omitBy;
  17383. lodash.once = once;
  17384. lodash.orderBy = orderBy;
  17385. lodash.over = over;
  17386. lodash.overArgs = overArgs;
  17387. lodash.overEvery = overEvery;
  17388. lodash.overSome = overSome;
  17389. lodash.partial = partial;
  17390. lodash.partialRight = partialRight;
  17391. lodash.partition = partition;
  17392. lodash.pick = pick;
  17393. lodash.pickBy = pickBy;
  17394. lodash.property = property;
  17395. lodash.propertyOf = propertyOf;
  17396. lodash.pull = pull;
  17397. lodash.pullAll = pullAll;
  17398. lodash.pullAllBy = pullAllBy;
  17399. lodash.pullAllWith = pullAllWith;
  17400. lodash.pullAt = pullAt;
  17401. lodash.range = range;
  17402. lodash.rangeRight = rangeRight;
  17403. lodash.rearg = rearg;
  17404. lodash.reject = reject;
  17405. lodash.remove = remove;
  17406. lodash.rest = rest;
  17407. lodash.reverse = reverse;
  17408. lodash.sampleSize = sampleSize;
  17409. lodash.set = set;
  17410. lodash.setWith = setWith;
  17411. lodash.shuffle = shuffle;
  17412. lodash.slice = slice;
  17413. lodash.sortBy = sortBy;
  17414. lodash.sortedUniq = sortedUniq;
  17415. lodash.sortedUniqBy = sortedUniqBy;
  17416. lodash.split = split;
  17417. lodash.spread = spread;
  17418. lodash.tail = tail;
  17419. lodash.take = take;
  17420. lodash.takeRight = takeRight;
  17421. lodash.takeRightWhile = takeRightWhile;
  17422. lodash.takeWhile = takeWhile;
  17423. lodash.tap = tap;
  17424. lodash.throttle = throttle;
  17425. lodash.thru = thru;
  17426. lodash.toArray = toArray;
  17427. lodash.toPairs = toPairs;
  17428. lodash.toPairsIn = toPairsIn;
  17429. lodash.toPath = toPath;
  17430. lodash.toPlainObject = toPlainObject;
  17431. lodash.transform = transform;
  17432. lodash.unary = unary;
  17433. lodash.union = union;
  17434. lodash.unionBy = unionBy;
  17435. lodash.unionWith = unionWith;
  17436. lodash.uniq = uniq;
  17437. lodash.uniqBy = uniqBy;
  17438. lodash.uniqWith = uniqWith;
  17439. lodash.unset = unset;
  17440. lodash.unzip = unzip;
  17441. lodash.unzipWith = unzipWith;
  17442. lodash.update = update;
  17443. lodash.updateWith = updateWith;
  17444. lodash.values = values;
  17445. lodash.valuesIn = valuesIn;
  17446. lodash.without = without;
  17447. lodash.words = words;
  17448. lodash.wrap = wrap;
  17449. lodash.xor = xor;
  17450. lodash.xorBy = xorBy;
  17451. lodash.xorWith = xorWith;
  17452. lodash.zip = zip;
  17453. lodash.zipObject = zipObject;
  17454. lodash.zipObjectDeep = zipObjectDeep;
  17455. lodash.zipWith = zipWith;
  17456. // Add aliases.
  17457. lodash.entries = toPairs;
  17458. lodash.entriesIn = toPairsIn;
  17459. lodash.extend = assignIn;
  17460. lodash.extendWith = assignInWith;
  17461. // Add methods to `lodash.prototype`.
  17462. mixin(lodash, lodash);
  17463. /*------------------------------------------------------------------------*/
  17464. // Add methods that return unwrapped values in chain sequences.
  17465. lodash.add = add;
  17466. lodash.attempt = attempt;
  17467. lodash.camelCase = camelCase;
  17468. lodash.capitalize = capitalize;
  17469. lodash.ceil = ceil;
  17470. lodash.clamp = clamp;
  17471. lodash.clone = clone;
  17472. lodash.cloneDeep = cloneDeep;
  17473. lodash.cloneDeepWith = cloneDeepWith;
  17474. lodash.cloneWith = cloneWith;
  17475. lodash.conformsTo = conformsTo;
  17476. lodash.deburr = deburr;
  17477. lodash.defaultTo = defaultTo;
  17478. lodash.divide = divide;
  17479. lodash.endsWith = endsWith;
  17480. lodash.eq = eq;
  17481. lodash.escape = escape;
  17482. lodash.escapeRegExp = escapeRegExp;
  17483. lodash.every = every;
  17484. lodash.find = find;
  17485. lodash.findIndex = findIndex;
  17486. lodash.findKey = findKey;
  17487. lodash.findLast = findLast;
  17488. lodash.findLastIndex = findLastIndex;
  17489. lodash.findLastKey = findLastKey;
  17490. lodash.floor = floor;
  17491. lodash.forEach = forEach;
  17492. lodash.forEachRight = forEachRight;
  17493. lodash.forIn = forIn;
  17494. lodash.forInRight = forInRight;
  17495. lodash.forOwn = forOwn;
  17496. lodash.forOwnRight = forOwnRight;
  17497. lodash.get = get;
  17498. lodash.gt = gt;
  17499. lodash.gte = gte;
  17500. lodash.has = has;
  17501. lodash.hasIn = hasIn;
  17502. lodash.head = head;
  17503. lodash.identity = identity;
  17504. lodash.includes = includes;
  17505. lodash.indexOf = indexOf;
  17506. lodash.inRange = inRange;
  17507. lodash.invoke = invoke;
  17508. lodash.isArguments = isArguments;
  17509. lodash.isArray = isArray;
  17510. lodash.isArrayBuffer = isArrayBuffer;
  17511. lodash.isArrayLike = isArrayLike;
  17512. lodash.isArrayLikeObject = isArrayLikeObject;
  17513. lodash.isBoolean = isBoolean;
  17514. lodash.isBuffer = isBuffer;
  17515. lodash.isDate = isDate;
  17516. lodash.isElement = isElement;
  17517. lodash.isEmpty = isEmpty;
  17518. lodash.isEqual = isEqual;
  17519. lodash.isEqualWith = isEqualWith;
  17520. lodash.isError = isError;
  17521. lodash.isFinite = isFinite;
  17522. lodash.isFunction = isFunction;
  17523. lodash.isInteger = isInteger;
  17524. lodash.isLength = isLength;
  17525. lodash.isMap = isMap;
  17526. lodash.isMatch = isMatch;
  17527. lodash.isMatchWith = isMatchWith;
  17528. lodash.isNaN = isNaN;
  17529. lodash.isNative = isNative;
  17530. lodash.isNil = isNil;
  17531. lodash.isNull = isNull;
  17532. lodash.isNumber = isNumber;
  17533. lodash.isObject = isObject;
  17534. lodash.isObjectLike = isObjectLike;
  17535. lodash.isPlainObject = isPlainObject;
  17536. lodash.isRegExp = isRegExp;
  17537. lodash.isSafeInteger = isSafeInteger;
  17538. lodash.isSet = isSet;
  17539. lodash.isString = isString;
  17540. lodash.isSymbol = isSymbol;
  17541. lodash.isTypedArray = isTypedArray;
  17542. lodash.isUndefined = isUndefined;
  17543. lodash.isWeakMap = isWeakMap;
  17544. lodash.isWeakSet = isWeakSet;
  17545. lodash.join = join;
  17546. lodash.kebabCase = kebabCase;
  17547. lodash.last = last;
  17548. lodash.lastIndexOf = lastIndexOf;
  17549. lodash.lowerCase = lowerCase;
  17550. lodash.lowerFirst = lowerFirst;
  17551. lodash.lt = lt;
  17552. lodash.lte = lte;
  17553. lodash.max = max;
  17554. lodash.maxBy = maxBy;
  17555. lodash.mean = mean;
  17556. lodash.meanBy = meanBy;
  17557. lodash.min = min;
  17558. lodash.minBy = minBy;
  17559. lodash.stubArray = stubArray;
  17560. lodash.stubFalse = stubFalse;
  17561. lodash.stubObject = stubObject;
  17562. lodash.stubString = stubString;
  17563. lodash.stubTrue = stubTrue;
  17564. lodash.multiply = multiply;
  17565. lodash.nth = nth;
  17566. lodash.noConflict = noConflict;
  17567. lodash.noop = noop;
  17568. lodash.now = now;
  17569. lodash.pad = pad;
  17570. lodash.padEnd = padEnd;
  17571. lodash.padStart = padStart;
  17572. lodash.parseInt = parseInt;
  17573. lodash.random = random;
  17574. lodash.reduce = reduce;
  17575. lodash.reduceRight = reduceRight;
  17576. lodash.repeat = repeat;
  17577. lodash.replace = replace;
  17578. lodash.result = result;
  17579. lodash.round = round;
  17580. lodash.runInContext = runInContext;
  17581. lodash.sample = sample;
  17582. lodash.size = size;
  17583. lodash.snakeCase = snakeCase;
  17584. lodash.some = some;
  17585. lodash.sortedIndex = sortedIndex;
  17586. lodash.sortedIndexBy = sortedIndexBy;
  17587. lodash.sortedIndexOf = sortedIndexOf;
  17588. lodash.sortedLastIndex = sortedLastIndex;
  17589. lodash.sortedLastIndexBy = sortedLastIndexBy;
  17590. lodash.sortedLastIndexOf = sortedLastIndexOf;
  17591. lodash.startCase = startCase;
  17592. lodash.startsWith = startsWith;
  17593. lodash.subtract = subtract;
  17594. lodash.sum = sum;
  17595. lodash.sumBy = sumBy;
  17596. lodash.template = template;
  17597. lodash.times = times;
  17598. lodash.toFinite = toFinite;
  17599. lodash.toInteger = toInteger;
  17600. lodash.toLength = toLength;
  17601. lodash.toLower = toLower;
  17602. lodash.toNumber = toNumber;
  17603. lodash.toSafeInteger = toSafeInteger;
  17604. lodash.toString = toString;
  17605. lodash.toUpper = toUpper;
  17606. lodash.trim = trim;
  17607. lodash.trimEnd = trimEnd;
  17608. lodash.trimStart = trimStart;
  17609. lodash.truncate = truncate;
  17610. lodash.unescape = unescape;
  17611. lodash.uniqueId = uniqueId;
  17612. lodash.upperCase = upperCase;
  17613. lodash.upperFirst = upperFirst;
  17614. // Add aliases.
  17615. lodash.each = forEach;
  17616. lodash.eachRight = forEachRight;
  17617. lodash.first = head;
  17618. mixin(lodash, (function() {
  17619. var source = {};
  17620. baseForOwn(lodash, function(func, methodName) {
  17621. if (!hasOwnProperty.call(lodash.prototype, methodName)) {
  17622. source[methodName] = func;
  17623. }
  17624. });
  17625. return source;
  17626. }()), { 'chain': false });
  17627. /*------------------------------------------------------------------------*/
  17628. /**
  17629. * The semantic version number.
  17630. *
  17631. * @static
  17632. * @memberOf _
  17633. * @type {string}
  17634. */
  17635. lodash.VERSION = VERSION;
  17636. // Assign default placeholders.
  17637. arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
  17638. lodash[methodName].placeholder = lodash;
  17639. });
  17640. // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
  17641. arrayEach(['drop', 'take'], function(methodName, index) {
  17642. LazyWrapper.prototype[methodName] = function(n) {
  17643. n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
  17644. var result = (this.__filtered__ && !index)
  17645. ? new LazyWrapper(this)
  17646. : this.clone();
  17647. if (result.__filtered__) {
  17648. result.__takeCount__ = nativeMin(n, result.__takeCount__);
  17649. } else {
  17650. result.__views__.push({
  17651. 'size': nativeMin(n, MAX_ARRAY_LENGTH),
  17652. 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')
  17653. });
  17654. }
  17655. return result;
  17656. };
  17657. LazyWrapper.prototype[methodName + 'Right'] = function(n) {
  17658. return this.reverse()[methodName](n).reverse();
  17659. };
  17660. });
  17661. // Add `LazyWrapper` methods that accept an `iteratee` value.
  17662. arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
  17663. var type = index + 1,
  17664. isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
  17665. LazyWrapper.prototype[methodName] = function(iteratee) {
  17666. var result = this.clone();
  17667. result.__iteratees__.push({
  17668. 'iteratee': getIteratee(iteratee, 3),
  17669. 'type': type
  17670. });
  17671. result.__filtered__ = result.__filtered__ || isFilter;
  17672. return result;
  17673. };
  17674. });
  17675. // Add `LazyWrapper` methods for `_.head` and `_.last`.
  17676. arrayEach(['head', 'last'], function(methodName, index) {
  17677. var takeName = 'take' + (index ? 'Right' : '');
  17678. LazyWrapper.prototype[methodName] = function() {
  17679. return this[takeName](1).value()[0];
  17680. };
  17681. });
  17682. // Add `LazyWrapper` methods for `_.initial` and `_.tail`.
  17683. arrayEach(['initial', 'tail'], function(methodName, index) {
  17684. var dropName = 'drop' + (index ? '' : 'Right');
  17685. LazyWrapper.prototype[methodName] = function() {
  17686. return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
  17687. };
  17688. });
  17689. LazyWrapper.prototype.compact = function() {
  17690. return this.filter(identity);
  17691. };
  17692. LazyWrapper.prototype.find = function(predicate) {
  17693. return this.filter(predicate).head();
  17694. };
  17695. LazyWrapper.prototype.findLast = function(predicate) {
  17696. return this.reverse().find(predicate);
  17697. };
  17698. LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
  17699. if (typeof path == 'function') {
  17700. return new LazyWrapper(this);
  17701. }
  17702. return this.map(function(value) {
  17703. return baseInvoke(value, path, args);
  17704. });
  17705. });
  17706. LazyWrapper.prototype.reject = function(predicate) {
  17707. return this.filter(negate(getIteratee(predicate)));
  17708. };
  17709. LazyWrapper.prototype.slice = function(start, end) {
  17710. start = toInteger(start);
  17711. var result = this;
  17712. if (result.__filtered__ && (start > 0 || end < 0)) {
  17713. return new LazyWrapper(result);
  17714. }
  17715. if (start < 0) {
  17716. result = result.takeRight(-start);
  17717. } else if (start) {
  17718. result = result.drop(start);
  17719. }
  17720. if (end !== undefined) {
  17721. end = toInteger(end);
  17722. result = end < 0 ? result.dropRight(-end) : result.take(end - start);
  17723. }
  17724. return result;
  17725. };
  17726. LazyWrapper.prototype.takeRightWhile = function(predicate) {
  17727. return this.reverse().takeWhile(predicate).reverse();
  17728. };
  17729. LazyWrapper.prototype.toArray = function() {
  17730. return this.take(MAX_ARRAY_LENGTH);
  17731. };
  17732. // Add `LazyWrapper` methods to `lodash.prototype`.
  17733. baseForOwn(LazyWrapper.prototype, function(func, methodName) {
  17734. var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),
  17735. isTaker = /^(?:head|last)$/.test(methodName),
  17736. lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],
  17737. retUnwrapped = isTaker || /^find/.test(methodName);
  17738. if (!lodashFunc) {
  17739. return;
  17740. }
  17741. lodash.prototype[methodName] = function() {
  17742. var value = this.__wrapped__,
  17743. args = isTaker ? [1] : arguments,
  17744. isLazy = value instanceof LazyWrapper,
  17745. iteratee = args[0],
  17746. useLazy = isLazy || isArray(value);
  17747. var interceptor = function(value) {
  17748. var result = lodashFunc.apply(lodash, arrayPush([value], args));
  17749. return (isTaker && chainAll) ? result[0] : result;
  17750. };
  17751. if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
  17752. // Avoid lazy use if the iteratee has a "length" value other than `1`.
  17753. isLazy = useLazy = false;
  17754. }
  17755. var chainAll = this.__chain__,
  17756. isHybrid = !!this.__actions__.length,
  17757. isUnwrapped = retUnwrapped && !chainAll,
  17758. onlyLazy = isLazy && !isHybrid;
  17759. if (!retUnwrapped && useLazy) {
  17760. value = onlyLazy ? value : new LazyWrapper(this);
  17761. var result = func.apply(value, args);
  17762. result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
  17763. return new LodashWrapper(result, chainAll);
  17764. }
  17765. if (isUnwrapped && onlyLazy) {
  17766. return func.apply(this, args);
  17767. }
  17768. result = this.thru(interceptor);
  17769. return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;
  17770. };
  17771. });
  17772. // Add `Array` methods to `lodash.prototype`.
  17773. arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
  17774. var func = arrayProto[methodName],
  17775. chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
  17776. retUnwrapped = /^(?:pop|shift)$/.test(methodName);
  17777. lodash.prototype[methodName] = function() {
  17778. var args = arguments;
  17779. if (retUnwrapped && !this.__chain__) {
  17780. var value = this.value();
  17781. return func.apply(isArray(value) ? value : [], args);
  17782. }
  17783. return this[chainName](function(value) {
  17784. return func.apply(isArray(value) ? value : [], args);
  17785. });
  17786. };
  17787. });
  17788. // Map minified method names to their real names.
  17789. baseForOwn(LazyWrapper.prototype, function(func, methodName) {
  17790. var lodashFunc = lodash[methodName];
  17791. if (lodashFunc) {
  17792. var key = lodashFunc.name + '';
  17793. if (!hasOwnProperty.call(realNames, key)) {
  17794. realNames[key] = [];
  17795. }
  17796. realNames[key].push({ 'name': methodName, 'func': lodashFunc });
  17797. }
  17798. });
  17799. realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{
  17800. 'name': 'wrapper',
  17801. 'func': undefined
  17802. }];
  17803. // Add methods to `LazyWrapper`.
  17804. LazyWrapper.prototype.clone = lazyClone;
  17805. LazyWrapper.prototype.reverse = lazyReverse;
  17806. LazyWrapper.prototype.value = lazyValue;
  17807. // Add chain sequence methods to the `lodash` wrapper.
  17808. lodash.prototype.at = wrapperAt;
  17809. lodash.prototype.chain = wrapperChain;
  17810. lodash.prototype.commit = wrapperCommit;
  17811. lodash.prototype.next = wrapperNext;
  17812. lodash.prototype.plant = wrapperPlant;
  17813. lodash.prototype.reverse = wrapperReverse;
  17814. lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
  17815. // Add lazy aliases.
  17816. lodash.prototype.first = lodash.prototype.head;
  17817. if (symIterator) {
  17818. lodash.prototype[symIterator] = wrapperToIterator;
  17819. }
  17820. return lodash;
  17821. });
  17822. /*--------------------------------------------------------------------------*/
  17823. // Export lodash.
  17824. var _ = runInContext();
  17825. // Some AMD build optimizers, like r.js, check for condition patterns like:
  17826. if (true) {
  17827. // Expose Lodash on the global object to prevent errors when Lodash is
  17828. // loaded by a script tag in the presence of an AMD loader.
  17829. // See http://requirejs.org/docs/errors.html#mismatch for more details.
  17830. // Use `_.noConflict` to remove Lodash from the global object.
  17831. root._ = _;
  17832. // Define as an anonymous module so, through path mapping, it can be
  17833. // referenced as the "underscore" module.
  17834. !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {
  17835. return _;
  17836. }).call(exports, __webpack_require__, exports, module),
  17837. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  17838. }
  17839. // Check for `exports` after `define` in case a build optimizer adds it.
  17840. else {}
  17841. }.call(this));
  17842. /***/ }),
  17843. /***/ "./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":
  17844. /*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  17845. !*** ./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 ***!
  17846. \***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  17847. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17848. "use strict";
  17849. __webpack_require__.r(__webpack_exports__);
  17850. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17851. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17852. /* harmony export */ });
  17853. /* 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");
  17854. /* 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__);
  17855. /* 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");
  17856. var options = {};
  17857. options.insert = "head";
  17858. options.singleton = false;
  17859. 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);
  17860. /* 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 || {});
  17861. /***/ }),
  17862. /***/ "./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":
  17863. /*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  17864. !*** ./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 ***!
  17865. \****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  17866. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17867. "use strict";
  17868. __webpack_require__.r(__webpack_exports__);
  17869. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17870. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17871. /* harmony export */ });
  17872. /* 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");
  17873. /* 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__);
  17874. /* 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");
  17875. var options = {};
  17876. options.insert = "head";
  17877. options.singleton = false;
  17878. 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);
  17879. /* 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 || {});
  17880. /***/ }),
  17881. /***/ "./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":
  17882. /*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  17883. !*** ./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 ***!
  17884. \*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  17885. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17886. "use strict";
  17887. __webpack_require__.r(__webpack_exports__);
  17888. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17889. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17890. /* harmony export */ });
  17891. /* 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");
  17892. /* 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__);
  17893. /* 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");
  17894. var options = {};
  17895. options.insert = "head";
  17896. options.singleton = false;
  17897. 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);
  17898. /* 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 || {});
  17899. /***/ }),
  17900. /***/ "./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":
  17901. /*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  17902. !*** ./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 ***!
  17903. \***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  17904. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17905. "use strict";
  17906. __webpack_require__.r(__webpack_exports__);
  17907. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17908. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17909. /* harmony export */ });
  17910. /* 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");
  17911. /* 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__);
  17912. /* 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");
  17913. var options = {};
  17914. options.insert = "head";
  17915. options.singleton = false;
  17916. 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);
  17917. /* 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 || {});
  17918. /***/ }),
  17919. /***/ "./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":
  17920. /*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  17921. !*** ./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 ***!
  17922. \******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  17923. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17924. "use strict";
  17925. __webpack_require__.r(__webpack_exports__);
  17926. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17927. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17928. /* harmony export */ });
  17929. /* 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");
  17930. /* 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__);
  17931. /* 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");
  17932. var options = {};
  17933. options.insert = "head";
  17934. options.singleton = false;
  17935. 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);
  17936. /* 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 || {});
  17937. /***/ }),
  17938. /***/ "./node_modules/vue-loader/dist/exportHelper.js":
  17939. /*!******************************************************!*\
  17940. !*** ./node_modules/vue-loader/dist/exportHelper.js ***!
  17941. \******************************************************/
  17942. /***/ ((__unused_webpack_module, exports) => {
  17943. "use strict";
  17944. Object.defineProperty(exports, "__esModule", ({ value: true }));
  17945. // runtime helper for setting properties on components
  17946. // in a tree-shakable way
  17947. exports["default"] = (sfc, props) => {
  17948. const target = sfc.__vccOpts || sfc;
  17949. for (const [key, val] of props) {
  17950. target[key] = val;
  17951. }
  17952. return target;
  17953. };
  17954. /***/ }),
  17955. /***/ "./resources/js/components/AppDropdown.vue":
  17956. /*!*************************************************!*\
  17957. !*** ./resources/js/components/AppDropdown.vue ***!
  17958. \*************************************************/
  17959. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17960. "use strict";
  17961. __webpack_require__.r(__webpack_exports__);
  17962. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17963. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17964. /* harmony export */ });
  17965. /* 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");
  17966. /* 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");
  17967. /* 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");
  17968. ;
  17969. 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"]])
  17970. /* hot reload */
  17971. if (false) {}
  17972. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17973. /***/ }),
  17974. /***/ "./resources/js/components/AppFooter.vue":
  17975. /*!***********************************************!*\
  17976. !*** ./resources/js/components/AppFooter.vue ***!
  17977. \***********************************************/
  17978. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17979. "use strict";
  17980. __webpack_require__.r(__webpack_exports__);
  17981. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  17982. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  17983. /* harmony export */ });
  17984. /* 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");
  17985. /* 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");
  17986. /* 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");
  17987. const script = {}
  17988. ;
  17989. 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"]])
  17990. /* hot reload */
  17991. if (false) {}
  17992. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  17993. /***/ }),
  17994. /***/ "./resources/js/components/AppInputText.vue":
  17995. /*!**************************************************!*\
  17996. !*** ./resources/js/components/AppInputText.vue ***!
  17997. \**************************************************/
  17998. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17999. "use strict";
  18000. __webpack_require__.r(__webpack_exports__);
  18001. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18002. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  18003. /* harmony export */ });
  18004. /* 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");
  18005. /* 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");
  18006. /* 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");
  18007. ;
  18008. 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"]])
  18009. /* hot reload */
  18010. if (false) {}
  18011. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  18012. /***/ }),
  18013. /***/ "./resources/js/components/AppMessage.vue":
  18014. /*!************************************************!*\
  18015. !*** ./resources/js/components/AppMessage.vue ***!
  18016. \************************************************/
  18017. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18018. "use strict";
  18019. __webpack_require__.r(__webpack_exports__);
  18020. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18021. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  18022. /* harmony export */ });
  18023. /* 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");
  18024. /* 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");
  18025. /* 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");
  18026. ;
  18027. 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"]])
  18028. /* hot reload */
  18029. if (false) {}
  18030. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  18031. /***/ }),
  18032. /***/ "./resources/js/components/AppSidebar.vue":
  18033. /*!************************************************!*\
  18034. !*** ./resources/js/components/AppSidebar.vue ***!
  18035. \************************************************/
  18036. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18037. "use strict";
  18038. __webpack_require__.r(__webpack_exports__);
  18039. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18040. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  18041. /* harmony export */ });
  18042. /* 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");
  18043. /* 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");
  18044. /* 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");
  18045. /* 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");
  18046. ;
  18047. 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"]])
  18048. /* hot reload */
  18049. if (false) {}
  18050. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  18051. /***/ }),
  18052. /***/ "./resources/js/components/AppSubSidebar.vue":
  18053. /*!***************************************************!*\
  18054. !*** ./resources/js/components/AppSubSidebar.vue ***!
  18055. \***************************************************/
  18056. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18057. "use strict";
  18058. __webpack_require__.r(__webpack_exports__);
  18059. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18060. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  18061. /* harmony export */ });
  18062. /* 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");
  18063. /* 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");
  18064. /* 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");
  18065. /* 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");
  18066. ;
  18067. 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"]])
  18068. /* hot reload */
  18069. if (false) {}
  18070. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  18071. /***/ }),
  18072. /***/ "./resources/js/components/AppTopBar.vue":
  18073. /*!***********************************************!*\
  18074. !*** ./resources/js/components/AppTopBar.vue ***!
  18075. \***********************************************/
  18076. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18077. "use strict";
  18078. __webpack_require__.r(__webpack_exports__);
  18079. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18080. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  18081. /* harmony export */ });
  18082. /* 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");
  18083. /* 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");
  18084. /* 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");
  18085. /* 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");
  18086. ;
  18087. 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"]])
  18088. /* hot reload */
  18089. if (false) {}
  18090. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  18091. /***/ }),
  18092. /***/ "./resources/js/layouts/DashboardLayout.vue":
  18093. /*!**************************************************!*\
  18094. !*** ./resources/js/layouts/DashboardLayout.vue ***!
  18095. \**************************************************/
  18096. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18097. "use strict";
  18098. __webpack_require__.r(__webpack_exports__);
  18099. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18100. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  18101. /* harmony export */ });
  18102. /* 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");
  18103. /* 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");
  18104. /* 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");
  18105. /* 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");
  18106. ;
  18107. 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"]])
  18108. /* hot reload */
  18109. if (false) {}
  18110. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  18111. /***/ }),
  18112. /***/ "./resources/js/pages/member/Edit.vue":
  18113. /*!********************************************!*\
  18114. !*** ./resources/js/pages/member/Edit.vue ***!
  18115. \********************************************/
  18116. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18117. "use strict";
  18118. __webpack_require__.r(__webpack_exports__);
  18119. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18120. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  18121. /* harmony export */ });
  18122. /* 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");
  18123. /* 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");
  18124. /* 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");
  18125. ;
  18126. 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"]])
  18127. /* hot reload */
  18128. if (false) {}
  18129. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
  18130. /***/ }),
  18131. /***/ "./resources/js/components/AppDropdown.vue?vue&type=script&setup=true&lang=js":
  18132. /*!************************************************************************************!*\
  18133. !*** ./resources/js/components/AppDropdown.vue?vue&type=script&setup=true&lang=js ***!
  18134. \************************************************************************************/
  18135. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18136. "use strict";
  18137. __webpack_require__.r(__webpack_exports__);
  18138. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18139. /* 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"])
  18140. /* harmony export */ });
  18141. /* 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");
  18142. /***/ }),
  18143. /***/ "./resources/js/components/AppInputText.vue?vue&type=script&setup=true&lang=js":
  18144. /*!*************************************************************************************!*\
  18145. !*** ./resources/js/components/AppInputText.vue?vue&type=script&setup=true&lang=js ***!
  18146. \*************************************************************************************/
  18147. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18148. "use strict";
  18149. __webpack_require__.r(__webpack_exports__);
  18150. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18151. /* 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"])
  18152. /* harmony export */ });
  18153. /* 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");
  18154. /***/ }),
  18155. /***/ "./resources/js/components/AppMessage.vue?vue&type=script&setup=true&lang=js":
  18156. /*!***********************************************************************************!*\
  18157. !*** ./resources/js/components/AppMessage.vue?vue&type=script&setup=true&lang=js ***!
  18158. \***********************************************************************************/
  18159. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18160. "use strict";
  18161. __webpack_require__.r(__webpack_exports__);
  18162. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18163. /* 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"])
  18164. /* harmony export */ });
  18165. /* 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");
  18166. /***/ }),
  18167. /***/ "./resources/js/components/AppSidebar.vue?vue&type=script&setup=true&lang=js":
  18168. /*!***********************************************************************************!*\
  18169. !*** ./resources/js/components/AppSidebar.vue?vue&type=script&setup=true&lang=js ***!
  18170. \***********************************************************************************/
  18171. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18172. "use strict";
  18173. __webpack_require__.r(__webpack_exports__);
  18174. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18175. /* 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"])
  18176. /* harmony export */ });
  18177. /* 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");
  18178. /***/ }),
  18179. /***/ "./resources/js/components/AppSubSidebar.vue?vue&type=script&setup=true&lang=js":
  18180. /*!**************************************************************************************!*\
  18181. !*** ./resources/js/components/AppSubSidebar.vue?vue&type=script&setup=true&lang=js ***!
  18182. \**************************************************************************************/
  18183. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18184. "use strict";
  18185. __webpack_require__.r(__webpack_exports__);
  18186. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18187. /* 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"])
  18188. /* harmony export */ });
  18189. /* 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");
  18190. /***/ }),
  18191. /***/ "./resources/js/components/AppTopBar.vue?vue&type=script&setup=true&lang=js":
  18192. /*!**********************************************************************************!*\
  18193. !*** ./resources/js/components/AppTopBar.vue?vue&type=script&setup=true&lang=js ***!
  18194. \**********************************************************************************/
  18195. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18196. "use strict";
  18197. __webpack_require__.r(__webpack_exports__);
  18198. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18199. /* 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"])
  18200. /* harmony export */ });
  18201. /* 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");
  18202. /***/ }),
  18203. /***/ "./resources/js/layouts/DashboardLayout.vue?vue&type=script&setup=true&lang=js":
  18204. /*!*************************************************************************************!*\
  18205. !*** ./resources/js/layouts/DashboardLayout.vue?vue&type=script&setup=true&lang=js ***!
  18206. \*************************************************************************************/
  18207. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18208. "use strict";
  18209. __webpack_require__.r(__webpack_exports__);
  18210. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18211. /* 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"])
  18212. /* harmony export */ });
  18213. /* 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");
  18214. /***/ }),
  18215. /***/ "./resources/js/pages/member/Edit.vue?vue&type=script&setup=true&lang=js":
  18216. /*!*******************************************************************************!*\
  18217. !*** ./resources/js/pages/member/Edit.vue?vue&type=script&setup=true&lang=js ***!
  18218. \*******************************************************************************/
  18219. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18220. "use strict";
  18221. __webpack_require__.r(__webpack_exports__);
  18222. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18223. /* 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"])
  18224. /* harmony export */ });
  18225. /* 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");
  18226. /***/ }),
  18227. /***/ "./resources/js/components/AppDropdown.vue?vue&type=template&id=ce0d1992":
  18228. /*!*******************************************************************************!*\
  18229. !*** ./resources/js/components/AppDropdown.vue?vue&type=template&id=ce0d1992 ***!
  18230. \*******************************************************************************/
  18231. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18232. "use strict";
  18233. __webpack_require__.r(__webpack_exports__);
  18234. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18235. /* 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)
  18236. /* harmony export */ });
  18237. /* 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");
  18238. /***/ }),
  18239. /***/ "./resources/js/components/AppFooter.vue?vue&type=template&id=4ab6097e&scoped=true":
  18240. /*!*****************************************************************************************!*\
  18241. !*** ./resources/js/components/AppFooter.vue?vue&type=template&id=4ab6097e&scoped=true ***!
  18242. \*****************************************************************************************/
  18243. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18244. "use strict";
  18245. __webpack_require__.r(__webpack_exports__);
  18246. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18247. /* 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)
  18248. /* harmony export */ });
  18249. /* 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");
  18250. /***/ }),
  18251. /***/ "./resources/js/components/AppInputText.vue?vue&type=template&id=16729fe1":
  18252. /*!********************************************************************************!*\
  18253. !*** ./resources/js/components/AppInputText.vue?vue&type=template&id=16729fe1 ***!
  18254. \********************************************************************************/
  18255. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18256. "use strict";
  18257. __webpack_require__.r(__webpack_exports__);
  18258. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18259. /* 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)
  18260. /* harmony export */ });
  18261. /* 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");
  18262. /***/ }),
  18263. /***/ "./resources/js/components/AppMessage.vue?vue&type=template&id=07159051":
  18264. /*!******************************************************************************!*\
  18265. !*** ./resources/js/components/AppMessage.vue?vue&type=template&id=07159051 ***!
  18266. \******************************************************************************/
  18267. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18268. "use strict";
  18269. __webpack_require__.r(__webpack_exports__);
  18270. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18271. /* 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)
  18272. /* harmony export */ });
  18273. /* 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");
  18274. /***/ }),
  18275. /***/ "./resources/js/components/AppSidebar.vue?vue&type=template&id=22a4e926&scoped=true":
  18276. /*!******************************************************************************************!*\
  18277. !*** ./resources/js/components/AppSidebar.vue?vue&type=template&id=22a4e926&scoped=true ***!
  18278. \******************************************************************************************/
  18279. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18280. "use strict";
  18281. __webpack_require__.r(__webpack_exports__);
  18282. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18283. /* 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)
  18284. /* harmony export */ });
  18285. /* 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");
  18286. /***/ }),
  18287. /***/ "./resources/js/components/AppSubSidebar.vue?vue&type=template&id=0addd9bc&scoped=true":
  18288. /*!*********************************************************************************************!*\
  18289. !*** ./resources/js/components/AppSubSidebar.vue?vue&type=template&id=0addd9bc&scoped=true ***!
  18290. \*********************************************************************************************/
  18291. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18292. "use strict";
  18293. __webpack_require__.r(__webpack_exports__);
  18294. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18295. /* 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)
  18296. /* harmony export */ });
  18297. /* 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");
  18298. /***/ }),
  18299. /***/ "./resources/js/components/AppTopBar.vue?vue&type=template&id=42bf62a4&scoped=true":
  18300. /*!*****************************************************************************************!*\
  18301. !*** ./resources/js/components/AppTopBar.vue?vue&type=template&id=42bf62a4&scoped=true ***!
  18302. \*****************************************************************************************/
  18303. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18304. "use strict";
  18305. __webpack_require__.r(__webpack_exports__);
  18306. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18307. /* 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)
  18308. /* harmony export */ });
  18309. /* 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");
  18310. /***/ }),
  18311. /***/ "./resources/js/layouts/DashboardLayout.vue?vue&type=template&id=549bf5ac&scoped=true":
  18312. /*!********************************************************************************************!*\
  18313. !*** ./resources/js/layouts/DashboardLayout.vue?vue&type=template&id=549bf5ac&scoped=true ***!
  18314. \********************************************************************************************/
  18315. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18316. "use strict";
  18317. __webpack_require__.r(__webpack_exports__);
  18318. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18319. /* 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)
  18320. /* harmony export */ });
  18321. /* 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");
  18322. /***/ }),
  18323. /***/ "./resources/js/pages/member/Edit.vue?vue&type=template&id=1a9fb226":
  18324. /*!**************************************************************************!*\
  18325. !*** ./resources/js/pages/member/Edit.vue?vue&type=template&id=1a9fb226 ***!
  18326. \**************************************************************************/
  18327. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18328. "use strict";
  18329. __webpack_require__.r(__webpack_exports__);
  18330. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18331. /* 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)
  18332. /* harmony export */ });
  18333. /* 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");
  18334. /***/ }),
  18335. /***/ "./resources/js/components/AppFooter.vue?vue&type=style&index=0&id=4ab6097e&lang=scss&scoped=true":
  18336. /*!********************************************************************************************************!*\
  18337. !*** ./resources/js/components/AppFooter.vue?vue&type=style&index=0&id=4ab6097e&lang=scss&scoped=true ***!
  18338. \********************************************************************************************************/
  18339. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18340. "use strict";
  18341. __webpack_require__.r(__webpack_exports__);
  18342. /* 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");
  18343. /***/ }),
  18344. /***/ "./resources/js/components/AppSidebar.vue?vue&type=style&index=0&id=22a4e926&lang=scss&scoped=true":
  18345. /*!*********************************************************************************************************!*\
  18346. !*** ./resources/js/components/AppSidebar.vue?vue&type=style&index=0&id=22a4e926&lang=scss&scoped=true ***!
  18347. \*********************************************************************************************************/
  18348. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18349. "use strict";
  18350. __webpack_require__.r(__webpack_exports__);
  18351. /* 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");
  18352. /***/ }),
  18353. /***/ "./resources/js/components/AppSubSidebar.vue?vue&type=style&index=0&id=0addd9bc&lang=scss&scoped=true":
  18354. /*!************************************************************************************************************!*\
  18355. !*** ./resources/js/components/AppSubSidebar.vue?vue&type=style&index=0&id=0addd9bc&lang=scss&scoped=true ***!
  18356. \************************************************************************************************************/
  18357. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18358. "use strict";
  18359. __webpack_require__.r(__webpack_exports__);
  18360. /* 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");
  18361. /***/ }),
  18362. /***/ "./resources/js/components/AppTopBar.vue?vue&type=style&index=0&id=42bf62a4&lang=scss&scoped=true":
  18363. /*!********************************************************************************************************!*\
  18364. !*** ./resources/js/components/AppTopBar.vue?vue&type=style&index=0&id=42bf62a4&lang=scss&scoped=true ***!
  18365. \********************************************************************************************************/
  18366. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18367. "use strict";
  18368. __webpack_require__.r(__webpack_exports__);
  18369. /* 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");
  18370. /***/ }),
  18371. /***/ "./resources/js/layouts/DashboardLayout.vue?vue&type=style&index=0&id=549bf5ac&lang=scss&scoped=true":
  18372. /*!***********************************************************************************************************!*\
  18373. !*** ./resources/js/layouts/DashboardLayout.vue?vue&type=style&index=0&id=549bf5ac&lang=scss&scoped=true ***!
  18374. \***********************************************************************************************************/
  18375. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18376. "use strict";
  18377. __webpack_require__.r(__webpack_exports__);
  18378. /* 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");
  18379. /***/ })
  18380. }]);