list.js 504 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263
  1. var __defProp = Object.defineProperty;
  2. var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
  3. var __publicField = (obj, key, value) => {
  4. __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
  5. return value;
  6. };
  7. (function() {
  8. "use strict";
  9. const version = "1.0.0";
  10. class JsSpiderSDK {
  11. // 初始化,传入规则
  12. constructor(rules = [], config = {}) {
  13. __publicField(this, "rulesList", []);
  14. __publicField(this, "config", {
  15. useAsync: true
  16. });
  17. this.rulesList = rules;
  18. Object.assign(this.config, config);
  19. }
  20. async run(conf) {
  21. const { useAsync } = this.config;
  22. let result = [];
  23. if (useAsync) {
  24. const rulesRunPromiseList = this.rulesList.map((rule) => rule.run());
  25. result = await Promise.all(rulesRunPromiseList);
  26. } else {
  27. for (let i = 0; i < this.rulesList.length; i++) {
  28. const rule = this.rulesList[i];
  29. const runRes = await rule.run(conf);
  30. result.push(runRes);
  31. }
  32. }
  33. return result;
  34. }
  35. check() {
  36. }
  37. }
  38. var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
  39. function getDefaultExportFromCjs(x) {
  40. return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
  41. }
  42. var jquery = { exports: {} };
  43. /*!
  44. * jQuery JavaScript Library v3.7.1
  45. * https://jquery.com/
  46. *
  47. * Copyright OpenJS Foundation and other contributors
  48. * Released under the MIT license
  49. * https://jquery.org/license
  50. *
  51. * Date: 2023-08-28T13:37Z
  52. */
  53. (function(module) {
  54. (function(global2, factory) {
  55. {
  56. module.exports = global2.document ? factory(global2, true) : function(w) {
  57. if (!w.document) {
  58. throw new Error("jQuery requires a window with a document");
  59. }
  60. return factory(w);
  61. };
  62. }
  63. })(typeof window !== "undefined" ? window : commonjsGlobal, function(window2, noGlobal) {
  64. var arr = [];
  65. var getProto = Object.getPrototypeOf;
  66. var slice = arr.slice;
  67. var flat = arr.flat ? function(array) {
  68. return arr.flat.call(array);
  69. } : function(array) {
  70. return arr.concat.apply([], array);
  71. };
  72. var push = arr.push;
  73. var indexOf = arr.indexOf;
  74. var class2type = {};
  75. var toString = class2type.toString;
  76. var hasOwn = class2type.hasOwnProperty;
  77. var fnToString = hasOwn.toString;
  78. var ObjectFunctionString = fnToString.call(Object);
  79. var support = {};
  80. var isFunction = function isFunction2(obj) {
  81. return typeof obj === "function" && typeof obj.nodeType !== "number" && typeof obj.item !== "function";
  82. };
  83. var isWindow = function isWindow2(obj) {
  84. return obj != null && obj === obj.window;
  85. };
  86. var document2 = window2.document;
  87. var preservedScriptAttributes = {
  88. type: true,
  89. src: true,
  90. nonce: true,
  91. noModule: true
  92. };
  93. function DOMEval(code, node, doc) {
  94. doc = doc || document2;
  95. var i, val, script = doc.createElement("script");
  96. script.text = code;
  97. if (node) {
  98. for (i in preservedScriptAttributes) {
  99. val = node[i] || node.getAttribute && node.getAttribute(i);
  100. if (val) {
  101. script.setAttribute(i, val);
  102. }
  103. }
  104. }
  105. doc.head.appendChild(script).parentNode.removeChild(script);
  106. }
  107. function toType(obj) {
  108. if (obj == null) {
  109. return obj + "";
  110. }
  111. return typeof obj === "object" || typeof obj === "function" ? class2type[toString.call(obj)] || "object" : typeof obj;
  112. }
  113. var version2 = "3.7.1", rhtmlSuffix = /HTML$/i, jQuery = function(selector, context) {
  114. return new jQuery.fn.init(selector, context);
  115. };
  116. jQuery.fn = jQuery.prototype = {
  117. // The current version of jQuery being used
  118. jquery: version2,
  119. constructor: jQuery,
  120. // The default length of a jQuery object is 0
  121. length: 0,
  122. toArray: function() {
  123. return slice.call(this);
  124. },
  125. // Get the Nth element in the matched element set OR
  126. // Get the whole matched element set as a clean array
  127. get: function(num) {
  128. if (num == null) {
  129. return slice.call(this);
  130. }
  131. return num < 0 ? this[num + this.length] : this[num];
  132. },
  133. // Take an array of elements and push it onto the stack
  134. // (returning the new matched element set)
  135. pushStack: function(elems) {
  136. var ret = jQuery.merge(this.constructor(), elems);
  137. ret.prevObject = this;
  138. return ret;
  139. },
  140. // Execute a callback for every element in the matched set.
  141. each: function(callback) {
  142. return jQuery.each(this, callback);
  143. },
  144. map: function(callback) {
  145. return this.pushStack(jQuery.map(this, function(elem, i) {
  146. return callback.call(elem, i, elem);
  147. }));
  148. },
  149. slice: function() {
  150. return this.pushStack(slice.apply(this, arguments));
  151. },
  152. first: function() {
  153. return this.eq(0);
  154. },
  155. last: function() {
  156. return this.eq(-1);
  157. },
  158. even: function() {
  159. return this.pushStack(jQuery.grep(this, function(_elem, i) {
  160. return (i + 1) % 2;
  161. }));
  162. },
  163. odd: function() {
  164. return this.pushStack(jQuery.grep(this, function(_elem, i) {
  165. return i % 2;
  166. }));
  167. },
  168. eq: function(i) {
  169. var len = this.length, j = +i + (i < 0 ? len : 0);
  170. return this.pushStack(j >= 0 && j < len ? [this[j]] : []);
  171. },
  172. end: function() {
  173. return this.prevObject || this.constructor();
  174. },
  175. // For internal use only.
  176. // Behaves like an Array's method, not like a jQuery method.
  177. push,
  178. sort: arr.sort,
  179. splice: arr.splice
  180. };
  181. jQuery.extend = jQuery.fn.extend = function() {
  182. var options, name, src, copy, copyIsArray, clone, target = arguments[0] || {}, i = 1, length = arguments.length, deep = false;
  183. if (typeof target === "boolean") {
  184. deep = target;
  185. target = arguments[i] || {};
  186. i++;
  187. }
  188. if (typeof target !== "object" && !isFunction(target)) {
  189. target = {};
  190. }
  191. if (i === length) {
  192. target = this;
  193. i--;
  194. }
  195. for (; i < length; i++) {
  196. if ((options = arguments[i]) != null) {
  197. for (name in options) {
  198. copy = options[name];
  199. if (name === "__proto__" || target === copy) {
  200. continue;
  201. }
  202. if (deep && copy && (jQuery.isPlainObject(copy) || (copyIsArray = Array.isArray(copy)))) {
  203. src = target[name];
  204. if (copyIsArray && !Array.isArray(src)) {
  205. clone = [];
  206. } else if (!copyIsArray && !jQuery.isPlainObject(src)) {
  207. clone = {};
  208. } else {
  209. clone = src;
  210. }
  211. copyIsArray = false;
  212. target[name] = jQuery.extend(deep, clone, copy);
  213. } else if (copy !== void 0) {
  214. target[name] = copy;
  215. }
  216. }
  217. }
  218. }
  219. return target;
  220. };
  221. jQuery.extend({
  222. // Unique for each copy of jQuery on the page
  223. expando: "jQuery" + (version2 + Math.random()).replace(/\D/g, ""),
  224. // Assume jQuery is ready without the ready module
  225. isReady: true,
  226. error: function(msg) {
  227. throw new Error(msg);
  228. },
  229. noop: function() {
  230. },
  231. isPlainObject: function(obj) {
  232. var proto, Ctor;
  233. if (!obj || toString.call(obj) !== "[object Object]") {
  234. return false;
  235. }
  236. proto = getProto(obj);
  237. if (!proto) {
  238. return true;
  239. }
  240. Ctor = hasOwn.call(proto, "constructor") && proto.constructor;
  241. return typeof Ctor === "function" && fnToString.call(Ctor) === ObjectFunctionString;
  242. },
  243. isEmptyObject: function(obj) {
  244. var name;
  245. for (name in obj) {
  246. return false;
  247. }
  248. return true;
  249. },
  250. // Evaluates a script in a provided context; falls back to the global one
  251. // if not specified.
  252. globalEval: function(code, options, doc) {
  253. DOMEval(code, { nonce: options && options.nonce }, doc);
  254. },
  255. each: function(obj, callback) {
  256. var length, i = 0;
  257. if (isArrayLike(obj)) {
  258. length = obj.length;
  259. for (; i < length; i++) {
  260. if (callback.call(obj[i], i, obj[i]) === false) {
  261. break;
  262. }
  263. }
  264. } else {
  265. for (i in obj) {
  266. if (callback.call(obj[i], i, obj[i]) === false) {
  267. break;
  268. }
  269. }
  270. }
  271. return obj;
  272. },
  273. // Retrieve the text value of an array of DOM nodes
  274. text: function(elem) {
  275. var node, ret = "", i = 0, nodeType = elem.nodeType;
  276. if (!nodeType) {
  277. while (node = elem[i++]) {
  278. ret += jQuery.text(node);
  279. }
  280. }
  281. if (nodeType === 1 || nodeType === 11) {
  282. return elem.textContent;
  283. }
  284. if (nodeType === 9) {
  285. return elem.documentElement.textContent;
  286. }
  287. if (nodeType === 3 || nodeType === 4) {
  288. return elem.nodeValue;
  289. }
  290. return ret;
  291. },
  292. // results is for internal usage only
  293. makeArray: function(arr2, results) {
  294. var ret = results || [];
  295. if (arr2 != null) {
  296. if (isArrayLike(Object(arr2))) {
  297. jQuery.merge(
  298. ret,
  299. typeof arr2 === "string" ? [arr2] : arr2
  300. );
  301. } else {
  302. push.call(ret, arr2);
  303. }
  304. }
  305. return ret;
  306. },
  307. inArray: function(elem, arr2, i) {
  308. return arr2 == null ? -1 : indexOf.call(arr2, elem, i);
  309. },
  310. isXMLDoc: function(elem) {
  311. var namespace = elem && elem.namespaceURI, docElem = elem && (elem.ownerDocument || elem).documentElement;
  312. return !rhtmlSuffix.test(namespace || docElem && docElem.nodeName || "HTML");
  313. },
  314. // Support: Android <=4.0 only, PhantomJS 1 only
  315. // push.apply(_, arraylike) throws on ancient WebKit
  316. merge: function(first, second) {
  317. var len = +second.length, j = 0, i = first.length;
  318. for (; j < len; j++) {
  319. first[i++] = second[j];
  320. }
  321. first.length = i;
  322. return first;
  323. },
  324. grep: function(elems, callback, invert) {
  325. var callbackInverse, matches = [], i = 0, length = elems.length, callbackExpect = !invert;
  326. for (; i < length; i++) {
  327. callbackInverse = !callback(elems[i], i);
  328. if (callbackInverse !== callbackExpect) {
  329. matches.push(elems[i]);
  330. }
  331. }
  332. return matches;
  333. },
  334. // arg is for internal usage only
  335. map: function(elems, callback, arg) {
  336. var length, value, i = 0, ret = [];
  337. if (isArrayLike(elems)) {
  338. length = elems.length;
  339. for (; i < length; i++) {
  340. value = callback(elems[i], i, arg);
  341. if (value != null) {
  342. ret.push(value);
  343. }
  344. }
  345. } else {
  346. for (i in elems) {
  347. value = callback(elems[i], i, arg);
  348. if (value != null) {
  349. ret.push(value);
  350. }
  351. }
  352. }
  353. return flat(ret);
  354. },
  355. // A global GUID counter for objects
  356. guid: 1,
  357. // jQuery.support is not used in Core but other projects attach their
  358. // properties to it so it needs to exist.
  359. support
  360. });
  361. if (typeof Symbol === "function") {
  362. jQuery.fn[Symbol.iterator] = arr[Symbol.iterator];
  363. }
  364. jQuery.each(
  365. "Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),
  366. function(_i, name) {
  367. class2type["[object " + name + "]"] = name.toLowerCase();
  368. }
  369. );
  370. function isArrayLike(obj) {
  371. var length = !!obj && "length" in obj && obj.length, type = toType(obj);
  372. if (isFunction(obj) || isWindow(obj)) {
  373. return false;
  374. }
  375. return type === "array" || length === 0 || typeof length === "number" && length > 0 && length - 1 in obj;
  376. }
  377. function nodeName(elem, name) {
  378. return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
  379. }
  380. var pop = arr.pop;
  381. var sort = arr.sort;
  382. var splice = arr.splice;
  383. var whitespace = "[\\x20\\t\\r\\n\\f]";
  384. var rtrimCSS = new RegExp(
  385. "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$",
  386. "g"
  387. );
  388. jQuery.contains = function(a, b) {
  389. var bup = b && b.parentNode;
  390. return a === bup || !!(bup && bup.nodeType === 1 && // Support: IE 9 - 11+
  391. // IE doesn't have `contains` on SVG.
  392. (a.contains ? a.contains(bup) : a.compareDocumentPosition && a.compareDocumentPosition(bup) & 16));
  393. };
  394. var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;
  395. function fcssescape(ch, asCodePoint) {
  396. if (asCodePoint) {
  397. if (ch === "\0") {
  398. return "�";
  399. }
  400. return ch.slice(0, -1) + "\\" + ch.charCodeAt(ch.length - 1).toString(16) + " ";
  401. }
  402. return "\\" + ch;
  403. }
  404. jQuery.escapeSelector = function(sel) {
  405. return (sel + "").replace(rcssescape, fcssescape);
  406. };
  407. var preferredDoc = document2, pushNative = push;
  408. (function() {
  409. var i, Expr, outermostContext, sortInput, hasDuplicate, push2 = pushNative, document3, documentElement2, documentIsHTML, rbuggyQSA, matches, expando = jQuery.expando, dirruns = 0, done = 0, classCache = createCache(), tokenCache = createCache(), compilerCache = createCache(), nonnativeSelectorCache = createCache(), sortOrder = function(a, b) {
  410. if (a === b) {
  411. hasDuplicate = true;
  412. }
  413. return 0;
  414. }, booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + // Operator (capture 2)
  415. "*([*^$|!~]?=)" + whitespace + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
  416. `*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(` + identifier + "))|)" + whitespace + "*\\]", pseudos = ":(" + identifier + `)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|` + attributes + ")*)|.*)\\)|)", rwhitespace = new RegExp(whitespace + "+", "g"), rcomma = new RegExp("^" + whitespace + "*," + whitespace + "*"), rleadingCombinator = new RegExp("^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*"), rdescend = new RegExp(whitespace + "|>"), rpseudo = new RegExp(pseudos), ridentifier = new RegExp("^" + identifier + "$"), matchExpr = {
  417. ID: new RegExp("^#(" + identifier + ")"),
  418. CLASS: new RegExp("^\\.(" + identifier + ")"),
  419. TAG: new RegExp("^(" + identifier + "|[*])"),
  420. ATTR: new RegExp("^" + attributes),
  421. PSEUDO: new RegExp("^" + pseudos),
  422. CHILD: new RegExp(
  423. "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)",
  424. "i"
  425. ),
  426. bool: new RegExp("^(?:" + booleans + ")$", "i"),
  427. // For use in libraries implementing .is()
  428. // We use this for POS matching in `select`
  429. needsContext: new RegExp("^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i")
  430. }, rinputs = /^(?:input|select|textarea|button)$/i, rheader = /^h\d$/i, rquickExpr2 = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, rsibling = /[+~]/, runescape = new RegExp("\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g"), funescape = function(escape, nonHex) {
  431. var high = "0x" + escape.slice(1) - 65536;
  432. if (nonHex) {
  433. return nonHex;
  434. }
  435. return high < 0 ? String.fromCharCode(high + 65536) : String.fromCharCode(high >> 10 | 55296, high & 1023 | 56320);
  436. }, unloadHandler = function() {
  437. setDocument();
  438. }, inDisabledFieldset = addCombinator(
  439. function(elem) {
  440. return elem.disabled === true && nodeName(elem, "fieldset");
  441. },
  442. { dir: "parentNode", next: "legend" }
  443. );
  444. function safeActiveElement() {
  445. try {
  446. return document3.activeElement;
  447. } catch (err) {
  448. }
  449. }
  450. try {
  451. push2.apply(
  452. arr = slice.call(preferredDoc.childNodes),
  453. preferredDoc.childNodes
  454. );
  455. arr[preferredDoc.childNodes.length].nodeType;
  456. } catch (e) {
  457. push2 = {
  458. apply: function(target, els) {
  459. pushNative.apply(target, slice.call(els));
  460. },
  461. call: function(target) {
  462. pushNative.apply(target, slice.call(arguments, 1));
  463. }
  464. };
  465. }
  466. function find(selector, context, results, seed) {
  467. var m, i2, elem, nid, match, groups, newSelector, newContext = context && context.ownerDocument, nodeType = context ? context.nodeType : 9;
  468. results = results || [];
  469. if (typeof selector !== "string" || !selector || nodeType !== 1 && nodeType !== 9 && nodeType !== 11) {
  470. return results;
  471. }
  472. if (!seed) {
  473. setDocument(context);
  474. context = context || document3;
  475. if (documentIsHTML) {
  476. if (nodeType !== 11 && (match = rquickExpr2.exec(selector))) {
  477. if (m = match[1]) {
  478. if (nodeType === 9) {
  479. if (elem = context.getElementById(m)) {
  480. if (elem.id === m) {
  481. push2.call(results, elem);
  482. return results;
  483. }
  484. } else {
  485. return results;
  486. }
  487. } else {
  488. if (newContext && (elem = newContext.getElementById(m)) && find.contains(context, elem) && elem.id === m) {
  489. push2.call(results, elem);
  490. return results;
  491. }
  492. }
  493. } else if (match[2]) {
  494. push2.apply(results, context.getElementsByTagName(selector));
  495. return results;
  496. } else if ((m = match[3]) && context.getElementsByClassName) {
  497. push2.apply(results, context.getElementsByClassName(m));
  498. return results;
  499. }
  500. }
  501. if (!nonnativeSelectorCache[selector + " "] && (!rbuggyQSA || !rbuggyQSA.test(selector))) {
  502. newSelector = selector;
  503. newContext = context;
  504. if (nodeType === 1 && (rdescend.test(selector) || rleadingCombinator.test(selector))) {
  505. newContext = rsibling.test(selector) && testContext(context.parentNode) || context;
  506. if (newContext != context || !support.scope) {
  507. if (nid = context.getAttribute("id")) {
  508. nid = jQuery.escapeSelector(nid);
  509. } else {
  510. context.setAttribute("id", nid = expando);
  511. }
  512. }
  513. groups = tokenize(selector);
  514. i2 = groups.length;
  515. while (i2--) {
  516. groups[i2] = (nid ? "#" + nid : ":scope") + " " + toSelector(groups[i2]);
  517. }
  518. newSelector = groups.join(",");
  519. }
  520. try {
  521. push2.apply(
  522. results,
  523. newContext.querySelectorAll(newSelector)
  524. );
  525. return results;
  526. } catch (qsaError) {
  527. nonnativeSelectorCache(selector, true);
  528. } finally {
  529. if (nid === expando) {
  530. context.removeAttribute("id");
  531. }
  532. }
  533. }
  534. }
  535. }
  536. return select(selector.replace(rtrimCSS, "$1"), context, results, seed);
  537. }
  538. function createCache() {
  539. var keys = [];
  540. function cache(key, value) {
  541. if (keys.push(key + " ") > Expr.cacheLength) {
  542. delete cache[keys.shift()];
  543. }
  544. return cache[key + " "] = value;
  545. }
  546. return cache;
  547. }
  548. function markFunction(fn) {
  549. fn[expando] = true;
  550. return fn;
  551. }
  552. function assert(fn) {
  553. var el = document3.createElement("fieldset");
  554. try {
  555. return !!fn(el);
  556. } catch (e) {
  557. return false;
  558. } finally {
  559. if (el.parentNode) {
  560. el.parentNode.removeChild(el);
  561. }
  562. el = null;
  563. }
  564. }
  565. function createInputPseudo(type) {
  566. return function(elem) {
  567. return nodeName(elem, "input") && elem.type === type;
  568. };
  569. }
  570. function createButtonPseudo(type) {
  571. return function(elem) {
  572. return (nodeName(elem, "input") || nodeName(elem, "button")) && elem.type === type;
  573. };
  574. }
  575. function createDisabledPseudo(disabled) {
  576. return function(elem) {
  577. if ("form" in elem) {
  578. if (elem.parentNode && elem.disabled === false) {
  579. if ("label" in elem) {
  580. if ("label" in elem.parentNode) {
  581. return elem.parentNode.disabled === disabled;
  582. } else {
  583. return elem.disabled === disabled;
  584. }
  585. }
  586. return elem.isDisabled === disabled || // Where there is no isDisabled, check manually
  587. elem.isDisabled !== !disabled && inDisabledFieldset(elem) === disabled;
  588. }
  589. return elem.disabled === disabled;
  590. } else if ("label" in elem) {
  591. return elem.disabled === disabled;
  592. }
  593. return false;
  594. };
  595. }
  596. function createPositionalPseudo(fn) {
  597. return markFunction(function(argument) {
  598. argument = +argument;
  599. return markFunction(function(seed, matches2) {
  600. var j, matchIndexes = fn([], seed.length, argument), i2 = matchIndexes.length;
  601. while (i2--) {
  602. if (seed[j = matchIndexes[i2]]) {
  603. seed[j] = !(matches2[j] = seed[j]);
  604. }
  605. }
  606. });
  607. });
  608. }
  609. function testContext(context) {
  610. return context && typeof context.getElementsByTagName !== "undefined" && context;
  611. }
  612. function setDocument(node) {
  613. var subWindow, doc = node ? node.ownerDocument || node : preferredDoc;
  614. if (doc == document3 || doc.nodeType !== 9 || !doc.documentElement) {
  615. return document3;
  616. }
  617. document3 = doc;
  618. documentElement2 = document3.documentElement;
  619. documentIsHTML = !jQuery.isXMLDoc(document3);
  620. matches = documentElement2.matches || documentElement2.webkitMatchesSelector || documentElement2.msMatchesSelector;
  621. if (documentElement2.msMatchesSelector && // Support: IE 11+, Edge 17 - 18+
  622. // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
  623. // two documents; shallow comparisons work.
  624. // eslint-disable-next-line eqeqeq
  625. preferredDoc != document3 && (subWindow = document3.defaultView) && subWindow.top !== subWindow) {
  626. subWindow.addEventListener("unload", unloadHandler);
  627. }
  628. support.getById = assert(function(el) {
  629. documentElement2.appendChild(el).id = jQuery.expando;
  630. return !document3.getElementsByName || !document3.getElementsByName(jQuery.expando).length;
  631. });
  632. support.disconnectedMatch = assert(function(el) {
  633. return matches.call(el, "*");
  634. });
  635. support.scope = assert(function() {
  636. return document3.querySelectorAll(":scope");
  637. });
  638. support.cssHas = assert(function() {
  639. try {
  640. document3.querySelector(":has(*,:jqfake)");
  641. return false;
  642. } catch (e) {
  643. return true;
  644. }
  645. });
  646. if (support.getById) {
  647. Expr.filter.ID = function(id) {
  648. var attrId = id.replace(runescape, funescape);
  649. return function(elem) {
  650. return elem.getAttribute("id") === attrId;
  651. };
  652. };
  653. Expr.find.ID = function(id, context) {
  654. if (typeof context.getElementById !== "undefined" && documentIsHTML) {
  655. var elem = context.getElementById(id);
  656. return elem ? [elem] : [];
  657. }
  658. };
  659. } else {
  660. Expr.filter.ID = function(id) {
  661. var attrId = id.replace(runescape, funescape);
  662. return function(elem) {
  663. var node2 = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
  664. return node2 && node2.value === attrId;
  665. };
  666. };
  667. Expr.find.ID = function(id, context) {
  668. if (typeof context.getElementById !== "undefined" && documentIsHTML) {
  669. var node2, i2, elems, elem = context.getElementById(id);
  670. if (elem) {
  671. node2 = elem.getAttributeNode("id");
  672. if (node2 && node2.value === id) {
  673. return [elem];
  674. }
  675. elems = context.getElementsByName(id);
  676. i2 = 0;
  677. while (elem = elems[i2++]) {
  678. node2 = elem.getAttributeNode("id");
  679. if (node2 && node2.value === id) {
  680. return [elem];
  681. }
  682. }
  683. }
  684. return [];
  685. }
  686. };
  687. }
  688. Expr.find.TAG = function(tag, context) {
  689. if (typeof context.getElementsByTagName !== "undefined") {
  690. return context.getElementsByTagName(tag);
  691. } else {
  692. return context.querySelectorAll(tag);
  693. }
  694. };
  695. Expr.find.CLASS = function(className, context) {
  696. if (typeof context.getElementsByClassName !== "undefined" && documentIsHTML) {
  697. return context.getElementsByClassName(className);
  698. }
  699. };
  700. rbuggyQSA = [];
  701. assert(function(el) {
  702. var input;
  703. documentElement2.appendChild(el).innerHTML = "<a id='" + expando + "' href='' disabled='disabled'></a><select id='" + expando + "-\r\\' disabled='disabled'><option selected=''></option></select>";
  704. if (!el.querySelectorAll("[selected]").length) {
  705. rbuggyQSA.push("\\[" + whitespace + "*(?:value|" + booleans + ")");
  706. }
  707. if (!el.querySelectorAll("[id~=" + expando + "-]").length) {
  708. rbuggyQSA.push("~=");
  709. }
  710. if (!el.querySelectorAll("a#" + expando + "+*").length) {
  711. rbuggyQSA.push(".#.+[+~]");
  712. }
  713. if (!el.querySelectorAll(":checked").length) {
  714. rbuggyQSA.push(":checked");
  715. }
  716. input = document3.createElement("input");
  717. input.setAttribute("type", "hidden");
  718. el.appendChild(input).setAttribute("name", "D");
  719. documentElement2.appendChild(el).disabled = true;
  720. if (el.querySelectorAll(":disabled").length !== 2) {
  721. rbuggyQSA.push(":enabled", ":disabled");
  722. }
  723. input = document3.createElement("input");
  724. input.setAttribute("name", "");
  725. el.appendChild(input);
  726. if (!el.querySelectorAll("[name='']").length) {
  727. rbuggyQSA.push("\\[" + whitespace + "*name" + whitespace + "*=" + whitespace + `*(?:''|"")`);
  728. }
  729. });
  730. if (!support.cssHas) {
  731. rbuggyQSA.push(":has");
  732. }
  733. rbuggyQSA = rbuggyQSA.length && new RegExp(rbuggyQSA.join("|"));
  734. sortOrder = function(a, b) {
  735. if (a === b) {
  736. hasDuplicate = true;
  737. return 0;
  738. }
  739. var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
  740. if (compare) {
  741. return compare;
  742. }
  743. compare = (a.ownerDocument || a) == (b.ownerDocument || b) ? a.compareDocumentPosition(b) : (
  744. // Otherwise we know they are disconnected
  745. 1
  746. );
  747. if (compare & 1 || !support.sortDetached && b.compareDocumentPosition(a) === compare) {
  748. if (a === document3 || a.ownerDocument == preferredDoc && find.contains(preferredDoc, a)) {
  749. return -1;
  750. }
  751. if (b === document3 || b.ownerDocument == preferredDoc && find.contains(preferredDoc, b)) {
  752. return 1;
  753. }
  754. return sortInput ? indexOf.call(sortInput, a) - indexOf.call(sortInput, b) : 0;
  755. }
  756. return compare & 4 ? -1 : 1;
  757. };
  758. return document3;
  759. }
  760. find.matches = function(expr, elements) {
  761. return find(expr, null, null, elements);
  762. };
  763. find.matchesSelector = function(elem, expr) {
  764. setDocument(elem);
  765. if (documentIsHTML && !nonnativeSelectorCache[expr + " "] && (!rbuggyQSA || !rbuggyQSA.test(expr))) {
  766. try {
  767. var ret = matches.call(elem, expr);
  768. if (ret || support.disconnectedMatch || // As well, disconnected nodes are said to be in a document
  769. // fragment in IE 9
  770. elem.document && elem.document.nodeType !== 11) {
  771. return ret;
  772. }
  773. } catch (e) {
  774. nonnativeSelectorCache(expr, true);
  775. }
  776. }
  777. return find(expr, document3, null, [elem]).length > 0;
  778. };
  779. find.contains = function(context, elem) {
  780. if ((context.ownerDocument || context) != document3) {
  781. setDocument(context);
  782. }
  783. return jQuery.contains(context, elem);
  784. };
  785. find.attr = function(elem, name) {
  786. if ((elem.ownerDocument || elem) != document3) {
  787. setDocument(elem);
  788. }
  789. var fn = Expr.attrHandle[name.toLowerCase()], val = fn && hasOwn.call(Expr.attrHandle, name.toLowerCase()) ? fn(elem, name, !documentIsHTML) : void 0;
  790. if (val !== void 0) {
  791. return val;
  792. }
  793. return elem.getAttribute(name);
  794. };
  795. find.error = function(msg) {
  796. throw new Error("Syntax error, unrecognized expression: " + msg);
  797. };
  798. jQuery.uniqueSort = function(results) {
  799. var elem, duplicates = [], j = 0, i2 = 0;
  800. hasDuplicate = !support.sortStable;
  801. sortInput = !support.sortStable && slice.call(results, 0);
  802. sort.call(results, sortOrder);
  803. if (hasDuplicate) {
  804. while (elem = results[i2++]) {
  805. if (elem === results[i2]) {
  806. j = duplicates.push(i2);
  807. }
  808. }
  809. while (j--) {
  810. splice.call(results, duplicates[j], 1);
  811. }
  812. }
  813. sortInput = null;
  814. return results;
  815. };
  816. jQuery.fn.uniqueSort = function() {
  817. return this.pushStack(jQuery.uniqueSort(slice.apply(this)));
  818. };
  819. Expr = jQuery.expr = {
  820. // Can be adjusted by the user
  821. cacheLength: 50,
  822. createPseudo: markFunction,
  823. match: matchExpr,
  824. attrHandle: {},
  825. find: {},
  826. relative: {
  827. ">": { dir: "parentNode", first: true },
  828. " ": { dir: "parentNode" },
  829. "+": { dir: "previousSibling", first: true },
  830. "~": { dir: "previousSibling" }
  831. },
  832. preFilter: {
  833. ATTR: function(match) {
  834. match[1] = match[1].replace(runescape, funescape);
  835. match[3] = (match[3] || match[4] || match[5] || "").replace(runescape, funescape);
  836. if (match[2] === "~=") {
  837. match[3] = " " + match[3] + " ";
  838. }
  839. return match.slice(0, 4);
  840. },
  841. CHILD: function(match) {
  842. match[1] = match[1].toLowerCase();
  843. if (match[1].slice(0, 3) === "nth") {
  844. if (!match[3]) {
  845. find.error(match[0]);
  846. }
  847. match[4] = +(match[4] ? match[5] + (match[6] || 1) : 2 * (match[3] === "even" || match[3] === "odd"));
  848. match[5] = +(match[7] + match[8] || match[3] === "odd");
  849. } else if (match[3]) {
  850. find.error(match[0]);
  851. }
  852. return match;
  853. },
  854. PSEUDO: function(match) {
  855. var excess, unquoted = !match[6] && match[2];
  856. if (matchExpr.CHILD.test(match[0])) {
  857. return null;
  858. }
  859. if (match[3]) {
  860. match[2] = match[4] || match[5] || "";
  861. } else if (unquoted && rpseudo.test(unquoted) && // Get excess from tokenize (recursively)
  862. (excess = tokenize(unquoted, true)) && // advance to the next closing parenthesis
  863. (excess = unquoted.indexOf(")", unquoted.length - excess) - unquoted.length)) {
  864. match[0] = match[0].slice(0, excess);
  865. match[2] = unquoted.slice(0, excess);
  866. }
  867. return match.slice(0, 3);
  868. }
  869. },
  870. filter: {
  871. TAG: function(nodeNameSelector) {
  872. var expectedNodeName = nodeNameSelector.replace(runescape, funescape).toLowerCase();
  873. return nodeNameSelector === "*" ? function() {
  874. return true;
  875. } : function(elem) {
  876. return nodeName(elem, expectedNodeName);
  877. };
  878. },
  879. CLASS: function(className) {
  880. var pattern = classCache[className + " "];
  881. return pattern || (pattern = new RegExp("(^|" + whitespace + ")" + className + "(" + whitespace + "|$)")) && classCache(className, function(elem) {
  882. return pattern.test(
  883. typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || ""
  884. );
  885. });
  886. },
  887. ATTR: function(name, operator, check) {
  888. return function(elem) {
  889. var result = find.attr(elem, name);
  890. if (result == null) {
  891. return operator === "!=";
  892. }
  893. if (!operator) {
  894. return true;
  895. }
  896. result += "";
  897. if (operator === "=") {
  898. return result === check;
  899. }
  900. if (operator === "!=") {
  901. return result !== check;
  902. }
  903. if (operator === "^=") {
  904. return check && result.indexOf(check) === 0;
  905. }
  906. if (operator === "*=") {
  907. return check && result.indexOf(check) > -1;
  908. }
  909. if (operator === "$=") {
  910. return check && result.slice(-check.length) === check;
  911. }
  912. if (operator === "~=") {
  913. return (" " + result.replace(rwhitespace, " ") + " ").indexOf(check) > -1;
  914. }
  915. if (operator === "|=") {
  916. return result === check || result.slice(0, check.length + 1) === check + "-";
  917. }
  918. return false;
  919. };
  920. },
  921. CHILD: function(type, what, _argument, first, last) {
  922. var simple = type.slice(0, 3) !== "nth", forward = type.slice(-4) !== "last", ofType = what === "of-type";
  923. return first === 1 && last === 0 ? (
  924. // Shortcut for :nth-*(n)
  925. function(elem) {
  926. return !!elem.parentNode;
  927. }
  928. ) : function(elem, _context, xml) {
  929. var cache, outerCache, node, nodeIndex, start, dir2 = simple !== forward ? "nextSibling" : "previousSibling", parent = elem.parentNode, name = ofType && elem.nodeName.toLowerCase(), useCache = !xml && !ofType, diff = false;
  930. if (parent) {
  931. if (simple) {
  932. while (dir2) {
  933. node = elem;
  934. while (node = node[dir2]) {
  935. if (ofType ? nodeName(node, name) : node.nodeType === 1) {
  936. return false;
  937. }
  938. }
  939. start = dir2 = type === "only" && !start && "nextSibling";
  940. }
  941. return true;
  942. }
  943. start = [forward ? parent.firstChild : parent.lastChild];
  944. if (forward && useCache) {
  945. outerCache = parent[expando] || (parent[expando] = {});
  946. cache = outerCache[type] || [];
  947. nodeIndex = cache[0] === dirruns && cache[1];
  948. diff = nodeIndex && cache[2];
  949. node = nodeIndex && parent.childNodes[nodeIndex];
  950. while (node = ++nodeIndex && node && node[dir2] || // Fallback to seeking `elem` from the start
  951. (diff = nodeIndex = 0) || start.pop()) {
  952. if (node.nodeType === 1 && ++diff && node === elem) {
  953. outerCache[type] = [dirruns, nodeIndex, diff];
  954. break;
  955. }
  956. }
  957. } else {
  958. if (useCache) {
  959. outerCache = elem[expando] || (elem[expando] = {});
  960. cache = outerCache[type] || [];
  961. nodeIndex = cache[0] === dirruns && cache[1];
  962. diff = nodeIndex;
  963. }
  964. if (diff === false) {
  965. while (node = ++nodeIndex && node && node[dir2] || (diff = nodeIndex = 0) || start.pop()) {
  966. if ((ofType ? nodeName(node, name) : node.nodeType === 1) && ++diff) {
  967. if (useCache) {
  968. outerCache = node[expando] || (node[expando] = {});
  969. outerCache[type] = [dirruns, diff];
  970. }
  971. if (node === elem) {
  972. break;
  973. }
  974. }
  975. }
  976. }
  977. }
  978. diff -= last;
  979. return diff === first || diff % first === 0 && diff / first >= 0;
  980. }
  981. };
  982. },
  983. PSEUDO: function(pseudo, argument) {
  984. var args, fn = Expr.pseudos[pseudo] || Expr.setFilters[pseudo.toLowerCase()] || find.error("unsupported pseudo: " + pseudo);
  985. if (fn[expando]) {
  986. return fn(argument);
  987. }
  988. if (fn.length > 1) {
  989. args = [pseudo, pseudo, "", argument];
  990. return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase()) ? markFunction(function(seed, matches2) {
  991. var idx, matched = fn(seed, argument), i2 = matched.length;
  992. while (i2--) {
  993. idx = indexOf.call(seed, matched[i2]);
  994. seed[idx] = !(matches2[idx] = matched[i2]);
  995. }
  996. }) : function(elem) {
  997. return fn(elem, 0, args);
  998. };
  999. }
  1000. return fn;
  1001. }
  1002. },
  1003. pseudos: {
  1004. // Potentially complex pseudos
  1005. not: markFunction(function(selector) {
  1006. var input = [], results = [], matcher = compile(selector.replace(rtrimCSS, "$1"));
  1007. return matcher[expando] ? markFunction(function(seed, matches2, _context, xml) {
  1008. var elem, unmatched = matcher(seed, null, xml, []), i2 = seed.length;
  1009. while (i2--) {
  1010. if (elem = unmatched[i2]) {
  1011. seed[i2] = !(matches2[i2] = elem);
  1012. }
  1013. }
  1014. }) : function(elem, _context, xml) {
  1015. input[0] = elem;
  1016. matcher(input, null, xml, results);
  1017. input[0] = null;
  1018. return !results.pop();
  1019. };
  1020. }),
  1021. has: markFunction(function(selector) {
  1022. return function(elem) {
  1023. return find(selector, elem).length > 0;
  1024. };
  1025. }),
  1026. contains: markFunction(function(text) {
  1027. text = text.replace(runescape, funescape);
  1028. return function(elem) {
  1029. return (elem.textContent || jQuery.text(elem)).indexOf(text) > -1;
  1030. };
  1031. }),
  1032. // "Whether an element is represented by a :lang() selector
  1033. // is based solely on the element's language value
  1034. // being equal to the identifier C,
  1035. // or beginning with the identifier C immediately followed by "-".
  1036. // The matching of C against the element's language value is performed case-insensitively.
  1037. // The identifier C does not have to be a valid language name."
  1038. // https://www.w3.org/TR/selectors/#lang-pseudo
  1039. lang: markFunction(function(lang) {
  1040. if (!ridentifier.test(lang || "")) {
  1041. find.error("unsupported lang: " + lang);
  1042. }
  1043. lang = lang.replace(runescape, funescape).toLowerCase();
  1044. return function(elem) {
  1045. var elemLang;
  1046. do {
  1047. if (elemLang = documentIsHTML ? elem.lang : elem.getAttribute("xml:lang") || elem.getAttribute("lang")) {
  1048. elemLang = elemLang.toLowerCase();
  1049. return elemLang === lang || elemLang.indexOf(lang + "-") === 0;
  1050. }
  1051. } while ((elem = elem.parentNode) && elem.nodeType === 1);
  1052. return false;
  1053. };
  1054. }),
  1055. // Miscellaneous
  1056. target: function(elem) {
  1057. var hash = window2.location && window2.location.hash;
  1058. return hash && hash.slice(1) === elem.id;
  1059. },
  1060. root: function(elem) {
  1061. return elem === documentElement2;
  1062. },
  1063. focus: function(elem) {
  1064. return elem === safeActiveElement() && document3.hasFocus() && !!(elem.type || elem.href || ~elem.tabIndex);
  1065. },
  1066. // Boolean properties
  1067. enabled: createDisabledPseudo(false),
  1068. disabled: createDisabledPseudo(true),
  1069. checked: function(elem) {
  1070. return nodeName(elem, "input") && !!elem.checked || nodeName(elem, "option") && !!elem.selected;
  1071. },
  1072. selected: function(elem) {
  1073. if (elem.parentNode) {
  1074. elem.parentNode.selectedIndex;
  1075. }
  1076. return elem.selected === true;
  1077. },
  1078. // Contents
  1079. empty: function(elem) {
  1080. for (elem = elem.firstChild; elem; elem = elem.nextSibling) {
  1081. if (elem.nodeType < 6) {
  1082. return false;
  1083. }
  1084. }
  1085. return true;
  1086. },
  1087. parent: function(elem) {
  1088. return !Expr.pseudos.empty(elem);
  1089. },
  1090. // Element/input types
  1091. header: function(elem) {
  1092. return rheader.test(elem.nodeName);
  1093. },
  1094. input: function(elem) {
  1095. return rinputs.test(elem.nodeName);
  1096. },
  1097. button: function(elem) {
  1098. return nodeName(elem, "input") && elem.type === "button" || nodeName(elem, "button");
  1099. },
  1100. text: function(elem) {
  1101. var attr;
  1102. return nodeName(elem, "input") && elem.type === "text" && // Support: IE <10 only
  1103. // New HTML5 attribute values (e.g., "search") appear
  1104. // with elem.type === "text"
  1105. ((attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text");
  1106. },
  1107. // Position-in-collection
  1108. first: createPositionalPseudo(function() {
  1109. return [0];
  1110. }),
  1111. last: createPositionalPseudo(function(_matchIndexes, length) {
  1112. return [length - 1];
  1113. }),
  1114. eq: createPositionalPseudo(function(_matchIndexes, length, argument) {
  1115. return [argument < 0 ? argument + length : argument];
  1116. }),
  1117. even: createPositionalPseudo(function(matchIndexes, length) {
  1118. var i2 = 0;
  1119. for (; i2 < length; i2 += 2) {
  1120. matchIndexes.push(i2);
  1121. }
  1122. return matchIndexes;
  1123. }),
  1124. odd: createPositionalPseudo(function(matchIndexes, length) {
  1125. var i2 = 1;
  1126. for (; i2 < length; i2 += 2) {
  1127. matchIndexes.push(i2);
  1128. }
  1129. return matchIndexes;
  1130. }),
  1131. lt: createPositionalPseudo(function(matchIndexes, length, argument) {
  1132. var i2;
  1133. if (argument < 0) {
  1134. i2 = argument + length;
  1135. } else if (argument > length) {
  1136. i2 = length;
  1137. } else {
  1138. i2 = argument;
  1139. }
  1140. for (; --i2 >= 0; ) {
  1141. matchIndexes.push(i2);
  1142. }
  1143. return matchIndexes;
  1144. }),
  1145. gt: createPositionalPseudo(function(matchIndexes, length, argument) {
  1146. var i2 = argument < 0 ? argument + length : argument;
  1147. for (; ++i2 < length; ) {
  1148. matchIndexes.push(i2);
  1149. }
  1150. return matchIndexes;
  1151. })
  1152. }
  1153. };
  1154. Expr.pseudos.nth = Expr.pseudos.eq;
  1155. for (i in { radio: true, checkbox: true, file: true, password: true, image: true }) {
  1156. Expr.pseudos[i] = createInputPseudo(i);
  1157. }
  1158. for (i in { submit: true, reset: true }) {
  1159. Expr.pseudos[i] = createButtonPseudo(i);
  1160. }
  1161. function setFilters() {
  1162. }
  1163. setFilters.prototype = Expr.filters = Expr.pseudos;
  1164. Expr.setFilters = new setFilters();
  1165. function tokenize(selector, parseOnly) {
  1166. var matched, match, tokens, type, soFar, groups, preFilters, cached = tokenCache[selector + " "];
  1167. if (cached) {
  1168. return parseOnly ? 0 : cached.slice(0);
  1169. }
  1170. soFar = selector;
  1171. groups = [];
  1172. preFilters = Expr.preFilter;
  1173. while (soFar) {
  1174. if (!matched || (match = rcomma.exec(soFar))) {
  1175. if (match) {
  1176. soFar = soFar.slice(match[0].length) || soFar;
  1177. }
  1178. groups.push(tokens = []);
  1179. }
  1180. matched = false;
  1181. if (match = rleadingCombinator.exec(soFar)) {
  1182. matched = match.shift();
  1183. tokens.push({
  1184. value: matched,
  1185. // Cast descendant combinators to space
  1186. type: match[0].replace(rtrimCSS, " ")
  1187. });
  1188. soFar = soFar.slice(matched.length);
  1189. }
  1190. for (type in Expr.filter) {
  1191. if ((match = matchExpr[type].exec(soFar)) && (!preFilters[type] || (match = preFilters[type](match)))) {
  1192. matched = match.shift();
  1193. tokens.push({
  1194. value: matched,
  1195. type,
  1196. matches: match
  1197. });
  1198. soFar = soFar.slice(matched.length);
  1199. }
  1200. }
  1201. if (!matched) {
  1202. break;
  1203. }
  1204. }
  1205. if (parseOnly) {
  1206. return soFar.length;
  1207. }
  1208. return soFar ? find.error(selector) : (
  1209. // Cache the tokens
  1210. tokenCache(selector, groups).slice(0)
  1211. );
  1212. }
  1213. function toSelector(tokens) {
  1214. var i2 = 0, len = tokens.length, selector = "";
  1215. for (; i2 < len; i2++) {
  1216. selector += tokens[i2].value;
  1217. }
  1218. return selector;
  1219. }
  1220. function addCombinator(matcher, combinator, base) {
  1221. var dir2 = combinator.dir, skip = combinator.next, key = skip || dir2, checkNonElements = base && key === "parentNode", doneName = done++;
  1222. return combinator.first ? (
  1223. // Check against closest ancestor/preceding element
  1224. function(elem, context, xml) {
  1225. while (elem = elem[dir2]) {
  1226. if (elem.nodeType === 1 || checkNonElements) {
  1227. return matcher(elem, context, xml);
  1228. }
  1229. }
  1230. return false;
  1231. }
  1232. ) : (
  1233. // Check against all ancestor/preceding elements
  1234. function(elem, context, xml) {
  1235. var oldCache, outerCache, newCache = [dirruns, doneName];
  1236. if (xml) {
  1237. while (elem = elem[dir2]) {
  1238. if (elem.nodeType === 1 || checkNonElements) {
  1239. if (matcher(elem, context, xml)) {
  1240. return true;
  1241. }
  1242. }
  1243. }
  1244. } else {
  1245. while (elem = elem[dir2]) {
  1246. if (elem.nodeType === 1 || checkNonElements) {
  1247. outerCache = elem[expando] || (elem[expando] = {});
  1248. if (skip && nodeName(elem, skip)) {
  1249. elem = elem[dir2] || elem;
  1250. } else if ((oldCache = outerCache[key]) && oldCache[0] === dirruns && oldCache[1] === doneName) {
  1251. return newCache[2] = oldCache[2];
  1252. } else {
  1253. outerCache[key] = newCache;
  1254. if (newCache[2] = matcher(elem, context, xml)) {
  1255. return true;
  1256. }
  1257. }
  1258. }
  1259. }
  1260. }
  1261. return false;
  1262. }
  1263. );
  1264. }
  1265. function elementMatcher(matchers) {
  1266. return matchers.length > 1 ? function(elem, context, xml) {
  1267. var i2 = matchers.length;
  1268. while (i2--) {
  1269. if (!matchers[i2](elem, context, xml)) {
  1270. return false;
  1271. }
  1272. }
  1273. return true;
  1274. } : matchers[0];
  1275. }
  1276. function multipleContexts(selector, contexts, results) {
  1277. var i2 = 0, len = contexts.length;
  1278. for (; i2 < len; i2++) {
  1279. find(selector, contexts[i2], results);
  1280. }
  1281. return results;
  1282. }
  1283. function condense(unmatched, map, filter, context, xml) {
  1284. var elem, newUnmatched = [], i2 = 0, len = unmatched.length, mapped = map != null;
  1285. for (; i2 < len; i2++) {
  1286. if (elem = unmatched[i2]) {
  1287. if (!filter || filter(elem, context, xml)) {
  1288. newUnmatched.push(elem);
  1289. if (mapped) {
  1290. map.push(i2);
  1291. }
  1292. }
  1293. }
  1294. }
  1295. return newUnmatched;
  1296. }
  1297. function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) {
  1298. if (postFilter && !postFilter[expando]) {
  1299. postFilter = setMatcher(postFilter);
  1300. }
  1301. if (postFinder && !postFinder[expando]) {
  1302. postFinder = setMatcher(postFinder, postSelector);
  1303. }
  1304. return markFunction(function(seed, results, context, xml) {
  1305. var temp, i2, elem, matcherOut, preMap = [], postMap = [], preexisting = results.length, elems = seed || multipleContexts(
  1306. selector || "*",
  1307. context.nodeType ? [context] : context,
  1308. []
  1309. ), matcherIn = preFilter && (seed || !selector) ? condense(elems, preMap, preFilter, context, xml) : elems;
  1310. if (matcher) {
  1311. matcherOut = postFinder || (seed ? preFilter : preexisting || postFilter) ? (
  1312. // ...intermediate processing is necessary
  1313. []
  1314. ) : (
  1315. // ...otherwise use results directly
  1316. results
  1317. );
  1318. matcher(matcherIn, matcherOut, context, xml);
  1319. } else {
  1320. matcherOut = matcherIn;
  1321. }
  1322. if (postFilter) {
  1323. temp = condense(matcherOut, postMap);
  1324. postFilter(temp, [], context, xml);
  1325. i2 = temp.length;
  1326. while (i2--) {
  1327. if (elem = temp[i2]) {
  1328. matcherOut[postMap[i2]] = !(matcherIn[postMap[i2]] = elem);
  1329. }
  1330. }
  1331. }
  1332. if (seed) {
  1333. if (postFinder || preFilter) {
  1334. if (postFinder) {
  1335. temp = [];
  1336. i2 = matcherOut.length;
  1337. while (i2--) {
  1338. if (elem = matcherOut[i2]) {
  1339. temp.push(matcherIn[i2] = elem);
  1340. }
  1341. }
  1342. postFinder(null, matcherOut = [], temp, xml);
  1343. }
  1344. i2 = matcherOut.length;
  1345. while (i2--) {
  1346. if ((elem = matcherOut[i2]) && (temp = postFinder ? indexOf.call(seed, elem) : preMap[i2]) > -1) {
  1347. seed[temp] = !(results[temp] = elem);
  1348. }
  1349. }
  1350. }
  1351. } else {
  1352. matcherOut = condense(
  1353. matcherOut === results ? matcherOut.splice(preexisting, matcherOut.length) : matcherOut
  1354. );
  1355. if (postFinder) {
  1356. postFinder(null, results, matcherOut, xml);
  1357. } else {
  1358. push2.apply(results, matcherOut);
  1359. }
  1360. }
  1361. });
  1362. }
  1363. function matcherFromTokens(tokens) {
  1364. var checkContext, matcher, j, len = tokens.length, leadingRelative = Expr.relative[tokens[0].type], implicitRelative = leadingRelative || Expr.relative[" "], i2 = leadingRelative ? 1 : 0, matchContext = addCombinator(function(elem) {
  1365. return elem === checkContext;
  1366. }, implicitRelative, true), matchAnyContext = addCombinator(function(elem) {
  1367. return indexOf.call(checkContext, elem) > -1;
  1368. }, implicitRelative, true), matchers = [function(elem, context, xml) {
  1369. var ret = !leadingRelative && (xml || context != outermostContext) || ((checkContext = context).nodeType ? matchContext(elem, context, xml) : matchAnyContext(elem, context, xml));
  1370. checkContext = null;
  1371. return ret;
  1372. }];
  1373. for (; i2 < len; i2++) {
  1374. if (matcher = Expr.relative[tokens[i2].type]) {
  1375. matchers = [addCombinator(elementMatcher(matchers), matcher)];
  1376. } else {
  1377. matcher = Expr.filter[tokens[i2].type].apply(null, tokens[i2].matches);
  1378. if (matcher[expando]) {
  1379. j = ++i2;
  1380. for (; j < len; j++) {
  1381. if (Expr.relative[tokens[j].type]) {
  1382. break;
  1383. }
  1384. }
  1385. return setMatcher(
  1386. i2 > 1 && elementMatcher(matchers),
  1387. i2 > 1 && toSelector(
  1388. // If the preceding token was a descendant combinator, insert an implicit any-element `*`
  1389. tokens.slice(0, i2 - 1).concat({ value: tokens[i2 - 2].type === " " ? "*" : "" })
  1390. ).replace(rtrimCSS, "$1"),
  1391. matcher,
  1392. i2 < j && matcherFromTokens(tokens.slice(i2, j)),
  1393. j < len && matcherFromTokens(tokens = tokens.slice(j)),
  1394. j < len && toSelector(tokens)
  1395. );
  1396. }
  1397. matchers.push(matcher);
  1398. }
  1399. }
  1400. return elementMatcher(matchers);
  1401. }
  1402. function matcherFromGroupMatchers(elementMatchers, setMatchers) {
  1403. var bySet = setMatchers.length > 0, byElement = elementMatchers.length > 0, superMatcher = function(seed, context, xml, results, outermost) {
  1404. var elem, j, matcher, matchedCount = 0, i2 = "0", unmatched = seed && [], setMatched = [], contextBackup = outermostContext, elems = seed || byElement && Expr.find.TAG("*", outermost), dirrunsUnique = dirruns += contextBackup == null ? 1 : Math.random() || 0.1, len = elems.length;
  1405. if (outermost) {
  1406. outermostContext = context == document3 || context || outermost;
  1407. }
  1408. for (; i2 !== len && (elem = elems[i2]) != null; i2++) {
  1409. if (byElement && elem) {
  1410. j = 0;
  1411. if (!context && elem.ownerDocument != document3) {
  1412. setDocument(elem);
  1413. xml = !documentIsHTML;
  1414. }
  1415. while (matcher = elementMatchers[j++]) {
  1416. if (matcher(elem, context || document3, xml)) {
  1417. push2.call(results, elem);
  1418. break;
  1419. }
  1420. }
  1421. if (outermost) {
  1422. dirruns = dirrunsUnique;
  1423. }
  1424. }
  1425. if (bySet) {
  1426. if (elem = !matcher && elem) {
  1427. matchedCount--;
  1428. }
  1429. if (seed) {
  1430. unmatched.push(elem);
  1431. }
  1432. }
  1433. }
  1434. matchedCount += i2;
  1435. if (bySet && i2 !== matchedCount) {
  1436. j = 0;
  1437. while (matcher = setMatchers[j++]) {
  1438. matcher(unmatched, setMatched, context, xml);
  1439. }
  1440. if (seed) {
  1441. if (matchedCount > 0) {
  1442. while (i2--) {
  1443. if (!(unmatched[i2] || setMatched[i2])) {
  1444. setMatched[i2] = pop.call(results);
  1445. }
  1446. }
  1447. }
  1448. setMatched = condense(setMatched);
  1449. }
  1450. push2.apply(results, setMatched);
  1451. if (outermost && !seed && setMatched.length > 0 && matchedCount + setMatchers.length > 1) {
  1452. jQuery.uniqueSort(results);
  1453. }
  1454. }
  1455. if (outermost) {
  1456. dirruns = dirrunsUnique;
  1457. outermostContext = contextBackup;
  1458. }
  1459. return unmatched;
  1460. };
  1461. return bySet ? markFunction(superMatcher) : superMatcher;
  1462. }
  1463. function compile(selector, match) {
  1464. var i2, setMatchers = [], elementMatchers = [], cached = compilerCache[selector + " "];
  1465. if (!cached) {
  1466. if (!match) {
  1467. match = tokenize(selector);
  1468. }
  1469. i2 = match.length;
  1470. while (i2--) {
  1471. cached = matcherFromTokens(match[i2]);
  1472. if (cached[expando]) {
  1473. setMatchers.push(cached);
  1474. } else {
  1475. elementMatchers.push(cached);
  1476. }
  1477. }
  1478. cached = compilerCache(
  1479. selector,
  1480. matcherFromGroupMatchers(elementMatchers, setMatchers)
  1481. );
  1482. cached.selector = selector;
  1483. }
  1484. return cached;
  1485. }
  1486. function select(selector, context, results, seed) {
  1487. var i2, tokens, token, type, find2, compiled = typeof selector === "function" && selector, match = !seed && tokenize(selector = compiled.selector || selector);
  1488. results = results || [];
  1489. if (match.length === 1) {
  1490. tokens = match[0] = match[0].slice(0);
  1491. if (tokens.length > 2 && (token = tokens[0]).type === "ID" && context.nodeType === 9 && documentIsHTML && Expr.relative[tokens[1].type]) {
  1492. context = (Expr.find.ID(
  1493. token.matches[0].replace(runescape, funescape),
  1494. context
  1495. ) || [])[0];
  1496. if (!context) {
  1497. return results;
  1498. } else if (compiled) {
  1499. context = context.parentNode;
  1500. }
  1501. selector = selector.slice(tokens.shift().value.length);
  1502. }
  1503. i2 = matchExpr.needsContext.test(selector) ? 0 : tokens.length;
  1504. while (i2--) {
  1505. token = tokens[i2];
  1506. if (Expr.relative[type = token.type]) {
  1507. break;
  1508. }
  1509. if (find2 = Expr.find[type]) {
  1510. if (seed = find2(
  1511. token.matches[0].replace(runescape, funescape),
  1512. rsibling.test(tokens[0].type) && testContext(context.parentNode) || context
  1513. )) {
  1514. tokens.splice(i2, 1);
  1515. selector = seed.length && toSelector(tokens);
  1516. if (!selector) {
  1517. push2.apply(results, seed);
  1518. return results;
  1519. }
  1520. break;
  1521. }
  1522. }
  1523. }
  1524. }
  1525. (compiled || compile(selector, match))(
  1526. seed,
  1527. context,
  1528. !documentIsHTML,
  1529. results,
  1530. !context || rsibling.test(selector) && testContext(context.parentNode) || context
  1531. );
  1532. return results;
  1533. }
  1534. support.sortStable = expando.split("").sort(sortOrder).join("") === expando;
  1535. setDocument();
  1536. support.sortDetached = assert(function(el) {
  1537. return el.compareDocumentPosition(document3.createElement("fieldset")) & 1;
  1538. });
  1539. jQuery.find = find;
  1540. jQuery.expr[":"] = jQuery.expr.pseudos;
  1541. jQuery.unique = jQuery.uniqueSort;
  1542. find.compile = compile;
  1543. find.select = select;
  1544. find.setDocument = setDocument;
  1545. find.tokenize = tokenize;
  1546. find.escape = jQuery.escapeSelector;
  1547. find.getText = jQuery.text;
  1548. find.isXML = jQuery.isXMLDoc;
  1549. find.selectors = jQuery.expr;
  1550. find.support = jQuery.support;
  1551. find.uniqueSort = jQuery.uniqueSort;
  1552. })();
  1553. var dir = function(elem, dir2, until) {
  1554. var matched = [], truncate = until !== void 0;
  1555. while ((elem = elem[dir2]) && elem.nodeType !== 9) {
  1556. if (elem.nodeType === 1) {
  1557. if (truncate && jQuery(elem).is(until)) {
  1558. break;
  1559. }
  1560. matched.push(elem);
  1561. }
  1562. }
  1563. return matched;
  1564. };
  1565. var siblings = function(n, elem) {
  1566. var matched = [];
  1567. for (; n; n = n.nextSibling) {
  1568. if (n.nodeType === 1 && n !== elem) {
  1569. matched.push(n);
  1570. }
  1571. }
  1572. return matched;
  1573. };
  1574. var rneedsContext = jQuery.expr.match.needsContext;
  1575. var rsingleTag = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;
  1576. function winnow(elements, qualifier, not) {
  1577. if (isFunction(qualifier)) {
  1578. return jQuery.grep(elements, function(elem, i) {
  1579. return !!qualifier.call(elem, i, elem) !== not;
  1580. });
  1581. }
  1582. if (qualifier.nodeType) {
  1583. return jQuery.grep(elements, function(elem) {
  1584. return elem === qualifier !== not;
  1585. });
  1586. }
  1587. if (typeof qualifier !== "string") {
  1588. return jQuery.grep(elements, function(elem) {
  1589. return indexOf.call(qualifier, elem) > -1 !== not;
  1590. });
  1591. }
  1592. return jQuery.filter(qualifier, elements, not);
  1593. }
  1594. jQuery.filter = function(expr, elems, not) {
  1595. var elem = elems[0];
  1596. if (not) {
  1597. expr = ":not(" + expr + ")";
  1598. }
  1599. if (elems.length === 1 && elem.nodeType === 1) {
  1600. return jQuery.find.matchesSelector(elem, expr) ? [elem] : [];
  1601. }
  1602. return jQuery.find.matches(expr, jQuery.grep(elems, function(elem2) {
  1603. return elem2.nodeType === 1;
  1604. }));
  1605. };
  1606. jQuery.fn.extend({
  1607. find: function(selector) {
  1608. var i, ret, len = this.length, self2 = this;
  1609. if (typeof selector !== "string") {
  1610. return this.pushStack(jQuery(selector).filter(function() {
  1611. for (i = 0; i < len; i++) {
  1612. if (jQuery.contains(self2[i], this)) {
  1613. return true;
  1614. }
  1615. }
  1616. }));
  1617. }
  1618. ret = this.pushStack([]);
  1619. for (i = 0; i < len; i++) {
  1620. jQuery.find(selector, self2[i], ret);
  1621. }
  1622. return len > 1 ? jQuery.uniqueSort(ret) : ret;
  1623. },
  1624. filter: function(selector) {
  1625. return this.pushStack(winnow(this, selector || [], false));
  1626. },
  1627. not: function(selector) {
  1628. return this.pushStack(winnow(this, selector || [], true));
  1629. },
  1630. is: function(selector) {
  1631. return !!winnow(
  1632. this,
  1633. // If this is a positional/relative selector, check membership in the returned set
  1634. // so $("p:first").is("p:last") won't return true for a doc with two "p".
  1635. typeof selector === "string" && rneedsContext.test(selector) ? jQuery(selector) : selector || [],
  1636. false
  1637. ).length;
  1638. }
  1639. });
  1640. var rootjQuery, rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, init = jQuery.fn.init = function(selector, context, root) {
  1641. var match, elem;
  1642. if (!selector) {
  1643. return this;
  1644. }
  1645. root = root || rootjQuery;
  1646. if (typeof selector === "string") {
  1647. if (selector[0] === "<" && selector[selector.length - 1] === ">" && selector.length >= 3) {
  1648. match = [null, selector, null];
  1649. } else {
  1650. match = rquickExpr.exec(selector);
  1651. }
  1652. if (match && (match[1] || !context)) {
  1653. if (match[1]) {
  1654. context = context instanceof jQuery ? context[0] : context;
  1655. jQuery.merge(this, jQuery.parseHTML(
  1656. match[1],
  1657. context && context.nodeType ? context.ownerDocument || context : document2,
  1658. true
  1659. ));
  1660. if (rsingleTag.test(match[1]) && jQuery.isPlainObject(context)) {
  1661. for (match in context) {
  1662. if (isFunction(this[match])) {
  1663. this[match](context[match]);
  1664. } else {
  1665. this.attr(match, context[match]);
  1666. }
  1667. }
  1668. }
  1669. return this;
  1670. } else {
  1671. elem = document2.getElementById(match[2]);
  1672. if (elem) {
  1673. this[0] = elem;
  1674. this.length = 1;
  1675. }
  1676. return this;
  1677. }
  1678. } else if (!context || context.jquery) {
  1679. return (context || root).find(selector);
  1680. } else {
  1681. return this.constructor(context).find(selector);
  1682. }
  1683. } else if (selector.nodeType) {
  1684. this[0] = selector;
  1685. this.length = 1;
  1686. return this;
  1687. } else if (isFunction(selector)) {
  1688. return root.ready !== void 0 ? root.ready(selector) : (
  1689. // Execute immediately if ready is not present
  1690. selector(jQuery)
  1691. );
  1692. }
  1693. return jQuery.makeArray(selector, this);
  1694. };
  1695. init.prototype = jQuery.fn;
  1696. rootjQuery = jQuery(document2);
  1697. var rparentsprev = /^(?:parents|prev(?:Until|All))/, guaranteedUnique = {
  1698. children: true,
  1699. contents: true,
  1700. next: true,
  1701. prev: true
  1702. };
  1703. jQuery.fn.extend({
  1704. has: function(target) {
  1705. var targets = jQuery(target, this), l = targets.length;
  1706. return this.filter(function() {
  1707. var i = 0;
  1708. for (; i < l; i++) {
  1709. if (jQuery.contains(this, targets[i])) {
  1710. return true;
  1711. }
  1712. }
  1713. });
  1714. },
  1715. closest: function(selectors, context) {
  1716. var cur, i = 0, l = this.length, matched = [], targets = typeof selectors !== "string" && jQuery(selectors);
  1717. if (!rneedsContext.test(selectors)) {
  1718. for (; i < l; i++) {
  1719. for (cur = this[i]; cur && cur !== context; cur = cur.parentNode) {
  1720. if (cur.nodeType < 11 && (targets ? targets.index(cur) > -1 : (
  1721. // Don't pass non-elements to jQuery#find
  1722. cur.nodeType === 1 && jQuery.find.matchesSelector(cur, selectors)
  1723. ))) {
  1724. matched.push(cur);
  1725. break;
  1726. }
  1727. }
  1728. }
  1729. }
  1730. return this.pushStack(matched.length > 1 ? jQuery.uniqueSort(matched) : matched);
  1731. },
  1732. // Determine the position of an element within the set
  1733. index: function(elem) {
  1734. if (!elem) {
  1735. return this[0] && this[0].parentNode ? this.first().prevAll().length : -1;
  1736. }
  1737. if (typeof elem === "string") {
  1738. return indexOf.call(jQuery(elem), this[0]);
  1739. }
  1740. return indexOf.call(
  1741. this,
  1742. // If it receives a jQuery object, the first element is used
  1743. elem.jquery ? elem[0] : elem
  1744. );
  1745. },
  1746. add: function(selector, context) {
  1747. return this.pushStack(
  1748. jQuery.uniqueSort(
  1749. jQuery.merge(this.get(), jQuery(selector, context))
  1750. )
  1751. );
  1752. },
  1753. addBack: function(selector) {
  1754. return this.add(
  1755. selector == null ? this.prevObject : this.prevObject.filter(selector)
  1756. );
  1757. }
  1758. });
  1759. function sibling(cur, dir2) {
  1760. while ((cur = cur[dir2]) && cur.nodeType !== 1) {
  1761. }
  1762. return cur;
  1763. }
  1764. jQuery.each({
  1765. parent: function(elem) {
  1766. var parent = elem.parentNode;
  1767. return parent && parent.nodeType !== 11 ? parent : null;
  1768. },
  1769. parents: function(elem) {
  1770. return dir(elem, "parentNode");
  1771. },
  1772. parentsUntil: function(elem, _i, until) {
  1773. return dir(elem, "parentNode", until);
  1774. },
  1775. next: function(elem) {
  1776. return sibling(elem, "nextSibling");
  1777. },
  1778. prev: function(elem) {
  1779. return sibling(elem, "previousSibling");
  1780. },
  1781. nextAll: function(elem) {
  1782. return dir(elem, "nextSibling");
  1783. },
  1784. prevAll: function(elem) {
  1785. return dir(elem, "previousSibling");
  1786. },
  1787. nextUntil: function(elem, _i, until) {
  1788. return dir(elem, "nextSibling", until);
  1789. },
  1790. prevUntil: function(elem, _i, until) {
  1791. return dir(elem, "previousSibling", until);
  1792. },
  1793. siblings: function(elem) {
  1794. return siblings((elem.parentNode || {}).firstChild, elem);
  1795. },
  1796. children: function(elem) {
  1797. return siblings(elem.firstChild);
  1798. },
  1799. contents: function(elem) {
  1800. if (elem.contentDocument != null && // Support: IE 11+
  1801. // <object> elements with no `data` attribute has an object
  1802. // `contentDocument` with a `null` prototype.
  1803. getProto(elem.contentDocument)) {
  1804. return elem.contentDocument;
  1805. }
  1806. if (nodeName(elem, "template")) {
  1807. elem = elem.content || elem;
  1808. }
  1809. return jQuery.merge([], elem.childNodes);
  1810. }
  1811. }, function(name, fn) {
  1812. jQuery.fn[name] = function(until, selector) {
  1813. var matched = jQuery.map(this, fn, until);
  1814. if (name.slice(-5) !== "Until") {
  1815. selector = until;
  1816. }
  1817. if (selector && typeof selector === "string") {
  1818. matched = jQuery.filter(selector, matched);
  1819. }
  1820. if (this.length > 1) {
  1821. if (!guaranteedUnique[name]) {
  1822. jQuery.uniqueSort(matched);
  1823. }
  1824. if (rparentsprev.test(name)) {
  1825. matched.reverse();
  1826. }
  1827. }
  1828. return this.pushStack(matched);
  1829. };
  1830. });
  1831. var rnothtmlwhite = /[^\x20\t\r\n\f]+/g;
  1832. function createOptions(options) {
  1833. var object = {};
  1834. jQuery.each(options.match(rnothtmlwhite) || [], function(_, flag) {
  1835. object[flag] = true;
  1836. });
  1837. return object;
  1838. }
  1839. jQuery.Callbacks = function(options) {
  1840. options = typeof options === "string" ? createOptions(options) : jQuery.extend({}, options);
  1841. var firing, memory, fired, locked, list = [], queue = [], firingIndex = -1, fire = function() {
  1842. locked = locked || options.once;
  1843. fired = firing = true;
  1844. for (; queue.length; firingIndex = -1) {
  1845. memory = queue.shift();
  1846. while (++firingIndex < list.length) {
  1847. if (list[firingIndex].apply(memory[0], memory[1]) === false && options.stopOnFalse) {
  1848. firingIndex = list.length;
  1849. memory = false;
  1850. }
  1851. }
  1852. }
  1853. if (!options.memory) {
  1854. memory = false;
  1855. }
  1856. firing = false;
  1857. if (locked) {
  1858. if (memory) {
  1859. list = [];
  1860. } else {
  1861. list = "";
  1862. }
  1863. }
  1864. }, self2 = {
  1865. // Add a callback or a collection of callbacks to the list
  1866. add: function() {
  1867. if (list) {
  1868. if (memory && !firing) {
  1869. firingIndex = list.length - 1;
  1870. queue.push(memory);
  1871. }
  1872. (function add(args) {
  1873. jQuery.each(args, function(_, arg) {
  1874. if (isFunction(arg)) {
  1875. if (!options.unique || !self2.has(arg)) {
  1876. list.push(arg);
  1877. }
  1878. } else if (arg && arg.length && toType(arg) !== "string") {
  1879. add(arg);
  1880. }
  1881. });
  1882. })(arguments);
  1883. if (memory && !firing) {
  1884. fire();
  1885. }
  1886. }
  1887. return this;
  1888. },
  1889. // Remove a callback from the list
  1890. remove: function() {
  1891. jQuery.each(arguments, function(_, arg) {
  1892. var index;
  1893. while ((index = jQuery.inArray(arg, list, index)) > -1) {
  1894. list.splice(index, 1);
  1895. if (index <= firingIndex) {
  1896. firingIndex--;
  1897. }
  1898. }
  1899. });
  1900. return this;
  1901. },
  1902. // Check if a given callback is in the list.
  1903. // If no argument is given, return whether or not list has callbacks attached.
  1904. has: function(fn) {
  1905. return fn ? jQuery.inArray(fn, list) > -1 : list.length > 0;
  1906. },
  1907. // Remove all callbacks from the list
  1908. empty: function() {
  1909. if (list) {
  1910. list = [];
  1911. }
  1912. return this;
  1913. },
  1914. // Disable .fire and .add
  1915. // Abort any current/pending executions
  1916. // Clear all callbacks and values
  1917. disable: function() {
  1918. locked = queue = [];
  1919. list = memory = "";
  1920. return this;
  1921. },
  1922. disabled: function() {
  1923. return !list;
  1924. },
  1925. // Disable .fire
  1926. // Also disable .add unless we have memory (since it would have no effect)
  1927. // Abort any pending executions
  1928. lock: function() {
  1929. locked = queue = [];
  1930. if (!memory && !firing) {
  1931. list = memory = "";
  1932. }
  1933. return this;
  1934. },
  1935. locked: function() {
  1936. return !!locked;
  1937. },
  1938. // Call all callbacks with the given context and arguments
  1939. fireWith: function(context, args) {
  1940. if (!locked) {
  1941. args = args || [];
  1942. args = [context, args.slice ? args.slice() : args];
  1943. queue.push(args);
  1944. if (!firing) {
  1945. fire();
  1946. }
  1947. }
  1948. return this;
  1949. },
  1950. // Call all the callbacks with the given arguments
  1951. fire: function() {
  1952. self2.fireWith(this, arguments);
  1953. return this;
  1954. },
  1955. // To know if the callbacks have already been called at least once
  1956. fired: function() {
  1957. return !!fired;
  1958. }
  1959. };
  1960. return self2;
  1961. };
  1962. function Identity(v) {
  1963. return v;
  1964. }
  1965. function Thrower(ex) {
  1966. throw ex;
  1967. }
  1968. function adoptValue(value, resolve, reject, noValue) {
  1969. var method;
  1970. try {
  1971. if (value && isFunction(method = value.promise)) {
  1972. method.call(value).done(resolve).fail(reject);
  1973. } else if (value && isFunction(method = value.then)) {
  1974. method.call(value, resolve, reject);
  1975. } else {
  1976. resolve.apply(void 0, [value].slice(noValue));
  1977. }
  1978. } catch (value2) {
  1979. reject.apply(void 0, [value2]);
  1980. }
  1981. }
  1982. jQuery.extend({
  1983. Deferred: function(func) {
  1984. var tuples = [
  1985. // action, add listener, callbacks,
  1986. // ... .then handlers, argument index, [final state]
  1987. [
  1988. "notify",
  1989. "progress",
  1990. jQuery.Callbacks("memory"),
  1991. jQuery.Callbacks("memory"),
  1992. 2
  1993. ],
  1994. [
  1995. "resolve",
  1996. "done",
  1997. jQuery.Callbacks("once memory"),
  1998. jQuery.Callbacks("once memory"),
  1999. 0,
  2000. "resolved"
  2001. ],
  2002. [
  2003. "reject",
  2004. "fail",
  2005. jQuery.Callbacks("once memory"),
  2006. jQuery.Callbacks("once memory"),
  2007. 1,
  2008. "rejected"
  2009. ]
  2010. ], state = "pending", promise = {
  2011. state: function() {
  2012. return state;
  2013. },
  2014. always: function() {
  2015. deferred.done(arguments).fail(arguments);
  2016. return this;
  2017. },
  2018. "catch": function(fn) {
  2019. return promise.then(null, fn);
  2020. },
  2021. // Keep pipe for back-compat
  2022. pipe: function() {
  2023. var fns = arguments;
  2024. return jQuery.Deferred(function(newDefer) {
  2025. jQuery.each(tuples, function(_i, tuple) {
  2026. var fn = isFunction(fns[tuple[4]]) && fns[tuple[4]];
  2027. deferred[tuple[1]](function() {
  2028. var returned = fn && fn.apply(this, arguments);
  2029. if (returned && isFunction(returned.promise)) {
  2030. returned.promise().progress(newDefer.notify).done(newDefer.resolve).fail(newDefer.reject);
  2031. } else {
  2032. newDefer[tuple[0] + "With"](
  2033. this,
  2034. fn ? [returned] : arguments
  2035. );
  2036. }
  2037. });
  2038. });
  2039. fns = null;
  2040. }).promise();
  2041. },
  2042. then: function(onFulfilled, onRejected, onProgress) {
  2043. var maxDepth = 0;
  2044. function resolve(depth, deferred2, handler, special) {
  2045. return function() {
  2046. var that = this, args = arguments, mightThrow = function() {
  2047. var returned, then;
  2048. if (depth < maxDepth) {
  2049. return;
  2050. }
  2051. returned = handler.apply(that, args);
  2052. if (returned === deferred2.promise()) {
  2053. throw new TypeError("Thenable self-resolution");
  2054. }
  2055. then = returned && // Support: Promises/A+ section 2.3.4
  2056. // https://promisesaplus.com/#point-64
  2057. // Only check objects and functions for thenability
  2058. (typeof returned === "object" || typeof returned === "function") && returned.then;
  2059. if (isFunction(then)) {
  2060. if (special) {
  2061. then.call(
  2062. returned,
  2063. resolve(maxDepth, deferred2, Identity, special),
  2064. resolve(maxDepth, deferred2, Thrower, special)
  2065. );
  2066. } else {
  2067. maxDepth++;
  2068. then.call(
  2069. returned,
  2070. resolve(maxDepth, deferred2, Identity, special),
  2071. resolve(maxDepth, deferred2, Thrower, special),
  2072. resolve(
  2073. maxDepth,
  2074. deferred2,
  2075. Identity,
  2076. deferred2.notifyWith
  2077. )
  2078. );
  2079. }
  2080. } else {
  2081. if (handler !== Identity) {
  2082. that = void 0;
  2083. args = [returned];
  2084. }
  2085. (special || deferred2.resolveWith)(that, args);
  2086. }
  2087. }, process = special ? mightThrow : function() {
  2088. try {
  2089. mightThrow();
  2090. } catch (e) {
  2091. if (jQuery.Deferred.exceptionHook) {
  2092. jQuery.Deferred.exceptionHook(
  2093. e,
  2094. process.error
  2095. );
  2096. }
  2097. if (depth + 1 >= maxDepth) {
  2098. if (handler !== Thrower) {
  2099. that = void 0;
  2100. args = [e];
  2101. }
  2102. deferred2.rejectWith(that, args);
  2103. }
  2104. }
  2105. };
  2106. if (depth) {
  2107. process();
  2108. } else {
  2109. if (jQuery.Deferred.getErrorHook) {
  2110. process.error = jQuery.Deferred.getErrorHook();
  2111. } else if (jQuery.Deferred.getStackHook) {
  2112. process.error = jQuery.Deferred.getStackHook();
  2113. }
  2114. window2.setTimeout(process);
  2115. }
  2116. };
  2117. }
  2118. return jQuery.Deferred(function(newDefer) {
  2119. tuples[0][3].add(
  2120. resolve(
  2121. 0,
  2122. newDefer,
  2123. isFunction(onProgress) ? onProgress : Identity,
  2124. newDefer.notifyWith
  2125. )
  2126. );
  2127. tuples[1][3].add(
  2128. resolve(
  2129. 0,
  2130. newDefer,
  2131. isFunction(onFulfilled) ? onFulfilled : Identity
  2132. )
  2133. );
  2134. tuples[2][3].add(
  2135. resolve(
  2136. 0,
  2137. newDefer,
  2138. isFunction(onRejected) ? onRejected : Thrower
  2139. )
  2140. );
  2141. }).promise();
  2142. },
  2143. // Get a promise for this deferred
  2144. // If obj is provided, the promise aspect is added to the object
  2145. promise: function(obj) {
  2146. return obj != null ? jQuery.extend(obj, promise) : promise;
  2147. }
  2148. }, deferred = {};
  2149. jQuery.each(tuples, function(i, tuple) {
  2150. var list = tuple[2], stateString = tuple[5];
  2151. promise[tuple[1]] = list.add;
  2152. if (stateString) {
  2153. list.add(
  2154. function() {
  2155. state = stateString;
  2156. },
  2157. // rejected_callbacks.disable
  2158. // fulfilled_callbacks.disable
  2159. tuples[3 - i][2].disable,
  2160. // rejected_handlers.disable
  2161. // fulfilled_handlers.disable
  2162. tuples[3 - i][3].disable,
  2163. // progress_callbacks.lock
  2164. tuples[0][2].lock,
  2165. // progress_handlers.lock
  2166. tuples[0][3].lock
  2167. );
  2168. }
  2169. list.add(tuple[3].fire);
  2170. deferred[tuple[0]] = function() {
  2171. deferred[tuple[0] + "With"](this === deferred ? void 0 : this, arguments);
  2172. return this;
  2173. };
  2174. deferred[tuple[0] + "With"] = list.fireWith;
  2175. });
  2176. promise.promise(deferred);
  2177. if (func) {
  2178. func.call(deferred, deferred);
  2179. }
  2180. return deferred;
  2181. },
  2182. // Deferred helper
  2183. when: function(singleValue) {
  2184. var remaining = arguments.length, i = remaining, resolveContexts = Array(i), resolveValues = slice.call(arguments), primary = jQuery.Deferred(), updateFunc = function(i2) {
  2185. return function(value) {
  2186. resolveContexts[i2] = this;
  2187. resolveValues[i2] = arguments.length > 1 ? slice.call(arguments) : value;
  2188. if (!--remaining) {
  2189. primary.resolveWith(resolveContexts, resolveValues);
  2190. }
  2191. };
  2192. };
  2193. if (remaining <= 1) {
  2194. adoptValue(
  2195. singleValue,
  2196. primary.done(updateFunc(i)).resolve,
  2197. primary.reject,
  2198. !remaining
  2199. );
  2200. if (primary.state() === "pending" || isFunction(resolveValues[i] && resolveValues[i].then)) {
  2201. return primary.then();
  2202. }
  2203. }
  2204. while (i--) {
  2205. adoptValue(resolveValues[i], updateFunc(i), primary.reject);
  2206. }
  2207. return primary.promise();
  2208. }
  2209. });
  2210. var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
  2211. jQuery.Deferred.exceptionHook = function(error, asyncError) {
  2212. if (window2.console && window2.console.warn && error && rerrorNames.test(error.name)) {
  2213. window2.console.warn(
  2214. "jQuery.Deferred exception: " + error.message,
  2215. error.stack,
  2216. asyncError
  2217. );
  2218. }
  2219. };
  2220. jQuery.readyException = function(error) {
  2221. window2.setTimeout(function() {
  2222. throw error;
  2223. });
  2224. };
  2225. var readyList = jQuery.Deferred();
  2226. jQuery.fn.ready = function(fn) {
  2227. readyList.then(fn).catch(function(error) {
  2228. jQuery.readyException(error);
  2229. });
  2230. return this;
  2231. };
  2232. jQuery.extend({
  2233. // Is the DOM ready to be used? Set to true once it occurs.
  2234. isReady: false,
  2235. // A counter to track how many items to wait for before
  2236. // the ready event fires. See trac-6781
  2237. readyWait: 1,
  2238. // Handle when the DOM is ready
  2239. ready: function(wait) {
  2240. if (wait === true ? --jQuery.readyWait : jQuery.isReady) {
  2241. return;
  2242. }
  2243. jQuery.isReady = true;
  2244. if (wait !== true && --jQuery.readyWait > 0) {
  2245. return;
  2246. }
  2247. readyList.resolveWith(document2, [jQuery]);
  2248. }
  2249. });
  2250. jQuery.ready.then = readyList.then;
  2251. function completed() {
  2252. document2.removeEventListener("DOMContentLoaded", completed);
  2253. window2.removeEventListener("load", completed);
  2254. jQuery.ready();
  2255. }
  2256. if (document2.readyState === "complete" || document2.readyState !== "loading" && !document2.documentElement.doScroll) {
  2257. window2.setTimeout(jQuery.ready);
  2258. } else {
  2259. document2.addEventListener("DOMContentLoaded", completed);
  2260. window2.addEventListener("load", completed);
  2261. }
  2262. var access = function(elems, fn, key, value, chainable, emptyGet, raw) {
  2263. var i = 0, len = elems.length, bulk = key == null;
  2264. if (toType(key) === "object") {
  2265. chainable = true;
  2266. for (i in key) {
  2267. access(elems, fn, i, key[i], true, emptyGet, raw);
  2268. }
  2269. } else if (value !== void 0) {
  2270. chainable = true;
  2271. if (!isFunction(value)) {
  2272. raw = true;
  2273. }
  2274. if (bulk) {
  2275. if (raw) {
  2276. fn.call(elems, value);
  2277. fn = null;
  2278. } else {
  2279. bulk = fn;
  2280. fn = function(elem, _key, value2) {
  2281. return bulk.call(jQuery(elem), value2);
  2282. };
  2283. }
  2284. }
  2285. if (fn) {
  2286. for (; i < len; i++) {
  2287. fn(
  2288. elems[i],
  2289. key,
  2290. raw ? value : value.call(elems[i], i, fn(elems[i], key))
  2291. );
  2292. }
  2293. }
  2294. }
  2295. if (chainable) {
  2296. return elems;
  2297. }
  2298. if (bulk) {
  2299. return fn.call(elems);
  2300. }
  2301. return len ? fn(elems[0], key) : emptyGet;
  2302. };
  2303. var rmsPrefix = /^-ms-/, rdashAlpha = /-([a-z])/g;
  2304. function fcamelCase(_all, letter) {
  2305. return letter.toUpperCase();
  2306. }
  2307. function camelCase(string) {
  2308. return string.replace(rmsPrefix, "ms-").replace(rdashAlpha, fcamelCase);
  2309. }
  2310. var acceptData = function(owner) {
  2311. return owner.nodeType === 1 || owner.nodeType === 9 || !+owner.nodeType;
  2312. };
  2313. function Data() {
  2314. this.expando = jQuery.expando + Data.uid++;
  2315. }
  2316. Data.uid = 1;
  2317. Data.prototype = {
  2318. cache: function(owner) {
  2319. var value = owner[this.expando];
  2320. if (!value) {
  2321. value = {};
  2322. if (acceptData(owner)) {
  2323. if (owner.nodeType) {
  2324. owner[this.expando] = value;
  2325. } else {
  2326. Object.defineProperty(owner, this.expando, {
  2327. value,
  2328. configurable: true
  2329. });
  2330. }
  2331. }
  2332. }
  2333. return value;
  2334. },
  2335. set: function(owner, data, value) {
  2336. var prop, cache = this.cache(owner);
  2337. if (typeof data === "string") {
  2338. cache[camelCase(data)] = value;
  2339. } else {
  2340. for (prop in data) {
  2341. cache[camelCase(prop)] = data[prop];
  2342. }
  2343. }
  2344. return cache;
  2345. },
  2346. get: function(owner, key) {
  2347. return key === void 0 ? this.cache(owner) : (
  2348. // Always use camelCase key (gh-2257)
  2349. owner[this.expando] && owner[this.expando][camelCase(key)]
  2350. );
  2351. },
  2352. access: function(owner, key, value) {
  2353. if (key === void 0 || key && typeof key === "string" && value === void 0) {
  2354. return this.get(owner, key);
  2355. }
  2356. this.set(owner, key, value);
  2357. return value !== void 0 ? value : key;
  2358. },
  2359. remove: function(owner, key) {
  2360. var i, cache = owner[this.expando];
  2361. if (cache === void 0) {
  2362. return;
  2363. }
  2364. if (key !== void 0) {
  2365. if (Array.isArray(key)) {
  2366. key = key.map(camelCase);
  2367. } else {
  2368. key = camelCase(key);
  2369. key = key in cache ? [key] : key.match(rnothtmlwhite) || [];
  2370. }
  2371. i = key.length;
  2372. while (i--) {
  2373. delete cache[key[i]];
  2374. }
  2375. }
  2376. if (key === void 0 || jQuery.isEmptyObject(cache)) {
  2377. if (owner.nodeType) {
  2378. owner[this.expando] = void 0;
  2379. } else {
  2380. delete owner[this.expando];
  2381. }
  2382. }
  2383. },
  2384. hasData: function(owner) {
  2385. var cache = owner[this.expando];
  2386. return cache !== void 0 && !jQuery.isEmptyObject(cache);
  2387. }
  2388. };
  2389. var dataPriv = new Data();
  2390. var dataUser = new Data();
  2391. var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, rmultiDash = /[A-Z]/g;
  2392. function getData(data) {
  2393. if (data === "true") {
  2394. return true;
  2395. }
  2396. if (data === "false") {
  2397. return false;
  2398. }
  2399. if (data === "null") {
  2400. return null;
  2401. }
  2402. if (data === +data + "") {
  2403. return +data;
  2404. }
  2405. if (rbrace.test(data)) {
  2406. return JSON.parse(data);
  2407. }
  2408. return data;
  2409. }
  2410. function dataAttr(elem, key, data) {
  2411. var name;
  2412. if (data === void 0 && elem.nodeType === 1) {
  2413. name = "data-" + key.replace(rmultiDash, "-$&").toLowerCase();
  2414. data = elem.getAttribute(name);
  2415. if (typeof data === "string") {
  2416. try {
  2417. data = getData(data);
  2418. } catch (e) {
  2419. }
  2420. dataUser.set(elem, key, data);
  2421. } else {
  2422. data = void 0;
  2423. }
  2424. }
  2425. return data;
  2426. }
  2427. jQuery.extend({
  2428. hasData: function(elem) {
  2429. return dataUser.hasData(elem) || dataPriv.hasData(elem);
  2430. },
  2431. data: function(elem, name, data) {
  2432. return dataUser.access(elem, name, data);
  2433. },
  2434. removeData: function(elem, name) {
  2435. dataUser.remove(elem, name);
  2436. },
  2437. // TODO: Now that all calls to _data and _removeData have been replaced
  2438. // with direct calls to dataPriv methods, these can be deprecated.
  2439. _data: function(elem, name, data) {
  2440. return dataPriv.access(elem, name, data);
  2441. },
  2442. _removeData: function(elem, name) {
  2443. dataPriv.remove(elem, name);
  2444. }
  2445. });
  2446. jQuery.fn.extend({
  2447. data: function(key, value) {
  2448. var i, name, data, elem = this[0], attrs = elem && elem.attributes;
  2449. if (key === void 0) {
  2450. if (this.length) {
  2451. data = dataUser.get(elem);
  2452. if (elem.nodeType === 1 && !dataPriv.get(elem, "hasDataAttrs")) {
  2453. i = attrs.length;
  2454. while (i--) {
  2455. if (attrs[i]) {
  2456. name = attrs[i].name;
  2457. if (name.indexOf("data-") === 0) {
  2458. name = camelCase(name.slice(5));
  2459. dataAttr(elem, name, data[name]);
  2460. }
  2461. }
  2462. }
  2463. dataPriv.set(elem, "hasDataAttrs", true);
  2464. }
  2465. }
  2466. return data;
  2467. }
  2468. if (typeof key === "object") {
  2469. return this.each(function() {
  2470. dataUser.set(this, key);
  2471. });
  2472. }
  2473. return access(this, function(value2) {
  2474. var data2;
  2475. if (elem && value2 === void 0) {
  2476. data2 = dataUser.get(elem, key);
  2477. if (data2 !== void 0) {
  2478. return data2;
  2479. }
  2480. data2 = dataAttr(elem, key);
  2481. if (data2 !== void 0) {
  2482. return data2;
  2483. }
  2484. return;
  2485. }
  2486. this.each(function() {
  2487. dataUser.set(this, key, value2);
  2488. });
  2489. }, null, value, arguments.length > 1, null, true);
  2490. },
  2491. removeData: function(key) {
  2492. return this.each(function() {
  2493. dataUser.remove(this, key);
  2494. });
  2495. }
  2496. });
  2497. jQuery.extend({
  2498. queue: function(elem, type, data) {
  2499. var queue;
  2500. if (elem) {
  2501. type = (type || "fx") + "queue";
  2502. queue = dataPriv.get(elem, type);
  2503. if (data) {
  2504. if (!queue || Array.isArray(data)) {
  2505. queue = dataPriv.access(elem, type, jQuery.makeArray(data));
  2506. } else {
  2507. queue.push(data);
  2508. }
  2509. }
  2510. return queue || [];
  2511. }
  2512. },
  2513. dequeue: function(elem, type) {
  2514. type = type || "fx";
  2515. var queue = jQuery.queue(elem, type), startLength = queue.length, fn = queue.shift(), hooks = jQuery._queueHooks(elem, type), next = function() {
  2516. jQuery.dequeue(elem, type);
  2517. };
  2518. if (fn === "inprogress") {
  2519. fn = queue.shift();
  2520. startLength--;
  2521. }
  2522. if (fn) {
  2523. if (type === "fx") {
  2524. queue.unshift("inprogress");
  2525. }
  2526. delete hooks.stop;
  2527. fn.call(elem, next, hooks);
  2528. }
  2529. if (!startLength && hooks) {
  2530. hooks.empty.fire();
  2531. }
  2532. },
  2533. // Not public - generate a queueHooks object, or return the current one
  2534. _queueHooks: function(elem, type) {
  2535. var key = type + "queueHooks";
  2536. return dataPriv.get(elem, key) || dataPriv.access(elem, key, {
  2537. empty: jQuery.Callbacks("once memory").add(function() {
  2538. dataPriv.remove(elem, [type + "queue", key]);
  2539. })
  2540. });
  2541. }
  2542. });
  2543. jQuery.fn.extend({
  2544. queue: function(type, data) {
  2545. var setter = 2;
  2546. if (typeof type !== "string") {
  2547. data = type;
  2548. type = "fx";
  2549. setter--;
  2550. }
  2551. if (arguments.length < setter) {
  2552. return jQuery.queue(this[0], type);
  2553. }
  2554. return data === void 0 ? this : this.each(function() {
  2555. var queue = jQuery.queue(this, type, data);
  2556. jQuery._queueHooks(this, type);
  2557. if (type === "fx" && queue[0] !== "inprogress") {
  2558. jQuery.dequeue(this, type);
  2559. }
  2560. });
  2561. },
  2562. dequeue: function(type) {
  2563. return this.each(function() {
  2564. jQuery.dequeue(this, type);
  2565. });
  2566. },
  2567. clearQueue: function(type) {
  2568. return this.queue(type || "fx", []);
  2569. },
  2570. // Get a promise resolved when queues of a certain type
  2571. // are emptied (fx is the type by default)
  2572. promise: function(type, obj) {
  2573. var tmp, count = 1, defer = jQuery.Deferred(), elements = this, i = this.length, resolve = function() {
  2574. if (!--count) {
  2575. defer.resolveWith(elements, [elements]);
  2576. }
  2577. };
  2578. if (typeof type !== "string") {
  2579. obj = type;
  2580. type = void 0;
  2581. }
  2582. type = type || "fx";
  2583. while (i--) {
  2584. tmp = dataPriv.get(elements[i], type + "queueHooks");
  2585. if (tmp && tmp.empty) {
  2586. count++;
  2587. tmp.empty.add(resolve);
  2588. }
  2589. }
  2590. resolve();
  2591. return defer.promise(obj);
  2592. }
  2593. });
  2594. var pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source;
  2595. var rcssNum = new RegExp("^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i");
  2596. var cssExpand = ["Top", "Right", "Bottom", "Left"];
  2597. var documentElement = document2.documentElement;
  2598. var isAttached = function(elem) {
  2599. return jQuery.contains(elem.ownerDocument, elem);
  2600. }, composed = { composed: true };
  2601. if (documentElement.getRootNode) {
  2602. isAttached = function(elem) {
  2603. return jQuery.contains(elem.ownerDocument, elem) || elem.getRootNode(composed) === elem.ownerDocument;
  2604. };
  2605. }
  2606. var isHiddenWithinTree = function(elem, el) {
  2607. elem = el || elem;
  2608. return elem.style.display === "none" || elem.style.display === "" && // Otherwise, check computed style
  2609. // Support: Firefox <=43 - 45
  2610. // Disconnected elements can have computed display: none, so first confirm that elem is
  2611. // in the document.
  2612. isAttached(elem) && jQuery.css(elem, "display") === "none";
  2613. };
  2614. function adjustCSS(elem, prop, valueParts, tween) {
  2615. var adjusted, scale, maxIterations = 20, currentValue = tween ? function() {
  2616. return tween.cur();
  2617. } : function() {
  2618. return jQuery.css(elem, prop, "");
  2619. }, initial = currentValue(), unit = valueParts && valueParts[3] || (jQuery.cssNumber[prop] ? "" : "px"), initialInUnit = elem.nodeType && (jQuery.cssNumber[prop] || unit !== "px" && +initial) && rcssNum.exec(jQuery.css(elem, prop));
  2620. if (initialInUnit && initialInUnit[3] !== unit) {
  2621. initial = initial / 2;
  2622. unit = unit || initialInUnit[3];
  2623. initialInUnit = +initial || 1;
  2624. while (maxIterations--) {
  2625. jQuery.style(elem, prop, initialInUnit + unit);
  2626. if ((1 - scale) * (1 - (scale = currentValue() / initial || 0.5)) <= 0) {
  2627. maxIterations = 0;
  2628. }
  2629. initialInUnit = initialInUnit / scale;
  2630. }
  2631. initialInUnit = initialInUnit * 2;
  2632. jQuery.style(elem, prop, initialInUnit + unit);
  2633. valueParts = valueParts || [];
  2634. }
  2635. if (valueParts) {
  2636. initialInUnit = +initialInUnit || +initial || 0;
  2637. adjusted = valueParts[1] ? initialInUnit + (valueParts[1] + 1) * valueParts[2] : +valueParts[2];
  2638. if (tween) {
  2639. tween.unit = unit;
  2640. tween.start = initialInUnit;
  2641. tween.end = adjusted;
  2642. }
  2643. }
  2644. return adjusted;
  2645. }
  2646. var defaultDisplayMap = {};
  2647. function getDefaultDisplay(elem) {
  2648. var temp, doc = elem.ownerDocument, nodeName2 = elem.nodeName, display = defaultDisplayMap[nodeName2];
  2649. if (display) {
  2650. return display;
  2651. }
  2652. temp = doc.body.appendChild(doc.createElement(nodeName2));
  2653. display = jQuery.css(temp, "display");
  2654. temp.parentNode.removeChild(temp);
  2655. if (display === "none") {
  2656. display = "block";
  2657. }
  2658. defaultDisplayMap[nodeName2] = display;
  2659. return display;
  2660. }
  2661. function showHide(elements, show) {
  2662. var display, elem, values = [], index = 0, length = elements.length;
  2663. for (; index < length; index++) {
  2664. elem = elements[index];
  2665. if (!elem.style) {
  2666. continue;
  2667. }
  2668. display = elem.style.display;
  2669. if (show) {
  2670. if (display === "none") {
  2671. values[index] = dataPriv.get(elem, "display") || null;
  2672. if (!values[index]) {
  2673. elem.style.display = "";
  2674. }
  2675. }
  2676. if (elem.style.display === "" && isHiddenWithinTree(elem)) {
  2677. values[index] = getDefaultDisplay(elem);
  2678. }
  2679. } else {
  2680. if (display !== "none") {
  2681. values[index] = "none";
  2682. dataPriv.set(elem, "display", display);
  2683. }
  2684. }
  2685. }
  2686. for (index = 0; index < length; index++) {
  2687. if (values[index] != null) {
  2688. elements[index].style.display = values[index];
  2689. }
  2690. }
  2691. return elements;
  2692. }
  2693. jQuery.fn.extend({
  2694. show: function() {
  2695. return showHide(this, true);
  2696. },
  2697. hide: function() {
  2698. return showHide(this);
  2699. },
  2700. toggle: function(state) {
  2701. if (typeof state === "boolean") {
  2702. return state ? this.show() : this.hide();
  2703. }
  2704. return this.each(function() {
  2705. if (isHiddenWithinTree(this)) {
  2706. jQuery(this).show();
  2707. } else {
  2708. jQuery(this).hide();
  2709. }
  2710. });
  2711. }
  2712. });
  2713. var rcheckableType = /^(?:checkbox|radio)$/i;
  2714. var rtagName = /<([a-z][^\/\0>\x20\t\r\n\f]*)/i;
  2715. var rscriptType = /^$|^module$|\/(?:java|ecma)script/i;
  2716. (function() {
  2717. var fragment = document2.createDocumentFragment(), div = fragment.appendChild(document2.createElement("div")), input = document2.createElement("input");
  2718. input.setAttribute("type", "radio");
  2719. input.setAttribute("checked", "checked");
  2720. input.setAttribute("name", "t");
  2721. div.appendChild(input);
  2722. support.checkClone = div.cloneNode(true).cloneNode(true).lastChild.checked;
  2723. div.innerHTML = "<textarea>x</textarea>";
  2724. support.noCloneChecked = !!div.cloneNode(true).lastChild.defaultValue;
  2725. div.innerHTML = "<option></option>";
  2726. support.option = !!div.lastChild;
  2727. })();
  2728. var wrapMap = {
  2729. // XHTML parsers do not magically insert elements in the
  2730. // same way that tag soup parsers do. So we cannot shorten
  2731. // this by omitting <tbody> or other required elements.
  2732. thead: [1, "<table>", "</table>"],
  2733. col: [2, "<table><colgroup>", "</colgroup></table>"],
  2734. tr: [2, "<table><tbody>", "</tbody></table>"],
  2735. td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
  2736. _default: [0, "", ""]
  2737. };
  2738. wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
  2739. wrapMap.th = wrapMap.td;
  2740. if (!support.option) {
  2741. wrapMap.optgroup = wrapMap.option = [1, "<select multiple='multiple'>", "</select>"];
  2742. }
  2743. function getAll(context, tag) {
  2744. var ret;
  2745. if (typeof context.getElementsByTagName !== "undefined") {
  2746. ret = context.getElementsByTagName(tag || "*");
  2747. } else if (typeof context.querySelectorAll !== "undefined") {
  2748. ret = context.querySelectorAll(tag || "*");
  2749. } else {
  2750. ret = [];
  2751. }
  2752. if (tag === void 0 || tag && nodeName(context, tag)) {
  2753. return jQuery.merge([context], ret);
  2754. }
  2755. return ret;
  2756. }
  2757. function setGlobalEval(elems, refElements) {
  2758. var i = 0, l = elems.length;
  2759. for (; i < l; i++) {
  2760. dataPriv.set(
  2761. elems[i],
  2762. "globalEval",
  2763. !refElements || dataPriv.get(refElements[i], "globalEval")
  2764. );
  2765. }
  2766. }
  2767. var rhtml = /<|&#?\w+;/;
  2768. function buildFragment(elems, context, scripts, selection, ignored) {
  2769. var elem, tmp, tag, wrap, attached, j, fragment = context.createDocumentFragment(), nodes = [], i = 0, l = elems.length;
  2770. for (; i < l; i++) {
  2771. elem = elems[i];
  2772. if (elem || elem === 0) {
  2773. if (toType(elem) === "object") {
  2774. jQuery.merge(nodes, elem.nodeType ? [elem] : elem);
  2775. } else if (!rhtml.test(elem)) {
  2776. nodes.push(context.createTextNode(elem));
  2777. } else {
  2778. tmp = tmp || fragment.appendChild(context.createElement("div"));
  2779. tag = (rtagName.exec(elem) || ["", ""])[1].toLowerCase();
  2780. wrap = wrapMap[tag] || wrapMap._default;
  2781. tmp.innerHTML = wrap[1] + jQuery.htmlPrefilter(elem) + wrap[2];
  2782. j = wrap[0];
  2783. while (j--) {
  2784. tmp = tmp.lastChild;
  2785. }
  2786. jQuery.merge(nodes, tmp.childNodes);
  2787. tmp = fragment.firstChild;
  2788. tmp.textContent = "";
  2789. }
  2790. }
  2791. }
  2792. fragment.textContent = "";
  2793. i = 0;
  2794. while (elem = nodes[i++]) {
  2795. if (selection && jQuery.inArray(elem, selection) > -1) {
  2796. if (ignored) {
  2797. ignored.push(elem);
  2798. }
  2799. continue;
  2800. }
  2801. attached = isAttached(elem);
  2802. tmp = getAll(fragment.appendChild(elem), "script");
  2803. if (attached) {
  2804. setGlobalEval(tmp);
  2805. }
  2806. if (scripts) {
  2807. j = 0;
  2808. while (elem = tmp[j++]) {
  2809. if (rscriptType.test(elem.type || "")) {
  2810. scripts.push(elem);
  2811. }
  2812. }
  2813. }
  2814. }
  2815. return fragment;
  2816. }
  2817. var rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
  2818. function returnTrue() {
  2819. return true;
  2820. }
  2821. function returnFalse() {
  2822. return false;
  2823. }
  2824. function on(elem, types, selector, data, fn, one) {
  2825. var origFn, type;
  2826. if (typeof types === "object") {
  2827. if (typeof selector !== "string") {
  2828. data = data || selector;
  2829. selector = void 0;
  2830. }
  2831. for (type in types) {
  2832. on(elem, type, selector, data, types[type], one);
  2833. }
  2834. return elem;
  2835. }
  2836. if (data == null && fn == null) {
  2837. fn = selector;
  2838. data = selector = void 0;
  2839. } else if (fn == null) {
  2840. if (typeof selector === "string") {
  2841. fn = data;
  2842. data = void 0;
  2843. } else {
  2844. fn = data;
  2845. data = selector;
  2846. selector = void 0;
  2847. }
  2848. }
  2849. if (fn === false) {
  2850. fn = returnFalse;
  2851. } else if (!fn) {
  2852. return elem;
  2853. }
  2854. if (one === 1) {
  2855. origFn = fn;
  2856. fn = function(event) {
  2857. jQuery().off(event);
  2858. return origFn.apply(this, arguments);
  2859. };
  2860. fn.guid = origFn.guid || (origFn.guid = jQuery.guid++);
  2861. }
  2862. return elem.each(function() {
  2863. jQuery.event.add(this, types, fn, data, selector);
  2864. });
  2865. }
  2866. jQuery.event = {
  2867. global: {},
  2868. add: function(elem, types, handler, data, selector) {
  2869. var handleObjIn, eventHandle, tmp, events, t, handleObj, special, handlers, type, namespaces, origType, elemData = dataPriv.get(elem);
  2870. if (!acceptData(elem)) {
  2871. return;
  2872. }
  2873. if (handler.handler) {
  2874. handleObjIn = handler;
  2875. handler = handleObjIn.handler;
  2876. selector = handleObjIn.selector;
  2877. }
  2878. if (selector) {
  2879. jQuery.find.matchesSelector(documentElement, selector);
  2880. }
  2881. if (!handler.guid) {
  2882. handler.guid = jQuery.guid++;
  2883. }
  2884. if (!(events = elemData.events)) {
  2885. events = elemData.events = /* @__PURE__ */ Object.create(null);
  2886. }
  2887. if (!(eventHandle = elemData.handle)) {
  2888. eventHandle = elemData.handle = function(e) {
  2889. return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? jQuery.event.dispatch.apply(elem, arguments) : void 0;
  2890. };
  2891. }
  2892. types = (types || "").match(rnothtmlwhite) || [""];
  2893. t = types.length;
  2894. while (t--) {
  2895. tmp = rtypenamespace.exec(types[t]) || [];
  2896. type = origType = tmp[1];
  2897. namespaces = (tmp[2] || "").split(".").sort();
  2898. if (!type) {
  2899. continue;
  2900. }
  2901. special = jQuery.event.special[type] || {};
  2902. type = (selector ? special.delegateType : special.bindType) || type;
  2903. special = jQuery.event.special[type] || {};
  2904. handleObj = jQuery.extend({
  2905. type,
  2906. origType,
  2907. data,
  2908. handler,
  2909. guid: handler.guid,
  2910. selector,
  2911. needsContext: selector && jQuery.expr.match.needsContext.test(selector),
  2912. namespace: namespaces.join(".")
  2913. }, handleObjIn);
  2914. if (!(handlers = events[type])) {
  2915. handlers = events[type] = [];
  2916. handlers.delegateCount = 0;
  2917. if (!special.setup || special.setup.call(elem, data, namespaces, eventHandle) === false) {
  2918. if (elem.addEventListener) {
  2919. elem.addEventListener(type, eventHandle);
  2920. }
  2921. }
  2922. }
  2923. if (special.add) {
  2924. special.add.call(elem, handleObj);
  2925. if (!handleObj.handler.guid) {
  2926. handleObj.handler.guid = handler.guid;
  2927. }
  2928. }
  2929. if (selector) {
  2930. handlers.splice(handlers.delegateCount++, 0, handleObj);
  2931. } else {
  2932. handlers.push(handleObj);
  2933. }
  2934. jQuery.event.global[type] = true;
  2935. }
  2936. },
  2937. // Detach an event or set of events from an element
  2938. remove: function(elem, types, handler, selector, mappedTypes) {
  2939. var j, origCount, tmp, events, t, handleObj, special, handlers, type, namespaces, origType, elemData = dataPriv.hasData(elem) && dataPriv.get(elem);
  2940. if (!elemData || !(events = elemData.events)) {
  2941. return;
  2942. }
  2943. types = (types || "").match(rnothtmlwhite) || [""];
  2944. t = types.length;
  2945. while (t--) {
  2946. tmp = rtypenamespace.exec(types[t]) || [];
  2947. type = origType = tmp[1];
  2948. namespaces = (tmp[2] || "").split(".").sort();
  2949. if (!type) {
  2950. for (type in events) {
  2951. jQuery.event.remove(elem, type + types[t], handler, selector, true);
  2952. }
  2953. continue;
  2954. }
  2955. special = jQuery.event.special[type] || {};
  2956. type = (selector ? special.delegateType : special.bindType) || type;
  2957. handlers = events[type] || [];
  2958. tmp = tmp[2] && new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)");
  2959. origCount = j = handlers.length;
  2960. while (j--) {
  2961. handleObj = handlers[j];
  2962. if ((mappedTypes || origType === handleObj.origType) && (!handler || handler.guid === handleObj.guid) && (!tmp || tmp.test(handleObj.namespace)) && (!selector || selector === handleObj.selector || selector === "**" && handleObj.selector)) {
  2963. handlers.splice(j, 1);
  2964. if (handleObj.selector) {
  2965. handlers.delegateCount--;
  2966. }
  2967. if (special.remove) {
  2968. special.remove.call(elem, handleObj);
  2969. }
  2970. }
  2971. }
  2972. if (origCount && !handlers.length) {
  2973. if (!special.teardown || special.teardown.call(elem, namespaces, elemData.handle) === false) {
  2974. jQuery.removeEvent(elem, type, elemData.handle);
  2975. }
  2976. delete events[type];
  2977. }
  2978. }
  2979. if (jQuery.isEmptyObject(events)) {
  2980. dataPriv.remove(elem, "handle events");
  2981. }
  2982. },
  2983. dispatch: function(nativeEvent) {
  2984. var i, j, ret, matched, handleObj, handlerQueue, args = new Array(arguments.length), event = jQuery.event.fix(nativeEvent), handlers = (dataPriv.get(this, "events") || /* @__PURE__ */ Object.create(null))[event.type] || [], special = jQuery.event.special[event.type] || {};
  2985. args[0] = event;
  2986. for (i = 1; i < arguments.length; i++) {
  2987. args[i] = arguments[i];
  2988. }
  2989. event.delegateTarget = this;
  2990. if (special.preDispatch && special.preDispatch.call(this, event) === false) {
  2991. return;
  2992. }
  2993. handlerQueue = jQuery.event.handlers.call(this, event, handlers);
  2994. i = 0;
  2995. while ((matched = handlerQueue[i++]) && !event.isPropagationStopped()) {
  2996. event.currentTarget = matched.elem;
  2997. j = 0;
  2998. while ((handleObj = matched.handlers[j++]) && !event.isImmediatePropagationStopped()) {
  2999. if (!event.rnamespace || handleObj.namespace === false || event.rnamespace.test(handleObj.namespace)) {
  3000. event.handleObj = handleObj;
  3001. event.data = handleObj.data;
  3002. ret = ((jQuery.event.special[handleObj.origType] || {}).handle || handleObj.handler).apply(matched.elem, args);
  3003. if (ret !== void 0) {
  3004. if ((event.result = ret) === false) {
  3005. event.preventDefault();
  3006. event.stopPropagation();
  3007. }
  3008. }
  3009. }
  3010. }
  3011. }
  3012. if (special.postDispatch) {
  3013. special.postDispatch.call(this, event);
  3014. }
  3015. return event.result;
  3016. },
  3017. handlers: function(event, handlers) {
  3018. var i, handleObj, sel, matchedHandlers, matchedSelectors, handlerQueue = [], delegateCount = handlers.delegateCount, cur = event.target;
  3019. if (delegateCount && // Support: IE <=9
  3020. // Black-hole SVG <use> instance trees (trac-13180)
  3021. cur.nodeType && // Support: Firefox <=42
  3022. // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)
  3023. // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click
  3024. // Support: IE 11 only
  3025. // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343)
  3026. !(event.type === "click" && event.button >= 1)) {
  3027. for (; cur !== this; cur = cur.parentNode || this) {
  3028. if (cur.nodeType === 1 && !(event.type === "click" && cur.disabled === true)) {
  3029. matchedHandlers = [];
  3030. matchedSelectors = {};
  3031. for (i = 0; i < delegateCount; i++) {
  3032. handleObj = handlers[i];
  3033. sel = handleObj.selector + " ";
  3034. if (matchedSelectors[sel] === void 0) {
  3035. matchedSelectors[sel] = handleObj.needsContext ? jQuery(sel, this).index(cur) > -1 : jQuery.find(sel, this, null, [cur]).length;
  3036. }
  3037. if (matchedSelectors[sel]) {
  3038. matchedHandlers.push(handleObj);
  3039. }
  3040. }
  3041. if (matchedHandlers.length) {
  3042. handlerQueue.push({ elem: cur, handlers: matchedHandlers });
  3043. }
  3044. }
  3045. }
  3046. }
  3047. cur = this;
  3048. if (delegateCount < handlers.length) {
  3049. handlerQueue.push({ elem: cur, handlers: handlers.slice(delegateCount) });
  3050. }
  3051. return handlerQueue;
  3052. },
  3053. addProp: function(name, hook) {
  3054. Object.defineProperty(jQuery.Event.prototype, name, {
  3055. enumerable: true,
  3056. configurable: true,
  3057. get: isFunction(hook) ? function() {
  3058. if (this.originalEvent) {
  3059. return hook(this.originalEvent);
  3060. }
  3061. } : function() {
  3062. if (this.originalEvent) {
  3063. return this.originalEvent[name];
  3064. }
  3065. },
  3066. set: function(value) {
  3067. Object.defineProperty(this, name, {
  3068. enumerable: true,
  3069. configurable: true,
  3070. writable: true,
  3071. value
  3072. });
  3073. }
  3074. });
  3075. },
  3076. fix: function(originalEvent) {
  3077. return originalEvent[jQuery.expando] ? originalEvent : new jQuery.Event(originalEvent);
  3078. },
  3079. special: {
  3080. load: {
  3081. // Prevent triggered image.load events from bubbling to window.load
  3082. noBubble: true
  3083. },
  3084. click: {
  3085. // Utilize native event to ensure correct state for checkable inputs
  3086. setup: function(data) {
  3087. var el = this || data;
  3088. if (rcheckableType.test(el.type) && el.click && nodeName(el, "input")) {
  3089. leverageNative(el, "click", true);
  3090. }
  3091. return false;
  3092. },
  3093. trigger: function(data) {
  3094. var el = this || data;
  3095. if (rcheckableType.test(el.type) && el.click && nodeName(el, "input")) {
  3096. leverageNative(el, "click");
  3097. }
  3098. return true;
  3099. },
  3100. // For cross-browser consistency, suppress native .click() on links
  3101. // Also prevent it if we're currently inside a leveraged native-event stack
  3102. _default: function(event) {
  3103. var target = event.target;
  3104. return rcheckableType.test(target.type) && target.click && nodeName(target, "input") && dataPriv.get(target, "click") || nodeName(target, "a");
  3105. }
  3106. },
  3107. beforeunload: {
  3108. postDispatch: function(event) {
  3109. if (event.result !== void 0 && event.originalEvent) {
  3110. event.originalEvent.returnValue = event.result;
  3111. }
  3112. }
  3113. }
  3114. }
  3115. };
  3116. function leverageNative(el, type, isSetup) {
  3117. if (!isSetup) {
  3118. if (dataPriv.get(el, type) === void 0) {
  3119. jQuery.event.add(el, type, returnTrue);
  3120. }
  3121. return;
  3122. }
  3123. dataPriv.set(el, type, false);
  3124. jQuery.event.add(el, type, {
  3125. namespace: false,
  3126. handler: function(event) {
  3127. var result, saved = dataPriv.get(this, type);
  3128. if (event.isTrigger & 1 && this[type]) {
  3129. if (!saved) {
  3130. saved = slice.call(arguments);
  3131. dataPriv.set(this, type, saved);
  3132. this[type]();
  3133. result = dataPriv.get(this, type);
  3134. dataPriv.set(this, type, false);
  3135. if (saved !== result) {
  3136. event.stopImmediatePropagation();
  3137. event.preventDefault();
  3138. return result;
  3139. }
  3140. } else if ((jQuery.event.special[type] || {}).delegateType) {
  3141. event.stopPropagation();
  3142. }
  3143. } else if (saved) {
  3144. dataPriv.set(this, type, jQuery.event.trigger(
  3145. saved[0],
  3146. saved.slice(1),
  3147. this
  3148. ));
  3149. event.stopPropagation();
  3150. event.isImmediatePropagationStopped = returnTrue;
  3151. }
  3152. }
  3153. });
  3154. }
  3155. jQuery.removeEvent = function(elem, type, handle) {
  3156. if (elem.removeEventListener) {
  3157. elem.removeEventListener(type, handle);
  3158. }
  3159. };
  3160. jQuery.Event = function(src, props) {
  3161. if (!(this instanceof jQuery.Event)) {
  3162. return new jQuery.Event(src, props);
  3163. }
  3164. if (src && src.type) {
  3165. this.originalEvent = src;
  3166. this.type = src.type;
  3167. this.isDefaultPrevented = src.defaultPrevented || src.defaultPrevented === void 0 && // Support: Android <=2.3 only
  3168. src.returnValue === false ? returnTrue : returnFalse;
  3169. this.target = src.target && src.target.nodeType === 3 ? src.target.parentNode : src.target;
  3170. this.currentTarget = src.currentTarget;
  3171. this.relatedTarget = src.relatedTarget;
  3172. } else {
  3173. this.type = src;
  3174. }
  3175. if (props) {
  3176. jQuery.extend(this, props);
  3177. }
  3178. this.timeStamp = src && src.timeStamp || Date.now();
  3179. this[jQuery.expando] = true;
  3180. };
  3181. jQuery.Event.prototype = {
  3182. constructor: jQuery.Event,
  3183. isDefaultPrevented: returnFalse,
  3184. isPropagationStopped: returnFalse,
  3185. isImmediatePropagationStopped: returnFalse,
  3186. isSimulated: false,
  3187. preventDefault: function() {
  3188. var e = this.originalEvent;
  3189. this.isDefaultPrevented = returnTrue;
  3190. if (e && !this.isSimulated) {
  3191. e.preventDefault();
  3192. }
  3193. },
  3194. stopPropagation: function() {
  3195. var e = this.originalEvent;
  3196. this.isPropagationStopped = returnTrue;
  3197. if (e && !this.isSimulated) {
  3198. e.stopPropagation();
  3199. }
  3200. },
  3201. stopImmediatePropagation: function() {
  3202. var e = this.originalEvent;
  3203. this.isImmediatePropagationStopped = returnTrue;
  3204. if (e && !this.isSimulated) {
  3205. e.stopImmediatePropagation();
  3206. }
  3207. this.stopPropagation();
  3208. }
  3209. };
  3210. jQuery.each({
  3211. altKey: true,
  3212. bubbles: true,
  3213. cancelable: true,
  3214. changedTouches: true,
  3215. ctrlKey: true,
  3216. detail: true,
  3217. eventPhase: true,
  3218. metaKey: true,
  3219. pageX: true,
  3220. pageY: true,
  3221. shiftKey: true,
  3222. view: true,
  3223. "char": true,
  3224. code: true,
  3225. charCode: true,
  3226. key: true,
  3227. keyCode: true,
  3228. button: true,
  3229. buttons: true,
  3230. clientX: true,
  3231. clientY: true,
  3232. offsetX: true,
  3233. offsetY: true,
  3234. pointerId: true,
  3235. pointerType: true,
  3236. screenX: true,
  3237. screenY: true,
  3238. targetTouches: true,
  3239. toElement: true,
  3240. touches: true,
  3241. which: true
  3242. }, jQuery.event.addProp);
  3243. jQuery.each({ focus: "focusin", blur: "focusout" }, function(type, delegateType) {
  3244. function focusMappedHandler(nativeEvent) {
  3245. if (document2.documentMode) {
  3246. var handle = dataPriv.get(this, "handle"), event = jQuery.event.fix(nativeEvent);
  3247. event.type = nativeEvent.type === "focusin" ? "focus" : "blur";
  3248. event.isSimulated = true;
  3249. handle(nativeEvent);
  3250. if (event.target === event.currentTarget) {
  3251. handle(event);
  3252. }
  3253. } else {
  3254. jQuery.event.simulate(
  3255. delegateType,
  3256. nativeEvent.target,
  3257. jQuery.event.fix(nativeEvent)
  3258. );
  3259. }
  3260. }
  3261. jQuery.event.special[type] = {
  3262. // Utilize native event if possible so blur/focus sequence is correct
  3263. setup: function() {
  3264. var attaches;
  3265. leverageNative(this, type, true);
  3266. if (document2.documentMode) {
  3267. attaches = dataPriv.get(this, delegateType);
  3268. if (!attaches) {
  3269. this.addEventListener(delegateType, focusMappedHandler);
  3270. }
  3271. dataPriv.set(this, delegateType, (attaches || 0) + 1);
  3272. } else {
  3273. return false;
  3274. }
  3275. },
  3276. trigger: function() {
  3277. leverageNative(this, type);
  3278. return true;
  3279. },
  3280. teardown: function() {
  3281. var attaches;
  3282. if (document2.documentMode) {
  3283. attaches = dataPriv.get(this, delegateType) - 1;
  3284. if (!attaches) {
  3285. this.removeEventListener(delegateType, focusMappedHandler);
  3286. dataPriv.remove(this, delegateType);
  3287. } else {
  3288. dataPriv.set(this, delegateType, attaches);
  3289. }
  3290. } else {
  3291. return false;
  3292. }
  3293. },
  3294. // Suppress native focus or blur if we're currently inside
  3295. // a leveraged native-event stack
  3296. _default: function(event) {
  3297. return dataPriv.get(event.target, type);
  3298. },
  3299. delegateType
  3300. };
  3301. jQuery.event.special[delegateType] = {
  3302. setup: function() {
  3303. var doc = this.ownerDocument || this.document || this, dataHolder = document2.documentMode ? this : doc, attaches = dataPriv.get(dataHolder, delegateType);
  3304. if (!attaches) {
  3305. if (document2.documentMode) {
  3306. this.addEventListener(delegateType, focusMappedHandler);
  3307. } else {
  3308. doc.addEventListener(type, focusMappedHandler, true);
  3309. }
  3310. }
  3311. dataPriv.set(dataHolder, delegateType, (attaches || 0) + 1);
  3312. },
  3313. teardown: function() {
  3314. var doc = this.ownerDocument || this.document || this, dataHolder = document2.documentMode ? this : doc, attaches = dataPriv.get(dataHolder, delegateType) - 1;
  3315. if (!attaches) {
  3316. if (document2.documentMode) {
  3317. this.removeEventListener(delegateType, focusMappedHandler);
  3318. } else {
  3319. doc.removeEventListener(type, focusMappedHandler, true);
  3320. }
  3321. dataPriv.remove(dataHolder, delegateType);
  3322. } else {
  3323. dataPriv.set(dataHolder, delegateType, attaches);
  3324. }
  3325. }
  3326. };
  3327. });
  3328. jQuery.each({
  3329. mouseenter: "mouseover",
  3330. mouseleave: "mouseout",
  3331. pointerenter: "pointerover",
  3332. pointerleave: "pointerout"
  3333. }, function(orig, fix) {
  3334. jQuery.event.special[orig] = {
  3335. delegateType: fix,
  3336. bindType: fix,
  3337. handle: function(event) {
  3338. var ret, target = this, related = event.relatedTarget, handleObj = event.handleObj;
  3339. if (!related || related !== target && !jQuery.contains(target, related)) {
  3340. event.type = handleObj.origType;
  3341. ret = handleObj.handler.apply(this, arguments);
  3342. event.type = fix;
  3343. }
  3344. return ret;
  3345. }
  3346. };
  3347. });
  3348. jQuery.fn.extend({
  3349. on: function(types, selector, data, fn) {
  3350. return on(this, types, selector, data, fn);
  3351. },
  3352. one: function(types, selector, data, fn) {
  3353. return on(this, types, selector, data, fn, 1);
  3354. },
  3355. off: function(types, selector, fn) {
  3356. var handleObj, type;
  3357. if (types && types.preventDefault && types.handleObj) {
  3358. handleObj = types.handleObj;
  3359. jQuery(types.delegateTarget).off(
  3360. handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
  3361. handleObj.selector,
  3362. handleObj.handler
  3363. );
  3364. return this;
  3365. }
  3366. if (typeof types === "object") {
  3367. for (type in types) {
  3368. this.off(type, selector, types[type]);
  3369. }
  3370. return this;
  3371. }
  3372. if (selector === false || typeof selector === "function") {
  3373. fn = selector;
  3374. selector = void 0;
  3375. }
  3376. if (fn === false) {
  3377. fn = returnFalse;
  3378. }
  3379. return this.each(function() {
  3380. jQuery.event.remove(this, types, fn, selector);
  3381. });
  3382. }
  3383. });
  3384. var rnoInnerhtml = /<script|<style|<link/i, rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, rcleanScript = /^\s*<!\[CDATA\[|\]\]>\s*$/g;
  3385. function manipulationTarget(elem, content) {
  3386. if (nodeName(elem, "table") && nodeName(content.nodeType !== 11 ? content : content.firstChild, "tr")) {
  3387. return jQuery(elem).children("tbody")[0] || elem;
  3388. }
  3389. return elem;
  3390. }
  3391. function disableScript(elem) {
  3392. elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type;
  3393. return elem;
  3394. }
  3395. function restoreScript(elem) {
  3396. if ((elem.type || "").slice(0, 5) === "true/") {
  3397. elem.type = elem.type.slice(5);
  3398. } else {
  3399. elem.removeAttribute("type");
  3400. }
  3401. return elem;
  3402. }
  3403. function cloneCopyEvent(src, dest) {
  3404. var i, l, type, pdataOld, udataOld, udataCur, events;
  3405. if (dest.nodeType !== 1) {
  3406. return;
  3407. }
  3408. if (dataPriv.hasData(src)) {
  3409. pdataOld = dataPriv.get(src);
  3410. events = pdataOld.events;
  3411. if (events) {
  3412. dataPriv.remove(dest, "handle events");
  3413. for (type in events) {
  3414. for (i = 0, l = events[type].length; i < l; i++) {
  3415. jQuery.event.add(dest, type, events[type][i]);
  3416. }
  3417. }
  3418. }
  3419. }
  3420. if (dataUser.hasData(src)) {
  3421. udataOld = dataUser.access(src);
  3422. udataCur = jQuery.extend({}, udataOld);
  3423. dataUser.set(dest, udataCur);
  3424. }
  3425. }
  3426. function fixInput(src, dest) {
  3427. var nodeName2 = dest.nodeName.toLowerCase();
  3428. if (nodeName2 === "input" && rcheckableType.test(src.type)) {
  3429. dest.checked = src.checked;
  3430. } else if (nodeName2 === "input" || nodeName2 === "textarea") {
  3431. dest.defaultValue = src.defaultValue;
  3432. }
  3433. }
  3434. function domManip(collection, args, callback, ignored) {
  3435. args = flat(args);
  3436. var fragment, first, scripts, hasScripts, node, doc, i = 0, l = collection.length, iNoClone = l - 1, value = args[0], valueIsFunction = isFunction(value);
  3437. if (valueIsFunction || l > 1 && typeof value === "string" && !support.checkClone && rchecked.test(value)) {
  3438. return collection.each(function(index) {
  3439. var self2 = collection.eq(index);
  3440. if (valueIsFunction) {
  3441. args[0] = value.call(this, index, self2.html());
  3442. }
  3443. domManip(self2, args, callback, ignored);
  3444. });
  3445. }
  3446. if (l) {
  3447. fragment = buildFragment(args, collection[0].ownerDocument, false, collection, ignored);
  3448. first = fragment.firstChild;
  3449. if (fragment.childNodes.length === 1) {
  3450. fragment = first;
  3451. }
  3452. if (first || ignored) {
  3453. scripts = jQuery.map(getAll(fragment, "script"), disableScript);
  3454. hasScripts = scripts.length;
  3455. for (; i < l; i++) {
  3456. node = fragment;
  3457. if (i !== iNoClone) {
  3458. node = jQuery.clone(node, true, true);
  3459. if (hasScripts) {
  3460. jQuery.merge(scripts, getAll(node, "script"));
  3461. }
  3462. }
  3463. callback.call(collection[i], node, i);
  3464. }
  3465. if (hasScripts) {
  3466. doc = scripts[scripts.length - 1].ownerDocument;
  3467. jQuery.map(scripts, restoreScript);
  3468. for (i = 0; i < hasScripts; i++) {
  3469. node = scripts[i];
  3470. if (rscriptType.test(node.type || "") && !dataPriv.access(node, "globalEval") && jQuery.contains(doc, node)) {
  3471. if (node.src && (node.type || "").toLowerCase() !== "module") {
  3472. if (jQuery._evalUrl && !node.noModule) {
  3473. jQuery._evalUrl(node.src, {
  3474. nonce: node.nonce || node.getAttribute("nonce")
  3475. }, doc);
  3476. }
  3477. } else {
  3478. DOMEval(node.textContent.replace(rcleanScript, ""), node, doc);
  3479. }
  3480. }
  3481. }
  3482. }
  3483. }
  3484. }
  3485. return collection;
  3486. }
  3487. function remove(elem, selector, keepData) {
  3488. var node, nodes = selector ? jQuery.filter(selector, elem) : elem, i = 0;
  3489. for (; (node = nodes[i]) != null; i++) {
  3490. if (!keepData && node.nodeType === 1) {
  3491. jQuery.cleanData(getAll(node));
  3492. }
  3493. if (node.parentNode) {
  3494. if (keepData && isAttached(node)) {
  3495. setGlobalEval(getAll(node, "script"));
  3496. }
  3497. node.parentNode.removeChild(node);
  3498. }
  3499. }
  3500. return elem;
  3501. }
  3502. jQuery.extend({
  3503. htmlPrefilter: function(html) {
  3504. return html;
  3505. },
  3506. clone: function(elem, dataAndEvents, deepDataAndEvents) {
  3507. var i, l, srcElements, destElements, clone = elem.cloneNode(true), inPage = isAttached(elem);
  3508. if (!support.noCloneChecked && (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem)) {
  3509. destElements = getAll(clone);
  3510. srcElements = getAll(elem);
  3511. for (i = 0, l = srcElements.length; i < l; i++) {
  3512. fixInput(srcElements[i], destElements[i]);
  3513. }
  3514. }
  3515. if (dataAndEvents) {
  3516. if (deepDataAndEvents) {
  3517. srcElements = srcElements || getAll(elem);
  3518. destElements = destElements || getAll(clone);
  3519. for (i = 0, l = srcElements.length; i < l; i++) {
  3520. cloneCopyEvent(srcElements[i], destElements[i]);
  3521. }
  3522. } else {
  3523. cloneCopyEvent(elem, clone);
  3524. }
  3525. }
  3526. destElements = getAll(clone, "script");
  3527. if (destElements.length > 0) {
  3528. setGlobalEval(destElements, !inPage && getAll(elem, "script"));
  3529. }
  3530. return clone;
  3531. },
  3532. cleanData: function(elems) {
  3533. var data, elem, type, special = jQuery.event.special, i = 0;
  3534. for (; (elem = elems[i]) !== void 0; i++) {
  3535. if (acceptData(elem)) {
  3536. if (data = elem[dataPriv.expando]) {
  3537. if (data.events) {
  3538. for (type in data.events) {
  3539. if (special[type]) {
  3540. jQuery.event.remove(elem, type);
  3541. } else {
  3542. jQuery.removeEvent(elem, type, data.handle);
  3543. }
  3544. }
  3545. }
  3546. elem[dataPriv.expando] = void 0;
  3547. }
  3548. if (elem[dataUser.expando]) {
  3549. elem[dataUser.expando] = void 0;
  3550. }
  3551. }
  3552. }
  3553. }
  3554. });
  3555. jQuery.fn.extend({
  3556. detach: function(selector) {
  3557. return remove(this, selector, true);
  3558. },
  3559. remove: function(selector) {
  3560. return remove(this, selector);
  3561. },
  3562. text: function(value) {
  3563. return access(this, function(value2) {
  3564. return value2 === void 0 ? jQuery.text(this) : this.empty().each(function() {
  3565. if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
  3566. this.textContent = value2;
  3567. }
  3568. });
  3569. }, null, value, arguments.length);
  3570. },
  3571. append: function() {
  3572. return domManip(this, arguments, function(elem) {
  3573. if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
  3574. var target = manipulationTarget(this, elem);
  3575. target.appendChild(elem);
  3576. }
  3577. });
  3578. },
  3579. prepend: function() {
  3580. return domManip(this, arguments, function(elem) {
  3581. if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
  3582. var target = manipulationTarget(this, elem);
  3583. target.insertBefore(elem, target.firstChild);
  3584. }
  3585. });
  3586. },
  3587. before: function() {
  3588. return domManip(this, arguments, function(elem) {
  3589. if (this.parentNode) {
  3590. this.parentNode.insertBefore(elem, this);
  3591. }
  3592. });
  3593. },
  3594. after: function() {
  3595. return domManip(this, arguments, function(elem) {
  3596. if (this.parentNode) {
  3597. this.parentNode.insertBefore(elem, this.nextSibling);
  3598. }
  3599. });
  3600. },
  3601. empty: function() {
  3602. var elem, i = 0;
  3603. for (; (elem = this[i]) != null; i++) {
  3604. if (elem.nodeType === 1) {
  3605. jQuery.cleanData(getAll(elem, false));
  3606. elem.textContent = "";
  3607. }
  3608. }
  3609. return this;
  3610. },
  3611. clone: function(dataAndEvents, deepDataAndEvents) {
  3612. dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
  3613. deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
  3614. return this.map(function() {
  3615. return jQuery.clone(this, dataAndEvents, deepDataAndEvents);
  3616. });
  3617. },
  3618. html: function(value) {
  3619. return access(this, function(value2) {
  3620. var elem = this[0] || {}, i = 0, l = this.length;
  3621. if (value2 === void 0 && elem.nodeType === 1) {
  3622. return elem.innerHTML;
  3623. }
  3624. if (typeof value2 === "string" && !rnoInnerhtml.test(value2) && !wrapMap[(rtagName.exec(value2) || ["", ""])[1].toLowerCase()]) {
  3625. value2 = jQuery.htmlPrefilter(value2);
  3626. try {
  3627. for (; i < l; i++) {
  3628. elem = this[i] || {};
  3629. if (elem.nodeType === 1) {
  3630. jQuery.cleanData(getAll(elem, false));
  3631. elem.innerHTML = value2;
  3632. }
  3633. }
  3634. elem = 0;
  3635. } catch (e) {
  3636. }
  3637. }
  3638. if (elem) {
  3639. this.empty().append(value2);
  3640. }
  3641. }, null, value, arguments.length);
  3642. },
  3643. replaceWith: function() {
  3644. var ignored = [];
  3645. return domManip(this, arguments, function(elem) {
  3646. var parent = this.parentNode;
  3647. if (jQuery.inArray(this, ignored) < 0) {
  3648. jQuery.cleanData(getAll(this));
  3649. if (parent) {
  3650. parent.replaceChild(elem, this);
  3651. }
  3652. }
  3653. }, ignored);
  3654. }
  3655. });
  3656. jQuery.each({
  3657. appendTo: "append",
  3658. prependTo: "prepend",
  3659. insertBefore: "before",
  3660. insertAfter: "after",
  3661. replaceAll: "replaceWith"
  3662. }, function(name, original) {
  3663. jQuery.fn[name] = function(selector) {
  3664. var elems, ret = [], insert = jQuery(selector), last = insert.length - 1, i = 0;
  3665. for (; i <= last; i++) {
  3666. elems = i === last ? this : this.clone(true);
  3667. jQuery(insert[i])[original](elems);
  3668. push.apply(ret, elems.get());
  3669. }
  3670. return this.pushStack(ret);
  3671. };
  3672. });
  3673. var rnumnonpx = new RegExp("^(" + pnum + ")(?!px)[a-z%]+$", "i");
  3674. var rcustomProp = /^--/;
  3675. var getStyles = function(elem) {
  3676. var view = elem.ownerDocument.defaultView;
  3677. if (!view || !view.opener) {
  3678. view = window2;
  3679. }
  3680. return view.getComputedStyle(elem);
  3681. };
  3682. var swap = function(elem, options, callback) {
  3683. var ret, name, old = {};
  3684. for (name in options) {
  3685. old[name] = elem.style[name];
  3686. elem.style[name] = options[name];
  3687. }
  3688. ret = callback.call(elem);
  3689. for (name in options) {
  3690. elem.style[name] = old[name];
  3691. }
  3692. return ret;
  3693. };
  3694. var rboxStyle = new RegExp(cssExpand.join("|"), "i");
  3695. (function() {
  3696. function computeStyleTests() {
  3697. if (!div) {
  3698. return;
  3699. }
  3700. container.style.cssText = "position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0";
  3701. div.style.cssText = "position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%";
  3702. documentElement.appendChild(container).appendChild(div);
  3703. var divStyle = window2.getComputedStyle(div);
  3704. pixelPositionVal = divStyle.top !== "1%";
  3705. reliableMarginLeftVal = roundPixelMeasures(divStyle.marginLeft) === 12;
  3706. div.style.right = "60%";
  3707. pixelBoxStylesVal = roundPixelMeasures(divStyle.right) === 36;
  3708. boxSizingReliableVal = roundPixelMeasures(divStyle.width) === 36;
  3709. div.style.position = "absolute";
  3710. scrollboxSizeVal = roundPixelMeasures(div.offsetWidth / 3) === 12;
  3711. documentElement.removeChild(container);
  3712. div = null;
  3713. }
  3714. function roundPixelMeasures(measure) {
  3715. return Math.round(parseFloat(measure));
  3716. }
  3717. var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, reliableTrDimensionsVal, reliableMarginLeftVal, container = document2.createElement("div"), div = document2.createElement("div");
  3718. if (!div.style) {
  3719. return;
  3720. }
  3721. div.style.backgroundClip = "content-box";
  3722. div.cloneNode(true).style.backgroundClip = "";
  3723. support.clearCloneStyle = div.style.backgroundClip === "content-box";
  3724. jQuery.extend(support, {
  3725. boxSizingReliable: function() {
  3726. computeStyleTests();
  3727. return boxSizingReliableVal;
  3728. },
  3729. pixelBoxStyles: function() {
  3730. computeStyleTests();
  3731. return pixelBoxStylesVal;
  3732. },
  3733. pixelPosition: function() {
  3734. computeStyleTests();
  3735. return pixelPositionVal;
  3736. },
  3737. reliableMarginLeft: function() {
  3738. computeStyleTests();
  3739. return reliableMarginLeftVal;
  3740. },
  3741. scrollboxSize: function() {
  3742. computeStyleTests();
  3743. return scrollboxSizeVal;
  3744. },
  3745. // Support: IE 9 - 11+, Edge 15 - 18+
  3746. // IE/Edge misreport `getComputedStyle` of table rows with width/height
  3747. // set in CSS while `offset*` properties report correct values.
  3748. // Behavior in IE 9 is more subtle than in newer versions & it passes
  3749. // some versions of this test; make sure not to make it pass there!
  3750. //
  3751. // Support: Firefox 70+
  3752. // Only Firefox includes border widths
  3753. // in computed dimensions. (gh-4529)
  3754. reliableTrDimensions: function() {
  3755. var table, tr, trChild, trStyle;
  3756. if (reliableTrDimensionsVal == null) {
  3757. table = document2.createElement("table");
  3758. tr = document2.createElement("tr");
  3759. trChild = document2.createElement("div");
  3760. table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate";
  3761. tr.style.cssText = "box-sizing:content-box;border:1px solid";
  3762. tr.style.height = "1px";
  3763. trChild.style.height = "9px";
  3764. trChild.style.display = "block";
  3765. documentElement.appendChild(table).appendChild(tr).appendChild(trChild);
  3766. trStyle = window2.getComputedStyle(tr);
  3767. reliableTrDimensionsVal = parseInt(trStyle.height, 10) + parseInt(trStyle.borderTopWidth, 10) + parseInt(trStyle.borderBottomWidth, 10) === tr.offsetHeight;
  3768. documentElement.removeChild(table);
  3769. }
  3770. return reliableTrDimensionsVal;
  3771. }
  3772. });
  3773. })();
  3774. function curCSS(elem, name, computed) {
  3775. var width, minWidth, maxWidth, ret, isCustomProp = rcustomProp.test(name), style = elem.style;
  3776. computed = computed || getStyles(elem);
  3777. if (computed) {
  3778. ret = computed.getPropertyValue(name) || computed[name];
  3779. if (isCustomProp && ret) {
  3780. ret = ret.replace(rtrimCSS, "$1") || void 0;
  3781. }
  3782. if (ret === "" && !isAttached(elem)) {
  3783. ret = jQuery.style(elem, name);
  3784. }
  3785. if (!support.pixelBoxStyles() && rnumnonpx.test(ret) && rboxStyle.test(name)) {
  3786. width = style.width;
  3787. minWidth = style.minWidth;
  3788. maxWidth = style.maxWidth;
  3789. style.minWidth = style.maxWidth = style.width = ret;
  3790. ret = computed.width;
  3791. style.width = width;
  3792. style.minWidth = minWidth;
  3793. style.maxWidth = maxWidth;
  3794. }
  3795. }
  3796. return ret !== void 0 ? (
  3797. // Support: IE <=9 - 11 only
  3798. // IE returns zIndex value as an integer.
  3799. ret + ""
  3800. ) : ret;
  3801. }
  3802. function addGetHookIf(conditionFn, hookFn) {
  3803. return {
  3804. get: function() {
  3805. if (conditionFn()) {
  3806. delete this.get;
  3807. return;
  3808. }
  3809. return (this.get = hookFn).apply(this, arguments);
  3810. }
  3811. };
  3812. }
  3813. var cssPrefixes = ["Webkit", "Moz", "ms"], emptyStyle = document2.createElement("div").style, vendorProps = {};
  3814. function vendorPropName(name) {
  3815. var capName = name[0].toUpperCase() + name.slice(1), i = cssPrefixes.length;
  3816. while (i--) {
  3817. name = cssPrefixes[i] + capName;
  3818. if (name in emptyStyle) {
  3819. return name;
  3820. }
  3821. }
  3822. }
  3823. function finalPropName(name) {
  3824. var final = jQuery.cssProps[name] || vendorProps[name];
  3825. if (final) {
  3826. return final;
  3827. }
  3828. if (name in emptyStyle) {
  3829. return name;
  3830. }
  3831. return vendorProps[name] = vendorPropName(name) || name;
  3832. }
  3833. var rdisplayswap = /^(none|table(?!-c[ea]).+)/, cssShow = { position: "absolute", visibility: "hidden", display: "block" }, cssNormalTransform = {
  3834. letterSpacing: "0",
  3835. fontWeight: "400"
  3836. };
  3837. function setPositiveNumber(_elem, value, subtract) {
  3838. var matches = rcssNum.exec(value);
  3839. return matches ? (
  3840. // Guard against undefined "subtract", e.g., when used as in cssHooks
  3841. Math.max(0, matches[2] - (subtract || 0)) + (matches[3] || "px")
  3842. ) : value;
  3843. }
  3844. function boxModelAdjustment(elem, dimension, box, isBorderBox, styles, computedVal) {
  3845. var i = dimension === "width" ? 1 : 0, extra = 0, delta = 0, marginDelta = 0;
  3846. if (box === (isBorderBox ? "border" : "content")) {
  3847. return 0;
  3848. }
  3849. for (; i < 4; i += 2) {
  3850. if (box === "margin") {
  3851. marginDelta += jQuery.css(elem, box + cssExpand[i], true, styles);
  3852. }
  3853. if (!isBorderBox) {
  3854. delta += jQuery.css(elem, "padding" + cssExpand[i], true, styles);
  3855. if (box !== "padding") {
  3856. delta += jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles);
  3857. } else {
  3858. extra += jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles);
  3859. }
  3860. } else {
  3861. if (box === "content") {
  3862. delta -= jQuery.css(elem, "padding" + cssExpand[i], true, styles);
  3863. }
  3864. if (box !== "margin") {
  3865. delta -= jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles);
  3866. }
  3867. }
  3868. }
  3869. if (!isBorderBox && computedVal >= 0) {
  3870. delta += Math.max(0, Math.ceil(
  3871. elem["offset" + dimension[0].toUpperCase() + dimension.slice(1)] - computedVal - delta - extra - 0.5
  3872. // If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter
  3873. // Use an explicit zero to avoid NaN (gh-3964)
  3874. )) || 0;
  3875. }
  3876. return delta + marginDelta;
  3877. }
  3878. function getWidthOrHeight(elem, dimension, extra) {
  3879. var styles = getStyles(elem), boxSizingNeeded = !support.boxSizingReliable() || extra, isBorderBox = boxSizingNeeded && jQuery.css(elem, "boxSizing", false, styles) === "border-box", valueIsBorderBox = isBorderBox, val = curCSS(elem, dimension, styles), offsetProp = "offset" + dimension[0].toUpperCase() + dimension.slice(1);
  3880. if (rnumnonpx.test(val)) {
  3881. if (!extra) {
  3882. return val;
  3883. }
  3884. val = "auto";
  3885. }
  3886. if ((!support.boxSizingReliable() && isBorderBox || // Support: IE 10 - 11+, Edge 15 - 18+
  3887. // IE/Edge misreport `getComputedStyle` of table rows with width/height
  3888. // set in CSS while `offset*` properties report correct values.
  3889. // Interestingly, in some cases IE 9 doesn't suffer from this issue.
  3890. !support.reliableTrDimensions() && nodeName(elem, "tr") || // Fall back to offsetWidth/offsetHeight when value is "auto"
  3891. // This happens for inline elements with no explicit setting (gh-3571)
  3892. val === "auto" || // Support: Android <=4.1 - 4.3 only
  3893. // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)
  3894. !parseFloat(val) && jQuery.css(elem, "display", false, styles) === "inline") && // Make sure the element is visible & connected
  3895. elem.getClientRects().length) {
  3896. isBorderBox = jQuery.css(elem, "boxSizing", false, styles) === "border-box";
  3897. valueIsBorderBox = offsetProp in elem;
  3898. if (valueIsBorderBox) {
  3899. val = elem[offsetProp];
  3900. }
  3901. }
  3902. val = parseFloat(val) || 0;
  3903. return val + boxModelAdjustment(
  3904. elem,
  3905. dimension,
  3906. extra || (isBorderBox ? "border" : "content"),
  3907. valueIsBorderBox,
  3908. styles,
  3909. // Provide the current computed size to request scroll gutter calculation (gh-3589)
  3910. val
  3911. ) + "px";
  3912. }
  3913. jQuery.extend({
  3914. // Add in style property hooks for overriding the default
  3915. // behavior of getting and setting a style property
  3916. cssHooks: {
  3917. opacity: {
  3918. get: function(elem, computed) {
  3919. if (computed) {
  3920. var ret = curCSS(elem, "opacity");
  3921. return ret === "" ? "1" : ret;
  3922. }
  3923. }
  3924. }
  3925. },
  3926. // Don't automatically add "px" to these possibly-unitless properties
  3927. cssNumber: {
  3928. animationIterationCount: true,
  3929. aspectRatio: true,
  3930. borderImageSlice: true,
  3931. columnCount: true,
  3932. flexGrow: true,
  3933. flexShrink: true,
  3934. fontWeight: true,
  3935. gridArea: true,
  3936. gridColumn: true,
  3937. gridColumnEnd: true,
  3938. gridColumnStart: true,
  3939. gridRow: true,
  3940. gridRowEnd: true,
  3941. gridRowStart: true,
  3942. lineHeight: true,
  3943. opacity: true,
  3944. order: true,
  3945. orphans: true,
  3946. scale: true,
  3947. widows: true,
  3948. zIndex: true,
  3949. zoom: true,
  3950. // SVG-related
  3951. fillOpacity: true,
  3952. floodOpacity: true,
  3953. stopOpacity: true,
  3954. strokeMiterlimit: true,
  3955. strokeOpacity: true
  3956. },
  3957. // Add in properties whose names you wish to fix before
  3958. // setting or getting the value
  3959. cssProps: {},
  3960. // Get and set the style property on a DOM Node
  3961. style: function(elem, name, value, extra) {
  3962. if (!elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style) {
  3963. return;
  3964. }
  3965. var ret, type, hooks, origName = camelCase(name), isCustomProp = rcustomProp.test(name), style = elem.style;
  3966. if (!isCustomProp) {
  3967. name = finalPropName(origName);
  3968. }
  3969. hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName];
  3970. if (value !== void 0) {
  3971. type = typeof value;
  3972. if (type === "string" && (ret = rcssNum.exec(value)) && ret[1]) {
  3973. value = adjustCSS(elem, name, ret);
  3974. type = "number";
  3975. }
  3976. if (value == null || value !== value) {
  3977. return;
  3978. }
  3979. if (type === "number" && !isCustomProp) {
  3980. value += ret && ret[3] || (jQuery.cssNumber[origName] ? "" : "px");
  3981. }
  3982. if (!support.clearCloneStyle && value === "" && name.indexOf("background") === 0) {
  3983. style[name] = "inherit";
  3984. }
  3985. if (!hooks || !("set" in hooks) || (value = hooks.set(elem, value, extra)) !== void 0) {
  3986. if (isCustomProp) {
  3987. style.setProperty(name, value);
  3988. } else {
  3989. style[name] = value;
  3990. }
  3991. }
  3992. } else {
  3993. if (hooks && "get" in hooks && (ret = hooks.get(elem, false, extra)) !== void 0) {
  3994. return ret;
  3995. }
  3996. return style[name];
  3997. }
  3998. },
  3999. css: function(elem, name, extra, styles) {
  4000. var val, num, hooks, origName = camelCase(name), isCustomProp = rcustomProp.test(name);
  4001. if (!isCustomProp) {
  4002. name = finalPropName(origName);
  4003. }
  4004. hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName];
  4005. if (hooks && "get" in hooks) {
  4006. val = hooks.get(elem, true, extra);
  4007. }
  4008. if (val === void 0) {
  4009. val = curCSS(elem, name, styles);
  4010. }
  4011. if (val === "normal" && name in cssNormalTransform) {
  4012. val = cssNormalTransform[name];
  4013. }
  4014. if (extra === "" || extra) {
  4015. num = parseFloat(val);
  4016. return extra === true || isFinite(num) ? num || 0 : val;
  4017. }
  4018. return val;
  4019. }
  4020. });
  4021. jQuery.each(["height", "width"], function(_i, dimension) {
  4022. jQuery.cssHooks[dimension] = {
  4023. get: function(elem, computed, extra) {
  4024. if (computed) {
  4025. return rdisplayswap.test(jQuery.css(elem, "display")) && // Support: Safari 8+
  4026. // Table columns in Safari have non-zero offsetWidth & zero
  4027. // getBoundingClientRect().width unless display is changed.
  4028. // Support: IE <=11 only
  4029. // Running getBoundingClientRect on a disconnected node
  4030. // in IE throws an error.
  4031. (!elem.getClientRects().length || !elem.getBoundingClientRect().width) ? swap(elem, cssShow, function() {
  4032. return getWidthOrHeight(elem, dimension, extra);
  4033. }) : getWidthOrHeight(elem, dimension, extra);
  4034. }
  4035. },
  4036. set: function(elem, value, extra) {
  4037. var matches, styles = getStyles(elem), scrollboxSizeBuggy = !support.scrollboxSize() && styles.position === "absolute", boxSizingNeeded = scrollboxSizeBuggy || extra, isBorderBox = boxSizingNeeded && jQuery.css(elem, "boxSizing", false, styles) === "border-box", subtract = extra ? boxModelAdjustment(
  4038. elem,
  4039. dimension,
  4040. extra,
  4041. isBorderBox,
  4042. styles
  4043. ) : 0;
  4044. if (isBorderBox && scrollboxSizeBuggy) {
  4045. subtract -= Math.ceil(
  4046. elem["offset" + dimension[0].toUpperCase() + dimension.slice(1)] - parseFloat(styles[dimension]) - boxModelAdjustment(elem, dimension, "border", false, styles) - 0.5
  4047. );
  4048. }
  4049. if (subtract && (matches = rcssNum.exec(value)) && (matches[3] || "px") !== "px") {
  4050. elem.style[dimension] = value;
  4051. value = jQuery.css(elem, dimension);
  4052. }
  4053. return setPositiveNumber(elem, value, subtract);
  4054. }
  4055. };
  4056. });
  4057. jQuery.cssHooks.marginLeft = addGetHookIf(
  4058. support.reliableMarginLeft,
  4059. function(elem, computed) {
  4060. if (computed) {
  4061. return (parseFloat(curCSS(elem, "marginLeft")) || elem.getBoundingClientRect().left - swap(elem, { marginLeft: 0 }, function() {
  4062. return elem.getBoundingClientRect().left;
  4063. })) + "px";
  4064. }
  4065. }
  4066. );
  4067. jQuery.each({
  4068. margin: "",
  4069. padding: "",
  4070. border: "Width"
  4071. }, function(prefix, suffix) {
  4072. jQuery.cssHooks[prefix + suffix] = {
  4073. expand: function(value) {
  4074. var i = 0, expanded = {}, parts = typeof value === "string" ? value.split(" ") : [value];
  4075. for (; i < 4; i++) {
  4076. expanded[prefix + cssExpand[i] + suffix] = parts[i] || parts[i - 2] || parts[0];
  4077. }
  4078. return expanded;
  4079. }
  4080. };
  4081. if (prefix !== "margin") {
  4082. jQuery.cssHooks[prefix + suffix].set = setPositiveNumber;
  4083. }
  4084. });
  4085. jQuery.fn.extend({
  4086. css: function(name, value) {
  4087. return access(this, function(elem, name2, value2) {
  4088. var styles, len, map = {}, i = 0;
  4089. if (Array.isArray(name2)) {
  4090. styles = getStyles(elem);
  4091. len = name2.length;
  4092. for (; i < len; i++) {
  4093. map[name2[i]] = jQuery.css(elem, name2[i], false, styles);
  4094. }
  4095. return map;
  4096. }
  4097. return value2 !== void 0 ? jQuery.style(elem, name2, value2) : jQuery.css(elem, name2);
  4098. }, name, value, arguments.length > 1);
  4099. }
  4100. });
  4101. function Tween(elem, options, prop, end, easing) {
  4102. return new Tween.prototype.init(elem, options, prop, end, easing);
  4103. }
  4104. jQuery.Tween = Tween;
  4105. Tween.prototype = {
  4106. constructor: Tween,
  4107. init: function(elem, options, prop, end, easing, unit) {
  4108. this.elem = elem;
  4109. this.prop = prop;
  4110. this.easing = easing || jQuery.easing._default;
  4111. this.options = options;
  4112. this.start = this.now = this.cur();
  4113. this.end = end;
  4114. this.unit = unit || (jQuery.cssNumber[prop] ? "" : "px");
  4115. },
  4116. cur: function() {
  4117. var hooks = Tween.propHooks[this.prop];
  4118. return hooks && hooks.get ? hooks.get(this) : Tween.propHooks._default.get(this);
  4119. },
  4120. run: function(percent) {
  4121. var eased, hooks = Tween.propHooks[this.prop];
  4122. if (this.options.duration) {
  4123. this.pos = eased = jQuery.easing[this.easing](
  4124. percent,
  4125. this.options.duration * percent,
  4126. 0,
  4127. 1,
  4128. this.options.duration
  4129. );
  4130. } else {
  4131. this.pos = eased = percent;
  4132. }
  4133. this.now = (this.end - this.start) * eased + this.start;
  4134. if (this.options.step) {
  4135. this.options.step.call(this.elem, this.now, this);
  4136. }
  4137. if (hooks && hooks.set) {
  4138. hooks.set(this);
  4139. } else {
  4140. Tween.propHooks._default.set(this);
  4141. }
  4142. return this;
  4143. }
  4144. };
  4145. Tween.prototype.init.prototype = Tween.prototype;
  4146. Tween.propHooks = {
  4147. _default: {
  4148. get: function(tween) {
  4149. var result;
  4150. if (tween.elem.nodeType !== 1 || tween.elem[tween.prop] != null && tween.elem.style[tween.prop] == null) {
  4151. return tween.elem[tween.prop];
  4152. }
  4153. result = jQuery.css(tween.elem, tween.prop, "");
  4154. return !result || result === "auto" ? 0 : result;
  4155. },
  4156. set: function(tween) {
  4157. if (jQuery.fx.step[tween.prop]) {
  4158. jQuery.fx.step[tween.prop](tween);
  4159. } else if (tween.elem.nodeType === 1 && (jQuery.cssHooks[tween.prop] || tween.elem.style[finalPropName(tween.prop)] != null)) {
  4160. jQuery.style(tween.elem, tween.prop, tween.now + tween.unit);
  4161. } else {
  4162. tween.elem[tween.prop] = tween.now;
  4163. }
  4164. }
  4165. }
  4166. };
  4167. Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
  4168. set: function(tween) {
  4169. if (tween.elem.nodeType && tween.elem.parentNode) {
  4170. tween.elem[tween.prop] = tween.now;
  4171. }
  4172. }
  4173. };
  4174. jQuery.easing = {
  4175. linear: function(p) {
  4176. return p;
  4177. },
  4178. swing: function(p) {
  4179. return 0.5 - Math.cos(p * Math.PI) / 2;
  4180. },
  4181. _default: "swing"
  4182. };
  4183. jQuery.fx = Tween.prototype.init;
  4184. jQuery.fx.step = {};
  4185. var fxNow, inProgress, rfxtypes = /^(?:toggle|show|hide)$/, rrun = /queueHooks$/;
  4186. function schedule() {
  4187. if (inProgress) {
  4188. if (document2.hidden === false && window2.requestAnimationFrame) {
  4189. window2.requestAnimationFrame(schedule);
  4190. } else {
  4191. window2.setTimeout(schedule, jQuery.fx.interval);
  4192. }
  4193. jQuery.fx.tick();
  4194. }
  4195. }
  4196. function createFxNow() {
  4197. window2.setTimeout(function() {
  4198. fxNow = void 0;
  4199. });
  4200. return fxNow = Date.now();
  4201. }
  4202. function genFx(type, includeWidth) {
  4203. var which, i = 0, attrs = { height: type };
  4204. includeWidth = includeWidth ? 1 : 0;
  4205. for (; i < 4; i += 2 - includeWidth) {
  4206. which = cssExpand[i];
  4207. attrs["margin" + which] = attrs["padding" + which] = type;
  4208. }
  4209. if (includeWidth) {
  4210. attrs.opacity = attrs.width = type;
  4211. }
  4212. return attrs;
  4213. }
  4214. function createTween(value, prop, animation) {
  4215. var tween, collection = (Animation.tweeners[prop] || []).concat(Animation.tweeners["*"]), index = 0, length = collection.length;
  4216. for (; index < length; index++) {
  4217. if (tween = collection[index].call(animation, prop, value)) {
  4218. return tween;
  4219. }
  4220. }
  4221. }
  4222. function defaultPrefilter(elem, props, opts) {
  4223. var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, isBox = "width" in props || "height" in props, anim = this, orig = {}, style = elem.style, hidden = elem.nodeType && isHiddenWithinTree(elem), dataShow = dataPriv.get(elem, "fxshow");
  4224. if (!opts.queue) {
  4225. hooks = jQuery._queueHooks(elem, "fx");
  4226. if (hooks.unqueued == null) {
  4227. hooks.unqueued = 0;
  4228. oldfire = hooks.empty.fire;
  4229. hooks.empty.fire = function() {
  4230. if (!hooks.unqueued) {
  4231. oldfire();
  4232. }
  4233. };
  4234. }
  4235. hooks.unqueued++;
  4236. anim.always(function() {
  4237. anim.always(function() {
  4238. hooks.unqueued--;
  4239. if (!jQuery.queue(elem, "fx").length) {
  4240. hooks.empty.fire();
  4241. }
  4242. });
  4243. });
  4244. }
  4245. for (prop in props) {
  4246. value = props[prop];
  4247. if (rfxtypes.test(value)) {
  4248. delete props[prop];
  4249. toggle = toggle || value === "toggle";
  4250. if (value === (hidden ? "hide" : "show")) {
  4251. if (value === "show" && dataShow && dataShow[prop] !== void 0) {
  4252. hidden = true;
  4253. } else {
  4254. continue;
  4255. }
  4256. }
  4257. orig[prop] = dataShow && dataShow[prop] || jQuery.style(elem, prop);
  4258. }
  4259. }
  4260. propTween = !jQuery.isEmptyObject(props);
  4261. if (!propTween && jQuery.isEmptyObject(orig)) {
  4262. return;
  4263. }
  4264. if (isBox && elem.nodeType === 1) {
  4265. opts.overflow = [style.overflow, style.overflowX, style.overflowY];
  4266. restoreDisplay = dataShow && dataShow.display;
  4267. if (restoreDisplay == null) {
  4268. restoreDisplay = dataPriv.get(elem, "display");
  4269. }
  4270. display = jQuery.css(elem, "display");
  4271. if (display === "none") {
  4272. if (restoreDisplay) {
  4273. display = restoreDisplay;
  4274. } else {
  4275. showHide([elem], true);
  4276. restoreDisplay = elem.style.display || restoreDisplay;
  4277. display = jQuery.css(elem, "display");
  4278. showHide([elem]);
  4279. }
  4280. }
  4281. if (display === "inline" || display === "inline-block" && restoreDisplay != null) {
  4282. if (jQuery.css(elem, "float") === "none") {
  4283. if (!propTween) {
  4284. anim.done(function() {
  4285. style.display = restoreDisplay;
  4286. });
  4287. if (restoreDisplay == null) {
  4288. display = style.display;
  4289. restoreDisplay = display === "none" ? "" : display;
  4290. }
  4291. }
  4292. style.display = "inline-block";
  4293. }
  4294. }
  4295. }
  4296. if (opts.overflow) {
  4297. style.overflow = "hidden";
  4298. anim.always(function() {
  4299. style.overflow = opts.overflow[0];
  4300. style.overflowX = opts.overflow[1];
  4301. style.overflowY = opts.overflow[2];
  4302. });
  4303. }
  4304. propTween = false;
  4305. for (prop in orig) {
  4306. if (!propTween) {
  4307. if (dataShow) {
  4308. if ("hidden" in dataShow) {
  4309. hidden = dataShow.hidden;
  4310. }
  4311. } else {
  4312. dataShow = dataPriv.access(elem, "fxshow", { display: restoreDisplay });
  4313. }
  4314. if (toggle) {
  4315. dataShow.hidden = !hidden;
  4316. }
  4317. if (hidden) {
  4318. showHide([elem], true);
  4319. }
  4320. anim.done(function() {
  4321. if (!hidden) {
  4322. showHide([elem]);
  4323. }
  4324. dataPriv.remove(elem, "fxshow");
  4325. for (prop in orig) {
  4326. jQuery.style(elem, prop, orig[prop]);
  4327. }
  4328. });
  4329. }
  4330. propTween = createTween(hidden ? dataShow[prop] : 0, prop, anim);
  4331. if (!(prop in dataShow)) {
  4332. dataShow[prop] = propTween.start;
  4333. if (hidden) {
  4334. propTween.end = propTween.start;
  4335. propTween.start = 0;
  4336. }
  4337. }
  4338. }
  4339. }
  4340. function propFilter(props, specialEasing) {
  4341. var index, name, easing, value, hooks;
  4342. for (index in props) {
  4343. name = camelCase(index);
  4344. easing = specialEasing[name];
  4345. value = props[index];
  4346. if (Array.isArray(value)) {
  4347. easing = value[1];
  4348. value = props[index] = value[0];
  4349. }
  4350. if (index !== name) {
  4351. props[name] = value;
  4352. delete props[index];
  4353. }
  4354. hooks = jQuery.cssHooks[name];
  4355. if (hooks && "expand" in hooks) {
  4356. value = hooks.expand(value);
  4357. delete props[name];
  4358. for (index in value) {
  4359. if (!(index in props)) {
  4360. props[index] = value[index];
  4361. specialEasing[index] = easing;
  4362. }
  4363. }
  4364. } else {
  4365. specialEasing[name] = easing;
  4366. }
  4367. }
  4368. }
  4369. function Animation(elem, properties, options) {
  4370. var result, stopped, index = 0, length = Animation.prefilters.length, deferred = jQuery.Deferred().always(function() {
  4371. delete tick.elem;
  4372. }), tick = function() {
  4373. if (stopped) {
  4374. return false;
  4375. }
  4376. var currentTime = fxNow || createFxNow(), remaining = Math.max(0, animation.startTime + animation.duration - currentTime), temp = remaining / animation.duration || 0, percent = 1 - temp, index2 = 0, length2 = animation.tweens.length;
  4377. for (; index2 < length2; index2++) {
  4378. animation.tweens[index2].run(percent);
  4379. }
  4380. deferred.notifyWith(elem, [animation, percent, remaining]);
  4381. if (percent < 1 && length2) {
  4382. return remaining;
  4383. }
  4384. if (!length2) {
  4385. deferred.notifyWith(elem, [animation, 1, 0]);
  4386. }
  4387. deferred.resolveWith(elem, [animation]);
  4388. return false;
  4389. }, animation = deferred.promise({
  4390. elem,
  4391. props: jQuery.extend({}, properties),
  4392. opts: jQuery.extend(true, {
  4393. specialEasing: {},
  4394. easing: jQuery.easing._default
  4395. }, options),
  4396. originalProperties: properties,
  4397. originalOptions: options,
  4398. startTime: fxNow || createFxNow(),
  4399. duration: options.duration,
  4400. tweens: [],
  4401. createTween: function(prop, end) {
  4402. var tween = jQuery.Tween(
  4403. elem,
  4404. animation.opts,
  4405. prop,
  4406. end,
  4407. animation.opts.specialEasing[prop] || animation.opts.easing
  4408. );
  4409. animation.tweens.push(tween);
  4410. return tween;
  4411. },
  4412. stop: function(gotoEnd) {
  4413. var index2 = 0, length2 = gotoEnd ? animation.tweens.length : 0;
  4414. if (stopped) {
  4415. return this;
  4416. }
  4417. stopped = true;
  4418. for (; index2 < length2; index2++) {
  4419. animation.tweens[index2].run(1);
  4420. }
  4421. if (gotoEnd) {
  4422. deferred.notifyWith(elem, [animation, 1, 0]);
  4423. deferred.resolveWith(elem, [animation, gotoEnd]);
  4424. } else {
  4425. deferred.rejectWith(elem, [animation, gotoEnd]);
  4426. }
  4427. return this;
  4428. }
  4429. }), props = animation.props;
  4430. propFilter(props, animation.opts.specialEasing);
  4431. for (; index < length; index++) {
  4432. result = Animation.prefilters[index].call(animation, elem, props, animation.opts);
  4433. if (result) {
  4434. if (isFunction(result.stop)) {
  4435. jQuery._queueHooks(animation.elem, animation.opts.queue).stop = result.stop.bind(result);
  4436. }
  4437. return result;
  4438. }
  4439. }
  4440. jQuery.map(props, createTween, animation);
  4441. if (isFunction(animation.opts.start)) {
  4442. animation.opts.start.call(elem, animation);
  4443. }
  4444. animation.progress(animation.opts.progress).done(animation.opts.done, animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always);
  4445. jQuery.fx.timer(
  4446. jQuery.extend(tick, {
  4447. elem,
  4448. anim: animation,
  4449. queue: animation.opts.queue
  4450. })
  4451. );
  4452. return animation;
  4453. }
  4454. jQuery.Animation = jQuery.extend(Animation, {
  4455. tweeners: {
  4456. "*": [function(prop, value) {
  4457. var tween = this.createTween(prop, value);
  4458. adjustCSS(tween.elem, prop, rcssNum.exec(value), tween);
  4459. return tween;
  4460. }]
  4461. },
  4462. tweener: function(props, callback) {
  4463. if (isFunction(props)) {
  4464. callback = props;
  4465. props = ["*"];
  4466. } else {
  4467. props = props.match(rnothtmlwhite);
  4468. }
  4469. var prop, index = 0, length = props.length;
  4470. for (; index < length; index++) {
  4471. prop = props[index];
  4472. Animation.tweeners[prop] = Animation.tweeners[prop] || [];
  4473. Animation.tweeners[prop].unshift(callback);
  4474. }
  4475. },
  4476. prefilters: [defaultPrefilter],
  4477. prefilter: function(callback, prepend) {
  4478. if (prepend) {
  4479. Animation.prefilters.unshift(callback);
  4480. } else {
  4481. Animation.prefilters.push(callback);
  4482. }
  4483. }
  4484. });
  4485. jQuery.speed = function(speed, easing, fn) {
  4486. var opt = speed && typeof speed === "object" ? jQuery.extend({}, speed) : {
  4487. complete: fn || !fn && easing || isFunction(speed) && speed,
  4488. duration: speed,
  4489. easing: fn && easing || easing && !isFunction(easing) && easing
  4490. };
  4491. if (jQuery.fx.off) {
  4492. opt.duration = 0;
  4493. } else {
  4494. if (typeof opt.duration !== "number") {
  4495. if (opt.duration in jQuery.fx.speeds) {
  4496. opt.duration = jQuery.fx.speeds[opt.duration];
  4497. } else {
  4498. opt.duration = jQuery.fx.speeds._default;
  4499. }
  4500. }
  4501. }
  4502. if (opt.queue == null || opt.queue === true) {
  4503. opt.queue = "fx";
  4504. }
  4505. opt.old = opt.complete;
  4506. opt.complete = function() {
  4507. if (isFunction(opt.old)) {
  4508. opt.old.call(this);
  4509. }
  4510. if (opt.queue) {
  4511. jQuery.dequeue(this, opt.queue);
  4512. }
  4513. };
  4514. return opt;
  4515. };
  4516. jQuery.fn.extend({
  4517. fadeTo: function(speed, to, easing, callback) {
  4518. return this.filter(isHiddenWithinTree).css("opacity", 0).show().end().animate({ opacity: to }, speed, easing, callback);
  4519. },
  4520. animate: function(prop, speed, easing, callback) {
  4521. var empty = jQuery.isEmptyObject(prop), optall = jQuery.speed(speed, easing, callback), doAnimation = function() {
  4522. var anim = Animation(this, jQuery.extend({}, prop), optall);
  4523. if (empty || dataPriv.get(this, "finish")) {
  4524. anim.stop(true);
  4525. }
  4526. };
  4527. doAnimation.finish = doAnimation;
  4528. return empty || optall.queue === false ? this.each(doAnimation) : this.queue(optall.queue, doAnimation);
  4529. },
  4530. stop: function(type, clearQueue, gotoEnd) {
  4531. var stopQueue = function(hooks) {
  4532. var stop = hooks.stop;
  4533. delete hooks.stop;
  4534. stop(gotoEnd);
  4535. };
  4536. if (typeof type !== "string") {
  4537. gotoEnd = clearQueue;
  4538. clearQueue = type;
  4539. type = void 0;
  4540. }
  4541. if (clearQueue) {
  4542. this.queue(type || "fx", []);
  4543. }
  4544. return this.each(function() {
  4545. var dequeue = true, index = type != null && type + "queueHooks", timers = jQuery.timers, data = dataPriv.get(this);
  4546. if (index) {
  4547. if (data[index] && data[index].stop) {
  4548. stopQueue(data[index]);
  4549. }
  4550. } else {
  4551. for (index in data) {
  4552. if (data[index] && data[index].stop && rrun.test(index)) {
  4553. stopQueue(data[index]);
  4554. }
  4555. }
  4556. }
  4557. for (index = timers.length; index--; ) {
  4558. if (timers[index].elem === this && (type == null || timers[index].queue === type)) {
  4559. timers[index].anim.stop(gotoEnd);
  4560. dequeue = false;
  4561. timers.splice(index, 1);
  4562. }
  4563. }
  4564. if (dequeue || !gotoEnd) {
  4565. jQuery.dequeue(this, type);
  4566. }
  4567. });
  4568. },
  4569. finish: function(type) {
  4570. if (type !== false) {
  4571. type = type || "fx";
  4572. }
  4573. return this.each(function() {
  4574. var index, data = dataPriv.get(this), queue = data[type + "queue"], hooks = data[type + "queueHooks"], timers = jQuery.timers, length = queue ? queue.length : 0;
  4575. data.finish = true;
  4576. jQuery.queue(this, type, []);
  4577. if (hooks && hooks.stop) {
  4578. hooks.stop.call(this, true);
  4579. }
  4580. for (index = timers.length; index--; ) {
  4581. if (timers[index].elem === this && timers[index].queue === type) {
  4582. timers[index].anim.stop(true);
  4583. timers.splice(index, 1);
  4584. }
  4585. }
  4586. for (index = 0; index < length; index++) {
  4587. if (queue[index] && queue[index].finish) {
  4588. queue[index].finish.call(this);
  4589. }
  4590. }
  4591. delete data.finish;
  4592. });
  4593. }
  4594. });
  4595. jQuery.each(["toggle", "show", "hide"], function(_i, name) {
  4596. var cssFn = jQuery.fn[name];
  4597. jQuery.fn[name] = function(speed, easing, callback) {
  4598. return speed == null || typeof speed === "boolean" ? cssFn.apply(this, arguments) : this.animate(genFx(name, true), speed, easing, callback);
  4599. };
  4600. });
  4601. jQuery.each({
  4602. slideDown: genFx("show"),
  4603. slideUp: genFx("hide"),
  4604. slideToggle: genFx("toggle"),
  4605. fadeIn: { opacity: "show" },
  4606. fadeOut: { opacity: "hide" },
  4607. fadeToggle: { opacity: "toggle" }
  4608. }, function(name, props) {
  4609. jQuery.fn[name] = function(speed, easing, callback) {
  4610. return this.animate(props, speed, easing, callback);
  4611. };
  4612. });
  4613. jQuery.timers = [];
  4614. jQuery.fx.tick = function() {
  4615. var timer, i = 0, timers = jQuery.timers;
  4616. fxNow = Date.now();
  4617. for (; i < timers.length; i++) {
  4618. timer = timers[i];
  4619. if (!timer() && timers[i] === timer) {
  4620. timers.splice(i--, 1);
  4621. }
  4622. }
  4623. if (!timers.length) {
  4624. jQuery.fx.stop();
  4625. }
  4626. fxNow = void 0;
  4627. };
  4628. jQuery.fx.timer = function(timer) {
  4629. jQuery.timers.push(timer);
  4630. jQuery.fx.start();
  4631. };
  4632. jQuery.fx.interval = 13;
  4633. jQuery.fx.start = function() {
  4634. if (inProgress) {
  4635. return;
  4636. }
  4637. inProgress = true;
  4638. schedule();
  4639. };
  4640. jQuery.fx.stop = function() {
  4641. inProgress = null;
  4642. };
  4643. jQuery.fx.speeds = {
  4644. slow: 600,
  4645. fast: 200,
  4646. // Default speed
  4647. _default: 400
  4648. };
  4649. jQuery.fn.delay = function(time, type) {
  4650. time = jQuery.fx ? jQuery.fx.speeds[time] || time : time;
  4651. type = type || "fx";
  4652. return this.queue(type, function(next, hooks) {
  4653. var timeout = window2.setTimeout(next, time);
  4654. hooks.stop = function() {
  4655. window2.clearTimeout(timeout);
  4656. };
  4657. });
  4658. };
  4659. (function() {
  4660. var input = document2.createElement("input"), select = document2.createElement("select"), opt = select.appendChild(document2.createElement("option"));
  4661. input.type = "checkbox";
  4662. support.checkOn = input.value !== "";
  4663. support.optSelected = opt.selected;
  4664. input = document2.createElement("input");
  4665. input.value = "t";
  4666. input.type = "radio";
  4667. support.radioValue = input.value === "t";
  4668. })();
  4669. var boolHook, attrHandle = jQuery.expr.attrHandle;
  4670. jQuery.fn.extend({
  4671. attr: function(name, value) {
  4672. return access(this, jQuery.attr, name, value, arguments.length > 1);
  4673. },
  4674. removeAttr: function(name) {
  4675. return this.each(function() {
  4676. jQuery.removeAttr(this, name);
  4677. });
  4678. }
  4679. });
  4680. jQuery.extend({
  4681. attr: function(elem, name, value) {
  4682. var ret, hooks, nType = elem.nodeType;
  4683. if (nType === 3 || nType === 8 || nType === 2) {
  4684. return;
  4685. }
  4686. if (typeof elem.getAttribute === "undefined") {
  4687. return jQuery.prop(elem, name, value);
  4688. }
  4689. if (nType !== 1 || !jQuery.isXMLDoc(elem)) {
  4690. hooks = jQuery.attrHooks[name.toLowerCase()] || (jQuery.expr.match.bool.test(name) ? boolHook : void 0);
  4691. }
  4692. if (value !== void 0) {
  4693. if (value === null) {
  4694. jQuery.removeAttr(elem, name);
  4695. return;
  4696. }
  4697. if (hooks && "set" in hooks && (ret = hooks.set(elem, value, name)) !== void 0) {
  4698. return ret;
  4699. }
  4700. elem.setAttribute(name, value + "");
  4701. return value;
  4702. }
  4703. if (hooks && "get" in hooks && (ret = hooks.get(elem, name)) !== null) {
  4704. return ret;
  4705. }
  4706. ret = jQuery.find.attr(elem, name);
  4707. return ret == null ? void 0 : ret;
  4708. },
  4709. attrHooks: {
  4710. type: {
  4711. set: function(elem, value) {
  4712. if (!support.radioValue && value === "radio" && nodeName(elem, "input")) {
  4713. var val = elem.value;
  4714. elem.setAttribute("type", value);
  4715. if (val) {
  4716. elem.value = val;
  4717. }
  4718. return value;
  4719. }
  4720. }
  4721. }
  4722. },
  4723. removeAttr: function(elem, value) {
  4724. var name, i = 0, attrNames = value && value.match(rnothtmlwhite);
  4725. if (attrNames && elem.nodeType === 1) {
  4726. while (name = attrNames[i++]) {
  4727. elem.removeAttribute(name);
  4728. }
  4729. }
  4730. }
  4731. });
  4732. boolHook = {
  4733. set: function(elem, value, name) {
  4734. if (value === false) {
  4735. jQuery.removeAttr(elem, name);
  4736. } else {
  4737. elem.setAttribute(name, name);
  4738. }
  4739. return name;
  4740. }
  4741. };
  4742. jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g), function(_i, name) {
  4743. var getter = attrHandle[name] || jQuery.find.attr;
  4744. attrHandle[name] = function(elem, name2, isXML) {
  4745. var ret, handle, lowercaseName = name2.toLowerCase();
  4746. if (!isXML) {
  4747. handle = attrHandle[lowercaseName];
  4748. attrHandle[lowercaseName] = ret;
  4749. ret = getter(elem, name2, isXML) != null ? lowercaseName : null;
  4750. attrHandle[lowercaseName] = handle;
  4751. }
  4752. return ret;
  4753. };
  4754. });
  4755. var rfocusable = /^(?:input|select|textarea|button)$/i, rclickable = /^(?:a|area)$/i;
  4756. jQuery.fn.extend({
  4757. prop: function(name, value) {
  4758. return access(this, jQuery.prop, name, value, arguments.length > 1);
  4759. },
  4760. removeProp: function(name) {
  4761. return this.each(function() {
  4762. delete this[jQuery.propFix[name] || name];
  4763. });
  4764. }
  4765. });
  4766. jQuery.extend({
  4767. prop: function(elem, name, value) {
  4768. var ret, hooks, nType = elem.nodeType;
  4769. if (nType === 3 || nType === 8 || nType === 2) {
  4770. return;
  4771. }
  4772. if (nType !== 1 || !jQuery.isXMLDoc(elem)) {
  4773. name = jQuery.propFix[name] || name;
  4774. hooks = jQuery.propHooks[name];
  4775. }
  4776. if (value !== void 0) {
  4777. if (hooks && "set" in hooks && (ret = hooks.set(elem, value, name)) !== void 0) {
  4778. return ret;
  4779. }
  4780. return elem[name] = value;
  4781. }
  4782. if (hooks && "get" in hooks && (ret = hooks.get(elem, name)) !== null) {
  4783. return ret;
  4784. }
  4785. return elem[name];
  4786. },
  4787. propHooks: {
  4788. tabIndex: {
  4789. get: function(elem) {
  4790. var tabindex = jQuery.find.attr(elem, "tabindex");
  4791. if (tabindex) {
  4792. return parseInt(tabindex, 10);
  4793. }
  4794. if (rfocusable.test(elem.nodeName) || rclickable.test(elem.nodeName) && elem.href) {
  4795. return 0;
  4796. }
  4797. return -1;
  4798. }
  4799. }
  4800. },
  4801. propFix: {
  4802. "for": "htmlFor",
  4803. "class": "className"
  4804. }
  4805. });
  4806. if (!support.optSelected) {
  4807. jQuery.propHooks.selected = {
  4808. get: function(elem) {
  4809. var parent = elem.parentNode;
  4810. if (parent && parent.parentNode) {
  4811. parent.parentNode.selectedIndex;
  4812. }
  4813. return null;
  4814. },
  4815. set: function(elem) {
  4816. var parent = elem.parentNode;
  4817. if (parent) {
  4818. parent.selectedIndex;
  4819. if (parent.parentNode) {
  4820. parent.parentNode.selectedIndex;
  4821. }
  4822. }
  4823. }
  4824. };
  4825. }
  4826. jQuery.each([
  4827. "tabIndex",
  4828. "readOnly",
  4829. "maxLength",
  4830. "cellSpacing",
  4831. "cellPadding",
  4832. "rowSpan",
  4833. "colSpan",
  4834. "useMap",
  4835. "frameBorder",
  4836. "contentEditable"
  4837. ], function() {
  4838. jQuery.propFix[this.toLowerCase()] = this;
  4839. });
  4840. function stripAndCollapse(value) {
  4841. var tokens = value.match(rnothtmlwhite) || [];
  4842. return tokens.join(" ");
  4843. }
  4844. function getClass(elem) {
  4845. return elem.getAttribute && elem.getAttribute("class") || "";
  4846. }
  4847. function classesToArray(value) {
  4848. if (Array.isArray(value)) {
  4849. return value;
  4850. }
  4851. if (typeof value === "string") {
  4852. return value.match(rnothtmlwhite) || [];
  4853. }
  4854. return [];
  4855. }
  4856. jQuery.fn.extend({
  4857. addClass: function(value) {
  4858. var classNames, cur, curValue, className, i, finalValue;
  4859. if (isFunction(value)) {
  4860. return this.each(function(j) {
  4861. jQuery(this).addClass(value.call(this, j, getClass(this)));
  4862. });
  4863. }
  4864. classNames = classesToArray(value);
  4865. if (classNames.length) {
  4866. return this.each(function() {
  4867. curValue = getClass(this);
  4868. cur = this.nodeType === 1 && " " + stripAndCollapse(curValue) + " ";
  4869. if (cur) {
  4870. for (i = 0; i < classNames.length; i++) {
  4871. className = classNames[i];
  4872. if (cur.indexOf(" " + className + " ") < 0) {
  4873. cur += className + " ";
  4874. }
  4875. }
  4876. finalValue = stripAndCollapse(cur);
  4877. if (curValue !== finalValue) {
  4878. this.setAttribute("class", finalValue);
  4879. }
  4880. }
  4881. });
  4882. }
  4883. return this;
  4884. },
  4885. removeClass: function(value) {
  4886. var classNames, cur, curValue, className, i, finalValue;
  4887. if (isFunction(value)) {
  4888. return this.each(function(j) {
  4889. jQuery(this).removeClass(value.call(this, j, getClass(this)));
  4890. });
  4891. }
  4892. if (!arguments.length) {
  4893. return this.attr("class", "");
  4894. }
  4895. classNames = classesToArray(value);
  4896. if (classNames.length) {
  4897. return this.each(function() {
  4898. curValue = getClass(this);
  4899. cur = this.nodeType === 1 && " " + stripAndCollapse(curValue) + " ";
  4900. if (cur) {
  4901. for (i = 0; i < classNames.length; i++) {
  4902. className = classNames[i];
  4903. while (cur.indexOf(" " + className + " ") > -1) {
  4904. cur = cur.replace(" " + className + " ", " ");
  4905. }
  4906. }
  4907. finalValue = stripAndCollapse(cur);
  4908. if (curValue !== finalValue) {
  4909. this.setAttribute("class", finalValue);
  4910. }
  4911. }
  4912. });
  4913. }
  4914. return this;
  4915. },
  4916. toggleClass: function(value, stateVal) {
  4917. var classNames, className, i, self2, type = typeof value, isValidValue = type === "string" || Array.isArray(value);
  4918. if (isFunction(value)) {
  4919. return this.each(function(i2) {
  4920. jQuery(this).toggleClass(
  4921. value.call(this, i2, getClass(this), stateVal),
  4922. stateVal
  4923. );
  4924. });
  4925. }
  4926. if (typeof stateVal === "boolean" && isValidValue) {
  4927. return stateVal ? this.addClass(value) : this.removeClass(value);
  4928. }
  4929. classNames = classesToArray(value);
  4930. return this.each(function() {
  4931. if (isValidValue) {
  4932. self2 = jQuery(this);
  4933. for (i = 0; i < classNames.length; i++) {
  4934. className = classNames[i];
  4935. if (self2.hasClass(className)) {
  4936. self2.removeClass(className);
  4937. } else {
  4938. self2.addClass(className);
  4939. }
  4940. }
  4941. } else if (value === void 0 || type === "boolean") {
  4942. className = getClass(this);
  4943. if (className) {
  4944. dataPriv.set(this, "__className__", className);
  4945. }
  4946. if (this.setAttribute) {
  4947. this.setAttribute(
  4948. "class",
  4949. className || value === false ? "" : dataPriv.get(this, "__className__") || ""
  4950. );
  4951. }
  4952. }
  4953. });
  4954. },
  4955. hasClass: function(selector) {
  4956. var className, elem, i = 0;
  4957. className = " " + selector + " ";
  4958. while (elem = this[i++]) {
  4959. if (elem.nodeType === 1 && (" " + stripAndCollapse(getClass(elem)) + " ").indexOf(className) > -1) {
  4960. return true;
  4961. }
  4962. }
  4963. return false;
  4964. }
  4965. });
  4966. var rreturn = /\r/g;
  4967. jQuery.fn.extend({
  4968. val: function(value) {
  4969. var hooks, ret, valueIsFunction, elem = this[0];
  4970. if (!arguments.length) {
  4971. if (elem) {
  4972. hooks = jQuery.valHooks[elem.type] || jQuery.valHooks[elem.nodeName.toLowerCase()];
  4973. if (hooks && "get" in hooks && (ret = hooks.get(elem, "value")) !== void 0) {
  4974. return ret;
  4975. }
  4976. ret = elem.value;
  4977. if (typeof ret === "string") {
  4978. return ret.replace(rreturn, "");
  4979. }
  4980. return ret == null ? "" : ret;
  4981. }
  4982. return;
  4983. }
  4984. valueIsFunction = isFunction(value);
  4985. return this.each(function(i) {
  4986. var val;
  4987. if (this.nodeType !== 1) {
  4988. return;
  4989. }
  4990. if (valueIsFunction) {
  4991. val = value.call(this, i, jQuery(this).val());
  4992. } else {
  4993. val = value;
  4994. }
  4995. if (val == null) {
  4996. val = "";
  4997. } else if (typeof val === "number") {
  4998. val += "";
  4999. } else if (Array.isArray(val)) {
  5000. val = jQuery.map(val, function(value2) {
  5001. return value2 == null ? "" : value2 + "";
  5002. });
  5003. }
  5004. hooks = jQuery.valHooks[this.type] || jQuery.valHooks[this.nodeName.toLowerCase()];
  5005. if (!hooks || !("set" in hooks) || hooks.set(this, val, "value") === void 0) {
  5006. this.value = val;
  5007. }
  5008. });
  5009. }
  5010. });
  5011. jQuery.extend({
  5012. valHooks: {
  5013. option: {
  5014. get: function(elem) {
  5015. var val = jQuery.find.attr(elem, "value");
  5016. return val != null ? val : (
  5017. // Support: IE <=10 - 11 only
  5018. // option.text throws exceptions (trac-14686, trac-14858)
  5019. // Strip and collapse whitespace
  5020. // https://html.spec.whatwg.org/#strip-and-collapse-whitespace
  5021. stripAndCollapse(jQuery.text(elem))
  5022. );
  5023. }
  5024. },
  5025. select: {
  5026. get: function(elem) {
  5027. var value, option, i, options = elem.options, index = elem.selectedIndex, one = elem.type === "select-one", values = one ? null : [], max = one ? index + 1 : options.length;
  5028. if (index < 0) {
  5029. i = max;
  5030. } else {
  5031. i = one ? index : 0;
  5032. }
  5033. for (; i < max; i++) {
  5034. option = options[i];
  5035. if ((option.selected || i === index) && // Don't return options that are disabled or in a disabled optgroup
  5036. !option.disabled && (!option.parentNode.disabled || !nodeName(option.parentNode, "optgroup"))) {
  5037. value = jQuery(option).val();
  5038. if (one) {
  5039. return value;
  5040. }
  5041. values.push(value);
  5042. }
  5043. }
  5044. return values;
  5045. },
  5046. set: function(elem, value) {
  5047. var optionSet, option, options = elem.options, values = jQuery.makeArray(value), i = options.length;
  5048. while (i--) {
  5049. option = options[i];
  5050. if (option.selected = jQuery.inArray(jQuery.valHooks.option.get(option), values) > -1) {
  5051. optionSet = true;
  5052. }
  5053. }
  5054. if (!optionSet) {
  5055. elem.selectedIndex = -1;
  5056. }
  5057. return values;
  5058. }
  5059. }
  5060. }
  5061. });
  5062. jQuery.each(["radio", "checkbox"], function() {
  5063. jQuery.valHooks[this] = {
  5064. set: function(elem, value) {
  5065. if (Array.isArray(value)) {
  5066. return elem.checked = jQuery.inArray(jQuery(elem).val(), value) > -1;
  5067. }
  5068. }
  5069. };
  5070. if (!support.checkOn) {
  5071. jQuery.valHooks[this].get = function(elem) {
  5072. return elem.getAttribute("value") === null ? "on" : elem.value;
  5073. };
  5074. }
  5075. });
  5076. var location2 = window2.location;
  5077. var nonce = { guid: Date.now() };
  5078. var rquery = /\?/;
  5079. jQuery.parseXML = function(data) {
  5080. var xml, parserErrorElem;
  5081. if (!data || typeof data !== "string") {
  5082. return null;
  5083. }
  5084. try {
  5085. xml = new window2.DOMParser().parseFromString(data, "text/xml");
  5086. } catch (e) {
  5087. }
  5088. parserErrorElem = xml && xml.getElementsByTagName("parsererror")[0];
  5089. if (!xml || parserErrorElem) {
  5090. jQuery.error("Invalid XML: " + (parserErrorElem ? jQuery.map(parserErrorElem.childNodes, function(el) {
  5091. return el.textContent;
  5092. }).join("\n") : data));
  5093. }
  5094. return xml;
  5095. };
  5096. var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, stopPropagationCallback = function(e) {
  5097. e.stopPropagation();
  5098. };
  5099. jQuery.extend(jQuery.event, {
  5100. trigger: function(event, data, elem, onlyHandlers) {
  5101. var i, cur, tmp, bubbleType, ontype, handle, special, lastElement, eventPath = [elem || document2], type = hasOwn.call(event, "type") ? event.type : event, namespaces = hasOwn.call(event, "namespace") ? event.namespace.split(".") : [];
  5102. cur = lastElement = tmp = elem = elem || document2;
  5103. if (elem.nodeType === 3 || elem.nodeType === 8) {
  5104. return;
  5105. }
  5106. if (rfocusMorph.test(type + jQuery.event.triggered)) {
  5107. return;
  5108. }
  5109. if (type.indexOf(".") > -1) {
  5110. namespaces = type.split(".");
  5111. type = namespaces.shift();
  5112. namespaces.sort();
  5113. }
  5114. ontype = type.indexOf(":") < 0 && "on" + type;
  5115. event = event[jQuery.expando] ? event : new jQuery.Event(type, typeof event === "object" && event);
  5116. event.isTrigger = onlyHandlers ? 2 : 3;
  5117. event.namespace = namespaces.join(".");
  5118. event.rnamespace = event.namespace ? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null;
  5119. event.result = void 0;
  5120. if (!event.target) {
  5121. event.target = elem;
  5122. }
  5123. data = data == null ? [event] : jQuery.makeArray(data, [event]);
  5124. special = jQuery.event.special[type] || {};
  5125. if (!onlyHandlers && special.trigger && special.trigger.apply(elem, data) === false) {
  5126. return;
  5127. }
  5128. if (!onlyHandlers && !special.noBubble && !isWindow(elem)) {
  5129. bubbleType = special.delegateType || type;
  5130. if (!rfocusMorph.test(bubbleType + type)) {
  5131. cur = cur.parentNode;
  5132. }
  5133. for (; cur; cur = cur.parentNode) {
  5134. eventPath.push(cur);
  5135. tmp = cur;
  5136. }
  5137. if (tmp === (elem.ownerDocument || document2)) {
  5138. eventPath.push(tmp.defaultView || tmp.parentWindow || window2);
  5139. }
  5140. }
  5141. i = 0;
  5142. while ((cur = eventPath[i++]) && !event.isPropagationStopped()) {
  5143. lastElement = cur;
  5144. event.type = i > 1 ? bubbleType : special.bindType || type;
  5145. handle = (dataPriv.get(cur, "events") || /* @__PURE__ */ Object.create(null))[event.type] && dataPriv.get(cur, "handle");
  5146. if (handle) {
  5147. handle.apply(cur, data);
  5148. }
  5149. handle = ontype && cur[ontype];
  5150. if (handle && handle.apply && acceptData(cur)) {
  5151. event.result = handle.apply(cur, data);
  5152. if (event.result === false) {
  5153. event.preventDefault();
  5154. }
  5155. }
  5156. }
  5157. event.type = type;
  5158. if (!onlyHandlers && !event.isDefaultPrevented()) {
  5159. if ((!special._default || special._default.apply(eventPath.pop(), data) === false) && acceptData(elem)) {
  5160. if (ontype && isFunction(elem[type]) && !isWindow(elem)) {
  5161. tmp = elem[ontype];
  5162. if (tmp) {
  5163. elem[ontype] = null;
  5164. }
  5165. jQuery.event.triggered = type;
  5166. if (event.isPropagationStopped()) {
  5167. lastElement.addEventListener(type, stopPropagationCallback);
  5168. }
  5169. elem[type]();
  5170. if (event.isPropagationStopped()) {
  5171. lastElement.removeEventListener(type, stopPropagationCallback);
  5172. }
  5173. jQuery.event.triggered = void 0;
  5174. if (tmp) {
  5175. elem[ontype] = tmp;
  5176. }
  5177. }
  5178. }
  5179. }
  5180. return event.result;
  5181. },
  5182. // Piggyback on a donor event to simulate a different one
  5183. // Used only for `focus(in | out)` events
  5184. simulate: function(type, elem, event) {
  5185. var e = jQuery.extend(
  5186. new jQuery.Event(),
  5187. event,
  5188. {
  5189. type,
  5190. isSimulated: true
  5191. }
  5192. );
  5193. jQuery.event.trigger(e, null, elem);
  5194. }
  5195. });
  5196. jQuery.fn.extend({
  5197. trigger: function(type, data) {
  5198. return this.each(function() {
  5199. jQuery.event.trigger(type, data, this);
  5200. });
  5201. },
  5202. triggerHandler: function(type, data) {
  5203. var elem = this[0];
  5204. if (elem) {
  5205. return jQuery.event.trigger(type, data, elem, true);
  5206. }
  5207. }
  5208. });
  5209. var rbracket = /\[\]$/, rCRLF = /\r?\n/g, rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, rsubmittable = /^(?:input|select|textarea|keygen)/i;
  5210. function buildParams(prefix, obj, traditional, add) {
  5211. var name;
  5212. if (Array.isArray(obj)) {
  5213. jQuery.each(obj, function(i, v) {
  5214. if (traditional || rbracket.test(prefix)) {
  5215. add(prefix, v);
  5216. } else {
  5217. buildParams(
  5218. prefix + "[" + (typeof v === "object" && v != null ? i : "") + "]",
  5219. v,
  5220. traditional,
  5221. add
  5222. );
  5223. }
  5224. });
  5225. } else if (!traditional && toType(obj) === "object") {
  5226. for (name in obj) {
  5227. buildParams(prefix + "[" + name + "]", obj[name], traditional, add);
  5228. }
  5229. } else {
  5230. add(prefix, obj);
  5231. }
  5232. }
  5233. jQuery.param = function(a, traditional) {
  5234. var prefix, s = [], add = function(key, valueOrFunction) {
  5235. var value = isFunction(valueOrFunction) ? valueOrFunction() : valueOrFunction;
  5236. s[s.length] = encodeURIComponent(key) + "=" + encodeURIComponent(value == null ? "" : value);
  5237. };
  5238. if (a == null) {
  5239. return "";
  5240. }
  5241. if (Array.isArray(a) || a.jquery && !jQuery.isPlainObject(a)) {
  5242. jQuery.each(a, function() {
  5243. add(this.name, this.value);
  5244. });
  5245. } else {
  5246. for (prefix in a) {
  5247. buildParams(prefix, a[prefix], traditional, add);
  5248. }
  5249. }
  5250. return s.join("&");
  5251. };
  5252. jQuery.fn.extend({
  5253. serialize: function() {
  5254. return jQuery.param(this.serializeArray());
  5255. },
  5256. serializeArray: function() {
  5257. return this.map(function() {
  5258. var elements = jQuery.prop(this, "elements");
  5259. return elements ? jQuery.makeArray(elements) : this;
  5260. }).filter(function() {
  5261. var type = this.type;
  5262. return this.name && !jQuery(this).is(":disabled") && rsubmittable.test(this.nodeName) && !rsubmitterTypes.test(type) && (this.checked || !rcheckableType.test(type));
  5263. }).map(function(_i, elem) {
  5264. var val = jQuery(this).val();
  5265. if (val == null) {
  5266. return null;
  5267. }
  5268. if (Array.isArray(val)) {
  5269. return jQuery.map(val, function(val2) {
  5270. return { name: elem.name, value: val2.replace(rCRLF, "\r\n") };
  5271. });
  5272. }
  5273. return { name: elem.name, value: val.replace(rCRLF, "\r\n") };
  5274. }).get();
  5275. }
  5276. });
  5277. var r20 = /%20/g, rhash = /#.*$/, rantiCache = /([?&])_=[^&]*/, rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, rnoContent = /^(?:GET|HEAD)$/, rprotocol = /^\/\//, prefilters = {}, transports = {}, allTypes = "*/".concat("*"), originAnchor = document2.createElement("a");
  5278. originAnchor.href = location2.href;
  5279. function addToPrefiltersOrTransports(structure) {
  5280. return function(dataTypeExpression, func) {
  5281. if (typeof dataTypeExpression !== "string") {
  5282. func = dataTypeExpression;
  5283. dataTypeExpression = "*";
  5284. }
  5285. var dataType, i = 0, dataTypes = dataTypeExpression.toLowerCase().match(rnothtmlwhite) || [];
  5286. if (isFunction(func)) {
  5287. while (dataType = dataTypes[i++]) {
  5288. if (dataType[0] === "+") {
  5289. dataType = dataType.slice(1) || "*";
  5290. (structure[dataType] = structure[dataType] || []).unshift(func);
  5291. } else {
  5292. (structure[dataType] = structure[dataType] || []).push(func);
  5293. }
  5294. }
  5295. }
  5296. };
  5297. }
  5298. function inspectPrefiltersOrTransports(structure, options, originalOptions, jqXHR) {
  5299. var inspected = {}, seekingTransport = structure === transports;
  5300. function inspect(dataType) {
  5301. var selected;
  5302. inspected[dataType] = true;
  5303. jQuery.each(structure[dataType] || [], function(_, prefilterOrFactory) {
  5304. var dataTypeOrTransport = prefilterOrFactory(options, originalOptions, jqXHR);
  5305. if (typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[dataTypeOrTransport]) {
  5306. options.dataTypes.unshift(dataTypeOrTransport);
  5307. inspect(dataTypeOrTransport);
  5308. return false;
  5309. } else if (seekingTransport) {
  5310. return !(selected = dataTypeOrTransport);
  5311. }
  5312. });
  5313. return selected;
  5314. }
  5315. return inspect(options.dataTypes[0]) || !inspected["*"] && inspect("*");
  5316. }
  5317. function ajaxExtend(target, src) {
  5318. var key, deep, flatOptions = jQuery.ajaxSettings.flatOptions || {};
  5319. for (key in src) {
  5320. if (src[key] !== void 0) {
  5321. (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];
  5322. }
  5323. }
  5324. if (deep) {
  5325. jQuery.extend(true, target, deep);
  5326. }
  5327. return target;
  5328. }
  5329. function ajaxHandleResponses(s, jqXHR, responses) {
  5330. var ct, type, finalDataType, firstDataType, contents = s.contents, dataTypes = s.dataTypes;
  5331. while (dataTypes[0] === "*") {
  5332. dataTypes.shift();
  5333. if (ct === void 0) {
  5334. ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
  5335. }
  5336. }
  5337. if (ct) {
  5338. for (type in contents) {
  5339. if (contents[type] && contents[type].test(ct)) {
  5340. dataTypes.unshift(type);
  5341. break;
  5342. }
  5343. }
  5344. }
  5345. if (dataTypes[0] in responses) {
  5346. finalDataType = dataTypes[0];
  5347. } else {
  5348. for (type in responses) {
  5349. if (!dataTypes[0] || s.converters[type + " " + dataTypes[0]]) {
  5350. finalDataType = type;
  5351. break;
  5352. }
  5353. if (!firstDataType) {
  5354. firstDataType = type;
  5355. }
  5356. }
  5357. finalDataType = finalDataType || firstDataType;
  5358. }
  5359. if (finalDataType) {
  5360. if (finalDataType !== dataTypes[0]) {
  5361. dataTypes.unshift(finalDataType);
  5362. }
  5363. return responses[finalDataType];
  5364. }
  5365. }
  5366. function ajaxConvert(s, response, jqXHR, isSuccess) {
  5367. var conv2, current, conv, tmp, prev, converters = {}, dataTypes = s.dataTypes.slice();
  5368. if (dataTypes[1]) {
  5369. for (conv in s.converters) {
  5370. converters[conv.toLowerCase()] = s.converters[conv];
  5371. }
  5372. }
  5373. current = dataTypes.shift();
  5374. while (current) {
  5375. if (s.responseFields[current]) {
  5376. jqXHR[s.responseFields[current]] = response;
  5377. }
  5378. if (!prev && isSuccess && s.dataFilter) {
  5379. response = s.dataFilter(response, s.dataType);
  5380. }
  5381. prev = current;
  5382. current = dataTypes.shift();
  5383. if (current) {
  5384. if (current === "*") {
  5385. current = prev;
  5386. } else if (prev !== "*" && prev !== current) {
  5387. conv = converters[prev + " " + current] || converters["* " + current];
  5388. if (!conv) {
  5389. for (conv2 in converters) {
  5390. tmp = conv2.split(" ");
  5391. if (tmp[1] === current) {
  5392. conv = converters[prev + " " + tmp[0]] || converters["* " + tmp[0]];
  5393. if (conv) {
  5394. if (conv === true) {
  5395. conv = converters[conv2];
  5396. } else if (converters[conv2] !== true) {
  5397. current = tmp[0];
  5398. dataTypes.unshift(tmp[1]);
  5399. }
  5400. break;
  5401. }
  5402. }
  5403. }
  5404. }
  5405. if (conv !== true) {
  5406. if (conv && s.throws) {
  5407. response = conv(response);
  5408. } else {
  5409. try {
  5410. response = conv(response);
  5411. } catch (e) {
  5412. return {
  5413. state: "parsererror",
  5414. error: conv ? e : "No conversion from " + prev + " to " + current
  5415. };
  5416. }
  5417. }
  5418. }
  5419. }
  5420. }
  5421. }
  5422. return { state: "success", data: response };
  5423. }
  5424. jQuery.extend({
  5425. // Counter for holding the number of active queries
  5426. active: 0,
  5427. // Last-Modified header cache for next request
  5428. lastModified: {},
  5429. etag: {},
  5430. ajaxSettings: {
  5431. url: location2.href,
  5432. type: "GET",
  5433. isLocal: rlocalProtocol.test(location2.protocol),
  5434. global: true,
  5435. processData: true,
  5436. async: true,
  5437. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  5438. /*
  5439. timeout: 0,
  5440. data: null,
  5441. dataType: null,
  5442. username: null,
  5443. password: null,
  5444. cache: null,
  5445. throws: false,
  5446. traditional: false,
  5447. headers: {},
  5448. */
  5449. accepts: {
  5450. "*": allTypes,
  5451. text: "text/plain",
  5452. html: "text/html",
  5453. xml: "application/xml, text/xml",
  5454. json: "application/json, text/javascript"
  5455. },
  5456. contents: {
  5457. xml: /\bxml\b/,
  5458. html: /\bhtml/,
  5459. json: /\bjson\b/
  5460. },
  5461. responseFields: {
  5462. xml: "responseXML",
  5463. text: "responseText",
  5464. json: "responseJSON"
  5465. },
  5466. // Data converters
  5467. // Keys separate source (or catchall "*") and destination types with a single space
  5468. converters: {
  5469. // Convert anything to text
  5470. "* text": String,
  5471. // Text to html (true = no transformation)
  5472. "text html": true,
  5473. // Evaluate text as a json expression
  5474. "text json": JSON.parse,
  5475. // Parse text as xml
  5476. "text xml": jQuery.parseXML
  5477. },
  5478. // For options that shouldn't be deep extended:
  5479. // you can add your own custom options here if
  5480. // and when you create one that shouldn't be
  5481. // deep extended (see ajaxExtend)
  5482. flatOptions: {
  5483. url: true,
  5484. context: true
  5485. }
  5486. },
  5487. // Creates a full fledged settings object into target
  5488. // with both ajaxSettings and settings fields.
  5489. // If target is omitted, writes into ajaxSettings.
  5490. ajaxSetup: function(target, settings) {
  5491. return settings ? (
  5492. // Building a settings object
  5493. ajaxExtend(ajaxExtend(target, jQuery.ajaxSettings), settings)
  5494. ) : (
  5495. // Extending ajaxSettings
  5496. ajaxExtend(jQuery.ajaxSettings, target)
  5497. );
  5498. },
  5499. ajaxPrefilter: addToPrefiltersOrTransports(prefilters),
  5500. ajaxTransport: addToPrefiltersOrTransports(transports),
  5501. // Main method
  5502. ajax: function(url, options) {
  5503. if (typeof url === "object") {
  5504. options = url;
  5505. url = void 0;
  5506. }
  5507. options = options || {};
  5508. var transport, cacheURL, responseHeadersString, responseHeaders, timeoutTimer, urlAnchor, completed2, fireGlobals, i, uncached, s = jQuery.ajaxSetup({}, options), callbackContext = s.context || s, globalEventContext = s.context && (callbackContext.nodeType || callbackContext.jquery) ? jQuery(callbackContext) : jQuery.event, deferred = jQuery.Deferred(), completeDeferred = jQuery.Callbacks("once memory"), statusCode = s.statusCode || {}, requestHeaders = {}, requestHeadersNames = {}, strAbort = "canceled", jqXHR = {
  5509. readyState: 0,
  5510. // Builds headers hashtable if needed
  5511. getResponseHeader: function(key) {
  5512. var match;
  5513. if (completed2) {
  5514. if (!responseHeaders) {
  5515. responseHeaders = {};
  5516. while (match = rheaders.exec(responseHeadersString)) {
  5517. responseHeaders[match[1].toLowerCase() + " "] = (responseHeaders[match[1].toLowerCase() + " "] || []).concat(match[2]);
  5518. }
  5519. }
  5520. match = responseHeaders[key.toLowerCase() + " "];
  5521. }
  5522. return match == null ? null : match.join(", ");
  5523. },
  5524. // Raw string
  5525. getAllResponseHeaders: function() {
  5526. return completed2 ? responseHeadersString : null;
  5527. },
  5528. // Caches the header
  5529. setRequestHeader: function(name, value) {
  5530. if (completed2 == null) {
  5531. name = requestHeadersNames[name.toLowerCase()] = requestHeadersNames[name.toLowerCase()] || name;
  5532. requestHeaders[name] = value;
  5533. }
  5534. return this;
  5535. },
  5536. // Overrides response content-type header
  5537. overrideMimeType: function(type) {
  5538. if (completed2 == null) {
  5539. s.mimeType = type;
  5540. }
  5541. return this;
  5542. },
  5543. // Status-dependent callbacks
  5544. statusCode: function(map) {
  5545. var code;
  5546. if (map) {
  5547. if (completed2) {
  5548. jqXHR.always(map[jqXHR.status]);
  5549. } else {
  5550. for (code in map) {
  5551. statusCode[code] = [statusCode[code], map[code]];
  5552. }
  5553. }
  5554. }
  5555. return this;
  5556. },
  5557. // Cancel the request
  5558. abort: function(statusText) {
  5559. var finalText = statusText || strAbort;
  5560. if (transport) {
  5561. transport.abort(finalText);
  5562. }
  5563. done(0, finalText);
  5564. return this;
  5565. }
  5566. };
  5567. deferred.promise(jqXHR);
  5568. s.url = ((url || s.url || location2.href) + "").replace(rprotocol, location2.protocol + "//");
  5569. s.type = options.method || options.type || s.method || s.type;
  5570. s.dataTypes = (s.dataType || "*").toLowerCase().match(rnothtmlwhite) || [""];
  5571. if (s.crossDomain == null) {
  5572. urlAnchor = document2.createElement("a");
  5573. try {
  5574. urlAnchor.href = s.url;
  5575. urlAnchor.href = urlAnchor.href;
  5576. s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== urlAnchor.protocol + "//" + urlAnchor.host;
  5577. } catch (e) {
  5578. s.crossDomain = true;
  5579. }
  5580. }
  5581. if (s.data && s.processData && typeof s.data !== "string") {
  5582. s.data = jQuery.param(s.data, s.traditional);
  5583. }
  5584. inspectPrefiltersOrTransports(prefilters, s, options, jqXHR);
  5585. if (completed2) {
  5586. return jqXHR;
  5587. }
  5588. fireGlobals = jQuery.event && s.global;
  5589. if (fireGlobals && jQuery.active++ === 0) {
  5590. jQuery.event.trigger("ajaxStart");
  5591. }
  5592. s.type = s.type.toUpperCase();
  5593. s.hasContent = !rnoContent.test(s.type);
  5594. cacheURL = s.url.replace(rhash, "");
  5595. if (!s.hasContent) {
  5596. uncached = s.url.slice(cacheURL.length);
  5597. if (s.data && (s.processData || typeof s.data === "string")) {
  5598. cacheURL += (rquery.test(cacheURL) ? "&" : "?") + s.data;
  5599. delete s.data;
  5600. }
  5601. if (s.cache === false) {
  5602. cacheURL = cacheURL.replace(rantiCache, "$1");
  5603. uncached = (rquery.test(cacheURL) ? "&" : "?") + "_=" + nonce.guid++ + uncached;
  5604. }
  5605. s.url = cacheURL + uncached;
  5606. } else if (s.data && s.processData && (s.contentType || "").indexOf("application/x-www-form-urlencoded") === 0) {
  5607. s.data = s.data.replace(r20, "+");
  5608. }
  5609. if (s.ifModified) {
  5610. if (jQuery.lastModified[cacheURL]) {
  5611. jqXHR.setRequestHeader("If-Modified-Since", jQuery.lastModified[cacheURL]);
  5612. }
  5613. if (jQuery.etag[cacheURL]) {
  5614. jqXHR.setRequestHeader("If-None-Match", jQuery.etag[cacheURL]);
  5615. }
  5616. }
  5617. if (s.data && s.hasContent && s.contentType !== false || options.contentType) {
  5618. jqXHR.setRequestHeader("Content-Type", s.contentType);
  5619. }
  5620. jqXHR.setRequestHeader(
  5621. "Accept",
  5622. s.dataTypes[0] && s.accepts[s.dataTypes[0]] ? s.accepts[s.dataTypes[0]] + (s.dataTypes[0] !== "*" ? ", " + allTypes + "; q=0.01" : "") : s.accepts["*"]
  5623. );
  5624. for (i in s.headers) {
  5625. jqXHR.setRequestHeader(i, s.headers[i]);
  5626. }
  5627. if (s.beforeSend && (s.beforeSend.call(callbackContext, jqXHR, s) === false || completed2)) {
  5628. return jqXHR.abort();
  5629. }
  5630. strAbort = "abort";
  5631. completeDeferred.add(s.complete);
  5632. jqXHR.done(s.success);
  5633. jqXHR.fail(s.error);
  5634. transport = inspectPrefiltersOrTransports(transports, s, options, jqXHR);
  5635. if (!transport) {
  5636. done(-1, "No Transport");
  5637. } else {
  5638. jqXHR.readyState = 1;
  5639. if (fireGlobals) {
  5640. globalEventContext.trigger("ajaxSend", [jqXHR, s]);
  5641. }
  5642. if (completed2) {
  5643. return jqXHR;
  5644. }
  5645. if (s.async && s.timeout > 0) {
  5646. timeoutTimer = window2.setTimeout(function() {
  5647. jqXHR.abort("timeout");
  5648. }, s.timeout);
  5649. }
  5650. try {
  5651. completed2 = false;
  5652. transport.send(requestHeaders, done);
  5653. } catch (e) {
  5654. if (completed2) {
  5655. throw e;
  5656. }
  5657. done(-1, e);
  5658. }
  5659. }
  5660. function done(status, nativeStatusText, responses, headers) {
  5661. var isSuccess, success, error, response, modified, statusText = nativeStatusText;
  5662. if (completed2) {
  5663. return;
  5664. }
  5665. completed2 = true;
  5666. if (timeoutTimer) {
  5667. window2.clearTimeout(timeoutTimer);
  5668. }
  5669. transport = void 0;
  5670. responseHeadersString = headers || "";
  5671. jqXHR.readyState = status > 0 ? 4 : 0;
  5672. isSuccess = status >= 200 && status < 300 || status === 304;
  5673. if (responses) {
  5674. response = ajaxHandleResponses(s, jqXHR, responses);
  5675. }
  5676. if (!isSuccess && jQuery.inArray("script", s.dataTypes) > -1 && jQuery.inArray("json", s.dataTypes) < 0) {
  5677. s.converters["text script"] = function() {
  5678. };
  5679. }
  5680. response = ajaxConvert(s, response, jqXHR, isSuccess);
  5681. if (isSuccess) {
  5682. if (s.ifModified) {
  5683. modified = jqXHR.getResponseHeader("Last-Modified");
  5684. if (modified) {
  5685. jQuery.lastModified[cacheURL] = modified;
  5686. }
  5687. modified = jqXHR.getResponseHeader("etag");
  5688. if (modified) {
  5689. jQuery.etag[cacheURL] = modified;
  5690. }
  5691. }
  5692. if (status === 204 || s.type === "HEAD") {
  5693. statusText = "nocontent";
  5694. } else if (status === 304) {
  5695. statusText = "notmodified";
  5696. } else {
  5697. statusText = response.state;
  5698. success = response.data;
  5699. error = response.error;
  5700. isSuccess = !error;
  5701. }
  5702. } else {
  5703. error = statusText;
  5704. if (status || !statusText) {
  5705. statusText = "error";
  5706. if (status < 0) {
  5707. status = 0;
  5708. }
  5709. }
  5710. }
  5711. jqXHR.status = status;
  5712. jqXHR.statusText = (nativeStatusText || statusText) + "";
  5713. if (isSuccess) {
  5714. deferred.resolveWith(callbackContext, [success, statusText, jqXHR]);
  5715. } else {
  5716. deferred.rejectWith(callbackContext, [jqXHR, statusText, error]);
  5717. }
  5718. jqXHR.statusCode(statusCode);
  5719. statusCode = void 0;
  5720. if (fireGlobals) {
  5721. globalEventContext.trigger(
  5722. isSuccess ? "ajaxSuccess" : "ajaxError",
  5723. [jqXHR, s, isSuccess ? success : error]
  5724. );
  5725. }
  5726. completeDeferred.fireWith(callbackContext, [jqXHR, statusText]);
  5727. if (fireGlobals) {
  5728. globalEventContext.trigger("ajaxComplete", [jqXHR, s]);
  5729. if (!--jQuery.active) {
  5730. jQuery.event.trigger("ajaxStop");
  5731. }
  5732. }
  5733. }
  5734. return jqXHR;
  5735. },
  5736. getJSON: function(url, data, callback) {
  5737. return jQuery.get(url, data, callback, "json");
  5738. },
  5739. getScript: function(url, callback) {
  5740. return jQuery.get(url, void 0, callback, "script");
  5741. }
  5742. });
  5743. jQuery.each(["get", "post"], function(_i, method) {
  5744. jQuery[method] = function(url, data, callback, type) {
  5745. if (isFunction(data)) {
  5746. type = type || callback;
  5747. callback = data;
  5748. data = void 0;
  5749. }
  5750. return jQuery.ajax(jQuery.extend({
  5751. url,
  5752. type: method,
  5753. dataType: type,
  5754. data,
  5755. success: callback
  5756. }, jQuery.isPlainObject(url) && url));
  5757. };
  5758. });
  5759. jQuery.ajaxPrefilter(function(s) {
  5760. var i;
  5761. for (i in s.headers) {
  5762. if (i.toLowerCase() === "content-type") {
  5763. s.contentType = s.headers[i] || "";
  5764. }
  5765. }
  5766. });
  5767. jQuery._evalUrl = function(url, options, doc) {
  5768. return jQuery.ajax({
  5769. url,
  5770. // Make this explicit, since user can override this through ajaxSetup (trac-11264)
  5771. type: "GET",
  5772. dataType: "script",
  5773. cache: true,
  5774. async: false,
  5775. global: false,
  5776. // Only evaluate the response if it is successful (gh-4126)
  5777. // dataFilter is not invoked for failure responses, so using it instead
  5778. // of the default converter is kludgy but it works.
  5779. converters: {
  5780. "text script": function() {
  5781. }
  5782. },
  5783. dataFilter: function(response) {
  5784. jQuery.globalEval(response, options, doc);
  5785. }
  5786. });
  5787. };
  5788. jQuery.fn.extend({
  5789. wrapAll: function(html) {
  5790. var wrap;
  5791. if (this[0]) {
  5792. if (isFunction(html)) {
  5793. html = html.call(this[0]);
  5794. }
  5795. wrap = jQuery(html, this[0].ownerDocument).eq(0).clone(true);
  5796. if (this[0].parentNode) {
  5797. wrap.insertBefore(this[0]);
  5798. }
  5799. wrap.map(function() {
  5800. var elem = this;
  5801. while (elem.firstElementChild) {
  5802. elem = elem.firstElementChild;
  5803. }
  5804. return elem;
  5805. }).append(this);
  5806. }
  5807. return this;
  5808. },
  5809. wrapInner: function(html) {
  5810. if (isFunction(html)) {
  5811. return this.each(function(i) {
  5812. jQuery(this).wrapInner(html.call(this, i));
  5813. });
  5814. }
  5815. return this.each(function() {
  5816. var self2 = jQuery(this), contents = self2.contents();
  5817. if (contents.length) {
  5818. contents.wrapAll(html);
  5819. } else {
  5820. self2.append(html);
  5821. }
  5822. });
  5823. },
  5824. wrap: function(html) {
  5825. var htmlIsFunction = isFunction(html);
  5826. return this.each(function(i) {
  5827. jQuery(this).wrapAll(htmlIsFunction ? html.call(this, i) : html);
  5828. });
  5829. },
  5830. unwrap: function(selector) {
  5831. this.parent(selector).not("body").each(function() {
  5832. jQuery(this).replaceWith(this.childNodes);
  5833. });
  5834. return this;
  5835. }
  5836. });
  5837. jQuery.expr.pseudos.hidden = function(elem) {
  5838. return !jQuery.expr.pseudos.visible(elem);
  5839. };
  5840. jQuery.expr.pseudos.visible = function(elem) {
  5841. return !!(elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length);
  5842. };
  5843. jQuery.ajaxSettings.xhr = function() {
  5844. try {
  5845. return new window2.XMLHttpRequest();
  5846. } catch (e) {
  5847. }
  5848. };
  5849. var xhrSuccessStatus = {
  5850. // File protocol always yields status code 0, assume 200
  5851. 0: 200,
  5852. // Support: IE <=9 only
  5853. // trac-1450: sometimes IE returns 1223 when it should be 204
  5854. 1223: 204
  5855. }, xhrSupported = jQuery.ajaxSettings.xhr();
  5856. support.cors = !!xhrSupported && "withCredentials" in xhrSupported;
  5857. support.ajax = xhrSupported = !!xhrSupported;
  5858. jQuery.ajaxTransport(function(options) {
  5859. var callback, errorCallback;
  5860. if (support.cors || xhrSupported && !options.crossDomain) {
  5861. return {
  5862. send: function(headers, complete) {
  5863. var i, xhr = options.xhr();
  5864. xhr.open(
  5865. options.type,
  5866. options.url,
  5867. options.async,
  5868. options.username,
  5869. options.password
  5870. );
  5871. if (options.xhrFields) {
  5872. for (i in options.xhrFields) {
  5873. xhr[i] = options.xhrFields[i];
  5874. }
  5875. }
  5876. if (options.mimeType && xhr.overrideMimeType) {
  5877. xhr.overrideMimeType(options.mimeType);
  5878. }
  5879. if (!options.crossDomain && !headers["X-Requested-With"]) {
  5880. headers["X-Requested-With"] = "XMLHttpRequest";
  5881. }
  5882. for (i in headers) {
  5883. xhr.setRequestHeader(i, headers[i]);
  5884. }
  5885. callback = function(type) {
  5886. return function() {
  5887. if (callback) {
  5888. callback = errorCallback = xhr.onload = xhr.onerror = xhr.onabort = xhr.ontimeout = xhr.onreadystatechange = null;
  5889. if (type === "abort") {
  5890. xhr.abort();
  5891. } else if (type === "error") {
  5892. if (typeof xhr.status !== "number") {
  5893. complete(0, "error");
  5894. } else {
  5895. complete(
  5896. // File: protocol always yields status 0; see trac-8605, trac-14207
  5897. xhr.status,
  5898. xhr.statusText
  5899. );
  5900. }
  5901. } else {
  5902. complete(
  5903. xhrSuccessStatus[xhr.status] || xhr.status,
  5904. xhr.statusText,
  5905. // Support: IE <=9 only
  5906. // IE9 has no XHR2 but throws on binary (trac-11426)
  5907. // For XHR2 non-text, let the caller handle it (gh-2498)
  5908. (xhr.responseType || "text") !== "text" || typeof xhr.responseText !== "string" ? { binary: xhr.response } : { text: xhr.responseText },
  5909. xhr.getAllResponseHeaders()
  5910. );
  5911. }
  5912. }
  5913. };
  5914. };
  5915. xhr.onload = callback();
  5916. errorCallback = xhr.onerror = xhr.ontimeout = callback("error");
  5917. if (xhr.onabort !== void 0) {
  5918. xhr.onabort = errorCallback;
  5919. } else {
  5920. xhr.onreadystatechange = function() {
  5921. if (xhr.readyState === 4) {
  5922. window2.setTimeout(function() {
  5923. if (callback) {
  5924. errorCallback();
  5925. }
  5926. });
  5927. }
  5928. };
  5929. }
  5930. callback = callback("abort");
  5931. try {
  5932. xhr.send(options.hasContent && options.data || null);
  5933. } catch (e) {
  5934. if (callback) {
  5935. throw e;
  5936. }
  5937. }
  5938. },
  5939. abort: function() {
  5940. if (callback) {
  5941. callback();
  5942. }
  5943. }
  5944. };
  5945. }
  5946. });
  5947. jQuery.ajaxPrefilter(function(s) {
  5948. if (s.crossDomain) {
  5949. s.contents.script = false;
  5950. }
  5951. });
  5952. jQuery.ajaxSetup({
  5953. accepts: {
  5954. script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
  5955. },
  5956. contents: {
  5957. script: /\b(?:java|ecma)script\b/
  5958. },
  5959. converters: {
  5960. "text script": function(text) {
  5961. jQuery.globalEval(text);
  5962. return text;
  5963. }
  5964. }
  5965. });
  5966. jQuery.ajaxPrefilter("script", function(s) {
  5967. if (s.cache === void 0) {
  5968. s.cache = false;
  5969. }
  5970. if (s.crossDomain) {
  5971. s.type = "GET";
  5972. }
  5973. });
  5974. jQuery.ajaxTransport("script", function(s) {
  5975. if (s.crossDomain || s.scriptAttrs) {
  5976. var script, callback;
  5977. return {
  5978. send: function(_, complete) {
  5979. script = jQuery("<script>").attr(s.scriptAttrs || {}).prop({ charset: s.scriptCharset, src: s.url }).on("load error", callback = function(evt) {
  5980. script.remove();
  5981. callback = null;
  5982. if (evt) {
  5983. complete(evt.type === "error" ? 404 : 200, evt.type);
  5984. }
  5985. });
  5986. document2.head.appendChild(script[0]);
  5987. },
  5988. abort: function() {
  5989. if (callback) {
  5990. callback();
  5991. }
  5992. }
  5993. };
  5994. }
  5995. });
  5996. var oldCallbacks = [], rjsonp = /(=)\?(?=&|$)|\?\?/;
  5997. jQuery.ajaxSetup({
  5998. jsonp: "callback",
  5999. jsonpCallback: function() {
  6000. var callback = oldCallbacks.pop() || jQuery.expando + "_" + nonce.guid++;
  6001. this[callback] = true;
  6002. return callback;
  6003. }
  6004. });
  6005. jQuery.ajaxPrefilter("json jsonp", function(s, originalSettings, jqXHR) {
  6006. var callbackName, overwritten, responseContainer, jsonProp = s.jsonp !== false && (rjsonp.test(s.url) ? "url" : typeof s.data === "string" && (s.contentType || "").indexOf("application/x-www-form-urlencoded") === 0 && rjsonp.test(s.data) && "data");
  6007. if (jsonProp || s.dataTypes[0] === "jsonp") {
  6008. callbackName = s.jsonpCallback = isFunction(s.jsonpCallback) ? s.jsonpCallback() : s.jsonpCallback;
  6009. if (jsonProp) {
  6010. s[jsonProp] = s[jsonProp].replace(rjsonp, "$1" + callbackName);
  6011. } else if (s.jsonp !== false) {
  6012. s.url += (rquery.test(s.url) ? "&" : "?") + s.jsonp + "=" + callbackName;
  6013. }
  6014. s.converters["script json"] = function() {
  6015. if (!responseContainer) {
  6016. jQuery.error(callbackName + " was not called");
  6017. }
  6018. return responseContainer[0];
  6019. };
  6020. s.dataTypes[0] = "json";
  6021. overwritten = window2[callbackName];
  6022. window2[callbackName] = function() {
  6023. responseContainer = arguments;
  6024. };
  6025. jqXHR.always(function() {
  6026. if (overwritten === void 0) {
  6027. jQuery(window2).removeProp(callbackName);
  6028. } else {
  6029. window2[callbackName] = overwritten;
  6030. }
  6031. if (s[callbackName]) {
  6032. s.jsonpCallback = originalSettings.jsonpCallback;
  6033. oldCallbacks.push(callbackName);
  6034. }
  6035. if (responseContainer && isFunction(overwritten)) {
  6036. overwritten(responseContainer[0]);
  6037. }
  6038. responseContainer = overwritten = void 0;
  6039. });
  6040. return "script";
  6041. }
  6042. });
  6043. support.createHTMLDocument = function() {
  6044. var body = document2.implementation.createHTMLDocument("").body;
  6045. body.innerHTML = "<form></form><form></form>";
  6046. return body.childNodes.length === 2;
  6047. }();
  6048. jQuery.parseHTML = function(data, context, keepScripts) {
  6049. if (typeof data !== "string") {
  6050. return [];
  6051. }
  6052. if (typeof context === "boolean") {
  6053. keepScripts = context;
  6054. context = false;
  6055. }
  6056. var base, parsed, scripts;
  6057. if (!context) {
  6058. if (support.createHTMLDocument) {
  6059. context = document2.implementation.createHTMLDocument("");
  6060. base = context.createElement("base");
  6061. base.href = document2.location.href;
  6062. context.head.appendChild(base);
  6063. } else {
  6064. context = document2;
  6065. }
  6066. }
  6067. parsed = rsingleTag.exec(data);
  6068. scripts = !keepScripts && [];
  6069. if (parsed) {
  6070. return [context.createElement(parsed[1])];
  6071. }
  6072. parsed = buildFragment([data], context, scripts);
  6073. if (scripts && scripts.length) {
  6074. jQuery(scripts).remove();
  6075. }
  6076. return jQuery.merge([], parsed.childNodes);
  6077. };
  6078. jQuery.fn.load = function(url, params, callback) {
  6079. var selector, type, response, self2 = this, off = url.indexOf(" ");
  6080. if (off > -1) {
  6081. selector = stripAndCollapse(url.slice(off));
  6082. url = url.slice(0, off);
  6083. }
  6084. if (isFunction(params)) {
  6085. callback = params;
  6086. params = void 0;
  6087. } else if (params && typeof params === "object") {
  6088. type = "POST";
  6089. }
  6090. if (self2.length > 0) {
  6091. jQuery.ajax({
  6092. url,
  6093. // If "type" variable is undefined, then "GET" method will be used.
  6094. // Make value of this field explicit since
  6095. // user can override it through ajaxSetup method
  6096. type: type || "GET",
  6097. dataType: "html",
  6098. data: params
  6099. }).done(function(responseText) {
  6100. response = arguments;
  6101. self2.html(selector ? (
  6102. // If a selector was specified, locate the right elements in a dummy div
  6103. // Exclude scripts to avoid IE 'Permission Denied' errors
  6104. jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector)
  6105. ) : (
  6106. // Otherwise use the full result
  6107. responseText
  6108. ));
  6109. }).always(callback && function(jqXHR, status) {
  6110. self2.each(function() {
  6111. callback.apply(this, response || [jqXHR.responseText, status, jqXHR]);
  6112. });
  6113. });
  6114. }
  6115. return this;
  6116. };
  6117. jQuery.expr.pseudos.animated = function(elem) {
  6118. return jQuery.grep(jQuery.timers, function(fn) {
  6119. return elem === fn.elem;
  6120. }).length;
  6121. };
  6122. jQuery.offset = {
  6123. setOffset: function(elem, options, i) {
  6124. var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition, position = jQuery.css(elem, "position"), curElem = jQuery(elem), props = {};
  6125. if (position === "static") {
  6126. elem.style.position = "relative";
  6127. }
  6128. curOffset = curElem.offset();
  6129. curCSSTop = jQuery.css(elem, "top");
  6130. curCSSLeft = jQuery.css(elem, "left");
  6131. calculatePosition = (position === "absolute" || position === "fixed") && (curCSSTop + curCSSLeft).indexOf("auto") > -1;
  6132. if (calculatePosition) {
  6133. curPosition = curElem.position();
  6134. curTop = curPosition.top;
  6135. curLeft = curPosition.left;
  6136. } else {
  6137. curTop = parseFloat(curCSSTop) || 0;
  6138. curLeft = parseFloat(curCSSLeft) || 0;
  6139. }
  6140. if (isFunction(options)) {
  6141. options = options.call(elem, i, jQuery.extend({}, curOffset));
  6142. }
  6143. if (options.top != null) {
  6144. props.top = options.top - curOffset.top + curTop;
  6145. }
  6146. if (options.left != null) {
  6147. props.left = options.left - curOffset.left + curLeft;
  6148. }
  6149. if ("using" in options) {
  6150. options.using.call(elem, props);
  6151. } else {
  6152. curElem.css(props);
  6153. }
  6154. }
  6155. };
  6156. jQuery.fn.extend({
  6157. // offset() relates an element's border box to the document origin
  6158. offset: function(options) {
  6159. if (arguments.length) {
  6160. return options === void 0 ? this : this.each(function(i) {
  6161. jQuery.offset.setOffset(this, options, i);
  6162. });
  6163. }
  6164. var rect, win, elem = this[0];
  6165. if (!elem) {
  6166. return;
  6167. }
  6168. if (!elem.getClientRects().length) {
  6169. return { top: 0, left: 0 };
  6170. }
  6171. rect = elem.getBoundingClientRect();
  6172. win = elem.ownerDocument.defaultView;
  6173. return {
  6174. top: rect.top + win.pageYOffset,
  6175. left: rect.left + win.pageXOffset
  6176. };
  6177. },
  6178. // position() relates an element's margin box to its offset parent's padding box
  6179. // This corresponds to the behavior of CSS absolute positioning
  6180. position: function() {
  6181. if (!this[0]) {
  6182. return;
  6183. }
  6184. var offsetParent, offset, doc, elem = this[0], parentOffset = { top: 0, left: 0 };
  6185. if (jQuery.css(elem, "position") === "fixed") {
  6186. offset = elem.getBoundingClientRect();
  6187. } else {
  6188. offset = this.offset();
  6189. doc = elem.ownerDocument;
  6190. offsetParent = elem.offsetParent || doc.documentElement;
  6191. while (offsetParent && (offsetParent === doc.body || offsetParent === doc.documentElement) && jQuery.css(offsetParent, "position") === "static") {
  6192. offsetParent = offsetParent.parentNode;
  6193. }
  6194. if (offsetParent && offsetParent !== elem && offsetParent.nodeType === 1) {
  6195. parentOffset = jQuery(offsetParent).offset();
  6196. parentOffset.top += jQuery.css(offsetParent, "borderTopWidth", true);
  6197. parentOffset.left += jQuery.css(offsetParent, "borderLeftWidth", true);
  6198. }
  6199. }
  6200. return {
  6201. top: offset.top - parentOffset.top - jQuery.css(elem, "marginTop", true),
  6202. left: offset.left - parentOffset.left - jQuery.css(elem, "marginLeft", true)
  6203. };
  6204. },
  6205. // This method will return documentElement in the following cases:
  6206. // 1) For the element inside the iframe without offsetParent, this method will return
  6207. // documentElement of the parent window
  6208. // 2) For the hidden or detached element
  6209. // 3) For body or html element, i.e. in case of the html node - it will return itself
  6210. //
  6211. // but those exceptions were never presented as a real life use-cases
  6212. // and might be considered as more preferable results.
  6213. //
  6214. // This logic, however, is not guaranteed and can change at any point in the future
  6215. offsetParent: function() {
  6216. return this.map(function() {
  6217. var offsetParent = this.offsetParent;
  6218. while (offsetParent && jQuery.css(offsetParent, "position") === "static") {
  6219. offsetParent = offsetParent.offsetParent;
  6220. }
  6221. return offsetParent || documentElement;
  6222. });
  6223. }
  6224. });
  6225. jQuery.each({ scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function(method, prop) {
  6226. var top = "pageYOffset" === prop;
  6227. jQuery.fn[method] = function(val) {
  6228. return access(this, function(elem, method2, val2) {
  6229. var win;
  6230. if (isWindow(elem)) {
  6231. win = elem;
  6232. } else if (elem.nodeType === 9) {
  6233. win = elem.defaultView;
  6234. }
  6235. if (val2 === void 0) {
  6236. return win ? win[prop] : elem[method2];
  6237. }
  6238. if (win) {
  6239. win.scrollTo(
  6240. !top ? val2 : win.pageXOffset,
  6241. top ? val2 : win.pageYOffset
  6242. );
  6243. } else {
  6244. elem[method2] = val2;
  6245. }
  6246. }, method, val, arguments.length);
  6247. };
  6248. });
  6249. jQuery.each(["top", "left"], function(_i, prop) {
  6250. jQuery.cssHooks[prop] = addGetHookIf(
  6251. support.pixelPosition,
  6252. function(elem, computed) {
  6253. if (computed) {
  6254. computed = curCSS(elem, prop);
  6255. return rnumnonpx.test(computed) ? jQuery(elem).position()[prop] + "px" : computed;
  6256. }
  6257. }
  6258. );
  6259. });
  6260. jQuery.each({ Height: "height", Width: "width" }, function(name, type) {
  6261. jQuery.each({
  6262. padding: "inner" + name,
  6263. content: type,
  6264. "": "outer" + name
  6265. }, function(defaultExtra, funcName) {
  6266. jQuery.fn[funcName] = function(margin, value) {
  6267. var chainable = arguments.length && (defaultExtra || typeof margin !== "boolean"), extra = defaultExtra || (margin === true || value === true ? "margin" : "border");
  6268. return access(this, function(elem, type2, value2) {
  6269. var doc;
  6270. if (isWindow(elem)) {
  6271. return funcName.indexOf("outer") === 0 ? elem["inner" + name] : elem.document.documentElement["client" + name];
  6272. }
  6273. if (elem.nodeType === 9) {
  6274. doc = elem.documentElement;
  6275. return Math.max(
  6276. elem.body["scroll" + name],
  6277. doc["scroll" + name],
  6278. elem.body["offset" + name],
  6279. doc["offset" + name],
  6280. doc["client" + name]
  6281. );
  6282. }
  6283. return value2 === void 0 ? (
  6284. // Get width or height on the element, requesting but not forcing parseFloat
  6285. jQuery.css(elem, type2, extra)
  6286. ) : (
  6287. // Set width or height on the element
  6288. jQuery.style(elem, type2, value2, extra)
  6289. );
  6290. }, type, chainable ? margin : void 0, chainable);
  6291. };
  6292. });
  6293. });
  6294. jQuery.each([
  6295. "ajaxStart",
  6296. "ajaxStop",
  6297. "ajaxComplete",
  6298. "ajaxError",
  6299. "ajaxSuccess",
  6300. "ajaxSend"
  6301. ], function(_i, type) {
  6302. jQuery.fn[type] = function(fn) {
  6303. return this.on(type, fn);
  6304. };
  6305. });
  6306. jQuery.fn.extend({
  6307. bind: function(types, data, fn) {
  6308. return this.on(types, null, data, fn);
  6309. },
  6310. unbind: function(types, fn) {
  6311. return this.off(types, null, fn);
  6312. },
  6313. delegate: function(selector, types, data, fn) {
  6314. return this.on(types, selector, data, fn);
  6315. },
  6316. undelegate: function(selector, types, fn) {
  6317. return arguments.length === 1 ? this.off(selector, "**") : this.off(types, selector || "**", fn);
  6318. },
  6319. hover: function(fnOver, fnOut) {
  6320. return this.on("mouseenter", fnOver).on("mouseleave", fnOut || fnOver);
  6321. }
  6322. });
  6323. jQuery.each(
  6324. "blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),
  6325. function(_i, name) {
  6326. jQuery.fn[name] = function(data, fn) {
  6327. return arguments.length > 0 ? this.on(name, null, data, fn) : this.trigger(name);
  6328. };
  6329. }
  6330. );
  6331. var rtrim = /^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;
  6332. jQuery.proxy = function(fn, context) {
  6333. var tmp, args, proxy;
  6334. if (typeof context === "string") {
  6335. tmp = fn[context];
  6336. context = fn;
  6337. fn = tmp;
  6338. }
  6339. if (!isFunction(fn)) {
  6340. return void 0;
  6341. }
  6342. args = slice.call(arguments, 2);
  6343. proxy = function() {
  6344. return fn.apply(context || this, args.concat(slice.call(arguments)));
  6345. };
  6346. proxy.guid = fn.guid = fn.guid || jQuery.guid++;
  6347. return proxy;
  6348. };
  6349. jQuery.holdReady = function(hold) {
  6350. if (hold) {
  6351. jQuery.readyWait++;
  6352. } else {
  6353. jQuery.ready(true);
  6354. }
  6355. };
  6356. jQuery.isArray = Array.isArray;
  6357. jQuery.parseJSON = JSON.parse;
  6358. jQuery.nodeName = nodeName;
  6359. jQuery.isFunction = isFunction;
  6360. jQuery.isWindow = isWindow;
  6361. jQuery.camelCase = camelCase;
  6362. jQuery.type = toType;
  6363. jQuery.now = Date.now;
  6364. jQuery.isNumeric = function(obj) {
  6365. var type = jQuery.type(obj);
  6366. return (type === "number" || type === "string") && // parseFloat NaNs numeric-cast false positives ("")
  6367. // ...but misinterprets leading-number strings, particularly hex literals ("0x...")
  6368. // subtraction forces infinities to NaN
  6369. !isNaN(obj - parseFloat(obj));
  6370. };
  6371. jQuery.trim = function(text) {
  6372. return text == null ? "" : (text + "").replace(rtrim, "$1");
  6373. };
  6374. var _jQuery = window2.jQuery, _$ = window2.$;
  6375. jQuery.noConflict = function(deep) {
  6376. if (window2.$ === jQuery) {
  6377. window2.$ = _$;
  6378. }
  6379. if (deep && window2.jQuery === jQuery) {
  6380. window2.jQuery = _jQuery;
  6381. }
  6382. return jQuery;
  6383. };
  6384. if (typeof noGlobal === "undefined") {
  6385. window2.jQuery = window2.$ = jQuery;
  6386. }
  6387. return jQuery;
  6388. });
  6389. })(jquery);
  6390. var jqueryExports = jquery.exports;
  6391. const $$1 = /* @__PURE__ */ getDefaultExportFromCjs(jqueryExports);
  6392. class RuleBaseInterface {
  6393. constructor() {
  6394. __publicField(this, "$", window.jQuery || $$1);
  6395. // 通用属性配置,以及工具函数。可在规则类中覆盖
  6396. __publicField(this, "minTitleLength", 8);
  6397. // 标题最少汉字数(不能在小了,这个值变小会造成更多数据误差)
  6398. __publicField(this, "maxDepthLevel", 30);
  6399. // DOM树最大深度
  6400. __publicField(this, "minDateStringLength", 3);
  6401. // 最小时间文本长度,提取到的时间文本大于等于该值时候,才会收集
  6402. __publicField(this, "companyNameReg", /(集团|公司|研究所|设计院|平台)$/);
  6403. __publicField(this, "includeTags", [
  6404. "A",
  6405. "DIV",
  6406. "SPAN",
  6407. "TD",
  6408. "H1",
  6409. "H2",
  6410. "H3",
  6411. "H4",
  6412. "H5",
  6413. "H6",
  6414. "P",
  6415. "TD",
  6416. "TR"
  6417. ]);
  6418. // 非法节点,需要排除
  6419. __publicField(this, "excludeTags", ["SCRIPT", "STYLE"]);
  6420. __publicField(this, "chineseCharReg", /[\u4e00-\u9fa5]/g);
  6421. __publicField(this, "datePatterns", [
  6422. /\b(\d{4})\/(\d{0,2})\/(\d{0,2})\b/,
  6423. /\b(\d{4})-(\d{0,2})-(\d{0,2})\b/,
  6424. /\b(\d{0,2})-(\d{0,2})\b/,
  6425. /\b(\d{0,2})\/(\d{0,2})\b/,
  6426. /\b(\d{4})\/(\d{0,2})\/(\d{0,2}) (\d{0,2}):(\d{0,2})\b/,
  6427. /\b(\d{4})-(\d{0,2})-(\d{0,2}) (\d{0,2}):(\d{0,2})\b/,
  6428. /\b(\d{2})\/(\d{0,2}) (\d{0,2}):(\d{0,2})\b/,
  6429. /\b(\d{2})-(\d{0,2}) (\d{0,2}):(\d{0,2})\b/,
  6430. // 匹配年月
  6431. /\b(\d{4})\/(\d{0,2})\b/,
  6432. /\b(\d{4})-(\d{0,2})\b/,
  6433. // 范围更大的匹配
  6434. /\b(\d{4})([\\\/\.\-年月日点时分秒\:])(\d{0,2})([\\\/\.\-年月日点时分秒\:])(\d{0,2})\b/,
  6435. /\b(\d{4})([\\\/\.\-年月日点时分秒\:])(\d{0,2})\b/
  6436. ]);
  6437. __publicField(this, "todayDatePatternString", [
  6438. "(%s年)(\\D+)(%s月)(\\D+)(%s日)",
  6439. "(%s月)(\\D+)(%s日)"
  6440. ]);
  6441. __publicField(this, "infoTypeList", [
  6442. "拟建",
  6443. "采购意向",
  6444. "预告",
  6445. "预审",
  6446. "预审结果",
  6447. "论证意见",
  6448. "需求公示",
  6449. "招标",
  6450. "邀标",
  6451. "询价",
  6452. "竞谈",
  6453. "单一",
  6454. "竞价",
  6455. "中标",
  6456. "成交",
  6457. "废标",
  6458. "流标",
  6459. "合同",
  6460. "验收",
  6461. "违规"
  6462. ]);
  6463. __publicField(this, "otherKeyList", [
  6464. "项目",
  6465. "公告",
  6466. "公示",
  6467. "采购",
  6468. "更正",
  6469. "变更"
  6470. ]);
  6471. __publicField(this, "importantTags", [
  6472. "h1",
  6473. "h2",
  6474. "h3",
  6475. "h4",
  6476. "h5",
  6477. "a"
  6478. ]);
  6479. }
  6480. run() {
  6481. }
  6482. check() {
  6483. }
  6484. get todayPatterns() {
  6485. const now = /* @__PURE__ */ new Date();
  6486. const year = now.getFullYear();
  6487. const month = now.getMonth() + 1;
  6488. const day = now.getDate();
  6489. const monthStr = `${month}`.padStart(2, "0");
  6490. const dayStr = `${day}`.padStart(2, "0");
  6491. const arr = [];
  6492. const todayDatePatternList = this.todayDatePatternString;
  6493. if (Array.isArray(todayDatePatternList)) {
  6494. todayDatePatternList.forEach((p) => {
  6495. let np = p.replace("%s年", `${year}`);
  6496. arr.push(np.replace("%s月", `${month}`).replace("%s日", `${day}`));
  6497. arr.push(np.replace("%s月", `${month}`).replace("%s日", `${dayStr}`));
  6498. arr.push(np.replace("%s月", `${monthStr}`).replace("%s日", `${day}`));
  6499. arr.push(np.replace("%s月", `${monthStr}`).replace("%s日", `${dayStr}`));
  6500. });
  6501. return arr.map((r) => new RegExp(r));
  6502. } else {
  6503. return [];
  6504. }
  6505. }
  6506. get importantKeyList() {
  6507. let list = [];
  6508. return list.concat(this.infoTypeList).concat(this.otherKeyList);
  6509. }
  6510. get importantTagList() {
  6511. const tagList = this.importantTags;
  6512. if (Array.isArray(tagList)) {
  6513. return tagList.map((i) => i.toUpperCase());
  6514. } else {
  6515. return [];
  6516. }
  6517. }
  6518. // 辅助函数:遍历DOM节点,查找符合条件的末级节点
  6519. findEligibleLeafNodes(node, condition) {
  6520. const result = [];
  6521. const includeTags = this.includeTags;
  6522. const excludeTags = this.excludeTags;
  6523. function pushResult(n) {
  6524. var _a;
  6525. result.push({ node: n, text: (_a = n.textContent) == null ? void 0 : _a.trim(), selector: null });
  6526. }
  6527. function traverse(node2) {
  6528. if (!node2)
  6529. return;
  6530. if (excludeTags.includes(node2.nodeName))
  6531. return;
  6532. if (node2.nodeType === Node.ELEMENT_NODE) {
  6533. if (includeTags.includes(node2.nodeName) && !node2.children.length && node2.textContent) {
  6534. if (typeof condition === "function") {
  6535. if (condition(node2)) {
  6536. pushResult(node2);
  6537. }
  6538. } else {
  6539. pushResult(node2);
  6540. }
  6541. } else {
  6542. node2.childNodes.forEach((item) => {
  6543. traverse(item);
  6544. });
  6545. }
  6546. } else if (node2.nodeType === Node.TEXT_NODE) {
  6547. if (node2.textContent) {
  6548. if (typeof condition === "function") {
  6549. if (condition(node2)) {
  6550. pushResult(node2);
  6551. }
  6552. } else {
  6553. pushResult(node2);
  6554. }
  6555. }
  6556. }
  6557. }
  6558. traverse(node);
  6559. return result;
  6560. }
  6561. // 辅助函数:从文本中提取日期
  6562. extractDates(text) {
  6563. text = text || "";
  6564. var dates = [];
  6565. this.datePatterns.forEach((pattern) => {
  6566. var match = text.match(pattern);
  6567. if (match && match.length > 0) {
  6568. match = match.filter((r) => !!r);
  6569. const targetStr = match[0];
  6570. if (targetStr && targetStr.length >= this.minDateStringLength) {
  6571. dates.push(targetStr);
  6572. }
  6573. }
  6574. });
  6575. return dates;
  6576. }
  6577. // 辅助函数:生成CSS选择器
  6578. generateCSSSelector(element) {
  6579. if (!element) {
  6580. return;
  6581. }
  6582. let selector = this.getTagName(element).toLowerCase();
  6583. if (element.id) {
  6584. selector = `#${element.id}`;
  6585. } else {
  6586. let siblings = [];
  6587. if (element.parentNode) {
  6588. siblings = Array.from(element.parentNode.children);
  6589. }
  6590. const index = siblings.indexOf(element) + 1;
  6591. selector += `:nth-child(${index})`;
  6592. }
  6593. if (element.parentNode && element.parentNode !== document.body) {
  6594. selector = `${this.generateCSSSelector(element.parentNode)} > ${selector}`;
  6595. }
  6596. return selector;
  6597. }
  6598. // 判断是否是元素节点
  6599. isElementNode(node) {
  6600. return node && node.nodeType === Node.ELEMENT_NODE;
  6601. }
  6602. // 元素是否隐藏(文本节点无法计算显示隐藏,则默认非隐藏)
  6603. checkNodeHidden(node) {
  6604. let isHidden = false;
  6605. if (this.isElementNode(node)) {
  6606. isHidden = this.$(node).is(":hidden");
  6607. }
  6608. return isHidden;
  6609. }
  6610. isCompanyName(text) {
  6611. return this.companyNameReg.test(text);
  6612. }
  6613. getTagName(node) {
  6614. if (this.isElementNode(node)) {
  6615. return node.tagName;
  6616. } else {
  6617. return "";
  6618. }
  6619. }
  6620. // 统计中文字符个数
  6621. countChineseCharacters(str) {
  6622. str = str || "";
  6623. var matches = str.match(this.chineseCharReg);
  6624. return matches ? matches.length : 0;
  6625. }
  6626. // 上报:lua脚本中会取window.result变量中的内容
  6627. report(result) {
  6628. window.result = result;
  6629. }
  6630. }
  6631. function getSiblings(elem) {
  6632. var _a;
  6633. var r = [];
  6634. var n = (_a = elem.parentNode) == null ? void 0 : _a.firstChild;
  6635. for (; n; n = n.nextSibling) {
  6636. if (n.nodeType === 1 && n !== elem) {
  6637. r.push(n);
  6638. }
  6639. }
  6640. return r;
  6641. }
  6642. function getMaxCount(arr) {
  6643. return Math.max.apply(null, arr);
  6644. }
  6645. var lodash = { exports: {} };
  6646. /**
  6647. * @license
  6648. * Lodash <https://lodash.com/>
  6649. * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
  6650. * Released under MIT license <https://lodash.com/license>
  6651. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  6652. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  6653. */
  6654. lodash.exports;
  6655. (function(module, exports) {
  6656. (function() {
  6657. var undefined$1;
  6658. var VERSION = "4.17.21";
  6659. var LARGE_ARRAY_SIZE = 200;
  6660. 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`";
  6661. var HASH_UNDEFINED = "__lodash_hash_undefined__";
  6662. var MAX_MEMOIZE_SIZE = 500;
  6663. var PLACEHOLDER = "__lodash_placeholder__";
  6664. var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4;
  6665. var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2;
  6666. 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;
  6667. var DEFAULT_TRUNC_LENGTH = 30, DEFAULT_TRUNC_OMISSION = "...";
  6668. var HOT_COUNT = 800, HOT_SPAN = 16;
  6669. var LAZY_FILTER_FLAG = 1, LAZY_MAP_FLAG = 2, LAZY_WHILE_FLAG = 3;
  6670. var INFINITY = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER = 17976931348623157e292, NAN = 0 / 0;
  6671. var MAX_ARRAY_LENGTH = 4294967295, MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
  6672. var wrapFlags = [
  6673. ["ary", WRAP_ARY_FLAG],
  6674. ["bind", WRAP_BIND_FLAG],
  6675. ["bindKey", WRAP_BIND_KEY_FLAG],
  6676. ["curry", WRAP_CURRY_FLAG],
  6677. ["curryRight", WRAP_CURRY_RIGHT_FLAG],
  6678. ["flip", WRAP_FLIP_FLAG],
  6679. ["partial", WRAP_PARTIAL_FLAG],
  6680. ["partialRight", WRAP_PARTIAL_RIGHT_FLAG],
  6681. ["rearg", WRAP_REARG_FLAG]
  6682. ];
  6683. 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]";
  6684. 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]";
  6685. var reEmptyStringLeading = /\b__p \+= '';/g, reEmptyStringMiddle = /\b(__p \+=) '' \+/g, reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
  6686. var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, reUnescapedHtml = /[&<>"']/g, reHasEscapedHtml = RegExp(reEscapedHtml.source), reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
  6687. var reEscape = /<%-([\s\S]+?)%>/g, reEvaluate = /<%([\s\S]+?)%>/g, reInterpolate = /<%=([\s\S]+?)%>/g;
  6688. var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
  6689. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, reHasRegExpChar = RegExp(reRegExpChar.source);
  6690. var reTrimStart = /^\s+/;
  6691. var reWhitespace = /\s/;
  6692. var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, reSplitDetails = /,? & /;
  6693. var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
  6694. var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/;
  6695. var reEscapeChar = /\\(\\)?/g;
  6696. var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
  6697. var reFlags = /\w*$/;
  6698. var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
  6699. var reIsBinary = /^0b[01]+$/i;
  6700. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  6701. var reIsOctal = /^0o[0-7]+$/i;
  6702. var reIsUint = /^(?:0|[1-9]\d*)$/;
  6703. var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
  6704. var reNoMatch = /($^)/;
  6705. var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
  6706. 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;
  6707. 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";
  6708. 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("|") + ")";
  6709. var reApos = RegExp(rsApos, "g");
  6710. var reComboMark = RegExp(rsCombo, "g");
  6711. var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g");
  6712. var reUnicodeWord = RegExp([
  6713. rsUpper + "?" + rsLower + "+" + rsOptContrLower + "(?=" + [rsBreak, rsUpper, "$"].join("|") + ")",
  6714. rsMiscUpper + "+" + rsOptContrUpper + "(?=" + [rsBreak, rsUpper + rsMiscLower, "$"].join("|") + ")",
  6715. rsUpper + "?" + rsMiscLower + "+" + rsOptContrLower,
  6716. rsUpper + "+" + rsOptContrUpper,
  6717. rsOrdUpper,
  6718. rsOrdLower,
  6719. rsDigits,
  6720. rsEmoji
  6721. ].join("|"), "g");
  6722. var reHasUnicode = RegExp("[" + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + "]");
  6723. 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 ]/;
  6724. var contextProps = [
  6725. "Array",
  6726. "Buffer",
  6727. "DataView",
  6728. "Date",
  6729. "Error",
  6730. "Float32Array",
  6731. "Float64Array",
  6732. "Function",
  6733. "Int8Array",
  6734. "Int16Array",
  6735. "Int32Array",
  6736. "Map",
  6737. "Math",
  6738. "Object",
  6739. "Promise",
  6740. "RegExp",
  6741. "Set",
  6742. "String",
  6743. "Symbol",
  6744. "TypeError",
  6745. "Uint8Array",
  6746. "Uint8ClampedArray",
  6747. "Uint16Array",
  6748. "Uint32Array",
  6749. "WeakMap",
  6750. "_",
  6751. "clearTimeout",
  6752. "isFinite",
  6753. "parseInt",
  6754. "setTimeout"
  6755. ];
  6756. var templateCounter = -1;
  6757. var typedArrayTags = {};
  6758. typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
  6759. 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;
  6760. var cloneableTags = {};
  6761. 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;
  6762. cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
  6763. var deburredLetters = {
  6764. // Latin-1 Supplement block.
  6765. "À": "A",
  6766. "Á": "A",
  6767. "Â": "A",
  6768. "Ã": "A",
  6769. "Ä": "A",
  6770. "Å": "A",
  6771. "à": "a",
  6772. "á": "a",
  6773. "â": "a",
  6774. "ã": "a",
  6775. "ä": "a",
  6776. "å": "a",
  6777. "Ç": "C",
  6778. "ç": "c",
  6779. "Ð": "D",
  6780. "ð": "d",
  6781. "È": "E",
  6782. "É": "E",
  6783. "Ê": "E",
  6784. "Ë": "E",
  6785. "è": "e",
  6786. "é": "e",
  6787. "ê": "e",
  6788. "ë": "e",
  6789. "Ì": "I",
  6790. "Í": "I",
  6791. "Î": "I",
  6792. "Ï": "I",
  6793. "ì": "i",
  6794. "í": "i",
  6795. "î": "i",
  6796. "ï": "i",
  6797. "Ñ": "N",
  6798. "ñ": "n",
  6799. "Ò": "O",
  6800. "Ó": "O",
  6801. "Ô": "O",
  6802. "Õ": "O",
  6803. "Ö": "O",
  6804. "Ø": "O",
  6805. "ò": "o",
  6806. "ó": "o",
  6807. "ô": "o",
  6808. "õ": "o",
  6809. "ö": "o",
  6810. "ø": "o",
  6811. "Ù": "U",
  6812. "Ú": "U",
  6813. "Û": "U",
  6814. "Ü": "U",
  6815. "ù": "u",
  6816. "ú": "u",
  6817. "û": "u",
  6818. "ü": "u",
  6819. "Ý": "Y",
  6820. "ý": "y",
  6821. "ÿ": "y",
  6822. "Æ": "Ae",
  6823. "æ": "ae",
  6824. "Þ": "Th",
  6825. "þ": "th",
  6826. "ß": "ss",
  6827. // Latin Extended-A block.
  6828. "Ā": "A",
  6829. "Ă": "A",
  6830. "Ą": "A",
  6831. "ā": "a",
  6832. "ă": "a",
  6833. "ą": "a",
  6834. "Ć": "C",
  6835. "Ĉ": "C",
  6836. "Ċ": "C",
  6837. "Č": "C",
  6838. "ć": "c",
  6839. "ĉ": "c",
  6840. "ċ": "c",
  6841. "č": "c",
  6842. "Ď": "D",
  6843. "Đ": "D",
  6844. "ď": "d",
  6845. "đ": "d",
  6846. "Ē": "E",
  6847. "Ĕ": "E",
  6848. "Ė": "E",
  6849. "Ę": "E",
  6850. "Ě": "E",
  6851. "ē": "e",
  6852. "ĕ": "e",
  6853. "ė": "e",
  6854. "ę": "e",
  6855. "ě": "e",
  6856. "Ĝ": "G",
  6857. "Ğ": "G",
  6858. "Ġ": "G",
  6859. "Ģ": "G",
  6860. "ĝ": "g",
  6861. "ğ": "g",
  6862. "ġ": "g",
  6863. "ģ": "g",
  6864. "Ĥ": "H",
  6865. "Ħ": "H",
  6866. "ĥ": "h",
  6867. "ħ": "h",
  6868. "Ĩ": "I",
  6869. "Ī": "I",
  6870. "Ĭ": "I",
  6871. "Į": "I",
  6872. "İ": "I",
  6873. "ĩ": "i",
  6874. "ī": "i",
  6875. "ĭ": "i",
  6876. "į": "i",
  6877. "ı": "i",
  6878. "Ĵ": "J",
  6879. "ĵ": "j",
  6880. "Ķ": "K",
  6881. "ķ": "k",
  6882. "ĸ": "k",
  6883. "Ĺ": "L",
  6884. "Ļ": "L",
  6885. "Ľ": "L",
  6886. "Ŀ": "L",
  6887. "Ł": "L",
  6888. "ĺ": "l",
  6889. "ļ": "l",
  6890. "ľ": "l",
  6891. "ŀ": "l",
  6892. "ł": "l",
  6893. "Ń": "N",
  6894. "Ņ": "N",
  6895. "Ň": "N",
  6896. "Ŋ": "N",
  6897. "ń": "n",
  6898. "ņ": "n",
  6899. "ň": "n",
  6900. "ŋ": "n",
  6901. "Ō": "O",
  6902. "Ŏ": "O",
  6903. "Ő": "O",
  6904. "ō": "o",
  6905. "ŏ": "o",
  6906. "ő": "o",
  6907. "Ŕ": "R",
  6908. "Ŗ": "R",
  6909. "Ř": "R",
  6910. "ŕ": "r",
  6911. "ŗ": "r",
  6912. "ř": "r",
  6913. "Ś": "S",
  6914. "Ŝ": "S",
  6915. "Ş": "S",
  6916. "Š": "S",
  6917. "ś": "s",
  6918. "ŝ": "s",
  6919. "ş": "s",
  6920. "š": "s",
  6921. "Ţ": "T",
  6922. "Ť": "T",
  6923. "Ŧ": "T",
  6924. "ţ": "t",
  6925. "ť": "t",
  6926. "ŧ": "t",
  6927. "Ũ": "U",
  6928. "Ū": "U",
  6929. "Ŭ": "U",
  6930. "Ů": "U",
  6931. "Ű": "U",
  6932. "Ų": "U",
  6933. "ũ": "u",
  6934. "ū": "u",
  6935. "ŭ": "u",
  6936. "ů": "u",
  6937. "ű": "u",
  6938. "ų": "u",
  6939. "Ŵ": "W",
  6940. "ŵ": "w",
  6941. "Ŷ": "Y",
  6942. "ŷ": "y",
  6943. "Ÿ": "Y",
  6944. "Ź": "Z",
  6945. "Ż": "Z",
  6946. "Ž": "Z",
  6947. "ź": "z",
  6948. "ż": "z",
  6949. "ž": "z",
  6950. "IJ": "IJ",
  6951. "ij": "ij",
  6952. "Œ": "Oe",
  6953. "œ": "oe",
  6954. "ʼn": "'n",
  6955. "ſ": "s"
  6956. };
  6957. var htmlEscapes = {
  6958. "&": "&amp;",
  6959. "<": "&lt;",
  6960. ">": "&gt;",
  6961. '"': "&quot;",
  6962. "'": "&#39;"
  6963. };
  6964. var htmlUnescapes = {
  6965. "&amp;": "&",
  6966. "&lt;": "<",
  6967. "&gt;": ">",
  6968. "&quot;": '"',
  6969. "&#39;": "'"
  6970. };
  6971. var stringEscapes = {
  6972. "\\": "\\",
  6973. "'": "'",
  6974. "\n": "n",
  6975. "\r": "r",
  6976. "\u2028": "u2028",
  6977. "\u2029": "u2029"
  6978. };
  6979. var freeParseFloat = parseFloat, freeParseInt = parseInt;
  6980. var freeGlobal = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
  6981. var freeSelf = typeof self == "object" && self && self.Object === Object && self;
  6982. var root = freeGlobal || freeSelf || Function("return this")();
  6983. var freeExports = exports && !exports.nodeType && exports;
  6984. var freeModule = freeExports && true && module && !module.nodeType && module;
  6985. var moduleExports = freeModule && freeModule.exports === freeExports;
  6986. var freeProcess = moduleExports && freeGlobal.process;
  6987. var nodeUtil = function() {
  6988. try {
  6989. var types = freeModule && freeModule.require && freeModule.require("util").types;
  6990. if (types) {
  6991. return types;
  6992. }
  6993. return freeProcess && freeProcess.binding && freeProcess.binding("util");
  6994. } catch (e) {
  6995. }
  6996. }();
  6997. 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;
  6998. function apply(func, thisArg, args) {
  6999. switch (args.length) {
  7000. case 0:
  7001. return func.call(thisArg);
  7002. case 1:
  7003. return func.call(thisArg, args[0]);
  7004. case 2:
  7005. return func.call(thisArg, args[0], args[1]);
  7006. case 3:
  7007. return func.call(thisArg, args[0], args[1], args[2]);
  7008. }
  7009. return func.apply(thisArg, args);
  7010. }
  7011. function arrayAggregator(array, setter, iteratee, accumulator) {
  7012. var index = -1, length = array == null ? 0 : array.length;
  7013. while (++index < length) {
  7014. var value = array[index];
  7015. setter(accumulator, value, iteratee(value), array);
  7016. }
  7017. return accumulator;
  7018. }
  7019. function arrayEach(array, iteratee) {
  7020. var index = -1, length = array == null ? 0 : array.length;
  7021. while (++index < length) {
  7022. if (iteratee(array[index], index, array) === false) {
  7023. break;
  7024. }
  7025. }
  7026. return array;
  7027. }
  7028. function arrayEachRight(array, iteratee) {
  7029. var length = array == null ? 0 : array.length;
  7030. while (length--) {
  7031. if (iteratee(array[length], length, array) === false) {
  7032. break;
  7033. }
  7034. }
  7035. return array;
  7036. }
  7037. function arrayEvery(array, predicate) {
  7038. var index = -1, length = array == null ? 0 : array.length;
  7039. while (++index < length) {
  7040. if (!predicate(array[index], index, array)) {
  7041. return false;
  7042. }
  7043. }
  7044. return true;
  7045. }
  7046. function arrayFilter(array, predicate) {
  7047. var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
  7048. while (++index < length) {
  7049. var value = array[index];
  7050. if (predicate(value, index, array)) {
  7051. result[resIndex++] = value;
  7052. }
  7053. }
  7054. return result;
  7055. }
  7056. function arrayIncludes(array, value) {
  7057. var length = array == null ? 0 : array.length;
  7058. return !!length && baseIndexOf(array, value, 0) > -1;
  7059. }
  7060. function arrayIncludesWith(array, value, comparator) {
  7061. var index = -1, length = array == null ? 0 : array.length;
  7062. while (++index < length) {
  7063. if (comparator(value, array[index])) {
  7064. return true;
  7065. }
  7066. }
  7067. return false;
  7068. }
  7069. function arrayMap(array, iteratee) {
  7070. var index = -1, length = array == null ? 0 : array.length, result = Array(length);
  7071. while (++index < length) {
  7072. result[index] = iteratee(array[index], index, array);
  7073. }
  7074. return result;
  7075. }
  7076. function arrayPush(array, values) {
  7077. var index = -1, length = values.length, offset = array.length;
  7078. while (++index < length) {
  7079. array[offset + index] = values[index];
  7080. }
  7081. return array;
  7082. }
  7083. function arrayReduce(array, iteratee, accumulator, initAccum) {
  7084. var index = -1, length = array == null ? 0 : array.length;
  7085. if (initAccum && length) {
  7086. accumulator = array[++index];
  7087. }
  7088. while (++index < length) {
  7089. accumulator = iteratee(accumulator, array[index], index, array);
  7090. }
  7091. return accumulator;
  7092. }
  7093. function arrayReduceRight(array, iteratee, accumulator, initAccum) {
  7094. var length = array == null ? 0 : array.length;
  7095. if (initAccum && length) {
  7096. accumulator = array[--length];
  7097. }
  7098. while (length--) {
  7099. accumulator = iteratee(accumulator, array[length], length, array);
  7100. }
  7101. return accumulator;
  7102. }
  7103. function arraySome(array, predicate) {
  7104. var index = -1, length = array == null ? 0 : array.length;
  7105. while (++index < length) {
  7106. if (predicate(array[index], index, array)) {
  7107. return true;
  7108. }
  7109. }
  7110. return false;
  7111. }
  7112. var asciiSize = baseProperty("length");
  7113. function asciiToArray(string) {
  7114. return string.split("");
  7115. }
  7116. function asciiWords(string) {
  7117. return string.match(reAsciiWord) || [];
  7118. }
  7119. function baseFindKey(collection, predicate, eachFunc) {
  7120. var result;
  7121. eachFunc(collection, function(value, key, collection2) {
  7122. if (predicate(value, key, collection2)) {
  7123. result = key;
  7124. return false;
  7125. }
  7126. });
  7127. return result;
  7128. }
  7129. function baseFindIndex(array, predicate, fromIndex, fromRight) {
  7130. var length = array.length, index = fromIndex + (fromRight ? 1 : -1);
  7131. while (fromRight ? index-- : ++index < length) {
  7132. if (predicate(array[index], index, array)) {
  7133. return index;
  7134. }
  7135. }
  7136. return -1;
  7137. }
  7138. function baseIndexOf(array, value, fromIndex) {
  7139. return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex);
  7140. }
  7141. function baseIndexOfWith(array, value, fromIndex, comparator) {
  7142. var index = fromIndex - 1, length = array.length;
  7143. while (++index < length) {
  7144. if (comparator(array[index], value)) {
  7145. return index;
  7146. }
  7147. }
  7148. return -1;
  7149. }
  7150. function baseIsNaN(value) {
  7151. return value !== value;
  7152. }
  7153. function baseMean(array, iteratee) {
  7154. var length = array == null ? 0 : array.length;
  7155. return length ? baseSum(array, iteratee) / length : NAN;
  7156. }
  7157. function baseProperty(key) {
  7158. return function(object) {
  7159. return object == null ? undefined$1 : object[key];
  7160. };
  7161. }
  7162. function basePropertyOf(object) {
  7163. return function(key) {
  7164. return object == null ? undefined$1 : object[key];
  7165. };
  7166. }
  7167. function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
  7168. eachFunc(collection, function(value, index, collection2) {
  7169. accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value, index, collection2);
  7170. });
  7171. return accumulator;
  7172. }
  7173. function baseSortBy(array, comparer) {
  7174. var length = array.length;
  7175. array.sort(comparer);
  7176. while (length--) {
  7177. array[length] = array[length].value;
  7178. }
  7179. return array;
  7180. }
  7181. function baseSum(array, iteratee) {
  7182. var result, index = -1, length = array.length;
  7183. while (++index < length) {
  7184. var current = iteratee(array[index]);
  7185. if (current !== undefined$1) {
  7186. result = result === undefined$1 ? current : result + current;
  7187. }
  7188. }
  7189. return result;
  7190. }
  7191. function baseTimes(n, iteratee) {
  7192. var index = -1, result = Array(n);
  7193. while (++index < n) {
  7194. result[index] = iteratee(index);
  7195. }
  7196. return result;
  7197. }
  7198. function baseToPairs(object, props) {
  7199. return arrayMap(props, function(key) {
  7200. return [key, object[key]];
  7201. });
  7202. }
  7203. function baseTrim(string) {
  7204. return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
  7205. }
  7206. function baseUnary(func) {
  7207. return function(value) {
  7208. return func(value);
  7209. };
  7210. }
  7211. function baseValues(object, props) {
  7212. return arrayMap(props, function(key) {
  7213. return object[key];
  7214. });
  7215. }
  7216. function cacheHas(cache, key) {
  7217. return cache.has(key);
  7218. }
  7219. function charsStartIndex(strSymbols, chrSymbols) {
  7220. var index = -1, length = strSymbols.length;
  7221. while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {
  7222. }
  7223. return index;
  7224. }
  7225. function charsEndIndex(strSymbols, chrSymbols) {
  7226. var index = strSymbols.length;
  7227. while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {
  7228. }
  7229. return index;
  7230. }
  7231. function countHolders(array, placeholder) {
  7232. var length = array.length, result = 0;
  7233. while (length--) {
  7234. if (array[length] === placeholder) {
  7235. ++result;
  7236. }
  7237. }
  7238. return result;
  7239. }
  7240. var deburrLetter = basePropertyOf(deburredLetters);
  7241. var escapeHtmlChar = basePropertyOf(htmlEscapes);
  7242. function escapeStringChar(chr) {
  7243. return "\\" + stringEscapes[chr];
  7244. }
  7245. function getValue(object, key) {
  7246. return object == null ? undefined$1 : object[key];
  7247. }
  7248. function hasUnicode(string) {
  7249. return reHasUnicode.test(string);
  7250. }
  7251. function hasUnicodeWord(string) {
  7252. return reHasUnicodeWord.test(string);
  7253. }
  7254. function iteratorToArray(iterator) {
  7255. var data, result = [];
  7256. while (!(data = iterator.next()).done) {
  7257. result.push(data.value);
  7258. }
  7259. return result;
  7260. }
  7261. function mapToArray(map) {
  7262. var index = -1, result = Array(map.size);
  7263. map.forEach(function(value, key) {
  7264. result[++index] = [key, value];
  7265. });
  7266. return result;
  7267. }
  7268. function overArg(func, transform) {
  7269. return function(arg) {
  7270. return func(transform(arg));
  7271. };
  7272. }
  7273. function replaceHolders(array, placeholder) {
  7274. var index = -1, length = array.length, resIndex = 0, result = [];
  7275. while (++index < length) {
  7276. var value = array[index];
  7277. if (value === placeholder || value === PLACEHOLDER) {
  7278. array[index] = PLACEHOLDER;
  7279. result[resIndex++] = index;
  7280. }
  7281. }
  7282. return result;
  7283. }
  7284. function setToArray(set) {
  7285. var index = -1, result = Array(set.size);
  7286. set.forEach(function(value) {
  7287. result[++index] = value;
  7288. });
  7289. return result;
  7290. }
  7291. function setToPairs(set) {
  7292. var index = -1, result = Array(set.size);
  7293. set.forEach(function(value) {
  7294. result[++index] = [value, value];
  7295. });
  7296. return result;
  7297. }
  7298. function strictIndexOf(array, value, fromIndex) {
  7299. var index = fromIndex - 1, length = array.length;
  7300. while (++index < length) {
  7301. if (array[index] === value) {
  7302. return index;
  7303. }
  7304. }
  7305. return -1;
  7306. }
  7307. function strictLastIndexOf(array, value, fromIndex) {
  7308. var index = fromIndex + 1;
  7309. while (index--) {
  7310. if (array[index] === value) {
  7311. return index;
  7312. }
  7313. }
  7314. return index;
  7315. }
  7316. function stringSize(string) {
  7317. return hasUnicode(string) ? unicodeSize(string) : asciiSize(string);
  7318. }
  7319. function stringToArray(string) {
  7320. return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string);
  7321. }
  7322. function trimmedEndIndex(string) {
  7323. var index = string.length;
  7324. while (index-- && reWhitespace.test(string.charAt(index))) {
  7325. }
  7326. return index;
  7327. }
  7328. var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
  7329. function unicodeSize(string) {
  7330. var result = reUnicode.lastIndex = 0;
  7331. while (reUnicode.test(string)) {
  7332. ++result;
  7333. }
  7334. return result;
  7335. }
  7336. function unicodeToArray(string) {
  7337. return string.match(reUnicode) || [];
  7338. }
  7339. function unicodeWords(string) {
  7340. return string.match(reUnicodeWord) || [];
  7341. }
  7342. var runInContext = function runInContext2(context) {
  7343. context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
  7344. var Array2 = context.Array, Date2 = context.Date, Error2 = context.Error, Function2 = context.Function, Math2 = context.Math, Object2 = context.Object, RegExp2 = context.RegExp, String2 = context.String, TypeError2 = context.TypeError;
  7345. var arrayProto = Array2.prototype, funcProto = Function2.prototype, objectProto = Object2.prototype;
  7346. var coreJsData = context["__core-js_shared__"];
  7347. var funcToString = funcProto.toString;
  7348. var hasOwnProperty = objectProto.hasOwnProperty;
  7349. var idCounter = 0;
  7350. var maskSrcKey = function() {
  7351. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
  7352. return uid ? "Symbol(src)_1." + uid : "";
  7353. }();
  7354. var nativeObjectToString = objectProto.toString;
  7355. var objectCtorString = funcToString.call(Object2);
  7356. var oldDash = root._;
  7357. var reIsNative = RegExp2(
  7358. "^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
  7359. );
  7360. var Buffer2 = moduleExports ? context.Buffer : undefined$1, Symbol2 = context.Symbol, Uint8Array2 = context.Uint8Array, allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : undefined$1, getPrototype = overArg(Object2.getPrototypeOf, Object2), objectCreate = Object2.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice, spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : undefined$1, symIterator = Symbol2 ? Symbol2.iterator : undefined$1, symToStringTag = Symbol2 ? Symbol2.toStringTag : undefined$1;
  7361. var defineProperty = function() {
  7362. try {
  7363. var func = getNative(Object2, "defineProperty");
  7364. func({}, "", {});
  7365. return func;
  7366. } catch (e) {
  7367. }
  7368. }();
  7369. var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date2 && Date2.now !== root.Date.now && Date2.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
  7370. var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : undefined$1, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object2.keys, Object2), nativeMax = Math2.max, nativeMin = Math2.min, nativeNow = Date2.now, nativeParseInt = context.parseInt, nativeRandom = Math2.random, nativeReverse = arrayProto.reverse;
  7371. 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");
  7372. var metaMap = WeakMap && new WeakMap();
  7373. var realNames = {};
  7374. var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap);
  7375. var symbolProto = Symbol2 ? Symbol2.prototype : undefined$1, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined$1, symbolToString = symbolProto ? symbolProto.toString : undefined$1;
  7376. function lodash2(value) {
  7377. if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
  7378. if (value instanceof LodashWrapper) {
  7379. return value;
  7380. }
  7381. if (hasOwnProperty.call(value, "__wrapped__")) {
  7382. return wrapperClone(value);
  7383. }
  7384. }
  7385. return new LodashWrapper(value);
  7386. }
  7387. var baseCreate = function() {
  7388. function object() {
  7389. }
  7390. return function(proto) {
  7391. if (!isObject(proto)) {
  7392. return {};
  7393. }
  7394. if (objectCreate) {
  7395. return objectCreate(proto);
  7396. }
  7397. object.prototype = proto;
  7398. var result2 = new object();
  7399. object.prototype = undefined$1;
  7400. return result2;
  7401. };
  7402. }();
  7403. function baseLodash() {
  7404. }
  7405. function LodashWrapper(value, chainAll) {
  7406. this.__wrapped__ = value;
  7407. this.__actions__ = [];
  7408. this.__chain__ = !!chainAll;
  7409. this.__index__ = 0;
  7410. this.__values__ = undefined$1;
  7411. }
  7412. lodash2.templateSettings = {
  7413. /**
  7414. * Used to detect `data` property values to be HTML-escaped.
  7415. *
  7416. * @memberOf _.templateSettings
  7417. * @type {RegExp}
  7418. */
  7419. "escape": reEscape,
  7420. /**
  7421. * Used to detect code to be evaluated.
  7422. *
  7423. * @memberOf _.templateSettings
  7424. * @type {RegExp}
  7425. */
  7426. "evaluate": reEvaluate,
  7427. /**
  7428. * Used to detect `data` property values to inject.
  7429. *
  7430. * @memberOf _.templateSettings
  7431. * @type {RegExp}
  7432. */
  7433. "interpolate": reInterpolate,
  7434. /**
  7435. * Used to reference the data object in the template text.
  7436. *
  7437. * @memberOf _.templateSettings
  7438. * @type {string}
  7439. */
  7440. "variable": "",
  7441. /**
  7442. * Used to import variables into the compiled template.
  7443. *
  7444. * @memberOf _.templateSettings
  7445. * @type {Object}
  7446. */
  7447. "imports": {
  7448. /**
  7449. * A reference to the `lodash` function.
  7450. *
  7451. * @memberOf _.templateSettings.imports
  7452. * @type {Function}
  7453. */
  7454. "_": lodash2
  7455. }
  7456. };
  7457. lodash2.prototype = baseLodash.prototype;
  7458. lodash2.prototype.constructor = lodash2;
  7459. LodashWrapper.prototype = baseCreate(baseLodash.prototype);
  7460. LodashWrapper.prototype.constructor = LodashWrapper;
  7461. function LazyWrapper(value) {
  7462. this.__wrapped__ = value;
  7463. this.__actions__ = [];
  7464. this.__dir__ = 1;
  7465. this.__filtered__ = false;
  7466. this.__iteratees__ = [];
  7467. this.__takeCount__ = MAX_ARRAY_LENGTH;
  7468. this.__views__ = [];
  7469. }
  7470. function lazyClone() {
  7471. var result2 = new LazyWrapper(this.__wrapped__);
  7472. result2.__actions__ = copyArray(this.__actions__);
  7473. result2.__dir__ = this.__dir__;
  7474. result2.__filtered__ = this.__filtered__;
  7475. result2.__iteratees__ = copyArray(this.__iteratees__);
  7476. result2.__takeCount__ = this.__takeCount__;
  7477. result2.__views__ = copyArray(this.__views__);
  7478. return result2;
  7479. }
  7480. function lazyReverse() {
  7481. if (this.__filtered__) {
  7482. var result2 = new LazyWrapper(this);
  7483. result2.__dir__ = -1;
  7484. result2.__filtered__ = true;
  7485. } else {
  7486. result2 = this.clone();
  7487. result2.__dir__ *= -1;
  7488. }
  7489. return result2;
  7490. }
  7491. function lazyValue() {
  7492. 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__);
  7493. if (!isArr || !isRight && arrLength == length && takeCount == length) {
  7494. return baseWrapperValue(array, this.__actions__);
  7495. }
  7496. var result2 = [];
  7497. outer:
  7498. while (length-- && resIndex < takeCount) {
  7499. index += dir;
  7500. var iterIndex = -1, value = array[index];
  7501. while (++iterIndex < iterLength) {
  7502. var data = iteratees[iterIndex], iteratee2 = data.iteratee, type = data.type, computed = iteratee2(value);
  7503. if (type == LAZY_MAP_FLAG) {
  7504. value = computed;
  7505. } else if (!computed) {
  7506. if (type == LAZY_FILTER_FLAG) {
  7507. continue outer;
  7508. } else {
  7509. break outer;
  7510. }
  7511. }
  7512. }
  7513. result2[resIndex++] = value;
  7514. }
  7515. return result2;
  7516. }
  7517. LazyWrapper.prototype = baseCreate(baseLodash.prototype);
  7518. LazyWrapper.prototype.constructor = LazyWrapper;
  7519. function Hash(entries) {
  7520. var index = -1, length = entries == null ? 0 : entries.length;
  7521. this.clear();
  7522. while (++index < length) {
  7523. var entry = entries[index];
  7524. this.set(entry[0], entry[1]);
  7525. }
  7526. }
  7527. function hashClear() {
  7528. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  7529. this.size = 0;
  7530. }
  7531. function hashDelete(key) {
  7532. var result2 = this.has(key) && delete this.__data__[key];
  7533. this.size -= result2 ? 1 : 0;
  7534. return result2;
  7535. }
  7536. function hashGet(key) {
  7537. var data = this.__data__;
  7538. if (nativeCreate) {
  7539. var result2 = data[key];
  7540. return result2 === HASH_UNDEFINED ? undefined$1 : result2;
  7541. }
  7542. return hasOwnProperty.call(data, key) ? data[key] : undefined$1;
  7543. }
  7544. function hashHas(key) {
  7545. var data = this.__data__;
  7546. return nativeCreate ? data[key] !== undefined$1 : hasOwnProperty.call(data, key);
  7547. }
  7548. function hashSet(key, value) {
  7549. var data = this.__data__;
  7550. this.size += this.has(key) ? 0 : 1;
  7551. data[key] = nativeCreate && value === undefined$1 ? HASH_UNDEFINED : value;
  7552. return this;
  7553. }
  7554. Hash.prototype.clear = hashClear;
  7555. Hash.prototype["delete"] = hashDelete;
  7556. Hash.prototype.get = hashGet;
  7557. Hash.prototype.has = hashHas;
  7558. Hash.prototype.set = hashSet;
  7559. function ListCache(entries) {
  7560. var index = -1, length = entries == null ? 0 : entries.length;
  7561. this.clear();
  7562. while (++index < length) {
  7563. var entry = entries[index];
  7564. this.set(entry[0], entry[1]);
  7565. }
  7566. }
  7567. function listCacheClear() {
  7568. this.__data__ = [];
  7569. this.size = 0;
  7570. }
  7571. function listCacheDelete(key) {
  7572. var data = this.__data__, index = assocIndexOf(data, key);
  7573. if (index < 0) {
  7574. return false;
  7575. }
  7576. var lastIndex = data.length - 1;
  7577. if (index == lastIndex) {
  7578. data.pop();
  7579. } else {
  7580. splice.call(data, index, 1);
  7581. }
  7582. --this.size;
  7583. return true;
  7584. }
  7585. function listCacheGet(key) {
  7586. var data = this.__data__, index = assocIndexOf(data, key);
  7587. return index < 0 ? undefined$1 : data[index][1];
  7588. }
  7589. function listCacheHas(key) {
  7590. return assocIndexOf(this.__data__, key) > -1;
  7591. }
  7592. function listCacheSet(key, value) {
  7593. var data = this.__data__, index = assocIndexOf(data, key);
  7594. if (index < 0) {
  7595. ++this.size;
  7596. data.push([key, value]);
  7597. } else {
  7598. data[index][1] = value;
  7599. }
  7600. return this;
  7601. }
  7602. ListCache.prototype.clear = listCacheClear;
  7603. ListCache.prototype["delete"] = listCacheDelete;
  7604. ListCache.prototype.get = listCacheGet;
  7605. ListCache.prototype.has = listCacheHas;
  7606. ListCache.prototype.set = listCacheSet;
  7607. function MapCache(entries) {
  7608. var index = -1, length = entries == null ? 0 : entries.length;
  7609. this.clear();
  7610. while (++index < length) {
  7611. var entry = entries[index];
  7612. this.set(entry[0], entry[1]);
  7613. }
  7614. }
  7615. function mapCacheClear() {
  7616. this.size = 0;
  7617. this.__data__ = {
  7618. "hash": new Hash(),
  7619. "map": new (Map || ListCache)(),
  7620. "string": new Hash()
  7621. };
  7622. }
  7623. function mapCacheDelete(key) {
  7624. var result2 = getMapData(this, key)["delete"](key);
  7625. this.size -= result2 ? 1 : 0;
  7626. return result2;
  7627. }
  7628. function mapCacheGet(key) {
  7629. return getMapData(this, key).get(key);
  7630. }
  7631. function mapCacheHas(key) {
  7632. return getMapData(this, key).has(key);
  7633. }
  7634. function mapCacheSet(key, value) {
  7635. var data = getMapData(this, key), size2 = data.size;
  7636. data.set(key, value);
  7637. this.size += data.size == size2 ? 0 : 1;
  7638. return this;
  7639. }
  7640. MapCache.prototype.clear = mapCacheClear;
  7641. MapCache.prototype["delete"] = mapCacheDelete;
  7642. MapCache.prototype.get = mapCacheGet;
  7643. MapCache.prototype.has = mapCacheHas;
  7644. MapCache.prototype.set = mapCacheSet;
  7645. function SetCache(values2) {
  7646. var index = -1, length = values2 == null ? 0 : values2.length;
  7647. this.__data__ = new MapCache();
  7648. while (++index < length) {
  7649. this.add(values2[index]);
  7650. }
  7651. }
  7652. function setCacheAdd(value) {
  7653. this.__data__.set(value, HASH_UNDEFINED);
  7654. return this;
  7655. }
  7656. function setCacheHas(value) {
  7657. return this.__data__.has(value);
  7658. }
  7659. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
  7660. SetCache.prototype.has = setCacheHas;
  7661. function Stack(entries) {
  7662. var data = this.__data__ = new ListCache(entries);
  7663. this.size = data.size;
  7664. }
  7665. function stackClear() {
  7666. this.__data__ = new ListCache();
  7667. this.size = 0;
  7668. }
  7669. function stackDelete(key) {
  7670. var data = this.__data__, result2 = data["delete"](key);
  7671. this.size = data.size;
  7672. return result2;
  7673. }
  7674. function stackGet(key) {
  7675. return this.__data__.get(key);
  7676. }
  7677. function stackHas(key) {
  7678. return this.__data__.has(key);
  7679. }
  7680. function stackSet(key, value) {
  7681. var data = this.__data__;
  7682. if (data instanceof ListCache) {
  7683. var pairs = data.__data__;
  7684. if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) {
  7685. pairs.push([key, value]);
  7686. this.size = ++data.size;
  7687. return this;
  7688. }
  7689. data = this.__data__ = new MapCache(pairs);
  7690. }
  7691. data.set(key, value);
  7692. this.size = data.size;
  7693. return this;
  7694. }
  7695. Stack.prototype.clear = stackClear;
  7696. Stack.prototype["delete"] = stackDelete;
  7697. Stack.prototype.get = stackGet;
  7698. Stack.prototype.has = stackHas;
  7699. Stack.prototype.set = stackSet;
  7700. function arrayLikeKeys(value, inherited) {
  7701. 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, String2) : [], length = result2.length;
  7702. for (var key in value) {
  7703. if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
  7704. (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
  7705. isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
  7706. isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
  7707. isIndex(key, length)))) {
  7708. result2.push(key);
  7709. }
  7710. }
  7711. return result2;
  7712. }
  7713. function arraySample(array) {
  7714. var length = array.length;
  7715. return length ? array[baseRandom(0, length - 1)] : undefined$1;
  7716. }
  7717. function arraySampleSize(array, n) {
  7718. return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
  7719. }
  7720. function arrayShuffle(array) {
  7721. return shuffleSelf(copyArray(array));
  7722. }
  7723. function assignMergeValue(object, key, value) {
  7724. if (value !== undefined$1 && !eq(object[key], value) || value === undefined$1 && !(key in object)) {
  7725. baseAssignValue(object, key, value);
  7726. }
  7727. }
  7728. function assignValue(object, key, value) {
  7729. var objValue = object[key];
  7730. if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === undefined$1 && !(key in object)) {
  7731. baseAssignValue(object, key, value);
  7732. }
  7733. }
  7734. function assocIndexOf(array, key) {
  7735. var length = array.length;
  7736. while (length--) {
  7737. if (eq(array[length][0], key)) {
  7738. return length;
  7739. }
  7740. }
  7741. return -1;
  7742. }
  7743. function baseAggregator(collection, setter, iteratee2, accumulator) {
  7744. baseEach(collection, function(value, key, collection2) {
  7745. setter(accumulator, value, iteratee2(value), collection2);
  7746. });
  7747. return accumulator;
  7748. }
  7749. function baseAssign(object, source) {
  7750. return object && copyObject(source, keys(source), object);
  7751. }
  7752. function baseAssignIn(object, source) {
  7753. return object && copyObject(source, keysIn(source), object);
  7754. }
  7755. function baseAssignValue(object, key, value) {
  7756. if (key == "__proto__" && defineProperty) {
  7757. defineProperty(object, key, {
  7758. "configurable": true,
  7759. "enumerable": true,
  7760. "value": value,
  7761. "writable": true
  7762. });
  7763. } else {
  7764. object[key] = value;
  7765. }
  7766. }
  7767. function baseAt(object, paths) {
  7768. var index = -1, length = paths.length, result2 = Array2(length), skip = object == null;
  7769. while (++index < length) {
  7770. result2[index] = skip ? undefined$1 : get(object, paths[index]);
  7771. }
  7772. return result2;
  7773. }
  7774. function baseClamp(number, lower, upper) {
  7775. if (number === number) {
  7776. if (upper !== undefined$1) {
  7777. number = number <= upper ? number : upper;
  7778. }
  7779. if (lower !== undefined$1) {
  7780. number = number >= lower ? number : lower;
  7781. }
  7782. }
  7783. return number;
  7784. }
  7785. function baseClone(value, bitmask, customizer, key, object, stack) {
  7786. var result2, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG;
  7787. if (customizer) {
  7788. result2 = object ? customizer(value, key, object, stack) : customizer(value);
  7789. }
  7790. if (result2 !== undefined$1) {
  7791. return result2;
  7792. }
  7793. if (!isObject(value)) {
  7794. return value;
  7795. }
  7796. var isArr = isArray(value);
  7797. if (isArr) {
  7798. result2 = initCloneArray(value);
  7799. if (!isDeep) {
  7800. return copyArray(value, result2);
  7801. }
  7802. } else {
  7803. var tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
  7804. if (isBuffer(value)) {
  7805. return cloneBuffer(value, isDeep);
  7806. }
  7807. if (tag == objectTag || tag == argsTag || isFunc && !object) {
  7808. result2 = isFlat || isFunc ? {} : initCloneObject(value);
  7809. if (!isDeep) {
  7810. return isFlat ? copySymbolsIn(value, baseAssignIn(result2, value)) : copySymbols(value, baseAssign(result2, value));
  7811. }
  7812. } else {
  7813. if (!cloneableTags[tag]) {
  7814. return object ? value : {};
  7815. }
  7816. result2 = initCloneByTag(value, tag, isDeep);
  7817. }
  7818. }
  7819. stack || (stack = new Stack());
  7820. var stacked = stack.get(value);
  7821. if (stacked) {
  7822. return stacked;
  7823. }
  7824. stack.set(value, result2);
  7825. if (isSet(value)) {
  7826. value.forEach(function(subValue) {
  7827. result2.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
  7828. });
  7829. } else if (isMap(value)) {
  7830. value.forEach(function(subValue, key2) {
  7831. result2.set(key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
  7832. });
  7833. }
  7834. var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys;
  7835. var props = isArr ? undefined$1 : keysFunc(value);
  7836. arrayEach(props || value, function(subValue, key2) {
  7837. if (props) {
  7838. key2 = subValue;
  7839. subValue = value[key2];
  7840. }
  7841. assignValue(result2, key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
  7842. });
  7843. return result2;
  7844. }
  7845. function baseConforms(source) {
  7846. var props = keys(source);
  7847. return function(object) {
  7848. return baseConformsTo(object, source, props);
  7849. };
  7850. }
  7851. function baseConformsTo(object, source, props) {
  7852. var length = props.length;
  7853. if (object == null) {
  7854. return !length;
  7855. }
  7856. object = Object2(object);
  7857. while (length--) {
  7858. var key = props[length], predicate = source[key], value = object[key];
  7859. if (value === undefined$1 && !(key in object) || !predicate(value)) {
  7860. return false;
  7861. }
  7862. }
  7863. return true;
  7864. }
  7865. function baseDelay(func, wait, args) {
  7866. if (typeof func != "function") {
  7867. throw new TypeError2(FUNC_ERROR_TEXT);
  7868. }
  7869. return setTimeout(function() {
  7870. func.apply(undefined$1, args);
  7871. }, wait);
  7872. }
  7873. function baseDifference(array, values2, iteratee2, comparator) {
  7874. var index = -1, includes2 = arrayIncludes, isCommon = true, length = array.length, result2 = [], valuesLength = values2.length;
  7875. if (!length) {
  7876. return result2;
  7877. }
  7878. if (iteratee2) {
  7879. values2 = arrayMap(values2, baseUnary(iteratee2));
  7880. }
  7881. if (comparator) {
  7882. includes2 = arrayIncludesWith;
  7883. isCommon = false;
  7884. } else if (values2.length >= LARGE_ARRAY_SIZE) {
  7885. includes2 = cacheHas;
  7886. isCommon = false;
  7887. values2 = new SetCache(values2);
  7888. }
  7889. outer:
  7890. while (++index < length) {
  7891. var value = array[index], computed = iteratee2 == null ? value : iteratee2(value);
  7892. value = comparator || value !== 0 ? value : 0;
  7893. if (isCommon && computed === computed) {
  7894. var valuesIndex = valuesLength;
  7895. while (valuesIndex--) {
  7896. if (values2[valuesIndex] === computed) {
  7897. continue outer;
  7898. }
  7899. }
  7900. result2.push(value);
  7901. } else if (!includes2(values2, computed, comparator)) {
  7902. result2.push(value);
  7903. }
  7904. }
  7905. return result2;
  7906. }
  7907. var baseEach = createBaseEach(baseForOwn);
  7908. var baseEachRight = createBaseEach(baseForOwnRight, true);
  7909. function baseEvery(collection, predicate) {
  7910. var result2 = true;
  7911. baseEach(collection, function(value, index, collection2) {
  7912. result2 = !!predicate(value, index, collection2);
  7913. return result2;
  7914. });
  7915. return result2;
  7916. }
  7917. function baseExtremum(array, iteratee2, comparator) {
  7918. var index = -1, length = array.length;
  7919. while (++index < length) {
  7920. var value = array[index], current = iteratee2(value);
  7921. if (current != null && (computed === undefined$1 ? current === current && !isSymbol(current) : comparator(current, computed))) {
  7922. var computed = current, result2 = value;
  7923. }
  7924. }
  7925. return result2;
  7926. }
  7927. function baseFill(array, value, start, end) {
  7928. var length = array.length;
  7929. start = toInteger(start);
  7930. if (start < 0) {
  7931. start = -start > length ? 0 : length + start;
  7932. }
  7933. end = end === undefined$1 || end > length ? length : toInteger(end);
  7934. if (end < 0) {
  7935. end += length;
  7936. }
  7937. end = start > end ? 0 : toLength(end);
  7938. while (start < end) {
  7939. array[start++] = value;
  7940. }
  7941. return array;
  7942. }
  7943. function baseFilter(collection, predicate) {
  7944. var result2 = [];
  7945. baseEach(collection, function(value, index, collection2) {
  7946. if (predicate(value, index, collection2)) {
  7947. result2.push(value);
  7948. }
  7949. });
  7950. return result2;
  7951. }
  7952. function baseFlatten(array, depth, predicate, isStrict, result2) {
  7953. var index = -1, length = array.length;
  7954. predicate || (predicate = isFlattenable);
  7955. result2 || (result2 = []);
  7956. while (++index < length) {
  7957. var value = array[index];
  7958. if (depth > 0 && predicate(value)) {
  7959. if (depth > 1) {
  7960. baseFlatten(value, depth - 1, predicate, isStrict, result2);
  7961. } else {
  7962. arrayPush(result2, value);
  7963. }
  7964. } else if (!isStrict) {
  7965. result2[result2.length] = value;
  7966. }
  7967. }
  7968. return result2;
  7969. }
  7970. var baseFor = createBaseFor();
  7971. var baseForRight = createBaseFor(true);
  7972. function baseForOwn(object, iteratee2) {
  7973. return object && baseFor(object, iteratee2, keys);
  7974. }
  7975. function baseForOwnRight(object, iteratee2) {
  7976. return object && baseForRight(object, iteratee2, keys);
  7977. }
  7978. function baseFunctions(object, props) {
  7979. return arrayFilter(props, function(key) {
  7980. return isFunction(object[key]);
  7981. });
  7982. }
  7983. function baseGet(object, path) {
  7984. path = castPath(path, object);
  7985. var index = 0, length = path.length;
  7986. while (object != null && index < length) {
  7987. object = object[toKey(path[index++])];
  7988. }
  7989. return index && index == length ? object : undefined$1;
  7990. }
  7991. function baseGetAllKeys(object, keysFunc, symbolsFunc) {
  7992. var result2 = keysFunc(object);
  7993. return isArray(object) ? result2 : arrayPush(result2, symbolsFunc(object));
  7994. }
  7995. function baseGetTag(value) {
  7996. if (value == null) {
  7997. return value === undefined$1 ? undefinedTag : nullTag;
  7998. }
  7999. return symToStringTag && symToStringTag in Object2(value) ? getRawTag(value) : objectToString(value);
  8000. }
  8001. function baseGt(value, other) {
  8002. return value > other;
  8003. }
  8004. function baseHas(object, key) {
  8005. return object != null && hasOwnProperty.call(object, key);
  8006. }
  8007. function baseHasIn(object, key) {
  8008. return object != null && key in Object2(object);
  8009. }
  8010. function baseInRange(number, start, end) {
  8011. return number >= nativeMin(start, end) && number < nativeMax(start, end);
  8012. }
  8013. function baseIntersection(arrays, iteratee2, comparator) {
  8014. var includes2 = comparator ? arrayIncludesWith : arrayIncludes, length = arrays[0].length, othLength = arrays.length, othIndex = othLength, caches = Array2(othLength), maxLength = Infinity, result2 = [];
  8015. while (othIndex--) {
  8016. var array = arrays[othIndex];
  8017. if (othIndex && iteratee2) {
  8018. array = arrayMap(array, baseUnary(iteratee2));
  8019. }
  8020. maxLength = nativeMin(array.length, maxLength);
  8021. caches[othIndex] = !comparator && (iteratee2 || length >= 120 && array.length >= 120) ? new SetCache(othIndex && array) : undefined$1;
  8022. }
  8023. array = arrays[0];
  8024. var index = -1, seen = caches[0];
  8025. outer:
  8026. while (++index < length && result2.length < maxLength) {
  8027. var value = array[index], computed = iteratee2 ? iteratee2(value) : value;
  8028. value = comparator || value !== 0 ? value : 0;
  8029. if (!(seen ? cacheHas(seen, computed) : includes2(result2, computed, comparator))) {
  8030. othIndex = othLength;
  8031. while (--othIndex) {
  8032. var cache = caches[othIndex];
  8033. if (!(cache ? cacheHas(cache, computed) : includes2(arrays[othIndex], computed, comparator))) {
  8034. continue outer;
  8035. }
  8036. }
  8037. if (seen) {
  8038. seen.push(computed);
  8039. }
  8040. result2.push(value);
  8041. }
  8042. }
  8043. return result2;
  8044. }
  8045. function baseInverter(object, setter, iteratee2, accumulator) {
  8046. baseForOwn(object, function(value, key, object2) {
  8047. setter(accumulator, iteratee2(value), key, object2);
  8048. });
  8049. return accumulator;
  8050. }
  8051. function baseInvoke(object, path, args) {
  8052. path = castPath(path, object);
  8053. object = parent(object, path);
  8054. var func = object == null ? object : object[toKey(last(path))];
  8055. return func == null ? undefined$1 : apply(func, object, args);
  8056. }
  8057. function baseIsArguments(value) {
  8058. return isObjectLike(value) && baseGetTag(value) == argsTag;
  8059. }
  8060. function baseIsArrayBuffer(value) {
  8061. return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
  8062. }
  8063. function baseIsDate(value) {
  8064. return isObjectLike(value) && baseGetTag(value) == dateTag;
  8065. }
  8066. function baseIsEqual(value, other, bitmask, customizer, stack) {
  8067. if (value === other) {
  8068. return true;
  8069. }
  8070. if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
  8071. return value !== value && other !== other;
  8072. }
  8073. return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
  8074. }
  8075. function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
  8076. var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other);
  8077. objTag = objTag == argsTag ? objectTag : objTag;
  8078. othTag = othTag == argsTag ? objectTag : othTag;
  8079. var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
  8080. if (isSameTag && isBuffer(object)) {
  8081. if (!isBuffer(other)) {
  8082. return false;
  8083. }
  8084. objIsArr = true;
  8085. objIsObj = false;
  8086. }
  8087. if (isSameTag && !objIsObj) {
  8088. stack || (stack = new Stack());
  8089. return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
  8090. }
  8091. if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
  8092. var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__");
  8093. if (objIsWrapped || othIsWrapped) {
  8094. var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
  8095. stack || (stack = new Stack());
  8096. return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
  8097. }
  8098. }
  8099. if (!isSameTag) {
  8100. return false;
  8101. }
  8102. stack || (stack = new Stack());
  8103. return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
  8104. }
  8105. function baseIsMap(value) {
  8106. return isObjectLike(value) && getTag(value) == mapTag;
  8107. }
  8108. function baseIsMatch(object, source, matchData, customizer) {
  8109. var index = matchData.length, length = index, noCustomizer = !customizer;
  8110. if (object == null) {
  8111. return !length;
  8112. }
  8113. object = Object2(object);
  8114. while (index--) {
  8115. var data = matchData[index];
  8116. if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
  8117. return false;
  8118. }
  8119. }
  8120. while (++index < length) {
  8121. data = matchData[index];
  8122. var key = data[0], objValue = object[key], srcValue = data[1];
  8123. if (noCustomizer && data[2]) {
  8124. if (objValue === undefined$1 && !(key in object)) {
  8125. return false;
  8126. }
  8127. } else {
  8128. var stack = new Stack();
  8129. if (customizer) {
  8130. var result2 = customizer(objValue, srcValue, key, object, source, stack);
  8131. }
  8132. if (!(result2 === undefined$1 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result2)) {
  8133. return false;
  8134. }
  8135. }
  8136. }
  8137. return true;
  8138. }
  8139. function baseIsNative(value) {
  8140. if (!isObject(value) || isMasked(value)) {
  8141. return false;
  8142. }
  8143. var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
  8144. return pattern.test(toSource(value));
  8145. }
  8146. function baseIsRegExp(value) {
  8147. return isObjectLike(value) && baseGetTag(value) == regexpTag;
  8148. }
  8149. function baseIsSet(value) {
  8150. return isObjectLike(value) && getTag(value) == setTag;
  8151. }
  8152. function baseIsTypedArray(value) {
  8153. return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
  8154. }
  8155. function baseIteratee(value) {
  8156. if (typeof value == "function") {
  8157. return value;
  8158. }
  8159. if (value == null) {
  8160. return identity;
  8161. }
  8162. if (typeof value == "object") {
  8163. return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
  8164. }
  8165. return property(value);
  8166. }
  8167. function baseKeys(object) {
  8168. if (!isPrototype(object)) {
  8169. return nativeKeys(object);
  8170. }
  8171. var result2 = [];
  8172. for (var key in Object2(object)) {
  8173. if (hasOwnProperty.call(object, key) && key != "constructor") {
  8174. result2.push(key);
  8175. }
  8176. }
  8177. return result2;
  8178. }
  8179. function baseKeysIn(object) {
  8180. if (!isObject(object)) {
  8181. return nativeKeysIn(object);
  8182. }
  8183. var isProto = isPrototype(object), result2 = [];
  8184. for (var key in object) {
  8185. if (!(key == "constructor" && (isProto || !hasOwnProperty.call(object, key)))) {
  8186. result2.push(key);
  8187. }
  8188. }
  8189. return result2;
  8190. }
  8191. function baseLt(value, other) {
  8192. return value < other;
  8193. }
  8194. function baseMap(collection, iteratee2) {
  8195. var index = -1, result2 = isArrayLike(collection) ? Array2(collection.length) : [];
  8196. baseEach(collection, function(value, key, collection2) {
  8197. result2[++index] = iteratee2(value, key, collection2);
  8198. });
  8199. return result2;
  8200. }
  8201. function baseMatches(source) {
  8202. var matchData = getMatchData(source);
  8203. if (matchData.length == 1 && matchData[0][2]) {
  8204. return matchesStrictComparable(matchData[0][0], matchData[0][1]);
  8205. }
  8206. return function(object) {
  8207. return object === source || baseIsMatch(object, source, matchData);
  8208. };
  8209. }
  8210. function baseMatchesProperty(path, srcValue) {
  8211. if (isKey(path) && isStrictComparable(srcValue)) {
  8212. return matchesStrictComparable(toKey(path), srcValue);
  8213. }
  8214. return function(object) {
  8215. var objValue = get(object, path);
  8216. return objValue === undefined$1 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
  8217. };
  8218. }
  8219. function baseMerge(object, source, srcIndex, customizer, stack) {
  8220. if (object === source) {
  8221. return;
  8222. }
  8223. baseFor(source, function(srcValue, key) {
  8224. stack || (stack = new Stack());
  8225. if (isObject(srcValue)) {
  8226. baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
  8227. } else {
  8228. var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) : undefined$1;
  8229. if (newValue === undefined$1) {
  8230. newValue = srcValue;
  8231. }
  8232. assignMergeValue(object, key, newValue);
  8233. }
  8234. }, keysIn);
  8235. }
  8236. function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
  8237. var objValue = safeGet(object, key), srcValue = safeGet(source, key), stacked = stack.get(srcValue);
  8238. if (stacked) {
  8239. assignMergeValue(object, key, stacked);
  8240. return;
  8241. }
  8242. var newValue = customizer ? customizer(objValue, srcValue, key + "", object, source, stack) : undefined$1;
  8243. var isCommon = newValue === undefined$1;
  8244. if (isCommon) {
  8245. var isArr = isArray(srcValue), isBuff = !isArr && isBuffer(srcValue), isTyped = !isArr && !isBuff && isTypedArray(srcValue);
  8246. newValue = srcValue;
  8247. if (isArr || isBuff || isTyped) {
  8248. if (isArray(objValue)) {
  8249. newValue = objValue;
  8250. } else if (isArrayLikeObject(objValue)) {
  8251. newValue = copyArray(objValue);
  8252. } else if (isBuff) {
  8253. isCommon = false;
  8254. newValue = cloneBuffer(srcValue, true);
  8255. } else if (isTyped) {
  8256. isCommon = false;
  8257. newValue = cloneTypedArray(srcValue, true);
  8258. } else {
  8259. newValue = [];
  8260. }
  8261. } else if (isPlainObject(srcValue) || isArguments(srcValue)) {
  8262. newValue = objValue;
  8263. if (isArguments(objValue)) {
  8264. newValue = toPlainObject(objValue);
  8265. } else if (!isObject(objValue) || isFunction(objValue)) {
  8266. newValue = initCloneObject(srcValue);
  8267. }
  8268. } else {
  8269. isCommon = false;
  8270. }
  8271. }
  8272. if (isCommon) {
  8273. stack.set(srcValue, newValue);
  8274. mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
  8275. stack["delete"](srcValue);
  8276. }
  8277. assignMergeValue(object, key, newValue);
  8278. }
  8279. function baseNth(array, n) {
  8280. var length = array.length;
  8281. if (!length) {
  8282. return;
  8283. }
  8284. n += n < 0 ? length : 0;
  8285. return isIndex(n, length) ? array[n] : undefined$1;
  8286. }
  8287. function baseOrderBy(collection, iteratees, orders) {
  8288. if (iteratees.length) {
  8289. iteratees = arrayMap(iteratees, function(iteratee2) {
  8290. if (isArray(iteratee2)) {
  8291. return function(value) {
  8292. return baseGet(value, iteratee2.length === 1 ? iteratee2[0] : iteratee2);
  8293. };
  8294. }
  8295. return iteratee2;
  8296. });
  8297. } else {
  8298. iteratees = [identity];
  8299. }
  8300. var index = -1;
  8301. iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
  8302. var result2 = baseMap(collection, function(value, key, collection2) {
  8303. var criteria = arrayMap(iteratees, function(iteratee2) {
  8304. return iteratee2(value);
  8305. });
  8306. return { "criteria": criteria, "index": ++index, "value": value };
  8307. });
  8308. return baseSortBy(result2, function(object, other) {
  8309. return compareMultiple(object, other, orders);
  8310. });
  8311. }
  8312. function basePick(object, paths) {
  8313. return basePickBy(object, paths, function(value, path) {
  8314. return hasIn(object, path);
  8315. });
  8316. }
  8317. function basePickBy(object, paths, predicate) {
  8318. var index = -1, length = paths.length, result2 = {};
  8319. while (++index < length) {
  8320. var path = paths[index], value = baseGet(object, path);
  8321. if (predicate(value, path)) {
  8322. baseSet(result2, castPath(path, object), value);
  8323. }
  8324. }
  8325. return result2;
  8326. }
  8327. function basePropertyDeep(path) {
  8328. return function(object) {
  8329. return baseGet(object, path);
  8330. };
  8331. }
  8332. function basePullAll(array, values2, iteratee2, comparator) {
  8333. var indexOf2 = comparator ? baseIndexOfWith : baseIndexOf, index = -1, length = values2.length, seen = array;
  8334. if (array === values2) {
  8335. values2 = copyArray(values2);
  8336. }
  8337. if (iteratee2) {
  8338. seen = arrayMap(array, baseUnary(iteratee2));
  8339. }
  8340. while (++index < length) {
  8341. var fromIndex = 0, value = values2[index], computed = iteratee2 ? iteratee2(value) : value;
  8342. while ((fromIndex = indexOf2(seen, computed, fromIndex, comparator)) > -1) {
  8343. if (seen !== array) {
  8344. splice.call(seen, fromIndex, 1);
  8345. }
  8346. splice.call(array, fromIndex, 1);
  8347. }
  8348. }
  8349. return array;
  8350. }
  8351. function basePullAt(array, indexes) {
  8352. var length = array ? indexes.length : 0, lastIndex = length - 1;
  8353. while (length--) {
  8354. var index = indexes[length];
  8355. if (length == lastIndex || index !== previous) {
  8356. var previous = index;
  8357. if (isIndex(index)) {
  8358. splice.call(array, index, 1);
  8359. } else {
  8360. baseUnset(array, index);
  8361. }
  8362. }
  8363. }
  8364. return array;
  8365. }
  8366. function baseRandom(lower, upper) {
  8367. return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
  8368. }
  8369. function baseRange(start, end, step, fromRight) {
  8370. var index = -1, length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), result2 = Array2(length);
  8371. while (length--) {
  8372. result2[fromRight ? length : ++index] = start;
  8373. start += step;
  8374. }
  8375. return result2;
  8376. }
  8377. function baseRepeat(string, n) {
  8378. var result2 = "";
  8379. if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
  8380. return result2;
  8381. }
  8382. do {
  8383. if (n % 2) {
  8384. result2 += string;
  8385. }
  8386. n = nativeFloor(n / 2);
  8387. if (n) {
  8388. string += string;
  8389. }
  8390. } while (n);
  8391. return result2;
  8392. }
  8393. function baseRest(func, start) {
  8394. return setToString(overRest(func, start, identity), func + "");
  8395. }
  8396. function baseSample(collection) {
  8397. return arraySample(values(collection));
  8398. }
  8399. function baseSampleSize(collection, n) {
  8400. var array = values(collection);
  8401. return shuffleSelf(array, baseClamp(n, 0, array.length));
  8402. }
  8403. function baseSet(object, path, value, customizer) {
  8404. if (!isObject(object)) {
  8405. return object;
  8406. }
  8407. path = castPath(path, object);
  8408. var index = -1, length = path.length, lastIndex = length - 1, nested = object;
  8409. while (nested != null && ++index < length) {
  8410. var key = toKey(path[index]), newValue = value;
  8411. if (key === "__proto__" || key === "constructor" || key === "prototype") {
  8412. return object;
  8413. }
  8414. if (index != lastIndex) {
  8415. var objValue = nested[key];
  8416. newValue = customizer ? customizer(objValue, key, nested) : undefined$1;
  8417. if (newValue === undefined$1) {
  8418. newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
  8419. }
  8420. }
  8421. assignValue(nested, key, newValue);
  8422. nested = nested[key];
  8423. }
  8424. return object;
  8425. }
  8426. var baseSetData = !metaMap ? identity : function(func, data) {
  8427. metaMap.set(func, data);
  8428. return func;
  8429. };
  8430. var baseSetToString = !defineProperty ? identity : function(func, string) {
  8431. return defineProperty(func, "toString", {
  8432. "configurable": true,
  8433. "enumerable": false,
  8434. "value": constant(string),
  8435. "writable": true
  8436. });
  8437. };
  8438. function baseShuffle(collection) {
  8439. return shuffleSelf(values(collection));
  8440. }
  8441. function baseSlice(array, start, end) {
  8442. var index = -1, length = array.length;
  8443. if (start < 0) {
  8444. start = -start > length ? 0 : length + start;
  8445. }
  8446. end = end > length ? length : end;
  8447. if (end < 0) {
  8448. end += length;
  8449. }
  8450. length = start > end ? 0 : end - start >>> 0;
  8451. start >>>= 0;
  8452. var result2 = Array2(length);
  8453. while (++index < length) {
  8454. result2[index] = array[index + start];
  8455. }
  8456. return result2;
  8457. }
  8458. function baseSome(collection, predicate) {
  8459. var result2;
  8460. baseEach(collection, function(value, index, collection2) {
  8461. result2 = predicate(value, index, collection2);
  8462. return !result2;
  8463. });
  8464. return !!result2;
  8465. }
  8466. function baseSortedIndex(array, value, retHighest) {
  8467. var low = 0, high = array == null ? low : array.length;
  8468. if (typeof value == "number" && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
  8469. while (low < high) {
  8470. var mid = low + high >>> 1, computed = array[mid];
  8471. if (computed !== null && !isSymbol(computed) && (retHighest ? computed <= value : computed < value)) {
  8472. low = mid + 1;
  8473. } else {
  8474. high = mid;
  8475. }
  8476. }
  8477. return high;
  8478. }
  8479. return baseSortedIndexBy(array, value, identity, retHighest);
  8480. }
  8481. function baseSortedIndexBy(array, value, iteratee2, retHighest) {
  8482. var low = 0, high = array == null ? 0 : array.length;
  8483. if (high === 0) {
  8484. return 0;
  8485. }
  8486. value = iteratee2(value);
  8487. var valIsNaN = value !== value, valIsNull = value === null, valIsSymbol = isSymbol(value), valIsUndefined = value === undefined$1;
  8488. while (low < high) {
  8489. var mid = nativeFloor((low + high) / 2), computed = iteratee2(array[mid]), othIsDefined = computed !== undefined$1, othIsNull = computed === null, othIsReflexive = computed === computed, othIsSymbol = isSymbol(computed);
  8490. if (valIsNaN) {
  8491. var setLow = retHighest || othIsReflexive;
  8492. } else if (valIsUndefined) {
  8493. setLow = othIsReflexive && (retHighest || othIsDefined);
  8494. } else if (valIsNull) {
  8495. setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
  8496. } else if (valIsSymbol) {
  8497. setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
  8498. } else if (othIsNull || othIsSymbol) {
  8499. setLow = false;
  8500. } else {
  8501. setLow = retHighest ? computed <= value : computed < value;
  8502. }
  8503. if (setLow) {
  8504. low = mid + 1;
  8505. } else {
  8506. high = mid;
  8507. }
  8508. }
  8509. return nativeMin(high, MAX_ARRAY_INDEX);
  8510. }
  8511. function baseSortedUniq(array, iteratee2) {
  8512. var index = -1, length = array.length, resIndex = 0, result2 = [];
  8513. while (++index < length) {
  8514. var value = array[index], computed = iteratee2 ? iteratee2(value) : value;
  8515. if (!index || !eq(computed, seen)) {
  8516. var seen = computed;
  8517. result2[resIndex++] = value === 0 ? 0 : value;
  8518. }
  8519. }
  8520. return result2;
  8521. }
  8522. function baseToNumber(value) {
  8523. if (typeof value == "number") {
  8524. return value;
  8525. }
  8526. if (isSymbol(value)) {
  8527. return NAN;
  8528. }
  8529. return +value;
  8530. }
  8531. function baseToString(value) {
  8532. if (typeof value == "string") {
  8533. return value;
  8534. }
  8535. if (isArray(value)) {
  8536. return arrayMap(value, baseToString) + "";
  8537. }
  8538. if (isSymbol(value)) {
  8539. return symbolToString ? symbolToString.call(value) : "";
  8540. }
  8541. var result2 = value + "";
  8542. return result2 == "0" && 1 / value == -INFINITY ? "-0" : result2;
  8543. }
  8544. function baseUniq(array, iteratee2, comparator) {
  8545. var index = -1, includes2 = arrayIncludes, length = array.length, isCommon = true, result2 = [], seen = result2;
  8546. if (comparator) {
  8547. isCommon = false;
  8548. includes2 = arrayIncludesWith;
  8549. } else if (length >= LARGE_ARRAY_SIZE) {
  8550. var set2 = iteratee2 ? null : createSet(array);
  8551. if (set2) {
  8552. return setToArray(set2);
  8553. }
  8554. isCommon = false;
  8555. includes2 = cacheHas;
  8556. seen = new SetCache();
  8557. } else {
  8558. seen = iteratee2 ? [] : result2;
  8559. }
  8560. outer:
  8561. while (++index < length) {
  8562. var value = array[index], computed = iteratee2 ? iteratee2(value) : value;
  8563. value = comparator || value !== 0 ? value : 0;
  8564. if (isCommon && computed === computed) {
  8565. var seenIndex = seen.length;
  8566. while (seenIndex--) {
  8567. if (seen[seenIndex] === computed) {
  8568. continue outer;
  8569. }
  8570. }
  8571. if (iteratee2) {
  8572. seen.push(computed);
  8573. }
  8574. result2.push(value);
  8575. } else if (!includes2(seen, computed, comparator)) {
  8576. if (seen !== result2) {
  8577. seen.push(computed);
  8578. }
  8579. result2.push(value);
  8580. }
  8581. }
  8582. return result2;
  8583. }
  8584. function baseUnset(object, path) {
  8585. path = castPath(path, object);
  8586. object = parent(object, path);
  8587. return object == null || delete object[toKey(last(path))];
  8588. }
  8589. function baseUpdate(object, path, updater, customizer) {
  8590. return baseSet(object, path, updater(baseGet(object, path)), customizer);
  8591. }
  8592. function baseWhile(array, predicate, isDrop, fromRight) {
  8593. var length = array.length, index = fromRight ? length : -1;
  8594. while ((fromRight ? index-- : ++index < length) && predicate(array[index], index, array)) {
  8595. }
  8596. return isDrop ? baseSlice(array, fromRight ? 0 : index, fromRight ? index + 1 : length) : baseSlice(array, fromRight ? index + 1 : 0, fromRight ? length : index);
  8597. }
  8598. function baseWrapperValue(value, actions) {
  8599. var result2 = value;
  8600. if (result2 instanceof LazyWrapper) {
  8601. result2 = result2.value();
  8602. }
  8603. return arrayReduce(actions, function(result3, action) {
  8604. return action.func.apply(action.thisArg, arrayPush([result3], action.args));
  8605. }, result2);
  8606. }
  8607. function baseXor(arrays, iteratee2, comparator) {
  8608. var length = arrays.length;
  8609. if (length < 2) {
  8610. return length ? baseUniq(arrays[0]) : [];
  8611. }
  8612. var index = -1, result2 = Array2(length);
  8613. while (++index < length) {
  8614. var array = arrays[index], othIndex = -1;
  8615. while (++othIndex < length) {
  8616. if (othIndex != index) {
  8617. result2[index] = baseDifference(result2[index] || array, arrays[othIndex], iteratee2, comparator);
  8618. }
  8619. }
  8620. }
  8621. return baseUniq(baseFlatten(result2, 1), iteratee2, comparator);
  8622. }
  8623. function baseZipObject(props, values2, assignFunc) {
  8624. var index = -1, length = props.length, valsLength = values2.length, result2 = {};
  8625. while (++index < length) {
  8626. var value = index < valsLength ? values2[index] : undefined$1;
  8627. assignFunc(result2, props[index], value);
  8628. }
  8629. return result2;
  8630. }
  8631. function castArrayLikeObject(value) {
  8632. return isArrayLikeObject(value) ? value : [];
  8633. }
  8634. function castFunction(value) {
  8635. return typeof value == "function" ? value : identity;
  8636. }
  8637. function castPath(value, object) {
  8638. if (isArray(value)) {
  8639. return value;
  8640. }
  8641. return isKey(value, object) ? [value] : stringToPath(toString(value));
  8642. }
  8643. var castRest = baseRest;
  8644. function castSlice(array, start, end) {
  8645. var length = array.length;
  8646. end = end === undefined$1 ? length : end;
  8647. return !start && end >= length ? array : baseSlice(array, start, end);
  8648. }
  8649. var clearTimeout = ctxClearTimeout || function(id) {
  8650. return root.clearTimeout(id);
  8651. };
  8652. function cloneBuffer(buffer, isDeep) {
  8653. if (isDeep) {
  8654. return buffer.slice();
  8655. }
  8656. var length = buffer.length, result2 = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
  8657. buffer.copy(result2);
  8658. return result2;
  8659. }
  8660. function cloneArrayBuffer(arrayBuffer) {
  8661. var result2 = new arrayBuffer.constructor(arrayBuffer.byteLength);
  8662. new Uint8Array2(result2).set(new Uint8Array2(arrayBuffer));
  8663. return result2;
  8664. }
  8665. function cloneDataView(dataView, isDeep) {
  8666. var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
  8667. return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
  8668. }
  8669. function cloneRegExp(regexp) {
  8670. var result2 = new regexp.constructor(regexp.source, reFlags.exec(regexp));
  8671. result2.lastIndex = regexp.lastIndex;
  8672. return result2;
  8673. }
  8674. function cloneSymbol(symbol) {
  8675. return symbolValueOf ? Object2(symbolValueOf.call(symbol)) : {};
  8676. }
  8677. function cloneTypedArray(typedArray, isDeep) {
  8678. var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
  8679. return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
  8680. }
  8681. function compareAscending(value, other) {
  8682. if (value !== other) {
  8683. var valIsDefined = value !== undefined$1, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol = isSymbol(value);
  8684. var othIsDefined = other !== undefined$1, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol = isSymbol(other);
  8685. if (!othIsNull && !othIsSymbol && !valIsSymbol && value > other || valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol || valIsNull && othIsDefined && othIsReflexive || !valIsDefined && othIsReflexive || !valIsReflexive) {
  8686. return 1;
  8687. }
  8688. if (!valIsNull && !valIsSymbol && !othIsSymbol && value < other || othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol || othIsNull && valIsDefined && valIsReflexive || !othIsDefined && valIsReflexive || !othIsReflexive) {
  8689. return -1;
  8690. }
  8691. }
  8692. return 0;
  8693. }
  8694. function compareMultiple(object, other, orders) {
  8695. var index = -1, objCriteria = object.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length;
  8696. while (++index < length) {
  8697. var result2 = compareAscending(objCriteria[index], othCriteria[index]);
  8698. if (result2) {
  8699. if (index >= ordersLength) {
  8700. return result2;
  8701. }
  8702. var order = orders[index];
  8703. return result2 * (order == "desc" ? -1 : 1);
  8704. }
  8705. }
  8706. return object.index - other.index;
  8707. }
  8708. function composeArgs(args, partials, holders, isCurried) {
  8709. 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;
  8710. while (++leftIndex < leftLength) {
  8711. result2[leftIndex] = partials[leftIndex];
  8712. }
  8713. while (++argsIndex < holdersLength) {
  8714. if (isUncurried || argsIndex < argsLength) {
  8715. result2[holders[argsIndex]] = args[argsIndex];
  8716. }
  8717. }
  8718. while (rangeLength--) {
  8719. result2[leftIndex++] = args[argsIndex++];
  8720. }
  8721. return result2;
  8722. }
  8723. function composeArgsRight(args, partials, holders, isCurried) {
  8724. 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;
  8725. while (++argsIndex < rangeLength) {
  8726. result2[argsIndex] = args[argsIndex];
  8727. }
  8728. var offset = argsIndex;
  8729. while (++rightIndex < rightLength) {
  8730. result2[offset + rightIndex] = partials[rightIndex];
  8731. }
  8732. while (++holdersIndex < holdersLength) {
  8733. if (isUncurried || argsIndex < argsLength) {
  8734. result2[offset + holders[holdersIndex]] = args[argsIndex++];
  8735. }
  8736. }
  8737. return result2;
  8738. }
  8739. function copyArray(source, array) {
  8740. var index = -1, length = source.length;
  8741. array || (array = Array2(length));
  8742. while (++index < length) {
  8743. array[index] = source[index];
  8744. }
  8745. return array;
  8746. }
  8747. function copyObject(source, props, object, customizer) {
  8748. var isNew = !object;
  8749. object || (object = {});
  8750. var index = -1, length = props.length;
  8751. while (++index < length) {
  8752. var key = props[index];
  8753. var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined$1;
  8754. if (newValue === undefined$1) {
  8755. newValue = source[key];
  8756. }
  8757. if (isNew) {
  8758. baseAssignValue(object, key, newValue);
  8759. } else {
  8760. assignValue(object, key, newValue);
  8761. }
  8762. }
  8763. return object;
  8764. }
  8765. function copySymbols(source, object) {
  8766. return copyObject(source, getSymbols(source), object);
  8767. }
  8768. function copySymbolsIn(source, object) {
  8769. return copyObject(source, getSymbolsIn(source), object);
  8770. }
  8771. function createAggregator(setter, initializer) {
  8772. return function(collection, iteratee2) {
  8773. var func = isArray(collection) ? arrayAggregator : baseAggregator, accumulator = initializer ? initializer() : {};
  8774. return func(collection, setter, getIteratee(iteratee2, 2), accumulator);
  8775. };
  8776. }
  8777. function createAssigner(assigner) {
  8778. return baseRest(function(object, sources) {
  8779. var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined$1, guard = length > 2 ? sources[2] : undefined$1;
  8780. customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : undefined$1;
  8781. if (guard && isIterateeCall(sources[0], sources[1], guard)) {
  8782. customizer = length < 3 ? undefined$1 : customizer;
  8783. length = 1;
  8784. }
  8785. object = Object2(object);
  8786. while (++index < length) {
  8787. var source = sources[index];
  8788. if (source) {
  8789. assigner(object, source, index, customizer);
  8790. }
  8791. }
  8792. return object;
  8793. });
  8794. }
  8795. function createBaseEach(eachFunc, fromRight) {
  8796. return function(collection, iteratee2) {
  8797. if (collection == null) {
  8798. return collection;
  8799. }
  8800. if (!isArrayLike(collection)) {
  8801. return eachFunc(collection, iteratee2);
  8802. }
  8803. var length = collection.length, index = fromRight ? length : -1, iterable = Object2(collection);
  8804. while (fromRight ? index-- : ++index < length) {
  8805. if (iteratee2(iterable[index], index, iterable) === false) {
  8806. break;
  8807. }
  8808. }
  8809. return collection;
  8810. };
  8811. }
  8812. function createBaseFor(fromRight) {
  8813. return function(object, iteratee2, keysFunc) {
  8814. var index = -1, iterable = Object2(object), props = keysFunc(object), length = props.length;
  8815. while (length--) {
  8816. var key = props[fromRight ? length : ++index];
  8817. if (iteratee2(iterable[key], key, iterable) === false) {
  8818. break;
  8819. }
  8820. }
  8821. return object;
  8822. };
  8823. }
  8824. function createBind(func, bitmask, thisArg) {
  8825. var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func);
  8826. function wrapper() {
  8827. var fn = this && this !== root && this instanceof wrapper ? Ctor : func;
  8828. return fn.apply(isBind ? thisArg : this, arguments);
  8829. }
  8830. return wrapper;
  8831. }
  8832. function createCaseFirst(methodName) {
  8833. return function(string) {
  8834. string = toString(string);
  8835. var strSymbols = hasUnicode(string) ? stringToArray(string) : undefined$1;
  8836. var chr = strSymbols ? strSymbols[0] : string.charAt(0);
  8837. var trailing = strSymbols ? castSlice(strSymbols, 1).join("") : string.slice(1);
  8838. return chr[methodName]() + trailing;
  8839. };
  8840. }
  8841. function createCompounder(callback) {
  8842. return function(string) {
  8843. return arrayReduce(words(deburr(string).replace(reApos, "")), callback, "");
  8844. };
  8845. }
  8846. function createCtor(Ctor) {
  8847. return function() {
  8848. var args = arguments;
  8849. switch (args.length) {
  8850. case 0:
  8851. return new Ctor();
  8852. case 1:
  8853. return new Ctor(args[0]);
  8854. case 2:
  8855. return new Ctor(args[0], args[1]);
  8856. case 3:
  8857. return new Ctor(args[0], args[1], args[2]);
  8858. case 4:
  8859. return new Ctor(args[0], args[1], args[2], args[3]);
  8860. case 5:
  8861. return new Ctor(args[0], args[1], args[2], args[3], args[4]);
  8862. case 6:
  8863. return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
  8864. case 7:
  8865. return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
  8866. }
  8867. var thisBinding = baseCreate(Ctor.prototype), result2 = Ctor.apply(thisBinding, args);
  8868. return isObject(result2) ? result2 : thisBinding;
  8869. };
  8870. }
  8871. function createCurry(func, bitmask, arity) {
  8872. var Ctor = createCtor(func);
  8873. function wrapper() {
  8874. var length = arguments.length, args = Array2(length), index = length, placeholder = getHolder(wrapper);
  8875. while (index--) {
  8876. args[index] = arguments[index];
  8877. }
  8878. var holders = length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder ? [] : replaceHolders(args, placeholder);
  8879. length -= holders.length;
  8880. if (length < arity) {
  8881. return createRecurry(
  8882. func,
  8883. bitmask,
  8884. createHybrid,
  8885. wrapper.placeholder,
  8886. undefined$1,
  8887. args,
  8888. holders,
  8889. undefined$1,
  8890. undefined$1,
  8891. arity - length
  8892. );
  8893. }
  8894. var fn = this && this !== root && this instanceof wrapper ? Ctor : func;
  8895. return apply(fn, this, args);
  8896. }
  8897. return wrapper;
  8898. }
  8899. function createFind(findIndexFunc) {
  8900. return function(collection, predicate, fromIndex) {
  8901. var iterable = Object2(collection);
  8902. if (!isArrayLike(collection)) {
  8903. var iteratee2 = getIteratee(predicate, 3);
  8904. collection = keys(collection);
  8905. predicate = function(key) {
  8906. return iteratee2(iterable[key], key, iterable);
  8907. };
  8908. }
  8909. var index = findIndexFunc(collection, predicate, fromIndex);
  8910. return index > -1 ? iterable[iteratee2 ? collection[index] : index] : undefined$1;
  8911. };
  8912. }
  8913. function createFlow(fromRight) {
  8914. return flatRest(function(funcs) {
  8915. var length = funcs.length, index = length, prereq = LodashWrapper.prototype.thru;
  8916. if (fromRight) {
  8917. funcs.reverse();
  8918. }
  8919. while (index--) {
  8920. var func = funcs[index];
  8921. if (typeof func != "function") {
  8922. throw new TypeError2(FUNC_ERROR_TEXT);
  8923. }
  8924. if (prereq && !wrapper && getFuncName(func) == "wrapper") {
  8925. var wrapper = new LodashWrapper([], true);
  8926. }
  8927. }
  8928. index = wrapper ? index : length;
  8929. while (++index < length) {
  8930. func = funcs[index];
  8931. var funcName = getFuncName(func), data = funcName == "wrapper" ? getData(func) : undefined$1;
  8932. 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) {
  8933. wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
  8934. } else {
  8935. wrapper = func.length == 1 && isLaziable(func) ? wrapper[funcName]() : wrapper.thru(func);
  8936. }
  8937. }
  8938. return function() {
  8939. var args = arguments, value = args[0];
  8940. if (wrapper && args.length == 1 && isArray(value)) {
  8941. return wrapper.plant(value).value();
  8942. }
  8943. var index2 = 0, result2 = length ? funcs[index2].apply(this, args) : value;
  8944. while (++index2 < length) {
  8945. result2 = funcs[index2].call(this, result2);
  8946. }
  8947. return result2;
  8948. };
  8949. });
  8950. }
  8951. function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary2, arity) {
  8952. 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$1 : createCtor(func);
  8953. function wrapper() {
  8954. var length = arguments.length, args = Array2(length), index = length;
  8955. while (index--) {
  8956. args[index] = arguments[index];
  8957. }
  8958. if (isCurried) {
  8959. var placeholder = getHolder(wrapper), holdersCount = countHolders(args, placeholder);
  8960. }
  8961. if (partials) {
  8962. args = composeArgs(args, partials, holders, isCurried);
  8963. }
  8964. if (partialsRight) {
  8965. args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
  8966. }
  8967. length -= holdersCount;
  8968. if (isCurried && length < arity) {
  8969. var newHolders = replaceHolders(args, placeholder);
  8970. return createRecurry(
  8971. func,
  8972. bitmask,
  8973. createHybrid,
  8974. wrapper.placeholder,
  8975. thisArg,
  8976. args,
  8977. newHolders,
  8978. argPos,
  8979. ary2,
  8980. arity - length
  8981. );
  8982. }
  8983. var thisBinding = isBind ? thisArg : this, fn = isBindKey ? thisBinding[func] : func;
  8984. length = args.length;
  8985. if (argPos) {
  8986. args = reorder(args, argPos);
  8987. } else if (isFlip && length > 1) {
  8988. args.reverse();
  8989. }
  8990. if (isAry && ary2 < length) {
  8991. args.length = ary2;
  8992. }
  8993. if (this && this !== root && this instanceof wrapper) {
  8994. fn = Ctor || createCtor(fn);
  8995. }
  8996. return fn.apply(thisBinding, args);
  8997. }
  8998. return wrapper;
  8999. }
  9000. function createInverter(setter, toIteratee) {
  9001. return function(object, iteratee2) {
  9002. return baseInverter(object, setter, toIteratee(iteratee2), {});
  9003. };
  9004. }
  9005. function createMathOperation(operator, defaultValue) {
  9006. return function(value, other) {
  9007. var result2;
  9008. if (value === undefined$1 && other === undefined$1) {
  9009. return defaultValue;
  9010. }
  9011. if (value !== undefined$1) {
  9012. result2 = value;
  9013. }
  9014. if (other !== undefined$1) {
  9015. if (result2 === undefined$1) {
  9016. return other;
  9017. }
  9018. if (typeof value == "string" || typeof other == "string") {
  9019. value = baseToString(value);
  9020. other = baseToString(other);
  9021. } else {
  9022. value = baseToNumber(value);
  9023. other = baseToNumber(other);
  9024. }
  9025. result2 = operator(value, other);
  9026. }
  9027. return result2;
  9028. };
  9029. }
  9030. function createOver(arrayFunc) {
  9031. return flatRest(function(iteratees) {
  9032. iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
  9033. return baseRest(function(args) {
  9034. var thisArg = this;
  9035. return arrayFunc(iteratees, function(iteratee2) {
  9036. return apply(iteratee2, thisArg, args);
  9037. });
  9038. });
  9039. });
  9040. }
  9041. function createPadding(length, chars) {
  9042. chars = chars === undefined$1 ? " " : baseToString(chars);
  9043. var charsLength = chars.length;
  9044. if (charsLength < 2) {
  9045. return charsLength ? baseRepeat(chars, length) : chars;
  9046. }
  9047. var result2 = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
  9048. return hasUnicode(chars) ? castSlice(stringToArray(result2), 0, length).join("") : result2.slice(0, length);
  9049. }
  9050. function createPartial(func, bitmask, thisArg, partials) {
  9051. var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func);
  9052. function wrapper() {
  9053. var argsIndex = -1, argsLength = arguments.length, leftIndex = -1, leftLength = partials.length, args = Array2(leftLength + argsLength), fn = this && this !== root && this instanceof wrapper ? Ctor : func;
  9054. while (++leftIndex < leftLength) {
  9055. args[leftIndex] = partials[leftIndex];
  9056. }
  9057. while (argsLength--) {
  9058. args[leftIndex++] = arguments[++argsIndex];
  9059. }
  9060. return apply(fn, isBind ? thisArg : this, args);
  9061. }
  9062. return wrapper;
  9063. }
  9064. function createRange(fromRight) {
  9065. return function(start, end, step) {
  9066. if (step && typeof step != "number" && isIterateeCall(start, end, step)) {
  9067. end = step = undefined$1;
  9068. }
  9069. start = toFinite(start);
  9070. if (end === undefined$1) {
  9071. end = start;
  9072. start = 0;
  9073. } else {
  9074. end = toFinite(end);
  9075. }
  9076. step = step === undefined$1 ? start < end ? 1 : -1 : toFinite(step);
  9077. return baseRange(start, end, step, fromRight);
  9078. };
  9079. }
  9080. function createRelationalOperation(operator) {
  9081. return function(value, other) {
  9082. if (!(typeof value == "string" && typeof other == "string")) {
  9083. value = toNumber(value);
  9084. other = toNumber(other);
  9085. }
  9086. return operator(value, other);
  9087. };
  9088. }
  9089. function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary2, arity) {
  9090. var isCurry = bitmask & WRAP_CURRY_FLAG, newHolders = isCurry ? holders : undefined$1, newHoldersRight = isCurry ? undefined$1 : holders, newPartials = isCurry ? partials : undefined$1, newPartialsRight = isCurry ? undefined$1 : partials;
  9091. bitmask |= isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG;
  9092. bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
  9093. if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
  9094. bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
  9095. }
  9096. var newData = [
  9097. func,
  9098. bitmask,
  9099. thisArg,
  9100. newPartials,
  9101. newHolders,
  9102. newPartialsRight,
  9103. newHoldersRight,
  9104. argPos,
  9105. ary2,
  9106. arity
  9107. ];
  9108. var result2 = wrapFunc.apply(undefined$1, newData);
  9109. if (isLaziable(func)) {
  9110. setData(result2, newData);
  9111. }
  9112. result2.placeholder = placeholder;
  9113. return setWrapToString(result2, func, bitmask);
  9114. }
  9115. function createRound(methodName) {
  9116. var func = Math2[methodName];
  9117. return function(number, precision) {
  9118. number = toNumber(number);
  9119. precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
  9120. if (precision && nativeIsFinite(number)) {
  9121. var pair = (toString(number) + "e").split("e"), value = func(pair[0] + "e" + (+pair[1] + precision));
  9122. pair = (toString(value) + "e").split("e");
  9123. return +(pair[0] + "e" + (+pair[1] - precision));
  9124. }
  9125. return func(number);
  9126. };
  9127. }
  9128. var createSet = !(Set && 1 / setToArray(new Set([, -0]))[1] == INFINITY) ? noop : function(values2) {
  9129. return new Set(values2);
  9130. };
  9131. function createToPairs(keysFunc) {
  9132. return function(object) {
  9133. var tag = getTag(object);
  9134. if (tag == mapTag) {
  9135. return mapToArray(object);
  9136. }
  9137. if (tag == setTag) {
  9138. return setToPairs(object);
  9139. }
  9140. return baseToPairs(object, keysFunc(object));
  9141. };
  9142. }
  9143. function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary2, arity) {
  9144. var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
  9145. if (!isBindKey && typeof func != "function") {
  9146. throw new TypeError2(FUNC_ERROR_TEXT);
  9147. }
  9148. var length = partials ? partials.length : 0;
  9149. if (!length) {
  9150. bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
  9151. partials = holders = undefined$1;
  9152. }
  9153. ary2 = ary2 === undefined$1 ? ary2 : nativeMax(toInteger(ary2), 0);
  9154. arity = arity === undefined$1 ? arity : toInteger(arity);
  9155. length -= holders ? holders.length : 0;
  9156. if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
  9157. var partialsRight = partials, holdersRight = holders;
  9158. partials = holders = undefined$1;
  9159. }
  9160. var data = isBindKey ? undefined$1 : getData(func);
  9161. var newData = [
  9162. func,
  9163. bitmask,
  9164. thisArg,
  9165. partials,
  9166. holders,
  9167. partialsRight,
  9168. holdersRight,
  9169. argPos,
  9170. ary2,
  9171. arity
  9172. ];
  9173. if (data) {
  9174. mergeData(newData, data);
  9175. }
  9176. func = newData[0];
  9177. bitmask = newData[1];
  9178. thisArg = newData[2];
  9179. partials = newData[3];
  9180. holders = newData[4];
  9181. arity = newData[9] = newData[9] === undefined$1 ? isBindKey ? 0 : func.length : nativeMax(newData[9] - length, 0);
  9182. if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
  9183. bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
  9184. }
  9185. if (!bitmask || bitmask == WRAP_BIND_FLAG) {
  9186. var result2 = createBind(func, bitmask, thisArg);
  9187. } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
  9188. result2 = createCurry(func, bitmask, arity);
  9189. } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
  9190. result2 = createPartial(func, bitmask, thisArg, partials);
  9191. } else {
  9192. result2 = createHybrid.apply(undefined$1, newData);
  9193. }
  9194. var setter = data ? baseSetData : setData;
  9195. return setWrapToString(setter(result2, newData), func, bitmask);
  9196. }
  9197. function customDefaultsAssignIn(objValue, srcValue, key, object) {
  9198. if (objValue === undefined$1 || eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key)) {
  9199. return srcValue;
  9200. }
  9201. return objValue;
  9202. }
  9203. function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
  9204. if (isObject(objValue) && isObject(srcValue)) {
  9205. stack.set(srcValue, objValue);
  9206. baseMerge(objValue, srcValue, undefined$1, customDefaultsMerge, stack);
  9207. stack["delete"](srcValue);
  9208. }
  9209. return objValue;
  9210. }
  9211. function customOmitClone(value) {
  9212. return isPlainObject(value) ? undefined$1 : value;
  9213. }
  9214. function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
  9215. var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length;
  9216. if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
  9217. return false;
  9218. }
  9219. var arrStacked = stack.get(array);
  9220. var othStacked = stack.get(other);
  9221. if (arrStacked && othStacked) {
  9222. return arrStacked == other && othStacked == array;
  9223. }
  9224. var index = -1, result2 = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined$1;
  9225. stack.set(array, other);
  9226. stack.set(other, array);
  9227. while (++index < arrLength) {
  9228. var arrValue = array[index], othValue = other[index];
  9229. if (customizer) {
  9230. var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
  9231. }
  9232. if (compared !== undefined$1) {
  9233. if (compared) {
  9234. continue;
  9235. }
  9236. result2 = false;
  9237. break;
  9238. }
  9239. if (seen) {
  9240. if (!arraySome(other, function(othValue2, othIndex) {
  9241. if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) {
  9242. return seen.push(othIndex);
  9243. }
  9244. })) {
  9245. result2 = false;
  9246. break;
  9247. }
  9248. } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
  9249. result2 = false;
  9250. break;
  9251. }
  9252. }
  9253. stack["delete"](array);
  9254. stack["delete"](other);
  9255. return result2;
  9256. }
  9257. function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
  9258. switch (tag) {
  9259. case dataViewTag:
  9260. if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
  9261. return false;
  9262. }
  9263. object = object.buffer;
  9264. other = other.buffer;
  9265. case arrayBufferTag:
  9266. if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object), new Uint8Array2(other))) {
  9267. return false;
  9268. }
  9269. return true;
  9270. case boolTag:
  9271. case dateTag:
  9272. case numberTag:
  9273. return eq(+object, +other);
  9274. case errorTag:
  9275. return object.name == other.name && object.message == other.message;
  9276. case regexpTag:
  9277. case stringTag:
  9278. return object == other + "";
  9279. case mapTag:
  9280. var convert = mapToArray;
  9281. case setTag:
  9282. var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
  9283. convert || (convert = setToArray);
  9284. if (object.size != other.size && !isPartial) {
  9285. return false;
  9286. }
  9287. var stacked = stack.get(object);
  9288. if (stacked) {
  9289. return stacked == other;
  9290. }
  9291. bitmask |= COMPARE_UNORDERED_FLAG;
  9292. stack.set(object, other);
  9293. var result2 = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
  9294. stack["delete"](object);
  9295. return result2;
  9296. case symbolTag:
  9297. if (symbolValueOf) {
  9298. return symbolValueOf.call(object) == symbolValueOf.call(other);
  9299. }
  9300. }
  9301. return false;
  9302. }
  9303. function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
  9304. var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length;
  9305. if (objLength != othLength && !isPartial) {
  9306. return false;
  9307. }
  9308. var index = objLength;
  9309. while (index--) {
  9310. var key = objProps[index];
  9311. if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
  9312. return false;
  9313. }
  9314. }
  9315. var objStacked = stack.get(object);
  9316. var othStacked = stack.get(other);
  9317. if (objStacked && othStacked) {
  9318. return objStacked == other && othStacked == object;
  9319. }
  9320. var result2 = true;
  9321. stack.set(object, other);
  9322. stack.set(other, object);
  9323. var skipCtor = isPartial;
  9324. while (++index < objLength) {
  9325. key = objProps[index];
  9326. var objValue = object[key], othValue = other[key];
  9327. if (customizer) {
  9328. var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
  9329. }
  9330. if (!(compared === undefined$1 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
  9331. result2 = false;
  9332. break;
  9333. }
  9334. skipCtor || (skipCtor = key == "constructor");
  9335. }
  9336. if (result2 && !skipCtor) {
  9337. var objCtor = object.constructor, othCtor = other.constructor;
  9338. if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
  9339. result2 = false;
  9340. }
  9341. }
  9342. stack["delete"](object);
  9343. stack["delete"](other);
  9344. return result2;
  9345. }
  9346. function flatRest(func) {
  9347. return setToString(overRest(func, undefined$1, flatten), func + "");
  9348. }
  9349. function getAllKeys(object) {
  9350. return baseGetAllKeys(object, keys, getSymbols);
  9351. }
  9352. function getAllKeysIn(object) {
  9353. return baseGetAllKeys(object, keysIn, getSymbolsIn);
  9354. }
  9355. var getData = !metaMap ? noop : function(func) {
  9356. return metaMap.get(func);
  9357. };
  9358. function getFuncName(func) {
  9359. var result2 = func.name + "", array = realNames[result2], length = hasOwnProperty.call(realNames, result2) ? array.length : 0;
  9360. while (length--) {
  9361. var data = array[length], otherFunc = data.func;
  9362. if (otherFunc == null || otherFunc == func) {
  9363. return data.name;
  9364. }
  9365. }
  9366. return result2;
  9367. }
  9368. function getHolder(func) {
  9369. var object = hasOwnProperty.call(lodash2, "placeholder") ? lodash2 : func;
  9370. return object.placeholder;
  9371. }
  9372. function getIteratee() {
  9373. var result2 = lodash2.iteratee || iteratee;
  9374. result2 = result2 === iteratee ? baseIteratee : result2;
  9375. return arguments.length ? result2(arguments[0], arguments[1]) : result2;
  9376. }
  9377. function getMapData(map2, key) {
  9378. var data = map2.__data__;
  9379. return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
  9380. }
  9381. function getMatchData(object) {
  9382. var result2 = keys(object), length = result2.length;
  9383. while (length--) {
  9384. var key = result2[length], value = object[key];
  9385. result2[length] = [key, value, isStrictComparable(value)];
  9386. }
  9387. return result2;
  9388. }
  9389. function getNative(object, key) {
  9390. var value = getValue(object, key);
  9391. return baseIsNative(value) ? value : undefined$1;
  9392. }
  9393. function getRawTag(value) {
  9394. var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
  9395. try {
  9396. value[symToStringTag] = undefined$1;
  9397. var unmasked = true;
  9398. } catch (e) {
  9399. }
  9400. var result2 = nativeObjectToString.call(value);
  9401. if (unmasked) {
  9402. if (isOwn) {
  9403. value[symToStringTag] = tag;
  9404. } else {
  9405. delete value[symToStringTag];
  9406. }
  9407. }
  9408. return result2;
  9409. }
  9410. var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
  9411. if (object == null) {
  9412. return [];
  9413. }
  9414. object = Object2(object);
  9415. return arrayFilter(nativeGetSymbols(object), function(symbol) {
  9416. return propertyIsEnumerable.call(object, symbol);
  9417. });
  9418. };
  9419. var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
  9420. var result2 = [];
  9421. while (object) {
  9422. arrayPush(result2, getSymbols(object));
  9423. object = getPrototype(object);
  9424. }
  9425. return result2;
  9426. };
  9427. var getTag = baseGetTag;
  9428. 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) {
  9429. getTag = function(value) {
  9430. var result2 = baseGetTag(value), Ctor = result2 == objectTag ? value.constructor : undefined$1, ctorString = Ctor ? toSource(Ctor) : "";
  9431. if (ctorString) {
  9432. switch (ctorString) {
  9433. case dataViewCtorString:
  9434. return dataViewTag;
  9435. case mapCtorString:
  9436. return mapTag;
  9437. case promiseCtorString:
  9438. return promiseTag;
  9439. case setCtorString:
  9440. return setTag;
  9441. case weakMapCtorString:
  9442. return weakMapTag;
  9443. }
  9444. }
  9445. return result2;
  9446. };
  9447. }
  9448. function getView(start, end, transforms) {
  9449. var index = -1, length = transforms.length;
  9450. while (++index < length) {
  9451. var data = transforms[index], size2 = data.size;
  9452. switch (data.type) {
  9453. case "drop":
  9454. start += size2;
  9455. break;
  9456. case "dropRight":
  9457. end -= size2;
  9458. break;
  9459. case "take":
  9460. end = nativeMin(end, start + size2);
  9461. break;
  9462. case "takeRight":
  9463. start = nativeMax(start, end - size2);
  9464. break;
  9465. }
  9466. }
  9467. return { "start": start, "end": end };
  9468. }
  9469. function getWrapDetails(source) {
  9470. var match = source.match(reWrapDetails);
  9471. return match ? match[1].split(reSplitDetails) : [];
  9472. }
  9473. function hasPath(object, path, hasFunc) {
  9474. path = castPath(path, object);
  9475. var index = -1, length = path.length, result2 = false;
  9476. while (++index < length) {
  9477. var key = toKey(path[index]);
  9478. if (!(result2 = object != null && hasFunc(object, key))) {
  9479. break;
  9480. }
  9481. object = object[key];
  9482. }
  9483. if (result2 || ++index != length) {
  9484. return result2;
  9485. }
  9486. length = object == null ? 0 : object.length;
  9487. return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));
  9488. }
  9489. function initCloneArray(array) {
  9490. var length = array.length, result2 = new array.constructor(length);
  9491. if (length && typeof array[0] == "string" && hasOwnProperty.call(array, "index")) {
  9492. result2.index = array.index;
  9493. result2.input = array.input;
  9494. }
  9495. return result2;
  9496. }
  9497. function initCloneObject(object) {
  9498. return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
  9499. }
  9500. function initCloneByTag(object, tag, isDeep) {
  9501. var Ctor = object.constructor;
  9502. switch (tag) {
  9503. case arrayBufferTag:
  9504. return cloneArrayBuffer(object);
  9505. case boolTag:
  9506. case dateTag:
  9507. return new Ctor(+object);
  9508. case dataViewTag:
  9509. return cloneDataView(object, isDeep);
  9510. case float32Tag:
  9511. case float64Tag:
  9512. case int8Tag:
  9513. case int16Tag:
  9514. case int32Tag:
  9515. case uint8Tag:
  9516. case uint8ClampedTag:
  9517. case uint16Tag:
  9518. case uint32Tag:
  9519. return cloneTypedArray(object, isDeep);
  9520. case mapTag:
  9521. return new Ctor();
  9522. case numberTag:
  9523. case stringTag:
  9524. return new Ctor(object);
  9525. case regexpTag:
  9526. return cloneRegExp(object);
  9527. case setTag:
  9528. return new Ctor();
  9529. case symbolTag:
  9530. return cloneSymbol(object);
  9531. }
  9532. }
  9533. function insertWrapDetails(source, details) {
  9534. var length = details.length;
  9535. if (!length) {
  9536. return source;
  9537. }
  9538. var lastIndex = length - 1;
  9539. details[lastIndex] = (length > 1 ? "& " : "") + details[lastIndex];
  9540. details = details.join(length > 2 ? ", " : " ");
  9541. return source.replace(reWrapComment, "{\n/* [wrapped with " + details + "] */\n");
  9542. }
  9543. function isFlattenable(value) {
  9544. return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
  9545. }
  9546. function isIndex(value, length) {
  9547. var type = typeof value;
  9548. length = length == null ? MAX_SAFE_INTEGER : length;
  9549. return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
  9550. }
  9551. function isIterateeCall(value, index, object) {
  9552. if (!isObject(object)) {
  9553. return false;
  9554. }
  9555. var type = typeof index;
  9556. if (type == "number" ? isArrayLike(object) && isIndex(index, object.length) : type == "string" && index in object) {
  9557. return eq(object[index], value);
  9558. }
  9559. return false;
  9560. }
  9561. function isKey(value, object) {
  9562. if (isArray(value)) {
  9563. return false;
  9564. }
  9565. var type = typeof value;
  9566. if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) {
  9567. return true;
  9568. }
  9569. return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object2(object);
  9570. }
  9571. function isKeyable(value) {
  9572. var type = typeof value;
  9573. return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
  9574. }
  9575. function isLaziable(func) {
  9576. var funcName = getFuncName(func), other = lodash2[funcName];
  9577. if (typeof other != "function" || !(funcName in LazyWrapper.prototype)) {
  9578. return false;
  9579. }
  9580. if (func === other) {
  9581. return true;
  9582. }
  9583. var data = getData(other);
  9584. return !!data && func === data[0];
  9585. }
  9586. function isMasked(func) {
  9587. return !!maskSrcKey && maskSrcKey in func;
  9588. }
  9589. var isMaskable = coreJsData ? isFunction : stubFalse;
  9590. function isPrototype(value) {
  9591. var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
  9592. return value === proto;
  9593. }
  9594. function isStrictComparable(value) {
  9595. return value === value && !isObject(value);
  9596. }
  9597. function matchesStrictComparable(key, srcValue) {
  9598. return function(object) {
  9599. if (object == null) {
  9600. return false;
  9601. }
  9602. return object[key] === srcValue && (srcValue !== undefined$1 || key in Object2(object));
  9603. };
  9604. }
  9605. function memoizeCapped(func) {
  9606. var result2 = memoize(func, function(key) {
  9607. if (cache.size === MAX_MEMOIZE_SIZE) {
  9608. cache.clear();
  9609. }
  9610. return key;
  9611. });
  9612. var cache = result2.cache;
  9613. return result2;
  9614. }
  9615. function mergeData(data, source) {
  9616. var bitmask = data[1], srcBitmask = source[1], newBitmask = bitmask | srcBitmask, isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
  9617. 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;
  9618. if (!(isCommon || isCombo)) {
  9619. return data;
  9620. }
  9621. if (srcBitmask & WRAP_BIND_FLAG) {
  9622. data[2] = source[2];
  9623. newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
  9624. }
  9625. var value = source[3];
  9626. if (value) {
  9627. var partials = data[3];
  9628. data[3] = partials ? composeArgs(partials, value, source[4]) : value;
  9629. data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
  9630. }
  9631. value = source[5];
  9632. if (value) {
  9633. partials = data[5];
  9634. data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
  9635. data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
  9636. }
  9637. value = source[7];
  9638. if (value) {
  9639. data[7] = value;
  9640. }
  9641. if (srcBitmask & WRAP_ARY_FLAG) {
  9642. data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
  9643. }
  9644. if (data[9] == null) {
  9645. data[9] = source[9];
  9646. }
  9647. data[0] = source[0];
  9648. data[1] = newBitmask;
  9649. return data;
  9650. }
  9651. function nativeKeysIn(object) {
  9652. var result2 = [];
  9653. if (object != null) {
  9654. for (var key in Object2(object)) {
  9655. result2.push(key);
  9656. }
  9657. }
  9658. return result2;
  9659. }
  9660. function objectToString(value) {
  9661. return nativeObjectToString.call(value);
  9662. }
  9663. function overRest(func, start, transform2) {
  9664. start = nativeMax(start === undefined$1 ? func.length - 1 : start, 0);
  9665. return function() {
  9666. var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array2(length);
  9667. while (++index < length) {
  9668. array[index] = args[start + index];
  9669. }
  9670. index = -1;
  9671. var otherArgs = Array2(start + 1);
  9672. while (++index < start) {
  9673. otherArgs[index] = args[index];
  9674. }
  9675. otherArgs[start] = transform2(array);
  9676. return apply(func, this, otherArgs);
  9677. };
  9678. }
  9679. function parent(object, path) {
  9680. return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
  9681. }
  9682. function reorder(array, indexes) {
  9683. var arrLength = array.length, length = nativeMin(indexes.length, arrLength), oldArray = copyArray(array);
  9684. while (length--) {
  9685. var index = indexes[length];
  9686. array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined$1;
  9687. }
  9688. return array;
  9689. }
  9690. function safeGet(object, key) {
  9691. if (key === "constructor" && typeof object[key] === "function") {
  9692. return;
  9693. }
  9694. if (key == "__proto__") {
  9695. return;
  9696. }
  9697. return object[key];
  9698. }
  9699. var setData = shortOut(baseSetData);
  9700. var setTimeout = ctxSetTimeout || function(func, wait) {
  9701. return root.setTimeout(func, wait);
  9702. };
  9703. var setToString = shortOut(baseSetToString);
  9704. function setWrapToString(wrapper, reference, bitmask) {
  9705. var source = reference + "";
  9706. return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
  9707. }
  9708. function shortOut(func) {
  9709. var count = 0, lastCalled = 0;
  9710. return function() {
  9711. var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
  9712. lastCalled = stamp;
  9713. if (remaining > 0) {
  9714. if (++count >= HOT_COUNT) {
  9715. return arguments[0];
  9716. }
  9717. } else {
  9718. count = 0;
  9719. }
  9720. return func.apply(undefined$1, arguments);
  9721. };
  9722. }
  9723. function shuffleSelf(array, size2) {
  9724. var index = -1, length = array.length, lastIndex = length - 1;
  9725. size2 = size2 === undefined$1 ? length : size2;
  9726. while (++index < size2) {
  9727. var rand = baseRandom(index, lastIndex), value = array[rand];
  9728. array[rand] = array[index];
  9729. array[index] = value;
  9730. }
  9731. array.length = size2;
  9732. return array;
  9733. }
  9734. var stringToPath = memoizeCapped(function(string) {
  9735. var result2 = [];
  9736. if (string.charCodeAt(0) === 46) {
  9737. result2.push("");
  9738. }
  9739. string.replace(rePropName, function(match, number, quote, subString) {
  9740. result2.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
  9741. });
  9742. return result2;
  9743. });
  9744. function toKey(value) {
  9745. if (typeof value == "string" || isSymbol(value)) {
  9746. return value;
  9747. }
  9748. var result2 = value + "";
  9749. return result2 == "0" && 1 / value == -INFINITY ? "-0" : result2;
  9750. }
  9751. function toSource(func) {
  9752. if (func != null) {
  9753. try {
  9754. return funcToString.call(func);
  9755. } catch (e) {
  9756. }
  9757. try {
  9758. return func + "";
  9759. } catch (e) {
  9760. }
  9761. }
  9762. return "";
  9763. }
  9764. function updateWrapDetails(details, bitmask) {
  9765. arrayEach(wrapFlags, function(pair) {
  9766. var value = "_." + pair[0];
  9767. if (bitmask & pair[1] && !arrayIncludes(details, value)) {
  9768. details.push(value);
  9769. }
  9770. });
  9771. return details.sort();
  9772. }
  9773. function wrapperClone(wrapper) {
  9774. if (wrapper instanceof LazyWrapper) {
  9775. return wrapper.clone();
  9776. }
  9777. var result2 = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
  9778. result2.__actions__ = copyArray(wrapper.__actions__);
  9779. result2.__index__ = wrapper.__index__;
  9780. result2.__values__ = wrapper.__values__;
  9781. return result2;
  9782. }
  9783. function chunk(array, size2, guard) {
  9784. if (guard ? isIterateeCall(array, size2, guard) : size2 === undefined$1) {
  9785. size2 = 1;
  9786. } else {
  9787. size2 = nativeMax(toInteger(size2), 0);
  9788. }
  9789. var length = array == null ? 0 : array.length;
  9790. if (!length || size2 < 1) {
  9791. return [];
  9792. }
  9793. var index = 0, resIndex = 0, result2 = Array2(nativeCeil(length / size2));
  9794. while (index < length) {
  9795. result2[resIndex++] = baseSlice(array, index, index += size2);
  9796. }
  9797. return result2;
  9798. }
  9799. function compact(array) {
  9800. var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result2 = [];
  9801. while (++index < length) {
  9802. var value = array[index];
  9803. if (value) {
  9804. result2[resIndex++] = value;
  9805. }
  9806. }
  9807. return result2;
  9808. }
  9809. function concat() {
  9810. var length = arguments.length;
  9811. if (!length) {
  9812. return [];
  9813. }
  9814. var args = Array2(length - 1), array = arguments[0], index = length;
  9815. while (index--) {
  9816. args[index - 1] = arguments[index];
  9817. }
  9818. return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
  9819. }
  9820. var difference = baseRest(function(array, values2) {
  9821. return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, true)) : [];
  9822. });
  9823. var differenceBy = baseRest(function(array, values2) {
  9824. var iteratee2 = last(values2);
  9825. if (isArrayLikeObject(iteratee2)) {
  9826. iteratee2 = undefined$1;
  9827. }
  9828. return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, true), getIteratee(iteratee2, 2)) : [];
  9829. });
  9830. var differenceWith = baseRest(function(array, values2) {
  9831. var comparator = last(values2);
  9832. if (isArrayLikeObject(comparator)) {
  9833. comparator = undefined$1;
  9834. }
  9835. return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, true), undefined$1, comparator) : [];
  9836. });
  9837. function drop(array, n, guard) {
  9838. var length = array == null ? 0 : array.length;
  9839. if (!length) {
  9840. return [];
  9841. }
  9842. n = guard || n === undefined$1 ? 1 : toInteger(n);
  9843. return baseSlice(array, n < 0 ? 0 : n, length);
  9844. }
  9845. function dropRight(array, n, guard) {
  9846. var length = array == null ? 0 : array.length;
  9847. if (!length) {
  9848. return [];
  9849. }
  9850. n = guard || n === undefined$1 ? 1 : toInteger(n);
  9851. n = length - n;
  9852. return baseSlice(array, 0, n < 0 ? 0 : n);
  9853. }
  9854. function dropRightWhile(array, predicate) {
  9855. return array && array.length ? baseWhile(array, getIteratee(predicate, 3), true, true) : [];
  9856. }
  9857. function dropWhile(array, predicate) {
  9858. return array && array.length ? baseWhile(array, getIteratee(predicate, 3), true) : [];
  9859. }
  9860. function fill(array, value, start, end) {
  9861. var length = array == null ? 0 : array.length;
  9862. if (!length) {
  9863. return [];
  9864. }
  9865. if (start && typeof start != "number" && isIterateeCall(array, value, start)) {
  9866. start = 0;
  9867. end = length;
  9868. }
  9869. return baseFill(array, value, start, end);
  9870. }
  9871. function findIndex(array, predicate, fromIndex) {
  9872. var length = array == null ? 0 : array.length;
  9873. if (!length) {
  9874. return -1;
  9875. }
  9876. var index = fromIndex == null ? 0 : toInteger(fromIndex);
  9877. if (index < 0) {
  9878. index = nativeMax(length + index, 0);
  9879. }
  9880. return baseFindIndex(array, getIteratee(predicate, 3), index);
  9881. }
  9882. function findLastIndex(array, predicate, fromIndex) {
  9883. var length = array == null ? 0 : array.length;
  9884. if (!length) {
  9885. return -1;
  9886. }
  9887. var index = length - 1;
  9888. if (fromIndex !== undefined$1) {
  9889. index = toInteger(fromIndex);
  9890. index = fromIndex < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
  9891. }
  9892. return baseFindIndex(array, getIteratee(predicate, 3), index, true);
  9893. }
  9894. function flatten(array) {
  9895. var length = array == null ? 0 : array.length;
  9896. return length ? baseFlatten(array, 1) : [];
  9897. }
  9898. function flattenDeep(array) {
  9899. var length = array == null ? 0 : array.length;
  9900. return length ? baseFlatten(array, INFINITY) : [];
  9901. }
  9902. function flattenDepth(array, depth) {
  9903. var length = array == null ? 0 : array.length;
  9904. if (!length) {
  9905. return [];
  9906. }
  9907. depth = depth === undefined$1 ? 1 : toInteger(depth);
  9908. return baseFlatten(array, depth);
  9909. }
  9910. function fromPairs(pairs) {
  9911. var index = -1, length = pairs == null ? 0 : pairs.length, result2 = {};
  9912. while (++index < length) {
  9913. var pair = pairs[index];
  9914. result2[pair[0]] = pair[1];
  9915. }
  9916. return result2;
  9917. }
  9918. function head(array) {
  9919. return array && array.length ? array[0] : undefined$1;
  9920. }
  9921. function indexOf(array, value, fromIndex) {
  9922. var length = array == null ? 0 : array.length;
  9923. if (!length) {
  9924. return -1;
  9925. }
  9926. var index = fromIndex == null ? 0 : toInteger(fromIndex);
  9927. if (index < 0) {
  9928. index = nativeMax(length + index, 0);
  9929. }
  9930. return baseIndexOf(array, value, index);
  9931. }
  9932. function initial(array) {
  9933. var length = array == null ? 0 : array.length;
  9934. return length ? baseSlice(array, 0, -1) : [];
  9935. }
  9936. var intersection = baseRest(function(arrays) {
  9937. var mapped = arrayMap(arrays, castArrayLikeObject);
  9938. return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped) : [];
  9939. });
  9940. var intersectionBy = baseRest(function(arrays) {
  9941. var iteratee2 = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject);
  9942. if (iteratee2 === last(mapped)) {
  9943. iteratee2 = undefined$1;
  9944. } else {
  9945. mapped.pop();
  9946. }
  9947. return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, getIteratee(iteratee2, 2)) : [];
  9948. });
  9949. var intersectionWith = baseRest(function(arrays) {
  9950. var comparator = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject);
  9951. comparator = typeof comparator == "function" ? comparator : undefined$1;
  9952. if (comparator) {
  9953. mapped.pop();
  9954. }
  9955. return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, undefined$1, comparator) : [];
  9956. });
  9957. function join(array, separator) {
  9958. return array == null ? "" : nativeJoin.call(array, separator);
  9959. }
  9960. function last(array) {
  9961. var length = array == null ? 0 : array.length;
  9962. return length ? array[length - 1] : undefined$1;
  9963. }
  9964. function lastIndexOf(array, value, fromIndex) {
  9965. var length = array == null ? 0 : array.length;
  9966. if (!length) {
  9967. return -1;
  9968. }
  9969. var index = length;
  9970. if (fromIndex !== undefined$1) {
  9971. index = toInteger(fromIndex);
  9972. index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
  9973. }
  9974. return value === value ? strictLastIndexOf(array, value, index) : baseFindIndex(array, baseIsNaN, index, true);
  9975. }
  9976. function nth(array, n) {
  9977. return array && array.length ? baseNth(array, toInteger(n)) : undefined$1;
  9978. }
  9979. var pull = baseRest(pullAll);
  9980. function pullAll(array, values2) {
  9981. return array && array.length && values2 && values2.length ? basePullAll(array, values2) : array;
  9982. }
  9983. function pullAllBy(array, values2, iteratee2) {
  9984. return array && array.length && values2 && values2.length ? basePullAll(array, values2, getIteratee(iteratee2, 2)) : array;
  9985. }
  9986. function pullAllWith(array, values2, comparator) {
  9987. return array && array.length && values2 && values2.length ? basePullAll(array, values2, undefined$1, comparator) : array;
  9988. }
  9989. var pullAt = flatRest(function(array, indexes) {
  9990. var length = array == null ? 0 : array.length, result2 = baseAt(array, indexes);
  9991. basePullAt(array, arrayMap(indexes, function(index) {
  9992. return isIndex(index, length) ? +index : index;
  9993. }).sort(compareAscending));
  9994. return result2;
  9995. });
  9996. function remove(array, predicate) {
  9997. var result2 = [];
  9998. if (!(array && array.length)) {
  9999. return result2;
  10000. }
  10001. var index = -1, indexes = [], length = array.length;
  10002. predicate = getIteratee(predicate, 3);
  10003. while (++index < length) {
  10004. var value = array[index];
  10005. if (predicate(value, index, array)) {
  10006. result2.push(value);
  10007. indexes.push(index);
  10008. }
  10009. }
  10010. basePullAt(array, indexes);
  10011. return result2;
  10012. }
  10013. function reverse(array) {
  10014. return array == null ? array : nativeReverse.call(array);
  10015. }
  10016. function slice(array, start, end) {
  10017. var length = array == null ? 0 : array.length;
  10018. if (!length) {
  10019. return [];
  10020. }
  10021. if (end && typeof end != "number" && isIterateeCall(array, start, end)) {
  10022. start = 0;
  10023. end = length;
  10024. } else {
  10025. start = start == null ? 0 : toInteger(start);
  10026. end = end === undefined$1 ? length : toInteger(end);
  10027. }
  10028. return baseSlice(array, start, end);
  10029. }
  10030. function sortedIndex(array, value) {
  10031. return baseSortedIndex(array, value);
  10032. }
  10033. function sortedIndexBy(array, value, iteratee2) {
  10034. return baseSortedIndexBy(array, value, getIteratee(iteratee2, 2));
  10035. }
  10036. function sortedIndexOf(array, value) {
  10037. var length = array == null ? 0 : array.length;
  10038. if (length) {
  10039. var index = baseSortedIndex(array, value);
  10040. if (index < length && eq(array[index], value)) {
  10041. return index;
  10042. }
  10043. }
  10044. return -1;
  10045. }
  10046. function sortedLastIndex(array, value) {
  10047. return baseSortedIndex(array, value, true);
  10048. }
  10049. function sortedLastIndexBy(array, value, iteratee2) {
  10050. return baseSortedIndexBy(array, value, getIteratee(iteratee2, 2), true);
  10051. }
  10052. function sortedLastIndexOf(array, value) {
  10053. var length = array == null ? 0 : array.length;
  10054. if (length) {
  10055. var index = baseSortedIndex(array, value, true) - 1;
  10056. if (eq(array[index], value)) {
  10057. return index;
  10058. }
  10059. }
  10060. return -1;
  10061. }
  10062. function sortedUniq(array) {
  10063. return array && array.length ? baseSortedUniq(array) : [];
  10064. }
  10065. function sortedUniqBy(array, iteratee2) {
  10066. return array && array.length ? baseSortedUniq(array, getIteratee(iteratee2, 2)) : [];
  10067. }
  10068. function tail(array) {
  10069. var length = array == null ? 0 : array.length;
  10070. return length ? baseSlice(array, 1, length) : [];
  10071. }
  10072. function take(array, n, guard) {
  10073. if (!(array && array.length)) {
  10074. return [];
  10075. }
  10076. n = guard || n === undefined$1 ? 1 : toInteger(n);
  10077. return baseSlice(array, 0, n < 0 ? 0 : n);
  10078. }
  10079. function takeRight(array, n, guard) {
  10080. var length = array == null ? 0 : array.length;
  10081. if (!length) {
  10082. return [];
  10083. }
  10084. n = guard || n === undefined$1 ? 1 : toInteger(n);
  10085. n = length - n;
  10086. return baseSlice(array, n < 0 ? 0 : n, length);
  10087. }
  10088. function takeRightWhile(array, predicate) {
  10089. return array && array.length ? baseWhile(array, getIteratee(predicate, 3), false, true) : [];
  10090. }
  10091. function takeWhile(array, predicate) {
  10092. return array && array.length ? baseWhile(array, getIteratee(predicate, 3)) : [];
  10093. }
  10094. var union = baseRest(function(arrays) {
  10095. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
  10096. });
  10097. var unionBy = baseRest(function(arrays) {
  10098. var iteratee2 = last(arrays);
  10099. if (isArrayLikeObject(iteratee2)) {
  10100. iteratee2 = undefined$1;
  10101. }
  10102. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee2, 2));
  10103. });
  10104. var unionWith = baseRest(function(arrays) {
  10105. var comparator = last(arrays);
  10106. comparator = typeof comparator == "function" ? comparator : undefined$1;
  10107. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined$1, comparator);
  10108. });
  10109. function uniq(array) {
  10110. return array && array.length ? baseUniq(array) : [];
  10111. }
  10112. function uniqBy(array, iteratee2) {
  10113. return array && array.length ? baseUniq(array, getIteratee(iteratee2, 2)) : [];
  10114. }
  10115. function uniqWith(array, comparator) {
  10116. comparator = typeof comparator == "function" ? comparator : undefined$1;
  10117. return array && array.length ? baseUniq(array, undefined$1, comparator) : [];
  10118. }
  10119. function unzip(array) {
  10120. if (!(array && array.length)) {
  10121. return [];
  10122. }
  10123. var length = 0;
  10124. array = arrayFilter(array, function(group) {
  10125. if (isArrayLikeObject(group)) {
  10126. length = nativeMax(group.length, length);
  10127. return true;
  10128. }
  10129. });
  10130. return baseTimes(length, function(index) {
  10131. return arrayMap(array, baseProperty(index));
  10132. });
  10133. }
  10134. function unzipWith(array, iteratee2) {
  10135. if (!(array && array.length)) {
  10136. return [];
  10137. }
  10138. var result2 = unzip(array);
  10139. if (iteratee2 == null) {
  10140. return result2;
  10141. }
  10142. return arrayMap(result2, function(group) {
  10143. return apply(iteratee2, undefined$1, group);
  10144. });
  10145. }
  10146. var without = baseRest(function(array, values2) {
  10147. return isArrayLikeObject(array) ? baseDifference(array, values2) : [];
  10148. });
  10149. var xor = baseRest(function(arrays) {
  10150. return baseXor(arrayFilter(arrays, isArrayLikeObject));
  10151. });
  10152. var xorBy = baseRest(function(arrays) {
  10153. var iteratee2 = last(arrays);
  10154. if (isArrayLikeObject(iteratee2)) {
  10155. iteratee2 = undefined$1;
  10156. }
  10157. return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee2, 2));
  10158. });
  10159. var xorWith = baseRest(function(arrays) {
  10160. var comparator = last(arrays);
  10161. comparator = typeof comparator == "function" ? comparator : undefined$1;
  10162. return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined$1, comparator);
  10163. });
  10164. var zip = baseRest(unzip);
  10165. function zipObject(props, values2) {
  10166. return baseZipObject(props || [], values2 || [], assignValue);
  10167. }
  10168. function zipObjectDeep(props, values2) {
  10169. return baseZipObject(props || [], values2 || [], baseSet);
  10170. }
  10171. var zipWith = baseRest(function(arrays) {
  10172. var length = arrays.length, iteratee2 = length > 1 ? arrays[length - 1] : undefined$1;
  10173. iteratee2 = typeof iteratee2 == "function" ? (arrays.pop(), iteratee2) : undefined$1;
  10174. return unzipWith(arrays, iteratee2);
  10175. });
  10176. function chain(value) {
  10177. var result2 = lodash2(value);
  10178. result2.__chain__ = true;
  10179. return result2;
  10180. }
  10181. function tap(value, interceptor) {
  10182. interceptor(value);
  10183. return value;
  10184. }
  10185. function thru(value, interceptor) {
  10186. return interceptor(value);
  10187. }
  10188. var wrapperAt = flatRest(function(paths) {
  10189. var length = paths.length, start = length ? paths[0] : 0, value = this.__wrapped__, interceptor = function(object) {
  10190. return baseAt(object, paths);
  10191. };
  10192. if (length > 1 || this.__actions__.length || !(value instanceof LazyWrapper) || !isIndex(start)) {
  10193. return this.thru(interceptor);
  10194. }
  10195. value = value.slice(start, +start + (length ? 1 : 0));
  10196. value.__actions__.push({
  10197. "func": thru,
  10198. "args": [interceptor],
  10199. "thisArg": undefined$1
  10200. });
  10201. return new LodashWrapper(value, this.__chain__).thru(function(array) {
  10202. if (length && !array.length) {
  10203. array.push(undefined$1);
  10204. }
  10205. return array;
  10206. });
  10207. });
  10208. function wrapperChain() {
  10209. return chain(this);
  10210. }
  10211. function wrapperCommit() {
  10212. return new LodashWrapper(this.value(), this.__chain__);
  10213. }
  10214. function wrapperNext() {
  10215. if (this.__values__ === undefined$1) {
  10216. this.__values__ = toArray(this.value());
  10217. }
  10218. var done = this.__index__ >= this.__values__.length, value = done ? undefined$1 : this.__values__[this.__index__++];
  10219. return { "done": done, "value": value };
  10220. }
  10221. function wrapperToIterator() {
  10222. return this;
  10223. }
  10224. function wrapperPlant(value) {
  10225. var result2, parent2 = this;
  10226. while (parent2 instanceof baseLodash) {
  10227. var clone2 = wrapperClone(parent2);
  10228. clone2.__index__ = 0;
  10229. clone2.__values__ = undefined$1;
  10230. if (result2) {
  10231. previous.__wrapped__ = clone2;
  10232. } else {
  10233. result2 = clone2;
  10234. }
  10235. var previous = clone2;
  10236. parent2 = parent2.__wrapped__;
  10237. }
  10238. previous.__wrapped__ = value;
  10239. return result2;
  10240. }
  10241. function wrapperReverse() {
  10242. var value = this.__wrapped__;
  10243. if (value instanceof LazyWrapper) {
  10244. var wrapped = value;
  10245. if (this.__actions__.length) {
  10246. wrapped = new LazyWrapper(this);
  10247. }
  10248. wrapped = wrapped.reverse();
  10249. wrapped.__actions__.push({
  10250. "func": thru,
  10251. "args": [reverse],
  10252. "thisArg": undefined$1
  10253. });
  10254. return new LodashWrapper(wrapped, this.__chain__);
  10255. }
  10256. return this.thru(reverse);
  10257. }
  10258. function wrapperValue() {
  10259. return baseWrapperValue(this.__wrapped__, this.__actions__);
  10260. }
  10261. var countBy = createAggregator(function(result2, value, key) {
  10262. if (hasOwnProperty.call(result2, key)) {
  10263. ++result2[key];
  10264. } else {
  10265. baseAssignValue(result2, key, 1);
  10266. }
  10267. });
  10268. function every(collection, predicate, guard) {
  10269. var func = isArray(collection) ? arrayEvery : baseEvery;
  10270. if (guard && isIterateeCall(collection, predicate, guard)) {
  10271. predicate = undefined$1;
  10272. }
  10273. return func(collection, getIteratee(predicate, 3));
  10274. }
  10275. function filter(collection, predicate) {
  10276. var func = isArray(collection) ? arrayFilter : baseFilter;
  10277. return func(collection, getIteratee(predicate, 3));
  10278. }
  10279. var find = createFind(findIndex);
  10280. var findLast = createFind(findLastIndex);
  10281. function flatMap(collection, iteratee2) {
  10282. return baseFlatten(map(collection, iteratee2), 1);
  10283. }
  10284. function flatMapDeep(collection, iteratee2) {
  10285. return baseFlatten(map(collection, iteratee2), INFINITY);
  10286. }
  10287. function flatMapDepth(collection, iteratee2, depth) {
  10288. depth = depth === undefined$1 ? 1 : toInteger(depth);
  10289. return baseFlatten(map(collection, iteratee2), depth);
  10290. }
  10291. function forEach(collection, iteratee2) {
  10292. var func = isArray(collection) ? arrayEach : baseEach;
  10293. return func(collection, getIteratee(iteratee2, 3));
  10294. }
  10295. function forEachRight(collection, iteratee2) {
  10296. var func = isArray(collection) ? arrayEachRight : baseEachRight;
  10297. return func(collection, getIteratee(iteratee2, 3));
  10298. }
  10299. var groupBy = createAggregator(function(result2, value, key) {
  10300. if (hasOwnProperty.call(result2, key)) {
  10301. result2[key].push(value);
  10302. } else {
  10303. baseAssignValue(result2, key, [value]);
  10304. }
  10305. });
  10306. function includes(collection, value, fromIndex, guard) {
  10307. collection = isArrayLike(collection) ? collection : values(collection);
  10308. fromIndex = fromIndex && !guard ? toInteger(fromIndex) : 0;
  10309. var length = collection.length;
  10310. if (fromIndex < 0) {
  10311. fromIndex = nativeMax(length + fromIndex, 0);
  10312. }
  10313. return isString(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1;
  10314. }
  10315. var invokeMap = baseRest(function(collection, path, args) {
  10316. var index = -1, isFunc = typeof path == "function", result2 = isArrayLike(collection) ? Array2(collection.length) : [];
  10317. baseEach(collection, function(value) {
  10318. result2[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
  10319. });
  10320. return result2;
  10321. });
  10322. var keyBy = createAggregator(function(result2, value, key) {
  10323. baseAssignValue(result2, key, value);
  10324. });
  10325. function map(collection, iteratee2) {
  10326. var func = isArray(collection) ? arrayMap : baseMap;
  10327. return func(collection, getIteratee(iteratee2, 3));
  10328. }
  10329. function orderBy(collection, iteratees, orders, guard) {
  10330. if (collection == null) {
  10331. return [];
  10332. }
  10333. if (!isArray(iteratees)) {
  10334. iteratees = iteratees == null ? [] : [iteratees];
  10335. }
  10336. orders = guard ? undefined$1 : orders;
  10337. if (!isArray(orders)) {
  10338. orders = orders == null ? [] : [orders];
  10339. }
  10340. return baseOrderBy(collection, iteratees, orders);
  10341. }
  10342. var partition = createAggregator(function(result2, value, key) {
  10343. result2[key ? 0 : 1].push(value);
  10344. }, function() {
  10345. return [[], []];
  10346. });
  10347. function reduce(collection, iteratee2, accumulator) {
  10348. var func = isArray(collection) ? arrayReduce : baseReduce, initAccum = arguments.length < 3;
  10349. return func(collection, getIteratee(iteratee2, 4), accumulator, initAccum, baseEach);
  10350. }
  10351. function reduceRight(collection, iteratee2, accumulator) {
  10352. var func = isArray(collection) ? arrayReduceRight : baseReduce, initAccum = arguments.length < 3;
  10353. return func(collection, getIteratee(iteratee2, 4), accumulator, initAccum, baseEachRight);
  10354. }
  10355. function reject(collection, predicate) {
  10356. var func = isArray(collection) ? arrayFilter : baseFilter;
  10357. return func(collection, negate(getIteratee(predicate, 3)));
  10358. }
  10359. function sample(collection) {
  10360. var func = isArray(collection) ? arraySample : baseSample;
  10361. return func(collection);
  10362. }
  10363. function sampleSize(collection, n, guard) {
  10364. if (guard ? isIterateeCall(collection, n, guard) : n === undefined$1) {
  10365. n = 1;
  10366. } else {
  10367. n = toInteger(n);
  10368. }
  10369. var func = isArray(collection) ? arraySampleSize : baseSampleSize;
  10370. return func(collection, n);
  10371. }
  10372. function shuffle(collection) {
  10373. var func = isArray(collection) ? arrayShuffle : baseShuffle;
  10374. return func(collection);
  10375. }
  10376. function size(collection) {
  10377. if (collection == null) {
  10378. return 0;
  10379. }
  10380. if (isArrayLike(collection)) {
  10381. return isString(collection) ? stringSize(collection) : collection.length;
  10382. }
  10383. var tag = getTag(collection);
  10384. if (tag == mapTag || tag == setTag) {
  10385. return collection.size;
  10386. }
  10387. return baseKeys(collection).length;
  10388. }
  10389. function some(collection, predicate, guard) {
  10390. var func = isArray(collection) ? arraySome : baseSome;
  10391. if (guard && isIterateeCall(collection, predicate, guard)) {
  10392. predicate = undefined$1;
  10393. }
  10394. return func(collection, getIteratee(predicate, 3));
  10395. }
  10396. var sortBy = baseRest(function(collection, iteratees) {
  10397. if (collection == null) {
  10398. return [];
  10399. }
  10400. var length = iteratees.length;
  10401. if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
  10402. iteratees = [];
  10403. } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
  10404. iteratees = [iteratees[0]];
  10405. }
  10406. return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
  10407. });
  10408. var now = ctxNow || function() {
  10409. return root.Date.now();
  10410. };
  10411. function after(n, func) {
  10412. if (typeof func != "function") {
  10413. throw new TypeError2(FUNC_ERROR_TEXT);
  10414. }
  10415. n = toInteger(n);
  10416. return function() {
  10417. if (--n < 1) {
  10418. return func.apply(this, arguments);
  10419. }
  10420. };
  10421. }
  10422. function ary(func, n, guard) {
  10423. n = guard ? undefined$1 : n;
  10424. n = func && n == null ? func.length : n;
  10425. return createWrap(func, WRAP_ARY_FLAG, undefined$1, undefined$1, undefined$1, undefined$1, n);
  10426. }
  10427. function before(n, func) {
  10428. var result2;
  10429. if (typeof func != "function") {
  10430. throw new TypeError2(FUNC_ERROR_TEXT);
  10431. }
  10432. n = toInteger(n);
  10433. return function() {
  10434. if (--n > 0) {
  10435. result2 = func.apply(this, arguments);
  10436. }
  10437. if (n <= 1) {
  10438. func = undefined$1;
  10439. }
  10440. return result2;
  10441. };
  10442. }
  10443. var bind = baseRest(function(func, thisArg, partials) {
  10444. var bitmask = WRAP_BIND_FLAG;
  10445. if (partials.length) {
  10446. var holders = replaceHolders(partials, getHolder(bind));
  10447. bitmask |= WRAP_PARTIAL_FLAG;
  10448. }
  10449. return createWrap(func, bitmask, thisArg, partials, holders);
  10450. });
  10451. var bindKey = baseRest(function(object, key, partials) {
  10452. var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
  10453. if (partials.length) {
  10454. var holders = replaceHolders(partials, getHolder(bindKey));
  10455. bitmask |= WRAP_PARTIAL_FLAG;
  10456. }
  10457. return createWrap(key, bitmask, object, partials, holders);
  10458. });
  10459. function curry(func, arity, guard) {
  10460. arity = guard ? undefined$1 : arity;
  10461. var result2 = createWrap(func, WRAP_CURRY_FLAG, undefined$1, undefined$1, undefined$1, undefined$1, undefined$1, arity);
  10462. result2.placeholder = curry.placeholder;
  10463. return result2;
  10464. }
  10465. function curryRight(func, arity, guard) {
  10466. arity = guard ? undefined$1 : arity;
  10467. var result2 = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined$1, undefined$1, undefined$1, undefined$1, undefined$1, arity);
  10468. result2.placeholder = curryRight.placeholder;
  10469. return result2;
  10470. }
  10471. function debounce(func, wait, options) {
  10472. var lastArgs, lastThis, maxWait, result2, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
  10473. if (typeof func != "function") {
  10474. throw new TypeError2(FUNC_ERROR_TEXT);
  10475. }
  10476. wait = toNumber(wait) || 0;
  10477. if (isObject(options)) {
  10478. leading = !!options.leading;
  10479. maxing = "maxWait" in options;
  10480. maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
  10481. trailing = "trailing" in options ? !!options.trailing : trailing;
  10482. }
  10483. function invokeFunc(time) {
  10484. var args = lastArgs, thisArg = lastThis;
  10485. lastArgs = lastThis = undefined$1;
  10486. lastInvokeTime = time;
  10487. result2 = func.apply(thisArg, args);
  10488. return result2;
  10489. }
  10490. function leadingEdge(time) {
  10491. lastInvokeTime = time;
  10492. timerId = setTimeout(timerExpired, wait);
  10493. return leading ? invokeFunc(time) : result2;
  10494. }
  10495. function remainingWait(time) {
  10496. var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
  10497. return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
  10498. }
  10499. function shouldInvoke(time) {
  10500. var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
  10501. return lastCallTime === undefined$1 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
  10502. }
  10503. function timerExpired() {
  10504. var time = now();
  10505. if (shouldInvoke(time)) {
  10506. return trailingEdge(time);
  10507. }
  10508. timerId = setTimeout(timerExpired, remainingWait(time));
  10509. }
  10510. function trailingEdge(time) {
  10511. timerId = undefined$1;
  10512. if (trailing && lastArgs) {
  10513. return invokeFunc(time);
  10514. }
  10515. lastArgs = lastThis = undefined$1;
  10516. return result2;
  10517. }
  10518. function cancel() {
  10519. if (timerId !== undefined$1) {
  10520. clearTimeout(timerId);
  10521. }
  10522. lastInvokeTime = 0;
  10523. lastArgs = lastCallTime = lastThis = timerId = undefined$1;
  10524. }
  10525. function flush() {
  10526. return timerId === undefined$1 ? result2 : trailingEdge(now());
  10527. }
  10528. function debounced() {
  10529. var time = now(), isInvoking = shouldInvoke(time);
  10530. lastArgs = arguments;
  10531. lastThis = this;
  10532. lastCallTime = time;
  10533. if (isInvoking) {
  10534. if (timerId === undefined$1) {
  10535. return leadingEdge(lastCallTime);
  10536. }
  10537. if (maxing) {
  10538. clearTimeout(timerId);
  10539. timerId = setTimeout(timerExpired, wait);
  10540. return invokeFunc(lastCallTime);
  10541. }
  10542. }
  10543. if (timerId === undefined$1) {
  10544. timerId = setTimeout(timerExpired, wait);
  10545. }
  10546. return result2;
  10547. }
  10548. debounced.cancel = cancel;
  10549. debounced.flush = flush;
  10550. return debounced;
  10551. }
  10552. var defer = baseRest(function(func, args) {
  10553. return baseDelay(func, 1, args);
  10554. });
  10555. var delay = baseRest(function(func, wait, args) {
  10556. return baseDelay(func, toNumber(wait) || 0, args);
  10557. });
  10558. function flip(func) {
  10559. return createWrap(func, WRAP_FLIP_FLAG);
  10560. }
  10561. function memoize(func, resolver) {
  10562. if (typeof func != "function" || resolver != null && typeof resolver != "function") {
  10563. throw new TypeError2(FUNC_ERROR_TEXT);
  10564. }
  10565. var memoized = function() {
  10566. var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
  10567. if (cache.has(key)) {
  10568. return cache.get(key);
  10569. }
  10570. var result2 = func.apply(this, args);
  10571. memoized.cache = cache.set(key, result2) || cache;
  10572. return result2;
  10573. };
  10574. memoized.cache = new (memoize.Cache || MapCache)();
  10575. return memoized;
  10576. }
  10577. memoize.Cache = MapCache;
  10578. function negate(predicate) {
  10579. if (typeof predicate != "function") {
  10580. throw new TypeError2(FUNC_ERROR_TEXT);
  10581. }
  10582. return function() {
  10583. var args = arguments;
  10584. switch (args.length) {
  10585. case 0:
  10586. return !predicate.call(this);
  10587. case 1:
  10588. return !predicate.call(this, args[0]);
  10589. case 2:
  10590. return !predicate.call(this, args[0], args[1]);
  10591. case 3:
  10592. return !predicate.call(this, args[0], args[1], args[2]);
  10593. }
  10594. return !predicate.apply(this, args);
  10595. };
  10596. }
  10597. function once(func) {
  10598. return before(2, func);
  10599. }
  10600. var overArgs = castRest(function(func, transforms) {
  10601. transforms = transforms.length == 1 && isArray(transforms[0]) ? arrayMap(transforms[0], baseUnary(getIteratee())) : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
  10602. var funcsLength = transforms.length;
  10603. return baseRest(function(args) {
  10604. var index = -1, length = nativeMin(args.length, funcsLength);
  10605. while (++index < length) {
  10606. args[index] = transforms[index].call(this, args[index]);
  10607. }
  10608. return apply(func, this, args);
  10609. });
  10610. });
  10611. var partial = baseRest(function(func, partials) {
  10612. var holders = replaceHolders(partials, getHolder(partial));
  10613. return createWrap(func, WRAP_PARTIAL_FLAG, undefined$1, partials, holders);
  10614. });
  10615. var partialRight = baseRest(function(func, partials) {
  10616. var holders = replaceHolders(partials, getHolder(partialRight));
  10617. return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined$1, partials, holders);
  10618. });
  10619. var rearg = flatRest(function(func, indexes) {
  10620. return createWrap(func, WRAP_REARG_FLAG, undefined$1, undefined$1, undefined$1, indexes);
  10621. });
  10622. function rest(func, start) {
  10623. if (typeof func != "function") {
  10624. throw new TypeError2(FUNC_ERROR_TEXT);
  10625. }
  10626. start = start === undefined$1 ? start : toInteger(start);
  10627. return baseRest(func, start);
  10628. }
  10629. function spread(func, start) {
  10630. if (typeof func != "function") {
  10631. throw new TypeError2(FUNC_ERROR_TEXT);
  10632. }
  10633. start = start == null ? 0 : nativeMax(toInteger(start), 0);
  10634. return baseRest(function(args) {
  10635. var array = args[start], otherArgs = castSlice(args, 0, start);
  10636. if (array) {
  10637. arrayPush(otherArgs, array);
  10638. }
  10639. return apply(func, this, otherArgs);
  10640. });
  10641. }
  10642. function throttle(func, wait, options) {
  10643. var leading = true, trailing = true;
  10644. if (typeof func != "function") {
  10645. throw new TypeError2(FUNC_ERROR_TEXT);
  10646. }
  10647. if (isObject(options)) {
  10648. leading = "leading" in options ? !!options.leading : leading;
  10649. trailing = "trailing" in options ? !!options.trailing : trailing;
  10650. }
  10651. return debounce(func, wait, {
  10652. "leading": leading,
  10653. "maxWait": wait,
  10654. "trailing": trailing
  10655. });
  10656. }
  10657. function unary(func) {
  10658. return ary(func, 1);
  10659. }
  10660. function wrap(value, wrapper) {
  10661. return partial(castFunction(wrapper), value);
  10662. }
  10663. function castArray() {
  10664. if (!arguments.length) {
  10665. return [];
  10666. }
  10667. var value = arguments[0];
  10668. return isArray(value) ? value : [value];
  10669. }
  10670. function clone(value) {
  10671. return baseClone(value, CLONE_SYMBOLS_FLAG);
  10672. }
  10673. function cloneWith(value, customizer) {
  10674. customizer = typeof customizer == "function" ? customizer : undefined$1;
  10675. return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
  10676. }
  10677. function cloneDeep(value) {
  10678. return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
  10679. }
  10680. function cloneDeepWith(value, customizer) {
  10681. customizer = typeof customizer == "function" ? customizer : undefined$1;
  10682. return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
  10683. }
  10684. function conformsTo(object, source) {
  10685. return source == null || baseConformsTo(object, source, keys(source));
  10686. }
  10687. function eq(value, other) {
  10688. return value === other || value !== value && other !== other;
  10689. }
  10690. var gt = createRelationalOperation(baseGt);
  10691. var gte = createRelationalOperation(function(value, other) {
  10692. return value >= other;
  10693. });
  10694. var isArguments = baseIsArguments(function() {
  10695. return arguments;
  10696. }()) ? baseIsArguments : function(value) {
  10697. return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
  10698. };
  10699. var isArray = Array2.isArray;
  10700. var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
  10701. function isArrayLike(value) {
  10702. return value != null && isLength(value.length) && !isFunction(value);
  10703. }
  10704. function isArrayLikeObject(value) {
  10705. return isObjectLike(value) && isArrayLike(value);
  10706. }
  10707. function isBoolean(value) {
  10708. return value === true || value === false || isObjectLike(value) && baseGetTag(value) == boolTag;
  10709. }
  10710. var isBuffer = nativeIsBuffer || stubFalse;
  10711. var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
  10712. function isElement(value) {
  10713. return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
  10714. }
  10715. function isEmpty(value) {
  10716. if (value == null) {
  10717. return true;
  10718. }
  10719. if (isArrayLike(value) && (isArray(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer(value) || isTypedArray(value) || isArguments(value))) {
  10720. return !value.length;
  10721. }
  10722. var tag = getTag(value);
  10723. if (tag == mapTag || tag == setTag) {
  10724. return !value.size;
  10725. }
  10726. if (isPrototype(value)) {
  10727. return !baseKeys(value).length;
  10728. }
  10729. for (var key in value) {
  10730. if (hasOwnProperty.call(value, key)) {
  10731. return false;
  10732. }
  10733. }
  10734. return true;
  10735. }
  10736. function isEqual(value, other) {
  10737. return baseIsEqual(value, other);
  10738. }
  10739. function isEqualWith(value, other, customizer) {
  10740. customizer = typeof customizer == "function" ? customizer : undefined$1;
  10741. var result2 = customizer ? customizer(value, other) : undefined$1;
  10742. return result2 === undefined$1 ? baseIsEqual(value, other, undefined$1, customizer) : !!result2;
  10743. }
  10744. function isError(value) {
  10745. if (!isObjectLike(value)) {
  10746. return false;
  10747. }
  10748. var tag = baseGetTag(value);
  10749. return tag == errorTag || tag == domExcTag || typeof value.message == "string" && typeof value.name == "string" && !isPlainObject(value);
  10750. }
  10751. function isFinite2(value) {
  10752. return typeof value == "number" && nativeIsFinite(value);
  10753. }
  10754. function isFunction(value) {
  10755. if (!isObject(value)) {
  10756. return false;
  10757. }
  10758. var tag = baseGetTag(value);
  10759. return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
  10760. }
  10761. function isInteger(value) {
  10762. return typeof value == "number" && value == toInteger(value);
  10763. }
  10764. function isLength(value) {
  10765. return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  10766. }
  10767. function isObject(value) {
  10768. var type = typeof value;
  10769. return value != null && (type == "object" || type == "function");
  10770. }
  10771. function isObjectLike(value) {
  10772. return value != null && typeof value == "object";
  10773. }
  10774. var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
  10775. function isMatch(object, source) {
  10776. return object === source || baseIsMatch(object, source, getMatchData(source));
  10777. }
  10778. function isMatchWith(object, source, customizer) {
  10779. customizer = typeof customizer == "function" ? customizer : undefined$1;
  10780. return baseIsMatch(object, source, getMatchData(source), customizer);
  10781. }
  10782. function isNaN2(value) {
  10783. return isNumber(value) && value != +value;
  10784. }
  10785. function isNative(value) {
  10786. if (isMaskable(value)) {
  10787. throw new Error2(CORE_ERROR_TEXT);
  10788. }
  10789. return baseIsNative(value);
  10790. }
  10791. function isNull(value) {
  10792. return value === null;
  10793. }
  10794. function isNil(value) {
  10795. return value == null;
  10796. }
  10797. function isNumber(value) {
  10798. return typeof value == "number" || isObjectLike(value) && baseGetTag(value) == numberTag;
  10799. }
  10800. function isPlainObject(value) {
  10801. if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
  10802. return false;
  10803. }
  10804. var proto = getPrototype(value);
  10805. if (proto === null) {
  10806. return true;
  10807. }
  10808. var Ctor = hasOwnProperty.call(proto, "constructor") && proto.constructor;
  10809. return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
  10810. }
  10811. var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
  10812. function isSafeInteger(value) {
  10813. return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
  10814. }
  10815. var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
  10816. function isString(value) {
  10817. return typeof value == "string" || !isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag;
  10818. }
  10819. function isSymbol(value) {
  10820. return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
  10821. }
  10822. var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
  10823. function isUndefined(value) {
  10824. return value === undefined$1;
  10825. }
  10826. function isWeakMap(value) {
  10827. return isObjectLike(value) && getTag(value) == weakMapTag;
  10828. }
  10829. function isWeakSet(value) {
  10830. return isObjectLike(value) && baseGetTag(value) == weakSetTag;
  10831. }
  10832. var lt = createRelationalOperation(baseLt);
  10833. var lte = createRelationalOperation(function(value, other) {
  10834. return value <= other;
  10835. });
  10836. function toArray(value) {
  10837. if (!value) {
  10838. return [];
  10839. }
  10840. if (isArrayLike(value)) {
  10841. return isString(value) ? stringToArray(value) : copyArray(value);
  10842. }
  10843. if (symIterator && value[symIterator]) {
  10844. return iteratorToArray(value[symIterator]());
  10845. }
  10846. var tag = getTag(value), func = tag == mapTag ? mapToArray : tag == setTag ? setToArray : values;
  10847. return func(value);
  10848. }
  10849. function toFinite(value) {
  10850. if (!value) {
  10851. return value === 0 ? value : 0;
  10852. }
  10853. value = toNumber(value);
  10854. if (value === INFINITY || value === -INFINITY) {
  10855. var sign = value < 0 ? -1 : 1;
  10856. return sign * MAX_INTEGER;
  10857. }
  10858. return value === value ? value : 0;
  10859. }
  10860. function toInteger(value) {
  10861. var result2 = toFinite(value), remainder = result2 % 1;
  10862. return result2 === result2 ? remainder ? result2 - remainder : result2 : 0;
  10863. }
  10864. function toLength(value) {
  10865. return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
  10866. }
  10867. function toNumber(value) {
  10868. if (typeof value == "number") {
  10869. return value;
  10870. }
  10871. if (isSymbol(value)) {
  10872. return NAN;
  10873. }
  10874. if (isObject(value)) {
  10875. var other = typeof value.valueOf == "function" ? value.valueOf() : value;
  10876. value = isObject(other) ? other + "" : other;
  10877. }
  10878. if (typeof value != "string") {
  10879. return value === 0 ? value : +value;
  10880. }
  10881. value = baseTrim(value);
  10882. var isBinary = reIsBinary.test(value);
  10883. return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
  10884. }
  10885. function toPlainObject(value) {
  10886. return copyObject(value, keysIn(value));
  10887. }
  10888. function toSafeInteger(value) {
  10889. return value ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) : value === 0 ? value : 0;
  10890. }
  10891. function toString(value) {
  10892. return value == null ? "" : baseToString(value);
  10893. }
  10894. var assign = createAssigner(function(object, source) {
  10895. if (isPrototype(source) || isArrayLike(source)) {
  10896. copyObject(source, keys(source), object);
  10897. return;
  10898. }
  10899. for (var key in source) {
  10900. if (hasOwnProperty.call(source, key)) {
  10901. assignValue(object, key, source[key]);
  10902. }
  10903. }
  10904. });
  10905. var assignIn = createAssigner(function(object, source) {
  10906. copyObject(source, keysIn(source), object);
  10907. });
  10908. var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
  10909. copyObject(source, keysIn(source), object, customizer);
  10910. });
  10911. var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
  10912. copyObject(source, keys(source), object, customizer);
  10913. });
  10914. var at = flatRest(baseAt);
  10915. function create(prototype, properties) {
  10916. var result2 = baseCreate(prototype);
  10917. return properties == null ? result2 : baseAssign(result2, properties);
  10918. }
  10919. var defaults = baseRest(function(object, sources) {
  10920. object = Object2(object);
  10921. var index = -1;
  10922. var length = sources.length;
  10923. var guard = length > 2 ? sources[2] : undefined$1;
  10924. if (guard && isIterateeCall(sources[0], sources[1], guard)) {
  10925. length = 1;
  10926. }
  10927. while (++index < length) {
  10928. var source = sources[index];
  10929. var props = keysIn(source);
  10930. var propsIndex = -1;
  10931. var propsLength = props.length;
  10932. while (++propsIndex < propsLength) {
  10933. var key = props[propsIndex];
  10934. var value = object[key];
  10935. if (value === undefined$1 || eq(value, objectProto[key]) && !hasOwnProperty.call(object, key)) {
  10936. object[key] = source[key];
  10937. }
  10938. }
  10939. }
  10940. return object;
  10941. });
  10942. var defaultsDeep = baseRest(function(args) {
  10943. args.push(undefined$1, customDefaultsMerge);
  10944. return apply(mergeWith, undefined$1, args);
  10945. });
  10946. function findKey(object, predicate) {
  10947. return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
  10948. }
  10949. function findLastKey(object, predicate) {
  10950. return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
  10951. }
  10952. function forIn(object, iteratee2) {
  10953. return object == null ? object : baseFor(object, getIteratee(iteratee2, 3), keysIn);
  10954. }
  10955. function forInRight(object, iteratee2) {
  10956. return object == null ? object : baseForRight(object, getIteratee(iteratee2, 3), keysIn);
  10957. }
  10958. function forOwn(object, iteratee2) {
  10959. return object && baseForOwn(object, getIteratee(iteratee2, 3));
  10960. }
  10961. function forOwnRight(object, iteratee2) {
  10962. return object && baseForOwnRight(object, getIteratee(iteratee2, 3));
  10963. }
  10964. function functions(object) {
  10965. return object == null ? [] : baseFunctions(object, keys(object));
  10966. }
  10967. function functionsIn(object) {
  10968. return object == null ? [] : baseFunctions(object, keysIn(object));
  10969. }
  10970. function get(object, path, defaultValue) {
  10971. var result2 = object == null ? undefined$1 : baseGet(object, path);
  10972. return result2 === undefined$1 ? defaultValue : result2;
  10973. }
  10974. function has(object, path) {
  10975. return object != null && hasPath(object, path, baseHas);
  10976. }
  10977. function hasIn(object, path) {
  10978. return object != null && hasPath(object, path, baseHasIn);
  10979. }
  10980. var invert = createInverter(function(result2, value, key) {
  10981. if (value != null && typeof value.toString != "function") {
  10982. value = nativeObjectToString.call(value);
  10983. }
  10984. result2[value] = key;
  10985. }, constant(identity));
  10986. var invertBy = createInverter(function(result2, value, key) {
  10987. if (value != null && typeof value.toString != "function") {
  10988. value = nativeObjectToString.call(value);
  10989. }
  10990. if (hasOwnProperty.call(result2, value)) {
  10991. result2[value].push(key);
  10992. } else {
  10993. result2[value] = [key];
  10994. }
  10995. }, getIteratee);
  10996. var invoke = baseRest(baseInvoke);
  10997. function keys(object) {
  10998. return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
  10999. }
  11000. function keysIn(object) {
  11001. return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
  11002. }
  11003. function mapKeys(object, iteratee2) {
  11004. var result2 = {};
  11005. iteratee2 = getIteratee(iteratee2, 3);
  11006. baseForOwn(object, function(value, key, object2) {
  11007. baseAssignValue(result2, iteratee2(value, key, object2), value);
  11008. });
  11009. return result2;
  11010. }
  11011. function mapValues(object, iteratee2) {
  11012. var result2 = {};
  11013. iteratee2 = getIteratee(iteratee2, 3);
  11014. baseForOwn(object, function(value, key, object2) {
  11015. baseAssignValue(result2, key, iteratee2(value, key, object2));
  11016. });
  11017. return result2;
  11018. }
  11019. var merge = createAssigner(function(object, source, srcIndex) {
  11020. baseMerge(object, source, srcIndex);
  11021. });
  11022. var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
  11023. baseMerge(object, source, srcIndex, customizer);
  11024. });
  11025. var omit = flatRest(function(object, paths) {
  11026. var result2 = {};
  11027. if (object == null) {
  11028. return result2;
  11029. }
  11030. var isDeep = false;
  11031. paths = arrayMap(paths, function(path) {
  11032. path = castPath(path, object);
  11033. isDeep || (isDeep = path.length > 1);
  11034. return path;
  11035. });
  11036. copyObject(object, getAllKeysIn(object), result2);
  11037. if (isDeep) {
  11038. result2 = baseClone(result2, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
  11039. }
  11040. var length = paths.length;
  11041. while (length--) {
  11042. baseUnset(result2, paths[length]);
  11043. }
  11044. return result2;
  11045. });
  11046. function omitBy(object, predicate) {
  11047. return pickBy(object, negate(getIteratee(predicate)));
  11048. }
  11049. var pick = flatRest(function(object, paths) {
  11050. return object == null ? {} : basePick(object, paths);
  11051. });
  11052. function pickBy(object, predicate) {
  11053. if (object == null) {
  11054. return {};
  11055. }
  11056. var props = arrayMap(getAllKeysIn(object), function(prop) {
  11057. return [prop];
  11058. });
  11059. predicate = getIteratee(predicate);
  11060. return basePickBy(object, props, function(value, path) {
  11061. return predicate(value, path[0]);
  11062. });
  11063. }
  11064. function result(object, path, defaultValue) {
  11065. path = castPath(path, object);
  11066. var index = -1, length = path.length;
  11067. if (!length) {
  11068. length = 1;
  11069. object = undefined$1;
  11070. }
  11071. while (++index < length) {
  11072. var value = object == null ? undefined$1 : object[toKey(path[index])];
  11073. if (value === undefined$1) {
  11074. index = length;
  11075. value = defaultValue;
  11076. }
  11077. object = isFunction(value) ? value.call(object) : value;
  11078. }
  11079. return object;
  11080. }
  11081. function set(object, path, value) {
  11082. return object == null ? object : baseSet(object, path, value);
  11083. }
  11084. function setWith(object, path, value, customizer) {
  11085. customizer = typeof customizer == "function" ? customizer : undefined$1;
  11086. return object == null ? object : baseSet(object, path, value, customizer);
  11087. }
  11088. var toPairs = createToPairs(keys);
  11089. var toPairsIn = createToPairs(keysIn);
  11090. function transform(object, iteratee2, accumulator) {
  11091. var isArr = isArray(object), isArrLike = isArr || isBuffer(object) || isTypedArray(object);
  11092. iteratee2 = getIteratee(iteratee2, 4);
  11093. if (accumulator == null) {
  11094. var Ctor = object && object.constructor;
  11095. if (isArrLike) {
  11096. accumulator = isArr ? new Ctor() : [];
  11097. } else if (isObject(object)) {
  11098. accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
  11099. } else {
  11100. accumulator = {};
  11101. }
  11102. }
  11103. (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object2) {
  11104. return iteratee2(accumulator, value, index, object2);
  11105. });
  11106. return accumulator;
  11107. }
  11108. function unset(object, path) {
  11109. return object == null ? true : baseUnset(object, path);
  11110. }
  11111. function update(object, path, updater) {
  11112. return object == null ? object : baseUpdate(object, path, castFunction(updater));
  11113. }
  11114. function updateWith(object, path, updater, customizer) {
  11115. customizer = typeof customizer == "function" ? customizer : undefined$1;
  11116. return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
  11117. }
  11118. function values(object) {
  11119. return object == null ? [] : baseValues(object, keys(object));
  11120. }
  11121. function valuesIn(object) {
  11122. return object == null ? [] : baseValues(object, keysIn(object));
  11123. }
  11124. function clamp(number, lower, upper) {
  11125. if (upper === undefined$1) {
  11126. upper = lower;
  11127. lower = undefined$1;
  11128. }
  11129. if (upper !== undefined$1) {
  11130. upper = toNumber(upper);
  11131. upper = upper === upper ? upper : 0;
  11132. }
  11133. if (lower !== undefined$1) {
  11134. lower = toNumber(lower);
  11135. lower = lower === lower ? lower : 0;
  11136. }
  11137. return baseClamp(toNumber(number), lower, upper);
  11138. }
  11139. function inRange(number, start, end) {
  11140. start = toFinite(start);
  11141. if (end === undefined$1) {
  11142. end = start;
  11143. start = 0;
  11144. } else {
  11145. end = toFinite(end);
  11146. }
  11147. number = toNumber(number);
  11148. return baseInRange(number, start, end);
  11149. }
  11150. function random(lower, upper, floating) {
  11151. if (floating && typeof floating != "boolean" && isIterateeCall(lower, upper, floating)) {
  11152. upper = floating = undefined$1;
  11153. }
  11154. if (floating === undefined$1) {
  11155. if (typeof upper == "boolean") {
  11156. floating = upper;
  11157. upper = undefined$1;
  11158. } else if (typeof lower == "boolean") {
  11159. floating = lower;
  11160. lower = undefined$1;
  11161. }
  11162. }
  11163. if (lower === undefined$1 && upper === undefined$1) {
  11164. lower = 0;
  11165. upper = 1;
  11166. } else {
  11167. lower = toFinite(lower);
  11168. if (upper === undefined$1) {
  11169. upper = lower;
  11170. lower = 0;
  11171. } else {
  11172. upper = toFinite(upper);
  11173. }
  11174. }
  11175. if (lower > upper) {
  11176. var temp = lower;
  11177. lower = upper;
  11178. upper = temp;
  11179. }
  11180. if (floating || lower % 1 || upper % 1) {
  11181. var rand = nativeRandom();
  11182. return nativeMin(lower + rand * (upper - lower + freeParseFloat("1e-" + ((rand + "").length - 1))), upper);
  11183. }
  11184. return baseRandom(lower, upper);
  11185. }
  11186. var camelCase = createCompounder(function(result2, word, index) {
  11187. word = word.toLowerCase();
  11188. return result2 + (index ? capitalize(word) : word);
  11189. });
  11190. function capitalize(string) {
  11191. return upperFirst(toString(string).toLowerCase());
  11192. }
  11193. function deburr(string) {
  11194. string = toString(string);
  11195. return string && string.replace(reLatin, deburrLetter).replace(reComboMark, "");
  11196. }
  11197. function endsWith(string, target, position) {
  11198. string = toString(string);
  11199. target = baseToString(target);
  11200. var length = string.length;
  11201. position = position === undefined$1 ? length : baseClamp(toInteger(position), 0, length);
  11202. var end = position;
  11203. position -= target.length;
  11204. return position >= 0 && string.slice(position, end) == target;
  11205. }
  11206. function escape(string) {
  11207. string = toString(string);
  11208. return string && reHasUnescapedHtml.test(string) ? string.replace(reUnescapedHtml, escapeHtmlChar) : string;
  11209. }
  11210. function escapeRegExp(string) {
  11211. string = toString(string);
  11212. return string && reHasRegExpChar.test(string) ? string.replace(reRegExpChar, "\\$&") : string;
  11213. }
  11214. var kebabCase = createCompounder(function(result2, word, index) {
  11215. return result2 + (index ? "-" : "") + word.toLowerCase();
  11216. });
  11217. var lowerCase = createCompounder(function(result2, word, index) {
  11218. return result2 + (index ? " " : "") + word.toLowerCase();
  11219. });
  11220. var lowerFirst = createCaseFirst("toLowerCase");
  11221. function pad(string, length, chars) {
  11222. string = toString(string);
  11223. length = toInteger(length);
  11224. var strLength = length ? stringSize(string) : 0;
  11225. if (!length || strLength >= length) {
  11226. return string;
  11227. }
  11228. var mid = (length - strLength) / 2;
  11229. return createPadding(nativeFloor(mid), chars) + string + createPadding(nativeCeil(mid), chars);
  11230. }
  11231. function padEnd(string, length, chars) {
  11232. string = toString(string);
  11233. length = toInteger(length);
  11234. var strLength = length ? stringSize(string) : 0;
  11235. return length && strLength < length ? string + createPadding(length - strLength, chars) : string;
  11236. }
  11237. function padStart(string, length, chars) {
  11238. string = toString(string);
  11239. length = toInteger(length);
  11240. var strLength = length ? stringSize(string) : 0;
  11241. return length && strLength < length ? createPadding(length - strLength, chars) + string : string;
  11242. }
  11243. function parseInt2(string, radix, guard) {
  11244. if (guard || radix == null) {
  11245. radix = 0;
  11246. } else if (radix) {
  11247. radix = +radix;
  11248. }
  11249. return nativeParseInt(toString(string).replace(reTrimStart, ""), radix || 0);
  11250. }
  11251. function repeat(string, n, guard) {
  11252. if (guard ? isIterateeCall(string, n, guard) : n === undefined$1) {
  11253. n = 1;
  11254. } else {
  11255. n = toInteger(n);
  11256. }
  11257. return baseRepeat(toString(string), n);
  11258. }
  11259. function replace() {
  11260. var args = arguments, string = toString(args[0]);
  11261. return args.length < 3 ? string : string.replace(args[1], args[2]);
  11262. }
  11263. var snakeCase = createCompounder(function(result2, word, index) {
  11264. return result2 + (index ? "_" : "") + word.toLowerCase();
  11265. });
  11266. function split(string, separator, limit) {
  11267. if (limit && typeof limit != "number" && isIterateeCall(string, separator, limit)) {
  11268. separator = limit = undefined$1;
  11269. }
  11270. limit = limit === undefined$1 ? MAX_ARRAY_LENGTH : limit >>> 0;
  11271. if (!limit) {
  11272. return [];
  11273. }
  11274. string = toString(string);
  11275. if (string && (typeof separator == "string" || separator != null && !isRegExp(separator))) {
  11276. separator = baseToString(separator);
  11277. if (!separator && hasUnicode(string)) {
  11278. return castSlice(stringToArray(string), 0, limit);
  11279. }
  11280. }
  11281. return string.split(separator, limit);
  11282. }
  11283. var startCase = createCompounder(function(result2, word, index) {
  11284. return result2 + (index ? " " : "") + upperFirst(word);
  11285. });
  11286. function startsWith(string, target, position) {
  11287. string = toString(string);
  11288. position = position == null ? 0 : baseClamp(toInteger(position), 0, string.length);
  11289. target = baseToString(target);
  11290. return string.slice(position, position + target.length) == target;
  11291. }
  11292. function template(string, options, guard) {
  11293. var settings = lodash2.templateSettings;
  11294. if (guard && isIterateeCall(string, options, guard)) {
  11295. options = undefined$1;
  11296. }
  11297. string = toString(string);
  11298. options = assignInWith({}, options, settings, customDefaultsAssignIn);
  11299. var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn), importsKeys = keys(imports), importsValues = baseValues(imports, importsKeys);
  11300. var isEscaping, isEvaluating, index = 0, interpolate = options.interpolate || reNoMatch, source = "__p += '";
  11301. var reDelimiters = RegExp2(
  11302. (options.escape || reNoMatch).source + "|" + interpolate.source + "|" + (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + "|" + (options.evaluate || reNoMatch).source + "|$",
  11303. "g"
  11304. );
  11305. var sourceURL = "//# sourceURL=" + (hasOwnProperty.call(options, "sourceURL") ? (options.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++templateCounter + "]") + "\n";
  11306. string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
  11307. interpolateValue || (interpolateValue = esTemplateValue);
  11308. source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
  11309. if (escapeValue) {
  11310. isEscaping = true;
  11311. source += "' +\n__e(" + escapeValue + ") +\n'";
  11312. }
  11313. if (evaluateValue) {
  11314. isEvaluating = true;
  11315. source += "';\n" + evaluateValue + ";\n__p += '";
  11316. }
  11317. if (interpolateValue) {
  11318. source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
  11319. }
  11320. index = offset + match.length;
  11321. return match;
  11322. });
  11323. source += "';\n";
  11324. var variable = hasOwnProperty.call(options, "variable") && options.variable;
  11325. if (!variable) {
  11326. source = "with (obj) {\n" + source + "\n}\n";
  11327. } else if (reForbiddenIdentifierChars.test(variable)) {
  11328. throw new Error2(INVALID_TEMPL_VAR_ERROR_TEXT);
  11329. }
  11330. source = (isEvaluating ? source.replace(reEmptyStringLeading, "") : source).replace(reEmptyStringMiddle, "$1").replace(reEmptyStringTrailing, "$1;");
  11331. 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}";
  11332. var result2 = attempt(function() {
  11333. return Function2(importsKeys, sourceURL + "return " + source).apply(undefined$1, importsValues);
  11334. });
  11335. result2.source = source;
  11336. if (isError(result2)) {
  11337. throw result2;
  11338. }
  11339. return result2;
  11340. }
  11341. function toLower(value) {
  11342. return toString(value).toLowerCase();
  11343. }
  11344. function toUpper(value) {
  11345. return toString(value).toUpperCase();
  11346. }
  11347. function trim(string, chars, guard) {
  11348. string = toString(string);
  11349. if (string && (guard || chars === undefined$1)) {
  11350. return baseTrim(string);
  11351. }
  11352. if (!string || !(chars = baseToString(chars))) {
  11353. return string;
  11354. }
  11355. var strSymbols = stringToArray(string), chrSymbols = stringToArray(chars), start = charsStartIndex(strSymbols, chrSymbols), end = charsEndIndex(strSymbols, chrSymbols) + 1;
  11356. return castSlice(strSymbols, start, end).join("");
  11357. }
  11358. function trimEnd(string, chars, guard) {
  11359. string = toString(string);
  11360. if (string && (guard || chars === undefined$1)) {
  11361. return string.slice(0, trimmedEndIndex(string) + 1);
  11362. }
  11363. if (!string || !(chars = baseToString(chars))) {
  11364. return string;
  11365. }
  11366. var strSymbols = stringToArray(string), end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
  11367. return castSlice(strSymbols, 0, end).join("");
  11368. }
  11369. function trimStart(string, chars, guard) {
  11370. string = toString(string);
  11371. if (string && (guard || chars === undefined$1)) {
  11372. return string.replace(reTrimStart, "");
  11373. }
  11374. if (!string || !(chars = baseToString(chars))) {
  11375. return string;
  11376. }
  11377. var strSymbols = stringToArray(string), start = charsStartIndex(strSymbols, stringToArray(chars));
  11378. return castSlice(strSymbols, start).join("");
  11379. }
  11380. function truncate(string, options) {
  11381. var length = DEFAULT_TRUNC_LENGTH, omission = DEFAULT_TRUNC_OMISSION;
  11382. if (isObject(options)) {
  11383. var separator = "separator" in options ? options.separator : separator;
  11384. length = "length" in options ? toInteger(options.length) : length;
  11385. omission = "omission" in options ? baseToString(options.omission) : omission;
  11386. }
  11387. string = toString(string);
  11388. var strLength = string.length;
  11389. if (hasUnicode(string)) {
  11390. var strSymbols = stringToArray(string);
  11391. strLength = strSymbols.length;
  11392. }
  11393. if (length >= strLength) {
  11394. return string;
  11395. }
  11396. var end = length - stringSize(omission);
  11397. if (end < 1) {
  11398. return omission;
  11399. }
  11400. var result2 = strSymbols ? castSlice(strSymbols, 0, end).join("") : string.slice(0, end);
  11401. if (separator === undefined$1) {
  11402. return result2 + omission;
  11403. }
  11404. if (strSymbols) {
  11405. end += result2.length - end;
  11406. }
  11407. if (isRegExp(separator)) {
  11408. if (string.slice(end).search(separator)) {
  11409. var match, substring = result2;
  11410. if (!separator.global) {
  11411. separator = RegExp2(separator.source, toString(reFlags.exec(separator)) + "g");
  11412. }
  11413. separator.lastIndex = 0;
  11414. while (match = separator.exec(substring)) {
  11415. var newEnd = match.index;
  11416. }
  11417. result2 = result2.slice(0, newEnd === undefined$1 ? end : newEnd);
  11418. }
  11419. } else if (string.indexOf(baseToString(separator), end) != end) {
  11420. var index = result2.lastIndexOf(separator);
  11421. if (index > -1) {
  11422. result2 = result2.slice(0, index);
  11423. }
  11424. }
  11425. return result2 + omission;
  11426. }
  11427. function unescape(string) {
  11428. string = toString(string);
  11429. return string && reHasEscapedHtml.test(string) ? string.replace(reEscapedHtml, unescapeHtmlChar) : string;
  11430. }
  11431. var upperCase = createCompounder(function(result2, word, index) {
  11432. return result2 + (index ? " " : "") + word.toUpperCase();
  11433. });
  11434. var upperFirst = createCaseFirst("toUpperCase");
  11435. function words(string, pattern, guard) {
  11436. string = toString(string);
  11437. pattern = guard ? undefined$1 : pattern;
  11438. if (pattern === undefined$1) {
  11439. return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
  11440. }
  11441. return string.match(pattern) || [];
  11442. }
  11443. var attempt = baseRest(function(func, args) {
  11444. try {
  11445. return apply(func, undefined$1, args);
  11446. } catch (e) {
  11447. return isError(e) ? e : new Error2(e);
  11448. }
  11449. });
  11450. var bindAll = flatRest(function(object, methodNames) {
  11451. arrayEach(methodNames, function(key) {
  11452. key = toKey(key);
  11453. baseAssignValue(object, key, bind(object[key], object));
  11454. });
  11455. return object;
  11456. });
  11457. function cond(pairs) {
  11458. var length = pairs == null ? 0 : pairs.length, toIteratee = getIteratee();
  11459. pairs = !length ? [] : arrayMap(pairs, function(pair) {
  11460. if (typeof pair[1] != "function") {
  11461. throw new TypeError2(FUNC_ERROR_TEXT);
  11462. }
  11463. return [toIteratee(pair[0]), pair[1]];
  11464. });
  11465. return baseRest(function(args) {
  11466. var index = -1;
  11467. while (++index < length) {
  11468. var pair = pairs[index];
  11469. if (apply(pair[0], this, args)) {
  11470. return apply(pair[1], this, args);
  11471. }
  11472. }
  11473. });
  11474. }
  11475. function conforms(source) {
  11476. return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
  11477. }
  11478. function constant(value) {
  11479. return function() {
  11480. return value;
  11481. };
  11482. }
  11483. function defaultTo(value, defaultValue) {
  11484. return value == null || value !== value ? defaultValue : value;
  11485. }
  11486. var flow = createFlow();
  11487. var flowRight = createFlow(true);
  11488. function identity(value) {
  11489. return value;
  11490. }
  11491. function iteratee(func) {
  11492. return baseIteratee(typeof func == "function" ? func : baseClone(func, CLONE_DEEP_FLAG));
  11493. }
  11494. function matches(source) {
  11495. return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
  11496. }
  11497. function matchesProperty(path, srcValue) {
  11498. return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
  11499. }
  11500. var method = baseRest(function(path, args) {
  11501. return function(object) {
  11502. return baseInvoke(object, path, args);
  11503. };
  11504. });
  11505. var methodOf = baseRest(function(object, args) {
  11506. return function(path) {
  11507. return baseInvoke(object, path, args);
  11508. };
  11509. });
  11510. function mixin(object, source, options) {
  11511. var props = keys(source), methodNames = baseFunctions(source, props);
  11512. if (options == null && !(isObject(source) && (methodNames.length || !props.length))) {
  11513. options = source;
  11514. source = object;
  11515. object = this;
  11516. methodNames = baseFunctions(source, keys(source));
  11517. }
  11518. var chain2 = !(isObject(options) && "chain" in options) || !!options.chain, isFunc = isFunction(object);
  11519. arrayEach(methodNames, function(methodName) {
  11520. var func = source[methodName];
  11521. object[methodName] = func;
  11522. if (isFunc) {
  11523. object.prototype[methodName] = function() {
  11524. var chainAll = this.__chain__;
  11525. if (chain2 || chainAll) {
  11526. var result2 = object(this.__wrapped__), actions = result2.__actions__ = copyArray(this.__actions__);
  11527. actions.push({ "func": func, "args": arguments, "thisArg": object });
  11528. result2.__chain__ = chainAll;
  11529. return result2;
  11530. }
  11531. return func.apply(object, arrayPush([this.value()], arguments));
  11532. };
  11533. }
  11534. });
  11535. return object;
  11536. }
  11537. function noConflict() {
  11538. if (root._ === this) {
  11539. root._ = oldDash;
  11540. }
  11541. return this;
  11542. }
  11543. function noop() {
  11544. }
  11545. function nthArg(n) {
  11546. n = toInteger(n);
  11547. return baseRest(function(args) {
  11548. return baseNth(args, n);
  11549. });
  11550. }
  11551. var over = createOver(arrayMap);
  11552. var overEvery = createOver(arrayEvery);
  11553. var overSome = createOver(arraySome);
  11554. function property(path) {
  11555. return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
  11556. }
  11557. function propertyOf(object) {
  11558. return function(path) {
  11559. return object == null ? undefined$1 : baseGet(object, path);
  11560. };
  11561. }
  11562. var range = createRange();
  11563. var rangeRight = createRange(true);
  11564. function stubArray() {
  11565. return [];
  11566. }
  11567. function stubFalse() {
  11568. return false;
  11569. }
  11570. function stubObject() {
  11571. return {};
  11572. }
  11573. function stubString() {
  11574. return "";
  11575. }
  11576. function stubTrue() {
  11577. return true;
  11578. }
  11579. function times(n, iteratee2) {
  11580. n = toInteger(n);
  11581. if (n < 1 || n > MAX_SAFE_INTEGER) {
  11582. return [];
  11583. }
  11584. var index = MAX_ARRAY_LENGTH, length = nativeMin(n, MAX_ARRAY_LENGTH);
  11585. iteratee2 = getIteratee(iteratee2);
  11586. n -= MAX_ARRAY_LENGTH;
  11587. var result2 = baseTimes(length, iteratee2);
  11588. while (++index < n) {
  11589. iteratee2(index);
  11590. }
  11591. return result2;
  11592. }
  11593. function toPath(value) {
  11594. if (isArray(value)) {
  11595. return arrayMap(value, toKey);
  11596. }
  11597. return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
  11598. }
  11599. function uniqueId(prefix) {
  11600. var id = ++idCounter;
  11601. return toString(prefix) + id;
  11602. }
  11603. var add = createMathOperation(function(augend, addend) {
  11604. return augend + addend;
  11605. }, 0);
  11606. var ceil = createRound("ceil");
  11607. var divide = createMathOperation(function(dividend, divisor) {
  11608. return dividend / divisor;
  11609. }, 1);
  11610. var floor = createRound("floor");
  11611. function max(array) {
  11612. return array && array.length ? baseExtremum(array, identity, baseGt) : undefined$1;
  11613. }
  11614. function maxBy(array, iteratee2) {
  11615. return array && array.length ? baseExtremum(array, getIteratee(iteratee2, 2), baseGt) : undefined$1;
  11616. }
  11617. function mean(array) {
  11618. return baseMean(array, identity);
  11619. }
  11620. function meanBy(array, iteratee2) {
  11621. return baseMean(array, getIteratee(iteratee2, 2));
  11622. }
  11623. function min(array) {
  11624. return array && array.length ? baseExtremum(array, identity, baseLt) : undefined$1;
  11625. }
  11626. function minBy(array, iteratee2) {
  11627. return array && array.length ? baseExtremum(array, getIteratee(iteratee2, 2), baseLt) : undefined$1;
  11628. }
  11629. var multiply = createMathOperation(function(multiplier, multiplicand) {
  11630. return multiplier * multiplicand;
  11631. }, 1);
  11632. var round = createRound("round");
  11633. var subtract = createMathOperation(function(minuend, subtrahend) {
  11634. return minuend - subtrahend;
  11635. }, 0);
  11636. function sum(array) {
  11637. return array && array.length ? baseSum(array, identity) : 0;
  11638. }
  11639. function sumBy(array, iteratee2) {
  11640. return array && array.length ? baseSum(array, getIteratee(iteratee2, 2)) : 0;
  11641. }
  11642. lodash2.after = after;
  11643. lodash2.ary = ary;
  11644. lodash2.assign = assign;
  11645. lodash2.assignIn = assignIn;
  11646. lodash2.assignInWith = assignInWith;
  11647. lodash2.assignWith = assignWith;
  11648. lodash2.at = at;
  11649. lodash2.before = before;
  11650. lodash2.bind = bind;
  11651. lodash2.bindAll = bindAll;
  11652. lodash2.bindKey = bindKey;
  11653. lodash2.castArray = castArray;
  11654. lodash2.chain = chain;
  11655. lodash2.chunk = chunk;
  11656. lodash2.compact = compact;
  11657. lodash2.concat = concat;
  11658. lodash2.cond = cond;
  11659. lodash2.conforms = conforms;
  11660. lodash2.constant = constant;
  11661. lodash2.countBy = countBy;
  11662. lodash2.create = create;
  11663. lodash2.curry = curry;
  11664. lodash2.curryRight = curryRight;
  11665. lodash2.debounce = debounce;
  11666. lodash2.defaults = defaults;
  11667. lodash2.defaultsDeep = defaultsDeep;
  11668. lodash2.defer = defer;
  11669. lodash2.delay = delay;
  11670. lodash2.difference = difference;
  11671. lodash2.differenceBy = differenceBy;
  11672. lodash2.differenceWith = differenceWith;
  11673. lodash2.drop = drop;
  11674. lodash2.dropRight = dropRight;
  11675. lodash2.dropRightWhile = dropRightWhile;
  11676. lodash2.dropWhile = dropWhile;
  11677. lodash2.fill = fill;
  11678. lodash2.filter = filter;
  11679. lodash2.flatMap = flatMap;
  11680. lodash2.flatMapDeep = flatMapDeep;
  11681. lodash2.flatMapDepth = flatMapDepth;
  11682. lodash2.flatten = flatten;
  11683. lodash2.flattenDeep = flattenDeep;
  11684. lodash2.flattenDepth = flattenDepth;
  11685. lodash2.flip = flip;
  11686. lodash2.flow = flow;
  11687. lodash2.flowRight = flowRight;
  11688. lodash2.fromPairs = fromPairs;
  11689. lodash2.functions = functions;
  11690. lodash2.functionsIn = functionsIn;
  11691. lodash2.groupBy = groupBy;
  11692. lodash2.initial = initial;
  11693. lodash2.intersection = intersection;
  11694. lodash2.intersectionBy = intersectionBy;
  11695. lodash2.intersectionWith = intersectionWith;
  11696. lodash2.invert = invert;
  11697. lodash2.invertBy = invertBy;
  11698. lodash2.invokeMap = invokeMap;
  11699. lodash2.iteratee = iteratee;
  11700. lodash2.keyBy = keyBy;
  11701. lodash2.keys = keys;
  11702. lodash2.keysIn = keysIn;
  11703. lodash2.map = map;
  11704. lodash2.mapKeys = mapKeys;
  11705. lodash2.mapValues = mapValues;
  11706. lodash2.matches = matches;
  11707. lodash2.matchesProperty = matchesProperty;
  11708. lodash2.memoize = memoize;
  11709. lodash2.merge = merge;
  11710. lodash2.mergeWith = mergeWith;
  11711. lodash2.method = method;
  11712. lodash2.methodOf = methodOf;
  11713. lodash2.mixin = mixin;
  11714. lodash2.negate = negate;
  11715. lodash2.nthArg = nthArg;
  11716. lodash2.omit = omit;
  11717. lodash2.omitBy = omitBy;
  11718. lodash2.once = once;
  11719. lodash2.orderBy = orderBy;
  11720. lodash2.over = over;
  11721. lodash2.overArgs = overArgs;
  11722. lodash2.overEvery = overEvery;
  11723. lodash2.overSome = overSome;
  11724. lodash2.partial = partial;
  11725. lodash2.partialRight = partialRight;
  11726. lodash2.partition = partition;
  11727. lodash2.pick = pick;
  11728. lodash2.pickBy = pickBy;
  11729. lodash2.property = property;
  11730. lodash2.propertyOf = propertyOf;
  11731. lodash2.pull = pull;
  11732. lodash2.pullAll = pullAll;
  11733. lodash2.pullAllBy = pullAllBy;
  11734. lodash2.pullAllWith = pullAllWith;
  11735. lodash2.pullAt = pullAt;
  11736. lodash2.range = range;
  11737. lodash2.rangeRight = rangeRight;
  11738. lodash2.rearg = rearg;
  11739. lodash2.reject = reject;
  11740. lodash2.remove = remove;
  11741. lodash2.rest = rest;
  11742. lodash2.reverse = reverse;
  11743. lodash2.sampleSize = sampleSize;
  11744. lodash2.set = set;
  11745. lodash2.setWith = setWith;
  11746. lodash2.shuffle = shuffle;
  11747. lodash2.slice = slice;
  11748. lodash2.sortBy = sortBy;
  11749. lodash2.sortedUniq = sortedUniq;
  11750. lodash2.sortedUniqBy = sortedUniqBy;
  11751. lodash2.split = split;
  11752. lodash2.spread = spread;
  11753. lodash2.tail = tail;
  11754. lodash2.take = take;
  11755. lodash2.takeRight = takeRight;
  11756. lodash2.takeRightWhile = takeRightWhile;
  11757. lodash2.takeWhile = takeWhile;
  11758. lodash2.tap = tap;
  11759. lodash2.throttle = throttle;
  11760. lodash2.thru = thru;
  11761. lodash2.toArray = toArray;
  11762. lodash2.toPairs = toPairs;
  11763. lodash2.toPairsIn = toPairsIn;
  11764. lodash2.toPath = toPath;
  11765. lodash2.toPlainObject = toPlainObject;
  11766. lodash2.transform = transform;
  11767. lodash2.unary = unary;
  11768. lodash2.union = union;
  11769. lodash2.unionBy = unionBy;
  11770. lodash2.unionWith = unionWith;
  11771. lodash2.uniq = uniq;
  11772. lodash2.uniqBy = uniqBy;
  11773. lodash2.uniqWith = uniqWith;
  11774. lodash2.unset = unset;
  11775. lodash2.unzip = unzip;
  11776. lodash2.unzipWith = unzipWith;
  11777. lodash2.update = update;
  11778. lodash2.updateWith = updateWith;
  11779. lodash2.values = values;
  11780. lodash2.valuesIn = valuesIn;
  11781. lodash2.without = without;
  11782. lodash2.words = words;
  11783. lodash2.wrap = wrap;
  11784. lodash2.xor = xor;
  11785. lodash2.xorBy = xorBy;
  11786. lodash2.xorWith = xorWith;
  11787. lodash2.zip = zip;
  11788. lodash2.zipObject = zipObject;
  11789. lodash2.zipObjectDeep = zipObjectDeep;
  11790. lodash2.zipWith = zipWith;
  11791. lodash2.entries = toPairs;
  11792. lodash2.entriesIn = toPairsIn;
  11793. lodash2.extend = assignIn;
  11794. lodash2.extendWith = assignInWith;
  11795. mixin(lodash2, lodash2);
  11796. lodash2.add = add;
  11797. lodash2.attempt = attempt;
  11798. lodash2.camelCase = camelCase;
  11799. lodash2.capitalize = capitalize;
  11800. lodash2.ceil = ceil;
  11801. lodash2.clamp = clamp;
  11802. lodash2.clone = clone;
  11803. lodash2.cloneDeep = cloneDeep;
  11804. lodash2.cloneDeepWith = cloneDeepWith;
  11805. lodash2.cloneWith = cloneWith;
  11806. lodash2.conformsTo = conformsTo;
  11807. lodash2.deburr = deburr;
  11808. lodash2.defaultTo = defaultTo;
  11809. lodash2.divide = divide;
  11810. lodash2.endsWith = endsWith;
  11811. lodash2.eq = eq;
  11812. lodash2.escape = escape;
  11813. lodash2.escapeRegExp = escapeRegExp;
  11814. lodash2.every = every;
  11815. lodash2.find = find;
  11816. lodash2.findIndex = findIndex;
  11817. lodash2.findKey = findKey;
  11818. lodash2.findLast = findLast;
  11819. lodash2.findLastIndex = findLastIndex;
  11820. lodash2.findLastKey = findLastKey;
  11821. lodash2.floor = floor;
  11822. lodash2.forEach = forEach;
  11823. lodash2.forEachRight = forEachRight;
  11824. lodash2.forIn = forIn;
  11825. lodash2.forInRight = forInRight;
  11826. lodash2.forOwn = forOwn;
  11827. lodash2.forOwnRight = forOwnRight;
  11828. lodash2.get = get;
  11829. lodash2.gt = gt;
  11830. lodash2.gte = gte;
  11831. lodash2.has = has;
  11832. lodash2.hasIn = hasIn;
  11833. lodash2.head = head;
  11834. lodash2.identity = identity;
  11835. lodash2.includes = includes;
  11836. lodash2.indexOf = indexOf;
  11837. lodash2.inRange = inRange;
  11838. lodash2.invoke = invoke;
  11839. lodash2.isArguments = isArguments;
  11840. lodash2.isArray = isArray;
  11841. lodash2.isArrayBuffer = isArrayBuffer;
  11842. lodash2.isArrayLike = isArrayLike;
  11843. lodash2.isArrayLikeObject = isArrayLikeObject;
  11844. lodash2.isBoolean = isBoolean;
  11845. lodash2.isBuffer = isBuffer;
  11846. lodash2.isDate = isDate;
  11847. lodash2.isElement = isElement;
  11848. lodash2.isEmpty = isEmpty;
  11849. lodash2.isEqual = isEqual;
  11850. lodash2.isEqualWith = isEqualWith;
  11851. lodash2.isError = isError;
  11852. lodash2.isFinite = isFinite2;
  11853. lodash2.isFunction = isFunction;
  11854. lodash2.isInteger = isInteger;
  11855. lodash2.isLength = isLength;
  11856. lodash2.isMap = isMap;
  11857. lodash2.isMatch = isMatch;
  11858. lodash2.isMatchWith = isMatchWith;
  11859. lodash2.isNaN = isNaN2;
  11860. lodash2.isNative = isNative;
  11861. lodash2.isNil = isNil;
  11862. lodash2.isNull = isNull;
  11863. lodash2.isNumber = isNumber;
  11864. lodash2.isObject = isObject;
  11865. lodash2.isObjectLike = isObjectLike;
  11866. lodash2.isPlainObject = isPlainObject;
  11867. lodash2.isRegExp = isRegExp;
  11868. lodash2.isSafeInteger = isSafeInteger;
  11869. lodash2.isSet = isSet;
  11870. lodash2.isString = isString;
  11871. lodash2.isSymbol = isSymbol;
  11872. lodash2.isTypedArray = isTypedArray;
  11873. lodash2.isUndefined = isUndefined;
  11874. lodash2.isWeakMap = isWeakMap;
  11875. lodash2.isWeakSet = isWeakSet;
  11876. lodash2.join = join;
  11877. lodash2.kebabCase = kebabCase;
  11878. lodash2.last = last;
  11879. lodash2.lastIndexOf = lastIndexOf;
  11880. lodash2.lowerCase = lowerCase;
  11881. lodash2.lowerFirst = lowerFirst;
  11882. lodash2.lt = lt;
  11883. lodash2.lte = lte;
  11884. lodash2.max = max;
  11885. lodash2.maxBy = maxBy;
  11886. lodash2.mean = mean;
  11887. lodash2.meanBy = meanBy;
  11888. lodash2.min = min;
  11889. lodash2.minBy = minBy;
  11890. lodash2.stubArray = stubArray;
  11891. lodash2.stubFalse = stubFalse;
  11892. lodash2.stubObject = stubObject;
  11893. lodash2.stubString = stubString;
  11894. lodash2.stubTrue = stubTrue;
  11895. lodash2.multiply = multiply;
  11896. lodash2.nth = nth;
  11897. lodash2.noConflict = noConflict;
  11898. lodash2.noop = noop;
  11899. lodash2.now = now;
  11900. lodash2.pad = pad;
  11901. lodash2.padEnd = padEnd;
  11902. lodash2.padStart = padStart;
  11903. lodash2.parseInt = parseInt2;
  11904. lodash2.random = random;
  11905. lodash2.reduce = reduce;
  11906. lodash2.reduceRight = reduceRight;
  11907. lodash2.repeat = repeat;
  11908. lodash2.replace = replace;
  11909. lodash2.result = result;
  11910. lodash2.round = round;
  11911. lodash2.runInContext = runInContext2;
  11912. lodash2.sample = sample;
  11913. lodash2.size = size;
  11914. lodash2.snakeCase = snakeCase;
  11915. lodash2.some = some;
  11916. lodash2.sortedIndex = sortedIndex;
  11917. lodash2.sortedIndexBy = sortedIndexBy;
  11918. lodash2.sortedIndexOf = sortedIndexOf;
  11919. lodash2.sortedLastIndex = sortedLastIndex;
  11920. lodash2.sortedLastIndexBy = sortedLastIndexBy;
  11921. lodash2.sortedLastIndexOf = sortedLastIndexOf;
  11922. lodash2.startCase = startCase;
  11923. lodash2.startsWith = startsWith;
  11924. lodash2.subtract = subtract;
  11925. lodash2.sum = sum;
  11926. lodash2.sumBy = sumBy;
  11927. lodash2.template = template;
  11928. lodash2.times = times;
  11929. lodash2.toFinite = toFinite;
  11930. lodash2.toInteger = toInteger;
  11931. lodash2.toLength = toLength;
  11932. lodash2.toLower = toLower;
  11933. lodash2.toNumber = toNumber;
  11934. lodash2.toSafeInteger = toSafeInteger;
  11935. lodash2.toString = toString;
  11936. lodash2.toUpper = toUpper;
  11937. lodash2.trim = trim;
  11938. lodash2.trimEnd = trimEnd;
  11939. lodash2.trimStart = trimStart;
  11940. lodash2.truncate = truncate;
  11941. lodash2.unescape = unescape;
  11942. lodash2.uniqueId = uniqueId;
  11943. lodash2.upperCase = upperCase;
  11944. lodash2.upperFirst = upperFirst;
  11945. lodash2.each = forEach;
  11946. lodash2.eachRight = forEachRight;
  11947. lodash2.first = head;
  11948. mixin(lodash2, function() {
  11949. var source = {};
  11950. baseForOwn(lodash2, function(func, methodName) {
  11951. if (!hasOwnProperty.call(lodash2.prototype, methodName)) {
  11952. source[methodName] = func;
  11953. }
  11954. });
  11955. return source;
  11956. }(), { "chain": false });
  11957. lodash2.VERSION = VERSION;
  11958. arrayEach(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(methodName) {
  11959. lodash2[methodName].placeholder = lodash2;
  11960. });
  11961. arrayEach(["drop", "take"], function(methodName, index) {
  11962. LazyWrapper.prototype[methodName] = function(n) {
  11963. n = n === undefined$1 ? 1 : nativeMax(toInteger(n), 0);
  11964. var result2 = this.__filtered__ && !index ? new LazyWrapper(this) : this.clone();
  11965. if (result2.__filtered__) {
  11966. result2.__takeCount__ = nativeMin(n, result2.__takeCount__);
  11967. } else {
  11968. result2.__views__.push({
  11969. "size": nativeMin(n, MAX_ARRAY_LENGTH),
  11970. "type": methodName + (result2.__dir__ < 0 ? "Right" : "")
  11971. });
  11972. }
  11973. return result2;
  11974. };
  11975. LazyWrapper.prototype[methodName + "Right"] = function(n) {
  11976. return this.reverse()[methodName](n).reverse();
  11977. };
  11978. });
  11979. arrayEach(["filter", "map", "takeWhile"], function(methodName, index) {
  11980. var type = index + 1, isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
  11981. LazyWrapper.prototype[methodName] = function(iteratee2) {
  11982. var result2 = this.clone();
  11983. result2.__iteratees__.push({
  11984. "iteratee": getIteratee(iteratee2, 3),
  11985. "type": type
  11986. });
  11987. result2.__filtered__ = result2.__filtered__ || isFilter;
  11988. return result2;
  11989. };
  11990. });
  11991. arrayEach(["head", "last"], function(methodName, index) {
  11992. var takeName = "take" + (index ? "Right" : "");
  11993. LazyWrapper.prototype[methodName] = function() {
  11994. return this[takeName](1).value()[0];
  11995. };
  11996. });
  11997. arrayEach(["initial", "tail"], function(methodName, index) {
  11998. var dropName = "drop" + (index ? "" : "Right");
  11999. LazyWrapper.prototype[methodName] = function() {
  12000. return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
  12001. };
  12002. });
  12003. LazyWrapper.prototype.compact = function() {
  12004. return this.filter(identity);
  12005. };
  12006. LazyWrapper.prototype.find = function(predicate) {
  12007. return this.filter(predicate).head();
  12008. };
  12009. LazyWrapper.prototype.findLast = function(predicate) {
  12010. return this.reverse().find(predicate);
  12011. };
  12012. LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
  12013. if (typeof path == "function") {
  12014. return new LazyWrapper(this);
  12015. }
  12016. return this.map(function(value) {
  12017. return baseInvoke(value, path, args);
  12018. });
  12019. });
  12020. LazyWrapper.prototype.reject = function(predicate) {
  12021. return this.filter(negate(getIteratee(predicate)));
  12022. };
  12023. LazyWrapper.prototype.slice = function(start, end) {
  12024. start = toInteger(start);
  12025. var result2 = this;
  12026. if (result2.__filtered__ && (start > 0 || end < 0)) {
  12027. return new LazyWrapper(result2);
  12028. }
  12029. if (start < 0) {
  12030. result2 = result2.takeRight(-start);
  12031. } else if (start) {
  12032. result2 = result2.drop(start);
  12033. }
  12034. if (end !== undefined$1) {
  12035. end = toInteger(end);
  12036. result2 = end < 0 ? result2.dropRight(-end) : result2.take(end - start);
  12037. }
  12038. return result2;
  12039. };
  12040. LazyWrapper.prototype.takeRightWhile = function(predicate) {
  12041. return this.reverse().takeWhile(predicate).reverse();
  12042. };
  12043. LazyWrapper.prototype.toArray = function() {
  12044. return this.take(MAX_ARRAY_LENGTH);
  12045. };
  12046. baseForOwn(LazyWrapper.prototype, function(func, methodName) {
  12047. var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName), isTaker = /^(?:head|last)$/.test(methodName), lodashFunc = lodash2[isTaker ? "take" + (methodName == "last" ? "Right" : "") : methodName], retUnwrapped = isTaker || /^find/.test(methodName);
  12048. if (!lodashFunc) {
  12049. return;
  12050. }
  12051. lodash2.prototype[methodName] = function() {
  12052. var value = this.__wrapped__, args = isTaker ? [1] : arguments, isLazy = value instanceof LazyWrapper, iteratee2 = args[0], useLazy = isLazy || isArray(value);
  12053. var interceptor = function(value2) {
  12054. var result3 = lodashFunc.apply(lodash2, arrayPush([value2], args));
  12055. return isTaker && chainAll ? result3[0] : result3;
  12056. };
  12057. if (useLazy && checkIteratee && typeof iteratee2 == "function" && iteratee2.length != 1) {
  12058. isLazy = useLazy = false;
  12059. }
  12060. var chainAll = this.__chain__, isHybrid = !!this.__actions__.length, isUnwrapped = retUnwrapped && !chainAll, onlyLazy = isLazy && !isHybrid;
  12061. if (!retUnwrapped && useLazy) {
  12062. value = onlyLazy ? value : new LazyWrapper(this);
  12063. var result2 = func.apply(value, args);
  12064. result2.__actions__.push({ "func": thru, "args": [interceptor], "thisArg": undefined$1 });
  12065. return new LodashWrapper(result2, chainAll);
  12066. }
  12067. if (isUnwrapped && onlyLazy) {
  12068. return func.apply(this, args);
  12069. }
  12070. result2 = this.thru(interceptor);
  12071. return isUnwrapped ? isTaker ? result2.value()[0] : result2.value() : result2;
  12072. };
  12073. });
  12074. arrayEach(["pop", "push", "shift", "sort", "splice", "unshift"], function(methodName) {
  12075. var func = arrayProto[methodName], chainName = /^(?:push|sort|unshift)$/.test(methodName) ? "tap" : "thru", retUnwrapped = /^(?:pop|shift)$/.test(methodName);
  12076. lodash2.prototype[methodName] = function() {
  12077. var args = arguments;
  12078. if (retUnwrapped && !this.__chain__) {
  12079. var value = this.value();
  12080. return func.apply(isArray(value) ? value : [], args);
  12081. }
  12082. return this[chainName](function(value2) {
  12083. return func.apply(isArray(value2) ? value2 : [], args);
  12084. });
  12085. };
  12086. });
  12087. baseForOwn(LazyWrapper.prototype, function(func, methodName) {
  12088. var lodashFunc = lodash2[methodName];
  12089. if (lodashFunc) {
  12090. var key = lodashFunc.name + "";
  12091. if (!hasOwnProperty.call(realNames, key)) {
  12092. realNames[key] = [];
  12093. }
  12094. realNames[key].push({ "name": methodName, "func": lodashFunc });
  12095. }
  12096. });
  12097. realNames[createHybrid(undefined$1, WRAP_BIND_KEY_FLAG).name] = [{
  12098. "name": "wrapper",
  12099. "func": undefined$1
  12100. }];
  12101. LazyWrapper.prototype.clone = lazyClone;
  12102. LazyWrapper.prototype.reverse = lazyReverse;
  12103. LazyWrapper.prototype.value = lazyValue;
  12104. lodash2.prototype.at = wrapperAt;
  12105. lodash2.prototype.chain = wrapperChain;
  12106. lodash2.prototype.commit = wrapperCommit;
  12107. lodash2.prototype.next = wrapperNext;
  12108. lodash2.prototype.plant = wrapperPlant;
  12109. lodash2.prototype.reverse = wrapperReverse;
  12110. lodash2.prototype.toJSON = lodash2.prototype.valueOf = lodash2.prototype.value = wrapperValue;
  12111. lodash2.prototype.first = lodash2.prototype.head;
  12112. if (symIterator) {
  12113. lodash2.prototype[symIterator] = wrapperToIterator;
  12114. }
  12115. return lodash2;
  12116. };
  12117. var _ = runInContext();
  12118. if (freeModule) {
  12119. (freeModule.exports = _)._ = _;
  12120. freeExports._ = _;
  12121. } else {
  12122. root._ = _;
  12123. }
  12124. }).call(commonjsGlobal);
  12125. })(lodash, lodash.exports);
  12126. var lodashExports = lodash.exports;
  12127. class ListRuleB extends RuleBaseInterface {
  12128. constructor(config = {}) {
  12129. super();
  12130. __publicField(this, "config", {
  12131. onlyTodayData: false,
  12132. // 是否只保留当天的数据
  12133. defaultContainerSelector: "body",
  12134. defaultContainer: document.body
  12135. });
  12136. // 寻找父级列表时,找寻的最大级数
  12137. __publicField(this, "findParentsMaxDeep", 5);
  12138. if (config) {
  12139. Object.assign(this.config, config);
  12140. if (config.defaultContainerSelector) {
  12141. const wrapper = document.querySelector(config.defaultContainerSelector);
  12142. if (wrapper) {
  12143. this.config.defaultContainer = wrapper;
  12144. }
  12145. }
  12146. }
  12147. }
  12148. // 主函数:处理DOM并返回所需信息
  12149. run(container = this.config.defaultContainer) {
  12150. container = container || this.config.defaultContainer;
  12151. if (typeof container === "string") {
  12152. container = document.querySelector(container);
  12153. }
  12154. const { onlyTodayData } = this.config;
  12155. const eligibleNodes = this.findEligibleLeafNodesForContentLtMark(container);
  12156. const findResultNodeList = this.findResultNodeList(eligibleNodes);
  12157. const resultNode = findResultNodeList.filter((temp) => {
  12158. return temp.length > 0;
  12159. });
  12160. const { resultList, todayList, listSelector } = this.calcResultList(resultNode);
  12161. const result = {
  12162. todayHasData: todayList.length > 0,
  12163. todayData: onlyTodayData ? todayList : resultList,
  12164. listSelector
  12165. };
  12166. this.report(result);
  12167. console.log(result, todayList);
  12168. return result;
  12169. }
  12170. check() {
  12171. }
  12172. // 节点过滤
  12173. findResultNodeList(eligibleNodes = []) {
  12174. eligibleNodes.forEach((node, index) => {
  12175. node._index_find = index;
  12176. });
  12177. const groupedNodes = this.groupNodes(eligibleNodes);
  12178. const needNodes = this.checkNeedGroupNode(groupedNodes);
  12179. const correctedNodes = this.checkNodeCountCorrect(needNodes);
  12180. const nodeInfoList = this.calcNodesInfo(correctedNodes);
  12181. return nodeInfoList;
  12182. }
  12183. calcNodesInfo(list = []) {
  12184. const result = list.map((group) => {
  12185. const parentSelector = this.generateCSSSelector(group[0]._listItem);
  12186. const hasDateNode = group.filter((gChildren) => {
  12187. const arr = this.hasDateElement(gChildren._listItem);
  12188. return arr.some((item) => item.hasDate);
  12189. });
  12190. const dateElementSelector = hasDateNode.map((item) => {
  12191. const date = this.hasDateElement(item._listItem).filter((temp) => {
  12192. return temp.hasDate;
  12193. });
  12194. return {
  12195. ...item,
  12196. dateArr: date
  12197. };
  12198. });
  12199. const formatted = dateElementSelector.map((nodeObj) => {
  12200. nodeObj.selector = this.generateCSSSelector(nodeObj.node);
  12201. const href = this.getNodeHref(nodeObj);
  12202. return {
  12203. text: nodeObj.text,
  12204. date: nodeObj.dateArr[0].date,
  12205. selector: nodeObj.selector,
  12206. href,
  12207. listSelector: this.generateCSSSelector(nodeObj._list),
  12208. parentSelector,
  12209. // 后续排序索引
  12210. _index_find: nodeObj._index_find,
  12211. _index_in_list: this.$(nodeObj._listItem).index()
  12212. };
  12213. });
  12214. return formatted;
  12215. });
  12216. return result;
  12217. }
  12218. getNodeHref(node) {
  12219. var _a;
  12220. let href = "";
  12221. if (node._listItem) {
  12222. const $listItem = this.$(node._listItem);
  12223. const $a = $listItem.find("a[href]");
  12224. href = (_a = $a[0]) == null ? void 0 : _a.href;
  12225. }
  12226. return href;
  12227. }
  12228. todayDateTest(text = "") {
  12229. let pass = false;
  12230. if (!text)
  12231. return pass;
  12232. const nowDayRegList = this.getTodayDateReg();
  12233. for (let i = 0; i < nowDayRegList.length; i++) {
  12234. const item = nowDayRegList[i];
  12235. if (item.test(text)) {
  12236. pass = true;
  12237. break;
  12238. }
  12239. }
  12240. return pass;
  12241. }
  12242. calcResultList(resultNode = []) {
  12243. const todayList = [];
  12244. const resultList = resultNode.flat();
  12245. let calcSortKey = "_index_find";
  12246. if (resultList[0] && resultList[0]._index_in_list) {
  12247. const _index_in_list = resultList[0]._index_in_list;
  12248. if (_index_in_list !== -1) {
  12249. calcSortKey = "_index_in_list";
  12250. }
  12251. }
  12252. const sortedResultList = resultList.sort((a, b) => a[calcSortKey] - b[calcSortKey]);
  12253. sortedResultList.forEach((r2) => {
  12254. const dateArr = r2.date;
  12255. delete r2._index_find;
  12256. delete r2._index_in_list;
  12257. if (Array.isArray(dateArr)) {
  12258. for (let i = 0; i < dateArr.length; i++) {
  12259. const item = dateArr[i];
  12260. const today = this.todayDateTest(item);
  12261. if (today) {
  12262. todayList.push(r2);
  12263. break;
  12264. }
  12265. }
  12266. }
  12267. });
  12268. const r = {
  12269. resultList: sortedResultList,
  12270. todayList
  12271. };
  12272. if (Array.isArray(resultList) && resultList.length > 0) {
  12273. const target = resultList[0];
  12274. if (target) {
  12275. r.listSelector = target == null ? void 0 : target.listSelector;
  12276. }
  12277. }
  12278. return r;
  12279. }
  12280. // 辅助函数:遍历DOM节点,查找符合条件的末级节点
  12281. findEligibleLeafNodesForContentLtMark(node) {
  12282. return this.findEligibleLeafNodes(node, (node2) => {
  12283. const chineseChars = this.countChineseCharacters((node2 == null ? void 0 : node2.textContent) || "");
  12284. return chineseChars >= this.minTitleLength && !this.checkNodeHidden(node2);
  12285. });
  12286. }
  12287. // 辅助函数:根据父节点对末级节点进行分组
  12288. groupNodes(nodes) {
  12289. this.findTableInPage();
  12290. let result = this.groupNodesBySiblings(nodes);
  12291. if (this.checkNeedGroupNode(result).length <= 0) {
  12292. result = this.groupNodesByParent(nodes);
  12293. }
  12294. return result;
  12295. }
  12296. findTableInPage() {
  12297. const step = 3;
  12298. const table = this.$("table");
  12299. if (table.length > 0) {
  12300. this.findParentsMaxDeep += step;
  12301. }
  12302. }
  12303. // 保留元素个数在5个以上的分组
  12304. checkNeedGroupNode(list) {
  12305. const s = list.filter((group) => group.length > 5);
  12306. return s;
  12307. }
  12308. // 分组函数(以nodesItem中的某个值为id进行分组)
  12309. groupedListByList(nodes, key = "_list") {
  12310. const groupArr = [];
  12311. nodes.forEach((nodeObj) => {
  12312. const target = groupArr.find((g) => g.id === nodeObj[key]);
  12313. if (target && Array.isArray(target.list)) {
  12314. target.list.push(nodeObj);
  12315. } else {
  12316. groupArr.push({
  12317. id: nodeObj[key],
  12318. list: [nodeObj]
  12319. });
  12320. }
  12321. });
  12322. const sortedArr = [];
  12323. groupArr.forEach((g) => {
  12324. if (Array.isArray(g.list) && g.list.length > 0) {
  12325. sortedArr.push(g.list);
  12326. }
  12327. });
  12328. return sortedArr;
  12329. }
  12330. groupNodesBySiblings(nodes) {
  12331. nodes.forEach((node) => {
  12332. var _a;
  12333. const {
  12334. parentNodeArr,
  12335. // parentSiblingsCountArr,
  12336. parentSiblingsWeightArr
  12337. } = this.getNodeParentsSiblingsArr(node.node);
  12338. const targetArr = parentSiblingsWeightArr;
  12339. const maxSiblingCount = getMaxCount(targetArr);
  12340. const maxIndex = targetArr.indexOf(maxSiblingCount);
  12341. node._listItem = parentNodeArr[maxIndex];
  12342. node._list = (_a = node._listItem) == null ? void 0 : _a.parentNode;
  12343. node.weight = this.calcWeight(node);
  12344. });
  12345. const grouped1 = this.groupedListByList(nodes);
  12346. return grouped1;
  12347. }
  12348. createGroupId(node) {
  12349. var _a, _b;
  12350. if (node._list) {
  12351. const pClassNameStr = (_a = node._list) == null ? void 0 : _a.className;
  12352. const listItemClassNameStr = (_b = node._listItem) == null ? void 0 : _b.className;
  12353. node._groupId = `${this.getTagName(node._list)}__${pClassNameStr}__${this.getTagName(node.node)}__${listItemClassNameStr}`;
  12354. } else {
  12355. node._groupId = node._list;
  12356. }
  12357. }
  12358. // 列表根据元素标签,元素className进行分类。
  12359. calcClassifyNode(nodeList = []) {
  12360. if (!Array.isArray(nodeList))
  12361. return;
  12362. const map = {};
  12363. nodeList.forEach((item) => {
  12364. const elem = item.node;
  12365. if (!elem)
  12366. return;
  12367. let id = "__";
  12368. if (elem.nodeType === Node.ELEMENT_NODE) {
  12369. id = `${elem.tagName}_${Array.from(elem.classList)}`;
  12370. } else if (elem.nodeType === Node.TEXT_NODE) {
  12371. id = `text_`;
  12372. }
  12373. if (map[id]) {
  12374. map[id].push(item);
  12375. } else {
  12376. map[id] = [item];
  12377. }
  12378. });
  12379. return map;
  12380. }
  12381. getMaxValueLength(map = {}) {
  12382. if (!map)
  12383. return;
  12384. let max = -Infinity;
  12385. let maxItem = "";
  12386. for (const key in map) {
  12387. const item = key;
  12388. if (Array.isArray(item)) {
  12389. if (item.length > max && item.length > 0) {
  12390. max = item.length;
  12391. maxItem = item;
  12392. }
  12393. }
  12394. }
  12395. return maxItem;
  12396. }
  12397. checkNodeCountCorrect(needNode = []) {
  12398. var _a;
  12399. const listChildrenArr = [];
  12400. const listDOMChildrenArr = [];
  12401. needNode.forEach((group) => {
  12402. if (Array.isArray(group)) {
  12403. listChildrenArr.push(group.length);
  12404. if (group[0] && group[0]._list) {
  12405. const _list = group[0]._list;
  12406. listDOMChildrenArr.push(_list == null ? void 0 : _list.childElementCount);
  12407. }
  12408. }
  12409. });
  12410. if (lodashExports.isEqual(listChildrenArr, listDOMChildrenArr) && needNode.length <= 1) {
  12411. return needNode;
  12412. }
  12413. let targetList = needNode.flat().sort((a, b) => {
  12414. return b.weight - a.weight;
  12415. });
  12416. targetList = lodashExports.uniqWith(targetList, function(a, b) {
  12417. const hasListItem = a._listItem && b._listItem;
  12418. return hasListItem && a._listItem === b._listItem;
  12419. });
  12420. const textGroupArr = this.groupedListByList(targetList);
  12421. if (Array.isArray(textGroupArr) && textGroupArr.length > 0) {
  12422. let maxWeight = -Infinity;
  12423. let maxWeightArr = [];
  12424. textGroupArr.forEach((group) => {
  12425. if (Array.isArray(group)) {
  12426. const groupLength = group.length > 3;
  12427. const avg = lodashExports.meanBy(group, "weight");
  12428. if (avg > maxWeight && groupLength) {
  12429. maxWeight = avg;
  12430. maxWeightArr = group;
  12431. }
  12432. }
  12433. });
  12434. if (maxWeightArr.length > 0) {
  12435. let maxNodeExample = maxWeightArr[0];
  12436. const resMap = this.calcClassifyNode(maxWeightArr);
  12437. if (Object.keys(resMap).length > 1) {
  12438. const maxItem = this.getMaxValueLength(resMap);
  12439. if (Array.isArray(maxItem) && maxItem.length > 0) {
  12440. maxNodeExample = maxItem[0];
  12441. }
  12442. }
  12443. let maxNodeExampleNode = maxNodeExample.node;
  12444. const useParentNode = maxNodeExampleNode.nodeType === Node.TEXT_NODE;
  12445. let maxNodeExampleNodeParentNode = "";
  12446. let nodeIndexInParent = 0;
  12447. if (useParentNode) {
  12448. maxNodeExampleNodeParentNode = maxNodeExampleNode.parentNode;
  12449. if ((_a = maxNodeExample._listItem) == null ? void 0 : _a.contains(maxNodeExampleNodeParentNode)) {
  12450. maxNodeExampleNode = maxNodeExampleNodeParentNode;
  12451. const childNodes = maxNodeExampleNodeParentNode.childNodes;
  12452. for (let i = 0; i < childNodes.length; i++) {
  12453. if (maxNodeExample.node === childNodes[i]) {
  12454. nodeIndexInParent = i;
  12455. break;
  12456. }
  12457. }
  12458. } else {
  12459. maxWeightArr = [];
  12460. return;
  12461. }
  12462. }
  12463. const maxNodeTextSelector = [`${maxNodeExampleNode.localName}`];
  12464. if (maxNodeExampleNode.classList) {
  12465. maxNodeTextSelector.push(`${Array.from(maxNodeExampleNode.classList).join(".")}`);
  12466. }
  12467. const maxNodeTextSelectorText = maxNodeTextSelector.filter((v) => !!v).join(".");
  12468. const maxNodeExampleList = maxNodeExample._list;
  12469. if (maxNodeExampleList) {
  12470. const $list = this.$(maxNodeExampleList);
  12471. const listChildren = $list.children();
  12472. const listItemArr = maxWeightArr.map((node) => {
  12473. return node._listItem;
  12474. });
  12475. listChildren.each((_, item) => {
  12476. var _a2;
  12477. const $listItem = this.$(item);
  12478. let target = $listItem.find(maxNodeTextSelectorText);
  12479. if (useParentNode) {
  12480. if (target && target.length) {
  12481. const childrenNodesTarget = (_a2 = target[0]) == null ? void 0 : _a2.childNodes;
  12482. if (childrenNodesTarget && childrenNodesTarget.length > 0) {
  12483. target = $(childrenNodesTarget[nodeIndexInParent]);
  12484. }
  12485. }
  12486. }
  12487. const text = target.text();
  12488. if (listItemArr.includes(item)) {
  12489. const index = listItemArr.findIndex((ir) => ir === item);
  12490. const maxWeightItem = maxWeightArr[index];
  12491. if ((text == null ? void 0 : text.includes(maxWeightItem.text)) || maxWeightItem.text.includes(text))
  12492. ;
  12493. else {
  12494. if (text) {
  12495. const nodeItemExp = maxWeightItem;
  12496. nodeItemExp.node = target[0];
  12497. nodeItemExp.text = text;
  12498. nodeItemExp.weight = this.calcWeight(nodeItemExp);
  12499. }
  12500. }
  12501. } else {
  12502. if (text) {
  12503. const nodeItemExp = Object.assign({}, maxNodeExample);
  12504. nodeItemExp.node = target[0];
  12505. nodeItemExp.text = text;
  12506. nodeItemExp.weight = this.calcWeight(nodeItemExp);
  12507. nodeItemExp._listItem = item;
  12508. maxWeightArr.push(nodeItemExp);
  12509. }
  12510. }
  12511. });
  12512. }
  12513. }
  12514. if (maxWeightArr.length > 0) {
  12515. return [maxWeightArr];
  12516. } else {
  12517. return [];
  12518. }
  12519. } else {
  12520. return [targetList];
  12521. }
  12522. }
  12523. // 分组算法1:根据父元素进行分组,相同父元素为一组
  12524. groupNodesByParent(nodes = []) {
  12525. const groups = {};
  12526. nodes.forEach((nodeObj) => {
  12527. const parent = nodeObj.node.parentNode;
  12528. if (!groups[parent]) {
  12529. groups[parent] = [];
  12530. }
  12531. groups[parent].push(nodeObj);
  12532. });
  12533. return Object.entries(groups).map(([_, group]) => group);
  12534. }
  12535. // 获取每个元素的父级,最多获取5级,如果遇到取不到parentNode的情况,直接结束寻找,并返回结果
  12536. // 排除body和body的直接子集
  12537. getNodeParentsSiblingsArr(node) {
  12538. const parentNodeArr = [];
  12539. const parentSiblingsCountArr = [];
  12540. const parentSiblingsWeightArr = [];
  12541. const maxDeep = this.findParentsMaxDeep;
  12542. let parent = node.parentNode;
  12543. for (let i = 0; i < maxDeep; i++) {
  12544. if (!parent) {
  12545. break;
  12546. }
  12547. if (parent.tagName === "BODY") {
  12548. parentNodeArr.pop();
  12549. parentSiblingsCountArr.pop();
  12550. parentSiblingsWeightArr.pop();
  12551. break;
  12552. }
  12553. const parentSiblings = getSiblings(parent);
  12554. if (Array.isArray(parentSiblings)) {
  12555. parentSiblingsCountArr.push(parentSiblings.length);
  12556. const weight = parentSiblings.length * ((maxDeep - i) * 20);
  12557. parentSiblingsWeightArr.push(weight);
  12558. }
  12559. parentNodeArr.push(parent);
  12560. parent = parent.parentNode;
  12561. }
  12562. return {
  12563. parentNodeArr,
  12564. parentSiblingsCountArr,
  12565. parentSiblingsWeightArr
  12566. };
  12567. }
  12568. // 辅助函数:检测节点或其后代中是否包含日期元素
  12569. hasDateElement(node) {
  12570. let tagList = this.findEligibleLeafNodes(node, () => true);
  12571. tagList = tagList.map((i) => i.node);
  12572. const arr = tagList.map((elem) => {
  12573. var _a;
  12574. const dateArr = this.extractDates((_a = elem.textContent) == null ? void 0 : _a.trim());
  12575. return {
  12576. date: dateArr,
  12577. hasDate: dateArr.length > 0,
  12578. textContent: elem.textContent
  12579. };
  12580. });
  12581. return arr;
  12582. }
  12583. // 辅助函数:整理今日日期格式
  12584. getTodayDateReg() {
  12585. return this.todayPatterns;
  12586. }
  12587. // 传入node计算权重
  12588. // 1. 包含特殊字符的权重为10
  12589. // 2. 特殊标签h1/h2/h3/h4/h5/a权重为8
  12590. // 3. 文字长度权重=文字长度*0.05
  12591. calcWeight(node) {
  12592. var _a, _b;
  12593. const titleMaxLength = 35;
  12594. const weightMap = {
  12595. importKey: 14,
  12596. importTag: 8,
  12597. className: 3,
  12598. textLength: 0.05,
  12599. maxTextLength: -0.1,
  12600. companyName: -3
  12601. };
  12602. let weight = 0;
  12603. for (let i = 0; i < this.importantKeyList.length; i++) {
  12604. const key = this.importantKeyList[i];
  12605. if (node.text.includes(key)) {
  12606. weight += weightMap.importKey;
  12607. break;
  12608. }
  12609. }
  12610. const tagName = this.getTagName(node.node);
  12611. if (this.importantTagList.includes(tagName)) {
  12612. weight += weightMap.importTag;
  12613. }
  12614. if ((_a = node.node) == null ? void 0 : _a.className) {
  12615. const className = (_b = node.node) == null ? void 0 : _b.className;
  12616. const targetStrList = ["title"];
  12617. for (let i = 0; i < targetStrList.length; i++) {
  12618. const item = targetStrList[i];
  12619. if (className.includes(item)) {
  12620. weight += weightMap.className;
  12621. break;
  12622. }
  12623. }
  12624. }
  12625. if (this.isCompanyName(node.text)) {
  12626. weight += weightMap.companyName;
  12627. }
  12628. const textLength = node.text ? node.text.length : 0;
  12629. weight += textLength * weightMap.textLength;
  12630. if (textLength >= titleMaxLength) {
  12631. const maxTextLengthWeight = (textLength - weightMap.maxTextLength) * weightMap.maxTextLength;
  12632. weight += maxTextLengthWeight;
  12633. }
  12634. return weight;
  12635. }
  12636. }
  12637. class FindFileAttachment {
  12638. constructor({ autoUpload } = {}) {
  12639. __publicField(this, "autoUpload", false);
  12640. __publicField(this, "extensions", ["pdf", "doc", "docx", "xls", "xlsx", "zip", "rar", "PDF", "DOC", "DOCX", "XLS", "XLSX", "ZIP", "RAR"]);
  12641. __publicField(this, "uploadUrl", "http://127.0.0.1:18080/uploadFile");
  12642. this.autoUpload = autoUpload;
  12643. }
  12644. run(container = document.body) {
  12645. const fileAttachmentTagOptions = this.findFileAttachmentTag(container);
  12646. if (this.autoUpload) {
  12647. this.doFileListDownload(fileAttachmentTagOptions);
  12648. }
  12649. const targetFiles = fileAttachmentTagOptions.map((f) => {
  12650. return {
  12651. title: f.title,
  12652. href: f.href,
  12653. filename: f.filename
  12654. };
  12655. });
  12656. const result = {
  12657. files: targetFiles
  12658. };
  12659. console.log({
  12660. ...result,
  12661. fileAttachmentTagOptions
  12662. });
  12663. return result;
  12664. }
  12665. findFileAttachmentTag(container) {
  12666. const ns = [];
  12667. const extensions = this.extensions;
  12668. const extensionRegex = new RegExp("\\.(" + extensions.join("|") + ")$", "i");
  12669. const aTagList = container.querySelectorAll("a[href]");
  12670. aTagList.forEach((v, i) => {
  12671. v.setAttribute("target", "_blank");
  12672. const linkText = v.innerText;
  12673. const href = v.href;
  12674. const filename = v.download || v.filename || linkText;
  12675. if (extensionRegex.test(linkText.toLowerCase()) || extensionRegex.test(href.toLowerCase())) {
  12676. ns.push({
  12677. node: v,
  12678. title: linkText,
  12679. href: v.href,
  12680. filename
  12681. });
  12682. }
  12683. });
  12684. return ns;
  12685. }
  12686. // 文件批量下载
  12687. doFileListDownload(list = []) {
  12688. if (Array.isArray(list)) {
  12689. list.forEach((item) => {
  12690. this.download(item.href, item.filename);
  12691. });
  12692. }
  12693. }
  12694. // 文件下载上传
  12695. // 这是一个JavaScript代码,用于劫持浏览器下载附件。首先通过fetch请求获取文件内容,然后将文件内容转换为blob对象。接着创建一个FormData对象,将文件名和文件内容添加到其中。最后,将文件上传到服务器,并在上传成功后处理服务器返回的数据。
  12696. download(href, filename) {
  12697. const articleUrl = location.href;
  12698. fetch(href).then((response) => {
  12699. if (!response.ok) {
  12700. throw new Error("Network response was not ok");
  12701. }
  12702. return response.blob();
  12703. }).then((blob) => {
  12704. const formData = new FormData();
  12705. formData.append("filename", filename);
  12706. formData.append("file", blob, filename);
  12707. formData.append("orgurl", href);
  12708. formData.append("articleurl", articleUrl);
  12709. return fetch(this.uploadUrl, {
  12710. method: "POST",
  12711. body: formData
  12712. });
  12713. }).then((uploadResponse) => {
  12714. if (!uploadResponse.ok) {
  12715. throw new Error("Upload failed!");
  12716. }
  12717. console.log("File uploaded successfully!");
  12718. return uploadResponse.json();
  12719. }).then((data) => {
  12720. console.log(data);
  12721. }).catch((error) => {
  12722. console.error("Error:", error);
  12723. });
  12724. }
  12725. }
  12726. class ContentRuleA extends RuleBaseInterface {
  12727. constructor(config) {
  12728. super();
  12729. __publicField(this, "importPublishTimeKey", ["发布时间"]);
  12730. __publicField(this, "minContentTextLength", 50);
  12731. // 正文最小值,小于该值的丢弃
  12732. __publicField(this, "maxDeep", 5);
  12733. __publicField(this, "config", {
  12734. titleList: []
  12735. });
  12736. if (config) {
  12737. Object.assign(this.config, config);
  12738. }
  12739. }
  12740. // 主函数:处理DOM并返回所需信息
  12741. run(conf) {
  12742. var _a;
  12743. const { titleList } = this.config;
  12744. let titleInfo = null;
  12745. let dateTimeInfo = null;
  12746. let contentNode = null;
  12747. let articleInfo = null;
  12748. if (conf && Object.keys(conf).length > 0) {
  12749. console.log("根据选择器获取数据...");
  12750. articleInfo = this.getArticleInfoWithSelector(conf);
  12751. } else {
  12752. console.log("根据规则计算数据...");
  12753. articleInfo = this.getArticleInfo();
  12754. }
  12755. titleInfo = articleInfo.titleInfo;
  12756. dateTimeInfo = articleInfo.dateTimeInfo;
  12757. contentNode = articleInfo.contentNode;
  12758. const files = this.getFileList();
  12759. const result = {
  12760. href: location.href,
  12761. title: titleInfo == null ? void 0 : titleInfo.text,
  12762. titleSelector: titleInfo == null ? void 0 : titleInfo.selector,
  12763. listTitle: Array.isArray(titleList) ? titleList[0] : titleList,
  12764. content: contentNode ? (_a = contentNode.node) == null ? void 0 : _a.innerHTML : "",
  12765. contentSelector: contentNode ? this.generateCSSSelector(contentNode.node) : "",
  12766. publishtime: dateTimeInfo == null ? void 0 : dateTimeInfo.text,
  12767. publishtimeSelector: dateTimeInfo == null ? void 0 : dateTimeInfo.selector,
  12768. files
  12769. };
  12770. this.report(result);
  12771. return result;
  12772. }
  12773. getArticleInfo(container = document.body) {
  12774. const { titleList } = this.config;
  12775. let eligibleNodes = [];
  12776. if (Array.isArray(titleList)) {
  12777. titleList.forEach((t) => {
  12778. const gotNodes = this.findEligibleLeafNodesForContentLtMark(container, t);
  12779. if (Array.isArray(gotNodes) && gotNodes.length > 0) {
  12780. eligibleNodes = eligibleNodes.concat(gotNodes);
  12781. }
  12782. });
  12783. } else if (typeof titleList === "string") {
  12784. eligibleNodes = this.findEligibleLeafNodesForContentLtMark(container, titleList);
  12785. }
  12786. const needNodes = this.calcNodesInfo(eligibleNodes);
  12787. const titleInfo = this.getTitleText(needNodes);
  12788. const contentNodeOptions = this.getNeedNodesParentsAndSiblings(needNodes);
  12789. const dateTimeInfo = this.findTargetDateTime(needNodes);
  12790. let targetNode = null;
  12791. if (contentNodeOptions.length > 0) {
  12792. targetNode = contentNodeOptions[0];
  12793. if (targetNode.node) {
  12794. targetNode.node = this.simplifyDOM(targetNode.node);
  12795. }
  12796. }
  12797. console.log({
  12798. eligibleNodes,
  12799. needNodes,
  12800. contentNodeOptions,
  12801. targetNode
  12802. });
  12803. return {
  12804. titleInfo,
  12805. dateTimeInfo,
  12806. contentNode: targetNode
  12807. };
  12808. }
  12809. // 通过选择器获取数据
  12810. getArticleInfoWithSelector(conf = {}) {
  12811. const { titleSelector, contentSelector, publishtimeSelector } = conf;
  12812. let titleInfo = null;
  12813. let dateTimeInfo = null;
  12814. let contentNode = null;
  12815. if (titleSelector) {
  12816. const titleDOM = document.querySelector(titleSelector);
  12817. titleInfo = {
  12818. selector: titleSelector,
  12819. // text: titleDOM?.innerText,
  12820. text: this.getTitleTextWithDOM(titleDOM)
  12821. };
  12822. }
  12823. if (contentSelector) {
  12824. const contentDOM = document.querySelector(contentSelector);
  12825. contentNode = {
  12826. node: contentDOM,
  12827. text: contentDOM == null ? void 0 : contentDOM.innerHTML
  12828. };
  12829. ({
  12830. selector: contentSelector,
  12831. text: contentDOM == null ? void 0 : contentDOM.innerHTML
  12832. });
  12833. }
  12834. if (publishtimeSelector) {
  12835. const pbDOM = document.querySelector(publishtimeSelector);
  12836. dateTimeInfo = {
  12837. selector: publishtimeSelector,
  12838. // text: pbDOM?.innerHTML,
  12839. text: this.getTitleDateTimeWithDOM(pbDOM)
  12840. };
  12841. }
  12842. return {
  12843. titleInfo,
  12844. dateTimeInfo,
  12845. contentNode
  12846. };
  12847. }
  12848. getTitleTextWithDOM(dom) {
  12849. if (!dom) {
  12850. return;
  12851. }
  12852. const nodeList = [
  12853. {
  12854. node: dom,
  12855. text: dom == null ? void 0 : dom.textContent
  12856. }
  12857. ];
  12858. const info = this.getTitleText(nodeList);
  12859. return info.text;
  12860. }
  12861. getTitleDateTimeWithDOM(dom) {
  12862. if (!dom) {
  12863. return;
  12864. }
  12865. const text = this.findTargetDateTimeWithDOM(dom);
  12866. return text;
  12867. }
  12868. findEligibleLeafNodesForContentLtMark(node, markText) {
  12869. if (!markText) {
  12870. markText = "";
  12871. }
  12872. const maskTextSorted = markText.trim().replace(/\.{2,}/g, "");
  12873. return this.findEligibleLeafNodes(node, (node2) => {
  12874. const contentText = node2 == null ? void 0 : node2.textContent;
  12875. if (contentText && contentText.includes(maskTextSorted)) {
  12876. if (this.checkNodeHidden(node2)) {
  12877. return false;
  12878. } else {
  12879. return true;
  12880. }
  12881. } else {
  12882. return false;
  12883. }
  12884. });
  12885. }
  12886. // 找到精确的node(会有可能找到文本节点)
  12887. findExactNode(elem, str) {
  12888. if (elem.childElementCount <= 0)
  12889. return elem;
  12890. const childNodes = elem.childNodes;
  12891. if (!childNodes)
  12892. return elem;
  12893. if (childNodes.length <= 0)
  12894. return elem;
  12895. const list = Array.from(childNodes);
  12896. let target = null;
  12897. for (let i = 0; i < list.length; i++) {
  12898. const item = list[i];
  12899. if (this.excludeTags.includes(item.nodeName)) {
  12900. continue;
  12901. }
  12902. if (item.textContent.includes(str)) {
  12903. const r = this.findExactNode(item, str);
  12904. if (r) {
  12905. target = r;
  12906. break;
  12907. }
  12908. }
  12909. }
  12910. return target;
  12911. }
  12912. // 找精确elem
  12913. findExactElement(elem, str) {
  12914. const node = this.findExactNode(elem, str);
  12915. if ((node == null ? void 0 : node.nodeType) === Node.TEXT_NODE) {
  12916. return node.parentNode;
  12917. } else {
  12918. return node;
  12919. }
  12920. }
  12921. // 找发布时间(也找了兄弟元素)
  12922. findTargetDateTime(nodes = []) {
  12923. if (!Array.isArray(nodes)) {
  12924. return;
  12925. }
  12926. if (nodes.length <= 0) {
  12927. return;
  12928. }
  12929. let targetList = [];
  12930. for (let i = 0; i < nodes.length; i++) {
  12931. const node = nodes[i];
  12932. const dateTimeArr = this.findDateTimeString(node);
  12933. dateTimeArr.forEach((item) => {
  12934. item.baseNodeIndex = i;
  12935. });
  12936. targetList = targetList.concat(dateTimeArr);
  12937. }
  12938. targetList.forEach((item) => {
  12939. item.weight = this.calcDateTimeWeight(item);
  12940. });
  12941. const sorted = targetList.sort((a, b) => b.weight - a.weight);
  12942. const resultArr = sorted.filter((item) => {
  12943. return this.hasMatchPublishTimeKey(item);
  12944. });
  12945. let tarArr = resultArr.length > 0 ? resultArr : sorted;
  12946. const tar = tarArr[0];
  12947. if (Array.isArray(tar == null ? void 0 : tar.times) && (tar == null ? void 0 : tar.times.length) > 0) {
  12948. const text = tar == null ? void 0 : tar.times[0];
  12949. const pbNode = this.findExactElement(tar.node, text);
  12950. const selector = this.generateCSSSelector(pbNode);
  12951. return {
  12952. text,
  12953. selector
  12954. };
  12955. }
  12956. }
  12957. findTargetDateTimeWithDOM(dom) {
  12958. const r = this.findTargetDateTimeFilter(dom);
  12959. if (r) {
  12960. const { times } = r;
  12961. const text = times[0];
  12962. return text;
  12963. } else {
  12964. return "";
  12965. }
  12966. }
  12967. findTargetDateTimeFilter(dom) {
  12968. const text = dom.innerHTML;
  12969. if (text) {
  12970. const r = this.extractDates(text);
  12971. if (r && Array.isArray(r) && r.length > 0) {
  12972. return {
  12973. times: r,
  12974. node: dom
  12975. };
  12976. } else {
  12977. return false;
  12978. }
  12979. } else {
  12980. return false;
  12981. }
  12982. }
  12983. findDateTimeString(node) {
  12984. const elem = node.node;
  12985. if (!node.node) {
  12986. return;
  12987. }
  12988. const arr = this.getEachNeedNodeParentsAndSiblings(elem, ({ item, deep }) => {
  12989. return this.findTargetDateTimeFilter(item);
  12990. });
  12991. return arr.filter((r) => !!r);
  12992. }
  12993. getNeedNodesParentsAndSiblings(nodes = []) {
  12994. if (!Array.isArray(nodes))
  12995. return;
  12996. let arr = [];
  12997. nodes.forEach((node) => {
  12998. const passInfoArr = this.getEachNeedNodeParentsAndSiblings(node.node, ({ item, deep }) => {
  12999. const text = item.innerText;
  13000. if (text && text.length > this.minContentTextLength) {
  13001. const passInfo = {
  13002. node: item,
  13003. text
  13004. };
  13005. passInfo.weight = this.calcContentWeight(passInfo, deep);
  13006. return passInfo;
  13007. } else {
  13008. return false;
  13009. }
  13010. });
  13011. if (passInfoArr.length > 0) {
  13012. arr = arr.concat(passInfoArr);
  13013. }
  13014. });
  13015. return arr.sort((a, b) => b.weight - a.weight);
  13016. }
  13017. getTitleText(titleNeedList = []) {
  13018. if (!Array.isArray(titleNeedList))
  13019. return;
  13020. if (titleNeedList.length === 0)
  13021. return;
  13022. const maxWeightNode = titleNeedList[0];
  13023. if (maxWeightNode) {
  13024. const exactNode = this.findExactElement(maxWeightNode.node, maxWeightNode.text);
  13025. const selector = this.generateCSSSelector(exactNode);
  13026. return {
  13027. ...maxWeightNode,
  13028. selector
  13029. };
  13030. }
  13031. }
  13032. // 通用函数:找兄弟元素以及父级元素兄弟元素
  13033. getEachNeedNodeParentsAndSiblings(elem, callback, deep = this.maxDeep) {
  13034. if (!elem)
  13035. return;
  13036. let passElemArr = [];
  13037. const $elem = this.$(elem);
  13038. const $parent = $elem.parent();
  13039. const siblings = $elem.siblings();
  13040. if (siblings.length > 0) {
  13041. siblings.each((i, item) => {
  13042. const tagName = this.getTagName(item);
  13043. const isExcludeTags = this.excludeTags.includes(tagName);
  13044. const passInfo = callback && callback({ item, deep });
  13045. if (passInfo && !isExcludeTags) {
  13046. passElemArr.push(passInfo);
  13047. }
  13048. });
  13049. }
  13050. if (deep > 0) {
  13051. const passArr = this.getEachNeedNodeParentsAndSiblings($parent[0], callback, --deep);
  13052. passElemArr = passElemArr.concat(passArr);
  13053. }
  13054. return passElemArr;
  13055. }
  13056. calcNodesInfo(nodes = []) {
  13057. if (!Array.isArray(nodes))
  13058. return;
  13059. const weightNodes = nodes.map((n) => {
  13060. n.weight = this.calcTitleWeight(n);
  13061. return n;
  13062. });
  13063. return weightNodes.sort((a, b) => b.weight - a.weight);
  13064. }
  13065. simplifyDOM(elem) {
  13066. const $elem = this.$(elem);
  13067. $elem.find("style").remove();
  13068. $elem.find("script").remove();
  13069. return elem;
  13070. }
  13071. calcTitleWeight(node) {
  13072. var _a, _b;
  13073. const titleMaxLength = 25;
  13074. const weightMap = {
  13075. importTag: 8,
  13076. className: 3,
  13077. textLength: 0.05,
  13078. maxTextLength: -0.1
  13079. };
  13080. let weight = 0;
  13081. const tagName = this.getTagName(node.node);
  13082. if (this.importantTagList.includes(tagName)) {
  13083. weight += weightMap.importTag;
  13084. }
  13085. if ((_a = node.node) == null ? void 0 : _a.className) {
  13086. const className = (_b = node.node) == null ? void 0 : _b.className;
  13087. const targetStrList = ["title"];
  13088. for (let i = 0; i < targetStrList.length; i++) {
  13089. const item = targetStrList[i];
  13090. if (className.includes(item)) {
  13091. weight += weightMap.className;
  13092. break;
  13093. }
  13094. }
  13095. }
  13096. const textLength = node.text ? node.text.length : 0;
  13097. weight += textLength * weightMap.textLength;
  13098. if (textLength >= titleMaxLength) {
  13099. const maxTextLengthWeight = (textLength - weightMap.maxTextLength) * weightMap.maxTextLength;
  13100. weight += maxTextLengthWeight;
  13101. }
  13102. return weight;
  13103. }
  13104. calcContentWeight(node, deep) {
  13105. const weightMap = {
  13106. textLength: 0.05,
  13107. deep: [200, 170, 90, 50, 20, 10]
  13108. // 从元素往上走,兄弟元素视为第0级,
  13109. // children: -1, // 子元素越多,权重越小
  13110. };
  13111. let weight = 0;
  13112. const weightDeepValue = weightMap.deep[this.maxDeep - deep] || 1;
  13113. const textLength = node.text ? node.text.length : 0;
  13114. weight += textLength * weightMap.textLength;
  13115. if (weightDeepValue) {
  13116. weight += weightDeepValue;
  13117. }
  13118. return weight;
  13119. }
  13120. calcDateTimeWeight(node) {
  13121. const textMaxLength = 30;
  13122. const weightMap = {
  13123. importKey: 300,
  13124. className: 30,
  13125. baseNodeIndex: [200, 170, 90, 50, 20, 10],
  13126. // 从元素往上走,兄弟元素视为第0级,
  13127. maxTextLength: -3
  13128. };
  13129. let weight = 0;
  13130. if (!node)
  13131. return weight;
  13132. const elem = node.node;
  13133. const baseIndex = node.baseNodeIndex;
  13134. const weightDeepValue = weightMap.baseNodeIndex[baseIndex] || 1;
  13135. if (weightDeepValue) {
  13136. weight += weightDeepValue;
  13137. }
  13138. if (elem == null ? void 0 : elem.className) {
  13139. const className = elem == null ? void 0 : elem.className;
  13140. const targetStrList = ["time"];
  13141. for (let i = 0; i < targetStrList.length; i++) {
  13142. const item = targetStrList[i];
  13143. if (className.includes(item)) {
  13144. weight += weightMap.className;
  13145. break;
  13146. }
  13147. }
  13148. }
  13149. if (elem == null ? void 0 : elem.innerText) {
  13150. const text = elem == null ? void 0 : elem.innerText;
  13151. if (text.length >= textMaxLength) {
  13152. const maxTextLengthWeight = (text.length - textMaxLength) * weightMap.maxTextLength;
  13153. weight += maxTextLengthWeight;
  13154. }
  13155. }
  13156. return weight;
  13157. }
  13158. hasMatchPublishTimeKey(node) {
  13159. const elem = node.node;
  13160. const target = [];
  13161. for (let i = 0; i < this.importPublishTimeKey.length; i++) {
  13162. const key = this.importPublishTimeKey[i];
  13163. const selfText = elem == null ? void 0 : elem.innerText;
  13164. if (selfText.includes(key)) {
  13165. target.push(node);
  13166. break;
  13167. }
  13168. const arr = this.getEachNeedNodeParentsAndSiblings(elem, ({ item }) => {
  13169. const text = item.innerText;
  13170. if (text) {
  13171. const matched = text.includes(key);
  13172. if (matched) {
  13173. return elem;
  13174. }
  13175. }
  13176. }, 0);
  13177. if (arr.length > 0) {
  13178. target.push(node);
  13179. break;
  13180. }
  13181. }
  13182. return target.length > 0;
  13183. }
  13184. getFileList() {
  13185. const fileAttachmentFinder = new FindFileAttachment();
  13186. this.fileAttachmentFinder = fileAttachmentFinder;
  13187. const { files } = fileAttachmentFinder.run();
  13188. return files;
  13189. }
  13190. }
  13191. function getPageList(selector) {
  13192. const rulesList = [
  13193. new ListRuleB()
  13194. ];
  13195. const runner = new JsSpiderSDK(rulesList, {
  13196. useAsync: false
  13197. });
  13198. runner.run(selector);
  13199. return {
  13200. core: runner,
  13201. rulesList
  13202. };
  13203. }
  13204. function getContentInfo(titleSelector, publishtimeSelector, contentSelector) {
  13205. const rulesList = [
  13206. new ContentRuleA({
  13207. titleList: [
  13208. "合肥市大数据资产运营有限公司2024年度公开招聘公告"
  13209. // http://www.bigdatahefei.com/index.php/index/show/index?id=2309
  13210. ]
  13211. })
  13212. ];
  13213. const runner = new JsSpiderSDK(rulesList, {
  13214. useAsync: false
  13215. });
  13216. const config = {
  13217. titleSelector,
  13218. publishtimeSelector,
  13219. contentSelector
  13220. // titleSelector: 'div:nth-child(8) > div:nth-child(2) > div:nth-child(2) > div:nth-child(1)',
  13221. // publishtimeSelector: 'div:nth-child(8) > div:nth-child(2) > div:nth-child(2) > div:nth-child(2) > div:nth-child(1)',
  13222. // contentSelector: 'div:nth-child(8) > div:nth-child(2) > div:nth-child(2) > #zoom'
  13223. };
  13224. for (const key in config) {
  13225. if (config[key]) {
  13226. continue;
  13227. } else {
  13228. delete config[key];
  13229. }
  13230. }
  13231. runner.run(config);
  13232. return {
  13233. core: runner,
  13234. rulesList
  13235. };
  13236. }
  13237. function fileUpload() {
  13238. const rulesList = [
  13239. new FindFileAttachment({ autoUpload: true })
  13240. ];
  13241. const runner = new JsSpiderSDK(rulesList, {
  13242. useAsync: false
  13243. });
  13244. runner.run();
  13245. return {
  13246. core: runner,
  13247. rulesList
  13248. };
  13249. }
  13250. getPageList('default_Container_Selector');
  13251. window.spiderSdk = {
  13252. version,
  13253. SpiderCore: JsSpiderSDK,
  13254. RuleBase: RuleBaseInterface,
  13255. ListRuleB,
  13256. ContentRuleA,
  13257. FindFileAttachment,
  13258. getPageList,
  13259. getContentInfo,
  13260. fileUpload
  13261. };
  13262. })();
  13263. result;