f_000010 218 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500
  1. import {
  2. __commonJS
  3. } from "/node_modules/.vite/deps/chunk-WQG2LZMB.js?v=9548b9c3";
  4. // node_modules/lodash/lodash.js
  5. var require_lodash = __commonJS({
  6. "node_modules/lodash/lodash.js"(exports, module) {
  7. (function() {
  8. var undefined;
  9. var VERSION = "4.17.21";
  10. var LARGE_ARRAY_SIZE = 200;
  11. var CORE_ERROR_TEXT = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", FUNC_ERROR_TEXT = "Expected a function", INVALID_TEMPL_VAR_ERROR_TEXT = "Invalid `variable` option passed into `_.template`";
  12. var HASH_UNDEFINED = "__lodash_hash_undefined__";
  13. var MAX_MEMOIZE_SIZE = 500;
  14. var PLACEHOLDER = "__lodash_placeholder__";
  15. var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4;
  16. var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2;
  17. var WRAP_BIND_FLAG = 1, WRAP_BIND_KEY_FLAG = 2, WRAP_CURRY_BOUND_FLAG = 4, WRAP_CURRY_FLAG = 8, WRAP_CURRY_RIGHT_FLAG = 16, WRAP_PARTIAL_FLAG = 32, WRAP_PARTIAL_RIGHT_FLAG = 64, WRAP_ARY_FLAG = 128, WRAP_REARG_FLAG = 256, WRAP_FLIP_FLAG = 512;
  18. var DEFAULT_TRUNC_LENGTH = 30, DEFAULT_TRUNC_OMISSION = "...";
  19. var HOT_COUNT = 800, HOT_SPAN = 16;
  20. var LAZY_FILTER_FLAG = 1, LAZY_MAP_FLAG = 2, LAZY_WHILE_FLAG = 3;
  21. var INFINITY = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER = 17976931348623157e292, NAN = 0 / 0;
  22. var MAX_ARRAY_LENGTH = 4294967295, MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
  23. var wrapFlags = [
  24. ["ary", WRAP_ARY_FLAG],
  25. ["bind", WRAP_BIND_FLAG],
  26. ["bindKey", WRAP_BIND_KEY_FLAG],
  27. ["curry", WRAP_CURRY_FLAG],
  28. ["curryRight", WRAP_CURRY_RIGHT_FLAG],
  29. ["flip", WRAP_FLIP_FLAG],
  30. ["partial", WRAP_PARTIAL_FLAG],
  31. ["partialRight", WRAP_PARTIAL_RIGHT_FLAG],
  32. ["rearg", WRAP_REARG_FLAG]
  33. ];
  34. var argsTag = "[object Arguments]", arrayTag = "[object Array]", asyncTag = "[object AsyncFunction]", boolTag = "[object Boolean]", dateTag = "[object Date]", domExcTag = "[object DOMException]", errorTag = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag = "[object Map]", numberTag = "[object Number]", nullTag = "[object Null]", objectTag = "[object Object]", promiseTag = "[object Promise]", proxyTag = "[object Proxy]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]", undefinedTag = "[object Undefined]", weakMapTag = "[object WeakMap]", weakSetTag = "[object WeakSet]";
  35. var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
  36. var reEmptyStringLeading = /\b__p \+= '';/g, reEmptyStringMiddle = /\b(__p \+=) '' \+/g, reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
  37. var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, reUnescapedHtml = /[&<>"']/g, reHasEscapedHtml = RegExp(reEscapedHtml.source), reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
  38. var reEscape = /<%-([\s\S]+?)%>/g, reEvaluate = /<%([\s\S]+?)%>/g, reInterpolate = /<%=([\s\S]+?)%>/g;
  39. var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
  40. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, reHasRegExpChar = RegExp(reRegExpChar.source);
  41. var reTrimStart = /^\s+/;
  42. var reWhitespace = /\s/;
  43. var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, reSplitDetails = /,? & /;
  44. var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
  45. var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/;
  46. var reEscapeChar = /\\(\\)?/g;
  47. var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
  48. var reFlags = /\w*$/;
  49. var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
  50. var reIsBinary = /^0b[01]+$/i;
  51. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  52. var reIsOctal = /^0o[0-7]+$/i;
  53. var reIsUint = /^(?:0|[1-9]\d*)$/;
  54. var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
  55. var reNoMatch = /($^)/;
  56. var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
  57. var rsAstralRange = "\\ud800-\\udfff", rsComboMarksRange = "\\u0300-\\u036f", reComboHalfMarksRange = "\\ufe20-\\ufe2f", rsComboSymbolsRange = "\\u20d0-\\u20ff", rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, rsDingbatRange = "\\u2700-\\u27bf", rsLowerRange = "a-z\\xdf-\\xf6\\xf8-\\xff", rsMathOpRange = "\\xac\\xb1\\xd7\\xf7", rsNonCharRange = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", rsPunctuationRange = "\\u2000-\\u206f", rsSpaceRange = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", rsUpperRange = "A-Z\\xc0-\\xd6\\xd8-\\xde", rsVarRange = "\\ufe0e\\ufe0f", rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
  58. var rsApos = "['’]", rsAstral = "[" + rsAstralRange + "]", rsBreak = "[" + rsBreakRange + "]", rsCombo = "[" + rsComboRange + "]", rsDigits = "\\d+", rsDingbat = "[" + rsDingbatRange + "]", rsLower = "[" + rsLowerRange + "]", rsMisc = "[^" + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + "]", rsFitz = "\\ud83c[\\udffb-\\udfff]", rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")", rsNonAstral = "[^" + rsAstralRange + "]", rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}", rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]", rsUpper = "[" + rsUpperRange + "]", rsZWJ = "\\u200d";
  59. var rsMiscLower = "(?:" + rsLower + "|" + rsMisc + ")", rsMiscUpper = "(?:" + rsUpper + "|" + rsMisc + ")", rsOptContrLower = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?", rsOptContrUpper = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?", reOptMod = rsModifier + "?", rsOptVar = "[" + rsVarRange + "]?", rsOptJoin = "(?:" + rsZWJ + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*", rsOrdLower = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", rsOrdUpper = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", rsSeq = rsOptVar + reOptMod + rsOptJoin, rsEmoji = "(?:" + [rsDingbat, rsRegional, rsSurrPair].join("|") + ")" + rsSeq, rsSymbol = "(?:" + [rsNonAstral + rsCombo + "?", rsCombo, rsRegional, rsSurrPair, rsAstral].join("|") + ")";
  60. var reApos = RegExp(rsApos, "g");
  61. var reComboMark = RegExp(rsCombo, "g");
  62. var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g");
  63. var reUnicodeWord = RegExp([
  64. rsUpper + "?" + rsLower + "+" + rsOptContrLower + "(?=" + [rsBreak, rsUpper, "$"].join("|") + ")",
  65. rsMiscUpper + "+" + rsOptContrUpper + "(?=" + [rsBreak, rsUpper + rsMiscLower, "$"].join("|") + ")",
  66. rsUpper + "?" + rsMiscLower + "+" + rsOptContrLower,
  67. rsUpper + "+" + rsOptContrUpper,
  68. rsOrdUpper,
  69. rsOrdLower,
  70. rsDigits,
  71. rsEmoji
  72. ].join("|"), "g");
  73. var reHasUnicode = RegExp("[" + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + "]");
  74. 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 ]/;
  75. var contextProps = [
  76. "Array",
  77. "Buffer",
  78. "DataView",
  79. "Date",
  80. "Error",
  81. "Float32Array",
  82. "Float64Array",
  83. "Function",
  84. "Int8Array",
  85. "Int16Array",
  86. "Int32Array",
  87. "Map",
  88. "Math",
  89. "Object",
  90. "Promise",
  91. "RegExp",
  92. "Set",
  93. "String",
  94. "Symbol",
  95. "TypeError",
  96. "Uint8Array",
  97. "Uint8ClampedArray",
  98. "Uint16Array",
  99. "Uint32Array",
  100. "WeakMap",
  101. "_",
  102. "clearTimeout",
  103. "isFinite",
  104. "parseInt",
  105. "setTimeout"
  106. ];
  107. var templateCounter = -1;
  108. var typedArrayTags = {};
  109. typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
  110. typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
  111. var cloneableTags = {};
  112. cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
  113. cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
  114. var deburredLetters = {
  115. // Latin-1 Supplement block.
  116. "À": "A",
  117. "Á": "A",
  118. "Â": "A",
  119. "Ã": "A",
  120. "Ä": "A",
  121. "Å": "A",
  122. "à": "a",
  123. "á": "a",
  124. "â": "a",
  125. "ã": "a",
  126. "ä": "a",
  127. "å": "a",
  128. "Ç": "C",
  129. "ç": "c",
  130. "Ð": "D",
  131. "ð": "d",
  132. "È": "E",
  133. "É": "E",
  134. "Ê": "E",
  135. "Ë": "E",
  136. "è": "e",
  137. "é": "e",
  138. "ê": "e",
  139. "ë": "e",
  140. "Ì": "I",
  141. "Í": "I",
  142. "Î": "I",
  143. "Ï": "I",
  144. "ì": "i",
  145. "í": "i",
  146. "î": "i",
  147. "ï": "i",
  148. "Ñ": "N",
  149. "ñ": "n",
  150. "Ò": "O",
  151. "Ó": "O",
  152. "Ô": "O",
  153. "Õ": "O",
  154. "Ö": "O",
  155. "Ø": "O",
  156. "ò": "o",
  157. "ó": "o",
  158. "ô": "o",
  159. "õ": "o",
  160. "ö": "o",
  161. "ø": "o",
  162. "Ù": "U",
  163. "Ú": "U",
  164. "Û": "U",
  165. "Ü": "U",
  166. "ù": "u",
  167. "ú": "u",
  168. "û": "u",
  169. "ü": "u",
  170. "Ý": "Y",
  171. "ý": "y",
  172. "ÿ": "y",
  173. "Æ": "Ae",
  174. "æ": "ae",
  175. "Þ": "Th",
  176. "þ": "th",
  177. "ß": "ss",
  178. // Latin Extended-A block.
  179. "Ā": "A",
  180. "Ă": "A",
  181. "Ą": "A",
  182. "ā": "a",
  183. "ă": "a",
  184. "ą": "a",
  185. "Ć": "C",
  186. "Ĉ": "C",
  187. "Ċ": "C",
  188. "Č": "C",
  189. "ć": "c",
  190. "ĉ": "c",
  191. "ċ": "c",
  192. "č": "c",
  193. "Ď": "D",
  194. "Đ": "D",
  195. "ď": "d",
  196. "đ": "d",
  197. "Ē": "E",
  198. "Ĕ": "E",
  199. "Ė": "E",
  200. "Ę": "E",
  201. "Ě": "E",
  202. "ē": "e",
  203. "ĕ": "e",
  204. "ė": "e",
  205. "ę": "e",
  206. "ě": "e",
  207. "Ĝ": "G",
  208. "Ğ": "G",
  209. "Ġ": "G",
  210. "Ģ": "G",
  211. "ĝ": "g",
  212. "ğ": "g",
  213. "ġ": "g",
  214. "ģ": "g",
  215. "Ĥ": "H",
  216. "Ħ": "H",
  217. "ĥ": "h",
  218. "ħ": "h",
  219. "Ĩ": "I",
  220. "Ī": "I",
  221. "Ĭ": "I",
  222. "Į": "I",
  223. "İ": "I",
  224. "ĩ": "i",
  225. "ī": "i",
  226. "ĭ": "i",
  227. "į": "i",
  228. "ı": "i",
  229. "Ĵ": "J",
  230. "ĵ": "j",
  231. "Ķ": "K",
  232. "ķ": "k",
  233. "ĸ": "k",
  234. "Ĺ": "L",
  235. "Ļ": "L",
  236. "Ľ": "L",
  237. "Ŀ": "L",
  238. "Ł": "L",
  239. "ĺ": "l",
  240. "ļ": "l",
  241. "ľ": "l",
  242. "ŀ": "l",
  243. "ł": "l",
  244. "Ń": "N",
  245. "Ņ": "N",
  246. "Ň": "N",
  247. "Ŋ": "N",
  248. "ń": "n",
  249. "ņ": "n",
  250. "ň": "n",
  251. "ŋ": "n",
  252. "Ō": "O",
  253. "Ŏ": "O",
  254. "Ő": "O",
  255. "ō": "o",
  256. "ŏ": "o",
  257. "ő": "o",
  258. "Ŕ": "R",
  259. "Ŗ": "R",
  260. "Ř": "R",
  261. "ŕ": "r",
  262. "ŗ": "r",
  263. "ř": "r",
  264. "Ś": "S",
  265. "Ŝ": "S",
  266. "Ş": "S",
  267. "Š": "S",
  268. "ś": "s",
  269. "ŝ": "s",
  270. "ş": "s",
  271. "š": "s",
  272. "Ţ": "T",
  273. "Ť": "T",
  274. "Ŧ": "T",
  275. "ţ": "t",
  276. "ť": "t",
  277. "ŧ": "t",
  278. "Ũ": "U",
  279. "Ū": "U",
  280. "Ŭ": "U",
  281. "Ů": "U",
  282. "Ű": "U",
  283. "Ų": "U",
  284. "ũ": "u",
  285. "ū": "u",
  286. "ŭ": "u",
  287. "ů": "u",
  288. "ű": "u",
  289. "ų": "u",
  290. "Ŵ": "W",
  291. "ŵ": "w",
  292. "Ŷ": "Y",
  293. "ŷ": "y",
  294. "Ÿ": "Y",
  295. "Ź": "Z",
  296. "Ż": "Z",
  297. "Ž": "Z",
  298. "ź": "z",
  299. "ż": "z",
  300. "ž": "z",
  301. "IJ": "IJ",
  302. "ij": "ij",
  303. "Œ": "Oe",
  304. "œ": "oe",
  305. "ʼn": "'n",
  306. "ſ": "s"
  307. };
  308. var htmlEscapes = {
  309. "&": "&amp;",
  310. "<": "&lt;",
  311. ">": "&gt;",
  312. '"': "&quot;",
  313. "'": "&#39;"
  314. };
  315. var htmlUnescapes = {
  316. "&amp;": "&",
  317. "&lt;": "<",
  318. "&gt;": ">",
  319. "&quot;": '"',
  320. "&#39;": "'"
  321. };
  322. var stringEscapes = {
  323. "\\": "\\",
  324. "'": "'",
  325. "\n": "n",
  326. "\r": "r",
  327. "\u2028": "u2028",
  328. "\u2029": "u2029"
  329. };
  330. var freeParseFloat = parseFloat, freeParseInt = parseInt;
  331. var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
  332. var freeSelf = typeof self == "object" && self && self.Object === Object && self;
  333. var root = freeGlobal || freeSelf || Function("return this")();
  334. var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
  335. var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
  336. var moduleExports = freeModule && freeModule.exports === freeExports;
  337. var freeProcess = moduleExports && freeGlobal.process;
  338. var nodeUtil = function() {
  339. try {
  340. var types = freeModule && freeModule.require && freeModule.require("util").types;
  341. if (types) {
  342. return types;
  343. }
  344. return freeProcess && freeProcess.binding && freeProcess.binding("util");
  345. } catch (e) {
  346. }
  347. }();
  348. var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, nodeIsDate = nodeUtil && nodeUtil.isDate, nodeIsMap = nodeUtil && nodeUtil.isMap, nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, nodeIsSet = nodeUtil && nodeUtil.isSet, nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
  349. function apply(func, thisArg, args) {
  350. switch (args.length) {
  351. case 0:
  352. return func.call(thisArg);
  353. case 1:
  354. return func.call(thisArg, args[0]);
  355. case 2:
  356. return func.call(thisArg, args[0], args[1]);
  357. case 3:
  358. return func.call(thisArg, args[0], args[1], args[2]);
  359. }
  360. return func.apply(thisArg, args);
  361. }
  362. function arrayAggregator(array, setter, iteratee, accumulator) {
  363. var index = -1, length = array == null ? 0 : array.length;
  364. while (++index < length) {
  365. var value = array[index];
  366. setter(accumulator, value, iteratee(value), array);
  367. }
  368. return accumulator;
  369. }
  370. function arrayEach(array, iteratee) {
  371. var index = -1, length = array == null ? 0 : array.length;
  372. while (++index < length) {
  373. if (iteratee(array[index], index, array) === false) {
  374. break;
  375. }
  376. }
  377. return array;
  378. }
  379. function arrayEachRight(array, iteratee) {
  380. var length = array == null ? 0 : array.length;
  381. while (length--) {
  382. if (iteratee(array[length], length, array) === false) {
  383. break;
  384. }
  385. }
  386. return array;
  387. }
  388. function arrayEvery(array, predicate) {
  389. var index = -1, length = array == null ? 0 : array.length;
  390. while (++index < length) {
  391. if (!predicate(array[index], index, array)) {
  392. return false;
  393. }
  394. }
  395. return true;
  396. }
  397. function arrayFilter(array, predicate) {
  398. var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
  399. while (++index < length) {
  400. var value = array[index];
  401. if (predicate(value, index, array)) {
  402. result[resIndex++] = value;
  403. }
  404. }
  405. return result;
  406. }
  407. function arrayIncludes(array, value) {
  408. var length = array == null ? 0 : array.length;
  409. return !!length && baseIndexOf(array, value, 0) > -1;
  410. }
  411. function arrayIncludesWith(array, value, comparator) {
  412. var index = -1, length = array == null ? 0 : array.length;
  413. while (++index < length) {
  414. if (comparator(value, array[index])) {
  415. return true;
  416. }
  417. }
  418. return false;
  419. }
  420. function arrayMap(array, iteratee) {
  421. var index = -1, length = array == null ? 0 : array.length, result = Array(length);
  422. while (++index < length) {
  423. result[index] = iteratee(array[index], index, array);
  424. }
  425. return result;
  426. }
  427. function arrayPush(array, values) {
  428. var index = -1, length = values.length, offset = array.length;
  429. while (++index < length) {
  430. array[offset + index] = values[index];
  431. }
  432. return array;
  433. }
  434. function arrayReduce(array, iteratee, accumulator, initAccum) {
  435. var index = -1, length = array == null ? 0 : array.length;
  436. if (initAccum && length) {
  437. accumulator = array[++index];
  438. }
  439. while (++index < length) {
  440. accumulator = iteratee(accumulator, array[index], index, array);
  441. }
  442. return accumulator;
  443. }
  444. function arrayReduceRight(array, iteratee, accumulator, initAccum) {
  445. var length = array == null ? 0 : array.length;
  446. if (initAccum && length) {
  447. accumulator = array[--length];
  448. }
  449. while (length--) {
  450. accumulator = iteratee(accumulator, array[length], length, array);
  451. }
  452. return accumulator;
  453. }
  454. function arraySome(array, predicate) {
  455. var index = -1, length = array == null ? 0 : array.length;
  456. while (++index < length) {
  457. if (predicate(array[index], index, array)) {
  458. return true;
  459. }
  460. }
  461. return false;
  462. }
  463. var asciiSize = baseProperty("length");
  464. function asciiToArray(string) {
  465. return string.split("");
  466. }
  467. function asciiWords(string) {
  468. return string.match(reAsciiWord) || [];
  469. }
  470. function baseFindKey(collection, predicate, eachFunc) {
  471. var result;
  472. eachFunc(collection, function(value, key, collection2) {
  473. if (predicate(value, key, collection2)) {
  474. result = key;
  475. return false;
  476. }
  477. });
  478. return result;
  479. }
  480. function baseFindIndex(array, predicate, fromIndex, fromRight) {
  481. var length = array.length, index = fromIndex + (fromRight ? 1 : -1);
  482. while (fromRight ? index-- : ++index < length) {
  483. if (predicate(array[index], index, array)) {
  484. return index;
  485. }
  486. }
  487. return -1;
  488. }
  489. function baseIndexOf(array, value, fromIndex) {
  490. return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex);
  491. }
  492. function baseIndexOfWith(array, value, fromIndex, comparator) {
  493. var index = fromIndex - 1, length = array.length;
  494. while (++index < length) {
  495. if (comparator(array[index], value)) {
  496. return index;
  497. }
  498. }
  499. return -1;
  500. }
  501. function baseIsNaN(value) {
  502. return value !== value;
  503. }
  504. function baseMean(array, iteratee) {
  505. var length = array == null ? 0 : array.length;
  506. return length ? baseSum(array, iteratee) / length : NAN;
  507. }
  508. function baseProperty(key) {
  509. return function(object) {
  510. return object == null ? undefined : object[key];
  511. };
  512. }
  513. function basePropertyOf(object) {
  514. return function(key) {
  515. return object == null ? undefined : object[key];
  516. };
  517. }
  518. function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
  519. eachFunc(collection, function(value, index, collection2) {
  520. accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value, index, collection2);
  521. });
  522. return accumulator;
  523. }
  524. function baseSortBy(array, comparer) {
  525. var length = array.length;
  526. array.sort(comparer);
  527. while (length--) {
  528. array[length] = array[length].value;
  529. }
  530. return array;
  531. }
  532. function baseSum(array, iteratee) {
  533. var result, index = -1, length = array.length;
  534. while (++index < length) {
  535. var current = iteratee(array[index]);
  536. if (current !== undefined) {
  537. result = result === undefined ? current : result + current;
  538. }
  539. }
  540. return result;
  541. }
  542. function baseTimes(n, iteratee) {
  543. var index = -1, result = Array(n);
  544. while (++index < n) {
  545. result[index] = iteratee(index);
  546. }
  547. return result;
  548. }
  549. function baseToPairs(object, props) {
  550. return arrayMap(props, function(key) {
  551. return [key, object[key]];
  552. });
  553. }
  554. function baseTrim(string) {
  555. return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
  556. }
  557. function baseUnary(func) {
  558. return function(value) {
  559. return func(value);
  560. };
  561. }
  562. function baseValues(object, props) {
  563. return arrayMap(props, function(key) {
  564. return object[key];
  565. });
  566. }
  567. function cacheHas(cache, key) {
  568. return cache.has(key);
  569. }
  570. function charsStartIndex(strSymbols, chrSymbols) {
  571. var index = -1, length = strSymbols.length;
  572. while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {
  573. }
  574. return index;
  575. }
  576. function charsEndIndex(strSymbols, chrSymbols) {
  577. var index = strSymbols.length;
  578. while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {
  579. }
  580. return index;
  581. }
  582. function countHolders(array, placeholder) {
  583. var length = array.length, result = 0;
  584. while (length--) {
  585. if (array[length] === placeholder) {
  586. ++result;
  587. }
  588. }
  589. return result;
  590. }
  591. var deburrLetter = basePropertyOf(deburredLetters);
  592. var escapeHtmlChar = basePropertyOf(htmlEscapes);
  593. function escapeStringChar(chr) {
  594. return "\\" + stringEscapes[chr];
  595. }
  596. function getValue(object, key) {
  597. return object == null ? undefined : object[key];
  598. }
  599. function hasUnicode(string) {
  600. return reHasUnicode.test(string);
  601. }
  602. function hasUnicodeWord(string) {
  603. return reHasUnicodeWord.test(string);
  604. }
  605. function iteratorToArray(iterator) {
  606. var data, result = [];
  607. while (!(data = iterator.next()).done) {
  608. result.push(data.value);
  609. }
  610. return result;
  611. }
  612. function mapToArray(map) {
  613. var index = -1, result = Array(map.size);
  614. map.forEach(function(value, key) {
  615. result[++index] = [key, value];
  616. });
  617. return result;
  618. }
  619. function overArg(func, transform) {
  620. return function(arg) {
  621. return func(transform(arg));
  622. };
  623. }
  624. function replaceHolders(array, placeholder) {
  625. var index = -1, length = array.length, resIndex = 0, result = [];
  626. while (++index < length) {
  627. var value = array[index];
  628. if (value === placeholder || value === PLACEHOLDER) {
  629. array[index] = PLACEHOLDER;
  630. result[resIndex++] = index;
  631. }
  632. }
  633. return result;
  634. }
  635. function setToArray(set) {
  636. var index = -1, result = Array(set.size);
  637. set.forEach(function(value) {
  638. result[++index] = value;
  639. });
  640. return result;
  641. }
  642. function setToPairs(set) {
  643. var index = -1, result = Array(set.size);
  644. set.forEach(function(value) {
  645. result[++index] = [value, value];
  646. });
  647. return result;
  648. }
  649. function strictIndexOf(array, value, fromIndex) {
  650. var index = fromIndex - 1, length = array.length;
  651. while (++index < length) {
  652. if (array[index] === value) {
  653. return index;
  654. }
  655. }
  656. return -1;
  657. }
  658. function strictLastIndexOf(array, value, fromIndex) {
  659. var index = fromIndex + 1;
  660. while (index--) {
  661. if (array[index] === value) {
  662. return index;
  663. }
  664. }
  665. return index;
  666. }
  667. function stringSize(string) {
  668. return hasUnicode(string) ? unicodeSize(string) : asciiSize(string);
  669. }
  670. function stringToArray(string) {
  671. return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string);
  672. }
  673. function trimmedEndIndex(string) {
  674. var index = string.length;
  675. while (index-- && reWhitespace.test(string.charAt(index))) {
  676. }
  677. return index;
  678. }
  679. var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
  680. function unicodeSize(string) {
  681. var result = reUnicode.lastIndex = 0;
  682. while (reUnicode.test(string)) {
  683. ++result;
  684. }
  685. return result;
  686. }
  687. function unicodeToArray(string) {
  688. return string.match(reUnicode) || [];
  689. }
  690. function unicodeWords(string) {
  691. return string.match(reUnicodeWord) || [];
  692. }
  693. var runInContext = function runInContext2(context) {
  694. context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
  695. var Array2 = context.Array, Date = context.Date, Error = context.Error, Function2 = context.Function, Math = context.Math, Object2 = context.Object, RegExp2 = context.RegExp, String = context.String, TypeError = context.TypeError;
  696. var arrayProto = Array2.prototype, funcProto = Function2.prototype, objectProto = Object2.prototype;
  697. var coreJsData = context["__core-js_shared__"];
  698. var funcToString = funcProto.toString;
  699. var hasOwnProperty = objectProto.hasOwnProperty;
  700. var idCounter = 0;
  701. var maskSrcKey = function() {
  702. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
  703. return uid ? "Symbol(src)_1." + uid : "";
  704. }();
  705. var nativeObjectToString = objectProto.toString;
  706. var objectCtorString = funcToString.call(Object2);
  707. var oldDash = root._;
  708. var reIsNative = RegExp2(
  709. "^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
  710. );
  711. var Buffer = moduleExports ? context.Buffer : undefined, Symbol = context.Symbol, Uint8Array = context.Uint8Array, allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, getPrototype = overArg(Object2.getPrototypeOf, Object2), objectCreate = Object2.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice, spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined, symIterator = Symbol ? Symbol.iterator : undefined, symToStringTag = Symbol ? Symbol.toStringTag : undefined;
  712. var defineProperty = function() {
  713. try {
  714. var func = getNative(Object2, "defineProperty");
  715. func({}, "", {});
  716. return func;
  717. } catch (e) {
  718. }
  719. }();
  720. var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date && Date.now !== root.Date.now && Date.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
  721. var nativeCeil = Math.ceil, nativeFloor = Math.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object2.keys, Object2), nativeMax = Math.max, nativeMin = Math.min, nativeNow = Date.now, nativeParseInt = context.parseInt, nativeRandom = Math.random, nativeReverse = arrayProto.reverse;
  722. var DataView = getNative(context, "DataView"), Map = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set = getNative(context, "Set"), WeakMap = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create");
  723. var metaMap = WeakMap && new WeakMap();
  724. var realNames = {};
  725. var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap);
  726. var symbolProto = Symbol ? Symbol.prototype : undefined, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined, symbolToString = symbolProto ? symbolProto.toString : undefined;
  727. function lodash(value) {
  728. if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
  729. if (value instanceof LodashWrapper) {
  730. return value;
  731. }
  732. if (hasOwnProperty.call(value, "__wrapped__")) {
  733. return wrapperClone(value);
  734. }
  735. }
  736. return new LodashWrapper(value);
  737. }
  738. var baseCreate = function() {
  739. function object() {
  740. }
  741. return function(proto) {
  742. if (!isObject(proto)) {
  743. return {};
  744. }
  745. if (objectCreate) {
  746. return objectCreate(proto);
  747. }
  748. object.prototype = proto;
  749. var result2 = new object();
  750. object.prototype = undefined;
  751. return result2;
  752. };
  753. }();
  754. function baseLodash() {
  755. }
  756. function LodashWrapper(value, chainAll) {
  757. this.__wrapped__ = value;
  758. this.__actions__ = [];
  759. this.__chain__ = !!chainAll;
  760. this.__index__ = 0;
  761. this.__values__ = undefined;
  762. }
  763. lodash.templateSettings = {
  764. /**
  765. * Used to detect `data` property values to be HTML-escaped.
  766. *
  767. * @memberOf _.templateSettings
  768. * @type {RegExp}
  769. */
  770. "escape": reEscape,
  771. /**
  772. * Used to detect code to be evaluated.
  773. *
  774. * @memberOf _.templateSettings
  775. * @type {RegExp}
  776. */
  777. "evaluate": reEvaluate,
  778. /**
  779. * Used to detect `data` property values to inject.
  780. *
  781. * @memberOf _.templateSettings
  782. * @type {RegExp}
  783. */
  784. "interpolate": reInterpolate,
  785. /**
  786. * Used to reference the data object in the template text.
  787. *
  788. * @memberOf _.templateSettings
  789. * @type {string}
  790. */
  791. "variable": "",
  792. /**
  793. * Used to import variables into the compiled template.
  794. *
  795. * @memberOf _.templateSettings
  796. * @type {Object}
  797. */
  798. "imports": {
  799. /**
  800. * A reference to the `lodash` function.
  801. *
  802. * @memberOf _.templateSettings.imports
  803. * @type {Function}
  804. */
  805. "_": lodash
  806. }
  807. };
  808. lodash.prototype = baseLodash.prototype;
  809. lodash.prototype.constructor = lodash;
  810. LodashWrapper.prototype = baseCreate(baseLodash.prototype);
  811. LodashWrapper.prototype.constructor = LodashWrapper;
  812. function LazyWrapper(value) {
  813. this.__wrapped__ = value;
  814. this.__actions__ = [];
  815. this.__dir__ = 1;
  816. this.__filtered__ = false;
  817. this.__iteratees__ = [];
  818. this.__takeCount__ = MAX_ARRAY_LENGTH;
  819. this.__views__ = [];
  820. }
  821. function lazyClone() {
  822. var result2 = new LazyWrapper(this.__wrapped__);
  823. result2.__actions__ = copyArray(this.__actions__);
  824. result2.__dir__ = this.__dir__;
  825. result2.__filtered__ = this.__filtered__;
  826. result2.__iteratees__ = copyArray(this.__iteratees__);
  827. result2.__takeCount__ = this.__takeCount__;
  828. result2.__views__ = copyArray(this.__views__);
  829. return result2;
  830. }
  831. function lazyReverse() {
  832. if (this.__filtered__) {
  833. var result2 = new LazyWrapper(this);
  834. result2.__dir__ = -1;
  835. result2.__filtered__ = true;
  836. } else {
  837. result2 = this.clone();
  838. result2.__dir__ *= -1;
  839. }
  840. return result2;
  841. }
  842. function lazyValue() {
  843. var array = this.__wrapped__.value(), dir = this.__dir__, isArr = isArray(array), isRight = dir < 0, arrLength = isArr ? array.length : 0, view = getView(0, arrLength, this.__views__), start = view.start, end = view.end, length = end - start, index = isRight ? end : start - 1, iteratees = this.__iteratees__, iterLength = iteratees.length, resIndex = 0, takeCount = nativeMin(length, this.__takeCount__);
  844. if (!isArr || !isRight && arrLength == length && takeCount == length) {
  845. return baseWrapperValue(array, this.__actions__);
  846. }
  847. var result2 = [];
  848. outer:
  849. while (length-- && resIndex < takeCount) {
  850. index += dir;
  851. var iterIndex = -1, value = array[index];
  852. while (++iterIndex < iterLength) {
  853. var data = iteratees[iterIndex], iteratee2 = data.iteratee, type = data.type, computed = iteratee2(value);
  854. if (type == LAZY_MAP_FLAG) {
  855. value = computed;
  856. } else if (!computed) {
  857. if (type == LAZY_FILTER_FLAG) {
  858. continue outer;
  859. } else {
  860. break outer;
  861. }
  862. }
  863. }
  864. result2[resIndex++] = value;
  865. }
  866. return result2;
  867. }
  868. LazyWrapper.prototype = baseCreate(baseLodash.prototype);
  869. LazyWrapper.prototype.constructor = LazyWrapper;
  870. function Hash(entries) {
  871. var index = -1, length = entries == null ? 0 : entries.length;
  872. this.clear();
  873. while (++index < length) {
  874. var entry = entries[index];
  875. this.set(entry[0], entry[1]);
  876. }
  877. }
  878. function hashClear() {
  879. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  880. this.size = 0;
  881. }
  882. function hashDelete(key) {
  883. var result2 = this.has(key) && delete this.__data__[key];
  884. this.size -= result2 ? 1 : 0;
  885. return result2;
  886. }
  887. function hashGet(key) {
  888. var data = this.__data__;
  889. if (nativeCreate) {
  890. var result2 = data[key];
  891. return result2 === HASH_UNDEFINED ? undefined : result2;
  892. }
  893. return hasOwnProperty.call(data, key) ? data[key] : undefined;
  894. }
  895. function hashHas(key) {
  896. var data = this.__data__;
  897. return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
  898. }
  899. function hashSet(key, value) {
  900. var data = this.__data__;
  901. this.size += this.has(key) ? 0 : 1;
  902. data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value;
  903. return this;
  904. }
  905. Hash.prototype.clear = hashClear;
  906. Hash.prototype["delete"] = hashDelete;
  907. Hash.prototype.get = hashGet;
  908. Hash.prototype.has = hashHas;
  909. Hash.prototype.set = hashSet;
  910. function ListCache(entries) {
  911. var index = -1, length = entries == null ? 0 : entries.length;
  912. this.clear();
  913. while (++index < length) {
  914. var entry = entries[index];
  915. this.set(entry[0], entry[1]);
  916. }
  917. }
  918. function listCacheClear() {
  919. this.__data__ = [];
  920. this.size = 0;
  921. }
  922. function listCacheDelete(key) {
  923. var data = this.__data__, index = assocIndexOf(data, key);
  924. if (index < 0) {
  925. return false;
  926. }
  927. var lastIndex = data.length - 1;
  928. if (index == lastIndex) {
  929. data.pop();
  930. } else {
  931. splice.call(data, index, 1);
  932. }
  933. --this.size;
  934. return true;
  935. }
  936. function listCacheGet(key) {
  937. var data = this.__data__, index = assocIndexOf(data, key);
  938. return index < 0 ? undefined : data[index][1];
  939. }
  940. function listCacheHas(key) {
  941. return assocIndexOf(this.__data__, key) > -1;
  942. }
  943. function listCacheSet(key, value) {
  944. var data = this.__data__, index = assocIndexOf(data, key);
  945. if (index < 0) {
  946. ++this.size;
  947. data.push([key, value]);
  948. } else {
  949. data[index][1] = value;
  950. }
  951. return this;
  952. }
  953. ListCache.prototype.clear = listCacheClear;
  954. ListCache.prototype["delete"] = listCacheDelete;
  955. ListCache.prototype.get = listCacheGet;
  956. ListCache.prototype.has = listCacheHas;
  957. ListCache.prototype.set = listCacheSet;
  958. function MapCache(entries) {
  959. var index = -1, length = entries == null ? 0 : entries.length;
  960. this.clear();
  961. while (++index < length) {
  962. var entry = entries[index];
  963. this.set(entry[0], entry[1]);
  964. }
  965. }
  966. function mapCacheClear() {
  967. this.size = 0;
  968. this.__data__ = {
  969. "hash": new Hash(),
  970. "map": new (Map || ListCache)(),
  971. "string": new Hash()
  972. };
  973. }
  974. function mapCacheDelete(key) {
  975. var result2 = getMapData(this, key)["delete"](key);
  976. this.size -= result2 ? 1 : 0;
  977. return result2;
  978. }
  979. function mapCacheGet(key) {
  980. return getMapData(this, key).get(key);
  981. }
  982. function mapCacheHas(key) {
  983. return getMapData(this, key).has(key);
  984. }
  985. function mapCacheSet(key, value) {
  986. var data = getMapData(this, key), size2 = data.size;
  987. data.set(key, value);
  988. this.size += data.size == size2 ? 0 : 1;
  989. return this;
  990. }
  991. MapCache.prototype.clear = mapCacheClear;
  992. MapCache.prototype["delete"] = mapCacheDelete;
  993. MapCache.prototype.get = mapCacheGet;
  994. MapCache.prototype.has = mapCacheHas;
  995. MapCache.prototype.set = mapCacheSet;
  996. function SetCache(values2) {
  997. var index = -1, length = values2 == null ? 0 : values2.length;
  998. this.__data__ = new MapCache();
  999. while (++index < length) {
  1000. this.add(values2[index]);
  1001. }
  1002. }
  1003. function setCacheAdd(value) {
  1004. this.__data__.set(value, HASH_UNDEFINED);
  1005. return this;
  1006. }
  1007. function setCacheHas(value) {
  1008. return this.__data__.has(value);
  1009. }
  1010. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
  1011. SetCache.prototype.has = setCacheHas;
  1012. function Stack(entries) {
  1013. var data = this.__data__ = new ListCache(entries);
  1014. this.size = data.size;
  1015. }
  1016. function stackClear() {
  1017. this.__data__ = new ListCache();
  1018. this.size = 0;
  1019. }
  1020. function stackDelete(key) {
  1021. var data = this.__data__, result2 = data["delete"](key);
  1022. this.size = data.size;
  1023. return result2;
  1024. }
  1025. function stackGet(key) {
  1026. return this.__data__.get(key);
  1027. }
  1028. function stackHas(key) {
  1029. return this.__data__.has(key);
  1030. }
  1031. function stackSet(key, value) {
  1032. var data = this.__data__;
  1033. if (data instanceof ListCache) {
  1034. var pairs = data.__data__;
  1035. if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) {
  1036. pairs.push([key, value]);
  1037. this.size = ++data.size;
  1038. return this;
  1039. }
  1040. data = this.__data__ = new MapCache(pairs);
  1041. }
  1042. data.set(key, value);
  1043. this.size = data.size;
  1044. return this;
  1045. }
  1046. Stack.prototype.clear = stackClear;
  1047. Stack.prototype["delete"] = stackDelete;
  1048. Stack.prototype.get = stackGet;
  1049. Stack.prototype.has = stackHas;
  1050. Stack.prototype.set = stackSet;
  1051. function arrayLikeKeys(value, inherited) {
  1052. var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result2 = skipIndexes ? baseTimes(value.length, String) : [], length = result2.length;
  1053. for (var key in value) {
  1054. if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
  1055. (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
  1056. isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
  1057. isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
  1058. isIndex(key, length)))) {
  1059. result2.push(key);
  1060. }
  1061. }
  1062. return result2;
  1063. }
  1064. function arraySample(array) {
  1065. var length = array.length;
  1066. return length ? array[baseRandom(0, length - 1)] : undefined;
  1067. }
  1068. function arraySampleSize(array, n) {
  1069. return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
  1070. }
  1071. function arrayShuffle(array) {
  1072. return shuffleSelf(copyArray(array));
  1073. }
  1074. function assignMergeValue(object, key, value) {
  1075. if (value !== undefined && !eq(object[key], value) || value === undefined && !(key in object)) {
  1076. baseAssignValue(object, key, value);
  1077. }
  1078. }
  1079. function assignValue(object, key, value) {
  1080. var objValue = object[key];
  1081. if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === undefined && !(key in object)) {
  1082. baseAssignValue(object, key, value);
  1083. }
  1084. }
  1085. function assocIndexOf(array, key) {
  1086. var length = array.length;
  1087. while (length--) {
  1088. if (eq(array[length][0], key)) {
  1089. return length;
  1090. }
  1091. }
  1092. return -1;
  1093. }
  1094. function baseAggregator(collection, setter, iteratee2, accumulator) {
  1095. baseEach(collection, function(value, key, collection2) {
  1096. setter(accumulator, value, iteratee2(value), collection2);
  1097. });
  1098. return accumulator;
  1099. }
  1100. function baseAssign(object, source) {
  1101. return object && copyObject(source, keys(source), object);
  1102. }
  1103. function baseAssignIn(object, source) {
  1104. return object && copyObject(source, keysIn(source), object);
  1105. }
  1106. function baseAssignValue(object, key, value) {
  1107. if (key == "__proto__" && defineProperty) {
  1108. defineProperty(object, key, {
  1109. "configurable": true,
  1110. "enumerable": true,
  1111. "value": value,
  1112. "writable": true
  1113. });
  1114. } else {
  1115. object[key] = value;
  1116. }
  1117. }
  1118. function baseAt(object, paths) {
  1119. var index = -1, length = paths.length, result2 = Array2(length), skip = object == null;
  1120. while (++index < length) {
  1121. result2[index] = skip ? undefined : get(object, paths[index]);
  1122. }
  1123. return result2;
  1124. }
  1125. function baseClamp(number, lower, upper) {
  1126. if (number === number) {
  1127. if (upper !== undefined) {
  1128. number = number <= upper ? number : upper;
  1129. }
  1130. if (lower !== undefined) {
  1131. number = number >= lower ? number : lower;
  1132. }
  1133. }
  1134. return number;
  1135. }
  1136. function baseClone(value, bitmask, customizer, key, object, stack) {
  1137. var result2, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG;
  1138. if (customizer) {
  1139. result2 = object ? customizer(value, key, object, stack) : customizer(value);
  1140. }
  1141. if (result2 !== undefined) {
  1142. return result2;
  1143. }
  1144. if (!isObject(value)) {
  1145. return value;
  1146. }
  1147. var isArr = isArray(value);
  1148. if (isArr) {
  1149. result2 = initCloneArray(value);
  1150. if (!isDeep) {
  1151. return copyArray(value, result2);
  1152. }
  1153. } else {
  1154. var tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
  1155. if (isBuffer(value)) {
  1156. return cloneBuffer(value, isDeep);
  1157. }
  1158. if (tag == objectTag || tag == argsTag || isFunc && !object) {
  1159. result2 = isFlat || isFunc ? {} : initCloneObject(value);
  1160. if (!isDeep) {
  1161. return isFlat ? copySymbolsIn(value, baseAssignIn(result2, value)) : copySymbols(value, baseAssign(result2, value));
  1162. }
  1163. } else {
  1164. if (!cloneableTags[tag]) {
  1165. return object ? value : {};
  1166. }
  1167. result2 = initCloneByTag(value, tag, isDeep);
  1168. }
  1169. }
  1170. stack || (stack = new Stack());
  1171. var stacked = stack.get(value);
  1172. if (stacked) {
  1173. return stacked;
  1174. }
  1175. stack.set(value, result2);
  1176. if (isSet(value)) {
  1177. value.forEach(function(subValue) {
  1178. result2.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
  1179. });
  1180. } else if (isMap(value)) {
  1181. value.forEach(function(subValue, key2) {
  1182. result2.set(key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
  1183. });
  1184. }
  1185. var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys;
  1186. var props = isArr ? undefined : keysFunc(value);
  1187. arrayEach(props || value, function(subValue, key2) {
  1188. if (props) {
  1189. key2 = subValue;
  1190. subValue = value[key2];
  1191. }
  1192. assignValue(result2, key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
  1193. });
  1194. return result2;
  1195. }
  1196. function baseConforms(source) {
  1197. var props = keys(source);
  1198. return function(object) {
  1199. return baseConformsTo(object, source, props);
  1200. };
  1201. }
  1202. function baseConformsTo(object, source, props) {
  1203. var length = props.length;
  1204. if (object == null) {
  1205. return !length;
  1206. }
  1207. object = Object2(object);
  1208. while (length--) {
  1209. var key = props[length], predicate = source[key], value = object[key];
  1210. if (value === undefined && !(key in object) || !predicate(value)) {
  1211. return false;
  1212. }
  1213. }
  1214. return true;
  1215. }
  1216. function baseDelay(func, wait, args) {
  1217. if (typeof func != "function") {
  1218. throw new TypeError(FUNC_ERROR_TEXT);
  1219. }
  1220. return setTimeout(function() {
  1221. func.apply(undefined, args);
  1222. }, wait);
  1223. }
  1224. function baseDifference(array, values2, iteratee2, comparator) {
  1225. var index = -1, includes2 = arrayIncludes, isCommon = true, length = array.length, result2 = [], valuesLength = values2.length;
  1226. if (!length) {
  1227. return result2;
  1228. }
  1229. if (iteratee2) {
  1230. values2 = arrayMap(values2, baseUnary(iteratee2));
  1231. }
  1232. if (comparator) {
  1233. includes2 = arrayIncludesWith;
  1234. isCommon = false;
  1235. } else if (values2.length >= LARGE_ARRAY_SIZE) {
  1236. includes2 = cacheHas;
  1237. isCommon = false;
  1238. values2 = new SetCache(values2);
  1239. }
  1240. outer:
  1241. while (++index < length) {
  1242. var value = array[index], computed = iteratee2 == null ? value : iteratee2(value);
  1243. value = comparator || value !== 0 ? value : 0;
  1244. if (isCommon && computed === computed) {
  1245. var valuesIndex = valuesLength;
  1246. while (valuesIndex--) {
  1247. if (values2[valuesIndex] === computed) {
  1248. continue outer;
  1249. }
  1250. }
  1251. result2.push(value);
  1252. } else if (!includes2(values2, computed, comparator)) {
  1253. result2.push(value);
  1254. }
  1255. }
  1256. return result2;
  1257. }
  1258. var baseEach = createBaseEach(baseForOwn);
  1259. var baseEachRight = createBaseEach(baseForOwnRight, true);
  1260. function baseEvery(collection, predicate) {
  1261. var result2 = true;
  1262. baseEach(collection, function(value, index, collection2) {
  1263. result2 = !!predicate(value, index, collection2);
  1264. return result2;
  1265. });
  1266. return result2;
  1267. }
  1268. function baseExtremum(array, iteratee2, comparator) {
  1269. var index = -1, length = array.length;
  1270. while (++index < length) {
  1271. var value = array[index], current = iteratee2(value);
  1272. if (current != null && (computed === undefined ? current === current && !isSymbol(current) : comparator(current, computed))) {
  1273. var computed = current, result2 = value;
  1274. }
  1275. }
  1276. return result2;
  1277. }
  1278. function baseFill(array, value, start, end) {
  1279. var length = array.length;
  1280. start = toInteger(start);
  1281. if (start < 0) {
  1282. start = -start > length ? 0 : length + start;
  1283. }
  1284. end = end === undefined || end > length ? length : toInteger(end);
  1285. if (end < 0) {
  1286. end += length;
  1287. }
  1288. end = start > end ? 0 : toLength(end);
  1289. while (start < end) {
  1290. array[start++] = value;
  1291. }
  1292. return array;
  1293. }
  1294. function baseFilter(collection, predicate) {
  1295. var result2 = [];
  1296. baseEach(collection, function(value, index, collection2) {
  1297. if (predicate(value, index, collection2)) {
  1298. result2.push(value);
  1299. }
  1300. });
  1301. return result2;
  1302. }
  1303. function baseFlatten(array, depth, predicate, isStrict, result2) {
  1304. var index = -1, length = array.length;
  1305. predicate || (predicate = isFlattenable);
  1306. result2 || (result2 = []);
  1307. while (++index < length) {
  1308. var value = array[index];
  1309. if (depth > 0 && predicate(value)) {
  1310. if (depth > 1) {
  1311. baseFlatten(value, depth - 1, predicate, isStrict, result2);
  1312. } else {
  1313. arrayPush(result2, value);
  1314. }
  1315. } else if (!isStrict) {
  1316. result2[result2.length] = value;
  1317. }
  1318. }
  1319. return result2;
  1320. }
  1321. var baseFor = createBaseFor();
  1322. var baseForRight = createBaseFor(true);
  1323. function baseForOwn(object, iteratee2) {
  1324. return object && baseFor(object, iteratee2, keys);
  1325. }
  1326. function baseForOwnRight(object, iteratee2) {
  1327. return object && baseForRight(object, iteratee2, keys);
  1328. }
  1329. function baseFunctions(object, props) {
  1330. return arrayFilter(props, function(key) {
  1331. return isFunction(object[key]);
  1332. });
  1333. }
  1334. function baseGet(object, path) {
  1335. path = castPath(path, object);
  1336. var index = 0, length = path.length;
  1337. while (object != null && index < length) {
  1338. object = object[toKey(path[index++])];
  1339. }
  1340. return index && index == length ? object : undefined;
  1341. }
  1342. function baseGetAllKeys(object, keysFunc, symbolsFunc) {
  1343. var result2 = keysFunc(object);
  1344. return isArray(object) ? result2 : arrayPush(result2, symbolsFunc(object));
  1345. }
  1346. function baseGetTag(value) {
  1347. if (value == null) {
  1348. return value === undefined ? undefinedTag : nullTag;
  1349. }
  1350. return symToStringTag && symToStringTag in Object2(value) ? getRawTag(value) : objectToString(value);
  1351. }
  1352. function baseGt(value, other) {
  1353. return value > other;
  1354. }
  1355. function baseHas(object, key) {
  1356. return object != null && hasOwnProperty.call(object, key);
  1357. }
  1358. function baseHasIn(object, key) {
  1359. return object != null && key in Object2(object);
  1360. }
  1361. function baseInRange(number, start, end) {
  1362. return number >= nativeMin(start, end) && number < nativeMax(start, end);
  1363. }
  1364. function baseIntersection(arrays, iteratee2, comparator) {
  1365. var includes2 = comparator ? arrayIncludesWith : arrayIncludes, length = arrays[0].length, othLength = arrays.length, othIndex = othLength, caches = Array2(othLength), maxLength = Infinity, result2 = [];
  1366. while (othIndex--) {
  1367. var array = arrays[othIndex];
  1368. if (othIndex && iteratee2) {
  1369. array = arrayMap(array, baseUnary(iteratee2));
  1370. }
  1371. maxLength = nativeMin(array.length, maxLength);
  1372. caches[othIndex] = !comparator && (iteratee2 || length >= 120 && array.length >= 120) ? new SetCache(othIndex && array) : undefined;
  1373. }
  1374. array = arrays[0];
  1375. var index = -1, seen = caches[0];
  1376. outer:
  1377. while (++index < length && result2.length < maxLength) {
  1378. var value = array[index], computed = iteratee2 ? iteratee2(value) : value;
  1379. value = comparator || value !== 0 ? value : 0;
  1380. if (!(seen ? cacheHas(seen, computed) : includes2(result2, computed, comparator))) {
  1381. othIndex = othLength;
  1382. while (--othIndex) {
  1383. var cache = caches[othIndex];
  1384. if (!(cache ? cacheHas(cache, computed) : includes2(arrays[othIndex], computed, comparator))) {
  1385. continue outer;
  1386. }
  1387. }
  1388. if (seen) {
  1389. seen.push(computed);
  1390. }
  1391. result2.push(value);
  1392. }
  1393. }
  1394. return result2;
  1395. }
  1396. function baseInverter(object, setter, iteratee2, accumulator) {
  1397. baseForOwn(object, function(value, key, object2) {
  1398. setter(accumulator, iteratee2(value), key, object2);
  1399. });
  1400. return accumulator;
  1401. }
  1402. function baseInvoke(object, path, args) {
  1403. path = castPath(path, object);
  1404. object = parent(object, path);
  1405. var func = object == null ? object : object[toKey(last(path))];
  1406. return func == null ? undefined : apply(func, object, args);
  1407. }
  1408. function baseIsArguments(value) {
  1409. return isObjectLike(value) && baseGetTag(value) == argsTag;
  1410. }
  1411. function baseIsArrayBuffer(value) {
  1412. return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
  1413. }
  1414. function baseIsDate(value) {
  1415. return isObjectLike(value) && baseGetTag(value) == dateTag;
  1416. }
  1417. function baseIsEqual(value, other, bitmask, customizer, stack) {
  1418. if (value === other) {
  1419. return true;
  1420. }
  1421. if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
  1422. return value !== value && other !== other;
  1423. }
  1424. return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
  1425. }
  1426. function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
  1427. var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other);
  1428. objTag = objTag == argsTag ? objectTag : objTag;
  1429. othTag = othTag == argsTag ? objectTag : othTag;
  1430. var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
  1431. if (isSameTag && isBuffer(object)) {
  1432. if (!isBuffer(other)) {
  1433. return false;
  1434. }
  1435. objIsArr = true;
  1436. objIsObj = false;
  1437. }
  1438. if (isSameTag && !objIsObj) {
  1439. stack || (stack = new Stack());
  1440. return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
  1441. }
  1442. if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
  1443. var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__");
  1444. if (objIsWrapped || othIsWrapped) {
  1445. var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
  1446. stack || (stack = new Stack());
  1447. return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
  1448. }
  1449. }
  1450. if (!isSameTag) {
  1451. return false;
  1452. }
  1453. stack || (stack = new Stack());
  1454. return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
  1455. }
  1456. function baseIsMap(value) {
  1457. return isObjectLike(value) && getTag(value) == mapTag;
  1458. }
  1459. function baseIsMatch(object, source, matchData, customizer) {
  1460. var index = matchData.length, length = index, noCustomizer = !customizer;
  1461. if (object == null) {
  1462. return !length;
  1463. }
  1464. object = Object2(object);
  1465. while (index--) {
  1466. var data = matchData[index];
  1467. if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
  1468. return false;
  1469. }
  1470. }
  1471. while (++index < length) {
  1472. data = matchData[index];
  1473. var key = data[0], objValue = object[key], srcValue = data[1];
  1474. if (noCustomizer && data[2]) {
  1475. if (objValue === undefined && !(key in object)) {
  1476. return false;
  1477. }
  1478. } else {
  1479. var stack = new Stack();
  1480. if (customizer) {
  1481. var result2 = customizer(objValue, srcValue, key, object, source, stack);
  1482. }
  1483. if (!(result2 === undefined ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result2)) {
  1484. return false;
  1485. }
  1486. }
  1487. }
  1488. return true;
  1489. }
  1490. function baseIsNative(value) {
  1491. if (!isObject(value) || isMasked(value)) {
  1492. return false;
  1493. }
  1494. var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
  1495. return pattern.test(toSource(value));
  1496. }
  1497. function baseIsRegExp(value) {
  1498. return isObjectLike(value) && baseGetTag(value) == regexpTag;
  1499. }
  1500. function baseIsSet(value) {
  1501. return isObjectLike(value) && getTag(value) == setTag;
  1502. }
  1503. function baseIsTypedArray(value) {
  1504. return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
  1505. }
  1506. function baseIteratee(value) {
  1507. if (typeof value == "function") {
  1508. return value;
  1509. }
  1510. if (value == null) {
  1511. return identity;
  1512. }
  1513. if (typeof value == "object") {
  1514. return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
  1515. }
  1516. return property(value);
  1517. }
  1518. function baseKeys(object) {
  1519. if (!isPrototype(object)) {
  1520. return nativeKeys(object);
  1521. }
  1522. var result2 = [];
  1523. for (var key in Object2(object)) {
  1524. if (hasOwnProperty.call(object, key) && key != "constructor") {
  1525. result2.push(key);
  1526. }
  1527. }
  1528. return result2;
  1529. }
  1530. function baseKeysIn(object) {
  1531. if (!isObject(object)) {
  1532. return nativeKeysIn(object);
  1533. }
  1534. var isProto = isPrototype(object), result2 = [];
  1535. for (var key in object) {
  1536. if (!(key == "constructor" && (isProto || !hasOwnProperty.call(object, key)))) {
  1537. result2.push(key);
  1538. }
  1539. }
  1540. return result2;
  1541. }
  1542. function baseLt(value, other) {
  1543. return value < other;
  1544. }
  1545. function baseMap(collection, iteratee2) {
  1546. var index = -1, result2 = isArrayLike(collection) ? Array2(collection.length) : [];
  1547. baseEach(collection, function(value, key, collection2) {
  1548. result2[++index] = iteratee2(value, key, collection2);
  1549. });
  1550. return result2;
  1551. }
  1552. function baseMatches(source) {
  1553. var matchData = getMatchData(source);
  1554. if (matchData.length == 1 && matchData[0][2]) {
  1555. return matchesStrictComparable(matchData[0][0], matchData[0][1]);
  1556. }
  1557. return function(object) {
  1558. return object === source || baseIsMatch(object, source, matchData);
  1559. };
  1560. }
  1561. function baseMatchesProperty(path, srcValue) {
  1562. if (isKey(path) && isStrictComparable(srcValue)) {
  1563. return matchesStrictComparable(toKey(path), srcValue);
  1564. }
  1565. return function(object) {
  1566. var objValue = get(object, path);
  1567. return objValue === undefined && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
  1568. };
  1569. }
  1570. function baseMerge(object, source, srcIndex, customizer, stack) {
  1571. if (object === source) {
  1572. return;
  1573. }
  1574. baseFor(source, function(srcValue, key) {
  1575. stack || (stack = new Stack());
  1576. if (isObject(srcValue)) {
  1577. baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
  1578. } else {
  1579. var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) : undefined;
  1580. if (newValue === undefined) {
  1581. newValue = srcValue;
  1582. }
  1583. assignMergeValue(object, key, newValue);
  1584. }
  1585. }, keysIn);
  1586. }
  1587. function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
  1588. var objValue = safeGet(object, key), srcValue = safeGet(source, key), stacked = stack.get(srcValue);
  1589. if (stacked) {
  1590. assignMergeValue(object, key, stacked);
  1591. return;
  1592. }
  1593. var newValue = customizer ? customizer(objValue, srcValue, key + "", object, source, stack) : undefined;
  1594. var isCommon = newValue === undefined;
  1595. if (isCommon) {
  1596. var isArr = isArray(srcValue), isBuff = !isArr && isBuffer(srcValue), isTyped = !isArr && !isBuff && isTypedArray(srcValue);
  1597. newValue = srcValue;
  1598. if (isArr || isBuff || isTyped) {
  1599. if (isArray(objValue)) {
  1600. newValue = objValue;
  1601. } else if (isArrayLikeObject(objValue)) {
  1602. newValue = copyArray(objValue);
  1603. } else if (isBuff) {
  1604. isCommon = false;
  1605. newValue = cloneBuffer(srcValue, true);
  1606. } else if (isTyped) {
  1607. isCommon = false;
  1608. newValue = cloneTypedArray(srcValue, true);
  1609. } else {
  1610. newValue = [];
  1611. }
  1612. } else if (isPlainObject(srcValue) || isArguments(srcValue)) {
  1613. newValue = objValue;
  1614. if (isArguments(objValue)) {
  1615. newValue = toPlainObject(objValue);
  1616. } else if (!isObject(objValue) || isFunction(objValue)) {
  1617. newValue = initCloneObject(srcValue);
  1618. }
  1619. } else {
  1620. isCommon = false;
  1621. }
  1622. }
  1623. if (isCommon) {
  1624. stack.set(srcValue, newValue);
  1625. mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
  1626. stack["delete"](srcValue);
  1627. }
  1628. assignMergeValue(object, key, newValue);
  1629. }
  1630. function baseNth(array, n) {
  1631. var length = array.length;
  1632. if (!length) {
  1633. return;
  1634. }
  1635. n += n < 0 ? length : 0;
  1636. return isIndex(n, length) ? array[n] : undefined;
  1637. }
  1638. function baseOrderBy(collection, iteratees, orders) {
  1639. if (iteratees.length) {
  1640. iteratees = arrayMap(iteratees, function(iteratee2) {
  1641. if (isArray(iteratee2)) {
  1642. return function(value) {
  1643. return baseGet(value, iteratee2.length === 1 ? iteratee2[0] : iteratee2);
  1644. };
  1645. }
  1646. return iteratee2;
  1647. });
  1648. } else {
  1649. iteratees = [identity];
  1650. }
  1651. var index = -1;
  1652. iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
  1653. var result2 = baseMap(collection, function(value, key, collection2) {
  1654. var criteria = arrayMap(iteratees, function(iteratee2) {
  1655. return iteratee2(value);
  1656. });
  1657. return { "criteria": criteria, "index": ++index, "value": value };
  1658. });
  1659. return baseSortBy(result2, function(object, other) {
  1660. return compareMultiple(object, other, orders);
  1661. });
  1662. }
  1663. function basePick(object, paths) {
  1664. return basePickBy(object, paths, function(value, path) {
  1665. return hasIn(object, path);
  1666. });
  1667. }
  1668. function basePickBy(object, paths, predicate) {
  1669. var index = -1, length = paths.length, result2 = {};
  1670. while (++index < length) {
  1671. var path = paths[index], value = baseGet(object, path);
  1672. if (predicate(value, path)) {
  1673. baseSet(result2, castPath(path, object), value);
  1674. }
  1675. }
  1676. return result2;
  1677. }
  1678. function basePropertyDeep(path) {
  1679. return function(object) {
  1680. return baseGet(object, path);
  1681. };
  1682. }
  1683. function basePullAll(array, values2, iteratee2, comparator) {
  1684. var indexOf2 = comparator ? baseIndexOfWith : baseIndexOf, index = -1, length = values2.length, seen = array;
  1685. if (array === values2) {
  1686. values2 = copyArray(values2);
  1687. }
  1688. if (iteratee2) {
  1689. seen = arrayMap(array, baseUnary(iteratee2));
  1690. }
  1691. while (++index < length) {
  1692. var fromIndex = 0, value = values2[index], computed = iteratee2 ? iteratee2(value) : value;
  1693. while ((fromIndex = indexOf2(seen, computed, fromIndex, comparator)) > -1) {
  1694. if (seen !== array) {
  1695. splice.call(seen, fromIndex, 1);
  1696. }
  1697. splice.call(array, fromIndex, 1);
  1698. }
  1699. }
  1700. return array;
  1701. }
  1702. function basePullAt(array, indexes) {
  1703. var length = array ? indexes.length : 0, lastIndex = length - 1;
  1704. while (length--) {
  1705. var index = indexes[length];
  1706. if (length == lastIndex || index !== previous) {
  1707. var previous = index;
  1708. if (isIndex(index)) {
  1709. splice.call(array, index, 1);
  1710. } else {
  1711. baseUnset(array, index);
  1712. }
  1713. }
  1714. }
  1715. return array;
  1716. }
  1717. function baseRandom(lower, upper) {
  1718. return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
  1719. }
  1720. function baseRange(start, end, step, fromRight) {
  1721. var index = -1, length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), result2 = Array2(length);
  1722. while (length--) {
  1723. result2[fromRight ? length : ++index] = start;
  1724. start += step;
  1725. }
  1726. return result2;
  1727. }
  1728. function baseRepeat(string, n) {
  1729. var result2 = "";
  1730. if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
  1731. return result2;
  1732. }
  1733. do {
  1734. if (n % 2) {
  1735. result2 += string;
  1736. }
  1737. n = nativeFloor(n / 2);
  1738. if (n) {
  1739. string += string;
  1740. }
  1741. } while (n);
  1742. return result2;
  1743. }
  1744. function baseRest(func, start) {
  1745. return setToString(overRest(func, start, identity), func + "");
  1746. }
  1747. function baseSample(collection) {
  1748. return arraySample(values(collection));
  1749. }
  1750. function baseSampleSize(collection, n) {
  1751. var array = values(collection);
  1752. return shuffleSelf(array, baseClamp(n, 0, array.length));
  1753. }
  1754. function baseSet(object, path, value, customizer) {
  1755. if (!isObject(object)) {
  1756. return object;
  1757. }
  1758. path = castPath(path, object);
  1759. var index = -1, length = path.length, lastIndex = length - 1, nested = object;
  1760. while (nested != null && ++index < length) {
  1761. var key = toKey(path[index]), newValue = value;
  1762. if (key === "__proto__" || key === "constructor" || key === "prototype") {
  1763. return object;
  1764. }
  1765. if (index != lastIndex) {
  1766. var objValue = nested[key];
  1767. newValue = customizer ? customizer(objValue, key, nested) : undefined;
  1768. if (newValue === undefined) {
  1769. newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
  1770. }
  1771. }
  1772. assignValue(nested, key, newValue);
  1773. nested = nested[key];
  1774. }
  1775. return object;
  1776. }
  1777. var baseSetData = !metaMap ? identity : function(func, data) {
  1778. metaMap.set(func, data);
  1779. return func;
  1780. };
  1781. var baseSetToString = !defineProperty ? identity : function(func, string) {
  1782. return defineProperty(func, "toString", {
  1783. "configurable": true,
  1784. "enumerable": false,
  1785. "value": constant(string),
  1786. "writable": true
  1787. });
  1788. };
  1789. function baseShuffle(collection) {
  1790. return shuffleSelf(values(collection));
  1791. }
  1792. function baseSlice(array, start, end) {
  1793. var index = -1, length = array.length;
  1794. if (start < 0) {
  1795. start = -start > length ? 0 : length + start;
  1796. }
  1797. end = end > length ? length : end;
  1798. if (end < 0) {
  1799. end += length;
  1800. }
  1801. length = start > end ? 0 : end - start >>> 0;
  1802. start >>>= 0;
  1803. var result2 = Array2(length);
  1804. while (++index < length) {
  1805. result2[index] = array[index + start];
  1806. }
  1807. return result2;
  1808. }
  1809. function baseSome(collection, predicate) {
  1810. var result2;
  1811. baseEach(collection, function(value, index, collection2) {
  1812. result2 = predicate(value, index, collection2);
  1813. return !result2;
  1814. });
  1815. return !!result2;
  1816. }
  1817. function baseSortedIndex(array, value, retHighest) {
  1818. var low = 0, high = array == null ? low : array.length;
  1819. if (typeof value == "number" && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
  1820. while (low < high) {
  1821. var mid = low + high >>> 1, computed = array[mid];
  1822. if (computed !== null && !isSymbol(computed) && (retHighest ? computed <= value : computed < value)) {
  1823. low = mid + 1;
  1824. } else {
  1825. high = mid;
  1826. }
  1827. }
  1828. return high;
  1829. }
  1830. return baseSortedIndexBy(array, value, identity, retHighest);
  1831. }
  1832. function baseSortedIndexBy(array, value, iteratee2, retHighest) {
  1833. var low = 0, high = array == null ? 0 : array.length;
  1834. if (high === 0) {
  1835. return 0;
  1836. }
  1837. value = iteratee2(value);
  1838. var valIsNaN = value !== value, valIsNull = value === null, valIsSymbol = isSymbol(value), valIsUndefined = value === undefined;
  1839. while (low < high) {
  1840. var mid = nativeFloor((low + high) / 2), computed = iteratee2(array[mid]), othIsDefined = computed !== undefined, othIsNull = computed === null, othIsReflexive = computed === computed, othIsSymbol = isSymbol(computed);
  1841. if (valIsNaN) {
  1842. var setLow = retHighest || othIsReflexive;
  1843. } else if (valIsUndefined) {
  1844. setLow = othIsReflexive && (retHighest || othIsDefined);
  1845. } else if (valIsNull) {
  1846. setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
  1847. } else if (valIsSymbol) {
  1848. setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
  1849. } else if (othIsNull || othIsSymbol) {
  1850. setLow = false;
  1851. } else {
  1852. setLow = retHighest ? computed <= value : computed < value;
  1853. }
  1854. if (setLow) {
  1855. low = mid + 1;
  1856. } else {
  1857. high = mid;
  1858. }
  1859. }
  1860. return nativeMin(high, MAX_ARRAY_INDEX);
  1861. }
  1862. function baseSortedUniq(array, iteratee2) {
  1863. var index = -1, length = array.length, resIndex = 0, result2 = [];
  1864. while (++index < length) {
  1865. var value = array[index], computed = iteratee2 ? iteratee2(value) : value;
  1866. if (!index || !eq(computed, seen)) {
  1867. var seen = computed;
  1868. result2[resIndex++] = value === 0 ? 0 : value;
  1869. }
  1870. }
  1871. return result2;
  1872. }
  1873. function baseToNumber(value) {
  1874. if (typeof value == "number") {
  1875. return value;
  1876. }
  1877. if (isSymbol(value)) {
  1878. return NAN;
  1879. }
  1880. return +value;
  1881. }
  1882. function baseToString(value) {
  1883. if (typeof value == "string") {
  1884. return value;
  1885. }
  1886. if (isArray(value)) {
  1887. return arrayMap(value, baseToString) + "";
  1888. }
  1889. if (isSymbol(value)) {
  1890. return symbolToString ? symbolToString.call(value) : "";
  1891. }
  1892. var result2 = value + "";
  1893. return result2 == "0" && 1 / value == -INFINITY ? "-0" : result2;
  1894. }
  1895. function baseUniq(array, iteratee2, comparator) {
  1896. var index = -1, includes2 = arrayIncludes, length = array.length, isCommon = true, result2 = [], seen = result2;
  1897. if (comparator) {
  1898. isCommon = false;
  1899. includes2 = arrayIncludesWith;
  1900. } else if (length >= LARGE_ARRAY_SIZE) {
  1901. var set2 = iteratee2 ? null : createSet(array);
  1902. if (set2) {
  1903. return setToArray(set2);
  1904. }
  1905. isCommon = false;
  1906. includes2 = cacheHas;
  1907. seen = new SetCache();
  1908. } else {
  1909. seen = iteratee2 ? [] : result2;
  1910. }
  1911. outer:
  1912. while (++index < length) {
  1913. var value = array[index], computed = iteratee2 ? iteratee2(value) : value;
  1914. value = comparator || value !== 0 ? value : 0;
  1915. if (isCommon && computed === computed) {
  1916. var seenIndex = seen.length;
  1917. while (seenIndex--) {
  1918. if (seen[seenIndex] === computed) {
  1919. continue outer;
  1920. }
  1921. }
  1922. if (iteratee2) {
  1923. seen.push(computed);
  1924. }
  1925. result2.push(value);
  1926. } else if (!includes2(seen, computed, comparator)) {
  1927. if (seen !== result2) {
  1928. seen.push(computed);
  1929. }
  1930. result2.push(value);
  1931. }
  1932. }
  1933. return result2;
  1934. }
  1935. function baseUnset(object, path) {
  1936. path = castPath(path, object);
  1937. object = parent(object, path);
  1938. return object == null || delete object[toKey(last(path))];
  1939. }
  1940. function baseUpdate(object, path, updater, customizer) {
  1941. return baseSet(object, path, updater(baseGet(object, path)), customizer);
  1942. }
  1943. function baseWhile(array, predicate, isDrop, fromRight) {
  1944. var length = array.length, index = fromRight ? length : -1;
  1945. while ((fromRight ? index-- : ++index < length) && predicate(array[index], index, array)) {
  1946. }
  1947. return isDrop ? baseSlice(array, fromRight ? 0 : index, fromRight ? index + 1 : length) : baseSlice(array, fromRight ? index + 1 : 0, fromRight ? length : index);
  1948. }
  1949. function baseWrapperValue(value, actions) {
  1950. var result2 = value;
  1951. if (result2 instanceof LazyWrapper) {
  1952. result2 = result2.value();
  1953. }
  1954. return arrayReduce(actions, function(result3, action) {
  1955. return action.func.apply(action.thisArg, arrayPush([result3], action.args));
  1956. }, result2);
  1957. }
  1958. function baseXor(arrays, iteratee2, comparator) {
  1959. var length = arrays.length;
  1960. if (length < 2) {
  1961. return length ? baseUniq(arrays[0]) : [];
  1962. }
  1963. var index = -1, result2 = Array2(length);
  1964. while (++index < length) {
  1965. var array = arrays[index], othIndex = -1;
  1966. while (++othIndex < length) {
  1967. if (othIndex != index) {
  1968. result2[index] = baseDifference(result2[index] || array, arrays[othIndex], iteratee2, comparator);
  1969. }
  1970. }
  1971. }
  1972. return baseUniq(baseFlatten(result2, 1), iteratee2, comparator);
  1973. }
  1974. function baseZipObject(props, values2, assignFunc) {
  1975. var index = -1, length = props.length, valsLength = values2.length, result2 = {};
  1976. while (++index < length) {
  1977. var value = index < valsLength ? values2[index] : undefined;
  1978. assignFunc(result2, props[index], value);
  1979. }
  1980. return result2;
  1981. }
  1982. function castArrayLikeObject(value) {
  1983. return isArrayLikeObject(value) ? value : [];
  1984. }
  1985. function castFunction(value) {
  1986. return typeof value == "function" ? value : identity;
  1987. }
  1988. function castPath(value, object) {
  1989. if (isArray(value)) {
  1990. return value;
  1991. }
  1992. return isKey(value, object) ? [value] : stringToPath(toString(value));
  1993. }
  1994. var castRest = baseRest;
  1995. function castSlice(array, start, end) {
  1996. var length = array.length;
  1997. end = end === undefined ? length : end;
  1998. return !start && end >= length ? array : baseSlice(array, start, end);
  1999. }
  2000. var clearTimeout = ctxClearTimeout || function(id) {
  2001. return root.clearTimeout(id);
  2002. };
  2003. function cloneBuffer(buffer, isDeep) {
  2004. if (isDeep) {
  2005. return buffer.slice();
  2006. }
  2007. var length = buffer.length, result2 = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
  2008. buffer.copy(result2);
  2009. return result2;
  2010. }
  2011. function cloneArrayBuffer(arrayBuffer) {
  2012. var result2 = new arrayBuffer.constructor(arrayBuffer.byteLength);
  2013. new Uint8Array(result2).set(new Uint8Array(arrayBuffer));
  2014. return result2;
  2015. }
  2016. function cloneDataView(dataView, isDeep) {
  2017. var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
  2018. return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
  2019. }
  2020. function cloneRegExp(regexp) {
  2021. var result2 = new regexp.constructor(regexp.source, reFlags.exec(regexp));
  2022. result2.lastIndex = regexp.lastIndex;
  2023. return result2;
  2024. }
  2025. function cloneSymbol(symbol) {
  2026. return symbolValueOf ? Object2(symbolValueOf.call(symbol)) : {};
  2027. }
  2028. function cloneTypedArray(typedArray, isDeep) {
  2029. var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
  2030. return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
  2031. }
  2032. function compareAscending(value, other) {
  2033. if (value !== other) {
  2034. var valIsDefined = value !== undefined, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol = isSymbol(value);
  2035. var othIsDefined = other !== undefined, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol = isSymbol(other);
  2036. if (!othIsNull && !othIsSymbol && !valIsSymbol && value > other || valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol || valIsNull && othIsDefined && othIsReflexive || !valIsDefined && othIsReflexive || !valIsReflexive) {
  2037. return 1;
  2038. }
  2039. if (!valIsNull && !valIsSymbol && !othIsSymbol && value < other || othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol || othIsNull && valIsDefined && valIsReflexive || !othIsDefined && valIsReflexive || !othIsReflexive) {
  2040. return -1;
  2041. }
  2042. }
  2043. return 0;
  2044. }
  2045. function compareMultiple(object, other, orders) {
  2046. var index = -1, objCriteria = object.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length;
  2047. while (++index < length) {
  2048. var result2 = compareAscending(objCriteria[index], othCriteria[index]);
  2049. if (result2) {
  2050. if (index >= ordersLength) {
  2051. return result2;
  2052. }
  2053. var order = orders[index];
  2054. return result2 * (order == "desc" ? -1 : 1);
  2055. }
  2056. }
  2057. return object.index - other.index;
  2058. }
  2059. function composeArgs(args, partials, holders, isCurried) {
  2060. var argsIndex = -1, argsLength = args.length, holdersLength = holders.length, leftIndex = -1, leftLength = partials.length, rangeLength = nativeMax(argsLength - holdersLength, 0), result2 = Array2(leftLength + rangeLength), isUncurried = !isCurried;
  2061. while (++leftIndex < leftLength) {
  2062. result2[leftIndex] = partials[leftIndex];
  2063. }
  2064. while (++argsIndex < holdersLength) {
  2065. if (isUncurried || argsIndex < argsLength) {
  2066. result2[holders[argsIndex]] = args[argsIndex];
  2067. }
  2068. }
  2069. while (rangeLength--) {
  2070. result2[leftIndex++] = args[argsIndex++];
  2071. }
  2072. return result2;
  2073. }
  2074. function composeArgsRight(args, partials, holders, isCurried) {
  2075. var argsIndex = -1, argsLength = args.length, holdersIndex = -1, holdersLength = holders.length, rightIndex = -1, rightLength = partials.length, rangeLength = nativeMax(argsLength - holdersLength, 0), result2 = Array2(rangeLength + rightLength), isUncurried = !isCurried;
  2076. while (++argsIndex < rangeLength) {
  2077. result2[argsIndex] = args[argsIndex];
  2078. }
  2079. var offset = argsIndex;
  2080. while (++rightIndex < rightLength) {
  2081. result2[offset + rightIndex] = partials[rightIndex];
  2082. }
  2083. while (++holdersIndex < holdersLength) {
  2084. if (isUncurried || argsIndex < argsLength) {
  2085. result2[offset + holders[holdersIndex]] = args[argsIndex++];
  2086. }
  2087. }
  2088. return result2;
  2089. }
  2090. function copyArray(source, array) {
  2091. var index = -1, length = source.length;
  2092. array || (array = Array2(length));
  2093. while (++index < length) {
  2094. array[index] = source[index];
  2095. }
  2096. return array;
  2097. }
  2098. function copyObject(source, props, object, customizer) {
  2099. var isNew = !object;
  2100. object || (object = {});
  2101. var index = -1, length = props.length;
  2102. while (++index < length) {
  2103. var key = props[index];
  2104. var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined;
  2105. if (newValue === undefined) {
  2106. newValue = source[key];
  2107. }
  2108. if (isNew) {
  2109. baseAssignValue(object, key, newValue);
  2110. } else {
  2111. assignValue(object, key, newValue);
  2112. }
  2113. }
  2114. return object;
  2115. }
  2116. function copySymbols(source, object) {
  2117. return copyObject(source, getSymbols(source), object);
  2118. }
  2119. function copySymbolsIn(source, object) {
  2120. return copyObject(source, getSymbolsIn(source), object);
  2121. }
  2122. function createAggregator(setter, initializer) {
  2123. return function(collection, iteratee2) {
  2124. var func = isArray(collection) ? arrayAggregator : baseAggregator, accumulator = initializer ? initializer() : {};
  2125. return func(collection, setter, getIteratee(iteratee2, 2), accumulator);
  2126. };
  2127. }
  2128. function createAssigner(assigner) {
  2129. return baseRest(function(object, sources) {
  2130. var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined, guard = length > 2 ? sources[2] : undefined;
  2131. customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : undefined;
  2132. if (guard && isIterateeCall(sources[0], sources[1], guard)) {
  2133. customizer = length < 3 ? undefined : customizer;
  2134. length = 1;
  2135. }
  2136. object = Object2(object);
  2137. while (++index < length) {
  2138. var source = sources[index];
  2139. if (source) {
  2140. assigner(object, source, index, customizer);
  2141. }
  2142. }
  2143. return object;
  2144. });
  2145. }
  2146. function createBaseEach(eachFunc, fromRight) {
  2147. return function(collection, iteratee2) {
  2148. if (collection == null) {
  2149. return collection;
  2150. }
  2151. if (!isArrayLike(collection)) {
  2152. return eachFunc(collection, iteratee2);
  2153. }
  2154. var length = collection.length, index = fromRight ? length : -1, iterable = Object2(collection);
  2155. while (fromRight ? index-- : ++index < length) {
  2156. if (iteratee2(iterable[index], index, iterable) === false) {
  2157. break;
  2158. }
  2159. }
  2160. return collection;
  2161. };
  2162. }
  2163. function createBaseFor(fromRight) {
  2164. return function(object, iteratee2, keysFunc) {
  2165. var index = -1, iterable = Object2(object), props = keysFunc(object), length = props.length;
  2166. while (length--) {
  2167. var key = props[fromRight ? length : ++index];
  2168. if (iteratee2(iterable[key], key, iterable) === false) {
  2169. break;
  2170. }
  2171. }
  2172. return object;
  2173. };
  2174. }
  2175. function createBind(func, bitmask, thisArg) {
  2176. var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func);
  2177. function wrapper() {
  2178. var fn = this && this !== root && this instanceof wrapper ? Ctor : func;
  2179. return fn.apply(isBind ? thisArg : this, arguments);
  2180. }
  2181. return wrapper;
  2182. }
  2183. function createCaseFirst(methodName) {
  2184. return function(string) {
  2185. string = toString(string);
  2186. var strSymbols = hasUnicode(string) ? stringToArray(string) : undefined;
  2187. var chr = strSymbols ? strSymbols[0] : string.charAt(0);
  2188. var trailing = strSymbols ? castSlice(strSymbols, 1).join("") : string.slice(1);
  2189. return chr[methodName]() + trailing;
  2190. };
  2191. }
  2192. function createCompounder(callback) {
  2193. return function(string) {
  2194. return arrayReduce(words(deburr(string).replace(reApos, "")), callback, "");
  2195. };
  2196. }
  2197. function createCtor(Ctor) {
  2198. return function() {
  2199. var args = arguments;
  2200. switch (args.length) {
  2201. case 0:
  2202. return new Ctor();
  2203. case 1:
  2204. return new Ctor(args[0]);
  2205. case 2:
  2206. return new Ctor(args[0], args[1]);
  2207. case 3:
  2208. return new Ctor(args[0], args[1], args[2]);
  2209. case 4:
  2210. return new Ctor(args[0], args[1], args[2], args[3]);
  2211. case 5:
  2212. return new Ctor(args[0], args[1], args[2], args[3], args[4]);
  2213. case 6:
  2214. return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
  2215. case 7:
  2216. return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
  2217. }
  2218. var thisBinding = baseCreate(Ctor.prototype), result2 = Ctor.apply(thisBinding, args);
  2219. return isObject(result2) ? result2 : thisBinding;
  2220. };
  2221. }
  2222. function createCurry(func, bitmask, arity) {
  2223. var Ctor = createCtor(func);
  2224. function wrapper() {
  2225. var length = arguments.length, args = Array2(length), index = length, placeholder = getHolder(wrapper);
  2226. while (index--) {
  2227. args[index] = arguments[index];
  2228. }
  2229. var holders = length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder ? [] : replaceHolders(args, placeholder);
  2230. length -= holders.length;
  2231. if (length < arity) {
  2232. return createRecurry(
  2233. func,
  2234. bitmask,
  2235. createHybrid,
  2236. wrapper.placeholder,
  2237. undefined,
  2238. args,
  2239. holders,
  2240. undefined,
  2241. undefined,
  2242. arity - length
  2243. );
  2244. }
  2245. var fn = this && this !== root && this instanceof wrapper ? Ctor : func;
  2246. return apply(fn, this, args);
  2247. }
  2248. return wrapper;
  2249. }
  2250. function createFind(findIndexFunc) {
  2251. return function(collection, predicate, fromIndex) {
  2252. var iterable = Object2(collection);
  2253. if (!isArrayLike(collection)) {
  2254. var iteratee2 = getIteratee(predicate, 3);
  2255. collection = keys(collection);
  2256. predicate = function(key) {
  2257. return iteratee2(iterable[key], key, iterable);
  2258. };
  2259. }
  2260. var index = findIndexFunc(collection, predicate, fromIndex);
  2261. return index > -1 ? iterable[iteratee2 ? collection[index] : index] : undefined;
  2262. };
  2263. }
  2264. function createFlow(fromRight) {
  2265. return flatRest(function(funcs) {
  2266. var length = funcs.length, index = length, prereq = LodashWrapper.prototype.thru;
  2267. if (fromRight) {
  2268. funcs.reverse();
  2269. }
  2270. while (index--) {
  2271. var func = funcs[index];
  2272. if (typeof func != "function") {
  2273. throw new TypeError(FUNC_ERROR_TEXT);
  2274. }
  2275. if (prereq && !wrapper && getFuncName(func) == "wrapper") {
  2276. var wrapper = new LodashWrapper([], true);
  2277. }
  2278. }
  2279. index = wrapper ? index : length;
  2280. while (++index < length) {
  2281. func = funcs[index];
  2282. var funcName = getFuncName(func), data = funcName == "wrapper" ? getData(func) : undefined;
  2283. if (data && isLaziable(data[0]) && data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && !data[4].length && data[9] == 1) {
  2284. wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
  2285. } else {
  2286. wrapper = func.length == 1 && isLaziable(func) ? wrapper[funcName]() : wrapper.thru(func);
  2287. }
  2288. }
  2289. return function() {
  2290. var args = arguments, value = args[0];
  2291. if (wrapper && args.length == 1 && isArray(value)) {
  2292. return wrapper.plant(value).value();
  2293. }
  2294. var index2 = 0, result2 = length ? funcs[index2].apply(this, args) : value;
  2295. while (++index2 < length) {
  2296. result2 = funcs[index2].call(this, result2);
  2297. }
  2298. return result2;
  2299. };
  2300. });
  2301. }
  2302. function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary2, arity) {
  2303. var isAry = bitmask & WRAP_ARY_FLAG, isBind = bitmask & WRAP_BIND_FLAG, isBindKey = bitmask & WRAP_BIND_KEY_FLAG, isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), isFlip = bitmask & WRAP_FLIP_FLAG, Ctor = isBindKey ? undefined : createCtor(func);
  2304. function wrapper() {
  2305. var length = arguments.length, args = Array2(length), index = length;
  2306. while (index--) {
  2307. args[index] = arguments[index];
  2308. }
  2309. if (isCurried) {
  2310. var placeholder = getHolder(wrapper), holdersCount = countHolders(args, placeholder);
  2311. }
  2312. if (partials) {
  2313. args = composeArgs(args, partials, holders, isCurried);
  2314. }
  2315. if (partialsRight) {
  2316. args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
  2317. }
  2318. length -= holdersCount;
  2319. if (isCurried && length < arity) {
  2320. var newHolders = replaceHolders(args, placeholder);
  2321. return createRecurry(
  2322. func,
  2323. bitmask,
  2324. createHybrid,
  2325. wrapper.placeholder,
  2326. thisArg,
  2327. args,
  2328. newHolders,
  2329. argPos,
  2330. ary2,
  2331. arity - length
  2332. );
  2333. }
  2334. var thisBinding = isBind ? thisArg : this, fn = isBindKey ? thisBinding[func] : func;
  2335. length = args.length;
  2336. if (argPos) {
  2337. args = reorder(args, argPos);
  2338. } else if (isFlip && length > 1) {
  2339. args.reverse();
  2340. }
  2341. if (isAry && ary2 < length) {
  2342. args.length = ary2;
  2343. }
  2344. if (this && this !== root && this instanceof wrapper) {
  2345. fn = Ctor || createCtor(fn);
  2346. }
  2347. return fn.apply(thisBinding, args);
  2348. }
  2349. return wrapper;
  2350. }
  2351. function createInverter(setter, toIteratee) {
  2352. return function(object, iteratee2) {
  2353. return baseInverter(object, setter, toIteratee(iteratee2), {});
  2354. };
  2355. }
  2356. function createMathOperation(operator, defaultValue) {
  2357. return function(value, other) {
  2358. var result2;
  2359. if (value === undefined && other === undefined) {
  2360. return defaultValue;
  2361. }
  2362. if (value !== undefined) {
  2363. result2 = value;
  2364. }
  2365. if (other !== undefined) {
  2366. if (result2 === undefined) {
  2367. return other;
  2368. }
  2369. if (typeof value == "string" || typeof other == "string") {
  2370. value = baseToString(value);
  2371. other = baseToString(other);
  2372. } else {
  2373. value = baseToNumber(value);
  2374. other = baseToNumber(other);
  2375. }
  2376. result2 = operator(value, other);
  2377. }
  2378. return result2;
  2379. };
  2380. }
  2381. function createOver(arrayFunc) {
  2382. return flatRest(function(iteratees) {
  2383. iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
  2384. return baseRest(function(args) {
  2385. var thisArg = this;
  2386. return arrayFunc(iteratees, function(iteratee2) {
  2387. return apply(iteratee2, thisArg, args);
  2388. });
  2389. });
  2390. });
  2391. }
  2392. function createPadding(length, chars) {
  2393. chars = chars === undefined ? " " : baseToString(chars);
  2394. var charsLength = chars.length;
  2395. if (charsLength < 2) {
  2396. return charsLength ? baseRepeat(chars, length) : chars;
  2397. }
  2398. var result2 = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
  2399. return hasUnicode(chars) ? castSlice(stringToArray(result2), 0, length).join("") : result2.slice(0, length);
  2400. }
  2401. function createPartial(func, bitmask, thisArg, partials) {
  2402. var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func);
  2403. function wrapper() {
  2404. var argsIndex = -1, argsLength = arguments.length, leftIndex = -1, leftLength = partials.length, args = Array2(leftLength + argsLength), fn = this && this !== root && this instanceof wrapper ? Ctor : func;
  2405. while (++leftIndex < leftLength) {
  2406. args[leftIndex] = partials[leftIndex];
  2407. }
  2408. while (argsLength--) {
  2409. args[leftIndex++] = arguments[++argsIndex];
  2410. }
  2411. return apply(fn, isBind ? thisArg : this, args);
  2412. }
  2413. return wrapper;
  2414. }
  2415. function createRange(fromRight) {
  2416. return function(start, end, step) {
  2417. if (step && typeof step != "number" && isIterateeCall(start, end, step)) {
  2418. end = step = undefined;
  2419. }
  2420. start = toFinite(start);
  2421. if (end === undefined) {
  2422. end = start;
  2423. start = 0;
  2424. } else {
  2425. end = toFinite(end);
  2426. }
  2427. step = step === undefined ? start < end ? 1 : -1 : toFinite(step);
  2428. return baseRange(start, end, step, fromRight);
  2429. };
  2430. }
  2431. function createRelationalOperation(operator) {
  2432. return function(value, other) {
  2433. if (!(typeof value == "string" && typeof other == "string")) {
  2434. value = toNumber(value);
  2435. other = toNumber(other);
  2436. }
  2437. return operator(value, other);
  2438. };
  2439. }
  2440. function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary2, arity) {
  2441. var isCurry = bitmask & WRAP_CURRY_FLAG, newHolders = isCurry ? holders : undefined, newHoldersRight = isCurry ? undefined : holders, newPartials = isCurry ? partials : undefined, newPartialsRight = isCurry ? undefined : partials;
  2442. bitmask |= isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG;
  2443. bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
  2444. if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
  2445. bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
  2446. }
  2447. var newData = [
  2448. func,
  2449. bitmask,
  2450. thisArg,
  2451. newPartials,
  2452. newHolders,
  2453. newPartialsRight,
  2454. newHoldersRight,
  2455. argPos,
  2456. ary2,
  2457. arity
  2458. ];
  2459. var result2 = wrapFunc.apply(undefined, newData);
  2460. if (isLaziable(func)) {
  2461. setData(result2, newData);
  2462. }
  2463. result2.placeholder = placeholder;
  2464. return setWrapToString(result2, func, bitmask);
  2465. }
  2466. function createRound(methodName) {
  2467. var func = Math[methodName];
  2468. return function(number, precision) {
  2469. number = toNumber(number);
  2470. precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
  2471. if (precision && nativeIsFinite(number)) {
  2472. var pair = (toString(number) + "e").split("e"), value = func(pair[0] + "e" + (+pair[1] + precision));
  2473. pair = (toString(value) + "e").split("e");
  2474. return +(pair[0] + "e" + (+pair[1] - precision));
  2475. }
  2476. return func(number);
  2477. };
  2478. }
  2479. var createSet = !(Set && 1 / setToArray(new Set([, -0]))[1] == INFINITY) ? noop : function(values2) {
  2480. return new Set(values2);
  2481. };
  2482. function createToPairs(keysFunc) {
  2483. return function(object) {
  2484. var tag = getTag(object);
  2485. if (tag == mapTag) {
  2486. return mapToArray(object);
  2487. }
  2488. if (tag == setTag) {
  2489. return setToPairs(object);
  2490. }
  2491. return baseToPairs(object, keysFunc(object));
  2492. };
  2493. }
  2494. function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary2, arity) {
  2495. var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
  2496. if (!isBindKey && typeof func != "function") {
  2497. throw new TypeError(FUNC_ERROR_TEXT);
  2498. }
  2499. var length = partials ? partials.length : 0;
  2500. if (!length) {
  2501. bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
  2502. partials = holders = undefined;
  2503. }
  2504. ary2 = ary2 === undefined ? ary2 : nativeMax(toInteger(ary2), 0);
  2505. arity = arity === undefined ? arity : toInteger(arity);
  2506. length -= holders ? holders.length : 0;
  2507. if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
  2508. var partialsRight = partials, holdersRight = holders;
  2509. partials = holders = undefined;
  2510. }
  2511. var data = isBindKey ? undefined : getData(func);
  2512. var newData = [
  2513. func,
  2514. bitmask,
  2515. thisArg,
  2516. partials,
  2517. holders,
  2518. partialsRight,
  2519. holdersRight,
  2520. argPos,
  2521. ary2,
  2522. arity
  2523. ];
  2524. if (data) {
  2525. mergeData(newData, data);
  2526. }
  2527. func = newData[0];
  2528. bitmask = newData[1];
  2529. thisArg = newData[2];
  2530. partials = newData[3];
  2531. holders = newData[4];
  2532. arity = newData[9] = newData[9] === undefined ? isBindKey ? 0 : func.length : nativeMax(newData[9] - length, 0);
  2533. if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
  2534. bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
  2535. }
  2536. if (!bitmask || bitmask == WRAP_BIND_FLAG) {
  2537. var result2 = createBind(func, bitmask, thisArg);
  2538. } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
  2539. result2 = createCurry(func, bitmask, arity);
  2540. } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
  2541. result2 = createPartial(func, bitmask, thisArg, partials);
  2542. } else {
  2543. result2 = createHybrid.apply(undefined, newData);
  2544. }
  2545. var setter = data ? baseSetData : setData;
  2546. return setWrapToString(setter(result2, newData), func, bitmask);
  2547. }
  2548. function customDefaultsAssignIn(objValue, srcValue, key, object) {
  2549. if (objValue === undefined || eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key)) {
  2550. return srcValue;
  2551. }
  2552. return objValue;
  2553. }
  2554. function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
  2555. if (isObject(objValue) && isObject(srcValue)) {
  2556. stack.set(srcValue, objValue);
  2557. baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
  2558. stack["delete"](srcValue);
  2559. }
  2560. return objValue;
  2561. }
  2562. function customOmitClone(value) {
  2563. return isPlainObject(value) ? undefined : value;
  2564. }
  2565. function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
  2566. var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length;
  2567. if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
  2568. return false;
  2569. }
  2570. var arrStacked = stack.get(array);
  2571. var othStacked = stack.get(other);
  2572. if (arrStacked && othStacked) {
  2573. return arrStacked == other && othStacked == array;
  2574. }
  2575. var index = -1, result2 = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined;
  2576. stack.set(array, other);
  2577. stack.set(other, array);
  2578. while (++index < arrLength) {
  2579. var arrValue = array[index], othValue = other[index];
  2580. if (customizer) {
  2581. var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
  2582. }
  2583. if (compared !== undefined) {
  2584. if (compared) {
  2585. continue;
  2586. }
  2587. result2 = false;
  2588. break;
  2589. }
  2590. if (seen) {
  2591. if (!arraySome(other, function(othValue2, othIndex) {
  2592. if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) {
  2593. return seen.push(othIndex);
  2594. }
  2595. })) {
  2596. result2 = false;
  2597. break;
  2598. }
  2599. } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
  2600. result2 = false;
  2601. break;
  2602. }
  2603. }
  2604. stack["delete"](array);
  2605. stack["delete"](other);
  2606. return result2;
  2607. }
  2608. function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
  2609. switch (tag) {
  2610. case dataViewTag:
  2611. if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
  2612. return false;
  2613. }
  2614. object = object.buffer;
  2615. other = other.buffer;
  2616. case arrayBufferTag:
  2617. if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
  2618. return false;
  2619. }
  2620. return true;
  2621. case boolTag:
  2622. case dateTag:
  2623. case numberTag:
  2624. return eq(+object, +other);
  2625. case errorTag:
  2626. return object.name == other.name && object.message == other.message;
  2627. case regexpTag:
  2628. case stringTag:
  2629. return object == other + "";
  2630. case mapTag:
  2631. var convert = mapToArray;
  2632. case setTag:
  2633. var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
  2634. convert || (convert = setToArray);
  2635. if (object.size != other.size && !isPartial) {
  2636. return false;
  2637. }
  2638. var stacked = stack.get(object);
  2639. if (stacked) {
  2640. return stacked == other;
  2641. }
  2642. bitmask |= COMPARE_UNORDERED_FLAG;
  2643. stack.set(object, other);
  2644. var result2 = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
  2645. stack["delete"](object);
  2646. return result2;
  2647. case symbolTag:
  2648. if (symbolValueOf) {
  2649. return symbolValueOf.call(object) == symbolValueOf.call(other);
  2650. }
  2651. }
  2652. return false;
  2653. }
  2654. function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
  2655. var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length;
  2656. if (objLength != othLength && !isPartial) {
  2657. return false;
  2658. }
  2659. var index = objLength;
  2660. while (index--) {
  2661. var key = objProps[index];
  2662. if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
  2663. return false;
  2664. }
  2665. }
  2666. var objStacked = stack.get(object);
  2667. var othStacked = stack.get(other);
  2668. if (objStacked && othStacked) {
  2669. return objStacked == other && othStacked == object;
  2670. }
  2671. var result2 = true;
  2672. stack.set(object, other);
  2673. stack.set(other, object);
  2674. var skipCtor = isPartial;
  2675. while (++index < objLength) {
  2676. key = objProps[index];
  2677. var objValue = object[key], othValue = other[key];
  2678. if (customizer) {
  2679. var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
  2680. }
  2681. if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
  2682. result2 = false;
  2683. break;
  2684. }
  2685. skipCtor || (skipCtor = key == "constructor");
  2686. }
  2687. if (result2 && !skipCtor) {
  2688. var objCtor = object.constructor, othCtor = other.constructor;
  2689. if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
  2690. result2 = false;
  2691. }
  2692. }
  2693. stack["delete"](object);
  2694. stack["delete"](other);
  2695. return result2;
  2696. }
  2697. function flatRest(func) {
  2698. return setToString(overRest(func, undefined, flatten), func + "");
  2699. }
  2700. function getAllKeys(object) {
  2701. return baseGetAllKeys(object, keys, getSymbols);
  2702. }
  2703. function getAllKeysIn(object) {
  2704. return baseGetAllKeys(object, keysIn, getSymbolsIn);
  2705. }
  2706. var getData = !metaMap ? noop : function(func) {
  2707. return metaMap.get(func);
  2708. };
  2709. function getFuncName(func) {
  2710. var result2 = func.name + "", array = realNames[result2], length = hasOwnProperty.call(realNames, result2) ? array.length : 0;
  2711. while (length--) {
  2712. var data = array[length], otherFunc = data.func;
  2713. if (otherFunc == null || otherFunc == func) {
  2714. return data.name;
  2715. }
  2716. }
  2717. return result2;
  2718. }
  2719. function getHolder(func) {
  2720. var object = hasOwnProperty.call(lodash, "placeholder") ? lodash : func;
  2721. return object.placeholder;
  2722. }
  2723. function getIteratee() {
  2724. var result2 = lodash.iteratee || iteratee;
  2725. result2 = result2 === iteratee ? baseIteratee : result2;
  2726. return arguments.length ? result2(arguments[0], arguments[1]) : result2;
  2727. }
  2728. function getMapData(map2, key) {
  2729. var data = map2.__data__;
  2730. return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
  2731. }
  2732. function getMatchData(object) {
  2733. var result2 = keys(object), length = result2.length;
  2734. while (length--) {
  2735. var key = result2[length], value = object[key];
  2736. result2[length] = [key, value, isStrictComparable(value)];
  2737. }
  2738. return result2;
  2739. }
  2740. function getNative(object, key) {
  2741. var value = getValue(object, key);
  2742. return baseIsNative(value) ? value : undefined;
  2743. }
  2744. function getRawTag(value) {
  2745. var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
  2746. try {
  2747. value[symToStringTag] = undefined;
  2748. var unmasked = true;
  2749. } catch (e) {
  2750. }
  2751. var result2 = nativeObjectToString.call(value);
  2752. if (unmasked) {
  2753. if (isOwn) {
  2754. value[symToStringTag] = tag;
  2755. } else {
  2756. delete value[symToStringTag];
  2757. }
  2758. }
  2759. return result2;
  2760. }
  2761. var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
  2762. if (object == null) {
  2763. return [];
  2764. }
  2765. object = Object2(object);
  2766. return arrayFilter(nativeGetSymbols(object), function(symbol) {
  2767. return propertyIsEnumerable.call(object, symbol);
  2768. });
  2769. };
  2770. var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
  2771. var result2 = [];
  2772. while (object) {
  2773. arrayPush(result2, getSymbols(object));
  2774. object = getPrototype(object);
  2775. }
  2776. return result2;
  2777. };
  2778. var getTag = baseGetTag;
  2779. if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
  2780. getTag = function(value) {
  2781. var result2 = baseGetTag(value), Ctor = result2 == objectTag ? value.constructor : undefined, ctorString = Ctor ? toSource(Ctor) : "";
  2782. if (ctorString) {
  2783. switch (ctorString) {
  2784. case dataViewCtorString:
  2785. return dataViewTag;
  2786. case mapCtorString:
  2787. return mapTag;
  2788. case promiseCtorString:
  2789. return promiseTag;
  2790. case setCtorString:
  2791. return setTag;
  2792. case weakMapCtorString:
  2793. return weakMapTag;
  2794. }
  2795. }
  2796. return result2;
  2797. };
  2798. }
  2799. function getView(start, end, transforms) {
  2800. var index = -1, length = transforms.length;
  2801. while (++index < length) {
  2802. var data = transforms[index], size2 = data.size;
  2803. switch (data.type) {
  2804. case "drop":
  2805. start += size2;
  2806. break;
  2807. case "dropRight":
  2808. end -= size2;
  2809. break;
  2810. case "take":
  2811. end = nativeMin(end, start + size2);
  2812. break;
  2813. case "takeRight":
  2814. start = nativeMax(start, end - size2);
  2815. break;
  2816. }
  2817. }
  2818. return { "start": start, "end": end };
  2819. }
  2820. function getWrapDetails(source) {
  2821. var match = source.match(reWrapDetails);
  2822. return match ? match[1].split(reSplitDetails) : [];
  2823. }
  2824. function hasPath(object, path, hasFunc) {
  2825. path = castPath(path, object);
  2826. var index = -1, length = path.length, result2 = false;
  2827. while (++index < length) {
  2828. var key = toKey(path[index]);
  2829. if (!(result2 = object != null && hasFunc(object, key))) {
  2830. break;
  2831. }
  2832. object = object[key];
  2833. }
  2834. if (result2 || ++index != length) {
  2835. return result2;
  2836. }
  2837. length = object == null ? 0 : object.length;
  2838. return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));
  2839. }
  2840. function initCloneArray(array) {
  2841. var length = array.length, result2 = new array.constructor(length);
  2842. if (length && typeof array[0] == "string" && hasOwnProperty.call(array, "index")) {
  2843. result2.index = array.index;
  2844. result2.input = array.input;
  2845. }
  2846. return result2;
  2847. }
  2848. function initCloneObject(object) {
  2849. return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
  2850. }
  2851. function initCloneByTag(object, tag, isDeep) {
  2852. var Ctor = object.constructor;
  2853. switch (tag) {
  2854. case arrayBufferTag:
  2855. return cloneArrayBuffer(object);
  2856. case boolTag:
  2857. case dateTag:
  2858. return new Ctor(+object);
  2859. case dataViewTag:
  2860. return cloneDataView(object, isDeep);
  2861. case float32Tag:
  2862. case float64Tag:
  2863. case int8Tag:
  2864. case int16Tag:
  2865. case int32Tag:
  2866. case uint8Tag:
  2867. case uint8ClampedTag:
  2868. case uint16Tag:
  2869. case uint32Tag:
  2870. return cloneTypedArray(object, isDeep);
  2871. case mapTag:
  2872. return new Ctor();
  2873. case numberTag:
  2874. case stringTag:
  2875. return new Ctor(object);
  2876. case regexpTag:
  2877. return cloneRegExp(object);
  2878. case setTag:
  2879. return new Ctor();
  2880. case symbolTag:
  2881. return cloneSymbol(object);
  2882. }
  2883. }
  2884. function insertWrapDetails(source, details) {
  2885. var length = details.length;
  2886. if (!length) {
  2887. return source;
  2888. }
  2889. var lastIndex = length - 1;
  2890. details[lastIndex] = (length > 1 ? "& " : "") + details[lastIndex];
  2891. details = details.join(length > 2 ? ", " : " ");
  2892. return source.replace(reWrapComment, "{\n/* [wrapped with " + details + "] */\n");
  2893. }
  2894. function isFlattenable(value) {
  2895. return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
  2896. }
  2897. function isIndex(value, length) {
  2898. var type = typeof value;
  2899. length = length == null ? MAX_SAFE_INTEGER : length;
  2900. return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
  2901. }
  2902. function isIterateeCall(value, index, object) {
  2903. if (!isObject(object)) {
  2904. return false;
  2905. }
  2906. var type = typeof index;
  2907. if (type == "number" ? isArrayLike(object) && isIndex(index, object.length) : type == "string" && index in object) {
  2908. return eq(object[index], value);
  2909. }
  2910. return false;
  2911. }
  2912. function isKey(value, object) {
  2913. if (isArray(value)) {
  2914. return false;
  2915. }
  2916. var type = typeof value;
  2917. if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) {
  2918. return true;
  2919. }
  2920. return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object2(object);
  2921. }
  2922. function isKeyable(value) {
  2923. var type = typeof value;
  2924. return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
  2925. }
  2926. function isLaziable(func) {
  2927. var funcName = getFuncName(func), other = lodash[funcName];
  2928. if (typeof other != "function" || !(funcName in LazyWrapper.prototype)) {
  2929. return false;
  2930. }
  2931. if (func === other) {
  2932. return true;
  2933. }
  2934. var data = getData(other);
  2935. return !!data && func === data[0];
  2936. }
  2937. function isMasked(func) {
  2938. return !!maskSrcKey && maskSrcKey in func;
  2939. }
  2940. var isMaskable = coreJsData ? isFunction : stubFalse;
  2941. function isPrototype(value) {
  2942. var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
  2943. return value === proto;
  2944. }
  2945. function isStrictComparable(value) {
  2946. return value === value && !isObject(value);
  2947. }
  2948. function matchesStrictComparable(key, srcValue) {
  2949. return function(object) {
  2950. if (object == null) {
  2951. return false;
  2952. }
  2953. return object[key] === srcValue && (srcValue !== undefined || key in Object2(object));
  2954. };
  2955. }
  2956. function memoizeCapped(func) {
  2957. var result2 = memoize(func, function(key) {
  2958. if (cache.size === MAX_MEMOIZE_SIZE) {
  2959. cache.clear();
  2960. }
  2961. return key;
  2962. });
  2963. var cache = result2.cache;
  2964. return result2;
  2965. }
  2966. function mergeData(data, source) {
  2967. var bitmask = data[1], srcBitmask = source[1], newBitmask = bitmask | srcBitmask, isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
  2968. var isCombo = srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_CURRY_FLAG || srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_REARG_FLAG && data[7].length <= source[8] || srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG) && source[7].length <= source[8] && bitmask == WRAP_CURRY_FLAG;
  2969. if (!(isCommon || isCombo)) {
  2970. return data;
  2971. }
  2972. if (srcBitmask & WRAP_BIND_FLAG) {
  2973. data[2] = source[2];
  2974. newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
  2975. }
  2976. var value = source[3];
  2977. if (value) {
  2978. var partials = data[3];
  2979. data[3] = partials ? composeArgs(partials, value, source[4]) : value;
  2980. data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
  2981. }
  2982. value = source[5];
  2983. if (value) {
  2984. partials = data[5];
  2985. data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
  2986. data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
  2987. }
  2988. value = source[7];
  2989. if (value) {
  2990. data[7] = value;
  2991. }
  2992. if (srcBitmask & WRAP_ARY_FLAG) {
  2993. data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
  2994. }
  2995. if (data[9] == null) {
  2996. data[9] = source[9];
  2997. }
  2998. data[0] = source[0];
  2999. data[1] = newBitmask;
  3000. return data;
  3001. }
  3002. function nativeKeysIn(object) {
  3003. var result2 = [];
  3004. if (object != null) {
  3005. for (var key in Object2(object)) {
  3006. result2.push(key);
  3007. }
  3008. }
  3009. return result2;
  3010. }
  3011. function objectToString(value) {
  3012. return nativeObjectToString.call(value);
  3013. }
  3014. function overRest(func, start, transform2) {
  3015. start = nativeMax(start === undefined ? func.length - 1 : start, 0);
  3016. return function() {
  3017. var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array2(length);
  3018. while (++index < length) {
  3019. array[index] = args[start + index];
  3020. }
  3021. index = -1;
  3022. var otherArgs = Array2(start + 1);
  3023. while (++index < start) {
  3024. otherArgs[index] = args[index];
  3025. }
  3026. otherArgs[start] = transform2(array);
  3027. return apply(func, this, otherArgs);
  3028. };
  3029. }
  3030. function parent(object, path) {
  3031. return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
  3032. }
  3033. function reorder(array, indexes) {
  3034. var arrLength = array.length, length = nativeMin(indexes.length, arrLength), oldArray = copyArray(array);
  3035. while (length--) {
  3036. var index = indexes[length];
  3037. array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
  3038. }
  3039. return array;
  3040. }
  3041. function safeGet(object, key) {
  3042. if (key === "constructor" && typeof object[key] === "function") {
  3043. return;
  3044. }
  3045. if (key == "__proto__") {
  3046. return;
  3047. }
  3048. return object[key];
  3049. }
  3050. var setData = shortOut(baseSetData);
  3051. var setTimeout = ctxSetTimeout || function(func, wait) {
  3052. return root.setTimeout(func, wait);
  3053. };
  3054. var setToString = shortOut(baseSetToString);
  3055. function setWrapToString(wrapper, reference, bitmask) {
  3056. var source = reference + "";
  3057. return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
  3058. }
  3059. function shortOut(func) {
  3060. var count = 0, lastCalled = 0;
  3061. return function() {
  3062. var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
  3063. lastCalled = stamp;
  3064. if (remaining > 0) {
  3065. if (++count >= HOT_COUNT) {
  3066. return arguments[0];
  3067. }
  3068. } else {
  3069. count = 0;
  3070. }
  3071. return func.apply(undefined, arguments);
  3072. };
  3073. }
  3074. function shuffleSelf(array, size2) {
  3075. var index = -1, length = array.length, lastIndex = length - 1;
  3076. size2 = size2 === undefined ? length : size2;
  3077. while (++index < size2) {
  3078. var rand = baseRandom(index, lastIndex), value = array[rand];
  3079. array[rand] = array[index];
  3080. array[index] = value;
  3081. }
  3082. array.length = size2;
  3083. return array;
  3084. }
  3085. var stringToPath = memoizeCapped(function(string) {
  3086. var result2 = [];
  3087. if (string.charCodeAt(0) === 46) {
  3088. result2.push("");
  3089. }
  3090. string.replace(rePropName, function(match, number, quote, subString) {
  3091. result2.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
  3092. });
  3093. return result2;
  3094. });
  3095. function toKey(value) {
  3096. if (typeof value == "string" || isSymbol(value)) {
  3097. return value;
  3098. }
  3099. var result2 = value + "";
  3100. return result2 == "0" && 1 / value == -INFINITY ? "-0" : result2;
  3101. }
  3102. function toSource(func) {
  3103. if (func != null) {
  3104. try {
  3105. return funcToString.call(func);
  3106. } catch (e) {
  3107. }
  3108. try {
  3109. return func + "";
  3110. } catch (e) {
  3111. }
  3112. }
  3113. return "";
  3114. }
  3115. function updateWrapDetails(details, bitmask) {
  3116. arrayEach(wrapFlags, function(pair) {
  3117. var value = "_." + pair[0];
  3118. if (bitmask & pair[1] && !arrayIncludes(details, value)) {
  3119. details.push(value);
  3120. }
  3121. });
  3122. return details.sort();
  3123. }
  3124. function wrapperClone(wrapper) {
  3125. if (wrapper instanceof LazyWrapper) {
  3126. return wrapper.clone();
  3127. }
  3128. var result2 = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
  3129. result2.__actions__ = copyArray(wrapper.__actions__);
  3130. result2.__index__ = wrapper.__index__;
  3131. result2.__values__ = wrapper.__values__;
  3132. return result2;
  3133. }
  3134. function chunk(array, size2, guard) {
  3135. if (guard ? isIterateeCall(array, size2, guard) : size2 === undefined) {
  3136. size2 = 1;
  3137. } else {
  3138. size2 = nativeMax(toInteger(size2), 0);
  3139. }
  3140. var length = array == null ? 0 : array.length;
  3141. if (!length || size2 < 1) {
  3142. return [];
  3143. }
  3144. var index = 0, resIndex = 0, result2 = Array2(nativeCeil(length / size2));
  3145. while (index < length) {
  3146. result2[resIndex++] = baseSlice(array, index, index += size2);
  3147. }
  3148. return result2;
  3149. }
  3150. function compact(array) {
  3151. var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result2 = [];
  3152. while (++index < length) {
  3153. var value = array[index];
  3154. if (value) {
  3155. result2[resIndex++] = value;
  3156. }
  3157. }
  3158. return result2;
  3159. }
  3160. function concat() {
  3161. var length = arguments.length;
  3162. if (!length) {
  3163. return [];
  3164. }
  3165. var args = Array2(length - 1), array = arguments[0], index = length;
  3166. while (index--) {
  3167. args[index - 1] = arguments[index];
  3168. }
  3169. return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
  3170. }
  3171. var difference = baseRest(function(array, values2) {
  3172. return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, true)) : [];
  3173. });
  3174. var differenceBy = baseRest(function(array, values2) {
  3175. var iteratee2 = last(values2);
  3176. if (isArrayLikeObject(iteratee2)) {
  3177. iteratee2 = undefined;
  3178. }
  3179. return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, true), getIteratee(iteratee2, 2)) : [];
  3180. });
  3181. var differenceWith = baseRest(function(array, values2) {
  3182. var comparator = last(values2);
  3183. if (isArrayLikeObject(comparator)) {
  3184. comparator = undefined;
  3185. }
  3186. return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, true), undefined, comparator) : [];
  3187. });
  3188. function drop(array, n, guard) {
  3189. var length = array == null ? 0 : array.length;
  3190. if (!length) {
  3191. return [];
  3192. }
  3193. n = guard || n === undefined ? 1 : toInteger(n);
  3194. return baseSlice(array, n < 0 ? 0 : n, length);
  3195. }
  3196. function dropRight(array, n, guard) {
  3197. var length = array == null ? 0 : array.length;
  3198. if (!length) {
  3199. return [];
  3200. }
  3201. n = guard || n === undefined ? 1 : toInteger(n);
  3202. n = length - n;
  3203. return baseSlice(array, 0, n < 0 ? 0 : n);
  3204. }
  3205. function dropRightWhile(array, predicate) {
  3206. return array && array.length ? baseWhile(array, getIteratee(predicate, 3), true, true) : [];
  3207. }
  3208. function dropWhile(array, predicate) {
  3209. return array && array.length ? baseWhile(array, getIteratee(predicate, 3), true) : [];
  3210. }
  3211. function fill(array, value, start, end) {
  3212. var length = array == null ? 0 : array.length;
  3213. if (!length) {
  3214. return [];
  3215. }
  3216. if (start && typeof start != "number" && isIterateeCall(array, value, start)) {
  3217. start = 0;
  3218. end = length;
  3219. }
  3220. return baseFill(array, value, start, end);
  3221. }
  3222. function findIndex(array, predicate, fromIndex) {
  3223. var length = array == null ? 0 : array.length;
  3224. if (!length) {
  3225. return -1;
  3226. }
  3227. var index = fromIndex == null ? 0 : toInteger(fromIndex);
  3228. if (index < 0) {
  3229. index = nativeMax(length + index, 0);
  3230. }
  3231. return baseFindIndex(array, getIteratee(predicate, 3), index);
  3232. }
  3233. function findLastIndex(array, predicate, fromIndex) {
  3234. var length = array == null ? 0 : array.length;
  3235. if (!length) {
  3236. return -1;
  3237. }
  3238. var index = length - 1;
  3239. if (fromIndex !== undefined) {
  3240. index = toInteger(fromIndex);
  3241. index = fromIndex < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
  3242. }
  3243. return baseFindIndex(array, getIteratee(predicate, 3), index, true);
  3244. }
  3245. function flatten(array) {
  3246. var length = array == null ? 0 : array.length;
  3247. return length ? baseFlatten(array, 1) : [];
  3248. }
  3249. function flattenDeep(array) {
  3250. var length = array == null ? 0 : array.length;
  3251. return length ? baseFlatten(array, INFINITY) : [];
  3252. }
  3253. function flattenDepth(array, depth) {
  3254. var length = array == null ? 0 : array.length;
  3255. if (!length) {
  3256. return [];
  3257. }
  3258. depth = depth === undefined ? 1 : toInteger(depth);
  3259. return baseFlatten(array, depth);
  3260. }
  3261. function fromPairs(pairs) {
  3262. var index = -1, length = pairs == null ? 0 : pairs.length, result2 = {};
  3263. while (++index < length) {
  3264. var pair = pairs[index];
  3265. result2[pair[0]] = pair[1];
  3266. }
  3267. return result2;
  3268. }
  3269. function head(array) {
  3270. return array && array.length ? array[0] : undefined;
  3271. }
  3272. function indexOf(array, value, fromIndex) {
  3273. var length = array == null ? 0 : array.length;
  3274. if (!length) {
  3275. return -1;
  3276. }
  3277. var index = fromIndex == null ? 0 : toInteger(fromIndex);
  3278. if (index < 0) {
  3279. index = nativeMax(length + index, 0);
  3280. }
  3281. return baseIndexOf(array, value, index);
  3282. }
  3283. function initial(array) {
  3284. var length = array == null ? 0 : array.length;
  3285. return length ? baseSlice(array, 0, -1) : [];
  3286. }
  3287. var intersection = baseRest(function(arrays) {
  3288. var mapped = arrayMap(arrays, castArrayLikeObject);
  3289. return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped) : [];
  3290. });
  3291. var intersectionBy = baseRest(function(arrays) {
  3292. var iteratee2 = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject);
  3293. if (iteratee2 === last(mapped)) {
  3294. iteratee2 = undefined;
  3295. } else {
  3296. mapped.pop();
  3297. }
  3298. return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, getIteratee(iteratee2, 2)) : [];
  3299. });
  3300. var intersectionWith = baseRest(function(arrays) {
  3301. var comparator = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject);
  3302. comparator = typeof comparator == "function" ? comparator : undefined;
  3303. if (comparator) {
  3304. mapped.pop();
  3305. }
  3306. return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, undefined, comparator) : [];
  3307. });
  3308. function join(array, separator) {
  3309. return array == null ? "" : nativeJoin.call(array, separator);
  3310. }
  3311. function last(array) {
  3312. var length = array == null ? 0 : array.length;
  3313. return length ? array[length - 1] : undefined;
  3314. }
  3315. function lastIndexOf(array, value, fromIndex) {
  3316. var length = array == null ? 0 : array.length;
  3317. if (!length) {
  3318. return -1;
  3319. }
  3320. var index = length;
  3321. if (fromIndex !== undefined) {
  3322. index = toInteger(fromIndex);
  3323. index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
  3324. }
  3325. return value === value ? strictLastIndexOf(array, value, index) : baseFindIndex(array, baseIsNaN, index, true);
  3326. }
  3327. function nth(array, n) {
  3328. return array && array.length ? baseNth(array, toInteger(n)) : undefined;
  3329. }
  3330. var pull = baseRest(pullAll);
  3331. function pullAll(array, values2) {
  3332. return array && array.length && values2 && values2.length ? basePullAll(array, values2) : array;
  3333. }
  3334. function pullAllBy(array, values2, iteratee2) {
  3335. return array && array.length && values2 && values2.length ? basePullAll(array, values2, getIteratee(iteratee2, 2)) : array;
  3336. }
  3337. function pullAllWith(array, values2, comparator) {
  3338. return array && array.length && values2 && values2.length ? basePullAll(array, values2, undefined, comparator) : array;
  3339. }
  3340. var pullAt = flatRest(function(array, indexes) {
  3341. var length = array == null ? 0 : array.length, result2 = baseAt(array, indexes);
  3342. basePullAt(array, arrayMap(indexes, function(index) {
  3343. return isIndex(index, length) ? +index : index;
  3344. }).sort(compareAscending));
  3345. return result2;
  3346. });
  3347. function remove(array, predicate) {
  3348. var result2 = [];
  3349. if (!(array && array.length)) {
  3350. return result2;
  3351. }
  3352. var index = -1, indexes = [], length = array.length;
  3353. predicate = getIteratee(predicate, 3);
  3354. while (++index < length) {
  3355. var value = array[index];
  3356. if (predicate(value, index, array)) {
  3357. result2.push(value);
  3358. indexes.push(index);
  3359. }
  3360. }
  3361. basePullAt(array, indexes);
  3362. return result2;
  3363. }
  3364. function reverse(array) {
  3365. return array == null ? array : nativeReverse.call(array);
  3366. }
  3367. function slice(array, start, end) {
  3368. var length = array == null ? 0 : array.length;
  3369. if (!length) {
  3370. return [];
  3371. }
  3372. if (end && typeof end != "number" && isIterateeCall(array, start, end)) {
  3373. start = 0;
  3374. end = length;
  3375. } else {
  3376. start = start == null ? 0 : toInteger(start);
  3377. end = end === undefined ? length : toInteger(end);
  3378. }
  3379. return baseSlice(array, start, end);
  3380. }
  3381. function sortedIndex(array, value) {
  3382. return baseSortedIndex(array, value);
  3383. }
  3384. function sortedIndexBy(array, value, iteratee2) {
  3385. return baseSortedIndexBy(array, value, getIteratee(iteratee2, 2));
  3386. }
  3387. function sortedIndexOf(array, value) {
  3388. var length = array == null ? 0 : array.length;
  3389. if (length) {
  3390. var index = baseSortedIndex(array, value);
  3391. if (index < length && eq(array[index], value)) {
  3392. return index;
  3393. }
  3394. }
  3395. return -1;
  3396. }
  3397. function sortedLastIndex(array, value) {
  3398. return baseSortedIndex(array, value, true);
  3399. }
  3400. function sortedLastIndexBy(array, value, iteratee2) {
  3401. return baseSortedIndexBy(array, value, getIteratee(iteratee2, 2), true);
  3402. }
  3403. function sortedLastIndexOf(array, value) {
  3404. var length = array == null ? 0 : array.length;
  3405. if (length) {
  3406. var index = baseSortedIndex(array, value, true) - 1;
  3407. if (eq(array[index], value)) {
  3408. return index;
  3409. }
  3410. }
  3411. return -1;
  3412. }
  3413. function sortedUniq(array) {
  3414. return array && array.length ? baseSortedUniq(array) : [];
  3415. }
  3416. function sortedUniqBy(array, iteratee2) {
  3417. return array && array.length ? baseSortedUniq(array, getIteratee(iteratee2, 2)) : [];
  3418. }
  3419. function tail(array) {
  3420. var length = array == null ? 0 : array.length;
  3421. return length ? baseSlice(array, 1, length) : [];
  3422. }
  3423. function take(array, n, guard) {
  3424. if (!(array && array.length)) {
  3425. return [];
  3426. }
  3427. n = guard || n === undefined ? 1 : toInteger(n);
  3428. return baseSlice(array, 0, n < 0 ? 0 : n);
  3429. }
  3430. function takeRight(array, n, guard) {
  3431. var length = array == null ? 0 : array.length;
  3432. if (!length) {
  3433. return [];
  3434. }
  3435. n = guard || n === undefined ? 1 : toInteger(n);
  3436. n = length - n;
  3437. return baseSlice(array, n < 0 ? 0 : n, length);
  3438. }
  3439. function takeRightWhile(array, predicate) {
  3440. return array && array.length ? baseWhile(array, getIteratee(predicate, 3), false, true) : [];
  3441. }
  3442. function takeWhile(array, predicate) {
  3443. return array && array.length ? baseWhile(array, getIteratee(predicate, 3)) : [];
  3444. }
  3445. var union = baseRest(function(arrays) {
  3446. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
  3447. });
  3448. var unionBy = baseRest(function(arrays) {
  3449. var iteratee2 = last(arrays);
  3450. if (isArrayLikeObject(iteratee2)) {
  3451. iteratee2 = undefined;
  3452. }
  3453. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee2, 2));
  3454. });
  3455. var unionWith = baseRest(function(arrays) {
  3456. var comparator = last(arrays);
  3457. comparator = typeof comparator == "function" ? comparator : undefined;
  3458. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
  3459. });
  3460. function uniq(array) {
  3461. return array && array.length ? baseUniq(array) : [];
  3462. }
  3463. function uniqBy(array, iteratee2) {
  3464. return array && array.length ? baseUniq(array, getIteratee(iteratee2, 2)) : [];
  3465. }
  3466. function uniqWith(array, comparator) {
  3467. comparator = typeof comparator == "function" ? comparator : undefined;
  3468. return array && array.length ? baseUniq(array, undefined, comparator) : [];
  3469. }
  3470. function unzip(array) {
  3471. if (!(array && array.length)) {
  3472. return [];
  3473. }
  3474. var length = 0;
  3475. array = arrayFilter(array, function(group) {
  3476. if (isArrayLikeObject(group)) {
  3477. length = nativeMax(group.length, length);
  3478. return true;
  3479. }
  3480. });
  3481. return baseTimes(length, function(index) {
  3482. return arrayMap(array, baseProperty(index));
  3483. });
  3484. }
  3485. function unzipWith(array, iteratee2) {
  3486. if (!(array && array.length)) {
  3487. return [];
  3488. }
  3489. var result2 = unzip(array);
  3490. if (iteratee2 == null) {
  3491. return result2;
  3492. }
  3493. return arrayMap(result2, function(group) {
  3494. return apply(iteratee2, undefined, group);
  3495. });
  3496. }
  3497. var without = baseRest(function(array, values2) {
  3498. return isArrayLikeObject(array) ? baseDifference(array, values2) : [];
  3499. });
  3500. var xor = baseRest(function(arrays) {
  3501. return baseXor(arrayFilter(arrays, isArrayLikeObject));
  3502. });
  3503. var xorBy = baseRest(function(arrays) {
  3504. var iteratee2 = last(arrays);
  3505. if (isArrayLikeObject(iteratee2)) {
  3506. iteratee2 = undefined;
  3507. }
  3508. return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee2, 2));
  3509. });
  3510. var xorWith = baseRest(function(arrays) {
  3511. var comparator = last(arrays);
  3512. comparator = typeof comparator == "function" ? comparator : undefined;
  3513. return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
  3514. });
  3515. var zip = baseRest(unzip);
  3516. function zipObject(props, values2) {
  3517. return baseZipObject(props || [], values2 || [], assignValue);
  3518. }
  3519. function zipObjectDeep(props, values2) {
  3520. return baseZipObject(props || [], values2 || [], baseSet);
  3521. }
  3522. var zipWith = baseRest(function(arrays) {
  3523. var length = arrays.length, iteratee2 = length > 1 ? arrays[length - 1] : undefined;
  3524. iteratee2 = typeof iteratee2 == "function" ? (arrays.pop(), iteratee2) : undefined;
  3525. return unzipWith(arrays, iteratee2);
  3526. });
  3527. function chain(value) {
  3528. var result2 = lodash(value);
  3529. result2.__chain__ = true;
  3530. return result2;
  3531. }
  3532. function tap(value, interceptor) {
  3533. interceptor(value);
  3534. return value;
  3535. }
  3536. function thru(value, interceptor) {
  3537. return interceptor(value);
  3538. }
  3539. var wrapperAt = flatRest(function(paths) {
  3540. var length = paths.length, start = length ? paths[0] : 0, value = this.__wrapped__, interceptor = function(object) {
  3541. return baseAt(object, paths);
  3542. };
  3543. if (length > 1 || this.__actions__.length || !(value instanceof LazyWrapper) || !isIndex(start)) {
  3544. return this.thru(interceptor);
  3545. }
  3546. value = value.slice(start, +start + (length ? 1 : 0));
  3547. value.__actions__.push({
  3548. "func": thru,
  3549. "args": [interceptor],
  3550. "thisArg": undefined
  3551. });
  3552. return new LodashWrapper(value, this.__chain__).thru(function(array) {
  3553. if (length && !array.length) {
  3554. array.push(undefined);
  3555. }
  3556. return array;
  3557. });
  3558. });
  3559. function wrapperChain() {
  3560. return chain(this);
  3561. }
  3562. function wrapperCommit() {
  3563. return new LodashWrapper(this.value(), this.__chain__);
  3564. }
  3565. function wrapperNext() {
  3566. if (this.__values__ === undefined) {
  3567. this.__values__ = toArray(this.value());
  3568. }
  3569. var done = this.__index__ >= this.__values__.length, value = done ? undefined : this.__values__[this.__index__++];
  3570. return { "done": done, "value": value };
  3571. }
  3572. function wrapperToIterator() {
  3573. return this;
  3574. }
  3575. function wrapperPlant(value) {
  3576. var result2, parent2 = this;
  3577. while (parent2 instanceof baseLodash) {
  3578. var clone2 = wrapperClone(parent2);
  3579. clone2.__index__ = 0;
  3580. clone2.__values__ = undefined;
  3581. if (result2) {
  3582. previous.__wrapped__ = clone2;
  3583. } else {
  3584. result2 = clone2;
  3585. }
  3586. var previous = clone2;
  3587. parent2 = parent2.__wrapped__;
  3588. }
  3589. previous.__wrapped__ = value;
  3590. return result2;
  3591. }
  3592. function wrapperReverse() {
  3593. var value = this.__wrapped__;
  3594. if (value instanceof LazyWrapper) {
  3595. var wrapped = value;
  3596. if (this.__actions__.length) {
  3597. wrapped = new LazyWrapper(this);
  3598. }
  3599. wrapped = wrapped.reverse();
  3600. wrapped.__actions__.push({
  3601. "func": thru,
  3602. "args": [reverse],
  3603. "thisArg": undefined
  3604. });
  3605. return new LodashWrapper(wrapped, this.__chain__);
  3606. }
  3607. return this.thru(reverse);
  3608. }
  3609. function wrapperValue() {
  3610. return baseWrapperValue(this.__wrapped__, this.__actions__);
  3611. }
  3612. var countBy = createAggregator(function(result2, value, key) {
  3613. if (hasOwnProperty.call(result2, key)) {
  3614. ++result2[key];
  3615. } else {
  3616. baseAssignValue(result2, key, 1);
  3617. }
  3618. });
  3619. function every(collection, predicate, guard) {
  3620. var func = isArray(collection) ? arrayEvery : baseEvery;
  3621. if (guard && isIterateeCall(collection, predicate, guard)) {
  3622. predicate = undefined;
  3623. }
  3624. return func(collection, getIteratee(predicate, 3));
  3625. }
  3626. function filter(collection, predicate) {
  3627. var func = isArray(collection) ? arrayFilter : baseFilter;
  3628. return func(collection, getIteratee(predicate, 3));
  3629. }
  3630. var find = createFind(findIndex);
  3631. var findLast = createFind(findLastIndex);
  3632. function flatMap(collection, iteratee2) {
  3633. return baseFlatten(map(collection, iteratee2), 1);
  3634. }
  3635. function flatMapDeep(collection, iteratee2) {
  3636. return baseFlatten(map(collection, iteratee2), INFINITY);
  3637. }
  3638. function flatMapDepth(collection, iteratee2, depth) {
  3639. depth = depth === undefined ? 1 : toInteger(depth);
  3640. return baseFlatten(map(collection, iteratee2), depth);
  3641. }
  3642. function forEach(collection, iteratee2) {
  3643. var func = isArray(collection) ? arrayEach : baseEach;
  3644. return func(collection, getIteratee(iteratee2, 3));
  3645. }
  3646. function forEachRight(collection, iteratee2) {
  3647. var func = isArray(collection) ? arrayEachRight : baseEachRight;
  3648. return func(collection, getIteratee(iteratee2, 3));
  3649. }
  3650. var groupBy = createAggregator(function(result2, value, key) {
  3651. if (hasOwnProperty.call(result2, key)) {
  3652. result2[key].push(value);
  3653. } else {
  3654. baseAssignValue(result2, key, [value]);
  3655. }
  3656. });
  3657. function includes(collection, value, fromIndex, guard) {
  3658. collection = isArrayLike(collection) ? collection : values(collection);
  3659. fromIndex = fromIndex && !guard ? toInteger(fromIndex) : 0;
  3660. var length = collection.length;
  3661. if (fromIndex < 0) {
  3662. fromIndex = nativeMax(length + fromIndex, 0);
  3663. }
  3664. return isString(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1;
  3665. }
  3666. var invokeMap = baseRest(function(collection, path, args) {
  3667. var index = -1, isFunc = typeof path == "function", result2 = isArrayLike(collection) ? Array2(collection.length) : [];
  3668. baseEach(collection, function(value) {
  3669. result2[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
  3670. });
  3671. return result2;
  3672. });
  3673. var keyBy = createAggregator(function(result2, value, key) {
  3674. baseAssignValue(result2, key, value);
  3675. });
  3676. function map(collection, iteratee2) {
  3677. var func = isArray(collection) ? arrayMap : baseMap;
  3678. return func(collection, getIteratee(iteratee2, 3));
  3679. }
  3680. function orderBy(collection, iteratees, orders, guard) {
  3681. if (collection == null) {
  3682. return [];
  3683. }
  3684. if (!isArray(iteratees)) {
  3685. iteratees = iteratees == null ? [] : [iteratees];
  3686. }
  3687. orders = guard ? undefined : orders;
  3688. if (!isArray(orders)) {
  3689. orders = orders == null ? [] : [orders];
  3690. }
  3691. return baseOrderBy(collection, iteratees, orders);
  3692. }
  3693. var partition = createAggregator(function(result2, value, key) {
  3694. result2[key ? 0 : 1].push(value);
  3695. }, function() {
  3696. return [[], []];
  3697. });
  3698. function reduce(collection, iteratee2, accumulator) {
  3699. var func = isArray(collection) ? arrayReduce : baseReduce, initAccum = arguments.length < 3;
  3700. return func(collection, getIteratee(iteratee2, 4), accumulator, initAccum, baseEach);
  3701. }
  3702. function reduceRight(collection, iteratee2, accumulator) {
  3703. var func = isArray(collection) ? arrayReduceRight : baseReduce, initAccum = arguments.length < 3;
  3704. return func(collection, getIteratee(iteratee2, 4), accumulator, initAccum, baseEachRight);
  3705. }
  3706. function reject(collection, predicate) {
  3707. var func = isArray(collection) ? arrayFilter : baseFilter;
  3708. return func(collection, negate(getIteratee(predicate, 3)));
  3709. }
  3710. function sample(collection) {
  3711. var func = isArray(collection) ? arraySample : baseSample;
  3712. return func(collection);
  3713. }
  3714. function sampleSize(collection, n, guard) {
  3715. if (guard ? isIterateeCall(collection, n, guard) : n === undefined) {
  3716. n = 1;
  3717. } else {
  3718. n = toInteger(n);
  3719. }
  3720. var func = isArray(collection) ? arraySampleSize : baseSampleSize;
  3721. return func(collection, n);
  3722. }
  3723. function shuffle(collection) {
  3724. var func = isArray(collection) ? arrayShuffle : baseShuffle;
  3725. return func(collection);
  3726. }
  3727. function size(collection) {
  3728. if (collection == null) {
  3729. return 0;
  3730. }
  3731. if (isArrayLike(collection)) {
  3732. return isString(collection) ? stringSize(collection) : collection.length;
  3733. }
  3734. var tag = getTag(collection);
  3735. if (tag == mapTag || tag == setTag) {
  3736. return collection.size;
  3737. }
  3738. return baseKeys(collection).length;
  3739. }
  3740. function some(collection, predicate, guard) {
  3741. var func = isArray(collection) ? arraySome : baseSome;
  3742. if (guard && isIterateeCall(collection, predicate, guard)) {
  3743. predicate = undefined;
  3744. }
  3745. return func(collection, getIteratee(predicate, 3));
  3746. }
  3747. var sortBy = baseRest(function(collection, iteratees) {
  3748. if (collection == null) {
  3749. return [];
  3750. }
  3751. var length = iteratees.length;
  3752. if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
  3753. iteratees = [];
  3754. } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
  3755. iteratees = [iteratees[0]];
  3756. }
  3757. return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
  3758. });
  3759. var now = ctxNow || function() {
  3760. return root.Date.now();
  3761. };
  3762. function after(n, func) {
  3763. if (typeof func != "function") {
  3764. throw new TypeError(FUNC_ERROR_TEXT);
  3765. }
  3766. n = toInteger(n);
  3767. return function() {
  3768. if (--n < 1) {
  3769. return func.apply(this, arguments);
  3770. }
  3771. };
  3772. }
  3773. function ary(func, n, guard) {
  3774. n = guard ? undefined : n;
  3775. n = func && n == null ? func.length : n;
  3776. return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
  3777. }
  3778. function before(n, func) {
  3779. var result2;
  3780. if (typeof func != "function") {
  3781. throw new TypeError(FUNC_ERROR_TEXT);
  3782. }
  3783. n = toInteger(n);
  3784. return function() {
  3785. if (--n > 0) {
  3786. result2 = func.apply(this, arguments);
  3787. }
  3788. if (n <= 1) {
  3789. func = undefined;
  3790. }
  3791. return result2;
  3792. };
  3793. }
  3794. var bind = baseRest(function(func, thisArg, partials) {
  3795. var bitmask = WRAP_BIND_FLAG;
  3796. if (partials.length) {
  3797. var holders = replaceHolders(partials, getHolder(bind));
  3798. bitmask |= WRAP_PARTIAL_FLAG;
  3799. }
  3800. return createWrap(func, bitmask, thisArg, partials, holders);
  3801. });
  3802. var bindKey = baseRest(function(object, key, partials) {
  3803. var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
  3804. if (partials.length) {
  3805. var holders = replaceHolders(partials, getHolder(bindKey));
  3806. bitmask |= WRAP_PARTIAL_FLAG;
  3807. }
  3808. return createWrap(key, bitmask, object, partials, holders);
  3809. });
  3810. function curry(func, arity, guard) {
  3811. arity = guard ? undefined : arity;
  3812. var result2 = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
  3813. result2.placeholder = curry.placeholder;
  3814. return result2;
  3815. }
  3816. function curryRight(func, arity, guard) {
  3817. arity = guard ? undefined : arity;
  3818. var result2 = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
  3819. result2.placeholder = curryRight.placeholder;
  3820. return result2;
  3821. }
  3822. function debounce(func, wait, options) {
  3823. var lastArgs, lastThis, maxWait, result2, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
  3824. if (typeof func != "function") {
  3825. throw new TypeError(FUNC_ERROR_TEXT);
  3826. }
  3827. wait = toNumber(wait) || 0;
  3828. if (isObject(options)) {
  3829. leading = !!options.leading;
  3830. maxing = "maxWait" in options;
  3831. maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
  3832. trailing = "trailing" in options ? !!options.trailing : trailing;
  3833. }
  3834. function invokeFunc(time) {
  3835. var args = lastArgs, thisArg = lastThis;
  3836. lastArgs = lastThis = undefined;
  3837. lastInvokeTime = time;
  3838. result2 = func.apply(thisArg, args);
  3839. return result2;
  3840. }
  3841. function leadingEdge(time) {
  3842. lastInvokeTime = time;
  3843. timerId = setTimeout(timerExpired, wait);
  3844. return leading ? invokeFunc(time) : result2;
  3845. }
  3846. function remainingWait(time) {
  3847. var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
  3848. return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
  3849. }
  3850. function shouldInvoke(time) {
  3851. var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
  3852. return lastCallTime === undefined || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
  3853. }
  3854. function timerExpired() {
  3855. var time = now();
  3856. if (shouldInvoke(time)) {
  3857. return trailingEdge(time);
  3858. }
  3859. timerId = setTimeout(timerExpired, remainingWait(time));
  3860. }
  3861. function trailingEdge(time) {
  3862. timerId = undefined;
  3863. if (trailing && lastArgs) {
  3864. return invokeFunc(time);
  3865. }
  3866. lastArgs = lastThis = undefined;
  3867. return result2;
  3868. }
  3869. function cancel() {
  3870. if (timerId !== undefined) {
  3871. clearTimeout(timerId);
  3872. }
  3873. lastInvokeTime = 0;
  3874. lastArgs = lastCallTime = lastThis = timerId = undefined;
  3875. }
  3876. function flush() {
  3877. return timerId === undefined ? result2 : trailingEdge(now());
  3878. }
  3879. function debounced() {
  3880. var time = now(), isInvoking = shouldInvoke(time);
  3881. lastArgs = arguments;
  3882. lastThis = this;
  3883. lastCallTime = time;
  3884. if (isInvoking) {
  3885. if (timerId === undefined) {
  3886. return leadingEdge(lastCallTime);
  3887. }
  3888. if (maxing) {
  3889. clearTimeout(timerId);
  3890. timerId = setTimeout(timerExpired, wait);
  3891. return invokeFunc(lastCallTime);
  3892. }
  3893. }
  3894. if (timerId === undefined) {
  3895. timerId = setTimeout(timerExpired, wait);
  3896. }
  3897. return result2;
  3898. }
  3899. debounced.cancel = cancel;
  3900. debounced.flush = flush;
  3901. return debounced;
  3902. }
  3903. var defer = baseRest(function(func, args) {
  3904. return baseDelay(func, 1, args);
  3905. });
  3906. var delay = baseRest(function(func, wait, args) {
  3907. return baseDelay(func, toNumber(wait) || 0, args);
  3908. });
  3909. function flip(func) {
  3910. return createWrap(func, WRAP_FLIP_FLAG);
  3911. }
  3912. function memoize(func, resolver) {
  3913. if (typeof func != "function" || resolver != null && typeof resolver != "function") {
  3914. throw new TypeError(FUNC_ERROR_TEXT);
  3915. }
  3916. var memoized = function() {
  3917. var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
  3918. if (cache.has(key)) {
  3919. return cache.get(key);
  3920. }
  3921. var result2 = func.apply(this, args);
  3922. memoized.cache = cache.set(key, result2) || cache;
  3923. return result2;
  3924. };
  3925. memoized.cache = new (memoize.Cache || MapCache)();
  3926. return memoized;
  3927. }
  3928. memoize.Cache = MapCache;
  3929. function negate(predicate) {
  3930. if (typeof predicate != "function") {
  3931. throw new TypeError(FUNC_ERROR_TEXT);
  3932. }
  3933. return function() {
  3934. var args = arguments;
  3935. switch (args.length) {
  3936. case 0:
  3937. return !predicate.call(this);
  3938. case 1:
  3939. return !predicate.call(this, args[0]);
  3940. case 2:
  3941. return !predicate.call(this, args[0], args[1]);
  3942. case 3:
  3943. return !predicate.call(this, args[0], args[1], args[2]);
  3944. }
  3945. return !predicate.apply(this, args);
  3946. };
  3947. }
  3948. function once(func) {
  3949. return before(2, func);
  3950. }
  3951. var overArgs = castRest(function(func, transforms) {
  3952. transforms = transforms.length == 1 && isArray(transforms[0]) ? arrayMap(transforms[0], baseUnary(getIteratee())) : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
  3953. var funcsLength = transforms.length;
  3954. return baseRest(function(args) {
  3955. var index = -1, length = nativeMin(args.length, funcsLength);
  3956. while (++index < length) {
  3957. args[index] = transforms[index].call(this, args[index]);
  3958. }
  3959. return apply(func, this, args);
  3960. });
  3961. });
  3962. var partial = baseRest(function(func, partials) {
  3963. var holders = replaceHolders(partials, getHolder(partial));
  3964. return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
  3965. });
  3966. var partialRight = baseRest(function(func, partials) {
  3967. var holders = replaceHolders(partials, getHolder(partialRight));
  3968. return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
  3969. });
  3970. var rearg = flatRest(function(func, indexes) {
  3971. return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);
  3972. });
  3973. function rest(func, start) {
  3974. if (typeof func != "function") {
  3975. throw new TypeError(FUNC_ERROR_TEXT);
  3976. }
  3977. start = start === undefined ? start : toInteger(start);
  3978. return baseRest(func, start);
  3979. }
  3980. function spread(func, start) {
  3981. if (typeof func != "function") {
  3982. throw new TypeError(FUNC_ERROR_TEXT);
  3983. }
  3984. start = start == null ? 0 : nativeMax(toInteger(start), 0);
  3985. return baseRest(function(args) {
  3986. var array = args[start], otherArgs = castSlice(args, 0, start);
  3987. if (array) {
  3988. arrayPush(otherArgs, array);
  3989. }
  3990. return apply(func, this, otherArgs);
  3991. });
  3992. }
  3993. function throttle(func, wait, options) {
  3994. var leading = true, trailing = true;
  3995. if (typeof func != "function") {
  3996. throw new TypeError(FUNC_ERROR_TEXT);
  3997. }
  3998. if (isObject(options)) {
  3999. leading = "leading" in options ? !!options.leading : leading;
  4000. trailing = "trailing" in options ? !!options.trailing : trailing;
  4001. }
  4002. return debounce(func, wait, {
  4003. "leading": leading,
  4004. "maxWait": wait,
  4005. "trailing": trailing
  4006. });
  4007. }
  4008. function unary(func) {
  4009. return ary(func, 1);
  4010. }
  4011. function wrap(value, wrapper) {
  4012. return partial(castFunction(wrapper), value);
  4013. }
  4014. function castArray() {
  4015. if (!arguments.length) {
  4016. return [];
  4017. }
  4018. var value = arguments[0];
  4019. return isArray(value) ? value : [value];
  4020. }
  4021. function clone(value) {
  4022. return baseClone(value, CLONE_SYMBOLS_FLAG);
  4023. }
  4024. function cloneWith(value, customizer) {
  4025. customizer = typeof customizer == "function" ? customizer : undefined;
  4026. return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
  4027. }
  4028. function cloneDeep(value) {
  4029. return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
  4030. }
  4031. function cloneDeepWith(value, customizer) {
  4032. customizer = typeof customizer == "function" ? customizer : undefined;
  4033. return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
  4034. }
  4035. function conformsTo(object, source) {
  4036. return source == null || baseConformsTo(object, source, keys(source));
  4037. }
  4038. function eq(value, other) {
  4039. return value === other || value !== value && other !== other;
  4040. }
  4041. var gt = createRelationalOperation(baseGt);
  4042. var gte = createRelationalOperation(function(value, other) {
  4043. return value >= other;
  4044. });
  4045. var isArguments = baseIsArguments(function() {
  4046. return arguments;
  4047. }()) ? baseIsArguments : function(value) {
  4048. return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
  4049. };
  4050. var isArray = Array2.isArray;
  4051. var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
  4052. function isArrayLike(value) {
  4053. return value != null && isLength(value.length) && !isFunction(value);
  4054. }
  4055. function isArrayLikeObject(value) {
  4056. return isObjectLike(value) && isArrayLike(value);
  4057. }
  4058. function isBoolean(value) {
  4059. return value === true || value === false || isObjectLike(value) && baseGetTag(value) == boolTag;
  4060. }
  4061. var isBuffer = nativeIsBuffer || stubFalse;
  4062. var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
  4063. function isElement(value) {
  4064. return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
  4065. }
  4066. function isEmpty(value) {
  4067. if (value == null) {
  4068. return true;
  4069. }
  4070. if (isArrayLike(value) && (isArray(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer(value) || isTypedArray(value) || isArguments(value))) {
  4071. return !value.length;
  4072. }
  4073. var tag = getTag(value);
  4074. if (tag == mapTag || tag == setTag) {
  4075. return !value.size;
  4076. }
  4077. if (isPrototype(value)) {
  4078. return !baseKeys(value).length;
  4079. }
  4080. for (var key in value) {
  4081. if (hasOwnProperty.call(value, key)) {
  4082. return false;
  4083. }
  4084. }
  4085. return true;
  4086. }
  4087. function isEqual(value, other) {
  4088. return baseIsEqual(value, other);
  4089. }
  4090. function isEqualWith(value, other, customizer) {
  4091. customizer = typeof customizer == "function" ? customizer : undefined;
  4092. var result2 = customizer ? customizer(value, other) : undefined;
  4093. return result2 === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result2;
  4094. }
  4095. function isError(value) {
  4096. if (!isObjectLike(value)) {
  4097. return false;
  4098. }
  4099. var tag = baseGetTag(value);
  4100. return tag == errorTag || tag == domExcTag || typeof value.message == "string" && typeof value.name == "string" && !isPlainObject(value);
  4101. }
  4102. function isFinite(value) {
  4103. return typeof value == "number" && nativeIsFinite(value);
  4104. }
  4105. function isFunction(value) {
  4106. if (!isObject(value)) {
  4107. return false;
  4108. }
  4109. var tag = baseGetTag(value);
  4110. return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
  4111. }
  4112. function isInteger(value) {
  4113. return typeof value == "number" && value == toInteger(value);
  4114. }
  4115. function isLength(value) {
  4116. return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  4117. }
  4118. function isObject(value) {
  4119. var type = typeof value;
  4120. return value != null && (type == "object" || type == "function");
  4121. }
  4122. function isObjectLike(value) {
  4123. return value != null && typeof value == "object";
  4124. }
  4125. var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
  4126. function isMatch(object, source) {
  4127. return object === source || baseIsMatch(object, source, getMatchData(source));
  4128. }
  4129. function isMatchWith(object, source, customizer) {
  4130. customizer = typeof customizer == "function" ? customizer : undefined;
  4131. return baseIsMatch(object, source, getMatchData(source), customizer);
  4132. }
  4133. function isNaN(value) {
  4134. return isNumber(value) && value != +value;
  4135. }
  4136. function isNative(value) {
  4137. if (isMaskable(value)) {
  4138. throw new Error(CORE_ERROR_TEXT);
  4139. }
  4140. return baseIsNative(value);
  4141. }
  4142. function isNull(value) {
  4143. return value === null;
  4144. }
  4145. function isNil(value) {
  4146. return value == null;
  4147. }
  4148. function isNumber(value) {
  4149. return typeof value == "number" || isObjectLike(value) && baseGetTag(value) == numberTag;
  4150. }
  4151. function isPlainObject(value) {
  4152. if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
  4153. return false;
  4154. }
  4155. var proto = getPrototype(value);
  4156. if (proto === null) {
  4157. return true;
  4158. }
  4159. var Ctor = hasOwnProperty.call(proto, "constructor") && proto.constructor;
  4160. return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
  4161. }
  4162. var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
  4163. function isSafeInteger(value) {
  4164. return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
  4165. }
  4166. var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
  4167. function isString(value) {
  4168. return typeof value == "string" || !isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag;
  4169. }
  4170. function isSymbol(value) {
  4171. return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
  4172. }
  4173. var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
  4174. function isUndefined(value) {
  4175. return value === undefined;
  4176. }
  4177. function isWeakMap(value) {
  4178. return isObjectLike(value) && getTag(value) == weakMapTag;
  4179. }
  4180. function isWeakSet(value) {
  4181. return isObjectLike(value) && baseGetTag(value) == weakSetTag;
  4182. }
  4183. var lt = createRelationalOperation(baseLt);
  4184. var lte = createRelationalOperation(function(value, other) {
  4185. return value <= other;
  4186. });
  4187. function toArray(value) {
  4188. if (!value) {
  4189. return [];
  4190. }
  4191. if (isArrayLike(value)) {
  4192. return isString(value) ? stringToArray(value) : copyArray(value);
  4193. }
  4194. if (symIterator && value[symIterator]) {
  4195. return iteratorToArray(value[symIterator]());
  4196. }
  4197. var tag = getTag(value), func = tag == mapTag ? mapToArray : tag == setTag ? setToArray : values;
  4198. return func(value);
  4199. }
  4200. function toFinite(value) {
  4201. if (!value) {
  4202. return value === 0 ? value : 0;
  4203. }
  4204. value = toNumber(value);
  4205. if (value === INFINITY || value === -INFINITY) {
  4206. var sign = value < 0 ? -1 : 1;
  4207. return sign * MAX_INTEGER;
  4208. }
  4209. return value === value ? value : 0;
  4210. }
  4211. function toInteger(value) {
  4212. var result2 = toFinite(value), remainder = result2 % 1;
  4213. return result2 === result2 ? remainder ? result2 - remainder : result2 : 0;
  4214. }
  4215. function toLength(value) {
  4216. return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
  4217. }
  4218. function toNumber(value) {
  4219. if (typeof value == "number") {
  4220. return value;
  4221. }
  4222. if (isSymbol(value)) {
  4223. return NAN;
  4224. }
  4225. if (isObject(value)) {
  4226. var other = typeof value.valueOf == "function" ? value.valueOf() : value;
  4227. value = isObject(other) ? other + "" : other;
  4228. }
  4229. if (typeof value != "string") {
  4230. return value === 0 ? value : +value;
  4231. }
  4232. value = baseTrim(value);
  4233. var isBinary = reIsBinary.test(value);
  4234. return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
  4235. }
  4236. function toPlainObject(value) {
  4237. return copyObject(value, keysIn(value));
  4238. }
  4239. function toSafeInteger(value) {
  4240. return value ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) : value === 0 ? value : 0;
  4241. }
  4242. function toString(value) {
  4243. return value == null ? "" : baseToString(value);
  4244. }
  4245. var assign = createAssigner(function(object, source) {
  4246. if (isPrototype(source) || isArrayLike(source)) {
  4247. copyObject(source, keys(source), object);
  4248. return;
  4249. }
  4250. for (var key in source) {
  4251. if (hasOwnProperty.call(source, key)) {
  4252. assignValue(object, key, source[key]);
  4253. }
  4254. }
  4255. });
  4256. var assignIn = createAssigner(function(object, source) {
  4257. copyObject(source, keysIn(source), object);
  4258. });
  4259. var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
  4260. copyObject(source, keysIn(source), object, customizer);
  4261. });
  4262. var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
  4263. copyObject(source, keys(source), object, customizer);
  4264. });
  4265. var at = flatRest(baseAt);
  4266. function create(prototype, properties) {
  4267. var result2 = baseCreate(prototype);
  4268. return properties == null ? result2 : baseAssign(result2, properties);
  4269. }
  4270. var defaults = baseRest(function(object, sources) {
  4271. object = Object2(object);
  4272. var index = -1;
  4273. var length = sources.length;
  4274. var guard = length > 2 ? sources[2] : undefined;
  4275. if (guard && isIterateeCall(sources[0], sources[1], guard)) {
  4276. length = 1;
  4277. }
  4278. while (++index < length) {
  4279. var source = sources[index];
  4280. var props = keysIn(source);
  4281. var propsIndex = -1;
  4282. var propsLength = props.length;
  4283. while (++propsIndex < propsLength) {
  4284. var key = props[propsIndex];
  4285. var value = object[key];
  4286. if (value === undefined || eq(value, objectProto[key]) && !hasOwnProperty.call(object, key)) {
  4287. object[key] = source[key];
  4288. }
  4289. }
  4290. }
  4291. return object;
  4292. });
  4293. var defaultsDeep = baseRest(function(args) {
  4294. args.push(undefined, customDefaultsMerge);
  4295. return apply(mergeWith, undefined, args);
  4296. });
  4297. function findKey(object, predicate) {
  4298. return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
  4299. }
  4300. function findLastKey(object, predicate) {
  4301. return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
  4302. }
  4303. function forIn(object, iteratee2) {
  4304. return object == null ? object : baseFor(object, getIteratee(iteratee2, 3), keysIn);
  4305. }
  4306. function forInRight(object, iteratee2) {
  4307. return object == null ? object : baseForRight(object, getIteratee(iteratee2, 3), keysIn);
  4308. }
  4309. function forOwn(object, iteratee2) {
  4310. return object && baseForOwn(object, getIteratee(iteratee2, 3));
  4311. }
  4312. function forOwnRight(object, iteratee2) {
  4313. return object && baseForOwnRight(object, getIteratee(iteratee2, 3));
  4314. }
  4315. function functions(object) {
  4316. return object == null ? [] : baseFunctions(object, keys(object));
  4317. }
  4318. function functionsIn(object) {
  4319. return object == null ? [] : baseFunctions(object, keysIn(object));
  4320. }
  4321. function get(object, path, defaultValue) {
  4322. var result2 = object == null ? undefined : baseGet(object, path);
  4323. return result2 === undefined ? defaultValue : result2;
  4324. }
  4325. function has(object, path) {
  4326. return object != null && hasPath(object, path, baseHas);
  4327. }
  4328. function hasIn(object, path) {
  4329. return object != null && hasPath(object, path, baseHasIn);
  4330. }
  4331. var invert = createInverter(function(result2, value, key) {
  4332. if (value != null && typeof value.toString != "function") {
  4333. value = nativeObjectToString.call(value);
  4334. }
  4335. result2[value] = key;
  4336. }, constant(identity));
  4337. var invertBy = createInverter(function(result2, value, key) {
  4338. if (value != null && typeof value.toString != "function") {
  4339. value = nativeObjectToString.call(value);
  4340. }
  4341. if (hasOwnProperty.call(result2, value)) {
  4342. result2[value].push(key);
  4343. } else {
  4344. result2[value] = [key];
  4345. }
  4346. }, getIteratee);
  4347. var invoke = baseRest(baseInvoke);
  4348. function keys(object) {
  4349. return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
  4350. }
  4351. function keysIn(object) {
  4352. return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
  4353. }
  4354. function mapKeys(object, iteratee2) {
  4355. var result2 = {};
  4356. iteratee2 = getIteratee(iteratee2, 3);
  4357. baseForOwn(object, function(value, key, object2) {
  4358. baseAssignValue(result2, iteratee2(value, key, object2), value);
  4359. });
  4360. return result2;
  4361. }
  4362. function mapValues(object, iteratee2) {
  4363. var result2 = {};
  4364. iteratee2 = getIteratee(iteratee2, 3);
  4365. baseForOwn(object, function(value, key, object2) {
  4366. baseAssignValue(result2, key, iteratee2(value, key, object2));
  4367. });
  4368. return result2;
  4369. }
  4370. var merge = createAssigner(function(object, source, srcIndex) {
  4371. baseMerge(object, source, srcIndex);
  4372. });
  4373. var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
  4374. baseMerge(object, source, srcIndex, customizer);
  4375. });
  4376. var omit = flatRest(function(object, paths) {
  4377. var result2 = {};
  4378. if (object == null) {
  4379. return result2;
  4380. }
  4381. var isDeep = false;
  4382. paths = arrayMap(paths, function(path) {
  4383. path = castPath(path, object);
  4384. isDeep || (isDeep = path.length > 1);
  4385. return path;
  4386. });
  4387. copyObject(object, getAllKeysIn(object), result2);
  4388. if (isDeep) {
  4389. result2 = baseClone(result2, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
  4390. }
  4391. var length = paths.length;
  4392. while (length--) {
  4393. baseUnset(result2, paths[length]);
  4394. }
  4395. return result2;
  4396. });
  4397. function omitBy(object, predicate) {
  4398. return pickBy(object, negate(getIteratee(predicate)));
  4399. }
  4400. var pick = flatRest(function(object, paths) {
  4401. return object == null ? {} : basePick(object, paths);
  4402. });
  4403. function pickBy(object, predicate) {
  4404. if (object == null) {
  4405. return {};
  4406. }
  4407. var props = arrayMap(getAllKeysIn(object), function(prop) {
  4408. return [prop];
  4409. });
  4410. predicate = getIteratee(predicate);
  4411. return basePickBy(object, props, function(value, path) {
  4412. return predicate(value, path[0]);
  4413. });
  4414. }
  4415. function result(object, path, defaultValue) {
  4416. path = castPath(path, object);
  4417. var index = -1, length = path.length;
  4418. if (!length) {
  4419. length = 1;
  4420. object = undefined;
  4421. }
  4422. while (++index < length) {
  4423. var value = object == null ? undefined : object[toKey(path[index])];
  4424. if (value === undefined) {
  4425. index = length;
  4426. value = defaultValue;
  4427. }
  4428. object = isFunction(value) ? value.call(object) : value;
  4429. }
  4430. return object;
  4431. }
  4432. function set(object, path, value) {
  4433. return object == null ? object : baseSet(object, path, value);
  4434. }
  4435. function setWith(object, path, value, customizer) {
  4436. customizer = typeof customizer == "function" ? customizer : undefined;
  4437. return object == null ? object : baseSet(object, path, value, customizer);
  4438. }
  4439. var toPairs = createToPairs(keys);
  4440. var toPairsIn = createToPairs(keysIn);
  4441. function transform(object, iteratee2, accumulator) {
  4442. var isArr = isArray(object), isArrLike = isArr || isBuffer(object) || isTypedArray(object);
  4443. iteratee2 = getIteratee(iteratee2, 4);
  4444. if (accumulator == null) {
  4445. var Ctor = object && object.constructor;
  4446. if (isArrLike) {
  4447. accumulator = isArr ? new Ctor() : [];
  4448. } else if (isObject(object)) {
  4449. accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
  4450. } else {
  4451. accumulator = {};
  4452. }
  4453. }
  4454. (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object2) {
  4455. return iteratee2(accumulator, value, index, object2);
  4456. });
  4457. return accumulator;
  4458. }
  4459. function unset(object, path) {
  4460. return object == null ? true : baseUnset(object, path);
  4461. }
  4462. function update(object, path, updater) {
  4463. return object == null ? object : baseUpdate(object, path, castFunction(updater));
  4464. }
  4465. function updateWith(object, path, updater, customizer) {
  4466. customizer = typeof customizer == "function" ? customizer : undefined;
  4467. return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
  4468. }
  4469. function values(object) {
  4470. return object == null ? [] : baseValues(object, keys(object));
  4471. }
  4472. function valuesIn(object) {
  4473. return object == null ? [] : baseValues(object, keysIn(object));
  4474. }
  4475. function clamp(number, lower, upper) {
  4476. if (upper === undefined) {
  4477. upper = lower;
  4478. lower = undefined;
  4479. }
  4480. if (upper !== undefined) {
  4481. upper = toNumber(upper);
  4482. upper = upper === upper ? upper : 0;
  4483. }
  4484. if (lower !== undefined) {
  4485. lower = toNumber(lower);
  4486. lower = lower === lower ? lower : 0;
  4487. }
  4488. return baseClamp(toNumber(number), lower, upper);
  4489. }
  4490. function inRange(number, start, end) {
  4491. start = toFinite(start);
  4492. if (end === undefined) {
  4493. end = start;
  4494. start = 0;
  4495. } else {
  4496. end = toFinite(end);
  4497. }
  4498. number = toNumber(number);
  4499. return baseInRange(number, start, end);
  4500. }
  4501. function random(lower, upper, floating) {
  4502. if (floating && typeof floating != "boolean" && isIterateeCall(lower, upper, floating)) {
  4503. upper = floating = undefined;
  4504. }
  4505. if (floating === undefined) {
  4506. if (typeof upper == "boolean") {
  4507. floating = upper;
  4508. upper = undefined;
  4509. } else if (typeof lower == "boolean") {
  4510. floating = lower;
  4511. lower = undefined;
  4512. }
  4513. }
  4514. if (lower === undefined && upper === undefined) {
  4515. lower = 0;
  4516. upper = 1;
  4517. } else {
  4518. lower = toFinite(lower);
  4519. if (upper === undefined) {
  4520. upper = lower;
  4521. lower = 0;
  4522. } else {
  4523. upper = toFinite(upper);
  4524. }
  4525. }
  4526. if (lower > upper) {
  4527. var temp = lower;
  4528. lower = upper;
  4529. upper = temp;
  4530. }
  4531. if (floating || lower % 1 || upper % 1) {
  4532. var rand = nativeRandom();
  4533. return nativeMin(lower + rand * (upper - lower + freeParseFloat("1e-" + ((rand + "").length - 1))), upper);
  4534. }
  4535. return baseRandom(lower, upper);
  4536. }
  4537. var camelCase = createCompounder(function(result2, word, index) {
  4538. word = word.toLowerCase();
  4539. return result2 + (index ? capitalize(word) : word);
  4540. });
  4541. function capitalize(string) {
  4542. return upperFirst(toString(string).toLowerCase());
  4543. }
  4544. function deburr(string) {
  4545. string = toString(string);
  4546. return string && string.replace(reLatin, deburrLetter).replace(reComboMark, "");
  4547. }
  4548. function endsWith(string, target, position) {
  4549. string = toString(string);
  4550. target = baseToString(target);
  4551. var length = string.length;
  4552. position = position === undefined ? length : baseClamp(toInteger(position), 0, length);
  4553. var end = position;
  4554. position -= target.length;
  4555. return position >= 0 && string.slice(position, end) == target;
  4556. }
  4557. function escape(string) {
  4558. string = toString(string);
  4559. return string && reHasUnescapedHtml.test(string) ? string.replace(reUnescapedHtml, escapeHtmlChar) : string;
  4560. }
  4561. function escapeRegExp(string) {
  4562. string = toString(string);
  4563. return string && reHasRegExpChar.test(string) ? string.replace(reRegExpChar, "\\$&") : string;
  4564. }
  4565. var kebabCase = createCompounder(function(result2, word, index) {
  4566. return result2 + (index ? "-" : "") + word.toLowerCase();
  4567. });
  4568. var lowerCase = createCompounder(function(result2, word, index) {
  4569. return result2 + (index ? " " : "") + word.toLowerCase();
  4570. });
  4571. var lowerFirst = createCaseFirst("toLowerCase");
  4572. function pad(string, length, chars) {
  4573. string = toString(string);
  4574. length = toInteger(length);
  4575. var strLength = length ? stringSize(string) : 0;
  4576. if (!length || strLength >= length) {
  4577. return string;
  4578. }
  4579. var mid = (length - strLength) / 2;
  4580. return createPadding(nativeFloor(mid), chars) + string + createPadding(nativeCeil(mid), chars);
  4581. }
  4582. function padEnd(string, length, chars) {
  4583. string = toString(string);
  4584. length = toInteger(length);
  4585. var strLength = length ? stringSize(string) : 0;
  4586. return length && strLength < length ? string + createPadding(length - strLength, chars) : string;
  4587. }
  4588. function padStart(string, length, chars) {
  4589. string = toString(string);
  4590. length = toInteger(length);
  4591. var strLength = length ? stringSize(string) : 0;
  4592. return length && strLength < length ? createPadding(length - strLength, chars) + string : string;
  4593. }
  4594. function parseInt2(string, radix, guard) {
  4595. if (guard || radix == null) {
  4596. radix = 0;
  4597. } else if (radix) {
  4598. radix = +radix;
  4599. }
  4600. return nativeParseInt(toString(string).replace(reTrimStart, ""), radix || 0);
  4601. }
  4602. function repeat(string, n, guard) {
  4603. if (guard ? isIterateeCall(string, n, guard) : n === undefined) {
  4604. n = 1;
  4605. } else {
  4606. n = toInteger(n);
  4607. }
  4608. return baseRepeat(toString(string), n);
  4609. }
  4610. function replace() {
  4611. var args = arguments, string = toString(args[0]);
  4612. return args.length < 3 ? string : string.replace(args[1], args[2]);
  4613. }
  4614. var snakeCase = createCompounder(function(result2, word, index) {
  4615. return result2 + (index ? "_" : "") + word.toLowerCase();
  4616. });
  4617. function split(string, separator, limit) {
  4618. if (limit && typeof limit != "number" && isIterateeCall(string, separator, limit)) {
  4619. separator = limit = undefined;
  4620. }
  4621. limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
  4622. if (!limit) {
  4623. return [];
  4624. }
  4625. string = toString(string);
  4626. if (string && (typeof separator == "string" || separator != null && !isRegExp(separator))) {
  4627. separator = baseToString(separator);
  4628. if (!separator && hasUnicode(string)) {
  4629. return castSlice(stringToArray(string), 0, limit);
  4630. }
  4631. }
  4632. return string.split(separator, limit);
  4633. }
  4634. var startCase = createCompounder(function(result2, word, index) {
  4635. return result2 + (index ? " " : "") + upperFirst(word);
  4636. });
  4637. function startsWith(string, target, position) {
  4638. string = toString(string);
  4639. position = position == null ? 0 : baseClamp(toInteger(position), 0, string.length);
  4640. target = baseToString(target);
  4641. return string.slice(position, position + target.length) == target;
  4642. }
  4643. function template(string, options, guard) {
  4644. var settings = lodash.templateSettings;
  4645. if (guard && isIterateeCall(string, options, guard)) {
  4646. options = undefined;
  4647. }
  4648. string = toString(string);
  4649. options = assignInWith({}, options, settings, customDefaultsAssignIn);
  4650. var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn), importsKeys = keys(imports), importsValues = baseValues(imports, importsKeys);
  4651. var isEscaping, isEvaluating, index = 0, interpolate = options.interpolate || reNoMatch, source = "__p += '";
  4652. var reDelimiters = RegExp2(
  4653. (options.escape || reNoMatch).source + "|" + interpolate.source + "|" + (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + "|" + (options.evaluate || reNoMatch).source + "|$",
  4654. "g"
  4655. );
  4656. var sourceURL = "//# sourceURL=" + (hasOwnProperty.call(options, "sourceURL") ? (options.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++templateCounter + "]") + "\n";
  4657. string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
  4658. interpolateValue || (interpolateValue = esTemplateValue);
  4659. source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
  4660. if (escapeValue) {
  4661. isEscaping = true;
  4662. source += "' +\n__e(" + escapeValue + ") +\n'";
  4663. }
  4664. if (evaluateValue) {
  4665. isEvaluating = true;
  4666. source += "';\n" + evaluateValue + ";\n__p += '";
  4667. }
  4668. if (interpolateValue) {
  4669. source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
  4670. }
  4671. index = offset + match.length;
  4672. return match;
  4673. });
  4674. source += "';\n";
  4675. var variable = hasOwnProperty.call(options, "variable") && options.variable;
  4676. if (!variable) {
  4677. source = "with (obj) {\n" + source + "\n}\n";
  4678. } else if (reForbiddenIdentifierChars.test(variable)) {
  4679. throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);
  4680. }
  4681. source = (isEvaluating ? source.replace(reEmptyStringLeading, "") : source).replace(reEmptyStringMiddle, "$1").replace(reEmptyStringTrailing, "$1;");
  4682. source = "function(" + (variable || "obj") + ") {\n" + (variable ? "" : "obj || (obj = {});\n") + "var __t, __p = ''" + (isEscaping ? ", __e = _.escape" : "") + (isEvaluating ? ", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n" : ";\n") + source + "return __p\n}";
  4683. var result2 = attempt(function() {
  4684. return Function2(importsKeys, sourceURL + "return " + source).apply(undefined, importsValues);
  4685. });
  4686. result2.source = source;
  4687. if (isError(result2)) {
  4688. throw result2;
  4689. }
  4690. return result2;
  4691. }
  4692. function toLower(value) {
  4693. return toString(value).toLowerCase();
  4694. }
  4695. function toUpper(value) {
  4696. return toString(value).toUpperCase();
  4697. }
  4698. function trim(string, chars, guard) {
  4699. string = toString(string);
  4700. if (string && (guard || chars === undefined)) {
  4701. return baseTrim(string);
  4702. }
  4703. if (!string || !(chars = baseToString(chars))) {
  4704. return string;
  4705. }
  4706. var strSymbols = stringToArray(string), chrSymbols = stringToArray(chars), start = charsStartIndex(strSymbols, chrSymbols), end = charsEndIndex(strSymbols, chrSymbols) + 1;
  4707. return castSlice(strSymbols, start, end).join("");
  4708. }
  4709. function trimEnd(string, chars, guard) {
  4710. string = toString(string);
  4711. if (string && (guard || chars === undefined)) {
  4712. return string.slice(0, trimmedEndIndex(string) + 1);
  4713. }
  4714. if (!string || !(chars = baseToString(chars))) {
  4715. return string;
  4716. }
  4717. var strSymbols = stringToArray(string), end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
  4718. return castSlice(strSymbols, 0, end).join("");
  4719. }
  4720. function trimStart(string, chars, guard) {
  4721. string = toString(string);
  4722. if (string && (guard || chars === undefined)) {
  4723. return string.replace(reTrimStart, "");
  4724. }
  4725. if (!string || !(chars = baseToString(chars))) {
  4726. return string;
  4727. }
  4728. var strSymbols = stringToArray(string), start = charsStartIndex(strSymbols, stringToArray(chars));
  4729. return castSlice(strSymbols, start).join("");
  4730. }
  4731. function truncate(string, options) {
  4732. var length = DEFAULT_TRUNC_LENGTH, omission = DEFAULT_TRUNC_OMISSION;
  4733. if (isObject(options)) {
  4734. var separator = "separator" in options ? options.separator : separator;
  4735. length = "length" in options ? toInteger(options.length) : length;
  4736. omission = "omission" in options ? baseToString(options.omission) : omission;
  4737. }
  4738. string = toString(string);
  4739. var strLength = string.length;
  4740. if (hasUnicode(string)) {
  4741. var strSymbols = stringToArray(string);
  4742. strLength = strSymbols.length;
  4743. }
  4744. if (length >= strLength) {
  4745. return string;
  4746. }
  4747. var end = length - stringSize(omission);
  4748. if (end < 1) {
  4749. return omission;
  4750. }
  4751. var result2 = strSymbols ? castSlice(strSymbols, 0, end).join("") : string.slice(0, end);
  4752. if (separator === undefined) {
  4753. return result2 + omission;
  4754. }
  4755. if (strSymbols) {
  4756. end += result2.length - end;
  4757. }
  4758. if (isRegExp(separator)) {
  4759. if (string.slice(end).search(separator)) {
  4760. var match, substring = result2;
  4761. if (!separator.global) {
  4762. separator = RegExp2(separator.source, toString(reFlags.exec(separator)) + "g");
  4763. }
  4764. separator.lastIndex = 0;
  4765. while (match = separator.exec(substring)) {
  4766. var newEnd = match.index;
  4767. }
  4768. result2 = result2.slice(0, newEnd === undefined ? end : newEnd);
  4769. }
  4770. } else if (string.indexOf(baseToString(separator), end) != end) {
  4771. var index = result2.lastIndexOf(separator);
  4772. if (index > -1) {
  4773. result2 = result2.slice(0, index);
  4774. }
  4775. }
  4776. return result2 + omission;
  4777. }
  4778. function unescape(string) {
  4779. string = toString(string);
  4780. return string && reHasEscapedHtml.test(string) ? string.replace(reEscapedHtml, unescapeHtmlChar) : string;
  4781. }
  4782. var upperCase = createCompounder(function(result2, word, index) {
  4783. return result2 + (index ? " " : "") + word.toUpperCase();
  4784. });
  4785. var upperFirst = createCaseFirst("toUpperCase");
  4786. function words(string, pattern, guard) {
  4787. string = toString(string);
  4788. pattern = guard ? undefined : pattern;
  4789. if (pattern === undefined) {
  4790. return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
  4791. }
  4792. return string.match(pattern) || [];
  4793. }
  4794. var attempt = baseRest(function(func, args) {
  4795. try {
  4796. return apply(func, undefined, args);
  4797. } catch (e) {
  4798. return isError(e) ? e : new Error(e);
  4799. }
  4800. });
  4801. var bindAll = flatRest(function(object, methodNames) {
  4802. arrayEach(methodNames, function(key) {
  4803. key = toKey(key);
  4804. baseAssignValue(object, key, bind(object[key], object));
  4805. });
  4806. return object;
  4807. });
  4808. function cond(pairs) {
  4809. var length = pairs == null ? 0 : pairs.length, toIteratee = getIteratee();
  4810. pairs = !length ? [] : arrayMap(pairs, function(pair) {
  4811. if (typeof pair[1] != "function") {
  4812. throw new TypeError(FUNC_ERROR_TEXT);
  4813. }
  4814. return [toIteratee(pair[0]), pair[1]];
  4815. });
  4816. return baseRest(function(args) {
  4817. var index = -1;
  4818. while (++index < length) {
  4819. var pair = pairs[index];
  4820. if (apply(pair[0], this, args)) {
  4821. return apply(pair[1], this, args);
  4822. }
  4823. }
  4824. });
  4825. }
  4826. function conforms(source) {
  4827. return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
  4828. }
  4829. function constant(value) {
  4830. return function() {
  4831. return value;
  4832. };
  4833. }
  4834. function defaultTo(value, defaultValue) {
  4835. return value == null || value !== value ? defaultValue : value;
  4836. }
  4837. var flow = createFlow();
  4838. var flowRight = createFlow(true);
  4839. function identity(value) {
  4840. return value;
  4841. }
  4842. function iteratee(func) {
  4843. return baseIteratee(typeof func == "function" ? func : baseClone(func, CLONE_DEEP_FLAG));
  4844. }
  4845. function matches(source) {
  4846. return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
  4847. }
  4848. function matchesProperty(path, srcValue) {
  4849. return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
  4850. }
  4851. var method = baseRest(function(path, args) {
  4852. return function(object) {
  4853. return baseInvoke(object, path, args);
  4854. };
  4855. });
  4856. var methodOf = baseRest(function(object, args) {
  4857. return function(path) {
  4858. return baseInvoke(object, path, args);
  4859. };
  4860. });
  4861. function mixin(object, source, options) {
  4862. var props = keys(source), methodNames = baseFunctions(source, props);
  4863. if (options == null && !(isObject(source) && (methodNames.length || !props.length))) {
  4864. options = source;
  4865. source = object;
  4866. object = this;
  4867. methodNames = baseFunctions(source, keys(source));
  4868. }
  4869. var chain2 = !(isObject(options) && "chain" in options) || !!options.chain, isFunc = isFunction(object);
  4870. arrayEach(methodNames, function(methodName) {
  4871. var func = source[methodName];
  4872. object[methodName] = func;
  4873. if (isFunc) {
  4874. object.prototype[methodName] = function() {
  4875. var chainAll = this.__chain__;
  4876. if (chain2 || chainAll) {
  4877. var result2 = object(this.__wrapped__), actions = result2.__actions__ = copyArray(this.__actions__);
  4878. actions.push({ "func": func, "args": arguments, "thisArg": object });
  4879. result2.__chain__ = chainAll;
  4880. return result2;
  4881. }
  4882. return func.apply(object, arrayPush([this.value()], arguments));
  4883. };
  4884. }
  4885. });
  4886. return object;
  4887. }
  4888. function noConflict() {
  4889. if (root._ === this) {
  4890. root._ = oldDash;
  4891. }
  4892. return this;
  4893. }
  4894. function noop() {
  4895. }
  4896. function nthArg(n) {
  4897. n = toInteger(n);
  4898. return baseRest(function(args) {
  4899. return baseNth(args, n);
  4900. });
  4901. }
  4902. var over = createOver(arrayMap);
  4903. var overEvery = createOver(arrayEvery);
  4904. var overSome = createOver(arraySome);
  4905. function property(path) {
  4906. return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
  4907. }
  4908. function propertyOf(object) {
  4909. return function(path) {
  4910. return object == null ? undefined : baseGet(object, path);
  4911. };
  4912. }
  4913. var range = createRange();
  4914. var rangeRight = createRange(true);
  4915. function stubArray() {
  4916. return [];
  4917. }
  4918. function stubFalse() {
  4919. return false;
  4920. }
  4921. function stubObject() {
  4922. return {};
  4923. }
  4924. function stubString() {
  4925. return "";
  4926. }
  4927. function stubTrue() {
  4928. return true;
  4929. }
  4930. function times(n, iteratee2) {
  4931. n = toInteger(n);
  4932. if (n < 1 || n > MAX_SAFE_INTEGER) {
  4933. return [];
  4934. }
  4935. var index = MAX_ARRAY_LENGTH, length = nativeMin(n, MAX_ARRAY_LENGTH);
  4936. iteratee2 = getIteratee(iteratee2);
  4937. n -= MAX_ARRAY_LENGTH;
  4938. var result2 = baseTimes(length, iteratee2);
  4939. while (++index < n) {
  4940. iteratee2(index);
  4941. }
  4942. return result2;
  4943. }
  4944. function toPath(value) {
  4945. if (isArray(value)) {
  4946. return arrayMap(value, toKey);
  4947. }
  4948. return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
  4949. }
  4950. function uniqueId(prefix) {
  4951. var id = ++idCounter;
  4952. return toString(prefix) + id;
  4953. }
  4954. var add = createMathOperation(function(augend, addend) {
  4955. return augend + addend;
  4956. }, 0);
  4957. var ceil = createRound("ceil");
  4958. var divide = createMathOperation(function(dividend, divisor) {
  4959. return dividend / divisor;
  4960. }, 1);
  4961. var floor = createRound("floor");
  4962. function max(array) {
  4963. return array && array.length ? baseExtremum(array, identity, baseGt) : undefined;
  4964. }
  4965. function maxBy(array, iteratee2) {
  4966. return array && array.length ? baseExtremum(array, getIteratee(iteratee2, 2), baseGt) : undefined;
  4967. }
  4968. function mean(array) {
  4969. return baseMean(array, identity);
  4970. }
  4971. function meanBy(array, iteratee2) {
  4972. return baseMean(array, getIteratee(iteratee2, 2));
  4973. }
  4974. function min(array) {
  4975. return array && array.length ? baseExtremum(array, identity, baseLt) : undefined;
  4976. }
  4977. function minBy(array, iteratee2) {
  4978. return array && array.length ? baseExtremum(array, getIteratee(iteratee2, 2), baseLt) : undefined;
  4979. }
  4980. var multiply = createMathOperation(function(multiplier, multiplicand) {
  4981. return multiplier * multiplicand;
  4982. }, 1);
  4983. var round = createRound("round");
  4984. var subtract = createMathOperation(function(minuend, subtrahend) {
  4985. return minuend - subtrahend;
  4986. }, 0);
  4987. function sum(array) {
  4988. return array && array.length ? baseSum(array, identity) : 0;
  4989. }
  4990. function sumBy(array, iteratee2) {
  4991. return array && array.length ? baseSum(array, getIteratee(iteratee2, 2)) : 0;
  4992. }
  4993. lodash.after = after;
  4994. lodash.ary = ary;
  4995. lodash.assign = assign;
  4996. lodash.assignIn = assignIn;
  4997. lodash.assignInWith = assignInWith;
  4998. lodash.assignWith = assignWith;
  4999. lodash.at = at;
  5000. lodash.before = before;
  5001. lodash.bind = bind;
  5002. lodash.bindAll = bindAll;
  5003. lodash.bindKey = bindKey;
  5004. lodash.castArray = castArray;
  5005. lodash.chain = chain;
  5006. lodash.chunk = chunk;
  5007. lodash.compact = compact;
  5008. lodash.concat = concat;
  5009. lodash.cond = cond;
  5010. lodash.conforms = conforms;
  5011. lodash.constant = constant;
  5012. lodash.countBy = countBy;
  5013. lodash.create = create;
  5014. lodash.curry = curry;
  5015. lodash.curryRight = curryRight;
  5016. lodash.debounce = debounce;
  5017. lodash.defaults = defaults;
  5018. lodash.defaultsDeep = defaultsDeep;
  5019. lodash.defer = defer;
  5020. lodash.delay = delay;
  5021. lodash.difference = difference;
  5022. lodash.differenceBy = differenceBy;
  5023. lodash.differenceWith = differenceWith;
  5024. lodash.drop = drop;
  5025. lodash.dropRight = dropRight;
  5026. lodash.dropRightWhile = dropRightWhile;
  5027. lodash.dropWhile = dropWhile;
  5028. lodash.fill = fill;
  5029. lodash.filter = filter;
  5030. lodash.flatMap = flatMap;
  5031. lodash.flatMapDeep = flatMapDeep;
  5032. lodash.flatMapDepth = flatMapDepth;
  5033. lodash.flatten = flatten;
  5034. lodash.flattenDeep = flattenDeep;
  5035. lodash.flattenDepth = flattenDepth;
  5036. lodash.flip = flip;
  5037. lodash.flow = flow;
  5038. lodash.flowRight = flowRight;
  5039. lodash.fromPairs = fromPairs;
  5040. lodash.functions = functions;
  5041. lodash.functionsIn = functionsIn;
  5042. lodash.groupBy = groupBy;
  5043. lodash.initial = initial;
  5044. lodash.intersection = intersection;
  5045. lodash.intersectionBy = intersectionBy;
  5046. lodash.intersectionWith = intersectionWith;
  5047. lodash.invert = invert;
  5048. lodash.invertBy = invertBy;
  5049. lodash.invokeMap = invokeMap;
  5050. lodash.iteratee = iteratee;
  5051. lodash.keyBy = keyBy;
  5052. lodash.keys = keys;
  5053. lodash.keysIn = keysIn;
  5054. lodash.map = map;
  5055. lodash.mapKeys = mapKeys;
  5056. lodash.mapValues = mapValues;
  5057. lodash.matches = matches;
  5058. lodash.matchesProperty = matchesProperty;
  5059. lodash.memoize = memoize;
  5060. lodash.merge = merge;
  5061. lodash.mergeWith = mergeWith;
  5062. lodash.method = method;
  5063. lodash.methodOf = methodOf;
  5064. lodash.mixin = mixin;
  5065. lodash.negate = negate;
  5066. lodash.nthArg = nthArg;
  5067. lodash.omit = omit;
  5068. lodash.omitBy = omitBy;
  5069. lodash.once = once;
  5070. lodash.orderBy = orderBy;
  5071. lodash.over = over;
  5072. lodash.overArgs = overArgs;
  5073. lodash.overEvery = overEvery;
  5074. lodash.overSome = overSome;
  5075. lodash.partial = partial;
  5076. lodash.partialRight = partialRight;
  5077. lodash.partition = partition;
  5078. lodash.pick = pick;
  5079. lodash.pickBy = pickBy;
  5080. lodash.property = property;
  5081. lodash.propertyOf = propertyOf;
  5082. lodash.pull = pull;
  5083. lodash.pullAll = pullAll;
  5084. lodash.pullAllBy = pullAllBy;
  5085. lodash.pullAllWith = pullAllWith;
  5086. lodash.pullAt = pullAt;
  5087. lodash.range = range;
  5088. lodash.rangeRight = rangeRight;
  5089. lodash.rearg = rearg;
  5090. lodash.reject = reject;
  5091. lodash.remove = remove;
  5092. lodash.rest = rest;
  5093. lodash.reverse = reverse;
  5094. lodash.sampleSize = sampleSize;
  5095. lodash.set = set;
  5096. lodash.setWith = setWith;
  5097. lodash.shuffle = shuffle;
  5098. lodash.slice = slice;
  5099. lodash.sortBy = sortBy;
  5100. lodash.sortedUniq = sortedUniq;
  5101. lodash.sortedUniqBy = sortedUniqBy;
  5102. lodash.split = split;
  5103. lodash.spread = spread;
  5104. lodash.tail = tail;
  5105. lodash.take = take;
  5106. lodash.takeRight = takeRight;
  5107. lodash.takeRightWhile = takeRightWhile;
  5108. lodash.takeWhile = takeWhile;
  5109. lodash.tap = tap;
  5110. lodash.throttle = throttle;
  5111. lodash.thru = thru;
  5112. lodash.toArray = toArray;
  5113. lodash.toPairs = toPairs;
  5114. lodash.toPairsIn = toPairsIn;
  5115. lodash.toPath = toPath;
  5116. lodash.toPlainObject = toPlainObject;
  5117. lodash.transform = transform;
  5118. lodash.unary = unary;
  5119. lodash.union = union;
  5120. lodash.unionBy = unionBy;
  5121. lodash.unionWith = unionWith;
  5122. lodash.uniq = uniq;
  5123. lodash.uniqBy = uniqBy;
  5124. lodash.uniqWith = uniqWith;
  5125. lodash.unset = unset;
  5126. lodash.unzip = unzip;
  5127. lodash.unzipWith = unzipWith;
  5128. lodash.update = update;
  5129. lodash.updateWith = updateWith;
  5130. lodash.values = values;
  5131. lodash.valuesIn = valuesIn;
  5132. lodash.without = without;
  5133. lodash.words = words;
  5134. lodash.wrap = wrap;
  5135. lodash.xor = xor;
  5136. lodash.xorBy = xorBy;
  5137. lodash.xorWith = xorWith;
  5138. lodash.zip = zip;
  5139. lodash.zipObject = zipObject;
  5140. lodash.zipObjectDeep = zipObjectDeep;
  5141. lodash.zipWith = zipWith;
  5142. lodash.entries = toPairs;
  5143. lodash.entriesIn = toPairsIn;
  5144. lodash.extend = assignIn;
  5145. lodash.extendWith = assignInWith;
  5146. mixin(lodash, lodash);
  5147. lodash.add = add;
  5148. lodash.attempt = attempt;
  5149. lodash.camelCase = camelCase;
  5150. lodash.capitalize = capitalize;
  5151. lodash.ceil = ceil;
  5152. lodash.clamp = clamp;
  5153. lodash.clone = clone;
  5154. lodash.cloneDeep = cloneDeep;
  5155. lodash.cloneDeepWith = cloneDeepWith;
  5156. lodash.cloneWith = cloneWith;
  5157. lodash.conformsTo = conformsTo;
  5158. lodash.deburr = deburr;
  5159. lodash.defaultTo = defaultTo;
  5160. lodash.divide = divide;
  5161. lodash.endsWith = endsWith;
  5162. lodash.eq = eq;
  5163. lodash.escape = escape;
  5164. lodash.escapeRegExp = escapeRegExp;
  5165. lodash.every = every;
  5166. lodash.find = find;
  5167. lodash.findIndex = findIndex;
  5168. lodash.findKey = findKey;
  5169. lodash.findLast = findLast;
  5170. lodash.findLastIndex = findLastIndex;
  5171. lodash.findLastKey = findLastKey;
  5172. lodash.floor = floor;
  5173. lodash.forEach = forEach;
  5174. lodash.forEachRight = forEachRight;
  5175. lodash.forIn = forIn;
  5176. lodash.forInRight = forInRight;
  5177. lodash.forOwn = forOwn;
  5178. lodash.forOwnRight = forOwnRight;
  5179. lodash.get = get;
  5180. lodash.gt = gt;
  5181. lodash.gte = gte;
  5182. lodash.has = has;
  5183. lodash.hasIn = hasIn;
  5184. lodash.head = head;
  5185. lodash.identity = identity;
  5186. lodash.includes = includes;
  5187. lodash.indexOf = indexOf;
  5188. lodash.inRange = inRange;
  5189. lodash.invoke = invoke;
  5190. lodash.isArguments = isArguments;
  5191. lodash.isArray = isArray;
  5192. lodash.isArrayBuffer = isArrayBuffer;
  5193. lodash.isArrayLike = isArrayLike;
  5194. lodash.isArrayLikeObject = isArrayLikeObject;
  5195. lodash.isBoolean = isBoolean;
  5196. lodash.isBuffer = isBuffer;
  5197. lodash.isDate = isDate;
  5198. lodash.isElement = isElement;
  5199. lodash.isEmpty = isEmpty;
  5200. lodash.isEqual = isEqual;
  5201. lodash.isEqualWith = isEqualWith;
  5202. lodash.isError = isError;
  5203. lodash.isFinite = isFinite;
  5204. lodash.isFunction = isFunction;
  5205. lodash.isInteger = isInteger;
  5206. lodash.isLength = isLength;
  5207. lodash.isMap = isMap;
  5208. lodash.isMatch = isMatch;
  5209. lodash.isMatchWith = isMatchWith;
  5210. lodash.isNaN = isNaN;
  5211. lodash.isNative = isNative;
  5212. lodash.isNil = isNil;
  5213. lodash.isNull = isNull;
  5214. lodash.isNumber = isNumber;
  5215. lodash.isObject = isObject;
  5216. lodash.isObjectLike = isObjectLike;
  5217. lodash.isPlainObject = isPlainObject;
  5218. lodash.isRegExp = isRegExp;
  5219. lodash.isSafeInteger = isSafeInteger;
  5220. lodash.isSet = isSet;
  5221. lodash.isString = isString;
  5222. lodash.isSymbol = isSymbol;
  5223. lodash.isTypedArray = isTypedArray;
  5224. lodash.isUndefined = isUndefined;
  5225. lodash.isWeakMap = isWeakMap;
  5226. lodash.isWeakSet = isWeakSet;
  5227. lodash.join = join;
  5228. lodash.kebabCase = kebabCase;
  5229. lodash.last = last;
  5230. lodash.lastIndexOf = lastIndexOf;
  5231. lodash.lowerCase = lowerCase;
  5232. lodash.lowerFirst = lowerFirst;
  5233. lodash.lt = lt;
  5234. lodash.lte = lte;
  5235. lodash.max = max;
  5236. lodash.maxBy = maxBy;
  5237. lodash.mean = mean;
  5238. lodash.meanBy = meanBy;
  5239. lodash.min = min;
  5240. lodash.minBy = minBy;
  5241. lodash.stubArray = stubArray;
  5242. lodash.stubFalse = stubFalse;
  5243. lodash.stubObject = stubObject;
  5244. lodash.stubString = stubString;
  5245. lodash.stubTrue = stubTrue;
  5246. lodash.multiply = multiply;
  5247. lodash.nth = nth;
  5248. lodash.noConflict = noConflict;
  5249. lodash.noop = noop;
  5250. lodash.now = now;
  5251. lodash.pad = pad;
  5252. lodash.padEnd = padEnd;
  5253. lodash.padStart = padStart;
  5254. lodash.parseInt = parseInt2;
  5255. lodash.random = random;
  5256. lodash.reduce = reduce;
  5257. lodash.reduceRight = reduceRight;
  5258. lodash.repeat = repeat;
  5259. lodash.replace = replace;
  5260. lodash.result = result;
  5261. lodash.round = round;
  5262. lodash.runInContext = runInContext2;
  5263. lodash.sample = sample;
  5264. lodash.size = size;
  5265. lodash.snakeCase = snakeCase;
  5266. lodash.some = some;
  5267. lodash.sortedIndex = sortedIndex;
  5268. lodash.sortedIndexBy = sortedIndexBy;
  5269. lodash.sortedIndexOf = sortedIndexOf;
  5270. lodash.sortedLastIndex = sortedLastIndex;
  5271. lodash.sortedLastIndexBy = sortedLastIndexBy;
  5272. lodash.sortedLastIndexOf = sortedLastIndexOf;
  5273. lodash.startCase = startCase;
  5274. lodash.startsWith = startsWith;
  5275. lodash.subtract = subtract;
  5276. lodash.sum = sum;
  5277. lodash.sumBy = sumBy;
  5278. lodash.template = template;
  5279. lodash.times = times;
  5280. lodash.toFinite = toFinite;
  5281. lodash.toInteger = toInteger;
  5282. lodash.toLength = toLength;
  5283. lodash.toLower = toLower;
  5284. lodash.toNumber = toNumber;
  5285. lodash.toSafeInteger = toSafeInteger;
  5286. lodash.toString = toString;
  5287. lodash.toUpper = toUpper;
  5288. lodash.trim = trim;
  5289. lodash.trimEnd = trimEnd;
  5290. lodash.trimStart = trimStart;
  5291. lodash.truncate = truncate;
  5292. lodash.unescape = unescape;
  5293. lodash.uniqueId = uniqueId;
  5294. lodash.upperCase = upperCase;
  5295. lodash.upperFirst = upperFirst;
  5296. lodash.each = forEach;
  5297. lodash.eachRight = forEachRight;
  5298. lodash.first = head;
  5299. mixin(lodash, function() {
  5300. var source = {};
  5301. baseForOwn(lodash, function(func, methodName) {
  5302. if (!hasOwnProperty.call(lodash.prototype, methodName)) {
  5303. source[methodName] = func;
  5304. }
  5305. });
  5306. return source;
  5307. }(), { "chain": false });
  5308. lodash.VERSION = VERSION;
  5309. arrayEach(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(methodName) {
  5310. lodash[methodName].placeholder = lodash;
  5311. });
  5312. arrayEach(["drop", "take"], function(methodName, index) {
  5313. LazyWrapper.prototype[methodName] = function(n) {
  5314. n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
  5315. var result2 = this.__filtered__ && !index ? new LazyWrapper(this) : this.clone();
  5316. if (result2.__filtered__) {
  5317. result2.__takeCount__ = nativeMin(n, result2.__takeCount__);
  5318. } else {
  5319. result2.__views__.push({
  5320. "size": nativeMin(n, MAX_ARRAY_LENGTH),
  5321. "type": methodName + (result2.__dir__ < 0 ? "Right" : "")
  5322. });
  5323. }
  5324. return result2;
  5325. };
  5326. LazyWrapper.prototype[methodName + "Right"] = function(n) {
  5327. return this.reverse()[methodName](n).reverse();
  5328. };
  5329. });
  5330. arrayEach(["filter", "map", "takeWhile"], function(methodName, index) {
  5331. var type = index + 1, isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
  5332. LazyWrapper.prototype[methodName] = function(iteratee2) {
  5333. var result2 = this.clone();
  5334. result2.__iteratees__.push({
  5335. "iteratee": getIteratee(iteratee2, 3),
  5336. "type": type
  5337. });
  5338. result2.__filtered__ = result2.__filtered__ || isFilter;
  5339. return result2;
  5340. };
  5341. });
  5342. arrayEach(["head", "last"], function(methodName, index) {
  5343. var takeName = "take" + (index ? "Right" : "");
  5344. LazyWrapper.prototype[methodName] = function() {
  5345. return this[takeName](1).value()[0];
  5346. };
  5347. });
  5348. arrayEach(["initial", "tail"], function(methodName, index) {
  5349. var dropName = "drop" + (index ? "" : "Right");
  5350. LazyWrapper.prototype[methodName] = function() {
  5351. return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
  5352. };
  5353. });
  5354. LazyWrapper.prototype.compact = function() {
  5355. return this.filter(identity);
  5356. };
  5357. LazyWrapper.prototype.find = function(predicate) {
  5358. return this.filter(predicate).head();
  5359. };
  5360. LazyWrapper.prototype.findLast = function(predicate) {
  5361. return this.reverse().find(predicate);
  5362. };
  5363. LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
  5364. if (typeof path == "function") {
  5365. return new LazyWrapper(this);
  5366. }
  5367. return this.map(function(value) {
  5368. return baseInvoke(value, path, args);
  5369. });
  5370. });
  5371. LazyWrapper.prototype.reject = function(predicate) {
  5372. return this.filter(negate(getIteratee(predicate)));
  5373. };
  5374. LazyWrapper.prototype.slice = function(start, end) {
  5375. start = toInteger(start);
  5376. var result2 = this;
  5377. if (result2.__filtered__ && (start > 0 || end < 0)) {
  5378. return new LazyWrapper(result2);
  5379. }
  5380. if (start < 0) {
  5381. result2 = result2.takeRight(-start);
  5382. } else if (start) {
  5383. result2 = result2.drop(start);
  5384. }
  5385. if (end !== undefined) {
  5386. end = toInteger(end);
  5387. result2 = end < 0 ? result2.dropRight(-end) : result2.take(end - start);
  5388. }
  5389. return result2;
  5390. };
  5391. LazyWrapper.prototype.takeRightWhile = function(predicate) {
  5392. return this.reverse().takeWhile(predicate).reverse();
  5393. };
  5394. LazyWrapper.prototype.toArray = function() {
  5395. return this.take(MAX_ARRAY_LENGTH);
  5396. };
  5397. baseForOwn(LazyWrapper.prototype, function(func, methodName) {
  5398. var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName), isTaker = /^(?:head|last)$/.test(methodName), lodashFunc = lodash[isTaker ? "take" + (methodName == "last" ? "Right" : "") : methodName], retUnwrapped = isTaker || /^find/.test(methodName);
  5399. if (!lodashFunc) {
  5400. return;
  5401. }
  5402. lodash.prototype[methodName] = function() {
  5403. var value = this.__wrapped__, args = isTaker ? [1] : arguments, isLazy = value instanceof LazyWrapper, iteratee2 = args[0], useLazy = isLazy || isArray(value);
  5404. var interceptor = function(value2) {
  5405. var result3 = lodashFunc.apply(lodash, arrayPush([value2], args));
  5406. return isTaker && chainAll ? result3[0] : result3;
  5407. };
  5408. if (useLazy && checkIteratee && typeof iteratee2 == "function" && iteratee2.length != 1) {
  5409. isLazy = useLazy = false;
  5410. }
  5411. var chainAll = this.__chain__, isHybrid = !!this.__actions__.length, isUnwrapped = retUnwrapped && !chainAll, onlyLazy = isLazy && !isHybrid;
  5412. if (!retUnwrapped && useLazy) {
  5413. value = onlyLazy ? value : new LazyWrapper(this);
  5414. var result2 = func.apply(value, args);
  5415. result2.__actions__.push({ "func": thru, "args": [interceptor], "thisArg": undefined });
  5416. return new LodashWrapper(result2, chainAll);
  5417. }
  5418. if (isUnwrapped && onlyLazy) {
  5419. return func.apply(this, args);
  5420. }
  5421. result2 = this.thru(interceptor);
  5422. return isUnwrapped ? isTaker ? result2.value()[0] : result2.value() : result2;
  5423. };
  5424. });
  5425. arrayEach(["pop", "push", "shift", "sort", "splice", "unshift"], function(methodName) {
  5426. var func = arrayProto[methodName], chainName = /^(?:push|sort|unshift)$/.test(methodName) ? "tap" : "thru", retUnwrapped = /^(?:pop|shift)$/.test(methodName);
  5427. lodash.prototype[methodName] = function() {
  5428. var args = arguments;
  5429. if (retUnwrapped && !this.__chain__) {
  5430. var value = this.value();
  5431. return func.apply(isArray(value) ? value : [], args);
  5432. }
  5433. return this[chainName](function(value2) {
  5434. return func.apply(isArray(value2) ? value2 : [], args);
  5435. });
  5436. };
  5437. });
  5438. baseForOwn(LazyWrapper.prototype, function(func, methodName) {
  5439. var lodashFunc = lodash[methodName];
  5440. if (lodashFunc) {
  5441. var key = lodashFunc.name + "";
  5442. if (!hasOwnProperty.call(realNames, key)) {
  5443. realNames[key] = [];
  5444. }
  5445. realNames[key].push({ "name": methodName, "func": lodashFunc });
  5446. }
  5447. });
  5448. realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{
  5449. "name": "wrapper",
  5450. "func": undefined
  5451. }];
  5452. LazyWrapper.prototype.clone = lazyClone;
  5453. LazyWrapper.prototype.reverse = lazyReverse;
  5454. LazyWrapper.prototype.value = lazyValue;
  5455. lodash.prototype.at = wrapperAt;
  5456. lodash.prototype.chain = wrapperChain;
  5457. lodash.prototype.commit = wrapperCommit;
  5458. lodash.prototype.next = wrapperNext;
  5459. lodash.prototype.plant = wrapperPlant;
  5460. lodash.prototype.reverse = wrapperReverse;
  5461. lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
  5462. lodash.prototype.first = lodash.prototype.head;
  5463. if (symIterator) {
  5464. lodash.prototype[symIterator] = wrapperToIterator;
  5465. }
  5466. return lodash;
  5467. };
  5468. var _ = runInContext();
  5469. if (typeof define == "function" && typeof define.amd == "object" && define.amd) {
  5470. root._ = _;
  5471. define(function() {
  5472. return _;
  5473. });
  5474. } else if (freeModule) {
  5475. (freeModule.exports = _)._ = _;
  5476. freeExports._ = _;
  5477. } else {
  5478. root._ = _;
  5479. }
  5480. }).call(exports);
  5481. }
  5482. });
  5483. export {
  5484. require_lodash
  5485. };
  5486. /*! Bundled license information:
  5487. lodash/lodash.js:
  5488. (**
  5489. * @license
  5490. * Lodash <https://lodash.com/>
  5491. * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
  5492. * Released under MIT license <https://lodash.com/license>
  5493. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  5494. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  5495. *)
  5496. */
  5497. //# sourceMappingURL=chunk-UFOLZL4F.js.map